Version 2.2.1-dev.3.0

Merge commit '3a93cf9464cb2e664eb3802518fe8e824a09e1f1' into dev
diff --git a/.packages b/.packages
index 87f497f..cf69a8b 100644
--- a/.packages
+++ b/.packages
@@ -62,6 +62,7 @@
 mustache:third_party/pkg/mustache/lib
 oauth2:third_party/pkg/oauth2/lib
 observatory:runtime/observatory/lib
+observatory_test_package:runtime/observatory/tests/service/observatory_test_package
 package_config:third_party/pkg_tested/package_config/lib
 package_resolver:third_party/pkg_tested/package_resolver/lib
 path:third_party/pkg/path/lib
diff --git a/CHANGELOG.md b/CHANGELOG.md
index 0c8043b..29f220f 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -1,12 +1,34 @@
-## 2.2.1-dev.2.1
+## 2.2.1-dev.3.0
 
-* Cherry-pick 611a53ee5eb091af491ed8fa74295ee779743a90 to dev
+### Core library changes
+
+#### `dart:isolate`
+
+* Added `debugName` property to `Isolate`.
+* Added `debugName` optional parameter to `Isolate.spawn` and
+  `Isolate.spawnUri`.
+
+### Tool Changes
 
 #### dartfmt
 
 * Tweak set literal formatting to follow other collection literals.
 * Add support for "UI as code" features.
 
+#### Linter
+
+The Linter was updated to `0.1.83` which includes the following changes:
+
+* updated `file_names` to skip prefixed-extension Dart files (e.g., `.css.dart`, `.g.dart`)
+* updated SDK constraint to `2.2.0`
+* miscellaneous rule documentation fixes
+* (internal) updated sources to use Set literals
+* fixed NPE in `avoid_shadowing_type_parameters`
+* added linter version numbering for use in analyzer summaries
+* fixed type utilities to handle inheritance cycles
+* (internal) changes to adopt new `package:analyzer` APIs
+* fixed `unnecessary_parenthesis` false positives
+
 ## 2.2.1-dev.2.0
 
 ## 2.2.1-dev.1.1
@@ -16,7 +38,13 @@
 
 ## 2.2.1-dev.1.0
 
+* Support for deprecated flags '-c' and '--checked' has been removed
 * RegExp patterns can now use lookbehind assertions.
+* RegExp patterns can now use named capture groups and named backreferences.
+  Currently, named group matches can only be retrieved in Dart either by
+  the implicit index of the named group or by downcasting the returned Match
+  object to the type RegExpMatch. The RegExpMatch interface contains methods
+  for retrieving the available group names and retrieving a match by group name.
 
 ### Tool Changes
 
@@ -24,8 +52,10 @@
 
 * Added a CHANGELOG validator that complains if you `pub publish` without mentioning the current
   version.
+* Removed validation of library names when doing `pub publish`.
 * Added support for `pub global activate`ing package from a custom pub URL.
 * Added subcommand: `pub logout`. Logs you out of the current session.
+* Fix: Use default server for `pub uploader` command.
 
 #### dart2js
 
diff --git a/DEPS b/DEPS
index 724eb2b..cc1d44e 100644
--- a/DEPS
+++ b/DEPS
@@ -36,7 +36,7 @@
   "chromium_git": "https://chromium.googlesource.com",
   "fuchsia_git": "https://fuchsia.googlesource.com",
 
-  "co19_2_rev": "2d157d6b9135f891ffd1d35b7a2d5dfa57611f63",
+  "co19_2_rev": "c3b33ee90c5ee7f88fdb0ead08fdbb40c54954d2",
 
   # As Flutter does, we use Fuchsia's GN and Clang toolchain. These revision
   # should be kept up to date with the revisions pulled by the Flutter engine.
@@ -95,7 +95,7 @@
   "intl_tag": "0.15.7",
   "jinja2_rev": "2222b31554f03e62600cd7e383376a7c187967a1",
   "json_rpc_2_tag": "2.0.9",
-  "linter_tag": "0.1.82",
+  "linter_tag": "0.1.83",
   "logging_tag": "0.11.3+2",
   "markupsafe_rev": "8f45f5cfa0009d2a70589bcda0349b8cb2b72783",
   "markdown_tag": "2.0.2",
@@ -111,7 +111,7 @@
   "ply_rev": "604b32590ffad5cbb82e4afef1d305512d06ae93",
   "pool_tag": "1.3.6",
   "protobuf_rev": "0c77167b16d00b561a6055bfe26690af7f26ae88",
-  "pub_rev": "3c060aae47985e9a248b850f1d0450304a5c97e3",
+  "pub_rev": "8c363fe26f059c3063f1129adbb3c4e22a8ce954",
   "pub_semver_tag": "1.4.2",
   "quiver_tag": "2.0.0+1",
   "resource_rev": "2.1.5",
diff --git a/pkg/analysis_server/doc/api.html b/pkg/analysis_server/doc/api.html
index c8b0845..f384766 100644
--- a/pkg/analysis_server/doc/api.html
+++ b/pkg/analysis_server/doc/api.html
@@ -2891,6 +2891,11 @@
         <p>
           The name, as a string, of the error code associated with this error.
         </p>
+      </dd><dt class="field"><b>url: String<span style="color:#999999"> (optional)</span></b></dt><dd>
+        
+        <p>
+          The URL of a page containing documentation associated with this error.
+        </p>
       </dd><dt class="field"><b>hasFix: bool<span style="color:#999999"> (optional)</span></b></dt><dd>
         
         <p>
diff --git a/pkg/analysis_server/lib/protocol/protocol_generated.dart b/pkg/analysis_server/lib/protocol/protocol_generated.dart
index 72a9529..ad7e249 100644
--- a/pkg/analysis_server/lib/protocol/protocol_generated.dart
+++ b/pkg/analysis_server/lib/protocol/protocol_generated.dart
@@ -21542,7 +21542,7 @@
  * {
  *   "lexeme": String
  *   "type": String
- *   "validElementKinds": List<ElementKind>
+ *   "validElementKinds": optional List<String>
  * }
  *
  * Clients may not extend, implement or mix-in this class.
@@ -21552,7 +21552,7 @@
 
   String _type;
 
-  List<ElementKind> _validElementKinds;
+  List<String> _validElementKinds;
 
   /**
    * The raw token text.
@@ -21583,18 +21583,16 @@
   /**
    * The kinds of elements which could validly replace this token.
    */
-  List<ElementKind> get validElementKinds => _validElementKinds;
+  List<String> get validElementKinds => _validElementKinds;
 
   /**
    * The kinds of elements which could validly replace this token.
    */
-  void set validElementKinds(List<ElementKind> value) {
-    assert(value != null);
+  void set validElementKinds(List<String> value) {
     this._validElementKinds = value;
   }
 
-  TokenDetails(
-      String lexeme, String type, List<ElementKind> validElementKinds) {
+  TokenDetails(String lexeme, String type, {List<String> validElementKinds}) {
     this.lexeme = lexeme;
     this.type = type;
     this.validElementKinds = validElementKinds;
@@ -21618,17 +21616,15 @@
       } else {
         throw jsonDecoder.mismatch(jsonPath, "type");
       }
-      List<ElementKind> validElementKinds;
+      List<String> validElementKinds;
       if (json.containsKey("validElementKinds")) {
         validElementKinds = jsonDecoder.decodeList(
             jsonPath + ".validElementKinds",
             json["validElementKinds"],
-            (String jsonPath, Object json) =>
-                new ElementKind.fromJson(jsonDecoder, jsonPath, json));
-      } else {
-        throw jsonDecoder.mismatch(jsonPath, "validElementKinds");
+            jsonDecoder.decodeString);
       }
-      return new TokenDetails(lexeme, type, validElementKinds);
+      return new TokenDetails(lexeme, type,
+          validElementKinds: validElementKinds);
     } else {
       throw jsonDecoder.mismatch(jsonPath, "TokenDetails", json);
     }
@@ -21639,8 +21635,9 @@
     Map<String, dynamic> result = {};
     result["lexeme"] = lexeme;
     result["type"] = type;
-    result["validElementKinds"] =
-        validElementKinds.map((ElementKind value) => value.toJson()).toList();
+    if (validElementKinds != null) {
+      result["validElementKinds"] = validElementKinds;
+    }
     return result;
   }
 
@@ -21653,7 +21650,7 @@
       return lexeme == other.lexeme &&
           type == other.type &&
           listEqual(validElementKinds, other.validElementKinds,
-              (ElementKind a, ElementKind b) => a == b);
+              (String a, String b) => a == b);
     }
     return false;
   }
diff --git a/pkg/analysis_server/lib/src/computer/computer_highlights.dart b/pkg/analysis_server/lib/src/computer/computer_highlights.dart
index 11a75c4..7c150bab 100644
--- a/pkg/analysis_server/lib/src/computer/computer_highlights.dart
+++ b/pkg/analysis_server/lib/src/computer/computer_highlights.dart
@@ -494,10 +494,10 @@
   }
 
   @override
-  void visitForStatement2(ForStatement2 node) {
+  void visitForStatement(ForStatement node) {
     computer._addRegion_token(node.awaitKeyword, HighlightRegionType.BUILT_IN);
     computer._addRegion_token(node.forKeyword, HighlightRegionType.KEYWORD);
-    super.visitForStatement2(node);
+    super.visitForStatement(node);
   }
 
   @override
diff --git a/pkg/analysis_server/lib/src/computer/computer_highlights2.dart b/pkg/analysis_server/lib/src/computer/computer_highlights2.dart
index ad84927..fe52ab6 100644
--- a/pkg/analysis_server/lib/src/computer/computer_highlights2.dart
+++ b/pkg/analysis_server/lib/src/computer/computer_highlights2.dart
@@ -585,10 +585,10 @@
   }
 
   @override
-  void visitForStatement2(ForStatement2 node) {
+  void visitForStatement(ForStatement node) {
     computer._addRegion_token(node.awaitKeyword, HighlightRegionType.BUILT_IN);
     computer._addRegion_token(node.forKeyword, HighlightRegionType.KEYWORD);
-    super.visitForStatement2(node);
+    super.visitForStatement(node);
   }
 
   @override
diff --git a/pkg/analysis_server/lib/src/computer/computer_hover.dart b/pkg/analysis_server/lib/src/computer/computer_hover.dart
index 3af0fbd..4229e9c 100644
--- a/pkg/analysis_server/lib/src/computer/computer_hover.dart
+++ b/pkg/analysis_server/lib/src/computer/computer_hover.dart
@@ -10,16 +10,17 @@
 import 'package:analyzer/dart/element/type.dart';
 import 'package:analyzer/src/dart/ast/element_locator.dart';
 import 'package:analyzer/src/dart/ast/utilities.dart';
-import 'package:analyzer/src/util/comment.dart';
+import 'package:analyzer/src/dartdoc/dartdoc_directive_info.dart';
 
 /**
  * A computer for the hover at the specified offset of a Dart [CompilationUnit].
  */
 class DartUnitHoverComputer {
+  final DartdocDirectiveInfo _dartdocInfo;
   final CompilationUnit _unit;
   final int _offset;
 
-  DartUnitHoverComputer(this._unit, this._offset);
+  DartUnitHoverComputer(this._dartdocInfo, this._unit, this._offset);
 
   /**
    * Returns the computed hover, maybe `null`.
@@ -76,7 +77,7 @@
           }
         }
         // documentation
-        hover.dartdoc = computeDocumentation(element);
+        hover.dartdoc = computeDocumentation(_dartdocInfo, element);
       }
       // parameter
       hover.parameter = _safeToString(expression.staticParameterElement);
@@ -104,7 +105,8 @@
     return null;
   }
 
-  static String computeDocumentation(Element element) {
+  static String computeDocumentation(
+      DartdocDirectiveInfo dartdocInfo, Element element) {
     // TODO(dantup) We're reusing this in parameter information - move it somewhere shared?
     if (element is FieldFormalParameterElement) {
       element = (element as FieldFormalParameterElement).field;
@@ -119,7 +121,7 @@
     }
     // The documentation of the element itself.
     if (element.documentationComment != null) {
-      return getDartDocPlainText(element.documentationComment);
+      return dartdocInfo.processDartdoc(element.documentationComment);
     }
     // Look for documentation comments of overridden members.
     OverriddenElements overridden = findOverriddenElements(element);
@@ -129,7 +131,7 @@
       String rawDoc = superElement.documentationComment;
       if (rawDoc != null) {
         Element interfaceClass = superElement.enclosingElement;
-        return getDartDocPlainText(rawDoc) +
+        return dartdocInfo.processDartdoc(rawDoc) +
             '\n\nCopied from `${interfaceClass.displayName}`.';
       }
     }
diff --git a/pkg/analysis_server/lib/src/computer/computer_signature.dart b/pkg/analysis_server/lib/src/computer/computer_signature.dart
index 2dd950c..81f8cea 100644
--- a/pkg/analysis_server/lib/src/computer/computer_signature.dart
+++ b/pkg/analysis_server/lib/src/computer/computer_signature.dart
@@ -10,13 +10,16 @@
 import 'package:analyzer/dart/element/element.dart';
 import 'package:analyzer/src/dart/ast/element_locator.dart';
 import 'package:analyzer/src/dart/ast/utilities.dart';
+import 'package:analyzer/src/dartdoc/dartdoc_directive_info.dart';
 
 /**
  * A computer for the signature at the specified offset of a Dart [CompilationUnit].
  */
 class DartUnitSignatureComputer {
+  final DartdocDirectiveInfo _dartdocInfo;
   final AstNode _node;
-  DartUnitSignatureComputer(CompilationUnit _unit, int _offset)
+  DartUnitSignatureComputer(
+      this._dartdocInfo, CompilationUnit _unit, int _offset)
       : _node = new NodeLocator(_offset).searchWithin(_unit);
 
   bool get offsetIsValid => _node != null;
@@ -68,7 +71,8 @@
         execElement.parameters.map((p) => _convertParam(p)).toList();
 
     return new AnalysisGetSignatureResult(name, parameters,
-        dartdoc: DartUnitHoverComputer.computeDocumentation(execElement));
+        dartdoc: DartUnitHoverComputer.computeDocumentation(
+            _dartdocInfo, execElement));
   }
 
   ParameterInfo _convertParam(ParameterElement param) {
diff --git a/pkg/analysis_server/lib/src/context_manager.dart b/pkg/analysis_server/lib/src/context_manager.dart
index b7312d6..f9ce8ac 100644
--- a/pkg/analysis_server/lib/src/context_manager.dart
+++ b/pkg/analysis_server/lib/src/context_manager.dart
@@ -846,11 +846,10 @@
     try {
       String content = _readFile(path);
       LineInfo lineInfo = _computeLineInfo(content);
-      List<AnalysisError> errors =
-          GenerateOptionsErrorsTask.analyzeAnalysisOptions(
-              resourceProvider.getFile(path).createSource(),
-              content,
-              driver.sourceFactory);
+      List<AnalysisError> errors = analyzeAnalysisOptions(
+          resourceProvider.getFile(path).createSource(),
+          content,
+          driver.sourceFactory);
       AnalyzerConverter converter = new AnalyzerConverter();
       convertedErrors = converter.convertAnalysisErrors(errors,
           lineInfo: lineInfo, options: driver.analysisOptions);
diff --git a/pkg/analysis_server/lib/src/domain_analysis.dart b/pkg/analysis_server/lib/src/domain_analysis.dart
index d284e43..53a2d7f 100644
--- a/pkg/analysis_server/lib/src/domain_analysis.dart
+++ b/pkg/analysis_server/lib/src/domain_analysis.dart
@@ -21,6 +21,7 @@
 import 'package:analyzer/dart/ast/ast.dart';
 import 'package:analyzer/error/error.dart' as engine;
 import 'package:analyzer/src/dart/analysis/driver.dart';
+import 'package:analyzer/src/dartdoc/dartdoc_directive_info.dart';
 import 'package:analyzer/src/generated/engine.dart' as engine;
 import 'package:analyzer_plugin/protocol/protocol.dart' as plugin;
 import 'package:analyzer_plugin/protocol/protocol_common.dart';
@@ -87,8 +88,9 @@
     // Prepare the hovers.
     List<HoverInformation> hovers = <HoverInformation>[];
     if (unit != null) {
-      HoverInformation hoverInformation =
-          new DartUnitHoverComputer(unit, params.offset).compute();
+      HoverInformation hoverInformation = new DartUnitHoverComputer(
+              _getDartdocDirectiveInfoFor(result), unit, params.offset)
+          .compute();
       if (hoverInformation != null) {
         hovers.add(hoverInformation);
       }
@@ -276,7 +278,8 @@
 
     // Ensure the offset provided is a valid location in the file.
     final unit = result.unit;
-    final computer = new DartUnitSignatureComputer(unit, params.offset);
+    final computer = new DartUnitSignatureComputer(
+        _getDartdocDirectiveInfoFor(result), unit, params.offset);
     if (!computer.offsetIsValid) {
       server.sendResponse(new Response.getSignatureInvalidOffset(request));
       return;
@@ -506,4 +509,12 @@
     server.updateOptions(updaters);
     return new AnalysisUpdateOptionsResult().toResponse(request.id);
   }
+
+  DartdocDirectiveInfo _getDartdocDirectiveInfoFor(ResolvedUnitResult result) {
+    // TODO(brianwilkerson) Consider moving this to AnalysisServer.
+    return server.declarationsTracker
+            ?.getContext(result.session.analysisContext)
+            ?.dartdocDirectiveInfo ??
+        new DartdocDirectiveInfo();
+  }
 }
diff --git a/pkg/analysis_server/lib/src/domain_completion.dart b/pkg/analysis_server/lib/src/domain_completion.dart
index a08c3bc..e5d221d 100644
--- a/pkg/analysis_server/lib/src/domain_completion.dart
+++ b/pkg/analysis_server/lib/src/domain_completion.dart
@@ -16,6 +16,7 @@
 import 'package:analysis_server/src/services/completion/completion_core.dart';
 import 'package:analysis_server/src/services/completion/completion_performance.dart';
 import 'package:analysis_server/src/services/completion/dart/completion_manager.dart';
+import 'package:analysis_server/src/services/completion/token_details/token_detail_builder.dart';
 import 'package:analyzer/dart/analysis/results.dart';
 import 'package:analyzer/dart/analysis/session.dart';
 import 'package:analyzer/src/dart/analysis/driver.dart';
@@ -260,6 +261,9 @@
       } else if (requestName == COMPLETION_REQUEST_GET_SUGGESTIONS) {
         processRequest(request);
         return Response.DELAYED_RESPONSE;
+      } else if (requestName == COMPLETION_REQUEST_LIST_TOKEN_DETAILS) {
+        listTokenDetails(request);
+        return Response.DELAYED_RESPONSE;
       } else if (requestName == COMPLETION_REQUEST_SET_SUBSCRIPTIONS) {
         return setSubscriptions(request);
       }
@@ -279,6 +283,43 @@
   }
 
   /**
+   * Process a `completion.listTokenDetails` request.
+   */
+  Future<void> listTokenDetails(Request request) async {
+    CompletionListTokenDetailsParams params =
+        CompletionListTokenDetailsParams.fromRequest(request);
+
+    String file = params.file;
+    if (server.sendResponseErrorIfInvalidFilePath(request, file)) {
+      return;
+    }
+
+    AnalysisDriver analysisDriver = server.getAnalysisDriver(file);
+    if (analysisDriver == null) {
+      server.sendResponse(Response.invalidParameter(
+        request,
+        'file',
+        'File is not being analyzed: $file',
+      ));
+    }
+    AnalysisSession session = analysisDriver.currentSession;
+    ResolvedUnitResult result = await session.getResolvedUnit(file);
+    if (result.state != ResultState.VALID) {
+      server.sendResponse(Response.invalidParameter(
+        request,
+        'file',
+        'File does not exist or cannot be read: $file',
+      ));
+    }
+
+    TokenDetailBuilder builder = new TokenDetailBuilder();
+    builder.visitNode(result.unit);
+    server.sendResponse(
+      CompletionListTokenDetailsResult(builder.details).toResponse(request.id),
+    );
+  }
+
+  /**
    * Process a `completion.getSuggestions` request.
    */
   Future<void> processRequest(Request request) async {
diff --git a/pkg/analysis_server/lib/src/domains/analysis/navigation_dart.dart b/pkg/analysis_server/lib/src/domains/analysis/navigation_dart.dart
index d8fbb56..a04b33f 100644
--- a/pkg/analysis_server/lib/src/domains/analysis/navigation_dart.dart
+++ b/pkg/analysis_server/lib/src/domains/analysis/navigation_dart.dart
@@ -356,8 +356,8 @@
    * then add the navigation region from the [node] to the [element].
    */
   void _addUriDirectiveRegion(UriBasedDirective node, Element element) {
-    if (element != null) {
-      Source source = element.source;
+    Source source = element?.source;
+    if (source != null) {
       if (resourceProvider.getResource(source.fullName).exists) {
         computer._addRegionForNode(node.uri, element);
       }
diff --git a/pkg/analysis_server/lib/src/domains/completion/available_suggestions.dart b/pkg/analysis_server/lib/src/domains/completion/available_suggestions.dart
index 9b00766..c3085a7 100644
--- a/pkg/analysis_server/lib/src/domains/completion/available_suggestions.dart
+++ b/pkg/analysis_server/lib/src/domains/completion/available_suggestions.dart
@@ -102,6 +102,12 @@
 protocol.AvailableSuggestion _protocolAvailableSuggestion(
     Declaration declaration) {
   var label = declaration.name;
+  if (declaration.kind == DeclarationKind.CONSTRUCTOR) {
+    label = declaration.name2;
+    if (declaration.name.isNotEmpty) {
+      label += '.${declaration.name}';
+    }
+  }
   if (declaration.kind == DeclarationKind.ENUM_CONSTANT) {
     label = '${declaration.name2}.${declaration.name}';
   }
@@ -161,6 +167,8 @@
       return protocol.ElementKind.CLASS;
     case DeclarationKind.CLASS_TYPE_ALIAS:
       return protocol.ElementKind.CLASS_TYPE_ALIAS;
+    case DeclarationKind.CONSTRUCTOR:
+      return protocol.ElementKind.CONSTRUCTOR;
     case DeclarationKind.ENUM:
       return protocol.ElementKind.ENUM;
     case DeclarationKind.ENUM_CONSTANT:
diff --git a/pkg/analysis_server/lib/src/edit/edit_domain.dart b/pkg/analysis_server/lib/src/edit/edit_domain.dart
index efccaeb..6b7a5a9 100644
--- a/pkg/analysis_server/lib/src/edit/edit_domain.dart
+++ b/pkg/analysis_server/lib/src/edit/edit_domain.dart
@@ -842,7 +842,8 @@
       result.potentialEdits = nullIfEmpty(refactoring.potentialEditIds);
       _sendResultResponse();
     }, onError: (exception, stackTrace) {
-      if (exception is _ResetError) {
+      if (exception is _ResetError ||
+          exception is InconsistentAnalysisException) {
         cancel();
       } else {
         server.instrumentationService.logException(exception, stackTrace);
diff --git a/pkg/analysis_server/lib/src/flutter/flutter_outline_computer.dart b/pkg/analysis_server/lib/src/flutter/flutter_outline_computer.dart
index 2239929..59c4686 100644
--- a/pkg/analysis_server/lib/src/flutter/flutter_outline_computer.dart
+++ b/pkg/analysis_server/lib/src/flutter/flutter_outline_computer.dart
@@ -201,7 +201,7 @@
           }
         } else if (isWidgetListArgument) {
           if (childrenExpression is ListLiteral) {
-            for (var element in childrenExpression.elements2) {
+            for (var element in childrenExpression.elements) {
               var child = _createOutline(element, true);
               if (child != null) {
                 children.add(child);
diff --git a/pkg/analysis_server/lib/src/lsp/handlers/handler_hover.dart b/pkg/analysis_server/lib/src/lsp/handlers/handler_hover.dart
index aba64c8..7d0db4f 100644
--- a/pkg/analysis_server/lib/src/lsp/handlers/handler_hover.dart
+++ b/pkg/analysis_server/lib/src/lsp/handlers/handler_hover.dart
@@ -14,6 +14,7 @@
 import 'package:analysis_server/src/lsp/mapping.dart';
 import 'package:analyzer/dart/analysis/results.dart';
 import 'package:analyzer/source/line_info.dart';
+import 'package:analyzer/src/dartdoc/dartdoc_directive_info.dart';
 
 class HoverHandler extends MessageHandler<TextDocumentPositionParams, Hover> {
   HoverHandler(LspAnalysisServer server) : super(server);
@@ -82,7 +83,16 @@
   }
 
   ErrorOr<Hover> _getHover(ResolvedUnitResult unit, int offset) {
-    final hover = new DartUnitHoverComputer(unit.unit, offset).compute();
+    final hover = new DartUnitHoverComputer(
+            // TODO(brianwilkerson) Add declarationsTracker to server in order to
+            //  enable dartdoc processing.
+//            server.declarationsTracker
+//                .getContext(unit.session.analysisContext)
+//                .dartdocDirectiveInfo,
+            new DartdocDirectiveInfo(),
+            unit.unit,
+            offset)
+        .compute();
     return success(toHover(unit.lineInfo, hover));
   }
 }
diff --git a/pkg/analysis_server/lib/src/lsp/handlers/handler_signature_help.dart b/pkg/analysis_server/lib/src/lsp/handlers/handler_signature_help.dart
index 53ced13..7fa60a7 100644
--- a/pkg/analysis_server/lib/src/lsp/handlers/handler_signature_help.dart
+++ b/pkg/analysis_server/lib/src/lsp/handlers/handler_signature_help.dart
@@ -10,6 +10,7 @@
 import 'package:analysis_server/src/lsp/handlers/handlers.dart';
 import 'package:analysis_server/src/lsp/lsp_analysis_server.dart';
 import 'package:analysis_server/src/lsp/mapping.dart';
+import 'package:analyzer/src/dartdoc/dartdoc_directive_info.dart';
 
 class SignatureHelpHandler
     extends MessageHandler<TextDocumentPositionParams, SignatureHelp> {
@@ -28,7 +29,15 @@
     final offset = await unit.mapResult((unit) => toOffset(unit.lineInfo, pos));
 
     return offset.mapResult((offset) {
-      final computer = new DartUnitSignatureComputer(unit.result.unit, offset);
+      final computer = new DartUnitSignatureComputer(
+          // TODO(brianwilkerson) Add declarationsTracker to server in order to
+          //  enable dartdoc processing.
+//          server.declarationsTracker
+//              .getContext(unit.result.session.analysisContext)
+//              .dartdocDirectiveInfo,
+          new DartdocDirectiveInfo(),
+          unit.result.unit,
+          offset);
       if (!computer.offsetIsValid) {
         return success(); // No error, just no valid hover.
       }
diff --git a/pkg/analysis_server/lib/src/protocol_server.dart b/pkg/analysis_server/lib/src/protocol_server.dart
index fc2d22a..e24d2db 100644
--- a/pkg/analysis_server/lib/src/protocol_server.dart
+++ b/pkg/analysis_server/lib/src/protocol_server.dart
@@ -40,34 +40,6 @@
 }
 
 /**
- * Translates engine errors through the ErrorProcessor.
- */
-List<T> mapEngineErrors<T>(
-    engine.AnalysisOptions analysisOptions,
-    engine.LineInfo lineInfo,
-    List<engine.AnalysisError> errors,
-    T Function(engine.LineInfo lineInfo, engine.AnalysisError error,
-            [engine.ErrorSeverity errorSeverity])
-        constructor) {
-  List<T> serverErrors = <T>[];
-  for (engine.AnalysisError error in errors) {
-    ErrorProcessor processor =
-        ErrorProcessor.getProcessor(analysisOptions, error);
-    if (processor != null) {
-      engine.ErrorSeverity severity = processor.severity;
-      // Errors with null severity are filtered out.
-      if (severity != null) {
-        // Specified severities override.
-        serverErrors.add(constructor(lineInfo, error, severity));
-      }
-    } else {
-      serverErrors.add(constructor(lineInfo, error));
-    }
-  }
-  return serverErrors;
-}
-
-/**
  * Adds [edit] to the file containing the given [element].
  */
 void doSourceChange_addElementEdit(
@@ -104,6 +76,34 @@
 }
 
 /**
+ * Translates engine errors through the ErrorProcessor.
+ */
+List<T> mapEngineErrors<T>(
+    engine.AnalysisOptions analysisOptions,
+    engine.LineInfo lineInfo,
+    List<engine.AnalysisError> errors,
+    T Function(engine.LineInfo lineInfo, engine.AnalysisError error,
+            [engine.ErrorSeverity errorSeverity])
+        constructor) {
+  List<T> serverErrors = <T>[];
+  for (engine.AnalysisError error in errors) {
+    ErrorProcessor processor =
+        ErrorProcessor.getProcessor(analysisOptions, error);
+    if (processor != null) {
+      engine.ErrorSeverity severity = processor.severity;
+      // Errors with null severity are filtered out.
+      if (severity != null) {
+        // Specified severities override.
+        serverErrors.add(constructor(lineInfo, error, severity));
+      }
+    } else {
+      serverErrors.add(constructor(lineInfo, error));
+    }
+  }
+  return serverErrors;
+}
+
+/**
  * Construct based on error information from the analyzer engine.
  *
  * If an [errorSeverity] is specified, it will override the one in [error].
@@ -140,8 +140,13 @@
   String code = errorCode.name.toLowerCase();
   String correction = error.correction;
   bool fix = hasFix(error.errorCode);
+  String url = errorCode.url;
+  if (url == null && errorCode is engine.LintCode) {
+    String lintName = errorCode.name.toLowerCase();
+    url = 'https://dart-lang.github.io/linter/lints/$lintName.html';
+  }
   return new AnalysisError(severity, type, location, message, code,
-      correction: correction, hasFix: fix);
+      correction: correction, hasFix: fix, url: url);
 }
 
 /**
diff --git a/pkg/analysis_server/lib/src/services/completion/dart/completion_manager.dart b/pkg/analysis_server/lib/src/services/completion/dart/completion_manager.dart
index 710ca2d..942ace0 100644
--- a/pkg/analysis_server/lib/src/services/completion/dart/completion_manager.dart
+++ b/pkg/analysis_server/lib/src/services/completion/dart/completion_manager.dart
@@ -184,6 +184,9 @@
 
     var kinds = includedElementKinds;
     if (kinds != null) {
+      if (opType.includeConstructorSuggestions) {
+        kinds.add(protocol.ElementKind.CONSTRUCTOR);
+      }
       if (opType.includeTypeNameSuggestions) {
         kinds.add(protocol.ElementKind.CLASS);
         kinds.add(protocol.ElementKind.CLASS_TYPE_ALIAS);
@@ -192,6 +195,7 @@
         kinds.add(protocol.ElementKind.MIXIN);
       }
       if (opType.includeReturnValueSuggestions) {
+        kinds.add(protocol.ElementKind.CONSTRUCTOR);
         kinds.add(protocol.ElementKind.ENUM_CONSTANT);
         kinds.add(protocol.ElementKind.FUNCTION);
         kinds.add(protocol.ElementKind.TOP_LEVEL_VARIABLE);
diff --git a/pkg/analysis_server/lib/src/services/completion/dart/keyword_contributor.dart b/pkg/analysis_server/lib/src/services/completion/dart/keyword_contributor.dart
index fb9885d..9da6534 100644
--- a/pkg/analysis_server/lib/src/services/completion/dart/keyword_contributor.dart
+++ b/pkg/analysis_server/lib/src/services/completion/dart/keyword_contributor.dart
@@ -367,7 +367,7 @@
   }
 
   @override
-  visitForStatement2(ForStatement2 node) {
+  visitForStatement(ForStatement node) {
     // Actual: for (va^)
     // Parsed: for (va^; ;)
     if (node.forLoopParts == entity) {
@@ -823,7 +823,7 @@
       node.thisOrAncestorOfType<DoStatement>() != null;
 
   bool _inForLoop(AstNode node) =>
-      node.thisOrAncestorMatching((p) => p is ForStatement2) != null;
+      node.thisOrAncestorMatching((p) => p is ForStatement) != null;
 
   bool _inLoop(AstNode node) =>
       _inDoLoop(node) || _inForLoop(node) || _inWhileLoop(node);
diff --git a/pkg/analysis_server/lib/src/services/completion/dart/local_reference_contributor.dart b/pkg/analysis_server/lib/src/services/completion/dart/local_reference_contributor.dart
index 50be06c..e4d6e0f 100644
--- a/pkg/analysis_server/lib/src/services/completion/dart/local_reference_contributor.dart
+++ b/pkg/analysis_server/lib/src/services/completion/dart/local_reference_contributor.dart
@@ -54,7 +54,7 @@
 
         // Do not suggest loop variable of a ForEachStatement
         // when completing the expression of the ForEachStatement
-        if (node is ForStatement2 && node.forLoopParts is ForEachParts) {
+        if (node is ForStatement && node.forLoopParts is ForEachParts) {
           node = node.parent;
         } else if (node is ForEachParts) {
           node = node.parent.parent;
diff --git a/pkg/analysis_server/lib/src/services/completion/postfix/postfix_completion.dart b/pkg/analysis_server/lib/src/services/completion/postfix/postfix_completion.dart
index b159f5d..9fa7d7e 100644
--- a/pkg/analysis_server/lib/src/services/completion/postfix/postfix_completion.dart
+++ b/pkg/analysis_server/lib/src/services/completion/postfix/postfix_completion.dart
@@ -460,7 +460,7 @@
         // Disallow control-flow statements.
         if (astNode is DoStatement ||
             astNode is IfStatement ||
-            astNode is ForStatement2 ||
+            astNode is ForStatement ||
             astNode is SwitchStatement ||
             astNode is TryStatement ||
             astNode is WhileStatement) {
diff --git a/pkg/analysis_server/lib/src/services/completion/statement/statement_completion.dart b/pkg/analysis_server/lib/src/services/completion/statement/statement_completion.dart
index f32aa2d..6c73922 100644
--- a/pkg/analysis_server/lib/src/services/completion/statement/statement_completion.dart
+++ b/pkg/analysis_server/lib/src/services/completion/statement/statement_completion.dart
@@ -393,7 +393,7 @@
     }
     AstNode outer = node.parent.parent;
     if (!(outer is DoStatement ||
-        outer is ForStatement2 ||
+        outer is ForStatement ||
         outer is IfStatement ||
         outer is WhileStatement)) {
       return false;
@@ -521,7 +521,7 @@
   }
 
   bool _complete_forEachStatement(
-      ForStatement2 forNode, ForEachParts forEachParts) {
+      ForStatement forNode, ForEachParts forEachParts) {
     AstNode name;
     if (forEachParts is ForEachPartsWithIdentifier) {
       name = forEachParts.identifier;
@@ -586,7 +586,7 @@
     return true;
   }
 
-  bool _complete_forStatement(ForStatement2 forNode, ForParts forParts) {
+  bool _complete_forStatement(ForStatement forNode, ForParts forParts) {
     SourceBuilder sb;
     int replacementLength = 0;
     if (forNode.leftParenthesis.isSynthetic) {
@@ -689,7 +689,7 @@
 
   bool _complete_forStatement2() {
     var node = this.node;
-    if (node is ForStatement2) {
+    if (node is ForStatement) {
       var forLoopParts = node.forLoopParts;
       if (forLoopParts is ForParts) {
         return _complete_forStatement(node, forLoopParts);
diff --git a/pkg/analysis_server/lib/src/services/completion/token_details/token_detail_builder.dart b/pkg/analysis_server/lib/src/services/completion/token_details/token_detail_builder.dart
new file mode 100644
index 0000000..7da4335
--- /dev/null
+++ b/pkg/analysis_server/lib/src/services/completion/token_details/token_detail_builder.dart
@@ -0,0 +1,44 @@
+// Copyright (c) 2019, the Dart project authors. Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+import 'package:analysis_server/protocol/protocol_generated.dart';
+import 'package:analyzer/dart/ast/ast.dart';
+import 'package:analyzer/dart/ast/syntactic_entity.dart';
+import 'package:analyzer/dart/ast/token.dart';
+
+/// An object used to build the details for each token in the code being
+/// analyzed.
+class TokenDetailBuilder {
+  /// The list of details that were built.
+  List<TokenDetails> details = [];
+
+  /// Initialize a newly created builder.
+  TokenDetailBuilder();
+
+  /// Visit a [node] in the AST structure to build details for all of the tokens
+  /// contained by that node.
+  void visitNode(AstNode node) {
+    for (SyntacticEntity entity in node.childEntities) {
+      if (entity is Token) {
+        _createDetails(entity, null);
+      } else if (entity is SimpleIdentifier) {
+        List<String> kinds = [];
+        if (entity.inDeclarationContext()) {
+          kinds.add('declaration');
+        } else {
+          kinds.add('identifier');
+        }
+        _createDetails(entity.token, kinds);
+      } else if (entity is AstNode) {
+        visitNode(entity);
+      }
+    }
+  }
+
+  /// Create the details for a single [token], using the given list of [kinds].
+  void _createDetails(Token token, List<String> kinds) {
+    details.add(new TokenDetails(token.lexeme, token.type.name,
+        validElementKinds: kinds));
+  }
+}
diff --git a/pkg/analysis_server/lib/src/services/correction/assist.dart b/pkg/analysis_server/lib/src/services/correction/assist.dart
index 4c4e5a8..bb459c1 100644
--- a/pkg/analysis_server/lib/src/services/correction/assist.dart
+++ b/pkg/analysis_server/lib/src/services/correction/assist.dart
@@ -51,7 +51,7 @@
       "Convert to line documentation comment",
       associatedErrorCodes: <String>['slash_for_doc_comments']);
   static const CONVERT_INTO_ASYNC_BODY = const AssistKind(
-      'dart.assist.convert.bodyToAsync', 30, "Convert to async function body");
+      'dart.assist.convert.bodyToAsync', 29, "Convert to async function body");
   static const CONVERT_INTO_BLOCK_BODY = const AssistKind(
       'dart.assist.convert.bodyToBlock', 30, "Convert to block body");
   static const CONVERT_INTO_EXPRESSION_BODY = const AssistKind(
diff --git a/pkg/analysis_server/lib/src/services/correction/assist_internal.dart b/pkg/analysis_server/lib/src/services/correction/assist_internal.dart
index ee38d9c..b373465 100644
--- a/pkg/analysis_server/lib/src/services/correction/assist_internal.dart
+++ b/pkg/analysis_server/lib/src/services/correction/assist_internal.dart
@@ -224,8 +224,8 @@
     DeclaredIdentifier declaredIdentifier =
         node.thisOrAncestorOfType<DeclaredIdentifier>();
     if (declaredIdentifier == null) {
-      ForStatement2 forEach = node.thisOrAncestorMatching(
-          (node) => node is ForStatement2 && node.forLoopParts is ForEachParts);
+      ForStatement forEach = node.thisOrAncestorMatching(
+          (node) => node is ForStatement && node.forLoopParts is ForEachParts);
       ForEachParts forEachParts = forEach?.forLoopParts;
       int offset = node.offset;
       if (forEach != null &&
@@ -457,7 +457,7 @@
     }
 
     bool isEmptyListLiteral(Expression expression) =>
-        expression is ListLiteral && expression.elements2.isEmpty;
+        expression is ListLiteral && expression.elements.isEmpty;
 
     ListLiteral list = target;
     Expression argument = invocation.argumentList.arguments[0];
@@ -484,7 +484,7 @@
     elementText ??= '...${utils.getNodeText(argument)}';
     DartChangeBuilder changeBuilder = _newDartChangeBuilder();
     await changeBuilder.addFileEdit(file, (DartFileEditBuilder builder) {
-      builder.addSimpleInsertion(list.elements2.last.end, ', $elementText');
+      builder.addSimpleInsertion(list.elements.last.end, ', $elementText');
       builder.addDeletion(range.node(invocation));
     });
     _addAssistFromBuilder(changeBuilder, DartAssistKind.CONVERT_TO_SPREAD);
@@ -1429,8 +1429,8 @@
     // TODO(brianwilkerson) Determine whether this await is necessary.
     await null;
     // find enclosing ForEachStatement
-    ForStatement2 forEachStatement = node.thisOrAncestorMatching(
-        (node) => node is ForStatement2 && node.forLoopParts is ForEachParts);
+    ForStatement forEachStatement = node.thisOrAncestorMatching(
+        (node) => node is ForStatement && node.forLoopParts is ForEachParts);
     if (forEachStatement == null) {
       _coverageMarker();
       return;
@@ -2352,7 +2352,7 @@
 
     AstNode parentList = widget.parent;
     if (parentList is ListLiteral) {
-      List<CollectionElement> parentElements = parentList.elements2;
+      List<CollectionElement> parentElements = parentList.elements;
       int index = parentElements.indexOf(widget);
       if (index != parentElements.length - 1) {
         var changeBuilder = _newDartChangeBuilder();
@@ -2386,7 +2386,7 @@
 
     AstNode parentList = widget.parent;
     if (parentList is ListLiteral) {
-      List<CollectionElement> parentElements = parentList.elements2;
+      List<CollectionElement> parentElements = parentList.elements;
       int index = parentElements.indexOf(widget);
       if (index > 0) {
         var changeBuilder = _newDartChangeBuilder();
@@ -2423,8 +2423,8 @@
       var childrenArgument = flutter.findChildrenArgument(widgetCreation);
       var childrenExpression = childrenArgument?.expression;
       if (childrenExpression is ListLiteral &&
-          childrenExpression.elements2.isNotEmpty) {
-        childrenExpressions = childrenExpression.elements2;
+          childrenExpression.elements.isNotEmpty) {
+        childrenExpressions = childrenExpression.elements;
       } else {
         return;
       }
@@ -3234,7 +3234,7 @@
     if (node is! ListLiteral) {
       return;
     }
-    if ((node as ListLiteral).elements2.any((CollectionElement exp) =>
+    if ((node as ListLiteral).elements.any((CollectionElement exp) =>
         !(exp is InstanceCreationExpression &&
             flutter.isWidgetCreation(exp)))) {
       _coverageMarker();
@@ -4026,8 +4026,8 @@
   /// placed inside curly braces, would lexically make the resulting literal a
   /// set literal rather than a map literal.
   bool _listHasUnambiguousElement(AstNode node) {
-    if (node is ListLiteral && node.elements2.length > 0) {
-      for (CollectionElement element in node.elements2) {
+    if (node is ListLiteral && node.elements.length > 0) {
+      for (CollectionElement element in node.elements) {
         if (_isUnambiguousElement(element)) {
           return true;
         }
diff --git a/pkg/analysis_server/lib/src/services/correction/fix.dart b/pkg/analysis_server/lib/src/services/correction/fix.dart
index 3bb80d7..b800b5d 100644
--- a/pkg/analysis_server/lib/src/services/correction/fix.dart
+++ b/pkg/analysis_server/lib/src/services/correction/fix.dart
@@ -38,7 +38,6 @@
     errorCode == StaticWarningCode.FINAL_NOT_INITIALIZED_CONSTRUCTOR_1 ||
     errorCode == StaticWarningCode.FINAL_NOT_INITIALIZED_CONSTRUCTOR_2 ||
     errorCode == StaticWarningCode.FINAL_NOT_INITIALIZED_CONSTRUCTOR_3_PLUS ||
-    errorCode == StaticWarningCode.FUNCTION_WITHOUT_CALL ||
     errorCode == StaticWarningCode.UNDEFINED_IDENTIFIER ||
     errorCode ==
         CompileTimeErrorCode.CONST_INITIALIZED_WITH_NON_CONSTANT_VALUE ||
@@ -133,6 +132,8 @@
       appliedTogetherMessage: "Add all casts in file");
   static const ADD_FIELD_FORMAL_PARAMETERS = const FixKind(
       'ADD_FIELD_FORMAL_PARAMETERS', 70, "Add final field formal parameters");
+  static const ADD_MISSING_ENUM_CASE_CLAUSES = const FixKind(
+      'ADD_MISSING_ENUM_CASE_CLAUSES', 50, 'Add missing case clauses');
   static const ADD_MISSING_PARAMETER_NAMED = const FixKind(
       'ADD_MISSING_PARAMETER_NAMED', 70, "Add named parameter '{0}'");
   static const ADD_MISSING_PARAMETER_POSITIONAL = const FixKind(
diff --git a/pkg/analysis_server/lib/src/services/correction/fix_internal.dart b/pkg/analysis_server/lib/src/services/correction/fix_internal.dart
index adeb0f9..05d16f0 100644
--- a/pkg/analysis_server/lib/src/services/correction/fix_internal.dart
+++ b/pkg/analysis_server/lib/src/services/correction/fix_internal.dart
@@ -209,9 +209,6 @@
   String get eol => utils.endOfLine;
 
   Future<List<Fix>> compute() async {
-    // TODO(brianwilkerson) Determine whether this await is necessary.
-    await null;
-
     node = new NodeLocator2(errorOffset).searchWithin(unit);
     coveredNode = new NodeLocator2(errorOffset, errorOffset + errorLength - 1)
         .searchWithin(unit);
@@ -335,7 +332,18 @@
 //    }
     if (errorCode == HintCode.SDK_VERSION_ASYNC_EXPORTED_FROM_CORE) {
       await _addFix_importAsync();
-      await _addFix_updateSdkConstraints();
+      await _addFix_updateSdkConstraints('2.1.0');
+    }
+    if (errorCode == HintCode.SDK_VERSION_SET_LITERAL) {
+      await _addFix_updateSdkConstraints('2.2.0');
+    }
+    if (errorCode == HintCode.SDK_VERSION_AS_EXPRESSION_IN_CONST_CONTEXT ||
+        errorCode == HintCode.SDK_VERSION_BOOL_OPERATOR ||
+        errorCode == HintCode.SDK_VERSION_EQ_EQ_OPERATOR_IN_CONST_CONTEXT ||
+        errorCode == HintCode.SDK_VERSION_GT_GT_GT_OPERATOR ||
+        errorCode == HintCode.SDK_VERSION_IS_EXPRESSION_IN_CONST_CONTEXT ||
+        errorCode == HintCode.SDK_VERSION_UI_AS_CODE) {
+      await _addFix_updateSdkConstraints('2.2.2');
     }
     if (errorCode == HintCode.TYPE_CHECK_IS_NOT_NULL) {
       await _addFix_isNotNull();
@@ -550,6 +558,9 @@
         CompileTimeErrorCode.MIXIN_APPLICATION_NOT_IMPLEMENTED_INTERFACE) {
       await _addFix_extendClassForMixin();
     }
+    if (errorCode == StaticWarningCode.MISSING_ENUM_CONSTANT_IN_SWITCH) {
+      await _addFix_addMissingEnumCaseClauses();
+    }
     // lints
     if (errorCode is LintCode) {
       String name = errorCode.name;
@@ -709,7 +720,7 @@
       // TODO(brianwilkerson) Consider updating the right operand.
       return;
     }
-    bool needsParentheses = target.precedence2 < Precedence.postfix;
+    bool needsParentheses = target.precedence < Precedence.postfix;
     if (((_isDartCoreIterable(fromType) || _isDartCoreList(fromType)) &&
             _isDartCoreList(toType)) ||
         (_isDartCoreSet(fromType) && _isDartCoreSet(toType))) {
@@ -774,6 +785,69 @@
     }
   }
 
+  Future<void> _addFix_addMissingEnumCaseClauses() async {
+    SwitchStatement statement = node as SwitchStatement;
+    String enumName;
+    List<String> enumConstantNames = [];
+    DartType expressionType = statement.expression.staticType;
+    if (expressionType is InterfaceType) {
+      ClassElement enumElement = expressionType.element;
+      if (enumElement.isEnum) {
+        enumName = enumElement.name;
+        for (FieldElement field in enumElement.fields) {
+          if (!field.isSynthetic) {
+            enumConstantNames.add(field.name);
+          }
+        }
+      }
+    }
+    if (enumName == null) {
+      return;
+    }
+    for (SwitchMember member in statement.members) {
+      if (member is SwitchCase) {
+        Expression expression = member.expression;
+        if (expression is Identifier) {
+          Element element = expression.staticElement;
+          if (element is PropertyAccessorElement) {
+            enumConstantNames.remove(element.name);
+          }
+        }
+      }
+    }
+    if (enumConstantNames.isEmpty) {
+      return;
+    }
+
+    String statementIndent = utils.getLinePrefix(statement.offset);
+    String singleIndent = utils.getIndent(1);
+
+    DartChangeBuilder changeBuilder = _newDartChangeBuilder();
+    await changeBuilder.addFileEdit(file, (DartFileEditBuilder builder) {
+      builder.addInsertion(utils.getLineThis(statement.end), (builder) {
+        for (String constantName in enumConstantNames) {
+          builder.write(statementIndent);
+          builder.write(singleIndent);
+          builder.write('case ');
+          builder.write(enumName);
+          builder.write('.');
+          builder.write(constantName);
+          builder.writeln(':');
+          builder.write(statementIndent);
+          builder.write(singleIndent);
+          builder.write(singleIndent);
+          builder.writeln('// TODO: Handle this case.');
+          builder.write(statementIndent);
+          builder.write(singleIndent);
+          builder.write(singleIndent);
+          builder.writeln('break;');
+        }
+      });
+    });
+    _addFixFromBuilder(
+        changeBuilder, DartFixKind.ADD_MISSING_ENUM_CASE_CLAUSES);
+  }
+
   Future<void> _addFix_addMissingParameter() async {
     // TODO(brianwilkerson) Determine whether this await is necessary.
     await null;
@@ -1189,7 +1263,7 @@
 
     // child: [widget1, widget2]
     if (expression is ListLiteral &&
-        expression.elements2.every(flutter.isWidgetExpression)) {
+        expression.elements.every(flutter.isWidgetExpression)) {
       var changeBuilder = _newDartChangeBuilder();
       await changeBuilder.addFileEdit(file, (DartFileEditBuilder builder) {
         builder.addSimpleReplacement(range.node(named.name), 'children:');
@@ -1210,8 +1284,8 @@
         node.parent?.parent is NamedExpression) {
       NamedExpression named = node.parent?.parent;
       Expression expression = named.expression;
-      if (expression is ListLiteral && expression.elements2.length == 1) {
-        CollectionElement widget = expression.elements2[0];
+      if (expression is ListLiteral && expression.elements.length == 1) {
+        CollectionElement widget = expression.elements[0];
         if (flutter.isWidgetExpression(widget)) {
           String widgetText = utils.getNodeText(widget);
           String indentOld = utils.getLinePrefix(widget.offset);
@@ -3203,16 +3277,6 @@
     }
   }
 
-  Future<void> _addFix_replaceVarWithDynamic() async {
-    // TODO(brianwilkerson) Determine whether this await is necessary.
-    await null;
-    var changeBuilder = _newDartChangeBuilder();
-    await changeBuilder.addFileEdit(file, (DartFileEditBuilder builder) {
-      builder.addSimpleReplacement(range.error(error), 'dynamic');
-    });
-    _addFixFromBuilder(changeBuilder, DartFixKind.REPLACE_VAR_WITH_DYNAMIC);
-  }
-
   Future<void> _addFix_replaceNullWithClosure() async {
     var nodeToFix;
     var parameters = const <ParameterElement>[];
@@ -3246,6 +3310,16 @@
     }
   }
 
+  Future<void> _addFix_replaceVarWithDynamic() async {
+    // TODO(brianwilkerson) Determine whether this await is necessary.
+    await null;
+    var changeBuilder = _newDartChangeBuilder();
+    await changeBuilder.addFileEdit(file, (DartFileEditBuilder builder) {
+      builder.addSimpleReplacement(range.error(error), 'dynamic');
+    });
+    _addFixFromBuilder(changeBuilder, DartFixKind.REPLACE_VAR_WITH_DYNAMIC);
+  }
+
   Future<void> _addFix_replaceWithConditionalAssignment() async {
     // TODO(brianwilkerson) Determine whether this await is necessary.
     await null;
@@ -3301,16 +3375,6 @@
     }
   }
 
-  Future<void> _addFix_replaceWithRethrow() async {
-    if (coveredNode is ThrowExpression) {
-      var changeBuilder = _newDartChangeBuilder();
-      await changeBuilder.addFileEdit(file, (DartFileEditBuilder builder) {
-        builder.addSimpleReplacement(range.node(coveredNode), 'rethrow');
-      });
-      _addFixFromBuilder(changeBuilder, DartFixKind.USE_RETHROW);
-    }
-  }
-
   Future<void> _addFix_replaceWithIdentifier() async {
     // TODO(brianwilkerson) Determine whether this await is necessary.
     await null;
@@ -3328,6 +3392,16 @@
     }
   }
 
+  Future<void> _addFix_replaceWithRethrow() async {
+    if (coveredNode is ThrowExpression) {
+      var changeBuilder = _newDartChangeBuilder();
+      await changeBuilder.addFileEdit(file, (DartFileEditBuilder builder) {
+        builder.addSimpleReplacement(range.node(coveredNode), 'rethrow');
+      });
+      _addFixFromBuilder(changeBuilder, DartFixKind.USE_RETHROW);
+    }
+  }
+
   Future<void> _addFix_replaceWithTearOff() async {
     // TODO(brianwilkerson) Determine whether this await is necessary.
     await null;
@@ -3746,7 +3820,7 @@
     _addFixFromBuilder(changeBuilder, DartFixKind.ADD_FIELD_FORMAL_PARAMETERS);
   }
 
-  Future<void> _addFix_updateSdkConstraints() async {
+  Future<void> _addFix_updateSdkConstraints(String minimumVersion) async {
     Context context = resourceProvider.pathContext;
     File pubspecFile = null;
     Folder folder = resourceProvider.getFolder(context.dirname(file));
@@ -3774,13 +3848,13 @@
       length = spaceOffset;
     }
     if (text == 'any') {
-      newText = '^2.1.0';
+      newText = '^$minimumVersion';
     } else if (text.startsWith('^')) {
-      newText = '^2.1.0';
+      newText = '^$minimumVersion';
     } else if (text.startsWith('>=')) {
-      newText = '>=2.1.0';
+      newText = '>=$minimumVersion';
     } else if (text.startsWith('>')) {
-      newText = '>=2.1.0';
+      newText = '>=$minimumVersion';
     }
     if (newText == null) {
       return;
diff --git a/pkg/analysis_server/lib/src/services/correction/statement_analyzer.dart b/pkg/analysis_server/lib/src/services/correction/statement_analyzer.dart
index 3575661..dcba372 100644
--- a/pkg/analysis_server/lib/src/services/correction/statement_analyzer.dart
+++ b/pkg/analysis_server/lib/src/services/correction/statement_analyzer.dart
@@ -105,8 +105,8 @@
   }
 
   @override
-  Object visitForStatement2(ForStatement2 node) {
-    super.visitForStatement2(node);
+  Object visitForStatement(ForStatement node) {
+    super.visitForStatement(node);
     var forLoopParts = node.forLoopParts;
     if (forLoopParts is ForParts) {
       List<AstNode> selectedNodes = this.selectedNodes;
diff --git a/pkg/analysis_server/lib/src/services/correction/util.dart b/pkg/analysis_server/lib/src/services/correction/util.dart
index 3ac28b5..d4a4280 100644
--- a/pkg/analysis_server/lib/src/services/correction/util.dart
+++ b/pkg/analysis_server/lib/src/services/correction/util.dart
@@ -331,7 +331,7 @@
  */
 Precedence getExpressionPrecedence(AstNode node) {
   if (node is Expression) {
-    return node.precedence2;
+    return node.precedence;
   }
   return Precedence.none;
 }
diff --git a/pkg/analysis_server/lib/src/services/refactoring/extract_method.dart b/pkg/analysis_server/lib/src/services/refactoring/extract_method.dart
index 074f91c..2c14f1f 100644
--- a/pkg/analysis_server/lib/src/services/refactoring/extract_method.dart
+++ b/pkg/analysis_server/lib/src/services/refactoring/extract_method.dart
@@ -970,8 +970,8 @@
   }
 
   @override
-  Object visitForStatement2(ForStatement2 node) {
-    super.visitForStatement2(node);
+  Object visitForStatement(ForStatement node) {
+    super.visitForStatement(node);
     var forLoopParts = node.forLoopParts;
     if (forLoopParts is ForParts) {
       if (forLoopParts is ForPartsWithDeclarations &&
@@ -1104,11 +1104,11 @@
   }
 
   @override
-  visitForStatement2(ForStatement2 node) {
+  visitForStatement(ForStatement node) {
     if (node.awaitKeyword != null) {
       result = true;
     }
-    super.visitForStatement2(node);
+    super.visitForStatement(node);
   }
 }
 
diff --git a/pkg/analysis_server/lib/src/status/diagnostics.dart b/pkg/analysis_server/lib/src/status/diagnostics.dart
index aac3156..57c725a 100644
--- a/pkg/analysis_server/lib/src/status/diagnostics.dart
+++ b/pkg/analysis_server/lib/src/status/diagnostics.dart
@@ -1104,19 +1104,19 @@
 
   @override
   Future generateContent(Map<String, String> params) async {
-    // TODO(brianwilkerson) Determine whether this await is necessary.
-    await null;
-
     h3('Analysis plugins');
     List<PluginInfo> analysisPlugins = server.pluginManager.plugins;
 
     if (analysisPlugins.isEmpty) {
       blankslate('No known analysis plugins.');
     } else {
+      analysisPlugins
+          .sort((first, second) => first.pluginId.compareTo(second.pluginId));
       for (PluginInfo plugin in analysisPlugins) {
-        // TODO(brianwilkerson) Sort the plugins by name.
         String id = plugin.pluginId;
         PluginData data = plugin.data;
+        Map<String, List<int>> responseTimes =
+            PluginManager.pluginResponseTimes[plugin];
 
         List<String> components = pathPackage.split(id);
         int length = components.length;
@@ -1155,6 +1155,19 @@
               buf.writeln(root.root);
             });
           }
+          p('Performance:');
+          List<String> requestNames = responseTimes.keys.toList();
+          requestNames.sort();
+          for (String requestName in requestNames) {
+            List<int> data = responseTimes[requestName];
+            // TODO(brianwilkerson) Consider displaying these times as a graph,
+            //  similar to the one in AbstractCompletionPage.generateContent.
+            StringBuffer buffer = new StringBuffer();
+            buffer.write(requestName);
+            buffer.write(' ');
+            buffer.write(data);
+            p(buffer.toString());
+          }
         }
       }
     }
diff --git a/pkg/analysis_server/test/analysis/notification_navigation_test.dart b/pkg/analysis_server/test/analysis/notification_navigation_test.dart
index 7a7aa0f..4f34392 100644
--- a/pkg/analysis_server/test/analysis/notification_navigation_test.dart
+++ b/pkg/analysis_server/test/analysis/notification_navigation_test.dart
@@ -855,6 +855,14 @@
     assertHasFileTarget(unitFile, 0, 0);
   }
 
+  test_string_part_invalidUri() async {
+    addTestFile('''
+part ":[invalid]";
+''');
+    await prepareNavigation();
+    assertNoRegionString('":[invalid]"');
+  }
+
   Future<void> test_string_part_unresolvedUri() async {
     addTestFile('''
 library lib;
diff --git a/pkg/analysis_server/test/constants.dart b/pkg/analysis_server/test/constants.dart
index 8b0282c..e6bae68 100644
--- a/pkg/analysis_server/test/constants.dart
+++ b/pkg/analysis_server/test/constants.dart
@@ -20,4 +20,5 @@
 const String START_LINE = 'startLine';
 const String SUBSCRIPTIONS = 'subscriptions';
 const String TYPE = 'type';
+const String URL = 'url';
 const String VERSION = 'version';
diff --git a/pkg/analysis_server/test/domain_completion_test.dart b/pkg/analysis_server/test/domain_completion_test.dart
index fa74e67..c98af16 100644
--- a/pkg/analysis_server/test/domain_completion_test.dart
+++ b/pkg/analysis_server/test/domain_completion_test.dart
@@ -23,12 +23,14 @@
 
 main() {
   defineReflectiveSuite(() {
+    defineReflectiveTests(CompletionDomainHandlerGetSuggestionsTest);
     defineReflectiveTests(CompletionDomainHandlerTest);
   });
 }
 
 @reflectiveTest
-class CompletionDomainHandlerTest extends AbstractCompletionDomainTest {
+class CompletionDomainHandlerGetSuggestionsTest
+    extends AbstractCompletionDomainTest {
   test_ArgumentList_constructor_named_fieldFormalParam() async {
     // https://github.com/dart-lang/sdk/issues/31023
     addTestFile('''
@@ -863,6 +865,81 @@
   }
 }
 
+@reflectiveTest
+class CompletionDomainHandlerTest extends AbstractCompletionDomainTest {
+  test_listTokenDetails() async {
+    newFile(testFile, content: '''
+class A {
+  static A b(String s) {}
+  c(int i) {}
+}
+main() {
+  A.b('s').c(3);
+}
+''');
+    Request request =
+        new CompletionListTokenDetailsParams(testFile).toRequest('0');
+    Response response = await waitResponse(request);
+    List<Map<String, dynamic>> tokens = response.result['tokens'];
+    _expectTokens(tokens, [
+      _token('class', 'CLASS', null),
+      _token('A', 'STRING_INT', ['declaration']),
+      _token('{', 'OPEN_CURLY_BRACKET', null),
+      _token('static', 'STATIC', null),
+      _token('A', 'STRING_INT', ['identifier']),
+      _token('b', 'STRING_INT', ['declaration']),
+      _token('(', 'OPEN_PAREN', null),
+      _token('String', 'STRING_INT', ['identifier']),
+      _token('s', 'STRING_INT', ['declaration']),
+      _token(')', 'CLOSE_PAREN', null),
+      _token('{', 'OPEN_CURLY_BRACKET', null),
+      _token('}', 'CLOSE_CURLY_BRACKET', null),
+      _token('c', 'STRING_INT', ['declaration']),
+      _token('(', 'OPEN_PAREN', null),
+      _token('int', 'STRING_INT', ['identifier']),
+      _token('i', 'STRING_INT', ['declaration']),
+      _token(')', 'CLOSE_PAREN', null),
+      _token('{', 'OPEN_CURLY_BRACKET', null),
+      _token('}', 'CLOSE_CURLY_BRACKET', null),
+      _token('}', 'CLOSE_CURLY_BRACKET', null),
+      _token('main', 'STRING_INT', ['declaration']),
+      _token('(', 'OPEN_PAREN', null),
+      _token(')', 'CLOSE_PAREN', null),
+      _token('{', 'OPEN_CURLY_BRACKET', null),
+      _token('A', 'STRING_INT', ['identifier']),
+      _token('.', 'PERIOD', null),
+      _token('b', 'STRING_INT', ['identifier']),
+      _token('(', 'OPEN_PAREN', null),
+      _token("'s'", 'STRING', null),
+      _token(')', 'CLOSE_PAREN', null),
+      _token('.', 'PERIOD', null),
+      _token('c', 'STRING_INT', ['identifier']),
+      _token('(', 'OPEN_PAREN', null),
+      _token('3', 'INT', null),
+      _token(')', 'CLOSE_PAREN', null),
+      _token(';', 'SEMICOLON', null),
+      _token('}', 'CLOSE_CURLY_BRACKET', null),
+    ]);
+  }
+
+  void _expectTokens(List<Map<String, dynamic>> actualTokens,
+      List<TokenDetails> expectedTokens) {
+    int length = expectedTokens.length;
+    expect(actualTokens, hasLength(length));
+    for (int i = 0; i < length; i++) {
+      Map<String, dynamic> actual = actualTokens[i];
+      TokenDetails expected = expectedTokens[i];
+      expect(actual['lexeme'], expected.lexeme);
+      expect(actual['type'], expected.type);
+      expect(actual['validElementKinds'], expected.validElementKinds);
+    }
+  }
+
+  TokenDetails _token(String lexeme, String type, List<String> kinds) {
+    return new TokenDetails(lexeme, type, validElementKinds: kinds);
+  }
+}
+
 class MockRelevancySorter implements DartContributionSorter {
   bool enabled = true;
 
diff --git a/pkg/analysis_server/test/integration/linter/test_all.dart b/pkg/analysis_server/test/integration/linter/test_all.dart
new file mode 100644
index 0000000..079a94c
--- /dev/null
+++ b/pkg/analysis_server/test/integration/linter/test_all.dart
@@ -0,0 +1,13 @@
+// Copyright (c) 2019, the Dart project authors. Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+import 'package:test_reflective_loader/test_reflective_loader.dart';
+
+import 'lint_names_test.dart' as lint_names;
+
+main() {
+  defineReflectiveSuite(() {
+    lint_names.main();
+  }, name: 'linter');
+}
diff --git a/pkg/analysis_server/test/integration/support/protocol_matchers.dart b/pkg/analysis_server/test/integration/support/protocol_matchers.dart
index 3369f94..7cee89f 100644
--- a/pkg/analysis_server/test/integration/support/protocol_matchers.dart
+++ b/pkg/analysis_server/test/integration/support/protocol_matchers.dart
@@ -34,6 +34,7 @@
  *   "message": String
  *   "correction": optional String
  *   "code": String
+ *   "url": optional String
  *   "hasFix": optional bool
  * }
  */
@@ -46,6 +47,7 @@
           "code": isString
         }, optionalFields: {
           "correction": isString,
+          "url": isString,
           "hasFix": isBool
         }));
 
@@ -1617,15 +1619,12 @@
  * {
  *   "lexeme": String
  *   "type": String
- *   "validElementKinds": List<ElementKind>
+ *   "validElementKinds": optional List<String>
  * }
  */
-final Matcher isTokenDetails =
-    new LazyMatcher(() => new MatchesJsonObject("TokenDetails", {
-          "lexeme": isString,
-          "type": isString,
-          "validElementKinds": isListOf(isElementKind)
-        }));
+final Matcher isTokenDetails = new LazyMatcher(() => new MatchesJsonObject(
+    "TokenDetails", {"lexeme": isString, "type": isString},
+    optionalFields: {"validElementKinds": isListOf(isString)}));
 
 /**
  * TypeHierarchyItem
diff --git a/pkg/analysis_server/test/integration/test_all.dart b/pkg/analysis_server/test/integration/test_all.dart
index 3479ca8..3c601b3 100644
--- a/pkg/analysis_server/test/integration/test_all.dart
+++ b/pkg/analysis_server/test/integration/test_all.dart
@@ -4,34 +4,32 @@
 
 import 'package:test_reflective_loader/test_reflective_loader.dart';
 
-import 'analysis/test_all.dart' as analysis_test_all;
-import 'analytics/test_all.dart' as analytics_test_all;
-import 'completion/test_all.dart' as completion_test_all;
+import 'analysis/test_all.dart' as analysis;
+import 'analytics/test_all.dart' as analytics;
+import 'completion/test_all.dart' as completion;
 import 'coverage_test.dart' as coverage_test;
-import 'diagnostic/test_all.dart' as diagnostic_test_all;
-import 'edit/test_all.dart' as edit_test_all;
-import 'execution/test_all.dart' as execution_test_all;
-import 'kythe/test_all.dart' as kythe_test_all;
-import 'linter/lint_names_test.dart' as lint_names_test;
-import 'search/test_all.dart' as search_test_all;
-import 'server/test_all.dart' as server_test_all;
+import 'diagnostic/test_all.dart' as diagnostic;
+import 'edit/test_all.dart' as edit;
+import 'execution/test_all.dart' as execution;
+import 'kythe/test_all.dart' as kythe;
+import 'linter/test_all.dart' as linter;
+import 'lsp_server/test_all.dart' as lsp_server;
+import 'search/test_all.dart' as search;
+import 'server/test_all.dart' as server;
 
-/**
- * Utility for manually running all integration tests.
- */
 main() {
   defineReflectiveSuite(() {
-    analysis_test_all.main();
-    analytics_test_all.main();
-    completion_test_all.main();
-    diagnostic_test_all.main();
-    edit_test_all.main();
-    execution_test_all.main();
-    kythe_test_all.main();
-    lint_names_test.main();
-    search_test_all.main();
-    server_test_all.main();
-
+    analysis.main();
+    analytics.main();
+    completion.main();
     coverage_test.main();
+    diagnostic.main();
+    edit.main();
+    execution.main();
+    kythe.main();
+    linter.main();
+    lsp_server.main();
+    search.main();
+    server.main();
   }, name: 'analysis_server_integration');
 }
diff --git a/pkg/analysis_server/test/lsp/test_all.dart b/pkg/analysis_server/test/lsp/test_all.dart
index bdd25b3..7c6ab34 100644
--- a/pkg/analysis_server/test/lsp/test_all.dart
+++ b/pkg/analysis_server/test/lsp/test_all.dart
@@ -4,49 +4,50 @@
 
 import 'package:test_reflective_loader/test_reflective_loader.dart';
 
-import '../src/lsp/lsp_packet_transformer_test.dart'
-    as packet_transformer_tests;
-import 'code_actions_assists_test.dart' as assists_code_action_tests;
-import 'code_actions_fixes_test.dart' as fixes_code_action_tests;
-import 'code_actions_source_test.dart' as source_code_action_tests;
-import 'completion_test.dart' as completion_test;
-import 'definition_test.dart' as definition_test;
-import 'diagnostic_test.dart' as diagnostic_test;
-import 'document_highlights_test.dart' as document_highlights_test;
-import 'document_symbols_test.dart' as document_symbols_test;
-import 'file_modification_test.dart' as file_modification_test;
-import 'folding_test.dart' as folding_test;
-import 'format_test.dart' as format_test;
-import 'hover_test.dart' as hover_test;
-import 'initialization_test.dart' as initialization_test;
-import 'priority_files_test.dart' as priority_files_test;
-import 'references_test.dart' as references_test;
-import 'rename_test.dart' as rename_test;
-import 'server_test.dart' as server_test;
-import 'signature_help_test.dart' as signature_help_test;
-import 'workspace_symbols_test.dart' as workspace_symbols_test;
+import '../src/lsp/lsp_packet_transformer_test.dart' as lsp_packet_transformer;
+import 'change_workspace_folders_test.dart' as change_workspace_folders;
+import 'code_actions_assists_test.dart' as code_actions_assists;
+import 'code_actions_fixes_test.dart' as code_actions_fixes;
+import 'code_actions_source_test.dart' as code_actions_source;
+import 'completion_test.dart' as completion;
+import 'definition_test.dart' as definition;
+import 'diagnostic_test.dart' as diagnostic;
+import 'document_highlights_test.dart' as document_highlights;
+import 'document_symbols_test.dart' as document_symbols;
+import 'file_modification_test.dart' as file_modification;
+import 'folding_test.dart' as folding;
+import 'format_test.dart' as format;
+import 'hover_test.dart' as hover;
+import 'initialization_test.dart' as initialization;
+import 'priority_files_test.dart' as priority_files;
+import 'references_test.dart' as references;
+import 'rename_test.dart' as rename;
+import 'server_test.dart' as server;
+import 'signature_help_test.dart' as signature_help;
+import 'workspace_symbols_test.dart' as workspace_symbols;
 
 main() {
   defineReflectiveSuite(() {
-    completion_test.main();
-    definition_test.main();
-    diagnostic_test.main();
-    document_symbols_test.main();
-    document_highlights_test.main();
-    file_modification_test.main();
-    priority_files_test.main();
-    format_test.main();
-    hover_test.main();
-    initialization_test.main();
-    references_test.main();
-    server_test.main();
-    signature_help_test.main();
-    source_code_action_tests.main();
-    fixes_code_action_tests.main();
-    assists_code_action_tests.main();
-    packet_transformer_tests.main();
-    rename_test.main();
-    folding_test.main();
-    workspace_symbols_test.main();
+    change_workspace_folders.main();
+    code_actions_assists.main();
+    code_actions_fixes.main();
+    code_actions_source.main();
+    completion.main();
+    definition.main();
+    diagnostic.main();
+    document_highlights.main();
+    document_symbols.main();
+    file_modification.main();
+    folding.main();
+    format.main();
+    lsp_packet_transformer.main();
+    hover.main();
+    initialization.main();
+    priority_files.main();
+    references.main();
+    rename.main();
+    server.main();
+    signature_help.main();
+    workspace_symbols.main();
   }, name: 'lsp');
 }
diff --git a/pkg/analysis_server/test/protocol_server_test.dart b/pkg/analysis_server/test/protocol_server_test.dart
index 553f0a8..7b66304 100644
--- a/pkg/analysis_server/test/protocol_server_test.dart
+++ b/pkg/analysis_server/test/protocol_server_test.dart
@@ -10,6 +10,7 @@
 import 'package:analyzer/dart/element/element.dart' as engine;
 import 'package:analyzer/dart/element/type.dart' as engine;
 import 'package:analyzer/error/error.dart' as engine;
+import 'package:analyzer/src/dart/error/lint_codes.dart';
 import 'package:analyzer/src/error/codes.dart' as engine;
 import 'package:analyzer/src/generated/source.dart' as engine;
 import 'package:analyzer_plugin/protocol/protocol_common.dart';
@@ -67,6 +68,56 @@
     });
   }
 
+  void test_fromEngine_hasUrl() {
+    engineError = new MockAnalysisError(
+        source,
+        new MockErrorCode(url: 'http://codes.dartlang.org/TEST_ERROR'),
+        10,
+        20,
+        'my message');
+    AnalysisError error = newAnalysisError_fromEngine(lineInfo, engineError);
+    expect(error.toJson(), {
+      SEVERITY: 'ERROR',
+      TYPE: 'COMPILE_TIME_ERROR',
+      LOCATION: {
+        FILE: 'foo.dart',
+        OFFSET: 10,
+        LENGTH: 20,
+        START_LINE: 3,
+        START_COLUMN: 2
+      },
+      MESSAGE: 'my message',
+      CODE: 'test_error',
+      URL: 'http://codes.dartlang.org/TEST_ERROR',
+      HAS_FIX: false
+    });
+  }
+
+  void test_fromEngine_lint() {
+    engineError = new MockAnalysisError(
+        source,
+        new LintCode('my_lint', 'my message', correction: 'correction'),
+        10,
+        20,
+        'my message');
+    AnalysisError error = newAnalysisError_fromEngine(lineInfo, engineError);
+    expect(error.toJson(), {
+      SEVERITY: 'INFO',
+      TYPE: 'LINT',
+      LOCATION: {
+        FILE: 'foo.dart',
+        OFFSET: 10,
+        LENGTH: 20,
+        START_LINE: 3,
+        START_COLUMN: 2
+      },
+      MESSAGE: 'my message',
+      CODE: 'my_lint',
+      URL: 'https://dart-lang.github.io/linter/lints/my_lint.html',
+      HAS_FIX: false
+    });
+  }
+
   void test_fromEngine_noCorrection() {
     engineError.correction = null;
     AnalysisError error = newAnalysisError_fromEngine(lineInfo, engineError);
@@ -213,3 +264,41 @@
   MockAnalysisError(
       this.source, this.errorCode, this.offset, this.length, this.message);
 }
+
+class MockErrorCode implements engine.ErrorCode {
+  @override
+  engine.ErrorType type;
+
+  @override
+  engine.ErrorSeverity errorSeverity;
+
+  @override
+  String name;
+
+  @override
+  String url;
+
+  MockErrorCode(
+      {this.type: engine.ErrorType.COMPILE_TIME_ERROR,
+      this.errorSeverity: engine.ErrorSeverity.ERROR,
+      this.name: 'TEST_ERROR',
+      this.url});
+
+  @override
+  String get correction {
+    throw new StateError('Unexpected invocation of correction');
+  }
+
+  @override
+  bool get isUnresolvedIdentifier => false;
+
+  @override
+  String get message {
+    throw new StateError('Unexpected invocation of message');
+  }
+
+  @override
+  String get uniqueName {
+    throw new StateError('Unexpected invocation of uniqueName');
+  }
+}
diff --git a/pkg/analysis_server/test/src/domains/completion/get_suggestions_available_test.dart b/pkg/analysis_server/test/src/domains/completion/get_suggestions_available_test.dart
index 57d2907..600a33a 100644
--- a/pkg/analysis_server/test/src/domains/completion/get_suggestions_available_test.dart
+++ b/pkg/analysis_server/test/src/domains/completion/get_suggestions_available_test.dart
@@ -29,6 +29,27 @@
     expect(includedIdSet, contains(asyncSet.id));
   }
 
+  test_dart_instanceCreationExpression() async {
+    addTestFile(r'''
+main() {
+  new ; // ref
+}
+''');
+
+    var mathSet = await waitForSetWithUri('dart:math');
+    var asyncSet = await waitForSetWithUri('dart:async');
+
+    var results = await _getSuggestions(testFile, findOffset('; // ref'));
+    expect(
+      results.includedElementKinds,
+      unorderedEquals([ElementKind.CONSTRUCTOR]),
+    );
+
+    var includedIdSet = results.includedSuggestionSets.map((set) => set.id);
+    expect(includedIdSet, contains(mathSet.id));
+    expect(includedIdSet, contains(asyncSet.id));
+  }
+
   test_defaultArgumentListString() async {
     newFile('/home/test/lib/a.dart', content: r'''
 void fff(int aaa, int bbb) {}
@@ -119,6 +140,7 @@
       unorderedEquals([
         ElementKind.CLASS,
         ElementKind.CLASS_TYPE_ALIAS,
+        ElementKind.CONSTRUCTOR,
         ElementKind.ENUM,
         ElementKind.ENUM_CONSTANT,
         ElementKind.FUNCTION,
diff --git a/pkg/analysis_server/test/src/lsp/test_all.dart b/pkg/analysis_server/test/src/lsp/test_all.dart
new file mode 100644
index 0000000..fa29bbd
--- /dev/null
+++ b/pkg/analysis_server/test/src/lsp/test_all.dart
@@ -0,0 +1,13 @@
+// Copyright (c) 2019, the Dart project authors. Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+import 'package:test_reflective_loader/test_reflective_loader.dart';
+
+import 'lsp_packet_transformer_test.dart' as lsp_packet_transformer;
+
+main() {
+  defineReflectiveSuite(() {
+    lsp_packet_transformer.main();
+  }, name: 'lsp');
+}
diff --git a/pkg/analysis_server/test/src/services/correction/fix/add_missing_enum_case_clauses_test.dart b/pkg/analysis_server/test/src/services/correction/fix/add_missing_enum_case_clauses_test.dart
new file mode 100644
index 0000000..f796f39
--- /dev/null
+++ b/pkg/analysis_server/test/src/services/correction/fix/add_missing_enum_case_clauses_test.dart
@@ -0,0 +1,88 @@
+// Copyright (c) 2019, the Dart project authors. Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+import 'package:analysis_server/src/services/correction/fix.dart';
+import 'package:analyzer/src/error/codes.dart';
+import 'package:analyzer_plugin/utilities/fixes/fixes.dart';
+import 'package:test_reflective_loader/test_reflective_loader.dart';
+
+import 'fix_processor.dart';
+
+main() {
+  defineReflectiveSuite(() {
+    defineReflectiveTests(AddMissingEnumCaseClausesTest);
+  });
+}
+
+@reflectiveTest
+class AddMissingEnumCaseClausesTest extends FixProcessorTest {
+  @override
+  FixKind get kind => DartFixKind.ADD_MISSING_ENUM_CASE_CLAUSES;
+
+  Future<void> assertHasFixWithFilter(String expected) async {
+    bool noError = true;
+    await assertHasFix(expected, errorFilter: (error) {
+      if (noError &&
+          error.errorCode ==
+              StaticWarningCode.MISSING_ENUM_CONSTANT_IN_SWITCH) {
+        noError = false;
+        return true;
+      }
+      return false;
+    });
+  }
+
+  test_empty() async {
+    await resolveTestUnit('''
+enum E {a, b, c}
+void f(E e) {
+  switch (e) {
+  }
+}
+''');
+    await assertHasFixWithFilter('''
+enum E {a, b, c}
+void f(E e) {
+  switch (e) {
+    case E.a:
+      // TODO: Handle this case.
+      break;
+    case E.b:
+      // TODO: Handle this case.
+      break;
+    case E.c:
+      // TODO: Handle this case.
+      break;
+  }
+}
+''');
+  }
+
+  test_nonEmpty() async {
+    await resolveTestUnit('''
+enum E {a, b, c}
+void f(E e) {
+  switch (e) {
+    case E.a:
+      break;
+  }
+}
+''');
+    await assertHasFixWithFilter('''
+enum E {a, b, c}
+void f(E e) {
+  switch (e) {
+    case E.a:
+      break;
+    case E.b:
+      // TODO: Handle this case.
+      break;
+    case E.c:
+      // TODO: Handle this case.
+      break;
+  }
+}
+''');
+  }
+}
diff --git a/pkg/analysis_server/test/src/services/correction/fix/test_all.dart b/pkg/analysis_server/test/src/services/correction/fix/test_all.dart
index 9e4fffb..e9ea84e 100644
--- a/pkg/analysis_server/test/src/services/correction/fix/test_all.dart
+++ b/pkg/analysis_server/test/src/services/correction/fix/test_all.dart
@@ -8,6 +8,8 @@
 import 'add_await_test.dart' as add_await;
 import 'add_explicit_cast_test.dart' as add_explicit_cast;
 import 'add_field_formal_parameters_test.dart' as add_field_formal_parameters;
+import 'add_missing_enum_case_clauses_test.dart'
+    as add_missing_enum_case_clauses;
 import 'add_missing_parameter_named_test.dart' as add_missing_parameter_named;
 import 'add_missing_parameter_positional_test.dart'
     as add_missing_parameter_positional;
@@ -21,6 +23,7 @@
 import 'add_static_test.dart' as add_static;
 import 'add_super_constructor_invocation_test.dart'
     as add_super_constructor_invocation;
+import 'change_argument_name_test.dart' as change_argument_name;
 import 'change_to_nearest_precise_value_test.dart'
     as change_to_nearest_precise_value;
 import 'change_to_static_access_test.dart' as change_to_static_access;
@@ -109,6 +112,7 @@
     add_await.main();
     add_explicit_cast.main();
     add_field_formal_parameters.main();
+    add_missing_enum_case_clauses.main();
     add_missing_parameter_named.main();
     add_missing_parameter_positional.main();
     add_missing_parameter_required.main();
@@ -118,6 +122,7 @@
     add_required.main();
     add_static.main();
     add_super_constructor_invocation.main();
+    change_argument_name.main();
     change_to.main();
     change_to_nearest_precise_value.main();
     change_to_static_access.main();
diff --git a/pkg/analysis_server/test/src/services/correction/fix/update_sdk_constraints_test.dart b/pkg/analysis_server/test/src/services/correction/fix/update_sdk_constraints_test.dart
index 4b957b3..33223ec 100644
--- a/pkg/analysis_server/test/src/services/correction/fix/update_sdk_constraints_test.dart
+++ b/pkg/analysis_server/test/src/services/correction/fix/update_sdk_constraints_test.dart
@@ -3,6 +3,7 @@
 // BSD-style license that can be found in the LICENSE file.
 
 import 'package:analysis_server/src/services/correction/fix.dart';
+import 'package:analyzer/src/dart/analysis/experiments.dart';
 import 'package:analyzer_plugin/utilities/fixes/fixes.dart';
 import 'package:test_reflective_loader/test_reflective_loader.dart';
 
@@ -23,6 +24,21 @@
     await testUpdate(from: 'any', to: '^2.1.0');
   }
 
+  test_asInConstContext() async {
+    createAnalysisOptionsFile(experiments: [EnableString.constant_update_2018]);
+    await testUpdate(content: '''
+const dynamic a = 2;
+const c = a as int;
+''', to: '^2.2.2');
+  }
+
+  test_boolOperator() async {
+    createAnalysisOptionsFile(experiments: [EnableString.constant_update_2018]);
+    await testUpdate(content: '''
+const c = true & false;
+''', to: '^2.2.2');
+  }
+
   test_caret() async {
     await testUpdate(from: '^2.0.0', to: '^2.1.0');
   }
@@ -31,6 +47,16 @@
     await testUpdate(from: "'>=2.0.0 <3.0.0'", to: "'>=2.1.0 <3.0.0'");
   }
 
+  test_eqEqOperatorInConstContext() async {
+    await testUpdate(content: '''
+class A {
+  const A();
+}
+const a = A();
+const c = a == null;
+''', to: '^2.2.2');
+  }
+
   test_gt() async {
     await testUpdate(from: "'>2.0.0'", to: "'>=2.1.0'");
   }
@@ -39,12 +65,36 @@
     await testUpdate(from: "'>=2.0.0'", to: "'>=2.1.0'");
   }
 
-  testUpdate({String from, String to}) async {
+  test_gtGtGtOperator() async {
+    createAnalysisOptionsFile(experiments: [EnableString.triple_shift]);
+    await testUpdate(content: '''
+class C {
+  C operator >>>(C other) => this;
+}
+''', to: '^2.2.2');
+  }
+
+  test_isInConstContext() async {
+    createAnalysisOptionsFile(experiments: [EnableString.constant_update_2018]);
+    await testUpdate(content: '''
+const a = 0;
+const c = a is int;
+''', to: '^2.2.2');
+  }
+
+  test_setLiteral() async {
+    await testUpdate(content: '''
+var s = <int>{};
+''', to: '^2.2.0');
+  }
+
+  testUpdate({String content, String from: '^2.0.0', String to}) async {
     updateTestPubspecFile('''
 environment:
   sdk: $from
 ''');
-    await resolveTestUnit('''
+    await resolveTestUnit(content ??
+        '''
 Future<int> zero() async => 0;
 ''');
     await assertHasFix('''
diff --git a/pkg/analysis_server/test/src/test_all.dart b/pkg/analysis_server/test/src/test_all.dart
index 51ad9b3..86eb450 100644
--- a/pkg/analysis_server/test/src/test_all.dart
+++ b/pkg/analysis_server/test/src/test_all.dart
@@ -4,29 +4,31 @@
 
 import 'package:test_reflective_loader/test_reflective_loader.dart';
 
-import 'computer/test_all.dart' as computer_all;
-import 'domain_abstract_test.dart' as domain_abstract_test;
-import 'domains/test_all.dart' as domains_all;
-import 'flutter/test_all.dart' as flutter_all;
-import 'nullability/test_all.dart' as nullability_all;
-import 'plugin/test_all.dart' as plugin_all;
-import 'services/test_all.dart' as services_all;
-import 'utilities/test_all.dart' as utilities_all;
-import 'watch_manager_test.dart' as watch_manager_test;
+import 'computer/test_all.dart' as computer;
+import 'domain_abstract_test.dart' as domain_abstract;
+import 'domains/test_all.dart' as domains;
+import 'flutter/test_all.dart' as flutter;
+import 'lsp/test_all.dart' as lsp;
+import 'nullability/test_all.dart' as nullability;
+import 'plugin/test_all.dart' as plugin;
+import 'services/test_all.dart' as services;
+import 'utilities/test_all.dart' as utilities;
+import 'watch_manager_test.dart' as watch_manager;
 
 /**
  * Utility for manually running all tests.
  */
 main() {
   defineReflectiveSuite(() {
-    computer_all.main();
-    domain_abstract_test.main();
-    domains_all.main();
-    flutter_all.main();
-    nullability_all.main();
-    plugin_all.main();
-    services_all.main();
-    utilities_all.main();
-    watch_manager_test.main();
+    computer.main();
+    domain_abstract.main();
+    domains.main();
+    flutter.main();
+    lsp.main();
+    nullability.main();
+    plugin.main();
+    services.main();
+    utilities.main();
+    watch_manager.main();
   }, name: 'src');
 }
diff --git a/pkg/analysis_server/test/test_all.dart b/pkg/analysis_server/test/test_all.dart
index e26c43d..9d87caa 100644
--- a/pkg/analysis_server/test/test_all.dart
+++ b/pkg/analysis_server/test/test_all.dart
@@ -5,50 +5,55 @@
 import 'package:test_reflective_loader/test_reflective_loader.dart';
 
 import '../tool/spec/check_all_test.dart' as check_spec;
-import 'analysis/test_all.dart' as analysis_all;
-import 'analysis_server_test.dart' as analysis_server_test;
-import 'channel/test_all.dart' as channel_test;
-import 'completion_test.dart' as completion_test;
-import 'context_manager_test.dart' as context_manager_test;
-import 'domain_analysis_test.dart' as domain_analysis_test;
-import 'domain_completion_test.dart' as domain_completion_test;
-import 'domain_diagnostic_test.dart' as domain_experimental_test;
-import 'domain_edit_dartfix_test.dart' as domain_edit_dartfix_test;
-import 'domain_execution_test.dart' as domain_execution_test;
-import 'domain_server_test.dart' as domain_server_test;
-import 'edit/test_all.dart' as edit_all;
-import 'plugin/test_all.dart' as plugin_all;
-import 'protocol_server_test.dart' as protocol_server_test;
-import 'protocol_test.dart' as protocol_test;
-import 'search/test_all.dart' as search_all;
-import 'services/test_all.dart' as services_all;
-import 'socket_server_test.dart' as socket_server_test;
-import 'src/test_all.dart' as src_all;
+import 'analysis/test_all.dart' as analysis;
+import 'analysis_server_test.dart' as analysis_server;
+import 'benchmarks_test.dart' as benchmarks;
+import 'channel/test_all.dart' as channel;
+import 'completion_test.dart' as completion;
+import 'context_manager_test.dart' as context_manager;
+import 'domain_analysis_test.dart' as domain_analysis;
+import 'domain_completion_test.dart' as domain_completion;
+import 'domain_diagnostic_test.dart' as domain_experimental;
+import 'domain_edit_dartfix_test.dart' as domain_edit_dartfix;
+import 'domain_execution_test.dart' as domain_execution;
+import 'domain_server_test.dart' as domain_server;
+import 'edit/test_all.dart' as edit;
+import 'lsp/test_all.dart' as lsp;
+import 'plugin/test_all.dart' as plugin;
+import 'protocol_server_test.dart' as protocol_server;
+import 'protocol_test.dart' as protocol;
+import 'search/test_all.dart' as search;
+import 'services/test_all.dart' as services;
+import 'socket_server_test.dart' as socket_server;
+import 'src/test_all.dart' as src;
+import 'tool/test_all.dart' as tool;
+import 'verify_tests_test.dart' as verify_tests;
 
-/**
- * Utility for manually running all tests.
- */
 main() {
   defineReflectiveSuite(() {
-    analysis_all.main();
-    analysis_server_test.main();
-    channel_test.main();
-    completion_test.main();
-    context_manager_test.main();
-    domain_analysis_test.main();
-    domain_completion_test.main();
-    domain_edit_dartfix_test.main();
-    domain_execution_test.main();
-    domain_experimental_test.main();
-    domain_server_test.main();
-    edit_all.main();
-    plugin_all.main();
-    protocol_server_test.main();
-    protocol_test.main();
-    search_all.main();
-    services_all.main();
-    socket_server_test.main();
-    src_all.main();
+    analysis.main();
+    analysis_server.main();
+    benchmarks.main();
+    channel.main();
+    completion.main();
+    context_manager.main();
+    domain_analysis.main();
+    domain_completion.main();
+    domain_edit_dartfix.main();
+    domain_execution.main();
+    domain_experimental.main();
+    domain_server.main();
+    edit.main();
+    lsp.main();
+    plugin.main();
+    protocol_server.main();
+    protocol.main();
+    search.main();
+    services.main();
+    socket_server.main();
+    src.main();
+    tool.main();
+    verify_tests.main();
     defineReflectiveSuite(() {
       defineReflectiveTests(SpecTest);
     }, name: 'spec');
diff --git a/pkg/analysis_server/test/tool/test_all.dart b/pkg/analysis_server/test/tool/test_all.dart
new file mode 100644
index 0000000..8f79e7d
--- /dev/null
+++ b/pkg/analysis_server/test/tool/test_all.dart
@@ -0,0 +1,13 @@
+// Copyright (c) 2019, the Dart project authors. Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+import 'package:test_reflective_loader/test_reflective_loader.dart';
+
+import 'lsp_spec/test_all.dart' as lsp_spec;
+
+main() {
+  defineReflectiveSuite(() {
+    lsp_spec.main();
+  }, name: 'tool');
+}
diff --git a/pkg/analysis_server/test/verify_tests_test.dart b/pkg/analysis_server/test/verify_tests_test.dart
new file mode 100644
index 0000000..4373181
--- /dev/null
+++ b/pkg/analysis_server/test/verify_tests_test.dart
@@ -0,0 +1,84 @@
+// Copyright (c) 2019, the Dart project authors. Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+import 'package:analyzer/dart/analysis/analysis_context.dart';
+import 'package:analyzer/dart/analysis/analysis_context_collection.dart';
+import 'package:analyzer/dart/analysis/results.dart';
+import 'package:analyzer/dart/analysis/session.dart';
+import 'package:analyzer/dart/ast/ast.dart';
+import 'package:analyzer/file_system/file_system.dart';
+import 'package:analyzer/file_system/physical_file_system.dart';
+import 'package:front_end/src/testing/package_root.dart' as package_root;
+import 'package:path/path.dart' as path;
+import 'package:test/test.dart';
+
+main() {
+  PhysicalResourceProvider provider = PhysicalResourceProvider.INSTANCE;
+  String packageRoot = provider.pathContext.normalize(package_root.packageRoot);
+  String analysisServerPath =
+      provider.pathContext.join(packageRoot, 'analysis_server');
+  String testDirPath = provider.pathContext.join(analysisServerPath, 'test');
+
+  AnalysisContextCollection collection = new AnalysisContextCollection(
+      includedPaths: <String>[testDirPath], resourceProvider: provider);
+  List<AnalysisContext> contexts = collection.contexts;
+  if (contexts.length != 1) {
+    fail('The test directory contains multiple analysis contexts.');
+  }
+
+  buildTestsIn(
+      contexts[0].currentSession, testDirPath, provider.getFolder(testDirPath));
+}
+
+void buildTestsIn(
+    AnalysisSession session, String testDirPath, Folder directory) {
+  List<String> testFileNames = [];
+  File testAllFile;
+  List<Resource> children = directory.getChildren();
+  children.sort((first, second) => first.shortName.compareTo(second.shortName));
+  for (Resource child in children) {
+    if (child is Folder) {
+      if (child.shortName != 'integration' &&
+          child.getChildAssumingFile('test_all.dart').exists) {
+        testFileNames.add('${child.shortName}/test_all.dart');
+      }
+      buildTestsIn(session, testDirPath, child);
+    } else if (child is File) {
+      String name = child.shortName;
+      if (name == 'test_all.dart') {
+        testAllFile = child;
+      } else if (name.endsWith('_test.dart')) {
+        testFileNames.add(name);
+      }
+    }
+  }
+  String relativePath = path.relative(directory.path, from: testDirPath);
+  test(relativePath, () {
+    if (testFileNames.isEmpty) {
+      return;
+    }
+    if (testAllFile == null) {
+      fail('Missing "test_all.dart" in $relativePath');
+    }
+    ParsedUnitResult result = session.getParsedUnit(testAllFile.path);
+    if (result.state != ResultState.VALID) {
+      fail('Could not parse ${testAllFile.path}');
+    }
+    List<String> importedFiles = [];
+    for (var directive in result.unit.directives) {
+      if (directive is ImportDirective) {
+        importedFiles.add(directive.uri.stringValue);
+      }
+    }
+    List<String> missingFiles = [];
+    for (String testFileName in testFileNames) {
+      if (!importedFiles.contains(testFileName)) {
+        missingFiles.add(testFileName);
+      }
+    }
+    if (missingFiles.isNotEmpty) {
+      fail('Tests missing from "test_all.dart": ${missingFiles.join(', ')}');
+    }
+  });
+}
diff --git a/pkg/analysis_server/tool/spec/check_all_test.dart b/pkg/analysis_server/tool/spec/check_all_test.dart
index 1388652..e37d58f 100644
--- a/pkg/analysis_server/tool/spec/check_all_test.dart
+++ b/pkg/analysis_server/tool/spec/check_all_test.dart
@@ -19,5 +19,5 @@
   int index = components.indexOf('analysis_server');
   String pkgPath = joinAll(components.sublist(0, index + 1));
   await GeneratedContent.checkAll(
-      pkgPath, join('tool', 'spec', 'generate_all.dart'), allTargets);
+      pkgPath, join(pkgPath, 'tool', 'spec', 'generate_all.dart'), allTargets);
 }
diff --git a/pkg/analysis_server/tool/spec/generated/java/types/AnalysisError.java b/pkg/analysis_server/tool/spec/generated/java/types/AnalysisError.java
index d4affbc..6bb4c35 100644
--- a/pkg/analysis_server/tool/spec/generated/java/types/AnalysisError.java
+++ b/pkg/analysis_server/tool/spec/generated/java/types/AnalysisError.java
@@ -69,6 +69,11 @@
   private final String code;
 
   /**
+   * The URL of a page containing documentation associated with this error.
+   */
+  private final String url;
+
+  /**
    * A hint to indicate to interested clients that this error has an associated fix (or fixes). The
    * absence of this field implies there are not known to be fixes. Note that since the operation to
    * calculate whether fixes apply needs to be performant it is possible that complicated tests will
@@ -82,13 +87,14 @@
   /**
    * Constructor for {@link AnalysisError}.
    */
-  public AnalysisError(String severity, String type, Location location, String message, String correction, String code, Boolean hasFix) {
+  public AnalysisError(String severity, String type, Location location, String message, String correction, String code, String url, Boolean hasFix) {
     this.severity = severity;
     this.type = type;
     this.location = location;
     this.message = message;
     this.correction = correction;
     this.code = code;
+    this.url = url;
     this.hasFix = hasFix;
   }
 
@@ -103,6 +109,7 @@
         ObjectUtilities.equals(other.message, message) &&
         ObjectUtilities.equals(other.correction, correction) &&
         ObjectUtilities.equals(other.code, code) &&
+        ObjectUtilities.equals(other.url, url) &&
         ObjectUtilities.equals(other.hasFix, hasFix);
     }
     return false;
@@ -115,8 +122,9 @@
     String message = jsonObject.get("message").getAsString();
     String correction = jsonObject.get("correction") == null ? null : jsonObject.get("correction").getAsString();
     String code = jsonObject.get("code").getAsString();
+    String url = jsonObject.get("url") == null ? null : jsonObject.get("url").getAsString();
     Boolean hasFix = jsonObject.get("hasFix") == null ? null : jsonObject.get("hasFix").getAsBoolean();
-    return new AnalysisError(severity, type, location, message, correction, code, hasFix);
+    return new AnalysisError(severity, type, location, message, correction, code, url, hasFix);
   }
 
   public static List<AnalysisError> fromJsonArray(JsonArray jsonArray) {
@@ -189,6 +197,13 @@
     return type;
   }
 
+  /**
+   * The URL of a page containing documentation associated with this error.
+   */
+  public String getUrl() {
+    return url;
+  }
+
   @Override
   public int hashCode() {
     HashCodeBuilder builder = new HashCodeBuilder();
@@ -198,6 +213,7 @@
     builder.append(message);
     builder.append(correction);
     builder.append(code);
+    builder.append(url);
     builder.append(hasFix);
     return builder.toHashCode();
   }
@@ -212,6 +228,9 @@
       jsonObject.addProperty("correction", correction);
     }
     jsonObject.addProperty("code", code);
+    if (url != null) {
+      jsonObject.addProperty("url", url);
+    }
     if (hasFix != null) {
       jsonObject.addProperty("hasFix", hasFix);
     }
@@ -234,6 +253,8 @@
     builder.append(correction + ", ");
     builder.append("code=");
     builder.append(code + ", ");
+    builder.append("url=");
+    builder.append(url + ", ");
     builder.append("hasFix=");
     builder.append(hasFix);
     builder.append("]");
diff --git a/pkg/analysis_server/tool/spec/generated/java/types/TokenDetails.java b/pkg/analysis_server/tool/spec/generated/java/types/TokenDetails.java
index 6a27a41..183ba52 100644
--- a/pkg/analysis_server/tool/spec/generated/java/types/TokenDetails.java
+++ b/pkg/analysis_server/tool/spec/generated/java/types/TokenDetails.java
@@ -74,7 +74,7 @@
   public static TokenDetails fromJson(JsonObject jsonObject) {
     String lexeme = jsonObject.get("lexeme").getAsString();
     String type = jsonObject.get("type").getAsString();
-    List<String> validElementKinds = JsonUtilities.decodeStringList(jsonObject.get("validElementKinds").getAsJsonArray());
+    List<String> validElementKinds = jsonObject.get("validElementKinds") == null ? null : JsonUtilities.decodeStringList(jsonObject.get("validElementKinds").getAsJsonArray());
     return new TokenDetails(lexeme, type, validElementKinds);
   }
 
@@ -124,11 +124,13 @@
     JsonObject jsonObject = new JsonObject();
     jsonObject.addProperty("lexeme", lexeme);
     jsonObject.addProperty("type", type);
-    JsonArray jsonArrayValidElementKinds = new JsonArray();
-    for (String elt : validElementKinds) {
-      jsonArrayValidElementKinds.add(new JsonPrimitive(elt));
+    if (validElementKinds != null) {
+      JsonArray jsonArrayValidElementKinds = new JsonArray();
+      for (String elt : validElementKinds) {
+        jsonArrayValidElementKinds.add(new JsonPrimitive(elt));
+      }
+      jsonObject.add("validElementKinds", jsonArrayValidElementKinds);
     }
-    jsonObject.add("validElementKinds", jsonArrayValidElementKinds);
     return jsonObject;
   }
 
diff --git a/pkg/analysis_server/tool/spec/spec_input.html b/pkg/analysis_server/tool/spec/spec_input.html
index 9948e9c..edbcba3 100644
--- a/pkg/analysis_server/tool/spec/spec_input.html
+++ b/pkg/analysis_server/tool/spec/spec_input.html
@@ -3901,9 +3901,9 @@
           The type of this token.
         </p>
       </field>
-      <field name="validElementKinds">
+      <field name="validElementKinds" optional="true">
         <list>
-          <ref>ElementKind</ref>
+          <ref>String</ref>
         </list>
         <p>
           The kinds of elements which could validly replace this token.
diff --git a/pkg/analysis_server_client/lib/src/protocol/protocol_generated.dart b/pkg/analysis_server_client/lib/src/protocol/protocol_generated.dart
index 04b3cdc..b9d94ce 100644
--- a/pkg/analysis_server_client/lib/src/protocol/protocol_generated.dart
+++ b/pkg/analysis_server_client/lib/src/protocol/protocol_generated.dart
@@ -21542,7 +21542,7 @@
  * {
  *   "lexeme": String
  *   "type": String
- *   "validElementKinds": List<ElementKind>
+ *   "validElementKinds": optional List<String>
  * }
  *
  * Clients may not extend, implement or mix-in this class.
@@ -21552,7 +21552,7 @@
 
   String _type;
 
-  List<ElementKind> _validElementKinds;
+  List<String> _validElementKinds;
 
   /**
    * The raw token text.
@@ -21583,18 +21583,16 @@
   /**
    * The kinds of elements which could validly replace this token.
    */
-  List<ElementKind> get validElementKinds => _validElementKinds;
+  List<String> get validElementKinds => _validElementKinds;
 
   /**
    * The kinds of elements which could validly replace this token.
    */
-  void set validElementKinds(List<ElementKind> value) {
-    assert(value != null);
+  void set validElementKinds(List<String> value) {
     this._validElementKinds = value;
   }
 
-  TokenDetails(
-      String lexeme, String type, List<ElementKind> validElementKinds) {
+  TokenDetails(String lexeme, String type, {List<String> validElementKinds}) {
     this.lexeme = lexeme;
     this.type = type;
     this.validElementKinds = validElementKinds;
@@ -21618,17 +21616,15 @@
       } else {
         throw jsonDecoder.mismatch(jsonPath, "type");
       }
-      List<ElementKind> validElementKinds;
+      List<String> validElementKinds;
       if (json.containsKey("validElementKinds")) {
         validElementKinds = jsonDecoder.decodeList(
             jsonPath + ".validElementKinds",
             json["validElementKinds"],
-            (String jsonPath, Object json) =>
-                new ElementKind.fromJson(jsonDecoder, jsonPath, json));
-      } else {
-        throw jsonDecoder.mismatch(jsonPath, "validElementKinds");
+            jsonDecoder.decodeString);
       }
-      return new TokenDetails(lexeme, type, validElementKinds);
+      return new TokenDetails(lexeme, type,
+          validElementKinds: validElementKinds);
     } else {
       throw jsonDecoder.mismatch(jsonPath, "TokenDetails", json);
     }
@@ -21639,8 +21635,9 @@
     Map<String, dynamic> result = {};
     result["lexeme"] = lexeme;
     result["type"] = type;
-    result["validElementKinds"] =
-        validElementKinds.map((ElementKind value) => value.toJson()).toList();
+    if (validElementKinds != null) {
+      result["validElementKinds"] = validElementKinds;
+    }
     return result;
   }
 
@@ -21653,7 +21650,7 @@
       return lexeme == other.lexeme &&
           type == other.type &&
           listEqual(validElementKinds, other.validElementKinds,
-              (ElementKind a, ElementKind b) => a == b);
+              (String a, String b) => a == b);
     }
     return false;
   }
diff --git a/pkg/analysis_tool/lib/tools.dart b/pkg/analysis_tool/lib/tools.dart
index 0e35b61..74dd816 100644
--- a/pkg/analysis_tool/lib/tools.dart
+++ b/pkg/analysis_tool/lib/tools.dart
@@ -313,14 +313,15 @@
    * out a message instructing the user to regenerate them, and exit with a
    * nonzero error code.
    *
-   * [pkgPath] is the path to the current package.  [generatorRelPath] is the
-   * path to a .dart script the user may use to regenerate the targets.
+   * [pkgPath] is the path to the current package.  [generatorPath] is the path
+   * to a .dart script the user may use to regenerate the targets.
    *
-   * To avoid mistakes when run on Windows, [generatorRelPath] always uses
+   * To avoid mistakes when run on Windows, [generatorPath] always uses
    * POSIX directory separators.
    */
-  static Future<void> checkAll(String pkgPath, String generatorRelPath,
-      Iterable<GeneratedContent> targets) async {
+  static Future<void> checkAll(
+      String pkgPath, String generatorPath, Iterable<GeneratedContent> targets,
+      {List<String> args = const []}) async {
     bool generateNeeded = false;
     for (GeneratedContent target in targets) {
       bool ok = await target.check(pkgPath);
@@ -339,9 +340,8 @@
         // ignore: deprecated_member_use
         packageRoot = ' --package-root=${Platform.packageRoot}';
       }
-      String generateScript =
-          join(pkgPath, joinAll(posix.split(generatorRelPath)));
-      print('  $executable$packageRoot $generateScript');
+      String generateScript = normalize(joinAll(posix.split(generatorPath)));
+      print('  $executable$packageRoot $generateScript ${args.join(" ")}');
       exit(1);
     } else {
       print('All generated files up to date.');
diff --git a/pkg/analyzer/CHANGELOG.md b/pkg/analyzer/CHANGELOG.md
index e376b96..e30b6cf 100644
--- a/pkg/analyzer/CHANGELOG.md
+++ b/pkg/analyzer/CHANGELOG.md
@@ -1,3 +1,38 @@
+## 0.36.0
+* Changed the return type of `Expression.precendence` to `Precedence`.  Clients
+  that prepared for this change by switching to `Expression.precedence2` should
+  now return to using `Expression.precedence`.
+* AST cleanup related to the "UI as code" feature:
+  * Removed the following AST node types:
+    * `ForEachStatement` (use `ForStatement` instead)
+    * `MapLiteral` and `MapLiteral2` (use `SetOrMapLiteral` instead)
+    * `SetLiteral` and `SetLiteral2` (use `SetOrMapLiteral` instead)
+    * `ListLiteral2` (use `ListLiteral` instead)
+  * Deprecated `ForStatement2` (use `ForStatement` instead)
+  * Removed the following visit methods:
+    * `visitForEachStatement` (override `visitForStatement` instead)
+    * `visitMapLiteral` and `visitMapLiteral2` (override `visitSetOrMapLiteral`
+      instead)
+    * `visitSetLiteral` and `visitSetLiteral2` (override `visitSetOrMapLiteral`
+      instead)
+    * `visitListLiteral2` (override `visitListLiteral` instead)
+  * Deprecated the `visitForStatement2` visit method (use `VisitForStatement`
+    instead)
+  * Removed the following AstFactory methods:
+    * `mapLiteral` and `mapLiteral2` (use `setOrMapLiteral` instead)
+    * `setLiteral` and `setLiteral2` (use `setOrMapLiteral` instead)
+    * `listLiteral2` (use `listLiteral` instead)
+  * Deprecated `AstFactory.forStatement2`, and introduced
+    `AstFactory.forStatement` to replace it
+  * Changed the type of the getter `ListLiteral.elements` to
+    `NodeList<CollectionElement>`
+  * Deprecated `ListLiteral.elements2` (use `ListLiteral.elements` instead)
+  * Deprecated `SetOrMapLiteral.elements2`, and introduced
+    `SetOrMapLiteral.elements` to replace it
+  * Deprecated `NodeLintRegistry.addForStatement2` (use
+    `NodeLintRegistry.addForStatement` instead)
+* Bug fixes: #36158, #36212, #36255
+
 ## 0.35.4
 * Deprecated AST structures that will no longer be used after the
   control_flow_collections and spread_collections experiments are enabled.  The
diff --git a/pkg/analyzer/lib/analyzer.dart b/pkg/analyzer/lib/analyzer.dart
index 3516414..3806ad9 100644
--- a/pkg/analyzer/lib/analyzer.dart
+++ b/pkg/analyzer/lib/analyzer.dart
@@ -1,4 +1,4 @@
-// Copyright (c) 2013, the Dart project authors.  Please see the AUTHORS file
+// Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
 
diff --git a/pkg/analyzer/lib/context/context_root.dart b/pkg/analyzer/lib/context/context_root.dart
index 7625503..df4a4b4 100644
--- a/pkg/analyzer/lib/context/context_root.dart
+++ b/pkg/analyzer/lib/context/context_root.dart
@@ -1,4 +1,4 @@
-// Copyright (c) 2017, the Dart project authors.  Please see the AUTHORS file
+// Copyright (c) 2017, the Dart project authors. Please see the AUTHORS file
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
 
diff --git a/pkg/analyzer/lib/context/declared_variables.dart b/pkg/analyzer/lib/context/declared_variables.dart
index c0d7fdf..74dc187 100644
--- a/pkg/analyzer/lib/context/declared_variables.dart
+++ b/pkg/analyzer/lib/context/declared_variables.dart
@@ -1,4 +1,4 @@
-// Copyright (c) 2014, the Dart project authors.  Please see the AUTHORS file
+// Copyright (c) 2014, the Dart project authors. Please see the AUTHORS file
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
 
diff --git a/pkg/analyzer/lib/dart/analysis/analysis_context.dart b/pkg/analyzer/lib/dart/analysis/analysis_context.dart
index e24bfc8..6c3728f 100644
--- a/pkg/analyzer/lib/dart/analysis/analysis_context.dart
+++ b/pkg/analyzer/lib/dart/analysis/analysis_context.dart
@@ -1,77 +1,65 @@
+// Copyright (c) 2018, the Dart project authors. Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
 import 'package:analyzer/dart/analysis/context_root.dart';
 import 'package:analyzer/dart/analysis/session.dart';
 import 'package:analyzer/src/generated/engine.dart' hide AnalysisResult;
 
-/**
- * A representation of a body of code and the context in which the code is to be
- * analyzed.
- *
- * The body of code is represented as a collection of files and directories, as
- * defined by the list of included paths. If the list of included paths
- * contains one or more directories, then zero or more files or directories
- * within the included directories can be excluded from analysis, as defined by
- * the list of excluded paths.
- *
- * Clients may not extend, implement or mix-in this class.
- */
+/// A representation of a body of code and the context in which the code is to
+/// be analyzed.
+///
+/// The body of code is represented as a collection of files and directories, as
+/// defined by the list of included paths. If the list of included paths
+/// contains one or more directories, then zero or more files or directories
+/// within the included directories can be excluded from analysis, as defined by
+/// the list of excluded paths.
+///
+/// Clients may not extend, implement or mix-in this class.
 abstract class AnalysisContext {
-  /**
-   * The analysis options used to control the way the code is analyzed.
-   */
+  /// The analysis options used to control the way the code is analyzed.
   AnalysisOptions get analysisOptions;
 
-  /**
-   * Return the context root from which this context was created.
-   */
+  /// Return the context root from which this context was created.
   ContextRoot get contextRoot;
 
-  /**
-   * Return the currently active analysis session.
-   */
+  /// Return the currently active analysis session.
   AnalysisSession get currentSession;
 
-  /**
-   * A list of the absolute, normalized paths of files and directories that
-   * will not be analyzed.
-   *
-   * Deprecated: Use `contextRoot.excludedPaths`.
-   */
+  /// A list of the absolute, normalized paths of files and directories that
+  /// will not be analyzed.
+  ///
+  /// Deprecated: Use `contextRoot.excludedPaths`.
   @deprecated
   List<String> get excludedPaths;
 
-  /**
-   * A list of the absolute, normalized paths of files and directories that
-   * will be analyzed. If a path in the list represents a file, then that file
-   * will be analyzed, even if it is in the list of [excludedPaths]. If path in
-   * the list represents a directory, then all of the files contained in that
-   * directory, either directly or indirectly, and that are not explicitly
-   * excluded by the list of [excludedPaths] will be analyzed.
-   *
-   * Deprecated: Use `contextRoot.includedPaths`.
-   */
+  /// A list of the absolute, normalized paths of files and directories that
+  /// will be analyzed. If a path in the list represents a file, then that file
+  /// will be analyzed, even if it is in the list of [excludedPaths]. If path in
+  /// the list represents a directory, then all of the files contained in that
+  /// directory, either directly or indirectly, and that are not explicitly
+  /// excluded by the list of [excludedPaths] will be analyzed.
+  ///
+  /// Deprecated: Use `contextRoot.includedPaths`.
   @deprecated
   List<String> get includedPaths;
 
-  /**
-   * Return the absolute, normalized paths of all of the files that are
-   * contained in this context. These are all of the files that are included
-   * directly or indirectly by one or more of the [includedPaths] and that are
-   * not excluded by any of the [excludedPaths].
-   *
-   * Deprecated: Use `contextRoot.analyzedFiles`.
-   */
+  /// Return the absolute, normalized paths of all of the files that are
+  /// contained in this context. These are all of the files that are included
+  /// directly or indirectly by one or more of the [includedPaths] and that are
+  /// not excluded by any of the [excludedPaths].
+  ///
+  /// Deprecated: Use `contextRoot.analyzedFiles`.
   @deprecated
   Iterable<String> analyzedFiles();
 
-  /**
-   * Return `true` if the file or directory with the given [path] will be
-   * analyzed in this context. A file (or directory) will be analyzed if it is
-   * either the same as or contained in one of the [includedPaths] and, if it is
-   * is contained in one of the [includedPaths], is not the same as or contained
-   * in one of the [excludedPaths].
-   *
-   * Deprecated: Use `contextRoot.isAnalyzed`.
-   */
+  /// Return `true` if the file or directory with the given [path] will be
+  /// analyzed in this context. A file (or directory) will be analyzed if it is
+  /// either the same as or contained in one of the [includedPaths] and, if it
+  /// is contained in one of the [includedPaths], is not the same as or
+  /// contained in one of the [excludedPaths].
+  ///
+  /// Deprecated: Use `contextRoot.isAnalyzed`.
   @deprecated
   bool isAnalyzed(String path);
 }
diff --git a/pkg/analyzer/lib/dart/analysis/context_builder.dart b/pkg/analyzer/lib/dart/analysis/context_builder.dart
index f99dce5..08cbd34 100644
--- a/pkg/analyzer/lib/dart/analysis/context_builder.dart
+++ b/pkg/analyzer/lib/dart/analysis/context_builder.dart
@@ -9,39 +9,33 @@
 import 'package:analyzer/src/dart/analysis/context_builder.dart';
 import 'package:meta/meta.dart';
 
-/**
- * A utility class used to build an analysis context based on a context root.
- *
- * Clients may not extend, implement or mix-in this class.
- */
+/// A utility class used to build an analysis context based on a context root.
+///
+/// Clients may not extend, implement or mix-in this class.
 abstract class ContextBuilder {
-  /**
-   * Initialize a newly created context builder. If a [resourceProvider] is
-   * given, then it will be used to access the file system, otherwise the
-   * default resource provider will be used.
-   */
+  /// Initialize a newly created context builder. If a [resourceProvider] is
+  /// given, then it will be used to access the file system, otherwise the
+  /// default resource provider will be used.
   factory ContextBuilder({ResourceProvider resourceProvider}) =
       ContextBuilderImpl;
 
-  /**
-   * Return an analysis context corresponding to the given [contextRoot].
-   *
-   * If a set of [declaredVariables] is provided, the values will be used to map
-   * the the variable names found in `fromEnvironment` invocations to the
-   * constant value that will be returned. If none is given, then no variables
-   * will be defined.
-   * 
-   * If a list of [librarySummaryPaths] is provided, then the summary files at
-   * those paths will be used, when possible, when analyzing the libraries
-   * contained in the summary files.
-   *
-   * If an [sdkPath] is provided, and if it is a valid path to a directory
-   * containing a valid SDK, then the SDK in the referenced directory will be
-   * used when analyzing the code in the context.
-   * 
-   * If an [sdkSummaryPath] is provided, then that file will be used as the
-   * summary file for the SDK.
-   */
+  /// Return an analysis context corresponding to the given [contextRoot].
+  ///
+  /// If a set of [declaredVariables] is provided, the values will be used to
+  /// map the the variable names found in `fromEnvironment` invocations to the
+  /// constant value that will be returned. If none is given, then no variables
+  /// will be defined.
+  ///
+  /// If a list of [librarySummaryPaths] is provided, then the summary files at
+  /// those paths will be used, when possible, when analyzing the libraries
+  /// contained in the summary files.
+  ///
+  /// If an [sdkPath] is provided, and if it is a valid path to a directory
+  /// containing a valid SDK, then the SDK in the referenced directory will be
+  /// used when analyzing the code in the context.
+  ///
+  /// If an [sdkSummaryPath] is provided, then that file will be used as the
+  /// summary file for the SDK.
   AnalysisContext createContext(
       {@required ContextRoot contextRoot,
       DeclaredVariables declaredVariables,
diff --git a/pkg/analyzer/lib/dart/analysis/context_locator.dart b/pkg/analyzer/lib/dart/analysis/context_locator.dart
index ce4d07a..d2c4cd3 100644
--- a/pkg/analyzer/lib/dart/analysis/context_locator.dart
+++ b/pkg/analyzer/lib/dart/analysis/context_locator.dart
@@ -8,39 +8,33 @@
 import 'package:analyzer/src/dart/analysis/context_locator.dart';
 import 'package:meta/meta.dart';
 
-/**
- * Determines the list of analysis contexts that can be used to analyze the
- * files and folders that should be analyzed given a list of included files and
- * folders and a list of excluded files and folders.
- *
- * Clients may not extend, implement or mix-in this class.
- */
+/// Determines the list of analysis contexts that can be used to analyze the
+/// files and folders that should be analyzed given a list of included files and
+/// folders and a list of excluded files and folders.
+///
+/// Clients may not extend, implement or mix-in this class.
 abstract class ContextLocator {
-  /**
-   * Initialize a newly created context locator. If a [resourceProvider] is
-   * supplied, it will be used to access the file system. Otherwise the default
-   * resource provider will be used.
-   */
+  /// Initialize a newly created context locator. If a [resourceProvider] is
+  /// supplied, it will be used to access the file system. Otherwise the default
+  /// resource provider will be used.
   factory ContextLocator({ResourceProvider resourceProvider}) =
       ContextLocatorImpl;
 
-  /**
-   * Return a list of the analysis contexts that should be used to analyze the
-   * files that are included by the list of [includedPaths] and not excluded by
-   * the list of [excludedPaths].
-   *
-   * If an [optionsFile] is specified, then it is assumed to be the path to the
-   * `analysis_options.yaml` (or `.analysis_options`) file that should be used
-   * in place of the ones that would be found by looking in the directories
-   * containing the context roots.
-   *
-   * If a [packagesFile] is specified, then it is assumed to be the path to the
-   * `.packages` file that should be used in place of the one that would be
-   * found by looking in the directories containing the context roots.
-   *
-   * If the [sdkPath] is specified, then it is used as the path to the root of
-   * the SDK that should be used during analysis.
-   */
+  /// Return a list of the analysis contexts that should be used to analyze the
+  /// files that are included by the list of [includedPaths] and not excluded by
+  /// the list of [excludedPaths].
+  ///
+  /// If an [optionsFile] is specified, then it is assumed to be the path to the
+  /// `analysis_options.yaml` (or `.analysis_options`) file that should be used
+  /// in place of the ones that would be found by looking in the directories
+  /// containing the context roots.
+  ///
+  /// If a [packagesFile] is specified, then it is assumed to be the path to the
+  /// `.packages` file that should be used in place of the one that would be
+  /// found by looking in the directories containing the context roots.
+  ///
+  /// If the [sdkPath] is specified, then it is used as the path to the root of
+  /// the SDK that should be used during analysis.
   @deprecated
   List<AnalysisContext> locateContexts(
       {@required List<String> includedPaths,
@@ -49,20 +43,18 @@
       String packagesFile: null,
       String sdkPath: null});
 
-  /**
-   * Return a list of the context roots that should be used to analyze the files
-   * that are included by the list of [includedPaths] and not excluded by the
-   * list of [excludedPaths].
-   *
-   * If an [optionsFile] is specified, then it is assumed to be the path to the
-   * `analysis_options.yaml` (or `.analysis_options`) file that should be used
-   * in place of the ones that would be found by looking in the directories
-   * containing the context roots.
-   *
-   * If a [packagesFile] is specified, then it is assumed to be the path to the
-   * `.packages` file that should be used in place of the one that would be
-   * found by looking in the directories containing the context roots.
-   */
+  /// Return a list of the context roots that should be used to analyze the
+  /// files that are included by the list of [includedPaths] and not excluded by
+  /// the list of [excludedPaths].
+  ///
+  /// If an [optionsFile] is specified, then it is assumed to be the path to the
+  /// `analysis_options.yaml` (or `.analysis_options`) file that should be used
+  /// in place of the ones that would be found by looking in the directories
+  /// containing the context roots.
+  ///
+  /// If a [packagesFile] is specified, then it is assumed to be the path to the
+  /// `.packages` file that should be used in place of the one that would be
+  /// found by looking in the directories containing the context roots.
   List<ContextRoot> locateRoots(
       {@required List<String> includedPaths,
       List<String> excludedPaths: null,
diff --git a/pkg/analyzer/lib/dart/analysis/context_root.dart b/pkg/analyzer/lib/dart/analysis/context_root.dart
index a8998fe..ccb15b5 100644
--- a/pkg/analyzer/lib/dart/analysis/context_root.dart
+++ b/pkg/analyzer/lib/dart/analysis/context_root.dart
@@ -4,79 +4,58 @@
 
 import 'package:analyzer/file_system/file_system.dart';
 
-/**
- * Information about the root directory associated with an analysis context.
- *
- * Clients may not extend, implement or mix-in this class.
- */
+/// Information about the root directory associated with an analysis context.
+///
+/// Clients may not extend, implement or mix-in this class.
 abstract class ContextRoot {
-  /**
-   * A list of the files and directories within the root directory that should
-   * not be analyzed.
-   */
+  /// A list of the files and directories within the root directory that should
+  /// not be analyzed.
   List<Resource> get excluded;
 
-  /**
-   * A collection of the absolute, normalized paths of files and directories
-   * within the root directory that should not be analyzed.
-   */
+  /// A collection of the absolute, normalized paths of files and directories
+  /// within the root directory that should not be analyzed.
   Iterable<String> get excludedPaths;
 
-  /**
-   * A list of the files and directories within the root directory that should
-   * be analyzed. If all of the files in the root directory (other than those
-   * that are explicitly excluded) should be analyzed, then this list will
-   * contain the root directory.
-   */
+  /// A list of the files and directories within the root directory that should
+  /// be analyzed. If all of the files in the root directory (other than those
+  /// that are explicitly excluded) should be analyzed, then this list will
+  /// contain the root directory.
   List<Resource> get included;
 
-  /**
-   * A collection of the absolute, normalized paths of files within the root
-   * directory that should be analyzed. If all of the files in the root
-   * directory (other than those that are explicitly excluded) should be
-   * analyzed, then this collection will contain the path of the root directory.
-   */
+  /// A collection of the absolute, normalized paths of files within the root
+  /// directory that should be analyzed. If all of the files in the root
+  /// directory (other than those that are explicitly excluded) should be
+  /// analyzed, then this collection will contain the path of the root
+  /// directory.
   Iterable<String> get includedPaths;
 
-  /**
-   * The analysis options file that should be used when analyzing the files
-   * within this context root, or `null` if there is no options file.
-   */
+  /// The analysis options file that should be used when analyzing the files
+  /// within this context root, or `null` if there is no options file.
   File get optionsFile;
 
-  /**
-   * The packages file that should be used when analyzing the files within this
-   * context root, or `null` if there is no options file.
-   */
+  /// The packages file that should be used when analyzing the files within this
+  /// context root, or `null` if there is no options file.
   File get packagesFile;
 
-  /**
-   * The resource provider used to access the file system.
-   */
+  /// The resource provider used to access the file system.
   ResourceProvider get resourceProvider;
 
-  /**
-   * The root directory containing the files to be analyzed.
-   */
+  /// The root directory containing the files to be analyzed.
   Folder get root;
 
-  /**
-   * Return the absolute, normalized paths of all of the files that are
-   * contained in this context. These are all of the files that are included
-   * directly or indirectly by one or more of the [includedPaths] and that are
-   * not excluded by any of the [excludedPaths].
-   *
-   * Note that the list is not filtered based on the file suffix, so non-Dart
-   * files can be returned.
-   */
+  /// Return the absolute, normalized paths of all of the files that are
+  /// contained in this context. These are all of the files that are included
+  /// directly or indirectly by one or more of the [includedPaths] and that are
+  /// not excluded by any of the [excludedPaths].
+  ///
+  /// Note that the list is not filtered based on the file suffix, so non-Dart
+  /// files can be returned.
   Iterable<String> analyzedFiles();
 
-  /**
-   * Return `true` if the file or directory with the given [path] will be
-   * analyzed in this context. A file (or directory) will be analyzed if it is
-   * either the same as or contained in one of the [includedPaths] and, if it is
-   * contained in one of the [includedPaths], is not the same as or contained
-   * in one of the [excludedPaths].
-   */
+  /// Return `true` if the file or directory with the given [path] will be
+  /// analyzed in this context. A file (or directory) will be analyzed if it is
+  /// either the same as or contained in one of the [includedPaths] and, if it
+  /// is contained in one of the [includedPaths], is not the same as or
+  /// contained in one of the [excludedPaths].
   bool isAnalyzed(String path);
 }
diff --git a/pkg/analyzer/lib/dart/analysis/declared_variables.dart b/pkg/analyzer/lib/dart/analysis/declared_variables.dart
index a517582..bcd0d74 100644
--- a/pkg/analyzer/lib/dart/analysis/declared_variables.dart
+++ b/pkg/analyzer/lib/dart/analysis/declared_variables.dart
@@ -6,67 +6,49 @@
 import 'package:analyzer/src/dart/constant/value.dart';
 import 'package:analyzer/src/generated/resolver.dart' show TypeProvider;
 
-/**
- * An object used to provide access to the values of variables that have been
- * defined on the command line using the `-D` option.
- *
- * Clients may not extend, implement or mix-in this class.
- */
+/// An object used to provide access to the values of variables that have been
+/// defined on the command line using the `-D` option.
+///
+/// Clients may not extend, implement or mix-in this class.
 class DeclaredVariables {
-  /**
-   * A table mapping the names of declared variables to their values.
-   */
+  /// A table mapping the names of declared variables to their values.
   Map<String, String> _declaredVariables = <String, String>{};
 
-  /**
-   * Initialize a newly created set of declared variables in which there are no
-   * variables.
-   */
+  /// Initialize a newly created set of declared variables in which there are no
+  /// variables.
   DeclaredVariables();
 
-  /**
-   * Initialize a newly created set of declared variables to define variables
-   * whose names are the keys in the give [variableMap] and whose values are the
-   * corresponding values from the map.
-   */
+  /// Initialize a newly created set of declared variables to define variables
+  /// whose names are the keys in the give [variableMap] and whose values are
+  /// the corresponding values from the map.
   DeclaredVariables.fromMap(Map<String, String> variableMap) {
     _declaredVariables.addAll(variableMap);
   }
 
-  /**
-   * Return the names of the variables for which a value has been defined.
-   */
+  /// Return the names of the variables for which a value has been defined.
   Iterable<String> get variableNames => _declaredVariables.keys;
 
-  /**
-   * Add all variables of [other] to this object.
-   */
+  /// Add all variables of [other] to this object.
   @deprecated
   void addAll(DeclaredVariables other) {
     _declaredVariables.addAll(other._declaredVariables);
   }
 
-  /**
-   * Define a variable with the given [name] to have the given [value].
-   */
+  /// Define a variable with the given [name] to have the given [value].
   @deprecated
   void define(String name, String value) {
     _declaredVariables[name] = value;
   }
 
-  /**
-   * Return the raw string value of the variable with the given [name],
-   * or `null` of the variable is not defined.
-   */
+  /// Return the raw string value of the variable with the given [name],
+  /// or `null` of the variable is not defined.
   String get(String name) => _declaredVariables[name];
 
-  /**
-   * Return the value of the variable with the given [name] interpreted as a
-   * 'boolean' value. If the variable is not defined (or [name] is `null`), a
-   * DartObject representing "unknown" is returned. If the value cannot be
-   * parsed as a boolean, a DartObject representing 'null' is returned. The
-   * [typeProvider] is the type provider used to find the type 'bool'.
-   */
+  /// Return the value of the variable with the given [name] interpreted as a
+  /// 'boolean' value. If the variable is not defined (or [name] is `null`), a
+  /// DartObject representing "unknown" is returned. If the value cannot be
+  /// parsed as a boolean, a DartObject representing 'null' is returned. The
+  /// [typeProvider] is the type provider used to find the type 'bool'.
   DartObject getBool(TypeProvider typeProvider, String name) {
     String value = _declaredVariables[name];
     if (value == null) {
@@ -80,12 +62,10 @@
     return new DartObjectImpl(typeProvider.nullType, NullState.NULL_STATE);
   }
 
-  /**
-   * Return the value of the variable with the given [name] interpreted as an
-   * integer value. If the variable is not defined (or [name] is `null`), a
-   * DartObject representing "unknown" is returned. If the value cannot be
-   * parsed as an integer, a DartObject representing 'null' is returned.
-   */
+  /// Return the value of the variable with the given [name] interpreted as an
+  /// integer value. If the variable is not defined (or [name] is `null`), a
+  /// DartObject representing "unknown" is returned. If the value cannot be
+  /// parsed as an integer, a DartObject representing 'null' is returned.
   DartObject getInt(TypeProvider typeProvider, String name) {
     String value = _declaredVariables[name];
     if (value == null) {
@@ -100,14 +80,12 @@
     return new DartObjectImpl(typeProvider.intType, new IntState(bigInteger));
   }
 
-  /**
-   * Return the value of the variable with the given [name] interpreted as a
-   * String value, or `null` if the variable is not defined. Return the value of
-   * the variable with the given name interpreted as a String value. If the
-   * variable is not defined (or [name] is `null`), a DartObject representing
-   * "unknown" is returned. The [typeProvider] is the type provider used to find
-   * the type 'String'.
-   */
+  /// Return the value of the variable with the given [name] interpreted as a
+  /// String value, or `null` if the variable is not defined. Return the value
+  /// of the variable with the given name interpreted as a String value. If the
+  /// variable is not defined (or [name] is `null`), a DartObject representing
+  /// "unknown" is returned. The [typeProvider] is the type provider used to
+  /// find the type 'String'.
   DartObject getString(TypeProvider typeProvider, String name) {
     String value = _declaredVariables[name];
     if (value == null) {
diff --git a/pkg/analyzer/lib/dart/analysis/uri_converter.dart b/pkg/analyzer/lib/dart/analysis/uri_converter.dart
index ec1ed8d..a93d045 100644
--- a/pkg/analyzer/lib/dart/analysis/uri_converter.dart
+++ b/pkg/analyzer/lib/dart/analysis/uri_converter.dart
@@ -2,29 +2,25 @@
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
 
-/**
- * A utility class used to convert between URIs and absolute file paths.
- */
+/// A utility class used to convert between URIs and absolute file paths.
 abstract class UriConverter {
-  /**
-   * Return the URI that should be used to reference the file at the absolute
-   * [path], or `null` if there is no valid way to reference the file in this
-   * converter’s context. The file at that path is not required to exist.
-   *
-   * If a [containingPath] is provided and both the [path] and [containingPath]
-   * are within the root of this converter’s context, then the returned URI will
-   * be a relative path. Otherwise, the returned URI will be an absolute URI.
-   *
-   * Throws an `ArgumentError` if the [path] is `null` or is not a valid
-   * absolute file path.
-   */
+  /// Return the URI that should be used to reference the file at the absolute
+  /// [path], or `null` if there is no valid way to reference the file in this
+  /// converter’s context. The file at that path is not required to exist.
+  ///
+  /// If a [containingPath] is provided and both the [path] and [containingPath]
+  /// are within the root of this converter’s context, then the returned URI
+  /// will be a relative path. Otherwise, the returned URI will be an absolute
+  /// URI.
+  ///
+  /// Throws an `ArgumentError` if the [path] is `null` or is not a valid
+  /// absolute file path.
   Uri pathToUri(String path, {String containingPath});
 
-  /**
-   * Return the absolute path of the file to which the absolute [uri] resolves,
-   * or `null` if the [uri] cannot be resolved in this converter’s context.
-   *
-   * Throws an `ArgumentError` if the [uri] is `null` or is not an absolute URI.
-   */
+  /// Return the absolute path of the file to which the absolute [uri] resolves,
+  /// or `null` if the [uri] cannot be resolved in this converter’s context.
+  ///
+  /// Throws an `ArgumentError` if the [uri] is `null` or is not an absolute
+  /// URI.
   String uriToPath(Uri uri);
 }
diff --git a/pkg/analyzer/lib/dart/ast/ast.dart b/pkg/analyzer/lib/dart/ast/ast.dart
index b2ce8fa..3e5b2fa 100644
--- a/pkg/analyzer/lib/dart/ast/ast.dart
+++ b/pkg/analyzer/lib/dart/ast/ast.dart
@@ -507,9 +507,6 @@
 
   R visitForEachPartsWithIdentifier(ForEachPartsWithIdentifier node);
 
-  @Deprecated('Replaced by visitForStatement2')
-  R visitForEachStatement(ForEachStatement node);
-
   R visitForElement(ForElement node);
 
   R visitFormalParameterList(FormalParameterList node);
@@ -518,9 +515,9 @@
 
   R visitForPartsWithExpression(ForPartsWithExpression node);
 
-  @Deprecated('Replaced by visitForStatement2')
   R visitForStatement(ForStatement node);
 
+  @Deprecated('Replaced by visitForStatement')
   R visitForStatement2(ForStatement2 node);
 
   R visitFunctionDeclaration(FunctionDeclaration node);
@@ -571,15 +568,6 @@
 
   R visitListLiteral(ListLiteral node);
 
-  @Deprecated('Replaced by visitListLiteral')
-  R visitListLiteral2(ListLiteral2 node);
-
-  @Deprecated('Replaced by visitSetOrMapLiteral')
-  R visitMapLiteral(MapLiteral node);
-
-  @Deprecated('Replaced by visitSetOrMapLiteral')
-  R visitMapLiteral2(MapLiteral2 node);
-
   R visitMapLiteralEntry(MapLiteralEntry node);
 
   R visitMethodDeclaration(MethodDeclaration node);
@@ -621,12 +609,6 @@
 
   R visitScriptTag(ScriptTag node);
 
-  @Deprecated('Replaced by visitSetOrMapLiteral')
-  R visitSetLiteral(SetLiteral node);
-
-  @Deprecated('Replaced by visitSetOrMapLiteral')
-  R visitSetLiteral2(SetLiteral2 node);
-
   R visitSetOrMapLiteral(SetOrMapLiteral node);
 
   R visitShowCombinator(ShowCombinator node);
@@ -1983,14 +1965,13 @@
   /// integer value that defines how the source code is parsed into an AST. For
   /// example `a * b + c` is parsed as `(a * b) + c` because the precedence of
   /// `*` is greater than the precedence of `+`.
-  @Deprecated('In the next major release, type will change to `Precedence`.  '
-      'Switch to `precedence2` to prepare for this change.')
-  int get precedence;
+  Precedence get precedence;
 
   /// Return the precedence of this expression. The precedence is a positive
   /// integer value that defines how the source code is parsed into an AST. For
   /// example `a * b + c` is parsed as `(a * b) + c` because the precedence of
   /// `*` is greater than the precedence of `+`.
+  @Deprecated('Use precedence')
   Precedence get precedence2;
 
   /// If this expression is an argument to an invocation, and the AST structure
@@ -2239,63 +2220,6 @@
   SimpleIdentifier get identifier;
 }
 
-/// A for-each statement.
-///
-///    forEachStatement ::=
-///        'await'? 'for' '(' [DeclaredIdentifier] 'in' [Expression] ')' [Block]
-///      | 'await'? 'for' '(' [SimpleIdentifier] 'in' [Expression] ')' [Block]
-///
-/// This is the class that is used to represent a for-each loop when neither the
-/// 'control-flow-collections' nor 'spread-collections' experiments are enabled.
-/// If either of those experiments are enabled, then [ForStatement2] will be
-/// used.
-///
-/// Clients may not extend, implement or mix-in this class.
-@Deprecated('Replaced by ForStatement2')
-abstract class ForEachStatement implements ForStatement2 {
-  /// Set the token representing the 'await' keyword to the given [token].
-  void set awaitKeyword(Token token);
-
-  /// Set the body of the loop to the given [statement].
-  void set body(Statement statement);
-
-  /// Set the token representing the 'for' keyword to the given [token].
-  void set forKeyword(Token token);
-
-  /// Return the loop variable, or `null` if the loop variable is declared in
-  /// the 'for'.
-  SimpleIdentifier get identifier;
-
-  /// Set the loop variable to the given [identifier].
-  void set identifier(SimpleIdentifier identifier);
-
-  /// Return the token representing the 'in' keyword.
-  Token get inKeyword;
-
-  /// Set the token representing the 'in' keyword to the given [token].
-  void set inKeyword(Token token);
-
-  /// Return the expression evaluated to produce the iterator.
-  Expression get iterable;
-
-  /// Set the expression evaluated to produce the iterator to the given
-  /// [expression].
-  void set iterable(Expression expression);
-
-  /// Set the left parenthesis to the given [token].
-  void set leftParenthesis(Token token);
-
-  /// Return the declaration of the loop variable, or `null` if the loop
-  /// variable is a simple identifier.
-  DeclaredIdentifier get loopVariable;
-
-  /// Set the declaration of the loop variable to the given [variable].
-  void set loopVariable(DeclaredIdentifier variable);
-
-  /// Set the right parenthesis to the given [token].
-  void set rightParenthesis(Token token);
-}
-
 /// The basic structure of a for element.
 ///
 /// Clients may not extend, implement or mix-in this class.
@@ -2511,78 +2435,6 @@
   Expression get initialization;
 }
 
-/// A for statement.
-///
-///    forStatement ::=
-///        'for' '(' forLoopParts ')' [Statement]
-///
-///    forLoopParts ::=
-///        forInitializerStatement ';' [Expression]? ';' [Expression]?
-///
-///    forInitializerStatement ::=
-///        [DefaultFormalParameter]
-///      | [Expression]?
-///
-/// This is the class that is used to represent a for loop when neither the
-/// 'control-flow-collections' nor 'spread-collections' experiments are enabled.
-/// If either of those experiments are enabled, then [ForStatement2] will be
-/// used.
-///
-/// Clients may not extend, implement or mix-in this class.
-@Deprecated('Replaced by ForStatement2')
-abstract class ForStatement implements ForStatement2 {
-  /// Set the body of the loop to the given [statement].
-  void set body(Statement statement);
-
-  /// Return the condition used to determine when to terminate the loop, or
-  /// `null` if there is no condition.
-  Expression get condition;
-
-  /// Set the condition used to determine when to terminate the loop to the
-  /// given [expression].
-  void set condition(Expression expression);
-
-  /// Set the token representing the 'for' keyword to the given [token].
-  void set forKeyword(Token token);
-
-  /// Return the initialization expression, or `null` if there is no
-  /// initialization expression.
-  Expression get initialization;
-
-  /// Set the initialization expression to the given [expression].
-  void set initialization(Expression initialization);
-
-  /// Set the left parenthesis to the given [token].
-  void set leftParenthesis(Token token);
-
-  /// Return the semicolon separating the initializer and the condition.
-  Token get leftSeparator;
-
-  /// Set the semicolon separating the initializer and the condition to the
-  /// given [token].
-  void set leftSeparator(Token token);
-
-  /// Set the right parenthesis to the given [token].
-  void set rightParenthesis(Token token);
-
-  /// Return the semicolon separating the condition and the updater.
-  Token get rightSeparator;
-
-  /// Set the semicolon separating the condition and the updater to the given
-  /// [token].
-  void set rightSeparator(Token token);
-
-  /// Return the list of expressions run after each execution of the loop body.
-  NodeList<Expression> get updaters;
-
-  /// Return the declaration of the loop variables, or `null` if there are no
-  /// variables.
-  VariableDeclarationList get variables;
-
-  /// Set the declaration of the loop variables to the given [variableList].
-  void set variables(VariableDeclarationList variableList);
-}
-
 /// A for or for-each statement.
 ///
 ///    forStatement ::=
@@ -2600,7 +2452,7 @@
 /// `ForEachStatement` will be used.
 ///
 /// Clients may not extend, implement or mix-in this class.
-abstract class ForStatement2 implements Statement {
+abstract class ForStatement implements Statement {
   /// Return the token representing the 'await' keyword, or `null` if there is
   /// no 'await' keyword.
   Token get awaitKeyword;
@@ -2621,6 +2473,26 @@
   Token get rightParenthesis;
 }
 
+/// A for or for-each statement.
+///
+///    forStatement ::=
+///        'for' '(' forLoopParts ')' [Statement]
+///
+///    forLoopParts ::=
+///       [VariableDeclaration] ';' [Expression]? ';' expressionList?
+///     | [Expression]? ';' [Expression]? ';' expressionList?
+///     | [DeclaredIdentifier] 'in' [Expression]
+///     | [SimpleIdentifier] 'in' [Expression]
+///
+/// This is the class that is used to represent a for loop when either the
+/// 'control-flow-collections' or 'spread-collections' experiments are enabled.
+/// If neither of those experiments are enabled, then either `ForStatement` or
+/// `ForEachStatement` will be used.
+///
+/// Clients may not extend, implement or mix-in this class.
+@Deprecated('Replaced by ForStatement')
+abstract class ForStatement2 extends ForStatement {}
+
 /// A node representing the body of a function or method.
 ///
 ///    functionBody ::=
@@ -3695,11 +3567,11 @@
 ///
 /// Clients may not extend, implement or mix-in this class.
 abstract class ListLiteral implements TypedLiteral {
-  /// Return the expressions used to compute the elements of the list.
-  @Deprecated('Use elements2')
-  NodeList<Expression> get elements;
+  /// Return the syntactic elements used to compute the elements of the list.
+  NodeList<CollectionElement> get elements;
 
   /// Return the syntactic elements used to compute the elements of the list.
+  @Deprecated('Replaced by elements')
   NodeList<CollectionElement> get elements2;
 
   /// Return the left square bracket.
@@ -3715,38 +3587,6 @@
   void set rightBracket(Token token);
 }
 
-/// A list literal.
-///
-///    listLiteral ::=
-///        'const'? [TypeAnnotationList]? '[' elements? ']'
-///
-///    elements ::=
-///        [CollectionElement] (',' [CollectionElement])* ','?
-///
-/// This is the class that is used to represent a list literal when either the
-/// 'control-flow-collections' or 'spread-collections' experiments are enabled.
-/// If neither of those experiments are enabled, then [ListLiteral] will be
-/// used.
-///
-/// Clients may not extend, implement or mix-in this class.
-@Deprecated('Replaced by ListLiteral')
-abstract class ListLiteral2 implements TypedLiteral {
-  /// Return the expressions used to compute the elements of the list.
-  NodeList<CollectionElement> get elements;
-
-  /// Return the left square bracket.
-  Token get leftBracket;
-
-  /// Set the left square bracket to the given [token].
-  void set leftBracket(Token token);
-
-  /// Return the right square bracket.
-  Token get rightBracket;
-
-  /// Set the right square bracket to the given [token].
-  void set rightBracket(Token token);
-}
-
 /// A node that represents a literal expression.
 ///
 ///    literal ::=
@@ -3761,65 +3601,6 @@
 /// Clients may not extend, implement or mix-in this class.
 abstract class Literal implements Expression {}
 
-/// A literal map.
-///
-///    mapLiteral ::=
-///        'const'? ('<' [TypeAnnotation] (',' [TypeAnnotation])* '>')?
-///        '{' ([MapLiteralEntry] (',' [MapLiteralEntry])* ','?)? '}'
-///
-/// This is the class that is used to represent a map literal when neither the
-/// 'control-flow-collections' nor 'spread-collections' experiments are enabled.
-/// If either of those experiments are enabled, then [SetOrMapLiteral] will be
-/// used.
-///
-/// Clients may not extend, implement or mix-in this class.
-@Deprecated('Replaced by SetOrMapLiteral')
-abstract class MapLiteral implements SetOrMapLiteral {
-  /// Return the entries in the map.
-  NodeList<MapLiteralEntry> get entries;
-
-  /// Return the left curly bracket.
-  Token get leftBracket;
-
-  /// Set the left curly bracket to the given [token].
-  void set leftBracket(Token token);
-
-  /// Return the right curly bracket.
-  Token get rightBracket;
-
-  /// Set the right curly bracket to the given [token].
-  void set rightBracket(Token token);
-}
-
-/// A literal map.
-///
-///    mapLiteral ::=
-///        'const'? ('<' [TypeAnnotation] (',' [TypeAnnotation])* '>')?
-///        '{' ([MapElement] (',' [MapElement])* ','?)? '}'
-///
-/// This is the class that is used to represent a map literal when either the
-/// 'control-flow-collections' or 'spread-collections' experiments are enabled.
-/// If neither of those experiments are enabled, then [MapLiteral] will be used.
-///
-/// Clients may not extend, implement or mix-in this class.
-@Deprecated('Replaced by SetOrMapLiteral')
-abstract class MapLiteral2 implements TypedLiteral {
-  /// Return the entries in the map.
-  NodeList<CollectionElement> get entries;
-
-  /// Return the left curly bracket.
-  Token get leftBracket;
-
-  /// Set the left curly bracket to the given [token].
-  void set leftBracket(Token token);
-
-  /// Return the right curly bracket.
-  Token get rightBracket;
-
-  /// Set the right curly bracket to the given [token].
-  void set rightBracket(Token token);
-}
-
 /// A single key/value pair in a map literal.
 ///
 ///    mapLiteralEntry ::=
@@ -4645,67 +4426,6 @@
   void set scriptTag(Token token);
 }
 
-/// A literal set.
-///
-///    setLiteral ::=
-///        'const'? ('<' [TypeAnnotation] '>')?
-///        '{' [Expression] (',' [Expression])* ','? '}'
-///      | 'const'? ('<' [TypeAnnotation] '>')? '{' '}'
-///
-/// This is the class that is used to represent a set literal when neither the
-/// 'control-flow-collections' nor 'spread-collections' experiments are enabled.
-/// If either of those experiments are enabled, then [SetOrMapLiteral] will be
-/// used.
-///
-/// Clients may not extend, implement or mix-in this class.
-@Deprecated('Replaced by SetOrMapLiteral')
-abstract class SetLiteral implements SetOrMapLiteral {
-  /// Return the expressions used to compute the elements of the set.
-  NodeList<Expression> get elements;
-
-  /// Return the left curly bracket.
-  Token get leftBracket;
-
-  /// Set the left curly bracket to the given [token].
-  void set leftBracket(Token token);
-
-  /// Return the right curly bracket.
-  Token get rightBracket;
-
-  /// Set the right curly bracket to the given [token].
-  void set rightBracket(Token token);
-}
-
-/// A literal set.
-///
-///    setLiteral ::=
-///        'const'? ('<' [TypeAnnotation] '>')?
-///        '{' [CollectionElement] (',' [CollectionElement])* ','? '}'
-///      | 'const'? ('<' [TypeAnnotation] '>')? '{' '}'
-///
-/// This is the class that is used to represent a set literal when either the
-/// 'control-flow-collections' or 'spread-collections' experiments are enabled.
-/// If neither of those experiments are enabled, then [SetLiteral] will be used.
-///
-/// Clients may not extend, implement or mix-in this class.
-@Deprecated('Replaced by SetOrMapLiteral')
-abstract class SetLiteral2 implements TypedLiteral {
-  /// Return the expressions used to compute the elements of the set.
-  NodeList<CollectionElement> get elements;
-
-  /// Return the left curly bracket.
-  Token get leftBracket;
-
-  /// Set the left curly bracket to the given [token].
-  void set leftBracket(Token token);
-
-  /// Return the right curly bracket.
-  Token get rightBracket;
-
-  /// Set the right curly bracket to the given [token].
-  void set rightBracket(Token token);
-}
-
 /// A set or map literal.
 ///
 ///    setOrMapLiteral ::=
@@ -4724,6 +4444,11 @@
 abstract class SetOrMapLiteral implements TypedLiteral {
   /// Return the syntactic elements used to compute the elements of the set or
   /// map.
+  NodeList<CollectionElement> get elements;
+
+  /// Return the syntactic elements used to compute the elements of the set or
+  /// map.
+  @Deprecated('Replaced by elements')
   NodeList<CollectionElement> get elements2;
 
   /// Return `true` if this literal represents a map literal.
diff --git a/pkg/analyzer/lib/dart/ast/ast_factory.dart b/pkg/analyzer/lib/dart/ast/ast_factory.dart
index b057147..ab5ef3d 100644
--- a/pkg/analyzer/lib/dart/ast/ast_factory.dart
+++ b/pkg/analyzer/lib/dart/ast/ast_factory.dart
@@ -1,4 +1,4 @@
-// Copyright (c) 2016, the Dart project authors.  Please see the AUTHORS file
+// Copyright (c) 2016, the Dart project authors. Please see the AUTHORS file
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
 
@@ -7,45 +7,33 @@
 import 'package:front_end/src/scanner/token.dart';
 import 'package:meta/meta.dart';
 
-/**
- * A collection of factory methods which may be used to create concrete
- * instances of the interfaces that constitute the AST.
- *
- * Clients should not extend, implement or mix-in this class.
- */
+/// A collection of factory methods which may be used to create concrete
+/// instances of the interfaces that constitute the AST.
+///
+/// Clients should not extend, implement or mix-in this class.
 abstract class AstFactory {
-  /**
-   * Returns a newly created list of adjacent strings. To be syntactically
-   * valid, the list of [strings] must contain at least two elements.
-   */
+  /// Returns a newly created list of adjacent strings. To be syntactically
+  /// valid, the list of [strings] must contain at least two elements.
   AdjacentStrings adjacentStrings(List<StringLiteral> strings);
 
-  /**
-   * Returns a newly created annotation. Both the [period] and the
-   * [constructorName] can be `null` if the annotation is not referencing a
-   * named constructor. The [arguments] can be `null` if the annotation is not
-   * referencing a constructor.
-   */
+  /// Returns a newly created annotation. Both the [period] and the
+  /// [constructorName] can be `null` if the annotation is not referencing a
+  /// named constructor. The [arguments] can be `null` if the annotation is not
+  /// referencing a constructor.
   Annotation annotation(Token atSign, Identifier name, Token period,
       SimpleIdentifier constructorName, ArgumentList arguments);
 
-  /**
-   * Returns a newly created list of arguments. The list of [arguments] can
-   * be `null` if there are no arguments.
-   */
+  /// Returns a newly created list of arguments. The list of [arguments] can
+  /// be `null` if there are no arguments.
   ArgumentList argumentList(Token leftParenthesis, List<Expression> arguments,
       Token rightParenthesis);
 
-  /**
-   * Returns a newly created as expression.
-   */
+  /// Returns a newly created as expression.
   AsExpression asExpression(
       Expression expression, Token asOperator, TypeAnnotation type);
 
-  /**
-   * Returns a newly created assert initializer. The [comma] and [message]
-   * can be `null` if there is no message.
-   */
+  /// Returns a newly created assert initializer. The [comma] and [message]
+  /// can be `null` if there is no message.
   AssertInitializer assertInitializer(
       Token assertKeyword,
       Token leftParenthesis,
@@ -54,10 +42,8 @@
       Expression message,
       Token rightParenthesis);
 
-  /**
-   * Returns a newly created assert statement. The [comma] and [message] can
-   * be `null` if there is no message.
-   */
+  /// Returns a newly created assert statement. The [comma] and [message] can
+  /// be `null` if there is no message.
   AssertStatement assertStatement(
       Token assertKeyword,
       Token leftParenthesis,
@@ -67,67 +53,47 @@
       Token rightParenthesis,
       Token semicolon);
 
-  /**
-   * Returns a newly created assignment expression.
-   */
+  /// Returns a newly created assignment expression.
   AssignmentExpression assignmentExpression(
       Expression leftHandSide, Token operator, Expression rightHandSide);
 
-  /**
-   * Returns a newly created await expression.
-   */
+  /// Returns a newly created await expression.
   AwaitExpression awaitExpression(Token awaitKeyword, Expression expression);
 
-  /**
-   * Returns a newly created binary expression.
-   */
+  /// Returns a newly created binary expression.
   BinaryExpression binaryExpression(
       Expression leftOperand, Token operator, Expression rightOperand);
 
-  /**
-   * Returns a newly created block of code.
-   */
+  /// Returns a newly created block of code.
   Block block(
       Token leftBracket, List<Statement> statements, Token rightBracket);
 
-  /**
-   * Returns a block comment consisting of the given [tokens].
-   */
+  /// Returns a block comment consisting of the given [tokens].
   Comment blockComment(List<Token> tokens);
 
-  /**
-   * Returns a newly created function body consisting of a block of
-   * statements. The [keyword] can be `null` if there is no keyword specified
-   * for the block. The [star] can be `null` if there is no star following the
-   * keyword (and must be `null` if there is no keyword).
-   */
+  /// Returns a newly created function body consisting of a block of
+  /// statements. The [keyword] can be `null` if there is no keyword specified
+  /// for the block. The [star] can be `null` if there is no star following the
+  /// keyword (and must be `null` if there is no keyword).
   BlockFunctionBody blockFunctionBody(Token keyword, Token star, Block block);
 
-  /**
-   * Returns a newly created boolean literal.
-   */
+  /// Returns a newly created boolean literal.
   BooleanLiteral booleanLiteral(Token literal, bool value);
 
-  /**
-   * Returns a newly created break statement. The [label] can be `null` if
-   * there is no label associated with the statement.
-   */
+  /// Returns a newly created break statement. The [label] can be `null` if
+  /// there is no label associated with the statement.
   BreakStatement breakStatement(
       Token breakKeyword, SimpleIdentifier label, Token semicolon);
 
-  /**
-   * Returns a newly created cascade expression. The list of
-   * [cascadeSections] must contain at least one element.
-   */
+  /// Returns a newly created cascade expression. The list of
+  /// [cascadeSections] must contain at least one element.
   CascadeExpression cascadeExpression(
       Expression target, List<Expression> cascadeSections);
 
-  /**
-   * Returns a newly created catch clause. The [onKeyword] and
-   * [exceptionType] can be `null` if the clause will catch all exceptions. The
-   * [comma] and [stackTraceParameter] can be `null` if the stack trace
-   * parameter is not defined.
-   */
+  /// Returns a newly created catch clause. The [onKeyword] and [exceptionType]
+  /// can be `null` if the clause will catch all exceptions. The [comma] and
+  /// [stackTraceParameter] can be `null` if the stack trace parameter is not
+  /// defined.
   CatchClause catchClause(
       Token onKeyword,
       TypeAnnotation exceptionType,
@@ -139,16 +105,14 @@
       Token rightParenthesis,
       Block body);
 
-  /**
-   * Returns a newly created class declaration. Either or both of the
-   * [comment] and [metadata] can be `null` if the class does not have the
-   * corresponding attribute. The [abstractKeyword] can be `null` if the class
-   * is not abstract. The [typeParameters] can be `null` if the class does not
-   * have any type parameters. Any or all of the [extendsClause], [withClause],
-   * and [implementsClause] can be `null` if the class does not have the
-   * corresponding clause. The list of [members] can be `null` if the class does
-   * not have any members.
-   */
+  /// Returns a newly created class declaration. Either or both of the
+  /// [comment] and [metadata] can be `null` if the class does not have the
+  /// corresponding attribute. The [abstractKeyword] can be `null` if the class
+  /// is not abstract. The [typeParameters] can be `null` if the class does not
+  /// have any type parameters. Any or all of the [extendsClause], [withClause],
+  /// and [implementsClause] can be `null` if the class does not have the
+  /// corresponding clause. The list of [members] can be `null` if the class
+  /// does not have any members.
   ClassDeclaration classDeclaration(
       Comment comment,
       List<Annotation> metadata,
@@ -163,14 +127,12 @@
       List<ClassMember> members,
       Token rightBracket);
 
-  /**
-   * Returns a newly created class type alias. Either or both of the
-   * [comment] and [metadata] can be `null` if the class type alias does not
-   * have the corresponding attribute. The [typeParameters] can be `null` if the
-   * class does not have any type parameters. The [abstractKeyword] can be
-   * `null` if the class is not abstract. The [implementsClause] can be `null`
-   * if the class does not implement any interfaces.
-   */
+  /// Returns a newly created class type alias. Either or both of the [comment]
+  /// and [metadata] can be `null` if the class type alias does not have the
+  /// corresponding attribute. The [typeParameters] can be `null` if the class
+  /// does not have any type parameters. The [abstractKeyword] can be `null` if
+  /// the class is not abstract. The [implementsClause] can be `null` if the
+  /// class does not implement any interfaces.
   ClassTypeAlias classTypeAlias(
       Comment comment,
       List<Annotation> metadata,
@@ -184,19 +146,15 @@
       ImplementsClause implementsClause,
       Token semicolon);
 
-  /**
-   * Returns a newly created reference to a Dart element. The [newKeyword]
-   * can be `null` if the reference is not to a constructor.
-   */
+  /// Returns a newly created reference to a Dart element. The [newKeyword]
+  /// can be `null` if the reference is not to a constructor.
   CommentReference commentReference(Token newKeyword, Identifier identifier);
 
-  /**
-   * Returns a newly created compilation unit to have the given directives
-   * and declarations. The [scriptTag] can be `null` if there is no script tag
-   * in the compilation unit. The list of [directives] can be `null` if there
-   * are no directives in the compilation unit. The list of [declarations] can
-   * be `null` if there are no declarations in the compilation unit.
-   */
+  /// Returns a newly created compilation unit to have the given directives
+  /// and declarations. The [scriptTag] can be `null` if there is no script tag
+  /// in the compilation unit. The list of [directives] can be `null` if there
+  /// are no directives in the compilation unit. The list of [declarations] can
+  /// be `null` if there are no declarations in the compilation unit.
   CompilationUnit compilationUnit(
       Token beginToken,
       ScriptTag scriptTag,
@@ -204,9 +162,7 @@
       List<CompilationUnitMember> declarations,
       Token endToken);
 
-  /**
-   * Returns a newly created conditional expression.
-   */
+  /// Returns a newly created conditional expression.
   ConditionalExpression conditionalExpression(
       Expression condition,
       Token question,
@@ -214,9 +170,7 @@
       Token colon,
       Expression elseExpression);
 
-  /**
-   * Returns a newly created configuration.
-   */
+  /// Returns a newly created configuration.
   Configuration configuration(
       Token ifKeyword,
       Token leftParenthesis,
@@ -226,21 +180,19 @@
       Token rightParenthesis,
       StringLiteral libraryUri);
 
-  /**
-   * Returns a newly created constructor declaration. The [externalKeyword]
-   * can be `null` if the constructor is not external. Either or both of the
-   * [comment] and [metadata] can be `null` if the constructor does not have the
-   * corresponding attribute. The [constKeyword] can be `null` if the
-   * constructor cannot be used to create a constant. The [factoryKeyword] can
-   * be `null` if the constructor is not a factory. The [period] and [name] can
-   * both be `null` if the constructor is not a named constructor. The
-   * [separator] can be `null` if the constructor does not have any initializers
-   * and does not redirect to a different constructor. The list of
-   * [initializers] can be `null` if the constructor does not have any
-   * initializers. The [redirectedConstructor] can be `null` if the constructor
-   * does not redirect to a different constructor. The [body] can be `null` if
-   * the constructor does not have a body.
-   */
+  /// Returns a newly created constructor declaration. The [externalKeyword]
+  /// can be `null` if the constructor is not external. Either or both of the
+  /// [comment] and [metadata] can be `null` if the constructor does not have
+  /// the corresponding attribute. The [constKeyword] can be `null` if the
+  /// constructor cannot be used to create a constant. The [factoryKeyword] can
+  /// be `null` if the constructor is not a factory. The [period] and [name] can
+  /// both be `null` if the constructor is not a named constructor. The
+  /// [separator] can be `null` if the constructor does not have any
+  /// initializers and does not redirect to a different constructor. The list of
+  /// [initializers] can be `null` if the constructor does not have any
+  /// initializers. The [redirectedConstructor] can be `null` if the constructor
+  /// does not redirect to a different constructor. The [body] can be `null` if
+  /// the constructor does not have a body.
   ConstructorDeclaration constructorDeclaration(
       Comment comment,
       List<Annotation> metadata,
@@ -256,11 +208,9 @@
       ConstructorName redirectedConstructor,
       FunctionBody body);
 
-  /**
-   * Returns a newly created field initializer to initialize the field with
-   * the given name to the value of the given expression. The [thisKeyword] and
-   * [period] can be `null` if the 'this' keyword was not specified.
-   */
+  /// Returns a newly created field initializer to initialize the field with
+  /// the given name to the value of the given expression. The [thisKeyword] and
+  /// [period] can be `null` if the 'this' keyword was not specified.
   ConstructorFieldInitializer constructorFieldInitializer(
       Token thisKeyword,
       Token period,
@@ -268,26 +218,20 @@
       Token equals,
       Expression expression);
 
-  /**
-   * Returns a newly created constructor name. The [period] and [name] can be
-   * `null` if the constructor being named is the unnamed constructor.
-   */
+  /// Returns a newly created constructor name. The [period] and [name] can be
+  /// `null` if the constructor being named is the unnamed constructor.
   ConstructorName constructorName(
       TypeName type, Token period, SimpleIdentifier name);
 
-  /**
-   * Returns a newly created continue statement. The [label] can be `null` if
-   * there is no label associated with the statement.
-   */
+  /// Returns a newly created continue statement. The [label] can be `null` if
+  /// there is no label associated with the statement.
   ContinueStatement continueStatement(
       Token continueKeyword, SimpleIdentifier label, Token semicolon);
 
-  /**
-   * Returns a newly created formal parameter. Either or both of the
-   * [comment] and [metadata] can be `null` if the declaration does not have the
-   * corresponding attribute. The [keyword] can be `null` if a type name is
-   * given. The [type] must be `null` if the keyword is 'var'.
-   */
+  /// Returns a newly created formal parameter. Either or both of the
+  /// [comment] and [metadata] can be `null` if the declaration does not have
+  /// the corresponding attribute. The [keyword] can be `null` if a type name is
+  /// given. The [type] must be `null` if the keyword is 'var'.
   DeclaredIdentifier declaredIdentifier(
       Comment comment,
       List<Annotation> metadata,
@@ -295,23 +239,17 @@
       TypeAnnotation type,
       SimpleIdentifier identifier);
 
-  /**
-   * Returns a newly created default formal parameter. The [separator] and
-   * [defaultValue] can be `null` if there is no default value.
-   */
+  /// Returns a newly created default formal parameter. The [separator] and
+  /// [defaultValue] can be `null` if there is no default value.
   DefaultFormalParameter defaultFormalParameter(NormalFormalParameter parameter,
       ParameterKind kind, Token separator, Expression defaultValue);
 
-  /**
-   * Returns a documentation comment consisting of the given [tokens] and having
-   * the given [references] (if supplied) embedded within it.
-   */
+  /// Returns a documentation comment consisting of the given [tokens] and
+  /// having the given [references] (if supplied) embedded within it.
   Comment documentationComment(List<Token> tokens,
       [List<CommentReference> references]);
 
-  /**
-   * Returns a newly created do loop.
-   */
+  /// Returns a newly created do loop.
   DoStatement doStatement(
       Token doKeyword,
       Statement body,
@@ -321,46 +259,32 @@
       Token rightParenthesis,
       Token semicolon);
 
-  /**
-   * Returns a newly created dotted name.
-   */
+  /// Returns a newly created dotted name.
   DottedName dottedName(List<SimpleIdentifier> components);
 
-  /**
-   * Returns a newly created floating point literal.
-   */
+  /// Returns a newly created floating point literal.
   DoubleLiteral doubleLiteral(Token literal, double value);
 
-  /**
-   * Returns a newly created function body.
-   */
+  /// Returns a newly created function body.
   EmptyFunctionBody emptyFunctionBody(Token semicolon);
 
-  /**
-   * Returns a newly created empty statement.
-   */
+  /// Returns a newly created empty statement.
   EmptyStatement emptyStatement(Token semicolon);
 
-  /**
-   * Returns an end-of-line comment consisting of the given [tokens].
-   */
+  /// Returns an end-of-line comment consisting of the given [tokens].
   Comment endOfLineComment(List<Token> tokens);
 
-  /**
-   * Returns a newly created enum constant declaration. Either or both of the
-   * [comment] and [metadata] can be `null` if the constant does not have the
-   * corresponding attribute. (Technically, enum constants cannot have metadata,
-   * but we allow it for consistency.)
-   */
+  /// Returns a newly created enum constant declaration. Either or both of the
+  /// [comment] and [metadata] can be `null` if the constant does not have the
+  /// corresponding attribute. (Technically, enum constants cannot have
+  /// metadata, but we allow it for consistency.)
   EnumConstantDeclaration enumConstantDeclaration(
       Comment comment, List<Annotation> metadata, SimpleIdentifier name);
 
-  /**
-   * Returns a newly created enumeration declaration. Either or both of the
-   * [comment] and [metadata] can be `null` if the declaration does not have the
-   * corresponding attribute. The list of [constants] must contain at least one
-   * value.
-   */
+  /// Returns a newly created enumeration declaration. Either or both of the
+  /// [comment] and [metadata] can be `null` if the declaration does not have
+  /// the corresponding attribute. The list of [constants] must contain at least
+  /// one value.
   EnumDeclaration enumDeclaration(
       Comment comment,
       List<Annotation> metadata,
@@ -370,12 +294,10 @@
       List<EnumConstantDeclaration> constants,
       Token rightBracket);
 
-  /**
-   * Returns a newly created export directive. Either or both of the
-   * [comment] and [metadata] can be `null` if the directive does not have the
-   * corresponding attribute. The list of [combinators] can be `null` if there
-   * are no combinators.
-   */
+  /// Returns a newly created export directive. Either or both of the
+  /// [comment] and [metadata] can be `null` if the directive does not have the
+  /// corresponding attribute. The list of [combinators] can be `null` if there
+  /// are no combinators.
   ExportDirective exportDirective(
       Comment comment,
       List<Annotation> metadata,
@@ -385,43 +307,33 @@
       List<Combinator> combinators,
       Token semicolon);
 
-  /**
-   * Returns a newly created function body consisting of a block of
-   * statements. The [keyword] can be `null` if the function body is not an
-   * async function body.
-   */
+  /// Returns a newly created function body consisting of a block of statements.
+  /// The [keyword] can be `null` if the function body is not an async function
+  /// body.
   ExpressionFunctionBody expressionFunctionBody(Token keyword,
       Token functionDefinition, Expression expression, Token semicolon);
 
-  /**
-   * Returns a newly created expression statement.
-   */
+  /// Returns a newly created expression statement.
   ExpressionStatement expressionStatement(
       Expression expression, Token semicolon);
 
-  /**
-   * Returns a newly created extends clause.
-   */
+  /// Returns a newly created extends clause.
   ExtendsClause extendsClause(Token extendsKeyword, TypeName superclass);
 
-  /**
-   * Returns a newly created field declaration. Either or both of the
-   * [comment] and [metadata] can be `null` if the declaration does not have the
-   * corresponding attribute. The [staticKeyword] can be `null` if the field is
-   * not a static field.
-   *
-   * Use [fieldDeclaration2] instead.
-   */
+  /// Returns a newly created field declaration. Either or both of the [comment]
+  /// and [metadata] can be `null` if the declaration does not have the
+  /// corresponding attribute. The [staticKeyword] can be `null` if the field is
+  /// not a static field.
+  ///
+  /// Use [fieldDeclaration2] instead.
   @deprecated
   FieldDeclaration fieldDeclaration(Comment comment, List<Annotation> metadata,
       Token staticKeyword, VariableDeclarationList fieldList, Token semicolon);
 
-  /**
-   * Returns a newly created field declaration. Either or both of the
-   * [comment] and [metadata] can be `null` if the declaration does not have the
-   * corresponding attribute. The [staticKeyword] can be `null` if the field is
-   * not a static field.
-   */
+  /// Returns a newly created field declaration. Either or both of the
+  /// [comment] and [metadata] can be `null` if the declaration does not have
+  /// the corresponding attribute. The [staticKeyword] can be `null` if the
+  /// field is not a static field.
   FieldDeclaration fieldDeclaration2(
       {Comment comment,
       List<Annotation> metadata,
@@ -430,17 +342,15 @@
       @required VariableDeclarationList fieldList,
       @required Token semicolon});
 
-  /**
-   * Returns a newly created formal parameter. Either or both of the
-   * [comment] and [metadata] can be `null` if the parameter does not have the
-   * corresponding attribute. The [keyword] can be `null` if there is a type.
-   * The [type] must be `null` if the keyword is 'var'. The [thisKeyword] and
-   * [period] can be `null` if the keyword 'this' was not provided.  The
-   * [parameters] can be `null` if this is not a function-typed field formal
-   * parameter.
-   *
-   * Use [fieldFormalParameter2] instead.
-   */
+  /// Returns a newly created formal parameter. Either or both of the [comment]
+  /// and [metadata] can be `null` if the parameter does not have the
+  /// corresponding attribute. The [keyword] can be `null` if there is a type.
+  /// The [type] must be `null` if the keyword is 'var'. The [thisKeyword] and
+  /// [period] can be `null` if the keyword 'this' was not provided.  The
+  /// [parameters] can be `null` if this is not a function-typed field formal
+  /// parameter.
+  ///
+  /// Use [fieldFormalParameter2] instead.
   @deprecated
   FieldFormalParameter fieldFormalParameter(
       Comment comment,
@@ -453,15 +363,13 @@
       TypeParameterList typeParameters,
       FormalParameterList parameters);
 
-  /**
-   * Returns a newly created formal parameter. Either or both of the
-   * [comment] and [metadata] can be `null` if the parameter does not have the
-   * corresponding attribute. The [keyword] can be `null` if there is a type.
-   * The [type] must be `null` if the keyword is 'var'. The [thisKeyword] and
-   * [period] can be `null` if the keyword 'this' was not provided.  The
-   * [parameters] can be `null` if this is not a function-typed field formal
-   * parameter.
-   */
+  /// Returns a newly created formal parameter. Either or both of the [comment]
+  /// and [metadata] can be `null` if the parameter does not have the
+  /// corresponding attribute. The [keyword] can be `null` if there is a type.
+  /// The [type] must be `null` if the keyword is 'var'. The [thisKeyword] and
+  /// [period] can be `null` if the keyword 'this' was not provided.  The
+  /// [parameters] can be `null` if this is not a function-typed field formal
+  /// parameter.
   FieldFormalParameter fieldFormalParameter2(
       {Comment comment,
       List<Annotation> metadata,
@@ -474,23 +382,17 @@
       TypeParameterList typeParameters,
       FormalParameterList parameters});
 
-  /**
-   * Returns a newly created for each part that includes a declaration.
-   */
+  /// Returns a newly created for each part that includes a declaration.
   ForEachPartsWithDeclaration forEachPartsWithDeclaration(
       {DeclaredIdentifier loopVariable, Token inKeyword, Expression iterable});
 
-  /**
-   * Returns a newly created for each part that includes an identifier that is
-   * declared outside of the loop.
-   */
+  /// Returns a newly created for each part that includes an identifier that is
+  /// declared outside of the loop.
   ForEachPartsWithIdentifier forEachPartsWithIdentifier(
       {SimpleIdentifier identifier, Token inKeyword, Expression iterable});
 
-  /**
-   * Returns a newly created for element that can be part of a list, map or set
-   * literal.
-   */
+  /// Returns a newly created for element that can be part of a list, map or set
+  /// literal.
   ForElement forElement(
       {Token awaitKeyword,
       Token forKeyword,
@@ -499,11 +401,9 @@
       Token rightParenthesis,
       CollectionElement body});
 
-  /**
-   * Returns a newly created parameter list. The list of [parameters] can be
-   * `null` if there are no parameters. The [leftDelimiter] and [rightDelimiter]
-   * can be `null` if there are no optional parameters.
-   */
+  /// Returns a newly created parameter list. The list of [parameters] can be
+  /// `null` if there are no parameters. The [leftDelimiter] and
+  /// [rightDelimiter] can be `null` if there are no optional parameters.
   FormalParameterList formalParameterList(
       Token leftParenthesis,
       List<FormalParameter> parameters,
@@ -511,9 +411,7 @@
       Token rightDelimiter,
       Token rightParenthesis);
 
-  /**
-   * Returns a newly created for part that includes a declaration.
-   */
+  /// Returns a newly created for part that includes a declaration.
   ForPartsWithDeclarations forPartsWithDeclarations(
       {VariableDeclarationList variables,
       Token leftSeparator,
@@ -521,9 +419,7 @@
       Token rightSeparator,
       List<Expression> updaters});
 
-  /**
-   * Returns a newly created for part that includes an expression.
-   */
+  /// Returns a newly created for part that includes an expression.
   ForPartsWithExpression forPartsWithExpression(
       {Expression initialization,
       Token leftSeparator,
@@ -531,10 +427,8 @@
       Token rightSeparator,
       List<Expression> updaters});
 
-  /**
-   * Returns a newly created for statement.
-   */
-  ForStatement2 forStatement2(
+  /// Returns a newly created for statement.
+  ForStatement forStatement(
       {Token awaitKeyword,
       Token forKeyword,
       Token leftParenthesis,
@@ -542,14 +436,22 @@
       Token rightParenthesis,
       Statement body});
 
-  /**
-   * Returns a newly created function declaration. Either or both of the
-   * [comment] and [metadata] can be `null` if the function does not have the
-   * corresponding attribute. The [externalKeyword] can be `null` if the
-   * function is not an external function. The [returnType] can be `null` if no
-   * return type was specified. The [propertyKeyword] can be `null` if the
-   * function is neither a getter or a setter.
-   */
+  /// Returns a newly created for statement.
+  @Deprecated('Replaced by forStatement')
+  ForStatement forStatement2(
+      {Token awaitKeyword,
+      Token forKeyword,
+      Token leftParenthesis,
+      ForLoopParts forLoopParts,
+      Token rightParenthesis,
+      Statement body});
+
+  /// Returns a newly created function declaration. Either or both of the
+  /// [comment] and [metadata] can be `null` if the function does not have the
+  /// corresponding attribute. The [externalKeyword] can be `null` if the
+  /// function is not an external function. The [returnType] can be `null` if no
+  /// return type was specified. The [propertyKeyword] can be `null` if the
+  /// function is neither a getter or a setter.
   FunctionDeclaration functionDeclaration(
       Comment comment,
       List<Annotation> metadata,
@@ -559,31 +461,23 @@
       SimpleIdentifier name,
       FunctionExpression functionExpression);
 
-  /**
-   * Returns a newly created function declaration statement.
-   */
+  /// Returns a newly created function declaration statement.
   FunctionDeclarationStatement functionDeclarationStatement(
       FunctionDeclaration functionDeclaration);
 
-  /**
-   * Returns a newly created function declaration.
-   */
+  /// Returns a newly created function declaration.
   FunctionExpression functionExpression(TypeParameterList typeParameters,
       FormalParameterList parameters, FunctionBody body);
 
-  /**
-   * Returns a newly created function expression invocation.
-   */
+  /// Returns a newly created function expression invocation.
   FunctionExpressionInvocation functionExpressionInvocation(Expression function,
       TypeArgumentList typeArguments, ArgumentList argumentList);
 
-  /**
-   * Returns a newly created function type alias. Either or both of the
-   * [comment] and [metadata] can be `null` if the function does not have the
-   * corresponding attribute. The [returnType] can be `null` if no return type
-   * was specified. The [typeParameters] can be `null` if the function has no
-   * type parameters.
-   */
+  /// Returns a newly created function type alias. Either or both of the
+  /// [comment] and [metadata] can be `null` if the function does not have the
+  /// corresponding attribute. The [returnType] can be `null` if no return type
+  /// was specified. The [typeParameters] can be `null` if the function has no
+  /// type parameters.
   FunctionTypeAlias functionTypeAlias(
       Comment comment,
       List<Annotation> metadata,
@@ -594,14 +488,12 @@
       FormalParameterList parameters,
       Token semicolon);
 
-  /**
-   * Returns a newly created formal parameter. Either or both of the
-   * [comment] and [metadata] can be `null` if the parameter does not have the
-   * corresponding attribute. The [returnType] can be `null` if no return type
-   * was specified.
-   *
-   * Use [functionTypedFormalParameter2] instead.
-   */
+  /// Returns a newly created formal parameter. Either or both of the
+  /// [comment] and [metadata] can be `null` if the parameter does not have the
+  /// corresponding attribute. The [returnType] can be `null` if no return type
+  /// was specified.
+  ///
+  /// Use [functionTypedFormalParameter2] instead.
   @deprecated
   FunctionTypedFormalParameter functionTypedFormalParameter(
       Comment comment,
@@ -611,12 +503,10 @@
       TypeParameterList typeParameters,
       FormalParameterList parameters);
 
-  /**
-   * Returns a newly created formal parameter. Either or both of the
-   * [comment] and [metadata] can be `null` if the parameter does not have the
-   * corresponding attribute. The [returnType] can be `null` if no return type
-   * was specified.
-   */
+  /// Returns a newly created formal parameter. Either or both of the
+  /// [comment] and [metadata] can be `null` if the parameter does not have the
+  /// corresponding attribute. The [returnType] can be `null` if no return type
+  /// was specified.
   FunctionTypedFormalParameter functionTypedFormalParameter2(
       {Comment comment,
       List<Annotation> metadata,
@@ -626,9 +516,7 @@
       TypeParameterList typeParameters,
       @required FormalParameterList parameters});
 
-  /**
-   * Initialize a newly created generic function type.
-   */
+  /// Initialize a newly created generic function type.
   GenericFunctionType genericFunctionType(
       TypeAnnotation returnType,
       Token functionKeyword,
@@ -636,12 +524,10 @@
       FormalParameterList parameters,
       {Token question});
 
-  /**
-   * Returns a newly created generic type alias. Either or both of the
-   * [comment] and [metadata] can be `null` if the variable list does not have
-   * the corresponding attribute. The [typeParameters] can be `null` if there
-   * are no type parameters.
-   */
+  /// Returns a newly created generic type alias. Either or both of the
+  /// [comment] and [metadata] can be `null` if the variable list does not have
+  /// the corresponding attribute. The [typeParameters] can be `null` if there
+  /// are no type parameters.
   GenericTypeAlias genericTypeAlias(
       Comment comment,
       List<Annotation> metadata,
@@ -652,16 +538,12 @@
       GenericFunctionType functionType,
       Token semicolon);
 
-  /**
-   * Returns a newly created import show combinator.
-   */
+  /// Returns a newly created import show combinator.
   HideCombinator hideCombinator(
       Token keyword, List<SimpleIdentifier> hiddenNames);
 
-  /**
-   * Returns a newly created if element that can be part of a list, map or set
-   * literal.
-   */
+  /// Returns a newly created if element that can be part of a list, map or set
+  /// literal.
   IfElement ifElement(
       {Token ifKeyword,
       Token leftParenthesis,
@@ -671,10 +553,8 @@
       Token elseKeyword,
       CollectionElement elseElement});
 
-  /**
-   * Returns a newly created if statement. The [elseKeyword] and
-   * [elseStatement] can be `null` if there is no else clause.
-   */
+  /// Returns a newly created if statement. The [elseKeyword] and
+  /// [elseStatement] can be `null` if there is no else clause.
   IfStatement ifStatement(
       Token ifKeyword,
       Token leftParenthesis,
@@ -684,20 +564,16 @@
       Token elseKeyword,
       Statement elseStatement);
 
-  /**
-   * Returns a newly created implements clause.
-   */
+  /// Returns a newly created implements clause.
   ImplementsClause implementsClause(
       Token implementsKeyword, List<TypeName> interfaces);
 
-  /**
-   * Returns a newly created import directive. Either or both of the
-   * [comment] and [metadata] can be `null` if the function does not have the
-   * corresponding attribute. The [deferredKeyword] can be `null` if the import
-   * is not deferred. The [asKeyword] and [prefix] can be `null` if the import
-   * does not specify a prefix. The list of [combinators] can be `null` if there
-   * are no combinators.
-   */
+  /// Returns a newly created import directive. Either or both of the
+  /// [comment] and [metadata] can be `null` if the function does not have the
+  /// corresponding attribute. The [deferredKeyword] can be `null` if the import
+  /// is not deferred. The [asKeyword] and [prefix] can be `null` if the import
+  /// does not specify a prefix. The list of [combinators] can be `null` if
+  /// there are no combinators.
   ImportDirective importDirective(
       Comment comment,
       List<Annotation> metadata,
@@ -710,129 +586,70 @@
       List<Combinator> combinators,
       Token semicolon);
 
-  /**
-   * Returns a newly created index expression.
-   */
+  /// Returns a newly created index expression.
   IndexExpression indexExpressionForCascade(
       Token period, Token leftBracket, Expression index, Token rightBracket);
 
-  /**
-   * Returns a newly created index expression.
-   */
+  /// Returns a newly created index expression.
   IndexExpression indexExpressionForTarget(Expression target, Token leftBracket,
       Expression index, Token rightBracket);
 
-  /**
-   * Returns a newly created instance creation expression.
-   */
+  /// Returns a newly created instance creation expression.
   InstanceCreationExpression instanceCreationExpression(
       Token keyword, ConstructorName constructorName, ArgumentList argumentList,
       {TypeArgumentList typeArguments});
 
-  /**
-   * Returns a newly created integer literal.
-   */
+  /// Returns a newly created integer literal.
   IntegerLiteral integerLiteral(Token literal, int value);
 
-  /**
-   * Returns a newly created interpolation expression.
-   */
+  /// Returns a newly created interpolation expression.
   InterpolationExpression interpolationExpression(
       Token leftBracket, Expression expression, Token rightBracket);
 
-  /**
-   * Returns a newly created string of characters that are part of a string
-   * interpolation.
-   */
+  /// Returns a newly created string of characters that are part of a string
+  /// interpolation.
   InterpolationString interpolationString(Token contents, String value);
 
-  /**
-   * Returns a newly created is expression. The [notOperator] can be `null`
-   * if the sense of the test is not negated.
-   */
+  /// Returns a newly created is expression. The [notOperator] can be `null`
+  /// if the sense of the test is not negated.
   IsExpression isExpression(Expression expression, Token isOperator,
       Token notOperator, TypeAnnotation type);
 
-  /**
-   * Returns a newly created label.
-   */
+  /// Returns a newly created label.
   Label label(SimpleIdentifier label, Token colon);
 
-  /**
-   * Returns a newly created labeled statement.
-   */
+  /// Returns a newly created labeled statement.
   LabeledStatement labeledStatement(List<Label> labels, Statement statement);
 
-  /**
-   * Returns a newly created library directive. Either or both of the
-   * [comment] and [metadata] can be `null` if the directive does not have the
-   * corresponding attribute.
-   */
+  /// Returns a newly created library directive. Either or both of the
+  /// [comment] and [metadata] can be `null` if the directive does not have the
+  /// corresponding attribute.
   LibraryDirective libraryDirective(Comment comment, List<Annotation> metadata,
       Token libraryKeyword, LibraryIdentifier name, Token semicolon);
 
-  /**
-   * Returns a newly created prefixed identifier.
-   */
+  /// Returns a newly created prefixed identifier.
   LibraryIdentifier libraryIdentifier(List<SimpleIdentifier> components);
 
-  /**
-   * Returns a newly created list literal. The [constKeyword] can be `null`
-   * if the literal is not a constant. The [typeArguments] can be `null` if no
-   * type arguments were declared. The list of [elements] can be `null` if the
-   * list is empty.
-   */
+  /// Returns a newly created list literal. The [constKeyword] can be `null`
+  /// if the literal is not a constant. The [typeArguments] can be `null` if no
+  /// type arguments were declared. The list of [elements] can be `null` if the
+  /// list is empty.
   ListLiteral listLiteral(Token constKeyword, TypeArgumentList typeArguments,
       Token leftBracket, List<CollectionElement> elements, Token rightBracket);
 
-  /**
-   * Returns a newly created list literal.
-   */
-  @Deprecated('Use listLiteral')
-  ListLiteral2 listLiteral2(
-      {Token constKeyword,
-      TypeArgumentList typeArguments,
-      Token leftBracket,
-      List<CollectionElement> elements,
-      Token rightBracket});
-
-  /**
-   * Returns a newly created map literal. The [constKeyword] can be `null` if
-   * the literal is not a constant. The [typeArguments] can be `null` if no type
-   * arguments were declared. The [entries] can be `null` if the map is empty.
-   */
-  @Deprecated('Use setOrMapLiteral')
-  MapLiteral mapLiteral(Token constKeyword, TypeArgumentList typeArguments,
-      Token leftBracket, List<MapLiteralEntry> entries, Token rightBracket);
-
-  /**
-   * Returns a newly created map literal.
-   */
-  @Deprecated('Use setOrMapLiteral')
-  MapLiteral2 mapLiteral2(
-      {Token constKeyword,
-      TypeArgumentList typeArguments,
-      Token leftBracket,
-      List<CollectionElement> entries,
-      Token rightBracket});
-
-  /**
-   * Returns a newly created map literal entry.
-   */
+  /// Returns a newly created map literal entry.
   MapLiteralEntry mapLiteralEntry(
       Expression key, Token separator, Expression value);
 
-  /**
-   * Returns a newly created method declaration. Either or both of the
-   * [comment] and [metadata] can be `null` if the declaration does not have the
-   * corresponding attribute. The [externalKeyword] can be `null` if the method
-   * is not external. The [modifierKeyword] can be `null` if the method is
-   * neither abstract nor static. The [returnType] can be `null` if no return
-   * type was specified. The [propertyKeyword] can be `null` if the method is
-   * neither a getter or a setter. The [operatorKeyword] can be `null` if the
-   * method does not implement an operator. The [parameters] must be `null` if
-   * this method declares a getter.
-   */
+  /// Returns a newly created method declaration. Either or both of the
+  /// [comment] and [metadata] can be `null` if the declaration does not have
+  /// the corresponding attribute. The [externalKeyword] can be `null` if the
+  /// method is not external. The [modifierKeyword] can be `null` if the method
+  /// is neither abstract nor static. The [returnType] can be `null` if no
+  /// return type was specified. The [propertyKeyword] can be `null` if the
+  /// method is neither a getter or a setter. The [operatorKeyword] can be
+  /// `null` if the method does not implement an operator. The [parameters] must
+  /// be `null` if this method declares a getter.
   MethodDeclaration methodDeclaration(
       Comment comment,
       List<Annotation> metadata,
@@ -846,10 +663,8 @@
       FormalParameterList parameters,
       FunctionBody body);
 
-  /**
-   * Returns a newly created method invocation. The [target] and [operator]
-   * can be `null` if there is no target.
-   */
+  /// Returns a newly created method invocation. The [target] and [operator]
+  /// can be `null` if there is no target.
   MethodInvocation methodInvocation(
       Expression target,
       Token operator,
@@ -857,9 +672,7 @@
       TypeArgumentList typeArguments,
       ArgumentList argumentList);
 
-  /**
-   * Return a newly created mixin declaration.
-   */
+  /// Return a newly created mixin declaration.
   MixinDeclaration mixinDeclaration(
       Comment comment,
       List<Annotation> metadata,
@@ -872,59 +685,41 @@
       List<ClassMember> members,
       Token rightBracket);
 
-  /**
-   * Returns a newly created named expression..
-   */
+  /// Returns a newly created named expression.
   NamedExpression namedExpression(Label name, Expression expression);
 
-  /**
-   * Returns a newly created native clause.
-   */
+  /// Returns a newly created native clause.
   NativeClause nativeClause(Token nativeKeyword, StringLiteral name);
 
-  /**
-   * Returns a newly created function body consisting of the 'native' token,
-   * a string literal, and a semicolon.
-   */
+  /// Returns a newly created function body consisting of the 'native' token,
+  /// a string literal, and a semicolon.
   NativeFunctionBody nativeFunctionBody(
       Token nativeKeyword, StringLiteral stringLiteral, Token semicolon);
 
-  /**
-   * Returns a newly created list of nodes such that all of the nodes that
-   * are added to the list will have their parent set to the given [owner]. The
-   * list will initially be populated with the given [elements].
-   */
+  /// Returns a newly created list of nodes such that all of the nodes that
+  /// are added to the list will have their parent set to the given [owner]. The
+  /// list will initially be populated with the given [elements].
   NodeList<E> nodeList<E extends AstNode>(AstNode owner, [List<E> elements]);
 
-  /**
-   * Returns a newly created null literal.
-   */
+  /// Returns a newly created null literal.
   NullLiteral nullLiteral(Token literal);
 
-  /**
-   * Return a newly created on clause.
-   */
+  /// Return a newly created on clause.
   OnClause onClause(Token onKeyword, List<TypeName> superclassConstraints);
 
-  /**
-   * Returns a newly created parenthesized expression.
-   */
+  /// Returns a newly created parenthesized expression.
   ParenthesizedExpression parenthesizedExpression(
       Token leftParenthesis, Expression expression, Token rightParenthesis);
 
-  /**
-   * Returns a newly created part directive. Either or both of the [comment]
-   * and [metadata] can be `null` if the directive does not have the
-   * corresponding attribute.
-   */
+  /// Returns a newly created part directive. Either or both of the [comment]
+  /// and [metadata] can be `null` if the directive does not have the
+  /// corresponding attribute.
   PartDirective partDirective(Comment comment, List<Annotation> metadata,
       Token partKeyword, StringLiteral partUri, Token semicolon);
 
-  /**
-   * Returns a newly created part-of directive. Either or both of the
-   * [comment] and [metadata] can be `null` if the directive does not have the
-   * corresponding attribute.
-   */
+  /// Returns a newly created part-of directive. Either or both of the
+  /// [comment] and [metadata] can be `null` if the directive does not have the
+  /// corresponding attribute.
   PartOfDirective partOfDirective(
       Comment comment,
       List<Annotation> metadata,
@@ -934,83 +729,44 @@
       LibraryIdentifier libraryName,
       Token semicolon);
 
-  /**
-   * Returns a newly created postfix expression.
-   */
+  /// Returns a newly created postfix expression.
   PostfixExpression postfixExpression(Expression operand, Token operator);
 
-  /**
-   * Returns a newly created prefixed identifier.
-   */
+  /// Returns a newly created prefixed identifier.
   PrefixedIdentifier prefixedIdentifier(
       SimpleIdentifier prefix, Token period, SimpleIdentifier identifier);
 
-  /**
-   * Returns a newly created prefix expression.
-   */
+  /// Returns a newly created prefix expression.
   PrefixExpression prefixExpression(Token operator, Expression operand);
 
-  /**
-   * Returns a newly created property access expression.
-   */
+  /// Returns a newly created property access expression.
   PropertyAccess propertyAccess(
       Expression target, Token operator, SimpleIdentifier propertyName);
 
-  /**
-   * Returns a newly created redirecting invocation to invoke the constructor
-   * with the given name with the given arguments. The [constructorName] can be
-   * `null` if the constructor being invoked is the unnamed constructor.
-   */
+  /// Returns a newly created redirecting invocation to invoke the constructor
+  /// with the given name with the given arguments. The [constructorName] can be
+  /// `null` if the constructor being invoked is the unnamed constructor.
   RedirectingConstructorInvocation redirectingConstructorInvocation(
       Token thisKeyword,
       Token period,
       SimpleIdentifier constructorName,
       ArgumentList argumentList);
 
-  /**
-   * Returns a newly created rethrow expression.
-   */
+  /// Returns a newly created rethrow expression.
   RethrowExpression rethrowExpression(Token rethrowKeyword);
 
-  /**
-   * Returns a newly created return statement. The [expression] can be `null`
-   * if no explicit value was provided.
-   */
+  /// Returns a newly created return statement. The [expression] can be `null`
+  /// if no explicit value was provided.
   ReturnStatement returnStatement(
       Token returnKeyword, Expression expression, Token semicolon);
 
-  /**
-   * Returns a newly created script tag.
-   */
+  /// Returns a newly created script tag.
   ScriptTag scriptTag(Token scriptTag);
 
-  /**
-   * Returns a newly created set literal. The [constKeyword] can be `null`
-   * if the literal is not a constant. The [typeArguments] can be `null` if no
-   * type arguments were declared. The list of [elements] can be `null` if the
-   * set is empty.
-   */
-  @Deprecated('Use setOrMapLiteral')
-  SetLiteral setLiteral(Token constKeyword, TypeArgumentList typeArguments,
-      Token leftBracket, List<Expression> elements, Token rightBracket);
-
-  /**
-   * Returns a newly created set literal.
-   */
-  @Deprecated('Use setOrMapLiteral')
-  SetLiteral2 setLiteral2(
-      {Token constKeyword,
-      TypeArgumentList typeArguments,
-      Token leftBracket,
-      List<CollectionElement> elements,
-      Token rightBracket});
-
-  /**
-   * Returns a newly created set or map literal. The [constKeyword] can be
-   * `null` if the literal is not a constant. The [typeArguments] can be `null`
-   * if no type arguments were declared. The list of [elements] can be `null` if
-   * the set or map is empty.
-   */
+  /// Returns a newly created set or map literal. The [constKeyword] can be
+  /// `null` if the literal is not a constant. The [typeArguments] can be `null`
+  /// if no type arguments were declared. The list of [elements] can be `null`
+  /// if the set or map is empty.
   SetOrMapLiteral setOrMapLiteral(
       {Token constKeyword,
       TypeArgumentList typeArguments,
@@ -1018,20 +774,16 @@
       List<CollectionElement> elements,
       Token rightBracket});
 
-  /**
-   * Returns a newly created import show combinator.
-   */
+  /// Returns a newly created import show combinator.
   ShowCombinator showCombinator(
       Token keyword, List<SimpleIdentifier> shownNames);
 
-  /**
-   * Returns a newly created formal parameter. Either or both of the
-   * [comment] and [metadata] can be `null` if the parameter does not have the
-   * corresponding attribute. The [keyword] can be `null` if a type was
-   * specified. The [type] must be `null` if the keyword is 'var'.
-   *
-   * Use [simpleFormalParameter2] instead.
-   */
+  /// Returns a newly created formal parameter. Either or both of the
+  /// [comment] and [metadata] can be `null` if the parameter does not have the
+  /// corresponding attribute. The [keyword] can be `null` if a type was
+  /// specified. The [type] must be `null` if the keyword is 'var'.
+  ///
+  /// Use [simpleFormalParameter2] instead.
   @deprecated
   SimpleFormalParameter simpleFormalParameter(
       Comment comment,
@@ -1040,12 +792,10 @@
       TypeAnnotation type,
       SimpleIdentifier identifier);
 
-  /**
-   * Returns a newly created formal parameter. Either or both of the
-   * [comment] and [metadata] can be `null` if the parameter does not have the
-   * corresponding attribute. The [keyword] can be `null` if a type was
-   * specified. The [type] must be `null` if the keyword is 'var'.
-   */
+  /// Returns a newly created formal parameter. Either or both of the
+  /// [comment] and [metadata] can be `null` if the parameter does not have the
+  /// corresponding attribute. The [keyword] can be `null` if a type was
+  /// specified. The [type] must be `null` if the keyword is 'var'.
   SimpleFormalParameter simpleFormalParameter2(
       {Comment comment,
       List<Annotation> metadata,
@@ -1054,61 +804,43 @@
       TypeAnnotation type,
       @required SimpleIdentifier identifier});
 
-  /**
-   * Returns a newly created identifier.
-   */
+  /// Returns a newly created identifier.
   SimpleIdentifier simpleIdentifier(Token token, {bool isDeclaration: false});
 
-  /**
-   * Returns a newly created simple string literal.
-   */
+  /// Returns a newly created simple string literal.
   SimpleStringLiteral simpleStringLiteral(Token literal, String value);
 
-  /**
-   * Returns a newly created spread element.
-   */
+  /// Returns a newly created spread element.
   SpreadElement spreadElement({Token spreadOperator, Expression expression});
 
-  /**
-   * Returns a newly created string interpolation expression.
-   */
+  /// Returns a newly created string interpolation expression.
   StringInterpolation stringInterpolation(List<InterpolationElement> elements);
 
-  /**
-   * Returns a newly created super invocation to invoke the inherited
-   * constructor with the given name with the given arguments. The [period] and
-   * [constructorName] can be `null` if the constructor being invoked is the
-   * unnamed constructor.
-   */
+  /// Returns a newly created super invocation to invoke the inherited
+  /// constructor with the given name with the given arguments. The [period] and
+  /// [constructorName] can be `null` if the constructor being invoked is the
+  /// unnamed constructor.
   SuperConstructorInvocation superConstructorInvocation(
       Token superKeyword,
       Token period,
       SimpleIdentifier constructorName,
       ArgumentList argumentList);
 
-  /**
-   * Returns a newly created super expression.
-   */
+  /// Returns a newly created super expression.
   SuperExpression superExpression(Token superKeyword);
 
-  /**
-   * Returns a newly created switch case. The list of [labels] can be `null`
-   * if there are no labels.
-   */
+  /// Returns a newly created switch case. The list of [labels] can be `null`
+  /// if there are no labels.
   SwitchCase switchCase(List<Label> labels, Token keyword,
       Expression expression, Token colon, List<Statement> statements);
 
-  /**
-   * Returns a newly created switch default. The list of [labels] can be
-   * `null` if there are no labels.
-   */
+  /// Returns a newly created switch default. The list of [labels] can be
+  /// `null` if there are no labels.
   SwitchDefault switchDefault(List<Label> labels, Token keyword, Token colon,
       List<Statement> statements);
 
-  /**
-   * Returns a newly created switch statement. The list of [members] can be
-   * `null` if there are no switch members.
-   */
+  /// Returns a newly created switch statement. The list of [members] can be
+  /// `null` if there are no switch members.
   SwitchStatement switchStatement(
       Token switchKeyword,
       Token leftParenthesis,
@@ -1118,82 +850,60 @@
       List<SwitchMember> members,
       Token rightBracket);
 
-  /**
-   * Returns a newly created symbol literal.
-   */
+  /// Returns a newly created symbol literal.
   SymbolLiteral symbolLiteral(Token poundSign, List<Token> components);
 
-  /**
-   * Returns a newly created this expression.
-   */
+  /// Returns a newly created this expression.
   ThisExpression thisExpression(Token thisKeyword);
 
-  /**
-   * Returns a newly created throw expression.
-   */
+  /// Returns a newly created throw expression.
   ThrowExpression throwExpression(Token throwKeyword, Expression expression);
 
-  /**
-   * Returns a newly created top-level variable declaration. Either or both
-   * of the [comment] and [metadata] can be `null` if the variable does not have
-   * the corresponding attribute.
-   */
+  /// Returns a newly created top-level variable declaration. Either or both
+  /// of the [comment] and [metadata] can be `null` if the variable does not
+  /// have the corresponding attribute.
   TopLevelVariableDeclaration topLevelVariableDeclaration(
       Comment comment,
       List<Annotation> metadata,
       VariableDeclarationList variableList,
       Token semicolon);
 
-  /**
-   * Returns a newly created try statement. The list of [catchClauses] can be
-   * `null` if there are no catch clauses. The [finallyKeyword] and
-   * [finallyBlock] can be `null` if there is no finally clause.
-   */
+  /// Returns a newly created try statement. The list of [catchClauses] can be
+  /// `null` if there are no catch clauses. The [finallyKeyword] and
+  /// [finallyBlock] can be `null` if there is no finally clause.
   TryStatement tryStatement(Token tryKeyword, Block body,
       List<CatchClause> catchClauses, Token finallyKeyword, Block finallyBlock);
 
-  /**
-   * Returns a newly created list of type arguments.
-   */
+  /// Returns a newly created list of type arguments.
   TypeArgumentList typeArgumentList(
       Token leftBracket, List<TypeAnnotation> arguments, Token rightBracket);
 
-  /**
-   * Returns a newly created type name. The [typeArguments] can be `null` if
-   * there are no type arguments. The [question] can be `null` if there is no
-   * question mark.
-   */
+  /// Returns a newly created type name. The [typeArguments] can be `null` if
+  /// there are no type arguments. The [question] can be `null` if there is no
+  /// question mark.
   TypeName typeName(Identifier name, TypeArgumentList typeArguments,
       {Token question});
 
-  /**
-   * Returns a newly created type parameter. Either or both of the [comment]
-   * and [metadata] can be `null` if the parameter does not have the
-   * corresponding attribute. The [extendsKeyword] and [bound] can be `null` if
-   * the parameter does not have an upper bound.
-   */
+  /// Returns a newly created type parameter. Either or both of the [comment]
+  /// and [metadata] can be `null` if the parameter does not have the
+  /// corresponding attribute. The [extendsKeyword] and [bound] can be `null` if
+  /// the parameter does not have an upper bound.
   TypeParameter typeParameter(Comment comment, List<Annotation> metadata,
       SimpleIdentifier name, Token extendsKeyword, TypeAnnotation bound);
 
-  /**
-   * Returns a newly created list of type parameters.
-   */
+  /// Returns a newly created list of type parameters.
   TypeParameterList typeParameterList(Token leftBracket,
       List<TypeParameter> typeParameters, Token rightBracket);
 
-  /**
-   * Returns a newly created variable declaration. The [equals] and
-   * [initializer] can be `null` if there is no initializer.
-   */
+  /// Returns a newly created variable declaration. The [equals] and
+  /// [initializer] can be `null` if there is no initializer.
   VariableDeclaration variableDeclaration(
       SimpleIdentifier name, Token equals, Expression initializer);
 
-  /**
-   * Returns a newly created variable declaration list. Either or both of the
-   * [comment] and [metadata] can be `null` if the variable list does not have
-   * the corresponding attribute. The [keyword] can be `null` if a type was
-   * specified. The [type] must be `null` if the keyword is 'var'.
-   */
+  /// Returns a newly created variable declaration list. Either or both of the
+  /// [comment] and [metadata] can be `null` if the variable list does not have
+  /// the corresponding attribute. The [keyword] can be `null` if a type was
+  /// specified. The [type] must be `null` if the keyword is 'var'.
   VariableDeclarationList variableDeclarationList(
       Comment comment,
       List<Annotation> metadata,
@@ -1201,27 +911,19 @@
       TypeAnnotation type,
       List<VariableDeclaration> variables);
 
-  /**
-   * Returns a newly created variable declaration statement.
-   */
+  /// Returns a newly created variable declaration statement.
   VariableDeclarationStatement variableDeclarationStatement(
       VariableDeclarationList variableList, Token semicolon);
 
-  /**
-   * Returns a newly created while statement.
-   */
+  /// Returns a newly created while statement.
   WhileStatement whileStatement(Token whileKeyword, Token leftParenthesis,
       Expression condition, Token rightParenthesis, Statement body);
 
-  /**
-   * Returns a newly created with clause.
-   */
+  /// Returns a newly created with clause.
   WithClause withClause(Token withKeyword, List<TypeName> mixinTypes);
 
-  /**
-   * Returns a newly created yield expression. The [star] can be `null` if no
-   * star was provided.
-   */
+  /// Returns a newly created yield expression. The [star] can be `null` if no
+  /// star was provided.
   YieldStatement yieldStatement(
       Token yieldKeyword, Token star, Expression expression, Token semicolon);
 }
diff --git a/pkg/analyzer/lib/dart/ast/precedence.dart b/pkg/analyzer/lib/dart/ast/precedence.dart
index a5480d5..aaed019 100644
--- a/pkg/analyzer/lib/dart/ast/precedence.dart
+++ b/pkg/analyzer/lib/dart/ast/precedence.dart
@@ -1,4 +1,4 @@
-// Copyright (c) 2019, the Dart project authors.  Please see the AUTHORS file
+// Copyright (c) 2019, the Dart project authors. Please see the AUTHORS file
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
 
diff --git a/pkg/analyzer/lib/dart/ast/resolution_map.dart b/pkg/analyzer/lib/dart/ast/resolution_map.dart
index 3762587..83a4820 100644
--- a/pkg/analyzer/lib/dart/ast/resolution_map.dart
+++ b/pkg/analyzer/lib/dart/ast/resolution_map.dart
@@ -1,4 +1,4 @@
-// Copyright (c) 2016, the Dart project authors.  Please see the AUTHORS file
+// Copyright (c) 2016, the Dart project authors. Please see the AUTHORS file
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
 
@@ -6,333 +6,259 @@
 import 'package:analyzer/dart/element/element.dart';
 import 'package:analyzer/dart/element/type.dart';
 
-/**
- * A collection of methods which may be used to map from nodes in a resolved AST
- * to elements and types in the element model.
- *
- * Clients should not extend, implement or mix-in this class.
- */
+/// A collection of methods which may be used to map from nodes in a resolved
+/// AST to elements and types in the element model.
+///
+/// Clients should not extend, implement or mix-in this class.
 abstract class ResolutionMap {
-  /**
-   * Return the best element available for the function being invoked at [node].
-   * If resolution was able to find a better element based on type propagation,
-   * that element will be returned. Otherwise, the element found using the
-   * result of static analysis will be returned. If resolution has not been
-   * performed, then `null` will be returned.
-   *
-   * Deprecated: The analyzer no longer computes propagated type information.
-   * Use [staticElementForFunctionExpressionInvocation] instead.
-   */
+  /// Return the best element available for the function being invoked at
+  /// [node]. If resolution was able to find a better element based on type
+  /// propagation, that element will be returned. Otherwise, the element found
+  /// using the result of static analysis will be returned. If resolution has
+  /// not been performed, then `null` will be returned.
+  ///
+  /// Deprecated: The analyzer no longer computes propagated type information.
+  /// Use [staticElementForFunctionExpressionInvocation] instead.
   @deprecated
   ExecutableElement bestElementForFunctionExpressionInvocation(
       FunctionExpressionInvocation node);
 
-  /**
-   * Return the best element available for the identifier [node]. If resolution
-   * was able to find a better element based on type propagation, that element
-   * will be returned. Otherwise, the element found using the result of static
-   * analysis will be returned. If resolution has not been performed, then
-   * `null` will be returned.
-   *
-   * Deprecated: The analyzer no longer computes propagated type information.
-   * Use [staticElementForIdentifier] instead.
-   */
+  /// Return the best element available for the identifier [node]. If resolution
+  /// was able to find a better element based on type propagation, that element
+  /// will be returned. Otherwise, the element found using the result of static
+  /// analysis will be returned. If resolution has not been performed, then
+  /// `null` will be returned.
+  ///
+  /// Deprecated: The analyzer no longer computes propagated type information.
+  /// Use [staticElementForIdentifier] instead.
   @deprecated
   Element bestElementForIdentifier(Identifier node);
 
-  /**
-   * Return the best element available for the expression [node]. If resolution
-   * was able to find a better element based on type propagation, that element
-   * will be returned. Otherwise, the element found using the result of static
-   * analysis will be returned. If resolution has not been performed, then
-   * `null` will be returned.
-   *
-   * Deprecated: The analyzer no longer computes propagated type information.
-   * Use [staticElementForMethodReference] instead.
-   */
+  /// Return the best element available for the expression [node]. If resolution
+  /// was able to find a better element based on type propagation, that element
+  /// will be returned. Otherwise, the element found using the result of static
+  /// analysis will be returned. If resolution has not been performed, then
+  /// `null` will be returned.
+  ///
+  /// Deprecated: The analyzer no longer computes propagated type information.
+  /// Use [staticElementForMethodReference] instead.
   @deprecated
   MethodElement bestElementForMethodReference(MethodReferenceExpression node);
 
-  /**
-   * Return the best parameter element information available for the expression
-   * [node]. If type propagation was able to find a better parameter element
-   * than static analysis, that type will be returned. Otherwise, the result of
-   * static analysis will be returned.
-   *
-   * Deprecated: The analyzer no longer computes propagated type information.
-   * Use [staticParameterElementForExpression] instead.
-   */
+  /// Return the best parameter element information available for the expression
+  /// [node]. If type propagation was able to find a better parameter element
+  /// than static analysis, that type will be returned. Otherwise, the result of
+  /// static analysis will be returned.
+  ///
+  /// Deprecated: The analyzer no longer computes propagated type information.
+  /// Use [staticParameterElementForExpression] instead.
   @deprecated
   ParameterElement bestParameterElementForExpression(Expression node);
 
-  /**
-   * Return the best type information available for the expression [node]. If
-   * type propagation was able to find a better type than static analysis, that
-   * type will be returned. Otherwise, the result of static analysis will be
-   * returned. If no type analysis has been performed, then the type 'dynamic'
-   * will be returned.
-   *
-   * Deprecated: The analyzer no longer computes propagated type information.
-   * Use [staticTypeForExpression] instead.
-   */
+  /// Return the best type information available for the expression [node]. If
+  /// type propagation was able to find a better type than static analysis, that
+  /// type will be returned. Otherwise, the result of static analysis will be
+  /// returned. If no type analysis has been performed, then the type 'dynamic'
+  /// will be returned.
+  ///
+  /// Deprecated: The analyzer no longer computes propagated type information.
+  /// Use [staticTypeForExpression] instead.
   @deprecated
   DartType bestTypeForExpression(Expression node);
 
-  /**
-   * Return the element annotation representing the annotation [node] in the
-   * element model.
-   */
+  /// Return the element annotation representing the annotation [node] in the
+  /// element model.
   ElementAnnotation elementAnnotationForAnnotation(Annotation node);
 
-  /**
-   * Return the element associated with the declaration [node], or `null` if
-   * either this node corresponds to a list of declarations or if the AST
-   * structure has not been resolved.
-   */
+  /// Return the element associated with the declaration [node], or `null` if
+  /// either this node corresponds to a list of declarations or if the AST
+  /// structure has not been resolved.
   ClassElement elementDeclaredByClassDeclaration(ClassDeclaration node);
 
-  /**
-   * Return the element associated with the compilation unit [node], or `null`
-   * if the AST structure has not been resolved.
-   */
+  /// Return the element associated with the compilation unit [node], or `null`
+  /// if the AST structure has not been resolved.
   CompilationUnitElement elementDeclaredByCompilationUnit(CompilationUnit node);
 
-  /**
-   * Return the element associated with the declaration [node], or `null` if
-   * either this node corresponds to a list of declarations or if the AST
-   * structure has not been resolved.
-   */
+  /// Return the element associated with the declaration [node], or `null` if
+  /// either this node corresponds to a list of declarations or if the AST
+  /// structure has not been resolved.
   ConstructorElement elementDeclaredByConstructorDeclaration(
       ConstructorDeclaration node);
 
-  /**
-   * Return the element associated with the declaration [node], or `null` if
-   * either this node corresponds to a list of declarations or if the AST
-   * structure has not been resolved.
-   */
+  /// Return the element associated with the declaration [node], or `null` if
+  /// either this node corresponds to a list of declarations or if the AST
+  /// structure has not been resolved.
   Element elementDeclaredByDeclaration(Declaration node);
 
-  /**
-   * Return the element associated with the declaration [node], or `null` if
-   * either this node corresponds to a list of declarations or if the AST
-   * structure has not been resolved.
-   */
+  /// Return the element associated with the declaration [node], or `null` if
+  /// either this node corresponds to a list of declarations or if the AST
+  /// structure has not been resolved.
   LocalVariableElement elementDeclaredByDeclaredIdentifier(
       DeclaredIdentifier node);
 
-  /**
-   * Return the element associated with the directive [node], or `null` if the
-   * AST structure has not been resolved or if this directive could not be
-   * resolved.
-   */
+  /// Return the element associated with the directive [node], or `null` if the
+  /// AST structure has not been resolved or if this directive could not be
+  /// resolved.
   Element elementDeclaredByDirective(Directive node);
 
-  /**
-   * Return the element associated with the declaration [node], or `null` if
-   * either this node corresponds to a list of declarations or if the AST
-   * structure has not been resolved.
-   */
+  /// Return the element associated with the declaration [node], or `null` if
+  /// either this node corresponds to a list of declarations or if the AST
+  /// structure has not been resolved.
   ClassElement elementDeclaredByEnumDeclaration(EnumDeclaration node);
 
-  /**
-   * Return the element representing the parameter [node], or `null` if this
-   * parameter has not been resolved.
-   */
+  /// Return the element representing the parameter [node], or `null` if this
+  /// parameter has not been resolved.
   ParameterElement elementDeclaredByFormalParameter(FormalParameter node);
 
-  /**
-   * Return the element associated with the declaration [node], or `null` if
-   * either this node corresponds to a list of declarations or if the AST
-   * structure has not been resolved.
-   */
+  /// Return the element associated with the declaration [node], or `null` if
+  /// either this node corresponds to a list of declarations or if the AST
+  /// structure has not been resolved.
   ExecutableElement elementDeclaredByFunctionDeclaration(
       FunctionDeclaration node);
 
-  /**
-   * Return the element associated with the function expression [node], or
-   * `null` if the AST structure has not been resolved.
-   */
+  /// Return the element associated with the function expression [node], or
+  /// `null` if the AST structure has not been resolved.
   ExecutableElement elementDeclaredByFunctionExpression(
       FunctionExpression node);
 
-  /**
-   * Return the element associated with the declaration [node], or `null` if
-   * either this node corresponds to a list of declarations or if the AST
-   * structure has not been resolved.
-   */
+  /// Return the element associated with the declaration [node], or `null` if
+  /// either this node corresponds to a list of declarations or if the AST
+  /// structure has not been resolved.
   ExecutableElement elementDeclaredByMethodDeclaration(MethodDeclaration node);
 
-  /**
-   * Return the element associated with the declaration [node], or `null` if
-   * either this node corresponds to a list of declarations or if the AST
-   * structure has not been resolved.
-   */
+  /// Return the element associated with the declaration [node], or `null` if
+  /// either this node corresponds to a list of declarations or if the AST
+  /// structure has not been resolved.
   ClassElement elementDeclaredByMixinDeclaration(MixinDeclaration node);
 
-  /**
-   * Return the element associated with the declaration [node], or `null` if
-   * either this node corresponds to a list of declarations or if the AST
-   * structure has not been resolved.
-   */
+  /// Return the element associated with the declaration [node], or `null` if
+  /// either this node corresponds to a list of declarations or if the AST
+  /// structure has not been resolved.
   VariableElement elementDeclaredByVariableDeclaration(
       VariableDeclaration node);
 
-  /**
-   * Return the element associated with the annotation [node], or `null` if the
-   * AST structure has not been resolved or if this annotation could not be
-   * resolved.
-   */
+  /// Return the element associated with the annotation [node], or `null` if the
+  /// AST structure has not been resolved or if this annotation could not be
+  /// resolved.
   Element elementForAnnotation(Annotation node);
 
-  /**
-   * Return the element representing the parameter being named by the
-   * expression [node], or `null` if the AST structure has not been resolved or
-   * if there is no parameter with the same name as this expression.
-   */
+  /// Return the element representing the parameter being named by the
+  /// expression [node], or `null` if the AST structure has not been resolved or
+  /// if there is no parameter with the same name as this expression.
   ParameterElement elementForNamedExpression(NamedExpression node);
 
-  /**
-   * Return a list containing the elements representing the parameters in the
-   * list [node]. The list will contain `null`s if the parameters in this list
-   * have not been resolved.
-   */
+  /// Return a list containing the elements representing the parameters in the
+  /// list [node]. The list will contain `null`s if the parameters in this list
+  /// have not been resolved.
   List<ParameterElement> parameterElementsForFormalParameterList(
       FormalParameterList node);
 
-  /**
-   * Return the element associated with the function being invoked at [node]
-   * based on propagated type information, or `null` if the AST structure has
-   * not been resolved or the function could not be resolved.
-   *
-   * Deprecated: The analyzer no longer computes propagated type information.
-   * Use [staticElementForFunctionExpressionInvocation] instead.
-   */
+  /// Return the element associated with the function being invoked at [node]
+  /// based on propagated type information, or `null` if the AST structure has
+  /// not been resolved or the function could not be resolved.
+  ///
+  /// Deprecated: The analyzer no longer computes propagated type information.
+  /// Use [staticElementForFunctionExpressionInvocation] instead.
   @deprecated
   ExecutableElement propagatedElementForFunctionExpressionInvocation(
       FunctionExpressionInvocation node);
 
-  /**
-   * Return the element associated with the identifier [node] based on
-   * propagated type information, or `null` if the AST structure has not been
-   * resolved or if this identifier could not be resolved. One example of the
-   * latter case is an identifier that is not defined within the scope in which
-   * it appears.
-   *
-   * Deprecated: The analyzer no longer computes propagated type information.
-   * Use [staticElementForIdentifier] instead.
-   */
+  /// Return the element associated with the identifier [node] based on
+  /// propagated type information, or `null` if the AST structure has not been
+  /// resolved or if this identifier could not be resolved. One example of the
+  /// latter case is an identifier that is not defined within the scope in which
+  /// it appears.
+  ///
+  /// Deprecated: The analyzer no longer computes propagated type information.
+  /// Use [staticElementForIdentifier] instead.
   @deprecated
   Element propagatedElementForIdentifier(Identifier node);
 
-  /**
-   * Return the element associated with the expression [node] based on
-   * propagated types, or `null` if the AST structure has not been resolved, or
-   * there is no meaningful propagated element to return (e.g. because this is a
-   * non-compound assignment expression, or because the method referred to could
-   * not be resolved).
-   *
-   * Deprecated: The analyzer no longer computes propagated type information.
-   * Use [staticElementForMethodReference] instead.
-   */
+  /// Return the element associated with the expression [node] based on
+  /// propagated types, or `null` if the AST structure has not been resolved, or
+  /// there is no meaningful propagated element to return (e.g. because this is
+  /// a non-compound assignment expression, or because the method referred to
+  /// could not be resolved).
+  ///
+  /// Deprecated: The analyzer no longer computes propagated type information.
+  /// Use [staticElementForMethodReference] instead.
   @deprecated
   MethodElement propagatedElementForMethodReference(
       MethodReferenceExpression node);
 
-  /**
-   * If the expression [node] is an argument to an invocation, and the AST
-   * structure has been resolved, and the function being invoked is known based
-   * on propagated type information, and [node] corresponds to one of the
-   * parameters of the function being invoked, then return the parameter element
-   * representing the parameter to which the value of [node] will be
-   * bound. Otherwise, return `null`.
-   *
-   * Deprecated: The analyzer no longer computes propagated type information.
-   * Use [staticParameterElementForExpression] instead.
-   */
+  /// If the expression [node] is an argument to an invocation, and the AST
+  /// structure has been resolved, and the function being invoked is known based
+  /// on propagated type information, and [node] corresponds to one of the
+  /// parameters of the function being invoked, then return the parameter
+  /// element representing the parameter to which the value of [node] will be
+  /// bound. Otherwise, return `null`.
+  ///
+  /// Deprecated: The analyzer no longer computes propagated type information.
+  /// Use [staticParameterElementForExpression] instead.
   @deprecated
   ParameterElement propagatedParameterElementForExpression(Expression node);
 
-  /**
-   * Return the propagated type of the expression [node], or `null` if type
-   * propagation has not been performed on the AST structure.
-   *
-   * Deprecated: The analyzer no longer computes propagated type information.
-   * Use [staticTypeForExpression] instead.
-   */
+  /// Return the propagated type of the expression [node], or `null` if type
+  /// propagation has not been performed on the AST structure.
+  ///
+  /// Deprecated: The analyzer no longer computes propagated type information.
+  /// Use [staticTypeForExpression] instead.
   @deprecated
   DartType propagatedTypeForExpression(Expression node);
 
-  /**
-   * Return the element associated with the constructor referenced by [node]
-   * based on static type information, or `null` if the AST structure has not
-   * been resolved or if the constructor could not be resolved.
-   */
+  /// Return the element associated with the constructor referenced by [node]
+  /// based on static type information, or `null` if the AST structure has not
+  /// been resolved or if the constructor could not be resolved.
   ConstructorElement staticElementForConstructorReference(
       ConstructorReferenceNode node);
 
-  /**
-   * Return the element associated with the function being invoked at [node]
-   * based on static type information, or `null` if the AST structure has not
-   * been resolved or the function could not be resolved.
-   */
+  /// Return the element associated with the function being invoked at [node]
+  /// based on static type information, or `null` if the AST structure has not
+  /// been resolved or the function could not be resolved.
   ExecutableElement staticElementForFunctionExpressionInvocation(
       FunctionExpressionInvocation node);
 
-  /**
-   * Return the element associated with the identifier [node] based on static
-   * type information, or `null` if the AST structure has not been resolved or
-   * if this identifier could not be resolved. One example of the latter case is
-   * an identifier that is not defined within the scope in which it appears
-   */
+  /// Return the element associated with the identifier [node] based on static
+  /// type information, or `null` if the AST structure has not been resolved or
+  /// if this identifier could not be resolved. One example of the latter case
+  /// is an identifier that is not defined within the scope in which it appears.
   Element staticElementForIdentifier(Identifier node);
 
-  /**
-   * Return the element associated with the expression [node] based on the
-   * static types, or `null` if the AST structure has not been resolved, or
-   * there is no meaningful static element to return (e.g. because this is a
-   * non-compound assignment expression, or because the method referred to could
-   * not be resolved).
-   */
+  /// Return the element associated with the expression [node] based on the
+  /// static types, or `null` if the AST structure has not been resolved, or
+  /// there is no meaningful static element to return (e.g. because this is a
+  /// non-compound assignment expression, or because the method referred to
+  /// could not be resolved).
   MethodElement staticElementForMethodReference(MethodReferenceExpression node);
 
-  /**
-   * Return the function type of the invocation [node] based on the static type
-   * information, or `null` if the AST structure has not been resolved, or if
-   * the invoke could not be resolved.
-   *
-   * This will usually be a [FunctionType], but it can also be an
-   * [InterfaceType] with a `call` method, `dynamic`, `Function`, or a `@proxy`
-   * interface type that implements `Function`.
-   */
+  /// Return the function type of the invocation [node] based on the static type
+  /// information, or `null` if the AST structure has not been resolved, or if
+  /// the invoke could not be resolved.
+  ///
+  /// This will usually be a [FunctionType], but it can also be an
+  /// [InterfaceType] with a `call` method, `dynamic`, `Function`, or a `@proxy`
+  /// interface type that implements `Function`.
   DartType staticInvokeTypeForInvocationExpression(InvocationExpression node);
 
-  /**
-   * If the expression [node] is an argument to an invocation, and the AST
-   * structure has been resolved, and the function being invoked is known based
-   * on static type information, and [node] corresponds to one of the parameters
-   * of the function being invoked, then return the parameter element
-   * representing the parameter to which the value of [node] will be
-   * bound. Otherwise, return `null`.
-   */
+  /// If the expression [node] is an argument to an invocation, and the AST
+  /// structure has been resolved, and the function being invoked is known based
+  /// on static type information, and [node] corresponds to one of the
+  /// parameters of the function being invoked, then return the parameter
+  /// element representing the parameter to which the value of [node] will be
+  /// bound. Otherwise, return `null`.
   ParameterElement staticParameterElementForExpression(Expression node);
 
-  /**
-   * Return the static type of the expression [node], or `null` if the AST
-   * structure has not been resolved.
-   */
+  /// Return the static type of the expression [node], or `null` if the AST
+  /// structure has not been resolved.
   DartType staticTypeForExpression(Expression node);
 
-  /**
-   * Return the type being named by [node], or `null` if the AST structure has
-   * not been resolved.
-   */
+  /// Return the type being named by [node], or `null` if the AST structure has
+  /// not been resolved.
   DartType typeForTypeName(TypeAnnotation node);
 
-  /**
-   * Return the element associated with the uri of the directive [node], or
-   * `null` if the AST structure has not been resolved or if the URI could not
-   * be resolved. Examples of the latter case include a directive that contains
-   * an invalid URL or a URL that does not exist.
-   */
+  /// Return the element associated with the uri of the directive [node], or
+  /// `null` if the AST structure has not been resolved or if the URI could not
+  /// be resolved. Examples of the latter case include a directive that contains
+  /// an invalid URL or a URL that does not exist.
   Element uriElementForDirective(UriBasedDirective node);
 }
diff --git a/pkg/analyzer/lib/dart/ast/standard_ast_factory.dart b/pkg/analyzer/lib/dart/ast/standard_ast_factory.dart
index 9333242..acb1366 100644
--- a/pkg/analyzer/lib/dart/ast/standard_ast_factory.dart
+++ b/pkg/analyzer/lib/dart/ast/standard_ast_factory.dart
@@ -1,11 +1,9 @@
-// Copyright (c) 2016, the Dart project authors.  Please see the AUTHORS file
+// Copyright (c) 2016, the Dart project authors. Please see the AUTHORS file
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
 
 import 'package:analyzer/dart/ast/ast_factory.dart';
 import 'package:analyzer/src/dart/ast/ast_factory.dart';
 
-/**
- * Gets an instance of [AstFactory] based on the standard AST implementation.
- */
+/// Gets an instance of [AstFactory] based on the standard AST implementation.
 final AstFactory astFactory = new AstFactoryImpl();
diff --git a/pkg/analyzer/lib/dart/ast/standard_resolution_map.dart b/pkg/analyzer/lib/dart/ast/standard_resolution_map.dart
index c778063..3353e19 100644
--- a/pkg/analyzer/lib/dart/ast/standard_resolution_map.dart
+++ b/pkg/analyzer/lib/dart/ast/standard_resolution_map.dart
@@ -1,11 +1,10 @@
-// Copyright (c) 2016, the Dart project authors.  Please see the AUTHORS file
+// Copyright (c) 2016, the Dart project authors. Please see the AUTHORS file
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
 
 import 'package:analyzer/dart/ast/resolution_map.dart';
 import 'package:analyzer/src/dart/ast/resolution_map.dart';
 
-/**
- * Gets an instance of [ResolutionMap] based on the standard AST implementation.
- */
+/// Gets an instance of [ResolutionMap] based on the standard AST
+/// implementation.
 final ResolutionMap resolutionMap = new ResolutionMapImpl();
diff --git a/pkg/analyzer/lib/dart/ast/token.dart b/pkg/analyzer/lib/dart/ast/token.dart
index 55874de..4262a60 100644
--- a/pkg/analyzer/lib/dart/ast/token.dart
+++ b/pkg/analyzer/lib/dart/ast/token.dart
@@ -2,30 +2,7 @@
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
 
-/**
- * Defines the tokens that are produced by the scanner, used by the parser, and
- * referenced from the [AST structure](ast.dart).
- */
+/// Defines the tokens that are produced by the scanner, used by the parser, and
+/// referenced from the [AST structure](ast.dart).
 export 'package:front_end/src/scanner/token.dart'
-    show
-        Keyword,
-        Token,
-        TokenType,
-        NO_PRECEDENCE,
-        ASSIGNMENT_PRECEDENCE,
-        CASCADE_PRECEDENCE,
-        CONDITIONAL_PRECEDENCE,
-        IF_NULL_PRECEDENCE,
-        LOGICAL_OR_PRECEDENCE,
-        LOGICAL_AND_PRECEDENCE,
-        EQUALITY_PRECEDENCE,
-        RELATIONAL_PRECEDENCE,
-        BITWISE_OR_PRECEDENCE,
-        BITWISE_XOR_PRECEDENCE,
-        BITWISE_AND_PRECEDENCE,
-        SHIFT_PRECEDENCE,
-        ADDITIVE_PRECEDENCE,
-        MULTIPLICATIVE_PRECEDENCE,
-        PREFIX_PRECEDENCE,
-        POSTFIX_PRECEDENCE,
-        SELECTOR_PRECEDENCE;
+    show Keyword, Token, TokenType;
diff --git a/pkg/analyzer/lib/dart/ast/visitor.dart b/pkg/analyzer/lib/dart/ast/visitor.dart
index ac55621..6646631 100644
--- a/pkg/analyzer/lib/dart/ast/visitor.dart
+++ b/pkg/analyzer/lib/dart/ast/visitor.dart
@@ -2,79 +2,67 @@
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
 
-/**
- * Defines AST visitors that support useful patterns for visiting the nodes in
- * an [AST structure](ast.dart).
- *
- * Dart is an evolving language, and the AST structure must evolved with it.
- * When the AST structure changes, the visitor interface will sometimes change
- * as well. If it is desirable to get a compilation error when the structure of
- * the AST has been modified, then you should consider implementing the
- * interface [AstVisitor] directly. Doing so will ensure that changes that
- * introduce new classes of nodes will be flagged. (Of course, not all changes
- * to the AST structure require the addition of a new class of node, and hence
- * cannot be caught this way.)
- *
- * But if automatic detection of these kinds of changes is not necessary then
- * you will probably want to extend one of the classes in this library because
- * doing so will simplify the task of writing your visitor and guard against
- * future changes to the AST structure. For example, the [RecursiveAstVisitor]
- * automates the process of visiting all of the descendants of a node.
- */
+/// Defines AST visitors that support useful patterns for visiting the nodes in
+/// an [AST structure](ast.dart).
+///
+/// Dart is an evolving language, and the AST structure must evolved with it.
+/// When the AST structure changes, the visitor interface will sometimes change
+/// as well. If it is desirable to get a compilation error when the structure of
+/// the AST has been modified, then you should consider implementing the
+/// interface [AstVisitor] directly. Doing so will ensure that changes that
+/// introduce new classes of nodes will be flagged. (Of course, not all changes
+/// to the AST structure require the addition of a new class of node, and hence
+/// cannot be caught this way.)
+///
+/// But if automatic detection of these kinds of changes is not necessary then
+/// you will probably want to extend one of the classes in this library because
+/// doing so will simplify the task of writing your visitor and guard against
+/// future changes to the AST structure. For example, the [RecursiveAstVisitor]
+/// automates the process of visiting all of the descendants of a node.
 import 'dart:collection';
 
 import 'package:analyzer/dart/ast/ast.dart';
 import 'package:analyzer/src/dart/ast/utilities.dart' show UIAsCodeVisitorMixin;
 
-/**
- * An AST visitor that will recursively visit all of the nodes in an AST
- * structure, similar to [GeneralizingAstVisitor]. This visitor uses a
- * breadth-first ordering rather than the depth-first ordering of
- * [GeneralizingAstVisitor].
- *
- * Subclasses that override a visit method must either invoke the overridden
- * visit method or explicitly invoke the more general visit method. Failure to
- * do so will cause the visit methods for superclasses of the node to not be
- * invoked and will cause the children of the visited node to not be visited.
- *
- * In addition, subclasses should <b>not</b> explicitly visit the children of a
- * node, but should ensure that the method [visitNode] is used to visit the
- * children (either directly or indirectly). Failure to do will break the order
- * in which nodes are visited.
- *
- * Note that, unlike other visitors that begin to visit a structure of nodes by
- * asking the root node in the structure to accept the visitor, this visitor
- * requires that clients start the visit by invoking the method [visitAllNodes]
- * defined on the visitor with the root node as the argument:
- *
- *     visitor.visitAllNodes(rootNode);
- *
- * Clients may extend this class.
- */
+/// An AST visitor that will recursively visit all of the nodes in an AST
+/// structure, similar to [GeneralizingAstVisitor]. This visitor uses a
+/// breadth-first ordering rather than the depth-first ordering of
+/// [GeneralizingAstVisitor].
+///
+/// Subclasses that override a visit method must either invoke the overridden
+/// visit method or explicitly invoke the more general visit method. Failure to
+/// do so will cause the visit methods for superclasses of the node to not be
+/// invoked and will cause the children of the visited node to not be visited.
+///
+/// In addition, subclasses should <b>not</b> explicitly visit the children of a
+/// node, but should ensure that the method [visitNode] is used to visit the
+/// children (either directly or indirectly). Failure to do will break the order
+/// in which nodes are visited.
+///
+/// Note that, unlike other visitors that begin to visit a structure of nodes by
+/// asking the root node in the structure to accept the visitor, this visitor
+/// requires that clients start the visit by invoking the method [visitAllNodes]
+/// defined on the visitor with the root node as the argument:
+///
+///     visitor.visitAllNodes(rootNode);
+///
+/// Clients may extend this class.
 class BreadthFirstVisitor<R> extends GeneralizingAstVisitor<R> {
-  /**
-   * A queue holding the nodes that have not yet been visited in the order in
-   * which they ought to be visited.
-   */
+  /// A queue holding the nodes that have not yet been visited in the order in
+  /// which they ought to be visited.
   Queue<AstNode> _queue = new Queue<AstNode>();
 
-  /**
-   * A visitor, used to visit the children of the current node, that will add
-   * the nodes it visits to the [_queue].
-   */
+  /// A visitor, used to visit the children of the current node, that will add
+  /// the nodes it visits to the [_queue].
   _BreadthFirstChildVisitor _childVisitor;
 
-  /**
-   * Initialize a newly created visitor.
-   */
+  /// Initialize a newly created visitor.
   BreadthFirstVisitor() {
     _childVisitor = new _BreadthFirstChildVisitor(this);
   }
 
-  /**
-   * Visit all nodes in the tree starting at the given [root] node, in
-   * breadth-first order.
-   */
+  /// Visit all nodes in the tree starting at the given [root] node, in
+  /// breadth-first order.
   void visitAllNodes(AstNode root) {
     _queue.add(root);
     while (!_queue.isEmpty) {
@@ -90,33 +78,27 @@
   }
 }
 
-/**
- * An AST visitor that will recursively visit all of the nodes in an AST
- * structure. For each node that is visited, the corresponding visit method on
- * one or more other visitors (the 'delegates') will be invoked.
- *
- * For example, if an instance of this class is created with two delegates V1
- * and V2, and that instance is used to visit the expression 'x + 1', then the
- * following visit methods will be invoked:
- * 1. V1.visitBinaryExpression
- * 2. V2.visitBinaryExpression
- * 3. V1.visitSimpleIdentifier
- * 4. V2.visitSimpleIdentifier
- * 5. V1.visitIntegerLiteral
- * 6. V2.visitIntegerLiteral
- *
- * Clients may not extend, implement or mix-in this class.
- */
+/// An AST visitor that will recursively visit all of the nodes in an AST
+/// structure. For each node that is visited, the corresponding visit method on
+/// one or more other visitors (the 'delegates') will be invoked.
+///
+/// For example, if an instance of this class is created with two delegates V1
+/// and V2, and that instance is used to visit the expression 'x + 1', then the
+/// following visit methods will be invoked:
+/// 1. V1.visitBinaryExpression
+/// 2. V2.visitBinaryExpression
+/// 3. V1.visitSimpleIdentifier
+/// 4. V2.visitSimpleIdentifier
+/// 5. V1.visitIntegerLiteral
+/// 6. V2.visitIntegerLiteral
+///
+/// Clients may not extend, implement or mix-in this class.
 class DelegatingAstVisitor<T> extends UnifyingAstVisitor<T> {
-  /**
-   * The delegates whose visit methods will be invoked.
-   */
+  /// The delegates whose visit methods will be invoked.
   final Iterable<AstVisitor<T>> delegates;
 
-  /**
-   * Initialize a newly created visitor to use each of the given delegate
-   * visitors to visit the nodes of an AST structure.
-   */
+  /// Initialize a newly created visitor to use each of the given delegate
+  /// visitors to visit the nodes of an AST structure.
   DelegatingAstVisitor(this.delegates);
 
   @override
@@ -129,25 +111,23 @@
   }
 }
 
-/**
- * An AST visitor that will recursively visit all of the nodes in an AST
- * structure (like instances of the class [RecursiveAstVisitor]). In addition,
- * when a node of a specific type is visited not only will the visit method for
- * that specific type of node be invoked, but additional methods for the
- * superclasses of that node will also be invoked. For example, using an
- * instance of this class to visit a [Block] will cause the method [visitBlock]
- * to be invoked but will also cause the methods [visitStatement] and
- * [visitNode] to be subsequently invoked. This allows visitors to be written
- * that visit all statements without needing to override the visit method for
- * each of the specific subclasses of [Statement].
- *
- * Subclasses that override a visit method must either invoke the overridden
- * visit method or explicitly invoke the more general visit method. Failure to
- * do so will cause the visit methods for superclasses of the node to not be
- * invoked and will cause the children of the visited node to not be visited.
- *
- * Clients may extend this class.
- */
+/// An AST visitor that will recursively visit all of the nodes in an AST
+/// structure (like instances of the class [RecursiveAstVisitor]). In addition,
+/// when a node of a specific type is visited not only will the visit method for
+/// that specific type of node be invoked, but additional methods for the
+/// superclasses of that node will also be invoked. For example, using an
+/// instance of this class to visit a [Block] will cause the method [visitBlock]
+/// to be invoked but will also cause the methods [visitStatement] and
+/// [visitNode] to be subsequently invoked. This allows visitors to be written
+/// that visit all statements without needing to override the visit method for
+/// each of the specific subclasses of [Statement].
+///
+/// Subclasses that override a visit method must either invoke the overridden
+/// visit method or explicitly invoke the more general visit method. Failure to
+/// do so will cause the visit methods for superclasses of the node to not be
+/// invoked and will cause the children of the visited node to not be visited.
+///
+/// Clients may extend this class.
 class GeneralizingAstVisitor<R>
     with UIAsCodeVisitorMixin<R>
     implements AstVisitor<R> {
@@ -332,7 +312,7 @@
       visitForParts(node);
 
   @override
-  R visitForStatement2(ForStatement2 node) => visitStatement(node);
+  R visitForStatement(ForStatement node) => visitStatement(node);
 
   R visitFunctionBody(FunctionBody node) => visitNode(node);
 
@@ -423,16 +403,8 @@
   @override
   R visitListLiteral(ListLiteral node) => visitTypedLiteral(node);
 
-  @deprecated
-  @override
-  R visitListLiteral2(ListLiteral2 node) => visitTypedLiteral(node);
-
   R visitLiteral(Literal node) => visitExpression(node);
 
-  @deprecated
-  @override
-  R visitMapLiteral2(MapLiteral2 node) => visitTypedLiteral(node);
-
   @override
   R visitMapLiteralEntry(MapLiteralEntry node) => visitCollectionElement(node);
 
@@ -512,10 +484,6 @@
   @override
   R visitScriptTag(ScriptTag scriptTag) => visitNode(scriptTag);
 
-  @deprecated
-  @override
-  R visitSetLiteral2(SetLiteral2 node) => visitTypedLiteral(node);
-
   @override
   R visitSetOrMapLiteral(SetOrMapLiteral node) => visitTypedLiteral(node);
 
@@ -623,18 +591,16 @@
   R visitYieldStatement(YieldStatement node) => visitStatement(node);
 }
 
-/**
- * An AST visitor that will recursively visit all of the nodes in an AST
- * structure. For example, using an instance of this class to visit a [Block]
- * will also cause all of the statements in the block to be visited.
- *
- * Subclasses that override a visit method must either invoke the overridden
- * visit method or must explicitly ask the visited node to visit its children.
- * Failure to do so will cause the children of the visited node to not be
- * visited.
- *
- * Clients may extend this class.
- */
+/// An AST visitor that will recursively visit all of the nodes in an AST
+/// structure. For example, using an instance of this class to visit a [Block]
+/// will also cause all of the statements in the block to be visited.
+///
+/// Subclasses that override a visit method must either invoke the overridden
+/// visit method or must explicitly ask the visited node to visit its children.
+/// Failure to do so will cause the children of the visited node to not be
+/// visited.
+///
+/// Clients may extend this class.
 class RecursiveAstVisitor<R>
     with UIAsCodeVisitorMixin<R>
     implements AstVisitor<R> {
@@ -921,7 +887,7 @@
   }
 
   @override
-  R visitForStatement2(ForStatement2 node) {
+  R visitForStatement(ForStatement node) {
     node.visitChildren(this);
     return null;
   }
@@ -1070,20 +1036,6 @@
     return null;
   }
 
-  @deprecated
-  @override
-  R visitListLiteral2(ListLiteral2 node) {
-    node.visitChildren(this);
-    return null;
-  }
-
-  @deprecated
-  @override
-  R visitMapLiteral2(MapLiteral2 node) {
-    node.visitChildren(this);
-    return null;
-  }
-
   @override
   R visitMapLiteralEntry(MapLiteralEntry node) {
     node.visitChildren(this);
@@ -1205,13 +1157,6 @@
     return null;
   }
 
-  @deprecated
-  @override
-  R visitSetLiteral2(SetLiteral2 node) {
-    node.visitChildren(this);
-    return null;
-  }
-
   @override
   R visitSetOrMapLiteral(SetOrMapLiteral node) {
     node.visitChildren(this);
@@ -1375,14 +1320,12 @@
   }
 }
 
-/**
- * An AST visitor that will do nothing when visiting an AST node. It is intended
- * to be a superclass for classes that use the visitor pattern primarily as a
- * dispatch mechanism (and hence don't need to recursively visit a whole
- * structure) and that only need to visit a small number of node types.
- *
- * Clients may extend this class.
- */
+/// An AST visitor that will do nothing when visiting an AST node. It is
+/// intended to be a superclass for classes that use the visitor pattern
+/// primarily as a dispatch mechanism (and hence don't need to recursively visit
+/// a whole structure) and that only need to visit a small number of node types.
+///
+/// Clients may extend this class.
 class SimpleAstVisitor<R>
     with UIAsCodeVisitorMixin<R>
     implements AstVisitor<R> {
@@ -1528,7 +1471,7 @@
   R visitForPartsWithExpression(ForPartsWithExpression node) => null;
 
   @override
-  R visitForStatement2(ForStatement2 node) => null;
+  R visitForStatement(ForStatement node) => null;
 
   @override
   R visitFunctionDeclaration(FunctionDeclaration node) => null;
@@ -1605,14 +1548,6 @@
   @override
   R visitListLiteral(ListLiteral node) => null;
 
-  @deprecated
-  @override
-  R visitListLiteral2(ListLiteral2 node) => null;
-
-  @deprecated
-  @override
-  R visitMapLiteral2(MapLiteral2 node) => null;
-
   @override
   R visitMapLiteralEntry(MapLiteralEntry node) => null;
 
@@ -1675,10 +1610,6 @@
   @override
   R visitScriptTag(ScriptTag node) => null;
 
-  @deprecated
-  @override
-  R visitSetLiteral2(SetLiteral2 node) => null;
-
   @override
   R visitSetOrMapLiteral(SetOrMapLiteral node) => null;
 
@@ -1762,15 +1693,13 @@
   R visitYieldStatement(YieldStatement node) => null;
 }
 
-/**
- * An AST visitor that will throw an exception if any of the visit methods that
- * are invoked have not been overridden. It is intended to be a superclass for
- * classes that implement the visitor pattern and need to (a) override all of
- * the visit methods or (b) need to override a subset of the visit method and
- * want to catch when any other visit methods have been invoked.
- *
- * Clients may extend this class.
- */
+/// An AST visitor that will throw an exception if any of the visit methods that
+/// are invoked have not been overridden. It is intended to be a superclass for
+/// classes that implement the visitor pattern and need to (a) override all of
+/// the visit methods or (b) need to override a subset of the visit method and
+/// want to catch when any other visit methods have been invoked.
+///
+/// Clients may extend this class.
 class ThrowingAstVisitor<R>
     with UIAsCodeVisitorMixin<R>
     implements AstVisitor<R> {
@@ -1920,7 +1849,7 @@
   R visitForPartsWithExpression(ForPartsWithExpression node) => _throw(node);
 
   @override
-  R visitForStatement2(ForStatement2 node) => _throw(node);
+  R visitForStatement(ForStatement node) => _throw(node);
 
   @override
   R visitFunctionDeclaration(FunctionDeclaration node) => _throw(node);
@@ -1998,14 +1927,6 @@
   @override
   R visitListLiteral(ListLiteral node) => _throw(node);
 
-  @deprecated
-  @override
-  R visitListLiteral2(ListLiteral2 node) => _throw(node);
-
-  @deprecated
-  @override
-  R visitMapLiteral2(MapLiteral2 node) => _throw(node);
-
   @override
   R visitMapLiteralEntry(MapLiteralEntry node) => _throw(node);
 
@@ -2068,10 +1989,6 @@
   @override
   R visitScriptTag(ScriptTag node) => _throw(node);
 
-  @deprecated
-  @override
-  R visitSetLiteral2(SetLiteral2 node) => _throw(node);
-
   @override
   R visitSetOrMapLiteral(SetOrMapLiteral node) => _throw(node);
 
@@ -2161,26 +2078,18 @@
   }
 }
 
-/**
- * An AST visitor that captures visit call timings.
- *
- * Clients may not extend, implement or mix-in this class.
- */
+/// An AST visitor that captures visit call timings.
+///
+/// Clients may not extend, implement or mix-in this class.
 class TimedAstVisitor<T> with UIAsCodeVisitorMixin<T> implements AstVisitor<T> {
-  /**
-   * The base visitor whose visit methods will be timed.
-   */
+  /// The base visitor whose visit methods will be timed.
   final AstVisitor<T> _baseVisitor;
 
-  /**
-   * Collects elapsed time for visit calls.
-   */
+  /// Collects elapsed time for visit calls.
   final Stopwatch stopwatch;
 
-  /**
-   * Initialize a newly created visitor to time calls to the given base
-   * visitor's visits.
-   */
+  /// Initialize a newly created visitor to time calls to the given base
+  /// visitor's visits.
   TimedAstVisitor(this._baseVisitor, [Stopwatch watch])
       : stopwatch = watch ?? new Stopwatch();
 
@@ -2561,9 +2470,9 @@
   }
 
   @override
-  T visitForStatement2(ForStatement2 node) {
+  T visitForStatement(ForStatement node) {
     stopwatch.start();
-    T result = _baseVisitor.visitForStatement2(node);
+    T result = _baseVisitor.visitForStatement(node);
     stopwatch.stop();
     return result;
   }
@@ -2760,24 +2669,6 @@
     return result;
   }
 
-  @deprecated
-  @override
-  T visitListLiteral2(ListLiteral2 node) {
-    stopwatch.start();
-    T result = _baseVisitor.visitListLiteral2(node);
-    stopwatch.stop();
-    return result;
-  }
-
-  @deprecated
-  @override
-  T visitMapLiteral2(MapLiteral2 node) {
-    stopwatch.start();
-    T result = _baseVisitor.visitMapLiteral2(node);
-    stopwatch.stop();
-    return result;
-  }
-
   @override
   T visitMapLiteralEntry(MapLiteralEntry node) {
     stopwatch.start();
@@ -2939,15 +2830,6 @@
     return result;
   }
 
-  @deprecated
-  @override
-  T visitSetLiteral2(SetLiteral2 node) {
-    stopwatch.start();
-    T result = _baseVisitor.visitSetLiteral2(node);
-    stopwatch.stop();
-    return result;
-  }
-
   @override
   T visitSetOrMapLiteral(SetOrMapLiteral node) {
     stopwatch.start();
@@ -3165,18 +3047,17 @@
   }
 }
 
-/**
- * An AST visitor that will recursively visit all of the nodes in an AST
- * structure (like instances of the class [RecursiveAstVisitor]). In addition,
- * every node will also be visited by using a single unified [visitNode] method.
- *
- * Subclasses that override a visit method must either invoke the overridden
- * visit method or explicitly invoke the more general [visitNode] method.
- * Failure to do so will cause the children of the visited node to not be
- * visited.
- *
- * Clients may extend this class.
- */
+/// An AST visitor that will recursively visit all of the nodes in an AST
+/// structure (like instances of the class [RecursiveAstVisitor]). In addition,
+/// every node will also be visited by using a single unified [visitNode]
+/// method.
+///
+/// Subclasses that override a visit method must either invoke the overridden
+/// visit method or explicitly invoke the more general [visitNode] method.
+/// Failure to do so will cause the children of the visited node to not be
+/// visited.
+///
+/// Clients may extend this class.
 class UnifyingAstVisitor<R>
     with UIAsCodeVisitorMixin<R>
     implements AstVisitor<R> {
@@ -3327,7 +3208,7 @@
   R visitForPartsWithExpression(ForPartsWithExpression node) => visitNode(node);
 
   @override
-  R visitForStatement2(ForStatement2 node) => visitNode(node);
+  R visitForStatement(ForStatement node) => visitNode(node);
 
   @override
   R visitFunctionDeclaration(FunctionDeclaration node) => visitNode(node);
@@ -3406,14 +3287,6 @@
   @override
   R visitListLiteral(ListLiteral node) => visitNode(node);
 
-  @deprecated
-  @override
-  R visitListLiteral2(ListLiteral2 node) => visitNode(node);
-
-  @deprecated
-  @override
-  R visitMapLiteral2(MapLiteral2 node) => visitNode(node);
-
   @override
   R visitMapLiteralEntry(MapLiteralEntry node) => visitNode(node);
 
@@ -3482,10 +3355,6 @@
   @override
   R visitScriptTag(ScriptTag scriptTag) => visitNode(scriptTag);
 
-  @deprecated
-  @override
-  R visitSetLiteral2(SetLiteral2 node) => visitNode(node);
-
   @override
   R visitSetOrMapLiteral(SetOrMapLiteral node) => visitNode(node);
 
@@ -3572,19 +3441,13 @@
   R visitYieldStatement(YieldStatement node) => visitNode(node);
 }
 
-/**
- * A helper class used to implement the correct order of visits for a
- * [BreadthFirstVisitor].
- */
+/// A helper class used to implement the correct order of visits for a
+/// [BreadthFirstVisitor].
 class _BreadthFirstChildVisitor extends UnifyingAstVisitor<void> {
-  /**
-   * The [BreadthFirstVisitor] being helped by this visitor.
-   */
+  /// The [BreadthFirstVisitor] being helped by this visitor.
   final BreadthFirstVisitor outerVisitor;
 
-  /**
-   * Initialize a newly created visitor to help the [outerVisitor].
-   */
+  /// Initialize a newly created visitor to help the [outerVisitor].
   _BreadthFirstChildVisitor(this.outerVisitor);
 
   @override
diff --git a/pkg/analyzer/lib/dart/constant/value.dart b/pkg/analyzer/lib/dart/constant/value.dart
index 64a29c6..7799cc5 100644
--- a/pkg/analyzer/lib/dart/constant/value.dart
+++ b/pkg/analyzer/lib/dart/constant/value.dart
@@ -2,164 +2,134 @@
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
 
-/**
- * The interface used to access the result of constant evaluation.
- *
- * Because the analyzer does not have any of the code under analysis loaded, it
- * does not do real evaluation. Instead it performs a symbolic computation and
- * presents those results through this interface.
- *
- * Instances of these constant values are accessed through the
- * [element model](../element/element.dart).
- */
+/// The interface used to access the result of constant evaluation.
+///
+/// Because the analyzer does not have any of the code under analysis loaded, it
+/// does not do real evaluation. Instead it performs a symbolic computation and
+/// presents those results through this interface.
+///
+/// Instances of these constant values are accessed through the
+/// [element model](../element/element.dart).
 import 'package:analyzer/dart/element/type.dart';
 
-/**
- * A representation of the value of a compile-time constant expression.
- *
- * Note that, unlike the mirrors system, the object being represented does *not*
- * exist. This interface allows static analysis tools to determine something
- * about the state of the object that would exist if the code that creates the
- * object were executed, but none of the code being analyzed is actually
- * executed.
- *
- * Clients may not extend, implement or mix-in this class.
- */
+/// A representation of the value of a compile-time constant expression.
+///
+/// Note that, unlike the mirrors system, the object being represented does *not*
+/// exist. This interface allows static analysis tools to determine something
+/// about the state of the object that would exist if the code that creates the
+/// object were executed, but none of the code being analyzed is actually
+/// executed.
+///
+/// Clients may not extend, implement or mix-in this class.
 abstract class DartObject {
-  /**
-   * Return `true` if the value of the object being represented is known.
-   *
-   * This method will return `false` if
-   * * the value being represented is the value of a declared variable (a
-   *   variable whose value is provided at run-time using a `-D` command-line
-   *   option), or
-   * * the value is a function.
-   *
-   * The result of this method does not imply anything about the state of
-   * object representations returned by the method [getField], those that are
-   * elements of the list returned by [toListValue], or the keys or values in
-   * the map returned by [toMapValue]. For example, a representation of a list
-   * can return `true` even if one or more of the elements of that list would
-   * return `false`.
-   */
+  /// Return `true` if the value of the object being represented is known.
+  ///
+  /// This method will return `false` if
+  /// * the value being represented is the value of a declared variable (a
+  ///   variable whose value is provided at run-time using a `-D` command-line
+  ///   option), or
+  /// * the value is a function.
+  ///
+  /// The result of this method does not imply anything about the state of
+  /// object representations returned by the method [getField], those that are
+  /// elements of the list returned by [toListValue], or the keys or values in
+  /// the map returned by [toMapValue]. For example, a representation of a list
+  /// can return `true` even if one or more of the elements of that list would
+  /// return `false`.
   bool get hasKnownValue;
 
-  /**
-   * Return `true` if the object being represented represents the value 'null'.
-   */
+  /// Return `true` if the object being represented represents the value 'null'.
   bool get isNull;
 
-  /**
-   * Return a representation of the type of the object being represented.
-   *
-   * For values resulting from the invocation of a 'const' constructor, this
-   * will be a representation of the run-time type of the object.
-   *
-   * For values resulting from a literal expression, this will be a
-   * representation of the static type of the value -- `int` for integer
-   * literals, `List` for list literals, etc. -- even when the static type is an
-   * abstract type (such as `List`) and hence will never be the run-time type of
-   * the represented object.
-   *
-   * For values resulting from any other kind of expression, this will be a
-   * representation of the result of evaluating the expression.
-   *
-   * Return `null` if the expression cannot be evaluated, either because it is
-   * not a valid constant expression or because one or more of the values used
-   * in the expression does not have a known value.
-   *
-   * This method can return a representation of the type, even if this object
-   * would return `false` from [hasKnownValue].
-   */
+  /// Return a representation of the type of the object being represented.
+  ///
+  /// For values resulting from the invocation of a 'const' constructor, this
+  /// will be a representation of the run-time type of the object.
+  ///
+  /// For values resulting from a literal expression, this will be a
+  /// representation of the static type of the value -- `int` for integer
+  /// literals, `List` for list literals, etc. -- even when the static type is an
+  /// abstract type (such as `List`) and hence will never be the run-time type of
+  /// the represented object.
+  ///
+  /// For values resulting from any other kind of expression, this will be a
+  /// representation of the result of evaluating the expression.
+  ///
+  /// Return `null` if the expression cannot be evaluated, either because it is
+  /// not a valid constant expression or because one or more of the values used
+  /// in the expression does not have a known value.
+  ///
+  /// This method can return a representation of the type, even if this object
+  /// would return `false` from [hasKnownValue].
   ParameterizedType get type;
 
-  /**
-   * Return a representation of the value of the field with the given [name].
-   *
-   * Return `null` if either the object being represented does not have a field
-   * with the given name or if the implementation of the class of the object is
-   * invalid, making it impossible to determine that value of the field.
-   *
-   * Note that, unlike the mirrors API, this method does *not* invoke a getter;
-   * it simply returns a representation of the known state of a field.
-   */
+  /// Return a representation of the value of the field with the given [name].
+  ///
+  /// Return `null` if either the object being represented does not have a field
+  /// with the given name or if the implementation of the class of the object is
+  /// invalid, making it impossible to determine that value of the field.
+  ///
+  /// Note that, unlike the mirrors API, this method does *not* invoke a getter;
+  /// it simply returns a representation of the known state of a field.
   DartObject getField(String name);
 
-  /**
-   * Return a boolean corresponding to the value of the object being
-   * represented, or `null` if
-   * * this object is not of type 'bool',
-   * * the value of the object being represented is not known, or
-   * * the value of the object being represented is `null`.
-   */
+  /// Return a boolean corresponding to the value of the object being
+  /// represented, or `null` if
+  /// * this object is not of type 'bool',
+  /// * the value of the object being represented is not known, or
+  /// * the value of the object being represented is `null`.
   bool toBoolValue();
 
-  /**
-   * Return a double corresponding to the value of the object being represented,
-   * or `null`
-   * if
-   * * this object is not of type 'double',
-   * * the value of the object being represented is not known, or
-   * * the value of the object being represented is `null`.
-   */
+  /// Return a double corresponding to the value of the object being represented,
+  /// or `null`
+  /// if
+  /// * this object is not of type 'double',
+  /// * the value of the object being represented is not known, or
+  /// * the value of the object being represented is `null`.
   double toDoubleValue();
 
-  /**
-   * Return an integer corresponding to the value of the object being
-   * represented, or `null` if
-   * * this object is not of type 'int',
-   * * the value of the object being represented is not known, or
-   * * the value of the object being represented is `null`.
-   */
+  /// Return an integer corresponding to the value of the object being
+  /// represented, or `null` if
+  /// * this object is not of type 'int',
+  /// * the value of the object being represented is not known, or
+  /// * the value of the object being represented is `null`.
   int toIntValue();
 
-  /**
-   * Return a list corresponding to the value of the object being represented,
-   * or `null` if
-   * * this object is not of type 'List', or
-   * * the value of the object being represented is `null`.
-   */
+  /// Return a list corresponding to the value of the object being represented,
+  /// or `null` if
+  /// * this object is not of type 'List', or
+  /// * the value of the object being represented is `null`.
   List<DartObject> toListValue();
 
-  /**
-   * Return a map corresponding to the value of the object being represented, or
-   * `null` if
-   * * this object is not of type 'Map', or
-   * * the value of the object being represented is `null`.
-   */
+  /// Return a map corresponding to the value of the object being represented, or
+  /// `null` if
+  /// * this object is not of type 'Map', or
+  /// * the value of the object being represented is `null`.
   Map<DartObject, DartObject> toMapValue();
 
-  /**
-   * Return a set corresponding to the value of the object being represented,
-   * or `null` if
-   * * this object is not of type 'Set', or
-   * * the value of the object being represented is `null`.
-   */
+  /// Return a set corresponding to the value of the object being represented,
+  /// or `null` if
+  /// * this object is not of type 'Set', or
+  /// * the value of the object being represented is `null`.
   Set<DartObject> toSetValue();
 
-  /**
-   * Return a string corresponding to the value of the object being represented,
-   * or `null` if
-   * * this object is not of type 'String',
-   * * the value of the object being represented is not known, or
-   * * the value of the object being represented is `null`.
-   */
+  /// Return a string corresponding to the value of the object being represented,
+  /// or `null` if
+  /// * this object is not of type 'String',
+  /// * the value of the object being represented is not known, or
+  /// * the value of the object being represented is `null`.
   String toStringValue();
 
-  /**
-   * Return a string corresponding to the value of the object being represented,
-   * or `null` if
-   * * this object is not of type 'Symbol', or
-   * * the value of the object being represented is `null`.
-   * (We return the string
-   */
+  /// Return a string corresponding to the value of the object being represented,
+  /// or `null` if
+  /// * this object is not of type 'Symbol', or
+  /// * the value of the object being represented is `null`.
+  /// (We return the string
   String toSymbolValue();
 
-  /**
-   * Return the representation of the type corresponding to the value of the
-   * object being represented, or `null` if
-   * * this object is not of type 'Type', or
-   * * the value of the object being represented is `null`.
-   */
+  /// Return the representation of the type corresponding to the value of the
+  /// object being represented, or `null` if
+  /// * this object is not of type 'Type', or
+  /// * the value of the object being represented is `null`.
   DartType toTypeValue();
 }
diff --git a/pkg/analyzer/lib/dart/element/type.dart b/pkg/analyzer/lib/dart/element/type.dart
index c4beb80..7c752c2 100644
--- a/pkg/analyzer/lib/dart/element/type.dart
+++ b/pkg/analyzer/lib/dart/element/type.dart
@@ -1,141 +1,108 @@
-// Copyright (c) 2014, the Dart project authors.  Please see the AUTHORS file
+// Copyright (c) 2014, the Dart project authors. Please see the AUTHORS file
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
 
-/**
- * Defines the type model. The type model is part of the
- * [element model](../dart_element_element/dart_element_element-library.html)
- * in that most types are defined by Dart code (the types `dynamic` and `void`
- * being the notable exceptions). All types are represented by an instance of a
- * subclass of [DartType].
- *
- * Other than `dynamic` and `void`, all of the types define either the interface
- * defined by a class (an instance of [InterfaceType]) or the type of a function
- * (an instance of [FunctionType]).
- *
- * We make a distinction between the declaration of a class (a [ClassElement])
- * and the type defined by that class (an [InterfaceType]). The biggest reason
- * for the distinction is to allow us to more cleanly represent the distinction
- * between type parameters and type arguments. For example, if we define a class
- * as `class Pair<K, V> {}`, the declarations of `K` and `V` represent type
- * parameters. But if we declare a variable as `Pair<String, int> pair;` the
- * references to `String` and `int` are type arguments.
- */
+/// Defines the type model. The type model is part of the
+/// [element model](../dart_element_element/dart_element_element-library.html)
+/// in that most types are defined by Dart code (the types `dynamic` and `void`
+/// being the notable exceptions). All types are represented by an instance of a
+/// subclass of [DartType].
+///
+/// Other than `dynamic` and `void`, all of the types define either the
+/// interface defined by a class (an instance of [InterfaceType]) or the type of
+/// a function (an instance of [FunctionType]).
+///
+/// We make a distinction between the declaration of a class (a [ClassElement])
+/// and the type defined by that class (an [InterfaceType]). The biggest reason
+/// for the distinction is to allow us to more cleanly represent the distinction
+/// between type parameters and type arguments. For example, if we define a
+/// class as `class Pair<K, V> {}`, the declarations of `K` and `V` represent
+/// type parameters. But if we declare a variable as `Pair<String, int> pair;`
+/// the references to `String` and `int` are type arguments.
 import 'package:analyzer/dart/element/element.dart';
 import 'package:analyzer/src/dart/element/type.dart' show InterfaceTypeImpl;
 import 'package:analyzer/src/generated/type_system.dart' show TypeSystem;
 
-/**
- * The type associated with elements in the element model.
- *
- * Clients may not extend, implement or mix-in this class.
- */
+/// The type associated with elements in the element model.
+///
+/// Clients may not extend, implement or mix-in this class.
 abstract class DartType {
-  /**
-   * Return the name of this type as it should appear when presented to users in
-   * contexts such as error messages.
-   */
+  /// Return the name of this type as it should appear when presented to users
+  /// in contexts such as error messages.
   String get displayName;
 
-  /**
-   * Return the element representing the declaration of this type, or `null` if
-   * the type has not, or cannot, be associated with an element. The former case
-   * will occur if the element model is not yet complete; the latter case will
-   * occur if this object represents an undefined type.
-   */
+  /// Return the element representing the declaration of this type, or `null` if
+  /// the type has not, or cannot, be associated with an element. The former
+  /// case will occur if the element model is not yet complete; the latter case
+  /// will occur if this object represents an undefined type.
   Element get element;
 
-  /**
-   * Return `true` if this type represents the bottom type.
-   */
+  /// Return `true` if this type represents the bottom type.
   bool get isBottom;
 
-  /**
-   * Return `true` if this type represents the type 'Future' defined in the
-   * dart:async library.
-   */
+  /// Return `true` if this type represents the type 'Future' defined in the
+  /// dart:async library.
   bool get isDartAsyncFuture;
 
-  /**
-   * Return `true` if this type represents the type 'FutureOr<T>' defined in the
-   * dart:async library.
-   */
+  /// Return `true` if this type represents the type 'FutureOr<T>' defined in
+  /// the dart:async library.
   bool get isDartAsyncFutureOr;
 
-  /**
-   * Return `true` if this type represents the type 'bool' defined in the
-   * dart:core library.
-   */
+  /// Return `true` if this type represents the type 'bool' defined in the
+  /// dart:core library.
   bool get isDartCoreBool;
 
-  /**
-   * Return `true` if this type represents the type 'double' defined in the
-   * dart:core library.
-   */
+  /// Return `true` if this type represents the type 'double' defined in the
+  /// dart:core library.
   bool get isDartCoreDouble;
 
-  /**
-   * Return `true` if this type represents the type 'Function' defined in the
-   * dart:core library.
-   */
+  /// Return `true` if this type represents the type 'Function' defined in the
+  /// dart:core library.
   bool get isDartCoreFunction;
 
-  /**
-   * Return `true` if this type represents the type 'int' defined in the
-   * dart:core library.
-   */
+  /// Return `true` if this type represents the type 'int' defined in the
+  /// dart:core library.
   bool get isDartCoreInt;
 
-  /**
-   * Return `true` if this type represents the type 'Null' defined in the
-   * dart:core library.
-   */
+  /// Return `true` if this type represents the type 'Null' defined in the
+  /// dart:core library.
   bool get isDartCoreNull;
 
-  /**
-   * Return `true` if this type represents the type 'dynamic'.
-   */
+  /// Return `true` if this type represents the type 'String' defined in the
+  /// dart:core library.
+  bool get isDartCoreString;
+
+  /// Return `true` if this type represents the type 'dynamic'.
   bool get isDynamic;
 
-  /**
-   * Return `true` if this type represents the type 'Object'.
-   */
+  /// Return `true` if this type represents the type 'Object'.
   bool get isObject;
 
-  /**
-   * Return `true` if this type represents a typename that couldn't be resolved.
-   */
+  /// Return `true` if this type represents a typename that couldn't be
+  /// resolved.
   bool get isUndefined;
 
-  /**
-   * Return `true` if this type represents the type 'void'.
-   */
+  /// Return `true` if this type represents the type 'void'.
   bool get isVoid;
 
-  /**
-   * Return the name of this type, or `null` if the type does not have a name,
-   * such as when the type represents the type of an unnamed function.
-   */
+  /// Return the name of this type, or `null` if the type does not have a name,
+  /// such as when the type represents the type of an unnamed function.
   String get name;
 
-  /**
-   * Implements the function "flatten" defined in the spec, where T is this
-   * type:
-   *
-   *     If T = Future<S> then flatten(T) = flatten(S).
-   *
-   *     Otherwise if T <: Future then let S be a type such that T << Future<S>
-   *     and for all R, if T << Future<R> then S << R.  Then flatten(T) = S.
-   *
-   *     In any other circumstance, flatten(T) = T.
-   */
+  /// Implements the function "flatten" defined in the spec, where T is this
+  /// type:
+  ///
+  ///     If T = Future<S> then flatten(T) = flatten(S).
+  ///
+  ///     Otherwise if T <: Future then let S be a type such that T << Future<S>
+  ///     and for all R, if T << Future<R> then S << R.  Then flatten(T) = S.
+  ///
+  ///     In any other circumstance, flatten(T) = T.
   DartType flattenFutures(TypeSystem typeSystem);
 
-  /**
-   * Return `true` if this type is assignable to the given [type]. A type
-   * <i>T</i> may be assigned to a type <i>S</i>, written <i>T</i> &hArr;
-   * <i>S</i>, iff either <i>T</i> <: <i>S</i> or <i>S</i> <: <i>T</i>.
-   */
+  /// Return `true` if this type is assignable to the given [type]. A type
+  /// <i>T</i> may be assigned to a type <i>S</i>, written <i>T</i> &hArr;
+  /// <i>S</i>, iff either <i>T</i> <: <i>S</i> or <i>S</i> <: <i>T</i>.
   bool isAssignableTo(DartType type);
 
   /// Indicates whether `this` represents a type that is equivalent to `dest`.
@@ -148,196 +115,165 @@
   /// `isEquivalentTo` considers them to be equivalent.
   bool isEquivalentTo(DartType dest);
 
-  /**
-   * Return `true` if this type is more specific than the given [type].
-   */
+  /// Return `true` if this type is more specific than the given [type].
   bool isMoreSpecificThan(DartType type);
 
-  /**
-   * Return `true` if this type is a subtype of the given [type].
-   */
+  /// Return `true` if this type is a subtype of the given [type].
   bool isSubtypeOf(DartType type);
 
-  /**
-   * Return `true` if this type is a supertype of the given [type]. A type
-   * <i>S</i> is a supertype of <i>T</i>, written <i>S</i> :> <i>T</i>, iff
-   * <i>T</i> is a subtype of <i>S</i>.
-   */
+  /// Return `true` if this type is a supertype of the given [type]. A type
+  /// <i>S</i> is a supertype of <i>T</i>, written <i>S</i> :> <i>T</i>, iff
+  /// <i>T</i> is a subtype of <i>S</i>.
   bool isSupertypeOf(DartType type);
 
-  /**
-   * If this type is a [TypeParameterType], returns its bound if it has one, or
-   * [objectType] otherwise.
-   *
-   * For any other type, returns `this`. Applies recursively -- if the bound is
-   * itself a type parameter, that is resolved too.
-   */
+  /// If this type is a [TypeParameterType], returns its bound if it has one, or
+  /// [objectType] otherwise.
+  ///
+  /// For any other type, returns `this`. Applies recursively -- if the bound is
+  /// itself a type parameter, that is resolved too.
   DartType resolveToBound(DartType objectType);
 
-  /**
-   * Return the type resulting from substituting the given [argumentTypes] for
-   * the given [parameterTypes] in this type. The specification defines this
-   * operation in section 2:
-   * <blockquote>
-   * The notation <i>[x<sub>1</sub>, ..., x<sub>n</sub>/y<sub>1</sub>, ...,
-   * y<sub>n</sub>]E</i> denotes a copy of <i>E</i> in which all occurrences of
-   * <i>y<sub>i</sub>, 1 <= i <= n</i> have been replaced with
-   * <i>x<sub>i</sub></i>.
-   * </blockquote>
-   * Note that, contrary to the specification, this method will not create a
-   * copy of this type if no substitutions were required, but will return this
-   * type directly.
-   *
-   * Note too that the current implementation of this method is only guaranteed
-   * to work when the parameter types are type variables.
-   */
+  /// Return the type resulting from substituting the given [argumentTypes] for
+  /// the given [parameterTypes] in this type. The specification defines this
+  /// operation in section 2:
+  /// <blockquote>
+  /// The notation <i>[x<sub>1</sub>, ..., x<sub>n</sub>/y<sub>1</sub>, ...,
+  /// y<sub>n</sub>]E</i> denotes a copy of <i>E</i> in which all occurrences of
+  /// <i>y<sub>i</sub>, 1 <= i <= n</i> have been replaced with
+  /// <i>x<sub>i</sub></i>.
+  /// </blockquote>
+  /// Note that, contrary to the specification, this method will not create a
+  /// copy of this type if no substitutions were required, but will return this
+  /// type directly.
+  ///
+  /// Note too that the current implementation of this method is only guaranteed
+  /// to work when the parameter types are type variables.
   DartType substitute2(
       List<DartType> argumentTypes, List<DartType> parameterTypes);
 }
 
-/**
- * The type of a function, method, constructor, getter, or setter. Function
- * types come in three variations:
- *
- * * The types of functions that only have required parameters. These have the
- *   general form <i>(T<sub>1</sub>, &hellip;, T<sub>n</sub>) &rarr; T</i>.
- * * The types of functions with optional positional parameters. These have the
- *   general form <i>(T<sub>1</sub>, &hellip;, T<sub>n</sub>, [T<sub>n+1</sub>
- *   &hellip;, T<sub>n+k</sub>]) &rarr; T</i>.
- * * The types of functions with named parameters. These have the general form
- *   <i>(T<sub>1</sub>, &hellip;, T<sub>n</sub>, {T<sub>x1</sub> x1, &hellip;,
- *   T<sub>xk</sub> xk}) &rarr; T</i>.
- *
- * Clients may not extend, implement or mix-in this class.
- */
+/// The type of a function, method, constructor, getter, or setter. Function
+/// types come in three variations:
+///
+/// * The types of functions that only have required parameters. These have the
+///   general form <i>(T<sub>1</sub>, &hellip;, T<sub>n</sub>) &rarr; T</i>.
+/// * The types of functions with optional positional parameters. These have the
+///   general form <i>(T<sub>1</sub>, &hellip;, T<sub>n</sub>, [T<sub>n+1</sub>
+///   &hellip;, T<sub>n+k</sub>]) &rarr; T</i>.
+/// * The types of functions with named parameters. These have the general form
+///   <i>(T<sub>1</sub>, &hellip;, T<sub>n</sub>, {T<sub>x1</sub> x1, &hellip;,
+///   T<sub>xk</sub> xk}) &rarr; T</i>.
+///
+/// Clients may not extend, implement or mix-in this class.
 abstract class FunctionType implements ParameterizedType {
-  /**
-   * Deprecated: use [typeFormals].
-   */
+  /// Deprecated: use [typeFormals].
   @deprecated
   List<TypeParameterElement> get boundTypeParameters;
 
-  /**
-   * Return a map from the names of named parameters to the types of the named
-   * parameters of this type of function. The entries in the map will be
-   * iterated in the same order as the order in which the named parameters were
-   * defined. If there were no named parameters declared then the map will be
-   * empty.
-   */
+  /// Return a map from the names of named parameters to the types of the named
+  /// parameters of this type of function. The entries in the map will be
+  /// iterated in the same order as the order in which the named parameters were
+  /// defined. If there were no named parameters declared then the map will be
+  /// empty.
   Map<String, DartType> get namedParameterTypes;
 
-  /**
-   * The names of the required positional parameters of this type of function,
-   * in the order that the parameters appear.
-   */
+  /// The names of the required positional parameters of this type of function,
+  /// in the order that the parameters appear.
   List<String> get normalParameterNames;
 
-  /**
-   * Return a list containing the types of the normal parameters of this type of
-   * function. The parameter types are in the same order as they appear in the
-   * declaration of the function.
-   */
+  /// Return a list containing the types of the normal parameters of this type
+  /// of function. The parameter types are in the same order as they appear in
+  /// the declaration of the function.
   List<DartType> get normalParameterTypes;
 
-  /**
-   * The names of the optional positional parameters of this type of function,
-   * in the order that the parameters appear.
-   */
+  /// The names of the optional positional parameters of this type of function,
+  /// in the order that the parameters appear.
   List<String> get optionalParameterNames;
 
-  /**
-   * Return a map from the names of optional (positional) parameters to the
-   * types of the optional parameters of this type of function. The entries in
-   * the map will be iterated in the same order as the order in which the
-   * optional parameters were defined. If there were no optional parameters
-   * declared then the map will be empty.
-   */
+  /// Return a map from the names of optional (positional) parameters to the
+  /// types of the optional parameters of this type of function. The entries in
+  /// the map will be iterated in the same order as the order in which the
+  /// optional parameters were defined. If there were no optional parameters
+  /// declared then the map will be empty.
   List<DartType> get optionalParameterTypes;
 
-  /**
-   * Return a list containing the parameters elements of this type of function.
-   * The parameter types are in the same order as they appear in the declaration
-   * of the function.
-   */
+  /// Return a list containing the parameters elements of this type of function.
+  /// The parameter types are in the same order as they appear in the
+  /// declaration of the function.
   List<ParameterElement> get parameters;
 
-  /**
-   * Return the type of object returned by this type of function.
-   */
+  /// Return the type of object returned by this type of function.
   DartType get returnType;
 
-  /**
-   * The formal type parameters of this generic function.
-   * For example `<T> T -> T`.
-   *
-   * These are distinct from the [typeParameters] list, which contains type
-   * parameters from surrounding contexts, and thus are free type variables from
-   * the perspective of this function type.
-   */
+  /// The formal type parameters of this generic function.
+  /// For example `<T> T -> T`.
+  ///
+  /// These are distinct from the [typeParameters] list, which contains type
+  /// parameters from surrounding contexts, and thus are free type variables
+  /// from the perspective of this function type.
   List<TypeParameterElement> get typeFormals;
 
   @override
   FunctionType instantiate(List<DartType> argumentTypes);
 
-  /**
-   * Return `true` if this type is a subtype of the given [type].
-   *
-   * A function type <i>(T<sub>1</sub>, &hellip;, T<sub>n</sub>) &rarr; T</i> is
-   * a subtype of the function type <i>(S<sub>1</sub>, &hellip;, S<sub>n</sub>)
-   * &rarr; S</i>, if all of the following conditions are met:
-   *
-   * * Either
-   *   * <i>S</i> is void, or
-   *   * <i>T &hArr; S</i>.
-   *
-   * * For all <i>i</i>, 1 <= <i>i</i> <= <i>n</i>, <i>T<sub>i</sub> &hArr;
-   *   S<sub>i</sub></i>.
-   *
-   * A function type <i>(T<sub>1</sub>, &hellip;, T<sub>n</sub>,
-   * [T<sub>n+1</sub>, &hellip;, T<sub>n+k</sub>]) &rarr; T</i> is a subtype of
-   * the function type <i>(S<sub>1</sub>, &hellip;, S<sub>n</sub>,
-   * [S<sub>n+1</sub>, &hellip;, S<sub>n+m</sub>]) &rarr; S</i>, if all of the
-   * following conditions are met:
-   *
-   * * Either
-   *   * <i>S</i> is void, or
-   *   * <i>T &hArr; S</i>.
-   *
-   * * <i>k</i> >= <i>m</i> and for all <i>i</i>, 1 <= <i>i</i> <= <i>n+m</i>,
-   *   <i>T<sub>i</sub> &hArr; S<sub>i</sub></i>.
-   *
-   * A function type <i>(T<sub>1</sub>, &hellip;, T<sub>n</sub>,
-   * {T<sub>x1</sub> x1, &hellip;, T<sub>xk</sub> xk}) &rarr; T</i> is a subtype
-   * of the function type <i>(S<sub>1</sub>, &hellip;, S<sub>n</sub>,
-   * {S<sub>y1</sub> y1, &hellip;, S<sub>ym</sub> ym}) &rarr; S</i>, if all of
-   * the following conditions are met:
-   * * Either
-   *   * <i>S</i> is void,
-   *   * or <i>T &hArr; S</i>.
-   *
-   * * For all <i>i</i>, 1 <= <i>i</i> <= <i>n</i>, <i>T<sub>i</sub> &hArr;
-   *   S<sub>i</sub></i>.
-   * * <i>k</i> >= <i>m</i> and <i>y<sub>i</sub></i> in <i>{x<sub>1</sub>,
-   *   &hellip;, x<sub>k</sub>}</i>, 1 <= <i>i</i> <= <i>m</i>.
-   * * For all <i>y<sub>i</sub></i> in <i>{y<sub>1</sub>, &hellip;,
-   *   y<sub>m</sub>}</i>, <i>y<sub>i</sub> = x<sub>j</sub> => Tj &hArr; Si</i>.
-   *
-   * In addition, the following subtype rules apply:
-   *
-   * <i>(T<sub>1</sub>, &hellip;, T<sub>n</sub>, []) &rarr; T <: (T<sub>1</sub>,
-   * &hellip;, T<sub>n</sub>) &rarr; T.</i><br>
-   * <i>(T<sub>1</sub>, &hellip;, T<sub>n</sub>) &rarr; T <: (T<sub>1</sub>,
-   * &hellip;, T<sub>n</sub>, {}) &rarr; T.</i><br>
-   * <i>(T<sub>1</sub>, &hellip;, T<sub>n</sub>, {}) &rarr; T <: (T<sub>1</sub>,
-   * &hellip;, T<sub>n</sub>) &rarr; T.</i><br>
-   * <i>(T<sub>1</sub>, &hellip;, T<sub>n</sub>) &rarr; T <: (T<sub>1</sub>,
-   * &hellip;, T<sub>n</sub>, []) &rarr; T.</i>
-   *
-   * All functions implement the class `Function`. However not all function
-   * types are a subtype of `Function`. If an interface type <i>I</i> includes a
-   * method named `call()`, and the type of `call()` is the function type
-   * <i>F</i>, then <i>I</i> is considered to be a subtype of <i>F</i>.
-   */
+  /// Return `true` if this type is a subtype of the given [type].
+  ///
+  /// A function type <i>(T<sub>1</sub>, &hellip;, T<sub>n</sub>) &rarr; T</i>
+  /// is a subtype of the function type <i>(S<sub>1</sub>, &hellip;,
+  /// S<sub>n</sub>) &rarr; S</i>, if all of the following conditions are met:
+  ///
+  /// * Either
+  ///   * <i>S</i> is void, or
+  ///   * <i>T &hArr; S</i>.
+  ///
+  /// * For all <i>i</i>, 1 <= <i>i</i> <= <i>n</i>, <i>T<sub>i</sub> &hArr;
+  ///   S<sub>i</sub></i>.
+  ///
+  /// A function type <i>(T<sub>1</sub>, &hellip;, T<sub>n</sub>,
+  /// [T<sub>n+1</sub>, &hellip;, T<sub>n+k</sub>]) &rarr; T</i> is a subtype of
+  /// the function type <i>(S<sub>1</sub>, &hellip;, S<sub>n</sub>,
+  /// [S<sub>n+1</sub>, &hellip;, S<sub>n+m</sub>]) &rarr; S</i>, if all of the
+  /// following conditions are met:
+  ///
+  /// * Either
+  ///   * <i>S</i> is void, or
+  ///   * <i>T &hArr; S</i>.
+  ///
+  /// * <i>k</i> >= <i>m</i> and for all <i>i</i>, 1 <= <i>i</i> <= <i>n+m</i>,
+  ///   <i>T<sub>i</sub> &hArr; S<sub>i</sub></i>.
+  ///
+  /// A function type <i>(T<sub>1</sub>, &hellip;, T<sub>n</sub>,
+  /// {T<sub>x1</sub> x1, &hellip;, T<sub>xk</sub> xk}) &rarr; T</i> is a
+  /// subtype of the function type <i>(S<sub>1</sub>, &hellip;, S<sub>n</sub>,
+  /// {S<sub>y1</sub> y1, &hellip;, S<sub>ym</sub> ym}) &rarr; S</i>, if all of
+  /// the following conditions are met:
+  /// * Either
+  ///   * <i>S</i> is void,
+  ///   * or <i>T &hArr; S</i>.
+  ///
+  /// * For all <i>i</i>, 1 <= <i>i</i> <= <i>n</i>, <i>T<sub>i</sub> &hArr;
+  ///   S<sub>i</sub></i>.
+  /// * <i>k</i> >= <i>m</i> and <i>y<sub>i</sub></i> in <i>{x<sub>1</sub>,
+  ///   &hellip;, x<sub>k</sub>}</i>, 1 <= <i>i</i> <= <i>m</i>.
+  /// * For all <i>y<sub>i</sub></i> in <i>{y<sub>1</sub>, &hellip;,
+  ///   y<sub>m</sub>}</i>, <i>y<sub>i</sub> = x<sub>j</sub> => Tj &hArr;
+  ///   Si</i>.
+  ///
+  /// In addition, the following subtype rules apply:
+  ///
+  /// <i>(T<sub>1</sub>, &hellip;, T<sub>n</sub>, []) &rarr; T <:
+  /// (T<sub>1</sub>, &hellip;, T<sub>n</sub>) &rarr; T.</i><br>
+  /// <i>(T<sub>1</sub>, &hellip;, T<sub>n</sub>) &rarr; T <: (T<sub>1</sub>,
+  /// &hellip;, T<sub>n</sub>, {}) &rarr; T.</i><br>
+  /// <i>(T<sub>1</sub>, &hellip;, T<sub>n</sub>, {}) &rarr; T <:
+  /// (T<sub>1</sub>, &hellip;, T<sub>n</sub>) &rarr; T.</i><br>
+  /// <i>(T<sub>1</sub>, &hellip;, T<sub>n</sub>) &rarr; T <: (T<sub>1</sub>,
+  /// &hellip;, T<sub>n</sub>, []) &rarr; T.</i>
+  ///
+  /// All functions implement the class `Function`. However not all function
+  /// types are a subtype of `Function`. If an interface type <i>I</i> includes
+  /// a method named `call()`, and the type of `call()` is the function type
+  /// <i>F</i>, then <i>I</i> is considered to be a subtype of <i>F</i>.
   @override
   bool isSubtypeOf(DartType type);
 
@@ -345,318 +281,269 @@
   FunctionType substitute2(
       List<DartType> argumentTypes, List<DartType> parameterTypes);
 
-  /**
-   * Return the type resulting from substituting the given [argumentTypes] for
-   * this type's parameters. This is fully equivalent to
-   * `substitute(argumentTypes, getTypeArguments())`.
-   */
+  /// Return the type resulting from substituting the given [argumentTypes] for
+  /// this type's parameters. This is fully equivalent to
+  /// `substitute(argumentTypes, getTypeArguments())`.
   @deprecated // use instantiate
   FunctionType substitute3(List<DartType> argumentTypes);
 }
 
-/**
- * The type introduced by either a class or an interface, or a reference to such
- * a type.
- *
- * Clients may not extend, implement or mix-in this class.
- */
+/// The type introduced by either a class or an interface, or a reference to
+/// such a type.
+///
+/// Clients may not extend, implement or mix-in this class.
 abstract class InterfaceType implements ParameterizedType {
-  /**
-   * Return a list containing all of the accessors (getters and setters)
-   * declared in this type.
-   */
+  /// Return a list containing all of the accessors (getters and setters)
+  /// declared in this type.
   List<PropertyAccessorElement> get accessors;
 
-  /**
-   * Return a list containing all of the constructors declared in this type.
-   */
+  /// Return a list containing all of the constructors declared in this type.
   List<ConstructorElement> get constructors;
 
   @override
   ClassElement get element;
 
-  /**
-   * Return a list containing all of the interfaces that are implemented by this
-   * interface. Note that this is <b>not</b>, in general, equivalent to getting
-   * the interfaces from this type's element because the types returned by this
-   * method will have had their type parameters replaced.
-   */
+  /// Return a list containing all of the interfaces that are implemented by
+  /// this interface. Note that this is <b>not</b>, in general, equivalent to
+  /// getting the interfaces from this type's element because the types returned
+  /// by this method will have had their type parameters replaced.
   List<InterfaceType> get interfaces;
 
-  /**
-   * Return a list containing all of the methods declared in this type.
-   */
+  /// Return a list containing all of the methods declared in this type.
   List<MethodElement> get methods;
 
-  /**
-   * Return a list containing all of the mixins that are applied to the class
-   * being extended in order to derive the superclass of this class. Note that
-   * this is <b>not</b>, in general, equivalent to getting the mixins from this
-   * type's element because the types returned by this method will have had
-   * their type parameters replaced.
-   */
+  /// Return a list containing all of the mixins that are applied to the class
+  /// being extended in order to derive the superclass of this class. Note that
+  /// this is <b>not</b>, in general, equivalent to getting the mixins from this
+  /// type's element because the types returned by this method will have had
+  /// their type parameters replaced.
   List<InterfaceType> get mixins;
 
-  /**
-   * Return the type representing the superclass of this type, or null if this
-   * type represents the class 'Object'. Note that this is <b>not</b>, in
-   * general, equivalent to getting the superclass from this type's element
-   * because the type returned by this method will have had it's type parameters
-   * replaced.
-   */
+  /// Return the type representing the superclass of this type, or null if this
+  /// type represents the class 'Object'. Note that this is <b>not</b>, in
+  /// general, equivalent to getting the superclass from this type's element
+  /// because the type returned by this method will have had it's type
+  /// parameters replaced.
   InterfaceType get superclass;
 
-  /**
-   * Return a list containing all of the super-class constraints that this
-   * mixin declaration declares. The list will be empty if this class does not
-   * represent a mixin declaration.
-   */
+  /// Return a list containing all of the super-class constraints that this
+  /// mixin declaration declares. The list will be empty if this class does not
+  /// represent a mixin declaration.
   List<InterfaceType> get superclassConstraints;
 
-  /**
-   * Return the element representing the getter with the given [name] that is
-   * declared in this class, or `null` if this class does not declare a getter
-   * with the given name.
-   */
+  /// Return the element representing the getter with the given [name] that is
+  /// declared in this class, or `null` if this class does not declare a getter
+  /// with the given name.
   PropertyAccessorElement getGetter(String name);
 
-  /**
-   * Return the element representing the method with the given [name] that is
-   * declared in this class, or `null` if this class does not declare a method
-   * with the given name.
-   */
+  /// Return the element representing the method with the given [name] that is
+  /// declared in this class, or `null` if this class does not declare a method
+  /// with the given name.
   MethodElement getMethod(String name);
 
-  /**
-   * Return the element representing the setter with the given [name] that is
-   * declared in this class, or `null` if this class does not declare a setter
-   * with the given name.
-   */
+  /// Return the element representing the setter with the given [name] that is
+  /// declared in this class, or `null` if this class does not declare a setter
+  /// with the given name.
   PropertyAccessorElement getSetter(String name);
 
   @override
   InterfaceType instantiate(List<DartType> argumentTypes);
 
-  /**
-   * Return `true` if this type is a direct supertype of the given [type]. The
-   * implicit interface of class <i>I</i> is a direct supertype of the implicit
-   * interface of class <i>J</i> iff:
-   *
-   * * <i>I</i> is Object, and <i>J</i> has no extends clause.
-   * * <i>I</i> is listed in the extends clause of <i>J</i>.
-   * * <i>I</i> is listed in the implements clause of <i>J</i>.
-   * * <i>I</i> is listed in the with clause of <i>J</i>.
-   * * <i>J</i> is a mixin application of the mixin of <i>I</i>.
-   */
+  /// Return `true` if this type is a direct supertype of the given [type]. The
+  /// implicit interface of class <i>I</i> is a direct supertype of the implicit
+  /// interface of class <i>J</i> iff:
+  ///
+  /// * <i>I</i> is Object, and <i>J</i> has no extends clause.
+  /// * <i>I</i> is listed in the extends clause of <i>J</i>.
+  /// * <i>I</i> is listed in the implements clause of <i>J</i>.
+  /// * <i>I</i> is listed in the with clause of <i>J</i>.
+  /// * <i>J</i> is a mixin application of the mixin of <i>I</i>.
   bool isDirectSupertypeOf(InterfaceType type);
 
-  /**
-   * Return `true` if this type is more specific than the given [type]. An
-   * interface type <i>T</i> is more specific than an interface type <i>S</i>,
-   * written <i>T &laquo; S</i>, if one of the following conditions is met:
-   *
-   * * Reflexivity: <i>T</i> is <i>S</i>.
-   * * <i>T</i> is bottom.
-   * * <i>S</i> is dynamic.
-   * * Direct supertype: <i>S</i> is a direct supertype of <i>T</i>.
-   * * <i>T</i> is a type parameter and <i>S</i> is the upper bound of <i>T</i>.
-   * * Covariance: <i>T</i> is of the form <i>I&lt;T<sub>1</sub>, &hellip;,
-   *   T<sub>n</sub>&gt;</i> and S</i> is of the form <i>I&lt;S<sub>1</sub>,
-   *   &hellip;, S<sub>n</sub>&gt;</i> and <i>T<sub>i</sub> &laquo;
-   *   S<sub>i</sub></i>, <i>1 <= i <= n</i>.
-   * * Transitivity: <i>T &laquo; U</i> and <i>U &laquo; S</i>.
-   */
+  /// Return `true` if this type is more specific than the given [type]. An
+  /// interface type <i>T</i> is more specific than an interface type <i>S</i>,
+  /// written <i>T &laquo; S</i>, if one of the following conditions is met:
+  ///
+  /// * Reflexivity: <i>T</i> is <i>S</i>.
+  /// * <i>T</i> is bottom.
+  /// * <i>S</i> is dynamic.
+  /// * Direct supertype: <i>S</i> is a direct supertype of <i>T</i>.
+  /// * <i>T</i> is a type parameter and <i>S</i> is the upper bound of
+  /// <i>T</i>.
+  /// * Covariance: <i>T</i> is of the form <i>I&lt;T<sub>1</sub>, &hellip;,
+  ///   T<sub>n</sub>&gt;</i> and S</i> is of the form <i>I&lt;S<sub>1</sub>,
+  ///   &hellip;, S<sub>n</sub>&gt;</i> and <i>T<sub>i</sub> &laquo;
+  ///   S<sub>i</sub></i>, <i>1 <= i <= n</i>.
+  /// * Transitivity: <i>T &laquo; U</i> and <i>U &laquo; S</i>.
   @override
   bool isMoreSpecificThan(DartType type);
 
-  /**
-   * Return `true` if this type is a subtype of the given [type]. An interface
-   * type <i>T</i> is a subtype of an interface type <i>S</i>, written <i>T</i>
-   * <: <i>S</i>, iff <i>[bottom/dynamic]T</i> &laquo; <i>S</i> (<i>T</i> is
-   * more specific than <i>S</i>). If an interface type <i>I</i> includes a
-   * method named <i>call()</i>, and the type of <i>call()</i> is the function
-   * type <i>F</i>, then <i>I</i> is considered to be a subtype of <i>F</i>.
-   */
+  /// Return `true` if this type is a subtype of the given [type]. An interface
+  /// type <i>T</i> is a subtype of an interface type <i>S</i>, written <i>T</i>
+  /// <: <i>S</i>, iff <i>[bottom/dynamic]T</i> &laquo; <i>S</i> (<i>T</i> is
+  /// more specific than <i>S</i>). If an interface type <i>I</i> includes a
+  /// method named <i>call()</i>, and the type of <i>call()</i> is the function
+  /// type <i>F</i>, then <i>I</i> is considered to be a subtype of <i>F</i>.
   @override
   bool isSubtypeOf(DartType type);
 
-  /**
-   * Return the element representing the constructor that results from looking
-   * up the constructor with the given [name] in this class with respect to the
-   * given [library], or `null` if the look up fails. The behavior of this
-   * method is defined by the Dart Language Specification in section 12.11.1:
-   * <blockquote>
-   * If <i>e</i> is of the form <b>new</b> <i>T.id()</i> then let <i>q<i> be the
-   * constructor <i>T.id</i>, otherwise let <i>q<i> be the constructor <i>T<i>.
-   * Otherwise, if <i>q</i> is not defined or not accessible, a
-   * NoSuchMethodException is thrown.
-   * </blockquote>
-   */
+  /// Return the element representing the constructor that results from looking
+  /// up the constructor with the given [name] in this class with respect to the
+  /// given [library], or `null` if the look up fails. The behavior of this
+  /// method is defined by the Dart Language Specification in section 12.11.1:
+  /// <blockquote>
+  /// If <i>e</i> is of the form <b>new</b> <i>T.id()</i> then let <i>q<i> be
+  /// the constructor <i>T.id</i>, otherwise let <i>q<i> be the constructor
+  /// <i>T<i>. Otherwise, if <i>q</i> is not defined or not accessible, a
+  /// NoSuchMethodException is thrown.
+  /// </blockquote>
   ConstructorElement lookUpConstructor(String name, LibraryElement library);
 
-  /**
-   * Return the element representing the getter that results from looking up the
-   * getter with the given [name] in this class with respect to the given
-   * [library], or `null` if the look up fails. The behavior of this method is
-   * defined by the Dart Language Specification in section 12.15.1:
-   * <blockquote>
-   * The result of looking up getter (respectively setter) <i>m</i> in class
-   * <i>C</i> with respect to library <i>L</i> is:
-   * * If <i>C</i> declares an instance getter (respectively setter) named
-   *   <i>m</i> that is accessible to <i>L</i>, then that getter (respectively
-   *   setter) is the result of the lookup. Otherwise, if <i>C</i> has a
-   *   superclass <i>S</i>, then the result of the lookup is the result of
-   *   looking up getter (respectively setter) <i>m</i> in <i>S</i> with respect
-   *   to <i>L</i>. Otherwise, we say that the lookup has failed.
-   * </blockquote>
-   */
+  /// Return the element representing the getter that results from looking up
+  /// the getter with the given [name] in this class with respect to the given
+  /// [library], or `null` if the look up fails. The behavior of this method is
+  /// defined by the Dart Language Specification in section 12.15.1:
+  /// <blockquote>
+  /// The result of looking up getter (respectively setter) <i>m</i> in class
+  /// <i>C</i> with respect to library <i>L</i> is:
+  /// * If <i>C</i> declares an instance getter (respectively setter) named
+  ///   <i>m</i> that is accessible to <i>L</i>, then that getter (respectively
+  ///   setter) is the result of the lookup. Otherwise, if <i>C</i> has a
+  ///   superclass <i>S</i>, then the result of the lookup is the result of
+  ///   looking up getter (respectively setter) <i>m</i> in <i>S</i> with
+  ///   respect to <i>L</i>. Otherwise, we say that the lookup has failed.
+  /// </blockquote>
   PropertyAccessorElement lookUpGetter(String name, LibraryElement library);
 
-  /**
-   * Return the element representing the getter that results from looking up the
-   * getter with the given [name] in the superclass of this class with respect
-   * to the given [library], or `null` if the look up fails. The behavior of
-   * this method is defined by the Dart Language Specification in section
-   * 12.15.1:
-   * <blockquote>
-   * The result of looking up getter (respectively setter) <i>m</i> in class
-   * <i>C</i> with respect to library <i>L</i> is:
-   * * If <i>C</i> declares an instance getter (respectively setter) named
-   *   <i>m</i> that is accessible to <i>L</i>, then that getter (respectively
-   *   setter) is the result of the lookup. Otherwise, if <i>C</i> has a
-   *   superclass <i>S</i>, then the result of the lookup is the result of
-   *   looking up getter (respectively setter) <i>m</i> in <i>S</i> with respect
-   *   to <i>L</i>. Otherwise, we say that the lookup has failed.
-   * </blockquote>
-   */
+  /// Return the element representing the getter that results from looking up
+  /// the getter with the given [name] in the superclass of this class with
+  /// respect to the given [library], or `null` if the look up fails. The
+  /// behavior of this method is defined by the Dart Language Specification in
+  /// section 12.15.1:
+  /// <blockquote>
+  /// The result of looking up getter (respectively setter) <i>m</i> in class
+  /// <i>C</i> with respect to library <i>L</i> is:
+  /// * If <i>C</i> declares an instance getter (respectively setter) named
+  ///   <i>m</i> that is accessible to <i>L</i>, then that getter (respectively
+  ///   setter) is the result of the lookup. Otherwise, if <i>C</i> has a
+  ///   superclass <i>S</i>, then the result of the lookup is the result of
+  ///   looking up getter (respectively setter) <i>m</i> in <i>S</i> with
+  ///   respect to <i>L</i>. Otherwise, we say that the lookup has failed.
+  /// </blockquote>
   PropertyAccessorElement lookUpGetterInSuperclass(
       String name, LibraryElement library);
 
-  /**
-   * Look up the member with the given [name] in this type and all extended
-   * and mixed in classes, and by default including [thisType]. If the search
-   * fails, this will then search interfaces.
-   *
-   * Return the element representing the member that was found, or `null` if
-   * there is no getter with the given name.
-   *
-   * The [library] determines if a private member name is visible, and does not
-   * need to be supplied for public names.
-   */
+  /// Look up the member with the given [name] in this type and all extended
+  /// and mixed in classes, and by default including [thisType]. If the search
+  /// fails, this will then search interfaces.
+  ///
+  /// Return the element representing the member that was found, or `null` if
+  /// there is no getter with the given name.
+  ///
+  /// The [library] determines if a private member name is visible, and does not
+  /// need to be supplied for public names.
   PropertyAccessorElement lookUpInheritedGetter(String name,
       {LibraryElement library, bool thisType: true});
 
-  /**
-   * Look up the member with the given [name] in this type and all extended
-   * and mixed in classes, starting from this type. If the search fails,
-   * search interfaces.
-   *
-   * Return the element representing the member that was found, or `null` if
-   * there is no getter with the given name.
-   *
-   * The [library] determines if a private member name is visible, and does not
-   * need to be supplied for public names.
-   */
+  /// Look up the member with the given [name] in this type and all extended
+  /// and mixed in classes, starting from this type. If the search fails,
+  /// search interfaces.
+  ///
+  /// Return the element representing the member that was found, or `null` if
+  /// there is no getter with the given name.
+  ///
+  /// The [library] determines if a private member name is visible, and does not
+  /// need to be supplied for public names.
   ExecutableElement lookUpInheritedGetterOrMethod(String name,
       {LibraryElement library});
 
-  /**
-   * Look up the member with the given [name] in this type and all extended
-   * and mixed in classes, and by default including [thisType]. If the search
-   * fails, this will then search interfaces.
-   *
-   * Return the element representing the member that was found, or `null` if
-   * there is no getter with the given name.
-   *
-   * The [library] determines if a private member name is visible, and does not
-   * need to be supplied for public names.
-   */
+  /// Look up the member with the given [name] in this type and all extended
+  /// and mixed in classes, and by default including [thisType]. If the search
+  /// fails, this will then search interfaces.
+  ///
+  /// Return the element representing the member that was found, or `null` if
+  /// there is no getter with the given name.
+  ///
+  /// The [library] determines if a private member name is visible, and does not
+  /// need to be supplied for public names.
   MethodElement lookUpInheritedMethod(String name,
       {LibraryElement library, bool thisType: true});
 
-  /**
-   * Look up the member with the given [name] in this type and all extended
-   * and mixed in classes, and by default including [thisType]. If the search
-   * fails, this will then search interfaces.
-   *
-   * Return the element representing the member that was found, or `null` if
-   * there is no getter with the given name.
-   *
-   * The [library] determines if a private member name is visible, and does not
-   * need to be supplied for public names.
-   */
+  /// Look up the member with the given [name] in this type and all extended
+  /// and mixed in classes, and by default including [thisType]. If the search
+  /// fails, this will then search interfaces.
+  ///
+  /// Return the element representing the member that was found, or `null` if
+  /// there is no getter with the given name.
+  ///
+  /// The [library] determines if a private member name is visible, and does not
+  /// need to be supplied for public names.
   PropertyAccessorElement lookUpInheritedSetter(String name,
       {LibraryElement library, bool thisType: true});
 
-  /**
-   * Return the element representing the method that results from looking up the
-   * method with the given [name] in this class with respect to the given
-   * [library], or `null` if the look up fails. The behavior of this method is
-   * defined by the Dart Language Specification in section 12.15.1:
-   * <blockquote>
-   * The result of looking up method <i>m</i> in class <i>C</i> with respect to
-   * library <i>L</i> is:
-   * * If <i>C</i> declares an instance method named <i>m</i> that is accessible
-   *   to <i>L</i>, then that method is the result of the lookup. Otherwise, if
-   *   <i>C</i> has a superclass <i>S</i>, then the result of the lookup is the
-   *   result of looking up method <i>m</i> in <i>S</i> with respect to <i>L</i>
-   *   Otherwise, we say that the lookup has failed.
-   * </blockquote>
-   */
+  /// Return the element representing the method that results from looking up
+  /// the method with the given [name] in this class with respect to the given
+  /// [library], or `null` if the look up fails. The behavior of this method is
+  /// defined by the Dart Language Specification in section 12.15.1:
+  /// <blockquote>
+  /// The result of looking up method <i>m</i> in class <i>C</i> with respect to
+  /// library <i>L</i> is:
+  /// * If <i>C</i> declares an instance method named <i>m</i> that is
+  ///   accessible to <i>L</i>, then that method is the result of the lookup.
+  ///   Otherwise, if <i>C</i> has a superclass <i>S</i>, then the result of the
+  ///   lookup is the result of looking up method <i>m</i> in <i>S</i> with
+  ///   respect to <i>L</i> Otherwise, we say that the lookup has failed.
+  /// </blockquote>
   MethodElement lookUpMethod(String name, LibraryElement library);
 
-  /**
-   * Return the element representing the method that results from looking up the
-   * method with the given [name] in the superclass of this class with respect
-   * to the given [library], or `null` if the look up fails. The behavior of
-   * this method is defined by the Dart Language Specification in section
-   * 12.15.1:
-   * <blockquote>
-   * The result of looking up method <i>m</i> in class <i>C</i> with respect to
-   * library <i>L</i> is:
-   * * If <i>C</i> declares an instance method named <i>m</i> that is accessible
-   *   to <i>L</i>, then that method is the result of the lookup. Otherwise, if
-   * <i>C</i> has a superclass <i>S</i>, then the result of the lookup is the
-   * result of looking up method <i>m</i> in <i>S</i> with respect to <i>L</i>.
-   * Otherwise, we say that the lookup has failed.
-   * </blockquote>
-   */
+  /// Return the element representing the method that results from looking up
+  /// the method with the given [name] in the superclass of this class with
+  /// respect to the given [library], or `null` if the look up fails. The
+  /// behavior of this method is defined by the Dart Language Specification in
+  /// section 12.15.1:
+  /// <blockquote>
+  /// The result of looking up method <i>m</i> in class <i>C</i> with respect to
+  /// library <i>L</i> is:
+  /// * If <i>C</i> declares an instance method named <i>m</i> that is
+  ///   accessible to <i>L</i>, then that method is the result of the lookup.
+  ///   Otherwise, if <i>C</i> has a superclass <i>S</i>, then the result of the
+  /// * lookup is the result of looking up method <i>m</i> in <i>S</i> with
+  ///   respect to <i>L</i>.
+  /// * Otherwise, we say that the lookup has failed.
+  /// </blockquote>
   MethodElement lookUpMethodInSuperclass(String name, LibraryElement library);
 
-  /**
-   * Return the element representing the setter that results from looking up the
-   * setter with the given [name] in this class with respect to the given
-   * [library], or `null` if the look up fails. The behavior of this method is
-   * defined by the Dart Language Specification in section 12.16:
-   * <blockquote>
-   * The result of looking up getter (respectively setter) <i>m</i> in class
-   * <i>C</i> with respect to library <i>L</i> is:
-   * * If <i>C</i> declares an instance getter (respectively setter) named
-   *   <i>m</i> that is accessible to <i>L</i>, then that getter (respectively
-   *   setter) is the result of the lookup. Otherwise, if <i>C</i> has a
-   *   superclass <i>S</i>, then the result of the lookup is the result of
-   *   looking up getter (respectively setter) <i>m</i> in <i>S</i> with respect
-   *   to <i>L</i>. Otherwise, we say that the lookup has failed.
-   * </blockquote>
-   */
+  /// Return the element representing the setter that results from looking up
+  /// the setter with the given [name] in this class with respect to the given
+  /// [library], or `null` if the look up fails. The behavior of this method is
+  /// defined by the Dart Language Specification in section 12.16:
+  /// <blockquote>
+  /// The result of looking up getter (respectively setter) <i>m</i> in class
+  /// <i>C</i> with respect to library <i>L</i> is:
+  /// * If <i>C</i> declares an instance getter (respectively setter) named
+  ///   <i>m</i> that is accessible to <i>L</i>, then that getter (respectively
+  ///   setter) is the result of the lookup. Otherwise, if <i>C</i> has a
+  ///   superclass <i>S</i>, then the result of the lookup is the result of
+  ///   looking up getter (respectively setter) <i>m</i> in <i>S</i> with
+  ///   respect to <i>L</i>. Otherwise, we say that the lookup has failed.
+  /// </blockquote>
   PropertyAccessorElement lookUpSetter(String name, LibraryElement library);
 
-  /**
-   * Return the element representing the setter that results from looking up the
-   * setter with the given [name] in the superclass of this class with respect
-   * to the given [library], or `null` if the look up fails. The behavior of
-   * this method is defined by the Dart Language Specification in section 12.16:
-   * <blockquote>
-   * The result of looking up getter (respectively setter) <i>m</i> in class
-   * <i>C</i> with respect to library <i>L</i> is:
-   * * If <i>C</i> declares an instance getter (respectively setter) named
-   *   <i>m</i> that is accessible to <i>L</i>, then that getter (respectively
-   *   setter) is the result of the lookup. Otherwise, if <i>C</i> has a
-   *   superclass <i>S</i>, then the result of the lookup is the result of
-   *   looking up getter (respectively setter) <i>m</i> in <i>S</i> with respect
-   *   to <i>L</i>. Otherwise, we say that the lookup has failed.
-   * </blockquote>
-   */
+  /// Return the element representing the setter that results from looking up
+  /// the setter with the given [name] in the superclass of this class with
+  /// respect to the given [library], or `null` if the look up fails. The
+  /// behavior of this method is defined by the Dart Language Specification in
+  /// section 12.16:
+  /// <blockquote>
+  /// The result of looking up getter (respectively setter) <i>m</i> in class
+  /// <i>C</i> with respect to library <i>L</i> is:
+  /// * If <i>C</i> declares an instance getter (respectively setter) named
+  ///   <i>m</i> that is accessible to <i>L</i>, then that getter (respectively
+  ///   setter) is the result of the lookup. Otherwise, if <i>C</i> has a
+  ///   superclass <i>S</i>, then the result of the lookup is the result of
+  ///   looking up getter (respectively setter) <i>m</i> in <i>S</i> with
+  ///   respect to <i>L</i>. Otherwise, we say that the lookup has failed.
+  /// </blockquote>
   PropertyAccessorElement lookUpSetterInSuperclass(
       String name, LibraryElement library);
 
@@ -664,84 +551,67 @@
   InterfaceType substitute2(
       List<DartType> argumentTypes, List<DartType> parameterTypes);
 
-  /**
-   * Return the type resulting from substituting the given arguments for this
-   * type's parameters. This is fully equivalent to `substitute2(argumentTypes,
-   * getTypeArguments())`.
-   */
+  /// Return the type resulting from substituting the given arguments for this
+  /// type's parameters. This is fully equivalent to `substitute2(argumentTypes,
+  /// getTypeArguments())`.
   @deprecated // use instantiate
   InterfaceType substitute4(List<DartType> argumentTypes);
 
-  /**
-   * Returns a "smart" version of the "least upper bound" of the given types.
-   *
-   * If these types have the same element and differ only in terms of the type
-   * arguments, attempts to find a compatible set of type arguments.
-   *
-   * Otherwise, returns the same result as [DartType.getLeastUpperBound].
-   */
+  /// Returns a "smart" version of the "least upper bound" of the given types.
+  ///
+  /// If these types have the same element and differ only in terms of the type
+  /// arguments, attempts to find a compatible set of type arguments.
+  ///
+  /// Otherwise, returns the same result as [DartType.getLeastUpperBound].
   // TODO(brianwilkerson) This needs to be deprecated and moved to TypeSystem.
   static InterfaceType getSmartLeastUpperBound(
           InterfaceType first, InterfaceType second) =>
       InterfaceTypeImpl.getSmartLeastUpperBound(first, second);
 }
 
-/**
- * A type that can track substituted type parameters, either for itself after
- * instantiation, or from a surrounding context.
- *
- * For example, given a class `Foo<T>`, after instantiation with S for T, it
- * will track the substitution `{S/T}`.
- *
- * This substitution will be propagated to its members. For example, say our
- * `Foo<T>` class has a field `T bar;`. When we look up this field, we will get
- * back a [FieldElement] that tracks the substituted type as `{S/T}T`, so when
- * we ask for the field type we will get `S`.
- *
- * Clients may not extend, implement or mix-in this class.
- */
+/// A type that can track substituted type parameters, either for itself after
+/// instantiation, or from a surrounding context.
+///
+/// For example, given a class `Foo<T>`, after instantiation with S for T, it
+/// will track the substitution `{S/T}`.
+///
+/// This substitution will be propagated to its members. For example, say our
+/// `Foo<T>` class has a field `T bar;`. When we look up this field, we will get
+/// back a [FieldElement] that tracks the substituted type as `{S/T}T`, so when
+/// we ask for the field type we will get `S`.
+///
+/// Clients may not extend, implement or mix-in this class.
 abstract class ParameterizedType implements DartType {
-  /**
-   * Return a list containing the actual types of the type arguments. If this
-   * type's element does not have type parameters, then the array should be
-   * empty (although it is possible for type arguments to be erroneously
-   * declared). If the element has type parameters and the actual type does not
-   * explicitly include argument values, then the type "dynamic" will be
-   * automatically provided.
-   */
+  /// Return a list containing the actual types of the type arguments. If this
+  /// type's element does not have type parameters, then the array should be
+  /// empty (although it is possible for type arguments to be erroneously
+  /// declared). If the element has type parameters and the actual type does not
+  /// explicitly include argument values, then the type "dynamic" will be
+  /// automatically provided.
   List<DartType> get typeArguments;
 
-  /**
-   * Return a list containing all of the type parameters declared for this type.
-   */
+  /// Return a list containing all of the type parameters declared for this
+  /// type.
   List<TypeParameterElement> get typeParameters;
 
-  /**
-   * Return the type resulting from instantiating (replacing) the given
-   * [argumentTypes] for this type's bound type parameters.
-   */
+  /// Return the type resulting from instantiating (replacing) the given
+  /// [argumentTypes] for this type's bound type parameters.
   ParameterizedType instantiate(List<DartType> argumentTypes);
 }
 
-/**
- * The type introduced by a type parameter.
- *
- * Clients may not extend, implement or mix-in this class.
- */
+/// The type introduced by a type parameter.
+///
+/// Clients may not extend, implement or mix-in this class.
 abstract class TypeParameterType implements DartType {
-  /**
-   * Return the type representing the bound associated with this parameter,
-   * or `dynamic` if there was no explicit bound.
-   */
+  /// Return the type representing the bound associated with this parameter,
+  /// or `dynamic` if there was no explicit bound.
   DartType get bound;
 
-  /**
-   * An object that can be used to identify this type parameter with `==`.
-   *
-   * Depending on the use, [bound] may also need to be taken into account.
-   * A given type parameter, it may have different bounds in different scopes.
-   * Always consult the bound if that could be relevant.
-   */
+  /// An object that can be used to identify this type parameter with `==`.
+  ///
+  /// Depending on the use, [bound] may also need to be taken into account.
+  /// A given type parameter, it may have different bounds in different scopes.
+  /// Always consult the bound if that could be relevant.
   ElementLocation get definition;
 
   @override
diff --git a/pkg/analyzer/lib/dart/element/visitor.dart b/pkg/analyzer/lib/dart/element/visitor.dart
index fa3fa79..fc6d4a6 100644
--- a/pkg/analyzer/lib/dart/element/visitor.dart
+++ b/pkg/analyzer/lib/dart/element/visitor.dart
@@ -2,86 +2,82 @@
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
 
-/**
- * Defines element visitors that support useful patterns for visiting the
- * elements in an [element model](element.dart).
- *
- * Dart is an evolving language, and the element model must evolved with it.
- * When the element model changes, the visitor interface will sometimes change
- * as well. If it is desirable to get a compilation error when the structure of
- * the element model has been modified, then you should consider implementing
- * the interface [ElementVisitor] directly. Doing so will ensure that changes
- * that introduce new classes of elements will be flagged. (Of course, not all
- * changes to the element model require the addition of a new class of element,
- * and hence cannot be caught this way.)
- *
- * But if automatic detection of these kinds of changes is not necessary then
- * you will probably want to extend one of the classes in this library because
- * doing so will simplify the task of writing your visitor and guard against
- * future changes to the element model. For example, the
- * [RecursiveElementVisitor] automates the process of visiting all of the
- * descendants of an element.
- */
+/// Defines element visitors that support useful patterns for visiting the
+/// elements in an [element model](element.dart).
+///
+/// Dart is an evolving language, and the element model must evolved with it.
+/// When the element model changes, the visitor interface will sometimes change
+/// as well. If it is desirable to get a compilation error when the structure of
+/// the element model has been modified, then you should consider implementing
+/// the interface [ElementVisitor] directly. Doing so will ensure that changes
+/// that introduce new classes of elements will be flagged. (Of course, not all
+/// changes to the element model require the addition of a new class of element,
+/// and hence cannot be caught this way.)
+///
+/// But if automatic detection of these kinds of changes is not necessary then
+/// you will probably want to extend one of the classes in this library because
+/// doing so will simplify the task of writing your visitor and guard against
+/// future changes to the element model. For example, the
+/// [RecursiveElementVisitor] automates the process of visiting all of the
+/// descendants of an element.
 import 'package:analyzer/dart/element/element.dart';
 
-/**
- * An element visitor that will recursively visit all of the elements in an
- * element model (like instances of the class [RecursiveElementVisitor]). In
- * addition, when an element of a specific type is visited not only will the
- * visit method for that specific type of element be invoked, but additional
- * methods for the supertypes of that element will also be invoked. For example,
- * using an instance of this class to visit a [MethodElement] will cause the
- * method [visitMethodElement] to be invoked but will also cause the methods
- * [visitExecutableElement] and [visitElement] to be subsequently invoked. This
- * allows visitors to be written that visit all executable elements without
- * needing to override the visit method for each of the specific subclasses of
- * [ExecutableElement].
- *
- * Note, however, that unlike many visitors, element visitors visit objects
- * based on the interfaces implemented by those elements. Because interfaces
- * form a graph structure rather than a tree structure the way classes do, and
- * because it is generally undesirable for an object to be visited more than
- * once, this class flattens the interface graph into a pseudo-tree. In
- * particular, this class treats elements as if the element types were
- * structured in the following way:
- *
- * <pre>
- * Element
- *   ClassElement
- *   CompilationUnitElement
- *   ExecutableElement
- *       ConstructorElement
- *       LocalElement
- *           FunctionElement
- *       MethodElement
- *       PropertyAccessorElement
- *   ExportElement
- *   HtmlElement
- *   ImportElement
- *   LabelElement
- *   LibraryElement
- *   MultiplyDefinedElement
- *   PrefixElement
- *   TypeAliasElement
- *   TypeParameterElement
- *   UndefinedElement
- *   VariableElement
- *       PropertyInducingElement
- *           FieldElement
- *           TopLevelVariableElement
- *       LocalElement
- *           LocalVariableElement
- *           ParameterElement
- *               FieldFormalParameterElement
- * </pre>
- *
- * Subclasses that override a visit method must either invoke the overridden
- * visit method or explicitly invoke the more general visit method. Failure to
- * do so will cause the visit methods for superclasses of the element to not be
- * invoked and will cause the children of the visited node to not be visited.
- *
- * Clients may extend this class.
- */
+/// An element visitor that will recursively visit all of the elements in an
+/// element model (like instances of the class [RecursiveElementVisitor]). In
+/// addition, when an element of a specific type is visited not only will the
+/// visit method for that specific type of element be invoked, but additional
+/// methods for the supertypes of that element will also be invoked. For
+/// example, using an instance of this class to visit a [MethodElement] will
+/// cause the method [visitMethodElement] to be invoked but will also cause the
+/// methods [visitExecutableElement] and [visitElement] to be subsequently
+/// invoked. This allows visitors to be written that visit all executable
+/// elements without needing to override the visit method for each of the
+/// specific subclasses of [ExecutableElement].
+///
+/// Note, however, that unlike many visitors, element visitors visit objects
+/// based on the interfaces implemented by those elements. Because interfaces
+/// form a graph structure rather than a tree structure the way classes do, and
+/// because it is generally undesirable for an object to be visited more than
+/// once, this class flattens the interface graph into a pseudo-tree. In
+/// particular, this class treats elements as if the element types were
+/// structured in the following way:
+///
+/// <pre>
+/// Element
+///   ClassElement
+///   CompilationUnitElement
+///   ExecutableElement
+///       ConstructorElement
+///       LocalElement
+///           FunctionElement
+///       MethodElement
+///       PropertyAccessorElement
+///   ExportElement
+///   HtmlElement
+///   ImportElement
+///   LabelElement
+///   LibraryElement
+///   MultiplyDefinedElement
+///   PrefixElement
+///   TypeAliasElement
+///   TypeParameterElement
+///   UndefinedElement
+///   VariableElement
+///       PropertyInducingElement
+///           FieldElement
+///           TopLevelVariableElement
+///       LocalElement
+///           LocalVariableElement
+///           ParameterElement
+///               FieldFormalParameterElement
+/// </pre>
+///
+/// Subclasses that override a visit method must either invoke the overridden
+/// visit method or explicitly invoke the more general visit method. Failure to
+/// do so will cause the visit methods for superclasses of the element to not be
+/// invoked and will cause the children of the visited node to not be visited.
+///
+/// Clients may extend this class.
 class GeneralizingElementVisitor<R> implements ElementVisitor<R> {
   @override
   R visitClassElement(ClassElement element) => visitElement(element);
@@ -180,19 +176,17 @@
   R visitVariableElement(VariableElement element) => visitElement(element);
 }
 
-/**
- * A visitor that will recursively visit all of the element in an element model.
- * For example, using an instance of this class to visit a
- * [CompilationUnitElement] will also cause all of the types in the compilation
- * unit to be visited.
- *
- * Subclasses that override a visit method must either invoke the overridden
- * visit method or must explicitly ask the visited element to visit its
- * children. Failure to do so will cause the children of the visited element to
- * not be visited.
- *
- * Clients may extend this class.
- */
+/// A visitor that will recursively visit all of the element in an element
+/// model. For example, using an instance of this class to visit a
+/// [CompilationUnitElement] will also cause all of the types in the compilation
+/// unit to be visited.
+///
+/// Subclasses that override a visit method must either invoke the overridden
+/// visit method or must explicitly ask the visited element to visit its
+/// children. Failure to do so will cause the children of the visited element to
+/// not be visited.
+///
+/// Clients may extend this class.
 class RecursiveElementVisitor<R> implements ElementVisitor<R> {
   @override
   R visitClassElement(ClassElement element) {
@@ -315,14 +309,12 @@
   }
 }
 
-/**
- * A visitor that will do nothing when visiting an element. It is intended to be
- * a superclass for classes that use the visitor pattern primarily as a dispatch
- * mechanism (and hence don't need to recursively visit a whole structure) and
- * that only need to visit a small number of element types.
- *
- * Clients may extend this class.
- */
+/// A visitor that will do nothing when visiting an element. It is intended to
+/// be a superclass for classes that use the visitor pattern primarily as a
+/// dispatch mechanism (and hence don't need to recursively visit a whole
+/// structure) and that only need to visit a small number of element types.
+///
+/// Clients may extend this class.
 class SimpleElementVisitor<R> implements ElementVisitor<R> {
   @override
   R visitClassElement(ClassElement element) => null;
@@ -386,15 +378,13 @@
   R visitTypeParameterElement(TypeParameterElement element) => null;
 }
 
-/**
- * An AST visitor that will throw an exception if any of the visit methods that
- * are invoked have not been overridden. It is intended to be a superclass for
- * classes that implement the visitor pattern and need to (a) override all of
- * the visit methods or (b) need to override a subset of the visit method and
- * want to catch when any other visit methods have been invoked.
- *
- * Clients may extend this class.
- */
+/// An AST visitor that will throw an exception if any of the visit methods that
+/// are invoked have not been overridden. It is intended to be a superclass for
+/// classes that implement the visitor pattern and need to (a) override all of
+/// the visit methods or (b) need to override a subset of the visit method and
+/// want to catch when any other visit methods have been invoked.
+///
+/// Clients may extend this class.
 class ThrowingElementVisitor<R> implements ElementVisitor<R> {
   @override
   R visitClassElement(ClassElement element) => _throw(element);
diff --git a/pkg/analyzer/lib/error/error.dart b/pkg/analyzer/lib/error/error.dart
index a4ba3c5..c5b2489 100644
--- a/pkg/analyzer/lib/error/error.dart
+++ b/pkg/analyzer/lib/error/error.dart
@@ -59,10 +59,6 @@
   CheckedModeCompileTimeErrorCode.CONST_CONSTRUCTOR_FIELD_TYPE_MISMATCH,
   CheckedModeCompileTimeErrorCode.CONST_CONSTRUCTOR_PARAM_TYPE_MISMATCH,
   CheckedModeCompileTimeErrorCode.CONST_FIELD_INITIALIZER_NOT_ASSIGNABLE,
-  CheckedModeCompileTimeErrorCode.LIST_ELEMENT_TYPE_NOT_ASSIGNABLE,
-  CheckedModeCompileTimeErrorCode.MAP_KEY_TYPE_NOT_ASSIGNABLE,
-  CheckedModeCompileTimeErrorCode.MAP_VALUE_TYPE_NOT_ASSIGNABLE,
-  CheckedModeCompileTimeErrorCode.SET_ELEMENT_TYPE_NOT_ASSIGNABLE,
   CheckedModeCompileTimeErrorCode.VARIABLE_TYPE_MISMATCH,
   CompileTimeErrorCode.ABSTRACT_SUPER_MEMBER_REFERENCE,
   CompileTimeErrorCode.ACCESS_PRIVATE_ENUM_FIELD,
@@ -71,7 +67,6 @@
   CompileTimeErrorCode.AMBIGUOUS_SET_OR_MAP_LITERAL_EITHER,
   CompileTimeErrorCode.ANNOTATION_WITH_NON_CLASS,
   CompileTimeErrorCode.ANNOTATION_WITH_TYPE_ARGUMENTS,
-  CompileTimeErrorCode.ARGUMENT_DEFINITION_TEST_NON_PARAMETER,
   CompileTimeErrorCode.ASYNC_FOR_IN_WRONG_CONTEXT,
   CompileTimeErrorCode.AWAIT_IN_WRONG_CONTEXT,
   CompileTimeErrorCode.BUILT_IN_IDENTIFIER_AS_PREFIX_NAME,
@@ -79,7 +74,6 @@
   CompileTimeErrorCode.BUILT_IN_IDENTIFIER_AS_TYPEDEF_NAME,
   CompileTimeErrorCode.BUILT_IN_IDENTIFIER_AS_TYPE_NAME,
   CompileTimeErrorCode.BUILT_IN_IDENTIFIER_AS_TYPE_PARAMETER_NAME,
-  CompileTimeErrorCode.BUILT_IN_IDENTIFIER_IN_DECLARATION,
   CompileTimeErrorCode.CASE_EXPRESSION_TYPE_IMPLEMENTS_EQUALS,
   CompileTimeErrorCode.CONFLICTING_CONSTRUCTOR_AND_STATIC_FIELD,
   CompileTimeErrorCode.CONFLICTING_CONSTRUCTOR_AND_STATIC_METHOD,
@@ -89,7 +83,6 @@
   CompileTimeErrorCode.CONFLICTING_STATIC_AND_INSTANCE,
   CompileTimeErrorCode.CONFLICTING_TYPE_VARIABLE_AND_CLASS,
   CompileTimeErrorCode.CONFLICTING_TYPE_VARIABLE_AND_MEMBER,
-  CompileTimeErrorCode.CONST_CONSTRUCTOR_IN_SUBCLASS_OF_MIXIN_APPLICATION,
   CompileTimeErrorCode.CONST_CONSTRUCTOR_THROWS_EXCEPTION,
   CompileTimeErrorCode.CONST_CONSTRUCTOR_WITH_FIELD_INITIALIZED_BY_NON_CONST,
   CompileTimeErrorCode.CONST_CONSTRUCTOR_WITH_MIXIN_WITH_FIELD,
@@ -129,6 +122,8 @@
   CompileTimeErrorCode.DUPLICATE_DEFINITION,
   CompileTimeErrorCode.DUPLICATE_NAMED_ARGUMENT,
   CompileTimeErrorCode.DUPLICATE_PART,
+  CompileTimeErrorCode.EQUAL_KEYS_IN_CONST_MAP,
+  CompileTimeErrorCode.EQUAL_ELEMENTS_IN_CONST_SET,
   CompileTimeErrorCode.EXPORT_INTERNAL_LIBRARY,
   CompileTimeErrorCode.EXPORT_OF_NON_LIBRARY,
   CompileTimeErrorCode.EXPRESSION_IN_MAP,
@@ -173,7 +168,6 @@
   CompileTimeErrorCode.INVALID_CONSTANT,
   CompileTimeErrorCode.INVALID_CONSTRUCTOR_NAME,
   CompileTimeErrorCode.INVALID_FACTORY_NAME_NOT_A_CLASS,
-  CompileTimeErrorCode.INVALID_IDENTIFIER_IN_ASYNC,
   CompileTimeErrorCode.INVALID_MODIFIER_ON_CONSTRUCTOR,
   CompileTimeErrorCode.INVALID_MODIFIER_ON_SETTER,
   CompileTimeErrorCode.INVALID_INLINE_FUNCTION_TYPE,
@@ -226,8 +220,10 @@
   CompileTimeErrorCode.NON_CONSTANT_MAP_VALUE_FROM_DEFERRED_LIBRARY,
   CompileTimeErrorCode.NON_CONSTANT_SET_ELEMENT,
   CompileTimeErrorCode.NON_CONSTANT_SET_ELEMENT_FROM_DEFERRED_LIBRARY,
+  CompileTimeErrorCode.NON_CONSTANT_SPREAD_EXPRESSION_FROM_DEFERRED_LIBRARY,
+  CompileTimeErrorCode.NON_CONSTANT_IF_ELEMENT_CONDITION_FROM_DEFERRED_LIBRARY,
+  // ignore: deprecated_member_use_from_same_package
   CompileTimeErrorCode.NON_CONSTANT_VALUE_IN_INITIALIZER,
-  CompileTimeErrorCode.NON_CONSTANT_VALUE_IN_INITIALIZER_FROM_DEFERRED_LIBRARY,
   CompileTimeErrorCode.NON_CONST_MAP_AS_EXPRESSION_STATEMENT,
   CompileTimeErrorCode.NON_GENERATIVE_CONSTRUCTOR,
   CompileTimeErrorCode.NON_SYNC_FACTORY,
@@ -333,6 +329,13 @@
   HintCode.OVERRIDE_ON_NON_OVERRIDING_SETTER,
   HintCode.PACKAGE_IMPORT_CONTAINS_DOT_DOT,
   HintCode.SDK_VERSION_ASYNC_EXPORTED_FROM_CORE,
+  HintCode.SDK_VERSION_AS_EXPRESSION_IN_CONST_CONTEXT,
+  HintCode.SDK_VERSION_BOOL_OPERATOR,
+  HintCode.SDK_VERSION_EQ_EQ_OPERATOR_IN_CONST_CONTEXT,
+  HintCode.SDK_VERSION_GT_GT_GT_OPERATOR,
+  HintCode.SDK_VERSION_IS_EXPRESSION_IN_CONST_CONTEXT,
+  HintCode.SDK_VERSION_SET_LITERAL,
+  HintCode.SDK_VERSION_UI_AS_CODE,
   HintCode.STRICT_RAW_TYPE,
   HintCode.SUBTYPE_OF_SEALED_CLASS,
   HintCode.TYPE_CHECK_IS_NOT_NULL,
@@ -352,9 +355,6 @@
   HintCode.UNUSED_LABEL,
   HintCode.UNUSED_LOCAL_VARIABLE,
   HintCode.UNUSED_SHOWN_NAME,
-  HtmlErrorCode.PARSE_ERROR,
-  HtmlWarningCode.INVALID_URI,
-  HtmlWarningCode.URI_DOES_NOT_EXIST,
   ParserErrorCode.ABSTRACT_CLASS_MEMBER,
   ParserErrorCode.ABSTRACT_ENUM,
   ParserErrorCode.ABSTRACT_STATIC_METHOD,
@@ -521,8 +521,10 @@
   ParserErrorCode.STATIC_OPERATOR,
   ParserErrorCode.STATIC_SETTER_WITHOUT_BODY,
   ParserErrorCode.STATIC_TOP_LEVEL_DECLARATION,
+  ParserErrorCode.INVALID_SUPER_IN_INITIALIZER,
   ParserErrorCode.SWITCH_HAS_CASE_AFTER_DEFAULT_CASE,
   ParserErrorCode.SWITCH_HAS_MULTIPLE_DEFAULT_CASES,
+  ParserErrorCode.INVALID_THIS_IN_INITIALIZER,
   ParserErrorCode.TOP_LEVEL_OPERATOR,
   ParserErrorCode.TYPEDEF_IN_CLASS,
   ParserErrorCode.TYPE_ARGUMENTS_ON_TYPE_VARIABLE,
@@ -539,7 +541,6 @@
   ParserErrorCode.WRONG_TERMINATOR_FOR_PARAMETER_GROUP,
   ResolverErrorCode.BREAK_LABEL_ON_SWITCH_MEMBER,
   ResolverErrorCode.CONTINUE_LABEL_ON_SWITCH,
-  ResolverErrorCode.MISSING_LIBRARY_DIRECTIVE_WITH_PART,
   ResolverErrorCode.PART_OF_UNNAMED_LIBRARY,
   ScannerErrorCode.EXPECTED_TOKEN,
   ScannerErrorCode.ILLEGAL_CHARACTER,
@@ -602,8 +603,6 @@
   StaticWarningCode.CAST_TO_NON_TYPE,
   StaticWarningCode.CONCRETE_CLASS_WITH_ABSTRACT_MEMBER,
   StaticWarningCode.CONST_WITH_ABSTRACT_CLASS,
-  StaticWarningCode.EQUAL_KEYS_IN_MAP,
-  StaticWarningCode.EQUAL_VALUES_IN_CONST_SET,
   StaticWarningCode.EXPORT_DUPLICATED_LIBRARY_NAMED,
   StaticWarningCode.EXTRA_POSITIONAL_ARGUMENTS,
   StaticWarningCode.EXTRA_POSITIONAL_ARGUMENTS_COULD_BE_NAMED,
@@ -615,15 +614,10 @@
   StaticWarningCode.FINAL_NOT_INITIALIZED_CONSTRUCTOR_1,
   StaticWarningCode.FINAL_NOT_INITIALIZED_CONSTRUCTOR_2,
   StaticWarningCode.FINAL_NOT_INITIALIZED_CONSTRUCTOR_3_PLUS,
-  StaticWarningCode.FUNCTION_WITHOUT_CALL,
   StaticWarningCode.IMPORT_DUPLICATED_LIBRARY_NAMED,
   StaticWarningCode.IMPORT_OF_NON_LIBRARY,
   StaticWarningCode.INVALID_OVERRIDE_DIFFERENT_DEFAULT_VALUES_NAMED,
   StaticWarningCode.INVALID_OVERRIDE_DIFFERENT_DEFAULT_VALUES_POSITIONAL,
-  StaticWarningCode.INVALID_OVERRIDE_NAMED,
-  StaticWarningCode.INVALID_OVERRIDE_POSITIONAL,
-  StaticWarningCode.INVALID_OVERRIDE_REQUIRED,
-  StaticWarningCode.INVALID_SETTER_OVERRIDE_NORMAL_PARAM_TYPE,
   StaticWarningCode.LIST_ELEMENT_TYPE_NOT_ASSIGNABLE,
   StaticWarningCode.MAP_KEY_TYPE_NOT_ASSIGNABLE,
   StaticWarningCode.MAP_VALUE_TYPE_NOT_ASSIGNABLE,
@@ -694,10 +688,8 @@
   StrongModeCode.INVALID_CAST_NEW_EXPR,
   StrongModeCode.INVALID_CAST_METHOD,
   StrongModeCode.INVALID_CAST_FUNCTION,
-  StrongModeCode.INVALID_FIELD_OVERRIDE,
   StrongModeCode.INVALID_PARAMETER_DECLARATION,
   StrongModeCode.INVALID_SUPER_INVOCATION,
-  StrongModeCode.NO_DEFAULT_BOUNDS,
   StrongModeCode.NON_GROUND_TYPE_CHECK_INFO,
   StrongModeCode.NOT_INSTANTIATED_BOUND,
   StrongModeCode.TOP_LEVEL_CYCLE,
@@ -705,7 +697,6 @@
   StrongModeCode.TOP_LEVEL_IDENTIFIER_NO_TYPE,
   StrongModeCode.TOP_LEVEL_INSTANCE_GETTER,
   StrongModeCode.TOP_LEVEL_INSTANCE_METHOD,
-  StrongModeCode.TOP_LEVEL_UNSUPPORTED,
   TodoCode.TODO,
 ];
 
diff --git a/pkg/analyzer/lib/instrumentation/instrumentation.dart b/pkg/analyzer/lib/instrumentation/instrumentation.dart
index dc04bf5..e593f13 100644
--- a/pkg/analyzer/lib/instrumentation/instrumentation.dart
+++ b/pkg/analyzer/lib/instrumentation/instrumentation.dart
@@ -1,4 +1,4 @@
-// Copyright (c) 2014, the Dart project authors.  Please see the AUTHORS file
+// Copyright (c) 2014, the Dart project authors. Please see the AUTHORS file
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
 
diff --git a/pkg/analyzer/lib/plugin/embedded_resolver_provider.dart b/pkg/analyzer/lib/plugin/embedded_resolver_provider.dart
index 217ab7f..e16bc00 100644
--- a/pkg/analyzer/lib/plugin/embedded_resolver_provider.dart
+++ b/pkg/analyzer/lib/plugin/embedded_resolver_provider.dart
@@ -1,4 +1,4 @@
-// Copyright (c) 2016, the Dart project authors.  Please see the AUTHORS file
+// Copyright (c) 2016, the Dart project authors. Please see the AUTHORS file
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
 
diff --git a/pkg/analyzer/lib/plugin/resolver_provider.dart b/pkg/analyzer/lib/plugin/resolver_provider.dart
index 3c22554..40567da 100644
--- a/pkg/analyzer/lib/plugin/resolver_provider.dart
+++ b/pkg/analyzer/lib/plugin/resolver_provider.dart
@@ -1,4 +1,4 @@
-// Copyright (c) 2015, the Dart project authors.  Please see the AUTHORS file
+// Copyright (c) 2015, the Dart project authors. Please see the AUTHORS file
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
 
diff --git a/pkg/analyzer/lib/source/analysis_options_provider.dart b/pkg/analyzer/lib/source/analysis_options_provider.dart
index 939f634..a35bfbc 100644
--- a/pkg/analyzer/lib/source/analysis_options_provider.dart
+++ b/pkg/analyzer/lib/source/analysis_options_provider.dart
@@ -1,4 +1,4 @@
-// Copyright (c) 2015, the Dart project authors.  Please see the AUTHORS file
+// Copyright (c) 2015, the Dart project authors. Please see the AUTHORS file
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
 
diff --git a/pkg/analyzer/lib/source/custom_resolver.dart b/pkg/analyzer/lib/source/custom_resolver.dart
index 8dfe9f9..2569313 100644
--- a/pkg/analyzer/lib/source/custom_resolver.dart
+++ b/pkg/analyzer/lib/source/custom_resolver.dart
@@ -1,4 +1,4 @@
-// Copyright (c) 2016, the Dart project authors.  Please see the AUTHORS file
+// Copyright (c) 2016, the Dart project authors. Please see the AUTHORS file
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
 
diff --git a/pkg/analyzer/lib/source/embedder.dart b/pkg/analyzer/lib/source/embedder.dart
index dfd679f..a1af355 100644
--- a/pkg/analyzer/lib/source/embedder.dart
+++ b/pkg/analyzer/lib/source/embedder.dart
@@ -1,4 +1,4 @@
-// Copyright (c) 2015, the Dart project authors.  Please see the AUTHORS file
+// Copyright (c) 2015, the Dart project authors. Please see the AUTHORS file
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
 
diff --git a/pkg/analyzer/lib/source/error_processor.dart b/pkg/analyzer/lib/source/error_processor.dart
index 3391264..f2efaba 100644
--- a/pkg/analyzer/lib/source/error_processor.dart
+++ b/pkg/analyzer/lib/source/error_processor.dart
@@ -1,4 +1,4 @@
-// Copyright (c) 2015, the Dart project authors.  Please see the AUTHORS file
+// Copyright (c) 2015, the Dart project authors. Please see the AUTHORS file
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
 
diff --git a/pkg/analyzer/lib/source/line_info.dart b/pkg/analyzer/lib/source/line_info.dart
index 5d5be56..5413ae4 100644
--- a/pkg/analyzer/lib/source/line_info.dart
+++ b/pkg/analyzer/lib/source/line_info.dart
@@ -1,4 +1,4 @@
-// Copyright (c) 2018, the Dart project authors.  Please see the AUTHORS file
+// Copyright (c) 2018, the Dart project authors. Please see the AUTHORS file
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
 
diff --git a/pkg/analyzer/lib/source/package_map_provider.dart b/pkg/analyzer/lib/source/package_map_provider.dart
index f3c2119..2c33ab5 100644
--- a/pkg/analyzer/lib/source/package_map_provider.dart
+++ b/pkg/analyzer/lib/source/package_map_provider.dart
@@ -1,4 +1,4 @@
-// Copyright (c) 2014, the Dart project authors.  Please see the AUTHORS file
+// Copyright (c) 2014, the Dart project authors. Please see the AUTHORS file
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
 
diff --git a/pkg/analyzer/lib/source/package_map_resolver.dart b/pkg/analyzer/lib/source/package_map_resolver.dart
index 6a1d230..cf65834 100644
--- a/pkg/analyzer/lib/source/package_map_resolver.dart
+++ b/pkg/analyzer/lib/source/package_map_resolver.dart
@@ -1,4 +1,4 @@
-// Copyright (c) 2014, the Dart project authors.  Please see the AUTHORS file
+// Copyright (c) 2014, the Dart project authors. Please see the AUTHORS file
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
 
diff --git a/pkg/analyzer/lib/source/path_filter.dart b/pkg/analyzer/lib/source/path_filter.dart
index ba5454e..26ecec2 100644
--- a/pkg/analyzer/lib/source/path_filter.dart
+++ b/pkg/analyzer/lib/source/path_filter.dart
@@ -1,4 +1,4 @@
-// Copyright (c) 2015, the Dart project authors.  Please see the AUTHORS file
+// Copyright (c) 2015, the Dart project authors. Please see the AUTHORS file
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
 
diff --git a/pkg/analyzer/lib/source/sdk_ext.dart b/pkg/analyzer/lib/source/sdk_ext.dart
index 7f5557b..425553e 100644
--- a/pkg/analyzer/lib/source/sdk_ext.dart
+++ b/pkg/analyzer/lib/source/sdk_ext.dart
@@ -1,4 +1,4 @@
-// Copyright (c) 2015, the Dart project authors.  Please see the AUTHORS file
+// Copyright (c) 2015, the Dart project authors. Please see the AUTHORS file
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
 
diff --git a/pkg/analyzer/lib/source/source_range.dart b/pkg/analyzer/lib/source/source_range.dart
index 338ad7a..b2d3069 100644
--- a/pkg/analyzer/lib/source/source_range.dart
+++ b/pkg/analyzer/lib/source/source_range.dart
@@ -1,4 +1,4 @@
-// Copyright (c) 2018, the Dart project authors.  Please see the AUTHORS file
+// Copyright (c) 2018, the Dart project authors. Please see the AUTHORS file
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
 
diff --git a/pkg/analyzer/lib/src/analysis_options/analysis_options_provider.dart b/pkg/analyzer/lib/src/analysis_options/analysis_options_provider.dart
index 550f3e3..5d3e616 100644
--- a/pkg/analyzer/lib/src/analysis_options/analysis_options_provider.dart
+++ b/pkg/analyzer/lib/src/analysis_options/analysis_options_provider.dart
@@ -1,4 +1,4 @@
-// Copyright (c) 2015, the Dart project authors.  Please see the AUTHORS file
+// Copyright (c) 2015, the Dart project authors. Please see the AUTHORS file
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
 
diff --git a/pkg/analyzer/lib/src/context/cache.dart b/pkg/analyzer/lib/src/context/cache.dart
index a1834e2..65349a0 100644
--- a/pkg/analyzer/lib/src/context/cache.dart
+++ b/pkg/analyzer/lib/src/context/cache.dart
@@ -1,4 +1,4 @@
-// Copyright (c) 2015, the Dart project authors.  Please see the AUTHORS file
+// Copyright (c) 2015, the Dart project authors. Please see the AUTHORS file
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
 
diff --git a/pkg/analyzer/lib/src/context/context.dart b/pkg/analyzer/lib/src/context/context.dart
index 95a75e7..418bb41 100644
--- a/pkg/analyzer/lib/src/context/context.dart
+++ b/pkg/analyzer/lib/src/context/context.dart
@@ -1,4 +1,4 @@
-// Copyright (c) 2015, the Dart project authors.  Please see the AUTHORS file
+// Copyright (c) 2015, the Dart project authors. Please see the AUTHORS file
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
 
@@ -82,9 +82,6 @@
    */
   bool useSdkCachePartition = true;
 
-  @override
-  ResultProvider resultProvider;
-
   /**
    * The most recently incrementally resolved source, or `null` when it was
    * already validated, or the most recent change was not incrementally resolved.
@@ -593,24 +590,6 @@
 }
 
 /**
- * Provider for analysis results.
- */
-abstract class ResultProvider {
-  /**
-   * This method is invoked by an [InternalAnalysisContext] when the state of
-   * the [result] of the [entry] is [CacheState.INVALID], so it is about to be
-   * computed.
-   *
-   * If the provider knows how to provide the value, it sets the value into
-   * the [entry] with all required dependencies, and returns `true`.
-   *
-   * Otherwise, it returns `false` to indicate that the result should be
-   * computed as usually.
-   */
-  bool compute(CacheEntry entry, ResultDescriptor result);
-}
-
-/**
  * An [AnalysisContext] that only contains sources for a Dart SDK.
  */
 class SdkAnalysisContext extends AnalysisContextImpl {
diff --git a/pkg/analyzer/lib/src/context/context_root.dart b/pkg/analyzer/lib/src/context/context_root.dart
index 744f298..a7da43e 100644
--- a/pkg/analyzer/lib/src/context/context_root.dart
+++ b/pkg/analyzer/lib/src/context/context_root.dart
@@ -1,4 +1,4 @@
-// Copyright (c) 2017, the Dart project authors.  Please see the AUTHORS file
+// Copyright (c) 2017, the Dart project authors. Please see the AUTHORS file
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
 
diff --git a/pkg/analyzer/lib/src/context/source.dart b/pkg/analyzer/lib/src/context/source.dart
index 70abd3dc..71abce1 100644
--- a/pkg/analyzer/lib/src/context/source.dart
+++ b/pkg/analyzer/lib/src/context/source.dart
@@ -1,4 +1,4 @@
-// Copyright (c) 2015, the Dart project authors.  Please see the AUTHORS file
+// Copyright (c) 2015, the Dart project authors. Please see the AUTHORS file
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
 
diff --git a/pkg/analyzer/lib/src/dart/analysis/byte_store.dart b/pkg/analyzer/lib/src/dart/analysis/byte_store.dart
index 80f7b32..6e7c301 100644
--- a/pkg/analyzer/lib/src/dart/analysis/byte_store.dart
+++ b/pkg/analyzer/lib/src/dart/analysis/byte_store.dart
@@ -1,4 +1,4 @@
-// Copyright (c) 2015, the Dart project authors.  Please see the AUTHORS file
+// Copyright (c) 2015, the Dart project authors. Please see the AUTHORS file
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
 
diff --git a/pkg/analyzer/lib/src/dart/analysis/cache.dart b/pkg/analyzer/lib/src/dart/analysis/cache.dart
index 47a32a3..58a7253 100644
--- a/pkg/analyzer/lib/src/dart/analysis/cache.dart
+++ b/pkg/analyzer/lib/src/dart/analysis/cache.dart
@@ -1,4 +1,4 @@
-// Copyright (c) 2017, the Dart project authors.  Please see the AUTHORS file
+// Copyright (c) 2017, the Dart project authors. Please see the AUTHORS file
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
 
diff --git a/pkg/analyzer/lib/src/dart/analysis/crc32.dart b/pkg/analyzer/lib/src/dart/analysis/crc32.dart
index 457712e..e571bfc 100644
--- a/pkg/analyzer/lib/src/dart/analysis/crc32.dart
+++ b/pkg/analyzer/lib/src/dart/analysis/crc32.dart
@@ -1,4 +1,4 @@
-// Copyright (c) 2017, the Dart project authors.  Please see the AUTHORS file
+// Copyright (c) 2017, the Dart project authors. Please see the AUTHORS file
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
 
diff --git a/pkg/analyzer/lib/src/dart/analysis/defined_names.dart b/pkg/analyzer/lib/src/dart/analysis/defined_names.dart
index 44baa00..4da5300 100644
--- a/pkg/analyzer/lib/src/dart/analysis/defined_names.dart
+++ b/pkg/analyzer/lib/src/dart/analysis/defined_names.dart
@@ -1,4 +1,4 @@
-// Copyright (c) 2017, the Dart project authors.  Please see the AUTHORS file
+// Copyright (c) 2017, the Dart project authors. Please see the AUTHORS file
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
 
diff --git a/pkg/analyzer/lib/src/dart/analysis/dependency/library_builder.dart b/pkg/analyzer/lib/src/dart/analysis/dependency/library_builder.dart
index 4740d58..20859c2 100644
--- a/pkg/analyzer/lib/src/dart/analysis/dependency/library_builder.dart
+++ b/pkg/analyzer/lib/src/dart/analysis/dependency/library_builder.dart
@@ -1,4 +1,4 @@
-// Copyright (c) 2018, the Dart project authors.  Please see the AUTHORS file
+// Copyright (c) 2018, the Dart project authors. Please see the AUTHORS file
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
 
diff --git a/pkg/analyzer/lib/src/dart/analysis/dependency/node.dart b/pkg/analyzer/lib/src/dart/analysis/dependency/node.dart
index ef5022d..10baa3c 100644
--- a/pkg/analyzer/lib/src/dart/analysis/dependency/node.dart
+++ b/pkg/analyzer/lib/src/dart/analysis/dependency/node.dart
@@ -1,4 +1,4 @@
-// Copyright (c) 2018, the Dart project authors.  Please see the AUTHORS file
+// Copyright (c) 2018, the Dart project authors. Please see the AUTHORS file
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
 
diff --git a/pkg/analyzer/lib/src/dart/analysis/dependency/reference_collector.dart b/pkg/analyzer/lib/src/dart/analysis/dependency/reference_collector.dart
index 482dc4b..5f16104 100644
--- a/pkg/analyzer/lib/src/dart/analysis/dependency/reference_collector.dart
+++ b/pkg/analyzer/lib/src/dart/analysis/dependency/reference_collector.dart
@@ -1,4 +1,4 @@
-// Copyright (c) 2018, the Dart project authors.  Please see the AUTHORS file
+// Copyright (c) 2018, the Dart project authors. Please see the AUTHORS file
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
 
@@ -464,7 +464,7 @@
     }
   }
 
-  void _visitForStatement2(ForStatement2 node) {
+  void _visitForStatement(ForStatement node) {
     _localScopes.enter();
 
     _visitForLoopParts(node.forLoopParts);
@@ -535,7 +535,7 @@
 
   void _visitListLiteral(ListLiteral node) {
     _visitTypeArguments(node.typeArguments);
-    var elements = node.elements2;
+    var elements = node.elements;
     for (var i = 0; i < elements.length; i++) {
       var element = elements[i];
       _visitCollectionElement(element);
@@ -619,7 +619,7 @@
 
   void _visitSetOrMapLiteral(SetOrMapLiteral node) {
     _visitTypeArguments(node.typeArguments);
-    var elements = node.elements2;
+    var elements = node.elements;
     for (var i = 0; i < elements.length; i++) {
       var element = elements[i];
       _visitCollectionElement(element);
@@ -662,8 +662,8 @@
       // nothing
     } else if (node is ExpressionStatement) {
       _visitExpression(node.expression);
-    } else if (node is ForStatement2) {
-      _visitForStatement2(node);
+    } else if (node is ForStatement) {
+      _visitForStatement(node);
     } else if (node is FunctionDeclarationStatement) {
       _visitFunctionDeclarationStatement(node);
     } else if (node is IfStatement) {
diff --git a/pkg/analyzer/lib/src/dart/analysis/driver.dart b/pkg/analyzer/lib/src/dart/analysis/driver.dart
index 3081077..463a9db 100644
--- a/pkg/analyzer/lib/src/dart/analysis/driver.dart
+++ b/pkg/analyzer/lib/src/dart/analysis/driver.dart
@@ -94,7 +94,7 @@
   /**
    * The version of data format, should be incremented on every format change.
    */
-  static const int DATA_VERSION = 78;
+  static const int DATA_VERSION = 79;
 
   /**
    * The number of exception contexts allowed to write. Once this field is
diff --git a/pkg/analyzer/lib/src/dart/analysis/experiments.dart b/pkg/analyzer/lib/src/dart/analysis/experiments.dart
index 5bf37c7..4b86a47 100644
--- a/pkg/analyzer/lib/src/dart/analysis/experiments.dart
+++ b/pkg/analyzer/lib/src/dart/analysis/experiments.dart
@@ -52,6 +52,9 @@
   /// String to enable the experiment "spread-collections"
   static const String spread_collections = 'spread-collections';
 
+  /// String to enable the experiment "triple-shift"
+  static const String triple_shift = 'triple-shift';
+
   /// String to enable the experiment "bogus-disabled"
   static const String bogus_disabled = 'bogus-disabled';
 
@@ -94,6 +97,12 @@
         IsEnabledByDefault.set_literals,
         IsExpired.set_literals,
         'Set Literals'),
+    EnableString.triple_shift: const ExperimentalFeature(
+        4,
+        EnableString.triple_shift,
+        IsEnabledByDefault.triple_shift,
+        IsExpired.triple_shift,
+        'Triple-shift operator'),
     EnableString.bogus_disabled: const ExperimentalFeature(
         null,
         EnableString.bogus_disabled,
@@ -117,13 +126,15 @@
       bool control_flow_collections,
       bool non_nullable,
       bool set_literals,
-      bool spread_collections})
+      bool spread_collections,
+      bool triple_shift})
       : _enableFlags = <bool>[
           constant_update_2018 ?? IsEnabledByDefault.constant_update_2018,
           non_nullable ?? IsEnabledByDefault.non_nullable,
           control_flow_collections ??
               IsEnabledByDefault.control_flow_collections,
           spread_collections ?? IsEnabledByDefault.spread_collections,
+          triple_shift ?? IsEnabledByDefault.triple_shift,
         ];
 
   /// Decodes the strings given in [flags] into a representation of the set of
@@ -157,6 +168,9 @@
   /// Current state for the flag "spread_collections"
   bool get spread_collections => _enableFlags[3];
 
+  /// Current state for the flag "triple_shift"
+  bool get triple_shift => _enableFlags[4];
+
   /// Queries whether the given [feature] is enabled or disabled.
   bool isEnabled(ExperimentalFeature feature) => feature.isExpired
       ? feature.isEnabledByDefault
@@ -185,6 +199,9 @@
   /// Default state of the experiment "spread-collections"
   static const bool spread_collections = false;
 
+  /// Default state of the experiment "triple-shift"
+  static const bool triple_shift = false;
+
   /// Default state of the experiment "bogus-disabled"
   static const bool bogus_disabled = false;
 
@@ -211,6 +228,9 @@
   /// Expiration status of the experiment "spread-collections"
   static const bool spread_collections = false;
 
+  /// Expiration status of the experiment "triple-shift"
+  static const bool triple_shift = false;
+
   /// Expiration status of the experiment "bogus-disabled"
   static const bool bogus_disabled = true;
 
diff --git a/pkg/analyzer/lib/src/dart/analysis/file_state.dart b/pkg/analyzer/lib/src/dart/analysis/file_state.dart
index 3e1a68a..536e53d 100644
--- a/pkg/analyzer/lib/src/dart/analysis/file_state.dart
+++ b/pkg/analyzer/lib/src/dart/analysis/file_state.dart
@@ -1,4 +1,4 @@
-// Copyright (c) 2016, the Dart project authors.  Please see the AUTHORS file
+// Copyright (c) 2016, the Dart project authors. Please see the AUTHORS file
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
 
@@ -696,7 +696,7 @@
     ExperimentStatus experimentStatus = analysisOptions.experimentStatus;
     CharSequenceReader reader = new CharSequenceReader(content);
     Scanner scanner = new Scanner(source, reader, errorListener);
-    scanner.enableGtGtGt = experimentStatus.constant_update_2018;
+    scanner.enableGtGtGt = experimentStatus.triple_shift;
     Token token = PerformanceStatistics.scan.makeCurrentWhile(() {
       return scanner.tokenize();
     });
@@ -709,6 +709,7 @@
     parser.enableSpreadCollections = experimentStatus.spread_collections;
     parser.enableControlFlowCollections =
         experimentStatus.control_flow_collections;
+    parser.enableTripleShift = experimentStatus.triple_shift;
     CompilationUnit unit = parser.parseCompilationUnit(token);
     unit.lineInfo = lineInfo;
 
diff --git a/pkg/analyzer/lib/src/dart/analysis/file_tracker.dart b/pkg/analyzer/lib/src/dart/analysis/file_tracker.dart
index 1e34697..363b777 100644
--- a/pkg/analyzer/lib/src/dart/analysis/file_tracker.dart
+++ b/pkg/analyzer/lib/src/dart/analysis/file_tracker.dart
@@ -1,4 +1,4 @@
-// Copyright (c) 2017, the Dart project authors.  Please see the AUTHORS file
+// Copyright (c) 2017, the Dart project authors. Please see the AUTHORS file
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
 
diff --git a/pkg/analyzer/lib/src/dart/analysis/fletcher16.dart b/pkg/analyzer/lib/src/dart/analysis/fletcher16.dart
index 8eb3e2e..46f3ae6 100644
--- a/pkg/analyzer/lib/src/dart/analysis/fletcher16.dart
+++ b/pkg/analyzer/lib/src/dart/analysis/fletcher16.dart
@@ -1,4 +1,4 @@
-// Copyright (c) 2018, the Dart project authors.  Please see the AUTHORS file
+// Copyright (c) 2018, the Dart project authors. Please see the AUTHORS file
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
 
diff --git a/pkg/analyzer/lib/src/dart/analysis/index.dart b/pkg/analyzer/lib/src/dart/analysis/index.dart
index ac79c40..61b116e 100644
--- a/pkg/analyzer/lib/src/dart/analysis/index.dart
+++ b/pkg/analyzer/lib/src/dart/analysis/index.dart
@@ -1,4 +1,4 @@
-// Copyright (c) 2016, the Dart project authors.  Please see the AUTHORS file
+// Copyright (c) 2016, the Dart project authors. Please see the AUTHORS file
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
 
diff --git a/pkg/analyzer/lib/src/dart/analysis/library_analyzer.dart b/pkg/analyzer/lib/src/dart/analysis/library_analyzer.dart
index 7a4b3d0..abea6f05 100644
--- a/pkg/analyzer/lib/src/dart/analysis/library_analyzer.dart
+++ b/pkg/analyzer/lib/src/dart/analysis/library_analyzer.dart
@@ -345,6 +345,7 @@
     CodeChecker checker = new CodeChecker(
       _typeProvider,
       _context.typeSystem,
+      _inheritance,
       errorListener,
       _analysisOptions,
     );
diff --git a/pkg/analyzer/lib/src/dart/analysis/library_context.dart b/pkg/analyzer/lib/src/dart/analysis/library_context.dart
index 2b3f303..0be1dab 100644
--- a/pkg/analyzer/lib/src/dart/analysis/library_context.dart
+++ b/pkg/analyzer/lib/src/dart/analysis/library_context.dart
@@ -1,4 +1,4 @@
-// Copyright (c) 2017, the Dart project authors.  Please see the AUTHORS file
+// Copyright (c) 2017, the Dart project authors. Please see the AUTHORS file
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
 
diff --git a/pkg/analyzer/lib/src/dart/analysis/library_graph.dart b/pkg/analyzer/lib/src/dart/analysis/library_graph.dart
index 74cb08c..7b0bcaf 100644
--- a/pkg/analyzer/lib/src/dart/analysis/library_graph.dart
+++ b/pkg/analyzer/lib/src/dart/analysis/library_graph.dart
@@ -1,4 +1,4 @@
-// Copyright (c) 2018, the Dart project authors.  Please see the AUTHORS file
+// Copyright (c) 2018, the Dart project authors. Please see the AUTHORS file
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
 
diff --git a/pkg/analyzer/lib/src/dart/analysis/performance_logger.dart b/pkg/analyzer/lib/src/dart/analysis/performance_logger.dart
index 47af4cd..6c265db 100644
--- a/pkg/analyzer/lib/src/dart/analysis/performance_logger.dart
+++ b/pkg/analyzer/lib/src/dart/analysis/performance_logger.dart
@@ -1,4 +1,4 @@
-// Copyright (c) 2016, the Dart project authors.  Please see the AUTHORS file
+// Copyright (c) 2016, the Dart project authors. Please see the AUTHORS file
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
 
diff --git a/pkg/analyzer/lib/src/dart/analysis/referenced_names.dart b/pkg/analyzer/lib/src/dart/analysis/referenced_names.dart
index 9148fef..ab09542 100644
--- a/pkg/analyzer/lib/src/dart/analysis/referenced_names.dart
+++ b/pkg/analyzer/lib/src/dart/analysis/referenced_names.dart
@@ -1,4 +1,4 @@
-// Copyright (c) 2016, the Dart project authors.  Please see the AUTHORS file
+// Copyright (c) 2016, the Dart project authors. Please see the AUTHORS file
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
 
diff --git a/pkg/analyzer/lib/src/dart/analysis/top_level_declaration.dart b/pkg/analyzer/lib/src/dart/analysis/top_level_declaration.dart
index b32e636..1658aad 100644
--- a/pkg/analyzer/lib/src/dart/analysis/top_level_declaration.dart
+++ b/pkg/analyzer/lib/src/dart/analysis/top_level_declaration.dart
@@ -1,4 +1,4 @@
-// Copyright (c) 2016, the Dart project authors.  Please see the AUTHORS file
+// Copyright (c) 2016, the Dart project authors. Please see the AUTHORS file
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
 
diff --git a/pkg/analyzer/lib/src/dart/ast/ast.dart b/pkg/analyzer/lib/src/dart/ast/ast.dart
index 8dfa18b..72796b5 100644
--- a/pkg/analyzer/lib/src/dart/ast/ast.dart
+++ b/pkg/analyzer/lib/src/dart/ast/ast.dart
@@ -443,13 +443,8 @@
     _expression = _becomeParentOf(expression as ExpressionImpl);
   }
 
-  @Deprecated('In the next major release, type will change to `Precedence`.  '
-      'Switch to `precedence2` to prepare for this change.')
   @override
-  int get precedence => RELATIONAL_PRECEDENCE;
-
-  @override
-  Precedence get precedence2 => Precedence.relational;
+  Precedence get precedence => Precedence.relational;
 
   @override
   TypeAnnotation get type => _type;
@@ -697,13 +692,8 @@
     _leftHandSide = _becomeParentOf(expression as ExpressionImpl);
   }
 
-  @Deprecated('In the next major release, type will change to `Precedence`.  '
-      'Switch to `precedence2` to prepare for this change.')
   @override
-  int get precedence => ASSIGNMENT_PRECEDENCE;
-
-  @override
-  Precedence get precedence2 => Precedence.assignment;
+  Precedence get precedence => Precedence.assignment;
 
   @deprecated
   @override
@@ -924,13 +914,8 @@
     _expression = _becomeParentOf(expression as ExpressionImpl);
   }
 
-  @Deprecated('In the next major release, type will change to `Precedence`.  '
-      'Switch to `precedence2` to prepare for this change.')
   @override
-  int get precedence => PREFIX_PRECEDENCE;
-
-  @override
-  Precedence get precedence2 => Precedence.prefix;
+  Precedence get precedence => Precedence.prefix;
 
   @override
   E accept<E>(AstVisitor<E> visitor) => visitor.visitAwaitExpression(this);
@@ -994,13 +979,8 @@
     _leftOperand = _becomeParentOf(expression as ExpressionImpl);
   }
 
-  @Deprecated('In the next major release, type will change to `Precedence`.  '
-      'Switch to `precedence2` to prepare for this change.')
   @override
-  int get precedence => operator.type.precedence;
-
-  @override
-  Precedence get precedence2 => Precedence.forTokenType(operator.type);
+  Precedence get precedence => Precedence.forTokenType(operator.type);
 
   @deprecated
   @override
@@ -1283,13 +1263,8 @@
   @override
   Token get endToken => _cascadeSections.endToken;
 
-  @Deprecated('In the next major release, type will change to `Precedence`.  '
-      'Switch to `precedence2` to prepare for this change.')
   @override
-  int get precedence => CASCADE_PRECEDENCE;
-
-  @override
-  Precedence get precedence2 => Precedence.cascade;
+  Precedence get precedence => Precedence.cascade;
 
   @override
   Expression get target => _target;
@@ -2283,13 +2258,8 @@
   @override
   Token get endToken => _elseExpression.endToken;
 
-  @Deprecated('In the next major release, type will change to `Precedence`.  '
-      'Switch to `precedence2` to prepare for this change.')
   @override
-  int get precedence => CONDITIONAL_PRECEDENCE;
-
-  @override
-  Precedence get precedence2 => Precedence.conditional;
+  Precedence get precedence => Precedence.conditional;
 
   @override
   Expression get thenExpression => _thenExpression;
@@ -2438,7 +2408,6 @@
         case CompileTimeErrorCode.CONST_EVAL_THROWS_IDBZE:
         case CompileTimeErrorCode.CONST_WITH_NON_CONST:
         case CompileTimeErrorCode.CONST_WITH_NON_CONSTANT_ARGUMENT:
-        case CompileTimeErrorCode.NON_CONSTANT_VALUE_IN_INITIALIZER:
         case CompileTimeErrorCode
             .CONST_CONSTRUCTOR_WITH_FIELD_INITIALIZED_BY_NON_CONST:
         case CompileTimeErrorCode.INVALID_CONSTANT:
@@ -3042,9 +3011,6 @@
   }
 
   @override
-  ParameterElement get declaredElement => _parameter.declaredElement;
-
-  @override
   Token get beginToken => _parameter.beginToken;
 
   @override
@@ -3055,6 +3021,9 @@
   Token get covariantKeyword => null;
 
   @override
+  ParameterElement get declaredElement => _parameter.declaredElement;
+
+  @override
   Expression get defaultValue => _defaultValue;
 
   @override
@@ -3699,6 +3668,10 @@
   @override
   bool get isAssignable => false;
 
+  @Deprecated('Use precedence')
+  @override
+  Precedence get precedence2 => precedence;
+
   @deprecated
   @override
   ParameterElement get propagatedParameterElement => null;
@@ -4171,107 +4144,6 @@
   }
 }
 
-/// A for-each statement.
-///
-///    forEachStatement ::=
-///        'await'? 'for' '(' [DeclaredIdentifier] 'in' [Expression] ')' [Block]
-///      | 'await'? 'for' '(' [SimpleIdentifier] 'in' [Expression] ')' [Block]
-@Deprecated('Use ForStatement2Impl')
-class ForEachStatementImpl extends ForStatement2Impl
-    implements ForEachStatement {
-  /// Initialize a newly created for-each statement whose loop control variable
-  /// is declared internally (in the for-loop part). The [awaitKeyword] can be
-  /// `null` if this is not an asynchronous for loop.
-  ForEachStatementImpl.withDeclaration(
-      Token awaitKeyword,
-      Token forKeyword,
-      Token leftParenthesis,
-      DeclaredIdentifierImpl loopVariable,
-      Token inKeyword,
-      ExpressionImpl iterator,
-      Token rightParenthesis,
-      StatementImpl body)
-      : super(
-            awaitKeyword,
-            forKeyword,
-            leftParenthesis,
-            new ForEachPartsWithDeclarationImpl(
-                loopVariable, inKeyword, iterator),
-            rightParenthesis,
-            body);
-
-  /// Creates a for-each statement using a caller-provided "parts" data
-  /// structure.
-  ForEachStatementImpl.withParts(
-      Token awaitKeyword,
-      Token forKeyword,
-      Token leftParenthesis,
-      ForEachPartsImpl forLoopParts,
-      Token rightParenthesis,
-      Statement body)
-      : super(awaitKeyword, forKeyword, leftParenthesis, forLoopParts,
-            rightParenthesis, body);
-
-  /// Initialize a newly created for-each statement whose loop control variable
-  /// is declared outside the for loop. The [awaitKeyword] can be `null` if this
-  /// is not an asynchronous for loop.
-  ForEachStatementImpl.withReference(
-      Token awaitKeyword,
-      Token forKeyword,
-      Token leftParenthesis,
-      SimpleIdentifierImpl identifier,
-      Token inKeyword,
-      ExpressionImpl iterator,
-      Token rightParenthesis,
-      StatementImpl body)
-      : super(
-            awaitKeyword,
-            forKeyword,
-            leftParenthesis,
-            new ForEachPartsWithIdentifierImpl(identifier, inKeyword, iterator),
-            rightParenthesis,
-            body);
-
-  @override
-  SimpleIdentifier get identifier => forLoopParts is ForEachPartsWithIdentifier
-      ? (forLoopParts as ForEachPartsWithIdentifier).identifier
-      : null;
-
-  @override
-  void set identifier(SimpleIdentifier identifier) {
-    (forLoopParts as ForEachPartsWithIdentifierImpl).identifier = identifier;
-  }
-
-  @override
-  Token get inKeyword => (forLoopParts as ForEachParts).inKeyword;
-
-  @override
-  set inKeyword(Token keyword) =>
-      (forLoopParts as ForEachPartsImpl).inKeyword = keyword;
-
-  @override
-  Expression get iterable => (forLoopParts as ForEachParts).iterable;
-
-  @override
-  void set iterable(Expression expression) {
-    (forLoopParts as ForEachPartsImpl).iterable = expression;
-  }
-
-  @override
-  DeclaredIdentifier get loopVariable =>
-      forLoopParts is ForEachPartsWithDeclaration
-          ? (forLoopParts as ForEachPartsWithDeclaration).loopVariable
-          : null;
-
-  @override
-  void set loopVariable(DeclaredIdentifier variable) {
-    (forLoopParts as ForEachPartsWithDeclarationImpl).loopVariable = variable;
-  }
-
-  @override
-  E accept<E>(AstVisitor<E> visitor) => visitor.visitForEachStatement(this);
-}
-
 class ForElementImpl extends CollectionElementImpl
     with ForMixin
     implements ForElement {
@@ -4641,20 +4513,12 @@
   }
 }
 
-abstract class ForStatement2Impl extends StatementImpl
-    with ForMixin
-    implements ForStatement2 {
-  /// The body of the loop.
-  StatementImpl _body;
-
+@Deprecated('Replaced by ForStatementImpl')
+class ForStatement2Impl extends ForStatementImpl implements ForStatement2 {
   /// Initialize a newly created for statement.
-  ForStatement2Impl(
-      Token awaitKeyword,
-      Token forKeyword,
-      Token leftParenthesis,
-      ForLoopPartsImpl forLoopParts,
-      Token rightParenthesis,
-      StatementImpl body) {
+  ForStatement2Impl(Token awaitKeyword, Token forKeyword, Token leftParenthesis,
+      ForLoopPartsImpl forLoopParts, Token rightParenthesis, StatementImpl body)
+      : super._() {
     this.awaitKeyword = awaitKeyword;
     this.forKeyword = forKeyword;
     this.leftParenthesis = leftParenthesis;
@@ -4663,6 +4527,28 @@
     _body = _becomeParentOf(body);
   }
 
+  @override
+  E accept<E>(AstVisitor<E> visitor) => visitor.visitForStatement2(this);
+}
+
+abstract class ForStatementImpl extends StatementImpl
+    with ForMixin
+    implements ForStatement {
+  /// The body of the loop.
+  StatementImpl _body;
+
+  /// Initialize a newly created for statement.
+  factory ForStatementImpl(
+      Token awaitKeyword,
+      Token forKeyword,
+      Token leftParenthesis,
+      ForLoopPartsImpl forLoopParts,
+      Token rightParenthesis,
+      // ignore: deprecated_member_use_from_same_package
+      StatementImpl body) = ForStatement2Impl;
+
+  ForStatementImpl._();
+
   Statement get body => _body;
 
   void set body(Statement statement) {
@@ -4678,7 +4564,7 @@
   Token get endToken => _body.endToken;
 
   @override
-  E accept<E>(AstVisitor<E> visitor) => visitor.visitForStatement2(this);
+  E accept<E>(AstVisitor<E> visitor) => visitor.visitForStatement(this);
 
   @override
   void visitChildren(AstVisitor visitor) {
@@ -4687,111 +4573,6 @@
   }
 }
 
-/// A for statement.
-///
-///    forStatement ::=
-///        'for' '(' forLoopParts ')' [Statement]
-///
-///    forLoopParts ::=
-///        forInitializerStatement ';' [Expression]? ';' [Expression]?
-///
-///    forInitializerStatement ::=
-///        [DefaultFormalParameter]
-///      | [Expression]?
-@Deprecated('Use ForStatement2Impl')
-class ForStatementImpl extends ForStatement2Impl implements ForStatement {
-  /// Initialize a newly created for statement. Either the [variableList] or the
-  /// [initialization] must be `null`. Either the [condition] and the list of
-  /// [updaters] can be `null` if the loop does not have the corresponding
-  /// attribute.
-  ForStatementImpl(
-      Token forKeyword,
-      Token leftParenthesis,
-      VariableDeclarationListImpl variableList,
-      ExpressionImpl initialization,
-      Token leftSeparator,
-      ExpressionImpl condition,
-      Token rightSeparator,
-      List<Expression> updaters,
-      Token rightParenthesis,
-      StatementImpl body)
-      : super(
-            null,
-            forKeyword,
-            leftParenthesis,
-            variableList == null
-                ? new ForPartsWithExpressionImpl(initialization, leftSeparator,
-                    condition, rightSeparator, updaters)
-                : new ForPartsWithDeclarationsImpl(variableList, leftSeparator,
-                    condition, rightSeparator, updaters),
-            rightParenthesis,
-            body);
-
-  /// Creates a for-each statement using a caller-provided "parts" data
-  /// structure.
-  ForStatementImpl.withParts(
-      Token awaitKeyword,
-      Token forKeyword,
-      Token leftParenthesis,
-      ForPartsImpl forLoopParts,
-      Token rightParenthesis,
-      Statement body)
-      : super(awaitKeyword, forKeyword, leftParenthesis, forLoopParts,
-            rightParenthesis, body);
-
-  @override
-  Expression get condition => (forLoopParts as ForParts).condition;
-
-  @override
-  void set condition(Expression expression) {
-    (forLoopParts as ForPartsImpl).condition = expression;
-  }
-
-  @override
-  Expression get initialization => forLoopParts is ForPartsWithExpression
-      ? (forLoopParts as ForPartsWithExpression).initialization
-      : null;
-
-  @override
-  void set initialization(Expression initialization) {
-    if (forLoopParts is ForPartsWithExpressionImpl) {
-      (forLoopParts as ForPartsWithExpressionImpl).initialization =
-          initialization;
-    }
-  }
-
-  @override
-  Token get leftSeparator => (forLoopParts as ForParts).leftSeparator;
-
-  @override
-  set leftSeparator(Token separator) =>
-      (forLoopParts as ForPartsImpl).leftSeparator = separator;
-
-  @override
-  Token get rightSeparator => (forLoopParts as ForParts).rightSeparator;
-
-  @override
-  set rightSeparator(Token separator) =>
-      (forLoopParts as ForPartsImpl).rightSeparator = separator;
-
-  @override
-  NodeList<Expression> get updaters => (forLoopParts as ForParts).updaters;
-
-  @override
-  VariableDeclarationList get variables =>
-      forLoopParts is ForPartsWithDeclarations
-          ? (forLoopParts as ForPartsWithDeclarations).variables
-          : null;
-
-  @override
-  void set variables(VariableDeclarationList variableList) {
-    (forLoopParts as ForPartsWithDeclarationsImpl).variables = variableList;
-  }
-
-  @override
-  E accept<E>(AstVisitor<E> visitor) => visitor.visitForStatement(this);
-}
-
 /// A node representing the body of a function or method.
 ///
 ///    functionBody ::=
@@ -5080,13 +4861,8 @@
     _parameters = _becomeParentOf(parameters as FormalParameterListImpl);
   }
 
-  @Deprecated('In the next major release, type will change to `Precedence`.  '
-      'Switch to `precedence2` to prepare for this change.')
   @override
-  int get precedence => SELECTOR_PRECEDENCE;
-
-  @override
-  Precedence get precedence2 => Precedence.primary;
+  Precedence get precedence => Precedence.primary;
 
   @override
   TypeParameterList get typeParameters => _typeParameters;
@@ -5154,13 +4930,8 @@
     _function = _becomeParentOf(expression as ExpressionImpl);
   }
 
-  @Deprecated('In the next major release, type will change to `Precedence`.  '
-      'Switch to `precedence2` to prepare for this change.')
   @override
-  int get precedence => POSTFIX_PRECEDENCE;
-
-  @override
-  Precedence get precedence2 => Precedence.postfix;
+  Precedence get precedence => Precedence.postfix;
 
   @deprecated
   @override
@@ -6002,13 +5773,8 @@
   @override
   bool get isCascaded => period != null;
 
-  @Deprecated('In the next major release, type will change to `Precedence`.  '
-      'Switch to `precedence2` to prepare for this change.')
   @override
-  int get precedence => POSTFIX_PRECEDENCE;
-
-  @override
-  Precedence get precedence2 => Precedence.postfix;
+  Precedence get precedence => Precedence.postfix;
 
   @deprecated
   @override
@@ -6178,13 +5944,8 @@
   /// Return `true` if this is an implicit constructor invocations.
   bool get isImplicit => keyword == null;
 
-  @Deprecated('In the next major release, type will change to `Precedence`.  '
-      'Switch to `precedence2` to prepare for this change.')
   @override
-  int get precedence => SELECTOR_PRECEDENCE;
-
-  @override
-  Precedence get precedence2 => Precedence.primary;
+  Precedence get precedence => Precedence.primary;
 
   /// Return the type arguments associated with the constructor, rather than
   /// with the class in which the constructor is defined. It is always an error
@@ -6611,13 +6372,8 @@
     _expression = _becomeParentOf(expression as ExpressionImpl);
   }
 
-  @Deprecated('In the next major release, type will change to `Precedence`.  '
-      'Switch to `precedence2` to prepare for this change.')
   @override
-  int get precedence => RELATIONAL_PRECEDENCE;
-
-  @override
-  Precedence get precedence2 => Precedence.relational;
+  Precedence get precedence => Precedence.relational;
 
   @override
   TypeAnnotation get type => _type;
@@ -6843,13 +6599,8 @@
     return buffer.toString();
   }
 
-  @Deprecated('In the next major release, type will change to `Precedence`.  '
-      'Switch to `precedence2` to prepare for this change.')
   @override
-  int get precedence => POSTFIX_PRECEDENCE;
-
-  @override
-  Precedence get precedence2 => Precedence.postfix;
+  Precedence get precedence => Precedence.postfix;
 
   @deprecated
   @override
@@ -6867,72 +6618,6 @@
   }
 }
 
-/// A list literal.
-///
-///    listLiteral ::=
-///        'const'? ('<' [TypeAnnotation] '>')?
-///        '[' ([CollectionLiteralElement] ','?)? ']'
-///
-/// This is the class that is used to represent a list literal when either the
-/// 'control-flow-collections' or 'spread-collections' experiments are enabled.
-/// If neither of those experiments are enabled, then [ListLiteral] will be
-/// used.
-@Deprecated('Replaced by ListLiteralImpl')
-class ListLiteral2Impl extends TypedLiteralImpl implements ListLiteral2 {
-  @override
-  Token leftBracket;
-
-  /// The elements used to compute the elements of the list.
-  NodeList<CollectionElement> _elements;
-
-  @override
-  Token rightBracket;
-
-  /// Initialize a newly created list literal. The [constKeyword] can be `null`
-  /// if the literal is not a constant. The [typeArguments] can be `null` if no
-  /// type arguments were declared. The list of [elements] can be `null` if the
-  /// list is empty.
-  ListLiteral2Impl(Token constKeyword, TypeArgumentListImpl typeArguments,
-      this.leftBracket, List<CollectionElement> elements, this.rightBracket)
-      : super(constKeyword, typeArguments) {
-    _elements = new NodeListImpl<CollectionElement>(this, elements);
-  }
-
-  @override
-  Token get beginToken {
-    if (constKeyword != null) {
-      return constKeyword;
-    }
-    TypeArgumentList typeArguments = this.typeArguments;
-    if (typeArguments != null) {
-      return typeArguments.beginToken;
-    }
-    return leftBracket;
-  }
-
-  @override
-  // TODO(paulberry): add commas.
-  Iterable<SyntacticEntity> get childEntities => super._childEntities
-    ..add(leftBracket)
-    ..addAll(_elements)
-    ..add(rightBracket);
-
-  @override
-  NodeList<CollectionElement> get elements => _elements;
-
-  @override
-  Token get endToken => rightBracket;
-
-  @override
-  E accept<E>(AstVisitor<E> visitor) => visitor.visitListLiteral2(this);
-
-  @override
-  void visitChildren(AstVisitor visitor) {
-    super.visitChildren(visitor);
-    _elements.accept(visitor);
-  }
-}
-
 class ListLiteralImpl extends TypedLiteralImpl implements ListLiteral {
   /// The left square bracket.
   @override
@@ -6990,9 +6675,10 @@
     ..add(rightBracket);
 
   @override
-  NodeList<Expression> get elements => _elements;
+  NodeList<CollectionElement> get elements => _elements;
 
   @override
+  @Deprecated('Replaced by elements')
   NodeList<CollectionElement> get elements2 => _elements;
 
   @override
@@ -7019,13 +6705,8 @@
 ///      | [NullLiteral]
 ///      | [StringLiteral]
 abstract class LiteralImpl extends ExpressionImpl implements Literal {
-  @Deprecated('In the next major release, type will change to `Precedence`.  '
-      'Switch to `precedence2` to prepare for this change.')
   @override
-  int get precedence => SELECTOR_PRECEDENCE;
-
-  @override
-  Precedence get precedence2 => Precedence.primary;
+  Precedence get precedence => Precedence.primary;
 }
 
 /// Additional information about local variables within a function or method
@@ -7043,32 +6724,6 @@
       new Set<VariableElement>();
 }
 
-/// A literal map.
-///
-///    mapLiteral ::=
-///        'const'? ('<' [TypeAnnotation] (',' [TypeAnnotation])* '>')?
-///        '{' ([MapElement] (',' [MapElement])* ','?)? '}'
-///
-/// This is the class that is used to represent a map literal when either the
-/// 'control-flow-collections' or 'spread-collections' experiments are enabled.
-/// If neither of those experiments are enabled, then [MapLiteral] will be used.
-@Deprecated('Replaced by SetOrMapLiteralImpl')
-class MapLiteral2Impl extends SetOrMapLiteralImpl implements MapLiteral2 {
-  /// Initialize a newly created map literal. The [constKeyword] can be `null`
-  /// if the literal is not a constant. The [typeArguments] can be `null` if no
-  /// type arguments were declared. The [entries] can be `null` if the map is
-  /// empty.
-  MapLiteral2Impl(Token constKeyword, TypeArgumentListImpl typeArguments,
-      Token leftBracket, List<CollectionElement> entries, Token rightBracket)
-      : super(constKeyword, typeArguments, leftBracket, entries, rightBracket);
-
-  @override
-  NodeList<CollectionElement> get entries => _elements;
-
-  @override
-  E accept<E>(AstVisitor<E> visitor) => visitor.visitMapLiteral2(this);
-}
-
 /// A single key/value pair in a map literal.
 ///
 ///    mapLiteralEntry ::=
@@ -7128,24 +6783,6 @@
   }
 }
 
-@Deprecated('Use SetOrMapLiteral')
-class MapLiteralImpl extends SetOrMapLiteralImpl implements MapLiteral {
-  /// Initialize a newly created map literal. The [constKeyword] can be `null`
-  /// if the literal is not a constant. The [typeArguments] can be `null` if no
-  /// type arguments were declared. The [entries] can be `null` if the map is
-  /// empty.
-  MapLiteralImpl(Token constKeyword, TypeArgumentListImpl typeArguments,
-      Token leftBracket, List<MapLiteralEntry> entries, Token rightBracket)
-      : super._map(
-            constKeyword, typeArguments, leftBracket, entries, rightBracket);
-
-  @override
-  NodeList<MapLiteralEntry> get entries => _elements;
-
-  @override
-  E accept<E>(AstVisitor<E> visitor) => visitor.visitMapLiteral(this);
-}
-
 /// A method declaration.
 ///
 ///    methodDeclaration ::=
@@ -7434,13 +7071,8 @@
     _methodNameType = methodNameType;
   }
 
-  @Deprecated('In the next major release, type will change to `Precedence`.  '
-      'Switch to `precedence2` to prepare for this change.')
   @override
-  int get precedence => POSTFIX_PRECEDENCE;
-
-  @override
-  Precedence get precedence2 => Precedence.postfix;
+  Precedence get precedence => Precedence.postfix;
 
   @override
   Expression get realTarget {
@@ -7653,13 +7285,8 @@
     _name = _becomeParentOf(identifier as LabelImpl);
   }
 
-  @Deprecated('In the next major release, type will change to `Precedence`.  '
-      'Switch to `precedence2` to prepare for this change.')
   @override
-  int get precedence => NO_PRECEDENCE;
-
-  @override
-  Precedence get precedence2 => Precedence.none;
+  Precedence get precedence => Precedence.none;
 
   @override
   E accept<E>(AstVisitor<E> visitor) => visitor.visitNamedExpression(this);
@@ -8210,13 +7837,8 @@
     _expression = _becomeParentOf(expression as ExpressionImpl);
   }
 
-  @Deprecated('In the next major release, type will change to `Precedence`.  '
-      'Switch to `precedence2` to prepare for this change.')
   @override
-  int get precedence => SELECTOR_PRECEDENCE;
-
-  @override
-  Precedence get precedence2 => Precedence.primary;
+  Precedence get precedence => Precedence.primary;
 
   @override
   Expression get unParenthesized {
@@ -8410,13 +8032,8 @@
     _operand = _becomeParentOf(expression as ExpressionImpl);
   }
 
-  @Deprecated('In the next major release, type will change to `Precedence`.  '
-      'Switch to `precedence2` to prepare for this change.')
   @override
-  int get precedence => POSTFIX_PRECEDENCE;
-
-  @override
-  Precedence get precedence2 => Precedence.postfix;
+  Precedence get precedence => Precedence.postfix;
 
   @deprecated
   @override
@@ -8522,13 +8139,8 @@
   @override
   String get name => "${_prefix.name}.${_identifier.name}";
 
-  @Deprecated('In the next major release, type will change to `Precedence`.  '
-      'Switch to `precedence2` to prepare for this change.')
   @override
-  int get precedence => POSTFIX_PRECEDENCE;
-
-  @override
-  Precedence get precedence2 => Precedence.postfix;
+  Precedence get precedence => Precedence.postfix;
 
   @override
   SimpleIdentifier get prefix => _prefix;
@@ -8603,13 +8215,8 @@
     _operand = _becomeParentOf(expression as ExpressionImpl);
   }
 
-  @Deprecated('In the next major release, type will change to `Precedence`.  '
-      'Switch to `precedence2` to prepare for this change.')
   @override
-  int get precedence => PREFIX_PRECEDENCE;
-
-  @override
-  Precedence get precedence2 => Precedence.prefix;
+  Precedence get precedence => Precedence.prefix;
 
   @deprecated
   @override
@@ -8690,13 +8297,8 @@
   bool get isCascaded =>
       operator != null && operator.type == TokenType.PERIOD_PERIOD;
 
-  @Deprecated('In the next major release, type will change to `Precedence`.  '
-      'Switch to `precedence2` to prepare for this change.')
   @override
-  int get precedence => POSTFIX_PRECEDENCE;
-
-  @override
-  Precedence get precedence2 => Precedence.postfix;
+  Precedence get precedence => Precedence.postfix;
 
   @override
   SimpleIdentifier get propertyName => _propertyName;
@@ -8837,13 +8439,8 @@
   @override
   Token get endToken => rethrowKeyword;
 
-  @Deprecated('In the next major release, type will change to `Precedence`.  '
-      'Switch to `precedence2` to prepare for this change.')
   @override
-  int get precedence => ASSIGNMENT_PRECEDENCE;
-
-  @override
-  Precedence get precedence2 => Precedence.assignment;
+  Precedence get precedence => Precedence.assignment;
 
   @override
   E accept<E>(AstVisitor<E> visitor) => visitor.visitRethrowExpression(this);
@@ -8934,51 +8531,6 @@
   }
 }
 
-/// A literal set.
-///
-///    setLiteral ::=
-///        'const'? ('<' [TypeAnnotation] '>')?
-///        '{' [CollectionElement] (',' [Expression])* ','? '}'
-///      | 'const'? ('<' [TypeAnnotation] '>')? '{' '}'
-///
-/// This is the class that is used to represent a set literal when either the
-/// 'control-flow-collections' or 'spread-collections' experiments are enabled.
-/// If neither of those experiments are enabled, then [SetLiteral] will be used.
-@Deprecated('Replaced by SetOrMapLiteralImpl')
-class SetLiteral2Impl extends SetOrMapLiteralImpl implements SetLiteral2 {
-  /// Initialize a newly created set literal. The [constKeyword] can be `null`
-  /// if the literal is not a constant. The [typeArguments] can be `null` if no
-  /// type arguments were declared. The [elements] can be `null` if the set is
-  /// empty.
-  SetLiteral2Impl(Token constKeyword, TypeArgumentListImpl typeArguments,
-      Token leftBracket, List<CollectionElement> elements, Token rightBracket)
-      : super(constKeyword, typeArguments, leftBracket, elements, rightBracket);
-
-  @override
-  NodeList<CollectionElement> get elements => _elements;
-
-  @override
-  E accept<E>(AstVisitor<E> visitor) => visitor.visitSetLiteral2(this);
-}
-
-@Deprecated('Use SetOrMapLiteralImpl')
-class SetLiteralImpl extends SetOrMapLiteralImpl implements SetLiteral {
-  /// Initialize a newly created set literal. The [constKeyword] can be `null`
-  /// if the literal is not a constant. The [typeArguments] can be `null` if no
-  /// type arguments were declared. The [elements] can be `null` if the set is
-  /// empty.
-  SetLiteralImpl(Token constKeyword, TypeArgumentListImpl typeArguments,
-      Token leftBracket, List<Expression> elements, Token rightBracket)
-      : super._set(
-            constKeyword, typeArguments, leftBracket, elements, rightBracket);
-
-  @override
-  NodeList<Expression> get elements => _elements;
-
-  @override
-  E accept<E>(AstVisitor<E> visitor) => visitor.visitSetLiteral(this);
-}
-
 class SetOrMapLiteralImpl extends TypedLiteralImpl implements SetOrMapLiteral {
   @override
   Token leftBracket;
@@ -9017,30 +8569,6 @@
     _resolvedKind = _SetOrMapKind.unresolved;
   }
 
-  /// Temporary constructor to support MapLiteral2Impl.
-  SetOrMapLiteralImpl._map(
-      Token constKeyword,
-      TypeArgumentListImpl typeArguments,
-      this.leftBracket,
-      List<MapLiteralEntry> elements,
-      this.rightBracket)
-      : super(constKeyword, typeArguments) {
-    _elements = new NodeListImpl<MapLiteralEntry>(this, elements);
-    _resolvedKind = _SetOrMapKind.map;
-  }
-
-  /// Temporary constructor to support SetLiteral2Impl.
-  SetOrMapLiteralImpl._set(
-      Token constKeyword,
-      TypeArgumentListImpl typeArguments,
-      this.leftBracket,
-      List<Expression> elements,
-      this.rightBracket)
-      : super(constKeyword, typeArguments) {
-    _elements = new NodeListImpl<Expression>(this, elements);
-    _resolvedKind = _SetOrMapKind.set;
-  }
-
   @override
   Token get beginToken {
     if (constKeyword != null) {
@@ -9057,10 +8585,14 @@
   // TODO(paulberry): add commas.
   Iterable<SyntacticEntity> get childEntities => super._childEntities
     ..add(leftBracket)
-    ..addAll(elements2)
+    ..addAll(elements)
     ..add(rightBracket);
 
   @override
+  NodeList<CollectionElement> get elements => _elements;
+
+  @override
+  @Deprecated('Replaced by elements')
   NodeList<CollectionElement> get elements2 => _elements;
 
   @override
@@ -9274,13 +8806,8 @@
   @override
   String get name => token.lexeme;
 
-  @Deprecated('In the next major release, type will change to `Precedence`.  '
-      'Switch to `precedence2` to prepare for this change.')
   @override
-  int get precedence => SELECTOR_PRECEDENCE;
-
-  @override
-  Precedence get precedence2 => Precedence.primary;
+  Precedence get precedence => Precedence.primary;
 
   @deprecated
   @override
@@ -9344,12 +8871,6 @@
         return false;
       }
     }
-    // ignore: deprecated_member_use_from_same_package
-    if (parent is ForEachStatement) {
-      if (identical(parent.identifier, target)) {
-        return false;
-      }
-    }
     if (parent is FieldFormalParameter) {
       if (identical(parent.identifier, target)) {
         return false;
@@ -9393,9 +8914,6 @@
       return identical(parent.leftHandSide, target);
     } else if (parent is ForEachPartsWithIdentifier) {
       return identical(parent.identifier, target);
-      // ignore: deprecated_member_use_from_same_package
-    } else if (parent is ForEachStatement) {
-      return identical(parent.identifier, target);
     }
     return false;
   }
@@ -9842,13 +9360,8 @@
   @override
   Token get endToken => superKeyword;
 
-  @Deprecated('In the next major release, type will change to `Precedence`.  '
-      'Switch to `precedence2` to prepare for this change.')
   @override
-  int get precedence => SELECTOR_PRECEDENCE;
-
-  @override
-  Precedence get precedence2 => Precedence.primary;
+  Precedence get precedence => Precedence.primary;
 
   @override
   E accept<E>(AstVisitor<E> visitor) => visitor.visitSuperExpression(this);
@@ -10113,13 +9626,8 @@
   @override
   Token get endToken => thisKeyword;
 
-  @Deprecated('In the next major release, type will change to `Precedence`.  '
-      'Switch to `precedence2` to prepare for this change.')
   @override
-  int get precedence => SELECTOR_PRECEDENCE;
-
-  @override
-  Precedence get precedence2 => Precedence.primary;
+  Precedence get precedence => Precedence.primary;
 
   @override
   E accept<E>(AstVisitor<E> visitor) => visitor.visitThisExpression(this);
@@ -10169,13 +9677,8 @@
     _expression = _becomeParentOf(expression as ExpressionImpl);
   }
 
-  @Deprecated('In the next major release, type will change to `Precedence`.  '
-      'Switch to `precedence2` to prepare for this change.')
   @override
-  int get precedence => ASSIGNMENT_PRECEDENCE;
-
-  @override
-  Precedence get precedence2 => Precedence.assignment;
+  Precedence get precedence => Precedence.assignment;
 
   @override
   E accept<E>(AstVisitor<E> visitor) => visitor.visitThrowExpression(this);
diff --git a/pkg/analyzer/lib/src/dart/ast/ast_factory.dart b/pkg/analyzer/lib/src/dart/ast/ast_factory.dart
index 3c4ba3e..2ce0985 100644
--- a/pkg/analyzer/lib/src/dart/ast/ast_factory.dart
+++ b/pkg/analyzer/lib/src/dart/ast/ast_factory.dart
@@ -1,4 +1,4 @@
-// Copyright (c) 2016, the Dart project authors.  Please see the AUTHORS file
+// Copyright (c) 2016, the Dart project authors. Please see the AUTHORS file
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
 
@@ -461,27 +461,35 @@
           initialization, leftSeparator, condition, rightSeparator, updaters);
 
   @override
-  ForStatement2 forStatement2(
+  ForStatement forStatement(
       {Token awaitKeyword,
       Token forKeyword,
       Token leftParenthesis,
       ForLoopParts forLoopParts,
       Token rightParenthesis,
       Statement body}) {
-    if (forLoopParts is ForEachParts) {
-      // ignore: deprecated_member_use_from_same_package
-      return ForEachStatementImpl.withParts(awaitKeyword, forKeyword,
-          leftParenthesis, forLoopParts, rightParenthesis, body);
-    } else if (forLoopParts is ForParts) {
-      // ignore: deprecated_member_use_from_same_package
-      return ForStatementImpl.withParts(awaitKeyword, forKeyword,
-          leftParenthesis, forLoopParts, rightParenthesis, body);
-    } else {
-      throw new StateError('Unrecognized for loop parts');
-    }
+    return ForStatementImpl(awaitKeyword, forKeyword, leftParenthesis,
+        forLoopParts, rightParenthesis, body);
   }
 
   @override
+  @Deprecated('Replaced by forStatement')
+  ForStatement forStatement2(
+          {Token awaitKeyword,
+          Token forKeyword,
+          Token leftParenthesis,
+          ForLoopParts forLoopParts,
+          Token rightParenthesis,
+          Statement body}) =>
+      forStatement(
+          awaitKeyword: awaitKeyword,
+          forKeyword: forKeyword,
+          leftParenthesis: leftParenthesis,
+          forLoopParts: forLoopParts,
+          rightParenthesis: rightParenthesis,
+          body: body);
+
+  @override
   FunctionDeclaration functionDeclaration(
           Comment comment,
           List<Annotation> metadata,
@@ -693,39 +701,6 @@
         constKeyword, typeArguments, leftBracket, elements, rightBracket);
   }
 
-  @Deprecated('Use listLiteral')
-  @override
-  ListLiteral2 listLiteral2(
-          {Token constKeyword,
-          TypeArgumentList typeArguments,
-          Token leftBracket,
-          List<CollectionElement> elements,
-          Token rightBracket}) =>
-      new ListLiteral2Impl(
-          constKeyword, typeArguments, leftBracket, elements, rightBracket);
-
-  @override
-  @Deprecated('Use setOrMapLiteral')
-  MapLiteral mapLiteral(
-          Token constKeyword,
-          TypeArgumentList typeArguments,
-          Token leftBracket,
-          List<MapLiteralEntry> entries,
-          Token rightBracket) =>
-      new MapLiteralImpl(
-          constKeyword, typeArguments, leftBracket, entries, rightBracket);
-
-  @deprecated
-  @override
-  MapLiteral2 mapLiteral2(
-      {Token constKeyword,
-      TypeArgumentList typeArguments,
-      Token leftBracket,
-      List<CollectionElement> entries,
-      Token rightBracket}) {
-    throw new UnsupportedError('Not supported');
-  }
-
   @override
   MapLiteralEntry mapLiteralEntry(
           Expression key, Token separator, Expression value) =>
@@ -878,24 +853,6 @@
   ScriptTag scriptTag(Token scriptTag) => new ScriptTagImpl(scriptTag);
 
   @override
-  @Deprecated('Use setOrMapLiteral')
-  SetLiteral setLiteral(Token constKeyword, TypeArgumentList typeArguments,
-          Token leftBracket, List<Expression> elements, Token rightBracket) =>
-      new SetLiteralImpl(
-          constKeyword, typeArguments, leftBracket, elements, rightBracket);
-
-  @deprecated
-  @override
-  SetLiteral2 setLiteral2(
-      {Token constKeyword,
-      TypeArgumentList typeArguments,
-      Token leftBracket,
-      List<CollectionElement> elements,
-      Token rightBracket}) {
-    throw new UnsupportedError('Not supported');
-  }
-
-  @override
   SetOrMapLiteral setOrMapLiteral(
           {Token constKeyword,
           TypeArgumentList typeArguments,
diff --git a/pkg/analyzer/lib/src/dart/ast/constant_evaluator.dart b/pkg/analyzer/lib/src/dart/ast/constant_evaluator.dart
index a919a7f..430631f 100644
--- a/pkg/analyzer/lib/src/dart/ast/constant_evaluator.dart
+++ b/pkg/analyzer/lib/src/dart/ast/constant_evaluator.dart
@@ -261,7 +261,7 @@
   @override
   Object visitListLiteral(ListLiteral node) {
     List<Object> list = new List<Object>();
-    for (CollectionElement element in node.elements2) {
+    for (CollectionElement element in node.elements) {
       if (element is Expression) {
         Object value = element.accept(this);
         if (identical(value, NOT_A_CONSTANT)) {
@@ -278,22 +278,6 @@
   }
 
   @override
-  @deprecated
-  Object visitMapLiteral(MapLiteral node) {
-    Map<String, Object> map = new HashMap<String, Object>();
-    for (MapLiteralEntry entry in node.entries) {
-      Object key = entry.key.accept(this);
-      Object value = entry.value.accept(this);
-      if (key is String && !identical(value, NOT_A_CONSTANT)) {
-        map[key] = value;
-      } else {
-        return NOT_A_CONSTANT;
-      }
-    }
-    return map;
-  }
-
-  @override
   Object visitMethodInvocation(MethodInvocation node) => visitNode(node);
 
   @override
@@ -348,7 +332,7 @@
     // didn't add support for set literals. As a result, this assumes that we're
     // looking at a map literal until we prove otherwise.
     Map<String, Object> map = new HashMap<String, Object>();
-    for (CollectionElement element in node.elements2) {
+    for (CollectionElement element in node.elements) {
       if (element is MapLiteralEntry) {
         Object key = element.key.accept(this);
         Object value = element.value.accept(this);
diff --git a/pkg/analyzer/lib/src/dart/ast/resolution_map.dart b/pkg/analyzer/lib/src/dart/ast/resolution_map.dart
index 8d59a9e..3fa4ea4 100644
--- a/pkg/analyzer/lib/src/dart/ast/resolution_map.dart
+++ b/pkg/analyzer/lib/src/dart/ast/resolution_map.dart
@@ -1,4 +1,4 @@
-// Copyright (c) 2016, the Dart project authors.  Please see the AUTHORS file
+// Copyright (c) 2016, the Dart project authors. Please see the AUTHORS file
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
 
diff --git a/pkg/analyzer/lib/src/dart/ast/utilities.dart b/pkg/analyzer/lib/src/dart/ast/utilities.dart
index cb913fe..f9db9f8 100644
--- a/pkg/analyzer/lib/src/dart/ast/utilities.dart
+++ b/pkg/analyzer/lib/src/dart/ast/utilities.dart
@@ -490,6 +490,7 @@
 
   @override
   ForElement visitForElement(ForElement node) => astFactory.forElement(
+      awaitKeyword: cloneToken(node.awaitKeyword),
       forKeyword: cloneToken(node.forKeyword),
       leftParenthesis: cloneToken(node.leftParenthesis),
       forLoopParts: cloneNode(node.forLoopParts),
@@ -526,14 +527,13 @@
           updaters: cloneNodeList(node.updaters));
 
   @override
-  ForStatement2 visitForStatement2(ForStatement2 node) =>
-      astFactory.forStatement2(
-          awaitKeyword: cloneToken(node.awaitKeyword),
-          forKeyword: cloneToken(node.forKeyword),
-          leftParenthesis: cloneToken(node.leftParenthesis),
-          forLoopParts: cloneNode(node.forLoopParts),
-          rightParenthesis: cloneToken(node.rightParenthesis),
-          body: cloneNode(node.body));
+  ForStatement visitForStatement(ForStatement node) => astFactory.forStatement(
+      awaitKeyword: cloneToken(node.awaitKeyword),
+      forKeyword: cloneToken(node.forKeyword),
+      leftParenthesis: cloneToken(node.leftParenthesis),
+      forLoopParts: cloneNode(node.forLoopParts),
+      rightParenthesis: cloneToken(node.rightParenthesis),
+      body: cloneNode(node.body));
 
   @override
   FunctionDeclaration visitFunctionDeclaration(FunctionDeclaration node) =>
@@ -729,30 +729,9 @@
       cloneToken(node.constKeyword),
       cloneNode(node.typeArguments),
       cloneToken(node.leftBracket),
-      cloneNodeList(node.elements2),
+      cloneNodeList(node.elements),
       cloneToken(node.rightBracket));
 
-  @deprecated
-  @override
-  ListLiteral2 visitListLiteral2(ListLiteral2 node) {
-    throw new UnsupportedError('Not supported');
-  }
-
-  @override
-  @deprecated
-  MapLiteral visitMapLiteral(MapLiteral node) => astFactory.mapLiteral(
-      cloneToken(node.constKeyword),
-      cloneNode(node.typeArguments),
-      cloneToken(node.leftBracket),
-      cloneNodeList(node.entries),
-      cloneToken(node.rightBracket));
-
-  @deprecated
-  @override
-  MapLiteral2 visitMapLiteral2(MapLiteral2 node) {
-    throw new UnsupportedError('Not supported');
-  }
-
   @override
   MapLiteralEntry visitMapLiteralEntry(MapLiteralEntry node) =>
       astFactory.mapLiteralEntry(cloneNode(node.key),
@@ -888,27 +867,12 @@
       astFactory.scriptTag(cloneToken(node.scriptTag));
 
   @override
-  @deprecated
-  SetLiteral visitSetLiteral(SetLiteral node) => astFactory.setLiteral(
-      cloneToken(node.constKeyword),
-      cloneNode(node.typeArguments),
-      cloneToken(node.leftBracket),
-      cloneNodeList(node.elements),
-      cloneToken(node.rightBracket));
-
-  @deprecated
-  @override
-  SetLiteral2 visitSetLiteral2(SetLiteral2 node) {
-    throw new UnsupportedError('Not supported');
-  }
-
-  @override
   SetOrMapLiteral visitSetOrMapLiteral(SetOrMapLiteral node) {
     var result = astFactory.setOrMapLiteral(
         constKeyword: cloneToken(node.constKeyword),
         typeArguments: cloneNode(node.typeArguments),
         leftBracket: cloneToken(node.leftBracket),
-        elements: cloneNodeList(node.elements2),
+        elements: cloneNodeList(node.elements),
         rightBracket: cloneToken(node.rightBracket));
     if (node.isMap) {
       (result as SetOrMapLiteralImpl).becomeMap();
@@ -1654,7 +1618,8 @@
   @override
   bool visitForElement(ForElement node) {
     ForElement other = _other as ForElement;
-    return isEqualTokens(node.forKeyword, other.forKeyword) &&
+    return isEqualTokens(node.awaitKeyword, other.awaitKeyword) &&
+        isEqualTokens(node.forKeyword, other.forKeyword) &&
         isEqualTokens(node.leftParenthesis, other.leftParenthesis) &&
         isEqualNodes(node.forLoopParts, other.forLoopParts) &&
         isEqualTokens(node.rightParenthesis, other.rightParenthesis) &&
@@ -1692,9 +1657,10 @@
   }
 
   @override
-  bool visitForStatement2(ForStatement2 node) {
-    ForStatement2 other = _other as ForStatement2;
+  bool visitForStatement(ForStatement node) {
+    ForStatement other = _other as ForStatement;
     return isEqualTokens(node.forKeyword, other.forKeyword) &&
+        isEqualTokens(node.awaitKeyword, other.awaitKeyword) &&
         isEqualTokens(node.leftParenthesis, other.leftParenthesis) &&
         isEqualNodes(node.forLoopParts, other.forLoopParts) &&
         isEqualTokens(node.rightParenthesis, other.rightParenthesis) &&
@@ -1921,22 +1887,10 @@
     return isEqualTokens(node.constKeyword, other.constKeyword) &&
         isEqualNodes(node.typeArguments, other.typeArguments) &&
         isEqualTokens(node.leftBracket, other.leftBracket) &&
-        _isEqualNodeLists(node.elements2, other.elements2) &&
+        _isEqualNodeLists(node.elements, other.elements) &&
         isEqualTokens(node.rightBracket, other.rightBracket);
   }
 
-  @deprecated
-  @override
-  bool visitListLiteral2(ListLiteral2 node) {
-    throw new UnsupportedError('Not supported');
-  }
-
-  @deprecated
-  @override
-  bool visitMapLiteral2(MapLiteral2 node) {
-    throw new UnsupportedError('Not supported');
-  }
-
   @override
   bool visitMapLiteralEntry(MapLiteralEntry node) {
     MapLiteralEntry other = _other as MapLiteralEntry;
@@ -2114,19 +2068,13 @@
     return isEqualTokens(node.scriptTag, other.scriptTag);
   }
 
-  @deprecated
-  @override
-  bool visitSetLiteral2(SetLiteral2 node) {
-    throw new UnsupportedError('Not supported');
-  }
-
   @override
   bool visitSetOrMapLiteral(SetOrMapLiteral node) {
     SetOrMapLiteral other = _other as SetOrMapLiteral;
     return isEqualTokens(node.constKeyword, other.constKeyword) &&
         isEqualNodes(node.typeArguments, other.typeArguments) &&
         isEqualTokens(node.leftBracket, other.leftBracket) &&
-        _isEqualNodeLists(node.elements2, other.elements2) &&
+        _isEqualNodeLists(node.elements, other.elements) &&
         isEqualTokens(node.rightBracket, other.rightBracket);
   }
 
@@ -2908,6 +2856,7 @@
 
   @override
   ForElement visitForElement(ForElement node) => astFactory.forElement(
+      awaitKeyword: _mapToken(node.awaitKeyword),
       forKeyword: _mapToken(node.forKeyword),
       leftParenthesis: _mapToken(node.leftParenthesis),
       forLoopParts: _cloneNode(node.forLoopParts),
@@ -2944,13 +2893,13 @@
           updaters: _cloneNodeList(node.updaters));
 
   @override
-  ForStatement2 visitForStatement2(ForStatement2 node) =>
-      astFactory.forStatement2(
-          forKeyword: _mapToken(node.forKeyword),
-          leftParenthesis: _mapToken(node.leftParenthesis),
-          forLoopParts: _cloneNode(node.forLoopParts),
-          rightParenthesis: _mapToken(node.rightParenthesis),
-          body: _cloneNode(node.body));
+  ForStatement visitForStatement(ForStatement node) => astFactory.forStatement(
+      awaitKeyword: _mapToken(node.awaitKeyword),
+      forKeyword: _mapToken(node.forKeyword),
+      leftParenthesis: _mapToken(node.leftParenthesis),
+      forLoopParts: _cloneNode(node.forLoopParts),
+      rightParenthesis: _mapToken(node.rightParenthesis),
+      body: _cloneNode(node.body));
 
   @override
   FunctionDeclaration visitFunctionDeclaration(FunctionDeclaration node) =>
@@ -3183,39 +3132,13 @@
         _mapToken(node.constKeyword),
         _cloneNode(node.typeArguments),
         _mapToken(node.leftBracket),
-        _cloneNodeList(node.elements2),
+        _cloneNodeList(node.elements),
         _mapToken(node.rightBracket));
     copy.staticType = node.staticType;
     return copy;
   }
 
   @override
-  ListLiteral2 visitListLiteral2(ListLiteral2 node) => astFactory.listLiteral2(
-      constKeyword: _mapToken(node.constKeyword),
-      typeArguments: _cloneNode(node.typeArguments),
-      leftBracket: _mapToken(node.leftBracket),
-      elements: _cloneNodeList(node.elements),
-      rightBracket: _mapToken(node.rightBracket));
-
-  @override
-  MapLiteral visitMapLiteral(MapLiteral node) {
-    MapLiteral copy = astFactory.mapLiteral(
-        _mapToken(node.constKeyword),
-        _cloneNode(node.typeArguments),
-        _mapToken(node.leftBracket),
-        _cloneNodeList(node.entries),
-        _mapToken(node.rightBracket));
-    copy.staticType = node.staticType;
-    return copy;
-  }
-
-  @deprecated
-  @override
-  MapLiteral2 visitMapLiteral2(MapLiteral2 node) {
-    throw new UnsupportedError('Not supported');
-  }
-
-  @override
   MapLiteralEntry visitMapLiteralEntry(MapLiteralEntry node) =>
       astFactory.mapLiteralEntry(_cloneNode(node.key),
           _mapToken(node.separator), _cloneNode(node.value));
@@ -3393,30 +3316,12 @@
       astFactory.scriptTag(_mapToken(node.scriptTag));
 
   @override
-  SetLiteral visitSetLiteral(SetLiteral node) {
-    SetLiteral copy = astFactory.setLiteral(
-        _mapToken(node.constKeyword),
-        _cloneNode(node.typeArguments),
-        _mapToken(node.leftBracket),
-        _cloneNodeList(node.elements),
-        _mapToken(node.rightBracket));
-    copy.staticType = node.staticType;
-    return copy;
-  }
-
-  @deprecated
-  @override
-  SetLiteral2 visitSetLiteral2(SetLiteral2 node) {
-    throw new UnsupportedError('Not supported');
-  }
-
-  @override
   SetOrMapLiteral visitSetOrMapLiteral(SetOrMapLiteral node) {
     SetOrMapLiteral copy = astFactory.setOrMapLiteral(
         constKeyword: _mapToken(node.constKeyword),
         typeArguments: _cloneNode(node.typeArguments),
         leftBracket: _mapToken(node.leftBracket),
-        elements: _cloneNodeList(node.elements2),
+        elements: _cloneNodeList(node.elements),
         rightBracket: _mapToken(node.rightBracket));
     copy.staticType = node.staticType;
     return copy;
@@ -4423,12 +4328,12 @@
   }
 
   @override
-  bool visitForStatement2(ForStatement2 node) {
+  bool visitForStatement(ForStatement node) {
     if (identical(node.forLoopParts, _oldNode)) {
-      (node as ForStatement2Impl).forLoopParts = _newNode as ForLoopParts;
+      (node as ForStatementImpl).forLoopParts = _newNode as ForLoopParts;
       return true;
     } else if (identical(node.body, _oldNode)) {
-      (node as ForStatement2Impl).body = _newNode as Statement;
+      (node as ForStatementImpl).body = _newNode as Statement;
       return true;
     }
     return visitNode(node);
@@ -4689,24 +4594,12 @@
 
   @override
   bool visitListLiteral(ListLiteral node) {
-    if (_replaceInList(node.elements2)) {
+    if (_replaceInList(node.elements)) {
       return true;
     }
     return visitTypedLiteral(node);
   }
 
-  @deprecated
-  @override
-  bool visitListLiteral2(ListLiteral2 node) {
-    throw new UnsupportedError('Not supported');
-  }
-
-  @deprecated
-  @override
-  bool visitMapLiteral2(MapLiteral2 node) {
-    throw new UnsupportedError('Not supported');
-  }
-
   @override
   bool visitMapLiteralEntry(MapLiteralEntry node) {
     if (identical(node.key, _oldNode)) {
@@ -4935,15 +4828,9 @@
   @override
   bool visitScriptTag(ScriptTag scriptTag) => visitNode(scriptTag);
 
-  @deprecated
-  @override
-  bool visitSetLiteral2(SetLiteral2 node) {
-    throw new UnsupportedError('Not supported');
-  }
-
   @override
   bool visitSetOrMapLiteral(SetOrMapLiteral node) {
-    if (_replaceInList(node.elements2)) {
+    if (_replaceInList(node.elements)) {
       return true;
     }
     return visitTypedLiteral(node);
@@ -5740,24 +5627,10 @@
   }
 
   @override
-  @deprecated
-  bool visitForEachStatement(ForEachStatement node) {
-    ForEachStatement toNode = this._toNode as ForEachStatement;
-    return _and(
-        _isEqualTokens(node.forKeyword, toNode.forKeyword),
-        _isEqualTokens(node.leftParenthesis, toNode.leftParenthesis),
-        _isEqualNodes(node.loopVariable, toNode.loopVariable),
-        _isEqualNodes(node.identifier, toNode.identifier),
-        _isEqualTokens(node.inKeyword, toNode.inKeyword),
-        _isEqualNodes(node.iterable, toNode.iterable),
-        _isEqualTokens(node.rightParenthesis, toNode.rightParenthesis),
-        _isEqualNodes(node.body, toNode.body));
-  }
-
-  @override
   bool visitForElement(ForElement node) {
     ForElement toNode = this._toNode as ForElement;
     return _and(
+        _isEqualTokens(node.awaitKeyword, toNode.awaitKeyword),
         _isEqualTokens(node.forKeyword, toNode.forKeyword),
         _isEqualTokens(node.leftParenthesis, toNode.leftParenthesis),
         _isEqualNodes(node.forLoopParts, toNode.forLoopParts),
@@ -5799,26 +5672,10 @@
   }
 
   @override
-  @deprecated
   bool visitForStatement(ForStatement node) {
     ForStatement toNode = this._toNode as ForStatement;
     return _and(
-        _isEqualTokens(node.forKeyword, toNode.forKeyword),
-        _isEqualTokens(node.leftParenthesis, toNode.leftParenthesis),
-        _isEqualNodes(node.variables, toNode.variables),
-        _isEqualNodes(node.initialization, toNode.initialization),
-        _isEqualTokens(node.leftSeparator, toNode.leftSeparator),
-        _isEqualNodes(node.condition, toNode.condition),
-        _isEqualTokens(node.rightSeparator, toNode.rightSeparator),
-        _isEqualNodeLists(node.updaters, toNode.updaters),
-        _isEqualTokens(node.rightParenthesis, toNode.rightParenthesis),
-        _isEqualNodes(node.body, toNode.body));
-  }
-
-  @override
-  bool visitForStatement2(ForStatement2 node) {
-    ForStatement2 toNode = this._toNode as ForStatement2;
-    return _and(
+        _isEqualTokens(node.awaitKeyword, toNode.awaitKeyword),
         _isEqualTokens(node.forKeyword, toNode.forKeyword),
         _isEqualTokens(node.leftParenthesis, toNode.leftParenthesis),
         _isEqualNodes(node.forLoopParts, toNode.forLoopParts),
@@ -6109,7 +5966,7 @@
         _isEqualTokens(node.constKeyword, toNode.constKeyword),
         _isEqualNodes(node.typeArguments, toNode.typeArguments),
         _isEqualTokens(node.leftBracket, toNode.leftBracket),
-        _isEqualNodeLists(node.elements2, toNode.elements2),
+        _isEqualNodeLists(node.elements, toNode.elements),
         _isEqualTokens(node.rightBracket, toNode.rightBracket))) {
       toNode.staticType = node.staticType;
       return true;
@@ -6117,34 +5974,6 @@
     return false;
   }
 
-  @deprecated
-  @override
-  bool visitListLiteral2(ListLiteral2 node) {
-    throw new UnsupportedError('Not supported');
-  }
-
-  @override
-  @deprecated
-  bool visitMapLiteral(MapLiteral node) {
-    MapLiteral toNode = this._toNode as MapLiteral;
-    if (_and(
-        _isEqualTokens(node.constKeyword, toNode.constKeyword),
-        _isEqualNodes(node.typeArguments, toNode.typeArguments),
-        _isEqualTokens(node.leftBracket, toNode.leftBracket),
-        _isEqualNodeLists(node.entries, toNode.entries),
-        _isEqualTokens(node.rightBracket, toNode.rightBracket))) {
-      toNode.staticType = node.staticType;
-      return true;
-    }
-    return false;
-  }
-
-  @deprecated
-  @override
-  bool visitMapLiteral2(MapLiteral2 node) {
-    throw new UnsupportedError('Not supported');
-  }
-
   @override
   bool visitMapLiteralEntry(MapLiteralEntry node) {
     MapLiteralEntry toNode = this._toNode as MapLiteralEntry;
@@ -6384,35 +6213,13 @@
   }
 
   @override
-  @deprecated
-  bool visitSetLiteral(SetLiteral node) {
-    SetLiteral toNode = this._toNode as SetLiteral;
-    if (_and(
-        _isEqualTokens(node.constKeyword, toNode.constKeyword),
-        _isEqualNodes(node.typeArguments, toNode.typeArguments),
-        _isEqualTokens(node.leftBracket, toNode.leftBracket),
-        _isEqualNodeLists(node.elements, toNode.elements),
-        _isEqualTokens(node.rightBracket, toNode.rightBracket))) {
-      toNode.staticType = node.staticType;
-      return true;
-    }
-    return false;
-  }
-
-  @deprecated
-  @override
-  bool visitSetLiteral2(SetLiteral2 node) {
-    throw new UnsupportedError('Not supported');
-  }
-
-  @override
   bool visitSetOrMapLiteral(SetOrMapLiteral node) {
     SetOrMapLiteral toNode = this._toNode as SetOrMapLiteral;
     if (_and(
         _isEqualTokens(node.constKeyword, toNode.constKeyword),
         _isEqualNodes(node.typeArguments, toNode.typeArguments),
         _isEqualTokens(node.leftBracket, toNode.leftBracket),
-        _isEqualNodeLists(node.elements2, toNode.elements2),
+        _isEqualNodeLists(node.elements, toNode.elements),
         _isEqualTokens(node.rightBracket, toNode.rightBracket))) {
       toNode.staticType = node.staticType;
       return true;
@@ -6880,31 +6687,12 @@
   }
 
   @override
-  @deprecated
-  void visitForEachStatement(ForEachStatement node) {
-    DeclaredIdentifier loopVariable = node.loopVariable;
-    if (loopVariable != null) {
-      _addToScope(loopVariable.identifier);
-    }
-    super.visitForEachStatement(node);
-  }
-
-  @override
   void visitForPartsWithDeclarations(ForPartsWithDeclarations node) {
     _addVariables(node.variables.variables);
     super.visitForPartsWithDeclarations(node);
   }
 
   @override
-  @deprecated
-  void visitForStatement(ForStatement node) {
-    if (!identical(_immediateChild, node.variables) && node.variables != null) {
-      _addVariables(node.variables.variables);
-    }
-    super.visitForStatement(node);
-  }
-
-  @override
   void visitFunctionDeclaration(FunctionDeclaration node) {
     if (node.parent is! FunctionDeclarationStatement) {
       _declarationNode = node;
@@ -7451,7 +7239,7 @@
   }
 
   @override
-  void visitForStatement2(ForStatement2 node) {
+  void visitForStatement(ForStatement node) {
     if (node.awaitKeyword != null) {
       _writer.print('await ');
     }
@@ -7660,22 +7448,10 @@
     _visitTokenWithSuffix(node.constKeyword, ' ');
     _visitNode(node.typeArguments);
     _writer.print('[');
-    _visitNodeListWithSeparator(node.elements2, ', ');
+    _visitNodeListWithSeparator(node.elements, ', ');
     _writer.print(']');
   }
 
-  @deprecated
-  @override
-  void visitListLiteral2(ListLiteral2 node) {
-    throw new UnsupportedError('Not supported');
-  }
-
-  @deprecated
-  @override
-  void visitMapLiteral2(MapLiteral2 node) {
-    throw new UnsupportedError('Not supported');
-  }
-
   @override
   void visitMapLiteralEntry(MapLiteralEntry node) {
     _visitNode(node.key);
@@ -7840,12 +7616,6 @@
     _writer.print(node.scriptTag.lexeme);
   }
 
-  @deprecated
-  @override
-  void visitSetLiteral2(SetLiteral2 node) {
-    throw new UnsupportedError('Not supported');
-  }
-
   @override
   void visitSetOrMapLiteral(SetOrMapLiteral node) {
     if (node.constKeyword != null) {
@@ -7854,7 +7624,7 @@
     }
     _visitNode(node.typeArguments);
     _writer.print('{');
-    _visitNodeListWithSeparator(node.elements2, ', ');
+    _visitNodeListWithSeparator(node.elements, ', ');
     _writer.print('}');
   }
 
@@ -8725,7 +8495,7 @@
   }
 
   @override
-  void visitForStatement2(ForStatement2 node) {
+  void visitForStatement(ForStatement node) {
     if (node.awaitKeyword != null) {
       sink.write('await ');
     }
@@ -8934,22 +8704,10 @@
     safelyVisitTokenWithSuffix(node.constKeyword, ' ');
     safelyVisitNode(node.typeArguments);
     sink.write('[');
-    safelyVisitNodeListWithSeparator(node.elements2, ', ');
+    safelyVisitNodeListWithSeparator(node.elements, ', ');
     sink.write(']');
   }
 
-  @deprecated
-  @override
-  void visitListLiteral2(ListLiteral2 node) {
-    throw new UnsupportedError('Not supported');
-  }
-
-  @deprecated
-  @override
-  void visitMapLiteral2(MapLiteral2 node) {
-    throw new UnsupportedError('Not supported');
-  }
-
   @override
   void visitMapLiteralEntry(MapLiteralEntry node) {
     safelyVisitNode(node.key);
@@ -9114,18 +8872,12 @@
     sink.write(node.scriptTag.lexeme);
   }
 
-  @deprecated
-  @override
-  void visitSetLiteral2(SetLiteral2 node) {
-    throw new UnsupportedError('Not supported');
-  }
-
   @override
   void visitSetOrMapLiteral(SetOrMapLiteral node) {
     safelyVisitTokenWithSuffix(node.constKeyword, ' ');
     safelyVisitNode(node.typeArguments);
     sink.write('{');
-    safelyVisitNodeListWithSeparator(node.elements2, ', ');
+    safelyVisitNodeListWithSeparator(node.elements, ', ');
     sink.write('}');
   }
 
@@ -9319,7 +9071,7 @@
 
   void _writeOperand(Expression node, Expression operand) {
     if (operand != null) {
-      bool needsParenthesis = operand.precedence2 < node.precedence2;
+      bool needsParenthesis = operand.precedence < node.precedence;
       if (needsParenthesis) {
         sink.write('(');
       }
@@ -9331,44 +9083,12 @@
   }
 }
 
-/// Mixin allowing visitor classes to forward visit methods for AST structures
-/// that will be deleted as part of the implementation of the "UI as code"
-/// feature.
-///
-/// We will be removing the classes `ForEachStatement`, `ForStatement`,
-/// `MapLiteral`, and `SetLiteral` as part of implementing the "UI as code"
-/// feature.  In order to allow this change to be rolled out to clients in a
-/// staged fashion, we first update each visitor so that it forwards the old
-/// visit methods to their new counterparts; this will allow clients to begin
-/// rewriting their visitors in terms of the new data structures now.
-///
-/// This mixin exists so that we don't have to duplicate the forwarding logic in
-/// every concrete visitor class.
-///
-/// This class will be removed when the above classes (and their corresponding
-/// visit methods) are removed.
+/// Mixin allowing visitor classes to forward the visit method for
+/// `ForStatement2` to `ForStatement`
 mixin UIAsCodeVisitorMixin<R> implements AstVisitor<R> {
   @override
   @deprecated
-  R visitForEachStatement(ForEachStatement node) {
-    return visitForStatement2(node);
-  }
-
-  @override
-  @deprecated
-  R visitForStatement(ForStatement node) {
-    return visitForStatement2(node);
-  }
-
-  @override
-  @deprecated
-  R visitMapLiteral(MapLiteral node) {
-    return visitSetOrMapLiteral(node);
-  }
-
-  @override
-  @deprecated
-  R visitSetLiteral(SetLiteral node) {
-    return visitSetOrMapLiteral(node);
+  R visitForStatement2(ForStatement2 node) {
+    return visitForStatement(node);
   }
 }
diff --git a/pkg/analyzer/lib/src/dart/constant/constant_verifier.dart b/pkg/analyzer/lib/src/dart/constant/constant_verifier.dart
index a8459c1..f3c1805 100644
--- a/pkg/analyzer/lib/src/dart/constant/constant_verifier.dart
+++ b/pkg/analyzer/lib/src/dart/constant/constant_verifier.dart
@@ -37,18 +37,9 @@
   /// The set of variables declared using '-D' on the command line.
   final DeclaredVariables declaredVariables;
 
-  /// The type representing the type 'bool'.
-  InterfaceType _boolType;
-
   /// The type representing the type 'int'.
   InterfaceType _intType;
 
-  /// The type representing the type 'num'.
-  InterfaceType _numType;
-
-  /// The type representing the type 'string'.
-  InterfaceType _stringType;
-
   /// The current library that is being analyzed.
   final LibraryElement _currentLibrary;
 
@@ -62,10 +53,7 @@
       {bool forAnalysisDriver: false})
       : _currentLibrary = currentLibrary,
         _typeSystem = currentLibrary.context.typeSystem {
-    this._boolType = _typeProvider.boolType;
     this._intType = _typeProvider.intType;
-    this._numType = _typeProvider.numType;
-    this._stringType = _typeProvider.stringType;
     this._evaluationEngine = new ConstantEvaluationEngine(
         _typeProvider, declaredVariables,
         forAnalysisDriver: forAnalysisDriver,
@@ -147,12 +135,11 @@
       DartType elementType = nodeType.typeArguments[0];
       var verifier = _ConstLiteralVerifier(
         this,
-        isConst: true,
         errorCode: CompileTimeErrorCode.NON_CONSTANT_LIST_ELEMENT,
         forList: true,
         listElementType: elementType,
       );
-      for (CollectionElement element in node.elements2) {
+      for (CollectionElement element in node.elements) {
         verifier.verify(element);
       }
     }
@@ -167,56 +154,55 @@
   @override
   void visitSetOrMapLiteral(SetOrMapLiteral node) {
     super.visitSetOrMapLiteral(node);
-    bool isConst = node.isConst;
     if (node.isSet) {
-      if (isConst) {
+      if (node.isConst) {
         InterfaceType nodeType = node.staticType;
         var elementType = nodeType.typeArguments[0];
         var duplicateElements = <Expression>[];
         var verifier = _ConstLiteralVerifier(
           this,
-          isConst: isConst,
           errorCode: CompileTimeErrorCode.NON_CONSTANT_SET_ELEMENT,
           forSet: true,
           setElementType: elementType,
           setUniqueValues: Set<DartObject>(),
-          setDuplicateElements: duplicateElements,
+          setDuplicateExpressions: duplicateElements,
         );
-        for (CollectionElement element in node.elements2) {
+        for (CollectionElement element in node.elements) {
           verifier.verify(element);
         }
         for (var duplicateElement in duplicateElements) {
           _errorReporter.reportErrorForNode(
-            StaticWarningCode.EQUAL_VALUES_IN_CONST_SET,
+            CompileTimeErrorCode.EQUAL_ELEMENTS_IN_CONST_SET,
             duplicateElement,
           );
         }
       }
     } else if (node.isMap) {
-      InterfaceType nodeType = node.staticType;
-      var keyType = nodeType.typeArguments[0];
-      var valueType = nodeType.typeArguments[1];
-      bool reportEqualKeys = true;
-      var duplicateKeyElements = <Expression>[];
-      var verifier = _ConstLiteralVerifier(
-        this,
-        isConst: isConst,
-        errorCode: CompileTimeErrorCode.NON_CONSTANT_MAP_ELEMENT,
-        forMap: true,
-        mapKeyType: keyType,
-        mapValueType: valueType,
-        mapUniqueKeys: Set<DartObject>(),
-        mapDuplicateKeyElements: duplicateKeyElements,
-      );
-      for (CollectionElement entry in node.elements2) {
-        verifier.verify(entry);
-      }
-      if (reportEqualKeys) {
-        for (var duplicateKeyElement in duplicateKeyElements) {
-          _errorReporter.reportErrorForNode(
-            StaticWarningCode.EQUAL_KEYS_IN_MAP,
-            duplicateKeyElement,
-          );
+      if (node.isConst) {
+        InterfaceType nodeType = node.staticType;
+        var keyType = nodeType.typeArguments[0];
+        var valueType = nodeType.typeArguments[1];
+        bool reportEqualKeys = true;
+        var duplicateKeyElements = <Expression>[];
+        var verifier = _ConstLiteralVerifier(
+          this,
+          errorCode: CompileTimeErrorCode.NON_CONSTANT_MAP_ELEMENT,
+          forMap: true,
+          mapKeyType: keyType,
+          mapValueType: valueType,
+          mapUniqueKeys: Set<DartObject>(),
+          mapDuplicateKeyExpressions: duplicateKeyElements,
+        );
+        for (CollectionElement entry in node.elements) {
+          verifier.verify(entry);
+        }
+        if (reportEqualKeys) {
+          for (var duplicateKeyElement in duplicateKeyElements) {
+            _errorReporter.reportErrorForNode(
+              CompileTimeErrorCode.EQUAL_KEYS_IN_CONST_MAP,
+              duplicateKeyElement,
+            );
+          }
         }
       }
     }
@@ -417,6 +403,29 @@
     }
   }
 
+  void _reportNotPotentialConstants(AstNode node) {
+    var notPotentiallyConstants = getNotPotentiallyConstants(node);
+    if (notPotentiallyConstants.isEmpty) return;
+
+    for (var notConst in notPotentiallyConstants) {
+      _errorReporter.reportErrorForNode(
+        CompileTimeErrorCode.INVALID_CONSTANT,
+        notConst,
+      );
+    }
+  }
+
+  /// Validates that all arguments in the [argumentList] are potentially
+  /// constant expressions.
+  void _reportNotPotentialConstantsArguments(ArgumentList argumentList) {
+    if (argumentList == null) {
+      return;
+    }
+    for (Expression argument in argumentList.arguments) {
+      _reportNotPotentialConstants(argument);
+    }
+  }
+
   /// Validate that the given expression is a compile time constant. Return the
   /// value of the compile time constant, or `null` if the expression is not a
   /// compile time constant.
@@ -450,26 +459,20 @@
   /// Validates that the expressions of the initializers of the given constant
   /// [constructor] are all compile time constants.
   void _validateConstructorInitializers(ConstructorDeclaration constructor) {
-    List<ParameterElement> parameterElements =
-        constructor.parameters.parameterElements;
     NodeList<ConstructorInitializer> initializers = constructor.initializers;
     for (ConstructorInitializer initializer in initializers) {
       if (initializer is AssertInitializer) {
-        _validateInitializerExpression(
-            parameterElements, initializer.condition);
+        _reportNotPotentialConstants(initializer.condition);
         Expression message = initializer.message;
         if (message != null) {
-          _validateInitializerExpression(parameterElements, message);
+          _reportNotPotentialConstants(message);
         }
       } else if (initializer is ConstructorFieldInitializer) {
-        _validateInitializerExpression(
-            parameterElements, initializer.expression);
+        _reportNotPotentialConstants(initializer.expression);
       } else if (initializer is RedirectingConstructorInvocation) {
-        _validateInitializerInvocationArguments(
-            parameterElements, initializer.argumentList);
+        _reportNotPotentialConstantsArguments(initializer.argumentList);
       } else if (initializer is SuperConstructorInvocation) {
-        _validateInitializerInvocationArguments(
-            parameterElements, initializer.argumentList);
+        _reportNotPotentialConstantsArguments(initializer.argumentList);
       }
     }
   }
@@ -542,149 +545,61 @@
       }
     }
   }
-
-  /// Validates that the given expression is a compile time constant.
-  ///
-  /// @param parameterElements the elements of parameters of constant
-  ///        constructor, they are considered as a valid potentially constant
-  ///        expressions
-  /// @param expression the expression to validate
-  void _validateInitializerExpression(
-      List<ParameterElement> parameterElements, Expression expression) {
-    RecordingErrorListener errorListener = new RecordingErrorListener();
-    ErrorReporter subErrorReporter =
-        new ErrorReporter(errorListener, _errorReporter.source);
-    DartObjectImpl result = expression.accept(
-        new _ConstantVerifier_validateInitializerExpression(_typeSystem,
-            _evaluationEngine, subErrorReporter, this, parameterElements));
-    _reportErrors(errorListener.errors,
-        CompileTimeErrorCode.NON_CONSTANT_VALUE_IN_INITIALIZER);
-    if (result != null) {
-      _reportErrorIfFromDeferredLibrary(
-          expression,
-          CompileTimeErrorCode
-              .NON_CONSTANT_VALUE_IN_INITIALIZER_FROM_DEFERRED_LIBRARY);
-    }
-  }
-
-  /// Validates that all of the arguments of a constructor initializer are
-  /// compile time constants.
-  ///
-  /// @param parameterElements the elements of parameters of constant
-  ///        constructor, they are considered as a valid potentially constant
-  ///        expressions
-  /// @param argumentList the argument list to validate
-  void _validateInitializerInvocationArguments(
-      List<ParameterElement> parameterElements, ArgumentList argumentList) {
-    if (argumentList == null) {
-      return;
-    }
-    for (Expression argument in argumentList.arguments) {
-      _validateInitializerExpression(parameterElements, argument);
-    }
-  }
-}
-
-class _ConstantVerifier_validateInitializerExpression extends ConstantVisitor {
-  final TypeSystem typeSystem;
-  final ConstantVerifier verifier;
-
-  List<ParameterElement> parameterElements;
-
-  _ConstantVerifier_validateInitializerExpression(
-      this.typeSystem,
-      ConstantEvaluationEngine evaluationEngine,
-      ErrorReporter errorReporter,
-      this.verifier,
-      this.parameterElements)
-      : super(evaluationEngine, errorReporter);
-
-  @override
-  DartObjectImpl visitSimpleIdentifier(SimpleIdentifier node) {
-    Element element = node.staticElement;
-    int length = parameterElements.length;
-    for (int i = 0; i < length; i++) {
-      ParameterElement parameterElement = parameterElements[i];
-      if (identical(parameterElement, element) && parameterElement != null) {
-        DartType type = parameterElement.type;
-        if (type != null) {
-          if (type.isDynamic) {
-            return new DartObjectImpl(
-                verifier._typeProvider.objectType, DynamicState.DYNAMIC_STATE);
-          } else if (typeSystem.isSubtypeOf(type, verifier._boolType)) {
-            return new DartObjectImpl(
-                verifier._typeProvider.boolType, BoolState.UNKNOWN_VALUE);
-          } else if (typeSystem.isSubtypeOf(
-              type, verifier._typeProvider.doubleType)) {
-            return new DartObjectImpl(
-                verifier._typeProvider.doubleType, DoubleState.UNKNOWN_VALUE);
-          } else if (typeSystem.isSubtypeOf(type, verifier._intType)) {
-            return new DartObjectImpl(
-                verifier._typeProvider.intType, IntState.UNKNOWN_VALUE);
-          } else if (typeSystem.isSubtypeOf(type, verifier._numType)) {
-            return new DartObjectImpl(
-                verifier._typeProvider.numType, NumState.UNKNOWN_VALUE);
-          } else if (typeSystem.isSubtypeOf(type, verifier._stringType)) {
-            return new DartObjectImpl(
-                verifier._typeProvider.stringType, StringState.UNKNOWN_VALUE);
-          }
-          //
-          // We don't test for other types of objects (such as List, Map,
-          // Function or Type) because there are no operations allowed on such
-          // types other than '==' and '!=', which means that we don't need to
-          // know the type when there is no specific data about the state of
-          // such objects.
-          //
-        }
-        return new DartObjectImpl(
-            type is InterfaceType ? type : verifier._typeProvider.objectType,
-            GenericState.UNKNOWN_VALUE);
-      }
-    }
-    return super.visitSimpleIdentifier(node);
-  }
 }
 
 class _ConstLiteralVerifier {
   final ConstantVerifier verifier;
-  final bool isConst;
   final Set<DartObject> mapUniqueKeys;
-  final List<Expression> mapDuplicateKeyElements;
+  final List<Expression> mapDuplicateKeyExpressions;
   final ErrorCode errorCode;
   final DartType listElementType;
   final DartType mapKeyType;
   final DartType mapValueType;
   final DartType setElementType;
   final Set<DartObject> setUniqueValues;
-  final List<CollectionElement> setDuplicateElements;
+  final List<CollectionElement> setDuplicateExpressions;
   final bool forList;
   final bool forMap;
   final bool forSet;
 
   _ConstLiteralVerifier(
     this.verifier, {
-    this.isConst,
     this.mapUniqueKeys,
-    this.mapDuplicateKeyElements,
+    this.mapDuplicateKeyExpressions,
     this.errorCode,
     this.listElementType,
     this.mapKeyType,
     this.mapValueType,
     this.setElementType,
     this.setUniqueValues,
-    this.setDuplicateElements,
+    this.setDuplicateExpressions,
     this.forList = false,
     this.forMap = false,
     this.forSet = false,
   });
 
+  ErrorCode get _fromDeferredErrorCode {
+    if (forList) {
+      return CompileTimeErrorCode
+          .NON_CONSTANT_LIST_ELEMENT_FROM_DEFERRED_LIBRARY;
+    } else if (forSet) {
+      return CompileTimeErrorCode
+          .NON_CONSTANT_SET_ELEMENT_FROM_DEFERRED_LIBRARY;
+    }
+
+    return null;
+  }
+
   bool verify(CollectionElement element) {
     if (element is Expression) {
-      if (!isConst) return true;
-
       var value = verifier._validate(element, errorCode);
       if (value == null) return false;
 
+      if (_fromDeferredErrorCode != null) {
+        verifier._reportErrorIfFromDeferredLibrary(
+            element, _fromDeferredErrorCode);
+      }
+
       if (forList) {
         return _validateListExpression(element, value);
       }
@@ -695,19 +610,20 @@
 
       return true;
     } else if (element is ForElement) {
-      if (!isConst) return true;
-
       verifier._errorReporter.reportErrorForNode(errorCode, element);
       return false;
     } else if (element is IfElement) {
-      if (!isConst) return true;
-
       var conditionValue = verifier._validate(element.condition, errorCode);
       var conditionBool = conditionValue?.toBoolValue();
 
       // The errors have already been reported.
       if (conditionBool == null) return false;
 
+      verifier._reportErrorIfFromDeferredLibrary(
+          element.condition,
+          CompileTimeErrorCode
+              .NON_CONSTANT_IF_ELEMENT_CONDITION_FROM_DEFERRED_LIBRARY);
+
       var thenValid = true;
       var elseValid = true;
       if (conditionBool) {
@@ -726,11 +642,14 @@
     } else if (element is MapLiteralEntry) {
       return _validateMapLiteralEntry(element);
     } else if (element is SpreadElement) {
-      if (!isConst) return true;
-
       var value = verifier._validate(element.expression, errorCode);
       if (value == null) return false;
 
+      verifier._reportErrorIfFromDeferredLibrary(
+          element.expression,
+          CompileTimeErrorCode
+              .NON_CONSTANT_SPREAD_EXPRESSION_FROM_DEFERRED_LIBRARY);
+
       if (forList || forSet) {
         return _validateListOrSetSpread(element, value);
       }
@@ -821,6 +740,15 @@
       }
     }
 
+    if (forSet) {
+      var iterableValue = listValue ?? setValue;
+      for (var item in iterableValue) {
+        if (!setUniqueValues.add(item)) {
+          setDuplicateExpressions.add(element.expression);
+        }
+      }
+    }
+
     return true;
   }
 
@@ -830,78 +758,60 @@
     var keyExpression = entry.key;
     var valueExpression = entry.value;
 
-    if (isConst) {
-      var keyValue = verifier._validate(
-        keyExpression,
-        CompileTimeErrorCode.NON_CONSTANT_MAP_KEY,
-      );
-      var valueValue = verifier._validate(
-        valueExpression,
-        CompileTimeErrorCode.NON_CONSTANT_MAP_VALUE,
-      );
+    var keyValue = verifier._validate(
+      keyExpression,
+      CompileTimeErrorCode.NON_CONSTANT_MAP_KEY,
+    );
+    var valueValue = verifier._validate(
+      valueExpression,
+      CompileTimeErrorCode.NON_CONSTANT_MAP_VALUE,
+    );
 
-      if (keyValue != null) {
-        var keyType = keyValue.type;
+    if (keyValue != null) {
+      var keyType = keyValue.type;
 
-        if (!verifier._evaluationEngine
-            .runtimeTypeMatch(keyValue, mapKeyType)) {
-          verifier._errorReporter.reportErrorForNode(
-            StaticWarningCode.MAP_KEY_TYPE_NOT_ASSIGNABLE,
-            keyExpression,
-            [keyType, mapKeyType],
-          );
-        }
-
-        if (verifier._implementsEqualsWhenNotAllowed(keyType)) {
-          verifier._errorReporter.reportErrorForNode(
-            CompileTimeErrorCode
-                .CONST_MAP_KEY_EXPRESSION_TYPE_IMPLEMENTS_EQUALS,
-            keyExpression,
-            [keyType],
-          );
-        }
-
-        verifier._reportErrorIfFromDeferredLibrary(
+      if (!verifier._evaluationEngine.runtimeTypeMatch(keyValue, mapKeyType)) {
+        verifier._errorReporter.reportErrorForNode(
+          StaticWarningCode.MAP_KEY_TYPE_NOT_ASSIGNABLE,
           keyExpression,
-          CompileTimeErrorCode.NON_CONSTANT_MAP_KEY_FROM_DEFERRED_LIBRARY,
-        );
-
-        if (!mapUniqueKeys.add(keyValue)) {
-          mapDuplicateKeyElements.add(keyExpression);
-        }
-      }
-
-      if (valueValue != null) {
-        if (!verifier._evaluationEngine
-            .runtimeTypeMatch(valueValue, mapValueType)) {
-          verifier._errorReporter.reportErrorForNode(
-            StaticWarningCode.MAP_VALUE_TYPE_NOT_ASSIGNABLE,
-            valueExpression,
-            [valueValue.type, mapValueType],
-          );
-        }
-
-        verifier._reportErrorIfFromDeferredLibrary(
-          valueExpression,
-          CompileTimeErrorCode.NON_CONSTANT_MAP_VALUE_FROM_DEFERRED_LIBRARY,
+          [keyType, mapKeyType],
         );
       }
-    } else {
-      // Note: we throw the errors away because this isn't actually a const.
-      var nullErrorReporter = new ErrorReporter(
-        AnalysisErrorListener.NULL_LISTENER,
-        verifier._errorReporter.source,
-      );
-      var keyValue = keyExpression.accept(
-        new ConstantVisitor(verifier._evaluationEngine, nullErrorReporter),
+
+      if (verifier._implementsEqualsWhenNotAllowed(keyType)) {
+        verifier._errorReporter.reportErrorForNode(
+          CompileTimeErrorCode.CONST_MAP_KEY_EXPRESSION_TYPE_IMPLEMENTS_EQUALS,
+          keyExpression,
+          [keyType],
+        );
+      }
+
+      verifier._reportErrorIfFromDeferredLibrary(
+        keyExpression,
+        CompileTimeErrorCode.NON_CONSTANT_MAP_KEY_FROM_DEFERRED_LIBRARY,
       );
 
-      if (keyValue != null) {
-        if (!mapUniqueKeys.add(keyValue)) {
-          mapDuplicateKeyElements.add(keyExpression);
-        }
+      if (!mapUniqueKeys.add(keyValue)) {
+        mapDuplicateKeyExpressions.add(keyExpression);
       }
     }
+
+    if (valueValue != null) {
+      if (!verifier._evaluationEngine
+          .runtimeTypeMatch(valueValue, mapValueType)) {
+        verifier._errorReporter.reportErrorForNode(
+          StaticWarningCode.MAP_VALUE_TYPE_NOT_ASSIGNABLE,
+          valueExpression,
+          [valueValue.type, mapValueType],
+        );
+      }
+
+      verifier._reportErrorIfFromDeferredLibrary(
+        valueExpression,
+        CompileTimeErrorCode.NON_CONSTANT_MAP_VALUE_FROM_DEFERRED_LIBRARY,
+      );
+    }
+
     return true;
   }
 
@@ -919,7 +829,7 @@
         DartObjectImpl keyValue = entry.key;
         if (keyValue != null) {
           if (!mapUniqueKeys.add(keyValue)) {
-            mapDuplicateKeyElements.add(element.expression);
+            mapDuplicateKeyExpressions.add(element.expression);
           }
         }
       }
@@ -957,7 +867,7 @@
     );
 
     if (!setUniqueValues.add(value)) {
-      setDuplicateElements.add(expression);
+      setDuplicateExpressions.add(expression);
     }
 
     return true;
diff --git a/pkg/analyzer/lib/src/dart/constant/evaluation.dart b/pkg/analyzer/lib/src/dart/constant/evaluation.dart
index c4416ee..789609e 100644
--- a/pkg/analyzer/lib/src/dart/constant/evaluation.dart
+++ b/pkg/analyzer/lib/src/dart/constant/evaluation.dart
@@ -15,6 +15,7 @@
 import 'package:analyzer/error/error.dart';
 import 'package:analyzer/error/listener.dart';
 import 'package:analyzer/src/dart/analysis/experiments.dart';
+import 'package:analyzer/src/dart/constant/potentially_constant.dart';
 import 'package:analyzer/src/dart/constant/utilities.dart';
 import 'package:analyzer/src/dart/constant/value.dart';
 import 'package:analyzer/src/dart/element/element.dart';
@@ -918,6 +919,10 @@
       // fixed.
       return true;
     }
+    // TODO(scheglov ) Switch to using this, but not now, dartbug.com/33441
+    if (typeSystem.isSubtypeOf(objType, type)) {
+      return true;
+    }
     return objType.isSubtypeOf(type);
   }
 
@@ -1213,8 +1218,10 @@
         return conditionResult;
       }
       if (conditionResult.toBoolValue() == true) {
+        _reportNotPotentialConstants(node.elseExpression);
         return node.thenExpression.accept(this);
       } else if (conditionResult.toBoolValue() == false) {
+        _reportNotPotentialConstants(node.thenExpression);
         return node.elseExpression.accept(this);
       }
       // We used to return an object with a known type and an unknown value, but
@@ -1319,7 +1326,7 @@
     }
     bool errorOccurred = false;
     List<DartObjectImpl> list = [];
-    for (CollectionElement element in node.elements2) {
+    for (CollectionElement element in node.elements) {
       errorOccurred = errorOccurred | _addElementsToList(list, element);
     }
     if (errorOccurred) {
@@ -1448,7 +1455,7 @@
       }
       bool errorOccurred = false;
       Map<DartObjectImpl, DartObjectImpl> map = {};
-      for (CollectionElement element in node.elements2) {
+      for (CollectionElement element in node.elements) {
         errorOccurred = errorOccurred | _addElementsToMap(map, element);
       }
       if (errorOccurred) {
@@ -1475,7 +1482,7 @@
       }
       bool errorOccurred = false;
       Set<DartObjectImpl> set = new Set<DartObjectImpl>();
-      for (CollectionElement element in node.elements2) {
+      for (CollectionElement element in node.elements) {
         errorOccurred = errorOccurred | _addElementsToSet(set, element);
       }
       if (errorOccurred) {
@@ -1757,6 +1764,18 @@
     return identifier.name == 'length';
   }
 
+  void _reportNotPotentialConstants(AstNode node) {
+    var notPotentiallyConstants = getNotPotentiallyConstants(node);
+    if (notPotentiallyConstants.isEmpty) return;
+
+    for (var notConst in notPotentiallyConstants) {
+      _errorReporter.reportErrorForNode(
+        CompileTimeErrorCode.INVALID_CONSTANT,
+        notConst,
+      );
+    }
+  }
+
   /**
    * Return the value of the given [expression], or a representation of 'null'
    * if the expression cannot be evaluated.
diff --git a/pkg/analyzer/lib/src/dart/constant/potentially_constant.dart b/pkg/analyzer/lib/src/dart/constant/potentially_constant.dart
index 5a48513..3d091bd 100644
--- a/pkg/analyzer/lib/src/dart/constant/potentially_constant.dart
+++ b/pkg/analyzer/lib/src/dart/constant/potentially_constant.dart
@@ -100,6 +100,13 @@
       return;
     }
 
+    if (node is AdjacentStrings) {
+      for (var string in node.strings) {
+        collect(string);
+      }
+      return;
+    }
+
     if (node is StringInterpolation) {
       for (var component in node.elements) {
         if (component is InterpolationExpression) {
@@ -133,6 +140,10 @@
       return _methodInvocation(node);
     }
 
+    if (node is NamedExpression) {
+      return collect(node.expression);
+    }
+
     if (node is BinaryExpression) {
       collect(node.leftOperand);
       collect(node.rightOperand);
@@ -214,10 +225,22 @@
         return;
       }
       if (element is MethodElement && element.isStatic) {
-        if (_isConstantTypeName(node.prefix)) {
+        if (!_isConstantTypeName(node.prefix)) {
+          nodes.add(node);
+        }
+        return;
+      }
+    }
+
+    if (element is ParameterElement) {
+      var enclosing = element.enclosingElement;
+      if (enclosing is ConstructorElement && enclosing.isConst) {
+        if (node.thisOrAncestorOfType<ConstructorInitializer>() != null) {
           return;
         }
       }
+      nodes.add(node);
+      return;
     }
 
     if (element is VariableElement) {
@@ -239,6 +262,9 @@
     if (element is FunctionElement) {
       return;
     }
+    if (element is MethodElement && element.isStatic) {
+      return;
+    }
     nodes.add(node);
   }
 
@@ -296,7 +322,7 @@
         }
       }
 
-      for (var element in node.elements2) {
+      for (var element in node.elements) {
         collect(element);
       }
       return;
@@ -322,7 +348,7 @@
         }
       }
 
-      for (var element in node.elements2) {
+      for (var element in node.elements) {
         collect(element);
       }
     }
diff --git a/pkg/analyzer/lib/src/dart/constant/utilities.dart b/pkg/analyzer/lib/src/dart/constant/utilities.dart
index 6e5f535..60cecdd 100644
--- a/pkg/analyzer/lib/src/dart/constant/utilities.dart
+++ b/pkg/analyzer/lib/src/dart/constant/utilities.dart
@@ -95,17 +95,6 @@
   }
 
   @override
-  @deprecated
-  MapLiteral visitMapLiteral(MapLiteral node) {
-    MapLiteral literal = super.visitMapLiteral(node);
-    literal.staticType = node.staticType;
-    if (node.constKeyword == null && node.isConst) {
-      literal.constKeyword = new KeywordToken(Keyword.CONST, node.offset);
-    }
-    return literal;
-  }
-
-  @override
   RedirectingConstructorInvocation visitRedirectingConstructorInvocation(
       RedirectingConstructorInvocation node) {
     RedirectingConstructorInvocation invocation =
@@ -115,17 +104,6 @@
   }
 
   @override
-  @deprecated
-  SetLiteral visitSetLiteral(SetLiteral node) {
-    SetLiteral literal = super.visitSetLiteral(node);
-    literal.staticType = node.staticType;
-    if (node.constKeyword == null && node.isConst) {
-      literal.constKeyword = new KeywordToken(Keyword.CONST, node.offset);
-    }
-    return literal;
-  }
-
-  @override
   SetOrMapLiteral visitSetOrMapLiteral(SetOrMapLiteral node) {
     SetOrMapLiteral literal = super.visitSetOrMapLiteral(node);
     literal.staticType = node.staticType;
@@ -196,13 +174,13 @@
     } else {
       if (node.isMap) {
         // Values of keys are computed to check that they are unique.
-        for (var entry in node.elements2) {
+        for (var entry in node.elements) {
           // TODO(mfairhurst): How do if/for loops/spreads affect this?
           _find(entry);
         }
       } else if (node.isSet) {
         // values of sets are computed to check that they are unique.
-        for (var entry in node.elements2) {
+        for (var entry in node.elements) {
           _find(entry);
         }
       }
diff --git a/pkg/analyzer/lib/src/dart/constant/value.dart b/pkg/analyzer/lib/src/dart/constant/value.dart
index fcaa320..bb01428 100644
--- a/pkg/analyzer/lib/src/dart/constant/value.dart
+++ b/pkg/analyzer/lib/src/dart/constant/value.dart
@@ -2413,9 +2413,15 @@
       if (rightValue >= 0) {
         // TODO(brianwilkerson) After the analyzer package has a minimum SDK
         // constraint that includes support for the real operator, consider
-        // changing this to the following line:
+        // changing the line below to
         //   return new IntState(value >>> rightValue);
-        return new IntState(value ~/ (1 << rightValue));
+        int divisor = 1 << rightValue;
+        if (divisor == 0) {
+          // The `rightValue` is large enough to cause all of the non-zero bits
+          // in the left operand to be shifted out of the value.
+          return new IntState(0);
+        }
+        return new IntState(value ~/ divisor);
       }
     } else if (rightOperand is DynamicState || rightOperand is NumState) {
       return UNKNOWN_VALUE;
diff --git a/pkg/analyzer/lib/src/dart/element/element.dart b/pkg/analyzer/lib/src/dart/element/element.dart
index 5cf726d..8cbeb21 100644
--- a/pkg/analyzer/lib/src/dart/element/element.dart
+++ b/pkg/analyzer/lib/src/dart/element/element.dart
@@ -519,6 +519,9 @@
 
   @override
   int get codeLength {
+    if (linkedNode != null) {
+      return linkedNode.codeLength;
+    }
     if (_unlinkedClass != null) {
       return _unlinkedClass.codeRange?.length;
     }
@@ -527,6 +530,9 @@
 
   @override
   int get codeOffset {
+    if (linkedNode != null) {
+      return linkedNode.codeOffset;
+    }
     if (_unlinkedClass != null) {
       return _unlinkedClass.codeRange?.offset;
     }
@@ -546,7 +552,8 @@
     if (linkedNode != null) {
       var context = enclosingUnit.linkedContext;
       var containerRef = reference.getChild('@constructor');
-      if (linkedNode.kind == LinkedNodeKind.classDeclaration) {
+      if (linkedNode.kind == LinkedNodeKind.classDeclaration ||
+          linkedNode.kind == LinkedNodeKind.mixinDeclaration) {
         _constructors = linkedNode.classOrMixinDeclaration_members
             .where((node) => node.kind == LinkedNodeKind.constructorDeclaration)
             .map((node) {
@@ -584,16 +591,17 @@
         }
       }
 
-      // There are no explicit constructors.
-      // Create the implicit default constructor.
+      _constructors = const <ConstructorElement>[];
+    }
+
+    if (_constructors.isEmpty) {
       var constructor = new ConstructorElementImpl('', -1);
       constructor.isSynthetic = true;
       constructor.enclosingElement = this;
       _constructors = <ConstructorElement>[constructor];
     }
 
-    assert(_constructors != null);
-    return _constructors ?? const <ConstructorElement>[];
+    return _constructors;
   }
 
   /// Set the constructors contained in this class to the given [constructors].
@@ -1061,7 +1069,7 @@
     if (linkedNode != null) {
       var context = enclosingUnit.linkedContext;
       var containerRef = reference.getChild('@typeParameter');
-      var typeParameters = context.getTypeParameters(linkedNode);
+      var typeParameters = LinkedUnitContext.getTypeParameters(linkedNode);
       if (typeParameters == null) {
         return _typeParameterElements = const [];
       }
@@ -1780,7 +1788,9 @@
       var context = enclosingUnit.linkedContext;
       var containerRef = reference.getChild('@typeAlias');
       _typeAliases = linkedNode.compilationUnit_declarations
-          .where((node) => node.kind == LinkedNodeKind.functionTypeAlias)
+          .where((node) =>
+              node.kind == LinkedNodeKind.functionTypeAlias ||
+              node.kind == LinkedNodeKind.genericTypeAlias)
           .map((node) {
         var name = context.getUnitMemberName(node);
         var reference = containerRef.getChild(name);
@@ -1830,8 +1840,23 @@
 
   @override
   List<ClassElement> get mixins {
+    if (_mixins != null) return _mixins;
+
+    if (linkedNode != null) {
+      var context = enclosingUnit.linkedContext;
+      var containerRef = reference.getChild('@class');
+      return _mixins = linkedNode.compilationUnit_declarations
+          .where((node) => node.kind == LinkedNodeKind.mixinDeclaration)
+          .map((node) {
+        var name = context.getUnitMemberName(node);
+        var reference = containerRef.getChild(name);
+        reference.node = node;
+        return MixinElementImpl.forLinkedNode(this, reference, node);
+      }).toList();
+    }
+
     if (_unlinkedUnit != null) {
-      _mixins ??= _unlinkedUnit.mixins
+      return _mixins = _unlinkedUnit.mixins
           .map((c) => new MixinElementImpl.forSerialized(c, this))
           .toList(growable: false);
     }
@@ -1909,10 +1934,12 @@
 
   @override
   List<ClassElement> get types {
+    if (_types != null) return _types;
+
     if (linkedNode != null) {
       var context = enclosingUnit.linkedContext;
       var containerRef = reference.getChild('@class');
-      _types = linkedNode.compilationUnit_declarations
+      return _types = linkedNode.compilationUnit_declarations
           .where((node) =>
               node.kind == LinkedNodeKind.classDeclaration ||
               node.kind == LinkedNodeKind.classTypeAlias)
@@ -1922,11 +1949,14 @@
         reference.node = node;
         return ClassElementImpl.forLinkedNode(this, reference, node);
       }).toList();
-    } else if (_unlinkedUnit != null) {
-      _types ??= _unlinkedUnit.classes
+    }
+
+    if (_unlinkedUnit != null) {
+      return _types = _unlinkedUnit.classes
           .map((c) => new ClassElementImpl.forSerialized(c, this))
           .toList(growable: false);
     }
+
     return _types ?? const <ClassElement>[];
   }
 
@@ -2415,6 +2445,14 @@
   /// there are no initializers, or `null` if there was an error in the source.
   List<ConstructorInitializer> get constantInitializers {
     if (_constantInitializers == null) {
+      if (linkedNode != null) {
+        var context = enclosingUnit.linkedContext;
+        return _constantInitializers ??=
+            linkedNode.constructorDeclaration_initializers.map((node) {
+          return context.readNode(node) as ConstructorInitializer;
+        }).toList();
+      }
+
       if (serializedExecutable != null) {
         _constantInitializers = serializedExecutable.constantInitializers
             .map((i) => _buildConstructorInitializer(i))
@@ -2561,6 +2599,25 @@
   @override
   ConstructorElement get redirectedConstructor {
     if (_redirectedConstructor == null) {
+      if (linkedNode != null) {
+        var context = enclosingUnit.linkedContext;
+        if (isFactory) {
+          var node = linkedNode.constructorDeclaration_redirectedConstructor;
+          if (node != null) {
+            ConstructorName ast = context.readNode(node);
+            return ast.staticElement;
+          }
+        } else {
+          for (var node in linkedNode.constructorDeclaration_initializers) {
+            if (node.kind == LinkedNodeKind.redirectingConstructorInvocation) {
+              RedirectingConstructorInvocation ast = context.readNode(node);
+              return ast.staticElement;
+            }
+          }
+        }
+        return null;
+      }
+
       if (serializedExecutable != null) {
         if (serializedExecutable.isRedirectedConstructor) {
           if (serializedExecutable.isFactory) {
@@ -2742,7 +2799,7 @@
 
     if (linkedNode != null) {
       var context = enclosingUnit.linkedContext;
-      return _constantInitializer = context.readInitializer(linkedNode);
+      return _constantInitializer = context.readInitializer(this, linkedNode);
     }
 
     if (_unlinkedConst != null) {
@@ -2792,6 +2849,10 @@
   DefaultFieldFormalParameterElementImpl(String name, int nameOffset)
       : super(name, nameOffset);
 
+  DefaultFieldFormalParameterElementImpl.forLinkedNode(
+      ElementImpl enclosing, Reference reference, LinkedNode linkedNode)
+      : super.forLinkedNode(enclosing, reference, linkedNode);
+
   /// Initialize a newly created parameter element to have the given [name].
   DefaultFieldFormalParameterElementImpl.forNode(Identifier name)
       : super.forNode(name);
@@ -3904,6 +3965,9 @@
 
   @override
   int get codeLength {
+    if (linkedNode != null) {
+      return linkedNode.codeLength;
+    }
     if (_unlinkedEnum != null) {
       return _unlinkedEnum.codeRange?.length;
     }
@@ -3912,6 +3976,9 @@
 
   @override
   int get codeOffset {
+    if (linkedNode != null) {
+      return linkedNode.codeOffset;
+    }
     if (_unlinkedEnum != null) {
       return _unlinkedEnum.codeRange?.offset;
     }
@@ -4213,6 +4280,9 @@
 
   @override
   int get codeLength {
+    if (linkedNode != null) {
+      return linkedNode.codeLength;
+    }
     if (serializedExecutable != null) {
       return serializedExecutable.codeRange?.length;
     }
@@ -4221,6 +4291,9 @@
 
   @override
   int get codeOffset {
+    if (linkedNode != null) {
+      return linkedNode.codeOffset;
+    }
     if (serializedExecutable != null) {
       return serializedExecutable.codeRange?.offset;
     }
@@ -4372,32 +4445,12 @@
         var context = enclosingUnit.linkedContext;
         var containerRef = reference.getChild('@parameter');
         var formalParameters = context.getFormalParameters(linkedNode);
-        if (formalParameters != null) {
-          _parameters = formalParameters.map((node) {
-            if (node.kind == LinkedNodeKind.defaultFormalParameter) {
-              var parameterNode = node.defaultFormalParameter_parameter;
-              var name = context.getFormalParameterName(parameterNode);
-              var reference = containerRef.getChild(name);
-              reference.node = node;
-              return DefaultParameterElementImpl.forLinkedNode(
-                this,
-                reference,
-                node,
-              );
-            } else {
-              var name = context.getFormalParameterName(node);
-              var reference = containerRef.getChild(name);
-              reference.node = node;
-              return ParameterElementImpl.forLinkedNodeFactory(
-                this,
-                reference,
-                node,
-              );
-            }
-          }).toList();
-        } else {
-          _parameters = const [];
-        }
+        _parameters = ParameterElementImpl.forLinkedNodeList(
+          this,
+          context,
+          containerRef,
+          formalParameters,
+        );
       }
       if (serializedExecutable != null) {
         _parameters = ParameterElementImpl.resynthesizeList(
@@ -4570,6 +4623,12 @@
         _unlinkedExportNonPublic = null,
         super(null, offset);
 
+  ExportElementImpl.forLinkedNode(
+      LibraryElementImpl enclosing, LinkedNode linkedNode)
+      : _unlinkedExportPublic = null,
+        _unlinkedExportNonPublic = null,
+        super.forLinkedNode(enclosing, null, linkedNode);
+
   /// Initialize using the given serialized information.
   ExportElementImpl.forSerialized(this._unlinkedExportPublic,
       this._unlinkedExportNonPublic, LibraryElementImpl enclosingLibrary)
@@ -4577,12 +4636,20 @@
 
   @override
   List<NamespaceCombinator> get combinators {
-    if (_combinators == null) {
-      if (_unlinkedExportPublic != null) {
-        _combinators = ImportElementImpl._buildCombinators(
-            _unlinkedExportPublic.combinators);
-      }
+    if (_combinators != null) return _combinators;
+
+    if (linkedNode != null) {
+      return _combinators = ImportElementImpl._buildCombinators2(
+        enclosingUnit.linkedContext,
+        linkedNode,
+      );
     }
+
+    if (_unlinkedExportPublic != null) {
+      return _combinators = ImportElementImpl._buildCombinators(
+          _unlinkedExportPublic.combinators);
+    }
+
     return _combinators ?? const <NamespaceCombinator>[];
   }
 
@@ -4592,14 +4659,31 @@
   }
 
   @override
+  CompilationUnitElementImpl get enclosingUnit {
+    LibraryElementImpl enclosingLibrary = enclosingElement;
+    return enclosingLibrary._definingCompilationUnit;
+  }
+
+  @override
   LibraryElement get exportedLibrary {
-    if (_exportedLibrary == null) {
-      if (_unlinkedExportNonPublic != null) {
-        LibraryElementImpl library = enclosingElement as LibraryElementImpl;
-        _exportedLibrary =
-            library.resynthesizerContext.buildExportedLibrary(uri);
-      }
+    if (_exportedLibrary != null) return _exportedLibrary;
+
+    if (linkedNode != null) {
+      var context = enclosingUnit.linkedContext;
+      var relativeUriStr = context.getStringContent(
+        linkedNode.uriBasedDirective_uri,
+      );
+      var relativeUri = Uri.parse(relativeUriStr);
+      var uri = resolveRelativeUri(librarySource.uri, relativeUri);
+      var elementFactory = context.bundleContext.elementFactory;
+      return _exportedLibrary = elementFactory.libraryOfUri('$uri');
     }
+
+    if (_unlinkedExportNonPublic != null) {
+      LibraryElementImpl library = enclosingElement as LibraryElementImpl;
+      _exportedLibrary = library.resynthesizerContext.buildExportedLibrary(uri);
+    }
+
     return _exportedLibrary;
   }
 
@@ -4616,6 +4700,11 @@
 
   @override
   List<ElementAnnotation> get metadata {
+    if (linkedNode != null) {
+      if (_metadata != null) return _metadata;
+      var metadata = enclosingUnit.linkedContext.getMetadataOrEmpty(linkedNode);
+      return _metadata = _buildAnnotations2(enclosingUnit, metadata);
+    }
     if (_metadata == null) {
       if (_unlinkedExportNonPublic != null) {
         return _metadata = _buildAnnotations(library.definingCompilationUnit,
@@ -4760,6 +4849,12 @@
 
   @override
   bool get isCovariant {
+    if (linkedNode != null) {
+      if (linkedNode.kind == LinkedNodeKind.variableDeclaration) {
+        return linkedNode.variableDeclaration_declaration.isCovariant;
+      }
+      return false;
+    }
     if (_unlinkedVariable != null) {
       return _unlinkedVariable.isCovariant;
     }
@@ -4872,11 +4967,6 @@
 
   @override
   DartType get type {
-    if (linkedNode != null) {
-      return _type ??= enclosingUnit.linkedContext.getType(
-        linkedNode.fieldFormalParameter_type2,
-      );
-    }
     if (unlinkedParam != null &&
         unlinkedParam.type == null &&
         !unlinkedParam.isFunctionTyped &&
@@ -4911,9 +5001,9 @@
   /// [offset].
   FunctionElementImpl(String name, int offset) : super(name, offset);
 
-  FunctionElementImpl.forLinkedNode(CompilationUnitElementImpl enclosingUnit,
-      Reference reference, LinkedNode linkedNode)
-      : super.forLinkedNode(enclosingUnit, reference, linkedNode);
+  FunctionElementImpl.forLinkedNode(
+      ElementImpl enclosing, Reference reference, LinkedNode linkedNode)
+      : super.forLinkedNode(enclosing, reference, linkedNode);
 
   /// Initialize a newly created function element to have the given [name].
   FunctionElementImpl.forNode(Identifier name) : super.forNode(name);
@@ -4976,6 +5066,14 @@
   }
 
   @override
+  void set returnType(DartType returnType) {
+    if (linkedNode != null) {
+      enclosingUnit.linkedContext.setReturnType(linkedNode, returnType);
+    }
+    super.returnType = returnType;
+  }
+
+  @override
   SourceRange get visibleRange {
     if (serializedExecutable != null) {
       if (serializedExecutable.visibleLength == 0) {
@@ -5143,6 +5241,10 @@
   /// The type defined by this element.
   FunctionType _type;
 
+  GenericFunctionTypeElementImpl.forLinkedNode(
+      ElementImpl enclosingElement, Reference reference, LinkedNode linkedNode)
+      : super.forLinkedNode(enclosingElement, reference, linkedNode);
+
   /// Initialize a newly created function element to have no name and the given
   /// [nameOffset]. This is used for function expressions, that have no name.
   GenericFunctionTypeElementImpl.forOffset(int nameOffset)
@@ -5167,6 +5269,15 @@
   @override
   List<ParameterElement> get parameters {
     if (_parameters == null) {
+      if (linkedNode != null) {
+        var context = enclosingUnit.linkedContext;
+        return _parameters = ParameterElementImpl.forLinkedNodeList(
+          this,
+          context,
+          reference.getChild('@parameter'),
+          context.getFormalParameters(linkedNode),
+        );
+      }
       if (_entityRef != null) {
         _parameters = ParameterElementImpl.resynthesizeList(
             _entityRef.syntheticParams, this);
@@ -5188,6 +5299,10 @@
   @override
   DartType get returnType {
     if (_returnType == null) {
+      if (linkedNode != null) {
+        var context = enclosingUnit.linkedContext;
+        return _returnType = context.getReturnType(linkedNode);
+      }
       if (_entityRef != null) {
         _returnType = enclosingUnit.resynthesizerContext.resolveTypeRef(
             this, _entityRef.syntheticReturnType,
@@ -5217,6 +5332,16 @@
     _type = type;
   }
 
+  @override
+  List<TypeParameterElement> get typeParameters {
+    if (linkedNode != null) {
+      if (linkedNode.kind == LinkedNodeKind.functionTypeAlias) {
+        return const <TypeParameterElement>[];
+      }
+    }
+    return super.typeParameters;
+  }
+
   /// Set the type parameters defined by this function type element to the given
   /// [typeParameters].
   void set typeParameters(List<TypeParameterElement> typeParameters) {
@@ -5316,6 +5441,9 @@
 
   @override
   int get codeLength {
+    if (linkedNode != null) {
+      return linkedNode.codeLength;
+    }
     if (_unlinkedTypedef != null) {
       return _unlinkedTypedef.codeRange?.length;
     }
@@ -5324,6 +5452,9 @@
 
   @override
   int get codeOffset {
+    if (linkedNode != null) {
+      return linkedNode.codeOffset;
+    }
     if (_unlinkedTypedef != null) {
       return _unlinkedTypedef.codeRange?.offset;
     }
@@ -5362,24 +5493,19 @@
     if (_function != null) return _function;
 
     if (linkedNode != null) {
-      var context = enclosingUnit.linkedContext;
-      _function = new GenericFunctionTypeElementImpl.forOffset(-1);
-      _function.enclosingElement = this;
-      _function.returnType = context.getType(
-        linkedNode.functionTypeAlias_returnType2,
-      );
-      var containerRef = reference.getChild('@parameter');
-      var formalParameters = context.getFormalParameters(linkedNode);
-      _function.parameters = formalParameters.map((node) {
-        var name = context.getFormalParameterName(node);
-        var reference = containerRef.getChild(name);
-        reference.node = node;
-        return ParameterElementImpl.forLinkedNodeFactory(
+      if (linkedNode.kind == LinkedNodeKind.genericTypeAlias) {
+        _function = GenericFunctionTypeElementImpl.forLinkedNode(
           this,
-          reference,
-          node,
+          reference.getChild('@function'),
+          linkedNode.genericTypeAlias_functionType,
         );
-      }).toList();
+      } else {
+        return _function = GenericFunctionTypeElementImpl.forLinkedNode(
+          this,
+          reference.getChild('@function'),
+          linkedNode,
+        );
+      }
       return _function;
     }
 
@@ -5579,20 +5705,40 @@
   /// The unlinked representation of the combinator in the summary.
   final UnlinkedCombinator _unlinkedCombinator;
 
+  final LinkedUnitContext linkedContext;
+  final LinkedNode linkedNode;
+
   /// The names that are not to be made visible in the importing library even if
   /// they are defined in the imported library.
   List<String> _hiddenNames;
 
-  HideElementCombinatorImpl() : _unlinkedCombinator = null;
+  HideElementCombinatorImpl()
+      : _unlinkedCombinator = null,
+        linkedContext = null,
+        linkedNode = null;
+
+  HideElementCombinatorImpl.forLinkedNode(this.linkedContext, this.linkedNode)
+      : _unlinkedCombinator = null;
 
   /// Initialize using the given serialized information.
-  HideElementCombinatorImpl.forSerialized(this._unlinkedCombinator);
+  HideElementCombinatorImpl.forSerialized(this._unlinkedCombinator)
+      : linkedContext = null,
+        linkedNode = null;
 
   @override
   List<String> get hiddenNames {
-    if (_unlinkedCombinator != null) {
-      _hiddenNames ??= _unlinkedCombinator.hides.toList(growable: false);
+    if (_hiddenNames != null) return _hiddenNames;
+
+    if (linkedNode != null) {
+      return _hiddenNames = linkedNode.hideCombinator_hiddenNames
+          .map((node) => linkedContext.getSimpleName(node))
+          .toList();
     }
+
+    if (_unlinkedCombinator != null) {
+      return _hiddenNames = _unlinkedCombinator.hides.toList(growable: false);
+    }
+
     return _hiddenNames ?? const <String>[];
   }
 
@@ -5666,11 +5812,19 @@
 
   @override
   List<NamespaceCombinator> get combinators {
-    if (_combinators == null) {
-      if (_unlinkedImport != null) {
-        _combinators = _buildCombinators(_unlinkedImport.combinators);
-      }
+    if (_combinators != null) return _combinators;
+
+    if (linkedNode != null) {
+      return _combinators = _buildCombinators2(
+        enclosingUnit.linkedContext,
+        linkedNode,
+      );
     }
+
+    if (_unlinkedImport != null) {
+      return _combinators = _buildCombinators(_unlinkedImport.combinators);
+    }
+
     return _combinators ?? const <NamespaceCombinator>[];
   }
 
@@ -5729,6 +5883,9 @@
 
   @override
   bool get isDeferred {
+    if (linkedNode != null) {
+      return linkedNode.importDirective_deferredKeyword != 0;
+    }
     if (_unlinkedImport != null) {
       return _unlinkedImport.isDeferred;
     }
@@ -5787,6 +5944,19 @@
 
   PrefixElement get prefix {
     if (_prefix == null) {
+      if (linkedNode != null) {
+        var prefix = linkedNode.importDirective_prefix;
+        if (prefix != null) {
+          var context = enclosingUnit.linkedContext;
+          var name = context.getSimpleName(prefix);
+          LibraryElementImpl library = enclosingElement as LibraryElementImpl;
+          _prefix = new PrefixElementImpl.forLinkedNode(
+            library,
+            library.reference.getChild('@prefix').getChild(name),
+            prefix,
+          );
+        }
+      }
       if (_unlinkedImport != null && _unlinkedImport.prefixReference != 0) {
         LibraryElementImpl library = enclosingElement as LibraryElementImpl;
         _prefix = new PrefixElementImpl.forSerialized(_unlinkedImport, library);
@@ -5897,6 +6067,20 @@
       return const <NamespaceCombinator>[];
     }
   }
+
+  static List<NamespaceCombinator> _buildCombinators2(
+      LinkedUnitContext context, LinkedNode linkedNode) {
+    return linkedNode.namespaceDirective_combinators.map((node) {
+      var kind = node.kind;
+      if (kind == LinkedNodeKind.hideCombinator) {
+        return HideElementCombinatorImpl.forLinkedNode(context, node);
+      }
+      if (kind == LinkedNodeKind.showCombinator) {
+        return ShowElementCombinatorImpl.forLinkedNode(context, node);
+      }
+      throw UnimplementedError('$kind');
+    }).toList();
+  }
 }
 
 /// A concrete implementation of a [LabelElement].
@@ -6127,6 +6311,11 @@
 
   @override
   Namespace get exportNamespace {
+    if (linkedNode != null) {
+      if (_exportNamespace != null) return _exportNamespace;
+      var elements = linkedContext.bundleContext.elementFactory;
+      return _exportNamespace = elements.buildExportNamespace(source.uri);
+    }
     if (resynthesizerContext != null) {
       _exportNamespace ??= resynthesizerContext.buildExportNamespace();
     }
@@ -6140,6 +6329,13 @@
   @override
   List<ExportElement> get exports {
     if (_exports == null) {
+      if (linkedNode != null) {
+        return _exports = linkedNode.compilationUnit_directives
+            .where((node) => node.kind == LinkedNodeKind.exportDirective)
+            .map((node) {
+          return ExportElementImpl.forLinkedNode(this, node);
+        }).toList();
+      }
       if (unlinkedDefiningUnit != null) {
         List<UnlinkedExportNonPublic> unlinkedNonPublicExports =
             unlinkedDefiningUnit.exports;
@@ -6407,7 +6603,7 @@
       if (_metadata != null) return _metadata;
       CompilationUnitElementImpl enclosingUnit = _definingCompilationUnit;
       var context = enclosingUnit.linkedContext;
-      var metadata = context.getMetadataOrEmpty(linkedNode);
+      var metadata = context.getLibraryMetadataOrEmpty(linkedNode);
       return _metadata = _buildAnnotations2(enclosingUnit, metadata);
     }
     if (_metadata == null) {
@@ -6954,6 +7150,12 @@
   /// given [offset] in the file that contains the declaration of this element.
   MixinElementImpl(String name, int offset) : super(name, offset);
 
+  MixinElementImpl.forLinkedNode(CompilationUnitElementImpl enclosing,
+      Reference reference, LinkedNode linkedNode)
+      : super.forLinkedNode(enclosing, reference, linkedNode) {
+    enclosing.linkedContext.loadClassMemberReferences(reference);
+  }
+
   /// Initialize a newly created class element to have the given [name].
   MixinElementImpl.forNode(Identifier name) : super.forNode(name);
 
@@ -6969,24 +7171,44 @@
   bool get isMixin => true;
 
   @override
+  List<InterfaceType> get mixins => const <InterfaceType>[];
+
+  @override
   List<InterfaceType> get superclassConstraints {
-    if (_superclassConstraints == null) {
-      if (_unlinkedClass != null) {
-        List<InterfaceType> constraints;
-        if (_unlinkedClass.superclassConstraints.isNotEmpty) {
-          ResynthesizerContext context = enclosingUnit.resynthesizerContext;
-          constraints = _unlinkedClass.superclassConstraints
-              .map((EntityRef t) => context.resolveTypeRef(this, t))
-              .where(_isInterfaceTypeInterface)
-              .cast<InterfaceType>()
-              .toList(growable: false);
-        }
-        if (constraints == null || constraints.isEmpty) {
-          constraints = [context.typeProvider.objectType];
-        }
-        _superclassConstraints = constraints;
+    if (_superclassConstraints != null) return _superclassConstraints;
+
+    if (linkedNode != null) {
+      List<InterfaceType> constraints;
+      var onClause = linkedNode.mixinDeclaration_onClause;
+      if (onClause != null) {
+        var context = enclosingUnit.linkedContext;
+        constraints = onClause.onClause_superclassConstraints
+            .map((node) => context.getInterfaceType(node.typeName_type))
+            .where((type) => type != null)
+            .toList();
       }
+      if (constraints == null || constraints.isEmpty) {
+        constraints = [context.typeProvider.objectType];
+      }
+      return _superclassConstraints = constraints;
     }
+
+    if (_unlinkedClass != null) {
+      List<InterfaceType> constraints;
+      if (_unlinkedClass.superclassConstraints.isNotEmpty) {
+        ResynthesizerContext context = enclosingUnit.resynthesizerContext;
+        constraints = _unlinkedClass.superclassConstraints
+            .map((EntityRef t) => context.resolveTypeRef(this, t))
+            .where(_isInterfaceTypeInterface)
+            .cast<InterfaceType>()
+            .toList(growable: false);
+      }
+      if (constraints == null || constraints.isEmpty) {
+        constraints = [context.typeProvider.objectType];
+      }
+      return _superclassConstraints = constraints;
+    }
+
     return _superclassConstraints ?? const <InterfaceType>[];
   }
 
@@ -7445,6 +7667,9 @@
 
   @override
   int get codeLength {
+    if (linkedNode != null) {
+      return linkedNode.codeLength;
+    }
     if (_unlinkedVariable != null) {
       return _unlinkedVariable.codeRange?.length;
     }
@@ -7453,6 +7678,9 @@
 
   @override
   int get codeOffset {
+    if (linkedNode != null) {
+      return linkedNode.codeOffset;
+    }
     if (_unlinkedVariable != null) {
       return _unlinkedVariable.codeRange?.offset;
     }
@@ -7649,7 +7877,8 @@
         reference,
         linkedNode,
       );
-    } else if (kind == LinkedNodeKind.simpleFormalParameter) {
+    } else if (kind == LinkedNodeKind.functionTypedFormalParameter ||
+        kind == LinkedNodeKind.simpleFormalParameter) {
       return ParameterElementImpl.forLinkedNode(
         enclosing,
         reference,
@@ -7708,6 +7937,9 @@
 
   @override
   int get codeLength {
+    if (linkedNode != null) {
+      return linkedNode.codeLength;
+    }
     if (unlinkedParam != null) {
       return unlinkedParam.codeRange?.length;
     }
@@ -7716,6 +7948,9 @@
 
   @override
   int get codeOffset {
+    if (linkedNode != null) {
+      return linkedNode.codeOffset;
+    }
     if (unlinkedParam != null) {
       return unlinkedParam.codeRange?.offset;
     }
@@ -7842,14 +8077,7 @@
   @override
   bool get isFinal {
     if (linkedNode != null) {
-      if (linkedNode.kind == LinkedNodeKind.defaultFormalParameter) {
-        var parameter = linkedNode.defaultFormalParameter_parameter;
-        return parameter.simpleFormalParameter_keyword != 0;
-      }
-      if (linkedNode.kind == LinkedNodeKind.fieldFormalParameter) {
-        return false;
-      }
-      return linkedNode.simpleFormalParameter_keyword != 0;
+      return enclosingUnit.linkedContext.isFinal(linkedNode);
     }
     if (unlinkedParam != null) {
       return unlinkedParam.isFinal;
@@ -7962,15 +8190,8 @@
   DartType get type {
     if (linkedNode != null) {
       if (_type != null) return _type;
-      if (linkedNode.kind == LinkedNodeKind.defaultFormalParameter) {
-        var parameter = linkedNode.defaultFormalParameter_parameter;
-        return _type = enclosingUnit.linkedContext.getType(
-          parameter.simpleFormalParameter_type2,
-        );
-      }
-      return _type = enclosingUnit.linkedContext.getType(
-        linkedNode.simpleFormalParameter_type2,
-      );
+      var context = enclosingUnit.linkedContext;
+      return _type = context.getFormalParameterType(linkedNode);
     }
     _resynthesizeTypeAndParameters();
     return super.type;
@@ -8080,6 +8301,47 @@
     }
   }
 
+  static List<ParameterElement> forLinkedNodeList(
+      ElementImpl enclosing,
+      LinkedUnitContext context,
+      Reference containerRef,
+      List<LinkedNode> formalParameters) {
+    if (formalParameters == null) {
+      return const [];
+    }
+
+    return formalParameters.map((node) {
+      if (node.kind == LinkedNodeKind.defaultFormalParameter) {
+        var parameterNode = node.defaultFormalParameter_parameter;
+        var name = context.getFormalParameterName(parameterNode);
+        var reference = containerRef.getChild(name);
+        reference.node = node;
+        if (parameterNode.kind == LinkedNodeKind.fieldFormalParameter) {
+          return DefaultFieldFormalParameterElementImpl.forLinkedNode(
+            enclosing,
+            reference,
+            node,
+          );
+        } else {
+          return DefaultParameterElementImpl.forLinkedNode(
+            enclosing,
+            reference,
+            node,
+          );
+        }
+      } else {
+        var name = context.getFormalParameterName(node);
+        var reference = containerRef.getChild(name);
+        reference.node = node;
+        return ParameterElementImpl.forLinkedNodeFactory(
+          enclosing,
+          reference,
+          node,
+        );
+      }
+    }).toList();
+  }
+
   /// Create and return [ParameterElement]s for the given [unlinkedParameters].
   static List<ParameterElement> resynthesizeList(
       List<UnlinkedParam> unlinkedParameters, ElementImpl enclosingElement,
@@ -8202,6 +8464,11 @@
       : _unlinkedImport = null,
         super(name, nameOffset);
 
+  PrefixElementImpl.forLinkedNode(
+      ElementImpl enclosing, Reference reference, LinkedNode linkedNode)
+      : _unlinkedImport = null,
+        super.forLinkedNode(enclosing, reference, linkedNode);
+
   /// Initialize a newly created prefix element to have the given [name].
   PrefixElementImpl.forNode(Identifier name)
       : _unlinkedImport = null,
@@ -8220,9 +8487,6 @@
       super.enclosingElement as LibraryElement;
 
   @override
-  String get identifier => "_${super.identifier}";
-
-  @override
   List<LibraryElement> get importedLibraries => const <LibraryElement>[];
 
   @override
@@ -8230,6 +8494,9 @@
 
   @override
   String get name {
+    if (linkedNode != null) {
+      return reference.name;
+    }
     if (_name == null) {
       if (_unlinkedImport != null) {
         LibraryElementImpl library = enclosingElement as LibraryElementImpl;
@@ -8242,6 +8509,10 @@
 
   @override
   int get nameOffset {
+    if (linkedNode != null) {
+      LibraryElementImpl library = enclosingElement;
+      return library.linkedContext.getSimpleOffset(linkedNode);
+    }
     int offset = super.nameOffset;
     if (offset == 0 && _unlinkedImport != null) {
       return _unlinkedImport.prefixOffset;
@@ -8401,7 +8672,11 @@
   @override
   String get name {
     if (linkedNode != null) {
-      return reference.name;
+      var name = reference.name;
+      if (isSetter) {
+        return '$name=';
+      }
+      return name;
     }
     if (serializedExecutable != null) {
       return serializedExecutable.name;
@@ -8638,6 +8913,9 @@
   /// The unlinked representation of the combinator in the summary.
   final UnlinkedCombinator _unlinkedCombinator;
 
+  final LinkedUnitContext linkedContext;
+  final LinkedNode linkedNode;
+
   /// The names that are to be made visible in the importing library if they are
   /// defined in the imported library.
   List<String> _shownNames;
@@ -8649,10 +8927,18 @@
   /// The offset of the 'show' keyword of this element.
   int _offset = 0;
 
-  ShowElementCombinatorImpl() : _unlinkedCombinator = null;
+  ShowElementCombinatorImpl()
+      : _unlinkedCombinator = null,
+        linkedContext = null,
+        linkedNode = null;
+
+  ShowElementCombinatorImpl.forLinkedNode(this.linkedContext, this.linkedNode)
+      : _unlinkedCombinator = null;
 
   /// Initialize using the given serialized information.
-  ShowElementCombinatorImpl.forSerialized(this._unlinkedCombinator);
+  ShowElementCombinatorImpl.forSerialized(this._unlinkedCombinator)
+      : linkedContext = null,
+        linkedNode = null;
 
   @override
   int get end {
@@ -8669,6 +8955,9 @@
 
   @override
   int get offset {
+    if (linkedNode != null) {
+      return linkedContext.getTokenOffset(linkedNode.combinator_keyword);
+    }
     if (_unlinkedCombinator != null) {
       return _unlinkedCombinator.offset;
     }
@@ -8682,9 +8971,18 @@
 
   @override
   List<String> get shownNames {
-    if (_unlinkedCombinator != null) {
-      _shownNames ??= _unlinkedCombinator.shows.toList(growable: false);
+    if (_shownNames != null) return _shownNames;
+
+    if (linkedNode != null) {
+      return _shownNames = linkedNode.showCombinator_shownNames
+          .map((node) => linkedContext.getSimpleName(node))
+          .toList();
     }
+
+    if (_unlinkedCombinator != null) {
+      return _shownNames = _unlinkedCombinator.shows.toList(growable: false);
+    }
+
     return _shownNames ?? const <String>[];
   }
 
@@ -8878,6 +9176,9 @@
 
   @override
   int get codeLength {
+    if (linkedNode != null) {
+      return linkedNode.codeLength;
+    }
     if (_unlinkedTypeParam != null) {
       return _unlinkedTypeParam.codeRange?.length;
     }
@@ -8886,6 +9187,9 @@
 
   @override
   int get codeOffset {
+    if (linkedNode != null) {
+      return linkedNode.codeOffset;
+    }
     if (_unlinkedTypeParam != null) {
       return _unlinkedTypeParam.codeRange?.offset;
     }
@@ -8986,7 +9290,7 @@
     if (linkedNode != null) {
       var context = enclosingUnit.linkedContext;
       var containerRef = reference.getChild('@typeParameter');
-      var typeParameters = context.getTypeParameters(linkedNode);
+      var typeParameters = LinkedUnitContext.getTypeParameters(linkedNode);
       if (typeParameters == null) {
         return _typeParameterElements = const [];
       }
@@ -9194,6 +9498,9 @@
   DartObject get constantValue => evaluationResult?.value;
 
   void set declaredType(DartType type) {
+    if (linkedNode != null) {
+      enclosingUnit.linkedContext.setVariableType(linkedNode, type);
+    }
     _declaredType = _checkElementOfType(type);
   }
 
diff --git a/pkg/analyzer/lib/src/dart/element/inheritance_manager2.dart b/pkg/analyzer/lib/src/dart/element/inheritance_manager2.dart
index b2fb92f..8bdc5c7 100644
--- a/pkg/analyzer/lib/src/dart/element/inheritance_manager2.dart
+++ b/pkg/analyzer/lib/src/dart/element/inheritance_manager2.dart
@@ -1,4 +1,4 @@
-// Copyright (c) 2018, the Dart project authors.  Please see the AUTHORS file
+// Copyright (c) 2018, the Dart project authors. Please see the AUTHORS file
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
 
diff --git a/pkg/analyzer/lib/src/dart/element/type.dart b/pkg/analyzer/lib/src/dart/element/type.dart
index 5fbed4f..e2393ca 100644
--- a/pkg/analyzer/lib/src/dart/element/type.dart
+++ b/pkg/analyzer/lib/src/dart/element/type.dart
@@ -1541,6 +1541,15 @@
   }
 
   @override
+  bool get isDartCoreString {
+    ClassElement element = this.element;
+    if (element == null) {
+      return false;
+    }
+    return element.name == "String" && element.library.isDartCore;
+  }
+
+  @override
   bool get isObject => element.supertype == null && !element.isMixin;
 
   @override
@@ -2825,6 +2834,9 @@
   bool get isDartCoreNull => false;
 
   @override
+  bool get isDartCoreString => false;
+
+  @override
   bool get isDynamic => false;
 
   @override
diff --git a/pkg/analyzer/lib/src/dart/element/wrapped.dart b/pkg/analyzer/lib/src/dart/element/wrapped.dart
index 10c3f75..984a7b1 100644
--- a/pkg/analyzer/lib/src/dart/element/wrapped.dart
+++ b/pkg/analyzer/lib/src/dart/element/wrapped.dart
@@ -1,4 +1,4 @@
-// Copyright (c) 2018, the Dart project authors.  Please see the AUTHORS file
+// Copyright (c) 2018, the Dart project authors. Please see the AUTHORS file
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
 
diff --git a/pkg/analyzer/lib/src/dart/error/hint_codes.dart b/pkg/analyzer/lib/src/dart/error/hint_codes.dart
index 39f9dee..64dcf19 100644
--- a/pkg/analyzer/lib/src/dart/error/hint_codes.dart
+++ b/pkg/analyzer/lib/src/dart/error/hint_codes.dart
@@ -322,6 +322,8 @@
   /**
    * Hint for the `x is int` type checks.
    */
+  // TODO(brianwilkerson) This hint isn't being generated. Decide whether to
+  //  generate it or remove it.
   static const HintCode IS_INT = const HintCode(
       'IS_INT',
       "When compiled to JS, this test might return true when the left hand "
@@ -340,6 +342,8 @@
   /**
    * Hint for the `x is! int` type checks.
    */
+  // TODO(brianwilkerson) This hint isn't being generated. Decide whether to
+  //  generate it or remove it.
   static const HintCode IS_NOT_INT = const HintCode(
       'IS_NOT_INT',
       "When compiled to JS, this test might return false when the left hand "
@@ -550,6 +554,81 @@
           "Try either importing 'dart:async' or updating the SDK constraints.");
 
   /**
+   * An as expression being used in a const context is expected to run on
+   * versions of the SDK that did not support them.
+   */
+  static const HintCode SDK_VERSION_AS_EXPRESSION_IN_CONST_CONTEXT =
+      const HintCode(
+          'SDK_VERSION_AS_EXPRESSION_IN_CONST_CONTEXT',
+          "The use of an as expression in a constant expression wasn't "
+          "supported until version 2.2.2, but this code is required to be able "
+          "to run on earlier versions.",
+          correction: "Try updating the SDK constraints.");
+
+  /**
+   * The operator '&', '|' or '^' is being used on boolean values in code that
+   * is expected to run on versions of the SDK that did not support it.
+   */
+  static const HintCode SDK_VERSION_BOOL_OPERATOR = const HintCode(
+      'SDK_VERSION_BOOL_OPERATOR',
+      "Using the operator '{0}' for 'bool's was not supported until version "
+      "2.2.2, but this code is required to be able to run on earlier versions.",
+      correction: "Try updating the SDK constraints.");
+
+  /**
+   * The operator '==' is being used on non-primitive values in code that
+   * is expected to run on versions of the SDK that did not support it.
+   */
+  static const HintCode SDK_VERSION_EQ_EQ_OPERATOR_IN_CONST_CONTEXT = const HintCode(
+      'SDK_VERSION_EQ_EQ_OPERATOR_IN_CONST_CONTEXT',
+      "Using the operator '==' for non-primitive types was not supported until "
+      "version 2.2.2, but this code is required to be able to run on earlier "
+      "versions.",
+      correction: "Try updating the SDK constraints.");
+
+  /**
+   * The operator '>>>' is being used in code that is expected to run on
+   * versions of the SDK that did not support it.
+   */
+  static const HintCode SDK_VERSION_GT_GT_GT_OPERATOR = const HintCode(
+      'SDK_VERSION_GT_GT_GT_OPERATOR',
+      "The operator '>>>' was not supported until version 2.2.2, but this code "
+      "is required to be able to run on earlier versions.",
+      correction: "Try updating the SDK constraints.");
+
+  /**
+   * An is expression being used in a const context is expected to run on
+   * versions of the SDK that did not support them.
+   */
+  static const HintCode SDK_VERSION_IS_EXPRESSION_IN_CONST_CONTEXT =
+      const HintCode(
+          'SDK_VERSION_IS_EXPRESSION_IN_CONST_CONTEXT',
+          "The use of an is expression in a constant expression wasn't "
+          "supported until version 2.2.2, but this code is required to be able "
+          "to run on earlier versions.",
+          correction: "Try updating the SDK constraints.");
+
+  /**
+   * A set literal is being used in code that is expected to run on versions of
+   * the SDK that did not support them.
+   */
+  static const HintCode SDK_VERSION_SET_LITERAL = const HintCode(
+      'SDK_VERSION_SET_LITERAL',
+      "Set literals were not supported until version 2.2, "
+      "but this code is required to be able to run on earlier versions.",
+      correction: "Try updating the SDK constraints.");
+
+  /**
+   * The for, if or spread element is being used in code that is expected to run
+   * on versions of the SDK that did not support them.
+   */
+  static const HintCode SDK_VERSION_UI_AS_CODE = const HintCode(
+      'SDK_VERSION_UI_AS_CODE',
+      "The for, if and spread elements were not supported until version 2.2.2, "
+      "but this code is required to be able to run on earlier versions.",
+      correction: "Try updating the SDK constraints.");
+
+  /**
    * This hint is generated anywhere where a `@sealed` class or mixin is used as
    * a super-type of a class.
    */
diff --git a/pkg/analyzer/lib/src/dart/error/syntactic_errors.dart b/pkg/analyzer/lib/src/dart/error/syntactic_errors.dart
index 62e8d17..67fbccc 100644
--- a/pkg/analyzer/lib/src/dart/error/syntactic_errors.dart
+++ b/pkg/analyzer/lib/src/dart/error/syntactic_errors.dart
@@ -379,11 +379,17 @@
       "The modifier 'async*' isn't allowed for an expression function body.",
       correction: "Try converting the body to a block.");
 
+  static const ParserErrorCode INVALID_SUPER_IN_INITIALIZER =
+      _INVALID_SUPER_IN_INITIALIZER;
+
   static const ParserErrorCode INVALID_SYNC = const ParserErrorCode(
       'INVALID_SYNC',
       "The modifier 'sync' isn't allowed for an expression function body.",
       correction: "Try converting the body to a block.");
 
+  static const ParserErrorCode INVALID_THIS_IN_INITIALIZER =
+      _INVALID_THIS_IN_INITIALIZER;
+
   static const ParserErrorCode INVALID_UNICODE_ESCAPE = _INVALID_UNICODE_ESCAPE;
 
   static const ParserErrorCode LIBRARY_DIRECTIVE_NOT_FIRST =
diff --git a/pkg/analyzer/lib/src/dart/error/syntactic_errors.g.dart b/pkg/analyzer/lib/src/dart/error/syntactic_errors.g.dart
index fd3008b..598d093 100644
--- a/pkg/analyzer/lib/src/dart/error/syntactic_errors.g.dart
+++ b/pkg/analyzer/lib/src/dart/error/syntactic_errors.g.dart
@@ -102,6 +102,8 @@
   _MISSING_CATCH_OR_FINALLY,
   _EXPERIMENT_NOT_ENABLED,
   _EXPECTED_ELSE_OR_COMMA,
+  _INVALID_SUPER_IN_INITIALIZER,
+  _INVALID_THIS_IN_INITIALIZER,
 ];
 
 const ParserErrorCode _ABSTRACT_CLASS_MEMBER = const ParserErrorCode(
@@ -386,6 +388,14 @@
         r"The operator '?.' cannot be used with 'super' because 'super' cannot be null.",
         correction: "Try replacing '?.' with '.'");
 
+const ParserErrorCode _INVALID_SUPER_IN_INITIALIZER = const ParserErrorCode(
+    'INVALID_SUPER_IN_INITIALIZER',
+    r"Can only use 'super' in an initializer for calling the superclass constructor (e.g. 'super()' or 'super.namedConstructor()')");
+
+const ParserErrorCode _INVALID_THIS_IN_INITIALIZER = const ParserErrorCode(
+    'INVALID_THIS_IN_INITIALIZER',
+    r"Can only use 'this' in an initializer for field initialization (e.g. 'this.x = something') and constructor redirection (e.g. 'this()' or 'this.namedConstructor())");
+
 const ParserErrorCode _INVALID_UNICODE_ESCAPE = const ParserErrorCode(
     'INVALID_UNICODE_ESCAPE',
     r"An escape sequence starting with '\u' must be followed by 4 hexadecimal digits or from 1 to 6 digits between '{' and '}'.");
diff --git a/pkg/analyzer/lib/src/dart/resolver/definite_assignment.dart b/pkg/analyzer/lib/src/dart/resolver/definite_assignment.dart
index 838c611..bcf3d5e 100644
--- a/pkg/analyzer/lib/src/dart/resolver/definite_assignment.dart
+++ b/pkg/analyzer/lib/src/dart/resolver/definite_assignment.dart
@@ -530,7 +530,7 @@
     _current = _current.union(continueSet);
   }
 
-  void beginForStatement2(ForStatement2 statement) {
+  void beginForStatement2(ForStatement statement) {
     // Not strongly necessary, because we discard everything anyway.
     // Just for consistency, so that `break` is handled without `null`.
     _statementToStackIndex[statement] = _stack.length;
diff --git a/pkg/analyzer/lib/src/dart/resolver/exit_detector.dart b/pkg/analyzer/lib/src/dart/resolver/exit_detector.dart
index 432367d..a0d6371 100644
--- a/pkg/analyzer/lib/src/dart/resolver/exit_detector.dart
+++ b/pkg/analyzer/lib/src/dart/resolver/exit_detector.dart
@@ -231,7 +231,7 @@
   }
 
   @override
-  bool visitForStatement2(ForStatement2 node) {
+  bool visitForStatement(ForStatement node) {
     bool outerBreakValue = _enclosingBlockContainsBreak;
     _enclosingBlockContainsBreak = false;
     ForLoopParts parts = node.forLoopParts;
@@ -393,7 +393,7 @@
 
   @override
   bool visitListLiteral(ListLiteral node) {
-    for (CollectionElement element in node.elements2) {
+    for (CollectionElement element in node.elements) {
       if (_nodeExits(element)) {
         return true;
       }
@@ -464,7 +464,7 @@
 
   @override
   bool visitSetOrMapLiteral(SetOrMapLiteral node) {
-    for (CollectionElement element in node.elements2) {
+    for (CollectionElement element in node.elements) {
       if (_nodeExits(element)) {
         return true;
       }
diff --git a/pkg/analyzer/lib/src/dart/resolver/inheritance_manager.dart b/pkg/analyzer/lib/src/dart/resolver/inheritance_manager.dart
index 9e54c4c..0184c06 100644
--- a/pkg/analyzer/lib/src/dart/resolver/inheritance_manager.dart
+++ b/pkg/analyzer/lib/src/dart/resolver/inheritance_manager.dart
@@ -1,4 +1,4 @@
-// Copyright (c) 2016, the Dart project authors.  Please see the AUTHORS file
+// Copyright (c) 2016, the Dart project authors. Please see the AUTHORS file
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
 
diff --git a/pkg/analyzer/lib/src/dart/resolver/method_invocation_resolver.dart b/pkg/analyzer/lib/src/dart/resolver/method_invocation_resolver.dart
index 6471484..844dfd9 100644
--- a/pkg/analyzer/lib/src/dart/resolver/method_invocation_resolver.dart
+++ b/pkg/analyzer/lib/src/dart/resolver/method_invocation_resolver.dart
@@ -1,4 +1,4 @@
-// Copyright (c) 2018, the Dart project authors.  Please see the AUTHORS file
+// Copyright (c) 2018, the Dart project authors. Please see the AUTHORS file
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
 
diff --git a/pkg/analyzer/lib/src/dart/sdk/patch.dart b/pkg/analyzer/lib/src/dart/sdk/patch.dart
index 532ae5e..d2f8f1e 100644
--- a/pkg/analyzer/lib/src/dart/sdk/patch.dart
+++ b/pkg/analyzer/lib/src/dart/sdk/patch.dart
@@ -1,4 +1,4 @@
-// Copyright (c) 2016, the Dart project authors.  Please see the AUTHORS file
+// Copyright (c) 2016, the Dart project authors. Please see the AUTHORS file
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
 
diff --git a/pkg/analyzer/lib/src/dart/sdk/sdk.dart b/pkg/analyzer/lib/src/dart/sdk/sdk.dart
index e20937d..41e4bfe 100644
--- a/pkg/analyzer/lib/src/dart/sdk/sdk.dart
+++ b/pkg/analyzer/lib/src/dart/sdk/sdk.dart
@@ -20,7 +20,6 @@
 import 'package:analyzer/src/generated/sdk.dart';
 import 'package:analyzer/src/generated/source_io.dart';
 import 'package:analyzer/src/summary/idl.dart' show PackageBundle;
-import 'package:analyzer/src/summary/package_bundle_reader.dart';
 import 'package:path/path.dart' as pathos;
 import 'package:yaml/yaml.dart';
 
@@ -86,16 +85,6 @@
       _analysisContext = new SdkAnalysisContext(_analysisOptions);
       SourceFactory factory = new SourceFactory([new DartUriResolver(this)]);
       _analysisContext.sourceFactory = factory;
-      if (_useSummary) {
-        PackageBundle sdkBundle = getLinkedBundle();
-        if (sdkBundle != null) {
-          SummaryDataStore dataStore =
-              new SummaryDataStore([], resourceProvider: resourceProvider);
-          dataStore.addBundle(null, sdkBundle);
-          _analysisContext.resultProvider =
-              new InputPackagesResultProvider(_analysisContext, dataStore);
-        }
-      }
     }
     return _analysisContext;
   }
diff --git a/pkg/analyzer/lib/src/dartdoc/dartdoc_directive_info.dart b/pkg/analyzer/lib/src/dartdoc/dartdoc_directive_info.dart
new file mode 100644
index 0000000..ca9c241
--- /dev/null
+++ b/pkg/analyzer/lib/src/dartdoc/dartdoc_directive_info.dart
@@ -0,0 +1,117 @@
+// Copyright (c) 2019, the Dart project authors. Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+/// Information about the directives found in Dartdoc comments.
+class DartdocDirectiveInfo {
+  // TODO(brianwilkerson) Consider moving the method
+  //  DartUnitHoverComputer.computeDocumentation to this class.
+
+  /// A regular expression used to match a macro directive. There is one group
+  /// that contains the name of the template.
+  static final macroRegExp = new RegExp(r'{@macro\s+([^}]+)}');
+
+  /// A regular expression used to match a template directive. There are two
+  /// groups. The first contains the name of the template, the second contains
+  /// the body of the template.
+  static final templateRegExp = new RegExp(
+      r'[ ]*{@template\s+(.+?)}([\s\S]+?){@endtemplate}[ ]*\n?',
+      multiLine: true);
+
+  /// A table mapping the names of templates to the unprocessed bodies of the
+  /// templates.
+  final Map<String, String> templateMap = {};
+
+  /// Initialize a newly created set of information about Dartdoc directives.
+  DartdocDirectiveInfo();
+
+  /// Add corresponding pairs from the [names] and [values] to the set of
+  /// defined templates.
+  void addTemplateNamesAndValues(List<String> names, List<String> values) {
+    int length = names.length;
+    assert(length == values.length);
+    for (int i = 0; i < length; i++) {
+      templateMap[names[i]] = values[i];
+    }
+  }
+
+  /// Process the given Dartdoc [comment], extracting the template directive if
+  /// there is one.
+  void extractTemplate(String comment) {
+    for (Match match in templateRegExp.allMatches(comment)) {
+      String name = match.group(1).trim();
+      String body = match.group(2).trim();
+      templateMap[name] = _stripDelimiters(body).join('\n');
+    }
+  }
+
+  /// Process the given Dartdoc [comment], replacing any macro directives with
+  /// the body of the corresponding template.
+  String processDartdoc(String comment) {
+    List<String> lines = _stripDelimiters(comment);
+    for (int i = lines.length - 1; i >= 0; i--) {
+      String line = lines[i];
+      Match match = macroRegExp.firstMatch(line);
+      if (match != null) {
+        String name = match.group(1);
+        String value = templateMap[name];
+        if (value != null) {
+          lines[i] = value;
+        }
+      }
+    }
+    return lines.join('\n');
+  }
+
+  /// Remove the delimiters from the given [comment].
+  List<String> _stripDelimiters(String comment) {
+    if (comment == null) {
+      return null;
+    }
+    //
+    // Remove /** */.
+    //
+    if (comment.startsWith('/**')) {
+      comment = comment.substring(3);
+    }
+    if (comment.endsWith('*/')) {
+      comment = comment.substring(0, comment.length - 2);
+    }
+    comment = comment.trim();
+    //
+    // Remove leading '* ' and '/// '.
+    //
+    List<String> lines = comment.split('\n');
+    int firstNonEmpty = lines.length + 1;
+    int lastNonEmpty = -1;
+    for (var i = 0; i < lines.length; i++) {
+      String line = lines[i];
+      line = line.trim();
+      if (line.startsWith('*')) {
+        line = line.substring(1);
+        if (line.startsWith(' ')) {
+          line = line.substring(1);
+        }
+      } else if (line.startsWith('///')) {
+        line = line.substring(3);
+        if (line.startsWith(' ')) {
+          line = line.substring(1);
+        }
+      }
+      if (line.isNotEmpty) {
+        if (i < firstNonEmpty) {
+          firstNonEmpty = i;
+        }
+        if (i > lastNonEmpty) {
+          lastNonEmpty = i;
+        }
+      }
+      lines[i] = line;
+    }
+    if (lastNonEmpty < firstNonEmpty) {
+      // All of the lines are empty.
+      return <String>[];
+    }
+    return lines.sublist(firstNonEmpty, lastNonEmpty + 1);
+  }
+}
diff --git a/pkg/analyzer/lib/src/error/codes.dart b/pkg/analyzer/lib/src/error/codes.dart
index b1161d4..41a977e 100644
--- a/pkg/analyzer/lib/src/error/codes.dart
+++ b/pkg/analyzer/lib/src/error/codes.dart
@@ -8,7 +8,6 @@
 export 'package:analyzer/src/dart/error/hint_codes.dart';
 export 'package:analyzer/src/dart/error/lint_codes.dart';
 export 'package:analyzer/src/dart/error/todo_codes.dart';
-export 'package:analyzer/src/html/error/html_codes.dart';
 
 /**
  * The error codes used for compile time errors caused by constant evaluation
@@ -68,77 +67,6 @@
           "'{1}'.");
 
   /**
-   * 12.6 Lists: A run-time list literal &lt;<i>E</i>&gt; [<i>e<sub>1</sub></i>
-   * ... <i>e<sub>n</sub></i>] is evaluated as follows:
-   * * The operator []= is invoked on <i>a</i> with first argument <i>i</i> and
-   *   second argument <i>o<sub>i+1</sub></i><i>, 1 &lt;= i &lt;= n</i>
-   *
-   * 12.14.2 Binding Actuals to Formals: Let <i>T<sub>i</sub></i> be the static
-   * type of <i>a<sub>i</sub></i>, let <i>S<sub>i</sub></i> be the type of
-   * <i>p<sub>i</sub>, 1 &lt;= i &lt;= n+k</i> and let <i>S<sub>q</sub></i> be
-   * the type of the named parameter <i>q</i> of <i>f</i>. It is a static
-   * warning if <i>T<sub>j</sub></i> may not be assigned to <i>S<sub>j</sub>,
-   * 1 &lt;= j &lt;= m</i>.
-   *
-   * Parameters:
-   * 0: the actual type of the list element
-   * 1: the expected type of the list element
-   */
-  static const CheckedModeCompileTimeErrorCode
-      LIST_ELEMENT_TYPE_NOT_ASSIGNABLE = const CheckedModeCompileTimeErrorCode(
-          'LIST_ELEMENT_TYPE_NOT_ASSIGNABLE',
-          "The element type '{0}' can't be assigned to the list type '{1}'.");
-
-  /**
-   * 12.7 Map: A run-time map literal &lt;<i>K</i>, <i>V</i>&gt;
-   * [<i>k<sub>1</sub></i> : <i>e<sub>1</sub></i> ... <i>k<sub>n</sub></i> :
-   * <i>e<sub>n</sub></i>] is evaluated as follows:
-   * * The operator []= is invoked on <i>m</i> with first argument
-   *   <i>k<sub>i</sub></i> and second argument <i>e<sub>i</sub></i><i>, 1 &lt;=
-   *   i &lt;= n</i>
-   *
-   * 12.14.2 Binding Actuals to Formals: Let <i>T<sub>i</sub></i> be the static
-   * type of <i>a<sub>i</sub></i>, let <i>S<sub>i</sub></i> be the type of
-   * <i>p<sub>i</sub>, 1 &lt;= i &lt;= n+k</i> and let <i>S<sub>q</sub></i> be
-   * the type of the named parameter <i>q</i> of <i>f</i>. It is a static
-   * warning if <i>T<sub>j</sub></i> may not be assigned to <i>S<sub>j</sub>, 1
-   * &lt;= j &lt;= m</i>.
-   */
-  static const CheckedModeCompileTimeErrorCode MAP_KEY_TYPE_NOT_ASSIGNABLE =
-      const CheckedModeCompileTimeErrorCode('MAP_KEY_TYPE_NOT_ASSIGNABLE',
-          "The element type '{0}' can't be assigned to the map key type '{1}'.");
-
-  /**
-   * 12.7 Map: A run-time map literal &lt;<i>K</i>, <i>V</i>&gt;
-   * [<i>k<sub>1</sub></i> : <i>e<sub>1</sub></i> ... <i>k<sub>n</sub></i> :
-   * <i>e<sub>n</sub></i>] is evaluated as follows:
-   * * The operator []= is invoked on <i>m</i> with first argument
-   *   <i>k<sub>i</sub></i> and second argument <i>e<sub>i</sub></i><i>, 1 &lt;=
-   *   i &lt;= n</i>
-   *
-   * 12.14.2 Binding Actuals to Formals: Let <i>T<sub>i</sub></i> be the static
-   * type of <i>a<sub>i</sub></i>, let <i>S<sub>i</sub></i> be the type of
-   * <i>p<sub>i</sub>, 1 &lt;= i &lt;= n+k</i> and let <i>S<sub>q</sub></i> be
-   * the type of the named parameter <i>q</i> of <i>f</i>. It is a static
-   * warning if <i>T<sub>j</sub></i> may not be assigned to <i>S<sub>j</sub>, 1
-   * &lt;= j &lt;= m</i>.
-   */
-  static const CheckedModeCompileTimeErrorCode MAP_VALUE_TYPE_NOT_ASSIGNABLE =
-      const CheckedModeCompileTimeErrorCode(
-          'MAP_VALUE_TYPE_NOT_ASSIGNABLE',
-          "The element type '{0}' can't be assigned to the map value type "
-          "'{1}'.");
-
-  /**
-   * Parameters:
-   * 0: the actual type of the set element
-   * 1: the expected type of the set element
-   */
-  static const CheckedModeCompileTimeErrorCode SET_ELEMENT_TYPE_NOT_ASSIGNABLE =
-      const CheckedModeCompileTimeErrorCode('SET_ELEMENT_TYPE_NOT_ASSIGNABLE',
-          "The element type '{0}' can't be assigned to the set type '{1}'.");
-
-  /**
    * 16.12.2 Const: It is a compile-time error if evaluation of a constant
    * object results in an uncaught exception being thrown.
    */
@@ -261,18 +189,6 @@
           "An annotation (metadata) can't use type arguments.");
 
   /**
-   * 12.33 Argument Definition Test: It is a compile time error if <i>v</i> does
-   * not denote a formal parameter.
-   *
-   * Parameters:
-   * 0: the name of the identifier in the argument definition test that is not a
-   *    parameter
-   */
-  static const CompileTimeErrorCode ARGUMENT_DEFINITION_TEST_NON_PARAMETER =
-      const CompileTimeErrorCode(
-          'ARGUMENT_DEFINITION_TEST_NON_PARAMETER', "'{0}' isn't a parameter.");
-
-  /**
    * 17.6.3 Asynchronous For-in: It is a compile-time error if an asynchronous
    * for-in statement appears inside a synchronous function.
    */
@@ -359,22 +275,6 @@
           correction: "Try choosing a different name for the type parameter.");
 
   /**
-   * 16.33 Identifier Reference: It is a compile-time error if a built-in
-   * identifier is used as the declared name of a prefix, class, type parameter
-   * or type alias.
-   *
-   * Parameters:
-   * 0: the built-in identifier that is being used
-   *
-   * TODO(scheglov) It would be nice to get more specific errors.
-   * https://github.com/dart-lang/sdk/issues/31811
-   */
-  static const CompileTimeErrorCode BUILT_IN_IDENTIFIER_IN_DECLARATION =
-      const CompileTimeErrorCode('BUILT_IN_IDENTIFIER_IN_DECLARATION',
-          "The built-in identifier '{0}' can't be used as a name.",
-          correction: "Try choosing a different name.");
-
-  /**
    * 13.9 Switch: It is a compile-time error if the class <i>C</i> implements
    * the operator <i>==</i>.
    *
@@ -516,12 +416,6 @@
           "this class.",
           correction: "Try renaming either the type variable or the member.");
 
-  static const CompileTimeErrorCode
-      CONST_CONSTRUCTOR_IN_SUBCLASS_OF_MIXIN_APPLICATION =
-      const CompileTimeErrorCode(
-          'CONST_CONSTRUCTOR_IN_SUBCLASS_OF_MIXIN_APPLICATION',
-          "Can't extend a mixin application and be 'const'.");
-
   /**
    * 16.12.2 Const: It is a compile-time error if evaluation of a constant
    * object results in an uncaught exception being thrown.
@@ -980,6 +874,22 @@
               "correcting one of the names to reference a different named parameter.");
 
   /**
+   * 16.10 Maps: It is a compile-time error if two keys of a constant map
+   * literal are equal according to their `==` operator (16.27).
+   */
+  static const CompileTimeErrorCode EQUAL_KEYS_IN_CONST_MAP =
+      const CompileTimeErrorCode('EQUAL_KEYS_IN_CONST_MAP',
+          "Two keys in a constant map literal can't be equal.");
+
+  /**
+   * 16.11 Sets: It is a compile-time error if two elements of a constant set
+   * literal are equal according to their `==` operator (16.27).
+   */
+  static const CompileTimeErrorCode EQUAL_ELEMENTS_IN_CONST_SET =
+      const CompileTimeErrorCode('EQUAL_ELEMENTS_IN_CONST_SET',
+          "Two values in a constant set can't be equal.");
+
+  /**
    * SDK implementation libraries can be exported only by other SDK libraries.
    *
    * Parameters:
@@ -1531,19 +1441,6 @@
           correction: "Try using a top-level variable or a field.");
 
   /**
-   * 15.31 Identifier Reference: It is a compile-time error if any of the
-   * identifiers async, await or yield is used as an identifier in a function
-   * body marked with either async, async* or sync*.
-   */
-  static const CompileTimeErrorCode INVALID_IDENTIFIER_IN_ASYNC =
-      const CompileTimeErrorCode(
-          'INVALID_IDENTIFIER_IN_ASYNC',
-          "The identifier '{0}' can't be used in a function marked with "
-          "'async', 'async*' or 'sync*'.",
-          correction: "Try using a different name, or "
-              "remove the modifier on the function body.");
-
-  /**
    * 9. Functions: It is a compile-time error if an async, async* or sync*
    * modifier is attached to the body of a setter or constructor.
    */
@@ -2227,6 +2124,22 @@
           correction: "Try removing the keyword 'const' from the set literal.");
 
   static const CompileTimeErrorCode
+      NON_CONSTANT_SPREAD_EXPRESSION_FROM_DEFERRED_LIBRARY =
+      const CompileTimeErrorCode(
+          'NON_CONSTANT_SPREAD_EXPRESSION_FROM_DEFERRED_LIBRARY',
+          "Constant values from a deferred library can't be spread into a "
+          "const literal.",
+          correction: "Try making the deferred import non-deferred.");
+
+  static const CompileTimeErrorCode
+      NON_CONSTANT_IF_ELEMENT_CONDITION_FROM_DEFERRED_LIBRARY =
+      const CompileTimeErrorCode(
+          'NON_CONSTANT_IF_ELEMENT_CONDITION_FROM_DEFERRED_LIBRARY',
+          "Constant values from a deferred library can't be used as values in "
+          "an if condition inside a const collection literal.",
+          correction: "Try making the deferred import non-deferred.");
+
+  static const CompileTimeErrorCode
       NON_CONSTANT_SET_ELEMENT_FROM_DEFERRED_LIBRARY =
       const CompileTimeErrorCode(
           'NON_CONSTANT_SET_ELEMENT_FROM_DEFERRED_LIBRARY',
@@ -2235,30 +2148,14 @@
           correction: "Try removing the keyword 'const' from the set literal.");
 
   /**
-   * 7.6.3 Constant Constructors: Any expression that appears within the
-   * initializer list of a constant constructor must be a potentially constant
-   * expression, or a compile-time error occurs.
+   * This error code is no longer being generated. It should be removed when the
+   * reference to it in the linter has been removed and rolled into the SDK.
    */
+  @deprecated
   static const CompileTimeErrorCode NON_CONSTANT_VALUE_IN_INITIALIZER =
       const CompileTimeErrorCode('NON_CONSTANT_VALUE_IN_INITIALIZER',
           "Initializer expressions in constant constructors must be constants.");
 
-  /**
-   * 7.6.3 Constant Constructors: Any expression that appears within the
-   * initializer list of a constant constructor must be a potentially constant
-   * expression, or a compile-time error occurs.
-   *
-   * 12.1 Constants: A qualified reference to a static constant variable that is
-   * not qualified by a deferred prefix.
-   */
-  static const CompileTimeErrorCode
-      NON_CONSTANT_VALUE_IN_INITIALIZER_FROM_DEFERRED_LIBRARY =
-      const CompileTimeErrorCode(
-          'NON_CONSTANT_VALUE_IN_INITIALIZER_FROM_DEFERRED_LIBRARY',
-          "Constant values from a deferred library can't be used as constant "
-          "initializers.",
-          correction: "Try changing the import to not be deferred.");
-
   static const CompileTimeErrorCode NON_SYNC_FACTORY =
       const CompileTimeErrorCode('NON_SYNC_FACTORY',
           "Factory bodies can't use 'async', 'async*', or 'sync*'.");
@@ -3256,6 +3153,8 @@
    * 0: the name of the getter
    * 1: the name of the enclosing type where the getter is being looked for
    */
+  // TODO(brianwilkerson) When the "target" is an enum, report
+  //  UNDEFINED_ENUM_CONSTANT instead.
   static const StaticTypeWarningCode UNDEFINED_GETTER =
       const StaticTypeWarningCode('UNDEFINED_GETTER',
           "The getter '{0}' isn't defined for the class '{1}'.",
@@ -3719,21 +3618,6 @@
           correction: "Try creating an instance of a subtype.");
 
   /**
-   * 12.7 Maps: It is a static warning if the values of any two keys in a map
-   * literal are equal.
-   */
-  static const StaticWarningCode EQUAL_KEYS_IN_MAP = const StaticWarningCode(
-      'EQUAL_KEYS_IN_MAP', "Two keys in a map literal can't be equal.");
-
-  /**
-   * It is a compile-time error if any two of the values in a constant set are
-   * equal according to `==`.
-   */
-  static const StaticWarningCode EQUAL_VALUES_IN_CONST_SET =
-      const StaticWarningCode('EQUAL_VALUES_IN_CONST_SET',
-          "Two values in a constant set can't be equal.");
-
-  /**
    * 14.2 Exports: It is a static warning to export two different libraries with
    * the same name.
    *
@@ -3915,16 +3799,6 @@
           correction: "Try adding initializers for the fields.");
 
   /**
-   * 15.5 Function Types: It is a static warning if a concrete class implements
-   * Function and does not have a concrete method named call().
-   */
-  static const StaticWarningCode FUNCTION_WITHOUT_CALL = const StaticWarningCode(
-      'FUNCTION_WITHOUT_CALL',
-      "Concrete classes that implement 'Function' must implement the method 'call'.",
-      correction:
-          "Try implementing a 'call' method, or don't implement 'Function'.");
-
-  /**
    * 14.1 Imports: It is a static warning to import two different libraries with
    * the same name.
    *
@@ -3984,79 +3858,6 @@
           errorSeverity: ErrorSeverity.WARNING);
 
   /**
-   * 7.1 Instance Methods: It is a static warning if an instance method
-   * <i>m1</i> overrides an instance member <i>m2</i> and <i>m1</i> does not
-   * declare all the named parameters declared by <i>m2</i>.
-   *
-   * Parameters:
-   * 0: the number of named parameters in the overridden member
-   * 1: the signature of the overridden member
-   * 2: the name of the class from the overridden method
-   */
-  static const StaticWarningCode INVALID_OVERRIDE_NAMED =
-      const StaticWarningCode(
-          'INVALID_OVERRIDE_NAMED',
-          "Missing the named parameter '{0}' "
-          "to match the overridden method from '{1}' from '{2}'.",
-          correction: "Try adding the named parameter to this method, or "
-              "removing it from the overridden method.");
-
-  /**
-   * 7.1 Instance Methods: It is a static warning if an instance method
-   * <i>m1</i> overrides an instance member <i>m2</i> and <i>m1</i> has fewer
-   * positional parameters than <i>m2</i>.
-   *
-   * Parameters:
-   * 0: the number of positional parameters in the overridden member
-   * 1: the signature of the overridden member
-   * 2: the name of the class from the overridden method
-   */
-  static const StaticWarningCode INVALID_OVERRIDE_POSITIONAL =
-      const StaticWarningCode(
-          'INVALID_OVERRIDE_POSITIONAL',
-          "Must have at least {0} parameters "
-          "to match the overridden method '{1}' from '{2}'.",
-          correction: "Try adding the necessary parameters.");
-
-  /**
-   * 7.1 Instance Methods: It is a static warning if an instance method
-   * <i>m1</i> overrides an instance member <i>m2</i> and <i>m1</i> has a
-   * greater number of required parameters than <i>m2</i>.
-   *
-   * Parameters:
-   * 0: the number of required parameters in the overridden member
-   * 1: the signature of the overridden member
-   * 2: the name of the class from the overridden method
-   */
-  static const StaticWarningCode INVALID_OVERRIDE_REQUIRED =
-      const StaticWarningCode(
-          'INVALID_OVERRIDE_REQUIRED',
-          "Must have {0} required parameters or less "
-          "to match the overridden method '{1}' from '{2}'.",
-          correction: "Try removing the extra parameters.");
-
-  /**
-   * 7.3 Setters: It is a static warning if a setter <i>m1</i> overrides a
-   * setter <i>m2</i> and the type of <i>m1</i> is not a subtype of the type of
-   * <i>m2</i>.
-   *
-   * Parameters:
-   * 0: the name of the actual parameter type
-   * 1: the name of the expected parameter type, not assignable to the actual
-   * parameter type
-   * 2: the name of the class where the overridden setter is declared
-   *
-   * See [INVALID_METHOD_OVERRIDE_NORMAL_PARAM_TYPE].
-   */
-  static const StaticWarningCode INVALID_SETTER_OVERRIDE_NORMAL_PARAM_TYPE =
-      const StaticWarningCode(
-          'INVALID_SETTER_OVERRIDE_NORMAL_PARAM_TYPE',
-          "The parameter type '{0}' isn't assignable to '{1}' as required by "
-          "the setter it is overriding from '{2}'.",
-          correction:
-              "Try changing the parameter types so that they are compatible.");
-
-  /**
    * 12.6 Lists: A run-time list literal &lt;<i>E</i>&gt; [<i>e<sub>1</sub></i>
    * &hellip; <i>e<sub>n</sub></i>] is evaluated as follows:
    * * The operator []= is invoked on <i>a</i> with first argument <i>i</i> and
@@ -4855,11 +4656,6 @@
   static const StrongModeCode DYNAMIC_INVOKE = const StrongModeCode(
       ErrorType.HINT, 'DYNAMIC_INVOKE', "'{0}' requires a dynamic invoke.");
 
-  static const StrongModeCode INVALID_FIELD_OVERRIDE = const StrongModeCode(
-      ErrorType.COMPILE_TIME_ERROR,
-      'INVALID_FIELD_OVERRIDE',
-      "Field declaration '{3}.{1}' can't be overridden in '{0}'.");
-
   static const StrongModeCode IMPLICIT_DYNAMIC_PARAMETER = const StrongModeCode(
       ErrorType.COMPILE_TIME_ERROR,
       'IMPLICIT_DYNAMIC_PARAMETER',
@@ -4922,12 +4718,6 @@
       "Missing type arguments for calling generic function type '{0}'.",
       correction: _implicitDynamicCorrection);
 
-  static const StrongModeCode NO_DEFAULT_BOUNDS = const StrongModeCode(
-      ErrorType.COMPILE_TIME_ERROR,
-      'NO_DEFAULT_BOUNDS',
-      "Type has no default bounds",
-      correction: "Try adding explicit type arguments to type");
-
   static const StrongModeCode NOT_INSTANTIATED_BOUND = const StrongModeCode(
       ErrorType.COMPILE_TIME_ERROR,
       'NOT_INSTANTIATED_BOUND',
@@ -4974,12 +4764,6 @@
       "method, '{1}', which has an implicit type.",
       correction: "Add an explicit type for either '{0}' or '{1}'.");
 
-  static const StrongModeCode TOP_LEVEL_UNSUPPORTED = const StrongModeCode(
-      ErrorType.HINT,
-      'TOP_LEVEL_UNSUPPORTED',
-      "The type of '{0}' can't be inferred because {1} expressions aren't supported.",
-      correction: "Try adding an explicit type for '{0}'.");
-
   @override
   final ErrorType type;
 
diff --git a/pkg/analyzer/lib/src/fasta/ast_builder.dart b/pkg/analyzer/lib/src/fasta/ast_builder.dart
index 29d4bd9..1a75a35 100644
--- a/pkg/analyzer/lib/src/fasta/ast_builder.dart
+++ b/pkg/analyzer/lib/src/fasta/ast_builder.dart
@@ -1,4 +1,4 @@
-// Copyright (c) 2016, the Dart project authors.  Please see the AUTHORS file
+// Copyright (c) 2016, the Dart project authors. Please see the AUTHORS file
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
 
@@ -29,6 +29,8 @@
         messageFieldInitializerOutsideConstructor,
         messageIllegalAssignmentToNonAssignable,
         messageInterpolationInUri,
+        messageInvalidSuperInInitializer,
+        messageInvalidThisInInitializer,
         messageMissingAssignableSelector,
         messageNativeClauseShouldBeAnnotation,
         messageStaticConstructor,
@@ -111,6 +113,9 @@
   /// `true` if control-flow-collections behavior is enabled
   bool enableControlFlowCollections = false;
 
+  /// `true` if triple-shift behavior is enabled
+  bool enableTripleShift = false;
+
   AstBuilder(ErrorReporter errorReporter, this.fileUri, this.isFullAst,
       [Uri uri])
       : this.errorReporter = new FastaErrorReporter(errorReporter),
@@ -395,6 +400,13 @@
       Expression left = pop();
       reportErrorIfSuper(right);
       push(ast.binaryExpression(left, operatorToken, right));
+      if (!enableTripleShift && operatorToken.type == TokenType.GT_GT_GT) {
+        handleRecoverableError(
+            templateExperimentNotEnabled
+                .withArguments(EnableString.triple_shift),
+            operatorToken,
+            operatorToken);
+      }
     }
   }
 
@@ -727,7 +739,7 @@
     Token forToken = pop();
     Token awaitToken = pop(NullValue.AwaitToken);
 
-    push(ast.forStatement2(
+    push(ast.forStatement(
       awaitKeyword: awaitToken,
       forKeyword: forToken,
       leftParenthesis: leftParenthesis,
@@ -880,7 +892,7 @@
     Token leftParen = pop();
     Token forToken = pop();
 
-    push(ast.forStatement2(
+    push(ast.forStatement(
       forKeyword: forToken,
       leftParenthesis: leftParen,
       forLoopParts: forLoopParts,
@@ -1123,8 +1135,31 @@
               initializerObject.methodName,
               initializerObject.argumentList));
         } else {
-          // Invalid initializer
-          // TODO(danrubel): Capture this in the AST.
+          // Recovery: Invalid initializer
+          if (target is FunctionExpressionInvocation) {
+            var targetFunct = target.function;
+            if (targetFunct is SuperExpression) {
+              initializers.add(ast.superConstructorInvocation(
+                  targetFunct.superKeyword, null, null, target.argumentList));
+              // TODO(danrubel): Consider generating this error in the parser
+              // This error is also reported in the body builder
+              handleRecoverableError(messageInvalidSuperInInitializer,
+                  targetFunct.superKeyword, targetFunct.superKeyword);
+            } else if (targetFunct is ThisExpression) {
+              initializers.add(ast.redirectingConstructorInvocation(
+                  targetFunct.thisKeyword, null, null, target.argumentList));
+              // TODO(danrubel): Consider generating this error in the parser
+              // This error is also reported in the body builder
+              handleRecoverableError(messageInvalidThisInInitializer,
+                  targetFunct.thisKeyword, targetFunct.thisKeyword);
+            } else {
+              throw new UnsupportedError(
+                  'unsupported initializer $initializerObject');
+            }
+          } else {
+            throw new UnsupportedError(
+                'unsupported initializer $initializerObject');
+          }
         }
       } else if (initializerObject is AssignmentExpression) {
         Token thisKeyword;
@@ -1158,6 +1193,36 @@
             initializerObject.rightHandSide));
       } else if (initializerObject is AssertInitializer) {
         initializers.add(initializerObject);
+      } else if (initializerObject is PropertyAccess) {
+        // Recovery: Invalid initializer
+        Expression target = initializerObject.target;
+        if (target is FunctionExpressionInvocation) {
+          var targetFunct = target.function;
+          if (targetFunct is SuperExpression) {
+            initializers.add(ast.superConstructorInvocation(
+                targetFunct.superKeyword, null, null, target.argumentList));
+            // TODO(danrubel): Consider generating this error in the parser
+            // This error is also reported in the body builder
+            handleRecoverableError(messageInvalidSuperInInitializer,
+                targetFunct.superKeyword, targetFunct.superKeyword);
+          } else if (targetFunct is ThisExpression) {
+            initializers.add(ast.redirectingConstructorInvocation(
+                targetFunct.thisKeyword, null, null, target.argumentList));
+            // TODO(danrubel): Consider generating this error in the parser
+            // This error is also reported in the body builder
+            handleRecoverableError(messageInvalidThisInInitializer,
+                targetFunct.thisKeyword, targetFunct.thisKeyword);
+          } else {
+            throw new UnsupportedError(
+                'unsupported initializer $initializerObject');
+          }
+        } else {
+          throw new UnsupportedError(
+              'unsupported initializer $initializerObject');
+        }
+      } else {
+        throw new UnsupportedError('unsupported initializer:'
+            ' ${initializerObject.runtimeType} :: $initializerObject');
       }
     }
 
@@ -1869,6 +1934,12 @@
           messageMissingAssignableSelector, lhs.beginToken, lhs.endToken);
     }
     push(ast.assignmentExpression(lhs, token, rhs));
+    if (!enableTripleShift && token.type == TokenType.GT_GT_GT_EQ) {
+      handleRecoverableError(
+          templateExperimentNotEnabled.withArguments(EnableString.triple_shift),
+          token,
+          token);
+    }
   }
 
   void handleAsyncModifier(Token asyncToken, Token starToken) {
@@ -2080,6 +2151,11 @@
     push(ast.emptyStatement(semicolon));
   }
 
+  @override
+  void handleErrorToken(ErrorToken token) {
+    translateErrorToken(token, errorReporter.reportScannerError);
+  }
+
   void handleExpressionFunctionBody(Token arrowToken, Token semicolon) {
     assert(optional('=>', arrowToken) || optional('=', arrowToken));
     assert(optionalOrNull(';', semicolon));
@@ -2523,9 +2599,13 @@
             }
           }
         }
-        // ignore: deprecated_member_use_from_same_package
-        push(ast.setLiteral(
-            constKeyword, typeArguments, leftBrace, setEntries, rightBrace));
+        push(ast.setOrMapLiteral(
+          constKeyword: constKeyword,
+          typeArguments: typeArguments,
+          leftBracket: leftBrace,
+          elements: setEntries,
+          rightBracket: rightBrace,
+        ));
       } else {
         final mapEntries = <MapLiteralEntry>[];
         if (elements != null) {
@@ -2546,9 +2626,13 @@
             }
           }
         }
-        // ignore: deprecated_member_use_from_same_package
-        push(ast.mapLiteral(
-            constKeyword, typeArguments, leftBrace, mapEntries, rightBrace));
+        push(ast.setOrMapLiteral(
+          constKeyword: constKeyword,
+          typeArguments: typeArguments,
+          leftBracket: leftBrace,
+          elements: mapEntries,
+          rightBracket: rightBrace,
+        ));
       }
     }
   }
diff --git a/pkg/analyzer/lib/src/fasta/token_utils.dart b/pkg/analyzer/lib/src/fasta/token_utils.dart
index 2037396..c5ad5c2 100644
--- a/pkg/analyzer/lib/src/fasta/token_utils.dart
+++ b/pkg/analyzer/lib/src/fasta/token_utils.dart
@@ -4,45 +4,6 @@
 
 import 'package:front_end/src/scanner/token.dart' show CommentToken, Token;
 
-import 'package:front_end/src/fasta/scanner/token_constants.dart';
-
-import 'package:front_end/src/scanner/errors.dart' show translateErrorToken;
-
-import 'package:front_end/src/scanner/errors.dart' as analyzer
-    show ScannerErrorCode;
-
-/// Class capable of converting a stream of Fasta tokens to a stream of analyzer
-/// tokens.
-///
-/// This is a class rather than an ordinary method so that it can be subclassed
-/// in tests.
-class ToAnalyzerTokenStreamConverter {
-  /// Converts a stream of Fasta tokens (starting with [token] and continuing to
-  /// EOF) to a stream of analyzer tokens. This modifies the fasta token stream
-  /// to be an analyzer token stream by removing error tokens and reporting
-  /// those errors to the associated error listener.
-  Token convertTokens(Token firstToken) {
-    Token token = new Token.eof(-1)..setNext(firstToken);
-    Token next = firstToken;
-    while (!next.isEof) {
-      if (next.type.kind == BAD_INPUT_TOKEN) {
-        translateErrorToken(next, reportError);
-        token.setNext(next.next);
-      } else {
-        token = next;
-      }
-      next = token.next;
-    }
-    return firstToken;
-  }
-
-  /// Handles an error found during [convertTokens].
-  ///
-  /// Intended to be overridden by derived classes; by default, does nothing.
-  void reportError(analyzer.ScannerErrorCode errorCode, int offset,
-      List<Object> arguments) {}
-}
-
 /// Search for the token before [target] starting the search with [start].
 /// Return `null` if [target] is a comment token
 /// or the previous token cannot be found.
diff --git a/pkg/analyzer/lib/src/file_system/file_system.dart b/pkg/analyzer/lib/src/file_system/file_system.dart
index 183b8d1..28bd8b2 100644
--- a/pkg/analyzer/lib/src/file_system/file_system.dart
+++ b/pkg/analyzer/lib/src/file_system/file_system.dart
@@ -1,4 +1,4 @@
-// Copyright (c) 2014, the Dart project authors.  Please see the AUTHORS file
+// Copyright (c) 2014, the Dart project authors. Please see the AUTHORS file
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
 
diff --git a/pkg/analyzer/lib/src/generated/ast.dart b/pkg/analyzer/lib/src/generated/ast.dart
index 3b0eba2..a1900ab 100644
--- a/pkg/analyzer/lib/src/generated/ast.dart
+++ b/pkg/analyzer/lib/src/generated/ast.dart
@@ -1,4 +1,4 @@
-// Copyright (c) 2014, the Dart project authors.  Please see the AUTHORS file
+// Copyright (c) 2014, the Dart project authors. Please see the AUTHORS file
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
 
diff --git a/pkg/analyzer/lib/src/generated/element.dart b/pkg/analyzer/lib/src/generated/element.dart
index 5518d7c..da03617 100644
--- a/pkg/analyzer/lib/src/generated/element.dart
+++ b/pkg/analyzer/lib/src/generated/element.dart
@@ -1,4 +1,4 @@
-// Copyright (c) 2014, the Dart project authors.  Please see the AUTHORS file
+// Copyright (c) 2014, the Dart project authors. Please see the AUTHORS file
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
 
diff --git a/pkg/analyzer/lib/src/generated/element_handle.dart b/pkg/analyzer/lib/src/generated/element_handle.dart
index 115c44d..4c798bd 100644
--- a/pkg/analyzer/lib/src/generated/element_handle.dart
+++ b/pkg/analyzer/lib/src/generated/element_handle.dart
@@ -1,4 +1,4 @@
-// Copyright (c) 2014, the Dart project authors.  Please see the AUTHORS file
+// Copyright (c) 2014, the Dart project authors. Please see the AUTHORS file
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
 
diff --git a/pkg/analyzer/lib/src/generated/element_resolver.dart b/pkg/analyzer/lib/src/generated/element_resolver.dart
index 9a99f54..1b53d3f 100644
--- a/pkg/analyzer/lib/src/generated/element_resolver.dart
+++ b/pkg/analyzer/lib/src/generated/element_resolver.dart
@@ -847,7 +847,7 @@
     // in-lining _resolveArgumentsToFunction below).
     ClassDeclaration declaration =
         node.thisOrAncestorOfType<ClassDeclaration>();
-    Identifier superclassName = declaration.extendsClause?.superclass?.name;
+    Identifier superclassName = declaration?.extendsClause?.superclass?.name;
     if (superclassName != null &&
         _resolver.nameScope.shouldIgnoreUndefined(superclassName)) {
       return;
@@ -953,10 +953,16 @@
   /**
    * Return the name of the method invoked by the given postfix [expression].
    */
-  String _getPostfixOperator(PostfixExpression expression) =>
-      (expression.operator.type == TokenType.PLUS_PLUS)
-          ? TokenType.PLUS.lexeme
-          : TokenType.MINUS.lexeme;
+  String _getPostfixOperator(PostfixExpression expression) {
+    if (expression.operator.type == TokenType.PLUS_PLUS) {
+      return TokenType.PLUS.lexeme;
+    } else if (expression.operator.type == TokenType.MINUS_MINUS) {
+      return TokenType.MINUS.lexeme;
+    } else {
+      throw new UnsupportedError(
+          'Unsupported postfix operator ${expression.operator.lexeme}');
+    }
+  }
 
   /**
    * Return the name of the method invoked by the given postfix [expression].
@@ -1877,13 +1883,8 @@
   @override
   int get offset => targetIdentifier.offset;
 
-  @Deprecated('In the next major release, type will change to `Precedence`.  '
-      'Switch to `precedence2` to prepare for this change.')
   @override
-  int get precedence => SELECTOR_PRECEDENCE;
-
-  @override
-  Precedence get precedence2 => Precedence.primary;
+  Precedence get precedence => Precedence.primary;
 
   @deprecated
   @override
diff --git a/pkg/analyzer/lib/src/generated/engine.dart b/pkg/analyzer/lib/src/generated/engine.dart
index 55671cc..cdffbef 100644
--- a/pkg/analyzer/lib/src/generated/engine.dart
+++ b/pkg/analyzer/lib/src/generated/engine.dart
@@ -2303,11 +2303,6 @@
  */
 abstract class InternalAnalysisContext implements AnalysisContext {
   /**
-   * The result provider for [aboutToComputeResult].
-   */
-  ResultProvider resultProvider;
-
-  /**
    * A table mapping the sources known to the context to the information known
    * about the source.
    */
diff --git a/pkg/analyzer/lib/src/generated/error.dart b/pkg/analyzer/lib/src/generated/error.dart
index 3d71368..fe431d2 100644
--- a/pkg/analyzer/lib/src/generated/error.dart
+++ b/pkg/analyzer/lib/src/generated/error.dart
@@ -1,4 +1,4 @@
-// Copyright (c) 2014, the Dart project authors.  Please see the AUTHORS file
+// Copyright (c) 2014, the Dart project authors. Please see the AUTHORS file
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
 
diff --git a/pkg/analyzer/lib/src/generated/error_verifier.dart b/pkg/analyzer/lib/src/generated/error_verifier.dart
index 50697a0..c372f0d 100644
--- a/pkg/analyzer/lib/src/generated/error_verifier.dart
+++ b/pkg/analyzer/lib/src/generated/error_verifier.dart
@@ -2977,7 +2977,7 @@
 
     AstNode parent = node.parent;
     Token awaitKeyword;
-    if (parent is ForStatement2) {
+    if (parent is ForStatement) {
       awaitKeyword = parent.awaitKeyword;
     } else if (parent is ForElement) {
       awaitKeyword = parent.awaitKeyword;
@@ -3871,7 +3871,7 @@
       forList: true,
       elementType: listElementType,
     );
-    for (CollectionElement element in literal.elements2) {
+    for (CollectionElement element in literal.elements) {
       verifier.verify(element);
     }
   }
@@ -3906,7 +3906,7 @@
         mapKeyType: keyType,
         mapValueType: valueType,
       );
-      for (CollectionElement element in literal.elements2) {
+      for (CollectionElement element in literal.elements) {
         verifier.verify(element);
       }
     }
@@ -5128,7 +5128,7 @@
         forSet: true,
         elementType: setElementType,
       );
-      for (CollectionElement element in literal.elements2) {
+      for (CollectionElement element in literal.elements) {
         verifier.verify(element);
       }
     }
diff --git a/pkg/analyzer/lib/src/generated/parser.dart b/pkg/analyzer/lib/src/generated/parser.dart
index cd39326..2055493 100644
--- a/pkg/analyzer/lib/src/generated/parser.dart
+++ b/pkg/analyzer/lib/src/generated/parser.dart
@@ -1,4 +1,4 @@
-// Copyright (c) 2014, the Dart project authors.  Please see the AUTHORS file
+// Copyright (c) 2014, the Dart project authors. Please see the AUTHORS file
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
 
@@ -265,6 +265,14 @@
     }
   }
 
+  /// Enables or disables parsing of the triple shift operators.
+  void set enableTripleShift(bool value) {
+    if (value) {
+      throw new UnimplementedError('triple_shift experiment'
+          ' not supported by analyzer parser');
+    }
+  }
+
   /// Return `true` if the parser is to allow URI's in part-of directives.
   @deprecated
   bool get enableUriInPartOf => true;
@@ -2962,7 +2970,7 @@
                 inKeyword: inKeyword,
                 iterable: iterator);
           }
-          return astFactory.forStatement2(
+          return astFactory.forStatement(
               forKeyword: forKeyword,
               leftParenthesis: leftParenthesis,
               forLoopParts: forLoopParts,
@@ -3002,7 +3010,7 @@
       }
       Token rightParenthesis = _expect(TokenType.CLOSE_PAREN);
       Statement body = parseStatement2();
-      return astFactory.forStatement2(
+      return astFactory.forStatement(
           forKeyword: forKeyword,
           leftParenthesis: leftParenthesis,
           forLoopParts: forLoopParts,
@@ -3679,9 +3687,11 @@
       Token modifier, TypeArgumentList typeArguments) {
     Token leftBracket = getAndAdvance();
     if (_matches(TokenType.CLOSE_CURLY_BRACKET)) {
-      // ignore: deprecated_member_use_from_same_package
-      return astFactory.mapLiteral(
-          modifier, typeArguments, leftBracket, null, getAndAdvance());
+      return astFactory.setOrMapLiteral(
+          constKeyword: modifier,
+          typeArguments: typeArguments,
+          leftBracket: leftBracket,
+          rightBracket: getAndAdvance());
     }
     bool wasInInitializer = _inInitializer;
     _inInitializer = false;
@@ -3689,16 +3699,22 @@
       List<MapLiteralEntry> entries = <MapLiteralEntry>[parseMapLiteralEntry()];
       while (_optional(TokenType.COMMA)) {
         if (_matches(TokenType.CLOSE_CURLY_BRACKET)) {
-          // ignore: deprecated_member_use_from_same_package
-          return astFactory.mapLiteral(
-              modifier, typeArguments, leftBracket, entries, getAndAdvance());
+          return astFactory.setOrMapLiteral(
+              constKeyword: modifier,
+              typeArguments: typeArguments,
+              leftBracket: leftBracket,
+              elements: entries,
+              rightBracket: getAndAdvance());
         }
         entries.add(parseMapLiteralEntry());
       }
       Token rightBracket = _expect(TokenType.CLOSE_CURLY_BRACKET);
-      // ignore: deprecated_member_use_from_same_package
-      return astFactory.mapLiteral(
-          modifier, typeArguments, leftBracket, entries, rightBracket);
+      return astFactory.setOrMapLiteral(
+          constKeyword: modifier,
+          typeArguments: typeArguments,
+          leftBracket: leftBracket,
+          elements: entries,
+          rightBracket: rightBracket);
     } finally {
       _inInitializer = wasInInitializer;
     }
@@ -4032,7 +4048,7 @@
         _tokenMatchesKeyword(_peek(), Keyword.FOR)) {
       Token awaitToken = _currentToken;
       Statement statement = parseForStatement();
-      if (!(statement is ForStatement2 && statement.forLoopParts is ForParts)) {
+      if (!(statement is ForStatement && statement.forLoopParts is ForParts)) {
         _reportErrorForToken(
             CompileTimeErrorCode.ASYNC_FOR_IN_WRONG_CONTEXT, awaitToken);
       }
diff --git a/pkg/analyzer/lib/src/generated/parser_fasta.dart b/pkg/analyzer/lib/src/generated/parser_fasta.dart
index b93eb52..d08aa89 100644
--- a/pkg/analyzer/lib/src/generated/parser_fasta.dart
+++ b/pkg/analyzer/lib/src/generated/parser_fasta.dart
@@ -1,4 +1,4 @@
-// Copyright (c) 2017, the Dart project authors.  Please see the AUTHORS file
+// Copyright (c) 2017, the Dart project authors. Please see the AUTHORS file
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
 
@@ -37,6 +37,16 @@
     astBuilder.allowNativeClause = value;
   }
 
+  @override
+  void set enableControlFlowCollections(bool value) {
+    if (IsExpired.control_flow_collections &&
+        value != IsEnabledByDefault.control_flow_collections) {
+      throw new StateError('control_flow_collections may only be set'
+          ' to ${IsEnabledByDefault.control_flow_collections}');
+    }
+    astBuilder.enableControlFlowCollections = value;
+  }
+
   /// Enables or disables non-nullable by default.
   void set enableNonNullable(bool value) {
     if (IsExpired.non_nullable && value != IsEnabledByDefault.non_nullable) {
@@ -69,13 +79,12 @@
   }
 
   @override
-  void set enableControlFlowCollections(bool value) {
-    if (IsExpired.control_flow_collections &&
-        value != IsEnabledByDefault.control_flow_collections) {
-      throw new StateError('control_flow_collections may only be set'
-          ' to ${IsEnabledByDefault.control_flow_collections}');
+  void set enableTripleShift(bool value) {
+    if (IsExpired.triple_shift && value != IsEnabledByDefault.triple_shift) {
+      throw new StateError('triple_shift may only be set'
+          ' to ${IsEnabledByDefault.triple_shift}');
     }
-    astBuilder.enableControlFlowCollections = value;
+    astBuilder.enableTripleShift = value;
   }
 
   @override
diff --git a/pkg/analyzer/lib/src/generated/resolver.dart b/pkg/analyzer/lib/src/generated/resolver.dart
index 88fce5b..a6fdb03 100644
--- a/pkg/analyzer/lib/src/generated/resolver.dart
+++ b/pkg/analyzer/lib/src/generated/resolver.dart
@@ -3622,10 +3622,6 @@
       const ResolverErrorCode('CONTINUE_LABEL_ON_SWITCH',
           "A continue label resolves to switch, must be loop or switch member");
 
-  static const ResolverErrorCode MISSING_LIBRARY_DIRECTIVE_WITH_PART =
-      const ResolverErrorCode('MISSING_LIBRARY_DIRECTIVE_WITH_PART',
-          "Libraries that have parts must have a library directive");
-
   /// Parts: It is a static warning if the referenced part declaration
   /// <i>p</i> names a library that does not have a library tag.
   ///
@@ -3862,6 +3858,17 @@
     typeAnalyzer.thisType = enclosingClass?.type;
   }
 
+  /// Set information about enclosing declarations.
+  void prepareEnclosingDeclarations({
+    ClassElement enclosingClassElement,
+    ExecutableElement enclosingExecutableElement,
+  }) {
+    _enclosingClassDeclaration = null;
+    enclosingClass = enclosingClassElement;
+    typeAnalyzer.thisType = enclosingClass?.type;
+    _enclosingFunction = enclosingExecutableElement;
+  }
+
   /// Visit the given [comment] if it is not `null`.
   void safelyVisitComment(Comment comment) {
     if (comment != null) {
@@ -4377,7 +4384,7 @@
   }
 
   @override
-  void visitForStatement2InScope(ForStatement2 node) {
+  void visitForStatementInScope(ForStatement node) {
     ForLoopParts forLoopParts = node.forLoopParts;
     if (forLoopParts is ForParts) {
       if (forLoopParts is ForPartsWithDeclarations) {
@@ -4623,7 +4630,7 @@
       DartType elementType = listType.typeArguments[0];
       DartType iterableType =
           typeProvider.iterableType.instantiate([elementType]);
-      _pushCollectionTypesDownToAll(node.elements2,
+      _pushCollectionTypesDownToAll(node.elements,
           elementType: elementType, iterableType: iterableType);
       InferenceContext.setType(node, listType);
     } else {
@@ -4633,7 +4640,6 @@
   }
 
   @override
-  @override
   void visitMethodDeclaration(MethodDeclaration node) {
     ExecutableElement outerFunction = _enclosingFunction;
     FunctionBody outerFunctionBody = _currentFunctionBody;
@@ -4798,31 +4804,20 @@
         DartType elementType = literalType.typeArguments[0];
         DartType iterableType =
             typeProvider.iterableType.instantiate([elementType]);
-        _pushCollectionTypesDownToAll(node.elements2,
+        _pushCollectionTypesDownToAll(node.elements,
             elementType: elementType, iterableType: iterableType);
         if (!_analysisOptions.experimentStatus.spread_collections &&
             !_analysisOptions.experimentStatus.control_flow_collections &&
-            node.elements2.isEmpty &&
+            node.elements.isEmpty &&
             node.typeArguments == null &&
             node.isMap) {
           // The node is really an empty set literal with no type arguments.
-          // Rewrite the AST.
-          // ignore: deprecated_member_use_from_same_package
-          SetOrMapLiteral setLiteral = new AstFactoryImpl().setLiteral(
-              node.constKeyword,
-              null,
-              node.leftBracket,
-              null,
-              node.rightBracket);
-          InferenceContext.setType(
-              setLiteral, InferenceContext.getContext(node));
-          NodeReplacer.replace(node, setLiteral);
-          node = setLiteral;
+          (node as SetOrMapLiteralImpl).becomeMap();
         }
       } else if (typeArguments.length == 2) {
         DartType keyType = typeArguments[0];
         DartType valueType = typeArguments[1];
-        _pushCollectionTypesDownToAll(node.elements2,
+        _pushCollectionTypesDownToAll(node.elements,
             iterableType: literalType, keyType: keyType, valueType: valueType);
       }
       (node as SetOrMapLiteralImpl).contextType = literalType;
@@ -4954,7 +4949,13 @@
         InterfaceType wrapperType = _enclosingFunction.isSynchronous
             ? typeProvider.iterableType
             : typeProvider.streamType;
-        type = typeSystem.mostSpecificTypeArgument(type, wrapperType);
+        if (type is InterfaceType) {
+          var asInstanceType =
+              (type as InterfaceTypeImpl).asInstanceOf(wrapperType.element);
+          if (asInstanceType != null) {
+            type = asInstanceType.typeArguments[0];
+          }
+        }
       }
       if (type != null) {
         inferenceContext.addReturnOrYieldType(type);
@@ -5029,7 +5030,7 @@
         _fromTypeArguments(literal.typeArguments);
     DartType contextType = InferenceContext.getContext(literal);
     _LiteralResolution contextResolution = _fromContextType(contextType);
-    _LeafElements elementCounts = new _LeafElements(literal.elements2);
+    _LeafElements elementCounts = new _LeafElements(literal.elements);
     _LiteralResolution elementResolution = elementCounts.resolution;
 
     List<_LiteralResolution> unambiguousResolutions = [];
@@ -5070,7 +5071,7 @@
           : unambiguousResolutions[0];
     } else if (unambiguousResolutions.length == 1) {
       return unambiguousResolutions[0];
-    } else if (literal.elements2.isEmpty) {
+    } else if (literal.elements.isEmpty) {
       return _LiteralResolution(
           _LiteralResolutionKind.map,
           typeProvider.mapType.instantiate(
@@ -5835,13 +5836,13 @@
   }
 
   @override
-  void visitForStatement2(ForStatement2 node) {
+  void visitForStatement(ForStatement node) {
     Scope outerNameScope = nameScope;
     ImplicitLabelScope outerImplicitScope = _implicitLabelScope;
     try {
       nameScope = new EnclosedScope(nameScope);
       _implicitLabelScope = _implicitLabelScope.nest(node);
-      visitForStatement2InScope(node);
+      visitForStatementInScope(node);
     } finally {
       nameScope = outerNameScope;
       _implicitLabelScope = outerImplicitScope;
@@ -5851,7 +5852,7 @@
   /// Visit the given [node] after it's scope has been created. This replaces
   /// the normal call to the inherited visit method so that ResolverVisitor can
   /// intervene when type propagation is enabled.
-  void visitForStatement2InScope(ForStatement2 node) {
+  void visitForStatementInScope(ForStatement node) {
     // TODO(brianwilkerson) Investigate the possibility of removing the
     //  visit...InScope methods now that type propagation is no longer done.
     node.forLoopParts?.accept(this);
@@ -8545,8 +8546,9 @@
   /// created based on [definingLibrary] and [typeProvider].
   VariableResolverVisitor(LibraryElement definingLibrary, Source source,
       TypeProvider typeProvider, AnalysisErrorListener errorListener,
-      {Scope nameScope})
-      : super(definingLibrary, source, typeProvider, errorListener,
+      {Scope nameScope, LocalVariableInfo localVariableInfo})
+      : _localVariableInfo = localVariableInfo,
+        super(definingLibrary, source, typeProvider, errorListener,
             nameScope: nameScope);
 
   @override
diff --git a/pkg/analyzer/lib/src/generated/scanner.dart b/pkg/analyzer/lib/src/generated/scanner.dart
index 3b21b2f..e1d6904 100644
--- a/pkg/analyzer/lib/src/generated/scanner.dart
+++ b/pkg/analyzer/lib/src/generated/scanner.dart
@@ -1,4 +1,4 @@
-// Copyright (c) 2014, the Dart project authors.  Please see the AUTHORS file
+// Copyright (c) 2014, the Dart project authors. Please see the AUTHORS file
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
 
diff --git a/pkg/analyzer/lib/src/generated/sdk_io.dart b/pkg/analyzer/lib/src/generated/sdk_io.dart
index cbdb6fe..9f8c00a 100644
--- a/pkg/analyzer/lib/src/generated/sdk_io.dart
+++ b/pkg/analyzer/lib/src/generated/sdk_io.dart
@@ -1,4 +1,4 @@
-// Copyright (c) 2014, the Dart project authors.  Please see the AUTHORS file
+// Copyright (c) 2014, the Dart project authors. Please see the AUTHORS file
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
 
diff --git a/pkg/analyzer/lib/src/generated/source.dart b/pkg/analyzer/lib/src/generated/source.dart
index f2d604f..1152e24 100644
--- a/pkg/analyzer/lib/src/generated/source.dart
+++ b/pkg/analyzer/lib/src/generated/source.dart
@@ -1,4 +1,4 @@
-// Copyright (c) 2014, the Dart project authors.  Please see the AUTHORS file
+// Copyright (c) 2014, the Dart project authors. Please see the AUTHORS file
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
 
diff --git a/pkg/analyzer/lib/src/generated/static_type_analyzer.dart b/pkg/analyzer/lib/src/generated/static_type_analyzer.dart
index 377affe..f3b066e 100644
--- a/pkg/analyzer/lib/src/generated/static_type_analyzer.dart
+++ b/pkg/analyzer/lib/src/generated/static_type_analyzer.dart
@@ -161,7 +161,7 @@
       parameters = [];
     } else {
       // Also use upwards information to infer the type.
-      elementTypes = node.elements2
+      elementTypes = node.elements
           .map((element) => _computeElementType(element))
           .where((t) => t != null)
           .toList();
@@ -1467,7 +1467,7 @@
       Expression iterable;
       if (parent is ForEachPartsWithDeclaration) {
         AstNode parentParent = parent.parent;
-        if (parentParent is ForStatement2Impl) {
+        if (parentParent is ForStatementImpl) {
           awaitKeyword = parentParent.awaitKeyword;
         } else if (parentParent is ForElement) {
           awaitKeyword = parentParent.awaitKeyword;
@@ -1780,7 +1780,7 @@
     var literalImpl = literal as SetOrMapLiteralImpl;
     DartType contextType = literalImpl.contextType;
     literalImpl.contextType = null; // Not needed anymore.
-    NodeList<CollectionElement> elements = literal.elements2;
+    NodeList<CollectionElement> elements = literal.elements;
     List<_InferredCollectionElementTypeInformation> inferredTypes = [];
     bool canBeAMap = true;
     bool mustBeAMap = false;
diff --git a/pkg/analyzer/lib/src/generated/testing/ast_test_factory.dart b/pkg/analyzer/lib/src/generated/testing/ast_test_factory.dart
index a2e6994..c62b040 100644
--- a/pkg/analyzer/lib/src/generated/testing/ast_test_factory.dart
+++ b/pkg/analyzer/lib/src/generated/testing/ast_test_factory.dart
@@ -494,29 +494,29 @@
   static FieldFormalParameter fieldFormalParameter2(String identifier) =>
       fieldFormalParameter(null, null, identifier);
 
-  @Deprecated('Use forStatement2')
-  static ForStatement2 forEachStatement(DeclaredIdentifier loopVariable,
-          Expression iterator, Statement body) =>
-      astFactory.forStatement2(
-          forKeyword: TokenFactory.tokenFromKeyword(Keyword.FOR),
-          leftParenthesis: TokenFactory.tokenFromType(TokenType.OPEN_PAREN),
-          forLoopParts: astFactory.forEachPartsWithDeclaration(
-              loopVariable: loopVariable,
-              inKeyword: TokenFactory.tokenFromKeyword(Keyword.IN),
-              iterable: iterator),
-          rightParenthesis: TokenFactory.tokenFromType(TokenType.CLOSE_PAREN),
-          body: body);
+  static ForEachPartsWithDeclaration forEachPartsWithDeclaration(
+          DeclaredIdentifier loopVariable, Expression iterable) =>
+      astFactory.forEachPartsWithDeclaration(
+          loopVariable: loopVariable,
+          inKeyword: TokenFactory.tokenFromKeyword(Keyword.IN),
+          iterable: iterable);
 
-  @Deprecated('Use forStatement2')
-  static ForStatement2 forEachStatement2(
-          SimpleIdentifier identifier, Expression iterator, Statement body) =>
-      astFactory.forStatement2(
+  static ForEachPartsWithIdentifier forEachPartsWithIdentifier(
+          SimpleIdentifier identifier, Expression iterable) =>
+      astFactory.forEachPartsWithIdentifier(
+          identifier: identifier,
+          inKeyword: TokenFactory.tokenFromKeyword(Keyword.IN),
+          iterable: iterable);
+
+  static ForElement forElement(
+          ForLoopParts forLoopParts, CollectionElement body,
+          {bool hasAwait: false}) =>
+      astFactory.forElement(
+          awaitKeyword:
+              hasAwait ? TokenFactory.tokenFromKeyword(Keyword.AWAIT) : null,
           forKeyword: TokenFactory.tokenFromKeyword(Keyword.FOR),
           leftParenthesis: TokenFactory.tokenFromType(TokenType.OPEN_PAREN),
-          forLoopParts: astFactory.forEachPartsWithIdentifier(
-              identifier: identifier,
-              inKeyword: TokenFactory.tokenFromKeyword(Keyword.IN),
-              iterable: iterator),
+          forLoopParts: forLoopParts,
           rightParenthesis: TokenFactory.tokenFromType(TokenType.CLOSE_PAREN),
           body: body);
 
@@ -529,32 +529,33 @@
           null,
           TokenFactory.tokenFromType(TokenType.CLOSE_PAREN));
 
-  @Deprecated('Use forStatement2')
-  static ForStatement2 forStatement(Expression initialization,
-          Expression condition, List<Expression> updaters, Statement body) =>
-      astFactory.forStatement2(
-          forKeyword: TokenFactory.tokenFromKeyword(Keyword.FOR),
-          leftParenthesis: TokenFactory.tokenFromType(TokenType.OPEN_PAREN),
-          forLoopParts: astFactory.forPartsWithExpression(
-              initialization: initialization,
-              leftSeparator: TokenFactory.tokenFromType(TokenType.SEMICOLON),
-              condition: condition,
-              rightSeparator: TokenFactory.tokenFromType(TokenType.SEMICOLON),
-              updaters: updaters),
-          rightParenthesis: TokenFactory.tokenFromType(TokenType.CLOSE_PAREN),
-          body: body);
+  static ForPartsWithDeclarations forPartsWithDeclarations(
+          VariableDeclarationList variables,
+          Expression condition,
+          List<Expression> updaters) =>
+      astFactory.forPartsWithDeclarations(
+          variables: variables,
+          leftSeparator: TokenFactory.tokenFromType(TokenType.SEMICOLON),
+          condition: condition,
+          rightSeparator: TokenFactory.tokenFromType(TokenType.SEMICOLON),
+          updaters: updaters);
 
-  static ForStatement2 forStatement2(VariableDeclarationList variableList,
-          Expression condition, List<Expression> updaters, Statement body) =>
-      astFactory.forStatement2(
+  static ForPartsWithExpression forPartsWithExpression(
+          Expression initialization,
+          Expression condition,
+          List<Expression> updaters) =>
+      astFactory.forPartsWithExpression(
+          initialization: initialization,
+          leftSeparator: TokenFactory.tokenFromType(TokenType.SEMICOLON),
+          condition: condition,
+          rightSeparator: TokenFactory.tokenFromType(TokenType.SEMICOLON),
+          updaters: updaters);
+
+  static ForStatement forStatement(ForLoopParts forLoopParts, Statement body) =>
+      astFactory.forStatement(
           forKeyword: TokenFactory.tokenFromKeyword(Keyword.FOR),
           leftParenthesis: TokenFactory.tokenFromType(TokenType.OPEN_PAREN),
-          forLoopParts: astFactory.forPartsWithDeclarations(
-              variables: variableList,
-              leftSeparator: TokenFactory.tokenFromType(TokenType.SEMICOLON),
-              condition: condition,
-              rightSeparator: TokenFactory.tokenFromType(TokenType.SEMICOLON),
-              updaters: updaters),
+          forLoopParts: forLoopParts,
           rightParenthesis: TokenFactory.tokenFromType(TokenType.CLOSE_PAREN),
           body: body);
 
@@ -839,21 +840,6 @@
           elements,
           TokenFactory.tokenFromType(TokenType.CLOSE_SQUARE_BRACKET));
 
-  @Deprecated('Use setOrMapLiteral')
-  static SetOrMapLiteral mapLiteral(
-          Keyword keyword, TypeArgumentList typeArguments,
-          [List<MapLiteralEntry> entries]) =>
-      astFactory.mapLiteral(
-          keyword == null ? null : TokenFactory.tokenFromKeyword(keyword),
-          typeArguments,
-          TokenFactory.tokenFromType(TokenType.OPEN_CURLY_BRACKET),
-          entries,
-          TokenFactory.tokenFromType(TokenType.CLOSE_CURLY_BRACKET));
-
-  @Deprecated('Use setOrMapLiteral')
-  static SetOrMapLiteral mapLiteral2([List<MapLiteralEntry> entries]) =>
-      mapLiteral(null, null, entries);
-
   static MapLiteralEntry mapLiteralEntry(String key, Expression value) =>
       astFactory.mapLiteralEntry(
           string2(key), TokenFactory.tokenFromType(TokenType.COLON), value);
@@ -1093,16 +1079,6 @@
   static ScriptTag scriptTag(String scriptTag) =>
       astFactory.scriptTag(TokenFactory.tokenFromString(scriptTag));
 
-  @Deprecated('Use setOrMapLiteral')
-  static SetOrMapLiteral setLiteral(Keyword keyword,
-          TypeArgumentList typeArguments, List<Expression> elements) =>
-      astFactory.setLiteral(
-          keyword == null ? null : TokenFactory.tokenFromKeyword(keyword),
-          typeArguments,
-          TokenFactory.tokenFromType(TokenType.OPEN_CURLY_BRACKET),
-          elements,
-          TokenFactory.tokenFromType(TokenType.CLOSE_CURLY_BRACKET));
-
   static SetOrMapLiteral setOrMapLiteral(
           Keyword keyword, TypeArgumentList typeArguments,
           [List<CollectionElement> elements]) =>
diff --git a/pkg/analyzer/lib/src/generated/timestamped_data.dart b/pkg/analyzer/lib/src/generated/timestamped_data.dart
index 18e6323..7084cbd 100644
--- a/pkg/analyzer/lib/src/generated/timestamped_data.dart
+++ b/pkg/analyzer/lib/src/generated/timestamped_data.dart
@@ -1,4 +1,4 @@
-// Copyright (c) 2017, the Dart project authors.  Please see the AUTHORS file
+// Copyright (c) 2017, the Dart project authors. Please see the AUTHORS file
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
 
diff --git a/pkg/analyzer/lib/src/generated/type_system.dart b/pkg/analyzer/lib/src/generated/type_system.dart
index 6e978a6..969cac5 100644
--- a/pkg/analyzer/lib/src/generated/type_system.dart
+++ b/pkg/analyzer/lib/src/generated/type_system.dart
@@ -1918,41 +1918,25 @@
    * Searches the superinterfaces of [type] for implementations of [genericType]
    * and returns the most specific type argument used for that generic type.
    *
+   * For a more general/robust solution, use [InterfaceTypeImpl.asInstanceOf].
+   *
    * For example, given [type] `List<int>` and [genericType] `Iterable<T>`,
    * returns [int].
    *
    * Returns `null` if [type] does not implement [genericType].
    */
-  // TODO(jmesserly): this is very similar to code used for flattening futures.
-  // The only difference is, because of a lack of TypeProvider, the other method
-  // has to match the Future type by its name and library. Here was are passed
-  // in the correct type.
   DartType mostSpecificTypeArgument(DartType type, DartType genericType) {
     if (type is! InterfaceType) return null;
+    if (genericType is! InterfaceType) return null;
 
-    // Walk the superinterface hierarchy looking for [genericType].
-    List<DartType> candidates = <DartType>[];
-    HashSet<ClassElement> visitedClasses = new HashSet<ClassElement>();
-    void recurse(InterfaceType interface) {
-      if (interface.element == genericType.element &&
-          interface.typeArguments.isNotEmpty) {
-        candidates.add(interface.typeArguments[0]);
-      }
-      if (visitedClasses.add(interface.element)) {
-        if (interface.superclass != null) {
-          recurse(interface.superclass);
-        }
-        interface.mixins.forEach(recurse);
-        interface.interfaces.forEach(recurse);
-        visitedClasses.remove(interface.element);
-      }
+    var asInstanceOf = (type as InterfaceTypeImpl)
+        .asInstanceOf((genericType as InterfaceType).element);
+
+    if (asInstanceOf != null) {
+      return asInstanceOf.typeArguments[0];
     }
 
-    recurse(type);
-
-    // Since the interface may be implemented multiple times with different
-    // type arguments, choose the best one.
-    return InterfaceTypeImpl.findMostSpecificType(candidates, this);
+    return null;
   }
 
   /**
diff --git a/pkg/analyzer/lib/src/generated/utilities_general.dart b/pkg/analyzer/lib/src/generated/utilities_general.dart
index 9722bc8..fab29a6 100644
--- a/pkg/analyzer/lib/src/generated/utilities_general.dart
+++ b/pkg/analyzer/lib/src/generated/utilities_general.dart
@@ -1,4 +1,4 @@
-// Copyright (c) 2014, the Dart project authors.  Please see the AUTHORS file
+// Copyright (c) 2014, the Dart project authors. Please see the AUTHORS file
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
 
diff --git a/pkg/analyzer/lib/src/generated/visitors.dart b/pkg/analyzer/lib/src/generated/visitors.dart
index 457d7f8..62cb61a 100644
--- a/pkg/analyzer/lib/src/generated/visitors.dart
+++ b/pkg/analyzer/lib/src/generated/visitors.dart
@@ -1,4 +1,4 @@
-// Copyright (c) 2015, the Dart project authors.  Please see the AUTHORS file
+// Copyright (c) 2015, the Dart project authors. Please see the AUTHORS file
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
 
diff --git a/pkg/analyzer/lib/src/hint/sdk_constraint_verifier.dart b/pkg/analyzer/lib/src/hint/sdk_constraint_verifier.dart
index cc2231a..1087abd 100644
--- a/pkg/analyzer/lib/src/hint/sdk_constraint_verifier.dart
+++ b/pkg/analyzer/lib/src/hint/sdk_constraint_verifier.dart
@@ -3,9 +3,12 @@
 // BSD-style license that can be found in the LICENSE file.
 
 import 'package:analyzer/dart/ast/ast.dart';
+import 'package:analyzer/dart/ast/token.dart';
 import 'package:analyzer/dart/ast/visitor.dart';
 import 'package:analyzer/dart/element/element.dart';
+import 'package:analyzer/dart/element/type.dart';
 import 'package:analyzer/error/listener.dart';
+import 'package:analyzer/src/dart/ast/ast.dart';
 import 'package:analyzer/src/dart/resolver/scope.dart';
 import 'package:analyzer/src/error/codes.dart';
 import 'package:analyzer/src/generated/resolver.dart';
@@ -26,10 +29,32 @@
   /// The version constraint for the SDK.
   final VersionConstraint _versionConstraint;
 
+  /// A cached flag indicating whether references to the constant-update-2018
+  /// features need to be checked. Use [checkConstantUpdate2018] to access this
+  /// field.
+  bool _checkConstantUpdate2018;
+
   /// A cached flag indicating whether references to Future and Stream need to
-  /// be checked. Use [] to access this field.
+  /// be checked. Use [checkFutureAndStream] to access this field.
   bool _checkFutureAndStream;
 
+  /// A cached flag indicating whether references to set literals need to
+  /// be checked. Use [checkSetLiterals] to access this field.
+  bool _checkSetLiterals;
+
+  /// A flag indicating whether we are visiting code inside a set literal. Used
+  /// to prevent over-reporting uses of set literals.
+  bool _inSetLiteral = false;
+
+  /// A cached flag indicating whether references to the ui-as-code features
+  /// need to be checked. Use [checkUiAsCode] to access this field.
+  bool _checkUiAsCode;
+
+  /// A flag indicating whether we are visiting code inside one of the
+  /// ui-as-code features. Used to prevent over-reporting uses of these
+  /// features.
+  bool _inUiAsCode = false;
+
   /// Initialize a newly created verifier to use the given [_errorReporter] to
   /// report errors.
   SdkConstraintVerifier(this._errorReporter, this._containingLibrary,
@@ -39,16 +64,132 @@
   VersionRange get before_2_1_0 =>
       new VersionRange(max: Version.parse('2.1.0'), includeMax: false);
 
+  /// Return a range covering every version up to, but not including, 2.2.0.
+  VersionRange get before_2_2_0 =>
+      new VersionRange(max: Version.parse('2.2.0'), includeMax: false);
+
+  /// Return a range covering every version up to, but not including, 2.2.2.
+  VersionRange get before_2_2_2 =>
+      new VersionRange(max: Version.parse('2.2.2'), includeMax: false);
+
+  /// Return `true` if references to the constant-update-2018 features need to
+  /// be checked.
+  bool get checkConstantUpdate2018 => _checkConstantUpdate2018 ??=
+      !before_2_2_2.intersect(_versionConstraint).isEmpty;
+
   /// Return `true` if references to Future and Stream need to be checked.
   bool get checkFutureAndStream => _checkFutureAndStream ??=
       !before_2_1_0.intersect(_versionConstraint).isEmpty;
 
+  /// Return `true` if references to set literals need to be checked.
+  bool get checkSetLiterals =>
+      _checkSetLiterals ??= !before_2_2_0.intersect(_versionConstraint).isEmpty;
+
+  /// Return `true` if references to the ui-as-code features (control flow and
+  /// spread collections) need to be checked.
+  bool get checkUiAsCode =>
+      _checkUiAsCode ??= !before_2_2_2.intersect(_versionConstraint).isEmpty;
+
+  @override
+  void visitAsExpression(AsExpression node) {
+    if (checkConstantUpdate2018 &&
+        (node as AsExpressionImpl).inConstantContext) {
+      _errorReporter.reportErrorForNode(
+          HintCode.SDK_VERSION_AS_EXPRESSION_IN_CONST_CONTEXT, node);
+    }
+    super.visitAsExpression(node);
+  }
+
+  @override
+  void visitBinaryExpression(BinaryExpression node) {
+    if (checkConstantUpdate2018) {
+      TokenType operatorType = node.operator.type;
+      if (operatorType == TokenType.GT_GT_GT) {
+        _errorReporter.reportErrorForToken(
+            HintCode.SDK_VERSION_GT_GT_GT_OPERATOR, node.operator);
+      } else if ((operatorType == TokenType.AMPERSAND ||
+              operatorType == TokenType.BAR ||
+              operatorType == TokenType.CARET) &&
+          (node as BinaryExpressionImpl).inConstantContext) {
+        if (node.leftOperand.staticType.isDartCoreBool) {
+          _errorReporter.reportErrorForToken(HintCode.SDK_VERSION_BOOL_OPERATOR,
+              node.operator, [node.operator.lexeme]);
+        }
+      } else if (operatorType == TokenType.EQ_EQ &&
+          (node as BinaryExpressionImpl).inConstantContext) {
+        bool primitive(Expression node) {
+          DartType type = node.staticType;
+          return type.isDartCoreBool ||
+              type.isDartCoreDouble ||
+              type.isDartCoreInt ||
+              type.isDartCoreNull ||
+              type.isDartCoreString;
+        }
+
+        if (!primitive(node.leftOperand) || !primitive(node.rightOperand)) {
+          _errorReporter.reportErrorForToken(
+              HintCode.SDK_VERSION_EQ_EQ_OPERATOR_IN_CONST_CONTEXT,
+              node.operator);
+        }
+      }
+    }
+    super.visitBinaryExpression(node);
+  }
+
+  @override
+  void visitForElement(ForElement node) {
+    _validateUiAsCode(node);
+    bool wasInUiAsCode = _inUiAsCode;
+    _inUiAsCode = true;
+    super.visitForElement(node);
+    _inUiAsCode = wasInUiAsCode;
+  }
+
   @override
   void visitHideCombinator(HideCombinator node) {
     // Don't flag references to either `Future` or `Stream` within a combinator.
   }
 
   @override
+  void visitIfElement(IfElement node) {
+    _validateUiAsCode(node);
+    bool wasInUiAsCode = _inUiAsCode;
+    _inUiAsCode = true;
+    super.visitIfElement(node);
+    _inUiAsCode = wasInUiAsCode;
+  }
+
+  @override
+  void visitIsExpression(IsExpression node) {
+    if (checkConstantUpdate2018 &&
+        (node as IsExpressionImpl).inConstantContext) {
+      _errorReporter.reportErrorForNode(
+          HintCode.SDK_VERSION_IS_EXPRESSION_IN_CONST_CONTEXT, node);
+    }
+    super.visitIsExpression(node);
+  }
+
+  @override
+  void visitMethodDeclaration(MethodDeclaration node) {
+    if (checkConstantUpdate2018 && node.isOperator && node.name.name == '>>>') {
+      _errorReporter.reportErrorForNode(
+          HintCode.SDK_VERSION_GT_GT_GT_OPERATOR, node.name);
+    }
+    super.visitMethodDeclaration(node);
+  }
+
+  @override
+  void visitSetOrMapLiteral(SetOrMapLiteral node) {
+    if (node.isSet && checkSetLiterals && !_inSetLiteral) {
+      _errorReporter.reportErrorForNode(HintCode.SDK_VERSION_SET_LITERAL, node);
+    }
+    bool wasInSetLiteral = _inSetLiteral;
+    _inSetLiteral = true;
+    super.visitSetOrMapLiteral(node);
+    _inSetLiteral = wasInSetLiteral;
+  }
+
+  @override
   void visitShowCombinator(ShowCombinator node) {
     // Don't flag references to either `Future` or `Stream` within a combinator.
   }
@@ -75,4 +216,22 @@
           HintCode.SDK_VERSION_ASYNC_EXPORTED_FROM_CORE, node, [element.name]);
     }
   }
+
+  @override
+  void visitSpreadElement(SpreadElement node) {
+    _validateUiAsCode(node);
+    bool wasInUiAsCode = _inUiAsCode;
+    _inUiAsCode = true;
+    super.visitSpreadElement(node);
+    _inUiAsCode = wasInUiAsCode;
+  }
+
+  /// Given that the [node] is only valid when the ui-as-code feature is
+  /// enabled, check that the code will not be executed with a version of the
+  /// SDK that does not support the feature.
+  void _validateUiAsCode(AstNode node) {
+    if (checkUiAsCode && !_inUiAsCode) {
+      _errorReporter.reportErrorForNode(HintCode.SDK_VERSION_UI_AS_CODE, node);
+    }
+  }
 }
diff --git a/pkg/analyzer/lib/src/html/error/html_codes.dart b/pkg/analyzer/lib/src/html/error/html_codes.dart
deleted file mode 100644
index 59a67b4..0000000
--- a/pkg/analyzer/lib/src/html/error/html_codes.dart
+++ /dev/null
@@ -1,80 +0,0 @@
-// Copyright (c) 2014, the Dart project authors. Please see the AUTHORS file
-// for details. All rights reserved. Use of this source code is governed by a
-// BSD-style license that can be found in the LICENSE file.
-
-import 'package:analyzer/error/error.dart';
-
-/**
- * The error codes used for errors in HTML files. The convention for this
- * class is for the name of the error code to indicate the problem that caused
- * the error to be generated and for the error message to explain what is wrong
- * and, when appropriate, how the problem can be corrected.
- */
-class HtmlErrorCode extends ErrorCode {
-  /**
-   * An error code indicating that there is a syntactic error in the file.
-   *
-   * Parameters:
-   * 0: the error message from the parse error
-   */
-  static const HtmlErrorCode PARSE_ERROR =
-      const HtmlErrorCode('PARSE_ERROR', '{0}');
-
-  /**
-   * Initialize a newly created error code to have the given [name]. The message
-   * associated with the error will be created from the given [message]
-   * template. The correction associated with the error will be created from the
-   * given [correction] template.
-   */
-  const HtmlErrorCode(String name, String message, {String correction})
-      : super.temporary(name, message, correction: correction);
-
-  @override
-  ErrorSeverity get errorSeverity => ErrorSeverity.ERROR;
-
-  @override
-  ErrorType get type => ErrorType.COMPILE_TIME_ERROR;
-}
-
-/**
- * The error codes used for warnings in HTML files. The convention for this
- * class is for the name of the error code to indicate the problem that caused
- * the error to be generated and for the error message to explain what is wrong
- * and, when appropriate, how the problem can be corrected.
- */
-class HtmlWarningCode extends ErrorCode {
-  /**
-   * An error code indicating that the value of the 'src' attribute of a Dart
-   * script tag is not a valid URI.
-   *
-   * Parameters:
-   * 0: the URI that is invalid
-   */
-  static const HtmlWarningCode INVALID_URI =
-      const HtmlWarningCode('INVALID_URI', "Invalid URI syntax: '{0}'.");
-
-  /**
-   * An error code indicating that the value of the 'src' attribute of a Dart
-   * script tag references a file that does not exist.
-   *
-   * Parameters:
-   * 0: the URI pointing to a non-existent file
-   */
-  static const HtmlWarningCode URI_DOES_NOT_EXIST = const HtmlWarningCode(
-      'URI_DOES_NOT_EXIST', "Target of URI doesn't exist: '{0}'.");
-
-  /**
-   * Initialize a newly created error code to have the given [name]. The message
-   * associated with the error will be created from the given [message]
-   * template. The correction associated with the error will be created from the
-   * given [correction] template.
-   */
-  const HtmlWarningCode(String name, String message, {String correction})
-      : super.temporary(name, message, correction: correction);
-
-  @override
-  ErrorSeverity get errorSeverity => ErrorSeverity.WARNING;
-
-  @override
-  ErrorType get type => ErrorType.STATIC_WARNING;
-}
diff --git a/pkg/analyzer/lib/src/lint/config.dart b/pkg/analyzer/lib/src/lint/config.dart
index 6f5268d..1645b5a 100644
--- a/pkg/analyzer/lib/src/lint/config.dart
+++ b/pkg/analyzer/lib/src/lint/config.dart
@@ -1,4 +1,4 @@
-// Copyright (c) 2015, the Dart project authors.  Please see the AUTHORS file
+// Copyright (c) 2015, the Dart project authors. Please see the AUTHORS file
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
 
diff --git a/pkg/analyzer/lib/src/lint/io.dart b/pkg/analyzer/lib/src/lint/io.dart
index 3e84c4d..bd3e4a0 100644
--- a/pkg/analyzer/lib/src/lint/io.dart
+++ b/pkg/analyzer/lib/src/lint/io.dart
@@ -1,4 +1,4 @@
-// Copyright (c) 2015, the Dart project authors.  Please see the AUTHORS file
+// Copyright (c) 2015, the Dart project authors. Please see the AUTHORS file
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
 
diff --git a/pkg/analyzer/lib/src/lint/linter_visitor.dart b/pkg/analyzer/lib/src/lint/linter_visitor.dart
index 6663be8..79fff64 100644
--- a/pkg/analyzer/lib/src/lint/linter_visitor.dart
+++ b/pkg/analyzer/lib/src/lint/linter_visitor.dart
@@ -1,4 +1,4 @@
-// Copyright (c) 2018, the Dart project authors.  Please see the AUTHORS file
+// Copyright (c) 2018, the Dart project authors. Please see the AUTHORS file
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
 
@@ -265,13 +265,6 @@
   }
 
   @override
-  @deprecated
-  void visitForEachStatement(ForEachStatement node) {
-    _runSubscriptions(node, registry._forForEachStatement);
-    super.visitForEachStatement(node);
-  }
-
-  @override
   void visitForElement(ForElement node) {
     _runSubscriptions(node, registry._forForElement);
     super.visitForElement(node);
@@ -296,19 +289,12 @@
   }
 
   @override
-  @deprecated
   void visitForStatement(ForStatement node) {
     _runSubscriptions(node, registry._forForStatement);
     super.visitForStatement(node);
   }
 
   @override
-  void visitForStatement2(ForStatement2 node) {
-    _runSubscriptions(node, registry._forForStatement2);
-    super.visitForStatement2(node);
-  }
-
-  @override
   void visitFunctionDeclaration(FunctionDeclaration node) {
     _runSubscriptions(node, registry._forFunctionDeclaration);
     super.visitFunctionDeclaration(node);
@@ -453,13 +439,6 @@
   }
 
   @override
-  @deprecated
-  void visitMapLiteral(MapLiteral node) {
-    _runSubscriptions(node, registry._forMapLiteral);
-    super.visitMapLiteral(node);
-  }
-
-  @override
   void visitMapLiteralEntry(MapLiteralEntry node) {
     _runSubscriptions(node, registry._forMapLiteralEntry);
     super.visitMapLiteralEntry(node);
@@ -792,17 +771,13 @@
       _forForEachPartsWithDeclaration = [];
   final List<_Subscription<ForEachPartsWithIdentifier>>
       _forForEachPartsWithIdentifier = [];
-  @Deprecated('Use _forForStatement2')
-  final List<_Subscription<ForEachStatement>> _forForEachStatement = [];
   final List<_Subscription<ForElement>> _forForElement = [];
   final List<_Subscription<FormalParameterList>> _forFormalParameterList = [];
   final List<_Subscription<ForPartsWithDeclarations>>
       _forForPartsWithDeclarations = [];
   final List<_Subscription<ForPartsWithExpression>> _forForPartsWithExpression =
       [];
-  @Deprecated('Use _forForStatement2')
   final List<_Subscription<ForStatement>> _forForStatement = [];
-  final List<_Subscription<ForStatement2>> _forForStatement2 = [];
   final List<_Subscription<FunctionDeclaration>> _forFunctionDeclaration = [];
   final List<_Subscription<FunctionDeclarationStatement>>
       _forFunctionDeclarationStatement = [];
@@ -832,8 +807,6 @@
   final List<_Subscription<LibraryDirective>> _forLibraryDirective = [];
   final List<_Subscription<LibraryIdentifier>> _forLibraryIdentifier = [];
   final List<_Subscription<ListLiteral>> _forListLiteral = [];
-  @Deprecated('Use _forSetOrMapLiteral')
-  final List<_Subscription<MapLiteral>> _forMapLiteral = [];
   final List<_Subscription<MapLiteralEntry>> _forMapLiteralEntry = [];
   final List<_Subscription<MethodDeclaration>> _forMethodDeclaration = [];
   final List<_Subscription<MethodInvocation>> _forMethodInvocation = [];
@@ -1086,12 +1059,6 @@
         .add(new _Subscription(linter, visitor, _getTimer(linter)));
   }
 
-  @Deprecated('Use addForStatement2')
-  void addForEachStatement(LintRule linter, AstVisitor visitor) {
-    _forForEachStatement
-        .add(new _Subscription(linter, visitor, _getTimer(linter)));
-  }
-
   void addForElement(LintRule linter, AstVisitor visitor) {
     _forForElement.add(new _Subscription(linter, visitor, _getTimer(linter)));
   }
@@ -1111,14 +1078,13 @@
         .add(new _Subscription(linter, visitor, _getTimer(linter)));
   }
 
-  @Deprecated('Use addForStatement2')
   void addForStatement(LintRule linter, AstVisitor visitor) {
     _forForStatement.add(new _Subscription(linter, visitor, _getTimer(linter)));
   }
 
+  @Deprecated('Replaced by addForStatement')
   void addForStatement2(LintRule linter, AstVisitor visitor) {
-    _forForStatement2
-        .add(new _Subscription(linter, visitor, _getTimer(linter)));
+    addForStatement(linter, visitor);
   }
 
   void addFunctionDeclaration(LintRule linter, AstVisitor visitor) {
@@ -1236,11 +1202,6 @@
     _forListLiteral.add(new _Subscription(linter, visitor, _getTimer(linter)));
   }
 
-  @Deprecated('Use addSetOrMapLiteral')
-  void addMapLiteral(LintRule linter, AstVisitor visitor) {
-    _forMapLiteral.add(new _Subscription(linter, visitor, _getTimer(linter)));
-  }
-
   void addMapLiteralEntry(LintRule linter, AstVisitor visitor) {
     _forMapLiteralEntry
         .add(new _Subscription(linter, visitor, _getTimer(linter)));
diff --git a/pkg/analyzer/lib/src/lint/options_rule_validator.dart b/pkg/analyzer/lib/src/lint/options_rule_validator.dart
index 9b28b1a..593dee4 100644
--- a/pkg/analyzer/lib/src/lint/options_rule_validator.dart
+++ b/pkg/analyzer/lib/src/lint/options_rule_validator.dart
@@ -1,4 +1,4 @@
-// Copyright (c) 2016, the Dart project authors.  Please see the AUTHORS file
+// Copyright (c) 2016, the Dart project authors. Please see the AUTHORS file
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
 
diff --git a/pkg/analyzer/lib/src/lint/project.dart b/pkg/analyzer/lib/src/lint/project.dart
index 7243747..f76a03e 100644
--- a/pkg/analyzer/lib/src/lint/project.dart
+++ b/pkg/analyzer/lib/src/lint/project.dart
@@ -1,4 +1,4 @@
-// Copyright (c) 2015, the Dart project authors.  Please see the AUTHORS file
+// Copyright (c) 2015, the Dart project authors. Please see the AUTHORS file
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
 
diff --git a/pkg/analyzer/lib/src/plugin/options.dart b/pkg/analyzer/lib/src/plugin/options.dart
index e259428..ebfa648 100644
--- a/pkg/analyzer/lib/src/plugin/options.dart
+++ b/pkg/analyzer/lib/src/plugin/options.dart
@@ -1,4 +1,4 @@
-// Copyright (c) 2015, the Dart project authors.  Please see the AUTHORS file
+// Copyright (c) 2015, the Dart project authors. Please see the AUTHORS file
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
 
diff --git a/pkg/analyzer/lib/src/plugin/resolver_provider.dart b/pkg/analyzer/lib/src/plugin/resolver_provider.dart
index abbb3a8..9ef7a7b 100644
--- a/pkg/analyzer/lib/src/plugin/resolver_provider.dart
+++ b/pkg/analyzer/lib/src/plugin/resolver_provider.dart
@@ -1,4 +1,4 @@
-// Copyright (c) 2015, the Dart project authors.  Please see the AUTHORS file
+// Copyright (c) 2015, the Dart project authors. Please see the AUTHORS file
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
 
diff --git a/pkg/analyzer/lib/src/plugin/task.dart b/pkg/analyzer/lib/src/plugin/task.dart
index fec6844..54ec75e 100644
--- a/pkg/analyzer/lib/src/plugin/task.dart
+++ b/pkg/analyzer/lib/src/plugin/task.dart
@@ -1,4 +1,4 @@
-// Copyright (c) 2015, the Dart project authors.  Please see the AUTHORS file
+// Copyright (c) 2015, the Dart project authors. Please see the AUTHORS file
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
 
diff --git a/pkg/analyzer/lib/src/services/available_declarations.dart b/pkg/analyzer/lib/src/services/available_declarations.dart
index aaed6fe..539b719 100644
--- a/pkg/analyzer/lib/src/services/available_declarations.dart
+++ b/pkg/analyzer/lib/src/services/available_declarations.dart
@@ -7,12 +7,16 @@
 
 import 'package:analyzer/dart/analysis/analysis_context.dart';
 import 'package:analyzer/dart/ast/ast.dart';
+import 'package:analyzer/dart/ast/token.dart';
 import 'package:analyzer/error/listener.dart';
 import 'package:analyzer/file_system/file_system.dart';
 import 'package:analyzer/source/line_info.dart';
 import 'package:analyzer/src/dart/analysis/byte_store.dart';
+import 'package:analyzer/src/dart/ast/ast.dart';
+import 'package:analyzer/src/dart/ast/token.dart';
 import 'package:analyzer/src/dart/scanner/reader.dart';
 import 'package:analyzer/src/dart/scanner/scanner.dart';
+import 'package:analyzer/src/dartdoc/dartdoc_directive_info.dart';
 import 'package:analyzer/src/generated/parser.dart';
 import 'package:analyzer/src/generated/utilities_dart.dart';
 import 'package:analyzer/src/string_source.dart';
@@ -100,6 +104,7 @@
 enum DeclarationKind {
   CLASS,
   CLASS_TYPE_ALIAS,
+  CONSTRUCTOR,
   ENUM,
   ENUM_CONSTANT,
   FUNCTION,
@@ -129,6 +134,10 @@
   /// The list of paths of all SDK libraries.
   final List<String> _sdkLibraryPathList = [];
 
+  /// The combined information about all of the dartdoc directives in this
+  /// context.
+  final DartdocDirectiveInfo _dartdocDirectiveInfo = new DartdocDirectiveInfo();
+
   /// Map of path prefixes to lists of paths of files from dependencies
   /// (both libraries and parts, we don't know at the time when we fill this
   /// map) that libraries with paths starting with these prefixes can access.
@@ -138,6 +147,10 @@
 
   DeclarationsContext(this._tracker, this._analysisContext);
 
+  /// Return the combined information about all of the dartdoc directives in
+  /// this context.
+  DartdocDirectiveInfo get dartdocDirectiveInfo => _dartdocDirectiveInfo;
+
   /// Return libraries that are available to the file with the given [path].
   ///
   /// With `Pub`, files below the `pubspec.yaml` file can access libraries
@@ -810,6 +823,8 @@
         return DeclarationKind.CLASS;
       case idl.AvailableDeclarationKind.CLASS_TYPE_ALIAS:
         return DeclarationKind.CLASS_TYPE_ALIAS;
+      case idl.AvailableDeclarationKind.CONSTRUCTOR:
+        return DeclarationKind.CONSTRUCTOR;
       case idl.AvailableDeclarationKind.ENUM:
         return DeclarationKind.ENUM;
       case idl.AvailableDeclarationKind.ENUM_CONSTANT:
@@ -837,6 +852,8 @@
         return idl.AvailableDeclarationKind.CLASS;
       case DeclarationKind.CLASS_TYPE_ALIAS:
         return idl.AvailableDeclarationKind.CLASS_TYPE_ALIAS;
+      case DeclarationKind.CONSTRUCTOR:
+        return idl.AvailableDeclarationKind.CONSTRUCTOR;
       case DeclarationKind.ENUM:
         return idl.AvailableDeclarationKind.ENUM;
       case DeclarationKind.ENUM_CONSTANT:
@@ -944,7 +961,7 @@
 
 class _File {
   /// The version of data format, should be incremented on every format change.
-  static const int DATA_VERSION = 8;
+  static const int DATA_VERSION = 9;
 
   /// The next value for [id].
   static int _nextId = 0;
@@ -971,6 +988,9 @@
   List<Declaration> libraryDeclarations = [];
   List<Declaration> exportedDeclarations;
 
+  List<String> templateNames = [];
+  List<String> templateValues = [];
+
   /// If `true`, then this library has already been sent to the client.
   bool isSent = false;
 
@@ -1027,9 +1047,14 @@
 
       CompilationUnit unit = _parse(content);
       _buildFileDeclarations(unit);
+      _extractDartdocInfoFromUnit(unit);
       _putFileDeclarationsToByteStore(contentKey);
+      context.dartdocDirectiveInfo
+          .addTemplateNamesAndValues(templateNames, templateValues);
     } else {
       _readFileDeclarationsFromBytes(bytes);
+      context.dartdocDirectiveInfo
+          .addTemplateNamesAndValues(templateNames, templateValues);
     }
 
     // Resolve exports and parts.
@@ -1180,6 +1205,38 @@
           kind: DeclarationKind.CLASS,
           name: node.name,
         );
+        for (var classMember in node.members) {
+          if (classMember is ConstructorDeclaration) {
+            setDartDoc(classMember);
+            isDeprecated = _hasDeprecatedAnnotation(classMember);
+
+            var parameters = classMember.parameters;
+            var defaultArguments = _computeDefaultArguments(parameters);
+
+            var constructorName = classMember.name;
+            constructorName ??= SimpleIdentifierImpl(
+              StringToken(
+                TokenType.IDENTIFIER,
+                '',
+                classMember.returnType.offset,
+              ),
+            );
+
+            addDeclaration(
+              defaultArgumentListString: defaultArguments?.text,
+              defaultArgumentListTextRanges: defaultArguments?.ranges,
+              isDeprecated: isDeprecated,
+              kind: DeclarationKind.CONSTRUCTOR,
+              name: constructorName,
+              name2: node.name,
+              parameters: parameters.toSource(),
+              parameterNames: _getFormalParameterNames(parameters),
+              parameterTypes: _getFormalParameterTypes(parameters),
+              requiredParameterCount:
+                  _getFormalParameterRequiredCount(parameters),
+            );
+          }
+        }
       } else if (node is ClassTypeAlias) {
         addDeclaration(
           isDeprecated: isDeprecated,
@@ -1285,6 +1342,42 @@
     }
   }
 
+  void _extractDartdocInfoFromUnit(CompilationUnit unit) {
+    DartdocDirectiveInfo info = new DartdocDirectiveInfo();
+    for (Directive directive in unit.directives) {
+      Comment comment = directive.documentationComment;
+      if (comment != null) {
+        info.extractTemplate(getCommentNodeRawText(comment));
+      }
+    }
+    for (CompilationUnitMember declaration in unit.declarations) {
+      Comment comment = declaration.documentationComment;
+      if (comment != null) {
+        info.extractTemplate(getCommentNodeRawText(comment));
+      }
+      if (declaration is ClassOrMixinDeclaration) {
+        for (ClassMember member in declaration.members) {
+          Comment comment = member.documentationComment;
+          if (comment != null) {
+            info.extractTemplate(getCommentNodeRawText(comment));
+          }
+        }
+      } else if (declaration is EnumDeclaration) {
+        for (EnumConstantDeclaration constant in declaration.constants) {
+          Comment comment = constant.documentationComment;
+          if (comment != null) {
+            info.extractTemplate(getCommentNodeRawText(comment));
+          }
+        }
+      }
+    }
+    Map<String, String> templateMap = info.templateMap;
+    for (String name in templateMap.keys) {
+      templateNames.add(name);
+      templateValues.add(templateMap[name]);
+    }
+  }
+
   /// Return the [_File] for the given [relative] URI, maybe `null`.
   _File _fileForRelativeUri(DeclarationsContext context, Uri relative) {
     var absoluteUri = resolveRelativeUri(uri, relative);
@@ -1308,6 +1401,8 @@
       declarations: fileDeclarations.map((d) {
         return _DeclarationStorage.toIdl(d);
       }).toList(),
+      directiveInfo: idl.DirectiveInfoBuilder(
+          templateNames: templateNames, templateValues: templateValues),
     );
     var bytes = builder.toBuffer();
     tracker._byteStore.put(contentKey, bytes);
@@ -1336,6 +1431,9 @@
     fileDeclarations = idlFile.declarations.map((e) {
       return _DeclarationStorage.fromIdl(path, e);
     }).toList();
+
+    templateNames = idlFile.directiveInfo.templateNames;
+    templateValues = idlFile.directiveInfo.templateValues;
   }
 
   static _DefaultArguments _computeDefaultArguments(
diff --git a/pkg/analyzer/lib/src/source/custom_resolver.dart b/pkg/analyzer/lib/src/source/custom_resolver.dart
index 4e2c79a..0ce922e 100644
--- a/pkg/analyzer/lib/src/source/custom_resolver.dart
+++ b/pkg/analyzer/lib/src/source/custom_resolver.dart
@@ -1,4 +1,4 @@
-// Copyright (c) 2016, the Dart project authors.  Please see the AUTHORS file
+// Copyright (c) 2016, the Dart project authors. Please see the AUTHORS file
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
 
diff --git a/pkg/analyzer/lib/src/source/package_map_provider.dart b/pkg/analyzer/lib/src/source/package_map_provider.dart
index dff066c..69053ba 100644
--- a/pkg/analyzer/lib/src/source/package_map_provider.dart
+++ b/pkg/analyzer/lib/src/source/package_map_provider.dart
@@ -1,4 +1,4 @@
-// Copyright (c) 2014, the Dart project authors.  Please see the AUTHORS file
+// Copyright (c) 2014, the Dart project authors. Please see the AUTHORS file
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
 
diff --git a/pkg/analyzer/lib/src/source/package_map_resolver.dart b/pkg/analyzer/lib/src/source/package_map_resolver.dart
index b325201..7d9fbf5 100644
--- a/pkg/analyzer/lib/src/source/package_map_resolver.dart
+++ b/pkg/analyzer/lib/src/source/package_map_resolver.dart
@@ -1,4 +1,4 @@
-// Copyright (c) 2014, the Dart project authors.  Please see the AUTHORS file
+// Copyright (c) 2014, the Dart project authors. Please see the AUTHORS file
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
 
diff --git a/pkg/analyzer/lib/src/source/path_filter.dart b/pkg/analyzer/lib/src/source/path_filter.dart
index c43cae1..57aa87e 100644
--- a/pkg/analyzer/lib/src/source/path_filter.dart
+++ b/pkg/analyzer/lib/src/source/path_filter.dart
@@ -1,4 +1,4 @@
-// Copyright (c) 2015, the Dart project authors.  Please see the AUTHORS file
+// Copyright (c) 2015, the Dart project authors. Please see the AUTHORS file
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
 
diff --git a/pkg/analyzer/lib/src/source/sdk_ext.dart b/pkg/analyzer/lib/src/source/sdk_ext.dart
index 30be82a..32a1e5b 100644
--- a/pkg/analyzer/lib/src/source/sdk_ext.dart
+++ b/pkg/analyzer/lib/src/source/sdk_ext.dart
@@ -1,4 +1,4 @@
-// Copyright (c) 2015, the Dart project authors.  Please see the AUTHORS file
+// Copyright (c) 2015, the Dart project authors. Please see the AUTHORS file
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
 
diff --git a/pkg/analyzer/lib/src/summary/api_signature.dart b/pkg/analyzer/lib/src/summary/api_signature.dart
index 80937d6..c86d8b8 100644
--- a/pkg/analyzer/lib/src/summary/api_signature.dart
+++ b/pkg/analyzer/lib/src/summary/api_signature.dart
@@ -1,4 +1,4 @@
-// Copyright (c) 2016, the Dart project authors.  Please see the AUTHORS file
+// Copyright (c) 2016, the Dart project authors. Please see the AUTHORS file
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
 
diff --git a/pkg/analyzer/lib/src/summary/base.dart b/pkg/analyzer/lib/src/summary/base.dart
index 6793692..93215cf 100644
--- a/pkg/analyzer/lib/src/summary/base.dart
+++ b/pkg/analyzer/lib/src/summary/base.dart
@@ -1,4 +1,4 @@
-// Copyright (c) 2014, the Dart project authors.  Please see the AUTHORS file
+// Copyright (c) 2014, the Dart project authors. Please see the AUTHORS file
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
 
diff --git a/pkg/analyzer/lib/src/summary/expr_builder.dart b/pkg/analyzer/lib/src/summary/expr_builder.dart
index 960e342..77bcdd9 100644
--- a/pkg/analyzer/lib/src/summary/expr_builder.dart
+++ b/pkg/analyzer/lib/src/summary/expr_builder.dart
@@ -42,11 +42,11 @@
 
   // The stack of values. Note that they are usually [Expression]s, but may be
   // any [CollectionElement] to support map/set/list literals.
-  final List<CollectionElement> stack = <CollectionElement>[];
+  final List<AstNode> stack = <AstNode>[];
 
   final List<UnlinkedExecutable> localFunctions;
 
-  final Map<String, ParameterElement> parametersInScope;
+  final _VariablesInScope variablesInScope;
 
   ExprBuilder(
     this.resynthesizer,
@@ -54,10 +54,9 @@
     this._uc, {
     this.requireValidConst: true,
     this.localFunctions,
-    Map<String, ParameterElement> parametersInScope,
+    _VariablesInScope variablesInScope,
     this.becomeSetOrMap: true,
-  })  : this.parametersInScope =
-            parametersInScope ?? _parametersInScope(context),
+  })  : this.variablesInScope = variablesInScope ?? _parametersInScope(context),
         this.isSpreadOrControlFlowEnabled = _isSpreadOrControlFlowEnabled(
             (resynthesizer.library.context.analysisOptions
                     as AnalysisOptionsImpl)
@@ -69,6 +68,7 @@
     if (requireValidConst && !_uc.isValidConst) {
       return null;
     }
+    int startingVariableCount = variablesInScope.count;
     for (UnlinkedExprOperation operation in _uc.operations) {
       switch (operation) {
         case UnlinkedExprOperation.pushNull:
@@ -146,6 +146,9 @@
         case UnlinkedExprOperation.bitShiftRight:
           _pushBinary(TokenType.GT_GT);
           break;
+        case UnlinkedExprOperation.bitShiftRightLogical:
+          _pushBinary(TokenType.GT_GT_GT);
+          break;
         case UnlinkedExprOperation.add:
           _pushBinary(TokenType.PLUS);
           break;
@@ -260,7 +263,7 @@
         case UnlinkedExprOperation.pushParameter:
           String name = _uc.strings[stringPtr++];
           SimpleIdentifier identifier = AstTestFactory.identifier3(name);
-          identifier.staticElement = parametersInScope[name];
+          identifier.staticElement = variablesInScope[name];
           _push(identifier);
           break;
         case UnlinkedExprOperation.ifNull:
@@ -329,6 +332,45 @@
         case UnlinkedExprOperation.ifElseElement:
           _pushIfElement(true);
           break;
+        case UnlinkedExprOperation.forParts:
+          _pushForParts();
+          break;
+        case UnlinkedExprOperation.forElement:
+          _pushForElement(false);
+          break;
+        case UnlinkedExprOperation.forElementWithAwait:
+          _pushForElement(true);
+          break;
+        case UnlinkedExprOperation.pushEmptyExpression:
+          _push(null);
+          break;
+        case UnlinkedExprOperation.variableDeclarationStart:
+          _variableDeclarationStart();
+          break;
+        case UnlinkedExprOperation.variableDeclaration:
+          _variableDeclaration();
+          break;
+        case UnlinkedExprOperation.forInitializerDeclarationsUntyped:
+          _forInitializerDeclarations(false);
+          break;
+        case UnlinkedExprOperation.forInitializerDeclarationsTyped:
+          _forInitializerDeclarations(true);
+          break;
+        case UnlinkedExprOperation.assignToParameter:
+          String name = _uc.strings[stringPtr++];
+          SimpleIdentifier identifier = AstTestFactory.identifier3(name);
+          identifier.staticElement = variablesInScope[name];
+          _push(_createAssignment(identifier));
+          break;
+        case UnlinkedExprOperation.forEachPartsWithIdentifier:
+          _forEachPartsWithIdentifier();
+          break;
+        case UnlinkedExprOperation.forEachPartsWithUntypedDeclaration:
+          _forEachPartsWithDeclaration(false);
+          break;
+        case UnlinkedExprOperation.forEachPartsWithTypedDeclaration:
+          _forEachPartsWithDeclaration(true);
+          break;
         case UnlinkedExprOperation.cascadeSectionBegin:
         case UnlinkedExprOperation.cascadeSectionEnd:
         case UnlinkedExprOperation.pushLocalFunctionReference:
@@ -339,6 +381,7 @@
               'Unexpected $operation in a constant expression.');
       }
     }
+    assert(startingVariableCount == variablesInScope.count);
     return stack.single;
   }
 
@@ -588,6 +631,39 @@
     return _buildIdentifierSequence(info);
   }
 
+  void _forEachPartsWithDeclaration(bool hasType) {
+    var iterable = _pop();
+    var name = _uc.strings[stringPtr++];
+    var element = LocalVariableElementImpl(name, -1);
+    var keyword = hasType ? null : Keyword.VAR;
+    var type = hasType ? _newTypeName() : null;
+    var loopVariable = AstTestFactory.declaredIdentifier2(keyword, type, name);
+    loopVariable.identifier.staticElement = element;
+    if (hasType) {
+      element.type = type.type;
+    }
+    _pushNode(
+        AstTestFactory.forEachPartsWithDeclaration(loopVariable, iterable));
+    variablesInScope.push(element);
+  }
+
+  void _forEachPartsWithIdentifier() {
+    var iterable = _pop();
+    SimpleIdentifier identifier = _pop();
+    _pushNode(AstTestFactory.forEachPartsWithIdentifier(identifier, iterable));
+  }
+
+  void _forInitializerDeclarations(bool hasType) {
+    var count = _uc.ints[intPtr++];
+    var variables = List<VariableDeclaration>.filled(count, null);
+    for (int i = 0; i < count; i++) {
+      variables[count - 1 - i] = _popNode();
+    }
+    var type = hasType ? _newTypeName() : null;
+    var keyword = hasType ? null : Keyword.VAR;
+    _pushNode(AstTestFactory.variableDeclarationList(keyword, type, variables));
+  }
+
   PropertyAccessorElement _getStringLengthElement() =>
       resynthesizer.typeProvider.stringType.getGetter('length');
 
@@ -629,9 +705,12 @@
 
   Expression _pop() => stack.removeLast() as Expression;
 
-  CollectionElement _popCollectionElement() => stack.removeLast();
+  CollectionElement _popCollectionElement() =>
+      stack.removeLast() as CollectionElement;
 
-  void _push(CollectionElement expr) {
+  AstNode _popNode() => stack.removeLast();
+
+  void _push(Expression expr) {
     stack.add(expr);
   }
 
@@ -656,11 +735,43 @@
     _push(AstTestFactory.propertyAccess(target, propertyNode));
   }
 
+  void _pushForElement(bool hasAwait) {
+    var body = _popCollectionElement();
+    var forLoopParts = _popNode() as ForLoopParts;
+    if (forLoopParts is ForPartsWithDeclarations) {
+      variablesInScope.pop(forLoopParts.variables.variables.length);
+    } else if (forLoopParts is ForEachPartsWithDeclaration) {
+      variablesInScope.pop(1);
+    }
+    _pushCollectionElement(
+        AstTestFactory.forElement(forLoopParts, body, hasAwait: hasAwait));
+  }
+
+  void _pushForParts() {
+    var updaterCount = _uc.ints[intPtr++];
+    var updaters = <Expression>[];
+    for (int i = 0; i < updaterCount; i++) {
+      updaters.insert(0, _pop());
+    }
+    Expression condition = _pop();
+    AstNode initialization = _popNode();
+    if (initialization is Expression || initialization == null) {
+      _pushNode(AstTestFactory.forPartsWithExpression(
+          initialization, condition, updaters));
+    } else if (initialization is VariableDeclarationList) {
+      _pushNode(AstTestFactory.forPartsWithDeclarations(
+          initialization, condition, updaters));
+    } else {
+      throw StateError('Unrecognized for parts');
+    }
+  }
+
   void _pushIfElement(bool hasElse) {
     CollectionElement elseElement = hasElse ? _popCollectionElement() : null;
     CollectionElement thenElement = _popCollectionElement();
     Expression condition = _pop();
-    _push(AstTestFactory.ifElement(condition, thenElement, elseElement));
+    _pushCollectionElement(
+        AstTestFactory.ifElement(condition, thenElement, elseElement));
   }
 
   void _pushInstanceCreation() {
@@ -794,12 +905,10 @@
     assert(popCount == 0);
     int functionIndex = _uc.ints[intPtr++];
     var localFunction = localFunctions[functionIndex];
-    var parametersInScope =
-        new Map<String, ParameterElement>.from(this.parametersInScope);
     var functionElement =
         new FunctionElementImpl.forSerialized(localFunction, context);
     for (ParameterElementImpl parameter in functionElement.parameters) {
-      parametersInScope[parameter.name] = parameter;
+      variablesInScope.push(parameter);
       if (parameter.unlinkedParam.type == null) {
         // Store a type of `dynamic` for the parameter; this prevents
         // resynthesis from trying to read a type out of the summary (which
@@ -823,12 +932,13 @@
       var bodyExpr = new ExprBuilder(
               resynthesizer, functionElement, localFunction.bodyExpr,
               requireValidConst: requireValidConst,
-              parametersInScope: parametersInScope,
+              variablesInScope: variablesInScope,
               localFunctions: localFunction.localFunctions)
           .build();
       functionBody = astFactory.expressionFunctionBody(asyncKeyword,
           TokenFactory.tokenFromType(TokenType.FUNCTION), bodyExpr, null);
     }
+    variablesInScope.pop(functionElement.parameters.length);
     FunctionExpressionImpl functionExpression = astFactory.functionExpression(
         null, AstTestFactory.formalParameterList(parameters), functionBody);
     functionExpression.declaredElement = functionElement;
@@ -851,15 +961,11 @@
         : typeArguments.arguments[1].type;
     var staticType =
         resynthesizer.typeProvider.mapType.instantiate([keyType, valueType]);
-    if (isSpreadOrControlFlowEnabled) {
-      _push(
-          AstTestFactory.setOrMapLiteral(Keyword.CONST, typeArguments, entries)
-            ..staticType = staticType);
-    } else {
-      // ignore: deprecated_member_use_from_same_package
-      _push(AstTestFactory.mapLiteral(Keyword.CONST, typeArguments, entries)
-        ..staticType = staticType);
-    }
+    SetOrMapLiteralImpl literal =
+        AstTestFactory.setOrMapLiteral(Keyword.CONST, typeArguments, entries);
+    literal.becomeMap();
+    literal.staticType = staticType;
+    _push(literal);
   }
 
   void _pushMapLiteralEntry() {
@@ -868,6 +974,10 @@
     _pushCollectionElement(AstTestFactory.mapLiteralEntry2(key, value));
   }
 
+  void _pushNode(AstNode node) {
+    stack.add(node);
+  }
+
   void _pushPrefix(TokenType operator) {
     Expression operand = _pop();
     _push(AstTestFactory.prefixExpression(operator, operand));
@@ -883,8 +993,10 @@
     for (int i = 0; i < count; i++) {
       elements.insert(0, _pop());
     }
-    // ignore: deprecated_member_use_from_same_package
-    _push(AstTestFactory.setLiteral(Keyword.CONST, typeArguments, elements));
+    SetOrMapLiteralImpl literal =
+        AstTestFactory.setOrMapLiteral(Keyword.CONST, typeArguments, elements);
+    literal.becomeSet();
+    _push(literal);
   }
 
   void _pushSetOrMap(TypeArgumentList typeArguments) {
@@ -938,7 +1050,7 @@
 
   void _pushSpread(TokenType operator) {
     Expression operand = _pop();
-    _push(AstTestFactory.spreadElement(operator, operand));
+    _pushCollectionElement(AstTestFactory.spreadElement(operator, operand));
   }
 
   List<Expression> _removeTopExpressions(int count) {
@@ -949,16 +1061,31 @@
     return items;
   }
 
+  void _variableDeclaration() {
+    var index = _uc.ints[intPtr++];
+    var element = variablesInScope.recent(index);
+    var initializer = _pop();
+    var variableDeclaration =
+        AstTestFactory.variableDeclaration2(element.name, initializer);
+    variableDeclaration.name.staticElement = element;
+    _pushNode(variableDeclaration);
+  }
+
+  void _variableDeclarationStart() {
+    var name = _uc.strings[stringPtr++];
+    variablesInScope.push(LocalVariableElementImpl(name, -1));
+  }
+
   /// Figures out the default value of [parametersInScope] based on [context].
   ///
   /// If [context] is (or contains) a constructor, then its parameters are used.
   /// Otherwise, no parameters are considered to be in scope.
-  static Map<String, ParameterElement> _parametersInScope(Element context) {
-    var result = <String, ParameterElement>{};
+  static _VariablesInScope _parametersInScope(Element context) {
+    var result = _VariablesInScope();
     for (Element e = context; e != null; e = e.enclosingElement) {
       if (e is ConstructorElement) {
         for (var parameter in e.parameters) {
-          result[parameter.name] = parameter;
+          result.push(parameter);
         }
         return result;
       }
@@ -966,3 +1093,37 @@
     return result;
   }
 }
+
+/// Tracks the set of variables that are in scope while resynthesizing an
+/// expression from a summary.
+class _VariablesInScope {
+  final _variableElements = <VariableElement>[];
+
+  /// Returns the number of variables that have been pushed but not popped.
+  int get count => _variableElements.length;
+
+  /// Looks up the variable with the given [name].  Returns `null` if no
+  /// variable is found.
+  VariableElement operator [](String name) {
+    for (int i = _variableElements.length - 1; i >= 0; i--) {
+      if (_variableElements[i].name == name) return _variableElements[i];
+    }
+    return null;
+  }
+
+  /// Un-does the effect of the last [count] calls to `push`.
+  void pop(int count) {
+    _variableElements.length -= count;
+  }
+
+  /// Stores a new declaration based on the given [variableElement].  The
+  /// declaration shadows any previous declaration with the same name.
+  void push(VariableElement variableElement) {
+    _variableElements.add(variableElement);
+  }
+
+  /// Retrieves the [index]th most recently pushed element (that hasn't been
+  /// popped).  [index] counts from zero.
+  VariableElement recent(int index) =>
+      _variableElements[_variableElements.length - 1 - index];
+}
diff --git a/pkg/analyzer/lib/src/summary/format.dart b/pkg/analyzer/lib/src/summary/format.dart
index ca27841f..004943b 100644
--- a/pkg/analyzer/lib/src/summary/format.dart
+++ b/pkg/analyzer/lib/src/summary/format.dart
@@ -1,9 +1,11 @@
-// Copyright (c) 2015, the Dart project authors.  Please see the AUTHORS file
+// Copyright (c) 2015, the Dart project authors. Please see the AUTHORS file
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
 //
 // This file has been automatically generated.  Please do not edit it manually.
-// To regenerate the file, use the script "pkg/analyzer/tool/generate_files".
+// To regenerate the file, use the SDK script
+// "pkg/analyzer/tool/summary/generate.dart $IDL_FILE_PATH",
+// or "pkg/analyzer/tool/generate_files" for the analyzer package IDL/sources.
 
 library analyzer.src.summary.format;
 
@@ -2885,6 +2887,7 @@
 class AvailableFileBuilder extends Object
     with _AvailableFileMixin
     implements idl.AvailableFile {
+  DirectiveInfoBuilder _directiveInfo;
   List<AvailableDeclarationBuilder> _declarations;
   List<AvailableFileExportBuilder> _exports;
   bool _isLibrary;
@@ -2892,6 +2895,14 @@
   List<String> _parts;
 
   @override
+  DirectiveInfoBuilder get directiveInfo => _directiveInfo;
+
+  /// The Dartdoc directives in the file.
+  void set directiveInfo(DirectiveInfoBuilder value) {
+    this._directiveInfo = value;
+  }
+
+  @override
   List<AvailableDeclarationBuilder> get declarations =>
       _declarations ??= <AvailableDeclarationBuilder>[];
 
@@ -2934,12 +2945,14 @@
   }
 
   AvailableFileBuilder(
-      {List<AvailableDeclarationBuilder> declarations,
+      {DirectiveInfoBuilder directiveInfo,
+      List<AvailableDeclarationBuilder> declarations,
       List<AvailableFileExportBuilder> exports,
       bool isLibrary,
       bool isLibraryDeprecated,
       List<String> parts})
-      : _declarations = declarations,
+      : _directiveInfo = directiveInfo,
+        _declarations = declarations,
         _exports = exports,
         _isLibrary = isLibrary,
         _isLibraryDeprecated = isLibraryDeprecated,
@@ -2949,6 +2962,7 @@
    * Flush [informative] data recursively.
    */
   void flushInformative() {
+    _directiveInfo?.flushInformative();
     _declarations?.forEach((b) => b.flushInformative());
     _exports?.forEach((b) => b.flushInformative());
   }
@@ -2983,6 +2997,8 @@
         signature.addString(x);
       }
     }
+    signature.addBool(this._directiveInfo != null);
+    this._directiveInfo?.collectApiSignature(signature);
   }
 
   List<int> toBuffer() {
@@ -2991,9 +3007,13 @@
   }
 
   fb.Offset finish(fb.Builder fbBuilder) {
+    fb.Offset offset_directiveInfo;
     fb.Offset offset_declarations;
     fb.Offset offset_exports;
     fb.Offset offset_parts;
+    if (_directiveInfo != null) {
+      offset_directiveInfo = _directiveInfo.finish(fbBuilder);
+    }
     if (!(_declarations == null || _declarations.isEmpty)) {
       offset_declarations = fbBuilder
           .writeList(_declarations.map((b) => b.finish(fbBuilder)).toList());
@@ -3007,6 +3027,9 @@
           .writeList(_parts.map((b) => fbBuilder.writeString(b)).toList());
     }
     fbBuilder.startTable();
+    if (offset_directiveInfo != null) {
+      fbBuilder.addOffset(5, offset_directiveInfo);
+    }
     if (offset_declarations != null) {
       fbBuilder.addOffset(0, offset_declarations);
     }
@@ -3047,6 +3070,7 @@
 
   _AvailableFileImpl(this._bc, this._bcOffset);
 
+  idl.DirectiveInfo _directiveInfo;
   List<idl.AvailableDeclaration> _declarations;
   List<idl.AvailableFileExport> _exports;
   bool _isLibrary;
@@ -3054,6 +3078,13 @@
   List<String> _parts;
 
   @override
+  idl.DirectiveInfo get directiveInfo {
+    _directiveInfo ??=
+        const _DirectiveInfoReader().vTableGet(_bc, _bcOffset, 5, null);
+    return _directiveInfo;
+  }
+
+  @override
   List<idl.AvailableDeclaration> get declarations {
     _declarations ??= const fb.ListReader<idl.AvailableDeclaration>(
             const _AvailableDeclarationReader())
@@ -3094,6 +3125,8 @@
   @override
   Map<String, Object> toJson() {
     Map<String, Object> _result = <String, Object>{};
+    if (directiveInfo != null)
+      _result["directiveInfo"] = directiveInfo.toJson();
     if (declarations.isNotEmpty)
       _result["declarations"] =
           declarations.map((_value) => _value.toJson()).toList();
@@ -3108,6 +3141,7 @@
 
   @override
   Map<String, Object> toMap() => {
+        "directiveInfo": directiveInfo,
         "declarations": declarations,
         "exports": exports,
         "isLibrary": isLibrary,
@@ -3482,6 +3516,135 @@
   String toString() => convert.json.encode(toJson());
 }
 
+class DirectiveInfoBuilder extends Object
+    with _DirectiveInfoMixin
+    implements idl.DirectiveInfo {
+  List<String> _templateNames;
+  List<String> _templateValues;
+
+  @override
+  List<String> get templateNames => _templateNames ??= <String>[];
+
+  /// The names of the defined templates.
+  void set templateNames(List<String> value) {
+    this._templateNames = value;
+  }
+
+  @override
+  List<String> get templateValues => _templateValues ??= <String>[];
+
+  /// The values of the defined templates.
+  void set templateValues(List<String> value) {
+    this._templateValues = value;
+  }
+
+  DirectiveInfoBuilder(
+      {List<String> templateNames, List<String> templateValues})
+      : _templateNames = templateNames,
+        _templateValues = templateValues;
+
+  /**
+   * Flush [informative] data recursively.
+   */
+  void flushInformative() {}
+
+  /**
+   * Accumulate non-[informative] data into [signature].
+   */
+  void collectApiSignature(api_sig.ApiSignature signature) {
+    if (this._templateNames == null) {
+      signature.addInt(0);
+    } else {
+      signature.addInt(this._templateNames.length);
+      for (var x in this._templateNames) {
+        signature.addString(x);
+      }
+    }
+    if (this._templateValues == null) {
+      signature.addInt(0);
+    } else {
+      signature.addInt(this._templateValues.length);
+      for (var x in this._templateValues) {
+        signature.addString(x);
+      }
+    }
+  }
+
+  fb.Offset finish(fb.Builder fbBuilder) {
+    fb.Offset offset_templateNames;
+    fb.Offset offset_templateValues;
+    if (!(_templateNames == null || _templateNames.isEmpty)) {
+      offset_templateNames = fbBuilder.writeList(
+          _templateNames.map((b) => fbBuilder.writeString(b)).toList());
+    }
+    if (!(_templateValues == null || _templateValues.isEmpty)) {
+      offset_templateValues = fbBuilder.writeList(
+          _templateValues.map((b) => fbBuilder.writeString(b)).toList());
+    }
+    fbBuilder.startTable();
+    if (offset_templateNames != null) {
+      fbBuilder.addOffset(0, offset_templateNames);
+    }
+    if (offset_templateValues != null) {
+      fbBuilder.addOffset(1, offset_templateValues);
+    }
+    return fbBuilder.endTable();
+  }
+}
+
+class _DirectiveInfoReader extends fb.TableReader<_DirectiveInfoImpl> {
+  const _DirectiveInfoReader();
+
+  @override
+  _DirectiveInfoImpl createObject(fb.BufferContext bc, int offset) =>
+      new _DirectiveInfoImpl(bc, offset);
+}
+
+class _DirectiveInfoImpl extends Object
+    with _DirectiveInfoMixin
+    implements idl.DirectiveInfo {
+  final fb.BufferContext _bc;
+  final int _bcOffset;
+
+  _DirectiveInfoImpl(this._bc, this._bcOffset);
+
+  List<String> _templateNames;
+  List<String> _templateValues;
+
+  @override
+  List<String> get templateNames {
+    _templateNames ??= const fb.ListReader<String>(const fb.StringReader())
+        .vTableGet(_bc, _bcOffset, 0, const <String>[]);
+    return _templateNames;
+  }
+
+  @override
+  List<String> get templateValues {
+    _templateValues ??= const fb.ListReader<String>(const fb.StringReader())
+        .vTableGet(_bc, _bcOffset, 1, const <String>[]);
+    return _templateValues;
+  }
+}
+
+abstract class _DirectiveInfoMixin implements idl.DirectiveInfo {
+  @override
+  Map<String, Object> toJson() {
+    Map<String, Object> _result = <String, Object>{};
+    if (templateNames.isNotEmpty) _result["templateNames"] = templateNames;
+    if (templateValues.isNotEmpty) _result["templateValues"] = templateValues;
+    return _result;
+  }
+
+  @override
+  Map<String, Object> toMap() => {
+        "templateNames": templateNames,
+        "templateValues": templateValues,
+      };
+
+  @override
+  String toString() => convert.json.encode(toJson());
+}
+
 class EntityRefBuilder extends Object
     with _EntityRefMixin
     implements idl.EntityRef {
@@ -4556,6 +4719,8 @@
   LinkedNodeBuilder _variantField_12;
   List<LinkedNodeBuilder> _variantField_5;
   LinkedNodeBuilder _variantField_13;
+  int _variantField_34;
+  int _variantField_33;
   List<int> _variantField_28;
   idl.LinkedNodeCommentType _variantField_29;
   List<LinkedNodeBuilder> _variantField_3;
@@ -5309,6 +5474,18 @@
   }
 
   @override
+  LinkedNodeBuilder get nativeClause_name {
+    assert(kind == idl.LinkedNodeKind.nativeClause);
+    return _variantField_6;
+  }
+
+  @override
+  LinkedNodeBuilder get nativeFunctionBody_stringLiteral {
+    assert(kind == idl.LinkedNodeKind.nativeFunctionBody);
+    return _variantField_6;
+  }
+
+  @override
   LinkedNodeBuilder get parenthesizedExpression_expression {
     assert(kind == idl.LinkedNodeKind.parenthesizedExpression);
     return _variantField_6;
@@ -5716,6 +5893,16 @@
     _variantField_6 = value;
   }
 
+  void set nativeClause_name(LinkedNodeBuilder value) {
+    assert(kind == idl.LinkedNodeKind.nativeClause);
+    _variantField_6 = value;
+  }
+
+  void set nativeFunctionBody_stringLiteral(LinkedNodeBuilder value) {
+    assert(kind == idl.LinkedNodeKind.nativeFunctionBody);
+    _variantField_6 = value;
+  }
+
   void set parenthesizedExpression_expression(LinkedNodeBuilder value) {
     assert(kind == idl.LinkedNodeKind.parenthesizedExpression);
     _variantField_6 = value;
@@ -6161,6 +6348,18 @@
   }
 
   @override
+  int get nativeClause_nativeKeyword {
+    assert(kind == idl.LinkedNodeKind.nativeClause);
+    return _variantField_15 ??= 0;
+  }
+
+  @override
+  int get nativeFunctionBody_nativeKeyword {
+    assert(kind == idl.LinkedNodeKind.nativeFunctionBody);
+    return _variantField_15 ??= 0;
+  }
+
+  @override
   int get nullLiteral_literal {
     assert(kind == idl.LinkedNodeKind.nullLiteral);
     return _variantField_15 ??= 0;
@@ -6179,12 +6378,6 @@
   }
 
   @override
-  int get partOfDirective_semicolon {
-    assert(kind == idl.LinkedNodeKind.partOfDirective);
-    return _variantField_15 ??= 0;
-  }
-
-  @override
   int get postfixExpression_element {
     assert(kind == idl.LinkedNodeKind.postfixExpression);
     return _variantField_15 ??= 0;
@@ -6711,6 +6904,18 @@
     _variantField_15 = value;
   }
 
+  void set nativeClause_nativeKeyword(int value) {
+    assert(kind == idl.LinkedNodeKind.nativeClause);
+    assert(value == null || value >= 0);
+    _variantField_15 = value;
+  }
+
+  void set nativeFunctionBody_nativeKeyword(int value) {
+    assert(kind == idl.LinkedNodeKind.nativeFunctionBody);
+    assert(value == null || value >= 0);
+    _variantField_15 = value;
+  }
+
   void set nullLiteral_literal(int value) {
     assert(kind == idl.LinkedNodeKind.nullLiteral);
     assert(value == null || value >= 0);
@@ -6729,12 +6934,6 @@
     _variantField_15 = value;
   }
 
-  void set partOfDirective_semicolon(int value) {
-    assert(kind == idl.LinkedNodeKind.partOfDirective);
-    assert(value == null || value >= 0);
-    _variantField_15 = value;
-  }
-
   void set postfixExpression_element(int value) {
     assert(kind == idl.LinkedNodeKind.postfixExpression);
     assert(value == null || value >= 0);
@@ -7481,6 +7680,12 @@
   }
 
   @override
+  LinkedNodeBuilder get classDeclaration_nativeClause {
+    assert(kind == idl.LinkedNodeKind.classDeclaration);
+    return _variantField_8;
+  }
+
+  @override
   LinkedNodeBuilder get classTypeAlias_withClause {
     assert(kind == idl.LinkedNodeKind.classTypeAlias);
     return _variantField_8;
@@ -7568,6 +7773,11 @@
     _variantField_8 = value;
   }
 
+  void set classDeclaration_nativeClause(LinkedNodeBuilder value) {
+    assert(kind == idl.LinkedNodeKind.classDeclaration);
+    _variantField_8 = value;
+  }
+
   void set classTypeAlias_withClause(LinkedNodeBuilder value) {
     assert(kind == idl.LinkedNodeKind.classTypeAlias);
     _variantField_8 = value;
@@ -7830,7 +8040,7 @@
   }
 
   @override
-  int get indexExpression_leftBracket {
+  int get indexExpression_period {
     assert(kind == idl.LinkedNodeKind.indexExpression);
     return _variantField_16 ??= 0;
   }
@@ -7866,6 +8076,12 @@
   }
 
   @override
+  int get nativeFunctionBody_semicolon {
+    assert(kind == idl.LinkedNodeKind.nativeFunctionBody);
+    return _variantField_16 ??= 0;
+  }
+
+  @override
   int get parenthesizedExpression_rightParenthesis {
     assert(kind == idl.LinkedNodeKind.parenthesizedExpression);
     return _variantField_16 ??= 0;
@@ -8157,7 +8373,7 @@
     _variantField_16 = value;
   }
 
-  void set indexExpression_leftBracket(int value) {
+  void set indexExpression_period(int value) {
     assert(kind == idl.LinkedNodeKind.indexExpression);
     assert(value == null || value >= 0);
     _variantField_16 = value;
@@ -8193,6 +8409,12 @@
     _variantField_16 = value;
   }
 
+  void set nativeFunctionBody_semicolon(int value) {
+    assert(kind == idl.LinkedNodeKind.nativeFunctionBody);
+    assert(value == null || value >= 0);
+    _variantField_16 = value;
+  }
+
   void set parenthesizedExpression_rightParenthesis(int value) {
     assert(kind == idl.LinkedNodeKind.parenthesizedExpression);
     assert(value == null || value >= 0);
@@ -8327,16 +8549,6 @@
   }
 
   @override
-  int get directive_keyword {
-    assert(kind == idl.LinkedNodeKind.exportDirective ||
-        kind == idl.LinkedNodeKind.importDirective ||
-        kind == idl.LinkedNodeKind.libraryDirective ||
-        kind == idl.LinkedNodeKind.partDirective ||
-        kind == idl.LinkedNodeKind.partOfDirective);
-    return _variantField_17 ??= 0;
-  }
-
-  @override
   int get doStatement_doKeyword {
     assert(kind == idl.LinkedNodeKind.doStatement);
     return _variantField_17 ??= 0;
@@ -8387,7 +8599,7 @@
   }
 
   @override
-  int get indexExpression_rightBracket {
+  int get indexExpression_leftBracket {
     assert(kind == idl.LinkedNodeKind.indexExpression);
     return _variantField_17 ??= 0;
   }
@@ -8464,16 +8676,6 @@
     _variantField_17 = value;
   }
 
-  void set directive_keyword(int value) {
-    assert(kind == idl.LinkedNodeKind.exportDirective ||
-        kind == idl.LinkedNodeKind.importDirective ||
-        kind == idl.LinkedNodeKind.libraryDirective ||
-        kind == idl.LinkedNodeKind.partDirective ||
-        kind == idl.LinkedNodeKind.partOfDirective);
-    assert(value == null || value >= 0);
-    _variantField_17 = value;
-  }
-
   void set doStatement_doKeyword(int value) {
     assert(kind == idl.LinkedNodeKind.doStatement);
     assert(value == null || value >= 0);
@@ -8524,7 +8726,7 @@
     _variantField_17 = value;
   }
 
-  void set indexExpression_rightBracket(int value) {
+  void set indexExpression_leftBracket(int value) {
     assert(kind == idl.LinkedNodeKind.indexExpression);
     assert(value == null || value >= 0);
     _variantField_17 = value;
@@ -8604,6 +8806,16 @@
   }
 
   @override
+  int get directive_keyword {
+    assert(kind == idl.LinkedNodeKind.exportDirective ||
+        kind == idl.LinkedNodeKind.importDirective ||
+        kind == idl.LinkedNodeKind.libraryDirective ||
+        kind == idl.LinkedNodeKind.partDirective ||
+        kind == idl.LinkedNodeKind.partOfDirective);
+    return _variantField_18 ??= 0;
+  }
+
+  @override
   int get doStatement_semicolon {
     assert(kind == idl.LinkedNodeKind.doStatement);
     return _variantField_18 ??= 0;
@@ -8623,17 +8835,14 @@
   }
 
   @override
-  int get methodDeclaration_propertyKeyword {
-    assert(kind == idl.LinkedNodeKind.methodDeclaration);
+  int get indexExpression_rightBracket {
+    assert(kind == idl.LinkedNodeKind.indexExpression);
     return _variantField_18 ??= 0;
   }
 
   @override
-  int get namespaceDirective_semicolon {
-    assert(kind == idl.LinkedNodeKind.exportDirective ||
-        kind == idl.LinkedNodeKind.importDirective ||
-        kind == idl.LinkedNodeKind.libraryDirective ||
-        kind == idl.LinkedNodeKind.partDirective);
+  int get methodDeclaration_propertyKeyword {
+    assert(kind == idl.LinkedNodeKind.methodDeclaration);
     return _variantField_18 ??= 0;
   }
 
@@ -8688,6 +8897,16 @@
     _variantField_18 = value;
   }
 
+  void set directive_keyword(int value) {
+    assert(kind == idl.LinkedNodeKind.exportDirective ||
+        kind == idl.LinkedNodeKind.importDirective ||
+        kind == idl.LinkedNodeKind.libraryDirective ||
+        kind == idl.LinkedNodeKind.partDirective ||
+        kind == idl.LinkedNodeKind.partOfDirective);
+    assert(value == null || value >= 0);
+    _variantField_18 = value;
+  }
+
   void set doStatement_semicolon(int value) {
     assert(kind == idl.LinkedNodeKind.doStatement);
     assert(value == null || value >= 0);
@@ -8707,17 +8926,14 @@
     _variantField_18 = value;
   }
 
-  void set methodDeclaration_propertyKeyword(int value) {
-    assert(kind == idl.LinkedNodeKind.methodDeclaration);
+  void set indexExpression_rightBracket(int value) {
+    assert(kind == idl.LinkedNodeKind.indexExpression);
     assert(value == null || value >= 0);
     _variantField_18 = value;
   }
 
-  void set namespaceDirective_semicolon(int value) {
-    assert(kind == idl.LinkedNodeKind.exportDirective ||
-        kind == idl.LinkedNodeKind.importDirective ||
-        kind == idl.LinkedNodeKind.libraryDirective ||
-        kind == idl.LinkedNodeKind.partDirective);
+  void set methodDeclaration_propertyKeyword(int value) {
+    assert(kind == idl.LinkedNodeKind.methodDeclaration);
     assert(value == null || value >= 0);
     _variantField_18 = value;
   }
@@ -8926,7 +9142,8 @@
 
   @override
   LinkedNodeTypeBuilder get functionDeclaration_returnType2 {
-    assert(kind == idl.LinkedNodeKind.functionDeclaration);
+    assert(kind == idl.LinkedNodeKind.functionDeclaration ||
+        kind == idl.LinkedNodeKind.functionExpression);
     return _variantField_24;
   }
 
@@ -8937,6 +9154,12 @@
   }
 
   @override
+  LinkedNodeTypeBuilder get functionTypedFormalParameter_type2 {
+    assert(kind == idl.LinkedNodeKind.functionTypedFormalParameter);
+    return _variantField_24;
+  }
+
+  @override
   LinkedNodeTypeBuilder get genericFunctionType_returnType2 {
     assert(kind == idl.LinkedNodeKind.genericFunctionType);
     return _variantField_24;
@@ -8984,7 +9207,8 @@
   }
 
   void set functionDeclaration_returnType2(LinkedNodeTypeBuilder value) {
-    assert(kind == idl.LinkedNodeKind.functionDeclaration);
+    assert(kind == idl.LinkedNodeKind.functionDeclaration ||
+        kind == idl.LinkedNodeKind.functionExpression);
     _variantField_24 = value;
   }
 
@@ -8993,6 +9217,11 @@
     _variantField_24 = value;
   }
 
+  void set functionTypedFormalParameter_type2(LinkedNodeTypeBuilder value) {
+    assert(kind == idl.LinkedNodeKind.functionTypedFormalParameter);
+    _variantField_24 = value;
+  }
+
   void set genericFunctionType_returnType2(LinkedNodeTypeBuilder value) {
     assert(kind == idl.LinkedNodeKind.genericFunctionType);
     _variantField_24 = value;
@@ -9220,6 +9449,106 @@
   }
 
   @override
+  int get codeLength {
+    assert(kind == idl.LinkedNodeKind.classDeclaration ||
+        kind == idl.LinkedNodeKind.classTypeAlias ||
+        kind == idl.LinkedNodeKind.constructorDeclaration ||
+        kind == idl.LinkedNodeKind.defaultFormalParameter ||
+        kind == idl.LinkedNodeKind.enumDeclaration ||
+        kind == idl.LinkedNodeKind.fieldFormalParameter ||
+        kind == idl.LinkedNodeKind.functionDeclaration ||
+        kind == idl.LinkedNodeKind.functionTypeAlias ||
+        kind == idl.LinkedNodeKind.functionTypedFormalParameter ||
+        kind == idl.LinkedNodeKind.genericTypeAlias ||
+        kind == idl.LinkedNodeKind.methodDeclaration ||
+        kind == idl.LinkedNodeKind.mixinDeclaration ||
+        kind == idl.LinkedNodeKind.simpleFormalParameter ||
+        kind == idl.LinkedNodeKind.typeParameter ||
+        kind == idl.LinkedNodeKind.variableDeclaration);
+    return _variantField_34 ??= 0;
+  }
+
+  void set codeLength(int value) {
+    assert(kind == idl.LinkedNodeKind.classDeclaration ||
+        kind == idl.LinkedNodeKind.classTypeAlias ||
+        kind == idl.LinkedNodeKind.constructorDeclaration ||
+        kind == idl.LinkedNodeKind.defaultFormalParameter ||
+        kind == idl.LinkedNodeKind.enumDeclaration ||
+        kind == idl.LinkedNodeKind.fieldFormalParameter ||
+        kind == idl.LinkedNodeKind.functionDeclaration ||
+        kind == idl.LinkedNodeKind.functionTypeAlias ||
+        kind == idl.LinkedNodeKind.functionTypedFormalParameter ||
+        kind == idl.LinkedNodeKind.genericTypeAlias ||
+        kind == idl.LinkedNodeKind.methodDeclaration ||
+        kind == idl.LinkedNodeKind.mixinDeclaration ||
+        kind == idl.LinkedNodeKind.simpleFormalParameter ||
+        kind == idl.LinkedNodeKind.typeParameter ||
+        kind == idl.LinkedNodeKind.variableDeclaration);
+    assert(value == null || value >= 0);
+    _variantField_34 = value;
+  }
+
+  @override
+  int get codeOffset {
+    assert(kind == idl.LinkedNodeKind.classDeclaration ||
+        kind == idl.LinkedNodeKind.classTypeAlias ||
+        kind == idl.LinkedNodeKind.constructorDeclaration ||
+        kind == idl.LinkedNodeKind.defaultFormalParameter ||
+        kind == idl.LinkedNodeKind.enumDeclaration ||
+        kind == idl.LinkedNodeKind.fieldFormalParameter ||
+        kind == idl.LinkedNodeKind.functionDeclaration ||
+        kind == idl.LinkedNodeKind.functionTypeAlias ||
+        kind == idl.LinkedNodeKind.functionTypedFormalParameter ||
+        kind == idl.LinkedNodeKind.genericTypeAlias ||
+        kind == idl.LinkedNodeKind.methodDeclaration ||
+        kind == idl.LinkedNodeKind.mixinDeclaration ||
+        kind == idl.LinkedNodeKind.simpleFormalParameter ||
+        kind == idl.LinkedNodeKind.typeParameter ||
+        kind == idl.LinkedNodeKind.variableDeclaration);
+    return _variantField_33 ??= 0;
+  }
+
+  @override
+  int get directive_semicolon {
+    assert(kind == idl.LinkedNodeKind.exportDirective ||
+        kind == idl.LinkedNodeKind.importDirective ||
+        kind == idl.LinkedNodeKind.libraryDirective ||
+        kind == idl.LinkedNodeKind.partDirective ||
+        kind == idl.LinkedNodeKind.partOfDirective);
+    return _variantField_33 ??= 0;
+  }
+
+  void set codeOffset(int value) {
+    assert(kind == idl.LinkedNodeKind.classDeclaration ||
+        kind == idl.LinkedNodeKind.classTypeAlias ||
+        kind == idl.LinkedNodeKind.constructorDeclaration ||
+        kind == idl.LinkedNodeKind.defaultFormalParameter ||
+        kind == idl.LinkedNodeKind.enumDeclaration ||
+        kind == idl.LinkedNodeKind.fieldFormalParameter ||
+        kind == idl.LinkedNodeKind.functionDeclaration ||
+        kind == idl.LinkedNodeKind.functionTypeAlias ||
+        kind == idl.LinkedNodeKind.functionTypedFormalParameter ||
+        kind == idl.LinkedNodeKind.genericTypeAlias ||
+        kind == idl.LinkedNodeKind.methodDeclaration ||
+        kind == idl.LinkedNodeKind.mixinDeclaration ||
+        kind == idl.LinkedNodeKind.simpleFormalParameter ||
+        kind == idl.LinkedNodeKind.typeParameter ||
+        kind == idl.LinkedNodeKind.variableDeclaration);
+    assert(value == null || value >= 0);
+    _variantField_33 = value;
+  }
+
+  void set directive_semicolon(int value) {
+    assert(kind == idl.LinkedNodeKind.exportDirective ||
+        kind == idl.LinkedNodeKind.importDirective ||
+        kind == idl.LinkedNodeKind.libraryDirective ||
+        kind == idl.LinkedNodeKind.partDirective ||
+        kind == idl.LinkedNodeKind.partOfDirective);
+    assert(value == null || value >= 0);
+    _variantField_33 = value;
+  }
+
+  @override
   List<int> get comment_tokens {
     assert(kind == idl.LinkedNodeKind.comment);
     return _variantField_28 ??= <int>[];
@@ -9361,6 +9690,12 @@
     return _variantField_25;
   }
 
+  @override
+  LinkedNodeTypeBuilder get genericFunctionType_type {
+    assert(kind == idl.LinkedNodeKind.genericFunctionType);
+    return _variantField_25;
+  }
+
   void set expression_type(LinkedNodeTypeBuilder value) {
     assert(kind == idl.LinkedNodeKind.adjacentStrings ||
         kind == idl.LinkedNodeKind.assignmentExpression ||
@@ -9397,6 +9732,11 @@
     _variantField_25 = value;
   }
 
+  void set genericFunctionType_type(LinkedNodeTypeBuilder value) {
+    assert(kind == idl.LinkedNodeKind.genericFunctionType);
+    _variantField_25 = value;
+  }
+
   @override
   idl.LinkedNodeFormalParameterKind get formalParameter_kind {
     assert(kind == idl.LinkedNodeKind.fieldFormalParameter ||
@@ -9642,6 +9982,8 @@
     int constructorDeclaration_period,
     int constructorDeclaration_separator,
     LinkedNodeBuilder constructorDeclaration_redirectedConstructor,
+    int codeLength,
+    int codeOffset,
     LinkedNodeBuilder constructorDeclaration_returnType,
   })  : _kind = idl.LinkedNodeKind.constructorDeclaration,
         _variantField_2 = constructorDeclaration_initializers,
@@ -9656,6 +9998,8 @@
         _variantField_18 = constructorDeclaration_period,
         _variantField_19 = constructorDeclaration_separator,
         _variantField_9 = constructorDeclaration_redirectedConstructor,
+        _variantField_34 = codeLength,
+        _variantField_33 = codeOffset,
         _variantField_10 = constructorDeclaration_returnType;
 
   LinkedNodeBuilder.dottedName({
@@ -9670,6 +10014,8 @@
     int enumDeclaration_enumKeyword,
     int enumDeclaration_leftBracket,
     int enumDeclaration_rightBracket,
+    int codeLength,
+    int codeOffset,
     LinkedNodeBuilder namedCompilationUnitMember_name,
   })  : _kind = idl.LinkedNodeKind.enumDeclaration,
         _variantField_2 = enumDeclaration_constants,
@@ -9678,6 +10024,8 @@
         _variantField_15 = enumDeclaration_enumKeyword,
         _variantField_16 = enumDeclaration_leftBracket,
         _variantField_17 = enumDeclaration_rightBracket,
+        _variantField_34 = codeLength,
+        _variantField_33 = codeOffset,
         _variantField_14 = namedCompilationUnitMember_name;
 
   LinkedNodeBuilder.formalParameterList({
@@ -9739,8 +10087,8 @@
     LinkedNodeBuilder annotatedNode_comment,
     List<LinkedNodeBuilder> annotatedNode_metadata,
     int directive_keyword,
-    int namespaceDirective_semicolon,
     int uriBasedDirective_uriElement,
+    int directive_semicolon,
     List<LinkedNodeBuilder> namespaceDirective_configurations,
     LinkedNodeBuilder uriBasedDirective_uri,
     String namespaceDirective_selectedUriContent,
@@ -9749,9 +10097,9 @@
         _variantField_2 = namespaceDirective_combinators,
         _variantField_11 = annotatedNode_comment,
         _variantField_4 = annotatedNode_metadata,
-        _variantField_17 = directive_keyword,
-        _variantField_18 = namespaceDirective_semicolon,
+        _variantField_18 = directive_keyword,
         _variantField_19 = uriBasedDirective_uriElement,
+        _variantField_33 = directive_semicolon,
         _variantField_3 = namespaceDirective_configurations,
         _variantField_14 = uriBasedDirective_uri,
         _variantField_23 = namespaceDirective_selectedUriContent,
@@ -9765,8 +10113,8 @@
     int importDirective_asKeyword,
     int importDirective_deferredKeyword,
     int directive_keyword,
-    int namespaceDirective_semicolon,
     int uriBasedDirective_uriElement,
+    int directive_semicolon,
     List<LinkedNodeBuilder> namespaceDirective_configurations,
     LinkedNodeBuilder uriBasedDirective_uri,
     String namespaceDirective_selectedUriContent,
@@ -9778,9 +10126,9 @@
         _variantField_6 = importDirective_prefix,
         _variantField_15 = importDirective_asKeyword,
         _variantField_16 = importDirective_deferredKeyword,
-        _variantField_17 = directive_keyword,
-        _variantField_18 = namespaceDirective_semicolon,
+        _variantField_18 = directive_keyword,
         _variantField_19 = uriBasedDirective_uriElement,
+        _variantField_33 = directive_semicolon,
         _variantField_3 = namespaceDirective_configurations,
         _variantField_14 = uriBasedDirective_uri,
         _variantField_23 = namespaceDirective_selectedUriContent,
@@ -9900,6 +10248,7 @@
     LinkedNodeBuilder classDeclaration_extendsClause,
     int classDeclaration_abstractKeyword,
     LinkedNodeBuilder classDeclaration_withClause,
+    LinkedNodeBuilder classDeclaration_nativeClause,
     int classDeclaration_classKeyword,
     int classOrMixinDeclaration_rightBracket,
     int classOrMixinDeclaration_leftBracket,
@@ -9907,6 +10256,8 @@
     LinkedNodeBuilder classOrMixinDeclaration_implementsClause,
     List<LinkedNodeBuilder> classOrMixinDeclaration_members,
     LinkedNodeBuilder classOrMixinDeclaration_typeParameters,
+    int codeLength,
+    int codeOffset,
     LinkedNodeBuilder namedCompilationUnitMember_name,
   })  : _kind = idl.LinkedNodeKind.classDeclaration,
         _variantField_11 = annotatedNode_comment,
@@ -9914,6 +10265,7 @@
         _variantField_6 = classDeclaration_extendsClause,
         _variantField_15 = classDeclaration_abstractKeyword,
         _variantField_7 = classDeclaration_withClause,
+        _variantField_8 = classDeclaration_nativeClause,
         _variantField_16 = classDeclaration_classKeyword,
         _variantField_18 = classOrMixinDeclaration_rightBracket,
         _variantField_19 = classOrMixinDeclaration_leftBracket,
@@ -9921,6 +10273,8 @@
         _variantField_12 = classOrMixinDeclaration_implementsClause,
         _variantField_5 = classOrMixinDeclaration_members,
         _variantField_13 = classOrMixinDeclaration_typeParameters,
+        _variantField_34 = codeLength,
+        _variantField_33 = codeOffset,
         _variantField_14 = namedCompilationUnitMember_name;
 
   LinkedNodeBuilder.classTypeAlias({
@@ -9934,6 +10288,8 @@
     int typeAlias_typedefKeyword,
     int typeAlias_semicolon,
     LinkedNodeBuilder classTypeAlias_implementsClause,
+    int codeLength,
+    int codeOffset,
     LinkedNodeBuilder namedCompilationUnitMember_name,
   })  : _kind = idl.LinkedNodeKind.classTypeAlias,
         _variantField_11 = annotatedNode_comment,
@@ -9946,6 +10302,8 @@
         _variantField_18 = typeAlias_typedefKeyword,
         _variantField_19 = typeAlias_semicolon,
         _variantField_9 = classTypeAlias_implementsClause,
+        _variantField_34 = codeLength,
+        _variantField_33 = codeOffset,
         _variantField_14 = namedCompilationUnitMember_name;
 
   LinkedNodeBuilder.declaredIdentifier({
@@ -9993,6 +10351,8 @@
     LinkedNodeBuilder functionDeclaration_returnType,
     int functionDeclaration_propertyKeyword,
     LinkedNodeTypeBuilder functionDeclaration_returnType2,
+    int codeLength,
+    int codeOffset,
     LinkedNodeBuilder namedCompilationUnitMember_name,
   })  : _kind = idl.LinkedNodeKind.functionDeclaration,
         _variantField_11 = annotatedNode_comment,
@@ -10002,6 +10362,8 @@
         _variantField_7 = functionDeclaration_returnType,
         _variantField_16 = functionDeclaration_propertyKeyword,
         _variantField_24 = functionDeclaration_returnType2,
+        _variantField_34 = codeLength,
+        _variantField_33 = codeOffset,
         _variantField_14 = namedCompilationUnitMember_name;
 
   LinkedNodeBuilder.functionTypeAlias({
@@ -10013,6 +10375,8 @@
     int typeAlias_typedefKeyword,
     int typeAlias_semicolon,
     LinkedNodeTypeBuilder functionTypeAlias_returnType2,
+    int codeLength,
+    int codeOffset,
     LinkedNodeBuilder namedCompilationUnitMember_name,
   })  : _kind = idl.LinkedNodeKind.functionTypeAlias,
         _variantField_11 = annotatedNode_comment,
@@ -10023,6 +10387,8 @@
         _variantField_18 = typeAlias_typedefKeyword,
         _variantField_19 = typeAlias_semicolon,
         _variantField_24 = functionTypeAlias_returnType2,
+        _variantField_34 = codeLength,
+        _variantField_33 = codeOffset,
         _variantField_14 = namedCompilationUnitMember_name;
 
   LinkedNodeBuilder.genericTypeAlias({
@@ -10033,6 +10399,8 @@
     int genericTypeAlias_equals,
     int typeAlias_typedefKeyword,
     int typeAlias_semicolon,
+    int codeLength,
+    int codeOffset,
     LinkedNodeBuilder namedCompilationUnitMember_name,
   })  : _kind = idl.LinkedNodeKind.genericTypeAlias,
         _variantField_11 = annotatedNode_comment,
@@ -10042,6 +10410,8 @@
         _variantField_16 = genericTypeAlias_equals,
         _variantField_18 = typeAlias_typedefKeyword,
         _variantField_19 = typeAlias_semicolon,
+        _variantField_34 = codeLength,
+        _variantField_33 = codeOffset,
         _variantField_14 = namedCompilationUnitMember_name;
 
   LinkedNodeBuilder.libraryDirective({
@@ -10049,13 +10419,13 @@
     List<LinkedNodeBuilder> annotatedNode_metadata,
     LinkedNodeBuilder libraryDirective_name,
     int directive_keyword,
-    int namespaceDirective_semicolon,
+    int directive_semicolon,
   })  : _kind = idl.LinkedNodeKind.libraryDirective,
         _variantField_11 = annotatedNode_comment,
         _variantField_4 = annotatedNode_metadata,
         _variantField_6 = libraryDirective_name,
-        _variantField_17 = directive_keyword,
-        _variantField_18 = namespaceDirective_semicolon;
+        _variantField_18 = directive_keyword,
+        _variantField_33 = directive_semicolon;
 
   LinkedNodeBuilder.methodDeclaration({
     LinkedNodeBuilder annotatedNode_comment,
@@ -10070,6 +10440,8 @@
     int methodDeclaration_actualProperty,
     LinkedNodeTypeBuilder methodDeclaration_returnType2,
     LinkedNodeBuilder methodDeclaration_typeParameters,
+    int codeLength,
+    int codeOffset,
     LinkedNodeBuilder methodDeclaration_name,
   })  : _kind = idl.LinkedNodeKind.methodDeclaration,
         _variantField_11 = annotatedNode_comment,
@@ -10084,6 +10456,8 @@
         _variantField_19 = methodDeclaration_actualProperty,
         _variantField_24 = methodDeclaration_returnType2,
         _variantField_9 = methodDeclaration_typeParameters,
+        _variantField_34 = codeLength,
+        _variantField_33 = codeOffset,
         _variantField_10 = methodDeclaration_name;
 
   LinkedNodeBuilder.mixinDeclaration({
@@ -10096,6 +10470,8 @@
     LinkedNodeBuilder classOrMixinDeclaration_implementsClause,
     List<LinkedNodeBuilder> classOrMixinDeclaration_members,
     LinkedNodeBuilder classOrMixinDeclaration_typeParameters,
+    int codeLength,
+    int codeOffset,
     LinkedNodeBuilder namedCompilationUnitMember_name,
   })  : _kind = idl.LinkedNodeKind.mixinDeclaration,
         _variantField_11 = annotatedNode_comment,
@@ -10107,23 +10483,25 @@
         _variantField_12 = classOrMixinDeclaration_implementsClause,
         _variantField_5 = classOrMixinDeclaration_members,
         _variantField_13 = classOrMixinDeclaration_typeParameters,
+        _variantField_34 = codeLength,
+        _variantField_33 = codeOffset,
         _variantField_14 = namedCompilationUnitMember_name;
 
   LinkedNodeBuilder.partDirective({
     LinkedNodeBuilder annotatedNode_comment,
     List<LinkedNodeBuilder> annotatedNode_metadata,
     int directive_keyword,
-    int namespaceDirective_semicolon,
     int uriBasedDirective_uriElement,
+    int directive_semicolon,
     LinkedNodeBuilder uriBasedDirective_uri,
     String namespaceDirective_selectedUriContent,
     String uriBasedDirective_uriContent,
   })  : _kind = idl.LinkedNodeKind.partDirective,
         _variantField_11 = annotatedNode_comment,
         _variantField_4 = annotatedNode_metadata,
-        _variantField_17 = directive_keyword,
-        _variantField_18 = namespaceDirective_semicolon,
+        _variantField_18 = directive_keyword,
         _variantField_19 = uriBasedDirective_uriElement,
+        _variantField_33 = directive_semicolon,
         _variantField_14 = uriBasedDirective_uri,
         _variantField_23 = namespaceDirective_selectedUriContent,
         _variantField_22 = uriBasedDirective_uriContent;
@@ -10132,19 +10510,19 @@
     LinkedNodeBuilder annotatedNode_comment,
     List<LinkedNodeBuilder> annotatedNode_metadata,
     LinkedNodeBuilder partOfDirective_libraryName,
-    int partOfDirective_semicolon,
     LinkedNodeBuilder partOfDirective_uri,
     int partOfDirective_ofKeyword,
     int directive_keyword,
+    int directive_semicolon,
     String namespaceDirective_selectedUriContent,
   })  : _kind = idl.LinkedNodeKind.partOfDirective,
         _variantField_11 = annotatedNode_comment,
         _variantField_4 = annotatedNode_metadata,
         _variantField_6 = partOfDirective_libraryName,
-        _variantField_15 = partOfDirective_semicolon,
         _variantField_7 = partOfDirective_uri,
         _variantField_16 = partOfDirective_ofKeyword,
-        _variantField_17 = directive_keyword,
+        _variantField_18 = directive_keyword,
+        _variantField_33 = directive_semicolon,
         _variantField_23 = namespaceDirective_selectedUriContent;
 
   LinkedNodeBuilder.topLevelVariableDeclaration({
@@ -10164,12 +10542,16 @@
     LinkedNodeBuilder typeParameter_bound,
     int typeParameter_extendsKeyword,
     LinkedNodeBuilder typeParameter_name,
+    int codeLength,
+    int codeOffset,
   })  : _kind = idl.LinkedNodeKind.typeParameter,
         _variantField_11 = annotatedNode_comment,
         _variantField_4 = annotatedNode_metadata,
         _variantField_6 = typeParameter_bound,
         _variantField_15 = typeParameter_extendsKeyword,
-        _variantField_7 = typeParameter_name;
+        _variantField_7 = typeParameter_name,
+        _variantField_34 = codeLength,
+        _variantField_33 = codeOffset;
 
   LinkedNodeBuilder.variableDeclaration({
     LinkedNodeBuilder annotatedNode_comment,
@@ -10178,6 +10560,8 @@
     int variableDeclaration_equals,
     LinkedNodeBuilder variableDeclaration_name,
     LinkedNodeTypeBuilder variableDeclaration_type2,
+    int codeLength,
+    int codeOffset,
     LinkedNodeVariablesDeclarationBuilder variableDeclaration_declaration,
   })  : _kind = idl.LinkedNodeKind.variableDeclaration,
         _variantField_11 = annotatedNode_comment,
@@ -10186,6 +10570,8 @@
         _variantField_15 = variableDeclaration_equals,
         _variantField_7 = variableDeclaration_name,
         _variantField_24 = variableDeclaration_type2,
+        _variantField_34 = codeLength,
+        _variantField_33 = codeOffset,
         _variantField_32 = variableDeclaration_declaration;
 
   LinkedNodeBuilder.fieldFormalParameter({
@@ -10200,6 +10586,8 @@
     LinkedNodeTypeBuilder fieldFormalParameter_type2,
     bool normalFormalParameter_isCovariant,
     LinkedNodeBuilder normalFormalParameter_identifier,
+    int codeLength,
+    int codeOffset,
     idl.LinkedNodeFormalParameterKind formalParameter_kind,
     LinkedNodeBuilder normalFormalParameter_comment,
   })  : _kind = idl.LinkedNodeKind.fieldFormalParameter,
@@ -10214,6 +10602,8 @@
         _variantField_24 = fieldFormalParameter_type2,
         _variantField_27 = normalFormalParameter_isCovariant,
         _variantField_12 = normalFormalParameter_identifier,
+        _variantField_34 = codeLength,
+        _variantField_33 = codeOffset,
         _variantField_26 = formalParameter_kind,
         _variantField_14 = normalFormalParameter_comment;
 
@@ -10223,8 +10613,11 @@
     LinkedNodeBuilder functionTypedFormalParameter_returnType,
     LinkedNodeBuilder functionTypedFormalParameter_typeParameters,
     int normalFormalParameter_covariantKeyword,
+    LinkedNodeTypeBuilder functionTypedFormalParameter_type2,
     bool normalFormalParameter_isCovariant,
     LinkedNodeBuilder normalFormalParameter_identifier,
+    int codeLength,
+    int codeOffset,
     idl.LinkedNodeFormalParameterKind formalParameter_kind,
     LinkedNodeBuilder normalFormalParameter_comment,
   })  : _kind = idl.LinkedNodeKind.functionTypedFormalParameter,
@@ -10233,8 +10626,11 @@
         _variantField_7 = functionTypedFormalParameter_returnType,
         _variantField_8 = functionTypedFormalParameter_typeParameters,
         _variantField_19 = normalFormalParameter_covariantKeyword,
+        _variantField_24 = functionTypedFormalParameter_type2,
         _variantField_27 = normalFormalParameter_isCovariant,
         _variantField_12 = normalFormalParameter_identifier,
+        _variantField_34 = codeLength,
+        _variantField_33 = codeOffset,
         _variantField_26 = formalParameter_kind,
         _variantField_14 = normalFormalParameter_comment;
 
@@ -10246,6 +10642,8 @@
     LinkedNodeTypeBuilder simpleFormalParameter_type2,
     bool normalFormalParameter_isCovariant,
     LinkedNodeBuilder normalFormalParameter_identifier,
+    int codeLength,
+    int codeOffset,
     idl.LinkedNodeFormalParameterKind formalParameter_kind,
     LinkedNodeBuilder normalFormalParameter_comment,
   })  : _kind = idl.LinkedNodeKind.simpleFormalParameter,
@@ -10256,6 +10654,8 @@
         _variantField_24 = simpleFormalParameter_type2,
         _variantField_27 = normalFormalParameter_isCovariant,
         _variantField_12 = normalFormalParameter_identifier,
+        _variantField_34 = codeLength,
+        _variantField_33 = codeOffset,
         _variantField_26 = formalParameter_kind,
         _variantField_14 = normalFormalParameter_comment;
 
@@ -10485,11 +10885,15 @@
     int defaultFormalParameter_separator,
     LinkedNodeBuilder defaultFormalParameter_parameter,
     bool defaultFormalParameter_isNamed,
+    int codeLength,
+    int codeOffset,
   })  : _kind = idl.LinkedNodeKind.defaultFormalParameter,
         _variantField_6 = defaultFormalParameter_defaultValue,
         _variantField_15 = defaultFormalParameter_separator,
         _variantField_7 = defaultFormalParameter_parameter,
-        _variantField_27 = defaultFormalParameter_isNamed;
+        _variantField_27 = defaultFormalParameter_isNamed,
+        _variantField_34 = codeLength,
+        _variantField_33 = codeOffset;
 
   LinkedNodeBuilder.doStatement({
     LinkedNodeBuilder doStatement_body,
@@ -10616,10 +11020,12 @@
     LinkedNodeBuilder functionExpression_body,
     LinkedNodeBuilder functionExpression_formalParameters,
     LinkedNodeBuilder functionExpression_typeParameters,
+    LinkedNodeTypeBuilder functionDeclaration_returnType2,
   })  : _kind = idl.LinkedNodeKind.functionExpression,
         _variantField_6 = functionExpression_body,
         _variantField_7 = functionExpression_formalParameters,
-        _variantField_8 = functionExpression_typeParameters;
+        _variantField_8 = functionExpression_typeParameters,
+        _variantField_24 = functionDeclaration_returnType2;
 
   LinkedNodeBuilder.functionExpressionInvocation({
     LinkedNodeBuilder functionExpressionInvocation_function,
@@ -10641,13 +11047,15 @@
     LinkedNodeBuilder genericFunctionType_formalParameters,
     int genericFunctionType_question,
     LinkedNodeTypeBuilder genericFunctionType_returnType2,
+    LinkedNodeTypeBuilder genericFunctionType_type,
   })  : _kind = idl.LinkedNodeKind.genericFunctionType,
         _variantField_6 = genericFunctionType_typeParameters,
         _variantField_15 = genericFunctionType_functionKeyword,
         _variantField_7 = genericFunctionType_returnType,
         _variantField_8 = genericFunctionType_formalParameters,
         _variantField_16 = genericFunctionType_question,
-        _variantField_24 = genericFunctionType_returnType2;
+        _variantField_24 = genericFunctionType_returnType2,
+        _variantField_25 = genericFunctionType_type;
 
   LinkedNodeBuilder.ifElement({
     LinkedNodeBuilder ifMixin_condition,
@@ -10687,6 +11095,7 @@
     LinkedNodeBuilder indexExpression_index,
     int indexExpression_element,
     LinkedNodeBuilder indexExpression_target,
+    int indexExpression_period,
     int indexExpression_leftBracket,
     int indexExpression_rightBracket,
     LinkedNodeTypeBuilder expression_type,
@@ -10694,8 +11103,9 @@
         _variantField_6 = indexExpression_index,
         _variantField_15 = indexExpression_element,
         _variantField_7 = indexExpression_target,
-        _variantField_16 = indexExpression_leftBracket,
-        _variantField_17 = indexExpression_rightBracket,
+        _variantField_16 = indexExpression_period,
+        _variantField_17 = indexExpression_leftBracket,
+        _variantField_18 = indexExpression_rightBracket,
         _variantField_25 = expression_type;
 
   LinkedNodeBuilder.instanceCreationExpression({
@@ -10775,6 +11185,22 @@
         _variantField_7 = namedExpression_name,
         _variantField_25 = expression_type;
 
+  LinkedNodeBuilder.nativeClause({
+    LinkedNodeBuilder nativeClause_name,
+    int nativeClause_nativeKeyword,
+  })  : _kind = idl.LinkedNodeKind.nativeClause,
+        _variantField_6 = nativeClause_name,
+        _variantField_15 = nativeClause_nativeKeyword;
+
+  LinkedNodeBuilder.nativeFunctionBody({
+    LinkedNodeBuilder nativeFunctionBody_stringLiteral,
+    int nativeFunctionBody_nativeKeyword,
+    int nativeFunctionBody_semicolon,
+  })  : _kind = idl.LinkedNodeKind.nativeFunctionBody,
+        _variantField_6 = nativeFunctionBody_stringLiteral,
+        _variantField_15 = nativeFunctionBody_nativeKeyword,
+        _variantField_16 = nativeFunctionBody_semicolon;
+
   LinkedNodeBuilder.parenthesizedExpression({
     LinkedNodeBuilder parenthesizedExpression_expression,
     int parenthesizedExpression_leftParenthesis,
@@ -11142,6 +11568,8 @@
     signature.addBool(this._variantField_31 == true);
     signature.addBool(this._variantField_32 != null);
     this._variantField_32?.collectApiSignature(signature);
+    signature.addInt(this._variantField_33 ?? 0);
+    signature.addInt(this._variantField_34 ?? 0);
   }
 
   fb.Offset finish(fb.Builder fbBuilder) {
@@ -11285,6 +11713,12 @@
     if (offset_variantField_13 != null) {
       fbBuilder.addOffset(13, offset_variantField_13);
     }
+    if (_variantField_34 != null && _variantField_34 != 0) {
+      fbBuilder.addUint32(34, _variantField_34);
+    }
+    if (_variantField_33 != null && _variantField_33 != 0) {
+      fbBuilder.addUint32(33, _variantField_33);
+    }
     if (offset_variantField_28 != null) {
       fbBuilder.addOffset(28, offset_variantField_28);
     }
@@ -11372,6 +11806,8 @@
   idl.LinkedNode _variantField_12;
   List<idl.LinkedNode> _variantField_5;
   idl.LinkedNode _variantField_13;
+  int _variantField_34;
+  int _variantField_33;
   List<int> _variantField_28;
   idl.LinkedNodeCommentType _variantField_29;
   List<idl.LinkedNode> _variantField_3;
@@ -12130,6 +12566,22 @@
   }
 
   @override
+  idl.LinkedNode get nativeClause_name {
+    assert(kind == idl.LinkedNodeKind.nativeClause);
+    _variantField_6 ??=
+        const _LinkedNodeReader().vTableGet(_bc, _bcOffset, 6, null);
+    return _variantField_6;
+  }
+
+  @override
+  idl.LinkedNode get nativeFunctionBody_stringLiteral {
+    assert(kind == idl.LinkedNodeKind.nativeFunctionBody);
+    _variantField_6 ??=
+        const _LinkedNodeReader().vTableGet(_bc, _bcOffset, 6, null);
+    return _variantField_6;
+  }
+
+  @override
   idl.LinkedNode get parenthesizedExpression_expression {
     assert(kind == idl.LinkedNodeKind.parenthesizedExpression);
     _variantField_6 ??=
@@ -12750,6 +13202,22 @@
   }
 
   @override
+  int get nativeClause_nativeKeyword {
+    assert(kind == idl.LinkedNodeKind.nativeClause);
+    _variantField_15 ??=
+        const fb.Uint32Reader().vTableGet(_bc, _bcOffset, 15, 0);
+    return _variantField_15;
+  }
+
+  @override
+  int get nativeFunctionBody_nativeKeyword {
+    assert(kind == idl.LinkedNodeKind.nativeFunctionBody);
+    _variantField_15 ??=
+        const fb.Uint32Reader().vTableGet(_bc, _bcOffset, 15, 0);
+    return _variantField_15;
+  }
+
+  @override
   int get nullLiteral_literal {
     assert(kind == idl.LinkedNodeKind.nullLiteral);
     _variantField_15 ??=
@@ -12774,14 +13242,6 @@
   }
 
   @override
-  int get partOfDirective_semicolon {
-    assert(kind == idl.LinkedNodeKind.partOfDirective);
-    _variantField_15 ??=
-        const fb.Uint32Reader().vTableGet(_bc, _bcOffset, 15, 0);
-    return _variantField_15;
-  }
-
-  @override
   int get postfixExpression_element {
     assert(kind == idl.LinkedNodeKind.postfixExpression);
     _variantField_15 ??=
@@ -13447,6 +13907,14 @@
   }
 
   @override
+  idl.LinkedNode get classDeclaration_nativeClause {
+    assert(kind == idl.LinkedNodeKind.classDeclaration);
+    _variantField_8 ??=
+        const _LinkedNodeReader().vTableGet(_bc, _bcOffset, 8, null);
+    return _variantField_8;
+  }
+
+  @override
   idl.LinkedNode get classTypeAlias_withClause {
     assert(kind == idl.LinkedNodeKind.classTypeAlias);
     _variantField_8 ??=
@@ -13810,7 +14278,7 @@
   }
 
   @override
-  int get indexExpression_leftBracket {
+  int get indexExpression_period {
     assert(kind == idl.LinkedNodeKind.indexExpression);
     _variantField_16 ??=
         const fb.Uint32Reader().vTableGet(_bc, _bcOffset, 16, 0);
@@ -13858,6 +14326,14 @@
   }
 
   @override
+  int get nativeFunctionBody_semicolon {
+    assert(kind == idl.LinkedNodeKind.nativeFunctionBody);
+    _variantField_16 ??=
+        const fb.Uint32Reader().vTableGet(_bc, _bcOffset, 16, 0);
+    return _variantField_16;
+  }
+
+  @override
   int get parenthesizedExpression_rightParenthesis {
     assert(kind == idl.LinkedNodeKind.parenthesizedExpression);
     _variantField_16 ??=
@@ -14035,18 +14511,6 @@
   }
 
   @override
-  int get directive_keyword {
-    assert(kind == idl.LinkedNodeKind.exportDirective ||
-        kind == idl.LinkedNodeKind.importDirective ||
-        kind == idl.LinkedNodeKind.libraryDirective ||
-        kind == idl.LinkedNodeKind.partDirective ||
-        kind == idl.LinkedNodeKind.partOfDirective);
-    _variantField_17 ??=
-        const fb.Uint32Reader().vTableGet(_bc, _bcOffset, 17, 0);
-    return _variantField_17;
-  }
-
-  @override
   int get doStatement_doKeyword {
     assert(kind == idl.LinkedNodeKind.doStatement);
     _variantField_17 ??=
@@ -14113,7 +14577,7 @@
   }
 
   @override
-  int get indexExpression_rightBracket {
+  int get indexExpression_leftBracket {
     assert(kind == idl.LinkedNodeKind.indexExpression);
     _variantField_17 ??=
         const fb.Uint32Reader().vTableGet(_bc, _bcOffset, 17, 0);
@@ -14218,6 +14682,18 @@
   }
 
   @override
+  int get directive_keyword {
+    assert(kind == idl.LinkedNodeKind.exportDirective ||
+        kind == idl.LinkedNodeKind.importDirective ||
+        kind == idl.LinkedNodeKind.libraryDirective ||
+        kind == idl.LinkedNodeKind.partDirective ||
+        kind == idl.LinkedNodeKind.partOfDirective);
+    _variantField_18 ??=
+        const fb.Uint32Reader().vTableGet(_bc, _bcOffset, 18, 0);
+    return _variantField_18;
+  }
+
+  @override
   int get doStatement_semicolon {
     assert(kind == idl.LinkedNodeKind.doStatement);
     _variantField_18 ??=
@@ -14243,19 +14719,16 @@
   }
 
   @override
-  int get methodDeclaration_propertyKeyword {
-    assert(kind == idl.LinkedNodeKind.methodDeclaration);
+  int get indexExpression_rightBracket {
+    assert(kind == idl.LinkedNodeKind.indexExpression);
     _variantField_18 ??=
         const fb.Uint32Reader().vTableGet(_bc, _bcOffset, 18, 0);
     return _variantField_18;
   }
 
   @override
-  int get namespaceDirective_semicolon {
-    assert(kind == idl.LinkedNodeKind.exportDirective ||
-        kind == idl.LinkedNodeKind.importDirective ||
-        kind == idl.LinkedNodeKind.libraryDirective ||
-        kind == idl.LinkedNodeKind.partDirective);
+  int get methodDeclaration_propertyKeyword {
+    assert(kind == idl.LinkedNodeKind.methodDeclaration);
     _variantField_18 ??=
         const fb.Uint32Reader().vTableGet(_bc, _bcOffset, 18, 0);
     return _variantField_18;
@@ -14411,7 +14884,8 @@
 
   @override
   idl.LinkedNodeType get functionDeclaration_returnType2 {
-    assert(kind == idl.LinkedNodeKind.functionDeclaration);
+    assert(kind == idl.LinkedNodeKind.functionDeclaration ||
+        kind == idl.LinkedNodeKind.functionExpression);
     _variantField_24 ??=
         const _LinkedNodeTypeReader().vTableGet(_bc, _bcOffset, 24, null);
     return _variantField_24;
@@ -14426,6 +14900,14 @@
   }
 
   @override
+  idl.LinkedNodeType get functionTypedFormalParameter_type2 {
+    assert(kind == idl.LinkedNodeKind.functionTypedFormalParameter);
+    _variantField_24 ??=
+        const _LinkedNodeTypeReader().vTableGet(_bc, _bcOffset, 24, null);
+    return _variantField_24;
+  }
+
+  @override
   idl.LinkedNodeType get genericFunctionType_returnType2 {
     assert(kind == idl.LinkedNodeKind.genericFunctionType);
     _variantField_24 ??=
@@ -14614,6 +15096,62 @@
   }
 
   @override
+  int get codeLength {
+    assert(kind == idl.LinkedNodeKind.classDeclaration ||
+        kind == idl.LinkedNodeKind.classTypeAlias ||
+        kind == idl.LinkedNodeKind.constructorDeclaration ||
+        kind == idl.LinkedNodeKind.defaultFormalParameter ||
+        kind == idl.LinkedNodeKind.enumDeclaration ||
+        kind == idl.LinkedNodeKind.fieldFormalParameter ||
+        kind == idl.LinkedNodeKind.functionDeclaration ||
+        kind == idl.LinkedNodeKind.functionTypeAlias ||
+        kind == idl.LinkedNodeKind.functionTypedFormalParameter ||
+        kind == idl.LinkedNodeKind.genericTypeAlias ||
+        kind == idl.LinkedNodeKind.methodDeclaration ||
+        kind == idl.LinkedNodeKind.mixinDeclaration ||
+        kind == idl.LinkedNodeKind.simpleFormalParameter ||
+        kind == idl.LinkedNodeKind.typeParameter ||
+        kind == idl.LinkedNodeKind.variableDeclaration);
+    _variantField_34 ??=
+        const fb.Uint32Reader().vTableGet(_bc, _bcOffset, 34, 0);
+    return _variantField_34;
+  }
+
+  @override
+  int get codeOffset {
+    assert(kind == idl.LinkedNodeKind.classDeclaration ||
+        kind == idl.LinkedNodeKind.classTypeAlias ||
+        kind == idl.LinkedNodeKind.constructorDeclaration ||
+        kind == idl.LinkedNodeKind.defaultFormalParameter ||
+        kind == idl.LinkedNodeKind.enumDeclaration ||
+        kind == idl.LinkedNodeKind.fieldFormalParameter ||
+        kind == idl.LinkedNodeKind.functionDeclaration ||
+        kind == idl.LinkedNodeKind.functionTypeAlias ||
+        kind == idl.LinkedNodeKind.functionTypedFormalParameter ||
+        kind == idl.LinkedNodeKind.genericTypeAlias ||
+        kind == idl.LinkedNodeKind.methodDeclaration ||
+        kind == idl.LinkedNodeKind.mixinDeclaration ||
+        kind == idl.LinkedNodeKind.simpleFormalParameter ||
+        kind == idl.LinkedNodeKind.typeParameter ||
+        kind == idl.LinkedNodeKind.variableDeclaration);
+    _variantField_33 ??=
+        const fb.Uint32Reader().vTableGet(_bc, _bcOffset, 33, 0);
+    return _variantField_33;
+  }
+
+  @override
+  int get directive_semicolon {
+    assert(kind == idl.LinkedNodeKind.exportDirective ||
+        kind == idl.LinkedNodeKind.importDirective ||
+        kind == idl.LinkedNodeKind.libraryDirective ||
+        kind == idl.LinkedNodeKind.partDirective ||
+        kind == idl.LinkedNodeKind.partOfDirective);
+    _variantField_33 ??=
+        const fb.Uint32Reader().vTableGet(_bc, _bcOffset, 33, 0);
+    return _variantField_33;
+  }
+
+  @override
   List<int> get comment_tokens {
     assert(kind == idl.LinkedNodeKind.comment);
     _variantField_28 ??= const fb.Uint32ListReader()
@@ -14730,6 +15268,14 @@
   }
 
   @override
+  idl.LinkedNodeType get genericFunctionType_type {
+    assert(kind == idl.LinkedNodeKind.genericFunctionType);
+    _variantField_25 ??=
+        const _LinkedNodeTypeReader().vTableGet(_bc, _bcOffset, 25, null);
+    return _variantField_25;
+  }
+
+  @override
   idl.LinkedNodeFormalParameterKind get formalParameter_kind {
     assert(kind == idl.LinkedNodeKind.fieldFormalParameter ||
         kind == idl.LinkedNodeKind.functionTypedFormalParameter ||
@@ -14956,6 +15502,8 @@
       if (constructorDeclaration_redirectedConstructor != null)
         _result["constructorDeclaration_redirectedConstructor"] =
             constructorDeclaration_redirectedConstructor.toJson();
+      if (codeLength != 0) _result["codeLength"] = codeLength;
+      if (codeOffset != 0) _result["codeOffset"] = codeOffset;
       if (constructorDeclaration_returnType != null)
         _result["constructorDeclaration_returnType"] =
             constructorDeclaration_returnType.toJson();
@@ -14980,6 +15528,8 @@
         _result["enumDeclaration_leftBracket"] = enumDeclaration_leftBracket;
       if (enumDeclaration_rightBracket != 0)
         _result["enumDeclaration_rightBracket"] = enumDeclaration_rightBracket;
+      if (codeLength != 0) _result["codeLength"] = codeLength;
+      if (codeOffset != 0) _result["codeOffset"] = codeOffset;
       if (namedCompilationUnitMember_name != null)
         _result["namedCompilationUnitMember_name"] =
             namedCompilationUnitMember_name.toJson();
@@ -15063,10 +15613,10 @@
             annotatedNode_metadata.map((_value) => _value.toJson()).toList();
       if (directive_keyword != 0)
         _result["directive_keyword"] = directive_keyword;
-      if (namespaceDirective_semicolon != 0)
-        _result["namespaceDirective_semicolon"] = namespaceDirective_semicolon;
       if (uriBasedDirective_uriElement != 0)
         _result["uriBasedDirective_uriElement"] = uriBasedDirective_uriElement;
+      if (directive_semicolon != 0)
+        _result["directive_semicolon"] = directive_semicolon;
       if (namespaceDirective_configurations.isNotEmpty)
         _result["namespaceDirective_configurations"] =
             namespaceDirective_configurations
@@ -15100,10 +15650,10 @@
             importDirective_deferredKeyword;
       if (directive_keyword != 0)
         _result["directive_keyword"] = directive_keyword;
-      if (namespaceDirective_semicolon != 0)
-        _result["namespaceDirective_semicolon"] = namespaceDirective_semicolon;
       if (uriBasedDirective_uriElement != 0)
         _result["uriBasedDirective_uriElement"] = uriBasedDirective_uriElement;
+      if (directive_semicolon != 0)
+        _result["directive_semicolon"] = directive_semicolon;
       if (namespaceDirective_configurations.isNotEmpty)
         _result["namespaceDirective_configurations"] =
             namespaceDirective_configurations
@@ -15260,6 +15810,9 @@
       if (classDeclaration_withClause != null)
         _result["classDeclaration_withClause"] =
             classDeclaration_withClause.toJson();
+      if (classDeclaration_nativeClause != null)
+        _result["classDeclaration_nativeClause"] =
+            classDeclaration_nativeClause.toJson();
       if (classDeclaration_classKeyword != 0)
         _result["classDeclaration_classKeyword"] =
             classDeclaration_classKeyword;
@@ -15283,6 +15836,8 @@
       if (classOrMixinDeclaration_typeParameters != null)
         _result["classOrMixinDeclaration_typeParameters"] =
             classOrMixinDeclaration_typeParameters.toJson();
+      if (codeLength != 0) _result["codeLength"] = codeLength;
+      if (codeOffset != 0) _result["codeOffset"] = codeOffset;
       if (namedCompilationUnitMember_name != null)
         _result["namedCompilationUnitMember_name"] =
             namedCompilationUnitMember_name.toJson();
@@ -15314,6 +15869,8 @@
       if (classTypeAlias_implementsClause != null)
         _result["classTypeAlias_implementsClause"] =
             classTypeAlias_implementsClause.toJson();
+      if (codeLength != 0) _result["codeLength"] = codeLength;
+      if (codeOffset != 0) _result["codeOffset"] = codeOffset;
       if (namedCompilationUnitMember_name != null)
         _result["namedCompilationUnitMember_name"] =
             namedCompilationUnitMember_name.toJson();
@@ -15380,6 +15937,8 @@
       if (functionDeclaration_returnType2 != null)
         _result["functionDeclaration_returnType2"] =
             functionDeclaration_returnType2.toJson();
+      if (codeLength != 0) _result["codeLength"] = codeLength;
+      if (codeOffset != 0) _result["codeOffset"] = codeOffset;
       if (namedCompilationUnitMember_name != null)
         _result["namedCompilationUnitMember_name"] =
             namedCompilationUnitMember_name.toJson();
@@ -15406,6 +15965,8 @@
       if (functionTypeAlias_returnType2 != null)
         _result["functionTypeAlias_returnType2"] =
             functionTypeAlias_returnType2.toJson();
+      if (codeLength != 0) _result["codeLength"] = codeLength;
+      if (codeOffset != 0) _result["codeOffset"] = codeOffset;
       if (namedCompilationUnitMember_name != null)
         _result["namedCompilationUnitMember_name"] =
             namedCompilationUnitMember_name.toJson();
@@ -15428,6 +15989,8 @@
         _result["typeAlias_typedefKeyword"] = typeAlias_typedefKeyword;
       if (typeAlias_semicolon != 0)
         _result["typeAlias_semicolon"] = typeAlias_semicolon;
+      if (codeLength != 0) _result["codeLength"] = codeLength;
+      if (codeOffset != 0) _result["codeOffset"] = codeOffset;
       if (namedCompilationUnitMember_name != null)
         _result["namedCompilationUnitMember_name"] =
             namedCompilationUnitMember_name.toJson();
@@ -15442,8 +16005,8 @@
         _result["libraryDirective_name"] = libraryDirective_name.toJson();
       if (directive_keyword != 0)
         _result["directive_keyword"] = directive_keyword;
-      if (namespaceDirective_semicolon != 0)
-        _result["namespaceDirective_semicolon"] = namespaceDirective_semicolon;
+      if (directive_semicolon != 0)
+        _result["directive_semicolon"] = directive_semicolon;
     }
     if (kind == idl.LinkedNodeKind.methodDeclaration) {
       if (annotatedNode_comment != null)
@@ -15480,6 +16043,8 @@
       if (methodDeclaration_typeParameters != null)
         _result["methodDeclaration_typeParameters"] =
             methodDeclaration_typeParameters.toJson();
+      if (codeLength != 0) _result["codeLength"] = codeLength;
+      if (codeOffset != 0) _result["codeOffset"] = codeOffset;
       if (methodDeclaration_name != null)
         _result["methodDeclaration_name"] = methodDeclaration_name.toJson();
     }
@@ -15512,6 +16077,8 @@
       if (classOrMixinDeclaration_typeParameters != null)
         _result["classOrMixinDeclaration_typeParameters"] =
             classOrMixinDeclaration_typeParameters.toJson();
+      if (codeLength != 0) _result["codeLength"] = codeLength;
+      if (codeOffset != 0) _result["codeOffset"] = codeOffset;
       if (namedCompilationUnitMember_name != null)
         _result["namedCompilationUnitMember_name"] =
             namedCompilationUnitMember_name.toJson();
@@ -15524,10 +16091,10 @@
             annotatedNode_metadata.map((_value) => _value.toJson()).toList();
       if (directive_keyword != 0)
         _result["directive_keyword"] = directive_keyword;
-      if (namespaceDirective_semicolon != 0)
-        _result["namespaceDirective_semicolon"] = namespaceDirective_semicolon;
       if (uriBasedDirective_uriElement != 0)
         _result["uriBasedDirective_uriElement"] = uriBasedDirective_uriElement;
+      if (directive_semicolon != 0)
+        _result["directive_semicolon"] = directive_semicolon;
       if (uriBasedDirective_uri != null)
         _result["uriBasedDirective_uri"] = uriBasedDirective_uri.toJson();
       if (namespaceDirective_selectedUriContent != '')
@@ -15545,14 +16112,14 @@
       if (partOfDirective_libraryName != null)
         _result["partOfDirective_libraryName"] =
             partOfDirective_libraryName.toJson();
-      if (partOfDirective_semicolon != 0)
-        _result["partOfDirective_semicolon"] = partOfDirective_semicolon;
       if (partOfDirective_uri != null)
         _result["partOfDirective_uri"] = partOfDirective_uri.toJson();
       if (partOfDirective_ofKeyword != 0)
         _result["partOfDirective_ofKeyword"] = partOfDirective_ofKeyword;
       if (directive_keyword != 0)
         _result["directive_keyword"] = directive_keyword;
+      if (directive_semicolon != 0)
+        _result["directive_semicolon"] = directive_semicolon;
       if (namespaceDirective_selectedUriContent != '')
         _result["namespaceDirective_selectedUriContent"] =
             namespaceDirective_selectedUriContent;
@@ -15582,6 +16149,8 @@
         _result["typeParameter_extendsKeyword"] = typeParameter_extendsKeyword;
       if (typeParameter_name != null)
         _result["typeParameter_name"] = typeParameter_name.toJson();
+      if (codeLength != 0) _result["codeLength"] = codeLength;
+      if (codeOffset != 0) _result["codeOffset"] = codeOffset;
     }
     if (kind == idl.LinkedNodeKind.variableDeclaration) {
       if (annotatedNode_comment != null)
@@ -15599,6 +16168,8 @@
       if (variableDeclaration_type2 != null)
         _result["variableDeclaration_type2"] =
             variableDeclaration_type2.toJson();
+      if (codeLength != 0) _result["codeLength"] = codeLength;
+      if (codeOffset != 0) _result["codeOffset"] = codeOffset;
       if (variableDeclaration_declaration != null)
         _result["variableDeclaration_declaration"] =
             variableDeclaration_declaration.toJson();
@@ -15637,6 +16208,8 @@
       if (normalFormalParameter_identifier != null)
         _result["normalFormalParameter_identifier"] =
             normalFormalParameter_identifier.toJson();
+      if (codeLength != 0) _result["codeLength"] = codeLength;
+      if (codeOffset != 0) _result["codeOffset"] = codeOffset;
       if (formalParameter_kind != idl.LinkedNodeFormalParameterKind.required)
         _result["formalParameter_kind"] =
             formalParameter_kind.toString().split('.')[1];
@@ -15662,12 +16235,17 @@
       if (normalFormalParameter_covariantKeyword != 0)
         _result["normalFormalParameter_covariantKeyword"] =
             normalFormalParameter_covariantKeyword;
+      if (functionTypedFormalParameter_type2 != null)
+        _result["functionTypedFormalParameter_type2"] =
+            functionTypedFormalParameter_type2.toJson();
       if (normalFormalParameter_isCovariant != false)
         _result["normalFormalParameter_isCovariant"] =
             normalFormalParameter_isCovariant;
       if (normalFormalParameter_identifier != null)
         _result["normalFormalParameter_identifier"] =
             normalFormalParameter_identifier.toJson();
+      if (codeLength != 0) _result["codeLength"] = codeLength;
+      if (codeOffset != 0) _result["codeOffset"] = codeOffset;
       if (formalParameter_kind != idl.LinkedNodeFormalParameterKind.required)
         _result["formalParameter_kind"] =
             formalParameter_kind.toString().split('.')[1];
@@ -15699,6 +16277,8 @@
       if (normalFormalParameter_identifier != null)
         _result["normalFormalParameter_identifier"] =
             normalFormalParameter_identifier.toJson();
+      if (codeLength != 0) _result["codeLength"] = codeLength;
+      if (codeOffset != 0) _result["codeOffset"] = codeOffset;
       if (formalParameter_kind != idl.LinkedNodeFormalParameterKind.required)
         _result["formalParameter_kind"] =
             formalParameter_kind.toString().split('.')[1];
@@ -15959,6 +16539,8 @@
       if (defaultFormalParameter_isNamed != false)
         _result["defaultFormalParameter_isNamed"] =
             defaultFormalParameter_isNamed;
+      if (codeLength != 0) _result["codeLength"] = codeLength;
+      if (codeOffset != 0) _result["codeOffset"] = codeOffset;
     }
     if (kind == idl.LinkedNodeKind.doStatement) {
       if (doStatement_body != null)
@@ -16091,6 +16673,9 @@
       if (functionExpression_typeParameters != null)
         _result["functionExpression_typeParameters"] =
             functionExpression_typeParameters.toJson();
+      if (functionDeclaration_returnType2 != null)
+        _result["functionDeclaration_returnType2"] =
+            functionDeclaration_returnType2.toJson();
     }
     if (kind == idl.LinkedNodeKind.functionExpressionInvocation) {
       if (functionExpressionInvocation_function != null)
@@ -16126,6 +16711,8 @@
       if (genericFunctionType_returnType2 != null)
         _result["genericFunctionType_returnType2"] =
             genericFunctionType_returnType2.toJson();
+      if (genericFunctionType_type != null)
+        _result["genericFunctionType_type"] = genericFunctionType_type.toJson();
     }
     if (kind == idl.LinkedNodeKind.ifElement) {
       if (ifMixin_condition != null)
@@ -16168,6 +16755,8 @@
         _result["indexExpression_element"] = indexExpression_element;
       if (indexExpression_target != null)
         _result["indexExpression_target"] = indexExpression_target.toJson();
+      if (indexExpression_period != 0)
+        _result["indexExpression_period"] = indexExpression_period;
       if (indexExpression_leftBracket != 0)
         _result["indexExpression_leftBracket"] = indexExpression_leftBracket;
       if (indexExpression_rightBracket != 0)
@@ -16255,6 +16844,22 @@
       if (expression_type != null)
         _result["expression_type"] = expression_type.toJson();
     }
+    if (kind == idl.LinkedNodeKind.nativeClause) {
+      if (nativeClause_name != null)
+        _result["nativeClause_name"] = nativeClause_name.toJson();
+      if (nativeClause_nativeKeyword != 0)
+        _result["nativeClause_nativeKeyword"] = nativeClause_nativeKeyword;
+    }
+    if (kind == idl.LinkedNodeKind.nativeFunctionBody) {
+      if (nativeFunctionBody_stringLiteral != null)
+        _result["nativeFunctionBody_stringLiteral"] =
+            nativeFunctionBody_stringLiteral.toJson();
+      if (nativeFunctionBody_nativeKeyword != 0)
+        _result["nativeFunctionBody_nativeKeyword"] =
+            nativeFunctionBody_nativeKeyword;
+      if (nativeFunctionBody_semicolon != 0)
+        _result["nativeFunctionBody_semicolon"] = nativeFunctionBody_semicolon;
+    }
     if (kind == idl.LinkedNodeKind.parenthesizedExpression) {
       if (parenthesizedExpression_expression != null)
         _result["parenthesizedExpression_expression"] =
@@ -16582,6 +17187,8 @@
         "constructorDeclaration_separator": constructorDeclaration_separator,
         "constructorDeclaration_redirectedConstructor":
             constructorDeclaration_redirectedConstructor,
+        "codeLength": codeLength,
+        "codeOffset": codeOffset,
         "constructorDeclaration_returnType": constructorDeclaration_returnType,
         "isSynthetic": isSynthetic,
         "kind": kind,
@@ -16602,6 +17209,8 @@
         "enumDeclaration_enumKeyword": enumDeclaration_enumKeyword,
         "enumDeclaration_leftBracket": enumDeclaration_leftBracket,
         "enumDeclaration_rightBracket": enumDeclaration_rightBracket,
+        "codeLength": codeLength,
+        "codeOffset": codeOffset,
         "namedCompilationUnitMember_name": namedCompilationUnitMember_name,
         "isSynthetic": isSynthetic,
         "kind": kind,
@@ -16671,8 +17280,8 @@
         "annotatedNode_comment": annotatedNode_comment,
         "annotatedNode_metadata": annotatedNode_metadata,
         "directive_keyword": directive_keyword,
-        "namespaceDirective_semicolon": namespaceDirective_semicolon,
         "uriBasedDirective_uriElement": uriBasedDirective_uriElement,
+        "directive_semicolon": directive_semicolon,
         "namespaceDirective_configurations": namespaceDirective_configurations,
         "uriBasedDirective_uri": uriBasedDirective_uri,
         "isSynthetic": isSynthetic,
@@ -16691,8 +17300,8 @@
         "importDirective_asKeyword": importDirective_asKeyword,
         "importDirective_deferredKeyword": importDirective_deferredKeyword,
         "directive_keyword": directive_keyword,
-        "namespaceDirective_semicolon": namespaceDirective_semicolon,
         "uriBasedDirective_uriElement": uriBasedDirective_uriElement,
+        "directive_semicolon": directive_semicolon,
         "namespaceDirective_configurations": namespaceDirective_configurations,
         "uriBasedDirective_uri": uriBasedDirective_uri,
         "isSynthetic": isSynthetic,
@@ -16808,6 +17417,7 @@
         "classDeclaration_extendsClause": classDeclaration_extendsClause,
         "classDeclaration_abstractKeyword": classDeclaration_abstractKeyword,
         "classDeclaration_withClause": classDeclaration_withClause,
+        "classDeclaration_nativeClause": classDeclaration_nativeClause,
         "classDeclaration_classKeyword": classDeclaration_classKeyword,
         "classOrMixinDeclaration_rightBracket":
             classOrMixinDeclaration_rightBracket,
@@ -16819,6 +17429,8 @@
         "classOrMixinDeclaration_members": classOrMixinDeclaration_members,
         "classOrMixinDeclaration_typeParameters":
             classOrMixinDeclaration_typeParameters,
+        "codeLength": codeLength,
+        "codeOffset": codeOffset,
         "namedCompilationUnitMember_name": namedCompilationUnitMember_name,
         "isSynthetic": isSynthetic,
         "kind": kind,
@@ -16836,6 +17448,8 @@
         "typeAlias_typedefKeyword": typeAlias_typedefKeyword,
         "typeAlias_semicolon": typeAlias_semicolon,
         "classTypeAlias_implementsClause": classTypeAlias_implementsClause,
+        "codeLength": codeLength,
+        "codeOffset": codeOffset,
         "namedCompilationUnitMember_name": namedCompilationUnitMember_name,
         "isSynthetic": isSynthetic,
         "kind": kind,
@@ -16885,6 +17499,8 @@
         "functionDeclaration_propertyKeyword":
             functionDeclaration_propertyKeyword,
         "functionDeclaration_returnType2": functionDeclaration_returnType2,
+        "codeLength": codeLength,
+        "codeOffset": codeOffset,
         "namedCompilationUnitMember_name": namedCompilationUnitMember_name,
         "isSynthetic": isSynthetic,
         "kind": kind,
@@ -16901,6 +17517,8 @@
         "typeAlias_typedefKeyword": typeAlias_typedefKeyword,
         "typeAlias_semicolon": typeAlias_semicolon,
         "functionTypeAlias_returnType2": functionTypeAlias_returnType2,
+        "codeLength": codeLength,
+        "codeOffset": codeOffset,
         "namedCompilationUnitMember_name": namedCompilationUnitMember_name,
         "isSynthetic": isSynthetic,
         "kind": kind,
@@ -16915,6 +17533,8 @@
         "genericTypeAlias_equals": genericTypeAlias_equals,
         "typeAlias_typedefKeyword": typeAlias_typedefKeyword,
         "typeAlias_semicolon": typeAlias_semicolon,
+        "codeLength": codeLength,
+        "codeOffset": codeOffset,
         "namedCompilationUnitMember_name": namedCompilationUnitMember_name,
         "isSynthetic": isSynthetic,
         "kind": kind,
@@ -16926,7 +17546,7 @@
         "annotatedNode_metadata": annotatedNode_metadata,
         "libraryDirective_name": libraryDirective_name,
         "directive_keyword": directive_keyword,
-        "namespaceDirective_semicolon": namespaceDirective_semicolon,
+        "directive_semicolon": directive_semicolon,
         "isSynthetic": isSynthetic,
         "kind": kind,
       };
@@ -16946,6 +17566,8 @@
         "methodDeclaration_actualProperty": methodDeclaration_actualProperty,
         "methodDeclaration_returnType2": methodDeclaration_returnType2,
         "methodDeclaration_typeParameters": methodDeclaration_typeParameters,
+        "codeLength": codeLength,
+        "codeOffset": codeOffset,
         "methodDeclaration_name": methodDeclaration_name,
         "isSynthetic": isSynthetic,
         "kind": kind,
@@ -16966,6 +17588,8 @@
         "classOrMixinDeclaration_members": classOrMixinDeclaration_members,
         "classOrMixinDeclaration_typeParameters":
             classOrMixinDeclaration_typeParameters,
+        "codeLength": codeLength,
+        "codeOffset": codeOffset,
         "namedCompilationUnitMember_name": namedCompilationUnitMember_name,
         "isSynthetic": isSynthetic,
         "kind": kind,
@@ -16976,8 +17600,8 @@
         "annotatedNode_comment": annotatedNode_comment,
         "annotatedNode_metadata": annotatedNode_metadata,
         "directive_keyword": directive_keyword,
-        "namespaceDirective_semicolon": namespaceDirective_semicolon,
         "uriBasedDirective_uriElement": uriBasedDirective_uriElement,
+        "directive_semicolon": directive_semicolon,
         "uriBasedDirective_uri": uriBasedDirective_uri,
         "isSynthetic": isSynthetic,
         "kind": kind,
@@ -16991,10 +17615,10 @@
         "annotatedNode_comment": annotatedNode_comment,
         "annotatedNode_metadata": annotatedNode_metadata,
         "partOfDirective_libraryName": partOfDirective_libraryName,
-        "partOfDirective_semicolon": partOfDirective_semicolon,
         "partOfDirective_uri": partOfDirective_uri,
         "partOfDirective_ofKeyword": partOfDirective_ofKeyword,
         "directive_keyword": directive_keyword,
+        "directive_semicolon": directive_semicolon,
         "isSynthetic": isSynthetic,
         "kind": kind,
         "namespaceDirective_selectedUriContent":
@@ -17020,6 +17644,8 @@
         "typeParameter_bound": typeParameter_bound,
         "typeParameter_extendsKeyword": typeParameter_extendsKeyword,
         "typeParameter_name": typeParameter_name,
+        "codeLength": codeLength,
+        "codeOffset": codeOffset,
         "isSynthetic": isSynthetic,
         "kind": kind,
       };
@@ -17032,6 +17658,8 @@
         "variableDeclaration_equals": variableDeclaration_equals,
         "variableDeclaration_name": variableDeclaration_name,
         "variableDeclaration_type2": variableDeclaration_type2,
+        "codeLength": codeLength,
+        "codeOffset": codeOffset,
         "isSynthetic": isSynthetic,
         "kind": kind,
         "variableDeclaration_declaration": variableDeclaration_declaration,
@@ -17053,6 +17681,8 @@
         "fieldFormalParameter_type2": fieldFormalParameter_type2,
         "normalFormalParameter_isCovariant": normalFormalParameter_isCovariant,
         "normalFormalParameter_identifier": normalFormalParameter_identifier,
+        "codeLength": codeLength,
+        "codeOffset": codeOffset,
         "formalParameter_kind": formalParameter_kind,
         "normalFormalParameter_comment": normalFormalParameter_comment,
         "isSynthetic": isSynthetic,
@@ -17070,8 +17700,12 @@
             functionTypedFormalParameter_typeParameters,
         "normalFormalParameter_covariantKeyword":
             normalFormalParameter_covariantKeyword,
+        "functionTypedFormalParameter_type2":
+            functionTypedFormalParameter_type2,
         "normalFormalParameter_isCovariant": normalFormalParameter_isCovariant,
         "normalFormalParameter_identifier": normalFormalParameter_identifier,
+        "codeLength": codeLength,
+        "codeOffset": codeOffset,
         "formalParameter_kind": formalParameter_kind,
         "normalFormalParameter_comment": normalFormalParameter_comment,
         "isSynthetic": isSynthetic,
@@ -17088,6 +17722,8 @@
         "simpleFormalParameter_type2": simpleFormalParameter_type2,
         "normalFormalParameter_isCovariant": normalFormalParameter_isCovariant,
         "normalFormalParameter_identifier": normalFormalParameter_identifier,
+        "codeLength": codeLength,
+        "codeOffset": codeOffset,
         "formalParameter_kind": formalParameter_kind,
         "normalFormalParameter_comment": normalFormalParameter_comment,
         "isSynthetic": isSynthetic,
@@ -17297,6 +17933,8 @@
         "defaultFormalParameter_separator": defaultFormalParameter_separator,
         "defaultFormalParameter_parameter": defaultFormalParameter_parameter,
         "defaultFormalParameter_isNamed": defaultFormalParameter_isNamed,
+        "codeLength": codeLength,
+        "codeOffset": codeOffset,
         "isSynthetic": isSynthetic,
         "kind": kind,
       };
@@ -17422,6 +18060,7 @@
         "functionExpression_formalParameters":
             functionExpression_formalParameters,
         "functionExpression_typeParameters": functionExpression_typeParameters,
+        "functionDeclaration_returnType2": functionDeclaration_returnType2,
         "isSynthetic": isSynthetic,
         "kind": kind,
       };
@@ -17450,6 +18089,7 @@
             genericFunctionType_formalParameters,
         "genericFunctionType_question": genericFunctionType_question,
         "genericFunctionType_returnType2": genericFunctionType_returnType2,
+        "genericFunctionType_type": genericFunctionType_type,
         "isSynthetic": isSynthetic,
         "kind": kind,
       };
@@ -17485,6 +18125,7 @@
         "indexExpression_index": indexExpression_index,
         "indexExpression_element": indexExpression_element,
         "indexExpression_target": indexExpression_target,
+        "indexExpression_period": indexExpression_period,
         "indexExpression_leftBracket": indexExpression_leftBracket,
         "indexExpression_rightBracket": indexExpression_rightBracket,
         "expression_type": expression_type,
@@ -17570,6 +18211,23 @@
         "kind": kind,
       };
     }
+    if (kind == idl.LinkedNodeKind.nativeClause) {
+      return {
+        "nativeClause_name": nativeClause_name,
+        "nativeClause_nativeKeyword": nativeClause_nativeKeyword,
+        "isSynthetic": isSynthetic,
+        "kind": kind,
+      };
+    }
+    if (kind == idl.LinkedNodeKind.nativeFunctionBody) {
+      return {
+        "nativeFunctionBody_stringLiteral": nativeFunctionBody_stringLiteral,
+        "nativeFunctionBody_nativeKeyword": nativeFunctionBody_nativeKeyword,
+        "nativeFunctionBody_semicolon": nativeFunctionBody_semicolon,
+        "isSynthetic": isSynthetic,
+        "kind": kind,
+      };
+    }
     if (kind == idl.LinkedNodeKind.parenthesizedExpression) {
       return {
         "parenthesizedExpression_expression":
@@ -18354,21 +19012,22 @@
 class LinkedNodeTypeBuilder extends Object
     with _LinkedNodeTypeMixin
     implements idl.LinkedNodeType {
-  List<int> _functionFormalParameters;
+  List<LinkedNodeTypeFormalParameterBuilder> _functionFormalParameters;
   LinkedNodeTypeBuilder _functionReturnType;
   List<int> _functionTypeParameters;
+  int _genericTypeAliasReference;
+  List<LinkedNodeTypeBuilder> _genericTypeAliasTypeArguments;
   int _interfaceClass;
   List<LinkedNodeTypeBuilder> _interfaceTypeArguments;
   idl.LinkedNodeTypeKind _kind;
   int _typeParameterParameter;
 
   @override
-  List<int> get functionFormalParameters =>
-      _functionFormalParameters ??= <int>[];
+  List<LinkedNodeTypeFormalParameterBuilder> get functionFormalParameters =>
+      _functionFormalParameters ??= <LinkedNodeTypeFormalParameterBuilder>[];
 
-  /// References to [LinkedNodeReferences].
-  void set functionFormalParameters(List<int> value) {
-    assert(value == null || value.every((e) => e >= 0));
+  void set functionFormalParameters(
+      List<LinkedNodeTypeFormalParameterBuilder> value) {
     this._functionFormalParameters = value;
   }
 
@@ -18389,6 +19048,22 @@
   }
 
   @override
+  int get genericTypeAliasReference => _genericTypeAliasReference ??= 0;
+
+  void set genericTypeAliasReference(int value) {
+    assert(value == null || value >= 0);
+    this._genericTypeAliasReference = value;
+  }
+
+  @override
+  List<LinkedNodeTypeBuilder> get genericTypeAliasTypeArguments =>
+      _genericTypeAliasTypeArguments ??= <LinkedNodeTypeBuilder>[];
+
+  void set genericTypeAliasTypeArguments(List<LinkedNodeTypeBuilder> value) {
+    this._genericTypeAliasTypeArguments = value;
+  }
+
+  @override
   int get interfaceClass => _interfaceClass ??= 0;
 
   /// Reference to a [LinkedNodeReferences].
@@ -18422,9 +19097,11 @@
   }
 
   LinkedNodeTypeBuilder(
-      {List<int> functionFormalParameters,
+      {List<LinkedNodeTypeFormalParameterBuilder> functionFormalParameters,
       LinkedNodeTypeBuilder functionReturnType,
       List<int> functionTypeParameters,
+      int genericTypeAliasReference,
+      List<LinkedNodeTypeBuilder> genericTypeAliasTypeArguments,
       int interfaceClass,
       List<LinkedNodeTypeBuilder> interfaceTypeArguments,
       idl.LinkedNodeTypeKind kind,
@@ -18432,6 +19109,8 @@
       : _functionFormalParameters = functionFormalParameters,
         _functionReturnType = functionReturnType,
         _functionTypeParameters = functionTypeParameters,
+        _genericTypeAliasReference = genericTypeAliasReference,
+        _genericTypeAliasTypeArguments = genericTypeAliasTypeArguments,
         _interfaceClass = interfaceClass,
         _interfaceTypeArguments = interfaceTypeArguments,
         _kind = kind,
@@ -18441,7 +19120,9 @@
    * Flush [informative] data recursively.
    */
   void flushInformative() {
+    _functionFormalParameters?.forEach((b) => b.flushInformative());
     _functionReturnType?.flushInformative();
+    _genericTypeAliasTypeArguments?.forEach((b) => b.flushInformative());
     _interfaceTypeArguments?.forEach((b) => b.flushInformative());
   }
 
@@ -18454,7 +19135,7 @@
     } else {
       signature.addInt(this._functionFormalParameters.length);
       for (var x in this._functionFormalParameters) {
-        signature.addInt(x);
+        x?.collectApiSignature(signature);
       }
     }
     signature.addBool(this._functionReturnType != null);
@@ -18478,17 +19159,27 @@
     }
     signature.addInt(this._kind == null ? 0 : this._kind.index);
     signature.addInt(this._typeParameterParameter ?? 0);
+    signature.addInt(this._genericTypeAliasReference ?? 0);
+    if (this._genericTypeAliasTypeArguments == null) {
+      signature.addInt(0);
+    } else {
+      signature.addInt(this._genericTypeAliasTypeArguments.length);
+      for (var x in this._genericTypeAliasTypeArguments) {
+        x?.collectApiSignature(signature);
+      }
+    }
   }
 
   fb.Offset finish(fb.Builder fbBuilder) {
     fb.Offset offset_functionFormalParameters;
     fb.Offset offset_functionReturnType;
     fb.Offset offset_functionTypeParameters;
+    fb.Offset offset_genericTypeAliasTypeArguments;
     fb.Offset offset_interfaceTypeArguments;
     if (!(_functionFormalParameters == null ||
         _functionFormalParameters.isEmpty)) {
-      offset_functionFormalParameters =
-          fbBuilder.writeListUint32(_functionFormalParameters);
+      offset_functionFormalParameters = fbBuilder.writeList(
+          _functionFormalParameters.map((b) => b.finish(fbBuilder)).toList());
     }
     if (_functionReturnType != null) {
       offset_functionReturnType = _functionReturnType.finish(fbBuilder);
@@ -18497,6 +19188,13 @@
       offset_functionTypeParameters =
           fbBuilder.writeListUint32(_functionTypeParameters);
     }
+    if (!(_genericTypeAliasTypeArguments == null ||
+        _genericTypeAliasTypeArguments.isEmpty)) {
+      offset_genericTypeAliasTypeArguments = fbBuilder.writeList(
+          _genericTypeAliasTypeArguments
+              .map((b) => b.finish(fbBuilder))
+              .toList());
+    }
     if (!(_interfaceTypeArguments == null || _interfaceTypeArguments.isEmpty)) {
       offset_interfaceTypeArguments = fbBuilder.writeList(
           _interfaceTypeArguments.map((b) => b.finish(fbBuilder)).toList());
@@ -18511,6 +19209,12 @@
     if (offset_functionTypeParameters != null) {
       fbBuilder.addOffset(2, offset_functionTypeParameters);
     }
+    if (_genericTypeAliasReference != null && _genericTypeAliasReference != 0) {
+      fbBuilder.addUint32(7, _genericTypeAliasReference);
+    }
+    if (offset_genericTypeAliasTypeArguments != null) {
+      fbBuilder.addOffset(8, offset_genericTypeAliasTypeArguments);
+    }
     if (_interfaceClass != null && _interfaceClass != 0) {
       fbBuilder.addUint32(3, _interfaceClass);
     }
@@ -18543,18 +19247,23 @@
 
   _LinkedNodeTypeImpl(this._bc, this._bcOffset);
 
-  List<int> _functionFormalParameters;
+  List<idl.LinkedNodeTypeFormalParameter> _functionFormalParameters;
   idl.LinkedNodeType _functionReturnType;
   List<int> _functionTypeParameters;
+  int _genericTypeAliasReference;
+  List<idl.LinkedNodeType> _genericTypeAliasTypeArguments;
   int _interfaceClass;
   List<idl.LinkedNodeType> _interfaceTypeArguments;
   idl.LinkedNodeTypeKind _kind;
   int _typeParameterParameter;
 
   @override
-  List<int> get functionFormalParameters {
+  List<idl.LinkedNodeTypeFormalParameter> get functionFormalParameters {
     _functionFormalParameters ??=
-        const fb.Uint32ListReader().vTableGet(_bc, _bcOffset, 0, const <int>[]);
+        const fb.ListReader<idl.LinkedNodeTypeFormalParameter>(
+                const _LinkedNodeTypeFormalParameterReader())
+            .vTableGet(
+                _bc, _bcOffset, 0, const <idl.LinkedNodeTypeFormalParameter>[]);
     return _functionFormalParameters;
   }
 
@@ -18573,6 +19282,21 @@
   }
 
   @override
+  int get genericTypeAliasReference {
+    _genericTypeAliasReference ??=
+        const fb.Uint32Reader().vTableGet(_bc, _bcOffset, 7, 0);
+    return _genericTypeAliasReference;
+  }
+
+  @override
+  List<idl.LinkedNodeType> get genericTypeAliasTypeArguments {
+    _genericTypeAliasTypeArguments ??=
+        const fb.ListReader<idl.LinkedNodeType>(const _LinkedNodeTypeReader())
+            .vTableGet(_bc, _bcOffset, 8, const <idl.LinkedNodeType>[]);
+    return _genericTypeAliasTypeArguments;
+  }
+
+  @override
   int get interfaceClass {
     _interfaceClass ??= const fb.Uint32Reader().vTableGet(_bc, _bcOffset, 3, 0);
     return _interfaceClass;
@@ -18606,11 +19330,18 @@
   Map<String, Object> toJson() {
     Map<String, Object> _result = <String, Object>{};
     if (functionFormalParameters.isNotEmpty)
-      _result["functionFormalParameters"] = functionFormalParameters;
+      _result["functionFormalParameters"] =
+          functionFormalParameters.map((_value) => _value.toJson()).toList();
     if (functionReturnType != null)
       _result["functionReturnType"] = functionReturnType.toJson();
     if (functionTypeParameters.isNotEmpty)
       _result["functionTypeParameters"] = functionTypeParameters;
+    if (genericTypeAliasReference != 0)
+      _result["genericTypeAliasReference"] = genericTypeAliasReference;
+    if (genericTypeAliasTypeArguments.isNotEmpty)
+      _result["genericTypeAliasTypeArguments"] = genericTypeAliasTypeArguments
+          .map((_value) => _value.toJson())
+          .toList();
     if (interfaceClass != 0) _result["interfaceClass"] = interfaceClass;
     if (interfaceTypeArguments.isNotEmpty)
       _result["interfaceTypeArguments"] =
@@ -18627,6 +19358,8 @@
         "functionFormalParameters": functionFormalParameters,
         "functionReturnType": functionReturnType,
         "functionTypeParameters": functionTypeParameters,
+        "genericTypeAliasReference": genericTypeAliasReference,
+        "genericTypeAliasTypeArguments": genericTypeAliasTypeArguments,
         "interfaceClass": interfaceClass,
         "interfaceTypeArguments": interfaceTypeArguments,
         "kind": kind,
@@ -18637,6 +19370,148 @@
   String toString() => convert.json.encode(toJson());
 }
 
+class LinkedNodeTypeFormalParameterBuilder extends Object
+    with _LinkedNodeTypeFormalParameterMixin
+    implements idl.LinkedNodeTypeFormalParameter {
+  idl.LinkedNodeFormalParameterKind _kind;
+  String _name;
+  LinkedNodeTypeBuilder _type;
+
+  @override
+  idl.LinkedNodeFormalParameterKind get kind =>
+      _kind ??= idl.LinkedNodeFormalParameterKind.required;
+
+  void set kind(idl.LinkedNodeFormalParameterKind value) {
+    this._kind = value;
+  }
+
+  @override
+  String get name => _name ??= '';
+
+  void set name(String value) {
+    this._name = value;
+  }
+
+  @override
+  LinkedNodeTypeBuilder get type => _type;
+
+  void set type(LinkedNodeTypeBuilder value) {
+    this._type = value;
+  }
+
+  LinkedNodeTypeFormalParameterBuilder(
+      {idl.LinkedNodeFormalParameterKind kind,
+      String name,
+      LinkedNodeTypeBuilder type})
+      : _kind = kind,
+        _name = name,
+        _type = type;
+
+  /**
+   * Flush [informative] data recursively.
+   */
+  void flushInformative() {
+    _type?.flushInformative();
+  }
+
+  /**
+   * Accumulate non-[informative] data into [signature].
+   */
+  void collectApiSignature(api_sig.ApiSignature signature) {
+    signature.addInt(this._kind == null ? 0 : this._kind.index);
+    signature.addString(this._name ?? '');
+    signature.addBool(this._type != null);
+    this._type?.collectApiSignature(signature);
+  }
+
+  fb.Offset finish(fb.Builder fbBuilder) {
+    fb.Offset offset_name;
+    fb.Offset offset_type;
+    if (_name != null) {
+      offset_name = fbBuilder.writeString(_name);
+    }
+    if (_type != null) {
+      offset_type = _type.finish(fbBuilder);
+    }
+    fbBuilder.startTable();
+    if (_kind != null && _kind != idl.LinkedNodeFormalParameterKind.required) {
+      fbBuilder.addUint8(0, _kind.index);
+    }
+    if (offset_name != null) {
+      fbBuilder.addOffset(1, offset_name);
+    }
+    if (offset_type != null) {
+      fbBuilder.addOffset(2, offset_type);
+    }
+    return fbBuilder.endTable();
+  }
+}
+
+class _LinkedNodeTypeFormalParameterReader
+    extends fb.TableReader<_LinkedNodeTypeFormalParameterImpl> {
+  const _LinkedNodeTypeFormalParameterReader();
+
+  @override
+  _LinkedNodeTypeFormalParameterImpl createObject(
+          fb.BufferContext bc, int offset) =>
+      new _LinkedNodeTypeFormalParameterImpl(bc, offset);
+}
+
+class _LinkedNodeTypeFormalParameterImpl extends Object
+    with _LinkedNodeTypeFormalParameterMixin
+    implements idl.LinkedNodeTypeFormalParameter {
+  final fb.BufferContext _bc;
+  final int _bcOffset;
+
+  _LinkedNodeTypeFormalParameterImpl(this._bc, this._bcOffset);
+
+  idl.LinkedNodeFormalParameterKind _kind;
+  String _name;
+  idl.LinkedNodeType _type;
+
+  @override
+  idl.LinkedNodeFormalParameterKind get kind {
+    _kind ??= const _LinkedNodeFormalParameterKindReader().vTableGet(
+        _bc, _bcOffset, 0, idl.LinkedNodeFormalParameterKind.required);
+    return _kind;
+  }
+
+  @override
+  String get name {
+    _name ??= const fb.StringReader().vTableGet(_bc, _bcOffset, 1, '');
+    return _name;
+  }
+
+  @override
+  idl.LinkedNodeType get type {
+    _type ??= const _LinkedNodeTypeReader().vTableGet(_bc, _bcOffset, 2, null);
+    return _type;
+  }
+}
+
+abstract class _LinkedNodeTypeFormalParameterMixin
+    implements idl.LinkedNodeTypeFormalParameter {
+  @override
+  Map<String, Object> toJson() {
+    Map<String, Object> _result = <String, Object>{};
+    if (kind != idl.LinkedNodeFormalParameterKind.required)
+      _result["kind"] = kind.toString().split('.')[1];
+    if (name != '') _result["name"] = name;
+    if (type != null) _result["type"] = type.toJson();
+    return _result;
+  }
+
+  @override
+  Map<String, Object> toMap() => {
+        "kind": kind,
+        "name": name,
+        "type": type,
+      };
+
+  @override
+  String toString() => convert.json.encode(toJson());
+}
+
 class LinkedNodeUnitBuilder extends Object
     with _LinkedNodeUnitMixin
     implements idl.LinkedNodeUnit {
@@ -18783,6 +19658,7 @@
     implements idl.LinkedNodeVariablesDeclaration {
   LinkedNodeBuilder _comment;
   bool _isConst;
+  bool _isCovariant;
   bool _isFinal;
   bool _isStatic;
 
@@ -18801,6 +19677,13 @@
   }
 
   @override
+  bool get isCovariant => _isCovariant ??= false;
+
+  void set isCovariant(bool value) {
+    this._isCovariant = value;
+  }
+
+  @override
   bool get isFinal => _isFinal ??= false;
 
   void set isFinal(bool value) {
@@ -18815,9 +19698,14 @@
   }
 
   LinkedNodeVariablesDeclarationBuilder(
-      {LinkedNodeBuilder comment, bool isConst, bool isFinal, bool isStatic})
+      {LinkedNodeBuilder comment,
+      bool isConst,
+      bool isCovariant,
+      bool isFinal,
+      bool isStatic})
       : _comment = comment,
         _isConst = isConst,
+        _isCovariant = isCovariant,
         _isFinal = isFinal,
         _isStatic = isStatic;
 
@@ -18832,11 +19720,12 @@
    * Accumulate non-[informative] data into [signature].
    */
   void collectApiSignature(api_sig.ApiSignature signature) {
-    signature.addBool(this._isConst == true);
-    signature.addBool(this._isFinal == true);
-    signature.addBool(this._isStatic == true);
     signature.addBool(this._comment != null);
     this._comment?.collectApiSignature(signature);
+    signature.addBool(this._isConst == true);
+    signature.addBool(this._isCovariant == true);
+    signature.addBool(this._isFinal == true);
+    signature.addBool(this._isStatic == true);
   }
 
   fb.Offset finish(fb.Builder fbBuilder) {
@@ -18846,17 +19735,20 @@
     }
     fbBuilder.startTable();
     if (offset_comment != null) {
-      fbBuilder.addOffset(3, offset_comment);
+      fbBuilder.addOffset(0, offset_comment);
     }
     if (_isConst == true) {
-      fbBuilder.addBool(0, true);
-    }
-    if (_isFinal == true) {
       fbBuilder.addBool(1, true);
     }
-    if (_isStatic == true) {
+    if (_isCovariant == true) {
       fbBuilder.addBool(2, true);
     }
+    if (_isFinal == true) {
+      fbBuilder.addBool(3, true);
+    }
+    if (_isStatic == true) {
+      fbBuilder.addBool(4, true);
+    }
     return fbBuilder.endTable();
   }
 }
@@ -18881,30 +19773,37 @@
 
   idl.LinkedNode _comment;
   bool _isConst;
+  bool _isCovariant;
   bool _isFinal;
   bool _isStatic;
 
   @override
   idl.LinkedNode get comment {
-    _comment ??= const _LinkedNodeReader().vTableGet(_bc, _bcOffset, 3, null);
+    _comment ??= const _LinkedNodeReader().vTableGet(_bc, _bcOffset, 0, null);
     return _comment;
   }
 
   @override
   bool get isConst {
-    _isConst ??= const fb.BoolReader().vTableGet(_bc, _bcOffset, 0, false);
+    _isConst ??= const fb.BoolReader().vTableGet(_bc, _bcOffset, 1, false);
     return _isConst;
   }
 
   @override
+  bool get isCovariant {
+    _isCovariant ??= const fb.BoolReader().vTableGet(_bc, _bcOffset, 2, false);
+    return _isCovariant;
+  }
+
+  @override
   bool get isFinal {
-    _isFinal ??= const fb.BoolReader().vTableGet(_bc, _bcOffset, 1, false);
+    _isFinal ??= const fb.BoolReader().vTableGet(_bc, _bcOffset, 3, false);
     return _isFinal;
   }
 
   @override
   bool get isStatic {
-    _isStatic ??= const fb.BoolReader().vTableGet(_bc, _bcOffset, 2, false);
+    _isStatic ??= const fb.BoolReader().vTableGet(_bc, _bcOffset, 4, false);
     return _isStatic;
   }
 }
@@ -18916,6 +19815,7 @@
     Map<String, Object> _result = <String, Object>{};
     if (comment != null) _result["comment"] = comment.toJson();
     if (isConst != false) _result["isConst"] = isConst;
+    if (isCovariant != false) _result["isCovariant"] = isCovariant;
     if (isFinal != false) _result["isFinal"] = isFinal;
     if (isStatic != false) _result["isStatic"] = isStatic;
     return _result;
@@ -18925,6 +19825,7 @@
   Map<String, Object> toMap() => {
         "comment": comment,
         "isConst": isConst,
+        "isCovariant": isCovariant,
         "isFinal": isFinal,
         "isStatic": isStatic,
       };
diff --git a/pkg/analyzer/lib/src/summary/format.fbs b/pkg/analyzer/lib/src/summary/format.fbs
index 6cd172f..bab0ccd 100644
--- a/pkg/analyzer/lib/src/summary/format.fbs
+++ b/pkg/analyzer/lib/src/summary/format.fbs
@@ -1,9 +1,11 @@
-// Copyright (c) 2015, the Dart project authors.  Please see the AUTHORS file
+// Copyright (c) 2015, the Dart project authors. Please see the AUTHORS file
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
 //
 // This file has been automatically generated.  Please do not edit it manually.
-// To regenerate the file, use the script "pkg/analyzer/tool/generate_files".
+// To regenerate the file, use the SDK script
+// "pkg/analyzer/tool/summary/generate.dart $IDL_FILE_PATH",
+// or "pkg/analyzer/tool/generate_files" for the analyzer package IDL/sources.
 
 
 /// Enum of declaration kinds in available files.
@@ -12,6 +14,8 @@
 
   CLASS_TYPE_ALIAS,
 
+  CONSTRUCTOR,
+
   ENUM,
 
   ENUM_CONSTANT,
@@ -309,6 +313,10 @@
 
   namedExpression,
 
+  nativeClause,
+
+  nativeFunctionBody,
+
   nullLiteral,
 
   onClause,
@@ -991,7 +999,76 @@
   /// other two are collection elements.  Push an "if" element having the given
   /// condition, with the two collection elements as its "then" and "else"
   /// clauses, respectively.
-  ifElseElement
+  ifElseElement,
+
+  /// Pop the top n+2 values from the stack, where n is obtained from
+  /// [UnlinkedExpr.ints].  The first two are the initialization and condition
+  /// of the for-loop; the remainder are the updaters.
+  forParts,
+
+  /// Pop the top 2 values from the stack.  The first is the for loop parts.
+  /// The second is the body.
+  forElement,
+
+  /// Push the empty expression (used for missing initializers and conditions in
+  /// `for` loops)
+  pushEmptyExpression,
+
+  /// Add a variable to the current scope whose name is obtained from
+  /// [UnlinkedExpr.strings].  This is separate from [variableDeclaration]
+  /// because the scope of the variable includes its own initializer.
+  variableDeclarationStart,
+
+  /// Pop the top value from the stack, and use it as the initializer for a
+  /// variable declaration; the variable being declared is obtained by looking
+  /// at the nth variable most recently added to the scope (where n counts from
+  /// zero and is obtained from [UnlinkedExpr.ints]).
+  variableDeclaration,
+
+  /// Pop the top n values from the stack, which should all be variable
+  /// declarations, and use them to create an untyped for-initializer
+  /// declaration.  The value of n is obtained from [UnlinkedExpr.ints].
+  forInitializerDeclarationsUntyped,
+
+  /// Pop the top n values from the stack, which should all be variable
+  /// declarations, and use them to create a typed for-initializer
+  /// declaration.  The value of n is obtained from [UnlinkedExpr.ints].  The
+  /// type is obtained from [UnlinkedExpr.references].
+  forInitializerDeclarationsTyped,
+
+  /// Pop from the stack `value` and get a string from [UnlinkedExpr.strings].
+  /// Use this string to look up a parameter.  Perform `parameter op= value`,
+  /// where `op` is the next assignment operator from
+  /// [UnlinkedExpr.assignmentOperators].  Push `value` back onto the stack.
+  ///
+  /// If the assignment operator is a prefix/postfix increment/decrement, then
+  /// `value` is not present in the stack, so it should not be popped and the
+  /// corresponding value of the parameter after/before update is pushed onto
+  /// the stack instead.
+  assignToParameter,
+
+  /// Pop from the stack an identifier and an expression, and create for-each
+  /// parts of the form `identifier in expression`.
+  forEachPartsWithIdentifier,
+
+  /// Pop the top 2 values from the stack.  The first is the for loop parts.
+  /// The second is the body.
+  forElementWithAwait,
+
+  /// Pop an expression from the stack, and create for-each parts of the form
+  /// `var name in expression`, where `name` is obtained from
+  /// [UnlinkedExpr.strings].
+  forEachPartsWithUntypedDeclaration,
+
+  /// Pop an expression from the stack, and create for-each parts of the form
+  /// `Type name in expression`, where `name` is obtained from
+  /// [UnlinkedExpr.strings], and `Type` is obtained from
+  /// [UnlinkedExpr.references].
+  forEachPartsWithTypedDeclaration,
+
+  /// Pop the top 2 values from the stack, compute `v1 >>> v2`, and push the
+  /// result back onto the stack.
+  bitShiftRightLogical
 }
 
 /// Enum used to indicate the kind of a parameter.
@@ -1526,6 +1603,9 @@
 
 /// Information about an available, even if not yet imported file.
 table AvailableFile {
+  /// The Dartdoc directives in the file.
+  directiveInfo:DirectiveInfo (id: 5);
+
   /// Declarations of the file.
   declarations:[AvailableDeclaration] (id: 0);
 
@@ -1569,6 +1649,15 @@
   offset:uint (id: 0);
 }
 
+/// Information about the Dartdoc directives in an [AvailableFile].
+table DirectiveInfo {
+  /// The names of the defined templates.
+  templateNames:[string] (id: 0);
+
+  /// The values of the defined templates.
+  templateValues:[string] (id: 1);
+}
+
 /// Summary information about a reference to an entity such as a type, top level
 /// executable, or executable within a class.
 table EntityRef {
@@ -1783,6 +1872,10 @@
 
   variantField_13:LinkedNode (id: 13);
 
+  variantField_34:uint (id: 34);
+
+  variantField_33:uint (id: 33);
+
   variantField_28:[uint] (id: 28);
 
   variantField_29:LinkedNodeCommentType (id: 29);
@@ -1849,14 +1942,17 @@
 
 /// Information about a Dart type.
 table LinkedNodeType {
-  /// References to [LinkedNodeReferences].
-  functionFormalParameters:[uint] (id: 0);
+  functionFormalParameters:[LinkedNodeTypeFormalParameter] (id: 0);
 
   functionReturnType:LinkedNodeType (id: 1);
 
   /// References to [LinkedNodeReferences].
   functionTypeParameters:[uint] (id: 2);
 
+  genericTypeAliasReference:uint (id: 7);
+
+  genericTypeAliasTypeArguments:[LinkedNodeType] (id: 8);
+
   /// Reference to a [LinkedNodeReferences].
   interfaceClass:uint (id: 3);
 
@@ -1868,6 +1964,15 @@
   typeParameterParameter:uint (id: 6);
 }
 
+/// Information about a formal parameter in a function type.
+table LinkedNodeTypeFormalParameter {
+  kind:LinkedNodeFormalParameterKind (id: 0);
+
+  name:string (id: 1);
+
+  type:LinkedNodeType (id: 2);
+}
+
 /// Information about a single library in a [LinkedNodeLibrary].
 table LinkedNodeUnit {
   node:LinkedNode (id: 2);
@@ -1880,13 +1985,15 @@
 /// Information about a top-level declaration, or a field declaration that
 /// contributes information to [LinkedNodeKind.variableDeclaration].
 table LinkedNodeVariablesDeclaration {
-  comment:LinkedNode (id: 3);
+  comment:LinkedNode (id: 0);
 
-  isConst:bool (id: 0);
+  isConst:bool (id: 1);
 
-  isFinal:bool (id: 1);
+  isCovariant:bool (id: 2);
 
-  isStatic:bool (id: 2);
+  isFinal:bool (id: 3);
+
+  isStatic:bool (id: 4);
 }
 
 /// Information about the resolution of an [UnlinkedReference].
diff --git a/pkg/analyzer/lib/src/summary/idl.dart b/pkg/analyzer/lib/src/summary/idl.dart
index c9e84f8..60284a3 100644
--- a/pkg/analyzer/lib/src/summary/idl.dart
+++ b/pkg/analyzer/lib/src/summary/idl.dart
@@ -367,6 +367,7 @@
 enum AvailableDeclarationKind {
   CLASS,
   CLASS_TYPE_ALIAS,
+  CONSTRUCTOR,
   ENUM,
   ENUM_CONSTANT,
   FUNCTION,
@@ -383,6 +384,10 @@
   factory AvailableFile.fromBuffer(List<int> buffer) =>
       generated.readAvailableFile(buffer);
 
+  /// The Dartdoc directives in the file.
+  @Id(5)
+  DirectiveInfo get directiveInfo;
+
   /// Declarations of the file.
   @Id(0)
   List<AvailableDeclaration> get declarations;
@@ -437,6 +442,17 @@
   int get offset;
 }
 
+/// Information about the Dartdoc directives in an [AvailableFile].
+abstract class DirectiveInfo extends base.SummaryClass {
+  /// The names of the defined templates.
+  @Id(0)
+  List<String> get templateNames;
+
+  /// The values of the defined templates.
+  @Id(1)
+  List<String> get templateValues;
+}
+
 /// Summary information about a reference to an entity such as a type, top level
 /// executable, or executable within a class.
 abstract class EntityRef extends base.SummaryClass {
@@ -990,6 +1006,9 @@
   @VariantId(27, variant: LinkedNodeKind.classDeclaration)
   bool get classDeclaration_isDartObject;
 
+  @VariantId(8, variant: LinkedNodeKind.classDeclaration)
+  LinkedNode get classDeclaration_nativeClause;
+
   @VariantId(7, variant: LinkedNodeKind.classDeclaration)
   LinkedNode get classDeclaration_withClause;
 
@@ -1041,6 +1060,44 @@
   @VariantId(8, variant: LinkedNodeKind.classTypeAlias)
   LinkedNode get classTypeAlias_withClause;
 
+  @VariantId(34, variantList: [
+    LinkedNodeKind.classDeclaration,
+    LinkedNodeKind.classTypeAlias,
+    LinkedNodeKind.constructorDeclaration,
+    LinkedNodeKind.defaultFormalParameter,
+    LinkedNodeKind.enumDeclaration,
+    LinkedNodeKind.fieldFormalParameter,
+    LinkedNodeKind.functionDeclaration,
+    LinkedNodeKind.functionTypeAlias,
+    LinkedNodeKind.functionTypedFormalParameter,
+    LinkedNodeKind.genericTypeAlias,
+    LinkedNodeKind.methodDeclaration,
+    LinkedNodeKind.mixinDeclaration,
+    LinkedNodeKind.simpleFormalParameter,
+    LinkedNodeKind.typeParameter,
+    LinkedNodeKind.variableDeclaration,
+  ])
+  int get codeLength;
+
+  @VariantId(33, variantList: [
+    LinkedNodeKind.classDeclaration,
+    LinkedNodeKind.classTypeAlias,
+    LinkedNodeKind.constructorDeclaration,
+    LinkedNodeKind.defaultFormalParameter,
+    LinkedNodeKind.enumDeclaration,
+    LinkedNodeKind.fieldFormalParameter,
+    LinkedNodeKind.functionDeclaration,
+    LinkedNodeKind.functionTypeAlias,
+    LinkedNodeKind.functionTypedFormalParameter,
+    LinkedNodeKind.genericTypeAlias,
+    LinkedNodeKind.methodDeclaration,
+    LinkedNodeKind.mixinDeclaration,
+    LinkedNodeKind.simpleFormalParameter,
+    LinkedNodeKind.typeParameter,
+    LinkedNodeKind.variableDeclaration,
+  ])
+  int get codeOffset;
+
   @VariantId(19, variantList: [
     LinkedNodeKind.hideCombinator,
     LinkedNodeKind.showCombinator,
@@ -1194,7 +1251,7 @@
   @VariantId(15, variant: LinkedNodeKind.defaultFormalParameter)
   int get defaultFormalParameter_separator;
 
-  @VariantId(17, variantList: [
+  @VariantId(18, variantList: [
     LinkedNodeKind.exportDirective,
     LinkedNodeKind.importDirective,
     LinkedNodeKind.libraryDirective,
@@ -1203,6 +1260,15 @@
   ])
   int get directive_keyword;
 
+  @VariantId(33, variantList: [
+    LinkedNodeKind.exportDirective,
+    LinkedNodeKind.importDirective,
+    LinkedNodeKind.libraryDirective,
+    LinkedNodeKind.partDirective,
+    LinkedNodeKind.partOfDirective,
+  ])
+  int get directive_semicolon;
+
   @VariantId(6, variant: LinkedNodeKind.doStatement)
   LinkedNode get doStatement_body;
 
@@ -1465,7 +1531,10 @@
   @VariantId(7, variant: LinkedNodeKind.functionDeclaration)
   LinkedNode get functionDeclaration_returnType;
 
-  @VariantId(24, variant: LinkedNodeKind.functionDeclaration)
+  @VariantId(24, variantList: [
+    LinkedNodeKind.functionDeclaration,
+    LinkedNodeKind.functionExpression,
+  ])
   LinkedNodeType get functionDeclaration_returnType2;
 
   @VariantId(6, variant: LinkedNodeKind.functionDeclarationStatement)
@@ -1501,6 +1570,9 @@
   @VariantId(7, variant: LinkedNodeKind.functionTypedFormalParameter)
   LinkedNode get functionTypedFormalParameter_returnType;
 
+  @VariantId(24, variant: LinkedNodeKind.functionTypedFormalParameter)
+  LinkedNodeType get functionTypedFormalParameter_type2;
+
   @VariantId(8, variant: LinkedNodeKind.functionTypedFormalParameter)
   LinkedNode get functionTypedFormalParameter_typeParameters;
 
@@ -1519,6 +1591,9 @@
   @VariantId(24, variant: LinkedNodeKind.genericFunctionType)
   LinkedNodeType get genericFunctionType_returnType2;
 
+  @VariantId(25, variant: LinkedNodeKind.genericFunctionType)
+  LinkedNodeType get genericFunctionType_type;
+
   @VariantId(6, variant: LinkedNodeKind.genericFunctionType)
   LinkedNode get genericFunctionType_typeParameters;
 
@@ -1597,10 +1672,13 @@
   @VariantId(6, variant: LinkedNodeKind.indexExpression)
   LinkedNode get indexExpression_index;
 
-  @VariantId(16, variant: LinkedNodeKind.indexExpression)
+  @VariantId(17, variant: LinkedNodeKind.indexExpression)
   int get indexExpression_leftBracket;
 
-  @VariantId(17, variant: LinkedNodeKind.indexExpression)
+  @VariantId(16, variant: LinkedNodeKind.indexExpression)
+  int get indexExpression_period;
+
+  @VariantId(18, variant: LinkedNodeKind.indexExpression)
   int get indexExpression_rightBracket;
 
   @VariantId(7, variant: LinkedNodeKind.indexExpression)
@@ -1796,13 +1874,20 @@
   ])
   String get namespaceDirective_selectedUriContent;
 
-  @VariantId(18, variantList: [
-    LinkedNodeKind.exportDirective,
-    LinkedNodeKind.importDirective,
-    LinkedNodeKind.libraryDirective,
-    LinkedNodeKind.partDirective,
-  ])
-  int get namespaceDirective_semicolon;
+  @VariantId(6, variant: LinkedNodeKind.nativeClause)
+  LinkedNode get nativeClause_name;
+
+  @VariantId(15, variant: LinkedNodeKind.nativeClause)
+  int get nativeClause_nativeKeyword;
+
+  @VariantId(15, variant: LinkedNodeKind.nativeFunctionBody)
+  int get nativeFunctionBody_nativeKeyword;
+
+  @VariantId(16, variant: LinkedNodeKind.nativeFunctionBody)
+  int get nativeFunctionBody_semicolon;
+
+  @VariantId(6, variant: LinkedNodeKind.nativeFunctionBody)
+  LinkedNode get nativeFunctionBody_stringLiteral;
 
   @VariantId(14, variantList: [
     LinkedNodeKind.fieldFormalParameter,
@@ -1863,9 +1948,6 @@
   @VariantId(16, variant: LinkedNodeKind.partOfDirective)
   int get partOfDirective_ofKeyword;
 
-  @VariantId(15, variant: LinkedNodeKind.partOfDirective)
-  int get partOfDirective_semicolon;
-
   @VariantId(7, variant: LinkedNodeKind.partOfDirective)
   LinkedNode get partOfDirective_uri;
 
@@ -2338,6 +2420,8 @@
   methodInvocation,
   mixinDeclaration,
   namedExpression,
+  nativeClause,
+  nativeFunctionBody,
   nullLiteral,
   onClause,
   parenthesizedExpression,
@@ -2412,9 +2496,8 @@
 
 /// Information about a Dart type.
 abstract class LinkedNodeType extends base.SummaryClass {
-  /// References to [LinkedNodeReferences].
   @Id(0)
-  List<int> get functionFormalParameters;
+  List<LinkedNodeTypeFormalParameter> get functionFormalParameters;
 
   @Id(1)
   LinkedNodeType get functionReturnType;
@@ -2423,6 +2506,12 @@
   @Id(2)
   List<int> get functionTypeParameters;
 
+  @Id(7)
+  int get genericTypeAliasReference;
+
+  @Id(8)
+  List<LinkedNodeType> get genericTypeAliasTypeArguments;
+
   /// Reference to a [LinkedNodeReferences].
   @Id(3)
   int get interfaceClass;
@@ -2438,6 +2527,18 @@
   int get typeParameterParameter;
 }
 
+/// Information about a formal parameter in a function type.
+abstract class LinkedNodeTypeFormalParameter extends base.SummaryClass {
+  @Id(0)
+  LinkedNodeFormalParameterKind get kind;
+
+  @Id(1)
+  String get name;
+
+  @Id(2)
+  LinkedNodeType get type;
+}
+
 /// Kinds of [LinkedNodeType]s.
 enum LinkedNodeTypeKind {
   bottom,
@@ -2464,16 +2565,19 @@
 /// Information about a top-level declaration, or a field declaration that
 /// contributes information to [LinkedNodeKind.variableDeclaration].
 abstract class LinkedNodeVariablesDeclaration extends base.SummaryClass {
-  @Id(3)
+  @Id(0)
   LinkedNode get comment;
 
-  @Id(0)
+  @Id(1)
   bool get isConst;
 
-  @Id(1)
+  @Id(2)
+  bool get isCovariant;
+
+  @Id(3)
   bool get isFinal;
 
-  @Id(2)
+  @Id(4)
   bool get isStatic;
 }
 
@@ -3887,6 +3991,75 @@
   /// condition, with the two collection elements as its "then" and "else"
   /// clauses, respectively.
   ifElseElement,
+
+  /// Pop the top n+2 values from the stack, where n is obtained from
+  /// [UnlinkedExpr.ints].  The first two are the initialization and condition
+  /// of the for-loop; the remainder are the updaters.
+  forParts,
+
+  /// Pop the top 2 values from the stack.  The first is the for loop parts.
+  /// The second is the body.
+  forElement,
+
+  /// Push the empty expression (used for missing initializers and conditions in
+  /// `for` loops)
+  pushEmptyExpression,
+
+  /// Add a variable to the current scope whose name is obtained from
+  /// [UnlinkedExpr.strings].  This is separate from [variableDeclaration]
+  /// because the scope of the variable includes its own initializer.
+  variableDeclarationStart,
+
+  /// Pop the top value from the stack, and use it as the initializer for a
+  /// variable declaration; the variable being declared is obtained by looking
+  /// at the nth variable most recently added to the scope (where n counts from
+  /// zero and is obtained from [UnlinkedExpr.ints]).
+  variableDeclaration,
+
+  /// Pop the top n values from the stack, which should all be variable
+  /// declarations, and use them to create an untyped for-initializer
+  /// declaration.  The value of n is obtained from [UnlinkedExpr.ints].
+  forInitializerDeclarationsUntyped,
+
+  /// Pop the top n values from the stack, which should all be variable
+  /// declarations, and use them to create a typed for-initializer
+  /// declaration.  The value of n is obtained from [UnlinkedExpr.ints].  The
+  /// type is obtained from [UnlinkedExpr.references].
+  forInitializerDeclarationsTyped,
+
+  /// Pop from the stack `value` and get a string from [UnlinkedExpr.strings].
+  /// Use this string to look up a parameter.  Perform `parameter op= value`,
+  /// where `op` is the next assignment operator from
+  /// [UnlinkedExpr.assignmentOperators].  Push `value` back onto the stack.
+  ///
+  /// If the assignment operator is a prefix/postfix increment/decrement, then
+  /// `value` is not present in the stack, so it should not be popped and the
+  /// corresponding value of the parameter after/before update is pushed onto
+  /// the stack instead.
+  assignToParameter,
+
+  /// Pop from the stack an identifier and an expression, and create for-each
+  /// parts of the form `identifier in expression`.
+  forEachPartsWithIdentifier,
+
+  /// Pop the top 2 values from the stack.  The first is the for loop parts.
+  /// The second is the body.
+  forElementWithAwait,
+
+  /// Pop an expression from the stack, and create for-each parts of the form
+  /// `var name in expression`, where `name` is obtained from
+  /// [UnlinkedExpr.strings].
+  forEachPartsWithUntypedDeclaration,
+
+  /// Pop an expression from the stack, and create for-each parts of the form
+  /// `Type name in expression`, where `name` is obtained from
+  /// [UnlinkedExpr.strings], and `Type` is obtained from
+  /// [UnlinkedExpr.references].
+  forEachPartsWithTypedDeclaration,
+
+  /// Pop the top 2 values from the stack, compute `v1 >>> v2`, and push the
+  /// result back onto the stack.
+  bitShiftRightLogical,
 }
 
 /// Unlinked summary information about an import declaration.
diff --git a/pkg/analyzer/lib/src/summary/link.dart b/pkg/analyzer/lib/src/summary/link.dart
index d38b602..df84918 100644
--- a/pkg/analyzer/lib/src/summary/link.dart
+++ b/pkg/analyzer/lib/src/summary/link.dart
@@ -62,6 +62,7 @@
 import 'package:analyzer/dart/element/element.dart';
 import 'package:analyzer/dart/element/type.dart';
 import 'package:analyzer/error/listener.dart';
+import 'package:analyzer/src/dart/ast/ast.dart';
 import 'package:analyzer/src/dart/ast/utilities.dart';
 import 'package:analyzer/src/dart/constant/value.dart';
 import 'package:analyzer/src/dart/element/builder.dart';
@@ -1906,9 +1907,13 @@
         case UnlinkedExprOperation.makeUntypedMap:
         case UnlinkedExprOperation.makeUntypedSet:
         case UnlinkedExprOperation.makeUntypedSetOrMap:
+        case UnlinkedExprOperation.forParts:
+        case UnlinkedExprOperation.variableDeclaration:
+        case UnlinkedExprOperation.forInitializerDeclarationsUntyped:
           intPtr++;
           break;
         case UnlinkedExprOperation.assignToRef:
+        case UnlinkedExprOperation.forEachPartsWithTypedDeclaration:
           refPtr++;
           break;
         case UnlinkedExprOperation.invokeMethodRef:
@@ -1929,6 +1934,7 @@
           break;
         case UnlinkedExprOperation.makeTypedList:
         case UnlinkedExprOperation.makeTypedSet:
+        case UnlinkedExprOperation.forInitializerDeclarationsTyped:
           refPtr++;
           intPtr++;
           break;
@@ -2459,7 +2465,7 @@
         nameScope: nameScope);
     var variableResolverVisitor = new VariableResolverVisitor(
         library, source, typeProvider, errorListener,
-        nameScope: nameScope);
+        nameScope: nameScope, localVariableInfo: LocalVariableInfo());
     var partialResolverVisitor = new PartialResolverVisitor(
         inheritance, library, source, typeProvider, errorListener,
         nameScope: nameScope);
@@ -5206,10 +5212,14 @@
         case UnlinkedExprOperation.makeUntypedMap:
         case UnlinkedExprOperation.makeUntypedSet:
         case UnlinkedExprOperation.makeUntypedSetOrMap:
+        case UnlinkedExprOperation.forParts:
+        case UnlinkedExprOperation.variableDeclaration:
+        case UnlinkedExprOperation.forInitializerDeclarationsUntyped:
           intPtr++;
           break;
         case UnlinkedExprOperation.makeTypedList:
         case UnlinkedExprOperation.makeTypedSet:
+        case UnlinkedExprOperation.forInitializerDeclarationsTyped:
           refPtr++;
           intPtr++;
           break;
@@ -5246,6 +5256,7 @@
           break;
         case UnlinkedExprOperation.typeCast:
         case UnlinkedExprOperation.typeCheck:
+        case UnlinkedExprOperation.forEachPartsWithTypedDeclaration:
           refPtr++;
           break;
         case UnlinkedExprOperation.pushLocalFunctionReference:
diff --git a/pkg/analyzer/lib/src/summary/name_filter.dart b/pkg/analyzer/lib/src/summary/name_filter.dart
index c71ff18..62633ef 100644
--- a/pkg/analyzer/lib/src/summary/name_filter.dart
+++ b/pkg/analyzer/lib/src/summary/name_filter.dart
@@ -1,4 +1,4 @@
-// Copyright (c) 2016, the Dart project authors.  Please see the AUTHORS file
+// Copyright (c) 2016, the Dart project authors. Please see the AUTHORS file
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
 
diff --git a/pkg/analyzer/lib/src/summary/package_bundle_reader.dart b/pkg/analyzer/lib/src/summary/package_bundle_reader.dart
index 91a51d2..d015e2a 100644
--- a/pkg/analyzer/lib/src/summary/package_bundle_reader.dart
+++ b/pkg/analyzer/lib/src/summary/package_bundle_reader.dart
@@ -7,15 +7,12 @@
 
 import 'package:analyzer/dart/analysis/session.dart';
 import 'package:analyzer/file_system/file_system.dart';
-import 'package:analyzer/src/context/cache.dart';
-import 'package:analyzer/src/context/context.dart';
 import 'package:analyzer/src/generated/engine.dart';
 import 'package:analyzer/src/generated/source.dart';
 import 'package:analyzer/src/generated/source_io.dart';
 import 'package:analyzer/src/generated/utilities_dart.dart';
 import 'package:analyzer/src/summary/idl.dart';
 import 'package:analyzer/src/summary/resynthesize.dart';
-import 'package:analyzer/src/task/api/model.dart';
 
 /**
  * A [ConflictingSummaryException] indicates that two different summaries
@@ -68,26 +65,6 @@
 }
 
 /**
- * The [ResultProvider] that provides results from input package summaries.
- */
-class InputPackagesResultProvider extends ResynthesizerResultProvider {
-  InputPackagesResultProvider(
-      InternalAnalysisContext context, SummaryDataStore dataStore,
-      {AnalysisSession session})
-      : super(context, session, dataStore) {
-    createResynthesizer();
-    context.typeProvider = resynthesizer.typeProvider;
-    resynthesizer.finishCoreAsyncLibraries();
-  }
-
-  @override
-  bool hasResultsForSource(Source source) {
-    String uriString = source.uri.toString();
-    return resynthesizer.hasLibrarySummary(uriString);
-  }
-}
-
-/**
  * The [UriResolver] that knows about sources that are served from their
  * summaries.
  */
@@ -163,50 +140,6 @@
 }
 
 /**
- * The [ResultProvider] that provides results using summary resynthesizer.
- */
-abstract class ResynthesizerResultProvider extends ResultProvider {
-  final InternalAnalysisContext context;
-  final AnalysisSession session;
-  final SummaryDataStore _dataStore;
-
-  StoreBasedSummaryResynthesizer _resynthesizer;
-
-  ResynthesizerResultProvider(this.context, this.session, this._dataStore);
-
-  SummaryResynthesizer get resynthesizer => _resynthesizer;
-
-  /**
-   * Add a new [bundle] to the resynthesizer.
-   */
-  void addBundle(String path, PackageBundle bundle) {
-    _dataStore.addBundle(path, bundle);
-  }
-
-  @override
-  bool compute(CacheEntry entry, ResultDescriptor result) {
-    throw UnimplementedError();
-  }
-
-  /**
-   * Create the [resynthesizer] instance.
-   *
-   * Subclasses must call this method in their constructors.
-   */
-  void createResynthesizer() {
-    _resynthesizer = new StoreBasedSummaryResynthesizer(
-        context, session, context.sourceFactory, true, _dataStore);
-  }
-
-  /**
-   * Return `true` if this result provider can provide a result for the
-   * given [source].  The provider must ensure that [addBundle] is invoked for
-   * every bundle that would be required to provide results for the [source].
-   */
-  bool hasResultsForSource(Source source);
-}
-
-/**
  * A concrete resynthesizer that serves summaries from [SummaryDataStore].
  */
 class StoreBasedSummaryResynthesizer extends SummaryResynthesizer {
diff --git a/pkg/analyzer/lib/src/summary/prelink.dart b/pkg/analyzer/lib/src/summary/prelink.dart
index 1785442..b0116e6 100644
--- a/pkg/analyzer/lib/src/summary/prelink.dart
+++ b/pkg/analyzer/lib/src/summary/prelink.dart
@@ -1,4 +1,4 @@
-// Copyright (c) 2016, the Dart project authors.  Please see the AUTHORS file
+// Copyright (c) 2016, the Dart project authors. Please see the AUTHORS file
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
 
diff --git a/pkg/analyzer/lib/src/summary/summarize_ast.dart b/pkg/analyzer/lib/src/summary/summarize_ast.dart
index 1f05586..895d564 100644
--- a/pkg/analyzer/lib/src/summary/summarize_ast.dart
+++ b/pkg/analyzer/lib/src/summary/summarize_ast.dart
@@ -33,17 +33,36 @@
   /// siblings.
   final Map<int, int> localClosureIndexMap;
 
-  /// If the expression being serialized appears inside a function body, the
-  /// names of parameters that are in scope.  Otherwise `null`.
-  final Set<String> parameterNames;
+  /// The names of local variables and parameters that are in scope.
+  /// This is a list so that we can handle nesting by pushing and popping values
+  /// at the end of it.
+  final List<String> variableNames;
 
   _ConstExprSerializer(bool forConst, this.visitor, this.localClosureIndexMap,
-      this.parameterNames)
-      : super(forConst);
+      List<String> variableNames)
+      : variableNames = variableNames ?? [],
+        super(forConst);
 
   @override
   bool isParameterName(String name) {
-    return parameterNames?.contains(name) ?? false;
+    return variableNames?.contains(name) ?? false;
+  }
+
+  @override
+  void popVariableNames(int count) {
+    variableNames.length -= count;
+  }
+
+  @override
+  void pushVariableName(String name) {
+    variableNames.add(name);
+  }
+
+  @override
+  void serialize(Expression expr) {
+    int startingVariableCount = variableNames.length;
+    super.serialize(expr);
+    assert(startingVariableCount == variableNames.length);
   }
 
   @override
@@ -298,9 +317,8 @@
   /// needed by type inference.
   bool _serializeClosureBodyExprs = false;
 
-  /// If a closure function body is being serialized, the set of closure
-  /// parameter names which are currently in scope.  Otherwise `null`.
-  Set<String> _parameterNames;
+  /// The set of variable names which are currently in scope.
+  List<String> _variableNames = [];
 
   /// Indicates whether parameters found during visitors might inherit
   /// covariance.
@@ -482,9 +500,9 @@
   /// Serialize the given [expression], creating an [UnlinkedExprBuilder].
   UnlinkedExprBuilder serializeConstExpr(
       bool forConst, Map<int, int> localClosureIndexMap, Expression expression,
-      [Set<String> parameterNames]) {
+      [List<String> variableNames]) {
     _ConstExprSerializer serializer = new _ConstExprSerializer(
-        forConst, this, localClosureIndexMap, parameterNames);
+        forConst, this, localClosureIndexMap, variableNames);
     serializer.serialize(expression);
     return serializer.toBuilder(expression.beginToken, expression.endToken);
   }
@@ -591,11 +609,9 @@
     }
     b.visibleOffset = enclosingBlock?.offset;
     b.visibleLength = enclosingBlock?.length;
-    Set<String> oldParameterNames = _parameterNames;
+    int oldVariableNamesLength = _variableNames.length;
     if (formalParameters != null && formalParameters.parameters.isNotEmpty) {
-      _parameterNames =
-          _parameterNames == null ? new Set<String>() : _parameterNames.toSet();
-      _parameterNames.addAll(formalParameters.parameters
+      _variableNames.addAll(formalParameters.parameters
           .map((FormalParameter p) => p.identifier.name));
     }
     serializeFunctionBody(
@@ -605,7 +621,7 @@
       body?.accept(new MixinSuperInvokedNamesCollector(mixinSuperInvokedNames));
     }
 
-    _parameterNames = oldParameterNames;
+    _variableNames.length = oldVariableNamesLength;
     scopes.removeLast();
     assert(scopes.length == oldScopesLength);
     return b;
@@ -659,10 +675,10 @@
     if (serializeBodyExpr) {
       if (body is Expression) {
         b.bodyExpr = serializeConstExpr(
-            forConst, _localClosureIndexMap, body, _parameterNames);
+            forConst, _localClosureIndexMap, body, _variableNames);
       } else if (body is ExpressionFunctionBody) {
         b.bodyExpr = serializeConstExpr(
-            forConst, _localClosureIndexMap, body.expression, _parameterNames);
+            forConst, _localClosureIndexMap, body.expression, _variableNames);
       } else {
         // TODO(paulberry): serialize other types of function bodies.
       }
@@ -1093,8 +1109,8 @@
     Map<int, int> localClosureIndexMap = serializeFunctionBody(b,
         node.initializers, node.body, node.constKeyword != null, false, false);
     if (node.constKeyword != null) {
-      Set<String> constructorParameterNames =
-          node.parameters.parameters.map((p) => p.identifier.name).toSet();
+      List<String> constructorParameterNames =
+          node.parameters.parameters.map((p) => p.identifier.name).toList();
       b.constantInitializers = node.initializers
           .map((ConstructorInitializer initializer) =>
               serializeConstructorInitializer(initializer, (Expression expr) {
diff --git a/pkg/analyzer/lib/src/summary/summarize_const_expr.dart b/pkg/analyzer/lib/src/summary/summarize_const_expr.dart
index f367937..79f9c9a 100644
--- a/pkg/analyzer/lib/src/summary/summarize_const_expr.dart
+++ b/pkg/analyzer/lib/src/summary/summarize_const_expr.dart
@@ -127,6 +127,13 @@
   /// Return `true` if the given [name] is a parameter reference.
   bool isParameterName(String name);
 
+  /// Removes the [count] variables that were most recently added to the scope
+  /// by [pushVariableName].
+  void popVariableNames(int count);
+
+  /// Pushes a variable with the given [name] onto the current scope.
+  void pushVariableName(String name);
+
   /// Serialize the given [expr] expression into this serializer state.
   void serialize(Expression expr) {
     try {
@@ -247,6 +254,9 @@
       EntityRefBuilder ref = serializeIdentifierSequence(expr);
       references.add(ref);
       operations.add(UnlinkedExprOperation.assignToRef);
+    } else if (expr is SimpleIdentifier && isParameterName(expr.name)) {
+      strings.add(expr.name);
+      operations.add(UnlinkedExprOperation.assignToParameter);
     } else if (expr is PropertyAccess) {
       if (!expr.isCascaded) {
         _serialize(expr.target);
@@ -293,8 +303,10 @@
   }
 
   /// Serialize the given [expr] expression into this serializer state.
-  void _serialize(Expression expr) {
-    if (expr is IntegerLiteral) {
+  void _serialize(Expression expr, {bool emptyExpressionPermitted: false}) {
+    if (emptyExpressionPermitted && expr == null) {
+      operations.add(UnlinkedExprOperation.pushEmptyExpression);
+    } else if (expr is IntegerLiteral) {
       int value = expr.value ?? 0;
       if (value >= 0) {
         _pushInt(value);
@@ -505,6 +517,8 @@
       operations.add(UnlinkedExprOperation.bitOr);
     } else if (operator == TokenType.GT_GT) {
       operations.add(UnlinkedExprOperation.bitShiftRight);
+    } else if (operator == TokenType.GT_GT_GT) {
+      operations.add(UnlinkedExprOperation.bitShiftRightLogical);
     } else if (operator == TokenType.LT_LT) {
       operations.add(UnlinkedExprOperation.bitShiftLeft);
     } else if (operator == TokenType.PLUS) {
@@ -558,16 +572,82 @@
         _serializeCollectionElement(elseElement);
         operations.add(UnlinkedExprOperation.ifElseElement);
       }
+    } else if (element is ForElement) {
+      isValidConst = false;
+      var parts = element.forLoopParts;
+      int numVariablesToPop = 0;
+      if (parts is ForParts) {
+        if (parts is ForPartsWithExpression) {
+          _serialize(parts.initialization, emptyExpressionPermitted: true);
+        } else if (parts is ForPartsWithDeclarations) {
+          for (var variable in parts.variables.variables) {
+            operations.add(UnlinkedExprOperation.variableDeclarationStart);
+            var name = variable.name.name;
+            strings.add(name);
+            pushVariableName(name);
+            ++numVariablesToPop;
+            _serialize(variable.initializer, emptyExpressionPermitted: true);
+            operations.add(UnlinkedExprOperation.variableDeclaration);
+            ints.add(0);
+          }
+          var type = parts.variables.type;
+          if (type == null) {
+            operations
+                .add(UnlinkedExprOperation.forInitializerDeclarationsUntyped);
+          } else {
+            references.add(serializeType(type));
+            operations
+                .add(UnlinkedExprOperation.forInitializerDeclarationsTyped);
+          }
+          ints.add(parts.variables.variables.length);
+        } else {
+          throw StateError('Unrecognized for parts');
+        }
+        _serialize(parts.condition, emptyExpressionPermitted: true);
+        for (var updater in parts.updaters) {
+          _serialize(updater);
+        }
+        operations.add(UnlinkedExprOperation.forParts);
+        ints.add(parts.updaters.length);
+      } else if (parts is ForEachParts) {
+        if (parts is ForEachPartsWithIdentifier) {
+          _serialize(parts.identifier);
+          _serialize(parts.iterable);
+          operations.add(UnlinkedExprOperation.forEachPartsWithIdentifier);
+        } else if (parts is ForEachPartsWithDeclaration) {
+          _serialize(parts.iterable);
+          var type = parts.loopVariable.type;
+          if (type == null) {
+            operations
+                .add(UnlinkedExprOperation.forEachPartsWithUntypedDeclaration);
+          } else {
+            references.add(serializeType(type));
+            operations
+                .add(UnlinkedExprOperation.forEachPartsWithTypedDeclaration);
+          }
+          var name = parts.loopVariable.identifier.name;
+          strings.add(name);
+          pushVariableName(name);
+          ++numVariablesToPop;
+        } else {
+          throw StateError('Unrecognized for parts');
+        }
+      } else {
+        throw StateError('Unrecognized for parts');
+      }
+      _serializeCollectionElement(element.body);
+      popVariableNames(numVariablesToPop);
+      operations.add(element.awaitKeyword == null
+          ? UnlinkedExprOperation.forElement
+          : UnlinkedExprOperation.forElementWithAwait);
     } else {
-      // TODO(paulberry): Implement serialization for spread and control flow
-      //  elements.
       throw new StateError('Unsupported CollectionElement: $element');
     }
   }
 
   void _serializeListLiteral(ListLiteral expr) {
     if (forConst || expr.typeArguments == null) {
-      List<CollectionElement> elements = expr.elements2;
+      List<CollectionElement> elements = expr.elements;
       elements.forEach(_serializeCollectionElement);
       ints.add(elements.length);
     } else {
@@ -663,10 +743,10 @@
 
   void _serializeSetOrMapLiteral(SetOrMapLiteral expr) {
     if (forConst || expr.typeArguments == null) {
-      for (CollectionElement element in expr.elements2) {
+      for (CollectionElement element in expr.elements) {
         _serializeCollectionElement(element);
       }
-      ints.add(expr.elements2.length);
+      ints.add(expr.elements.length);
     } else {
       ints.add(0);
     }
diff --git a/pkg/analyzer/lib/src/summary/summary_sdk.dart b/pkg/analyzer/lib/src/summary/summary_sdk.dart
index b3389a0..dcb3d5f 100644
--- a/pkg/analyzer/lib/src/summary/summary_sdk.dart
+++ b/pkg/analyzer/lib/src/summary/summary_sdk.dart
@@ -61,11 +61,6 @@
       SourceFactory factory = new SourceFactory(
           [new DartUriResolver(this)], null, resourceProvider);
       _analysisContext.sourceFactory = factory;
-      SummaryDataStore dataStore =
-          new SummaryDataStore([], resourceProvider: resourceProvider);
-      dataStore.addBundle(null, _bundle);
-      _analysisContext.resultProvider =
-          new InputPackagesResultProvider(_analysisContext, dataStore);
     }
     return _analysisContext;
   }
diff --git a/pkg/analyzer/lib/src/summary2/ast_binary_reader.dart b/pkg/analyzer/lib/src/summary2/ast_binary_reader.dart
index 33f51e3..5c35451 100644
--- a/pkg/analyzer/lib/src/summary2/ast_binary_reader.dart
+++ b/pkg/analyzer/lib/src/summary2/ast_binary_reader.dart
@@ -1,4 +1,4 @@
-// Copyright (c) 2019, the Dart project authors.  Please see the AUTHORS file
+// Copyright (c) 2019, the Dart project authors. Please see the AUTHORS file
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
 
@@ -13,14 +13,1252 @@
 import 'package:analyzer/src/generated/utilities_dart.dart';
 import 'package:analyzer/src/summary/idl.dart';
 import 'package:analyzer/src/summary2/linked_unit_context.dart';
+import 'package:analyzer/src/summary2/reference.dart';
 
 /// Deserializer of fully resolved ASTs from flat buffers.
 class AstBinaryReader {
   final LinkedUnitContext _unitContext;
 
+  ElementImpl _enclosingElement;
+  Reference _localRef;
+  int _localRefNextId;
+  List<ParameterElement> _localParameters;
+
   AstBinaryReader(this._unitContext);
 
   AstNode readNode(LinkedNode data) {
+    var node = _readNode(data);
+    if (node == null) return null;
+
+    _unitContext.tokensContext.linkTokens(node.beginToken, node.endToken);
+    return node;
+  }
+
+  /// Run [f] that reads nodes with local declarations, making sure that
+  /// [_localRef] is ready for adding local references.
+  T withLocalScope<T>(ElementImpl enclosingElement, T f()) {
+    var isLocalContextOwner = _localRef == null;
+    try {
+      if (_localRef == null) {
+        _enclosingElement = enclosingElement;
+        _localRef = Reference.root().getChild('@local');
+        _localRefNextId = 0;
+      }
+      return f();
+    } finally {
+      if (isLocalContextOwner) {
+        _enclosingElement = null;
+        _localRef = null;
+        _localRefNextId = null;
+        _localParameters = null;
+      }
+    }
+  }
+
+  ParameterKind _formalParameterKind(LinkedNodeFormalParameterKind kind) {
+    if (kind == LinkedNodeFormalParameterKind.optionalNamed) {
+      return ParameterKind.NAMED;
+    }
+    if (kind == LinkedNodeFormalParameterKind.optionalPositional) {
+      return ParameterKind.POSITIONAL;
+    }
+    return ParameterKind.REQUIRED;
+  }
+
+  T _getElement<T extends Element>(int index) {
+    var bundleContext = _unitContext.bundleContext;
+    return bundleContext.elementOfIndex(index);
+  }
+
+  List<T> _getElements<T extends Element>(List<int> indexList) {
+    var bundleContext = _unitContext.bundleContext;
+    return bundleContext.elementsOfIndexes(indexList);
+  }
+
+  Token _getToken(int index) {
+    return _unitContext.tokensContext.tokenOfIndex(index);
+  }
+
+  List<Token> _getTokens(List<int> indexList) {
+    var result = List<Token>(indexList.length);
+    for (var i = 0; i < indexList.length; ++i) {
+      var index = indexList[i];
+      result[i] = _getToken(index);
+    }
+    return result;
+  }
+
+  AdjacentStrings _read_adjacentStrings(LinkedNode data) {
+    return astFactory.adjacentStrings(
+      _readNodeList(data.adjacentStrings_strings),
+    )..staticType = _readType(data.expression_type);
+  }
+
+  Annotation _read_annotation(LinkedNode data) {
+    return astFactory.annotation(
+      _getToken(data.annotation_atSign),
+      _readNode(data.annotation_name),
+      _getToken(data.annotation_period),
+      _readNode(data.annotation_constructorName),
+      _readNode(data.annotation_arguments),
+    );
+  }
+
+  ArgumentList _read_argumentList(LinkedNode data) {
+    return astFactory.argumentList(
+      _getToken(data.argumentList_leftParenthesis),
+      _readNodeList(data.argumentList_arguments),
+      _getToken(data.argumentList_rightParenthesis),
+    );
+  }
+
+  AsExpression _read_asExpression(LinkedNode data) {
+    return astFactory.asExpression(
+      _readNode(data.asExpression_expression),
+      _getToken(data.asExpression_asOperator),
+      _readNode(data.asExpression_type),
+    )..staticType = _readType(data.expression_type);
+  }
+
+  AssertInitializer _read_assertInitializer(LinkedNode data) {
+    return astFactory.assertInitializer(
+      _getToken(data.assertInitializer_assertKeyword),
+      _getToken(data.assertInitializer_leftParenthesis),
+      _readNode(data.assertInitializer_condition),
+      _getToken(data.assertInitializer_comma),
+      _readNode(data.assertInitializer_message),
+      _getToken(data.assertInitializer_rightParenthesis),
+    );
+  }
+
+  AssertStatement _read_assertStatement(LinkedNode data) {
+    return astFactory.assertStatement(
+      _getToken(data.assertStatement_assertKeyword),
+      _getToken(data.assertStatement_leftParenthesis),
+      _readNode(data.assertStatement_condition),
+      _getToken(data.assertStatement_comma),
+      _readNode(data.assertStatement_message),
+      _getToken(data.assertStatement_rightParenthesis),
+      _getToken(data.assertStatement_semicolon),
+    );
+  }
+
+  AssignmentExpression _read_assignmentExpression(LinkedNode data) {
+    return astFactory.assignmentExpression(
+      _readNode(data.assignmentExpression_leftHandSide),
+      _getToken(data.assignmentExpression_operator),
+      _readNode(data.assignmentExpression_rightHandSide),
+    )
+      ..staticElement = _getElement(data.assignmentExpression_element)
+      ..staticType = _readType(data.expression_type);
+  }
+
+  AwaitExpression _read_awaitExpression(LinkedNode data) {
+    return astFactory.awaitExpression(
+      _getToken(data.awaitExpression_awaitKeyword),
+      _readNode(data.awaitExpression_expression),
+    )..staticType = _readType(data.expression_type);
+  }
+
+  BinaryExpression _read_binaryExpression(LinkedNode data) {
+    return astFactory.binaryExpression(
+      _readNode(data.binaryExpression_leftOperand),
+      _getToken(data.binaryExpression_operator),
+      _readNode(data.binaryExpression_rightOperand),
+    )
+      ..staticElement = _getElement(data.binaryExpression_element)
+      ..staticType = _readType(data.expression_type);
+  }
+
+  Block _read_block(LinkedNode data) {
+    return astFactory.block(
+      _getToken(data.block_leftBracket),
+      _readNodeList(data.block_statements),
+      _getToken(data.block_rightBracket),
+    );
+  }
+
+  BlockFunctionBody _read_blockFunctionBody(LinkedNode data) {
+    return astFactory.blockFunctionBody(
+      _getToken(data.blockFunctionBody_keyword),
+      _getToken(data.blockFunctionBody_star),
+      _readNode(data.blockFunctionBody_block),
+    );
+  }
+
+  BooleanLiteral _read_booleanLiteral(LinkedNode data) {
+    return astFactory.booleanLiteral(
+      _getToken(data.booleanLiteral_literal),
+      data.booleanLiteral_value,
+    )..staticType = _readType(data.expression_type);
+  }
+
+  BreakStatement _read_breakStatement(LinkedNode data) {
+    return astFactory.breakStatement(
+      _getToken(data.breakStatement_breakKeyword),
+      _readNode(data.breakStatement_label),
+      _getToken(data.breakStatement_semicolon),
+    );
+  }
+
+  CascadeExpression _read_cascadeExpression(LinkedNode data) {
+    return astFactory.cascadeExpression(
+      _readNode(data.cascadeExpression_target),
+      _readNodeList(data.cascadeExpression_sections),
+    )..staticType = _readType(data.expression_type);
+  }
+
+  CatchClause _read_catchClause(LinkedNode data) {
+    return astFactory.catchClause(
+      _getToken(data.catchClause_onKeyword),
+      _readNode(data.catchClause_exceptionType),
+      _getToken(data.catchClause_catchKeyword),
+      _getToken(data.catchClause_leftParenthesis),
+      _readNode(data.catchClause_exceptionParameter),
+      _getToken(data.catchClause_comma),
+      _readNode(data.catchClause_stackTraceParameter),
+      _getToken(data.catchClause_rightParenthesis),
+      _readNode(data.catchClause_body),
+    );
+  }
+
+  ClassDeclaration _read_classDeclaration(LinkedNode data) {
+    return astFactory.classDeclaration(
+      _readNode(data.annotatedNode_comment),
+      _readNodeList(data.annotatedNode_metadata),
+      _getToken(data.classDeclaration_abstractKeyword),
+      _getToken(data.classDeclaration_classKeyword),
+      _readNode(data.namedCompilationUnitMember_name),
+      _readNode(data.classOrMixinDeclaration_typeParameters),
+      _readNode(data.classDeclaration_extendsClause),
+      _readNode(data.classDeclaration_withClause),
+      _readNode(data.classOrMixinDeclaration_implementsClause),
+      _getToken(data.classOrMixinDeclaration_leftBracket),
+      _readNodeList(data.classOrMixinDeclaration_members),
+      _getToken(data.classOrMixinDeclaration_rightBracket),
+    )..nativeClause = _readNode(data.classDeclaration_nativeClause);
+  }
+
+  ClassTypeAlias _read_classTypeAlias(LinkedNode data) {
+    return astFactory.classTypeAlias(
+      _readNode(data.annotatedNode_comment),
+      _readNodeList(data.annotatedNode_metadata),
+      _getToken(data.typeAlias_typedefKeyword),
+      _readNode(data.namedCompilationUnitMember_name),
+      _readNode(data.classTypeAlias_typeParameters),
+      _getToken(data.classTypeAlias_equals),
+      _getToken(data.classTypeAlias_abstractKeyword),
+      _readNode(data.classTypeAlias_superclass),
+      _readNode(data.classTypeAlias_withClause),
+      _readNode(data.classTypeAlias_implementsClause),
+      _getToken(data.typeAlias_semicolon),
+    );
+  }
+
+  Comment _read_comment(LinkedNode data) {
+    var tokens = _getTokens(data.comment_tokens);
+    switch (data.comment_type) {
+      case LinkedNodeCommentType.block:
+        return astFactory.endOfLineComment(
+          tokens,
+        );
+      case LinkedNodeCommentType.documentation:
+        return astFactory.documentationComment(
+          tokens,
+          // TODO(scheglov) references
+        );
+      case LinkedNodeCommentType.endOfLine:
+        return astFactory.endOfLineComment(
+          tokens,
+        );
+      default:
+        throw StateError('${data.comment_type}');
+    }
+  }
+
+  CompilationUnit _read_compilationUnit(LinkedNode data) {
+    return astFactory.compilationUnit(
+      _getToken(data.compilationUnit_beginToken),
+      _readNode(data.compilationUnit_scriptTag),
+      _readNodeList(data.compilationUnit_directives),
+      _readNodeList(data.compilationUnit_declarations),
+      _getToken(data.compilationUnit_endToken),
+    );
+  }
+
+  ConditionalExpression _read_conditionalExpression(LinkedNode data) {
+    return astFactory.conditionalExpression(
+      _readNode(data.conditionalExpression_condition),
+      _getToken(data.conditionalExpression_question),
+      _readNode(data.conditionalExpression_thenExpression),
+      _getToken(data.conditionalExpression_colon),
+      _readNode(data.conditionalExpression_elseExpression),
+    )..staticType = _readType(data.expression_type);
+  }
+
+  Configuration _read_configuration(LinkedNode data) {
+    return astFactory.configuration(
+      _getToken(data.configuration_ifKeyword),
+      _getToken(data.configuration_leftParenthesis),
+      _readNode(data.configuration_name),
+      _getToken(data.configuration_equalToken),
+      _readNode(data.configuration_value),
+      _getToken(data.configuration_rightParenthesis),
+      _readNode(data.configuration_uri),
+    );
+  }
+
+  ConstructorDeclaration _read_constructorDeclaration(LinkedNode data) {
+    return astFactory.constructorDeclaration(
+      _readNode(data.annotatedNode_comment),
+      _readNodeList(data.annotatedNode_metadata),
+      _getToken(data.constructorDeclaration_externalKeyword),
+      _getToken(data.constructorDeclaration_constKeyword),
+      _getToken(data.constructorDeclaration_factoryKeyword),
+      _readNode(data.constructorDeclaration_returnType),
+      _getToken(data.constructorDeclaration_period),
+      _readNode(data.constructorDeclaration_name),
+      _readNode(data.constructorDeclaration_parameters),
+      _getToken(data.constructorDeclaration_separator),
+      _readNodeList(data.constructorDeclaration_initializers),
+      _readNode(data.constructorDeclaration_redirectedConstructor),
+      _readNode(data.constructorDeclaration_body),
+    );
+  }
+
+  ConstructorFieldInitializer _read_constructorFieldInitializer(
+      LinkedNode data) {
+    return astFactory.constructorFieldInitializer(
+      _getToken(data.constructorFieldInitializer_thisKeyword),
+      _getToken(data.constructorFieldInitializer_period),
+      _readNode(data.constructorFieldInitializer_fieldName),
+      _getToken(data.constructorFieldInitializer_equals),
+      _readNode(data.constructorFieldInitializer_expression),
+    );
+  }
+
+  ConstructorName _read_constructorName(LinkedNode data) {
+    return astFactory.constructorName(
+      _readNode(data.constructorName_type),
+      _getToken(data.constructorName_period),
+      _readNode(data.constructorName_name),
+    )..staticElement = _getElement(data.constructorName_element);
+  }
+
+  ContinueStatement _read_continueStatement(LinkedNode data) {
+    return astFactory.continueStatement(
+      _getToken(data.continueStatement_continueKeyword),
+      _readNode(data.continueStatement_label),
+      _getToken(data.continueStatement_semicolon),
+    );
+  }
+
+  DeclaredIdentifier _read_declaredIdentifier(LinkedNode data) {
+    return astFactory.declaredIdentifier(
+      _readNode(data.annotatedNode_comment),
+      _readNodeList(data.annotatedNode_metadata),
+      _getToken(data.declaredIdentifier_keyword),
+      _readNode(data.declaredIdentifier_type),
+      _readNode(data.declaredIdentifier_identifier),
+    );
+  }
+
+  DefaultFormalParameter _read_defaultFormalParameter(LinkedNode data) {
+    return astFactory.defaultFormalParameter(
+      _readNode(data.defaultFormalParameter_parameter),
+      data.defaultFormalParameter_isNamed
+          ? ParameterKind.NAMED
+          : ParameterKind.POSITIONAL,
+      _getToken(data.defaultFormalParameter_separator),
+      _readNode(data.defaultFormalParameter_defaultValue),
+    );
+  }
+
+  DoStatement _read_doStatement(LinkedNode data) {
+    return astFactory.doStatement(
+      _getToken(data.doStatement_doKeyword),
+      _readNode(data.doStatement_body),
+      _getToken(data.doStatement_whileKeyword),
+      _getToken(data.doStatement_leftParenthesis),
+      _readNode(data.doStatement_condition),
+      _getToken(data.doStatement_rightParenthesis),
+      _getToken(data.doStatement_semicolon),
+    );
+  }
+
+  DottedName _read_dottedName(LinkedNode data) {
+    return astFactory.dottedName(
+      _readNodeList(data.dottedName_components),
+    );
+  }
+
+  DoubleLiteral _read_doubleLiteral(LinkedNode data) {
+    return astFactory.doubleLiteral(
+      _getToken(data.doubleLiteral_literal),
+      data.doubleLiteral_value,
+    )..staticType = _readType(data.expression_type);
+  }
+
+  EmptyFunctionBody _read_emptyFunctionBody(LinkedNode data) {
+    return astFactory.emptyFunctionBody(
+      _getToken(data.emptyFunctionBody_semicolon),
+    );
+  }
+
+  EmptyStatement _read_emptyStatement(LinkedNode data) {
+    return astFactory.emptyStatement(
+      _getToken(data.emptyStatement_semicolon),
+    );
+  }
+
+  EnumConstantDeclaration _read_enumConstantDeclaration(LinkedNode data) {
+    return astFactory.enumConstantDeclaration(
+      _readNode(data.annotatedNode_comment),
+      _readNodeList(data.annotatedNode_metadata),
+      _readNode(data.enumConstantDeclaration_name),
+    );
+  }
+
+  EnumDeclaration _read_enumDeclaration(LinkedNode data) {
+    return astFactory.enumDeclaration(
+      _readNode(data.annotatedNode_comment),
+      _readNodeList(data.annotatedNode_metadata),
+      _getToken(data.enumDeclaration_enumKeyword),
+      _readNode(data.namedCompilationUnitMember_name),
+      _getToken(data.enumDeclaration_leftBracket),
+      _readNodeList(data.enumDeclaration_constants),
+      _getToken(data.enumDeclaration_rightBracket),
+    );
+  }
+
+  ExportDirective _read_exportDirective(LinkedNode data) {
+    return astFactory.exportDirective(
+      _readNode(data.annotatedNode_comment),
+      _readNodeList(data.annotatedNode_metadata),
+      _getToken(data.directive_keyword),
+      _readNode(data.uriBasedDirective_uri),
+      _readNodeList(data.namespaceDirective_configurations),
+      _readNodeList(data.namespaceDirective_combinators),
+      _getToken(data.directive_semicolon),
+    );
+  }
+
+  ExpressionFunctionBody _read_expressionFunctionBody(LinkedNode data) {
+    return astFactory.expressionFunctionBody(
+      _getToken(data.expressionFunctionBody_keyword),
+      _getToken(data.expressionFunctionBody_arrow),
+      _readNode(data.expressionFunctionBody_expression),
+      _getToken(data.expressionFunctionBody_semicolon),
+    );
+  }
+
+  ExpressionStatement _read_expressionStatement(LinkedNode data) {
+    return astFactory.expressionStatement(
+      _readNode(data.expressionStatement_expression),
+      _getToken(data.expressionStatement_semicolon),
+    );
+  }
+
+  ExtendsClause _read_extendsClause(LinkedNode data) {
+    return astFactory.extendsClause(
+      _getToken(data.extendsClause_extendsKeyword),
+      _readNode(data.extendsClause_superclass),
+    );
+  }
+
+  FieldDeclaration _read_fieldDeclaration(LinkedNode data) {
+    return astFactory.fieldDeclaration2(
+      comment: _readNode(data.annotatedNode_comment),
+      covariantKeyword: _getToken(data.fieldDeclaration_covariantKeyword),
+      fieldList: _readNode(data.fieldDeclaration_fields),
+      metadata: _readNodeList(data.annotatedNode_metadata),
+      semicolon: _getToken(data.fieldDeclaration_semicolon),
+      staticKeyword: _getToken(data.fieldDeclaration_staticKeyword),
+    );
+  }
+
+  FieldFormalParameter _read_fieldFormalParameter(LinkedNode data) {
+    return astFactory.fieldFormalParameter2(
+      identifier: _readNode(data.normalFormalParameter_identifier),
+      period: _getToken(data.fieldFormalParameter_period),
+      thisKeyword: _getToken(data.fieldFormalParameter_thisKeyword),
+      covariantKeyword: _getToken(data.normalFormalParameter_covariantKeyword),
+      typeParameters: _readNode(data.fieldFormalParameter_typeParameters),
+      keyword: _getToken(data.fieldFormalParameter_keyword),
+      metadata: _readNodeList(data.normalFormalParameter_metadata),
+      comment: _readNode(data.normalFormalParameter_comment),
+      type: _readNode(data.fieldFormalParameter_type),
+      parameters: _readNode(data.fieldFormalParameter_formalParameters),
+    );
+  }
+
+  ForEachPartsWithDeclaration _read_forEachPartsWithDeclaration(
+      LinkedNode data) {
+    return astFactory.forEachPartsWithDeclaration(
+      inKeyword: _getToken(data.forEachParts_inKeyword),
+      iterable: _readNode(data.forEachParts_iterable),
+      loopVariable: _readNode(data.forEachPartsWithDeclaration_loopVariable),
+    );
+  }
+
+  ForEachPartsWithIdentifier _read_forEachPartsWithIdentifier(LinkedNode data) {
+    return astFactory.forEachPartsWithIdentifier(
+      inKeyword: _getToken(data.forEachParts_inKeyword),
+      iterable: _readNode(data.forEachParts_iterable),
+      identifier: _readNode(data.forEachPartsWithIdentifier_identifier),
+    );
+  }
+
+  ForElement _read_forElement(LinkedNode data) {
+    return astFactory.forElement(
+      awaitKeyword: _getToken(data.forMixin_awaitKeyword),
+      body: _readNode(data.forElement_body),
+      forKeyword: _getToken(data.forMixin_forKeyword),
+      forLoopParts: _readNode(data.forMixin_forLoopParts),
+      leftParenthesis: _getToken(data.forMixin_leftParenthesis),
+      rightParenthesis: _getToken(data.forMixin_rightParenthesis),
+    );
+  }
+
+  FormalParameterList _read_formalParameterList(LinkedNode data) {
+    return astFactory.formalParameterList(
+      _getToken(data.formalParameterList_leftParenthesis),
+      _readNodeList(data.formalParameterList_parameters),
+      _getToken(data.formalParameterList_leftDelimiter),
+      _getToken(data.formalParameterList_rightDelimiter),
+      _getToken(data.formalParameterList_rightParenthesis),
+    );
+  }
+
+  ForPartsWithDeclarations _read_forPartsWithDeclarations(LinkedNode data) {
+    return astFactory.forPartsWithDeclarations(
+      condition: _readNode(data.forParts_condition),
+      leftSeparator: _getToken(data.forParts_leftSeparator),
+      rightSeparator: _getToken(data.forParts_rightSeparator),
+      updaters: _readNodeList(data.forParts_updaters),
+      variables: _readNode(data.forPartsWithDeclarations_variables),
+    );
+  }
+
+  ForPartsWithExpression _read_forPartsWithExpression(LinkedNode data) {
+    return astFactory.forPartsWithExpression(
+      condition: _readNode(data.forParts_condition),
+      initialization: _readNode(data.forPartsWithExpression_initialization),
+      leftSeparator: _getToken(data.forParts_leftSeparator),
+      rightSeparator: _getToken(data.forParts_rightSeparator),
+      updaters: _readNodeList(data.forParts_updaters),
+    );
+  }
+
+  ForStatement _read_forStatement(LinkedNode data) {
+    return astFactory.forStatement(
+      awaitKeyword: _getToken(data.forMixin_awaitKeyword),
+      forKeyword: _getToken(data.forMixin_forKeyword),
+      leftParenthesis: _getToken(data.forMixin_leftParenthesis),
+      forLoopParts: _readNode(data.forMixin_forLoopParts),
+      rightParenthesis: _getToken(data.forMixin_rightParenthesis),
+      body: _readNode(data.forStatement_body),
+    );
+  }
+
+  FunctionDeclaration _read_functionDeclaration(LinkedNode data) {
+    return astFactory.functionDeclaration(
+      _readNode(data.annotatedNode_comment),
+      _readNodeList(data.annotatedNode_metadata),
+      _getToken(data.functionDeclaration_externalKeyword),
+      _readNode(data.functionDeclaration_returnType),
+      _getToken(data.functionDeclaration_propertyKeyword),
+      _readNode(data.namedCompilationUnitMember_name),
+      _readNode(data.functionDeclaration_functionExpression),
+    );
+  }
+
+  FunctionDeclarationStatement _read_functionDeclarationStatement(
+      LinkedNode data) {
+    return astFactory.functionDeclarationStatement(
+      _readNode(data.functionDeclarationStatement_functionDeclaration),
+    );
+  }
+
+  FunctionExpression _read_functionExpression(LinkedNode data) {
+    var prevLocalParameters = _localParameters;
+    var thisLocalParameters = <ParameterElement>[];
+    _localParameters = thisLocalParameters;
+
+    var node = astFactory.functionExpression(
+      _readNode(data.functionExpression_typeParameters),
+      _readNode(data.functionExpression_formalParameters),
+      _readNode(data.functionExpression_body),
+    );
+    _localParameters = prevLocalParameters;
+
+    if (_localRef != null) {
+      var element = FunctionElementImpl.forLinkedNode(
+        _enclosingElement,
+        _localRef.getChild('${_localRefNextId++}'),
+        data,
+      );
+      element.parameters = thisLocalParameters;
+
+      var body = node.body;
+      if (body.isAsynchronous) {
+        element.asynchronous = true;
+      }
+      if (body.isGenerator) {
+        element.generator = true;
+      }
+
+      element.type = new FunctionTypeImpl(element);
+      (node as FunctionExpressionImpl).declaredElement = element;
+    }
+    return node;
+  }
+
+  FunctionExpressionInvocation _read_functionExpressionInvocation(
+      LinkedNode data) {
+    return astFactory.functionExpressionInvocation(
+      _readNode(data.functionExpressionInvocation_function),
+      _readNode(data.invocationExpression_typeArguments),
+      _readNode(data.invocationExpression_arguments),
+    )..staticInvokeType = _readType(data.invocationExpression_invokeType);
+  }
+
+  FunctionTypeAlias _read_functionTypeAlias(LinkedNode data) {
+    return astFactory.functionTypeAlias(
+      _readNode(data.annotatedNode_comment),
+      _readNodeList(data.annotatedNode_metadata),
+      _getToken(data.typeAlias_typedefKeyword),
+      _readNode(data.functionTypeAlias_returnType),
+      _readNode(data.namedCompilationUnitMember_name),
+      _readNode(data.functionTypeAlias_typeParameters),
+      _readNode(data.functionTypeAlias_formalParameters),
+      _getToken(data.typeAlias_semicolon),
+    );
+  }
+
+  FunctionTypedFormalParameter _read_functionTypedFormalParameter(
+      LinkedNode data) {
+    var node = astFactory.functionTypedFormalParameter2(
+      identifier: _readNode(data.normalFormalParameter_identifier),
+      parameters: _readNode(data.functionTypedFormalParameter_formalParameters),
+      returnType: _readNode(data.functionTypedFormalParameter_returnType),
+      covariantKeyword: _getToken(data.normalFormalParameter_covariantKeyword),
+      comment: _readNode(data.normalFormalParameter_comment),
+      metadata: _readNodeList(data.normalFormalParameter_metadata),
+      typeParameters:
+          _readNode(data.functionTypedFormalParameter_typeParameters),
+    );
+
+    if (_localRef != null) {
+      var name = node.identifier.name;
+      var element = ParameterElementImpl.forLinkedNodeFactory(
+        _enclosingElement,
+        _localRef.getChild('${_localRefNextId++}').getChild(name),
+        data,
+      );
+      _localParameters.add(element);
+      node.identifier.staticElement = element;
+    }
+
+    return node;
+  }
+
+  GenericFunctionType _read_genericFunctionType(LinkedNode data) {
+    return astFactory.genericFunctionType(
+      _readNode(data.genericFunctionType_returnType),
+      _getToken(data.genericFunctionType_functionKeyword),
+      _readNode(data.genericFunctionType_typeParameters),
+      _readNode(data.genericFunctionType_formalParameters),
+      question: _getToken(data.genericFunctionType_question),
+    );
+  }
+
+  GenericTypeAlias _read_genericTypeAlias(LinkedNode data) {
+    return astFactory.genericTypeAlias(
+      _readNode(data.annotatedNode_comment),
+      _readNodeList(data.annotatedNode_metadata),
+      _getToken(data.typeAlias_typedefKeyword),
+      _readNode(data.namedCompilationUnitMember_name),
+      _readNode(data.genericTypeAlias_typeParameters),
+      _getToken(data.genericTypeAlias_equals),
+      _readNode(data.genericTypeAlias_functionType),
+      _getToken(data.typeAlias_semicolon),
+    );
+  }
+
+  HideCombinator _read_hideCombinator(LinkedNode data) {
+    return astFactory.hideCombinator(
+      _getToken(data.combinator_keyword),
+      _readNodeList(data.hideCombinator_hiddenNames),
+    );
+  }
+
+  IfElement _read_ifElement(LinkedNode data) {
+    return astFactory.ifElement(
+      condition: _readNode(data.ifMixin_condition),
+      elseElement: _readNode(data.ifElement_elseElement),
+      elseKeyword: _getToken(data.ifMixin_elseKeyword),
+      ifKeyword: _getToken(data.ifMixin_ifKeyword),
+      leftParenthesis: _getToken(data.ifMixin_leftParenthesis),
+      rightParenthesis: _getToken(data.ifMixin_rightParenthesis),
+      thenElement: _readNode(data.ifElement_thenElement),
+    );
+  }
+
+  IfStatement _read_ifStatement(LinkedNode data) {
+    return astFactory.ifStatement(
+      _getToken(data.ifMixin_ifKeyword),
+      _getToken(data.ifMixin_leftParenthesis),
+      _readNode(data.ifMixin_condition),
+      _getToken(data.ifMixin_rightParenthesis),
+      _readNode(data.ifStatement_thenStatement),
+      _getToken(data.ifMixin_elseKeyword),
+      _readNode(data.ifStatement_elseStatement),
+    );
+  }
+
+  ImplementsClause _read_implementsClause(LinkedNode data) {
+    return astFactory.implementsClause(
+      _getToken(data.implementsClause_implementsKeyword),
+      _readNodeList(data.implementsClause_interfaces),
+    );
+  }
+
+  ImportDirective _read_importDirective(LinkedNode data) {
+    return astFactory.importDirective(
+      _readNode(data.annotatedNode_comment),
+      _readNodeList(data.annotatedNode_metadata),
+      _getToken(data.directive_keyword),
+      _readNode(data.uriBasedDirective_uri),
+      _readNodeList(data.namespaceDirective_configurations),
+      _getToken(data.importDirective_deferredKeyword),
+      _getToken(data.importDirective_asKeyword),
+      _readNode(data.importDirective_prefix),
+      _readNodeList(data.namespaceDirective_combinators),
+      _getToken(data.directive_semicolon),
+    );
+  }
+
+  IndexExpression _read_indexExpression(LinkedNode data) {
+    return astFactory.indexExpressionForTarget(
+      _readNode(data.indexExpression_target),
+      _getToken(data.indexExpression_leftBracket),
+      _readNode(data.indexExpression_index),
+      _getToken(data.indexExpression_rightBracket),
+    )
+      ..period = _getToken(data.indexExpression_period)
+      ..staticElement = _getElement(data.indexExpression_element)
+      ..staticType = _readType(data.expression_type);
+  }
+
+  InstanceCreationExpression _read_instanceCreationExpression(LinkedNode data) {
+    return astFactory.instanceCreationExpression(
+      _getToken(data.instanceCreationExpression_keyword),
+      _readNode(data.instanceCreationExpression_constructorName),
+      _readNode(data.instanceCreationExpression_arguments),
+      typeArguments: _readNode(data.instanceCreationExpression_typeArguments),
+    )..staticType = _readType(data.expression_type);
+  }
+
+  IntegerLiteral _read_integerLiteral(LinkedNode data) {
+    return astFactory.integerLiteral(
+      _getToken(data.integerLiteral_literal),
+      data.integerLiteral_value,
+    )..staticType = _readType(data.expression_type);
+  }
+
+  InterpolationExpression _read_interpolationExpression(LinkedNode data) {
+    return astFactory.interpolationExpression(
+      _getToken(data.interpolationExpression_leftBracket),
+      _readNode(data.interpolationExpression_expression),
+      _getToken(data.interpolationExpression_rightBracket),
+    );
+  }
+
+  InterpolationString _read_interpolationString(LinkedNode data) {
+    return astFactory.interpolationString(
+      _getToken(data.interpolationString_token),
+      data.interpolationString_value,
+    );
+  }
+
+  IsExpression _read_isExpression(LinkedNode data) {
+    return astFactory.isExpression(
+      _readNode(data.isExpression_expression),
+      _getToken(data.isExpression_isOperator),
+      _getToken(data.isExpression_notOperator),
+      _readNode(data.isExpression_type),
+    )..staticType = _readType(data.expression_type);
+  }
+
+  Label _read_label(LinkedNode data) {
+    return astFactory.label(
+      _readNode(data.label_label),
+      _getToken(data.label_colon),
+    );
+  }
+
+  LabeledStatement _read_labeledStatement(LinkedNode data) {
+    return astFactory.labeledStatement(
+      _readNodeList(data.labeledStatement_labels),
+      _readNode(data.labeledStatement_statement),
+    );
+  }
+
+  LibraryDirective _read_libraryDirective(LinkedNode data) {
+    return astFactory.libraryDirective(
+      _readNode(data.annotatedNode_comment),
+      _readNodeList(data.annotatedNode_metadata),
+      _getToken(data.directive_keyword),
+      _readNode(data.libraryDirective_name),
+      _getToken(data.directive_semicolon),
+    );
+  }
+
+  LibraryIdentifier _read_libraryIdentifier(LinkedNode data) {
+    return astFactory.libraryIdentifier(
+      _readNodeList(data.libraryIdentifier_components),
+    );
+  }
+
+  ListLiteral _read_listLiteral(LinkedNode data) {
+    return astFactory.listLiteral(
+      _getToken(data.typedLiteral_constKeyword),
+      _readNode(data.typedLiteral_typeArguments),
+      _getToken(data.listLiteral_leftBracket),
+      _readNodeList(data.listLiteral_elements),
+      _getToken(data.listLiteral_rightBracket),
+    )..staticType = _readType(data.expression_type);
+  }
+
+  MapLiteralEntry _read_mapLiteralEntry(LinkedNode data) {
+    return astFactory.mapLiteralEntry(
+      _readNode(data.mapLiteralEntry_key),
+      _getToken(data.mapLiteralEntry_separator),
+      _readNode(data.mapLiteralEntry_value),
+    );
+  }
+
+  MethodDeclaration _read_methodDeclaration(LinkedNode data) {
+    return astFactory.methodDeclaration(
+      _readNode(data.annotatedNode_comment),
+      _readNodeList(data.annotatedNode_metadata),
+      _getToken(data.methodDeclaration_externalKeyword),
+      _getToken(data.methodDeclaration_modifierKeyword),
+      _readNode(data.methodDeclaration_returnType),
+      _getToken(data.methodDeclaration_propertyKeyword),
+      _getToken(data.methodDeclaration_operatorKeyword),
+      _readNode(data.methodDeclaration_name),
+      _readNode(data.methodDeclaration_typeParameters),
+      _readNode(data.methodDeclaration_formalParameters),
+      _readNode(data.methodDeclaration_body),
+    );
+  }
+
+  MethodInvocation _read_methodInvocation(LinkedNode data) {
+    return astFactory.methodInvocation(
+      _readNode(data.methodInvocation_target),
+      _getToken(data.methodInvocation_operator),
+      _readNode(data.methodInvocation_methodName),
+      _readNode(data.invocationExpression_typeArguments),
+      _readNode(data.invocationExpression_arguments),
+    )..staticInvokeType = _readType(data.invocationExpression_invokeType);
+  }
+
+  MixinDeclaration _read_mixinDeclaration(LinkedNode data) {
+    return astFactory.mixinDeclaration(
+      _readNode(data.annotatedNode_comment),
+      _readNodeList(data.annotatedNode_metadata),
+      _getToken(data.mixinDeclaration_mixinKeyword),
+      _readNode(data.namedCompilationUnitMember_name),
+      _readNode(data.classOrMixinDeclaration_typeParameters),
+      _readNode(data.mixinDeclaration_onClause),
+      _readNode(data.classOrMixinDeclaration_implementsClause),
+      _getToken(data.classOrMixinDeclaration_leftBracket),
+      _readNodeList(data.classOrMixinDeclaration_members),
+      _getToken(data.classOrMixinDeclaration_rightBracket),
+    );
+  }
+
+  NamedExpression _read_namedExpression(LinkedNode data) {
+    return astFactory.namedExpression(
+      _readNode(data.namedExpression_name),
+      _readNode(data.namedExpression_expression),
+    )..staticType = _readType(data.expression_type);
+  }
+
+  NativeClause _read_nativeClause(LinkedNode data) {
+    return astFactory.nativeClause(
+      _getToken(data.nativeClause_nativeKeyword),
+      _readNode(data.nativeClause_name),
+    );
+  }
+
+  NativeFunctionBody _read_nativeFunctionBody(LinkedNode data) {
+    return astFactory.nativeFunctionBody(
+      _getToken(data.nativeFunctionBody_nativeKeyword),
+      _readNode(data.nativeFunctionBody_stringLiteral),
+      _getToken(data.nativeFunctionBody_semicolon),
+    );
+  }
+
+  NullLiteral _read_nullLiteral(LinkedNode data) {
+    return astFactory.nullLiteral(
+      _getToken(data.nullLiteral_literal),
+    )..staticType = _readType(data.expression_type);
+  }
+
+  OnClause _read_onClause(LinkedNode data) {
+    return astFactory.onClause(
+      _getToken(data.onClause_onKeyword),
+      _readNodeList(data.onClause_superclassConstraints),
+    );
+  }
+
+  ParenthesizedExpression _read_parenthesizedExpression(LinkedNode data) {
+    return astFactory.parenthesizedExpression(
+      _getToken(data.parenthesizedExpression_leftParenthesis),
+      _readNode(data.parenthesizedExpression_expression),
+      _getToken(data.parenthesizedExpression_rightParenthesis),
+    )..staticType = _readType(data.expression_type);
+  }
+
+  PartDirective _read_partDirective(LinkedNode data) {
+    return astFactory.partDirective(
+      _readNode(data.annotatedNode_comment),
+      _readNodeList(data.annotatedNode_metadata),
+      _getToken(data.directive_keyword),
+      _readNode(data.uriBasedDirective_uri),
+      _getToken(data.directive_semicolon),
+    );
+  }
+
+  PartOfDirective _read_partOfDirective(LinkedNode data) {
+    return astFactory.partOfDirective(
+      _readNode(data.annotatedNode_comment),
+      _readNodeList(data.annotatedNode_metadata),
+      _getToken(data.directive_keyword),
+      _getToken(data.partOfDirective_ofKeyword),
+      _readNode(data.partOfDirective_uri),
+      _readNode(data.partOfDirective_libraryName),
+      _getToken(data.directive_semicolon),
+    );
+  }
+
+  PostfixExpression _read_postfixExpression(LinkedNode data) {
+    return astFactory.postfixExpression(
+      _readNode(data.postfixExpression_operand),
+      _getToken(data.postfixExpression_operator),
+    )
+      ..staticElement = _getElement(data.postfixExpression_element)
+      ..staticType = _readType(data.expression_type);
+  }
+
+  PrefixedIdentifier _read_prefixedIdentifier(LinkedNode data) {
+    return astFactory.prefixedIdentifier(
+      _readNode(data.prefixedIdentifier_prefix),
+      _getToken(data.prefixedIdentifier_period),
+      _readNode(data.prefixedIdentifier_identifier),
+    )..staticType = _readType(data.expression_type);
+  }
+
+  PrefixExpression _read_prefixExpression(LinkedNode data) {
+    return astFactory.prefixExpression(
+      _getToken(data.prefixExpression_operator),
+      _readNode(data.prefixExpression_operand),
+    )
+      ..staticElement = _getElement(data.prefixExpression_element)
+      ..staticType = _readType(data.expression_type);
+  }
+
+  PropertyAccess _read_propertyAccess(LinkedNode data) {
+    return astFactory.propertyAccess(
+      _readNode(data.propertyAccess_target),
+      _getToken(data.propertyAccess_operator),
+      _readNode(data.propertyAccess_propertyName),
+    )..staticType = _readType(data.expression_type);
+  }
+
+  RedirectingConstructorInvocation _read_redirectingConstructorInvocation(
+      LinkedNode data) {
+    return astFactory.redirectingConstructorInvocation(
+      _getToken(data.redirectingConstructorInvocation_thisKeyword),
+      _getToken(data.redirectingConstructorInvocation_period),
+      _readNode(data.redirectingConstructorInvocation_constructorName),
+      _readNode(data.redirectingConstructorInvocation_arguments),
+    )..staticElement =
+        _getElement(data.redirectingConstructorInvocation_element);
+  }
+
+  RethrowExpression _read_rethrowExpression(LinkedNode data) {
+    return astFactory.rethrowExpression(
+      _getToken(data.rethrowExpression_rethrowKeyword),
+    )..staticType = _readType(data.expression_type);
+  }
+
+  ReturnStatement _read_returnStatement(LinkedNode data) {
+    return astFactory.returnStatement(
+      _getToken(data.returnStatement_returnKeyword),
+      _readNode(data.returnStatement_expression),
+      _getToken(data.returnStatement_semicolon),
+    );
+  }
+
+  ScriptTag _read_scriptTag(LinkedNode data) {
+    return astFactory.scriptTag(
+      _getToken(data.scriptTag_scriptTag),
+    );
+  }
+
+  SetOrMapLiteral _read_setOrMapLiteral(LinkedNode data) {
+    SetOrMapLiteralImpl node = astFactory.setOrMapLiteral(
+      constKeyword: _getToken(data.typedLiteral_constKeyword),
+      elements: _readNodeList(data.setOrMapLiteral_elements),
+      leftBracket: _getToken(data.setOrMapLiteral_leftBracket),
+      typeArguments: _readNode(data.typedLiteral_typeArguments),
+      rightBracket: _getToken(data.setOrMapLiteral_rightBracket),
+    )..staticType = _readType(data.expression_type);
+    if (data.setOrMapLiteral_isMap) {
+      node.becomeMap();
+    } else if (data.setOrMapLiteral_isSet) {
+      node.becomeSet();
+    }
+    return node;
+  }
+
+  ShowCombinator _read_showCombinator(LinkedNode data) {
+    return astFactory.showCombinator(
+      _getToken(data.combinator_keyword),
+      _readNodeList(data.showCombinator_shownNames),
+    );
+  }
+
+  SimpleFormalParameter _read_simpleFormalParameter(LinkedNode data) {
+    SimpleFormalParameterImpl node = astFactory.simpleFormalParameter2(
+      identifier: _readNode(data.normalFormalParameter_identifier),
+      type: _readNode(data.simpleFormalParameter_type),
+      covariantKeyword: _getToken(data.normalFormalParameter_covariantKeyword),
+      comment: _readNode(data.normalFormalParameter_comment),
+      metadata: _readNodeList(data.normalFormalParameter_metadata),
+      keyword: _getToken(data.simpleFormalParameter_keyword),
+    );
+
+    if (_localRef != null) {
+      var name = node.identifier.name;
+      var element = ParameterElementImpl.forLinkedNodeFactory(
+        _enclosingElement,
+        _localRef.getChild('${_localRefNextId++}').getChild(name),
+        data,
+      );
+      _localParameters.add(element);
+      node.identifier.staticElement = element;
+      node.declaredElement = element;
+    }
+
+    return node;
+  }
+
+  SimpleIdentifier _read_simpleIdentifier(LinkedNode data) {
+    return astFactory.simpleIdentifier(
+      _getToken(data.simpleIdentifier_token),
+    )
+      ..staticElement = _getElement(data.simpleIdentifier_element)
+      ..staticType = _readType(data.expression_type);
+  }
+
+  SimpleStringLiteral _read_simpleStringLiteral(LinkedNode data) {
+    return astFactory.simpleStringLiteral(
+      _getToken(data.simpleStringLiteral_token),
+      data.simpleStringLiteral_value,
+    )..staticType = _readType(data.expression_type);
+  }
+
+  SpreadElement _read_spreadElement(LinkedNode data) {
+    return astFactory.spreadElement(
+      spreadOperator: _getToken(data.spreadElement_spreadOperator),
+      expression: _readNode(data.spreadElement_expression),
+    );
+  }
+
+  StringInterpolation _read_stringInterpolation(LinkedNode data) {
+    return astFactory.stringInterpolation(
+      _readNodeList(data.stringInterpolation_elements),
+    )..staticType = _readType(data.expression_type);
+  }
+
+  SuperConstructorInvocation _read_superConstructorInvocation(LinkedNode data) {
+    return astFactory.superConstructorInvocation(
+      _getToken(data.superConstructorInvocation_superKeyword),
+      _getToken(data.superConstructorInvocation_period),
+      _readNode(data.superConstructorInvocation_constructorName),
+      _readNode(data.superConstructorInvocation_arguments),
+    )..staticElement = _getElement(data.superConstructorInvocation_element);
+  }
+
+  SuperExpression _read_superExpression(LinkedNode data) {
+    return astFactory.superExpression(
+      _getToken(data.superExpression_superKeyword),
+    )..staticType = _readType(data.expression_type);
+  }
+
+  SwitchCase _read_switchCase(LinkedNode data) {
+    return astFactory.switchCase(
+      _readNodeList(data.switchMember_labels),
+      _getToken(data.switchMember_keyword),
+      _readNode(data.switchCase_expression),
+      _getToken(data.switchMember_colon),
+      _readNodeList(data.switchMember_statements),
+    );
+  }
+
+  SwitchDefault _read_switchDefault(LinkedNode data) {
+    return astFactory.switchDefault(
+      _readNodeList(data.switchMember_labels),
+      _getToken(data.switchMember_keyword),
+      _getToken(data.switchMember_colon),
+      _readNodeList(data.switchMember_statements),
+    );
+  }
+
+  SwitchStatement _read_switchStatement(LinkedNode data) {
+    return astFactory.switchStatement(
+      _getToken(data.switchStatement_switchKeyword),
+      _getToken(data.switchStatement_leftParenthesis),
+      _readNode(data.switchStatement_expression),
+      _getToken(data.switchStatement_rightParenthesis),
+      _getToken(data.switchStatement_leftBracket),
+      _readNodeList(data.switchStatement_members),
+      _getToken(data.switchStatement_rightBracket),
+    );
+  }
+
+  SymbolLiteral _read_symbolLiteral(LinkedNode data) {
+    return astFactory.symbolLiteral(
+      _getToken(data.symbolLiteral_poundSign),
+      _getTokens(data.symbolLiteral_components),
+    )..staticType = _readType(data.expression_type);
+  }
+
+  ThisExpression _read_thisExpression(LinkedNode data) {
+    return astFactory.thisExpression(
+      _getToken(data.thisExpression_thisKeyword),
+    )..staticType = _readType(data.expression_type);
+  }
+
+  ThrowExpression _read_throwExpression(LinkedNode data) {
+    return astFactory.throwExpression(
+      _getToken(data.throwExpression_throwKeyword),
+      _readNode(data.throwExpression_expression),
+    )..staticType = _readType(data.expression_type);
+  }
+
+  TopLevelVariableDeclaration _read_topLevelVariableDeclaration(
+      LinkedNode data) {
+    return astFactory.topLevelVariableDeclaration(
+      _readNode(data.annotatedNode_comment),
+      _readNodeList(data.annotatedNode_metadata),
+      _readNode(data.topLevelVariableDeclaration_variableList),
+      _getToken(data.topLevelVariableDeclaration_semicolon),
+    );
+  }
+
+  TryStatement _read_tryStatement(LinkedNode data) {
+    return astFactory.tryStatement(
+      _getToken(data.tryStatement_tryKeyword),
+      _readNode(data.tryStatement_body),
+      _readNodeList(data.tryStatement_catchClauses),
+      _getToken(data.tryStatement_finallyKeyword),
+      _readNode(data.tryStatement_finallyBlock),
+    );
+  }
+
+  TypeArgumentList _read_typeArgumentList(LinkedNode data) {
+    return astFactory.typeArgumentList(
+      _getToken(data.typeArgumentList_leftBracket),
+      _readNodeList(data.typeArgumentList_arguments),
+      _getToken(data.typeArgumentList_rightBracket),
+    );
+  }
+
+  TypeName _read_typeName(LinkedNode data) {
+    return astFactory.typeName(
+      _readNode(data.typeName_name),
+      _readNode(data.typeName_typeArguments),
+      question: _getToken(data.typeName_question),
+    )..type = _readType(data.typeName_type);
+  }
+
+  TypeParameter _read_typeParameter(LinkedNode data) {
+    return astFactory.typeParameter(
+      _readNode(data.annotatedNode_comment),
+      _readNodeList(data.annotatedNode_metadata),
+      _readNode(data.typeParameter_name),
+      _getToken(data.typeParameter_extendsKeyword),
+      _readNode(data.typeParameter_bound),
+    );
+  }
+
+  TypeParameterList _read_typeParameterList(LinkedNode data) {
+    return astFactory.typeParameterList(
+      _getToken(data.typeParameterList_leftBracket),
+      _readNodeList(data.typeParameterList_typeParameters),
+      _getToken(data.typeParameterList_rightBracket),
+    );
+  }
+
+  VariableDeclaration _read_variableDeclaration(LinkedNode data) {
+    return astFactory.variableDeclaration(
+      _readNode(data.variableDeclaration_name),
+      _getToken(data.variableDeclaration_equals),
+      _readNode(data.variableDeclaration_initializer),
+    );
+  }
+
+  VariableDeclarationList _read_variableDeclarationList(LinkedNode data) {
+    return astFactory.variableDeclarationList(
+      _readNode(data.annotatedNode_comment),
+      _readNodeList(data.annotatedNode_metadata),
+      _getToken(data.variableDeclarationList_keyword),
+      _readNode(data.variableDeclarationList_type),
+      _readNodeList(data.variableDeclarationList_variables),
+    );
+  }
+
+  VariableDeclarationStatement _read_variableDeclarationStatement(
+      LinkedNode data) {
+    return astFactory.variableDeclarationStatement(
+      _readNode(data.variableDeclarationStatement_variables),
+      _getToken(data.variableDeclarationStatement_semicolon),
+    );
+  }
+
+  WhileStatement _read_whileStatement(LinkedNode data) {
+    return astFactory.whileStatement(
+      _getToken(data.whileStatement_whileKeyword),
+      _getToken(data.whileStatement_leftParenthesis),
+      _readNode(data.whileStatement_condition),
+      _getToken(data.whileStatement_rightParenthesis),
+      _readNode(data.whileStatement_body),
+    );
+  }
+
+  WithClause _read_withClause(LinkedNode data) {
+    return astFactory.withClause(
+      _getToken(data.withClause_withKeyword),
+      _readNodeList(data.withClause_mixinTypes),
+    );
+  }
+
+  YieldStatement _read_yieldStatement(LinkedNode data) {
+    return astFactory.yieldStatement(
+      _getToken(data.yieldStatement_yieldKeyword),
+      _getToken(data.yieldStatement_star),
+      _readNode(data.yieldStatement_expression),
+      _getToken(data.yieldStatement_semicolon),
+    );
+  }
+
+  AstNode _readNode(LinkedNode data) {
     if (data == null) return null;
 
     switch (data.kind) {
@@ -176,6 +1414,10 @@
         return _read_mixinDeclaration(data);
       case LinkedNodeKind.namedExpression:
         return _read_namedExpression(data);
+      case LinkedNodeKind.nativeClause:
+        return _read_nativeClause(data);
+      case LinkedNodeKind.nativeFunctionBody:
+        return _read_nativeFunctionBody(data);
       case LinkedNodeKind.nullLiteral:
         return _read_nullLiteral(data);
       case LinkedNodeKind.onClause:
@@ -261,1134 +1503,11 @@
     }
   }
 
-  T _getElement<T extends Element>(int index) {
-    var bundleContext = _unitContext.bundleContext;
-    return bundleContext.elementOfIndex(index);
-  }
-
-  List<T> _getElements<T extends Element>(List<int> indexList) {
-    var bundleContext = _unitContext.bundleContext;
-    return bundleContext.elementsOfIndexes(indexList);
-  }
-
-  Token _getToken(int index) {
-    return _unitContext.tokensContext.tokenOfIndex(index);
-  }
-
-  List<Token> _getTokens(List<int> indexList) {
-    var result = List<Token>(indexList.length);
-    for (var i = 0; i < indexList.length; ++i) {
-      var index = indexList[i];
-      result[i] = _getToken(index);
-    }
-    return result;
-  }
-
-  AdjacentStrings _read_adjacentStrings(LinkedNode data) {
-    return astFactory.adjacentStrings(
-      _readNodeList(data.adjacentStrings_strings),
-    )..staticType = _readType(data.expression_type);
-  }
-
-  Annotation _read_annotation(LinkedNode data) {
-    return astFactory.annotation(
-      _getToken(data.annotation_atSign),
-      readNode(data.annotation_name),
-      _getToken(data.annotation_period),
-      readNode(data.annotation_constructorName),
-      readNode(data.annotation_arguments),
-    );
-  }
-
-  ArgumentList _read_argumentList(LinkedNode data) {
-    return astFactory.argumentList(
-      _getToken(data.argumentList_leftParenthesis),
-      _readNodeList(data.argumentList_arguments),
-      _getToken(data.argumentList_rightParenthesis),
-    );
-  }
-
-  AsExpression _read_asExpression(LinkedNode data) {
-    return astFactory.asExpression(
-      readNode(data.asExpression_expression),
-      _getToken(data.asExpression_asOperator),
-      readNode(data.asExpression_type),
-    )..staticType = _readType(data.expression_type);
-  }
-
-  AssertInitializer _read_assertInitializer(LinkedNode data) {
-    return astFactory.assertInitializer(
-      _getToken(data.assertInitializer_assertKeyword),
-      _getToken(data.assertInitializer_leftParenthesis),
-      readNode(data.assertInitializer_condition),
-      _getToken(data.assertInitializer_comma),
-      readNode(data.assertInitializer_message),
-      _getToken(data.assertInitializer_rightParenthesis),
-    );
-  }
-
-  AssertStatement _read_assertStatement(LinkedNode data) {
-    return astFactory.assertStatement(
-      _getToken(data.assertStatement_assertKeyword),
-      _getToken(data.assertStatement_leftParenthesis),
-      readNode(data.assertStatement_condition),
-      _getToken(data.assertStatement_comma),
-      readNode(data.assertStatement_message),
-      _getToken(data.assertStatement_rightParenthesis),
-      _getToken(data.assertStatement_semicolon),
-    );
-  }
-
-  AssignmentExpression _read_assignmentExpression(LinkedNode data) {
-    return astFactory.assignmentExpression(
-      readNode(data.assignmentExpression_leftHandSide),
-      _getToken(data.assignmentExpression_operator),
-      readNode(data.assignmentExpression_rightHandSide),
-    )
-      ..staticElement = _getElement(data.assignmentExpression_element)
-      ..staticType = _readType(data.expression_type);
-  }
-
-  AwaitExpression _read_awaitExpression(LinkedNode data) {
-    return astFactory.awaitExpression(
-      _getToken(data.awaitExpression_awaitKeyword),
-      readNode(data.awaitExpression_expression),
-    )..staticType = _readType(data.expression_type);
-  }
-
-  BinaryExpression _read_binaryExpression(LinkedNode data) {
-    return astFactory.binaryExpression(
-      readNode(data.binaryExpression_leftOperand),
-      _getToken(data.binaryExpression_operator),
-      readNode(data.binaryExpression_rightOperand),
-    )
-      ..staticElement = _getElement(data.binaryExpression_element)
-      ..staticType = _readType(data.expression_type);
-  }
-
-  Block _read_block(LinkedNode data) {
-    return astFactory.block(
-      _getToken(data.block_leftBracket),
-      _readNodeList(data.block_statements),
-      _getToken(data.block_rightBracket),
-    );
-  }
-
-  BlockFunctionBody _read_blockFunctionBody(LinkedNode data) {
-    return astFactory.blockFunctionBody(
-      _getToken(data.blockFunctionBody_keyword),
-      _getToken(data.blockFunctionBody_star),
-      readNode(data.blockFunctionBody_block),
-    );
-  }
-
-  BooleanLiteral _read_booleanLiteral(LinkedNode data) {
-    return astFactory.booleanLiteral(
-      _getToken(data.booleanLiteral_literal),
-      data.booleanLiteral_value,
-    )..staticType = _readType(data.expression_type);
-  }
-
-  BreakStatement _read_breakStatement(LinkedNode data) {
-    return astFactory.breakStatement(
-      _getToken(data.breakStatement_breakKeyword),
-      readNode(data.breakStatement_label),
-      _getToken(data.breakStatement_semicolon),
-    );
-  }
-
-  CascadeExpression _read_cascadeExpression(LinkedNode data) {
-    return astFactory.cascadeExpression(
-      readNode(data.cascadeExpression_target),
-      _readNodeList(data.cascadeExpression_sections),
-    )..staticType = _readType(data.expression_type);
-  }
-
-  CatchClause _read_catchClause(LinkedNode data) {
-    return astFactory.catchClause(
-      _getToken(data.catchClause_onKeyword),
-      readNode(data.catchClause_exceptionType),
-      _getToken(data.catchClause_catchKeyword),
-      _getToken(data.catchClause_leftParenthesis),
-      readNode(data.catchClause_exceptionParameter),
-      _getToken(data.catchClause_comma),
-      readNode(data.catchClause_stackTraceParameter),
-      _getToken(data.catchClause_rightParenthesis),
-      readNode(data.catchClause_body),
-    );
-  }
-
-  ClassDeclaration _read_classDeclaration(LinkedNode data) {
-    return astFactory.classDeclaration(
-      readNode(data.annotatedNode_comment),
-      _readNodeList(data.annotatedNode_metadata),
-      _getToken(data.classDeclaration_abstractKeyword),
-      _getToken(data.classDeclaration_classKeyword),
-      readNode(data.namedCompilationUnitMember_name),
-      readNode(data.classOrMixinDeclaration_typeParameters),
-      readNode(data.classDeclaration_extendsClause),
-      readNode(data.classDeclaration_withClause),
-      readNode(data.classOrMixinDeclaration_implementsClause),
-      _getToken(data.classOrMixinDeclaration_leftBracket),
-      _readNodeList(data.classOrMixinDeclaration_members),
-      _getToken(data.classOrMixinDeclaration_rightBracket),
-    );
-  }
-
-  ClassTypeAlias _read_classTypeAlias(LinkedNode data) {
-    return astFactory.classTypeAlias(
-      readNode(data.annotatedNode_comment),
-      _readNodeList(data.annotatedNode_metadata),
-      _getToken(data.typeAlias_typedefKeyword),
-      readNode(data.namedCompilationUnitMember_name),
-      readNode(data.classTypeAlias_typeParameters),
-      _getToken(data.classTypeAlias_equals),
-      _getToken(data.classTypeAlias_abstractKeyword),
-      readNode(data.classTypeAlias_superclass),
-      readNode(data.classTypeAlias_withClause),
-      readNode(data.classTypeAlias_implementsClause),
-      _getToken(data.typeAlias_semicolon),
-    );
-  }
-
-  Comment _read_comment(LinkedNode data) {
-    var tokens = _getTokens(data.comment_tokens);
-    switch (data.comment_type) {
-      case LinkedNodeCommentType.block:
-        return astFactory.endOfLineComment(
-          tokens,
-        );
-      case LinkedNodeCommentType.documentation:
-        return astFactory.documentationComment(
-          tokens,
-          // TODO(scheglov) references
-        );
-      case LinkedNodeCommentType.endOfLine:
-        return astFactory.endOfLineComment(
-          tokens,
-        );
-      default:
-        throw StateError('${data.comment_type}');
-    }
-  }
-
-  CompilationUnit _read_compilationUnit(LinkedNode data) {
-    return astFactory.compilationUnit(
-      _getToken(data.compilationUnit_beginToken),
-      readNode(data.compilationUnit_scriptTag),
-      _readNodeList(data.compilationUnit_directives),
-      _readNodeList(data.compilationUnit_declarations),
-      _getToken(data.compilationUnit_endToken),
-    );
-  }
-
-  ConditionalExpression _read_conditionalExpression(LinkedNode data) {
-    return astFactory.conditionalExpression(
-      readNode(data.conditionalExpression_condition),
-      _getToken(data.conditionalExpression_question),
-      readNode(data.conditionalExpression_thenExpression),
-      _getToken(data.conditionalExpression_colon),
-      readNode(data.conditionalExpression_elseExpression),
-    )..staticType = _readType(data.expression_type);
-  }
-
-  Configuration _read_configuration(LinkedNode data) {
-    return astFactory.configuration(
-      _getToken(data.configuration_ifKeyword),
-      _getToken(data.configuration_leftParenthesis),
-      readNode(data.configuration_name),
-      _getToken(data.configuration_equalToken),
-      readNode(data.configuration_value),
-      _getToken(data.configuration_rightParenthesis),
-      readNode(data.configuration_uri),
-    );
-  }
-
-  ConstructorDeclaration _read_constructorDeclaration(LinkedNode data) {
-    return astFactory.constructorDeclaration(
-      readNode(data.annotatedNode_comment),
-      _readNodeList(data.annotatedNode_metadata),
-      _getToken(data.constructorDeclaration_externalKeyword),
-      _getToken(data.constructorDeclaration_constKeyword),
-      _getToken(data.constructorDeclaration_factoryKeyword),
-      readNode(data.constructorDeclaration_returnType),
-      _getToken(data.constructorDeclaration_period),
-      readNode(data.constructorDeclaration_name),
-      readNode(data.constructorDeclaration_parameters),
-      _getToken(data.constructorDeclaration_separator),
-      _readNodeList(data.constructorDeclaration_initializers),
-      readNode(data.constructorDeclaration_redirectedConstructor),
-      readNode(data.constructorDeclaration_body),
-    );
-  }
-
-  ConstructorFieldInitializer _read_constructorFieldInitializer(
-      LinkedNode data) {
-    return astFactory.constructorFieldInitializer(
-      _getToken(data.constructorFieldInitializer_thisKeyword),
-      _getToken(data.constructorFieldInitializer_period),
-      readNode(data.constructorFieldInitializer_fieldName),
-      _getToken(data.constructorFieldInitializer_equals),
-      readNode(data.constructorFieldInitializer_expression),
-    );
-  }
-
-  ConstructorName _read_constructorName(LinkedNode data) {
-    return astFactory.constructorName(
-      readNode(data.constructorName_type),
-      _getToken(data.constructorName_period),
-      readNode(data.constructorName_name),
-    )..staticElement = _getElement(data.constructorName_element);
-  }
-
-  ContinueStatement _read_continueStatement(LinkedNode data) {
-    return astFactory.continueStatement(
-      _getToken(data.continueStatement_continueKeyword),
-      readNode(data.continueStatement_label),
-      _getToken(data.continueStatement_semicolon),
-    );
-  }
-
-  DeclaredIdentifier _read_declaredIdentifier(LinkedNode data) {
-    return astFactory.declaredIdentifier(
-      readNode(data.annotatedNode_comment),
-      _readNodeList(data.annotatedNode_metadata),
-      _getToken(data.declaredIdentifier_keyword),
-      readNode(data.declaredIdentifier_type),
-      readNode(data.declaredIdentifier_identifier),
-    );
-  }
-
-  DefaultFormalParameter _read_defaultFormalParameter(LinkedNode data) {
-    return astFactory.defaultFormalParameter(
-      readNode(data.defaultFormalParameter_parameter),
-      data.defaultFormalParameter_isNamed
-          ? ParameterKind.NAMED
-          : ParameterKind.POSITIONAL,
-      _getToken(data.defaultFormalParameter_separator),
-      readNode(data.defaultFormalParameter_defaultValue),
-    );
-  }
-
-  DoStatement _read_doStatement(LinkedNode data) {
-    return astFactory.doStatement(
-      _getToken(data.doStatement_doKeyword),
-      readNode(data.doStatement_body),
-      _getToken(data.doStatement_whileKeyword),
-      _getToken(data.doStatement_leftParenthesis),
-      readNode(data.doStatement_condition),
-      _getToken(data.doStatement_rightParenthesis),
-      _getToken(data.doStatement_semicolon),
-    );
-  }
-
-  DottedName _read_dottedName(LinkedNode data) {
-    return astFactory.dottedName(
-      _readNodeList(data.dottedName_components),
-    );
-  }
-
-  DoubleLiteral _read_doubleLiteral(LinkedNode data) {
-    return astFactory.doubleLiteral(
-      _getToken(data.doubleLiteral_literal),
-      data.doubleLiteral_value,
-    )..staticType = _readType(data.expression_type);
-  }
-
-  EmptyFunctionBody _read_emptyFunctionBody(LinkedNode data) {
-    return astFactory.emptyFunctionBody(
-      _getToken(data.emptyFunctionBody_semicolon),
-    );
-  }
-
-  EmptyStatement _read_emptyStatement(LinkedNode data) {
-    return astFactory.emptyStatement(
-      _getToken(data.emptyStatement_semicolon),
-    );
-  }
-
-  EnumConstantDeclaration _read_enumConstantDeclaration(LinkedNode data) {
-    return astFactory.enumConstantDeclaration(
-      readNode(data.annotatedNode_comment),
-      _readNodeList(data.annotatedNode_metadata),
-      readNode(data.enumConstantDeclaration_name),
-    );
-  }
-
-  EnumDeclaration _read_enumDeclaration(LinkedNode data) {
-    return astFactory.enumDeclaration(
-      readNode(data.annotatedNode_comment),
-      _readNodeList(data.annotatedNode_metadata),
-      _getToken(data.enumDeclaration_enumKeyword),
-      readNode(data.namedCompilationUnitMember_name),
-      _getToken(data.enumDeclaration_leftBracket),
-      _readNodeList(data.enumDeclaration_constants),
-      _getToken(data.enumDeclaration_rightBracket),
-    );
-  }
-
-  ExportDirective _read_exportDirective(LinkedNode data) {
-    return astFactory.exportDirective(
-      readNode(data.annotatedNode_comment),
-      _readNodeList(data.annotatedNode_metadata),
-      _getToken(data.directive_keyword),
-      readNode(data.uriBasedDirective_uri),
-      _readNodeList(data.namespaceDirective_configurations),
-      _readNodeList(data.namespaceDirective_combinators),
-      _getToken(data.namespaceDirective_semicolon),
-    );
-  }
-
-  ExpressionFunctionBody _read_expressionFunctionBody(LinkedNode data) {
-    return astFactory.expressionFunctionBody(
-      _getToken(data.expressionFunctionBody_keyword),
-      _getToken(data.expressionFunctionBody_arrow),
-      readNode(data.expressionFunctionBody_expression),
-      _getToken(data.expressionFunctionBody_semicolon),
-    );
-  }
-
-  ExpressionStatement _read_expressionStatement(LinkedNode data) {
-    return astFactory.expressionStatement(
-      readNode(data.expressionStatement_expression),
-      _getToken(data.expressionStatement_semicolon),
-    );
-  }
-
-  ExtendsClause _read_extendsClause(LinkedNode data) {
-    return astFactory.extendsClause(
-      _getToken(data.extendsClause_extendsKeyword),
-      readNode(data.extendsClause_superclass),
-    );
-  }
-
-  FieldDeclaration _read_fieldDeclaration(LinkedNode data) {
-    return astFactory.fieldDeclaration2(
-      comment: readNode(data.annotatedNode_comment),
-      covariantKeyword: _getToken(data.fieldDeclaration_covariantKeyword),
-      fieldList: readNode(data.fieldDeclaration_fields),
-      metadata: _readNodeList(data.annotatedNode_metadata),
-      semicolon: _getToken(data.fieldDeclaration_semicolon),
-      staticKeyword: _getToken(data.fieldDeclaration_staticKeyword),
-    );
-  }
-
-  FieldFormalParameter _read_fieldFormalParameter(LinkedNode data) {
-    return astFactory.fieldFormalParameter2(
-      identifier: readNode(data.normalFormalParameter_identifier),
-      period: _getToken(data.fieldFormalParameter_period),
-      thisKeyword: _getToken(data.fieldFormalParameter_thisKeyword),
-      covariantKeyword: _getToken(data.normalFormalParameter_covariantKeyword),
-      typeParameters: readNode(data.fieldFormalParameter_typeParameters),
-      keyword: _getToken(data.fieldFormalParameter_keyword),
-      metadata: _readNodeList(data.normalFormalParameter_metadata),
-      comment: readNode(data.normalFormalParameter_comment),
-      type: readNode(data.fieldFormalParameter_type),
-      parameters: readNode(data.fieldFormalParameter_formalParameters),
-    );
-  }
-
-  ForEachPartsWithDeclaration _read_forEachPartsWithDeclaration(
-      LinkedNode data) {
-    return astFactory.forEachPartsWithDeclaration(
-      inKeyword: _getToken(data.forEachParts_inKeyword),
-      iterable: readNode(data.forEachParts_iterable),
-      loopVariable: readNode(data.forEachPartsWithDeclaration_loopVariable),
-    );
-  }
-
-  ForEachPartsWithIdentifier _read_forEachPartsWithIdentifier(LinkedNode data) {
-    return astFactory.forEachPartsWithIdentifier(
-      inKeyword: _getToken(data.forEachParts_inKeyword),
-      iterable: readNode(data.forEachParts_iterable),
-      identifier: readNode(data.forEachPartsWithIdentifier_identifier),
-    );
-  }
-
-  ForElement _read_forElement(LinkedNode data) {
-    return astFactory.forElement(
-      awaitKeyword: _getToken(data.forMixin_awaitKeyword),
-      body: readNode(data.forElement_body),
-      forKeyword: _getToken(data.forMixin_forKeyword),
-      forLoopParts: readNode(data.forMixin_forLoopParts),
-      leftParenthesis: _getToken(data.forMixin_leftParenthesis),
-      rightParenthesis: _getToken(data.forMixin_rightParenthesis),
-    );
-  }
-
-  FormalParameterList _read_formalParameterList(LinkedNode data) {
-    return astFactory.formalParameterList(
-      _getToken(data.formalParameterList_leftParenthesis),
-      _readNodeList(data.formalParameterList_parameters),
-      _getToken(data.formalParameterList_leftDelimiter),
-      _getToken(data.formalParameterList_rightDelimiter),
-      _getToken(data.formalParameterList_rightParenthesis),
-    );
-  }
-
-  ForPartsWithDeclarations _read_forPartsWithDeclarations(LinkedNode data) {
-    return astFactory.forPartsWithDeclarations(
-      condition: readNode(data.forParts_condition),
-      leftSeparator: _getToken(data.forParts_leftSeparator),
-      rightSeparator: _getToken(data.forParts_rightSeparator),
-      updaters: _readNodeList(data.forParts_updaters),
-      variables: readNode(data.forPartsWithDeclarations_variables),
-    );
-  }
-
-  ForPartsWithExpression _read_forPartsWithExpression(LinkedNode data) {
-    return astFactory.forPartsWithExpression(
-      condition: readNode(data.forParts_condition),
-      initialization: readNode(data.forPartsWithExpression_initialization),
-      leftSeparator: _getToken(data.forParts_leftSeparator),
-      rightSeparator: _getToken(data.forParts_rightSeparator),
-      updaters: _readNodeList(data.forParts_updaters),
-    );
-  }
-
-  ForStatement2 _read_forStatement(LinkedNode data) {
-    return astFactory.forStatement2(
-      forKeyword: _getToken(data.forMixin_forKeyword),
-      leftParenthesis: _getToken(data.forMixin_leftParenthesis),
-      forLoopParts: readNode(data.forMixin_forLoopParts),
-      rightParenthesis: _getToken(data.forMixin_rightParenthesis),
-      body: readNode(data.forStatement_body),
-    );
-  }
-
-  FunctionDeclaration _read_functionDeclaration(LinkedNode data) {
-    return astFactory.functionDeclaration(
-      readNode(data.annotatedNode_comment),
-      _readNodeList(data.annotatedNode_metadata),
-      _getToken(data.functionDeclaration_externalKeyword),
-      readNode(data.functionDeclaration_returnType),
-      _getToken(data.functionDeclaration_propertyKeyword),
-      readNode(data.namedCompilationUnitMember_name),
-      readNode(data.functionDeclaration_functionExpression),
-    );
-  }
-
-  FunctionDeclarationStatement _read_functionDeclarationStatement(
-      LinkedNode data) {
-    return astFactory.functionDeclarationStatement(
-      readNode(data.functionDeclarationStatement_functionDeclaration),
-    );
-  }
-
-  FunctionExpression _read_functionExpression(LinkedNode data) {
-    return astFactory.functionExpression(
-      readNode(data.functionExpression_typeParameters),
-      readNode(data.functionExpression_formalParameters),
-      readNode(data.functionExpression_body),
-    );
-  }
-
-  FunctionExpressionInvocation _read_functionExpressionInvocation(
-      LinkedNode data) {
-    return astFactory.functionExpressionInvocation(
-      readNode(data.functionExpressionInvocation_function),
-      readNode(data.invocationExpression_typeArguments),
-      readNode(data.invocationExpression_arguments),
-    )..staticInvokeType = _readType(data.invocationExpression_invokeType);
-  }
-
-  FunctionTypeAlias _read_functionTypeAlias(LinkedNode data) {
-    return astFactory.functionTypeAlias(
-      readNode(data.annotatedNode_comment),
-      _readNodeList(data.annotatedNode_metadata),
-      _getToken(data.typeAlias_typedefKeyword),
-      readNode(data.functionTypeAlias_returnType),
-      readNode(data.namedCompilationUnitMember_name),
-      readNode(data.functionTypeAlias_typeParameters),
-      readNode(data.functionTypeAlias_formalParameters),
-      _getToken(data.typeAlias_semicolon),
-    );
-  }
-
-  FunctionTypedFormalParameter _read_functionTypedFormalParameter(
-      LinkedNode data) {
-    return astFactory.functionTypedFormalParameter2(
-      identifier: readNode(data.normalFormalParameter_identifier),
-      parameters: readNode(data.functionTypedFormalParameter_formalParameters),
-      returnType: readNode(data.functionTypedFormalParameter_returnType),
-      covariantKeyword: _getToken(data.normalFormalParameter_covariantKeyword),
-      comment: readNode(data.normalFormalParameter_comment),
-      metadata: _readNodeList(data.normalFormalParameter_metadata),
-      typeParameters:
-          readNode(data.functionTypedFormalParameter_typeParameters),
-    );
-  }
-
-  GenericFunctionType _read_genericFunctionType(LinkedNode data) {
-    return astFactory.genericFunctionType(
-      readNode(data.genericFunctionType_returnType),
-      _getToken(data.genericFunctionType_functionKeyword),
-      readNode(data.genericFunctionType_typeParameters),
-      readNode(data.genericFunctionType_formalParameters),
-      question: _getToken(data.genericFunctionType_question),
-    );
-  }
-
-  GenericTypeAlias _read_genericTypeAlias(LinkedNode data) {
-    return astFactory.genericTypeAlias(
-      readNode(data.annotatedNode_comment),
-      _readNodeList(data.annotatedNode_metadata),
-      _getToken(data.typeAlias_typedefKeyword),
-      readNode(data.namedCompilationUnitMember_name),
-      readNode(data.genericTypeAlias_typeParameters),
-      _getToken(data.genericTypeAlias_equals),
-      readNode(data.genericTypeAlias_functionType),
-      _getToken(data.typeAlias_semicolon),
-    );
-  }
-
-  HideCombinator _read_hideCombinator(LinkedNode data) {
-    return astFactory.hideCombinator(
-      _getToken(data.combinator_keyword),
-      _readNodeList(data.hideCombinator_hiddenNames),
-    );
-  }
-
-  IfElement _read_ifElement(LinkedNode data) {
-    return astFactory.ifElement(
-      condition: readNode(data.ifMixin_condition),
-      elseElement: readNode(data.ifElement_elseElement),
-      elseKeyword: _getToken(data.ifMixin_elseKeyword),
-      ifKeyword: _getToken(data.ifMixin_ifKeyword),
-      leftParenthesis: _getToken(data.ifMixin_leftParenthesis),
-      rightParenthesis: _getToken(data.ifMixin_rightParenthesis),
-      thenElement: readNode(data.ifElement_thenElement),
-    );
-  }
-
-  IfStatement _read_ifStatement(LinkedNode data) {
-    return astFactory.ifStatement(
-      _getToken(data.ifMixin_ifKeyword),
-      _getToken(data.ifMixin_leftParenthesis),
-      readNode(data.ifMixin_condition),
-      _getToken(data.ifMixin_rightParenthesis),
-      readNode(data.ifStatement_thenStatement),
-      _getToken(data.ifMixin_elseKeyword),
-      readNode(data.ifStatement_elseStatement),
-    );
-  }
-
-  ImplementsClause _read_implementsClause(LinkedNode data) {
-    return astFactory.implementsClause(
-      _getToken(data.implementsClause_implementsKeyword),
-      _readNodeList(data.implementsClause_interfaces),
-    );
-  }
-
-  ImportDirective _read_importDirective(LinkedNode data) {
-    return astFactory.importDirective(
-      readNode(data.annotatedNode_comment),
-      _readNodeList(data.annotatedNode_metadata),
-      _getToken(data.directive_keyword),
-      readNode(data.uriBasedDirective_uri),
-      _readNodeList(data.namespaceDirective_configurations),
-      _getToken(data.importDirective_deferredKeyword),
-      _getToken(data.importDirective_asKeyword),
-      readNode(data.importDirective_prefix),
-      _readNodeList(data.namespaceDirective_combinators),
-      _getToken(data.namespaceDirective_semicolon),
-    );
-  }
-
-  IndexExpression _read_indexExpression(LinkedNode data) {
-    return astFactory.indexExpressionForTarget(
-      readNode(data.indexExpression_target),
-      _getToken(data.indexExpression_leftBracket),
-      readNode(data.indexExpression_index),
-      _getToken(data.indexExpression_rightBracket),
-    )
-      ..staticElement = _getElement(data.indexExpression_element)
-      ..staticType = _readType(data.expression_type);
-  }
-
-  InstanceCreationExpression _read_instanceCreationExpression(LinkedNode data) {
-    return astFactory.instanceCreationExpression(
-      _getToken(data.instanceCreationExpression_keyword),
-      readNode(data.instanceCreationExpression_constructorName),
-      readNode(data.instanceCreationExpression_arguments),
-      typeArguments: readNode(data.instanceCreationExpression_typeArguments),
-    )..staticType = _readType(data.expression_type);
-  }
-
-  IntegerLiteral _read_integerLiteral(LinkedNode data) {
-    return astFactory.integerLiteral(
-      _getToken(data.integerLiteral_literal),
-      data.integerLiteral_value,
-    )..staticType = _readType(data.expression_type);
-  }
-
-  InterpolationExpression _read_interpolationExpression(LinkedNode data) {
-    return astFactory.interpolationExpression(
-      _getToken(data.interpolationExpression_leftBracket),
-      readNode(data.interpolationExpression_expression),
-      _getToken(data.interpolationExpression_rightBracket),
-    );
-  }
-
-  InterpolationString _read_interpolationString(LinkedNode data) {
-    return astFactory.interpolationString(
-      _getToken(data.interpolationString_token),
-      data.interpolationString_value,
-    );
-  }
-
-  IsExpression _read_isExpression(LinkedNode data) {
-    return astFactory.isExpression(
-      readNode(data.isExpression_expression),
-      _getToken(data.isExpression_isOperator),
-      _getToken(data.isExpression_notOperator),
-      readNode(data.isExpression_type),
-    )..staticType = _readType(data.expression_type);
-  }
-
-  Label _read_label(LinkedNode data) {
-    return astFactory.label(
-      readNode(data.label_label),
-      _getToken(data.label_colon),
-    );
-  }
-
-  LabeledStatement _read_labeledStatement(LinkedNode data) {
-    return astFactory.labeledStatement(
-      _readNodeList(data.labeledStatement_labels),
-      readNode(data.labeledStatement_statement),
-    );
-  }
-
-  LibraryDirective _read_libraryDirective(LinkedNode data) {
-    return astFactory.libraryDirective(
-      readNode(data.annotatedNode_comment),
-      _readNodeList(data.annotatedNode_metadata),
-      _getToken(data.directive_keyword),
-      readNode(data.libraryDirective_name),
-      _getToken(data.namespaceDirective_semicolon),
-    );
-  }
-
-  LibraryIdentifier _read_libraryIdentifier(LinkedNode data) {
-    return astFactory.libraryIdentifier(
-      _readNodeList(data.libraryIdentifier_components),
-    );
-  }
-
-  ListLiteral _read_listLiteral(LinkedNode data) {
-    return astFactory.listLiteral(
-      _getToken(data.typedLiteral_constKeyword),
-      readNode(data.typedLiteral_typeArguments),
-      _getToken(data.listLiteral_leftBracket),
-      _readNodeList(data.listLiteral_elements),
-      _getToken(data.listLiteral_rightBracket),
-    )..staticType = _readType(data.expression_type);
-  }
-
-  MapLiteralEntry _read_mapLiteralEntry(LinkedNode data) {
-    return astFactory.mapLiteralEntry(
-      readNode(data.mapLiteralEntry_key),
-      _getToken(data.mapLiteralEntry_separator),
-      readNode(data.mapLiteralEntry_value),
-    );
-  }
-
-  MethodDeclaration _read_methodDeclaration(LinkedNode data) {
-    return astFactory.methodDeclaration(
-      readNode(data.annotatedNode_comment),
-      _readNodeList(data.annotatedNode_metadata),
-      _getToken(data.methodDeclaration_externalKeyword),
-      _getToken(data.methodDeclaration_modifierKeyword),
-      readNode(data.methodDeclaration_returnType),
-      _getToken(data.methodDeclaration_propertyKeyword),
-      _getToken(data.methodDeclaration_operatorKeyword),
-      readNode(data.methodDeclaration_name),
-      readNode(data.methodDeclaration_typeParameters),
-      readNode(data.methodDeclaration_formalParameters),
-      readNode(data.methodDeclaration_body),
-    );
-  }
-
-  MethodInvocation _read_methodInvocation(LinkedNode data) {
-    return astFactory.methodInvocation(
-      readNode(data.methodInvocation_target),
-      _getToken(data.methodInvocation_operator),
-      readNode(data.methodInvocation_methodName),
-      readNode(data.invocationExpression_typeArguments),
-      readNode(data.invocationExpression_arguments),
-    )..staticInvokeType = _readType(data.invocationExpression_invokeType);
-  }
-
-  MixinDeclaration _read_mixinDeclaration(LinkedNode data) {
-    return astFactory.mixinDeclaration(
-      readNode(data.annotatedNode_comment),
-      _readNodeList(data.annotatedNode_metadata),
-      _getToken(data.mixinDeclaration_mixinKeyword),
-      readNode(data.namedCompilationUnitMember_name),
-      readNode(data.classOrMixinDeclaration_typeParameters),
-      readNode(data.mixinDeclaration_onClause),
-      readNode(data.classOrMixinDeclaration_implementsClause),
-      _getToken(data.classOrMixinDeclaration_leftBracket),
-      _readNodeList(data.classOrMixinDeclaration_members),
-      _getToken(data.classOrMixinDeclaration_rightBracket),
-    );
-  }
-
-  NamedExpression _read_namedExpression(LinkedNode data) {
-    return astFactory.namedExpression(
-      readNode(data.namedExpression_name),
-      readNode(data.namedExpression_expression),
-    )..staticType = _readType(data.expression_type);
-  }
-
-  NullLiteral _read_nullLiteral(LinkedNode data) {
-    return astFactory.nullLiteral(
-      _getToken(data.nullLiteral_literal),
-    )..staticType = _readType(data.expression_type);
-  }
-
-  OnClause _read_onClause(LinkedNode data) {
-    return astFactory.onClause(
-      _getToken(data.onClause_onKeyword),
-      _readNodeList(data.onClause_superclassConstraints),
-    );
-  }
-
-  ParenthesizedExpression _read_parenthesizedExpression(LinkedNode data) {
-    return astFactory.parenthesizedExpression(
-      _getToken(data.parenthesizedExpression_leftParenthesis),
-      readNode(data.parenthesizedExpression_expression),
-      _getToken(data.parenthesizedExpression_rightParenthesis),
-    )..staticType = _readType(data.expression_type);
-  }
-
-  PartDirective _read_partDirective(LinkedNode data) {
-    return astFactory.partDirective(
-      readNode(data.annotatedNode_comment),
-      _readNodeList(data.annotatedNode_metadata),
-      _getToken(data.directive_keyword),
-      readNode(data.uriBasedDirective_uri),
-      _getToken(data.namespaceDirective_semicolon),
-    );
-  }
-
-  PartOfDirective _read_partOfDirective(LinkedNode data) {
-    return astFactory.partOfDirective(
-      readNode(data.annotatedNode_comment),
-      _readNodeList(data.annotatedNode_metadata),
-      _getToken(data.directive_keyword),
-      _getToken(data.partOfDirective_ofKeyword),
-      readNode(data.partOfDirective_uri),
-      readNode(data.partOfDirective_libraryName),
-      _getToken(data.partOfDirective_semicolon),
-    );
-  }
-
-  PostfixExpression _read_postfixExpression(LinkedNode data) {
-    return astFactory.postfixExpression(
-      readNode(data.postfixExpression_operand),
-      _getToken(data.postfixExpression_operator),
-    )
-      ..staticElement = _getElement(data.postfixExpression_element)
-      ..staticType = _readType(data.expression_type);
-  }
-
-  PrefixedIdentifier _read_prefixedIdentifier(LinkedNode data) {
-    return astFactory.prefixedIdentifier(
-      readNode(data.prefixedIdentifier_prefix),
-      _getToken(data.prefixedIdentifier_period),
-      readNode(data.prefixedIdentifier_identifier),
-    )..staticType = _readType(data.expression_type);
-  }
-
-  PrefixExpression _read_prefixExpression(LinkedNode data) {
-    return astFactory.prefixExpression(
-      _getToken(data.prefixExpression_operator),
-      readNode(data.prefixExpression_operand),
-    )
-      ..staticElement = _getElement(data.prefixExpression_element)
-      ..staticType = _readType(data.expression_type);
-  }
-
-  PropertyAccess _read_propertyAccess(LinkedNode data) {
-    return astFactory.propertyAccess(
-      readNode(data.propertyAccess_target),
-      _getToken(data.propertyAccess_operator),
-      readNode(data.propertyAccess_propertyName),
-    )..staticType = _readType(data.expression_type);
-  }
-
-  RedirectingConstructorInvocation _read_redirectingConstructorInvocation(
-      LinkedNode data) {
-    return astFactory.redirectingConstructorInvocation(
-      _getToken(data.redirectingConstructorInvocation_thisKeyword),
-      _getToken(data.redirectingConstructorInvocation_period),
-      readNode(data.redirectingConstructorInvocation_constructorName),
-      readNode(data.redirectingConstructorInvocation_arguments),
-    )..staticElement =
-        _getElement(data.redirectingConstructorInvocation_element);
-  }
-
-  RethrowExpression _read_rethrowExpression(LinkedNode data) {
-    return astFactory.rethrowExpression(
-      _getToken(data.rethrowExpression_rethrowKeyword),
-    )..staticType = _readType(data.expression_type);
-  }
-
-  ReturnStatement _read_returnStatement(LinkedNode data) {
-    return astFactory.returnStatement(
-      _getToken(data.returnStatement_returnKeyword),
-      readNode(data.returnStatement_expression),
-      _getToken(data.returnStatement_semicolon),
-    );
-  }
-
-  ScriptTag _read_scriptTag(LinkedNode data) {
-    return astFactory.scriptTag(
-      _getToken(data.scriptTag_scriptTag),
-    );
-  }
-
-  SetOrMapLiteral _read_setOrMapLiteral(LinkedNode data) {
-    SetOrMapLiteralImpl node = astFactory.setOrMapLiteral(
-      constKeyword: _getToken(data.typedLiteral_constKeyword),
-      elements: _readNodeList(data.setOrMapLiteral_elements),
-      leftBracket: _getToken(data.setOrMapLiteral_leftBracket),
-      typeArguments: readNode(data.typedLiteral_typeArguments),
-      rightBracket: _getToken(data.setOrMapLiteral_leftBracket),
-    )..staticType = _readType(data.expression_type);
-    if (data.setOrMapLiteral_isMap) {
-      node.becomeMap();
-    } else if (data.setOrMapLiteral_isSet) {
-      node.becomeSet();
-    }
-    return node;
-  }
-
-  ShowCombinator _read_showCombinator(LinkedNode data) {
-    return astFactory.showCombinator(
-      _getToken(data.combinator_keyword),
-      _readNodeList(data.showCombinator_shownNames),
-    );
-  }
-
-  SimpleFormalParameter _read_simpleFormalParameter(LinkedNode data) {
-    return astFactory.simpleFormalParameter2(
-      identifier: readNode(data.normalFormalParameter_identifier),
-      type: readNode(data.simpleFormalParameter_type),
-      covariantKeyword: _getToken(data.normalFormalParameter_covariantKeyword),
-      comment: readNode(data.normalFormalParameter_comment),
-      metadata: _readNodeList(data.normalFormalParameter_metadata),
-      keyword: _getToken(data.simpleFormalParameter_keyword),
-    );
-  }
-
-  SimpleIdentifier _read_simpleIdentifier(LinkedNode data) {
-    return astFactory.simpleIdentifier(
-      _getToken(data.simpleIdentifier_token),
-    )
-      ..staticElement = _getElement(data.simpleIdentifier_element)
-      ..staticType = _readType(data.expression_type);
-  }
-
-  SimpleStringLiteral _read_simpleStringLiteral(LinkedNode data) {
-    return astFactory.simpleStringLiteral(
-      _getToken(data.simpleStringLiteral_token),
-      data.simpleStringLiteral_value,
-    )..staticType = _readType(data.expression_type);
-  }
-
-  SpreadElement _read_spreadElement(LinkedNode data) {
-    return astFactory.spreadElement(
-      spreadOperator: _getToken(data.spreadElement_spreadOperator),
-      expression: readNode(data.spreadElement_expression),
-    );
-  }
-
-  StringInterpolation _read_stringInterpolation(LinkedNode data) {
-    return astFactory.stringInterpolation(
-      _readNodeList(data.stringInterpolation_elements),
-    )..staticType = _readType(data.expression_type);
-  }
-
-  SuperConstructorInvocation _read_superConstructorInvocation(LinkedNode data) {
-    return astFactory.superConstructorInvocation(
-      _getToken(data.superConstructorInvocation_superKeyword),
-      _getToken(data.superConstructorInvocation_period),
-      readNode(data.superConstructorInvocation_constructorName),
-      readNode(data.superConstructorInvocation_arguments),
-    )..staticElement = _getElement(data.superConstructorInvocation_element);
-  }
-
-  SuperExpression _read_superExpression(LinkedNode data) {
-    return astFactory.superExpression(
-      _getToken(data.superExpression_superKeyword),
-    )..staticType = _readType(data.expression_type);
-  }
-
-  SwitchCase _read_switchCase(LinkedNode data) {
-    return astFactory.switchCase(
-      _readNodeList(data.switchMember_labels),
-      _getToken(data.switchMember_keyword),
-      readNode(data.switchCase_expression),
-      _getToken(data.switchMember_colon),
-      _readNodeList(data.switchMember_statements),
-    );
-  }
-
-  SwitchDefault _read_switchDefault(LinkedNode data) {
-    return astFactory.switchDefault(
-      _readNodeList(data.switchMember_labels),
-      _getToken(data.switchMember_keyword),
-      _getToken(data.switchMember_colon),
-      _readNodeList(data.switchMember_statements),
-    );
-  }
-
-  SwitchStatement _read_switchStatement(LinkedNode data) {
-    return astFactory.switchStatement(
-      _getToken(data.switchStatement_switchKeyword),
-      _getToken(data.switchStatement_leftParenthesis),
-      readNode(data.switchStatement_expression),
-      _getToken(data.switchStatement_rightParenthesis),
-      _getToken(data.switchStatement_leftBracket),
-      _readNodeList(data.switchStatement_members),
-      _getToken(data.switchStatement_rightBracket),
-    );
-  }
-
-  SymbolLiteral _read_symbolLiteral(LinkedNode data) {
-    return astFactory.symbolLiteral(
-      _getToken(data.symbolLiteral_poundSign),
-      _getTokens(data.symbolLiteral_components),
-    )..staticType = _readType(data.expression_type);
-  }
-
-  ThisExpression _read_thisExpression(LinkedNode data) {
-    return astFactory.thisExpression(
-      _getToken(data.thisExpression_thisKeyword),
-    )..staticType = _readType(data.expression_type);
-  }
-
-  ThrowExpression _read_throwExpression(LinkedNode data) {
-    return astFactory.throwExpression(
-      _getToken(data.throwExpression_throwKeyword),
-      readNode(data.throwExpression_expression),
-    )..staticType = _readType(data.expression_type);
-  }
-
-  TopLevelVariableDeclaration _read_topLevelVariableDeclaration(
-      LinkedNode data) {
-    return astFactory.topLevelVariableDeclaration(
-      readNode(data.annotatedNode_comment),
-      _readNodeList(data.annotatedNode_metadata),
-      readNode(data.topLevelVariableDeclaration_variableList),
-      _getToken(data.topLevelVariableDeclaration_semicolon),
-    );
-  }
-
-  TryStatement _read_tryStatement(LinkedNode data) {
-    return astFactory.tryStatement(
-      _getToken(data.tryStatement_tryKeyword),
-      readNode(data.tryStatement_body),
-      _readNodeList(data.tryStatement_catchClauses),
-      _getToken(data.tryStatement_tryKeyword),
-      readNode(data.tryStatement_finallyBlock),
-    );
-  }
-
-  TypeArgumentList _read_typeArgumentList(LinkedNode data) {
-    return astFactory.typeArgumentList(
-      _getToken(data.typeArgumentList_leftBracket),
-      _readNodeList(data.typeArgumentList_arguments),
-      _getToken(data.typeArgumentList_rightBracket),
-    );
-  }
-
-  TypeName _read_typeName(LinkedNode data) {
-    return astFactory.typeName(
-      readNode(data.typeName_name),
-      readNode(data.typeName_typeArguments),
-      question: _getToken(data.typeName_question),
-    )..type = _readType(data.typeName_type);
-  }
-
-  TypeParameter _read_typeParameter(LinkedNode data) {
-    return astFactory.typeParameter(
-      readNode(data.annotatedNode_comment),
-      _readNodeList(data.annotatedNode_metadata),
-      readNode(data.typeParameter_name),
-      _getToken(data.typeParameter_extendsKeyword),
-      readNode(data.typeParameter_bound),
-    );
-  }
-
-  TypeParameterList _read_typeParameterList(LinkedNode data) {
-    return astFactory.typeParameterList(
-      _getToken(data.typeParameterList_leftBracket),
-      _readNodeList(data.typeParameterList_typeParameters),
-      _getToken(data.typeParameterList_rightBracket),
-    );
-  }
-
-  VariableDeclaration _read_variableDeclaration(LinkedNode data) {
-    return astFactory.variableDeclaration(
-      readNode(data.variableDeclaration_name),
-      _getToken(data.variableDeclaration_equals),
-      readNode(data.variableDeclaration_initializer),
-    );
-  }
-
-  VariableDeclarationList _read_variableDeclarationList(LinkedNode data) {
-    return astFactory.variableDeclarationList(
-      readNode(data.annotatedNode_comment),
-      _readNodeList(data.annotatedNode_metadata),
-      _getToken(data.variableDeclarationList_keyword),
-      readNode(data.variableDeclarationList_type),
-      _readNodeList(data.variableDeclarationList_variables),
-    );
-  }
-
-  VariableDeclarationStatement _read_variableDeclarationStatement(
-      LinkedNode data) {
-    return astFactory.variableDeclarationStatement(
-      readNode(data.variableDeclarationStatement_variables),
-      _getToken(data.variableDeclarationStatement_semicolon),
-    );
-  }
-
-  WhileStatement _read_whileStatement(LinkedNode data) {
-    return astFactory.whileStatement(
-      _getToken(data.whileStatement_whileKeyword),
-      _getToken(data.whileStatement_leftParenthesis),
-      readNode(data.whileStatement_condition),
-      _getToken(data.whileStatement_rightParenthesis),
-      readNode(data.whileStatement_body),
-    );
-  }
-
-  WithClause _read_withClause(LinkedNode data) {
-    return astFactory.withClause(
-      _getToken(data.withClause_withKeyword),
-      _readNodeList(data.withClause_mixinTypes),
-    );
-  }
-
-  YieldStatement _read_yieldStatement(LinkedNode data) {
-    return astFactory.yieldStatement(
-      _getToken(data.yieldStatement_yieldKeyword),
-      _getToken(data.yieldStatement_star),
-      readNode(data.yieldStatement_expression),
-      _getToken(data.yieldStatement_semicolon),
-    );
-  }
-
   List<T> _readNodeList<T>(List<LinkedNode> nodeList) {
     var result = List<T>.filled(nodeList.length, null);
     for (var i = 0; i < nodeList.length; ++i) {
       var linkedNode = nodeList[i];
-      result[i] = readNode(linkedNode) as T;
+      result[i] = _readNode(linkedNode) as T;
     }
     return result;
   }
@@ -1405,7 +1524,10 @@
         return FunctionTypeImpl.synthetic(
           _readType(data.functionReturnType),
           _getElements(data.functionTypeParameters),
-          _getElements(data.functionFormalParameters),
+          data.functionFormalParameters
+              .map((p) => ParameterElementImpl.synthetic(
+                  p.name, _readType(p.type), _formalParameterKind(p.kind)))
+              .toList(),
         );
       case LinkedNodeTypeKind.interface:
         var element = _getElement(data.interfaceClass);
diff --git a/pkg/analyzer/lib/src/summary2/ast_binary_writer.dart b/pkg/analyzer/lib/src/summary2/ast_binary_writer.dart
index 187dc7b..634e7da 100644
--- a/pkg/analyzer/lib/src/summary2/ast_binary_writer.dart
+++ b/pkg/analyzer/lib/src/summary2/ast_binary_writer.dart
@@ -1,4 +1,4 @@
-// Copyright (c) 2019, the Dart project authors.  Please see the AUTHORS file
+// Copyright (c) 2019, the Dart project authors. Please see the AUTHORS file
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
 
@@ -189,6 +189,7 @@
       classDeclaration_abstractKeyword: _getToken(node.abstractKeyword),
       classDeclaration_classKeyword: _getToken(node.classKeyword),
       classDeclaration_extendsClause: node.extendsClause?.accept(this),
+      classDeclaration_nativeClause: node.nativeClause?.accept(this),
       classDeclaration_withClause: node.withClause?.accept(this),
     );
     _storeClassOrMixinDeclaration(builder, node);
@@ -280,6 +281,7 @@
       constructorDeclaration_separator: _getToken(node.separator),
     );
     _storeClassMember(builder, node);
+    _storeCodeOffsetLength(builder, node);
     return builder;
   }
 
@@ -331,12 +333,14 @@
 
   @override
   LinkedNodeBuilder visitDefaultFormalParameter(DefaultFormalParameter node) {
-    return LinkedNodeBuilder.defaultFormalParameter(
+    var builder = LinkedNodeBuilder.defaultFormalParameter(
       defaultFormalParameter_defaultValue: node.defaultValue?.accept(this),
       defaultFormalParameter_isNamed: node.isNamed,
       defaultFormalParameter_parameter: node.parameter.accept(this),
       defaultFormalParameter_separator: _getToken(node.separator),
     );
+    _storeCodeOffsetLength(builder, node);
+    return builder;
   }
 
   @override
@@ -347,7 +351,7 @@
       doStatement_doKeyword: _getToken(node.doKeyword),
       doStatement_leftParenthesis: _getToken(node.leftParenthesis),
       doStatement_rightParenthesis: _getToken(node.rightParenthesis),
-      doStatement_semicolon: _getToken(node.whileKeyword),
+      doStatement_semicolon: _getToken(node.semicolon),
       doStatement_whileKeyword: _getToken(node.whileKeyword),
     );
   }
@@ -441,6 +445,7 @@
   @override
   LinkedNodeBuilder visitFieldDeclaration(FieldDeclaration node) {
     _variablesDeclaration = LinkedNodeVariablesDeclarationBuilder(
+      isCovariant: node.covariantKeyword != null,
       isStatic: node.isStatic,
     );
 
@@ -532,11 +537,11 @@
   }
 
   @override
-  LinkedNodeBuilder visitForStatement2(ForStatement2 node) {
+  LinkedNodeBuilder visitForStatement(ForStatement node) {
     var builder = LinkedNodeBuilder.forStatement(
       forStatement_body: node.body.accept(this),
     );
-    _storeForMixin(builder, node as ForStatement2Impl);
+    _storeForMixin(builder, node as ForStatementImpl);
     return builder;
   }
 
@@ -687,6 +692,7 @@
       indexExpression_element: _getReferenceIndex(node.staticElement),
       indexExpression_index: node.index.accept(this),
       indexExpression_leftBracket: _getToken(node.leftBracket),
+      indexExpression_period: _getToken(node.period),
       indexExpression_rightBracket: _getToken(node.rightBracket),
       indexExpression_target: node.target?.accept(this),
       expression_type: _writeType(node.staticType),
@@ -765,6 +771,7 @@
   LinkedNodeBuilder visitLibraryDirective(LibraryDirective node) {
     var builder = LinkedNodeBuilder.libraryDirective(
       libraryDirective_name: node.name.accept(this),
+      directive_semicolon: _getToken(node.semicolon),
     );
     _storeDirective(builder, node);
     return builder;
@@ -780,7 +787,7 @@
   @override
   LinkedNodeBuilder visitListLiteral(ListLiteral node) {
     var builder = LinkedNodeBuilder.listLiteral(
-      listLiteral_elements: _writeNodeList(node.elements2),
+      listLiteral_elements: _writeNodeList(node.elements),
       listLiteral_leftBracket: _getToken(node.leftBracket),
       listLiteral_rightBracket: _getToken(node.rightBracket),
     );
@@ -811,6 +818,7 @@
       methodDeclaration_typeParameters: node.typeParameters?.accept(this),
     );
     _storeClassMember(builder, node);
+    _storeCodeOffsetLength(builder, node);
     return builder;
   }
 
@@ -844,6 +852,23 @@
   }
 
   @override
+  LinkedNodeBuilder visitNativeClause(NativeClause node) {
+    return LinkedNodeBuilder.nativeClause(
+      nativeClause_nativeKeyword: _getToken(node.nativeKeyword),
+      nativeClause_name: node.name.accept(this),
+    );
+  }
+
+  @override
+  LinkedNodeBuilder visitNativeFunctionBody(NativeFunctionBody node) {
+    return LinkedNodeBuilder.nativeFunctionBody(
+      nativeFunctionBody_nativeKeyword: _getToken(node.nativeKeyword),
+      nativeFunctionBody_semicolon: _getToken(node.semicolon),
+      nativeFunctionBody_stringLiteral: node.stringLiteral?.accept(this),
+    );
+  }
+
+  @override
   LinkedNodeBuilder visitNullLiteral(NullLiteral node) {
     var builder = LinkedNodeBuilder.nullLiteral(
       nullLiteral_literal: _getToken(node.literal),
@@ -875,7 +900,9 @@
 
   @override
   LinkedNodeBuilder visitPartDirective(PartDirective node) {
-    var builder = LinkedNodeBuilder.partDirective();
+    var builder = LinkedNodeBuilder.partDirective(
+      directive_semicolon: _getToken(node.semicolon),
+    );
     _storeUriBasedDirective(builder, node);
     return builder;
   }
@@ -885,7 +912,7 @@
     var builder = LinkedNodeBuilder.partOfDirective(
       partOfDirective_libraryName: node.libraryName?.accept(this),
       partOfDirective_ofKeyword: _getToken(node.ofKeyword),
-      partOfDirective_semicolon: _getToken(node.semicolon),
+      directive_semicolon: _getToken(node.semicolon),
       partOfDirective_uri: node.uri?.accept(this),
     );
     _storeDirective(builder, node);
@@ -978,7 +1005,7 @@
   @override
   LinkedNodeBuilder visitSetOrMapLiteral(SetOrMapLiteral node) {
     var builder = LinkedNodeBuilder.setOrMapLiteral(
-      setOrMapLiteral_elements: _writeNodeList(node.elements2),
+      setOrMapLiteral_elements: _writeNodeList(node.elements),
       setOrMapLiteral_isMap: node.isMap,
       setOrMapLiteral_isSet: node.isSet,
       setOrMapLiteral_leftBracket: _getToken(node.leftBracket),
@@ -1186,6 +1213,7 @@
         typeParameter_extendsKeyword: _getToken(node.extendsKeyword),
         typeParameter_name: node.name.accept(this));
     _storeDeclaration(builder, node);
+    _storeCodeOffsetLength(builder, node);
     return builder;
   }
 
@@ -1221,6 +1249,7 @@
       variableDeclarationList_variables: _writeNodeList(node.variables),
     );
     _storeAnnotatedNode(builder, node);
+    _storeCodeOffsetLengthVariables(builder, node);
     return builder;
   }
 
@@ -1319,6 +1348,23 @@
     _storeNamedCompilationUnitMember(builder, node);
   }
 
+  void _storeCodeOffsetLength(LinkedNodeBuilder builder, AstNode node) {
+    builder.codeOffset = node.offset;
+    builder.codeLength = node.length;
+  }
+
+  void _storeCodeOffsetLengthVariables(
+      LinkedNodeBuilder builder, VariableDeclarationList node) {
+    var builders = builder.variableDeclarationList_variables;
+    for (var i = 0; i < builders.length; ++i) {
+      var variableBuilder = builders[i];
+      var variableNode = node.variables[i];
+      var offset = (i == 0 ? node.parent : variableNode).offset;
+      variableBuilder.codeOffset = offset;
+      variableBuilder.codeLength = variableNode.end - offset;
+    }
+  }
+
   void _storeCombinator(LinkedNodeBuilder builder, Combinator node) {
     builder.combinator_keyword = _getToken(node.keyword);
   }
@@ -1360,8 +1406,9 @@
     } else if (node.isOptionalPositional) {
       kind = LinkedNodeFormalParameterKind.optionalPositional;
     }
-
     builder.formalParameter_kind = kind;
+
+    _storeCodeOffsetLength(builder, node);
   }
 
   void _storeForMixin(LinkedNodeBuilder builder, ForMixin node) {
@@ -1405,6 +1452,7 @@
   void _storeNamedCompilationUnitMember(
       LinkedNodeBuilder builder, NamedCompilationUnitMember node) {
     _storeCompilationUnitMember(builder, node);
+    _storeCodeOffsetLength(builder, node);
     builder..namedCompilationUnitMember_name = node.name.accept(this);
   }
 
@@ -1415,7 +1463,7 @@
       ..namespaceDirective_combinators = _writeNodeList(node.combinators)
       ..namespaceDirective_configurations = _writeNodeList(node.configurations)
       ..namespaceDirective_selectedUriContent = node.selectedUriContent
-      ..namespaceDirective_semicolon = _getToken(node.semicolon);
+      ..directive_semicolon = _getToken(node.semicolon);
   }
 
   void _storeNormalFormalParameter(
diff --git a/pkg/analyzer/lib/src/summary2/ast_resolver.dart b/pkg/analyzer/lib/src/summary2/ast_resolver.dart
index c3dcf81..09f12b4 100644
--- a/pkg/analyzer/lib/src/summary2/ast_resolver.dart
+++ b/pkg/analyzer/lib/src/summary2/ast_resolver.dart
@@ -9,23 +9,23 @@
 import 'package:analyzer/src/generated/source.dart';
 import 'package:analyzer/src/summary/idl.dart';
 import 'package:analyzer/src/summary2/ast_binary_writer.dart';
-import 'package:analyzer/src/summary2/builder/source_library_builder.dart';
 import 'package:analyzer/src/summary2/link.dart';
-import 'package:analyzer/src/summary2/reference.dart';
+import 'package:analyzer/src/summary2/linked_unit_context.dart';
 
 /// Used to resolve some AST nodes - variable initializers, and annotations.
 class AstResolver {
   final Linker _linker;
+  final LibraryElement _library;
+  final Scope _nameScope;
 
-  LibraryElement _library;
-  Scope _nameScope;
+  AstResolver(this._linker, this._library, this._nameScope);
 
-  AstResolver(this._linker, Reference libraryRef) {
-    _library = _linker.elementFactory.elementOfReference(libraryRef);
-    _nameScope = LibraryScope(_library);
-  }
-
-  LinkedNode resolve(UnitBuilder unit, AstNode node) {
+  LinkedNode resolve(
+    LinkedUnitContext context,
+    AstNode node, {
+    ClassElement enclosingClassElement,
+    ExecutableElement enclosingExecutableElement,
+  }) {
     var source = _FakeSource();
     var errorListener = AnalysisErrorListener.NULL_LISTENER;
 
@@ -45,11 +45,16 @@
         nameScope: _nameScope,
         propagateTypes: false,
         reportConstEvaluationErrors: false);
+    resolverVisitor.prepareEnclosingDeclarations(
+      enclosingClassElement: enclosingClassElement,
+      enclosingExecutableElement: enclosingExecutableElement,
+    );
+
     node.accept(resolverVisitor);
 
     var writer = AstBinaryWriter(
       _linker.linkingBundleContext,
-      unit.context.tokensContext,
+      context.tokensContext,
     );
     return writer.writeNode(node);
   }
diff --git a/pkg/analyzer/lib/src/summary2/ast_text_printer.dart b/pkg/analyzer/lib/src/summary2/ast_text_printer.dart
new file mode 100644
index 0000000..eefebe8
--- /dev/null
+++ b/pkg/analyzer/lib/src/summary2/ast_text_printer.dart
@@ -0,0 +1,1068 @@
+// Copyright (c) 2019, the Dart project authors. Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+import 'package:analyzer/dart/ast/ast.dart';
+import 'package:analyzer/dart/ast/token.dart';
+import 'package:analyzer/dart/ast/visitor.dart';
+import 'package:analyzer/source/line_info.dart';
+
+/// AST visitor that prints tokens into their original positions.
+class AstTextPrinter extends ThrowingAstVisitor<void> {
+  final StringBuffer _buffer;
+  final LineInfo _lineInfo;
+
+  Token _last;
+  int _lastEnd = 0;
+  int _lastEndLine = 0;
+
+  AstTextPrinter(this._buffer, this._lineInfo);
+
+  @override
+  void visitAdjacentStrings(AdjacentStrings node) {
+    _nodeList(node.strings);
+  }
+
+  @override
+  void visitAnnotation(Annotation node) {
+    _token(node.atSign);
+    node.name.accept(this);
+    _token(node.period);
+    node.constructorName?.accept(this);
+    node.arguments?.accept(this);
+  }
+
+  @override
+  void visitArgumentList(ArgumentList node) {
+    _token(node.leftParenthesis);
+    _nodeList(node.arguments, node.rightParenthesis);
+    _token(node.rightParenthesis);
+  }
+
+  @override
+  void visitAsExpression(AsExpression node) {
+    node.expression.accept(this);
+    _token(node.asOperator);
+    node.type.accept(this);
+  }
+
+  @override
+  void visitAssertInitializer(AssertInitializer node) {
+    _token(node.assertKeyword);
+    _token(node.leftParenthesis);
+
+    node.condition.accept(this);
+    _tokenIfNot(node.condition.endToken.next, node.rightParenthesis);
+
+    node.message?.accept(this);
+    _tokenIfNot(node.message?.endToken?.next, node.rightParenthesis);
+
+    _token(node.rightParenthesis);
+  }
+
+  @override
+  void visitAssertStatement(AssertStatement node) {
+    _token(node.assertKeyword);
+    _token(node.leftParenthesis);
+
+    node.condition.accept(this);
+    _tokenIfNot(node.condition.endToken.next, node.rightParenthesis);
+
+    node.message?.accept(this);
+    _tokenIfNot(node.message?.endToken?.next, node.rightParenthesis);
+
+    _token(node.rightParenthesis);
+    _token(node.semicolon);
+  }
+
+  @override
+  void visitAssignmentExpression(AssignmentExpression node) {
+    node.leftHandSide.accept(this);
+    _token(node.operator);
+    node.rightHandSide.accept(this);
+  }
+
+  @override
+  void visitAwaitExpression(AwaitExpression node) {
+    _token(node.awaitKeyword);
+    node.expression.accept(this);
+  }
+
+  @override
+  void visitBinaryExpression(BinaryExpression node) {
+    node.leftOperand.accept(this);
+    _token(node.operator);
+    node.rightOperand.accept(this);
+  }
+
+  @override
+  void visitBlock(Block node) {
+    _token(node.leftBracket);
+    _nodeList(node.statements);
+    _token(node.rightBracket);
+  }
+
+  @override
+  void visitBlockFunctionBody(BlockFunctionBody node) {
+    _functionBody(node);
+    node.block.accept(this);
+  }
+
+  @override
+  void visitBooleanLiteral(BooleanLiteral node) {
+    _token(node.literal);
+  }
+
+  @override
+  void visitBreakStatement(BreakStatement node) {
+    _token(node.breakKeyword);
+    node.label?.accept(this);
+    _token(node.semicolon);
+  }
+
+  @override
+  void visitCascadeExpression(CascadeExpression node) {
+    node.target.accept(this);
+    _nodeList(node.cascadeSections);
+  }
+
+  @override
+  void visitCatchClause(CatchClause node) {
+    _token(node.onKeyword);
+    node.exceptionType?.accept(this);
+    _token(node.catchKeyword);
+    _token(node.leftParenthesis);
+    node.exceptionParameter?.accept(this);
+    _token(node.comma);
+    node.stackTraceParameter?.accept(this);
+    _token(node.rightParenthesis);
+    node.body.accept(this);
+  }
+
+  @override
+  void visitClassDeclaration(ClassDeclaration node) {
+    _compilationUnitMember(node);
+    _token(node.abstractKeyword);
+    _token(node.classKeyword);
+    node.name.accept(this);
+    node.typeParameters?.accept(this);
+    node.extendsClause?.accept(this);
+    node.withClause?.accept(this);
+    node.implementsClause?.accept(this);
+    node.nativeClause?.accept(this);
+    _token(node.leftBracket);
+    node.members.accept(this);
+    _token(node.rightBracket);
+  }
+
+  @override
+  void visitClassTypeAlias(ClassTypeAlias node) {
+    _compilationUnitMember(node);
+    _token(node.abstractKeyword);
+    _token(node.typedefKeyword);
+    node.name.accept(this);
+    node.typeParameters?.accept(this);
+    _token(node.equals);
+    node.superclass?.accept(this);
+    node.withClause.accept(this);
+    node.implementsClause?.accept(this);
+    _token(node.semicolon);
+  }
+
+  @override
+  void visitComment(Comment node) {}
+
+  @override
+  void visitCompilationUnit(CompilationUnit node) {
+    node.scriptTag?.accept(this);
+    node.directives.accept(this);
+    node.declarations.accept(this);
+    _token(node.endToken);
+  }
+
+  @override
+  void visitConditionalExpression(ConditionalExpression node) {
+    node.condition.accept(this);
+    _token(node.question);
+    node.thenExpression.accept(this);
+    _token(node.colon);
+    node.elseExpression.accept(this);
+  }
+
+  @override
+  void visitConfiguration(Configuration node) {
+    _token(node.ifKeyword);
+    _token(node.leftParenthesis);
+    node.name.accept(this);
+    _token(node.equalToken);
+    node.value?.accept(this);
+    _token(node.rightParenthesis);
+    node.uri.accept(this);
+  }
+
+  @override
+  void visitConstructorDeclaration(ConstructorDeclaration node) {
+    _classMember(node);
+    _token(node.externalKeyword);
+    _token(node.constKeyword);
+    _token(node.factoryKeyword);
+    node.returnType?.accept(this);
+    _token(node.period);
+    node.name?.accept(this);
+    node.parameters.accept(this);
+    _token(node.separator);
+    _nodeList(node.initializers, node.body.beginToken);
+    node.redirectedConstructor?.accept(this);
+    node.body.accept(this);
+  }
+
+  @override
+  void visitConstructorFieldInitializer(ConstructorFieldInitializer node) {
+    _token(node.thisKeyword);
+    _token(node.period);
+    node.fieldName.accept(this);
+    _token(node.equals);
+    node.expression.accept(this);
+  }
+
+  @override
+  void visitConstructorName(ConstructorName node) {
+    node.type.accept(this);
+    _token(node.period);
+    node.name?.accept(this);
+  }
+
+  @override
+  void visitContinueStatement(ContinueStatement node) {
+    _token(node.continueKeyword);
+    node.label?.accept(this);
+    _token(node.semicolon);
+  }
+
+  @override
+  void visitDeclaredIdentifier(DeclaredIdentifier node) {
+    _declaration(node);
+    _token(node.keyword);
+    node.type?.accept(this);
+    node.identifier.accept(this);
+  }
+
+  @override
+  void visitDefaultFormalParameter(DefaultFormalParameter node) {
+    node.parameter.accept(this);
+    _token(node.separator);
+    node.defaultValue?.accept(this);
+  }
+
+  @override
+  void visitDoStatement(DoStatement node) {
+    _token(node.doKeyword);
+    node.body.accept(this);
+    _token(node.whileKeyword);
+    _token(node.leftParenthesis);
+    node.condition.accept(this);
+    _token(node.rightParenthesis);
+    _token(node.semicolon);
+  }
+
+  @override
+  void visitDottedName(DottedName node) {
+    _nodeList(node.components, node.endToken.next);
+  }
+
+  @override
+  void visitDoubleLiteral(DoubleLiteral node) {
+    _token(node.literal);
+  }
+
+  @override
+  void visitEmptyFunctionBody(EmptyFunctionBody node) {
+    _functionBody(node);
+    _token(node.semicolon);
+  }
+
+  @override
+  void visitEmptyStatement(EmptyStatement node) {
+    _token(node.semicolon);
+  }
+
+  @override
+  void visitEnumConstantDeclaration(EnumConstantDeclaration node) {
+    _declaration(node);
+    node.name.accept(this);
+  }
+
+  @override
+  void visitEnumDeclaration(EnumDeclaration node) {
+    _compilationUnitMember(node);
+    _token(node.enumKeyword);
+    node.name.accept(this);
+    _token(node.leftBracket);
+    _nodeList(node.constants, node.rightBracket);
+    _token(node.rightBracket);
+  }
+
+  @override
+  void visitExportDirective(ExportDirective node) {
+    _directive(node);
+    _token(node.keyword);
+    node.uri.accept(this);
+    node.configurations?.accept(this);
+    _nodeList(node.combinators);
+    _token(node.semicolon);
+  }
+
+  @override
+  void visitExpressionFunctionBody(ExpressionFunctionBody node) {
+    _functionBody(node);
+    _token(node.functionDefinition);
+    node.expression.accept(this);
+    _token(node.semicolon);
+  }
+
+  @override
+  void visitExpressionStatement(ExpressionStatement node) {
+    node.expression.accept(this);
+    _token(node.semicolon);
+  }
+
+  @override
+  void visitExtendsClause(ExtendsClause node) {
+    _token(node.extendsKeyword);
+    node.superclass.accept(this);
+  }
+
+  @override
+  void visitFieldDeclaration(FieldDeclaration node) {
+    _classMember(node);
+    _token(node.staticKeyword);
+    _token(node.covariantKeyword);
+    node.fields.accept(this);
+    _token(node.semicolon);
+  }
+
+  @override
+  void visitFieldFormalParameter(FieldFormalParameter node) {
+    _normalFormalParameter(node);
+    _token(node.keyword);
+    node.type?.accept(this);
+    _token(node.thisKeyword);
+    _token(node.period);
+    node.identifier.accept(this);
+    node.typeParameters?.accept(this);
+    node.parameters?.accept(this);
+  }
+
+  @override
+  void visitForEachPartsWithDeclaration(ForEachPartsWithDeclaration node) {
+    node.loopVariable.accept(this);
+    _token(node.inKeyword);
+    node.iterable.accept(this);
+  }
+
+  @override
+  void visitForEachPartsWithIdentifier(ForEachPartsWithIdentifier node) {
+    node.identifier.accept(this);
+    _token(node.inKeyword);
+    node.iterable.accept(this);
+  }
+
+  @override
+  void visitForElement(ForElement node) {
+    _token(node.forKeyword);
+    _token(node.leftParenthesis);
+    node.forLoopParts.accept(this);
+    _token(node.rightParenthesis);
+    node.body.accept(this);
+  }
+
+  @override
+  void visitFormalParameterList(FormalParameterList node) {
+    _token(node.leftParenthesis);
+
+    var parameters = node.parameters;
+    for (var i = 0; i < parameters.length; ++i) {
+      var parameter = parameters[i];
+      if (node.leftDelimiter?.next == parameter.beginToken) {
+        _token(node.leftDelimiter);
+      }
+
+      parameter.accept(this);
+
+      var itemSeparator = parameter.endToken.next;
+      if (itemSeparator != node.rightParenthesis) {
+        _token(itemSeparator);
+        itemSeparator = itemSeparator.next;
+      }
+
+      if (itemSeparator == node.rightDelimiter) {
+        _token(node.rightDelimiter);
+      }
+    }
+
+    _token(node.rightParenthesis);
+  }
+
+  @override
+  void visitForPartsWithDeclarations(ForPartsWithDeclarations node) {
+    node.variables.accept(this);
+    _token(node.leftSeparator);
+    node.condition?.accept(this);
+    _token(node.rightSeparator);
+    _nodeList(node.updaters, node.endToken.next);
+  }
+
+  @override
+  void visitForPartsWithExpression(ForPartsWithExpression node) {
+    node.initialization?.accept(this);
+    _token(node.leftSeparator);
+    node.condition?.accept(this);
+    _token(node.rightSeparator);
+    _nodeList(node.updaters, node.updaters.endToken?.next);
+  }
+
+  @override
+  void visitForStatement(ForStatement node) {
+    _token(node.awaitKeyword);
+    _token(node.forKeyword);
+    _token(node.leftParenthesis);
+    node.forLoopParts.accept(this);
+    _token(node.rightParenthesis);
+    node.body.accept(this);
+  }
+
+  @override
+  void visitFunctionDeclaration(FunctionDeclaration node) {
+    _compilationUnitMember(node);
+    _token(node.externalKeyword);
+    node.returnType?.accept(this);
+    _token(node.propertyKeyword);
+    node.name.accept(this);
+    node.functionExpression.accept(this);
+  }
+
+  @override
+  void visitFunctionDeclarationStatement(FunctionDeclarationStatement node) {
+    node.functionDeclaration.accept(this);
+  }
+
+  @override
+  void visitFunctionExpression(FunctionExpression node) {
+    node.typeParameters?.accept(this);
+    node.parameters?.accept(this);
+    node.body.accept(this);
+  }
+
+  @override
+  void visitFunctionExpressionInvocation(FunctionExpressionInvocation node) {
+    node.function.accept(this);
+    node.typeArguments?.accept(this);
+    node.argumentList.accept(this);
+  }
+
+  @override
+  void visitFunctionTypeAlias(FunctionTypeAlias node) {
+    _compilationUnitMember(node);
+    _token(node.typedefKeyword);
+    node.returnType?.accept(this);
+    node.name.accept(this);
+    node.typeParameters?.accept(this);
+    node.parameters.accept(this);
+    _token(node.semicolon);
+  }
+
+  @override
+  void visitFunctionTypedFormalParameter(FunctionTypedFormalParameter node) {
+    _normalFormalParameter(node);
+    node.returnType?.accept(this);
+    node.identifier.accept(this);
+    node.typeParameters?.accept(this);
+    node.parameters.accept(this);
+  }
+
+  @override
+  void visitGenericFunctionType(GenericFunctionType node) {
+    node.returnType?.accept(this);
+    _token(node.functionKeyword);
+    node.typeParameters?.accept(this);
+    node.parameters.accept(this);
+  }
+
+  @override
+  void visitGenericTypeAlias(GenericTypeAlias node) {
+    _compilationUnitMember(node);
+    _token(node.typedefKeyword);
+    node.name.accept(this);
+    node.typeParameters?.accept(this);
+    _token(node.equals);
+    node.functionType.accept(this);
+    _token(node.semicolon);
+  }
+
+  @override
+  void visitHideCombinator(HideCombinator node) {
+    _token(node.keyword);
+    _nodeList(node.hiddenNames, node.endToken.next);
+  }
+
+  @override
+  void visitIfElement(IfElement node) {
+    _token(node.ifKeyword);
+    _token(node.leftParenthesis);
+    node.condition.accept(this);
+    _token(node.rightParenthesis);
+    node.thenElement.accept(this);
+    _token(node.elseKeyword);
+    node.elseElement?.accept(this);
+  }
+
+  @override
+  void visitIfStatement(IfStatement node) {
+    _token(node.ifKeyword);
+    _token(node.leftParenthesis);
+    node.condition.accept(this);
+    _token(node.rightParenthesis);
+    node.thenStatement.accept(this);
+    _token(node.elseKeyword);
+    node.elseStatement?.accept(this);
+  }
+
+  @override
+  void visitImplementsClause(ImplementsClause node) {
+    _token(node.implementsKeyword);
+    _nodeList(node.interfaces, node.endToken.next);
+  }
+
+  @override
+  void visitImportDirective(ImportDirective node) {
+    _directive(node);
+    _token(node.keyword);
+    node.uri.accept(this);
+    node.configurations?.accept(this);
+    _token(node.deferredKeyword);
+    _token(node.asKeyword);
+    node.prefix?.accept(this);
+    _nodeList(node.combinators);
+    _token(node.semicolon);
+  }
+
+  @override
+  void visitIndexExpression(IndexExpression node) {
+    node.target?.accept(this);
+    _token(node.period);
+    _token(node.leftBracket);
+    node.index.accept(this);
+    _token(node.rightBracket);
+  }
+
+  @override
+  void visitInstanceCreationExpression(InstanceCreationExpression node) {
+    _token(node.keyword);
+    node.constructorName.accept(this);
+    node.argumentList.accept(this);
+  }
+
+  @override
+  void visitIntegerLiteral(IntegerLiteral node) {
+    _token(node.literal);
+  }
+
+  @override
+  void visitInterpolationExpression(InterpolationExpression node) {
+    _token(node.leftBracket);
+    node.expression.accept(this);
+    _token(node.rightBracket);
+  }
+
+  @override
+  void visitInterpolationString(InterpolationString node) {
+    _token(node.contents);
+  }
+
+  @override
+  void visitIsExpression(IsExpression node) {
+    node.expression.accept(this);
+    _token(node.isOperator);
+    _token(node.notOperator);
+    node.type.accept(this);
+  }
+
+  @override
+  void visitLabel(Label node) {
+    node.label.accept(this);
+    _token(node.colon);
+  }
+
+  @override
+  void visitLabeledStatement(LabeledStatement node) {
+    _nodeList(node.labels);
+    node.statement.accept(this);
+  }
+
+  @override
+  void visitLibraryDirective(LibraryDirective node) {
+    _directive(node);
+    _token(node.libraryKeyword);
+    node.name.accept(this);
+    _token(node.semicolon);
+  }
+
+  @override
+  void visitLibraryIdentifier(LibraryIdentifier node) {
+    _nodeList(node.components, node.endToken.next);
+  }
+
+  @override
+  void visitListLiteral(ListLiteral node) {
+    _typedLiteral(node);
+    _token(node.leftBracket);
+    _nodeList(node.elements, node.rightBracket);
+    _token(node.rightBracket);
+  }
+
+  @override
+  void visitMapLiteralEntry(MapLiteralEntry node) {
+    node.key.accept(this);
+    _token(node.separator);
+    node.value.accept(this);
+  }
+
+  @override
+  void visitMethodDeclaration(MethodDeclaration node) {
+    _classMember(node);
+    _token(node.externalKeyword);
+    _token(node.modifierKeyword);
+    node.returnType?.accept(this);
+    _token(node.propertyKeyword);
+    _token(node.operatorKeyword);
+    node.name.accept(this);
+    node.typeParameters?.accept(this);
+    node.parameters?.accept(this);
+    node.body?.accept(this);
+  }
+
+  @override
+  void visitMethodInvocation(MethodInvocation node) {
+    node.target?.accept(this);
+    _token(node.operator);
+    node.methodName.accept(this);
+    node.typeArguments?.accept(this);
+    node.argumentList.accept(this);
+  }
+
+  @override
+  void visitMixinDeclaration(MixinDeclaration node) {
+    _compilationUnitMember(node);
+    _token(node.mixinKeyword);
+    node.name.accept(this);
+    node.typeParameters?.accept(this);
+    node.onClause?.accept(this);
+    node.implementsClause?.accept(this);
+    _token(node.leftBracket);
+    node.members.accept(this);
+    _token(node.rightBracket);
+  }
+
+  @override
+  void visitNamedExpression(NamedExpression node) {
+    node.name.accept(this);
+    node.expression.accept(this);
+  }
+
+  @override
+  void visitNativeClause(NativeClause node) {
+    _token(node.nativeKeyword);
+    node.name.accept(this);
+  }
+
+  @override
+  void visitNativeFunctionBody(NativeFunctionBody node) {
+    _token(node.nativeKeyword);
+    node.stringLiteral?.accept(this);
+    _token(node.semicolon);
+  }
+
+  @override
+  void visitNullLiteral(NullLiteral node) {
+    _token(node.literal);
+  }
+
+  @override
+  void visitOnClause(OnClause node) {
+    _token(node.onKeyword);
+    _nodeList(node.superclassConstraints, node.endToken.next);
+  }
+
+  @override
+  void visitParenthesizedExpression(ParenthesizedExpression node) {
+    _token(node.leftParenthesis);
+    node.expression.accept(this);
+    _token(node.rightParenthesis);
+  }
+
+  @override
+  void visitPartDirective(PartDirective node) {
+    _directive(node);
+    _token(node.partKeyword);
+    node.uri.accept(this);
+    _token(node.semicolon);
+  }
+
+  @override
+  void visitPartOfDirective(PartOfDirective node) {
+    _directive(node);
+    _token(node.partKeyword);
+    _token(node.ofKeyword);
+    node.uri?.accept(this);
+    node.libraryName?.accept(this);
+    _token(node.semicolon);
+  }
+
+  @override
+  void visitPostfixExpression(PostfixExpression node) {
+    node.operand.accept(this);
+    _token(node.operator);
+  }
+
+  @override
+  void visitPrefixedIdentifier(PrefixedIdentifier node) {
+    node.prefix.accept(this);
+    _token(node.period);
+    node.identifier.accept(this);
+  }
+
+  @override
+  void visitPrefixExpression(PrefixExpression node) {
+    _token(node.operator);
+    node.operand.accept(this);
+  }
+
+  @override
+  void visitPropertyAccess(PropertyAccess node) {
+    node.target?.accept(this);
+    _token(node.operator);
+    node.propertyName.accept(this);
+  }
+
+  @override
+  void visitRedirectingConstructorInvocation(
+      RedirectingConstructorInvocation node) {
+    _token(node.thisKeyword);
+    _token(node.period);
+    node.constructorName?.accept(this);
+    node.argumentList.accept(this);
+  }
+
+  @override
+  void visitRethrowExpression(RethrowExpression node) {
+    _token(node.rethrowKeyword);
+  }
+
+  @override
+  void visitReturnStatement(ReturnStatement node) {
+    _token(node.returnKeyword);
+    node.expression?.accept(this);
+    _token(node.semicolon);
+  }
+
+  @override
+  void visitScriptTag(ScriptTag node) {
+    _token(node.scriptTag);
+  }
+
+  @override
+  void visitSetOrMapLiteral(SetOrMapLiteral node) {
+    _typedLiteral(node);
+    _token(node.leftBracket);
+    _nodeList(node.elements, node.rightBracket);
+    _token(node.rightBracket);
+  }
+
+  @override
+  void visitShowCombinator(ShowCombinator node) {
+    _token(node.keyword);
+    _nodeList(node.shownNames, node.endToken.next);
+  }
+
+  @override
+  void visitSimpleFormalParameter(SimpleFormalParameter node) {
+    _normalFormalParameter(node);
+    _token(node.keyword);
+    node.type?.accept(this);
+    node.identifier?.accept(this);
+  }
+
+  @override
+  void visitSimpleIdentifier(SimpleIdentifier node) {
+    _token(node.token);
+  }
+
+  @override
+  void visitSimpleStringLiteral(SimpleStringLiteral node) {
+    _token(node.literal);
+  }
+
+  @override
+  void visitSpreadElement(SpreadElement node) {
+    _token(node.spreadOperator);
+    node.expression.accept(this);
+  }
+
+  @override
+  void visitStringInterpolation(StringInterpolation node) {
+    _nodeList(node.elements);
+  }
+
+  @override
+  void visitSuperConstructorInvocation(SuperConstructorInvocation node) {
+    _token(node.superKeyword);
+    _token(node.period);
+    node.constructorName?.accept(this);
+    node.argumentList.accept(this);
+  }
+
+  @override
+  void visitSuperExpression(SuperExpression node) {
+    _token(node.superKeyword);
+  }
+
+  @override
+  void visitSwitchCase(SwitchCase node) {
+    _nodeList(node.labels);
+    _token(node.keyword);
+    node.expression.accept(this);
+    _token(node.colon);
+    _nodeList(node.statements);
+  }
+
+  @override
+  void visitSwitchDefault(SwitchDefault node) {
+    _nodeList(node.labels);
+    _token(node.keyword);
+    _token(node.colon);
+    _nodeList(node.statements);
+  }
+
+  @override
+  void visitSwitchStatement(SwitchStatement node) {
+    _token(node.switchKeyword);
+    _token(node.leftParenthesis);
+    node.expression.accept(this);
+    _token(node.rightParenthesis);
+    _token(node.leftBracket);
+    _nodeList(node.members);
+    _token(node.rightBracket);
+  }
+
+  @override
+  void visitSymbolLiteral(SymbolLiteral node) {
+    _token(node.poundSign);
+    var components = node.components;
+    for (var i = 0; i < components.length; ++i) {
+      var component = components[i];
+      _token(component);
+      if (i != components.length - 1) {
+        _token(component.next);
+      }
+    }
+  }
+
+  @override
+  void visitThisExpression(ThisExpression node) {
+    _token(node.thisKeyword);
+  }
+
+  @override
+  void visitThrowExpression(ThrowExpression node) {
+    _token(node.throwKeyword);
+    node.expression.accept(this);
+  }
+
+  @override
+  void visitTopLevelVariableDeclaration(TopLevelVariableDeclaration node) {
+    _compilationUnitMember(node);
+    node.variables.accept(this);
+    _token(node.semicolon);
+  }
+
+  @override
+  void visitTryStatement(TryStatement node) {
+    _token(node.tryKeyword);
+    node.body.accept(this);
+    _nodeList(node.catchClauses);
+    _token(node.finallyKeyword);
+    node.finallyBlock?.accept(this);
+  }
+
+  @override
+  void visitTypeArgumentList(TypeArgumentList node) {
+    _token(node.leftBracket);
+    _nodeList(node.arguments, node.rightBracket);
+    _token(node.rightBracket);
+  }
+
+  @override
+  void visitTypeName(TypeName node) {
+    node.name.accept(this);
+    node.typeArguments?.accept(this);
+  }
+
+  @override
+  void visitTypeParameter(TypeParameter node) {
+    _declaration(node);
+    node.name?.accept(this);
+    _token(node.extendsKeyword);
+    node.bound?.accept(this);
+  }
+
+  @override
+  void visitTypeParameterList(TypeParameterList node) {
+    _token(node.leftBracket);
+    _nodeList(node.typeParameters, node.rightBracket);
+    _token(node.rightBracket);
+  }
+
+  @override
+  void visitVariableDeclaration(VariableDeclaration node) {
+    _annotatedNode(node);
+    node.name.accept(this);
+    _token(node.equals);
+    node.initializer?.accept(this);
+  }
+
+  @override
+  void visitVariableDeclarationList(VariableDeclarationList node) {
+    _annotatedNode(node);
+    _token(node.keyword);
+    node.type?.accept(this);
+    _nodeList(node.variables, node.endToken.next);
+  }
+
+  @override
+  void visitVariableDeclarationStatement(VariableDeclarationStatement node) {
+    node.variables.accept(this);
+    _token(node.semicolon);
+  }
+
+  @override
+  void visitWhileStatement(WhileStatement node) {
+    _token(node.whileKeyword);
+    _token(node.leftParenthesis);
+    node.condition.accept(this);
+    _token(node.rightParenthesis);
+    node.body.accept(this);
+  }
+
+  @override
+  void visitWithClause(WithClause node) {
+    _token(node.withKeyword);
+    _nodeList(node.mixinTypes, node.endToken.next);
+  }
+
+  @override
+  void visitYieldStatement(YieldStatement node) {
+    _token(node.yieldKeyword);
+    _token(node.star);
+    node.expression.accept(this);
+    _token(node.semicolon);
+  }
+
+  void _annotatedNode(AnnotatedNode node) {
+    node.documentationComment?.accept(this);
+    _nodeList(node.metadata);
+  }
+
+  void _classMember(ClassMember node) {
+    _declaration(node);
+  }
+
+  void _compilationUnitMember(CompilationUnitMember node) {
+    _declaration(node);
+  }
+
+  void _declaration(Declaration node) {
+    _annotatedNode(node);
+  }
+
+  void _directive(Directive node) {
+    _annotatedNode(node);
+  }
+
+  void _functionBody(FunctionBody node) {
+    _token(node.keyword);
+    _token(node.star);
+  }
+
+  /// Print nodes from the [nodeList].
+  ///
+  /// If the [endToken] is not `null`, print one token after every node,
+  /// unless it is the [endToken].
+  void _nodeList(List<AstNode> nodeList, [Token endToken]) {
+    var length = nodeList.length;
+    for (var i = 0; i < length; ++i) {
+      var node = nodeList[i];
+      node.accept(this);
+      if (endToken != null && node.endToken.next != endToken) {
+        _token(node.endToken.next);
+      }
+    }
+  }
+
+  void _normalFormalParameter(NormalFormalParameter node) {
+    node.documentationComment?.accept(this);
+    _nodeList(node.metadata);
+    _token(node.covariantKeyword);
+  }
+
+  void _token(Token token) {
+    if (token == null) return;
+
+    if (_last != null) {
+      if (_last.next != token) {
+        throw StateError(
+          '|$_last| must be followed by |${_last.next}|, got |$token|',
+        );
+      }
+    }
+
+    // Print preceding comments as a separate sequence of tokens.
+    if (token.precedingComments != null) {
+      var lastToken = _last;
+      _last = null;
+      for (var c = token.precedingComments; c != null; c = c.next) {
+        _token(c);
+      }
+      _last = lastToken;
+    }
+
+    for (var offset = _lastEnd; offset < token.offset; offset++) {
+      var offsetLocation = _lineInfo.getLocation(offset + 1);
+      var offsetLine = offsetLocation.lineNumber - 1;
+      if (offsetLine == _lastEndLine) {
+        _buffer.write(' ');
+      } else {
+        _buffer.write('\n');
+        _lastEndLine++;
+      }
+    }
+
+    _buffer.write(token.lexeme);
+
+    _last = token;
+    _lastEnd = token.end;
+
+    var endLocation = _lineInfo.getLocation(token.end);
+    _lastEndLine = endLocation.lineNumber - 1;
+  }
+
+  void _tokenIfNot(Token maybe, Token ifNot) {
+    if (maybe == null) return;
+    if (maybe == ifNot) return;
+    _token(maybe);
+  }
+
+  _typedLiteral(TypedLiteral node) {
+    _token(node.constKeyword);
+    node.typeArguments?.accept(this);
+  }
+}
diff --git a/pkg/analyzer/lib/src/summary2/builder/prefix_builder.dart b/pkg/analyzer/lib/src/summary2/builder/prefix_builder.dart
deleted file mode 100644
index c655f34..0000000
--- a/pkg/analyzer/lib/src/summary2/builder/prefix_builder.dart
+++ /dev/null
@@ -1,9 +0,0 @@
-// Copyright (c) 2019, the Dart project authors. Please see the AUTHORS file
-// for details. All rights reserved. Use of this source code is governed by a
-// BSD-style license that can be found in the LICENSE file.
-
-import 'package:analyzer/src/summary2/declaration.dart';
-
-class PrefixBuilder extends Declaration {
-  PrefixBuilder(String name) : super(name, null);
-}
diff --git a/pkg/analyzer/lib/src/summary2/builder/source_library_builder.dart b/pkg/analyzer/lib/src/summary2/builder/source_library_builder.dart
index f029ec9..6c2acdc 100644
--- a/pkg/analyzer/lib/src/summary2/builder/source_library_builder.dart
+++ b/pkg/analyzer/lib/src/summary2/builder/source_library_builder.dart
@@ -8,8 +8,9 @@
 import 'package:analyzer/src/summary/format.dart';
 import 'package:analyzer/src/summary/idl.dart';
 import 'package:analyzer/src/summary2/ast_binary_writer.dart';
-import 'package:analyzer/src/summary2/builder/prefix_builder.dart';
-import 'package:analyzer/src/summary2/declaration.dart';
+import 'package:analyzer/src/summary2/combinator.dart';
+import 'package:analyzer/src/summary2/constructor_initializer_resolver.dart';
+import 'package:analyzer/src/summary2/export.dart';
 import 'package:analyzer/src/summary2/link.dart';
 import 'package:analyzer/src/summary2/linked_unit_context.dart';
 import 'package:analyzer/src/summary2/metadata_resolver.dart';
@@ -35,16 +36,47 @@
   /// The export scope of the library.
   final Scope exportScope = Scope.top();
 
+  final List<Export> exporters = [];
+
   SourceLibraryBuilder(Linker linker, Uri uri, Reference reference,
       LinkedNodeLibraryBuilder node)
       : this._(linker, uri, reference, node, Scope.top());
 
   SourceLibraryBuilder._(
       this.linker, this.uri, this.reference, this.node, this.importScope)
-      : scope = Scope(importScope, <String, Declaration>{});
+      : scope = Scope(importScope, <String, Reference>{});
+
+  void addExporters() {
+    var unitContext = units[0].context;
+    for (var directive in units[0].node.compilationUnit_directives) {
+      if (directive.kind == LinkedNodeKind.exportDirective) {
+        var relativeUriStr = unitContext.getStringContent(
+          directive.uriBasedDirective_uri,
+        );
+        var relativeUri = Uri.parse(relativeUriStr);
+        var uri = resolveRelativeUri(this.uri, relativeUri);
+        var exported = linker.builders[uri];
+        if (exported != null) {
+          var combinatorNodeList = directive.namespaceDirective_combinators;
+          var combinators = combinatorNodeList.map((node) {
+            if (node.kind == LinkedNodeKind.showCombinator) {
+              var nodeList = node.showCombinator_shownNames;
+              var nameList = unitContext.getSimpleNameList(nodeList);
+              return Combinator.show(nameList);
+            } else {
+              var nodeList = node.hideCombinator_hiddenNames;
+              var nameList = unitContext.getSimpleNameList(nodeList);
+              return Combinator.hide(nameList);
+            }
+          }).toList();
+
+          exported.exporters.add(new Export(this, exported, combinators));
+        }
+      }
+    }
+  }
 
   void addImportsToScope() {
-    // TODO
     var hasDartCore = false;
     var unitContext = units[0].context;
     for (var directive in units[0].node.compilationUnit_directives) {
@@ -55,15 +87,32 @@
         var relativeUri = Uri.parse(relativeUriStr);
         var uri = resolveRelativeUri(this.uri, relativeUri);
         var builder = linker.builders[uri];
+
+        Scope targetScope = importScope;
+
+        var prefixNode = directive.importDirective_prefix;
+        if (prefixNode != null) {
+          var prefixName = unitContext.getSimpleName(prefixNode);
+          var prefixContainer = reference.getChild('@prefix');
+          var prefixReference = prefixContainer[prefixName];
+
+          if (prefixReference == null) {
+            prefixReference = prefixContainer.getChild(prefixName);
+            prefixReference.prefixScope = Scope.top();
+            importScope.declare(prefixName, prefixReference);
+          }
+
+          targetScope = prefixReference.prefixScope;
+        }
+
         if (builder != null) {
-          builder.exportScope.forEach((name, declaration) {
-            importScope.declare(name, declaration);
+          builder.exportScope.forEach((name, reference) {
+            targetScope.declare(name, reference);
           });
         } else {
           var references = linker.elementFactory.exportsOfLibrary('$uri');
-          _importExportedReferences(references);
+          _declareReferences(targetScope, references);
         }
-        // TODO(scheglov) prefix
         // TODO(scheglov) combinators
       }
     }
@@ -77,7 +126,7 @@
 
       // TODO(scheglov) This works only when dart:core is linked
       var references = linker.elementFactory.exportsOfLibrary('dart:core');
-      _importExportedReferences(references);
+      _declareReferences(importScope, references);
     }
   }
 
@@ -94,18 +143,17 @@
       var variableRef = unitRef.getChild('@variable');
       for (var node in unit.node.compilationUnit_declarations) {
         if (node.kind == LinkedNodeKind.classDeclaration ||
-            node.kind == LinkedNodeKind.classTypeAlias) {
+            node.kind == LinkedNodeKind.classTypeAlias ||
+            node.kind == LinkedNodeKind.mixinDeclaration) {
           var name = unit.context.getUnitMemberName(node);
           var reference = classRef.getChild(name);
           reference.node = node;
-          var declaration = Declaration(name, reference);
-          scope.declare(name, declaration);
+          scope.declare(name, reference);
         } else if (node.kind == LinkedNodeKind.enumDeclaration) {
           var name = unit.context.getUnitMemberName(node);
           var reference = enumRef.getChild(name);
           reference.node = node;
-          var declaration = Declaration(name, reference);
-          scope.declare(name, declaration);
+          scope.declare(name, reference);
         } else if (node.kind == LinkedNodeKind.functionDeclaration) {
           var name = unit.context.getUnitMemberName(node);
 
@@ -121,22 +169,19 @@
           var reference = containerRef.getChild(name);
           reference.node = node;
 
-          var declaration = Declaration(name, reference);
-          scope.declare(name, declaration);
+          scope.declare(name, reference);
         } else if (node.kind == LinkedNodeKind.functionTypeAlias) {
           var name = unit.context.getUnitMemberName(node);
           var reference = typeAliasRef.getChild(name);
           reference.node = node;
 
-          var declaration = Declaration(name, reference);
-          scope.declare(name, declaration);
+          scope.declare(name, reference);
         } else if (node.kind == LinkedNodeKind.genericTypeAlias) {
           var name = unit.context.getUnitMemberName(node);
           var reference = typeAliasRef.getChild(name);
           reference.node = node;
 
-          var declaration = Declaration(name, reference);
-          scope.declare(name, declaration);
+          scope.declare(name, reference);
         } else if (node.kind == LinkedNodeKind.topLevelVariableDeclaration) {
           var variableList = node.topLevelVariableDeclaration_variableList;
           for (var variable in variableList.variableDeclarationList_variables) {
@@ -146,11 +191,12 @@
             reference.node = node;
 
             var getter = getterRef.getChild(name);
-            scope.declare(name, Declaration(name, getter));
+            scope.declare(name, getter);
 
-            if (!unit.context.isFinal(variable)) {
+            if (!unit.context.isConst(variable) &&
+                !unit.context.isFinal(variable)) {
               var setter = setterRef.getChild(name);
-              scope.declare('$name=', Declaration(name, setter));
+              scope.declare('$name=', setter);
             }
           }
         } else {
@@ -159,11 +205,13 @@
         }
       }
     }
+    if ('$uri' == 'dart:core') {
+      scope.declare('dynamic', reference.getChild('dynamic'));
+    }
   }
 
   void addSyntheticConstructors() {
-    for (var declaration in scope.map.values) {
-      var reference = declaration.reference;
+    for (var reference in scope.map.values) {
       var node = reference.node;
       if (node == null) continue;
       if (node.kind != LinkedNodeKind.classDeclaration) continue;
@@ -185,30 +233,32 @@
   }
 
   /// Return `true` if the export scope was modified.
-  bool addToExportScope(String name, Declaration declaration) {
+  bool addToExportScope(String name, Reference reference) {
     if (name.startsWith('_')) return false;
-    if (declaration is PrefixBuilder) return false;
+    if (reference.isPrefix) return false;
 
     var existing = exportScope.map[name];
-    if (existing == declaration) return false;
+    if (existing == reference) return false;
 
     // Ambiguous declaration detected.
     if (existing != null) return false;
 
-    exportScope.map[name] = declaration;
+    exportScope.map[name] = reference;
     return true;
   }
 
   void buildInitialExportScope() {
-    scope.forEach((name, declaration) {
-      addToExportScope(name, declaration);
+    scope.forEach((name, reference) {
+      addToExportScope(name, reference);
     });
   }
 
   void performTopLevelInference() {
-    for (var unit in units) {
-      TopLevelInference(linker, reference, unit).infer();
-    }
+    TopLevelInference(linker, reference).infer();
+  }
+
+  void resolveConstructors() {
+    ConstructorInitializerResolver(linker, reference).resolve();
   }
 
   void resolveMetadata() {
@@ -218,11 +268,12 @@
     }
   }
 
-  void resolveTypes() {
+  void resolveTypes(TypesToBuild typesToBuild) {
     for (var unit in units) {
       var unitReference = reference.getChild('@unit').getChild('${unit.uri}');
       ReferenceResolver(
         linker.linkingBundleContext,
+        typesToBuild,
         unit,
         scope,
         unitReference,
@@ -232,20 +283,12 @@
 
   void storeExportScope() {
     var linkingBundleContext = linker.linkingBundleContext;
-    for (var declaration in exportScope.map.values) {
-      var reference = declaration.reference;
+    for (var reference in exportScope.map.values) {
       var index = linkingBundleContext.indexOfReference(reference);
       node.exports.add(index);
     }
   }
 
-  void _importExportedReferences(List<Reference> exportedReferences) {
-    for (var reference in exportedReferences) {
-      var name = reference.name;
-      importScope.declare(name, Declaration(name, reference));
-    }
-  }
-
   static void build(Linker linker, Source librarySource,
       Map<Source, ast.CompilationUnit> libraryUnits) {
     var libraryUriStr = librarySource.uri.toString();
@@ -320,6 +363,13 @@
     linker.linkingLibraries.add(libraryNode);
     linker.builders[builder.uri] = builder;
   }
+
+  static void _declareReferences(Scope target, List<Reference> references) {
+    for (var reference in references) {
+      var name = reference.name;
+      target.declare(name, reference);
+    }
+  }
 }
 
 class UnitBuilder {
diff --git a/pkg/analyzer/lib/src/summary2/combinator.dart b/pkg/analyzer/lib/src/summary2/combinator.dart
new file mode 100644
index 0000000..5d7b20e
--- /dev/null
+++ b/pkg/analyzer/lib/src/summary2/combinator.dart
@@ -0,0 +1,16 @@
+// Copyright (c) 2019, the Dart project authors. Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+class Combinator {
+  final bool isShow;
+  final Set<String> names;
+
+  Combinator(this.isShow, this.names);
+
+  Combinator.show(Iterable<String> names) : this(true, names.toSet());
+
+  Combinator.hide(Iterable<String> names) : this(false, names.toSet());
+
+  bool get isHide => !isShow;
+}
diff --git a/pkg/analyzer/lib/src/summary2/constructor_initializer_resolver.dart b/pkg/analyzer/lib/src/summary2/constructor_initializer_resolver.dart
new file mode 100644
index 0000000..9c7fc99
--- /dev/null
+++ b/pkg/analyzer/lib/src/summary2/constructor_initializer_resolver.dart
@@ -0,0 +1,111 @@
+// Copyright (c) 2019, the Dart project authors. Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+import 'package:analyzer/dart/element/element.dart';
+import 'package:analyzer/src/dart/element/element.dart';
+import 'package:analyzer/src/dart/resolver/scope.dart';
+import 'package:analyzer/src/summary/format.dart';
+import 'package:analyzer/src/summary/idl.dart';
+import 'package:analyzer/src/summary2/ast_binary_reader.dart';
+import 'package:analyzer/src/summary2/ast_resolver.dart';
+import 'package:analyzer/src/summary2/link.dart';
+import 'package:analyzer/src/summary2/linked_unit_context.dart';
+import 'package:analyzer/src/summary2/reference.dart';
+
+class ConstructorInitializerResolver {
+  Linker _linker;
+  LibraryElementImpl _libraryElement;
+
+  Scope _libraryScope;
+  Scope _classScope;
+
+  LinkedUnitContext _linkedContext;
+
+  ConstructorElement _constructorElement;
+  LinkedNodeBuilder _constructorNode;
+  AstResolver _astResolver;
+
+  ConstructorInitializerResolver(this._linker, Reference libraryRef) {
+    _libraryElement = _linker.elementFactory.elementOfReference(libraryRef);
+    _libraryScope = LibraryScope(_libraryElement);
+  }
+
+  void resolve() {
+    for (CompilationUnitElementImpl unit in _libraryElement.units) {
+      _linkedContext = unit.linkedContext;
+      for (var classElement in unit.types) {
+        _classScope = ClassScope(_libraryScope, classElement);
+        for (var constructorElement in classElement.constructors) {
+          _constructor(constructorElement);
+        }
+      }
+    }
+  }
+
+  void _constructor(ConstructorElementImpl constructorElement) {
+    if (constructorElement.isSynthetic) return;
+
+    _constructorElement = constructorElement;
+    _constructorNode = constructorElement.linkedNode;
+
+    var functionScope = FunctionScope(_classScope, constructorElement);
+    functionScope.defineParameters();
+
+    var nameScope = ConstructorInitializerScope(
+      functionScope,
+      constructorElement,
+    );
+
+    _astResolver = AstResolver(_linker, _libraryElement, nameScope);
+
+    _initializers();
+    _redirectedConstructor();
+  }
+
+  void _initializers() {
+    bool isConst = _constructorNode.constructorDeclaration_constKeyword != 0;
+
+    var initializers = _constructorNode.constructorDeclaration_initializers;
+    var resolvedList = List<LinkedNodeBuilder>();
+    for (var i = 0; i < initializers.length; ++i) {
+      var unresolvedNode = initializers[i];
+
+      // Keep only initializers of constant constructors; or redirects.
+      if (!isConst &&
+          unresolvedNode.kind !=
+              LinkedNodeKind.redirectingConstructorInvocation) {
+        continue;
+      }
+
+      var reader = AstBinaryReader(_linkedContext);
+      var unresolvedAst = reader.readNode(unresolvedNode);
+
+      var resolvedNode = _astResolver.resolve(
+        _linkedContext,
+        unresolvedAst,
+        enclosingClassElement: _constructorElement.enclosingElement,
+        enclosingExecutableElement: _constructorElement,
+      );
+      resolvedList.add(resolvedNode);
+    }
+    _constructorNode.constructorDeclaration_initializers = resolvedList;
+  }
+
+  void _redirectedConstructor() {
+    var redirectedConstructorNode =
+        _constructorNode.constructorDeclaration_redirectedConstructor;
+    if (redirectedConstructorNode == null) return;
+
+    var reader = AstBinaryReader(_linkedContext);
+    var unresolvedAst = reader.readNode(redirectedConstructorNode);
+    var resolvedNode = _astResolver.resolve(
+      _linkedContext,
+      unresolvedAst,
+      enclosingClassElement: _constructorElement.enclosingElement,
+      enclosingExecutableElement: _constructorElement,
+    );
+    _constructorNode.constructorDeclaration_redirectedConstructor =
+        resolvedNode;
+  }
+}
diff --git a/pkg/analyzer/lib/src/summary2/declaration.dart b/pkg/analyzer/lib/src/summary2/declaration.dart
deleted file mode 100644
index d717375..0000000
--- a/pkg/analyzer/lib/src/summary2/declaration.dart
+++ /dev/null
@@ -1,16 +0,0 @@
-// Copyright (c) 2019, the Dart project authors. Please see the AUTHORS file
-// for details. All rights reserved. Use of this source code is governed by a
-// BSD-style license that can be found in the LICENSE file.
-
-import 'package:analyzer/src/summary2/reference.dart';
-
-/// A declaration in a scope.
-///
-/// A declaration can be associated with a named node and have [reference] set;
-/// or can be an import prefix, then the [reference] is `null`.
-class Declaration {
-  final String name;
-  final Reference reference;
-
-  Declaration(this.name, this.reference);
-}
diff --git a/pkg/analyzer/lib/src/summary2/export.dart b/pkg/analyzer/lib/src/summary2/export.dart
new file mode 100644
index 0000000..63a1365
--- /dev/null
+++ b/pkg/analyzer/lib/src/summary2/export.dart
@@ -0,0 +1,25 @@
+// Copyright (c) 2019, the Dart project authors. Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+import 'package:analyzer/src/summary2/builder/source_library_builder.dart';
+import 'package:analyzer/src/summary2/combinator.dart';
+import 'package:analyzer/src/summary2/reference.dart';
+
+class Export {
+  final SourceLibraryBuilder exporter;
+  final SourceLibraryBuilder exported;
+  final List<Combinator> combinators;
+
+  Export(this.exporter, this.exported, this.combinators);
+
+  bool addToExportScope(String name, Reference reference) {
+    if (combinators != null) {
+      for (Combinator combinator in combinators) {
+        if (combinator.isShow && !combinator.names.contains(name)) return false;
+        if (combinator.isHide && combinator.names.contains(name)) return false;
+      }
+    }
+    return exporter.addToExportScope(name, reference);
+  }
+}
diff --git a/pkg/analyzer/lib/src/summary2/link.dart b/pkg/analyzer/lib/src/summary2/link.dart
index aec825a..4edc6cd 100644
--- a/pkg/analyzer/lib/src/summary2/link.dart
+++ b/pkg/analyzer/lib/src/summary2/link.dart
@@ -1,4 +1,4 @@
-// Copyright (c) 2019, the Dart project authors.  Please see the AUTHORS file
+// Copyright (c) 2019, the Dart project authors. Please see the AUTHORS file
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
 
@@ -19,6 +19,8 @@
 import 'package:analyzer/src/summary2/linked_element_factory.dart';
 import 'package:analyzer/src/summary2/linking_bundle_context.dart';
 import 'package:analyzer/src/summary2/reference.dart';
+import 'package:analyzer/src/summary2/reference_resolver.dart';
+import 'package:analyzer/src/summary2/type_builder.dart';
 
 LinkResult link(
   AnalysisOptions analysisOptions,
@@ -74,6 +76,7 @@
       elementFactory,
       linkingBundle.references,
     );
+    bundleContext.linking = linkingBundleContext;
   }
 
   void link(List<LinkedNodeBundle> inputs,
@@ -92,6 +95,12 @@
     _buildOutlines();
   }
 
+  void _addExporters() {
+    for (var library in builders.values) {
+      library.addExporters();
+    }
+  }
+
   void _addSyntheticConstructors() {
     for (var library in builders.values) {
       library.addSyntheticConstructors();
@@ -99,23 +108,58 @@
   }
 
   void _buildOutlines() {
+    _addExporters();
     _computeLibraryScopes();
     _addSyntheticConstructors();
     _createTypeSystem();
     _resolveTypes();
     _performTopLevelInference();
+    _resolveConstructors();
     _resolveMetadata();
   }
 
   void _computeLibraryScopes() {
+    var exporters = new Set<SourceLibraryBuilder>();
+    var exportees = new Set<SourceLibraryBuilder>();
+
     for (var library in builders.values) {
       library.addLocalDeclarations();
+      if (library.exporters.isNotEmpty) {
+        exportees.add(library);
+        for (var exporter in library.exporters) {
+          exporters.add(exporter.exporter);
+        }
+      }
     }
 
     for (var library in builders.values) {
       library.buildInitialExportScope();
     }
 
+    var both = new Set<SourceLibraryBuilder>();
+    for (var exported in exportees) {
+      if (exporters.contains(exported)) {
+        both.add(exported);
+      }
+      for (var export in exported.exporters) {
+        exported.exportScope.forEach(export.addToExportScope);
+      }
+    }
+
+    while (true) {
+      var hasChanges = false;
+      for (var exported in both) {
+        for (var export in exported.exporters) {
+          exported.exportScope.forEach((name, member) {
+            if (export.addToExportScope(name, member)) {
+              hasChanges = true;
+            }
+          });
+        }
+      }
+      if (!hasChanges) break;
+    }
+
     for (var library in builders.values) {
       library.addImportsToScope();
     }
@@ -123,14 +167,18 @@
     for (var library in builders.values) {
       library.storeExportScope();
     }
-
-    // TODO(scheglov) process imports and exports
   }
 
   void _createTypeSystem() {
     var coreRef = rootReference.getChild('dart:core');
     var coreLib = elementFactory.elementOfReference(coreRef);
-    typeProvider = SummaryTypeProvider()..initializeCore(coreLib);
+
+    var asyncRef = rootReference.getChild('dart:async');
+    var asyncLib = elementFactory.elementOfReference(asyncRef);
+
+    typeProvider = SummaryTypeProvider()
+      ..initializeCore(coreLib)
+      ..initializeAsync(asyncLib);
     analysisContext.typeProvider = typeProvider;
 
     typeSystem = Dart2TypeSystem(typeProvider);
@@ -145,6 +193,12 @@
     }
   }
 
+  void _resolveConstructors() {
+    for (var library in builders.values) {
+      library.resolveConstructors();
+    }
+  }
+
   void _resolveMetadata() {
     for (var library in builders.values) {
       library.resolveMetadata();
@@ -152,9 +206,11 @@
   }
 
   void _resolveTypes() {
+    var typesToBuild = TypesToBuild();
     for (var library in builders.values) {
-      library.resolveTypes();
+      library.resolveTypes(typesToBuild);
     }
+    TypeBuilder(bundleContext).build(typesToBuild);
   }
 }
 
diff --git a/pkg/analyzer/lib/src/summary2/linked_bundle_context.dart b/pkg/analyzer/lib/src/summary2/linked_bundle_context.dart
index fbaf454..8ecb51f 100644
--- a/pkg/analyzer/lib/src/summary2/linked_bundle_context.dart
+++ b/pkg/analyzer/lib/src/summary2/linked_bundle_context.dart
@@ -1,4 +1,4 @@
-// Copyright (c) 2019, the Dart project authors.  Please see the AUTHORS file
+// Copyright (c) 2019, the Dart project authors. Please see the AUTHORS file
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
 
@@ -6,8 +6,10 @@
 import 'package:analyzer/dart/element/type.dart';
 import 'package:analyzer/src/dart/element/element.dart';
 import 'package:analyzer/src/dart/element/type.dart';
+import 'package:analyzer/src/generated/utilities_dart.dart';
 import 'package:analyzer/src/summary/idl.dart';
 import 'package:analyzer/src/summary2/linked_element_factory.dart';
+import 'package:analyzer/src/summary2/linking_bundle_context.dart';
 import 'package:analyzer/src/summary2/reference.dart';
 
 /// The context of a linked bundle, with shared references.
@@ -16,6 +18,10 @@
   final LinkedNodeReferences referencesData;
   final List<Reference> _references;
 
+  /// If the bundle is being linked, the reference to the linking context.
+  /// Otherwise `null`, and we are not expected to access it.
+  LinkingBundleContext linking;
+
   LinkedBundleContext(this.elementFactory, this.referencesData)
       : _references = List<Reference>.filled(referencesData.name.length, null,
             growable: true);
@@ -46,19 +52,21 @@
     var kind = linkedType.kind;
     if (kind == LinkedNodeTypeKind.dynamic_) {
       return DynamicTypeImpl.instance;
+    } else if (kind == LinkedNodeTypeKind.genericTypeAlias) {
+      var reference = referenceOfIndex(linkedType.genericTypeAliasReference);
+      return GenericTypeAliasElementImpl.typeAfterSubstitution(
+        elementFactory.elementOfReference(reference),
+        linkedType.genericTypeAliasTypeArguments.map(getType).toList(),
+      );
     } else if (kind == LinkedNodeTypeKind.function) {
       var returnType = getType(linkedType.functionReturnType);
-      var typeParameters = linkedType.functionTypeParameters
-          .map(referenceOfIndex)
-          .map(elementFactory.elementOfReference)
-          .cast<TypeParameterElement>()
-          .toList();
-      var formalParameters = linkedType.functionFormalParameters
-          .map(referenceOfIndex)
-          .map(elementFactory.elementOfReference)
-          .cast<ParameterElement>()
-          .toList();
-      // TODO(scheglov) Rework this to purely synthetic types.
+      var formalParameters = linkedType.functionFormalParameters.map((p) {
+        return ParameterElementImpl.synthetic(
+          p.name,
+          getType(p.type),
+          _formalParameterKind(p.kind),
+        );
+      }).toList();
       return FunctionElementImpl.synthetic(formalParameters, returnType).type;
     } else if (kind == LinkedNodeTypeKind.interface) {
       var reference = referenceOfIndex(linkedType.interfaceClass);
@@ -105,4 +113,14 @@
 
     return reference;
   }
+
+  ParameterKind _formalParameterKind(LinkedNodeFormalParameterKind kind) {
+    if (kind == LinkedNodeFormalParameterKind.optionalNamed) {
+      return ParameterKind.NAMED;
+    }
+    if (kind == LinkedNodeFormalParameterKind.optionalPositional) {
+      return ParameterKind.POSITIONAL;
+    }
+    return ParameterKind.REQUIRED;
+  }
 }
diff --git a/pkg/analyzer/lib/src/summary2/linked_element_factory.dart b/pkg/analyzer/lib/src/summary2/linked_element_factory.dart
index 7653ed6..13197b8 100644
--- a/pkg/analyzer/lib/src/summary2/linked_element_factory.dart
+++ b/pkg/analyzer/lib/src/summary2/linked_element_factory.dart
@@ -5,6 +5,7 @@
 import 'package:analyzer/dart/analysis/session.dart';
 import 'package:analyzer/dart/element/element.dart';
 import 'package:analyzer/src/dart/element/element.dart';
+import 'package:analyzer/src/dart/resolver/scope.dart';
 import 'package:analyzer/src/generated/engine.dart' show AnalysisContext;
 import 'package:analyzer/src/summary/idl.dart';
 import 'package:analyzer/src/summary2/linked_bundle_context.dart';
@@ -28,6 +29,18 @@
     }
   }
 
+  Namespace buildExportNamespace(Uri uri) {
+    var exportedNames = <String, Element>{};
+
+    var exportedReferences = exportsOfLibrary('$uri');
+    for (var exportedReference in exportedReferences) {
+      var element = elementOfReference(exportedReference);
+      exportedNames[element.name] = element;
+    }
+
+    return Namespace(exportedNames);
+  }
+
   Element elementOfReference(Reference reference) {
     if (reference.element != null) {
       return reference.element;
@@ -55,6 +68,33 @@
     var reference = rootReference.getChild(uriStr);
     return elementOfReference(reference);
   }
+
+  LinkedNode nodeOfReference(Reference reference) {
+    if (reference.node != null) {
+      return reference.node;
+    }
+
+    var unitRef = reference.parent?.parent;
+    var unitContainer = unitRef?.parent;
+    if (unitContainer?.name == '@unit') {
+      var libraryUriStr = unitContainer.parent.name;
+      var libraryData = libraryMap[libraryUriStr];
+      for (var unitData in libraryData.node.units) {
+        var definingUnitContext = LinkedUnitContext(
+          libraryData.context,
+          TokensContext(unitData.tokens),
+        );
+        _ElementRequest._indexUnitDeclarations(
+          definingUnitContext,
+          unitRef,
+          unitData.node,
+        );
+        return reference.node;
+      }
+    }
+
+    throw UnimplementedError('$reference');
+  }
 }
 
 class _ElementRequest {
@@ -85,14 +125,19 @@
       return _constructor(class_, reference);
     }
 
+    if (parentName == '@enum') {
+      var unit = elementOfReference(parent2);
+      return _enum(unit, reference);
+    }
+
     if (parentName == '@function') {
       CompilationUnitElementImpl enclosing = elementOfReference(parent2);
       return _function(enclosing, reference);
     }
 
-    if (parentName == '@getter') {
+    if (parentName == '@getter' || parentName == '@setter') {
       var enclosing = elementOfReference(parent2);
-      return _getter(enclosing, reference);
+      return _accessor(enclosing, reference);
     }
 
     if (parentName == '@method') {
@@ -126,10 +171,28 @@
     throw StateError('Not found: $input');
   }
 
+  PropertyAccessorElementImpl _accessor(
+      ElementImpl enclosing, Reference reference) {
+    if (enclosing is ClassElementImpl) {
+      enclosing.accessors;
+      // Requesting accessors sets elements for accessors and fields.
+      assert(reference.element != null);
+      return reference.element;
+    }
+    if (enclosing is CompilationUnitElementImpl) {
+      enclosing.accessors;
+      // Requesting accessors sets elements for accessors and variables.
+      assert(reference.element != null);
+      return reference.element;
+    }
+    // Only classes and units have accessors.
+    throw StateError('${enclosing.runtimeType}');
+  }
+
   ClassElementImpl _class(
       CompilationUnitElementImpl unit, Reference reference) {
     if (reference.node == null) {
-      _indexUnitDeclarations(unit);
+      _indexUnitElementDeclarations(unit);
       assert(reference.node != 0, '$reference');
     }
     return reference.element = ClassElementImpl.forLinkedNode(
@@ -197,63 +260,29 @@
     return reference.element = libraryElement;
   }
 
+  EnumElementImpl _enum(CompilationUnitElementImpl unit, Reference reference) {
+    if (reference.node == null) {
+      _indexUnitElementDeclarations(unit);
+      assert(reference.node != 0, '$reference');
+    }
+    return reference.element = EnumElementImpl.forLinkedNode(
+      unit,
+      reference,
+      reference.node,
+    );
+  }
+
   Element _function(CompilationUnitElementImpl enclosing, Reference reference) {
     enclosing.functions;
     assert(reference.element != null);
     return reference.element;
   }
 
-  PropertyAccessorElementImpl _getter(
-      ElementImpl enclosing, Reference reference) {
-    if (enclosing is ClassElementImpl) {
-      enclosing.accessors;
-      // Requesting accessors sets elements for accessors and fields.
-      assert(reference.element != null);
-      return reference.element;
-    }
-    if (enclosing is CompilationUnitElementImpl) {
-      enclosing.accessors;
-      // Requesting accessors sets elements for accessors and variables.
-      assert(reference.element != null);
-      return reference.element;
-    }
-    // Only classes and units have accessors.
-    throw StateError('${enclosing.runtimeType}');
-  }
-
-  void _indexUnitDeclarations(CompilationUnitElementImpl unit) {
-    var context = unit.linkedContext;
+  void _indexUnitElementDeclarations(CompilationUnitElementImpl unit) {
+    var unitContext = unit.linkedContext;
     var unitRef = unit.reference;
-    var classRef = unitRef.getChild('@class');
-    var enumRef = unitRef.getChild('@class');
-    var functionRef = unitRef.getChild('@function');
-    var typeAliasRef = unitRef.getChild('@typeAlias');
-    var variableRef = unitRef.getChild('@variable');
-    for (var declaration in unit.linkedNode.compilationUnit_declarations) {
-      var kind = declaration.kind;
-      if (kind == LinkedNodeKind.classDeclaration ||
-          kind == LinkedNodeKind.classTypeAlias) {
-        var name = context.getUnitMemberName(declaration);
-        classRef.getChild(name).node = declaration;
-      } else if (kind == LinkedNodeKind.enumDeclaration) {
-        var name = context.getUnitMemberName(declaration);
-        enumRef.getChild(name).node = declaration;
-      } else if (kind == LinkedNodeKind.functionDeclaration) {
-        var name = context.getUnitMemberName(declaration);
-        functionRef.getChild(name).node = declaration;
-      } else if (kind == LinkedNodeKind.functionTypeAlias) {
-        var name = context.getUnitMemberName(declaration);
-        typeAliasRef.getChild(name).node = declaration;
-      } else if (kind == LinkedNodeKind.topLevelVariableDeclaration) {
-        var variables = declaration.topLevelVariableDeclaration_variableList;
-        for (var variable in variables.variableDeclarationList_variables) {
-          var name = context.getSimpleName(variable.variableDeclaration_name);
-          variableRef.getChild(name).node = variable;
-        }
-      } else {
-        throw UnimplementedError('$kind');
-      }
-    }
+    var unitNode = unit.linkedNode;
+    _indexUnitDeclarations(unitContext, unitRef, unitNode);
   }
 
   MethodElementImpl _method(ClassElementImpl enclosing, Reference reference) {
@@ -272,7 +301,7 @@
   GenericTypeAliasElementImpl _typeAlias(
       CompilationUnitElementImpl unit, Reference reference) {
     if (reference.node == null) {
-      _indexUnitDeclarations(unit);
+      _indexUnitElementDeclarations(unit);
       assert(reference.node != 0, '$reference');
     }
     return reference.element = GenericTypeAliasElementImpl.forLinkedNode(
@@ -289,6 +318,44 @@
     assert(reference.element != null);
     return reference.element;
   }
+
+  static void _indexUnitDeclarations(
+    LinkedUnitContext unitContext,
+    Reference unitRef,
+    LinkedNode unitNode,
+  ) {
+    var classRef = unitRef.getChild('@class');
+    var enumRef = unitRef.getChild('@enum');
+    var functionRef = unitRef.getChild('@function');
+    var typeAliasRef = unitRef.getChild('@typeAlias');
+    var variableRef = unitRef.getChild('@variable');
+    for (var declaration in unitNode.compilationUnit_declarations) {
+      var kind = declaration.kind;
+      if (kind == LinkedNodeKind.classDeclaration ||
+          kind == LinkedNodeKind.classTypeAlias) {
+        var name = unitContext.getUnitMemberName(declaration);
+        classRef.getChild(name).node = declaration;
+      } else if (kind == LinkedNodeKind.enumDeclaration) {
+        var name = unitContext.getUnitMemberName(declaration);
+        enumRef.getChild(name).node = declaration;
+      } else if (kind == LinkedNodeKind.functionDeclaration) {
+        var name = unitContext.getUnitMemberName(declaration);
+        functionRef.getChild(name).node = declaration;
+      } else if (kind == LinkedNodeKind.functionTypeAlias) {
+        var name = unitContext.getUnitMemberName(declaration);
+        typeAliasRef.getChild(name).node = declaration;
+      } else if (kind == LinkedNodeKind.topLevelVariableDeclaration) {
+        var variables = declaration.topLevelVariableDeclaration_variableList;
+        for (var variable in variables.variableDeclarationList_variables) {
+          var name =
+              unitContext.getSimpleName(variable.variableDeclaration_name);
+          variableRef.getChild(name).node = variable;
+        }
+      } else {
+        throw UnimplementedError('$kind');
+      }
+    }
+  }
 }
 
 class _Library {
diff --git a/pkg/analyzer/lib/src/summary2/linked_unit_context.dart b/pkg/analyzer/lib/src/summary2/linked_unit_context.dart
index b1bb1f4..7f2a591 100644
--- a/pkg/analyzer/lib/src/summary2/linked_unit_context.dart
+++ b/pkg/analyzer/lib/src/summary2/linked_unit_context.dart
@@ -1,9 +1,11 @@
-// Copyright (c) 2019, the Dart project authors.  Please see the AUTHORS file
+// Copyright (c) 2019, the Dart project authors. Please see the AUTHORS file
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
 
 import 'package:analyzer/dart/ast/ast.dart';
 import 'package:analyzer/dart/element/type.dart';
+import 'package:analyzer/src/dart/element/element.dart';
+import 'package:analyzer/src/summary/format.dart';
 import 'package:analyzer/src/summary/idl.dart';
 import 'package:analyzer/src/summary2/ast_binary_reader.dart';
 import 'package:analyzer/src/summary2/linked_bundle_context.dart';
@@ -52,10 +54,13 @@
     if (kind == LinkedNodeKind.constructorDeclaration) {
       parameterList = node.constructorDeclaration_parameters;
     } else if (kind == LinkedNodeKind.functionDeclaration) {
-      parameterList = node.functionDeclaration_functionExpression
-          .functionExpression_formalParameters;
+      return getFormalParameters(node.functionDeclaration_functionExpression);
+    } else if (kind == LinkedNodeKind.functionExpression) {
+      parameterList = node.functionExpression_formalParameters;
     } else if (kind == LinkedNodeKind.functionTypeAlias) {
       parameterList = node.functionTypeAlias_formalParameters;
+    } else if (kind == LinkedNodeKind.genericFunctionType) {
+      parameterList = node.genericFunctionType_formalParameters;
     } else if (kind == LinkedNodeKind.methodDeclaration) {
       parameterList = node.methodDeclaration_formalParameters;
     } else {
@@ -64,12 +69,31 @@
     return parameterList?.formalParameterList_parameters;
   }
 
+  DartType getFormalParameterType(LinkedNode node) {
+    var kind = node.kind;
+    if (kind == LinkedNodeKind.defaultFormalParameter) {
+      return getFormalParameterType(node.defaultFormalParameter_parameter);
+    }
+    if (kind == LinkedNodeKind.fieldFormalParameter) {
+      return getType(node.fieldFormalParameter_type2);
+    }
+    if (kind == LinkedNodeKind.functionTypedFormalParameter) {
+      return getType(node.functionTypedFormalParameter_type2);
+    }
+    if (kind == LinkedNodeKind.simpleFormalParameter) {
+      return getType(node.simpleFormalParameter_type2);
+    }
+    throw UnimplementedError('$kind');
+  }
+
   LinkedNode getImplementsClause(LinkedNode node) {
     var kind = node.kind;
     if (kind == LinkedNodeKind.classDeclaration) {
       return node.classOrMixinDeclaration_implementsClause;
     } else if (kind == LinkedNodeKind.classTypeAlias) {
       return node.classTypeAlias_implementsClause;
+    } else if (kind == LinkedNodeKind.mixinDeclaration) {
+      return node.classOrMixinDeclaration_implementsClause;
     } else {
       throw UnimplementedError('$kind');
     }
@@ -79,6 +103,15 @@
     return bundleContext.getInterfaceType(linkedType);
   }
 
+  List<LinkedNode> getLibraryMetadataOrEmpty(LinkedNode unit) {
+    for (var directive in unit.compilationUnit_directives) {
+      if (directive.kind == LinkedNodeKind.libraryDirective) {
+        return getMetadataOrEmpty(directive);
+      }
+    }
+    return const <LinkedNode>[];
+  }
+
   List<LinkedNode> getMetadataOrEmpty(LinkedNode node) {
     var kind = node.kind;
     if (kind == LinkedNodeKind.classDeclaration ||
@@ -86,13 +119,21 @@
         kind == LinkedNodeKind.constructorDeclaration ||
         kind == LinkedNodeKind.enumConstantDeclaration ||
         kind == LinkedNodeKind.enumDeclaration ||
+        kind == LinkedNodeKind.exportDirective ||
         kind == LinkedNodeKind.functionDeclaration ||
         kind == LinkedNodeKind.functionTypeAlias ||
+        kind == LinkedNodeKind.libraryDirective ||
+        kind == LinkedNodeKind.importDirective ||
         kind == LinkedNodeKind.methodDeclaration ||
         kind == LinkedNodeKind.mixinDeclaration ||
+        kind == LinkedNodeKind.partDirective ||
+        kind == LinkedNodeKind.partOfDirective ||
         kind == LinkedNodeKind.variableDeclaration) {
       return node.annotatedNode_metadata;
     }
+    if (kind == LinkedNodeKind.defaultFormalParameter) {
+      return getMetadataOrEmpty(node.defaultFormalParameter_parameter);
+    }
     if (kind == LinkedNodeKind.fieldFormalParameter ||
         kind == LinkedNodeKind.functionTypedFormalParameter ||
         kind == LinkedNodeKind.simpleFormalParameter) {
@@ -109,6 +150,10 @@
     var kind = node.kind;
     if (kind == LinkedNodeKind.functionDeclaration) {
       return getType(node.functionDeclaration_returnType2);
+    } else if (kind == LinkedNodeKind.functionTypeAlias) {
+      return getType(node.functionTypeAlias_returnType2);
+    } else if (kind == LinkedNodeKind.genericFunctionType) {
+      return getType(node.genericFunctionType_returnType2);
     } else if (kind == LinkedNodeKind.methodDeclaration) {
       return getType(node.methodDeclaration_returnType2);
     } else {
@@ -120,8 +165,12 @@
     return getTokenLexeme(node.simpleIdentifier_token);
   }
 
+  List<String> getSimpleNameList(List<LinkedNode> nodeList) {
+    return nodeList.map(getSimpleName).toList();
+  }
+
   int getSimpleOffset(LinkedNode node) {
-    return tokensContext.offset(node.simpleIdentifier_token);
+    return getTokenOffset(node.simpleIdentifier_token);
   }
 
   String getStringContent(LinkedNode node) {
@@ -132,6 +181,10 @@
     return tokensContext.lexeme(token);
   }
 
+  int getTokenOffset(int token) {
+    return tokensContext.offset(token);
+  }
+
   DartType getType(LinkedNodeType linkedType) {
     return bundleContext.getType(linkedType);
   }
@@ -145,30 +198,6 @@
     }
   }
 
-  List<LinkedNode> getTypeParameters(LinkedNode node) {
-    LinkedNode typeParameterList;
-    var kind = node.kind;
-    if (kind == LinkedNodeKind.classTypeAlias) {
-      typeParameterList = node.classTypeAlias_typeParameters;
-    } else if (kind == LinkedNodeKind.classDeclaration ||
-        kind == LinkedNodeKind.mixinDeclaration) {
-      typeParameterList = node.classOrMixinDeclaration_typeParameters;
-    } else if (kind == LinkedNodeKind.constructorDeclaration) {
-      return const [];
-    } else if (kind == LinkedNodeKind.functionDeclaration) {
-      return getTypeParameters(node.functionDeclaration_functionExpression);
-    } else if (kind == LinkedNodeKind.functionExpression) {
-      typeParameterList = node.functionExpression_typeParameters;
-    } else if (kind == LinkedNodeKind.functionTypeAlias) {
-      typeParameterList = node.functionTypeAlias_typeParameters;
-    } else if (kind == LinkedNodeKind.methodDeclaration) {
-      typeParameterList = node.methodDeclaration_typeParameters;
-    } else {
-      throw UnimplementedError('$kind');
-    }
-    return typeParameterList?.typeParameterList_typeParameters;
-  }
-
   String getUnitMemberName(LinkedNode node) {
     return getSimpleName(node.namedCompilationUnitMember_name);
   }
@@ -185,16 +214,26 @@
   bool isAsynchronous(LinkedNode node) {
     LinkedNode body = _getFunctionBody(node);
     if (body.kind == LinkedNodeKind.blockFunctionBody) {
-      return body.blockFunctionBody_keyword != 0;
+      return isAsyncKeyword(body.blockFunctionBody_keyword);
     } else if (body.kind == LinkedNodeKind.emptyFunctionBody) {
       return false;
     } else {
-      return body.expressionFunctionBody_keyword != 0;
+      return isAsyncKeyword(body.expressionFunctionBody_keyword);
     }
   }
 
+  bool isAsyncKeyword(int token) {
+    return tokensContext.type(token) == UnlinkedTokenType.ASYNC;
+  }
+
   bool isConst(LinkedNode node) {
     var kind = node.kind;
+    if (kind == LinkedNodeKind.defaultFormalParameter) {
+      return isConst(node.defaultFormalParameter_parameter);
+    }
+    if (kind == LinkedNodeKind.simpleFormalParameter) {
+      return isConstKeyword(node.simpleFormalParameter_keyword);
+    }
     if (kind == LinkedNodeKind.variableDeclaration) {
       return node.variableDeclaration_declaration.isConst;
     }
@@ -224,9 +263,21 @@
 
   bool isFinal(LinkedNode node) {
     var kind = node.kind;
+    if (kind == LinkedNodeKind.defaultFormalParameter) {
+      return isFinal(node.defaultFormalParameter_parameter);
+    }
     if (kind == LinkedNodeKind.enumConstantDeclaration) {
       return false;
     }
+    if (kind == LinkedNodeKind.fieldFormalParameter) {
+      return isFinalKeyword(node.fieldFormalParameter_keyword);
+    }
+    if (kind == LinkedNodeKind.functionTypedFormalParameter) {
+      return false;
+    }
+    if (kind == LinkedNodeKind.simpleFormalParameter) {
+      return isFinalKeyword(node.simpleFormalParameter_keyword);
+    }
     if (kind == LinkedNodeKind.variableDeclaration) {
       return node.variableDeclaration_declaration.isFinal;
     }
@@ -301,6 +352,10 @@
     throw UnimplementedError('$kind');
   }
 
+  bool isSyncKeyword(int token) {
+    return tokensContext.type(token) == UnlinkedTokenType.SYNC;
+  }
+
   void loadClassMemberReferences(Reference reference) {
     var node = reference.node;
     if (node.kind != LinkedNodeKind.classDeclaration &&
@@ -337,11 +392,16 @@
     }
   }
 
-  Expression readInitializer(LinkedNode linkedNode) {
-    if (linkedNode.kind == LinkedNodeKind.defaultFormalParameter) {
-      return readNode(linkedNode.defaultFormalParameter_defaultValue);
-    }
-    return readNode(linkedNode.variableDeclaration_initializer);
+  Expression readInitializer(ElementImpl enclosing, LinkedNode linkedNode) {
+    var reader = AstBinaryReader(this);
+    return reader.withLocalScope(enclosing, () {
+      if (linkedNode.kind == LinkedNodeKind.defaultFormalParameter) {
+        var data = linkedNode.defaultFormalParameter_defaultValue;
+        return reader.readNode(data);
+      }
+      var data = linkedNode.variableDeclaration_initializer;
+      return reader.readNode(data);
+    });
   }
 
   AstNode readNode(LinkedNode linkedNode) {
@@ -349,6 +409,16 @@
     return reader.readNode(linkedNode);
   }
 
+  void setReturnType(LinkedNodeBuilder node, DartType type) {
+    var typeData = bundleContext.linking.writeType(type);
+    node.functionDeclaration_returnType2 = typeData;
+  }
+
+  void setVariableType(LinkedNodeBuilder node, DartType type) {
+    var typeData = bundleContext.linking.writeType(type);
+    node.simpleFormalParameter_type2 = typeData;
+  }
+
   Iterable<LinkedNode> topLevelVariables(LinkedNode unit) sync* {
     for (var declaration in unit.compilationUnit_declarations) {
       if (declaration.kind == LinkedNodeKind.topLevelVariableDeclaration) {
@@ -365,8 +435,9 @@
     if (kind == LinkedNodeKind.constructorDeclaration) {
       return node.constructorDeclaration_body;
     } else if (kind == LinkedNodeKind.functionDeclaration) {
-      return node
-          .functionDeclaration_functionExpression.functionExpression_body;
+      return _getFunctionBody(node.functionDeclaration_functionExpression);
+    } else if (kind == LinkedNodeKind.functionExpression) {
+      return node.functionExpression_body;
     } else if (kind == LinkedNodeKind.methodDeclaration) {
       return node.methodDeclaration_body;
     } else {
@@ -381,4 +452,32 @@
   bool _isSetToken(int token) {
     return tokensContext.type(token) == UnlinkedTokenType.SET;
   }
+
+  static List<LinkedNode> getTypeParameters(LinkedNode node) {
+    LinkedNode typeParameterList;
+    var kind = node.kind;
+    if (kind == LinkedNodeKind.classTypeAlias) {
+      typeParameterList = node.classTypeAlias_typeParameters;
+    } else if (kind == LinkedNodeKind.classDeclaration ||
+        kind == LinkedNodeKind.mixinDeclaration) {
+      typeParameterList = node.classOrMixinDeclaration_typeParameters;
+    } else if (kind == LinkedNodeKind.constructorDeclaration) {
+      return const [];
+    } else if (kind == LinkedNodeKind.functionDeclaration) {
+      return getTypeParameters(node.functionDeclaration_functionExpression);
+    } else if (kind == LinkedNodeKind.functionExpression) {
+      typeParameterList = node.functionExpression_typeParameters;
+    } else if (kind == LinkedNodeKind.functionTypeAlias) {
+      typeParameterList = node.functionTypeAlias_typeParameters;
+    } else if (kind == LinkedNodeKind.genericFunctionType) {
+      typeParameterList = node.genericFunctionType_typeParameters;
+    } else if (kind == LinkedNodeKind.genericTypeAlias) {
+      typeParameterList = node.genericTypeAlias_typeParameters;
+    } else if (kind == LinkedNodeKind.methodDeclaration) {
+      typeParameterList = node.methodDeclaration_typeParameters;
+    } else {
+      throw UnimplementedError('$kind');
+    }
+    return typeParameterList?.typeParameterList_typeParameters;
+  }
 }
diff --git a/pkg/analyzer/lib/src/summary2/linking_bundle_context.dart b/pkg/analyzer/lib/src/summary2/linking_bundle_context.dart
index 50b9b92..6a9fc44 100644
--- a/pkg/analyzer/lib/src/summary2/linking_bundle_context.dart
+++ b/pkg/analyzer/lib/src/summary2/linking_bundle_context.dart
@@ -1,4 +1,4 @@
-// Copyright (c) 2019, the Dart project authors.  Please see the AUTHORS file
+// Copyright (c) 2019, the Dart project authors. Please see the AUTHORS file
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
 
@@ -6,6 +6,7 @@
 import 'package:analyzer/dart/element/type.dart';
 import 'package:analyzer/src/dart/element/element.dart';
 import 'package:analyzer/src/dart/element/type.dart';
+import 'package:analyzer/src/generated/utilities_dart.dart';
 import 'package:analyzer/src/summary/format.dart';
 import 'package:analyzer/src/summary/idl.dart';
 import 'package:analyzer/src/summary2/reference.dart';
@@ -30,6 +31,7 @@
   LinkingBundleContext(this.dynamicReference);
 
   int indexOfReference(Reference reference) {
+    if (reference == null) return 0;
     if (reference.parent == null) return 0;
     if (reference.index != null) return reference.index;
 
@@ -56,7 +58,14 @@
     } else if (type is FunctionType) {
       return LinkedNodeTypeBuilder(
         kind: LinkedNodeTypeKind.function,
-        functionFormalParameters: _getReferences(type.parameters),
+        functionFormalParameters: type.parameters
+            .map((p) => LinkedNodeTypeFormalParameterBuilder(
+                  // ignore: deprecated_member_use_from_same_package
+                  kind: _formalParameterKind(p.parameterKind),
+                  name: p.name,
+                  type: writeType(p.type),
+                ))
+            .toList(),
         functionReturnType: writeType(type.returnType),
         functionTypeParameters: _getReferences(type.typeParameters),
       );
@@ -80,6 +89,16 @@
     }
   }
 
+  LinkedNodeFormalParameterKind _formalParameterKind(ParameterKind kind) {
+    if (kind == ParameterKind.NAMED) {
+      return LinkedNodeFormalParameterKind.optionalNamed;
+    }
+    if (kind == ParameterKind.POSITIONAL) {
+      return LinkedNodeFormalParameterKind.optionalPositional;
+    }
+    return LinkedNodeFormalParameterKind.required;
+  }
+
   int _getReferenceIndex(Element element) {
     if (element == null) return 0;
 
diff --git a/pkg/analyzer/lib/src/summary2/metadata_resolver.dart b/pkg/analyzer/lib/src/summary2/metadata_resolver.dart
index 2030086..6eb82be 100644
--- a/pkg/analyzer/lib/src/summary2/metadata_resolver.dart
+++ b/pkg/analyzer/lib/src/summary2/metadata_resolver.dart
@@ -5,6 +5,7 @@
 import 'package:analyzer/dart/ast/ast.dart';
 import 'package:analyzer/dart/ast/standard_ast_factory.dart';
 import 'package:analyzer/src/dart/element/element.dart';
+import 'package:analyzer/src/generated/resolver.dart';
 import 'package:analyzer/src/summary/format.dart';
 import 'package:analyzer/src/summary/idl.dart';
 import 'package:analyzer/src/summary2/ast_binary_reader.dart';
@@ -17,18 +18,22 @@
   AstResolver _astResolver;
 
   MetadataResolver(Linker linker, Reference libraryRef) {
-    _astResolver = AstResolver(linker, libraryRef);
+    var libraryElement = linker.elementFactory.elementOfReference(libraryRef);
+    var libraryScope = LibraryScope(libraryElement);
+    _astResolver = AstResolver(linker, libraryElement, libraryScope);
   }
 
   void resolve(UnitBuilder unit) {
+    var unitDirectives = unit.node.compilationUnit_directives;
+    for (var directive in unitDirectives) {
+      _annotatedNode(unit, directive);
+    }
+
     var unitDeclarations = unit.node.compilationUnit_declarations;
     for (LinkedNodeBuilder unitDeclaration in unitDeclarations) {
       var kind = unitDeclaration.kind;
       if (_isAnnotatedNode(kind)) {
-        _annotatedNode(
-          unit,
-          unitDeclaration,
-        );
+        _annotatedNode(unit, unitDeclaration);
       }
       if (kind == LinkedNodeKind.classDeclaration) {
         _class(unit, unitDeclaration);
@@ -63,7 +68,12 @@
       if (_isAnnotatedNode(kind)) {
         _annotatedNode(unit, classMember);
       }
-      if (kind == LinkedNodeKind.fieldDeclaration) {
+      if (kind == LinkedNodeKind.constructorDeclaration) {
+        _formalParameterList(
+          unit,
+          classMember.constructorDeclaration_parameters,
+        );
+      } else if (kind == LinkedNodeKind.fieldDeclaration) {
         _variables(
           unit,
           classMember,
@@ -116,7 +126,7 @@
       // Set some parent, so that resolver does not bail out.
       astFactory.libraryDirective(null, [ast], null, null, null);
 
-      var resolvedNode = _astResolver.resolve(unit, ast);
+      var resolvedNode = _astResolver.resolve(unit.context, ast);
       resolved[i] = resolvedNode;
     }
     return resolved;
diff --git a/pkg/analyzer/lib/src/summary2/reference.dart b/pkg/analyzer/lib/src/summary2/reference.dart
index c89239d..234ed5d 100644
--- a/pkg/analyzer/lib/src/summary2/reference.dart
+++ b/pkg/analyzer/lib/src/summary2/reference.dart
@@ -1,9 +1,10 @@
-// Copyright (c) 2019, the Dart project authors.  Please see the AUTHORS file
+// Copyright (c) 2019, the Dart project authors. Please see the AUTHORS file
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
 
 import 'package:analyzer/dart/element/element.dart';
 import 'package:analyzer/src/summary/idl.dart';
+import 'package:analyzer/src/summary2/scope.dart';
 
 /// Indirection between a name and the corresponding [Element].
 ///
@@ -42,16 +43,23 @@
 
   Map<String, Reference> _children;
 
+  /// If this reference is an import prefix, the scope of this prefix.
+  Scope prefixScope;
+
   Reference.root() : this._(null, '');
 
   Reference._(this.parent, this.name);
 
   bool get isClass => parent != null && parent.name == '@class';
 
+  bool get isDynamic => name == 'dynamic' && parent?.name == 'dart:core';
+
   bool get isEnum => parent != null && parent.name == '@enum';
 
   bool get isGenericTypeAlias => parent != null && parent.name == '@typeAlias';
 
+  bool get isPrefix => parent != null && parent.name == '@prefix';
+
   bool get isTypeParameter => parent != null && parent.name == '@typeParameter';
 
   int get numOfChildren => _children != null ? _children.length : 0;
diff --git a/pkg/analyzer/lib/src/summary2/reference_resolver.dart b/pkg/analyzer/lib/src/summary2/reference_resolver.dart
index f044c1b..c76cd0b 100644
--- a/pkg/analyzer/lib/src/summary2/reference_resolver.dart
+++ b/pkg/analyzer/lib/src/summary2/reference_resolver.dart
@@ -5,7 +5,6 @@
 import 'package:analyzer/src/summary/format.dart';
 import 'package:analyzer/src/summary/idl.dart';
 import 'package:analyzer/src/summary2/builder/source_library_builder.dart';
-import 'package:analyzer/src/summary2/declaration.dart';
 import 'package:analyzer/src/summary2/linking_bundle_context.dart';
 import 'package:analyzer/src/summary2/reference.dart';
 import 'package:analyzer/src/summary2/scope.dart';
@@ -21,6 +20,7 @@
 /// it later).
 class ReferenceResolver {
   final LinkingBundleContext linkingBundleContext;
+  final TypesToBuild typesToBuild;
   final UnitBuilder unit;
 
   /// TODO(scheglov) Update scope with local scopes (formal / type parameters).
@@ -30,6 +30,7 @@
 
   ReferenceResolver(
     this.linkingBundleContext,
+    this.typesToBuild,
     this.unit,
     this.scope,
     this.reference,
@@ -51,28 +52,18 @@
 
     var typeParameters = node.classOrMixinDeclaration_typeParameters;
     _withTypeParameters(typeParameters, () {
-      var extendsClause = node.classDeclaration_extendsClause;
-      if (extendsClause != null) {
-        _typeName(extendsClause.extendsClause_superclass);
-      }
+      _extendsClause(node.classDeclaration_extendsClause);
+      _withClause(node.classDeclaration_withClause);
+      _implementsClause(node.classOrMixinDeclaration_implementsClause);
 
-      _nodeList(
-        node.classDeclaration_withClause?.withClause_mixinTypes,
-      );
-
-      _nodeList(
-        node.classOrMixinDeclaration_implementsClause
-            ?.implementsClause_interfaces,
-      );
-
-      for (var field in node.classOrMixinDeclaration_members) {
-        if (field.kind != LinkedNodeKind.constructorDeclaration) {
-          _node(field);
+      for (var member in node.classOrMixinDeclaration_members) {
+        if (member.kind != LinkedNodeKind.constructorDeclaration) {
+          _node(member);
         }
       }
-      for (var field in node.classOrMixinDeclaration_members) {
-        if (field.kind == LinkedNodeKind.constructorDeclaration) {
-          _node(field);
+      for (var member in node.classOrMixinDeclaration_members) {
+        if (member.kind == LinkedNodeKind.constructorDeclaration) {
+          _node(member);
         }
       }
     });
@@ -86,18 +77,9 @@
 
     var typeParameters = node.classTypeAlias_typeParameters;
     _withTypeParameters(typeParameters, () {
-      var superclass = node.classTypeAlias_superclass;
-      if (superclass != null) {
-        _typeName(superclass);
-      }
-
-      _nodeList(
-        node.classTypeAlias_withClause?.withClause_mixinTypes,
-      );
-
-      _nodeList(
-        node.classTypeAlias_implementsClause?.implementsClause_interfaces,
-      );
+      _typeName(node.classTypeAlias_superclass);
+      _withClause(node.classTypeAlias_withClause);
+      _implementsClause(node.classTypeAlias_implementsClause);
     });
 
     reference = reference.parent.parent;
@@ -118,6 +100,14 @@
     _nodeList(node.enumDeclaration_constants);
   }
 
+  void _exportDirective(LinkedNodeBuilder node) {}
+
+  void _extendsClause(LinkedNodeBuilder node) {
+    if (node == null) return;
+
+    _typeName(node.extendsClause_superclass);
+  }
+
   void _fieldDeclaration(LinkedNodeBuilder node) {
     _node(node.fieldDeclaration_fields);
   }
@@ -126,13 +116,15 @@
     var typeNode = node.fieldFormalParameter_type;
     if (typeNode != null) {
       _node(typeNode);
-      node.fieldFormalParameter_type2 = _getTypeAnnotationType(typeNode);
     }
 
     var formalParameters = node.fieldFormalParameter_formalParameters;
     if (formalParameters != null) {
-      _node(formalParameters);
-      throw 'incomplete';
+      _formalParameters(formalParameters);
+    }
+
+    if (typeNode != null || formalParameters != null) {
+      typesToBuild.declarations.add(node);
     }
   }
 
@@ -152,8 +144,7 @@
       var returnType = node.functionDeclaration_returnType;
       if (returnType != null) {
         _node(returnType);
-        node.functionDeclaration_returnType2 =
-            _getTypeAnnotationType(returnType);
+        typesToBuild.declarations.add(node);
       } else {
         node.functionDeclaration_returnType2 = _dynamicType;
       }
@@ -180,7 +171,7 @@
       var returnType = node.functionTypeAlias_returnType;
       if (returnType != null) {
         _node(returnType);
-        node.functionTypeAlias_returnType2 = _getTypeAnnotationType(returnType);
+        typesToBuild.declarations.add(node);
       } else {
         node.functionTypeAlias_returnType2 = _dynamicType;
       }
@@ -191,6 +182,19 @@
     reference = reference.parent.parent;
   }
 
+  void _functionTypedFormalParameter(LinkedNodeBuilder node) {
+    var typeParameters = node.functionTypedFormalParameter_typeParameters;
+    _withTypeParameters(typeParameters, () {
+      var typeNode = node.functionTypedFormalParameter_returnType;
+      if (typeNode != null) {
+        _node(typeNode);
+      }
+
+      _formalParameters(node.functionTypedFormalParameter_formalParameters);
+      typesToBuild.declarations.add(node);
+    });
+  }
+
   void _genericFunctionType(LinkedNodeBuilder node) {
     reference = reference.getChild('@function');
 
@@ -202,13 +206,12 @@
       var returnType = node.genericFunctionType_returnType;
       if (returnType != null) {
         _node(returnType);
-        node.genericFunctionType_returnType2 =
-            _getTypeAnnotationType(returnType);
-      } else {
-        node.genericFunctionType_returnType2 = _dynamicType;
+        typesToBuild.declarations.add(node);
       }
 
-      _node(node.genericFunctionType_formalParameters);
+      _formalParameters(node.genericFunctionType_formalParameters);
+
+      typesToBuild.typeAnnotations.add(node);
     });
 
     reference = reference.parent.parent;
@@ -228,13 +231,10 @@
     reference = reference.parent.parent;
   }
 
-  LinkedNodeTypeBuilder _getTypeAnnotationType(LinkedNodeBuilder node) {
-    var kind = node.kind;
-    if (kind == LinkedNodeKind.typeName) {
-      return node.typeName_type;
-    } else {
-      throw UnimplementedError('$kind');
-    }
+  void _implementsClause(LinkedNodeBuilder node) {
+    if (node == null) return;
+
+    _typeNameList(node.implementsClause_interfaces);
   }
 
   void _importDirective(LinkedNodeBuilder node) {}
@@ -250,7 +250,7 @@
       var returnType = node.methodDeclaration_returnType;
       if (returnType != null) {
         _node(returnType);
-        node.methodDeclaration_returnType2 = _getTypeAnnotationType(returnType);
+        typesToBuild.declarations.add(node);
       }
 
       _node(node.methodDeclaration_formalParameters);
@@ -259,6 +259,20 @@
     reference = reference.parent.parent;
   }
 
+  void _mixinDeclaration(LinkedNodeBuilder node) {
+    var name = unit.context.getUnitMemberName(node);
+    reference = reference.getChild('@class').getChild(name);
+
+    var typeParameters = node.classOrMixinDeclaration_typeParameters;
+    _withTypeParameters(typeParameters, () {
+      _onClause(node.mixinDeclaration_onClause);
+      _implementsClause(node.classOrMixinDeclaration_implementsClause);
+      _nodeList(node.classOrMixinDeclaration_members);
+    });
+
+    reference = reference.parent.parent;
+  }
+
   void _node(LinkedNodeBuilder node) {
     if (node == null) return;
 
@@ -276,6 +290,8 @@
       _enumDeclaration(node);
     } else if (node.kind == LinkedNodeKind.enumConstantDeclaration) {
       _enumConstantDeclaration(node);
+    } else if (node.kind == LinkedNodeKind.exportDirective) {
+      _exportDirective(node);
     } else if (node.kind == LinkedNodeKind.fieldDeclaration) {
       _fieldDeclaration(node);
     } else if (node.kind == LinkedNodeKind.fieldFormalParameter) {
@@ -288,6 +304,8 @@
       _functionExpression(node);
     } else if (node.kind == LinkedNodeKind.functionTypeAlias) {
       _functionTypeAlias(node);
+    } else if (node.kind == LinkedNodeKind.functionTypedFormalParameter) {
+      _functionTypedFormalParameter(node);
     } else if (node.kind == LinkedNodeKind.genericFunctionType) {
       _genericFunctionType(node);
     } else if (node.kind == LinkedNodeKind.genericTypeAlias) {
@@ -298,6 +316,12 @@
       _libraryDirective(node);
     } else if (node.kind == LinkedNodeKind.methodDeclaration) {
       _methodDeclaration(node);
+    } else if (node.kind == LinkedNodeKind.mixinDeclaration) {
+      _mixinDeclaration(node);
+    } else if (node.kind == LinkedNodeKind.partDirective) {
+      _partDirective(node);
+    } else if (node.kind == LinkedNodeKind.partOfDirective) {
+      _partOfDirective(node);
     } else if (node.kind == LinkedNodeKind.simpleFormalParameter) {
       _simpleFormalParameter(node);
     } else if (node.kind == LinkedNodeKind.topLevelVariableDeclaration) {
@@ -327,11 +351,26 @@
     }
   }
 
+  void _onClause(LinkedNodeBuilder node) {
+    if (node == null) return;
+
+    _typeNameList(node.onClause_superclassConstraints);
+  }
+
+  void _partDirective(LinkedNodeBuilder node) {}
+
+  void _partOfDirective(LinkedNodeBuilder node) {}
+
+  void _setSimpleElement(LinkedNodeBuilder identifier, Reference reference) {
+    var referenceIndex = linkingBundleContext.indexOfReference(reference);
+    identifier.simpleIdentifier_element = referenceIndex;
+  }
+
   void _simpleFormalParameter(LinkedNodeBuilder node) {
     var typeNode = node.simpleFormalParameter_type;
     if (typeNode != null) {
       _node(typeNode);
-      node.simpleFormalParameter_type2 = _getTypeAnnotationType(typeNode);
+      typesToBuild.declarations.add(node);
     } else {
       // TODO(scheglov) might be inferred
       node.simpleFormalParameter_type2 = _dynamicType;
@@ -358,6 +397,8 @@
     if (node == null) return;
 
     var identifier = node.typeName_name;
+    Reference reference;
+
     if (identifier.kind == LinkedNodeKind.simpleIdentifier) {
       var name = unit.context.getSimpleName(identifier);
 
@@ -368,49 +409,46 @@
         return;
       }
 
-      var declaration = scope.lookup(name);
-      if (declaration == null) {
+      reference = scope.lookup(name);
+    } else {
+      var prefixNode = identifier.prefixedIdentifier_prefix;
+      var prefixName = unit.context.getSimpleName(prefixNode);
+      var prefixReference = scope.lookup(prefixName);
+      _setSimpleElement(prefixNode, prefixReference);
+
+      identifier = identifier.prefixedIdentifier_identifier;
+      var name = unit.context.getSimpleName(identifier);
+
+      if (prefixReference != null && prefixReference.isPrefix) {
+        var prefixScope = prefixReference.prefixScope;
+        reference = prefixScope.lookup(name);
+      } else {
         identifier.simpleIdentifier_element = 0;
         node.typeName_type = _dynamicType;
         return;
       }
+    }
 
-      var reference = declaration.reference;
-      var referenceIndex = linkingBundleContext.indexOfReference(reference);
-      identifier.simpleIdentifier_element = referenceIndex;
+    if (reference == null) {
+      identifier.simpleIdentifier_element = 0;
+      node.typeName_type = _dynamicType;
+      return;
+    }
 
-      var typeArguments = const <LinkedNodeTypeBuilder>[];
-      var typeArgumentList = node.typeName_typeArguments;
-      if (typeArgumentList != null) {
-        _node(typeArgumentList);
-        typeArguments = typeArgumentList.typeArgumentList_arguments
-            .map((node) => _getTypeAnnotationType(node))
-            .toList();
-      }
+    _setSimpleElement(identifier, reference);
 
-      if (reference.isClass) {
-        node.typeName_type = LinkedNodeTypeBuilder(
-          kind: LinkedNodeTypeKind.interface,
-          interfaceClass: referenceIndex,
-          interfaceTypeArguments: typeArguments,
-        );
-      } else if (reference.isEnum) {
-        node.typeName_type = LinkedNodeTypeBuilder(
-          kind: LinkedNodeTypeKind.interface,
-          interfaceClass: referenceIndex,
-        );
-      } else if (reference.isTypeParameter) {
-        node.typeName_type = LinkedNodeTypeBuilder(
-          kind: LinkedNodeTypeKind.typeParameter,
-          typeParameterParameter: referenceIndex,
-        );
-      } else {
-        // TODO(scheglov) set Object? keep unresolved?
-        throw UnimplementedError();
-      }
-    } else {
-      // TODO(scheglov) implement
-      throw UnimplementedError();
+    var typeArgumentList = node.typeName_typeArguments;
+    if (typeArgumentList != null) {
+      _node(typeArgumentList);
+    }
+
+    typesToBuild.typeAnnotations.add(node);
+  }
+
+  void _typeNameList(List<LinkedNode> nodeList) {
+    for (var i = 0; i < nodeList.length; ++i) {
+      var node = nodeList[i];
+      _typeName(node);
     }
   }
 
@@ -429,12 +467,16 @@
     var typeNode = node.variableDeclarationList_type;
     if (typeNode != null) {
       _node(typeNode);
-      for (var field in node.variableDeclarationList_variables) {
-        field.variableDeclaration_type2 = _getTypeAnnotationType(typeNode);
-      }
+      typesToBuild.declarations.add(node);
     }
   }
 
+  void _withClause(LinkedNodeBuilder node) {
+    if (node == null) return;
+
+    _typeNameList(node.withClause_mixinTypes);
+  }
+
   /// Enter the type parameters scope, visit them, and run [f].
   void _withTypeParameters(LinkedNode typeParameterList, void f()) {
     if (typeParameterList == null) {
@@ -450,7 +492,7 @@
       var name = unit.context.getSimpleName(typeParameter.typeParameter_name);
       var reference = containerRef.getChild(name);
       reference.node = typeParameter;
-      scope.declare(name, Declaration(name, reference));
+      scope.declare(name, reference);
     }
 
     _node(typeParameterList);
@@ -461,3 +503,27 @@
     }
   }
 }
+
+/// Type annotations and declarations to build types for.
+///
+/// Not all types can be build during reference resolution phase.
+/// For example `A` means `A<num>` if `class A<T extends num>`, but we don't
+/// know this until we resolved `A` declaration, and we might have not yet.
+/// So, we remember [LinkedNodeKind.typeName] nodes to resolve them later.
+class TypesToBuild {
+  /// Nodes with [LinkedNodeKind.typeName] (with type arguments, and without
+  /// them), and [LinkedNodeKind.genericFunctionType].  These nodes will be
+  /// resolved by [ReferenceResolver], so that they have their references set,
+  /// but their types will not be set yet.
+  ///
+  /// Types arguments, return types, and types of formal parameters must be
+  /// before the types that use them in this list.
+  final List<LinkedNodeBuilder> typeAnnotations = [];
+
+  /// Nodes with type annotations, where we want not just resolve these types
+  /// annotations, but also set additional types.  For example instance method
+  /// return types might be specified, and then the method has the specified
+  /// return type.  But if the return type is not specified explicitly, the
+  /// method still might have a return type, inferred from a superclass.
+  final List<LinkedNodeBuilder> declarations = [];
+}
diff --git a/pkg/analyzer/lib/src/summary2/scope.dart b/pkg/analyzer/lib/src/summary2/scope.dart
index 30f7419..2af6ace 100644
--- a/pkg/analyzer/lib/src/summary2/scope.dart
+++ b/pkg/analyzer/lib/src/summary2/scope.dart
@@ -2,27 +2,27 @@
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
 
-import 'package:analyzer/src/summary2/declaration.dart';
+import 'package:analyzer/src/summary2/reference.dart';
 
 class Scope {
   final Scope parent;
-  final Map<String, Declaration> map;
+  final Map<String, Reference> map;
 
   Scope(this.parent, this.map);
 
-  Scope.top() : this(null, <String, Declaration>{});
+  Scope.top() : this(null, <String, Reference>{});
 
-  void declare(String name, Declaration declaration) {
-    map[name] = declaration;
+  void declare(String name, Reference reference) {
+    map[name] = reference;
   }
 
-  void forEach(f(String name, Declaration declaration)) {
+  void forEach(f(String name, Reference reference)) {
     map.forEach(f);
   }
 
-  Declaration lookup(String name) {
-    var declaration = map[name];
-    if (declaration != null) return declaration;
+  Reference lookup(String name) {
+    var reference = map[name];
+    if (reference != null) return reference;
 
     if (parent == null) return null;
     return parent.lookup(name);
diff --git a/pkg/analyzer/lib/src/summary2/tokens_context.dart b/pkg/analyzer/lib/src/summary2/tokens_context.dart
index 36b9d5a..3b68f79 100644
--- a/pkg/analyzer/lib/src/summary2/tokens_context.dart
+++ b/pkg/analyzer/lib/src/summary2/tokens_context.dart
@@ -56,6 +56,21 @@
     return _tokens.lexeme[index];
   }
 
+  void linkTokens(Token from, Token to) {
+    var fromIndex = _tokenToIndex[from];
+    var toIndex = _tokenToIndex[to];
+    Token prevToken = null;
+    for (var index = fromIndex; index <= toIndex && index != 0;) {
+      var token = _indexToToken[index];
+      token ??= tokenOfIndex(index);
+
+      prevToken?.next = token;
+
+      prevToken = token;
+      index = _tokens.next[index];
+    }
+  }
+
   int offset(int index) {
     return _tokens.offset[index];
   }
@@ -70,33 +85,39 @@
         case UnlinkedTokenKind.nothing:
           return null;
         case UnlinkedTokenKind.comment:
-          return CommentToken(
+          token = CommentToken(
             _binaryToAstTokenType(_tokens.type[index]),
             _tokens.lexeme[index],
             _tokens.offset[index],
           );
+          break;
         case UnlinkedTokenKind.keyword:
-          return KeywordToken(
+          token = KeywordToken(
             _binaryToAstTokenType(_tokens.type[index]),
             _tokens.offset[index],
             _getCommentToken(_tokens.precedingComment[index]),
           );
+          break;
         case UnlinkedTokenKind.simple:
-          return SimpleToken(
+          token = SimpleToken(
             _binaryToAstTokenType(_tokens.type[index]),
             _tokens.offset[index],
             _getCommentToken(_tokens.precedingComment[index]),
           );
+          break;
         case UnlinkedTokenKind.string:
-          return StringToken(
+          token = StringToken(
             _binaryToAstTokenType(_tokens.type[index]),
             _tokens.lexeme[index],
             _tokens.offset[index],
             _getCommentToken(_tokens.precedingComment[index]),
           );
+          break;
         default:
           throw UnimplementedError('Token kind: $kind');
       }
+      _indexToToken[index] = token;
+      _tokenToIndex[token] = index;
     }
     return token;
   }
diff --git a/pkg/analyzer/lib/src/summary2/tokens_writer.dart b/pkg/analyzer/lib/src/summary2/tokens_writer.dart
index 3a9e989..59dae23 100644
--- a/pkg/analyzer/lib/src/summary2/tokens_writer.dart
+++ b/pkg/analyzer/lib/src/summary2/tokens_writer.dart
@@ -1,4 +1,4 @@
-// Copyright (c) 2019, the Dart project authors.  Please see the AUTHORS file
+// Copyright (c) 2019, the Dart project authors. Please see the AUTHORS file
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
 
diff --git a/pkg/analyzer/lib/src/summary2/top_level_inference.dart b/pkg/analyzer/lib/src/summary2/top_level_inference.dart
index def0f8d..4779752 100644
--- a/pkg/analyzer/lib/src/summary2/top_level_inference.dart
+++ b/pkg/analyzer/lib/src/summary2/top_level_inference.dart
@@ -3,13 +3,16 @@
 // BSD-style license that can be found in the LICENSE file.
 
 import 'package:analyzer/dart/ast/standard_ast_factory.dart';
+import 'package:analyzer/dart/element/element.dart';
 import 'package:analyzer/dart/element/type.dart';
+import 'package:analyzer/src/dart/element/element.dart';
 import 'package:analyzer/src/dart/element/type.dart';
+import 'package:analyzer/src/dart/resolver/scope.dart';
 import 'package:analyzer/src/summary/format.dart';
 import 'package:analyzer/src/summary/idl.dart';
 import 'package:analyzer/src/summary2/ast_resolver.dart';
-import 'package:analyzer/src/summary2/builder/source_library_builder.dart';
 import 'package:analyzer/src/summary2/link.dart';
+import 'package:analyzer/src/summary2/linked_unit_context.dart';
 import 'package:analyzer/src/summary2/reference.dart';
 
 DartType _dynamicIfNull(DartType type) {
@@ -19,108 +22,121 @@
   return type;
 }
 
+/// TODO(scheglov) This is not a valid implementation of top-level inference.
+/// See https://bit.ly/2HYfAKg
+///
+/// In general inference of constructor field formal parameters should be
+/// interleaved with inference of fields. There are resynthesis tests that
+/// fail because of this limitation.
 class TopLevelInference {
   final Linker linker;
-  final Reference libraryRef;
-  final UnitBuilder unit;
+  LibraryElementImpl _libraryElement;
 
-  TopLevelInference(this.linker, this.libraryRef, this.unit);
+  Scope _libraryScope;
+  Scope _nameScope;
+
+  LinkedUnitContext _linkedContext;
+  CompilationUnitElementImpl unitElement;
+
+  TopLevelInference(this.linker, Reference libraryRef) {
+    _libraryElement = linker.elementFactory.elementOfReference(libraryRef);
+    _libraryScope = LibraryScope(_libraryElement);
+    _nameScope = _libraryScope;
+  }
 
   void infer() {
+    _setOmittedReturnTypes();
     _inferFieldsTemporary();
     _inferConstructorFieldFormals();
   }
 
   void _inferConstructorFieldFormals() {
-    _visitClassList((unitDeclaration) {
-      var members = unitDeclaration.classOrMixinDeclaration_members;
+    for (CompilationUnitElementImpl unit in _libraryElement.units) {
+      this.unitElement = unit;
+      _linkedContext = unit.linkedContext;
 
-      var fields = <String, LinkedNodeType>{};
-      _visitClassFields(unitDeclaration, (field) {
-        var name = unit.context.getVariableName(field);
-        var type = field.variableDeclaration_type2;
-        if (type == null) {
-          throw StateError('Field $name should have a type.');
+      for (var class_ in unit.types) {
+        var fields = <String, LinkedNodeType>{};
+        for (FieldElementImpl field in class_.fields) {
+          if (field.isSynthetic) continue;
+
+          var name = field.name;
+          var type = field.linkedNode.variableDeclaration_type2;
+          if (type == null) {
+            throw StateError('Field $name should have a type.');
+          }
+          fields[name] ??= type;
         }
-        fields[name] = type;
-      });
 
-      for (var member in members) {
-        if (member.kind == LinkedNodeKind.constructorDeclaration) {
-          for (var parameter in member.constructorDeclaration_parameters
-              .formalParameterList_parameters) {
-            if (parameter.kind == LinkedNodeKind.fieldFormalParameter &&
-                parameter.fieldFormalParameter_type2 == null) {
-              var name = unit.context.getSimpleName(
-                parameter.normalFormalParameter_identifier,
-              );
-              var type = fields[name];
-              if (type == null) {
-                type = LinkedNodeTypeBuilder(
-                  kind: LinkedNodeTypeKind.dynamic_,
-                );
+        for (ConstructorElementImpl constructor in class_.constructors) {
+          for (ParameterElementImpl parameter in constructor.parameters) {
+            if (parameter is FieldFormalParameterElement) {
+              LinkedNodeBuilder parameterNode = parameter.linkedNode;
+              if (parameterNode.kind == LinkedNodeKind.defaultFormalParameter) {
+                parameterNode = parameterNode.defaultFormalParameter_parameter;
               }
-              parameter.fieldFormalParameter_type2 = type;
-            }
-          }
-        }
-      }
-    });
-  }
 
-  void _inferFieldsTemporary() {
-    var unitDeclarations = unit.node.compilationUnit_declarations;
-    for (LinkedNodeBuilder unitDeclaration in unitDeclarations) {
-      if (unitDeclaration.kind == LinkedNodeKind.classDeclaration) {
-        _visitClassFields(unitDeclaration, (field) {
-          var name = unit.context.getVariableName(field);
-          // TODO(scheglov) Use inheritance
-          if (field.variableDeclaration_type2 == null) {
-            field.variableDeclaration_type2 = LinkedNodeTypeBuilder(
-              kind: LinkedNodeTypeKind.dynamic_,
-            );
-          }
-        });
-
-        var members = unitDeclaration.classOrMixinDeclaration_members;
-        for (var member in members) {
-          if (member.kind == LinkedNodeKind.methodDeclaration) {
-            // TODO(scheglov) Use inheritance
-            if (member.methodDeclaration_returnType2 == null) {
-              if (unit.context.isSetter(member)) {
-                member.methodDeclaration_returnType2 = LinkedNodeTypeBuilder(
-                  kind: LinkedNodeTypeKind.void_,
-                );
-              } else {
-                member.methodDeclaration_returnType2 = LinkedNodeTypeBuilder(
-                  kind: LinkedNodeTypeKind.dynamic_,
-                );
+              if (parameterNode.fieldFormalParameter_type2 == null) {
+                var name = parameter.name;
+                var type = fields[name];
+                if (type == null) {
+                  type = LinkedNodeTypeBuilder(
+                    kind: LinkedNodeTypeKind.dynamic_,
+                  );
+                }
+                parameterNode.fieldFormalParameter_type2 = type;
               }
             }
           }
         }
-      } else if (unitDeclaration.kind == LinkedNodeKind.functionDeclaration) {
-        if (unit.context.isSetter(unitDeclaration)) {
-          unitDeclaration.functionDeclaration_returnType2 =
-              LinkedNodeTypeBuilder(
-            kind: LinkedNodeTypeKind.void_,
-          );
-        }
-      } else if (unitDeclaration.kind ==
-          LinkedNodeKind.topLevelVariableDeclaration) {
-        var variableList =
-            unitDeclaration.topLevelVariableDeclaration_variableList;
-        for (var variable in variableList.variableDeclarationList_variables) {
-          // TODO(scheglov) infer in the correct order
-          if (variable.variableDeclaration_type2 == null ||
-              unit.context.isConst(variable)) {
-            _inferVariableTypeFromInitializerTemporary(variable);
-          }
-        }
       }
     }
   }
 
+  void _inferFieldsTemporary() {
+    for (CompilationUnitElementImpl unit in _libraryElement.units) {
+      this.unitElement = unit;
+      _linkedContext = unit.linkedContext;
+
+      for (var class_ in unit.types) {
+        _inferFieldsTemporaryClass(class_);
+      }
+
+      for (var mixin_ in unit.mixins) {
+        _inferFieldsTemporaryClass(mixin_);
+      }
+
+      for (TopLevelVariableElementImpl variable in unit.topLevelVariables) {
+        if (variable.isSynthetic) continue;
+        LinkedNodeBuilder variableNode = variable.linkedNode;
+        if (variableNode.variableDeclaration_type2 == null ||
+            _linkedContext.isConst(variableNode)) {
+          _inferVariableTypeFromInitializerTemporary(variableNode);
+        }
+      }
+    }
+  }
+
+  void _inferFieldsTemporaryClass(ClassElement class_) {
+    var prevScope = _nameScope;
+
+    _nameScope = TypeParameterScope(_nameScope, class_);
+    _nameScope = ClassScope(_nameScope, class_);
+
+    for (FieldElementImpl field in class_.fields) {
+      if (field.isSynthetic) continue;
+      var fieldNode = field.linkedNode;
+
+      // TODO(scheglov) Use inheritance
+      // TODO(scheglov) infer in the correct order
+      if (fieldNode.variableDeclaration_type2 == null) {
+        _inferVariableTypeFromInitializerTemporary(fieldNode);
+      }
+    }
+
+    _nameScope = prevScope;
+  }
+
   void _inferVariableTypeFromInitializerTemporary(LinkedNodeBuilder node) {
     var unresolvedNode = node.variableDeclaration_initializer;
 
@@ -131,13 +147,11 @@
       return;
     }
 
-    var expression = unit.context.readInitializer(node);
+    var expression = _linkedContext.readInitializer(unitElement, node);
     astFactory.expressionFunctionBody(null, null, expression, null);
 
-    // TODO(scheglov) can be shared for the whole library
-    var astResolver = AstResolver(linker, libraryRef);
-
-    var resolvedNode = astResolver.resolve(unit, expression);
+    var astResolver = AstResolver(linker, _libraryElement, _nameScope);
+    var resolvedNode = astResolver.resolve(_linkedContext, expression);
     node.variableDeclaration_initializer = resolvedNode;
 
     if (node.variableDeclaration_type2 == null) {
@@ -151,25 +165,66 @@
     }
   }
 
-  void _visitClassFields(
-      LinkedNode class_, void Function(LinkedNodeBuilder) f) {
-    var members = class_.classOrMixinDeclaration_members;
+  void _setOmittedReturnTypes() {
+    for (CompilationUnitElementImpl unit in _libraryElement.units) {
+      this.unitElement = unit;
+      _linkedContext = unit.linkedContext;
 
-    for (var member in members) {
-      if (member.kind == LinkedNodeKind.fieldDeclaration) {
-        var variableList = member.fieldDeclaration_fields;
-        for (var field in variableList.variableDeclarationList_variables) {
-          f(field);
+      for (var class_ in unit.types) {
+        _setOmittedReturnTypesClass(class_);
+      }
+
+      for (var mixin_ in unit.mixins) {
+        _setOmittedReturnTypesClass(mixin_);
+      }
+
+      for (FunctionElementImpl function in unit.functions) {
+        LinkedNodeBuilder functionNode = function.linkedNode;
+        if (functionNode.functionDeclaration_returnType == null) {
+          functionNode.functionDeclaration_returnType2 = LinkedNodeTypeBuilder(
+            kind: LinkedNodeTypeKind.dynamic_,
+          );
+        }
+      }
+
+      for (PropertyAccessorElementImpl accessor in unit.accessors) {
+        if (accessor.isSynthetic) continue;
+        if (accessor.isSetter) {
+          LinkedNodeBuilder node = accessor.linkedNode;
+          if (node.functionDeclaration_returnType == null) {
+            node.functionDeclaration_returnType2 = LinkedNodeTypeBuilder(
+              kind: LinkedNodeTypeKind.void_,
+            );
+          }
         }
       }
     }
   }
 
-  void _visitClassList(void Function(LinkedNodeBuilder) f) {
-    var unitDeclarations = unit.node.compilationUnit_declarations;
-    for (LinkedNodeBuilder unitDeclaration in unitDeclarations) {
-      if (unitDeclaration.kind == LinkedNodeKind.classDeclaration) {
-        f(unitDeclaration);
+  void _setOmittedReturnTypesClass(ClassElement class_) {
+    for (MethodElementImpl method in class_.methods) {
+      LinkedNodeBuilder methodNode = method.linkedNode;
+      if (methodNode.methodDeclaration_returnType == null) {
+        methodNode.methodDeclaration_returnType2 = LinkedNodeTypeBuilder(
+          kind: LinkedNodeTypeKind.dynamic_,
+        );
+      }
+    }
+
+    for (PropertyAccessorElementImpl accessor in class_.accessors) {
+      if (accessor.isSynthetic) continue;
+
+      LinkedNodeBuilder accessorNode = accessor.linkedNode;
+      if (accessorNode.methodDeclaration_returnType != null) continue;
+
+      if (accessor.isSetter) {
+        accessorNode.methodDeclaration_returnType2 = LinkedNodeTypeBuilder(
+          kind: LinkedNodeTypeKind.void_,
+        );
+      } else {
+        accessorNode.methodDeclaration_returnType2 = LinkedNodeTypeBuilder(
+          kind: LinkedNodeTypeKind.dynamic_,
+        );
       }
     }
   }
diff --git a/pkg/analyzer/lib/src/summary2/type_builder.dart b/pkg/analyzer/lib/src/summary2/type_builder.dart
new file mode 100644
index 0000000..9423d65
--- /dev/null
+++ b/pkg/analyzer/lib/src/summary2/type_builder.dart
@@ -0,0 +1,226 @@
+// Copyright (c) 2019, the Dart project authors. Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+import 'package:analyzer/src/summary/format.dart';
+import 'package:analyzer/src/summary/idl.dart';
+import 'package:analyzer/src/summary2/linked_bundle_context.dart';
+import 'package:analyzer/src/summary2/linked_unit_context.dart';
+import 'package:analyzer/src/summary2/reference.dart';
+import 'package:analyzer/src/summary2/reference_resolver.dart';
+
+/// Build types in a [TypesToBuild].
+class TypeBuilder {
+  final LinkedBundleContext bundleContext;
+
+  TypeBuilder(this.bundleContext);
+
+  LinkedNodeTypeBuilder get _dynamicType {
+    return LinkedNodeTypeBuilder(
+      kind: LinkedNodeTypeKind.dynamic_,
+    );
+  }
+
+  void build(TypesToBuild typesToBuild) {
+    for (var node in typesToBuild.typeAnnotations) {
+      var kind = node.kind;
+      if (kind == LinkedNodeKind.genericFunctionType) {
+        _buildGenericFunctionType(node);
+      } else if (kind == LinkedNodeKind.typeName) {
+        _buildTypeName(node);
+      } else {
+        throw StateError('$kind');
+      }
+    }
+    for (var node in typesToBuild.declarations) {
+      _setTypesForDeclaration(node);
+    }
+  }
+
+  LinkedNodeTypeBuilder _buildFunctionType(
+    LinkedNode returnTypeNode,
+    LinkedNode parameterList,
+  ) {
+    var returnType = _getType(returnTypeNode);
+
+    var formalParameters = <LinkedNodeTypeFormalParameterBuilder>[];
+    for (var parameter in parameterList.formalParameterList_parameters) {
+      formalParameters.add(LinkedNodeTypeFormalParameterBuilder(
+        kind: parameter.formalParameter_kind,
+        type: _getFormalParameterType(parameter),
+      ));
+    }
+
+    return LinkedNodeTypeBuilder(
+      kind: LinkedNodeTypeKind.function,
+      functionFormalParameters: formalParameters,
+      functionReturnType: returnType,
+    );
+  }
+
+  void _buildGenericFunctionType(LinkedNodeBuilder node) {
+    // TODO(scheglov) Type parameters?
+    node.genericFunctionType_type = _buildFunctionType(
+      node.genericFunctionType_returnType,
+      node.genericFunctionType_formalParameters,
+    );
+  }
+
+  void _buildTypeName(LinkedNodeBuilder node) {
+    var referenceIndex = _typeNameElementIndex(node.typeName_name);
+    var reference = bundleContext.referenceOfIndex(referenceIndex);
+
+    List<LinkedNodeTypeBuilder> typeArguments;
+    var typeArgumentList = node.typeName_typeArguments;
+    if (typeArgumentList != null) {
+      typeArguments = typeArgumentList.typeArgumentList_arguments
+          .map((node) => _getType(node))
+          .toList();
+    }
+
+    if (reference.isClass) {
+      // TODO(scheglov) Use instantiate to bounds.
+      var typeParametersLength = _typeParametersLength(reference);
+      if (typeArguments == null ||
+          typeArguments.length != typeParametersLength) {
+        typeArguments = List<LinkedNodeTypeBuilder>.filled(
+          typeParametersLength,
+          _dynamicType,
+        );
+      }
+      node.typeName_type = LinkedNodeTypeBuilder(
+        kind: LinkedNodeTypeKind.interface,
+        interfaceClass: referenceIndex,
+        interfaceTypeArguments: typeArguments,
+      );
+    } else if (reference.isDynamic) {
+      node.typeName_type = LinkedNodeTypeBuilder(
+        kind: LinkedNodeTypeKind.dynamic_,
+      );
+    } else if (reference.isGenericTypeAlias) {
+      // TODO(scheglov) Use instantiate to bounds.
+      var typeParametersLength = _typeParametersLength(reference);
+      if (typeArguments == null ||
+          typeArguments.length != typeParametersLength) {
+        typeArguments = List<LinkedNodeTypeBuilder>.filled(
+          typeParametersLength,
+          _dynamicType,
+        );
+      }
+      node.typeName_type = LinkedNodeTypeBuilder(
+        kind: LinkedNodeTypeKind.genericTypeAlias,
+        genericTypeAliasReference: referenceIndex,
+        genericTypeAliasTypeArguments: typeArguments,
+      );
+    } else if (reference.isEnum) {
+      node.typeName_type = LinkedNodeTypeBuilder(
+        kind: LinkedNodeTypeKind.interface,
+        interfaceClass: referenceIndex,
+      );
+    } else if (reference.isTypeParameter) {
+      node.typeName_type = LinkedNodeTypeBuilder(
+        kind: LinkedNodeTypeKind.typeParameter,
+        typeParameterParameter: referenceIndex,
+      );
+    } else {
+      node.typeName_type = _dynamicType;
+    }
+  }
+
+  void _fieldFormalParameter(LinkedNodeBuilder node) {
+    var parameterList = node.fieldFormalParameter_formalParameters;
+    if (parameterList != null) {
+      node.fieldFormalParameter_type2 = _buildFunctionType(
+        node.fieldFormalParameter_type,
+        parameterList,
+      );
+    } else {
+      var type = _getType(node.fieldFormalParameter_type);
+      node.fieldFormalParameter_type2 = type;
+    }
+  }
+
+  void _functionTypedFormalParameter(LinkedNodeBuilder node) {
+    node.functionTypedFormalParameter_type2 = _buildFunctionType(
+      node.functionTypedFormalParameter_returnType,
+      node.functionTypedFormalParameter_formalParameters,
+    );
+  }
+
+  LinkedNodeTypeBuilder _getFormalParameterType(LinkedNode node) {
+    var kind = node.kind;
+    if (kind == LinkedNodeKind.defaultFormalParameter) {
+      return _getFormalParameterType(node.defaultFormalParameter_parameter);
+    }
+    if (kind == LinkedNodeKind.functionTypedFormalParameter) {
+      return node.functionTypedFormalParameter_type2;
+    }
+    if (kind == LinkedNodeKind.simpleFormalParameter) {
+      return _getType(node.simpleFormalParameter_type);
+    }
+    throw UnimplementedError('$kind');
+  }
+
+  LinkedNodeTypeBuilder _getType(LinkedNodeBuilder node) {
+    if (node == null) return _dynamicType;
+
+    var kind = node.kind;
+    if (kind == LinkedNodeKind.genericFunctionType) {
+      return node.genericFunctionType_type;
+    } else if (kind == LinkedNodeKind.typeName) {
+      return node.typeName_type;
+    } else {
+      throw UnimplementedError('$kind');
+    }
+  }
+
+  void _setTypesForDeclaration(LinkedNodeBuilder node) {
+    var kind = node.kind;
+    if (kind == LinkedNodeKind.fieldFormalParameter) {
+      _fieldFormalParameter(node);
+    } else if (kind == LinkedNodeKind.functionDeclaration) {
+      node.functionDeclaration_returnType2 = _getType(
+        node.functionDeclaration_returnType,
+      );
+    } else if (kind == LinkedNodeKind.functionTypeAlias) {
+      node.functionTypeAlias_returnType2 = _getType(
+        node.functionTypeAlias_returnType,
+      );
+    } else if (kind == LinkedNodeKind.functionTypedFormalParameter) {
+      _functionTypedFormalParameter(node);
+    } else if (kind == LinkedNodeKind.genericFunctionType) {
+      node.genericFunctionType_returnType2 = _getType(
+        node.genericFunctionType_returnType,
+      );
+    } else if (kind == LinkedNodeKind.methodDeclaration) {
+      node.methodDeclaration_returnType2 = _getType(
+        node.methodDeclaration_returnType,
+      );
+    } else if (kind == LinkedNodeKind.simpleFormalParameter) {
+      node.simpleFormalParameter_type2 = _getType(
+        node.simpleFormalParameter_type,
+      );
+    } else if (kind == LinkedNodeKind.variableDeclarationList) {
+      var typeNode = node.variableDeclarationList_type;
+      for (var variable in node.variableDeclarationList_variables) {
+        variable.variableDeclaration_type2 = _getType(typeNode);
+      }
+    } else {
+      throw UnimplementedError('$kind');
+    }
+  }
+
+  int _typeParametersLength(Reference reference) {
+    var node = bundleContext.elementFactory.nodeOfReference(reference);
+    return LinkedUnitContext.getTypeParameters(node)?.length ?? 0;
+  }
+
+  static int _typeNameElementIndex(LinkedNode name) {
+    if (name.kind == LinkedNodeKind.simpleIdentifier) {
+      return name.simpleIdentifier_element;
+    } else {
+      var identifier = name.prefixedIdentifier_identifier;
+      return identifier.simpleIdentifier_element;
+    }
+  }
+}
diff --git a/pkg/analyzer/lib/src/task/api/dart.dart b/pkg/analyzer/lib/src/task/api/dart.dart
index 82f6bfc..9064e25 100644
--- a/pkg/analyzer/lib/src/task/api/dart.dart
+++ b/pkg/analyzer/lib/src/task/api/dart.dart
@@ -1,4 +1,4 @@
-// Copyright (c) 2015, the Dart project authors.  Please see the AUTHORS file
+// Copyright (c) 2015, the Dart project authors. Please see the AUTHORS file
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
 
diff --git a/pkg/analyzer/lib/src/task/api/general.dart b/pkg/analyzer/lib/src/task/api/general.dart
index 2f7ab11..d884116 100644
--- a/pkg/analyzer/lib/src/task/api/general.dart
+++ b/pkg/analyzer/lib/src/task/api/general.dart
@@ -1,4 +1,4 @@
-// Copyright (c) 2015, the Dart project authors.  Please see the AUTHORS file
+// Copyright (c) 2015, the Dart project authors. Please see the AUTHORS file
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
 
diff --git a/pkg/analyzer/lib/src/task/api/model.dart b/pkg/analyzer/lib/src/task/api/model.dart
index fe0edef..2d13057 100644
--- a/pkg/analyzer/lib/src/task/api/model.dart
+++ b/pkg/analyzer/lib/src/task/api/model.dart
@@ -1,4 +1,4 @@
-// Copyright (c) 2015, the Dart project authors.  Please see the AUTHORS file
+// Copyright (c) 2015, the Dart project authors. Please see the AUTHORS file
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
 
diff --git a/pkg/analyzer/lib/src/task/api/yaml.dart b/pkg/analyzer/lib/src/task/api/yaml.dart
index 8bfe390..aacc75d 100644
--- a/pkg/analyzer/lib/src/task/api/yaml.dart
+++ b/pkg/analyzer/lib/src/task/api/yaml.dart
@@ -1,4 +1,4 @@
-// Copyright (c) 2016, the Dart project authors.  Please see the AUTHORS file
+// Copyright (c) 2016, the Dart project authors. Please see the AUTHORS file
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
 
diff --git a/pkg/analyzer/lib/src/task/driver.dart b/pkg/analyzer/lib/src/task/driver.dart
index c7f12e2..843041d 100644
--- a/pkg/analyzer/lib/src/task/driver.dart
+++ b/pkg/analyzer/lib/src/task/driver.dart
@@ -1,4 +1,4 @@
-// Copyright (c) 2015, the Dart project authors.  Please see the AUTHORS file
+// Copyright (c) 2015, the Dart project authors. Please see the AUTHORS file
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
 
diff --git a/pkg/analyzer/lib/src/task/general.dart b/pkg/analyzer/lib/src/task/general.dart
index 446f14a..5fcb776 100644
--- a/pkg/analyzer/lib/src/task/general.dart
+++ b/pkg/analyzer/lib/src/task/general.dart
@@ -1,4 +1,4 @@
-// Copyright (c) 2015, the Dart project authors.  Please see the AUTHORS file
+// Copyright (c) 2015, the Dart project authors. Please see the AUTHORS file
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
 
diff --git a/pkg/analyzer/lib/src/task/inputs.dart b/pkg/analyzer/lib/src/task/inputs.dart
index d490238..30fd2446e 100644
--- a/pkg/analyzer/lib/src/task/inputs.dart
+++ b/pkg/analyzer/lib/src/task/inputs.dart
@@ -1,4 +1,4 @@
-// Copyright (c) 2015, the Dart project authors.  Please see the AUTHORS file
+// Copyright (c) 2015, the Dart project authors. Please see the AUTHORS file
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
 
diff --git a/pkg/analyzer/lib/src/task/manager.dart b/pkg/analyzer/lib/src/task/manager.dart
index 40778cb..009afaf 100644
--- a/pkg/analyzer/lib/src/task/manager.dart
+++ b/pkg/analyzer/lib/src/task/manager.dart
@@ -1,4 +1,4 @@
-// Copyright (c) 2015, the Dart project authors.  Please see the AUTHORS file
+// Copyright (c) 2015, the Dart project authors. Please see the AUTHORS file
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
 
diff --git a/pkg/analyzer/lib/src/task/model.dart b/pkg/analyzer/lib/src/task/model.dart
index a84a960..ec62312 100644
--- a/pkg/analyzer/lib/src/task/model.dart
+++ b/pkg/analyzer/lib/src/task/model.dart
@@ -1,4 +1,4 @@
-// Copyright (c) 2015, the Dart project authors.  Please see the AUTHORS file
+// Copyright (c) 2015, the Dart project authors. Please see the AUTHORS file
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
 
diff --git a/pkg/analyzer/lib/src/task/options.dart b/pkg/analyzer/lib/src/task/options.dart
index b195c6c..351daef 100644
--- a/pkg/analyzer/lib/src/task/options.dart
+++ b/pkg/analyzer/lib/src/task/options.dart
@@ -19,22 +19,93 @@
 import 'package:analyzer/src/lint/options_rule_validator.dart';
 import 'package:analyzer/src/lint/registry.dart';
 import 'package:analyzer/src/plugin/options.dart';
-import 'package:analyzer/src/task/api/general.dart';
-import 'package:analyzer/src/task/api/model.dart';
-import 'package:analyzer/src/task/general.dart';
 import 'package:analyzer/src/util/yaml.dart';
 import 'package:source_span/source_span.dart';
 import 'package:yaml/yaml.dart';
 
-/// The errors produced while parsing an analysis options file.
-///
-/// The list will be empty if there were no errors, but will not be `null`.
-final ListResultDescriptor<AnalysisError> ANALYSIS_OPTIONS_ERRORS =
-    new ListResultDescriptor<AnalysisError>(
-        'ANALYSIS_OPTIONS_ERRORS', AnalysisError.NO_ERRORS);
-
 final _OptionsProcessor _processor = new _OptionsProcessor();
 
+List<AnalysisError> analyzeAnalysisOptions(
+    Source source, String content, SourceFactory sourceFactory) {
+  List<AnalysisError> errors = <AnalysisError>[];
+  Source initialSource = source;
+  SourceSpan initialIncludeSpan;
+  AnalysisOptionsProvider optionsProvider =
+      new AnalysisOptionsProvider(sourceFactory);
+
+  // Validate the specified options and any included option files
+  void validate(Source source, YamlMap options) {
+    List<AnalysisError> validationErrors =
+        new OptionsFileValidator(source).validate(options);
+    if (initialIncludeSpan != null && validationErrors.isNotEmpty) {
+      for (AnalysisError error in validationErrors) {
+        var args = [
+          source.fullName,
+          error.offset.toString(),
+          (error.offset + error.length - 1).toString(),
+          error.message,
+        ];
+        errors.add(new AnalysisError(
+            initialSource,
+            initialIncludeSpan.start.column + 1,
+            initialIncludeSpan.length,
+            AnalysisOptionsWarningCode.INCLUDED_FILE_WARNING,
+            args));
+      }
+    } else {
+      errors.addAll(validationErrors);
+    }
+
+    YamlNode node = getValue(options, AnalyzerOptions.include);
+    if (node == null) {
+      return;
+    }
+    SourceSpan span = node.span;
+    initialIncludeSpan ??= span;
+    String includeUri = span.text;
+    Source includedSource = sourceFactory.resolveUri(source, includeUri);
+    if (includedSource == null || !includedSource.exists()) {
+      errors.add(new AnalysisError(
+          initialSource,
+          initialIncludeSpan.start.column + 1,
+          initialIncludeSpan.length,
+          AnalysisOptionsWarningCode.INCLUDE_FILE_NOT_FOUND,
+          [includeUri, source.fullName]));
+      return;
+    }
+    try {
+      YamlMap options =
+          optionsProvider.getOptionsFromString(includedSource.contents.data);
+      validate(includedSource, options);
+    } on OptionsFormatException catch (e) {
+      var args = [
+        includedSource.fullName,
+        e.span.start.offset.toString(),
+        e.span.end.offset.toString(),
+        e.message,
+      ];
+      // Report errors for included option files
+      // on the include directive located in the initial options file.
+      errors.add(new AnalysisError(
+          initialSource,
+          initialIncludeSpan.start.column + 1,
+          initialIncludeSpan.length,
+          AnalysisOptionsErrorCode.INCLUDED_FILE_PARSE_ERROR,
+          args));
+    }
+  }
+
+  try {
+    YamlMap options = optionsProvider.getOptionsFromString(content);
+    validate(source, options);
+  } on OptionsFormatException catch (e) {
+    SourceSpan span = e.span;
+    errors.add(new AnalysisError(source, span.start.column + 1, span.length,
+        AnalysisOptionsErrorCode.PARSE_ERROR, [e.message]));
+  }
+  return errors;
+}
+
 void applyToAnalysisOptions(AnalysisOptionsImpl options, YamlMap optionMap) {
   _processor.applyToAnalysisOptions(options, optionMap);
 }
@@ -273,153 +344,6 @@
   }
 }
 
-/// A task that generates errors for an analysis options file.
-class GenerateOptionsErrorsTask extends SourceBasedAnalysisTask {
-  /// The name of the input whose value is the content of the file.
-  static const String CONTENT_INPUT_NAME = 'CONTENT_INPUT_NAME';
-
-  /// The task descriptor describing this kind of task.
-  static final TaskDescriptor DESCRIPTOR = new TaskDescriptor(
-      'GenerateOptionsErrorsTask',
-      createTask,
-      buildInputs,
-      <ResultDescriptor>[ANALYSIS_OPTIONS_ERRORS, LINE_INFO],
-      suitabilityFor: suitabilityFor);
-
-  AnalysisOptionsProvider optionsProvider;
-
-  GenerateOptionsErrorsTask(AnalysisContext context, AnalysisTarget target)
-      : super(context, target) {
-    optionsProvider = new AnalysisOptionsProvider(context?.sourceFactory);
-  }
-
-  @override
-  TaskDescriptor get descriptor => DESCRIPTOR;
-
-  Source get source => target.source;
-
-  @override
-  void internalPerform() {
-    String content = getRequiredInput(CONTENT_INPUT_NAME);
-    //
-    // Record outputs.
-    //
-    outputs[ANALYSIS_OPTIONS_ERRORS] =
-        analyzeAnalysisOptions(source, content, context?.sourceFactory);
-    outputs[LINE_INFO] = computeLineInfo(content);
-  }
-
-  static List<AnalysisError> analyzeAnalysisOptions(
-      Source source, String content, SourceFactory sourceFactory) {
-    List<AnalysisError> errors = <AnalysisError>[];
-    Source initialSource = source;
-    SourceSpan initialIncludeSpan;
-    AnalysisOptionsProvider optionsProvider =
-        new AnalysisOptionsProvider(sourceFactory);
-
-    // Validate the specified options and any included option files
-    void validate(Source source, YamlMap options) {
-      List<AnalysisError> validationErrors =
-          new OptionsFileValidator(source).validate(options);
-      if (initialIncludeSpan != null && validationErrors.isNotEmpty) {
-        for (AnalysisError error in validationErrors) {
-          var args = [
-            source.fullName,
-            error.offset.toString(),
-            (error.offset + error.length - 1).toString(),
-            error.message,
-          ];
-          errors.add(new AnalysisError(
-              initialSource,
-              initialIncludeSpan.start.column + 1,
-              initialIncludeSpan.length,
-              AnalysisOptionsWarningCode.INCLUDED_FILE_WARNING,
-              args));
-        }
-      } else {
-        errors.addAll(validationErrors);
-      }
-
-      YamlNode node = getValue(options, AnalyzerOptions.include);
-      if (node == null) {
-        return;
-      }
-      SourceSpan span = node.span;
-      initialIncludeSpan ??= span;
-      String includeUri = span.text;
-      Source includedSource = sourceFactory.resolveUri(source, includeUri);
-      if (includedSource == null || !includedSource.exists()) {
-        errors.add(new AnalysisError(
-            initialSource,
-            initialIncludeSpan.start.column + 1,
-            initialIncludeSpan.length,
-            AnalysisOptionsWarningCode.INCLUDE_FILE_NOT_FOUND,
-            [includeUri, source.fullName]));
-        return;
-      }
-      try {
-        YamlMap options =
-            optionsProvider.getOptionsFromString(includedSource.contents.data);
-        validate(includedSource, options);
-      } on OptionsFormatException catch (e) {
-        var args = [
-          includedSource.fullName,
-          e.span.start.offset.toString(),
-          e.span.end.offset.toString(),
-          e.message,
-        ];
-        // Report errors for included option files
-        // on the include directive located in the initial options file.
-        errors.add(new AnalysisError(
-            initialSource,
-            initialIncludeSpan.start.column + 1,
-            initialIncludeSpan.length,
-            AnalysisOptionsErrorCode.INCLUDED_FILE_PARSE_ERROR,
-            args));
-      }
-    }
-
-    try {
-      YamlMap options = optionsProvider.getOptionsFromString(content);
-      validate(source, options);
-    } on OptionsFormatException catch (e) {
-      SourceSpan span = e.span;
-      errors.add(new AnalysisError(source, span.start.column + 1, span.length,
-          AnalysisOptionsErrorCode.PARSE_ERROR, [e.message]));
-    }
-    return errors;
-  }
-
-  /// Return a map from the names of the inputs of this kind of task to the
-  /// task input descriptors describing those inputs for a task with the
-  /// given [target].
-  static Map<String, TaskInput> buildInputs(AnalysisTarget source) =>
-      <String, TaskInput>{CONTENT_INPUT_NAME: CONTENT.of(source)};
-
-  /// Compute [LineInfo] for the given [content].
-  static LineInfo computeLineInfo(String content) {
-    List<int> lineStarts = StringUtilities.computeLineStarts(content);
-    return new LineInfo(lineStarts);
-  }
-
-  /// Create a task based on the given [target] in the given [context].
-  static GenerateOptionsErrorsTask createTask(
-          AnalysisContext context, AnalysisTarget target) =>
-      new GenerateOptionsErrorsTask(context, target);
-
-  /**
-   * Return an indication of how suitable this task is for the given [target].
-   */
-  static TaskSuitability suitabilityFor(AnalysisTarget target) {
-    if (target is Source &&
-        (target.shortName == AnalysisEngine.ANALYSIS_OPTIONS_FILE ||
-            target.shortName == AnalysisEngine.ANALYSIS_OPTIONS_YAML_FILE)) {
-      return TaskSuitability.HIGHEST;
-    }
-    return TaskSuitability.NONE;
-  }
-}
-
 /// Validates `analyzer` language configuration options.
 class LanguageOptionValidator extends OptionsValidator {
   ErrorBuilder builder = new ErrorBuilder(AnalyzerOptions.languageOptions);
diff --git a/pkg/analyzer/lib/src/task/options_work_manager.dart b/pkg/analyzer/lib/src/task/options_work_manager.dart
deleted file mode 100644
index fab4ebe..0000000
--- a/pkg/analyzer/lib/src/task/options_work_manager.dart
+++ /dev/null
@@ -1,167 +0,0 @@
-// Copyright (c) 2015, the Dart project authors.  Please see the AUTHORS file
-// for details. All rights reserved. Use of this source code is governed by a
-// BSD-style license that can be found in the LICENSE file.
-
-import 'dart:collection';
-
-import 'package:analyzer/error/error.dart';
-import 'package:analyzer/src/context/cache.dart';
-import 'package:analyzer/src/generated/engine.dart'
-    show AnalysisEngine, AnalysisErrorInfo, CacheState, InternalAnalysisContext;
-import 'package:analyzer/src/generated/source.dart';
-import 'package:analyzer/src/task/api/model.dart';
-import 'package:analyzer/src/task/options.dart';
-
-/// The manager for analysis options specific analysis.
-class OptionsWorkManager implements WorkManager {
-  /// The context for which work is being managed.
-  final InternalAnalysisContext context;
-
-  /// The options file sources.
-  final LinkedHashSet<Source> sourceQueue = new LinkedHashSet<Source>();
-
-  /// The [TargetedResult]s that should be computed with priority.
-  final LinkedHashSet<TargetedResult> priorityResultQueue =
-      new LinkedHashSet<TargetedResult>();
-
-  /// Initialize a newly created manager.
-  OptionsWorkManager(this.context) {
-    analysisCache.onResultInvalidated.listen(onResultInvalidated);
-  }
-
-  /// Returns the correctly typed result of `context.analysisCache`.
-  AnalysisCache get analysisCache => context.analysisCache;
-
-  /// Specifies that the client wants the given [result] of the given [target]
-  /// to be computed with priority.
-  void addPriorityResult(AnalysisTarget target, ResultDescriptor result) {
-    priorityResultQueue.add(new TargetedResult(target, result));
-  }
-
-  @override
-  void applyChange(List<Source> addedSources, List<Source> changedSources,
-      List<Source> removedSources) {
-    addedSources = addedSources.where(_isOptionsSource).toList();
-    changedSources = changedSources.where(_isOptionsSource).toList();
-    removedSources = removedSources.where(_isOptionsSource).toList();
-    // source queue
-    sourceQueue.addAll(addedSources);
-    sourceQueue.addAll(changedSources);
-    sourceQueue.removeAll(removedSources);
-  }
-
-  @override
-  void applyPriorityTargets(List<AnalysisTarget> targets) {
-    // Unschedule the old targets.
-    List<TargetedResult> resultsToUnschedule = <TargetedResult>[];
-    for (TargetedResult result in priorityResultQueue) {
-      if (result.result == ANALYSIS_OPTIONS_ERRORS) {
-        resultsToUnschedule.add(result);
-      }
-    }
-    priorityResultQueue.removeAll(resultsToUnschedule);
-    // Schedule new targets.
-    for (AnalysisTarget target in targets) {
-      if (_isOptionsSource(target)) {
-        addPriorityResult(target, ANALYSIS_OPTIONS_ERRORS);
-      }
-    }
-  }
-
-  @override
-  List<AnalysisError> getErrors(Source source) {
-    if (!_isOptionsSource(source)) {
-      return AnalysisError.NO_ERRORS;
-    }
-    // If analysis is finished, use all the errors.
-    if (analysisCache.getState(source, ANALYSIS_OPTIONS_ERRORS) ==
-        CacheState.VALID) {
-      return analysisCache.getValue(source, ANALYSIS_OPTIONS_ERRORS);
-    }
-    // No partial results.
-    return AnalysisError.NO_ERRORS;
-  }
-
-  @override
-  TargetedResult getNextResult() {
-    // Try to find a priority result to compute.
-    while (priorityResultQueue.isNotEmpty) {
-      TargetedResult result = priorityResultQueue.first;
-      if (!_needsComputing(result.target, result.result)) {
-        priorityResultQueue.remove(result);
-        continue;
-      }
-      return result;
-    }
-    // Try to find a new options file to analyze.
-    while (sourceQueue.isNotEmpty) {
-      Source optionsSource = sourceQueue.first;
-      if (!_needsComputing(optionsSource, ANALYSIS_OPTIONS_ERRORS)) {
-        sourceQueue.remove(optionsSource);
-        continue;
-      }
-      return new TargetedResult(optionsSource, ANALYSIS_OPTIONS_ERRORS);
-    }
-    // No results to compute.
-    return null;
-  }
-
-  @override
-  WorkOrderPriority getNextResultPriority() {
-    if (priorityResultQueue.isNotEmpty) {
-      return WorkOrderPriority.PRIORITY;
-    }
-    if (sourceQueue.isNotEmpty) {
-      return WorkOrderPriority.NORMAL;
-    }
-    return WorkOrderPriority.NONE;
-  }
-
-  @override
-  void onAnalysisOptionsChanged() {
-    // Do nothing.
-  }
-
-  /// Notifies the manager that a result has been invalidated.
-  void onResultInvalidated(InvalidatedResult event) {
-    ResultDescriptor descriptor = event.descriptor;
-    if (descriptor == ANALYSIS_OPTIONS_ERRORS) {
-      sourceQueue.add(event.entry.target);
-    }
-  }
-
-  @override
-  void onSourceFactoryChanged() {
-    // Do nothing.
-  }
-
-  @override
-  void resultsComputed(
-      AnalysisTarget target, Map<ResultDescriptor, dynamic> outputs) {
-    // Update notice.
-    if (_isOptionsSource(target)) {
-      bool shouldSetErrors = false;
-      outputs.forEach((ResultDescriptor descriptor, value) {
-        if (descriptor == ANALYSIS_OPTIONS_ERRORS) {
-          shouldSetErrors = true;
-        }
-      });
-      if (shouldSetErrors) {
-        AnalysisErrorInfo info = context.getErrors(target);
-        context.getNotice(target).setErrors(info.errors, info.lineInfo);
-      }
-    }
-  }
-
-  /// Returns `true` if the given [result] of the given [target] needs
-  /// computing, i.e. it is not in the valid and not in the error state.
-  bool _needsComputing(AnalysisTarget target, ResultDescriptor result) {
-    CacheState state = analysisCache.getState(target, result);
-    return state != CacheState.VALID && state != CacheState.ERROR;
-  }
-
-  /// Return `true` if the given target is an analysis options source.
-  static bool _isOptionsSource(AnalysisTarget target) =>
-      target is Source &&
-      AnalysisEngine.isAnalysisOptionsFileName(target.fullName);
-}
diff --git a/pkg/analyzer/lib/src/task/strong/ast_properties.dart b/pkg/analyzer/lib/src/task/strong/ast_properties.dart
index d2fea4e..d2891ad 100644
--- a/pkg/analyzer/lib/src/task/strong/ast_properties.dart
+++ b/pkg/analyzer/lib/src/task/strong/ast_properties.dart
@@ -15,6 +15,9 @@
 const String _hasImplicitCasts = '_hasImplicitCasts';
 const String _implicitCast = '_implicitCast';
 const String _implicitOperationCast = '_implicitAssignmentCast';
+const String _implicitSpreadCast = '_implicitSpreadCast';
+const String _implicitSpreadKeyCast = '_implicitSpreadKeyCast';
+const String _implicitSpreadValueCast = '_implicitSpreadValueCast';
 const String _isDynamicInvoke = '_isDynamicInvoke';
 const String _superclassCovariantParameters = '_superclassCovariantParameters';
 
@@ -48,6 +51,24 @@
   return node.getProperty<DartType>(_implicitOperationCast);
 }
 
+/// If this expression is passed into a spread and the items in the spread need
+/// an implicit cast, return the type the items are coerced to.
+DartType getImplicitSpreadCast(Expression node) {
+  return node.getProperty<DartType>(_implicitSpreadCast);
+}
+
+/// If this expression is a map passed into a spread and the keys in the spread
+/// need an implicit cast, return the type the keys are coerced to.
+DartType getImplicitSpreadKeyCast(Expression node) {
+  return node.getProperty<DartType>(_implicitSpreadKeyCast);
+}
+
+/// If this expression is a map passed into a spread and the values in the
+/// spread need an implicit cast, return the type the values are coerced to.
+DartType getImplicitSpreadValueCast(Expression node) {
+  return node.getProperty<DartType>(_implicitSpreadValueCast);
+}
+
 /// Returns a list of parameters and method type parameters from mixins and
 /// superclasses of this class that need a stub method to check their type at
 /// runtime for soundness.
@@ -94,6 +115,21 @@
   node.setProperty(_implicitOperationCast, type);
 }
 
+/// Sets the result of [getImplicitSpreadCast] for this node.
+void setImplicitSpreadCast(Expression node, DartType type) {
+  node.setProperty(_implicitSpreadCast, type);
+}
+
+/// Sets the result of [getImplicitSpreadKeyCast] for this node.
+void setImplicitSpreadKeyCast(Expression node, DartType type) {
+  node.setProperty(_implicitSpreadKeyCast, type);
+}
+
+/// Sets the result of [getImplicitSpreadValueCast] for this node.
+void setImplicitSpreadValueCast(Expression node, DartType type) {
+  node.setProperty(_implicitSpreadValueCast, type);
+}
+
 /// Sets [isDynamicInvoke] property for this expression.
 void setIsDynamicInvoke(Expression node, bool value) {
   node.setProperty(_isDynamicInvoke, value == true ? true : null);
diff --git a/pkg/analyzer/lib/src/task/strong/checker.dart b/pkg/analyzer/lib/src/task/strong/checker.dart
index 8d9da75..0708ecf 100644
--- a/pkg/analyzer/lib/src/task/strong/checker.dart
+++ b/pkg/analyzer/lib/src/task/strong/checker.dart
@@ -18,6 +18,7 @@
 import 'package:analyzer/source/error_processor.dart' show ErrorProcessor;
 import 'package:analyzer/src/dart/ast/ast.dart';
 import 'package:analyzer/src/dart/element/element.dart';
+import 'package:analyzer/src/dart/element/inheritance_manager2.dart';
 import 'package:analyzer/src/dart/element/member.dart';
 import 'package:analyzer/src/dart/element/type.dart';
 import 'package:analyzer/src/error/codes.dart' show StrongModeCode;
@@ -102,6 +103,9 @@
     return null;
   }
 
+  // TODO(jmesserly): I'm not sure this method will still return the correct
+  // type. This code may need to use InheritanceManager2.getMember instead,
+  // similar to the fix in _checkImplicitCovarianceCast.
   var name = member.name;
   var baseMember = member is PropertyAccessorElement
       ? (member.isGetter ? type.getGetter(name) : type.getSetter(name))
@@ -114,6 +118,7 @@
 class CodeChecker extends RecursiveAstVisitor {
   final Dart2TypeSystem rules;
   final TypeProvider typeProvider;
+  final InheritanceManager2 inheritance;
   final AnalysisErrorListener reporter;
   final AnalysisOptionsImpl _options;
   _OverrideChecker _overrideChecker;
@@ -123,7 +128,7 @@
   HashSet<ExecutableElement> _covariantPrivateMembers;
 
   CodeChecker(TypeProvider typeProvider, Dart2TypeSystem rules,
-      AnalysisErrorListener reporter, this._options)
+      this.inheritance, AnalysisErrorListener reporter, this._options)
       : typeProvider = typeProvider,
         rules = rules,
         reporter = reporter {
@@ -169,14 +174,28 @@
     if (element is ForElement) {
       checkCollectionElement(element.body, expectedType);
     } else if (element is IfElement) {
+      checkBoolean(element.condition);
       checkCollectionElement(element.thenElement, expectedType);
       checkCollectionElement(element.elseElement, expectedType);
     } else if (element is Expression) {
       checkAssignment(element, expectedType);
     } else if (element is SpreadElement) {
-      DartType iterableType =
-          typeProvider.iterableType.instantiate([expectedType]);
-      checkAssignment(element.expression, iterableType);
+      // Spread expression may be dynamic in which case it's implicitly downcast
+      // to Iterable<dynamic>
+      DartType expressionCastType =
+          typeProvider.iterableType.instantiate([DynamicTypeImpl.instance]);
+      checkAssignment(element.expression, expressionCastType);
+
+      var exprType = element.expression.staticType;
+      var asIterableType = exprType is InterfaceTypeImpl
+          ? exprType.asInstanceOf(typeProvider.iterableType.element)
+          : null;
+      var elementType =
+          asIterableType == null ? null : asIterableType.typeArguments[0];
+      // Items in the spread will then potentially be downcast to the expected
+      // type.
+      _checkImplicitCast(element.expression, expectedType,
+          from: elementType, forSpread: true);
     }
   }
 
@@ -193,11 +212,34 @@
     if (element is ForElement) {
       checkMapElement(element.body, expectedKeyType, expectedValueType);
     } else if (element is IfElement) {
+      checkBoolean(element.condition);
       checkMapElement(element.thenElement, expectedKeyType, expectedValueType);
       checkMapElement(element.elseElement, expectedKeyType, expectedValueType);
     } else if (element is MapLiteralEntry) {
       checkAssignment(element.key, expectedKeyType);
       checkAssignment(element.value, expectedValueType);
+    } else if (element is SpreadElement) {
+      // Spread expression may be dynamic in which case it's implicitly downcast
+      // to Map<dynamic, dynamic>
+      DartType expressionCastType = typeProvider.mapType
+          .instantiate([DynamicTypeImpl.instance, DynamicTypeImpl.instance]);
+      checkAssignment(element.expression, expressionCastType);
+
+      var exprType = element.expression.staticType;
+      var asMapType = exprType is InterfaceTypeImpl
+          ? exprType.asInstanceOf(typeProvider.mapType.element)
+          : null;
+
+      var elementKeyType =
+          asMapType == null ? null : asMapType.typeArguments[0];
+      var elementValueType =
+          asMapType == null ? null : asMapType.typeArguments[1];
+      // Keys and values in the spread will then potentially be downcast to
+      // the expected types.
+      _checkImplicitCast(element.expression, expectedKeyType,
+          from: elementKeyType, forSpreadKey: true);
+      _checkImplicitCast(element.expression, expectedValueType,
+          from: elementValueType, forSpreadValue: true);
     }
   }
 
@@ -465,7 +507,7 @@
         }
       }
     }
-    NodeList<CollectionElement> elements = node.elements2;
+    NodeList<CollectionElement> elements = node.elements;
     for (int i = 0; i < elements.length; i++) {
       checkCollectionElement(elements[i], type);
     }
@@ -579,7 +621,7 @@
           }
         }
       }
-      NodeList<CollectionElement> elements = node.elements2;
+      NodeList<CollectionElement> elements = node.elements;
       for (int i = 0; i < elements.length; i++) {
         checkMapElement(elements[i], keyType, valueType);
       }
@@ -599,7 +641,7 @@
           }
         }
       }
-      NodeList<CollectionElement> elements = node.elements2;
+      NodeList<CollectionElement> elements = node.elements;
       for (int i = 0; i < elements.length; i++) {
         checkCollectionElement(elements[i], type);
       }
@@ -647,7 +689,6 @@
   @override
   void visitVariableDeclarationList(VariableDeclarationList node) {
     TypeAnnotation type = node.type;
-
     if (type != null) {
       for (VariableDeclaration variable in node.variables) {
         var initializer = variable.initializer;
@@ -772,11 +813,20 @@
   /// If [expr] does not require an implicit cast because it is not related to
   /// [to] or is already a subtype of it, does nothing.
   void _checkImplicitCast(Expression expr, DartType to,
-      {DartType from, bool opAssign: false}) {
+      {DartType from,
+      bool opAssign: false,
+      bool forSpread: false,
+      bool forSpreadKey: false,
+      bool forSpreadValue: false}) {
     from ??= _getExpressionType(expr);
 
     if (_needsImplicitCast(expr, to, from: from) == true) {
-      _recordImplicitCast(expr, to, from: from, opAssign: opAssign);
+      _recordImplicitCast(expr, to,
+          from: from,
+          opAssign: opAssign,
+          forSpread: forSpread,
+          forSpreadKey: forSpreadKey,
+          forSpreadValue: forSpreadValue);
     }
   }
 
@@ -820,7 +870,10 @@
         _isInstanceMember(element) &&
         targetType is InterfaceType &&
         targetType.typeArguments.isNotEmpty &&
-        !_targetHasKnownGenericTypeArguments(target)) {
+        !_targetHasKnownGenericTypeArguments(target) &&
+        // Make sure we don't overwrite an existing implicit cast based on
+        // the context type. It will be more precise and will ensure soundness.
+        getImplicitCast(node) == null) {
       // Track private setters/method calls. We can sometimes eliminate the
       // parameter check in code generation, if it was never needed.
       // This member will need a check, however, because we are calling through
@@ -830,14 +883,18 @@
             .add(element is ExecutableMember ? element.baseElement : element);
       }
 
-      // Get the lower bound of the declared return type (e.g. `F<Null>`) and
+      // Get the lower bound of the declared return type (e.g. `F<bottom>`) and
       // see if it can be assigned to the expected type (e.g. `F<Object>`).
       //
       // That way we can tell if any lower `T` will work or not.
+
+      // The member may be from a superclass, so we need to ensure the type
+      // parameters are properly substituted.
       var classType = targetType.element.type;
       var classLowerBound = classType.instantiate(new List.filled(
-          classType.typeParameters.length, typeProvider.nullType));
-      var memberLowerBound = _lookUpMember(classLowerBound, element).type;
+          classType.typeParameters.length, typeProvider.bottomType));
+      var memberLowerBound = inheritance.getMember(
+          classLowerBound, Name(element.librarySource.uri, element.name));
       var expectedType = invokeType.returnType;
 
       if (!rules.isSubtypeOf(memberLowerBound.returnType, expectedType)) {
@@ -978,6 +1035,17 @@
   DartType _getExpressionType(Expression expr) =>
       getExpressionType(expr, rules, typeProvider);
 
+  DartType _getInstanceTypeArgument(
+      DartType expressionType, ClassElement instanceType) {
+    if (expressionType is InterfaceTypeImpl) {
+      var asInstanceType = expressionType.asInstanceOf(instanceType);
+      if (asInstanceType != null) {
+        return asInstanceType.typeArguments[0];
+      }
+    }
+    return null;
+  }
+
   /// Given an expression, return its type assuming it is
   /// in the caller position of a call (that is, accounting
   /// for the possibility of a call method).  Returns null
@@ -1003,19 +1071,19 @@
       (e is MethodElement ||
           e is PropertyAccessorElement && e.variable is FieldElement);
 
-  ExecutableElement _lookUpMember(InterfaceType type, ExecutableElement e) {
-    var name = e.name;
-    var library = e.library;
-    return e is PropertyAccessorElement
-        ? (e.isGetter
-            ? type.lookUpInheritedGetter(name, library: library)
-            : type.lookUpInheritedSetter(name, library: library))
-        : type.lookUpInheritedMethod(name, library: library);
-  }
-
-  void _markImplicitCast(Expression expr, DartType to, {bool opAssign: false}) {
+  void _markImplicitCast(Expression expr, DartType to,
+      {bool opAssign: false,
+      bool forSpread: false,
+      bool forSpreadKey: false,
+      bool forSpreadValue: false}) {
     if (opAssign) {
       setImplicitOperationCast(expr, to);
+    } else if (forSpread) {
+      setImplicitSpreadCast(expr, to);
+    } else if (forSpreadKey) {
+      setImplicitSpreadKeyCast(expr, to);
+    } else if (forSpreadValue) {
+      setImplicitSpreadValueCast(expr, to);
     } else {
       setImplicitCast(expr, to);
     }
@@ -1078,66 +1146,80 @@
   /// This will emit the appropriate error/warning/hint message as well as mark
   /// the AST node.
   void _recordImplicitCast(Expression expr, DartType to,
-      {DartType from, bool opAssign: false}) {
+      {DartType from,
+      bool opAssign: false,
+      forSpread: false,
+      forSpreadKey: false,
+      forSpreadValue: false}) {
     // If this is an implicit tearoff, we need to mark the cast, but we don't
     // want to warn if it's a legal subtype.
     if (from is InterfaceType && rules.acceptsFunctionType(to)) {
       var type = rules.getCallMethodType(from);
       if (type != null && rules.isSubtypeOf(type, to)) {
-        _markImplicitCast(expr, to, opAssign: opAssign);
+        _markImplicitCast(expr, to,
+            opAssign: opAssign,
+            forSpread: forSpread,
+            forSpreadKey: forSpreadKey,
+            forSpreadValue: forSpreadValue);
         return;
       }
     }
 
-    // Inference "casts":
-    if (expr is Literal) {
-      // fromT should be an exact type - this will almost certainly fail at
-      // runtime.
-      if (expr is ListLiteral) {
-        _recordMessage(
-            expr, StrongModeCode.INVALID_CAST_LITERAL_LIST, [from, to]);
-      } else if (expr is SetOrMapLiteral) {
-        if (expr.isMap) {
-          _recordMessage(
-              expr, StrongModeCode.INVALID_CAST_LITERAL_MAP, [from, to]);
-        } else {
-          // Ambiguity should be resolved by now
-          assert(expr.isSet);
-          _recordMessage(
-              expr, StrongModeCode.INVALID_CAST_LITERAL_SET, [from, to]);
-        }
-      } else {
-        _recordMessage(
-            expr, StrongModeCode.INVALID_CAST_LITERAL, [expr, from, to]);
-      }
-      return;
-    }
+    if (!forSpread && !forSpreadKey && !forSpreadValue) {
+      // Spreads are special in that they may create downcasts at runtime but
+      // those casts are implied so we don't treat them as strictly.
 
-    if (expr is FunctionExpression) {
-      _recordMessage(
-          expr, StrongModeCode.INVALID_CAST_FUNCTION_EXPR, [from, to]);
-      return;
-    }
-
-    if (expr is InstanceCreationExpression) {
-      ConstructorElement e = expr.staticElement;
-      if (e == null || !e.isFactory) {
+      // Inference "casts":
+      if (expr is Literal) {
         // fromT should be an exact type - this will almost certainly fail at
         // runtime.
-        _recordMessage(expr, StrongModeCode.INVALID_CAST_NEW_EXPR, [from, to]);
+        if (expr is ListLiteral) {
+          _recordMessage(
+              expr, StrongModeCode.INVALID_CAST_LITERAL_LIST, [from, to]);
+        } else if (expr is SetOrMapLiteral) {
+          if (expr.isMap) {
+            _recordMessage(
+                expr, StrongModeCode.INVALID_CAST_LITERAL_MAP, [from, to]);
+          } else {
+            // Ambiguity should be resolved by now
+            assert(expr.isSet);
+            _recordMessage(
+                expr, StrongModeCode.INVALID_CAST_LITERAL_SET, [from, to]);
+          }
+        } else {
+          _recordMessage(
+              expr, StrongModeCode.INVALID_CAST_LITERAL, [expr, from, to]);
+        }
         return;
       }
-    }
 
-    Element e = _getKnownElement(expr);
-    if (e is FunctionElement || e is MethodElement && e.isStatic) {
-      _recordMessage(
-          expr,
-          e is MethodElement
-              ? StrongModeCode.INVALID_CAST_METHOD
-              : StrongModeCode.INVALID_CAST_FUNCTION,
-          [e.name, from, to]);
-      return;
+      if (expr is FunctionExpression) {
+        _recordMessage(
+            expr, StrongModeCode.INVALID_CAST_FUNCTION_EXPR, [from, to]);
+        return;
+      }
+
+      if (expr is InstanceCreationExpression) {
+        ConstructorElement e = expr.staticElement;
+        if (e == null || !e.isFactory) {
+          // fromT should be an exact type - this will almost certainly fail at
+          // runtime.
+          _recordMessage(
+              expr, StrongModeCode.INVALID_CAST_NEW_EXPR, [from, to]);
+          return;
+        }
+      }
+
+      Element e = _getKnownElement(expr);
+      if (e is FunctionElement || e is MethodElement && e.isStatic) {
+        _recordMessage(
+            expr,
+            e is MethodElement
+                ? StrongModeCode.INVALID_CAST_METHOD
+                : StrongModeCode.INVALID_CAST_FUNCTION,
+            [e.name, from, to]);
+        return;
+      }
     }
 
     // Composite cast: these are more likely to fail.
@@ -1171,7 +1253,11 @@
           : StrongModeCode.DOWN_CAST_IMPLICIT;
     }
     _recordMessage(expr, errorCode, [from, to]);
-    _markImplicitCast(expr, to, opAssign: opAssign);
+    _markImplicitCast(expr, to,
+        opAssign: opAssign,
+        forSpread: forSpread,
+        forSpreadKey: forSpreadKey,
+        forSpreadValue: forSpreadValue);
   }
 
   void _recordMessage(AstNode node, ErrorCode errorCode, List arguments) {
@@ -1253,7 +1339,7 @@
     }
     Token awaitKeyword;
     AstNode parent = node.parent;
-    if (parent is ForStatement2) {
+    if (parent is ForStatement) {
       awaitKeyword = parent.awaitKeyword;
     } else if (parent is ForElement) {
       awaitKeyword = parent.awaitKeyword;
@@ -1267,7 +1353,7 @@
         : typeProvider.iterableType;
     var iterableType = _getExpressionType(node.iterable);
     var elementType =
-        rules.mostSpecificTypeArgument(iterableType, sequenceInterface);
+        _getInstanceTypeArgument(iterableType, sequenceInterface.element);
 
     // If the sequence is not an Iterable (or Stream for await for) but is a
     // supertype of it, do an implicit downcast to Iterable<dynamic>. Then
diff --git a/pkg/analyzer/lib/src/task/strong_mode.dart b/pkg/analyzer/lib/src/task/strong_mode.dart
index fdbc6d4..0ae39f9 100644
--- a/pkg/analyzer/lib/src/task/strong_mode.dart
+++ b/pkg/analyzer/lib/src/task/strong_mode.dart
@@ -1,4 +1,4 @@
-// Copyright (c) 2015, the Dart project authors.  Please see the AUTHORS file
+// Copyright (c) 2015, the Dart project authors. Please see the AUTHORS file
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
 
diff --git a/pkg/analyzer/lib/src/task/yaml.dart b/pkg/analyzer/lib/src/task/yaml.dart
index 431cf30..56ea51c 100644
--- a/pkg/analyzer/lib/src/task/yaml.dart
+++ b/pkg/analyzer/lib/src/task/yaml.dart
@@ -1,4 +1,4 @@
-// Copyright (c) 2016, the Dart project authors.  Please see the AUTHORS file
+// Copyright (c) 2016, the Dart project authors. Please see the AUTHORS file
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
 
diff --git a/pkg/analyzer/lib/src/test_utilities/find_element.dart b/pkg/analyzer/lib/src/test_utilities/find_element.dart
index 86b3e1f..f8ff22c 100644
--- a/pkg/analyzer/lib/src/test_utilities/find_element.dart
+++ b/pkg/analyzer/lib/src/test_utilities/find_element.dart
@@ -1,4 +1,4 @@
-// Copyright (c) 2018, the Dart project authors.  Please see the AUTHORS file
+// Copyright (c) 2018, the Dart project authors. Please see the AUTHORS file
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
 
diff --git a/pkg/analyzer/lib/src/test_utilities/find_node.dart b/pkg/analyzer/lib/src/test_utilities/find_node.dart
index 11b92be..ced02d0 100644
--- a/pkg/analyzer/lib/src/test_utilities/find_node.dart
+++ b/pkg/analyzer/lib/src/test_utilities/find_node.dart
@@ -91,8 +91,8 @@
     return _node(search, (n) => n is FieldFormalParameter);
   }
 
-  ForStatement2 forStatement2(String search) {
-    return _node(search, (n) => n is ForStatement2);
+  ForStatement forStatement(String search) {
+    return _node(search, (n) => n is ForStatement);
   }
 
   FunctionBody functionBody(String search) {
@@ -151,6 +151,10 @@
     return _node(search, (n) => n is MixinDeclaration);
   }
 
+  NamedExpression namedExpression(String search) {
+    return _node(search, (n) => n is NamedExpression);
+  }
+
   ParenthesizedExpression parenthesized(String search) {
     return _node(search, (n) => n is ParenthesizedExpression);
   }
diff --git a/pkg/analyzer/lib/src/test_utilities/function_ast_visitor.dart b/pkg/analyzer/lib/src/test_utilities/function_ast_visitor.dart
index f3c951b..df7a2f1 100644
--- a/pkg/analyzer/lib/src/test_utilities/function_ast_visitor.dart
+++ b/pkg/analyzer/lib/src/test_utilities/function_ast_visitor.dart
@@ -1,4 +1,4 @@
-// Copyright (c) 2018, the Dart project authors.  Please see the AUTHORS file
+// Copyright (c) 2018, the Dart project authors. Please see the AUTHORS file
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
 
diff --git a/pkg/analyzer/lib/src/test_utilities/mock_sdk.dart b/pkg/analyzer/lib/src/test_utilities/mock_sdk.dart
index f9828f5..d4c070c 100644
--- a/pkg/analyzer/lib/src/test_utilities/mock_sdk.dart
+++ b/pkg/analyzer/lib/src/test_utilities/mock_sdk.dart
@@ -1,4 +1,4 @@
-// Copyright (c) 2018, the Dart project authors.  Please see the AUTHORS file
+// Copyright (c) 2018, the Dart project authors. Please see the AUTHORS file
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
 
@@ -143,9 +143,12 @@
 
 void print(Object object) {}
 
-class bool extends Object {
+abstract class bool extends Object {
   external const factory bool.fromEnvironment(String name,
       {bool defaultValue: false});
+  bool operator &(bool other);
+  bool operator |(bool other);
+  bool operator ^(bool other);
 }
 
 abstract class Comparable<T> {
diff --git a/pkg/analyzer/lib/src/test_utilities/resource_provider_mixin.dart b/pkg/analyzer/lib/src/test_utilities/resource_provider_mixin.dart
index 8f20457..6c0072b 100644
--- a/pkg/analyzer/lib/src/test_utilities/resource_provider_mixin.dart
+++ b/pkg/analyzer/lib/src/test_utilities/resource_provider_mixin.dart
@@ -1,4 +1,4 @@
-// Copyright (c) 2017, the Dart project authors.  Please see the AUTHORS file
+// Copyright (c) 2017, the Dart project authors. Please see the AUTHORS file
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
 
diff --git a/pkg/analyzer/lib/src/util/sdk.dart b/pkg/analyzer/lib/src/util/sdk.dart
index b89f3d7..abffd58 100644
--- a/pkg/analyzer/lib/src/util/sdk.dart
+++ b/pkg/analyzer/lib/src/util/sdk.dart
@@ -1,4 +1,4 @@
-// Copyright (c) 2017, the Dart project authors.  Please see the AUTHORS file
+// Copyright (c) 2017, the Dart project authors. Please see the AUTHORS file
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
 
diff --git a/pkg/analyzer/lib/src/util/uri.dart b/pkg/analyzer/lib/src/util/uri.dart
index 91bbdb2..963dafc 100644
--- a/pkg/analyzer/lib/src/util/uri.dart
+++ b/pkg/analyzer/lib/src/util/uri.dart
@@ -1,4 +1,4 @@
-// Copyright (c) 2018, the Dart project authors.  Please see the AUTHORS file
+// Copyright (c) 2018, the Dart project authors. Please see the AUTHORS file
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
 
diff --git a/pkg/analyzer/lib/src/util/yaml.dart b/pkg/analyzer/lib/src/util/yaml.dart
index 1950bdd..4485072 100644
--- a/pkg/analyzer/lib/src/util/yaml.dart
+++ b/pkg/analyzer/lib/src/util/yaml.dart
@@ -1,4 +1,4 @@
-// Copyright (c) 2015, the Dart project authors.  Please see the AUTHORS file
+// Copyright (c) 2015, the Dart project authors. Please see the AUTHORS file
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
 
diff --git a/pkg/analyzer/lib/src/workspace/bazel.dart b/pkg/analyzer/lib/src/workspace/bazel.dart
index 5e90c71..9151e23 100644
--- a/pkg/analyzer/lib/src/workspace/bazel.dart
+++ b/pkg/analyzer/lib/src/workspace/bazel.dart
@@ -1,4 +1,4 @@
-// Copyright (c) 2016, the Dart project authors.  Please see the AUTHORS file
+// Copyright (c) 2016, the Dart project authors. Please see the AUTHORS file
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
 
diff --git a/pkg/analyzer/lib/src/workspace/gn.dart b/pkg/analyzer/lib/src/workspace/gn.dart
index 191c421..6490363 100644
--- a/pkg/analyzer/lib/src/workspace/gn.dart
+++ b/pkg/analyzer/lib/src/workspace/gn.dart
@@ -1,4 +1,4 @@
-// Copyright (c) 2017, the Dart project authors.  Please see the AUTHORS file
+// Copyright (c) 2017, the Dart project authors. Please see the AUTHORS file
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
 
diff --git a/pkg/analyzer/lib/src/workspace/package_build.dart b/pkg/analyzer/lib/src/workspace/package_build.dart
index c5c74673..4e6bee0 100644
--- a/pkg/analyzer/lib/src/workspace/package_build.dart
+++ b/pkg/analyzer/lib/src/workspace/package_build.dart
@@ -1,4 +1,4 @@
-// Copyright (c) 2018, the Dart project authors.  Please see the AUTHORS file
+// Copyright (c) 2018, the Dart project authors. Please see the AUTHORS file
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
 
diff --git a/pkg/analyzer/lib/task/model.dart b/pkg/analyzer/lib/task/model.dart
index 1b33bf4..6768ca2 100644
--- a/pkg/analyzer/lib/task/model.dart
+++ b/pkg/analyzer/lib/task/model.dart
@@ -1,4 +1,4 @@
-// Copyright (c) 2015, the Dart project authors.  Please see the AUTHORS file
+// Copyright (c) 2015, the Dart project authors. Please see the AUTHORS file
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
 
diff --git a/pkg/analyzer/pubspec.yaml b/pkg/analyzer/pubspec.yaml
index 81048a3..b49c0f3 100644
--- a/pkg/analyzer/pubspec.yaml
+++ b/pkg/analyzer/pubspec.yaml
@@ -1,5 +1,5 @@
 name: analyzer
-version: 0.35.4
+version: 0.36.0
 author: Dart Team <misc@dartlang.org>
 description: Static analyzer for Dart.
 homepage: https://github.com/dart-lang/sdk/tree/master/pkg/analyzer
@@ -11,9 +11,9 @@
   collection: ^1.10.1
   convert: ^2.0.0
   crypto: '>=1.1.1 <3.0.0'
-  front_end: 0.1.14
+  front_end: 0.1.15
   glob: ^1.0.3
-  kernel: 0.3.14
+  kernel: 0.3.15
   meta: ^1.0.2
   package_config: '>=0.1.5 <2.0.0'
   path: '>=0.9.0 <2.0.0'
diff --git a/pkg/analyzer/test/dart/analysis/declared_variables_test.dart b/pkg/analyzer/test/dart/analysis/declared_variables_test.dart
index b9465f3..2460423 100644
--- a/pkg/analyzer/test/dart/analysis/declared_variables_test.dart
+++ b/pkg/analyzer/test/dart/analysis/declared_variables_test.dart
@@ -1,4 +1,4 @@
-// Copyright (c) 2016, the Dart project authors.  Please see the AUTHORS file
+// Copyright (c) 2016, the Dart project authors. Please see the AUTHORS file
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
 
diff --git a/pkg/analyzer/test/dart/analysis/test_all.dart b/pkg/analyzer/test/dart/analysis/test_all.dart
index b17fcd8..fe1f2ee 100644
--- a/pkg/analyzer/test/dart/analysis/test_all.dart
+++ b/pkg/analyzer/test/dart/analysis/test_all.dart
@@ -1,4 +1,4 @@
-// Copyright (c) 2014, the Dart project authors.  Please see the AUTHORS file
+// Copyright (c) 2014, the Dart project authors. Please see the AUTHORS file
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
 
diff --git a/pkg/analyzer/test/dart/ast/ast_test.dart b/pkg/analyzer/test/dart/ast/ast_test.dart
index 829b1a9..4468d47 100644
--- a/pkg/analyzer/test/dart/ast/ast_test.dart
+++ b/pkg/analyzer/test/dart/ast/ast_test.dart
@@ -102,13 +102,12 @@
 
   void test_isAbstract() {
     expect(
-        AstTestFactory
-            .classDeclaration(null, "A", null, null, null, null)
+        AstTestFactory.classDeclaration(null, "A", null, null, null, null)
             .isAbstract,
         isFalse);
     expect(
-        AstTestFactory
-            .classDeclaration(Keyword.ABSTRACT, "B", null, null, null, null)
+        AstTestFactory.classDeclaration(
+                Keyword.ABSTRACT, "B", null, null, null, null)
             .isAbstract,
         isTrue);
   }
@@ -118,13 +117,12 @@
 class ClassTypeAliasTest extends ParserTestCase {
   void test_isAbstract() {
     expect(
-        AstTestFactory
-            .classTypeAlias("A", null, null, null, null, null)
+        AstTestFactory.classTypeAlias("A", null, null, null, null, null)
             .isAbstract,
         isFalse);
     expect(
-        AstTestFactory
-            .classTypeAlias("B", null, Keyword.ABSTRACT, null, null, null)
+        AstTestFactory.classTypeAlias(
+                "B", null, Keyword.ABSTRACT, null, null, null)
             .isAbstract,
         isTrue);
   }
@@ -479,8 +477,8 @@
   void test_getBeginToken_nonEmpty() {
     NodeList<AstNode> list =
         astFactory.nodeList<AstNode>(AstTestFactory.argumentList());
-    AstNode node = AstTestFactory
-        .parenthesizedExpression(AstTestFactory.booleanLiteral(true));
+    AstNode node = AstTestFactory.parenthesizedExpression(
+        AstTestFactory.booleanLiteral(true));
     list.add(node);
     expect(list.beginToken, same(node.beginToken));
   }
@@ -494,8 +492,8 @@
   void test_getEndToken_nonEmpty() {
     NodeList<AstNode> list =
         astFactory.nodeList<AstNode>(AstTestFactory.argumentList());
-    AstNode node = AstTestFactory
-        .parenthesizedExpression(AstTestFactory.booleanLiteral(true));
+    AstNode node = AstTestFactory.parenthesizedExpression(
+        AstTestFactory.booleanLiteral(true));
     list.add(node);
     expect(list.endToken, same(node.endToken));
   }
@@ -726,8 +724,9 @@
   }
 
   void test_inGetterContext_constructorFieldInitializer() {
-    ConstructorFieldInitializer initializer = AstTestFactory
-        .constructorFieldInitializer(false, 'f', AstTestFactory.integer(0));
+    ConstructorFieldInitializer initializer =
+        AstTestFactory.constructorFieldInitializer(
+            false, 'f', AstTestFactory.integer(0));
     SimpleIdentifier identifier = initializer.fieldName;
     expect(identifier.inGetterContext(), isFalse);
   }
@@ -743,8 +742,8 @@
     SimpleIdentifier identifier = AstTestFactory.identifier3("a");
     Expression iterator = AstTestFactory.listLiteral();
     Statement body = AstTestFactory.block();
-    // ignore: deprecated_member_use_from_same_package
-    AstTestFactory.forEachStatement2(identifier, iterator, body);
+    AstTestFactory.forStatement(
+        AstTestFactory.forEachPartsWithIdentifier(identifier, iterator), body);
     expect(identifier.inGetterContext(), isFalse);
   }
 
@@ -789,14 +788,14 @@
     SimpleIdentifier identifier = AstTestFactory.identifier3("a");
     Expression iterator = AstTestFactory.listLiteral();
     Statement body = AstTestFactory.block();
-    // ignore: deprecated_member_use_from_same_package
-    AstTestFactory.forEachStatement2(identifier, iterator, body);
+    AstTestFactory.forStatement(
+        AstTestFactory.forEachPartsWithIdentifier(identifier, iterator), body);
     expect(identifier.inSetterContext(), isTrue);
   }
 
   void test_isQualified_inMethodInvocation_noTarget() {
-    MethodInvocation invocation = AstTestFactory
-        .methodInvocation2("test", [AstTestFactory.identifier3("arg0")]);
+    MethodInvocation invocation = AstTestFactory.methodInvocation2(
+        "test", [AstTestFactory.identifier3("arg0")]);
     SimpleIdentifier identifier = invocation.methodName;
     expect(identifier.isQualified, isFalse);
   }
@@ -1242,8 +1241,8 @@
   }
 
   void test_isMultiline() {
-    var b = AstTestFactory
-        .interpolationExpression(AstTestFactory.identifier3('bb'));
+    var b = AstTestFactory.interpolationExpression(
+        AstTestFactory.identifier3('bb'));
     // '
     {
       var a = AstTestFactory.interpolationString("'a", "a");
@@ -1280,8 +1279,8 @@
   }
 
   void test_isSingleQuoted() {
-    var b = AstTestFactory
-        .interpolationExpression(AstTestFactory.identifier3('bb'));
+    var b = AstTestFactory.interpolationExpression(
+        AstTestFactory.identifier3('bb'));
     // "
     {
       var a = AstTestFactory.interpolationString('"a', "a");
diff --git a/pkg/analyzer/test/dart/element/builder_test.dart b/pkg/analyzer/test/dart/element/builder_test.dart
index 5284855..25ba692 100644
--- a/pkg/analyzer/test/dart/element/builder_test.dart
+++ b/pkg/analyzer/test/dart/element/builder_test.dart
@@ -766,9 +766,10 @@
     String variableName = "v";
     DeclaredIdentifier variableIdentifier =
         AstTestFactory.declaredIdentifier3('v');
-    // ignore: deprecated_member_use_from_same_package
-    Statement statement = AstTestFactory.forEachStatement(variableIdentifier,
-        AstTestFactory.listLiteral(), AstTestFactory.block());
+    Statement statement = AstTestFactory.forStatement(
+        AstTestFactory.forEachPartsWithDeclaration(
+            variableIdentifier, AstTestFactory.listLiteral()),
+        AstTestFactory.block());
     _setNodeSourceRange(statement, 100, 110);
     MethodDeclaration method = AstTestFactory.methodDeclaration2(
         null,
@@ -797,11 +798,12 @@
     String variableName = "v";
     VariableDeclaration variableIdentifier =
         AstTestFactory.variableDeclaration('v');
-    ForStatement2 statement = AstTestFactory.forStatement2(
-        AstTestFactory.variableDeclarationList(
-            null, AstTestFactory.typeName4('T'), [variableIdentifier]),
-        null,
-        null,
+    ForStatement statement = AstTestFactory.forStatement(
+        AstTestFactory.forPartsWithDeclarations(
+            AstTestFactory.variableDeclarationList(
+                null, AstTestFactory.typeName4('T'), [variableIdentifier]),
+            null,
+            null),
         AstTestFactory.block());
     _setNodeSourceRange(statement, 100, 110);
     MethodDeclaration method = AstTestFactory.methodDeclaration2(
diff --git a/pkg/analyzer/test/dart/test_all.dart b/pkg/analyzer/test/dart/test_all.dart
index 3575edb..fb48b99 100644
--- a/pkg/analyzer/test/dart/test_all.dart
+++ b/pkg/analyzer/test/dart/test_all.dart
@@ -1,4 +1,4 @@
-// Copyright (c) 2014, the Dart project authors.  Please see the AUTHORS file
+// Copyright (c) 2014, the Dart project authors. Please see the AUTHORS file
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
 
diff --git a/pkg/analyzer/test/error/error_test.dart b/pkg/analyzer/test/error/error_test.dart
index adbf418..379efcd 100644
--- a/pkg/analyzer/test/error/error_test.dart
+++ b/pkg/analyzer/test/error/error_test.dart
@@ -1,4 +1,4 @@
-// Copyright (c) 2017, the Dart project authors.  Please see the AUTHORS file
+// Copyright (c) 2017, the Dart project authors. Please see the AUTHORS file
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
 
@@ -70,7 +70,7 @@
                 member.variables.variables[0].name.name == 'errorCodeValues',
             orElse: () => null);
     ListLiteral listLiteral = declaration.variables.variables[0].initializer;
-    for (PrefixedIdentifier element in listLiteral.elements2) {
+    for (PrefixedIdentifier element in listLiteral.elements) {
       listedCodes.add(element.name);
     }
     return listedCodes;
@@ -91,7 +91,6 @@
       ['lib', 'src', 'dart', 'error', 'hint_codes.dart'],
       ['lib', 'src', 'dart', 'error', 'lint_codes.dart'],
       ['lib', 'src', 'dart', 'error', 'todo_codes.dart'],
-      ['lib', 'src', 'html', 'error', 'html_codes.dart'],
       ['lib', 'src', 'dart', 'error', 'syntactic_errors.dart'],
       ['lib', 'src', 'error', 'codes.dart'],
       ['..', 'front_end', 'lib', 'src', 'scanner', 'errors.dart']
diff --git a/pkg/analyzer/test/error/test_all.dart b/pkg/analyzer/test/error/test_all.dart
index aeadc12..19eca56 100644
--- a/pkg/analyzer/test/error/test_all.dart
+++ b/pkg/analyzer/test/error/test_all.dart
@@ -1,4 +1,4 @@
-// Copyright (c) 2017, the Dart project authors.  Please see the AUTHORS file
+// Copyright (c) 2017, the Dart project authors. Please see the AUTHORS file
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
 
diff --git a/pkg/analyzer/test/generated/analysis_context_factory.dart b/pkg/analyzer/test/generated/analysis_context_factory.dart
index 4ee79f0..e2aef27 100644
--- a/pkg/analyzer/test/generated/analysis_context_factory.dart
+++ b/pkg/analyzer/test/generated/analysis_context_factory.dart
@@ -1,4 +1,4 @@
-// Copyright (c) 2016, the Dart project authors.  Please see the AUTHORS file
+// Copyright (c) 2016, the Dart project authors. Please see the AUTHORS file
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
 
diff --git a/pkg/analyzer/test/generated/checked_mode_compile_time_error_code_test.dart b/pkg/analyzer/test/generated/checked_mode_compile_time_error_code_test.dart
index 46643f5..3601b5c 100644
--- a/pkg/analyzer/test/generated/checked_mode_compile_time_error_code_test.dart
+++ b/pkg/analyzer/test/generated/checked_mode_compile_time_error_code_test.dart
@@ -4,10 +4,9 @@
 
 import 'package:analyzer/src/error/codes.dart';
 import 'package:analyzer/src/generated/engine.dart';
-import 'package:analyzer/src/generated/source_io.dart';
 import 'package:test_reflective_loader/test_reflective_loader.dart';
 
-import 'resolver_test_case.dart';
+import '../src/dart/resolution/driver_resolution.dart';
 
 main() {
   defineReflectiveSuite(() {
@@ -16,30 +15,24 @@
 }
 
 @reflectiveTest
-class CheckedModeCompileTimeErrorCodeTest extends ResolverTestCase {
+class CheckedModeCompileTimeErrorCodeTest extends DriverResolutionTest {
   @override
   AnalysisOptions get defaultAnalysisOptions => new AnalysisOptionsImpl();
 
-  @override
-  bool get enableNewAnalysisDriver => true;
-
   test_assertion_throws() async {
-    Source source = addSource(r'''
+    await assertErrorsInCode(r'''
 class A {
   const A(int x, int y) : assert(x < y);
 }
 var v = const A(3, 2);
-''');
-    await computeAnalysisResult(source);
-    assertErrors(source, [CompileTimeErrorCode.CONST_EVAL_THROWS_EXCEPTION]);
-    verify([source]);
+''', [CompileTimeErrorCode.CONST_EVAL_THROWS_EXCEPTION]);
   }
 
   test_fieldFormalParameterAssignableToField_extends() async {
     // According to checked-mode type checking rules, a value of type B is
     // assignable to a field of type A, because B extends A (and hence is a
     // subtype of A).
-    Source source = addSource(r'''
+    await assertNoErrorsInCode(r'''
 class A {
   const A();
 }
@@ -50,31 +43,27 @@
   final A a;
   const C(this.a);
 }
-var v = const C(const B());''');
-    await computeAnalysisResult(source);
-    assertNoErrors(source);
-    verify([source]);
+var v = const C(const B());
+''');
   }
 
   test_fieldFormalParameterAssignableToField_fieldType_unresolved_null() async {
     // Null always passes runtime type checks, even when the type is
     // unresolved.
-    Source source = addSource(r'''
+    await assertErrorsInCode(r'''
 class A {
   final Unresolved x;
   const A(String this.x);
 }
-var v = const A(null);''');
-    await computeAnalysisResult(source);
-    assertErrors(source, [StaticWarningCode.UNDEFINED_CLASS]);
-    verify([source]);
+var v = const A(null);
+''', [StaticWarningCode.UNDEFINED_CLASS]);
   }
 
   test_fieldFormalParameterAssignableToField_implements() async {
     // According to checked-mode type checking rules, a value of type B is
     // assignable to a field of type A, because B implements A (and hence is a
     // subtype of A).
-    Source source = addSource(r'''
+    await assertNoErrorsInCode(r'''
 class A {}
 class B implements A {
   const B();
@@ -83,152 +72,130 @@
   final A a;
   const C(this.a);
 }
-var v = const C(const B());''');
-    await computeAnalysisResult(source);
-    assertNoErrors(source);
-    verify([source]);
+var v = const C(const B());
+''');
   }
 
   test_fieldFormalParameterAssignableToField_list_dynamic() async {
     // [1, 2, 3] has type List<dynamic>, which is a subtype of List<int>.
-    Source source = addSource(r'''
+    await assertNoErrorsInCode(r'''
 class A {
   const A(List<int> x);
 }
-var x = const A(const [1, 2, 3]);''');
-    await computeAnalysisResult(source);
-    assertNoErrors(source);
-    verify([source]);
+var x = const A(const [1, 2, 3]);
+''');
   }
 
   test_fieldFormalParameterAssignableToField_list_nonDynamic() async {
     // <int>[1, 2, 3] has type List<int>, which is a subtype of List<num>.
-    Source source = addSource(r'''
+    await assertNoErrorsInCode(r'''
 class A {
   const A(List<num> x);
 }
-var x = const A(const <int>[1, 2, 3]);''');
-    await computeAnalysisResult(source);
-    assertNoErrors(source);
-    verify([source]);
+var x = const A(const <int>[1, 2, 3]);
+''');
   }
 
   test_fieldFormalParameterAssignableToField_map_dynamic() async {
     // {1: 2} has type Map<dynamic, dynamic>, which is a subtype of
     // Map<int, int>.
-    Source source = addSource(r'''
+    await assertNoErrorsInCode(r'''
 class A {
   const A(Map<int, int> x);
 }
-var x = const A(const {1: 2});''');
-    await computeAnalysisResult(source);
-    assertNoErrors(source);
-    verify([source]);
+var x = const A(const {1: 2});
+''');
   }
 
   test_fieldFormalParameterAssignableToField_map_keyDifferent() async {
     // <int, int>{1: 2} has type Map<int, int>, which is a subtype of
     // Map<num, int>.
-    Source source = addSource(r'''
+    await assertNoErrorsInCode(r'''
 class A {
   const A(Map<num, int> x);
 }
-var x = const A(const <int, int>{1: 2});''');
-    await computeAnalysisResult(source);
-    assertNoErrors(source);
-    verify([source]);
+var x = const A(const <int, int>{1: 2});
+''');
   }
 
   test_fieldFormalParameterAssignableToField_map_valueDifferent() async {
     // <int, int>{1: 2} has type Map<int, int>, which is a subtype of
     // Map<int, num>.
-    Source source = addSource(r'''
+    await assertNoErrorsInCode(r'''
 class A {
   const A(Map<int, num> x);
 }
-var x = const A(const <int, int>{1: 2});''');
-    await computeAnalysisResult(source);
-    assertNoErrors(source);
-    verify([source]);
+var x = const A(const <int, int>{1: 2});
+''');
   }
 
   test_fieldFormalParameterAssignableToField_notype() async {
     // If a field is declared without a type, then any value may be assigned to
     // it.
-    Source source = addSource(r'''
+    await assertNoErrorsInCode(r'''
 class A {
   final x;
   const A(this.x);
 }
-var v = const A(5);''');
-    await computeAnalysisResult(source);
-    assertNoErrors(source);
-    verify([source]);
+var v = const A(5);
+''');
   }
 
   test_fieldFormalParameterAssignableToField_null() async {
     // Null is assignable to anything.
-    Source source = addSource(r'''
+    await assertNoErrorsInCode(r'''
 class A {
   final int x;
   const A(this.x);
 }
-var v = const A(null);''');
-    await computeAnalysisResult(source);
-    assertNoErrors(source);
-    verify([source]);
+var v = const A(null);
+''');
   }
 
   test_fieldFormalParameterAssignableToField_typedef() async {
     // foo has the runtime type dynamic -> dynamic, so it is not assignable
     // to A.f.
-    Source source = addSource(r'''
+    await assertErrorsInCode(r'''
 typedef String Int2String(int x);
 class A {
   final Int2String f;
   const A(this.f);
 }
 foo(x) => 1;
-var v = const A(foo);''');
-    await computeAnalysisResult(source);
-    assertErrors(source, [StaticWarningCode.ARGUMENT_TYPE_NOT_ASSIGNABLE]);
-    verify([source]);
+var v = const A(foo);
+''', [StaticWarningCode.ARGUMENT_TYPE_NOT_ASSIGNABLE]);
   }
 
   test_fieldFormalParameterAssignableToField_typeSubstitution() async {
     // foo has the runtime type dynamic -> dynamic, so it should be assignable
     // to A.f.
-    Source source = addSource(r'''
+    await assertNoErrorsInCode(r'''
 class A<T> {
   final T x;
   const A(this.x);
 }
-var v = const A<int>(3);''');
-    await computeAnalysisResult(source);
-    assertNoErrors(source);
-    verify([source]);
+var v = const A<int>(3);
+''');
   }
 
   test_fieldFormalParameterNotAssignableToField() async {
-    Source source = addSource(r'''
+    await assertErrorsInCode(r'''
 class A {
   final int x;
   const A(this.x);
 }
-var v = const A('foo');''');
-    await computeAnalysisResult(source);
-    assertErrors(source, [
+var v = const A('foo');
+''', [
       CheckedModeCompileTimeErrorCode.CONST_CONSTRUCTOR_PARAM_TYPE_MISMATCH,
       StaticWarningCode.ARGUMENT_TYPE_NOT_ASSIGNABLE
     ]);
-    verify([source]);
   }
 
   test_fieldFormalParameterNotAssignableToField_extends() async {
     // According to checked-mode type checking rules, a value of type A is not
     // assignable to a field of type B, because B extends A (the subtyping
     // relationship is in the wrong direction).
-    Source source = addSource(r'''
+    await assertErrorsInCode(r'''
 class A {
   const A();
 }
@@ -240,49 +207,41 @@
   const C(this.b);
 }
 const A u = const A();
-var v = const C(u);''');
-    await computeAnalysisResult(source);
-    assertErrors(source, [
-      CheckedModeCompileTimeErrorCode.CONST_CONSTRUCTOR_PARAM_TYPE_MISMATCH
-    ]);
-    verify([source]);
+var v = const C(u);
+''', [CheckedModeCompileTimeErrorCode.CONST_CONSTRUCTOR_PARAM_TYPE_MISMATCH]);
   }
 
   test_fieldFormalParameterNotAssignableToField_fieldType() async {
-    Source source = addSource(r'''
+    await assertErrorsInCode(r'''
 class A {
   final int x;
   const A(this.x);
 }
-var v = const A('foo');''');
-    await computeAnalysisResult(source);
-    assertErrors(source, [
+var v = const A('foo');
+''', [
       CheckedModeCompileTimeErrorCode.CONST_CONSTRUCTOR_PARAM_TYPE_MISMATCH,
       StaticWarningCode.ARGUMENT_TYPE_NOT_ASSIGNABLE
     ]);
-    verify([source]);
   }
 
   test_fieldFormalParameterNotAssignableToField_fieldType_unresolved() async {
-    Source source = addSource(r'''
+    await assertErrorsInCode(r'''
 class A {
   final Unresolved x;
   const A(String this.x);
 }
-var v = const A('foo');''');
-    await computeAnalysisResult(source);
-    assertErrors(source, [
+var v = const A('foo');
+''', [
       CheckedModeCompileTimeErrorCode.CONST_CONSTRUCTOR_PARAM_TYPE_MISMATCH,
       StaticWarningCode.UNDEFINED_CLASS
     ]);
-    verify([source]);
   }
 
   test_fieldFormalParameterNotAssignableToField_implements() async {
     // According to checked-mode type checking rules, a value of type A is not
     // assignable to a field of type B, because B implements A (the subtyping
     // relationship is in the wrong direction).
-    Source source = addSource(r'''
+    await assertErrorsInCode(r'''
 class A {
   const A();
 }
@@ -292,333 +251,266 @@
   const C(this.b);
 }
 const A u = const A();
-var v = const C(u);''');
-    await computeAnalysisResult(source);
-    assertErrors(source, [
-      CheckedModeCompileTimeErrorCode.CONST_CONSTRUCTOR_PARAM_TYPE_MISMATCH
-    ]);
-    verify([source]);
+var v = const C(u);
+''', [CheckedModeCompileTimeErrorCode.CONST_CONSTRUCTOR_PARAM_TYPE_MISMATCH]);
   }
 
   test_fieldFormalParameterNotAssignableToField_list() async {
     // <num>[1, 2, 3] has type List<num>, which is not a subtype of List<int>.
-    Source source = addSource(r'''
+    await assertErrorsInCode(r'''
 class A {
   const A(List<int> x);
 }
 const dynamic w = const <num>[1, 2, 3];
-var x = const A(w);''');
-    await computeAnalysisResult(source);
-    assertErrors(source, [
-      CheckedModeCompileTimeErrorCode.CONST_CONSTRUCTOR_PARAM_TYPE_MISMATCH
-    ]);
-    verify([source]);
+var x = const A(w);
+''', [CheckedModeCompileTimeErrorCode.CONST_CONSTRUCTOR_PARAM_TYPE_MISMATCH]);
   }
 
   test_fieldFormalParameterNotAssignableToField_map_keyMismatch() async {
     // <num, int>{1: 2} has type Map<num, int>, which is not a subtype of
     // Map<int, int>.
-    Source source = addSource(r'''
+    await assertErrorsInCode(r'''
 class A {
   const A(Map<int, int> x);
 }
 const dynamic w = const <num, int>{1: 2};
-var x = const A(w);''');
-    await computeAnalysisResult(source);
-    assertErrors(source, [
-      CheckedModeCompileTimeErrorCode.CONST_CONSTRUCTOR_PARAM_TYPE_MISMATCH
-    ]);
-    verify([source]);
+var x = const A(w);
+''', [CheckedModeCompileTimeErrorCode.CONST_CONSTRUCTOR_PARAM_TYPE_MISMATCH]);
   }
 
   test_fieldFormalParameterNotAssignableToField_map_valueMismatch() async {
     // <int, num>{1: 2} has type Map<int, num>, which is not a subtype of
     // Map<int, int>.
-    Source source = addSource(r'''
+    await assertErrorsInCode(r'''
 class A {
   const A(Map<int, int> x);
 }
 const dynamic w = const <int, num>{1: 2};
-var x = const A(w);''');
-    await computeAnalysisResult(source);
-    assertErrors(source, [
-      CheckedModeCompileTimeErrorCode.CONST_CONSTRUCTOR_PARAM_TYPE_MISMATCH
-    ]);
-    verify([source]);
+var x = const A(w);
+''', [CheckedModeCompileTimeErrorCode.CONST_CONSTRUCTOR_PARAM_TYPE_MISMATCH]);
   }
 
   test_fieldFormalParameterNotAssignableToField_optional() async {
-    Source source = addSource(r'''
+    await assertErrorsInCode(r'''
 class A {
   final int x;
   const A([this.x = 'foo']);
 }
-var v = const A();''');
-    await computeAnalysisResult(source);
-    assertErrors(source, [
+var v = const A();
+''', [
       CheckedModeCompileTimeErrorCode.CONST_CONSTRUCTOR_PARAM_TYPE_MISMATCH,
       StaticTypeWarningCode.INVALID_ASSIGNMENT
     ]);
-    verify([source]);
   }
 
   test_fieldFormalParameterNotAssignableToField_typedef() async {
     // foo has the runtime type String -> int, so it should not be assignable
     // to A.f (A.f requires it to be int -> String).
-    Source source = addSource(r'''
+    await assertErrorsInCode(r'''
 typedef String Int2String(int x);
 class A {
   final Int2String f;
   const A(this.f);
 }
 int foo(String x) => 1;
-var v = const A(foo);''');
-    await computeAnalysisResult(source);
-    assertErrors(source, [
+var v = const A(foo);
+''', [
       CheckedModeCompileTimeErrorCode.CONST_CONSTRUCTOR_PARAM_TYPE_MISMATCH,
       StaticWarningCode.ARGUMENT_TYPE_NOT_ASSIGNABLE
     ]);
-    verify([source]);
   }
 
   test_fieldInitializerNotAssignable() async {
-    Source source = addSource(r'''
+    await assertErrorsInCode(r'''
 class A {
   final int x;
   const A() : x = '';
-}''');
-    await computeAnalysisResult(source);
-    assertErrors(source, [
+}
+''', [
       CheckedModeCompileTimeErrorCode.CONST_FIELD_INITIALIZER_NOT_ASSIGNABLE,
       StaticWarningCode.FIELD_INITIALIZER_NOT_ASSIGNABLE
     ]);
-    verify([source]);
   }
 
   test_fieldTypeMismatch() async {
-    Source source = addSource(r'''
+    await assertErrorsInCode(r'''
 class A {
   const A(x) : y = x;
   final int y;
 }
-var v = const A('foo');''');
-    await computeAnalysisResult(source);
-    assertErrors(source, [
-      CheckedModeCompileTimeErrorCode.CONST_CONSTRUCTOR_FIELD_TYPE_MISMATCH
-    ]);
-    verify([source]);
+var v = const A('foo');
+''', [CheckedModeCompileTimeErrorCode.CONST_CONSTRUCTOR_FIELD_TYPE_MISMATCH]);
   }
 
   test_fieldTypeMismatch_generic() async {
-    Source source = addSource(r'''
+    await assertErrorsInCode(
+      r'''
 class C<T> {
   final T x = y;
   const C();
 }
 const int y = 1;
 var v = const C<String>();
-''');
-    await computeAnalysisResult(source);
-    assertErrors(
-      source,
+''',
       [
         CheckedModeCompileTimeErrorCode.CONST_CONSTRUCTOR_FIELD_TYPE_MISMATCH,
         StaticTypeWarningCode.INVALID_ASSIGNMENT
       ],
     );
-    verify([source]);
   }
 
   test_fieldTypeMismatch_unresolved() async {
-    Source source = addSource(r'''
+    await assertErrorsInCode(r'''
 class A {
   const A(x) : y = x;
   final Unresolved y;
 }
-var v = const A('foo');''');
-    await computeAnalysisResult(source);
-    assertErrors(source, [
+var v = const A('foo');
+''', [
       CheckedModeCompileTimeErrorCode.CONST_CONSTRUCTOR_FIELD_TYPE_MISMATCH,
       StaticWarningCode.UNDEFINED_CLASS
     ]);
-    verify([source]);
   }
 
   test_fieldTypeOk_generic() async {
-    Source source = addSource(r'''
+    await assertErrorsInCode(
+      r'''
 class C<T> {
   final T x = y;
   const C();
 }
 const int y = 1;
 var v = const C<int>();
-''');
-    await computeAnalysisResult(source);
-    assertErrors(
-      source,
+''',
       [StaticTypeWarningCode.INVALID_ASSIGNMENT],
     );
-    verify([source]);
   }
 
   test_fieldTypeOk_null() async {
-    Source source = addSource(r'''
+    await assertNoErrorsInCode(r'''
 class A {
   const A(x) : y = x;
   final int y;
 }
-var v = const A(null);''');
-    await computeAnalysisResult(source);
-    assertNoErrors(source);
-    verify([source]);
+var v = const A(null);
+''');
   }
 
   test_fieldTypeOk_unresolved_null() async {
     // Null always passes runtime type checks, even when the type is
     // unresolved.
-    Source source = addSource(r'''
+    await assertErrorsInCode(r'''
 class A {
   const A(x) : y = x;
   final Unresolved y;
 }
-var v = const A(null);''');
-    await computeAnalysisResult(source);
-    assertErrors(source, [StaticWarningCode.UNDEFINED_CLASS]);
-    verify([source]);
+var v = const A(null);
+''', [StaticWarningCode.UNDEFINED_CLASS]);
   }
 
   test_listElementTypeNotAssignable() async {
-    Source source = addSource("var v = const <String> [42];");
-    await computeAnalysisResult(source);
-    assertErrors(source, [StaticWarningCode.LIST_ELEMENT_TYPE_NOT_ASSIGNABLE]);
-    verify([source]);
+    await assertErrorsInCode('''
+var v = const <String> [42];
+''', [StaticWarningCode.LIST_ELEMENT_TYPE_NOT_ASSIGNABLE]);
   }
 
   test_listLiteral_inferredElementType() async {
-    Source source = addSource('''
+    await assertErrorsInCode('''
 const Object x = [1];
 const List<String> y = x;
-''');
-    await computeAnalysisResult(source);
-    assertErrors(
-        source, [CheckedModeCompileTimeErrorCode.VARIABLE_TYPE_MISMATCH]);
-    verify([source]);
+''', [CheckedModeCompileTimeErrorCode.VARIABLE_TYPE_MISMATCH]);
   }
 
   test_mapLiteral_inferredKeyType() async {
-    Source source = addSource('''
+    await assertErrorsInCode('''
 const Object x = {1: 1};
 const Map<String, dynamic> y = x;
-''');
-    await computeAnalysisResult(source);
-    assertErrors(
-        source, [CheckedModeCompileTimeErrorCode.VARIABLE_TYPE_MISMATCH]);
-    verify([source]);
+''', [CheckedModeCompileTimeErrorCode.VARIABLE_TYPE_MISMATCH]);
   }
 
   test_mapLiteral_inferredValueType() async {
-    Source source = addSource('''
+    await assertErrorsInCode('''
 const Object x = {1: 1};
 const Map<dynamic, String> y = x;
-''');
-    await computeAnalysisResult(source);
-    assertErrors(
-        source, [CheckedModeCompileTimeErrorCode.VARIABLE_TYPE_MISMATCH]);
-    verify([source]);
+''', [CheckedModeCompileTimeErrorCode.VARIABLE_TYPE_MISMATCH]);
   }
 
   test_parameterAssignable_null() async {
     // Null is assignable to anything.
-    Source source = addSource(r'''
+    await assertNoErrorsInCode(r'''
 class A {
   const A(int x);
 }
 var v = const A(null);''');
-    await computeAnalysisResult(source);
-    assertNoErrors(source);
-    verify([source]);
   }
 
   test_parameterAssignable_typeSubstitution() async {
-    Source source = addSource(r'''
+    await assertNoErrorsInCode(r'''
 class A<T> {
   const A(T x);
 }
 var v = const A<int>(3);''');
-    await computeAnalysisResult(source);
-    assertNoErrors(source);
-    verify([source]);
   }
 
   test_parameterAssignable_undefined_null() async {
     // Null always passes runtime type checks, even when the type is
     // unresolved.
-    Source source = addSource(r'''
+    await assertErrorsInCode(r'''
 class A {
   const A(Unresolved x);
 }
-var v = const A(null);''');
-    await computeAnalysisResult(source);
-    assertErrors(source, [StaticWarningCode.UNDEFINED_CLASS]);
-    verify([source]);
+var v = const A(null);
+''', [StaticWarningCode.UNDEFINED_CLASS]);
   }
 
   test_parameterNotAssignable() async {
-    Source source = addSource(r'''
+    await assertErrorsInCode(r'''
 class A {
   const A(int x);
 }
-var v = const A('foo');''');
-    await computeAnalysisResult(source);
-    assertErrors(source, [
+var v = const A('foo');
+''', [
       CheckedModeCompileTimeErrorCode.CONST_CONSTRUCTOR_PARAM_TYPE_MISMATCH,
       StaticWarningCode.ARGUMENT_TYPE_NOT_ASSIGNABLE
     ]);
-    verify([source]);
   }
 
   test_parameterNotAssignable_typeSubstitution() async {
-    Source source = addSource(r'''
+    await assertErrorsInCode(r'''
 class A<T> {
   const A(T x);
 }
-var v = const A<int>('foo');''');
-    await computeAnalysisResult(source);
-    assertErrors(source, [
+var v = const A<int>('foo');
+''', [
       CheckedModeCompileTimeErrorCode.CONST_CONSTRUCTOR_PARAM_TYPE_MISMATCH,
       StaticWarningCode.ARGUMENT_TYPE_NOT_ASSIGNABLE
     ]);
-    verify([source]);
   }
 
   test_parameterNotAssignable_undefined() async {
-    Source source = addSource(r'''
+    await assertErrorsInCode(r'''
 class A {
   const A(Unresolved x);
 }
-var v = const A('foo');''');
-    await computeAnalysisResult(source);
-    assertErrors(source, [
+var v = const A('foo');
+''', [
       CheckedModeCompileTimeErrorCode.CONST_CONSTRUCTOR_PARAM_TYPE_MISMATCH,
       StaticWarningCode.UNDEFINED_CLASS
     ]);
-    verify([source]);
   }
 
   test_redirectingConstructor_paramTypeMismatch() async {
-    Source source = addSource(r'''
+    await assertErrorsInCode(r'''
 class A {
   const A.a1(x) : this.a2(x);
   const A.a2(String x);
 }
-var v = const A.a1(0);''');
-    await computeAnalysisResult(source);
-    assertErrors(source, [CompileTimeErrorCode.CONST_EVAL_THROWS_EXCEPTION]);
-    verify([source]);
+var v = const A.a1(0);
+''', [CompileTimeErrorCode.CONST_EVAL_THROWS_EXCEPTION]);
   }
 
   test_superConstructor_paramTypeMismatch() async {
-    Source source = addSource(r'''
+    await assertErrorsInCode(r'''
 class C {
   final double d;
   const C(this.d);
@@ -627,45 +519,38 @@
   const D(d) : super(d);
 }
 const f = const D('0.0');
-''');
-    await computeAnalysisResult(source);
-    assertErrors(source, [CompileTimeErrorCode.CONST_EVAL_THROWS_EXCEPTION]);
-    verify([source]);
+''', [CompileTimeErrorCode.CONST_EVAL_THROWS_EXCEPTION]);
   }
 
   test_topLevelVarAssignable_null() async {
-    Source source = addSource("const int x = null;");
-    await computeAnalysisResult(source);
-    assertNoErrors(source);
-    verify([source]);
+    await assertNoErrorsInCode('''
+const int x = null;
+''');
   }
 
   test_topLevelVarAssignable_undefined_null() async {
     // Null always passes runtime type checks, even when the type is
     // unresolved.
-    Source source = addSource("const Unresolved x = null;");
-    await computeAnalysisResult(source);
-    assertErrors(source, [StaticWarningCode.UNDEFINED_CLASS]);
-    verify([source]);
+    await assertErrorsInCode('''
+const Unresolved x = null;
+''', [StaticWarningCode.UNDEFINED_CLASS]);
   }
 
   test_topLevelVarNotAssignable() async {
-    Source source = addSource("const int x = 'foo';");
-    await computeAnalysisResult(source);
-    assertErrors(source, [
+    await assertErrorsInCode('''
+const int x = 'foo';
+''', [
       CheckedModeCompileTimeErrorCode.VARIABLE_TYPE_MISMATCH,
       StaticTypeWarningCode.INVALID_ASSIGNMENT
     ]);
-    verify([source]);
   }
 
   test_topLevelVarNotAssignable_undefined() async {
-    Source source = addSource("const Unresolved x = 'foo';");
-    await computeAnalysisResult(source);
-    assertErrors(source, [
+    await assertErrorsInCode('''
+const Unresolved x = 'foo';
+''', [
       CheckedModeCompileTimeErrorCode.VARIABLE_TYPE_MISMATCH,
       StaticWarningCode.UNDEFINED_CLASS
     ]);
-    verify([source]);
   }
 }
diff --git a/pkg/analyzer/test/generated/compile_time_error_code.dart b/pkg/analyzer/test/generated/compile_time_error_code.dart
index 4a4f04d..b767777 100644
--- a/pkg/analyzer/test/generated/compile_time_error_code.dart
+++ b/pkg/analyzer/test/generated/compile_time_error_code.dart
@@ -6,9 +6,7 @@
 
 import 'package:analyzer/dart/analysis/declared_variables.dart';
 import 'package:analyzer/error/error.dart';
-import 'package:analyzer/src/context/context.dart';
 import 'package:analyzer/src/error/codes.dart';
-import 'package:analyzer/src/generated/engine.dart';
 import 'package:analyzer/src/generated/parser.dart' show ParserErrorCode;
 import 'package:analyzer/src/generated/source_io.dart';
 import 'package:test/test.dart' show expect;
@@ -23,43 +21,39 @@
 
     // TODO(paulberry): this test is currently disabled due to non-termination
     // bugs elsewhere in the analyzer.
-    Source source = addSource('''
+    await assertErrorsInCode('''
 class A<T> implements B<List<T>> {}
 class B<T> implements A<List<T>> {}
-''');
-    await computeAnalysisResult(source);
-    assertErrors(source, [CompileTimeErrorCode.CONFLICTING_GENERIC_INTERFACES]);
+''', [CompileTimeErrorCode.CONFLICTING_GENERIC_INTERFACES]);
   }
 
   test_accessPrivateEnumField() async {
-    Source source = addSource(r'''
+    await assertErrorsInCode(r'''
 enum E { ONE }
 String name(E e) {
   return e._name;
-}''');
-    await computeAnalysisResult(source);
-    assertErrors(source, [CompileTimeErrorCode.ACCESS_PRIVATE_ENUM_FIELD]);
-    // Cannot verify because "_name" cannot be resolved.
+}
+''', [CompileTimeErrorCode.ACCESS_PRIVATE_ENUM_FIELD], verify: false);
   }
 
   test_ambiguousExport() async {
-    Source source = addSource(r'''
+    newFile("/lib1.dart", content: r'''
+library lib1;
+class N {}
+''');
+    newFile("/lib2.dart", content: r'''
+library lib2;
+class N {}
+''');
+    await assertErrorsInCode(r'''
 library L;
 export 'lib1.dart';
-export 'lib2.dart';''');
-    addNamedSource("/lib1.dart", r'''
-library lib1;
-class N {}''');
-    addNamedSource("/lib2.dart", r'''
-library lib2;
-class N {}''');
-    await computeAnalysisResult(source);
-    assertErrors(source, [CompileTimeErrorCode.AMBIGUOUS_EXPORT]);
-    verify([source]);
+export 'lib2.dart';
+''', [CompileTimeErrorCode.AMBIGUOUS_EXPORT]);
   }
 
   test_annotationWithNotClass() async {
-    Source source = addSource('''
+    await assertErrorsInCode('''
 class Property {
   final int value;
   const Property(this.value);
@@ -70,14 +64,11 @@
 @property(123)
 main() {
 }
-''');
-    await computeAnalysisResult(source);
-    assertErrors(source, [CompileTimeErrorCode.ANNOTATION_WITH_NON_CLASS]);
-    verify([source]);
+''', [CompileTimeErrorCode.ANNOTATION_WITH_NON_CLASS]);
   }
 
   test_annotationWithNotClass_prefixed() async {
-    addNamedSource("/annotations.dart", r'''
+    newFile("/annotations.dart", content: r'''
 class Property {
   final int value;
   const Property(this.value);
@@ -85,512 +76,133 @@
 
 const Property property = const Property(42);
 ''');
-    Source source = addSource('''
+    await assertErrorsInCode('''
 import 'annotations.dart' as pref;
 @pref.property(123)
 main() {
 }
-''');
-    await computeAnalysisResult(source);
-    assertErrors(source, [CompileTimeErrorCode.ANNOTATION_WITH_NON_CLASS]);
-    verify([source]);
-  }
-
-  test_async_used_as_identifier_in_annotation() async {
-    Source source = addSource('''
-const int async = 0;
-f() async {
-  g(@async x) {}
-  g(0);
-}
-''');
-    await computeAnalysisResult(source);
-    assertErrors(source, [ParserErrorCode.ASYNC_KEYWORD_USED_AS_IDENTIFIER]);
-    verify([source]);
-  }
-
-  test_async_used_as_identifier_in_argument_label() async {
-    Source source = addSource('''
-f(c) async {
-  c.g(async: 0);
-}
-''');
-    await computeAnalysisResult(source);
-    assertErrors(source, [ParserErrorCode.ASYNC_KEYWORD_USED_AS_IDENTIFIER]);
-    verify([source]);
-  }
-
-  test_async_used_as_identifier_in_async_method() async {
-    Source source = addSource('''
-f() async {
-  var async = 1;
-}
-''');
-    await computeAnalysisResult(source);
-    assertErrors(source, [ParserErrorCode.ASYNC_KEYWORD_USED_AS_IDENTIFIER]);
-    verify([source]);
-  }
-
-  test_async_used_as_identifier_in_async_star_method() async {
-    Source source = addSource('''
-f() async* {
-  var async = 1;
-}
-''');
-    await computeAnalysisResult(source);
-    assertErrors(source, [ParserErrorCode.ASYNC_KEYWORD_USED_AS_IDENTIFIER]);
-    verify([source]);
-  }
-
-  test_async_used_as_identifier_in_break_statement() async {
-    Source source = addSource('''
-f() async {
-  while (true) {
-    break async;
-  }
-}
-''');
-    await computeAnalysisResult(source);
-    assertErrors(source, [
-      ParserErrorCode.ASYNC_KEYWORD_USED_AS_IDENTIFIER,
-      CompileTimeErrorCode.LABEL_UNDEFINED
-    ]);
-    // Note: we don't call verify([source]) because the reference to the
-    // "async" label is unresolved.
-  }
-
-  test_async_used_as_identifier_in_cascaded_invocation() async {
-    Source source = addSource('''
-class C {
-  int async() => 1;
-}
-f() async {
-  return new C()..async();
-}
-''');
-    await computeAnalysisResult(source);
-    assertErrors(source, [ParserErrorCode.ASYNC_KEYWORD_USED_AS_IDENTIFIER]);
-    verify([source]);
-  }
-
-  test_async_used_as_identifier_in_cascaded_setter_invocation() async {
-    Source source = addSource('''
-class C {
-  void set async(int i) {}
-}
-f() async {
-  return new C()..async = 1;
-}
-''');
-    await computeAnalysisResult(source);
-    assertErrors(source, [ParserErrorCode.ASYNC_KEYWORD_USED_AS_IDENTIFIER]);
-    verify([source]);
-  }
-
-  test_async_used_as_identifier_in_catch_exception_argument() async {
-    Source source = addSource('''
-g() {}
-f() async {
-  try {
-    g();
-  } catch (async) { }
-}
-''');
-    await computeAnalysisResult(source);
-    assertErrors(source, [ParserErrorCode.ASYNC_KEYWORD_USED_AS_IDENTIFIER]);
-    verify([source]);
-  }
-
-  test_async_used_as_identifier_in_catch_stacktrace_argument() async {
-    Source source = addSource('''
-g() {}
-f() async {
-  try {
-    g();
-  } catch (e, async) { }
-}
-''');
-    await computeAnalysisResult(source);
-    assertErrors(source, [ParserErrorCode.ASYNC_KEYWORD_USED_AS_IDENTIFIER]);
-    verify([source]);
-  }
-
-  test_async_used_as_identifier_in_continue_statement() async {
-    Source source = addSource('''
-f() async {
-  while (true) {
-    continue async;
-  }
-}
-''');
-    await computeAnalysisResult(source);
-    assertErrors(source, [
-      ParserErrorCode.ASYNC_KEYWORD_USED_AS_IDENTIFIER,
-      CompileTimeErrorCode.LABEL_UNDEFINED
-    ]);
-    // Note: we don't call verify([source]) because the reference to the
-    // "async" label is unresolved.
-  }
-
-  test_async_used_as_identifier_in_for_statement() async {
-    Source source = addSource('''
-var async;
-f() async {
-  for (async in []) {}
-}
-''');
-    await computeAnalysisResult(source);
-    assertErrors(source, [ParserErrorCode.ASYNC_KEYWORD_USED_AS_IDENTIFIER]);
-    verify([source]);
-  }
-
-  test_async_used_as_identifier_in_formal_parameter_name() async {
-    Source source = addSource('''
-f() async {
-  g(int async) {}
-  g(0);
-}
-''');
-    await computeAnalysisResult(source);
-    assertErrors(source, [ParserErrorCode.ASYNC_KEYWORD_USED_AS_IDENTIFIER]);
-    verify([source]);
-  }
-
-  test_async_used_as_identifier_in_getter_name() async {
-    Source source = addSource('''
-class C {
-  int get async => 1;
-}
-f() async {
-  return new C().async;
-}
-''');
-    await computeAnalysisResult(source);
-    assertErrors(source, [ParserErrorCode.ASYNC_KEYWORD_USED_AS_IDENTIFIER]);
-    verify([source]);
-  }
-
-  test_async_used_as_identifier_in_invocation() async {
-    Source source = addSource('''
-class C {
-  int async() => 1;
-}
-f() async {
-  return new C().async();
-}
-''');
-    await computeAnalysisResult(source);
-    assertErrors(source, [ParserErrorCode.ASYNC_KEYWORD_USED_AS_IDENTIFIER]);
-    verify([source]);
-  }
-
-  test_async_used_as_identifier_in_local_function_name() async {
-    Source source = addSource('''
-f() async {
-  int async() => null;
-}
-''');
-    await computeAnalysisResult(source);
-    assertErrors(source, [ParserErrorCode.ASYNC_KEYWORD_USED_AS_IDENTIFIER]);
-    verify([source]);
-  }
-
-  test_async_used_as_identifier_in_prefix() async {
-    Source source = addSource('''
-import 'dart:async' as async;
-f() async {
-  return new async.Future.value(0);
-}
-''');
-    await computeAnalysisResult(source);
-    assertErrors(source, [ParserErrorCode.ASYNC_KEYWORD_USED_AS_IDENTIFIER]);
-    verify([source]);
-  }
-
-  test_async_used_as_identifier_in_setter_name() async {
-    Source source = addSource('''
-class C {
-  void set async(int i) {}
-}
-f() async {
-  new C().async = 1;
-}
-''');
-    await computeAnalysisResult(source);
-    assertErrors(source, [ParserErrorCode.ASYNC_KEYWORD_USED_AS_IDENTIFIER]);
-    verify([source]);
-  }
-
-  test_async_used_as_identifier_in_statement_label() async {
-    Source source = addSource('''
-f() async {
-  async: g();
-}
-g() {}
-''');
-    await computeAnalysisResult(source);
-    assertErrors(source, [
-      ParserErrorCode.ASYNC_KEYWORD_USED_AS_IDENTIFIER,
-      HintCode.UNUSED_LABEL
-    ]);
-    verify([source]);
-  }
-
-  test_async_used_as_identifier_in_string_interpolation() async {
-    Source source = addSource(r'''
-int async = 1;
-f() async {
-  return "$async";
-}
-''');
-    await computeAnalysisResult(source);
-    assertErrors(source, [ParserErrorCode.ASYNC_KEYWORD_USED_AS_IDENTIFIER]);
-    verify([source]);
-  }
-
-  test_async_used_as_identifier_in_suffix() async {
-    addNamedSource("/lib1.dart", r'''
-library lib1;
-int async;
-''');
-    Source source = addSource('''
-import 'lib1.dart' as l;
-f() async {
-  return l.async;
-}
-''');
-    await computeAnalysisResult(source);
-    assertErrors(source, [ParserErrorCode.ASYNC_KEYWORD_USED_AS_IDENTIFIER]);
-    verify([source]);
-  }
-
-  test_async_used_as_identifier_in_switch_label() async {
-    Source source = addSource('''
-f() async {
-  switch (0) {
-    async: case 0: break;
-  }
-}
-''');
-    await computeAnalysisResult(source);
-    assertErrors(source, [
-      ParserErrorCode.ASYNC_KEYWORD_USED_AS_IDENTIFIER,
-      HintCode.UNUSED_LABEL
-    ]);
-    verify([source]);
-  }
-
-  test_async_used_as_identifier_in_sync_star_method() async {
-    Source source = addSource('''
-f() sync* {
-  var async = 1;
-}
-''');
-    await computeAnalysisResult(source);
-    assertErrors(source, [ParserErrorCode.ASYNC_KEYWORD_USED_AS_IDENTIFIER]);
-    verify([source]);
+''', [CompileTimeErrorCode.ANNOTATION_WITH_NON_CLASS]);
   }
 
   test_asyncForInWrongContext() async {
-    Source source = addSource(r'''
+    await assertErrorsInCode(r'''
 f(list) {
   await for (var e in list) {
   }
-}''');
-    await computeAnalysisResult(source);
-    assertErrors(source, [CompileTimeErrorCode.ASYNC_FOR_IN_WRONG_CONTEXT]);
-    verify([source]);
-  }
-
-  test_await_used_as_identifier_in_async_method() async {
-    Source source = addSource('''
-f() async {
-  var await = 1;
 }
-''');
-    await computeAnalysisResult(source);
-    assertErrors(source, [ParserErrorCode.ASYNC_KEYWORD_USED_AS_IDENTIFIER]);
-    verify([source]);
-  }
-
-  test_await_used_as_identifier_in_async_star_method() async {
-    Source source = addSource('''
-f() async* {
-  var await = 1;
-}
-''');
-    await computeAnalysisResult(source);
-    assertErrors(source, [ParserErrorCode.ASYNC_KEYWORD_USED_AS_IDENTIFIER]);
-    verify([source]);
-  }
-
-  test_await_used_as_identifier_in_sync_star_method() async {
-    Source source = addSource('''
-f() sync* {
-  var await = 1;
-}
-''');
-    await computeAnalysisResult(source);
-    assertErrors(source, [ParserErrorCode.ASYNC_KEYWORD_USED_AS_IDENTIFIER]);
-    verify([source]);
+''', [CompileTimeErrorCode.ASYNC_FOR_IN_WRONG_CONTEXT]);
   }
 
   test_awaitInWrongContext_sync() async {
     // This test requires better error recovery than we currently have. In
     // particular, we need to be able to distinguish between an await expression
     // in the wrong context, and the use of 'await' as an identifier.
-    Source source = addSource(r'''
+    await assertErrorsInCode(r'''
 f(x) {
   return await x;
-}''');
-    await computeAnalysisResult(source);
-    assertErrors(source, [CompileTimeErrorCode.AWAIT_IN_WRONG_CONTEXT]);
-    verify([source]);
+}
+''', [CompileTimeErrorCode.AWAIT_IN_WRONG_CONTEXT]);
   }
 
   test_awaitInWrongContext_syncStar() async {
     // This test requires better error recovery than we currently have. In
     // particular, we need to be able to distinguish between an await expression
     // in the wrong context, and the use of 'await' as an identifier.
-    Source source = addSource(r'''
+    await assertErrorsInCode(r'''
 f(x) sync* {
   yield await x;
-}''');
-    await computeAnalysisResult(source);
-    if (usingFastaParser) {
-      assertErrors(source, [CompileTimeErrorCode.AWAIT_IN_WRONG_CONTEXT]);
-    }
-    verify([source]);
+}
+''', [CompileTimeErrorCode.AWAIT_IN_WRONG_CONTEXT]);
   }
 
   test_bug_23176() async {
-    Source source = addSource('''
+    await assertErrorsInCode('''
 class A {
   const A([x]);
 }
 class B {
   dynamic @A(const A()) x;
 }
-''');
-    await computeAnalysisResult(source);
-    assertErrors(
-        source,
-        usingFastaParser
-            ? [
-                ParserErrorCode.MISSING_CONST_FINAL_VAR_OR_TYPE,
-                ParserErrorCode.MISSING_CONST_FINAL_VAR_OR_TYPE,
-                ParserErrorCode.EXPECTED_TOKEN
-              ]
-            : [
-                ParserErrorCode.EXPECTED_CLASS_MEMBER,
-                ParserErrorCode.MISSING_CONST_FINAL_VAR_OR_TYPE
-              ]);
-    verify([source]);
+''', [
+      ParserErrorCode.MISSING_CONST_FINAL_VAR_OR_TYPE,
+      ParserErrorCode.MISSING_CONST_FINAL_VAR_OR_TYPE,
+      ParserErrorCode.EXPECTED_TOKEN
+    ]);
   }
 
   test_builtInIdentifierAsMixinName_classTypeAlias() async {
-    Source source = addSource(r'''
+    await assertErrorsInCode(r'''
 class A {}
 class B {}
-class as = A with B;''');
-    await computeAnalysisResult(source);
-    assertErrors(
-        source, [CompileTimeErrorCode.BUILT_IN_IDENTIFIER_AS_TYPEDEF_NAME]);
-    verify([source]);
+class as = A with B;
+''', [CompileTimeErrorCode.BUILT_IN_IDENTIFIER_AS_TYPEDEF_NAME]);
   }
 
   test_builtInIdentifierAsPrefixName() async {
-    Source source = addSource("import 'dart:async' as abstract;");
-    await computeAnalysisResult(source);
-    assertErrors(source, [
+    await assertErrorsInCode('''
+import 'dart:async' as abstract;
+''', [
       CompileTimeErrorCode.BUILT_IN_IDENTIFIER_AS_PREFIX_NAME,
       HintCode.UNUSED_IMPORT
     ]);
-    verify([source]);
   }
 
   test_builtInIdentifierAsType_dynamicMissingPrefix() async {
-    Source source = addSource(r"""
+    await assertErrorsInCode('''
 import 'dart:core' as core;
 
 dynamic x;
-""");
-    await computeAnalysisResult(source);
-    assertErrors(source, [CompileTimeErrorCode.BUILT_IN_IDENTIFIER_AS_TYPE]);
+''', [CompileTimeErrorCode.BUILT_IN_IDENTIFIER_AS_TYPE]);
   }
 
   test_builtInIdentifierAsType_formalParameter_field() async {
-    Source source = addSource(r'''
+    await assertErrorsInCode(r'''
 class A {
   var x;
   A(static this.x);
-}''');
-    await computeAnalysisResult(source);
-    assertErrors(
-        source,
-        usingFastaParser
-            ? [ParserErrorCode.EXTRANEOUS_MODIFIER]
-            : [CompileTimeErrorCode.BUILT_IN_IDENTIFIER_AS_TYPE]);
-    verify([source]);
+}
+''', [ParserErrorCode.EXTRANEOUS_MODIFIER]);
   }
 
   test_builtInIdentifierAsType_formalParameter_simple() async {
-    Source source = addSource(r'''
+    await assertErrorsInCode(r'''
 f(static x) {
-}''');
-    await computeAnalysisResult(source);
-    assertErrors(
-        source,
-        usingFastaParser
-            ? [ParserErrorCode.EXTRANEOUS_MODIFIER]
-            : [CompileTimeErrorCode.BUILT_IN_IDENTIFIER_AS_TYPE]);
-    verify([source]);
+}
+''', [ParserErrorCode.EXTRANEOUS_MODIFIER]);
   }
 
   test_builtInIdentifierAsType_variableDeclaration() async {
-    Source source = addSource(r'''
+    await assertErrorsInCode(r'''
 f() {
   typedef x;
-}''');
-    await computeAnalysisResult(source);
-    assertErrors(
-        source,
-        usingFastaParser
-            ? [
-                StaticWarningCode.UNDEFINED_IDENTIFIER,
-                StaticWarningCode.UNDEFINED_IDENTIFIER,
-                ParserErrorCode.EXPECTED_TOKEN
-              ]
-            : [CompileTimeErrorCode.BUILT_IN_IDENTIFIER_AS_TYPE]);
-    verify([source]);
+}
+''', [
+      StaticWarningCode.UNDEFINED_IDENTIFIER,
+      StaticWarningCode.UNDEFINED_IDENTIFIER,
+      ParserErrorCode.EXPECTED_TOKEN
+    ]);
   }
 
   test_builtInIdentifierAsTypedefName_functionTypeAlias() async {
-    Source source = addSource("typedef bool as();");
-    await computeAnalysisResult(source);
-    assertErrors(
-        source, [CompileTimeErrorCode.BUILT_IN_IDENTIFIER_AS_TYPEDEF_NAME]);
-    verify([source]);
+    await assertErrorsInCode('''
+typedef bool as();
+''', [CompileTimeErrorCode.BUILT_IN_IDENTIFIER_AS_TYPEDEF_NAME]);
   }
 
   test_builtInIdentifierAsTypeName() async {
-    Source source = addSource("class as {}");
-    await computeAnalysisResult(source);
-    assertErrors(
-        source, [CompileTimeErrorCode.BUILT_IN_IDENTIFIER_AS_TYPE_NAME]);
-    verify([source]);
+    await assertErrorsInCode('''
+class as {}
+''', [CompileTimeErrorCode.BUILT_IN_IDENTIFIER_AS_TYPE_NAME]);
   }
 
   test_builtInIdentifierAsTypeParameterName() async {
-    Source source = addSource("class A<as> {}");
-    await computeAnalysisResult(source);
-    assertErrors(source,
-        [CompileTimeErrorCode.BUILT_IN_IDENTIFIER_AS_TYPE_PARAMETER_NAME]);
-    verify([source]);
+    await assertErrorsInCode('''
+class A<as> {}
+''', [CompileTimeErrorCode.BUILT_IN_IDENTIFIER_AS_TYPE_PARAMETER_NAME]);
   }
 
   test_caseExpressionTypeImplementsEquals() async {
-    Source source = addSource(r'''
+    await assertErrorsInCode(r'''
 class IntWrapper {
   final int value;
   const IntWrapper(this.value);
@@ -605,108 +217,83 @@
     case(const IntWrapper(1)) : return 1;
     default: return 0;
   }
-}''');
-    await computeAnalysisResult(source);
-    assertErrors(
-        source, [CompileTimeErrorCode.CASE_EXPRESSION_TYPE_IMPLEMENTS_EQUALS]);
-    verify([source]);
+}
+''', [CompileTimeErrorCode.CASE_EXPRESSION_TYPE_IMPLEMENTS_EQUALS]);
   }
 
   test_conflictingGenericInterfaces_hierarchyLoop() async {
     // There is no interface conflict here, but there is a loop in the class
     // hierarchy leading to a finite set of implemented types; this loop
     // shouldn't cause non-termination.
-    Source source = addSource('''
+    await assertErrorsInCode('''
 class A<T> implements B<T> {}
 class B<T> implements A<T> {}
-''');
-    await computeAnalysisResult(source);
-    assertErrors(source, [
+''', [
       CompileTimeErrorCode.RECURSIVE_INTERFACE_INHERITANCE,
       CompileTimeErrorCode.RECURSIVE_INTERFACE_INHERITANCE
     ]);
   }
 
   test_conflictingGenericInterfaces_noConflict() async {
-    Source source = addSource('''
+    await assertNoErrorsInCode('''
 class I<T> {}
 class A implements I<int> {}
 class B implements I<int> {}
 class C extends A implements B {}
-    ''');
-    await computeAnalysisResult(source);
-    assertNoErrors(source);
+''');
   }
 
   test_conflictingTypeVariableAndClass() async {
-    Source source = addSource(r'''
+    await assertErrorsInCode(r'''
 class T<T> {
-}''');
-    await computeAnalysisResult(source);
-    assertErrors(
-        source, [CompileTimeErrorCode.CONFLICTING_TYPE_VARIABLE_AND_CLASS]);
-    verify([source]);
+}
+''', [CompileTimeErrorCode.CONFLICTING_TYPE_VARIABLE_AND_CLASS]);
   }
 
   test_conflictingTypeVariableAndMember_field() async {
-    Source source = addSource(r'''
+    await assertErrorsInCode(r'''
 class A<T> {
   var T;
-}''');
-    await computeAnalysisResult(source);
-    assertErrors(
-        source, [CompileTimeErrorCode.CONFLICTING_TYPE_VARIABLE_AND_MEMBER]);
-    verify([source]);
+}
+''', [CompileTimeErrorCode.CONFLICTING_TYPE_VARIABLE_AND_MEMBER]);
   }
 
   test_conflictingTypeVariableAndMember_getter() async {
-    Source source = addSource(r'''
+    await assertErrorsInCode(r'''
 class A<T> {
   get T => null;
-}''');
-    await computeAnalysisResult(source);
-    assertErrors(
-        source, [CompileTimeErrorCode.CONFLICTING_TYPE_VARIABLE_AND_MEMBER]);
-    verify([source]);
+}
+''', [CompileTimeErrorCode.CONFLICTING_TYPE_VARIABLE_AND_MEMBER]);
   }
 
   test_conflictingTypeVariableAndMember_method() async {
-    Source source = addSource(r'''
+    await assertErrorsInCode(r'''
 class A<T> {
   T() {}
-}''');
-    await computeAnalysisResult(source);
-    assertErrors(
-        source, [CompileTimeErrorCode.CONFLICTING_TYPE_VARIABLE_AND_MEMBER]);
-    verify([source]);
+}
+''', [CompileTimeErrorCode.CONFLICTING_TYPE_VARIABLE_AND_MEMBER]);
   }
 
   test_conflictingTypeVariableAndMember_method_static() async {
-    Source source = addSource(r'''
+    await assertErrorsInCode(r'''
 class A<T> {
   static T() {}
-}''');
-    await computeAnalysisResult(source);
-    assertErrors(
-        source, [CompileTimeErrorCode.CONFLICTING_TYPE_VARIABLE_AND_MEMBER]);
-    verify([source]);
+}
+''', [CompileTimeErrorCode.CONFLICTING_TYPE_VARIABLE_AND_MEMBER]);
   }
 
   test_conflictingTypeVariableAndMember_setter() async {
-    Source source = addSource(r'''
+    await assertErrorsInCode(r'''
 class A<T> {
   set T(x) {}
-}''');
-    await computeAnalysisResult(source);
-    assertErrors(
-        source, [CompileTimeErrorCode.CONFLICTING_TYPE_VARIABLE_AND_MEMBER]);
-    verify([source]);
+}
+''', [CompileTimeErrorCode.CONFLICTING_TYPE_VARIABLE_AND_MEMBER]);
   }
 
   test_consistentCaseExpressionTypes_dynamic() async {
     // Even though A.S and S have a static type of "dynamic", we should see
     // that they match 'abc', because they are constant strings.
-    Source source = addSource(r'''
+    await assertNoErrorsInCode(r'''
 class A {
   static const S = 'A.S';
 }
@@ -722,29 +309,25 @@
     case 'abc':
       break;
   }
-}''');
-    await computeAnalysisResult(source);
-    assertNoErrors(source);
-    verify([source]);
+}
+''');
   }
 
   test_const_invalid_constructorFieldInitializer_fromLibrary() async {
-    addNamedSource('/lib.dart', r'''
+    newFile('/lib.dart', content: r'''
 class A<T> {
   final int f;
   const A() : f = T.foo;
 }
 ''');
-    Source source = addSource(r'''
+    await assertErrorsInCode(r'''
 import 'lib.dart';
 const a = const A();
-''');
-    await computeAnalysisResult(source);
-    assertErrors(source, [CompileTimeErrorCode.CONST_EVAL_THROWS_EXCEPTION]);
+''', [CompileTimeErrorCode.CONST_EVAL_THROWS_EXCEPTION]);
   }
 
   test_constConstructor_redirect_generic() async {
-    Source source = addSource(r'''
+    await assertNoErrorsInCode(r'''
 class A<T> {
   const A(T value) : this._(value);
   const A._(T value) : value = value;
@@ -755,115 +338,95 @@
   const A<int>(1);
 }
 ''');
-    await computeAnalysisResult(source);
-    assertNoErrors(source);
-    verify([source]);
   }
 
   test_constConstructorWithFieldInitializedByNonConst() async {
-    Source source = addSource(r'''
+    // TODO(paulberry): the error CONST_INITIALIZED_WITH_NON_CONSTANT_VALUE is
+    // redundant and ought to be suppressed.
+    await assertErrorsInCode(r'''
 class A {
   final int i = f();
   const A();
 }
 int f() {
   return 3;
-}''');
-    // TODO(paulberry): the error CONST_INITIALIZED_WITH_NON_CONSTANT_VALUE is
-    // redundant and ought to be suppressed.
-    await computeAnalysisResult(source);
-    assertErrors(source, [
+}
+''', [
       CompileTimeErrorCode
           .CONST_CONSTRUCTOR_WITH_FIELD_INITIALIZED_BY_NON_CONST,
       CompileTimeErrorCode.CONST_INITIALIZED_WITH_NON_CONSTANT_VALUE
     ]);
-    verify([source]);
   }
 
   test_constConstructorWithFieldInitializedByNonConst_static() async {
-    Source source = addSource(r'''
+    await assertNoErrorsInCode(r'''
 class A {
   static final int i = f();
   const A();
 }
 int f() {
   return 3;
-}''');
-    await computeAnalysisResult(source);
-    assertNoErrors(source);
-    verify([source]);
+}
+''');
   }
 
   test_constConstructorWithNonConstSuper_explicit() async {
-    Source source = addSource(r'''
+    await assertErrorsInCode(r'''
 class A {
   A();
 }
 class B extends A {
   const B(): super();
-}''');
-    await computeAnalysisResult(source);
-    assertErrors(
-        source, [CompileTimeErrorCode.CONST_CONSTRUCTOR_WITH_NON_CONST_SUPER]);
-    verify([source]);
+}
+''', [CompileTimeErrorCode.CONST_CONSTRUCTOR_WITH_NON_CONST_SUPER]);
   }
 
   test_constConstructorWithNonConstSuper_implicit() async {
-    Source source = addSource(r'''
+    await assertErrorsInCode(r'''
 class A {
   A();
 }
 class B extends A {
   const B();
-}''');
-    await computeAnalysisResult(source);
-    assertErrors(
-        source, [CompileTimeErrorCode.CONST_CONSTRUCTOR_WITH_NON_CONST_SUPER]);
-    verify([source]);
+}
+''', [CompileTimeErrorCode.CONST_CONSTRUCTOR_WITH_NON_CONST_SUPER]);
   }
 
   test_constConstructorWithNonFinalField_mixin() async {
-    Source source = addSource(r'''
+    await assertErrorsInCode(r'''
 class A {
   var a;
 }
 class B extends Object with A {
   const B();
-}''');
-    await computeAnalysisResult(source);
-    assertErrors(source, [
+}
+''', [
       CompileTimeErrorCode.CONST_CONSTRUCTOR_WITH_MIXIN_WITH_FIELD,
       CompileTimeErrorCode.CONST_CONSTRUCTOR_WITH_NON_FINAL_FIELD
     ]);
-    verify([source]);
   }
 
   test_constConstructorWithNonFinalField_super() async {
-    Source source = addSource(r'''
+    await assertErrorsInCode(r'''
 class A {
   var a;
 }
 class B extends A {
   const B();
-}''');
-    await computeAnalysisResult(source);
-    assertErrors(source, [
+}
+''', [
       CompileTimeErrorCode.CONST_CONSTRUCTOR_WITH_NON_FINAL_FIELD,
       CompileTimeErrorCode.CONST_CONSTRUCTOR_WITH_NON_CONST_SUPER
     ]);
-    verify([source]);
   }
 
   test_constConstructorWithNonFinalField_this() async {
-    Source source = addSource(r'''
+    await assertErrorsInCode(r'''
 class A {
   int x;
   const A();
-}''');
-    await computeAnalysisResult(source);
-    assertErrors(
-        source, [CompileTimeErrorCode.CONST_CONSTRUCTOR_WITH_NON_FINAL_FIELD]);
-    verify([source]);
+}
+''', [CompileTimeErrorCode.CONST_CONSTRUCTOR_WITH_NON_FINAL_FIELD]);
   }
 
   test_constDeferredClass() async {
@@ -872,13 +435,15 @@
 library lib1;
 class A {
   const A();
-}''',
+}
+''',
       r'''
 library root;
 import 'lib1.dart' deferred as a;
 main() {
   const a.A();
-}'''
+}
+'''
     ], <ErrorCode>[
       CompileTimeErrorCode.CONST_DEFERRED_CLASS
     ]);
@@ -903,85 +468,70 @@
   }
 
   test_constEval_newInstance_constConstructor() async {
-    Source source = addSource(r'''
+    await assertErrorsInCode(r'''
 class A {
   const A();
 }
-const a = new A();''');
-    await computeAnalysisResult(source);
-    assertErrors(source,
-        [CompileTimeErrorCode.CONST_INITIALIZED_WITH_NON_CONSTANT_VALUE]);
-    verify([source]);
+const a = new A();
+''', [CompileTimeErrorCode.CONST_INITIALIZED_WITH_NON_CONSTANT_VALUE]);
   }
 
   test_constEval_newInstance_externalFactoryConstConstructor() async {
     // We can't evaluate "const A()" because its constructor is external.  But
     // the code is correct--we shouldn't report an error.
-    Source source = addSource(r'''
+    await assertNoErrorsInCode(r'''
 class A {
   external const factory A();
 }
-const x = const A();''');
-    await computeAnalysisResult(source);
-    assertNoErrors(source);
-    verify([source]);
+const x = const A();
+''');
   }
 
   test_constEval_nonStaticField_inGenericClass() async {
-    Source source = addSource('''
+    await assertErrorsInCode('''
 class C<T> {
   const C();
   T get t => null;
 }
 
-const x = const C().t;''');
-    await computeAnalysisResult(source);
-    assertErrors(source,
-        [CompileTimeErrorCode.CONST_INITIALIZED_WITH_NON_CONSTANT_VALUE]);
-    verify([source]);
+const x = const C().t;
+''', [CompileTimeErrorCode.CONST_INITIALIZED_WITH_NON_CONSTANT_VALUE]);
   }
 
   test_constEval_propertyExtraction_targetNotConst() async {
-    Source source = addSource(r'''
+    await assertErrorsInCode(r'''
 class A {
   const A();
   int m() => 0;
 }
 final a = const A();
-const C = a.m;''');
-    await computeAnalysisResult(source);
-    assertErrors(source,
-        [CompileTimeErrorCode.CONST_INITIALIZED_WITH_NON_CONSTANT_VALUE]);
-    verify([source]);
+const C = a.m;
+''', [CompileTimeErrorCode.CONST_INITIALIZED_WITH_NON_CONSTANT_VALUE]);
   }
 
   test_constEvalThrowsException() async {
-    Source source = addSource(r'''
+    await assertErrorsInCode(r'''
 class C {
   const C();
 }
-f() { return const C(); }''');
-    await computeAnalysisResult(source);
-    assertErrors(
-        source, [CompileTimeErrorCode.CONST_CONSTRUCTOR_THROWS_EXCEPTION]);
-    verify([source]);
+f() { return const C(); }
+''', [CompileTimeErrorCode.CONST_CONSTRUCTOR_THROWS_EXCEPTION]);
   }
 
   test_constEvalThrowsException_binaryMinus_null() async {
-    await _check_constEvalThrowsException_binary_null("null - 5", false);
-    await _check_constEvalThrowsException_binary_null("5 - null", true);
+    await _check_constEvalThrowsException_binary_null('null - 5', false);
+    await _check_constEvalThrowsException_binary_null('5 - null', true);
   }
 
   test_constEvalThrowsException_binaryPlus_null() async {
-    await _check_constEvalThrowsException_binary_null("null + 5", false);
-    await _check_constEvalThrowsException_binary_null("5 + null", true);
+    await _check_constEvalThrowsException_binary_null('null + 5', false);
+    await _check_constEvalThrowsException_binary_null('5 + null', true);
   }
 
   test_constEvalThrowsException_divisionByZero() async {
-    Source source = addSource("const C = 1 ~/ 0;");
-    await computeAnalysisResult(source);
-    assertErrors(source, [CompileTimeErrorCode.CONST_EVAL_THROWS_IDBZE]);
-    verify([source]);
+    await assertErrorsInCode('''
+const C = 1 ~/ 0;
+''', [CompileTimeErrorCode.CONST_EVAL_THROWS_IDBZE]);
   }
 
   test_constEvalThrowsException_finalAlreadySet_initializer() async {
@@ -989,19 +539,16 @@
     // and at the site of the constructor, then invoking that constructor would
     // produce a runtime error; hence invoking that constructor via the "const"
     // keyword results in a compile-time error.
-    Source source = addSource('''
+    await assertErrorsInCode('''
 class C {
   final x = 1;
   const C() : x = 2;
 }
 var x = const C();
-''');
-    await computeAnalysisResult(source);
-    assertErrors(source, [
+''', [
       CompileTimeErrorCode.CONST_EVAL_THROWS_EXCEPTION,
       StaticWarningCode.FIELD_INITIALIZED_IN_INITIALIZER_AND_DECLARATION
     ]);
-    verify([source]);
   }
 
   test_constEvalThrowsException_finalAlreadySet_initializing_formal() async {
@@ -1010,199 +557,176 @@
     // constructor, then invoking that constructor would produce a runtime
     // error; hence invoking that constructor via the "const" keyword results
     // in a compile-time error.
-    Source source = addSource('''
+    await assertErrorsInCode('''
 class C {
   final x = 1;
   const C(this.x);
 }
 var x = const C(2);
-''');
-    await computeAnalysisResult(source);
-    assertErrors(source, [
+''', [
       CompileTimeErrorCode.CONST_EVAL_THROWS_EXCEPTION,
       StaticWarningCode.FINAL_INITIALIZED_IN_DECLARATION_AND_CONSTRUCTOR
     ]);
-    verify([source]);
   }
 
   test_constEvalThrowsException_unaryBitNot_null() async {
-    Source source = addSource("const C = ~null;");
-    await computeAnalysisResult(source);
-    assertErrors(source, [CompileTimeErrorCode.CONST_EVAL_THROWS_EXCEPTION]);
-    // no verify(), '~null' is not resolved
+    await assertErrorsInCode('''
+const C = ~null;
+''', [CompileTimeErrorCode.CONST_EVAL_THROWS_EXCEPTION], verify: false);
   }
 
   test_constEvalThrowsException_unaryNegated_null() async {
-    Source source = addSource("const C = -null;");
-    await computeAnalysisResult(source);
-    assertErrors(source, [CompileTimeErrorCode.CONST_EVAL_THROWS_EXCEPTION]);
-    // no verify(), '-null' is not resolved
+    await assertErrorsInCode('''
+const C = -null;
+''', [CompileTimeErrorCode.CONST_EVAL_THROWS_EXCEPTION], verify: false);
   }
 
   test_constEvalThrowsException_unaryNot_null() async {
-    Source source = addSource("const C = !null;");
-    await computeAnalysisResult(source);
-    assertErrors(source, [CompileTimeErrorCode.CONST_EVAL_THROWS_EXCEPTION]);
-    verify([source]);
+    await assertErrorsInCode('''
+const C = !null;
+''', [CompileTimeErrorCode.CONST_EVAL_THROWS_EXCEPTION]);
   }
 
-  test_constEvalTypeBool_binary() async {
-    await _check_constEvalTypeBool_withParameter_binary("p && ''");
-    await _check_constEvalTypeBool_withParameter_binary("p || ''");
+  test_constEvalTypeBool_binary_and() async {
+    await assertErrorsInCode('''
+const _ = true && '';
+''', [
+      CompileTimeErrorCode.CONST_EVAL_TYPE_BOOL,
+      StaticTypeWarningCode.NON_BOOL_OPERAND,
+    ]);
   }
 
   test_constEvalTypeBool_binary_leftTrue() async {
-    Source source = addSource("const C = (true || 0);");
-    await computeAnalysisResult(source);
-    assertErrors(
-        source, [StaticTypeWarningCode.NON_BOOL_OPERAND, HintCode.DEAD_CODE]);
-    verify([source]);
+    await assertErrorsInCode('''
+const C = (true || 0);
+''', [StaticTypeWarningCode.NON_BOOL_OPERAND, HintCode.DEAD_CODE]);
+  }
+
+  test_constEvalTypeBool_binary_or() async {
+    await assertErrorsInCode(r'''
+const _ = false || '';
+''', [
+      CompileTimeErrorCode.CONST_EVAL_TYPE_BOOL,
+      StaticTypeWarningCode.NON_BOOL_OPERAND,
+    ]);
   }
 
   test_constEvalTypeBool_logicalOr_trueLeftOperand() async {
-    Source source = addSource(r'''
+    await assertNoErrorsInCode(r'''
 class C {
   final int x;
   const C({this.x}) : assert(x == null || x >= 0);
 }
 const c = const C();
 ''');
-    await computeAnalysisResult(source);
-    assertNoErrors(source);
-    verify([source]);
   }
 
   test_constEvalTypeBoolNumString_equal() async {
-    Source source = addSource(r'''
+    await assertErrorsInCode(r'''
 class A {
   const A();
 }
-class B {
-  final a;
-  const B(num p) : a = p == const A();
-}''');
-    await computeAnalysisResult(source);
-    assertErrors(
-        source, [CompileTimeErrorCode.CONST_EVAL_TYPE_BOOL_NUM_STRING]);
-    verify([source]);
+
+const num a = 0;
+const _ = a == const A();
+''', [CompileTimeErrorCode.CONST_EVAL_TYPE_BOOL_NUM_STRING]);
   }
 
   test_constEvalTypeBoolNumString_notEqual() async {
-    Source source = addSource(r'''
+    await assertErrorsInCode(r'''
 class A {
   const A();
 }
-class B {
-  final a;
-  const B(String p) : a = p != const A();
-}''');
-    await computeAnalysisResult(source);
-    assertErrors(
-        source, [CompileTimeErrorCode.CONST_EVAL_TYPE_BOOL_NUM_STRING]);
-    verify([source]);
+
+const num a = 0;
+const _ = a != const A();
+''', [CompileTimeErrorCode.CONST_EVAL_TYPE_BOOL_NUM_STRING]);
   }
 
   test_constEvalTypeInt_binary() async {
-    await _check_constEvalTypeBoolOrInt_withParameter_binary("p ^ ''");
-    await _check_constEvalTypeBoolOrInt_withParameter_binary("p & ''");
-    await _check_constEvalTypeBoolOrInt_withParameter_binary("p | ''");
-    await _check_constEvalTypeInt_withParameter_binary("p >> ''");
-    await _check_constEvalTypeInt_withParameter_binary("p << ''");
+    await _check_constEvalTypeBoolOrInt_binary("a ^ ''");
+    await _check_constEvalTypeBoolOrInt_binary("a & ''");
+    await _check_constEvalTypeBoolOrInt_binary("a | ''");
+    await _check_constEvalTypeInt_binary("a >> ''");
+    await _check_constEvalTypeInt_binary("a << ''");
   }
 
   test_constEvalTypeNum_binary() async {
-    await _check_constEvalTypeNum_withParameter_binary("p + ''");
-    await _check_constEvalTypeNum_withParameter_binary("p - ''");
-    await _check_constEvalTypeNum_withParameter_binary("p * ''");
-    await _check_constEvalTypeNum_withParameter_binary("p / ''");
-    await _check_constEvalTypeNum_withParameter_binary("p ~/ ''");
-    await _check_constEvalTypeNum_withParameter_binary("p > ''");
-    await _check_constEvalTypeNum_withParameter_binary("p < ''");
-    await _check_constEvalTypeNum_withParameter_binary("p >= ''");
-    await _check_constEvalTypeNum_withParameter_binary("p <= ''");
-    await _check_constEvalTypeNum_withParameter_binary("p % ''");
+    await _check_constEvalTypeNum_binary("a + ''");
+    await _check_constEvalTypeNum_binary("a - ''");
+    await _check_constEvalTypeNum_binary("a * ''");
+    await _check_constEvalTypeNum_binary("a / ''");
+    await _check_constEvalTypeNum_binary("a ~/ ''");
+    await _check_constEvalTypeNum_binary("a > ''");
+    await _check_constEvalTypeNum_binary("a < ''");
+    await _check_constEvalTypeNum_binary("a >= ''");
+    await _check_constEvalTypeNum_binary("a <= ''");
+    await _check_constEvalTypeNum_binary("a % ''");
   }
 
   test_constFormalParameter_fieldFormalParameter() async {
-    Source source = addSource(r'''
+    await assertErrorsInCode(r'''
 class A {
   var x;
   A(const this.x) {}
-}''');
-    await computeAnalysisResult(source);
-    assertErrors(
-        source,
-        usingFastaParser
-            ? [
-                CompileTimeErrorCode.CONST_FORMAL_PARAMETER,
-                ParserErrorCode.EXTRANEOUS_MODIFIER
-              ]
-            : [CompileTimeErrorCode.CONST_FORMAL_PARAMETER]);
-    verify([source]);
+}
+''', [
+      CompileTimeErrorCode.CONST_FORMAL_PARAMETER,
+      ParserErrorCode.EXTRANEOUS_MODIFIER
+    ]);
   }
 
   test_constFormalParameter_simpleFormalParameter() async {
-    Source source = addSource("f(const x) {}");
-    await computeAnalysisResult(source);
-    assertErrors(
-        source,
-        usingFastaParser
-            ? [
-                CompileTimeErrorCode.CONST_FORMAL_PARAMETER,
-                ParserErrorCode.EXTRANEOUS_MODIFIER
-              ]
-            : [CompileTimeErrorCode.CONST_FORMAL_PARAMETER]);
-    verify([source]);
+    await assertErrorsInCode('''
+f(const x) {}
+''', [
+      CompileTimeErrorCode.CONST_FORMAL_PARAMETER,
+      ParserErrorCode.EXTRANEOUS_MODIFIER
+    ]);
   }
 
   test_constInitializedWithNonConstValue() async {
-    Source source = addSource(r'''
+    await assertErrorsInCode(r'''
 f(p) {
   const C = p;
-}''');
-    await computeAnalysisResult(source);
-    assertErrors(source,
-        [CompileTimeErrorCode.CONST_INITIALIZED_WITH_NON_CONSTANT_VALUE]);
-    verify([source]);
+}
+''', [CompileTimeErrorCode.CONST_INITIALIZED_WITH_NON_CONSTANT_VALUE]);
   }
 
   test_constInitializedWithNonConstValue_finalField() async {
     // Regression test for bug #25526 which previously
     // caused two errors to be reported.
-    Source source = addSource(r'''
+    await assertErrorsInCode(r'''
 class Foo {
   final field = 0;
   foo([int x = field]) {}
 }
-''');
-    await computeAnalysisResult(source);
-    assertErrors(source, [CompileTimeErrorCode.NON_CONSTANT_DEFAULT_VALUE]);
-    verify([source]);
+''', [CompileTimeErrorCode.NON_CONSTANT_DEFAULT_VALUE]);
   }
 
   test_constInitializedWithNonConstValue_missingConstInListLiteral() async {
-    Source source = addSource("const List L = [0];");
-    await computeAnalysisResult(source);
-    assertNoErrors(source);
-    verify([source]);
+    await assertNoErrorsInCode('''
+const List L = [0];
+''');
   }
 
   test_constInitializedWithNonConstValue_missingConstInMapLiteral() async {
-    Source source = addSource("const Map M = {'a' : 0};");
-    await computeAnalysisResult(source);
-    assertNoErrors(source);
-    verify([source]);
+    await assertNoErrorsInCode('''
+const Map M = {'a' : 0};
+''');
   }
 
   test_constInitializedWithNonConstValueFromDeferredClass() async {
     await resolveWithErrors(<String>[
       r'''
 library lib1;
-const V = 1;''',
+const V = 1;
+''',
       r'''
 library root;
 import 'lib1.dart' deferred as a;
-const B = a.V;'''
+const B = a.V;
+'''
     ], <ErrorCode>[
       CompileTimeErrorCode
           .CONST_INITIALIZED_WITH_NON_CONSTANT_VALUE_FROM_DEFERRED_LIBRARY
@@ -1213,11 +737,13 @@
     await resolveWithErrors(<String>[
       r'''
 library lib1;
-const V = 1;''',
+const V = 1;
+''',
       r'''
 library root;
 import 'lib1.dart' deferred as a;
-const B = a.V + 1;'''
+const B = a.V + 1;
+'''
     ], <ErrorCode>[
       CompileTimeErrorCode
           .CONST_INITIALIZED_WITH_NON_CONSTANT_VALUE_FROM_DEFERRED_LIBRARY
@@ -1225,70 +751,57 @@
   }
 
   test_constInstanceField() async {
-    Source source = addSource(r'''
+    await assertErrorsInCode(r'''
 class C {
   const int f = 0;
-}''');
-    await computeAnalysisResult(source);
-    assertErrors(source, [CompileTimeErrorCode.CONST_INSTANCE_FIELD]);
-    verify([source]);
+}
+''', [CompileTimeErrorCode.CONST_INSTANCE_FIELD]);
   }
 
   test_constWithInvalidTypeParameters() async {
-    Source source = addSource(r'''
+    await assertErrorsInCode(r'''
 class A {
   const A();
 }
-f() { return const A<A>(); }''');
-    await computeAnalysisResult(source);
-    assertErrors(
-        source, [CompileTimeErrorCode.CONST_WITH_INVALID_TYPE_PARAMETERS]);
-    verify([source]);
+f() { return const A<A>(); }
+''', [CompileTimeErrorCode.CONST_WITH_INVALID_TYPE_PARAMETERS]);
   }
 
   test_constWithInvalidTypeParameters_tooFew() async {
-    Source source = addSource(r'''
+    await assertErrorsInCode(r'''
 class A {}
 class C<K, V> {
   const C();
 }
 f(p) {
   return const C<A>();
-}''');
-    await computeAnalysisResult(source);
-    assertErrors(
-        source, [CompileTimeErrorCode.CONST_WITH_INVALID_TYPE_PARAMETERS]);
-    verify([source]);
+}
+''', [CompileTimeErrorCode.CONST_WITH_INVALID_TYPE_PARAMETERS]);
   }
 
   test_constWithInvalidTypeParameters_tooMany() async {
-    Source source = addSource(r'''
+    await assertErrorsInCode(r'''
 class A {}
 class C<E> {
   const C();
 }
 f(p) {
   return const C<A, A>();
-}''');
-    await computeAnalysisResult(source);
-    assertErrors(
-        source, [CompileTimeErrorCode.CONST_WITH_INVALID_TYPE_PARAMETERS]);
-    verify([source]);
+}
+''', [CompileTimeErrorCode.CONST_WITH_INVALID_TYPE_PARAMETERS]);
   }
 
   test_constWithNonConst() async {
-    Source source = addSource(r'''
+    await assertErrorsInCode(r'''
 class T {
   T(a, b, {c, d}) {}
 }
-f() { return const T(0, 1, c: 2, d: 3); }''');
-    await computeAnalysisResult(source);
-    assertErrors(source, [CompileTimeErrorCode.CONST_WITH_NON_CONST]);
-    verify([source]);
+f() { return const T(0, 1, c: 2, d: 3); }
+''', [CompileTimeErrorCode.CONST_WITH_NON_CONST]);
   }
 
   test_constWithNonConst_in_const_context() async {
-    Source source = addSource(r'''
+    await assertErrorsInCode(r'''
 class A {
   const A(x);
 }
@@ -1297,58 +810,49 @@
 main() {
   const A(B());
 }
-''');
-    await computeAnalysisResult(source);
-    assertErrors(source, [CompileTimeErrorCode.CONST_WITH_NON_CONST]);
-    verify([source]);
+''', [CompileTimeErrorCode.CONST_WITH_NON_CONST]);
   }
 
   test_constWithNonConstantArgument_annotation() async {
-    Source source = addSource(r'''
+    await assertErrorsInCode(r'''
 class A {
   const A(int p);
 }
 var v = 42;
 @A(v)
 main() {
-}''');
-    await computeAnalysisResult(source);
-    assertErrors(
-        source, [CompileTimeErrorCode.CONST_WITH_NON_CONSTANT_ARGUMENT]);
-    verify([source]);
+}
+''', [CompileTimeErrorCode.CONST_WITH_NON_CONSTANT_ARGUMENT]);
   }
 
   test_constWithNonConstantArgument_instanceCreation() async {
-    Source source = addSource(r'''
+    await assertErrorsInCode(r'''
 class A {
   const A(a);
 }
-f(p) { return const A(p); }''');
-    await computeAnalysisResult(source);
-    assertErrors(source, [
+f(p) { return const A(p); }
+''', [
       CompileTimeErrorCode.CONST_WITH_NON_CONSTANT_ARGUMENT,
     ]);
-    verify([source]);
   }
 
   test_constWithNonType() async {
-    Source source = addSource(r'''
+    await assertErrorsInCode(r'''
 int A;
 f() {
   return const A();
-}''');
-    await computeAnalysisResult(source);
-    assertErrors(source, [CompileTimeErrorCode.CONST_WITH_NON_TYPE]);
-    verify([source]);
+}
+''', [CompileTimeErrorCode.CONST_WITH_NON_TYPE]);
   }
 
   test_constWithNonType_fromLibrary() async {
-    Source source1 = addNamedSource("/lib.dart", "");
+    Source source1 = addNamedSource("/lib.dart", '');
     Source source2 = addNamedSource("/lib2.dart", r'''
 import 'lib.dart' as lib;
 void f() {
   const lib.A();
-}''');
+}
+''');
     await computeAnalysisResult(source1);
     await computeAnalysisResult(source2);
     assertErrors(source2, [CompileTimeErrorCode.CONST_WITH_NON_TYPE]);
@@ -1356,163 +860,122 @@
   }
 
   test_constWithTypeParameters_direct() async {
-    Source source = addSource(r'''
+    await assertErrorsInCode(r'''
 class A<T> {
   static const V = const A<T>();
   const A();
-}''');
-    await computeAnalysisResult(source);
-    assertErrors(source, [
+}
+''', [
       CompileTimeErrorCode.CONST_WITH_TYPE_PARAMETERS,
       StaticWarningCode.TYPE_PARAMETER_REFERENCED_BY_STATIC
     ]);
-    verify([source]);
   }
 
   test_constWithTypeParameters_indirect() async {
-    Source source = addSource(r'''
+    await assertErrorsInCode(r'''
 class A<T> {
   static const V = const A<List<T>>();
   const A();
-}''');
-    await computeAnalysisResult(source);
-    assertErrors(source, [
+}
+''', [
       CompileTimeErrorCode.CONST_WITH_TYPE_PARAMETERS,
       StaticWarningCode.TYPE_PARAMETER_REFERENCED_BY_STATIC
     ]);
-    verify([source]);
   }
 
   test_constWithUndefinedConstructor() async {
-    Source source = addSource(r'''
+    await assertErrorsInCode(r'''
 class A {
   const A();
 }
 f() {
   return const A.noSuchConstructor();
-}''');
-    await computeAnalysisResult(source);
-    assertErrors(
-        source, [CompileTimeErrorCode.CONST_WITH_UNDEFINED_CONSTRUCTOR]);
-    // no verify(), 'noSuchConstructor' is not resolved
+}
+''', [CompileTimeErrorCode.CONST_WITH_UNDEFINED_CONSTRUCTOR], verify: false);
   }
 
   test_constWithUndefinedConstructorDefault() async {
-    Source source = addSource(r'''
+    await assertErrorsInCode(r'''
 class A {
   const A.name();
 }
 f() {
   return const A();
-}''');
-    await computeAnalysisResult(source);
-    assertErrors(source,
-        [CompileTimeErrorCode.CONST_WITH_UNDEFINED_CONSTRUCTOR_DEFAULT]);
-    verify([source]);
+}
+''', [CompileTimeErrorCode.CONST_WITH_UNDEFINED_CONSTRUCTOR_DEFAULT]);
   }
 
   test_defaultValueInFunctionTypeAlias_new_named() async {
-    Source source = addSource('''
+    await assertErrorsInCode('''
 typedef F = int Function({Map<String, String> m: const {}});
-''');
-    await computeAnalysisResult(source);
-    assertErrors(source, [
+''', [
       ParserErrorCode.DEFAULT_VALUE_IN_FUNCTION_TYPE,
     ]);
-    verify([source]);
   }
 
   test_defaultValueInFunctionTypeAlias_new_positional() async {
-    Source source = addSource('''
+    await assertErrorsInCode('''
 typedef F = int Function([Map<String, String> m = const {}]);
-''');
-    await computeAnalysisResult(source);
-    assertErrors(source, [
+''', [
       ParserErrorCode.DEFAULT_VALUE_IN_FUNCTION_TYPE,
     ]);
-    verify([source]);
   }
 
   test_defaultValueInFunctionTypeAlias_old_named() async {
-    Source source = addSource("typedef F([x = 0]);");
-    await computeAnalysisResult(source);
-    assertErrors(
-        source,
-        usingFastaParser
-            ? [
-                CompileTimeErrorCode.DEFAULT_VALUE_IN_FUNCTION_TYPE_ALIAS,
-                ParserErrorCode.DEFAULT_VALUE_IN_FUNCTION_TYPE
-              ]
-            : [CompileTimeErrorCode.DEFAULT_VALUE_IN_FUNCTION_TYPE_ALIAS]);
-    verify([source]);
+    await assertErrorsInCode('''
+typedef F([x = 0]);
+''', [
+      CompileTimeErrorCode.DEFAULT_VALUE_IN_FUNCTION_TYPE_ALIAS,
+      ParserErrorCode.DEFAULT_VALUE_IN_FUNCTION_TYPE
+    ]);
   }
 
   test_defaultValueInFunctionTypeAlias_old_positional() async {
-    Source source = addSource("typedef F([x = 0]);");
-    await computeAnalysisResult(source);
-    assertErrors(
-        source,
-        usingFastaParser
-            ? [
-                CompileTimeErrorCode.DEFAULT_VALUE_IN_FUNCTION_TYPE_ALIAS,
-                ParserErrorCode.DEFAULT_VALUE_IN_FUNCTION_TYPE
-              ]
-            : [CompileTimeErrorCode.DEFAULT_VALUE_IN_FUNCTION_TYPE_ALIAS]);
-    verify([source]);
+    await assertErrorsInCode('''
+typedef F([x = 0]);
+''', [
+      CompileTimeErrorCode.DEFAULT_VALUE_IN_FUNCTION_TYPE_ALIAS,
+      ParserErrorCode.DEFAULT_VALUE_IN_FUNCTION_TYPE
+    ]);
   }
 
   test_defaultValueInFunctionTypedParameter_named() async {
-    Source source = addSource("f(g({p: null})) {}");
-    await computeAnalysisResult(source);
-    assertErrors(
-        source,
-        usingFastaParser
-            ? [
-                CompileTimeErrorCode.DEFAULT_VALUE_IN_FUNCTION_TYPED_PARAMETER,
-                ParserErrorCode.DEFAULT_VALUE_IN_FUNCTION_TYPE
-              ]
-            : [CompileTimeErrorCode.DEFAULT_VALUE_IN_FUNCTION_TYPED_PARAMETER]);
-    verify([source]);
+    await assertErrorsInCode('''
+f(g({p: null})) {}
+''', [
+      CompileTimeErrorCode.DEFAULT_VALUE_IN_FUNCTION_TYPED_PARAMETER,
+      ParserErrorCode.DEFAULT_VALUE_IN_FUNCTION_TYPE
+    ]);
   }
 
   test_defaultValueInFunctionTypedParameter_optional() async {
-    Source source = addSource("f(g([p = null])) {}");
-    await computeAnalysisResult(source);
-    assertErrors(
-        source,
-        usingFastaParser
-            ? [
-                CompileTimeErrorCode.DEFAULT_VALUE_IN_FUNCTION_TYPED_PARAMETER,
-                ParserErrorCode.DEFAULT_VALUE_IN_FUNCTION_TYPE
-              ]
-            : [CompileTimeErrorCode.DEFAULT_VALUE_IN_FUNCTION_TYPED_PARAMETER]);
-    verify([source]);
+    await assertErrorsInCode('''
+f(g([p = null])) {}
+''', [
+      CompileTimeErrorCode.DEFAULT_VALUE_IN_FUNCTION_TYPED_PARAMETER,
+      ParserErrorCode.DEFAULT_VALUE_IN_FUNCTION_TYPE
+    ]);
   }
 
   test_defaultValueInRedirectingFactoryConstructor() async {
-    Source source = addSource(r'''
+    await assertErrorsInCode(r'''
 class A {
   factory A([int x = 0]) = B;
 }
 
 class B implements A {
   B([int x = 1]) {}
-}''');
-    await computeAnalysisResult(source);
-    assertErrors(source, [
-      CompileTimeErrorCode.DEFAULT_VALUE_IN_REDIRECTING_FACTORY_CONSTRUCTOR
-    ]);
-    verify([source]);
+}
+''', [CompileTimeErrorCode.DEFAULT_VALUE_IN_REDIRECTING_FACTORY_CONSTRUCTOR]);
   }
 
   test_deferredImportWithInvalidUri() async {
-    Source source = addSource(r'''
+    await assertErrorsInCode(r'''
 import '[invalid uri]' deferred as p;
 main() {
   p.loadLibrary();
-}''');
-    await computeAnalysisResult(source);
-    assertErrors(source, [CompileTimeErrorCode.URI_DOES_NOT_EXIST]);
+}
+''', [CompileTimeErrorCode.URI_DOES_NOT_EXIST]);
   }
 
   test_duplicateDefinition_acrossLibraries() async {
@@ -1520,15 +983,18 @@
 library lib;
 
 part 'a.dart';
-part 'b.dart';''');
+part 'b.dart';
+''');
     Source sourceA = addNamedSource("/a.dart", r'''
 part of lib;
 
-class A {}''');
+class A {}
+''');
     Source sourceB = addNamedSource("/b.dart", r'''
 part of lib;
 
-class A {}''');
+class A {}
+''');
     await computeAnalysisResult(librarySource);
     await computeAnalysisResult(sourceA);
     await computeAnalysisResult(sourceB);
@@ -1538,23 +1004,22 @@
   }
 
   test_duplicateDefinition_catch() async {
-    Source source = addSource(r'''
+    await assertErrorsInCode(r'''
 main() {
   try {} catch (e, e) {}
-}''');
-    await computeAnalysisResult(source);
-    assertErrors(source, [CompileTimeErrorCode.DUPLICATE_DEFINITION]);
-    verify([source]);
+}''', [CompileTimeErrorCode.DUPLICATE_DEFINITION]);
   }
 
   test_duplicateDefinition_inPart() async {
     Source librarySource = addNamedSource("/lib.dart", r'''
 library test;
 part 'a.dart';
-class A {}''');
+class A {}
+''');
     Source sourceA = addNamedSource("/a.dart", r'''
 part of test;
-class A {}''');
+class A {}
+''');
     await computeAnalysisResult(librarySource);
     await computeAnalysisResult(sourceA);
     assertNoErrors(librarySource);
@@ -1563,177 +1028,147 @@
   }
 
   test_duplicateDefinition_locals_inCase() async {
-    Source source = addSource(r'''
+    await assertErrorsInCode(r'''
 main() {
   switch(1) {
     case 1:
       var a;
       var a;
   }
-}''');
-    await computeAnalysisResult(source);
-    assertErrors(source, [CompileTimeErrorCode.DUPLICATE_DEFINITION]);
-    verify([source]);
+}
+''', [CompileTimeErrorCode.DUPLICATE_DEFINITION]);
   }
 
   test_duplicateDefinition_locals_inFunctionBlock() async {
-    Source source = addSource(r'''
+    await assertErrorsInCode(r'''
 main() {
   int m = 0;
   m(a) {}
-}''');
-    await computeAnalysisResult(source);
-    assertErrors(source, [CompileTimeErrorCode.DUPLICATE_DEFINITION]);
-    verify([source]);
+}
+''', [CompileTimeErrorCode.DUPLICATE_DEFINITION]);
   }
 
   test_duplicateDefinition_locals_inIf() async {
-    Source source = addSource(r'''
+    await assertErrorsInCode(r'''
 main(int p) {
   if (p != 0) {
     var a;
     var a;
   }
-}''');
-    await computeAnalysisResult(source);
-    assertErrors(source, [CompileTimeErrorCode.DUPLICATE_DEFINITION]);
-    verify([source]);
+}
+''', [CompileTimeErrorCode.DUPLICATE_DEFINITION]);
   }
 
   test_duplicateDefinition_locals_inMethodBlock() async {
-    Source source = addSource(r'''
+    await assertErrorsInCode(r'''
 class A {
   m() {
     int a;
     int a;
   }
-}''');
-    await computeAnalysisResult(source);
-    assertErrors(source, [CompileTimeErrorCode.DUPLICATE_DEFINITION]);
-    verify([source]);
+}
+''', [CompileTimeErrorCode.DUPLICATE_DEFINITION]);
   }
 
   test_duplicateDefinition_parameters_inConstructor() async {
-    Source source = addSource(r'''
+    await assertErrorsInCode(r'''
 class A {
   int a;
   A(int a, this.a);
-}''');
-    await computeAnalysisResult(source);
-    assertErrors(source, [CompileTimeErrorCode.DUPLICATE_DEFINITION]);
-    verify([source]);
+}
+''', [CompileTimeErrorCode.DUPLICATE_DEFINITION]);
   }
 
   test_duplicateDefinition_parameters_inFunctionTypeAlias() async {
-    Source source = addSource(r'''
+    await assertErrorsInCode(r'''
 typedef F(int a, double a);
-''');
-    await computeAnalysisResult(source);
-    assertErrors(source, [CompileTimeErrorCode.DUPLICATE_DEFINITION]);
-    verify([source]);
+''', [CompileTimeErrorCode.DUPLICATE_DEFINITION]);
   }
 
   test_duplicateDefinition_parameters_inLocalFunction() async {
-    Source source = addSource(r'''
+    await assertErrorsInCode(r'''
 main() {
   f(int a, double a) {
   };
-}''');
-    await computeAnalysisResult(source);
-    assertErrors(source, [CompileTimeErrorCode.DUPLICATE_DEFINITION]);
-    verify([source]);
+}
+''', [CompileTimeErrorCode.DUPLICATE_DEFINITION]);
   }
 
   test_duplicateDefinition_parameters_inMethod() async {
-    Source source = addSource(r'''
+    await assertErrorsInCode(r'''
 class A {
   m(int a, double a) {
   }
-}''');
-    await computeAnalysisResult(source);
-    assertErrors(source, [CompileTimeErrorCode.DUPLICATE_DEFINITION]);
-    verify([source]);
+}
+''', [CompileTimeErrorCode.DUPLICATE_DEFINITION]);
   }
 
   test_duplicateDefinition_parameters_inTopLevelFunction() async {
-    Source source = addSource(r'''
-f(int a, double a) {
-}''');
-    await computeAnalysisResult(source);
-    assertErrors(source, [CompileTimeErrorCode.DUPLICATE_DEFINITION]);
-    verify([source]);
+    await assertErrorsInCode(r'''
+f(int a, double a) {}
+''', [CompileTimeErrorCode.DUPLICATE_DEFINITION]);
   }
 
   test_duplicateDefinition_typeParameters() async {
-    Source source = addSource(r'''
-class A<T, T> {
-}''');
-    await computeAnalysisResult(source);
-    assertErrors(source, [CompileTimeErrorCode.DUPLICATE_DEFINITION]);
-    verify([source]);
+    await assertErrorsInCode(r'''
+class A<T, T> {}
+''', [CompileTimeErrorCode.DUPLICATE_DEFINITION]);
   }
 
   test_duplicateNamedArgument() async {
-    Source source = addSource(r'''
+    await assertErrorsInCode(r'''
 f({a, b}) {}
 main() {
   f(a: 1, a: 2);
-}''');
-    await computeAnalysisResult(source);
-    assertErrors(source, [CompileTimeErrorCode.DUPLICATE_NAMED_ARGUMENT]);
-    verify([source]);
+}
+''', [CompileTimeErrorCode.DUPLICATE_NAMED_ARGUMENT]);
   }
 
   test_duplicatePart_sameSource() async {
-    addNamedSource('/part.dart', 'part of lib;');
-    Source source = addSource(r'''
+    newFile('/part.dart', content: 'part of lib;');
+    await assertErrorsInCode(r'''
 library lib;
 part 'part.dart';
 part 'foo/../part.dart';
-''');
-    await computeAnalysisResult(source);
-    assertErrors(source, [CompileTimeErrorCode.DUPLICATE_PART]);
-    verify([source]);
+''', [CompileTimeErrorCode.DUPLICATE_PART]);
   }
 
   test_duplicatePart_sameUri() async {
-    addNamedSource('/part.dart', 'part of lib;');
-    Source source = addSource(r'''
+    newFile('/part.dart', content: 'part of lib;');
+    await assertErrorsInCode(r'''
 library lib;
 part 'part.dart';
 part 'part.dart';
-''');
-    await computeAnalysisResult(source);
-    assertErrors(source, [CompileTimeErrorCode.DUPLICATE_PART]);
-    verify([source]);
+''', [CompileTimeErrorCode.DUPLICATE_PART]);
   }
 
   test_exportInternalLibrary() async {
-    Source source = addSource("export 'dart:_interceptors';");
-    await computeAnalysisResult(source);
-    assertErrors(source, [CompileTimeErrorCode.EXPORT_INTERNAL_LIBRARY]);
-    verify([source]);
+    await assertErrorsInCode('''
+export 'dart:_interceptors';
+''', [CompileTimeErrorCode.EXPORT_INTERNAL_LIBRARY]);
   }
 
   test_exportOfNonLibrary() async {
-    Source source = addSource(r'''
+    newFile("/lib1.dart", content: '''
+part of lib;
+''');
+    await assertErrorsInCode(r'''
 library L;
-export 'lib1.dart';''');
-    addNamedSource("/lib1.dart", "part of lib;");
-    await computeAnalysisResult(source);
-    assertErrors(source, [CompileTimeErrorCode.EXPORT_OF_NON_LIBRARY]);
-    verify([source]);
+export 'lib1.dart';
+''', [CompileTimeErrorCode.EXPORT_OF_NON_LIBRARY]);
   }
 
   test_extendsDeferredClass() async {
     await resolveWithErrors(<String>[
       r'''
 library lib1;
-class A {}''',
+class A {}
+''',
       r'''
 library root;
 import 'lib1.dart' deferred as a;
-class B extends a.A {}'''
+class B extends a.A {}
+'''
     ], <ErrorCode>[
       CompileTimeErrorCode.EXTENDS_DEFERRED_CLASS
     ]);
@@ -1743,344 +1178,282 @@
     await resolveWithErrors(<String>[
       r'''
 library lib1;
-class A {}''',
+class A {}
+''',
       r'''
 library root;
 import 'lib1.dart' deferred as a;
 class M {}
-class C = a.A with M;'''
+class C = a.A with M;
+'''
     ], <ErrorCode>[
       CompileTimeErrorCode.EXTENDS_DEFERRED_CLASS
     ]);
   }
 
   test_extendsDisallowedClass_class_bool() async {
-    Source source = addSource("class A extends bool {}");
-    await computeAnalysisResult(source);
-    assertErrors(source, [
+    await assertErrorsInCode('''
+class A extends bool {}
+''', [
       CompileTimeErrorCode.EXTENDS_DISALLOWED_CLASS,
       CompileTimeErrorCode.NO_DEFAULT_SUPER_CONSTRUCTOR_IMPLICIT
     ]);
-    verify([source]);
   }
 
   test_extendsDisallowedClass_class_double() async {
-    Source source = addSource("class A extends double {}");
-    await computeAnalysisResult(source);
-    assertErrors(source, [CompileTimeErrorCode.EXTENDS_DISALLOWED_CLASS]);
-    verify([source]);
+    await assertErrorsInCode('''
+class A extends double {}
+''', [CompileTimeErrorCode.EXTENDS_DISALLOWED_CLASS]);
   }
 
   test_extendsDisallowedClass_class_int() async {
-    Source source = addSource("class A extends int {}");
-    await computeAnalysisResult(source);
-    assertErrors(source, [
+    await assertErrorsInCode('''
+class A extends int {}
+''', [
       CompileTimeErrorCode.EXTENDS_DISALLOWED_CLASS,
       CompileTimeErrorCode.NO_DEFAULT_SUPER_CONSTRUCTOR_IMPLICIT
     ]);
-    verify([source]);
   }
 
   test_extendsDisallowedClass_class_Null() async {
-    Source source = addSource("class A extends Null {}");
-    await computeAnalysisResult(source);
-    assertErrors(source, [
+    await assertErrorsInCode('''
+class A extends Null {}
+''', [
       CompileTimeErrorCode.EXTENDS_DISALLOWED_CLASS,
       CompileTimeErrorCode.NO_DEFAULT_SUPER_CONSTRUCTOR_IMPLICIT
     ]);
-    verify([source]);
   }
 
   test_extendsDisallowedClass_class_num() async {
-    Source source = addSource("class A extends num {}");
-    await computeAnalysisResult(source);
-    assertErrors(source, [CompileTimeErrorCode.EXTENDS_DISALLOWED_CLASS]);
-    verify([source]);
+    await assertErrorsInCode('''
+class A extends num {}
+''', [CompileTimeErrorCode.EXTENDS_DISALLOWED_CLASS]);
   }
 
   test_extendsDisallowedClass_class_String() async {
-    Source source = addSource("class A extends String {}");
-    await computeAnalysisResult(source);
-    assertErrors(source, [
+    await assertErrorsInCode('''
+class A extends String {}
+''', [
       CompileTimeErrorCode.EXTENDS_DISALLOWED_CLASS,
       CompileTimeErrorCode.NO_DEFAULT_SUPER_CONSTRUCTOR_IMPLICIT
     ]);
-    verify([source]);
   }
 
   test_extendsDisallowedClass_classTypeAlias_bool() async {
-    Source source = addSource(r'''
+    await assertErrorsInCode(r'''
 class M {}
-class C = bool with M;''');
-    await computeAnalysisResult(source);
-    assertErrors(source, [CompileTimeErrorCode.EXTENDS_DISALLOWED_CLASS]);
-    verify([source]);
+class C = bool with M;
+''', [CompileTimeErrorCode.EXTENDS_DISALLOWED_CLASS]);
   }
 
   test_extendsDisallowedClass_classTypeAlias_double() async {
-    Source source = addSource(r'''
+    await assertErrorsInCode(r'''
 class M {}
-class C = double with M;''');
-    await computeAnalysisResult(source);
-    assertErrors(source, [CompileTimeErrorCode.EXTENDS_DISALLOWED_CLASS]);
-    verify([source]);
+class C = double with M;
+''', [CompileTimeErrorCode.EXTENDS_DISALLOWED_CLASS]);
   }
 
   test_extendsDisallowedClass_classTypeAlias_int() async {
-    Source source = addSource(r'''
+    await assertErrorsInCode(r'''
 class M {}
-class C = int with M;''');
-    await computeAnalysisResult(source);
-    assertErrors(source, [CompileTimeErrorCode.EXTENDS_DISALLOWED_CLASS]);
-    verify([source]);
+class C = int with M;
+''', [CompileTimeErrorCode.EXTENDS_DISALLOWED_CLASS]);
   }
 
   test_extendsDisallowedClass_classTypeAlias_Null() async {
-    Source source = addSource(r'''
+    await assertErrorsInCode(r'''
 class M {}
-class C = Null with M;''');
-    await computeAnalysisResult(source);
-    assertErrors(source, [CompileTimeErrorCode.EXTENDS_DISALLOWED_CLASS]);
-    verify([source]);
+class C = Null with M;
+''', [CompileTimeErrorCode.EXTENDS_DISALLOWED_CLASS]);
   }
 
   test_extendsDisallowedClass_classTypeAlias_num() async {
-    Source source = addSource(r'''
+    await assertErrorsInCode(r'''
 class M {}
-class C = num with M;''');
-    await computeAnalysisResult(source);
-    assertErrors(source, [CompileTimeErrorCode.EXTENDS_DISALLOWED_CLASS]);
-    verify([source]);
+class C = num with M;
+''', [CompileTimeErrorCode.EXTENDS_DISALLOWED_CLASS]);
   }
 
   test_extendsDisallowedClass_classTypeAlias_String() async {
-    Source source = addSource(r'''
+    await assertErrorsInCode(r'''
 class M {}
-class C = String with M;''');
-    await computeAnalysisResult(source);
-    assertErrors(source, [CompileTimeErrorCode.EXTENDS_DISALLOWED_CLASS]);
-    verify([source]);
+class C = String with M;
+''', [CompileTimeErrorCode.EXTENDS_DISALLOWED_CLASS]);
   }
 
   test_extraPositionalArguments_const() async {
-    Source source = addSource(r'''
+    await assertErrorsInCode(r'''
 class A {
   const A();
 }
 main() {
   const A(0);
-}''');
-    await computeAnalysisResult(source);
-    assertErrors(source, [CompileTimeErrorCode.EXTRA_POSITIONAL_ARGUMENTS]);
-    verify([source]);
+}
+''', [CompileTimeErrorCode.EXTRA_POSITIONAL_ARGUMENTS]);
   }
 
   test_extraPositionalArguments_const_super() async {
-    Source source = addSource(r'''
+    await assertErrorsInCode(r'''
 class A {
   const A();
 }
 class B extends A {
   const B() : super(0);
-}''');
-    await computeAnalysisResult(source);
-    assertErrors(source, [CompileTimeErrorCode.EXTRA_POSITIONAL_ARGUMENTS]);
-    verify([source]);
+}
+''', [CompileTimeErrorCode.EXTRA_POSITIONAL_ARGUMENTS]);
   }
 
   test_extraPositionalArgumentsCouldBeNamed_const() async {
-    Source source = addSource(r'''
+    await assertErrorsInCode(r'''
 class A {
   const A({int x});
 }
 main() {
   const A(0);
-}''');
-    await computeAnalysisResult(source);
-    assertErrors(source,
-        [CompileTimeErrorCode.EXTRA_POSITIONAL_ARGUMENTS_COULD_BE_NAMED]);
-    verify([source]);
+}
+''', [CompileTimeErrorCode.EXTRA_POSITIONAL_ARGUMENTS_COULD_BE_NAMED]);
   }
 
   test_extraPositionalArgumentsCouldBeNamed_const_super() async {
-    Source source = addSource(r'''
+    await assertErrorsInCode(r'''
 class A {
   const A({int x});
 }
 class B extends A {
   const B() : super(0);
-}''');
-    await computeAnalysisResult(source);
-    assertErrors(source,
-        [CompileTimeErrorCode.EXTRA_POSITIONAL_ARGUMENTS_COULD_BE_NAMED]);
-    verify([source]);
+}
+''', [CompileTimeErrorCode.EXTRA_POSITIONAL_ARGUMENTS_COULD_BE_NAMED]);
   }
 
   test_fieldFormalParameter_assignedInInitializer() async {
-    Source source = addSource(r'''
+    await assertErrorsInCode(r'''
 class A {
   int x;
   A(this.x) : x = 3 {}
-}''');
-    await computeAnalysisResult(source);
-    assertErrors(source,
-        [CompileTimeErrorCode.FIELD_INITIALIZED_IN_PARAMETER_AND_INITIALIZER]);
-    verify([source]);
+}
+''', [CompileTimeErrorCode.FIELD_INITIALIZED_IN_PARAMETER_AND_INITIALIZER]);
   }
 
   test_fieldInitializedByMultipleInitializers() async {
-    Source source = addSource(r'''
+    await assertErrorsInCode(r'''
 class A {
   int x;
   A() : x = 0, x = 1 {}
-}''');
-    await computeAnalysisResult(source);
-    assertErrors(source,
-        [CompileTimeErrorCode.FIELD_INITIALIZED_BY_MULTIPLE_INITIALIZERS]);
-    verify([source]);
+}
+''', [CompileTimeErrorCode.FIELD_INITIALIZED_BY_MULTIPLE_INITIALIZERS]);
   }
 
   test_fieldInitializedByMultipleInitializers_multipleInits() async {
-    Source source = addSource(r'''
+    await assertErrorsInCode(r'''
 class A {
   int x;
   A() : x = 0, x = 1, x = 2 {}
-}''');
-    await computeAnalysisResult(source);
-    assertErrors(source, [
+}
+''', [
       CompileTimeErrorCode.FIELD_INITIALIZED_BY_MULTIPLE_INITIALIZERS,
       CompileTimeErrorCode.FIELD_INITIALIZED_BY_MULTIPLE_INITIALIZERS
     ]);
-    verify([source]);
   }
 
   test_fieldInitializedByMultipleInitializers_multipleNames() async {
-    Source source = addSource(r'''
+    await assertErrorsInCode(r'''
 class A {
   int x;
   int y;
   A() : x = 0, x = 1, y = 0, y = 1 {}
-}''');
-    await computeAnalysisResult(source);
-    assertErrors(source, [
+}
+''', [
       CompileTimeErrorCode.FIELD_INITIALIZED_BY_MULTIPLE_INITIALIZERS,
       CompileTimeErrorCode.FIELD_INITIALIZED_BY_MULTIPLE_INITIALIZERS
     ]);
-    verify([source]);
   }
 
   test_fieldInitializedInParameterAndInitializer() async {
-    Source source = addSource(r'''
+    await assertErrorsInCode(r'''
 class A {
   int x;
   A(this.x) : x = 1 {}
-}''');
-    await computeAnalysisResult(source);
-    assertErrors(source,
-        [CompileTimeErrorCode.FIELD_INITIALIZED_IN_PARAMETER_AND_INITIALIZER]);
-    verify([source]);
+}
+''', [CompileTimeErrorCode.FIELD_INITIALIZED_IN_PARAMETER_AND_INITIALIZER]);
   }
 
   test_fieldInitializerFactoryConstructor() async {
-    Source source = addSource(r'''
+    await assertErrorsInCode(r'''
 class A {
   int x;
   factory A(this.x) => null;
-}''');
-    await computeAnalysisResult(source);
-    assertErrors(
-        source, [CompileTimeErrorCode.FIELD_INITIALIZER_FACTORY_CONSTRUCTOR]);
-    verify([source]);
+}
+''', [CompileTimeErrorCode.FIELD_INITIALIZER_FACTORY_CONSTRUCTOR]);
   }
 
   test_fieldInitializerOutsideConstructor() async {
     // TODO(brianwilkerson) Fix the duplicate error messages.
-    Source source = addSource(r'''
+    await assertErrorsInCode(r'''
 class A {
   int x;
   m(this.x) {}
-}''');
-    await computeAnalysisResult(source);
-    assertErrors(source, [
+}
+''', [
       ParserErrorCode.FIELD_INITIALIZER_OUTSIDE_CONSTRUCTOR,
       CompileTimeErrorCode.FIELD_INITIALIZER_OUTSIDE_CONSTRUCTOR
     ]);
-    verify([source]);
   }
 
   test_fieldInitializerOutsideConstructor_defaultParameter() async {
-    Source source = addSource(r'''
+    await assertErrorsInCode(r'''
 class A {
   int x;
   m([this.x]) {}
-}''');
-    await computeAnalysisResult(source);
-    assertErrors(
-        source, [CompileTimeErrorCode.FIELD_INITIALIZER_OUTSIDE_CONSTRUCTOR]);
-    verify([source]);
+}
+''', [CompileTimeErrorCode.FIELD_INITIALIZER_OUTSIDE_CONSTRUCTOR]);
   }
 
   test_fieldInitializerOutsideConstructor_inFunctionTypeParameter() async {
-    Source source = addSource(r'''
+    await assertErrorsInCode(r'''
 class A {
   int x;
   A(int p(this.x));
-}''');
-    await computeAnalysisResult(source);
-    assertErrors(
-        source, [CompileTimeErrorCode.FIELD_INITIALIZER_OUTSIDE_CONSTRUCTOR]);
-    verify([source]);
+}
+''', [CompileTimeErrorCode.FIELD_INITIALIZER_OUTSIDE_CONSTRUCTOR]);
   }
 
   test_fieldInitializerRedirectingConstructor_afterRedirection() async {
-    Source source = addSource(r'''
+    await assertErrorsInCode(r'''
 class A {
   int x;
   A.named() {}
   A() : this.named(), x = 42;
-}''');
-    await computeAnalysisResult(source);
-    assertErrors(source,
-        [CompileTimeErrorCode.FIELD_INITIALIZER_REDIRECTING_CONSTRUCTOR]);
-    verify([source]);
+}
+''', [CompileTimeErrorCode.FIELD_INITIALIZER_REDIRECTING_CONSTRUCTOR]);
   }
 
   test_fieldInitializerRedirectingConstructor_beforeRedirection() async {
-    Source source = addSource(r'''
+    await assertErrorsInCode(r'''
 class A {
   int x;
   A.named() {}
   A() : x = 42, this.named();
-}''');
-    await computeAnalysisResult(source);
-    assertErrors(source,
-        [CompileTimeErrorCode.FIELD_INITIALIZER_REDIRECTING_CONSTRUCTOR]);
-    verify([source]);
+}
+''', [CompileTimeErrorCode.FIELD_INITIALIZER_REDIRECTING_CONSTRUCTOR]);
   }
 
   test_fieldInitializingFormalRedirectingConstructor() async {
-    Source source = addSource(r'''
+    await assertErrorsInCode(r'''
 class A {
   int x;
   A.named() {}
   A(this.x) : this.named();
-}''');
-    await computeAnalysisResult(source);
-    assertErrors(source,
-        [CompileTimeErrorCode.FIELD_INITIALIZER_REDIRECTING_CONSTRUCTOR]);
-    verify([source]);
+}
+''', [CompileTimeErrorCode.FIELD_INITIALIZER_REDIRECTING_CONSTRUCTOR]);
   }
 
   test_finalInitializedMultipleTimes_initializers() async {
-    Source source = addSource(r'''
+    await assertErrorsInCode(r'''
 class A {
   final x;
   A() : x = 0, x = 0 {}
-}''');
-    await computeAnalysisResult(source);
-    assertErrors(source,
-        [CompileTimeErrorCode.FIELD_INITIALIZED_BY_MULTIPLE_INITIALIZERS]);
-    verify([source]);
+}
+''', [CompileTimeErrorCode.FIELD_INITIALIZED_BY_MULTIPLE_INITIALIZERS]);
   }
 
   /**
@@ -2092,189 +1465,144 @@
    * FINAL_INITIALIZED_MULTIPLE_TIMES, since it more specific, we use it instead of the broader code
    */
   test_finalInitializedMultipleTimes_initializingFormal_initializer() async {
-    Source source = addSource(r'''
+    await assertErrorsInCode(r'''
 class A {
   final x;
   A(this.x) : x = 0 {}
-}''');
-    await computeAnalysisResult(source);
-    assertErrors(source,
-        [CompileTimeErrorCode.FIELD_INITIALIZED_IN_PARAMETER_AND_INITIALIZER]);
-    verify([source]);
+}
+''', [CompileTimeErrorCode.FIELD_INITIALIZED_IN_PARAMETER_AND_INITIALIZER]);
   }
 
   test_finalInitializedMultipleTimes_initializingFormals() async {
-    Source source = addSource(r'''
+    // TODO(brianwilkerson) There should only be one error here.
+    await assertErrorsInCode(r'''
 class A {
   final x;
   A(this.x, this.x) {}
-}''');
-    // TODO(brianwilkerson) There should only be one error here.
-    await computeAnalysisResult(source);
-    assertErrors(source, [
+}
+''', [
       CompileTimeErrorCode.DUPLICATE_DEFINITION,
       CompileTimeErrorCode.FINAL_INITIALIZED_MULTIPLE_TIMES
     ]);
-    verify([source]);
   }
 
   test_finalNotInitialized_instanceField_const_static() async {
-    Source source = addSource(r'''
+    await assertErrorsInCode(r'''
 class A {
   static const F;
-}''');
-    await computeAnalysisResult(source);
-    assertErrors(source, [CompileTimeErrorCode.CONST_NOT_INITIALIZED]);
-    verify([source]);
+}
+''', [CompileTimeErrorCode.CONST_NOT_INITIALIZED]);
   }
 
   test_finalNotInitialized_library_const() async {
-    Source source = addSource("const F;");
-    await computeAnalysisResult(source);
-    assertErrors(source, [CompileTimeErrorCode.CONST_NOT_INITIALIZED]);
-    verify([source]);
+    await assertErrorsInCode('''
+const F;
+''', [CompileTimeErrorCode.CONST_NOT_INITIALIZED]);
   }
 
   test_finalNotInitialized_local_const() async {
-    Source source = addSource(r'''
+    await assertErrorsInCode(r'''
 f() {
   const int x;
-}''');
-    await computeAnalysisResult(source);
-    assertErrors(source, [CompileTimeErrorCode.CONST_NOT_INITIALIZED]);
-    verify([source]);
+}
+''', [CompileTimeErrorCode.CONST_NOT_INITIALIZED]);
   }
 
   test_forInWithConstVariable_forEach_identifier() async {
-    Source source = addSource(r'''
+    await assertErrorsInCode(r'''
 f() {
   const x = 0;
   for (x in [0, 1, 2]) {}
-}''');
-    await computeAnalysisResult(source);
-    assertErrors(source, [CompileTimeErrorCode.FOR_IN_WITH_CONST_VARIABLE]);
-    verify([source]);
+}
+''', [CompileTimeErrorCode.FOR_IN_WITH_CONST_VARIABLE]);
   }
 
   test_forInWithConstVariable_forEach_loopVariable() async {
-    Source source = addSource(r'''
+    await assertErrorsInCode(r'''
 f() {
   for (const x in [0, 1, 2]) {}
-}''');
-    await computeAnalysisResult(source);
-    assertErrors(source, [CompileTimeErrorCode.FOR_IN_WITH_CONST_VARIABLE]);
-    verify([source]);
+}
+''', [CompileTimeErrorCode.FOR_IN_WITH_CONST_VARIABLE]);
   }
 
   test_fromEnvironment_bool_badArgs() async {
-    Source source = addSource(r'''
+    await assertErrorsInCode(r'''
 var b1 = const bool.fromEnvironment(1);
-var b2 = const bool.fromEnvironment('x', defaultValue: 1);''');
-    await computeAnalysisResult(source);
-    assertErrors(source, [
+var b2 = const bool.fromEnvironment('x', defaultValue: 1);
+''', [
       CompileTimeErrorCode.CONST_EVAL_THROWS_EXCEPTION,
       StaticWarningCode.ARGUMENT_TYPE_NOT_ASSIGNABLE,
       CompileTimeErrorCode.CONST_EVAL_THROWS_EXCEPTION,
       StaticWarningCode.ARGUMENT_TYPE_NOT_ASSIGNABLE
     ]);
-    verify([source]);
   }
 
   test_fromEnvironment_bool_badDefault_whenDefined() async {
     // The type of the defaultValue needs to be correct even when the default
     // value isn't used (because the variable is defined in the environment).
-    if (enableNewAnalysisDriver) {
-      driver.declaredVariables = new DeclaredVariables.fromMap({'x': 'true'});
-    } else {
-      (analysisContext2 as AnalysisContextImpl).declaredVariables =
-          new DeclaredVariables.fromMap({'x': 'true'});
-    }
-    Source source =
-        addSource("var b = const bool.fromEnvironment('x', defaultValue: 1);");
+    driver.declaredVariables = new DeclaredVariables.fromMap({'x': 'true'});
+    Source source = addSource('''
+var b = const bool.fromEnvironment('x', defaultValue: 1);
+''');
     await computeAnalysisResult(source);
     assertErrors(source, [
       CompileTimeErrorCode.CONST_EVAL_THROWS_EXCEPTION,
       StaticWarningCode.ARGUMENT_TYPE_NOT_ASSIGNABLE
     ]);
-    verify([source]);
   }
 
   test_genericFunctionTypeArgument_inference_function() async {
-    Source source = addSource(r'''
+    await assertErrorsInCode(r'''
 T f<T>(T t) => null;
-main() { f(<S>(S s) => s); }''');
-    await computeAnalysisResult(source);
-    assertErrors(source, [StrongModeCode.COULD_NOT_INFER]);
-    verify([source]);
+main() { f(<S>(S s) => s); }
+''', [StrongModeCode.COULD_NOT_INFER]);
   }
 
   test_genericFunctionTypeArgument_inference_functionType() async {
-    Source source = addSource(r'''
+    await assertErrorsInCode(r'''
 T Function<T>(T) f;
-main() { f(<S>(S s) => s); }''');
-    await computeAnalysisResult(source);
-    assertErrors(source, [StrongModeCode.COULD_NOT_INFER]);
-    verify([source]);
+main() { f(<S>(S s) => s); }
+''', [StrongModeCode.COULD_NOT_INFER]);
   }
 
   test_genericFunctionTypeArgument_inference_method() async {
-    Source source = addSource(r'''
+    await assertErrorsInCode(r'''
 class C {
   T f<T>(T t) => null;
 }
-main() { new C().f(<S>(S s) => s); }''');
-    await computeAnalysisResult(source);
-    assertErrors(source, [StrongModeCode.COULD_NOT_INFER]);
-    verify([source]);
+main() { new C().f(<S>(S s) => s); }
+''', [StrongModeCode.COULD_NOT_INFER]);
   }
 
   test_genericFunctionTypeAsBound_class() async {
-    Source source = addSource(r'''
+    await assertErrorsInCode(r'''
 class C<T extends S Function<S>(S)> {
-}''');
-    await computeAnalysisResult(source);
-    assertErrors(
-        source, [CompileTimeErrorCode.GENERIC_FUNCTION_TYPE_CANNOT_BE_BOUND]);
-    verify([source]);
+}
+''', [CompileTimeErrorCode.GENERIC_FUNCTION_TYPE_CANNOT_BE_BOUND]);
   }
 
   test_genericFunctionTypeAsBound_genericFunction() async {
-    Source source = addSource(r'''
+    await assertErrorsInCode(r'''
 T Function<T extends S Function<S>(S)>(T) fun;
-''');
-    await computeAnalysisResult(source);
-    assertErrors(
-        source, [CompileTimeErrorCode.GENERIC_FUNCTION_TYPE_CANNOT_BE_BOUND]);
-    verify([source]);
+''', [CompileTimeErrorCode.GENERIC_FUNCTION_TYPE_CANNOT_BE_BOUND]);
   }
 
   test_genericFunctionTypeAsBound_genericFunctionTypedef() async {
-    Source source = addSource(r'''
+    await assertErrorsInCode(r'''
 typedef foo = T Function<T extends S Function<S>(S)>(T t);
-''');
-    await computeAnalysisResult(source);
-    assertErrors(
-        source, [CompileTimeErrorCode.GENERIC_FUNCTION_TYPE_CANNOT_BE_BOUND]);
-    verify([source]);
+''', [CompileTimeErrorCode.GENERIC_FUNCTION_TYPE_CANNOT_BE_BOUND]);
   }
 
   test_genericFunctionTypeAsBound_parameterOfFunction() async {
-    Source source = addSource(r'''
-class C<T extends void Function(S Function<S>(S))> {
-}''');
-    await computeAnalysisResult(source);
-    assertNoErrors(source);
-    verify([source]);
+    await assertNoErrorsInCode(r'''
+class C<T extends void Function(S Function<S>(S))> {}
+''');
   }
 
   test_genericFunctionTypeAsBound_typedef() async {
-    Source source = addSource(r'''
+    await assertErrorsInCode(r'''
 typedef T foo<T extends S Function<S>(S)>(T t);
-''');
-    await computeAnalysisResult(source);
-    assertErrors(
-        source, [CompileTimeErrorCode.GENERIC_FUNCTION_TYPE_CANNOT_BE_BOUND]);
-    verify([source]);
+''', [CompileTimeErrorCode.GENERIC_FUNCTION_TYPE_CANNOT_BE_BOUND]);
   }
 
   test_genericFunctionTypedParameter() async {
@@ -2282,32 +1610,27 @@
     // error.
     // TODO(paulberry): When dartbug.com/28515 is fixed, convert this into a
     // NonErrorResolverTest.
-    Source source = addSource('void g(T f<T>(T x)) {}');
-    await computeAnalysisResult(source);
-    var expectedErrorCodes = <ErrorCode>[
-      CompileTimeErrorCode.GENERIC_FUNCTION_TYPED_PARAM_UNSUPPORTED
-    ];
-    if (enableNewAnalysisDriver) {
+    await assertErrorsInCode('''
+void g(T f<T>(T x)) {}
+''', [
+      CompileTimeErrorCode.GENERIC_FUNCTION_TYPED_PARAM_UNSUPPORTED,
       // Due to dartbug.com/28515, some additional errors appear when using the
       // new analysis driver.
-      expectedErrorCodes.addAll([
-        StaticWarningCode.UNDEFINED_CLASS,
-        StaticWarningCode.UNDEFINED_CLASS
-      ]);
-    }
-    assertErrors(source, expectedErrorCodes);
-    verify([source]);
+      StaticWarningCode.UNDEFINED_CLASS, StaticWarningCode.UNDEFINED_CLASS
+    ]);
   }
 
   test_implementsDeferredClass() async {
     await resolveWithErrors(<String>[
       r'''
 library lib1;
-class A {}''',
+class A {}
+''',
       r'''
 library root;
 import 'lib1.dart' deferred as a;
-class B implements a.A {}'''
+class B implements a.A {}
+'''
     ], <ErrorCode>[
       CompileTimeErrorCode.IMPLEMENTS_DEFERRED_CLASS
     ]);
@@ -2317,337 +1640,269 @@
     await resolveWithErrors(<String>[
       r'''
 library lib1;
-class A {}''',
+class A {}
+''',
       r'''
 library root;
 import 'lib1.dart' deferred as a;
 class B {}
 class M {}
-class C = B with M implements a.A;'''
+class C = B with M implements a.A;
+'''
     ], <ErrorCode>[
       CompileTimeErrorCode.IMPLEMENTS_DEFERRED_CLASS
     ]);
   }
 
   test_implementsDisallowedClass_class_bool() async {
-    Source source = addSource("class A implements bool {}");
-    await computeAnalysisResult(source);
-    assertErrors(source, [CompileTimeErrorCode.IMPLEMENTS_DISALLOWED_CLASS]);
-    verify([source]);
+    await assertErrorsInCode('''
+class A implements bool {}
+''', [CompileTimeErrorCode.IMPLEMENTS_DISALLOWED_CLASS]);
   }
 
   test_implementsDisallowedClass_class_double() async {
-    Source source = addSource("class A implements double {}");
-    await computeAnalysisResult(source);
-    assertErrors(source, [CompileTimeErrorCode.IMPLEMENTS_DISALLOWED_CLASS]);
-    verify([source]);
+    await assertErrorsInCode('''
+class A implements double {}
+''', [CompileTimeErrorCode.IMPLEMENTS_DISALLOWED_CLASS]);
   }
 
   test_implementsDisallowedClass_class_int() async {
-    Source source = addSource("class A implements int {}");
-    await computeAnalysisResult(source);
-    assertErrors(source, [CompileTimeErrorCode.IMPLEMENTS_DISALLOWED_CLASS]);
-    verify([source]);
+    await assertErrorsInCode('''
+class A implements int {}
+''', [CompileTimeErrorCode.IMPLEMENTS_DISALLOWED_CLASS]);
   }
 
   test_implementsDisallowedClass_class_Null() async {
-    Source source = addSource("class A implements Null {}");
-    await computeAnalysisResult(source);
-    assertErrors(source, [CompileTimeErrorCode.IMPLEMENTS_DISALLOWED_CLASS]);
-    verify([source]);
+    await assertErrorsInCode('''
+class A implements Null {}
+''', [CompileTimeErrorCode.IMPLEMENTS_DISALLOWED_CLASS]);
   }
 
   test_implementsDisallowedClass_class_num() async {
-    Source source = addSource("class A implements num {}");
-    await computeAnalysisResult(source);
-    assertErrors(source, [CompileTimeErrorCode.IMPLEMENTS_DISALLOWED_CLASS]);
-    verify([source]);
+    await assertErrorsInCode('''
+class A implements num {}
+''', [CompileTimeErrorCode.IMPLEMENTS_DISALLOWED_CLASS]);
   }
 
   test_implementsDisallowedClass_class_String() async {
-    Source source = addSource("class A implements String {}");
-    await computeAnalysisResult(source);
-    assertErrors(source, [CompileTimeErrorCode.IMPLEMENTS_DISALLOWED_CLASS]);
-    verify([source]);
+    await assertErrorsInCode('''
+class A implements String {}
+''', [CompileTimeErrorCode.IMPLEMENTS_DISALLOWED_CLASS]);
   }
 
   test_implementsDisallowedClass_class_String_num() async {
-    Source source = addSource("class A implements String, num {}");
-    await computeAnalysisResult(source);
-    if (enableNewAnalysisDriver) {
-      assertErrors(source, [
-        CompileTimeErrorCode.IMPLEMENTS_DISALLOWED_CLASS,
-        CompileTimeErrorCode.IMPLEMENTS_DISALLOWED_CLASS
-      ]);
-    } else {
-      assertErrors(source, [
-        CompileTimeErrorCode.IMPLEMENTS_DISALLOWED_CLASS,
-        CompileTimeErrorCode.IMPLEMENTS_DISALLOWED_CLASS
-      ]);
-    }
-    verify([source]);
+    await assertErrorsInCode('''
+class A implements String, num {}
+''', [
+      CompileTimeErrorCode.IMPLEMENTS_DISALLOWED_CLASS,
+      CompileTimeErrorCode.IMPLEMENTS_DISALLOWED_CLASS
+    ]);
   }
 
   test_implementsDisallowedClass_classTypeAlias_bool() async {
-    Source source = addSource(r'''
+    await assertErrorsInCode(r'''
 class A {}
 class M {}
-class C = A with M implements bool;''');
-    await computeAnalysisResult(source);
-    assertErrors(source, [CompileTimeErrorCode.IMPLEMENTS_DISALLOWED_CLASS]);
-    verify([source]);
+class C = A with M implements bool;
+''', [CompileTimeErrorCode.IMPLEMENTS_DISALLOWED_CLASS]);
   }
 
   test_implementsDisallowedClass_classTypeAlias_double() async {
-    Source source = addSource(r'''
+    await assertErrorsInCode(r'''
 class A {}
 class M {}
-class C = A with M implements double;''');
-    await computeAnalysisResult(source);
-    assertErrors(source, [CompileTimeErrorCode.IMPLEMENTS_DISALLOWED_CLASS]);
-    verify([source]);
+class C = A with M implements double;
+''', [CompileTimeErrorCode.IMPLEMENTS_DISALLOWED_CLASS]);
   }
 
   test_implementsDisallowedClass_classTypeAlias_int() async {
-    Source source = addSource(r'''
+    await assertErrorsInCode(r'''
 class A {}
 class M {}
-class C = A with M implements int;''');
-    await computeAnalysisResult(source);
-    assertErrors(source, [CompileTimeErrorCode.IMPLEMENTS_DISALLOWED_CLASS]);
-    verify([source]);
+class C = A with M implements int;
+''', [CompileTimeErrorCode.IMPLEMENTS_DISALLOWED_CLASS]);
   }
 
   test_implementsDisallowedClass_classTypeAlias_Null() async {
-    Source source = addSource(r'''
+    await assertErrorsInCode(r'''
 class A {}
 class M {}
-class C = A with M implements Null;''');
-    await computeAnalysisResult(source);
-    assertErrors(source, [CompileTimeErrorCode.IMPLEMENTS_DISALLOWED_CLASS]);
-    verify([source]);
+class C = A with M implements Null;
+''', [CompileTimeErrorCode.IMPLEMENTS_DISALLOWED_CLASS]);
   }
 
   test_implementsDisallowedClass_classTypeAlias_num() async {
-    Source source = addSource(r'''
+    await assertErrorsInCode(r'''
 class A {}
 class M {}
-class C = A with M implements num;''');
-    await computeAnalysisResult(source);
-    assertErrors(source, [CompileTimeErrorCode.IMPLEMENTS_DISALLOWED_CLASS]);
-    verify([source]);
+class C = A with M implements num;
+''', [CompileTimeErrorCode.IMPLEMENTS_DISALLOWED_CLASS]);
   }
 
   test_implementsDisallowedClass_classTypeAlias_String() async {
-    Source source = addSource(r'''
+    await assertErrorsInCode(r'''
 class A {}
 class M {}
-class C = A with M implements String;''');
-    await computeAnalysisResult(source);
-    assertErrors(source, [CompileTimeErrorCode.IMPLEMENTS_DISALLOWED_CLASS]);
-    verify([source]);
+class C = A with M implements String;
+''', [CompileTimeErrorCode.IMPLEMENTS_DISALLOWED_CLASS]);
   }
 
   test_implementsDisallowedClass_classTypeAlias_String_num() async {
-    Source source = addSource(r'''
+    await assertErrorsInCode(r'''
 class A {}
 class M {}
-class C = A with M implements String, num;''');
-    await computeAnalysisResult(source);
-    if (enableNewAnalysisDriver) {
-      assertErrors(source, [
-        CompileTimeErrorCode.IMPLEMENTS_DISALLOWED_CLASS,
-        CompileTimeErrorCode.IMPLEMENTS_DISALLOWED_CLASS
-      ]);
-    } else {
-      assertErrors(source, [
-        CompileTimeErrorCode.IMPLEMENTS_DISALLOWED_CLASS,
-        CompileTimeErrorCode.IMPLEMENTS_DISALLOWED_CLASS
-      ]);
-    }
-    verify([source]);
+class C = A with M implements String, num;
+''', [
+      CompileTimeErrorCode.IMPLEMENTS_DISALLOWED_CLASS,
+      CompileTimeErrorCode.IMPLEMENTS_DISALLOWED_CLASS
+    ]);
   }
 
   test_implementsNonClass_class() async {
-    Source source = addSource(r'''
+    await assertErrorsInCode(r'''
 int A;
-class B implements A {}''');
-    await computeAnalysisResult(source);
-    assertErrors(source, [CompileTimeErrorCode.IMPLEMENTS_NON_CLASS]);
-    verify([source]);
+class B implements A {}
+''', [CompileTimeErrorCode.IMPLEMENTS_NON_CLASS]);
   }
 
   test_implementsNonClass_dynamic() async {
-    Source source = addSource("class A implements dynamic {}");
-    await computeAnalysisResult(source);
-    assertErrors(source, [CompileTimeErrorCode.IMPLEMENTS_NON_CLASS]);
-    verify([source]);
+    await assertErrorsInCode('''
+class A implements dynamic {}
+''', [CompileTimeErrorCode.IMPLEMENTS_NON_CLASS]);
   }
 
   test_implementsNonClass_enum() async {
-    Source source = addSource(r'''
+    await assertErrorsInCode(r'''
 enum E { ONE }
-class A implements E {}''');
-    await computeAnalysisResult(source);
-    assertErrors(source, [CompileTimeErrorCode.IMPLEMENTS_NON_CLASS]);
-    verify([source]);
+class A implements E {}
+''', [CompileTimeErrorCode.IMPLEMENTS_NON_CLASS]);
   }
 
   test_implementsNonClass_typeAlias() async {
-    Source source = addSource(r'''
+    await assertErrorsInCode(r'''
 class A {}
 class M {}
 int B;
-class C = A with M implements B;''');
-    await computeAnalysisResult(source);
-    assertErrors(source, [CompileTimeErrorCode.IMPLEMENTS_NON_CLASS]);
-    verify([source]);
+class C = A with M implements B;
+''', [CompileTimeErrorCode.IMPLEMENTS_NON_CLASS]);
   }
 
   test_implementsSuperClass() async {
-    Source source = addSource(r'''
+    await assertErrorsInCode(r'''
 class A {}
-class B extends A implements A {}''');
-    await computeAnalysisResult(source);
-    assertErrors(source, [CompileTimeErrorCode.IMPLEMENTS_SUPER_CLASS]);
-    verify([source]);
+class B extends A implements A {}
+''', [CompileTimeErrorCode.IMPLEMENTS_SUPER_CLASS]);
   }
 
   test_implementsSuperClass_Object() async {
-    Source source = addSource("class A implements Object {}");
-    await computeAnalysisResult(source);
-    assertErrors(source, [CompileTimeErrorCode.IMPLEMENTS_SUPER_CLASS]);
-    verify([source]);
+    await assertErrorsInCode('''
+class A implements Object {}
+''', [CompileTimeErrorCode.IMPLEMENTS_SUPER_CLASS]);
   }
 
   test_implementsSuperClass_Object_typeAlias() async {
-    Source source = addSource(r'''
+    await assertErrorsInCode(r'''
 class M {}
 class A = Object with M implements Object;
-    ''');
-    await computeAnalysisResult(source);
-    assertErrors(source, [CompileTimeErrorCode.IMPLEMENTS_SUPER_CLASS]);
-    verify([source]);
+''', [CompileTimeErrorCode.IMPLEMENTS_SUPER_CLASS]);
   }
 
   test_implementsSuperClass_typeAlias() async {
-    Source source = addSource(r'''
+    await assertErrorsInCode(r'''
 class A {}
 class M {}
-class B = A with M implements A;''');
-    await computeAnalysisResult(source);
-    assertErrors(source, [CompileTimeErrorCode.IMPLEMENTS_SUPER_CLASS]);
-    verify([source]);
+class B = A with M implements A;
+''', [CompileTimeErrorCode.IMPLEMENTS_SUPER_CLASS]);
   }
 
   test_implicitThisReferenceInInitializer_field() async {
-    Source source = addSource(r'''
+    await assertErrorsInCode(r'''
 class A {
   var v;
   A() : v = f;
   var f;
-}''');
-    await computeAnalysisResult(source);
-    assertErrors(
-        source, [CompileTimeErrorCode.IMPLICIT_THIS_REFERENCE_IN_INITIALIZER]);
-    verify([source]);
+}
+''', [CompileTimeErrorCode.IMPLICIT_THIS_REFERENCE_IN_INITIALIZER]);
   }
 
   test_implicitThisReferenceInInitializer_field2() async {
-    Source source = addSource(r'''
+    await assertErrorsInCode(r'''
 class A {
   final x = 0;
   final y = x;
-}''');
-    await computeAnalysisResult(source);
-    assertErrors(source, [
+}
+''', [
       CompileTimeErrorCode.IMPLICIT_THIS_REFERENCE_IN_INITIALIZER,
       StrongModeCode.TOP_LEVEL_INSTANCE_GETTER
     ]);
-    verify([source]);
   }
 
   test_implicitThisReferenceInInitializer_invocation() async {
-    Source source = addSource(r'''
+    await assertErrorsInCode(r'''
 class A {
   var v;
   A() : v = f();
   f() {}
-}''');
-    await computeAnalysisResult(source);
-    assertErrors(
-        source, [CompileTimeErrorCode.IMPLICIT_THIS_REFERENCE_IN_INITIALIZER]);
-    verify([source]);
+}
+''', [CompileTimeErrorCode.IMPLICIT_THIS_REFERENCE_IN_INITIALIZER]);
   }
 
   test_implicitThisReferenceInInitializer_invocationInStatic() async {
-    Source source = addSource(r'''
+    await assertErrorsInCode(r'''
 class A {
   static var F = m();
   int m() => 0;
-}''');
-    await computeAnalysisResult(source);
-    assertErrors(
-        source, [CompileTimeErrorCode.IMPLICIT_THIS_REFERENCE_IN_INITIALIZER]);
-    verify([source]);
+}
+''', [CompileTimeErrorCode.IMPLICIT_THIS_REFERENCE_IN_INITIALIZER]);
   }
 
   test_implicitThisReferenceInInitializer_redirectingConstructorInvocation() async {
-    Source source = addSource(r'''
+    await assertErrorsInCode(r'''
 class A {
   A(p) {}
   A.named() : this(f);
   var f;
-}''');
-    await computeAnalysisResult(source);
-    assertErrors(
-        source, [CompileTimeErrorCode.IMPLICIT_THIS_REFERENCE_IN_INITIALIZER]);
-    verify([source]);
+}
+''', [CompileTimeErrorCode.IMPLICIT_THIS_REFERENCE_IN_INITIALIZER]);
   }
 
   test_implicitThisReferenceInInitializer_superConstructorInvocation() async {
-    Source source = addSource(r'''
+    await assertErrorsInCode(r'''
 class A {
   A(p) {}
 }
 class B extends A {
   B() : super(f);
   var f;
-}''');
-    await computeAnalysisResult(source);
-    assertErrors(
-        source, [CompileTimeErrorCode.IMPLICIT_THIS_REFERENCE_IN_INITIALIZER]);
-    verify([source]);
+}
+''', [CompileTimeErrorCode.IMPLICIT_THIS_REFERENCE_IN_INITIALIZER]);
   }
 
   test_importInternalLibrary() async {
-    Source source = addSource("import 'dart:_interceptors';");
     // Note, in these error cases we may generate an UNUSED_IMPORT hint, while
     // we could prevent the hint from being generated by testing the import
     // directive for the error, this is such a minor corner case that we don't
     // think we should add the additional computation time to figure out such
     // cases.
-    await computeAnalysisResult(source);
-    assertErrors(source,
-        [CompileTimeErrorCode.IMPORT_INTERNAL_LIBRARY, HintCode.UNUSED_IMPORT]);
-    verify([source]);
+    await assertErrorsInCode('''
+import 'dart:_interceptors';
+''', [CompileTimeErrorCode.IMPORT_INTERNAL_LIBRARY, HintCode.UNUSED_IMPORT]);
   }
 
   test_importOfNonLibrary() async {
-    Source source = addSource(r'''
+    newFile("/part.dart", content: r'''
+part of lib;
+class A{}
+''');
+    await assertErrorsInCode(r'''
 library lib;
 import 'part.dart';
-A a;''');
-    addNamedSource("/part.dart", r'''
-part of lib;
-class A{}''');
-    await computeAnalysisResult(source);
-    assertErrors(source, [CompileTimeErrorCode.IMPORT_OF_NON_LIBRARY]);
-    verify([source]);
+A a;
+''', [CompileTimeErrorCode.IMPORT_OF_NON_LIBRARY]);
   }
 
   test_inconsistentCaseExpressionTypes() async {
-    Source source = addSource(r'''
+    await assertErrorsInCode(r'''
 f(var p) {
   switch (p) {
     case 1:
@@ -2655,17 +1910,14 @@
     case 'a':
       break;
   }
-}''');
-    await computeAnalysisResult(source);
-    assertErrors(
-        source, [CompileTimeErrorCode.INCONSISTENT_CASE_EXPRESSION_TYPES]);
-    verify([source]);
+}
+''', [CompileTimeErrorCode.INCONSISTENT_CASE_EXPRESSION_TYPES]);
   }
 
   test_inconsistentCaseExpressionTypes_dynamic() async {
     // Even though A.S and S have a static type of "dynamic", we should see
     // that they fail to match 3, because they are constant strings.
-    Source source = addSource(r'''
+    await assertErrorsInCode(r'''
 class A {
   static const S = 'A.S';
 }
@@ -2681,17 +1933,15 @@
     case A.S:
       break;
   }
-}''');
-    await computeAnalysisResult(source);
-    assertErrors(source, [
+}
+''', [
       CompileTimeErrorCode.INCONSISTENT_CASE_EXPRESSION_TYPES,
       CompileTimeErrorCode.INCONSISTENT_CASE_EXPRESSION_TYPES
     ]);
-    verify([source]);
   }
 
   test_inconsistentCaseExpressionTypes_repeated() async {
-    Source source = addSource(r'''
+    await assertErrorsInCode(r'''
 f(var p) {
   switch (p) {
     case 1:
@@ -2701,111 +1951,88 @@
     case 'b':
       break;
   }
-}''');
-    await computeAnalysisResult(source);
-    assertErrors(source, [
+}
+''', [
       CompileTimeErrorCode.INCONSISTENT_CASE_EXPRESSION_TYPES,
       CompileTimeErrorCode.INCONSISTENT_CASE_EXPRESSION_TYPES
     ]);
-    verify([source]);
   }
 
   test_initializerForNonExistent_const() async {
     // Check that the absence of a matching field doesn't cause a
     // crash during constant evaluation.
-    Source source = addSource(r'''
+    await assertErrorsInCode(r'''
 class A {
   const A() : x = 'foo';
 }
-A a = const A();''');
-    await computeAnalysisResult(source);
-    assertErrors(
-        source, [CompileTimeErrorCode.INITIALIZER_FOR_NON_EXISTENT_FIELD]);
+A a = const A();
+''', [CompileTimeErrorCode.INITIALIZER_FOR_NON_EXISTENT_FIELD], verify: false);
   }
 
   test_initializerForNonExistent_initializer() async {
-    Source source = addSource(r'''
+    await assertErrorsInCode(r'''
 class A {
   A() : x = 0 {}
-}''');
-    await computeAnalysisResult(source);
-    assertErrors(
-        source, [CompileTimeErrorCode.INITIALIZER_FOR_NON_EXISTENT_FIELD]);
+}
+''', [CompileTimeErrorCode.INITIALIZER_FOR_NON_EXISTENT_FIELD], verify: false);
   }
 
   test_initializerForStaticField() async {
-    Source source = addSource(r'''
+    await assertErrorsInCode(r'''
 class A {
   static int x;
   A() : x = 0 {}
-}''');
-    await computeAnalysisResult(source);
-    assertErrors(source, [CompileTimeErrorCode.INITIALIZER_FOR_STATIC_FIELD]);
-    verify([source]);
+}
+''', [CompileTimeErrorCode.INITIALIZER_FOR_STATIC_FIELD]);
   }
 
   test_initializingFormalForNonExistentField() async {
-    Source source = addSource(r'''
+    await assertErrorsInCode(r'''
 class A {
   A(this.x) {}
-}''');
-    await computeAnalysisResult(source);
-    assertErrors(source,
-        [CompileTimeErrorCode.INITIALIZING_FORMAL_FOR_NON_EXISTENT_FIELD]);
-    verify([source]);
+}
+''', [CompileTimeErrorCode.INITIALIZING_FORMAL_FOR_NON_EXISTENT_FIELD]);
   }
 
   test_initializingFormalForNonExistentField_notInEnclosingClass() async {
-    Source source = addSource(r'''
+    await assertErrorsInCode(r'''
 class A {
 int x;
 }
 class B extends A {
   B(this.x) {}
-}''');
-    await computeAnalysisResult(source);
-    assertErrors(source,
-        [CompileTimeErrorCode.INITIALIZING_FORMAL_FOR_NON_EXISTENT_FIELD]);
-    verify([source]);
+}
+''', [CompileTimeErrorCode.INITIALIZING_FORMAL_FOR_NON_EXISTENT_FIELD]);
   }
 
   test_initializingFormalForNonExistentField_optional() async {
-    Source source = addSource(r'''
+    await assertErrorsInCode(r'''
 class A {
   A([this.x]) {}
-}''');
-    await computeAnalysisResult(source);
-    assertErrors(source,
-        [CompileTimeErrorCode.INITIALIZING_FORMAL_FOR_NON_EXISTENT_FIELD]);
-    verify([source]);
+}
+''', [CompileTimeErrorCode.INITIALIZING_FORMAL_FOR_NON_EXISTENT_FIELD]);
   }
 
   test_initializingFormalForNonExistentField_synthetic() async {
-    Source source = addSource(r'''
+    await assertErrorsInCode(r'''
 class A {
   int get x => 1;
   A(this.x) {}
-}''');
-    await computeAnalysisResult(source);
-    assertErrors(source,
-        [CompileTimeErrorCode.INITIALIZING_FORMAL_FOR_NON_EXISTENT_FIELD]);
-    verify([source]);
+}
+''', [CompileTimeErrorCode.INITIALIZING_FORMAL_FOR_NON_EXISTENT_FIELD]);
   }
 
   test_initializingFormalForStaticField() async {
-    Source source = addSource(r'''
+    await assertErrorsInCode(r'''
 class A {
   static int x;
   A([this.x]) {}
-}''');
-    await computeAnalysisResult(source);
-    assertErrors(
-        source, [CompileTimeErrorCode.INITIALIZING_FORMAL_FOR_STATIC_FIELD]);
-    verify([source]);
+}
+''', [CompileTimeErrorCode.INITIALIZING_FORMAL_FOR_STATIC_FIELD]);
   }
 
   test_instanceMemberAccessFromFactory_named() async {
-    Source source = addSource(r'''
+    await assertErrorsInCode(r'''
 class A {
   m() {}
   A();
@@ -2813,15 +2040,12 @@
     m();
     return new A();
   }
-}''');
-    await computeAnalysisResult(source);
-    assertErrors(
-        source, [CompileTimeErrorCode.INSTANCE_MEMBER_ACCESS_FROM_FACTORY]);
-    verify([source]);
+}
+''', [CompileTimeErrorCode.INSTANCE_MEMBER_ACCESS_FROM_FACTORY]);
   }
 
   test_instanceMemberAccessFromFactory_unnamed() async {
-    Source source = addSource(r'''
+    await assertErrorsInCode(r'''
 class A {
   m() {}
   A._();
@@ -2829,53 +2053,41 @@
     m();
     return new A._();
   }
-}''');
-    await computeAnalysisResult(source);
-    assertErrors(
-        source, [CompileTimeErrorCode.INSTANCE_MEMBER_ACCESS_FROM_FACTORY]);
-    verify([source]);
+}
+''', [CompileTimeErrorCode.INSTANCE_MEMBER_ACCESS_FROM_FACTORY]);
   }
 
   test_instanceMemberAccessFromStatic_field() async {
-    Source source = addSource(r'''
+    await assertErrorsInCode(r'''
 class A {
   int f;
   static foo() {
     f;
   }
-}''');
-    await computeAnalysisResult(source);
-    assertErrors(
-        source, [CompileTimeErrorCode.INSTANCE_MEMBER_ACCESS_FROM_STATIC]);
-    verify([source]);
+}
+''', [CompileTimeErrorCode.INSTANCE_MEMBER_ACCESS_FROM_STATIC]);
   }
 
   test_instanceMemberAccessFromStatic_getter() async {
-    Source source = addSource(r'''
+    await assertErrorsInCode(r'''
 class A {
   get g => null;
   static foo() {
     g;
   }
-}''');
-    await computeAnalysisResult(source);
-    assertErrors(
-        source, [CompileTimeErrorCode.INSTANCE_MEMBER_ACCESS_FROM_STATIC]);
-    verify([source]);
+}
+''', [CompileTimeErrorCode.INSTANCE_MEMBER_ACCESS_FROM_STATIC]);
   }
 
   test_instanceMemberAccessFromStatic_method() async {
-    Source source = addSource(r'''
+    await assertErrorsInCode(r'''
 class A {
   m() {}
   static foo() {
     m();
   }
-}''');
-    await computeAnalysisResult(source);
-    assertErrors(
-        source, [CompileTimeErrorCode.INSTANCE_MEMBER_ACCESS_FROM_STATIC]);
-    verify([source]);
+}
+''', [CompileTimeErrorCode.INSTANCE_MEMBER_ACCESS_FROM_STATIC]);
   }
 
   test_instantiate_to_bounds_not_matching_bounds() async {
@@ -2896,25 +2108,21 @@
   }
 
   test_instantiateEnum_const() async {
-    Source source = addSource(r'''
+    await assertErrorsInCode(r'''
 enum E { ONE }
 E e(String name) {
   return const E();
-}''');
-    await computeAnalysisResult(source);
-    assertErrors(source, [CompileTimeErrorCode.INSTANTIATE_ENUM]);
-    verify([source]);
+}
+''', [CompileTimeErrorCode.INSTANTIATE_ENUM]);
   }
 
   test_instantiateEnum_new() async {
-    Source source = addSource(r'''
+    await assertErrorsInCode(r'''
 enum E { ONE }
 E e(String name) {
   return new E();
-}''');
-    await computeAnalysisResult(source);
-    assertErrors(source, [CompileTimeErrorCode.INSTANTIATE_ENUM]);
-    verify([source]);
+}
+''', [CompileTimeErrorCode.INSTANTIATE_ENUM]);
   }
 
   test_integerLiteralAsDoubleOutOfRange_excessiveExponent() async {
@@ -2940,7 +2148,9 @@
   }
 
   test_integerLiteralAsDoubleOutOfRange_excessiveMantissa() async {
-    Source source = addSource('double x = 9223372036854775809;');
+    Source source = addSource('''
+double x = 9223372036854775809;
+''');
     await computeAnalysisResult(source);
     assertErrors(
         source, [CompileTimeErrorCode.INTEGER_LITERAL_IMPRECISE_AS_DOUBLE]);
@@ -2950,78 +2160,70 @@
   }
 
   test_integerLiteralOutOfRange_negative() async {
-    Source source = addSource('int x = -9223372036854775809;');
-    await computeAnalysisResult(source);
-    assertErrors(source, [CompileTimeErrorCode.INTEGER_LITERAL_OUT_OF_RANGE]);
+    await assertErrorsInCode('''
+int x = -9223372036854775809;
+''', [CompileTimeErrorCode.INTEGER_LITERAL_OUT_OF_RANGE]);
   }
 
   test_integerLiteralOutOfRange_positive() async {
-    Source source = addSource('int x = 9223372036854775808;');
-    await computeAnalysisResult(source);
-    assertErrors(source, [CompileTimeErrorCode.INTEGER_LITERAL_OUT_OF_RANGE]);
+    await assertErrorsInCode('''
+int x = 9223372036854775808;
+''', [CompileTimeErrorCode.INTEGER_LITERAL_OUT_OF_RANGE]);
   }
 
   test_invalidAnnotation_importWithPrefix_notConstantVariable() async {
-    addNamedSource("/lib.dart", r'''
+    newFile("/lib.dart", content: r'''
 library lib;
-final V = 0;''');
-    Source source = addSource(r'''
+final V = 0;
+''');
+    await assertErrorsInCode(r'''
 import 'lib.dart' as p;
 @p.V
 main() {
-}''');
-    await computeAnalysisResult(source);
-    assertErrors(source, [CompileTimeErrorCode.INVALID_ANNOTATION]);
-    verify([source]);
+}
+''', [CompileTimeErrorCode.INVALID_ANNOTATION]);
   }
 
   test_invalidAnnotation_importWithPrefix_notVariableOrConstructorInvocation() async {
-    addNamedSource("/lib.dart", r'''
+    newFile("/lib.dart", content: r'''
 library lib;
-typedef V();''');
-    Source source = addSource(r'''
+typedef V();
+''');
+    await assertErrorsInCode(r'''
 import 'lib.dart' as p;
 @p.V
 main() {
-}''');
-    await computeAnalysisResult(source);
-    assertErrors(source, [CompileTimeErrorCode.INVALID_ANNOTATION]);
-    verify([source]);
+}
+''', [CompileTimeErrorCode.INVALID_ANNOTATION]);
   }
 
   test_invalidAnnotation_notConstantVariable() async {
-    Source source = addSource(r'''
+    await assertErrorsInCode(r'''
 final V = 0;
 @V
 main() {
-}''');
-    await computeAnalysisResult(source);
-    assertErrors(source, [CompileTimeErrorCode.INVALID_ANNOTATION]);
-    verify([source]);
+}
+''', [CompileTimeErrorCode.INVALID_ANNOTATION]);
   }
 
   test_invalidAnnotation_notVariableOrConstructorInvocation() async {
-    Source source = addSource(r'''
+    await assertErrorsInCode(r'''
 typedef V();
 @V
 main() {
-}''');
-    await computeAnalysisResult(source);
-    assertErrors(source, [CompileTimeErrorCode.INVALID_ANNOTATION]);
-    verify([source]);
+}
+''', [CompileTimeErrorCode.INVALID_ANNOTATION]);
   }
 
   test_invalidAnnotation_staticMethodReference() async {
-    Source source = addSource(r'''
+    await assertErrorsInCode(r'''
 class A {
   static f() {}
 }
 @A.f
 main() {
-}''');
-    await computeAnalysisResult(source);
-    assertErrors(source, [CompileTimeErrorCode.INVALID_ANNOTATION]);
-    verify([source]);
+}
+''', [CompileTimeErrorCode.INVALID_ANNOTATION]);
   }
 
   test_invalidAnnotationFromDeferredLibrary() async {
@@ -3030,11 +2232,13 @@
       r'''
 library lib1;
 class V { const V(); }
-const v = const V();''',
+const v = const V();
+''',
       r'''
 library root;
 import 'lib1.dart' deferred as a;
-@a.v main () {}'''
+@a.v main () {}
+'''
     ], <ErrorCode>[
       CompileTimeErrorCode.INVALID_ANNOTATION_FROM_DEFERRED_LIBRARY
     ]);
@@ -3045,11 +2249,13 @@
     await resolveWithErrors(<String>[
       r'''
 library lib1;
-class C { const C(); }''',
+class C { const C(); }
+''',
       r'''
 library root;
 import 'lib1.dart' deferred as a;
-@a.C() main () {}'''
+@a.C() main () {}
+'''
     ], <ErrorCode>[
       CompileTimeErrorCode.INVALID_ANNOTATION_FROM_DEFERRED_LIBRARY
     ]);
@@ -3060,398 +2266,311 @@
     await resolveWithErrors(<String>[
       r'''
 library lib1;
-class C { const C.name(); }''',
+class C { const C.name(); }
+''',
       r'''
 library root;
 import 'lib1.dart' deferred as a;
-@a.C.name() main () {}'''
+@a.C.name() main () {}
+'''
     ], <ErrorCode>[
       CompileTimeErrorCode.INVALID_ANNOTATION_FROM_DEFERRED_LIBRARY
     ]);
   }
 
   test_invalidAnnotationGetter_getter() async {
-    Source source = addSource(r'''
+    await assertErrorsInCode(r'''
 get V => 0;
 @V
 main() {
-}''');
-    await computeAnalysisResult(source);
-    assertErrors(source, [CompileTimeErrorCode.INVALID_ANNOTATION_GETTER]);
-    verify([source]);
+}
+''', [CompileTimeErrorCode.INVALID_ANNOTATION_GETTER]);
   }
 
   test_invalidAnnotationGetter_importWithPrefix_getter() async {
-    addNamedSource("/lib.dart", r'''
+    newFile("/lib.dart", content: r'''
 library lib;
-get V => 0;''');
-    Source source = addSource(r'''
+get V => 0;
+''');
+    await assertErrorsInCode(r'''
 import 'lib.dart' as p;
 @p.V
 main() {
-}''');
-    await computeAnalysisResult(source);
-    assertErrors(source, [CompileTimeErrorCode.INVALID_ANNOTATION_GETTER]);
-    verify([source]);
+}
+''', [CompileTimeErrorCode.INVALID_ANNOTATION_GETTER]);
   }
 
   test_invalidConstructorName_notEnclosingClassName_defined() async {
-    Source source = addSource(r'''
+    await assertErrorsInCode(r'''
 class A {
   B() : super();
 }
-class B {}''');
-    await computeAnalysisResult(source);
-    assertErrors(source, [CompileTimeErrorCode.INVALID_CONSTRUCTOR_NAME]);
-    // no verify() call, "B" is not resolved
+class B {}
+''', [CompileTimeErrorCode.INVALID_CONSTRUCTOR_NAME]);
   }
 
   test_invalidConstructorName_notEnclosingClassName_undefined() async {
-    Source source = addSource(r'''
+    await assertErrorsInCode(r'''
 class A {
   B() : super();
-}''');
-    await computeAnalysisResult(source);
-    assertErrors(source, [CompileTimeErrorCode.INVALID_CONSTRUCTOR_NAME]);
-    // no verify() call, "B" is not resolved
+}
+''', [CompileTimeErrorCode.INVALID_CONSTRUCTOR_NAME]);
   }
 
   test_invalidFactoryNameNotAClass_notClassName() async {
-    Source source = addSource(r'''
+    await assertErrorsInCode(r'''
 int B;
 class A {
   factory B() => null;
-}''');
-    await computeAnalysisResult(source);
-    assertErrors(
-        source, [CompileTimeErrorCode.INVALID_FACTORY_NAME_NOT_A_CLASS]);
-    verify([source]);
+}
+''', [CompileTimeErrorCode.INVALID_FACTORY_NAME_NOT_A_CLASS]);
   }
 
   test_invalidFactoryNameNotAClass_notEnclosingClassName() async {
-    Source source = addSource(r'''
+    await assertErrorsInCode(r'''
 class A {
   factory B() => null;
-}''');
-    await computeAnalysisResult(source);
-    assertErrors(
-        source, [CompileTimeErrorCode.INVALID_FACTORY_NAME_NOT_A_CLASS]);
-    // no verify() call, "B" is not resolved
+}
+''', [CompileTimeErrorCode.INVALID_FACTORY_NAME_NOT_A_CLASS]);
   }
 
   test_invalidIdentifierInAsync_async() async {
-    // TODO(brianwilkerson) Report this error.
-    Source source = addSource(r'''
+    await assertErrorsInCode(r'''
 class A {
   m() async {
     int async;
   }
-}''');
-    await computeAnalysisResult(source);
-    assertErrors(source, [CompileTimeErrorCode.INVALID_IDENTIFIER_IN_ASYNC]);
-    verify([source]);
+}
+''', [ParserErrorCode.ASYNC_KEYWORD_USED_AS_IDENTIFIER]);
   }
 
   test_invalidIdentifierInAsync_await() async {
-    // TODO(brianwilkerson) Report this error.
-    Source source = addSource(r'''
+    await assertErrorsInCode(r'''
 class A {
   m() async {
     int await;
   }
-}''');
-    await computeAnalysisResult(source);
-    assertErrors(source, [CompileTimeErrorCode.INVALID_IDENTIFIER_IN_ASYNC]);
-    verify([source]);
+}
+''', [ParserErrorCode.ASYNC_KEYWORD_USED_AS_IDENTIFIER]);
   }
 
   test_invalidIdentifierInAsync_yield() async {
-    // TODO(brianwilkerson) Report this error.
-    Source source = addSource(r'''
+    await assertErrorsInCode(r'''
 class A {
   m() async {
     int yield;
   }
-}''');
-    await computeAnalysisResult(source);
-    assertErrors(source, [CompileTimeErrorCode.INVALID_IDENTIFIER_IN_ASYNC]);
-    verify([source]);
+}
+''', [ParserErrorCode.ASYNC_KEYWORD_USED_AS_IDENTIFIER]);
   }
 
   test_invalidModifierOnConstructor_async() async {
-    Source source = addSource(r'''
+    await assertErrorsInCode(r'''
 class A {
   A() async {}
-}''');
-    await computeAnalysisResult(source);
-    assertErrors(
-        source, [CompileTimeErrorCode.INVALID_MODIFIER_ON_CONSTRUCTOR]);
-    verify([source]);
+}
+''', [CompileTimeErrorCode.INVALID_MODIFIER_ON_CONSTRUCTOR]);
   }
 
   test_invalidModifierOnConstructor_asyncStar() async {
-    Source source = addSource(r'''
+    await assertErrorsInCode(r'''
 class A {
   A() async* {}
-}''');
-    await computeAnalysisResult(source);
-    assertErrors(
-        source, [CompileTimeErrorCode.INVALID_MODIFIER_ON_CONSTRUCTOR]);
-    verify([source]);
+}
+''', [CompileTimeErrorCode.INVALID_MODIFIER_ON_CONSTRUCTOR]);
   }
 
   test_invalidModifierOnConstructor_syncStar() async {
-    Source source = addSource(r'''
+    await assertErrorsInCode(r'''
 class A {
   A() sync* {}
-}''');
-    await computeAnalysisResult(source);
-    assertErrors(
-        source, [CompileTimeErrorCode.INVALID_MODIFIER_ON_CONSTRUCTOR]);
-    verify([source]);
+}
+''', [CompileTimeErrorCode.INVALID_MODIFIER_ON_CONSTRUCTOR]);
   }
 
   test_invalidModifierOnSetter_member_async() async {
-    Source source = addSource(r'''
-class A {
-  set x(v) async {}
-}''');
-    await computeAnalysisResult(source);
     // TODO(danrubel): Investigate why error message is duplicated when
     // using fasta parser.
-    assertErrors(
-        source,
-        usingFastaParser
-            ? [
-                CompileTimeErrorCode.INVALID_MODIFIER_ON_SETTER,
-                CompileTimeErrorCode.INVALID_MODIFIER_ON_SETTER
-              ]
-            : [CompileTimeErrorCode.INVALID_MODIFIER_ON_SETTER]);
-    verify([source]);
+    await assertErrorsInCode(r'''
+class A {
+  set x(v) async {}
+}
+''', [
+      CompileTimeErrorCode.INVALID_MODIFIER_ON_SETTER,
+      CompileTimeErrorCode.INVALID_MODIFIER_ON_SETTER
+    ]);
   }
 
   test_invalidModifierOnSetter_member_asyncStar() async {
-    Source source = addSource(r'''
+    await assertErrorsInCode(r'''
 class A {
   set x(v) async* {}
-}''');
-    await computeAnalysisResult(source);
-    assertErrors(
-        source,
-        usingFastaParser
-            ? [
-                CompileTimeErrorCode.INVALID_MODIFIER_ON_SETTER,
-                CompileTimeErrorCode.INVALID_MODIFIER_ON_SETTER
-              ]
-            : [CompileTimeErrorCode.INVALID_MODIFIER_ON_SETTER]);
-    verify([source]);
+}
+''', [
+      CompileTimeErrorCode.INVALID_MODIFIER_ON_SETTER,
+      CompileTimeErrorCode.INVALID_MODIFIER_ON_SETTER
+    ]);
   }
 
   test_invalidModifierOnSetter_member_syncStar() async {
-    Source source = addSource(r'''
+    await assertErrorsInCode(r'''
 class A {
   set x(v) sync* {}
-}''');
-    await computeAnalysisResult(source);
-    assertErrors(
-        source,
-        usingFastaParser
-            ? [
-                CompileTimeErrorCode.INVALID_MODIFIER_ON_SETTER,
-                CompileTimeErrorCode.INVALID_MODIFIER_ON_SETTER
-              ]
-            : [CompileTimeErrorCode.INVALID_MODIFIER_ON_SETTER]);
-    verify([source]);
+}
+''', [
+      CompileTimeErrorCode.INVALID_MODIFIER_ON_SETTER,
+      CompileTimeErrorCode.INVALID_MODIFIER_ON_SETTER
+    ]);
   }
 
   test_invalidModifierOnSetter_topLevel_async() async {
-    Source source = addSource("set x(v) async {}");
-    await computeAnalysisResult(source);
-    assertErrors(
-        source,
-        usingFastaParser
-            ? [
-                CompileTimeErrorCode.INVALID_MODIFIER_ON_SETTER,
-                CompileTimeErrorCode.INVALID_MODIFIER_ON_SETTER
-              ]
-            : [CompileTimeErrorCode.INVALID_MODIFIER_ON_SETTER]);
-    verify([source]);
+    await assertErrorsInCode('''
+set x(v) async {}
+''', [
+      CompileTimeErrorCode.INVALID_MODIFIER_ON_SETTER,
+      CompileTimeErrorCode.INVALID_MODIFIER_ON_SETTER
+    ]);
   }
 
   test_invalidModifierOnSetter_topLevel_asyncStar() async {
-    Source source = addSource("set x(v) async* {}");
-    await computeAnalysisResult(source);
-    assertErrors(
-        source,
-        usingFastaParser
-            ? [
-                CompileTimeErrorCode.INVALID_MODIFIER_ON_SETTER,
-                CompileTimeErrorCode.INVALID_MODIFIER_ON_SETTER
-              ]
-            : [CompileTimeErrorCode.INVALID_MODIFIER_ON_SETTER]);
-    verify([source]);
+    await assertErrorsInCode('''
+set x(v) async* {}
+''', [
+      CompileTimeErrorCode.INVALID_MODIFIER_ON_SETTER,
+      CompileTimeErrorCode.INVALID_MODIFIER_ON_SETTER
+    ]);
   }
 
   test_invalidModifierOnSetter_topLevel_syncStar() async {
-    Source source = addSource("set x(v) sync* {}");
-    await computeAnalysisResult(source);
-    assertErrors(
-        source,
-        usingFastaParser
-            ? [
-                CompileTimeErrorCode.INVALID_MODIFIER_ON_SETTER,
-                CompileTimeErrorCode.INVALID_MODIFIER_ON_SETTER
-              ]
-            : [CompileTimeErrorCode.INVALID_MODIFIER_ON_SETTER]);
-    verify([source]);
+    await assertErrorsInCode('''
+set x(v) sync* {}
+''', [
+      CompileTimeErrorCode.INVALID_MODIFIER_ON_SETTER,
+      CompileTimeErrorCode.INVALID_MODIFIER_ON_SETTER
+    ]);
   }
 
   test_invalidReferenceToThis_factoryConstructor() async {
-    Source source = addSource(r'''
+    await assertErrorsInCode(r'''
 class A {
   factory A() { return this; }
-}''');
-    await computeAnalysisResult(source);
-    assertErrors(source, [CompileTimeErrorCode.INVALID_REFERENCE_TO_THIS]);
-    verify([source]);
+}
+''', [CompileTimeErrorCode.INVALID_REFERENCE_TO_THIS]);
   }
 
   test_invalidReferenceToThis_instanceVariableInitializer_inConstructor() async {
-    Source source = addSource(r'''
+    await assertErrorsInCode(r'''
 class A {
   var f;
   A() : f = this;
-}''');
-    await computeAnalysisResult(source);
-    assertErrors(source, [CompileTimeErrorCode.INVALID_REFERENCE_TO_THIS]);
-    verify([source]);
+}
+''', [CompileTimeErrorCode.INVALID_REFERENCE_TO_THIS]);
   }
 
   test_invalidReferenceToThis_instanceVariableInitializer_inDeclaration() async {
-    Source source = addSource(r'''
+    await assertErrorsInCode(r'''
 class A {
   var f = this;
-}''');
-    await computeAnalysisResult(source);
-    assertErrors(source, [CompileTimeErrorCode.INVALID_REFERENCE_TO_THIS]);
-    verify([source]);
+}
+''', [CompileTimeErrorCode.INVALID_REFERENCE_TO_THIS]);
   }
 
   test_invalidReferenceToThis_staticMethod() async {
-    Source source = addSource(r'''
+    await assertErrorsInCode(r'''
 class A {
   static m() { return this; }
-}''');
-    await computeAnalysisResult(source);
-    assertErrors(source, [CompileTimeErrorCode.INVALID_REFERENCE_TO_THIS]);
-    verify([source]);
+}
+''', [CompileTimeErrorCode.INVALID_REFERENCE_TO_THIS]);
   }
 
   test_invalidReferenceToThis_staticVariableInitializer() async {
-    Source source = addSource(r'''
+    await assertErrorsInCode(r'''
 class A {
   static A f = this;
-}''');
-    await computeAnalysisResult(source);
-    assertErrors(source, [CompileTimeErrorCode.INVALID_REFERENCE_TO_THIS]);
-    verify([source]);
+}
+''', [CompileTimeErrorCode.INVALID_REFERENCE_TO_THIS]);
   }
 
   test_invalidReferenceToThis_superInitializer() async {
-    Source source = addSource(r'''
+    await assertErrorsInCode(r'''
 class A {
   A(var x) {}
 }
 class B extends A {
   B() : super(this);
-}''');
-    await computeAnalysisResult(source);
-    assertErrors(source, [CompileTimeErrorCode.INVALID_REFERENCE_TO_THIS]);
-    verify([source]);
+}
+''', [CompileTimeErrorCode.INVALID_REFERENCE_TO_THIS]);
   }
 
   test_invalidReferenceToThis_topLevelFunction() async {
-    Source source = addSource("f() { return this; }");
-    await computeAnalysisResult(source);
-    assertErrors(source, [CompileTimeErrorCode.INVALID_REFERENCE_TO_THIS]);
-    verify([source]);
+    await assertErrorsInCode('''
+f() { return this; }
+''', [CompileTimeErrorCode.INVALID_REFERENCE_TO_THIS]);
   }
 
   test_invalidReferenceToThis_variableInitializer() async {
-    Source source = addSource("int x = this;");
-    await computeAnalysisResult(source);
-    assertErrors(source, [CompileTimeErrorCode.INVALID_REFERENCE_TO_THIS]);
-    verify([source]);
+    await assertErrorsInCode('''
+int x = this;
+''', [CompileTimeErrorCode.INVALID_REFERENCE_TO_THIS]);
   }
 
   test_invalidTypeArgumentInConstList() async {
-    Source source = addSource(r'''
+    await assertErrorsInCode(r'''
 class A<E> {
   m() {
     return const <E>[];
   }
-}''');
-    await computeAnalysisResult(source);
-    assertErrors(
-        source, [CompileTimeErrorCode.INVALID_TYPE_ARGUMENT_IN_CONST_LIST]);
-    verify([source]);
+}
+''', [CompileTimeErrorCode.INVALID_TYPE_ARGUMENT_IN_CONST_LIST]);
   }
 
   test_invalidTypeArgumentInConstMap() async {
-    Source source = addSource(r'''
+    await assertErrorsInCode(r'''
 class A<E> {
   m() {
     return const <String, E>{};
   }
-}''');
-    await computeAnalysisResult(source);
-    assertErrors(
-        source, [CompileTimeErrorCode.INVALID_TYPE_ARGUMENT_IN_CONST_MAP]);
-    verify([source]);
+}
+''', [CompileTimeErrorCode.INVALID_TYPE_ARGUMENT_IN_CONST_MAP]);
   }
 
   test_invalidUri_export() async {
-    Source source = addSource("export 'ht:';");
-    await computeAnalysisResult(source);
-    assertErrors(source, [CompileTimeErrorCode.INVALID_URI]);
+    await assertErrorsInCode('''
+export 'ht:';
+''', [CompileTimeErrorCode.INVALID_URI]);
   }
 
   test_invalidUri_import() async {
-    Source source = addSource("import 'ht:';");
-    await computeAnalysisResult(source);
-    assertErrors(source, [CompileTimeErrorCode.INVALID_URI]);
+    await assertErrorsInCode('''
+import 'ht:';
+''', [CompileTimeErrorCode.INVALID_URI]);
   }
 
   test_invalidUri_part() async {
-    Source source = addSource(r'''
+    await assertErrorsInCode(r'''
 library lib;
-part 'ht:';''');
-    await computeAnalysisResult(source);
-    assertErrors(source, [CompileTimeErrorCode.INVALID_URI]);
+part 'ht:';
+''', [CompileTimeErrorCode.INVALID_URI]);
   }
 
   test_isInConstInstanceCreation_restored() async {
     // If ErrorVerifier._isInConstInstanceCreation is not properly restored on
     // exit from visitInstanceCreationExpression, the error at (1) will be
     // treated as a warning rather than an error.
-    Source source = addSource(r'''
+    await assertErrorsInCode(r'''
 class Foo<T extends num> {
   const Foo(x, y);
 }
 const x = const Foo<int>(const Foo<int>(0, 1),
     const <Foo<String>>[]); // (1)
-''');
-    await computeAnalysisResult(source);
-    assertErrors(
-        source, [CompileTimeErrorCode.TYPE_ARGUMENT_NOT_MATCHING_BOUNDS]);
-    verify([source]);
+''', [CompileTimeErrorCode.TYPE_ARGUMENT_NOT_MATCHING_BOUNDS]);
   }
 
   test_isInInstanceVariableInitializer_restored() async {
     // If ErrorVerifier._isInInstanceVariableInitializer is not properly
     // restored on exit from visitVariableDeclaration, the error at (1)
     // won't be detected.
-    Source source = addSource(r'''
+    await assertErrorsInCode(r'''
 class Foo {
   var bar;
   Map foo = {
@@ -3462,15 +2581,12 @@
   };
   _foo() {
   }
-}''');
-    await computeAnalysisResult(source);
-    assertErrors(
-        source, [CompileTimeErrorCode.IMPLICIT_THIS_REFERENCE_IN_INITIALIZER]);
-    verify([source]);
+}
+''', [CompileTimeErrorCode.IMPLICIT_THIS_REFERENCE_IN_INITIALIZER]);
   }
 
   test_labelInOuterScope() async {
-    Source source = addSource(r'''
+    await assertErrorsInCode(r'''
 class A {
   void m(int i) {
     l: while (i > 0) {
@@ -3479,79 +2595,66 @@
       };
     }
   }
-}''');
-    await computeAnalysisResult(source);
-    assertErrors(source, [CompileTimeErrorCode.LABEL_IN_OUTER_SCOPE]);
-    // We cannot verify resolution with unresolvable labels
+}
+''', [CompileTimeErrorCode.LABEL_IN_OUTER_SCOPE]);
   }
 
   test_labelUndefined_break() async {
-    Source source = addSource(r'''
+    await assertErrorsInCode(r'''
 f() {
   x: while (true) {
     break y;
   }
-}''');
-    await computeAnalysisResult(source);
-    assertErrors(
-        source, [CompileTimeErrorCode.LABEL_UNDEFINED, HintCode.UNUSED_LABEL]);
-    // We cannot verify resolution with undefined labels
+}
+''', [CompileTimeErrorCode.LABEL_UNDEFINED, HintCode.UNUSED_LABEL],
+        verify: false);
   }
 
   test_labelUndefined_continue() async {
-    Source source = addSource(r'''
+    await assertErrorsInCode(r'''
 f() {
   x: while (true) {
     continue y;
   }
-}''');
-    await computeAnalysisResult(source);
-    assertErrors(
-        source, [CompileTimeErrorCode.LABEL_UNDEFINED, HintCode.UNUSED_LABEL]);
-    // We cannot verify resolution with undefined labels
+}
+''', [CompileTimeErrorCode.LABEL_UNDEFINED, HintCode.UNUSED_LABEL],
+        verify: false);
   }
 
   test_length_of_erroneous_constant() async {
     // Attempting to compute the length of constant that couldn't be evaluated
     // (due to an error) should not crash the analyzer (see dartbug.com/23383)
-    Source source = addSource("const int i = (1 ? 'alpha' : 'beta').length;");
-    await computeAnalysisResult(source);
-    assertErrors(source, [
+    await assertErrorsInCode('''
+const int i = (1 ? 'alpha' : 'beta').length;
+''', [
       CompileTimeErrorCode.CONST_INITIALIZED_WITH_NON_CONSTANT_VALUE,
       CompileTimeErrorCode.CONST_EVAL_TYPE_BOOL,
       StaticTypeWarningCode.NON_BOOL_CONDITION
     ]);
-    verify([source]);
   }
 
   test_memberWithClassName_field() async {
-    Source source = addSource(r'''
+    await assertErrorsInCode(r'''
 class A {
   int A = 0;
-}''');
-    await computeAnalysisResult(source);
-    assertErrors(source, [CompileTimeErrorCode.MEMBER_WITH_CLASS_NAME]);
-    verify([source]);
+}
+''', [CompileTimeErrorCode.MEMBER_WITH_CLASS_NAME]);
   }
 
   test_memberWithClassName_field2() async {
-    Source source = addSource(r'''
+    await assertErrorsInCode(r'''
 class A {
   int z, A, b = 0;
-}''');
-    await computeAnalysisResult(source);
-    assertErrors(source, [CompileTimeErrorCode.MEMBER_WITH_CLASS_NAME]);
-    verify([source]);
+}
+''', [CompileTimeErrorCode.MEMBER_WITH_CLASS_NAME]);
   }
 
   test_memberWithClassName_getter() async {
-    Source source = addSource(r'''
+    await assertErrorsInCode(r'''
 class A {
   get A => 0;
-}''');
-    await computeAnalysisResult(source);
-    assertErrors(source, [CompileTimeErrorCode.MEMBER_WITH_CLASS_NAME]);
-    verify([source]);
+}
+''', [CompileTimeErrorCode.MEMBER_WITH_CLASS_NAME]);
   }
 
   test_memberWithClassName_method() async {
@@ -3559,42 +2662,40 @@
   }
 
   test_mixinClassDeclaresConstructor_classDeclaration() async {
-    Source source = addSource(r'''
+    await assertErrorsInCode(
+      r'''
 class A {
   A() {}
 }
-class B extends Object with A {}''');
-    await computeAnalysisResult(source);
-    assertErrors(
-      source,
+class B extends Object with A {}
+''',
       [CompileTimeErrorCode.MIXIN_CLASS_DECLARES_CONSTRUCTOR],
     );
-    verify([source]);
   }
 
   test_mixinClassDeclaresConstructor_typeAlias() async {
-    Source source = addSource(r'''
+    await assertErrorsInCode(
+      r'''
 class A {
   A() {}
 }
-class B = Object with A;''');
-    await computeAnalysisResult(source);
-    assertErrors(
-      source,
+class B = Object with A;
+''',
       [CompileTimeErrorCode.MIXIN_CLASS_DECLARES_CONSTRUCTOR],
     );
-    verify([source]);
   }
 
   test_mixinDeferredClass() async {
     await resolveWithErrors(<String>[
       r'''
 library lib1;
-class A {}''',
+class A {}
+''',
       r'''
 library root;
 import 'lib1.dart' deferred as a;
-class B extends Object with a.A {}'''
+class B extends Object with a.A {}
+'''
     ], <ErrorCode>[
       CompileTimeErrorCode.MIXIN_DEFERRED_CLASS
     ]);
@@ -3604,85 +2705,72 @@
     await resolveWithErrors(<String>[
       r'''
 library lib1;
-class A {}''',
+class A {}
+''',
       r'''
 library root;
 import 'lib1.dart' deferred as a;
 class B {}
-class C = B with a.A;'''
+class C = B with a.A;
+'''
     ], <ErrorCode>[
       CompileTimeErrorCode.MIXIN_DEFERRED_CLASS
     ]);
   }
 
   test_mixinInference_matchingClass_inPreviousMixin_new_syntax() async {
-    Source source = addSource('''
+    await assertNoErrorsInCode('''
 abstract class A<T> {}
 class B {}
 mixin M1 implements A<B> {}
 mixin M2<T> on A<T> {}
 class C extends Object with M1, M2 {}
 ''');
-    await computeAnalysisResult(source);
-    assertNoErrors(source);
   }
 
   test_mixinInference_matchingClass_new_syntax() async {
-    Source source = addSource('''
+    await assertNoErrorsInCode('''
 abstract class A<T> {}
 class B {}
 mixin M<T> on A<T> {}
 class C extends A<int> with M {}
 ''');
-    await computeAnalysisResult(source);
-    assertNoErrors(source);
   }
 
   test_mixinInference_noMatchingClass_namedMixinApplication_new_syntax() async {
-    Source source = addSource('''
+    await assertErrorsInCode('''
 abstract class A<T> {}
 class B {}
 mixin M<T> on A<T> {}
 class C = Object with M;
-''');
-    await computeAnalysisResult(source);
-    assertErrors(source,
-        [CompileTimeErrorCode.MIXIN_APPLICATION_NOT_IMPLEMENTED_INTERFACE]);
+''', [CompileTimeErrorCode.MIXIN_APPLICATION_NOT_IMPLEMENTED_INTERFACE]);
   }
 
   test_mixinInference_noMatchingClass_new_syntax() async {
-    Source source = addSource('''
+    await assertErrorsInCode('''
 abstract class A<T> {}
 class B {}
 mixin M<T> on A<T> {}
 class C extends Object with M {}
-''');
-    await computeAnalysisResult(source);
-    assertErrors(source,
-        [CompileTimeErrorCode.MIXIN_APPLICATION_NOT_IMPLEMENTED_INTERFACE]);
+''', [CompileTimeErrorCode.MIXIN_APPLICATION_NOT_IMPLEMENTED_INTERFACE]);
   }
 
   test_mixinInference_noMatchingClass_noSuperclassConstraint_new_syntax() async {
-    Source source = addSource('''
+    await assertNoErrorsInCode('''
 abstract class A<T> {}
 class B {}
 mixin M<T> {}
 class C extends Object with M {}
 ''');
-    await computeAnalysisResult(source);
-    assertNoErrors(source);
   }
 
   test_mixinInference_noMatchingClass_typeParametersSupplied_new_syntax() async {
-    Source source = addSource('''
+    await assertErrorsInCode('''
 abstract class A<T> {}
 class B {}
 mixin M<T> on A<T> {}
 class C extends Object with M<int> {}
-''');
-    await computeAnalysisResult(source);
-    assertErrors(source,
-        [CompileTimeErrorCode.MIXIN_APPLICATION_NOT_IMPLEMENTED_INTERFACE]);
+''', [CompileTimeErrorCode.MIXIN_APPLICATION_NOT_IMPLEMENTED_INTERFACE]);
   }
 
   test_mixinInference_recursiveSubtypeCheck_new_syntax() async {
@@ -3721,443 +2809,353 @@
   }
 
   test_mixinInheritsFromNotObject_classDeclaration_extends() async {
-    Source source = addSource(r'''
+    await assertErrorsInCode(r'''
 class A {}
 class B extends A {}
-class C extends Object with B {}''');
-    await computeAnalysisResult(source);
-    assertErrors(source, [CompileTimeErrorCode.MIXIN_INHERITS_FROM_NOT_OBJECT]);
-    verify([source]);
+class C extends Object with B {}
+''', [CompileTimeErrorCode.MIXIN_INHERITS_FROM_NOT_OBJECT]);
   }
 
   test_mixinInheritsFromNotObject_classDeclaration_with() async {
-    Source source = addSource(r'''
+    await assertErrorsInCode(r'''
 class A {}
 class B extends Object with A {}
-class C extends Object with B {}''');
-    await computeAnalysisResult(source);
-    assertErrors(source, [CompileTimeErrorCode.MIXIN_INHERITS_FROM_NOT_OBJECT]);
-    verify([source]);
+class C extends Object with B {}
+''', [CompileTimeErrorCode.MIXIN_INHERITS_FROM_NOT_OBJECT]);
   }
 
   test_mixinInheritsFromNotObject_typeAlias_extends() async {
-    Source source = addSource(r'''
+    await assertErrorsInCode(r'''
 class A {}
 class B extends A {}
-class C = Object with B;''');
-    await computeAnalysisResult(source);
-    assertErrors(source, [CompileTimeErrorCode.MIXIN_INHERITS_FROM_NOT_OBJECT]);
-    verify([source]);
+class C = Object with B;
+''', [CompileTimeErrorCode.MIXIN_INHERITS_FROM_NOT_OBJECT]);
   }
 
   test_mixinInheritsFromNotObject_typeAlias_with() async {
-    Source source = addSource(r'''
+    await assertErrorsInCode(r'''
 class A {}
 class B extends Object with A {}
-class C = Object with B;''');
-    await computeAnalysisResult(source);
-    assertErrors(source, [CompileTimeErrorCode.MIXIN_INHERITS_FROM_NOT_OBJECT]);
-    verify([source]);
+class C = Object with B;
+''', [CompileTimeErrorCode.MIXIN_INHERITS_FROM_NOT_OBJECT]);
   }
 
   test_mixinOfDisallowedClass_class_bool() async {
-    Source source = addSource("class A extends Object with bool {}");
-    await computeAnalysisResult(source);
-    assertErrors(source, [CompileTimeErrorCode.MIXIN_OF_DISALLOWED_CLASS]);
-    verify([source]);
+    await assertErrorsInCode('''
+class A extends Object with bool {}
+''', [CompileTimeErrorCode.MIXIN_OF_DISALLOWED_CLASS]);
   }
 
   test_mixinOfDisallowedClass_class_double() async {
-    Source source = addSource("class A extends Object with double {}");
-    await computeAnalysisResult(source);
-    assertErrors(source, [CompileTimeErrorCode.MIXIN_OF_DISALLOWED_CLASS]);
-    verify([source]);
+    await assertErrorsInCode('''
+class A extends Object with double {}
+''', [CompileTimeErrorCode.MIXIN_OF_DISALLOWED_CLASS]);
   }
 
   test_mixinOfDisallowedClass_class_int() async {
-    Source source = addSource("class A extends Object with int {}");
-    await computeAnalysisResult(source);
-    assertErrors(source, [CompileTimeErrorCode.MIXIN_OF_DISALLOWED_CLASS]);
-    verify([source]);
+    await assertErrorsInCode('''
+class A extends Object with int {}
+''', [CompileTimeErrorCode.MIXIN_OF_DISALLOWED_CLASS]);
   }
 
   test_mixinOfDisallowedClass_class_Null() async {
-    Source source = addSource("class A extends Object with Null {}");
-    await computeAnalysisResult(source);
-    assertErrors(source, [CompileTimeErrorCode.MIXIN_OF_DISALLOWED_CLASS]);
-    verify([source]);
+    await assertErrorsInCode('''
+class A extends Object with Null {}
+''', [CompileTimeErrorCode.MIXIN_OF_DISALLOWED_CLASS]);
   }
 
   test_mixinOfDisallowedClass_class_num() async {
-    Source source = addSource("class A extends Object with num {}");
-    await computeAnalysisResult(source);
-    assertErrors(source, [CompileTimeErrorCode.MIXIN_OF_DISALLOWED_CLASS]);
-    verify([source]);
+    await assertErrorsInCode('''
+class A extends Object with num {}
+''', [CompileTimeErrorCode.MIXIN_OF_DISALLOWED_CLASS]);
   }
 
   test_mixinOfDisallowedClass_class_String() async {
-    Source source = addSource("class A extends Object with String {}");
-    await computeAnalysisResult(source);
-    assertErrors(source, [CompileTimeErrorCode.MIXIN_OF_DISALLOWED_CLASS]);
-    verify([source]);
+    await assertErrorsInCode('''
+class A extends Object with String {}
+''', [CompileTimeErrorCode.MIXIN_OF_DISALLOWED_CLASS]);
   }
 
   test_mixinOfDisallowedClass_classTypeAlias_bool() async {
-    Source source = addSource(r'''
+    await assertErrorsInCode(r'''
 class A {}
-class C = A with bool;''');
-    await computeAnalysisResult(source);
-    assertErrors(source, [CompileTimeErrorCode.MIXIN_OF_DISALLOWED_CLASS]);
-    verify([source]);
+class C = A with bool;
+''', [CompileTimeErrorCode.MIXIN_OF_DISALLOWED_CLASS]);
   }
 
   test_mixinOfDisallowedClass_classTypeAlias_double() async {
-    Source source = addSource(r'''
+    await assertErrorsInCode(r'''
 class A {}
-class C = A with double;''');
-    await computeAnalysisResult(source);
-    assertErrors(source, [CompileTimeErrorCode.MIXIN_OF_DISALLOWED_CLASS]);
-    verify([source]);
+class C = A with double;
+''', [CompileTimeErrorCode.MIXIN_OF_DISALLOWED_CLASS]);
   }
 
   test_mixinOfDisallowedClass_classTypeAlias_int() async {
-    Source source = addSource(r'''
+    await assertErrorsInCode(r'''
 class A {}
-class C = A with int;''');
-    await computeAnalysisResult(source);
-    assertErrors(source, [CompileTimeErrorCode.MIXIN_OF_DISALLOWED_CLASS]);
-    verify([source]);
+class C = A with int;
+''', [CompileTimeErrorCode.MIXIN_OF_DISALLOWED_CLASS]);
   }
 
   test_mixinOfDisallowedClass_classTypeAlias_Null() async {
-    Source source = addSource(r'''
+    await assertErrorsInCode(r'''
 class A {}
-class C = A with Null;''');
-    await computeAnalysisResult(source);
-    assertErrors(source, [CompileTimeErrorCode.MIXIN_OF_DISALLOWED_CLASS]);
-    verify([source]);
+class C = A with Null;
+''', [CompileTimeErrorCode.MIXIN_OF_DISALLOWED_CLASS]);
   }
 
   test_mixinOfDisallowedClass_classTypeAlias_num() async {
-    Source source = addSource(r'''
+    await assertErrorsInCode(r'''
 class A {}
-class C = A with num;''');
-    await computeAnalysisResult(source);
-    assertErrors(source, [CompileTimeErrorCode.MIXIN_OF_DISALLOWED_CLASS]);
-    verify([source]);
+class C = A with num;
+''', [CompileTimeErrorCode.MIXIN_OF_DISALLOWED_CLASS]);
   }
 
   test_mixinOfDisallowedClass_classTypeAlias_String() async {
-    Source source = addSource(r'''
+    await assertErrorsInCode(r'''
 class A {}
-class C = A with String;''');
-    await computeAnalysisResult(source);
-    assertErrors(source, [CompileTimeErrorCode.MIXIN_OF_DISALLOWED_CLASS]);
-    verify([source]);
+class C = A with String;
+''', [CompileTimeErrorCode.MIXIN_OF_DISALLOWED_CLASS]);
   }
 
   test_mixinOfDisallowedClass_classTypeAlias_String_num() async {
-    Source source = addSource(r'''
+    await assertErrorsInCode(r'''
 class A {}
-class C = A with String, num;''');
-    await computeAnalysisResult(source);
-    if (enableNewAnalysisDriver) {
-      assertErrors(source, [
-        CompileTimeErrorCode.MIXIN_OF_DISALLOWED_CLASS,
-        CompileTimeErrorCode.MIXIN_OF_DISALLOWED_CLASS
-      ]);
-    } else {
-      assertErrors(source, [
-        CompileTimeErrorCode.MIXIN_OF_DISALLOWED_CLASS,
-        CompileTimeErrorCode.MIXIN_OF_DISALLOWED_CLASS
-      ]);
-    }
-    verify([source]);
+class C = A with String, num;
+''', [
+      CompileTimeErrorCode.MIXIN_OF_DISALLOWED_CLASS,
+      CompileTimeErrorCode.MIXIN_OF_DISALLOWED_CLASS
+    ]);
   }
 
   test_mixinOfNonClass() async {
     // TODO(brianwilkerson) Compare with MIXIN_WITH_NON_CLASS_SUPERCLASS.
-    Source source = addSource(r'''
+    await assertErrorsInCode(r'''
 var A;
-class B extends Object mixin A {}''');
-    await computeAnalysisResult(source);
-    assertErrors(source, [CompileTimeErrorCode.MIXIN_OF_NON_CLASS]);
-    verify([source]);
+class B extends Object mixin A {}
+''', [CompileTimeErrorCode.MIXIN_OF_NON_CLASS]);
   }
 
   test_mixinOfNonClass_class() async {
-    Source source = addSource(r'''
+    await assertErrorsInCode(r'''
 int A;
-class B extends Object with A {}''');
-    await computeAnalysisResult(source);
-    assertErrors(source, [CompileTimeErrorCode.MIXIN_OF_NON_CLASS]);
-    verify([source]);
+class B extends Object with A {}
+''', [CompileTimeErrorCode.MIXIN_OF_NON_CLASS]);
   }
 
   test_mixinOfNonClass_enum() async {
-    Source source = addSource(r'''
+    await assertErrorsInCode(r'''
 enum E { ONE }
-class A extends Object with E {}''');
-    await computeAnalysisResult(source);
-    assertErrors(source, [CompileTimeErrorCode.MIXIN_OF_NON_CLASS]);
-    verify([source]);
+class A extends Object with E {}
+''', [CompileTimeErrorCode.MIXIN_OF_NON_CLASS]);
   }
 
   test_mixinOfNonClass_typeAlias() async {
-    Source source = addSource(r'''
+    await assertErrorsInCode(r'''
 class A {}
 int B;
-class C = A with B;''');
-    await computeAnalysisResult(source);
-    assertErrors(source, [CompileTimeErrorCode.MIXIN_OF_NON_CLASS]);
-    verify([source]);
+class C = A with B;
+''', [CompileTimeErrorCode.MIXIN_OF_NON_CLASS]);
   }
 
   test_mixinReferencesSuper() async {
-    Source source = addSource(r'''
+    await assertErrorsInCode(r'''
 class A {
   toString() => super.toString();
 }
-class B extends Object with A {}''');
-    await computeAnalysisResult(source);
-    assertErrors(source, [CompileTimeErrorCode.MIXIN_REFERENCES_SUPER]);
-    verify([source]);
+class B extends Object with A {}
+''', [CompileTimeErrorCode.MIXIN_REFERENCES_SUPER]);
   }
 
   test_mixinWithNonClassSuperclass_class() async {
-    Source source = addSource(r'''
+    await assertErrorsInCode(r'''
 int A;
 class B {}
-class C extends A with B {}''');
-    await computeAnalysisResult(source);
-    assertErrors(
-        source, [CompileTimeErrorCode.MIXIN_WITH_NON_CLASS_SUPERCLASS]);
-    verify([source]);
+class C extends A with B {}
+''', [CompileTimeErrorCode.MIXIN_WITH_NON_CLASS_SUPERCLASS]);
   }
 
   test_mixinWithNonClassSuperclass_typeAlias() async {
-    Source source = addSource(r'''
+    await assertErrorsInCode(r'''
 int A;
 class B {}
-class C = A with B;''');
-    await computeAnalysisResult(source);
-    assertErrors(
-        source, [CompileTimeErrorCode.MIXIN_WITH_NON_CLASS_SUPERCLASS]);
-    verify([source]);
+class C = A with B;
+''', [CompileTimeErrorCode.MIXIN_WITH_NON_CLASS_SUPERCLASS]);
   }
 
   test_multipleRedirectingConstructorInvocations() async {
-    Source source = addSource(r'''
+    await assertErrorsInCode(r'''
 class A {
   A() : this.a(), this.b();
   A.a() {}
   A.b() {}
-}''');
-    await computeAnalysisResult(source);
-    assertErrors(source,
-        [CompileTimeErrorCode.MULTIPLE_REDIRECTING_CONSTRUCTOR_INVOCATIONS]);
-    verify([source]);
+}
+''', [CompileTimeErrorCode.MULTIPLE_REDIRECTING_CONSTRUCTOR_INVOCATIONS]);
   }
 
   test_multipleSuperInitializers() async {
-    Source source = addSource(r'''
+    await assertErrorsInCode(r'''
 class A {}
 class B extends A {
   B() : super(), super() {}
-}''');
-    await computeAnalysisResult(source);
-    assertErrors(source, [
+}
+''', [
       CompileTimeErrorCode.MULTIPLE_SUPER_INITIALIZERS,
       StrongModeCode.INVALID_SUPER_INVOCATION
     ]);
-    verify([source]);
   }
 
   test_nativeClauseInNonSDKCode() async {
     // TODO(jwren) Move this test somewhere else: This test verifies a parser
     // error code is generated through the ErrorVerifier, it is not a
     // CompileTimeErrorCode.
-    Source source = addSource("class A native 'string' {}");
-    await computeAnalysisResult(source);
-    assertErrors(source, [ParserErrorCode.NATIVE_CLAUSE_IN_NON_SDK_CODE]);
-    verify([source]);
+    await assertErrorsInCode('''
+class A native 'string' {}
+''', [ParserErrorCode.NATIVE_CLAUSE_IN_NON_SDK_CODE]);
   }
 
   test_nativeFunctionBodyInNonSDKCode_function() async {
     // TODO(jwren) Move this test somewhere else: This test verifies a parser
     // error code is generated through the ErrorVerifier, it is not a
     // CompileTimeErrorCode.
-    Source source = addSource("int m(a) native 'string';");
-    await computeAnalysisResult(source);
-    assertErrors(
-        source, [ParserErrorCode.NATIVE_FUNCTION_BODY_IN_NON_SDK_CODE]);
-    verify([source]);
+    await assertErrorsInCode('''
+int m(a) native 'string';
+''', [ParserErrorCode.NATIVE_FUNCTION_BODY_IN_NON_SDK_CODE]);
   }
 
   test_nativeFunctionBodyInNonSDKCode_method() async {
     // TODO(jwren) Move this test somewhere else: This test verifies a parser
     // error code is generated through the ErrorVerifier, it is not a
     // CompileTimeErrorCode.
-    Source source = addSource(r'''
+    await assertErrorsInCode(r'''
 class A{
   static int m(a) native 'string';
-}''');
-    await computeAnalysisResult(source);
-    assertErrors(
-        source, [ParserErrorCode.NATIVE_FUNCTION_BODY_IN_NON_SDK_CODE]);
-    verify([source]);
+}
+''', [ParserErrorCode.NATIVE_FUNCTION_BODY_IN_NON_SDK_CODE]);
   }
 
   test_noAnnotationConstructorArguments() async {
-    Source source = addSource(r'''
+    await assertErrorsInCode(r'''
 class A {
   const A();
 }
 @A
 main() {
-}''');
-    await computeAnalysisResult(source);
-    assertErrors(
-        source, [CompileTimeErrorCode.NO_ANNOTATION_CONSTRUCTOR_ARGUMENTS]);
-    verify([source]);
+}
+''', [CompileTimeErrorCode.NO_ANNOTATION_CONSTRUCTOR_ARGUMENTS]);
   }
 
   test_noDefaultSuperConstructorExplicit() async {
-    Source source = addSource(r'''
+    await assertErrorsInCode(r'''
 class A {
   A(p);
 }
 class B extends A {
   B() {}
-}''');
-    await computeAnalysisResult(source);
-    assertErrors(
-        source, [CompileTimeErrorCode.NO_DEFAULT_SUPER_CONSTRUCTOR_EXPLICIT]);
-    verify([source]);
+}
+''', [CompileTimeErrorCode.NO_DEFAULT_SUPER_CONSTRUCTOR_EXPLICIT]);
   }
 
   test_noDefaultSuperConstructorImplicit_superHasParameters() async {
-    Source source = addSource(r'''
+    await assertErrorsInCode(r'''
 class A {
   A(p);
 }
 class B extends A {
-}''');
-    await computeAnalysisResult(source);
-    assertErrors(
-        source, [CompileTimeErrorCode.NO_DEFAULT_SUPER_CONSTRUCTOR_IMPLICIT]);
-    verify([source]);
+}
+''', [CompileTimeErrorCode.NO_DEFAULT_SUPER_CONSTRUCTOR_IMPLICIT]);
   }
 
   test_noDefaultSuperConstructorImplicit_superOnlyNamed() async {
-    Source source = addSource(r'''
+    await assertErrorsInCode(r'''
 class A { A.named() {} }
-class B extends A {}''');
-    await computeAnalysisResult(source);
-    assertErrors(
-        source, [CompileTimeErrorCode.NO_DEFAULT_SUPER_CONSTRUCTOR_IMPLICIT]);
-    verify([source]);
+class B extends A {}
+''', [CompileTimeErrorCode.NO_DEFAULT_SUPER_CONSTRUCTOR_IMPLICIT]);
   }
 
   test_nonConstantAnnotationConstructor_named() async {
-    Source source = addSource(r'''
+    await assertErrorsInCode(r'''
 class A {
   A.fromInt() {}
 }
 @A.fromInt()
 main() {
-}''');
-    await computeAnalysisResult(source);
-    assertErrors(
-        source, [CompileTimeErrorCode.NON_CONSTANT_ANNOTATION_CONSTRUCTOR]);
-    verify([source]);
+}
+''', [CompileTimeErrorCode.NON_CONSTANT_ANNOTATION_CONSTRUCTOR]);
   }
 
   test_nonConstantAnnotationConstructor_unnamed() async {
-    Source source = addSource(r'''
+    await assertErrorsInCode(r'''
 class A {
   A() {}
 }
 @A()
 main() {
-}''');
-    await computeAnalysisResult(source);
-    assertErrors(
-        source, [CompileTimeErrorCode.NON_CONSTANT_ANNOTATION_CONSTRUCTOR]);
-    verify([source]);
+}
+''', [CompileTimeErrorCode.NON_CONSTANT_ANNOTATION_CONSTRUCTOR]);
   }
 
   test_nonConstantDefaultValue_function_named() async {
-    Source source = addSource(r'''
+    await assertErrorsInCode(r'''
 int y;
-f({x : y}) {}''');
-    await computeAnalysisResult(source);
-    assertErrors(source, [CompileTimeErrorCode.NON_CONSTANT_DEFAULT_VALUE]);
-    verify([source]);
+f({x : y}) {}
+''', [CompileTimeErrorCode.NON_CONSTANT_DEFAULT_VALUE]);
   }
 
   test_nonConstantDefaultValue_function_positional() async {
-    Source source = addSource(r'''
+    await assertErrorsInCode(r'''
 int y;
-f([x = y]) {}''');
-    await computeAnalysisResult(source);
-    assertErrors(source, [CompileTimeErrorCode.NON_CONSTANT_DEFAULT_VALUE]);
-    verify([source]);
+f([x = y]) {}
+''', [CompileTimeErrorCode.NON_CONSTANT_DEFAULT_VALUE]);
   }
 
   test_nonConstantDefaultValue_inConstructor_named() async {
-    Source source = addSource(r'''
+    await assertErrorsInCode(r'''
 class A {
   int y;
   A({x : y}) {}
-}''');
-    await computeAnalysisResult(source);
-    assertErrors(source, [CompileTimeErrorCode.NON_CONSTANT_DEFAULT_VALUE]);
-    verify([source]);
+}
+''', [CompileTimeErrorCode.NON_CONSTANT_DEFAULT_VALUE]);
   }
 
   test_nonConstantDefaultValue_inConstructor_positional() async {
-    Source source = addSource(r'''
+    await assertErrorsInCode(r'''
 class A {
   int y;
   A([x = y]) {}
-}''');
-    await computeAnalysisResult(source);
-    assertErrors(source, [CompileTimeErrorCode.NON_CONSTANT_DEFAULT_VALUE]);
-    verify([source]);
+}
+''', [CompileTimeErrorCode.NON_CONSTANT_DEFAULT_VALUE]);
   }
 
   test_nonConstantDefaultValue_method_named() async {
-    Source source = addSource(r'''
+    await assertErrorsInCode(r'''
 class A {
   int y;
   m({x : y}) {}
-}''');
-    await computeAnalysisResult(source);
-    assertErrors(source, [CompileTimeErrorCode.NON_CONSTANT_DEFAULT_VALUE]);
-    verify([source]);
+}
+''', [CompileTimeErrorCode.NON_CONSTANT_DEFAULT_VALUE]);
   }
 
   test_nonConstantDefaultValue_method_positional() async {
-    Source source = addSource(r'''
+    await assertErrorsInCode(r'''
 class A {
   int y;
   m([x = y]) {}
-}''');
-    await computeAnalysisResult(source);
-    assertErrors(source, [CompileTimeErrorCode.NON_CONSTANT_DEFAULT_VALUE]);
-    verify([source]);
+}
+''', [CompileTimeErrorCode.NON_CONSTANT_DEFAULT_VALUE]);
   }
 
   test_nonConstantDefaultValueFromDeferredLibrary() async {
     await resolveWithErrors(<String>[
       r'''
 library lib1;
-const V = 1;''',
+const V = 1;
+''',
       r'''
 library root;
 import 'lib1.dart' deferred as a;
-f({x : a.V}) {}'''
+f({x : a.V}) {}
+'''
     ], <ErrorCode>[
       CompileTimeErrorCode.NON_CONSTANT_DEFAULT_VALUE_FROM_DEFERRED_LIBRARY
     ]);
@@ -4167,34 +3165,35 @@
     await resolveWithErrors(<String>[
       r'''
 library lib1;
-const V = 1;''',
+const V = 1;
+''',
       r'''
 library root;
 import 'lib1.dart' deferred as a;
-f({x : a.V + 1}) {}'''
+f({x : a.V + 1}) {}
+'''
     ], <ErrorCode>[
       CompileTimeErrorCode.NON_CONSTANT_DEFAULT_VALUE_FROM_DEFERRED_LIBRARY
     ]);
   }
 
   test_nonConstCaseExpression() async {
-    Source source = addSource(r'''
+    await assertErrorsInCode(r'''
 f(int p, int q) {
   switch (p) {
     case 3 + q:
       break;
   }
-}''');
-    await computeAnalysisResult(source);
-    assertErrors(source, [CompileTimeErrorCode.NON_CONSTANT_CASE_EXPRESSION]);
-    verify([source]);
+}
+''', [CompileTimeErrorCode.NON_CONSTANT_CASE_EXPRESSION]);
   }
 
   test_nonConstCaseExpressionFromDeferredLibrary() async {
     await resolveWithErrors(<String>[
       r'''
 library lib1;
-const int c = 1;''',
+const int c = 1;
+''',
       r'''
 library root;
 import 'lib1.dart' deferred as a;
@@ -4203,7 +3202,8 @@
     case a.c:
       break;
   }
-}'''
+}
+'''
     ], [
       CompileTimeErrorCode.NON_CONSTANT_CASE_EXPRESSION_FROM_DEFERRED_LIBRARY
     ]);
@@ -4213,7 +3213,8 @@
     await resolveWithErrors(<String>[
       r'''
 library lib1;
-const int c = 1;''',
+const int c = 1;
+''',
       r'''
 library root;
 import 'lib1.dart' deferred as a;
@@ -4222,289 +3223,90 @@
     case a.c + 1:
       break;
   }
-}'''
+}
+'''
     ], [
       CompileTimeErrorCode.NON_CONSTANT_CASE_EXPRESSION_FROM_DEFERRED_LIBRARY
     ]);
   }
 
-  test_nonConstListElement() async {
-    Source source = addSource(r'''
-f(a) {
-  return const [a];
-}''');
-    await computeAnalysisResult(source);
-    assertErrors(source, [CompileTimeErrorCode.NON_CONSTANT_LIST_ELEMENT]);
-    verify([source]);
-  }
-
-  test_nonConstListElementFromDeferredLibrary() async {
-    await resolveWithErrors(<String>[
-      r'''
-library lib1;
-const int c = 1;''',
-      r'''
-library root;
-import 'lib1.dart' deferred as a;
-f() {
-  return const [a.c];
-}'''
-    ], [
-      CompileTimeErrorCode.NON_CONSTANT_LIST_ELEMENT_FROM_DEFERRED_LIBRARY
-    ]);
-  }
-
-  test_nonConstListElementFromDeferredLibrary_nested() async {
-    await resolveWithErrors(<String>[
-      r'''
-library lib1;
-const int c = 1;''',
-      r'''
-library root;
-import 'lib1.dart' deferred as a;
-f() {
-  return const [a.c + 1];
-}'''
-    ], [
-      CompileTimeErrorCode.NON_CONSTANT_LIST_ELEMENT_FROM_DEFERRED_LIBRARY
-    ]);
-  }
-
   test_nonConstMapAsExpressionStatement_begin() async {
-    Source source = addSource(r'''
+    // TODO(danrubel): Consider improving recovery
+    await assertErrorsInCode(r'''
 f() {
   {'a' : 0, 'b' : 1}.length;
-}''');
-    await computeAnalysisResult(source);
-    assertErrors(
-        source,
-        usingFastaParser
-            ? [
-                // TODO(danrubel): Consider improving recovery
-                ParserErrorCode.EXPECTED_TOKEN,
-                ParserErrorCode.EXPECTED_TOKEN,
-                ParserErrorCode.EXPECTED_TOKEN,
-                ParserErrorCode.EXPECTED_TOKEN,
-                ParserErrorCode.EXPECTED_TOKEN,
-                ParserErrorCode.EXPECTED_TOKEN,
-                ParserErrorCode.EXPECTED_TOKEN,
-                ParserErrorCode.MISSING_IDENTIFIER,
-                ParserErrorCode.MISSING_IDENTIFIER,
-                ParserErrorCode.MISSING_IDENTIFIER,
-                ParserErrorCode.MISSING_IDENTIFIER,
-                ParserErrorCode.UNEXPECTED_TOKEN,
-                ParserErrorCode.UNEXPECTED_TOKEN,
-                ParserErrorCode.UNEXPECTED_TOKEN,
-              ]
-            : [CompileTimeErrorCode.NON_CONST_MAP_AS_EXPRESSION_STATEMENT]);
-    verify([source]);
+}
+''', [
+      ParserErrorCode.EXPECTED_TOKEN,
+      ParserErrorCode.EXPECTED_TOKEN,
+      ParserErrorCode.EXPECTED_TOKEN,
+      ParserErrorCode.EXPECTED_TOKEN,
+      ParserErrorCode.EXPECTED_TOKEN,
+      ParserErrorCode.EXPECTED_TOKEN,
+      ParserErrorCode.EXPECTED_TOKEN,
+      ParserErrorCode.MISSING_IDENTIFIER,
+      ParserErrorCode.MISSING_IDENTIFIER,
+      ParserErrorCode.MISSING_IDENTIFIER,
+      ParserErrorCode.MISSING_IDENTIFIER,
+      ParserErrorCode.UNEXPECTED_TOKEN,
+      ParserErrorCode.UNEXPECTED_TOKEN,
+      ParserErrorCode.UNEXPECTED_TOKEN,
+    ]);
   }
 
   test_nonConstMapAsExpressionStatement_only() async {
-    Source source = addSource(r'''
+    // TODO(danrubel): Consider improving recovery
+    await assertErrorsInCode(r'''
 f() {
   {'a' : 0, 'b' : 1};
-}''');
-    await computeAnalysisResult(source);
-    assertErrors(
-        source,
-        usingFastaParser
-            ? [
-                ParserErrorCode.EXPECTED_TOKEN,
-                ParserErrorCode.EXPECTED_TOKEN,
-                ParserErrorCode.EXPECTED_TOKEN,
-                ParserErrorCode.EXPECTED_TOKEN,
-                ParserErrorCode.EXPECTED_TOKEN,
-                ParserErrorCode.EXPECTED_TOKEN,
-                ParserErrorCode.EXPECTED_TOKEN,
-                ParserErrorCode.MISSING_IDENTIFIER,
-                ParserErrorCode.MISSING_IDENTIFIER,
-                ParserErrorCode.MISSING_IDENTIFIER,
-                ParserErrorCode.UNEXPECTED_TOKEN,
-                ParserErrorCode.UNEXPECTED_TOKEN,
-                ParserErrorCode.UNEXPECTED_TOKEN,
-              ]
-            : [CompileTimeErrorCode.NON_CONST_MAP_AS_EXPRESSION_STATEMENT]);
-    verify([source]);
-  }
-
-  test_nonConstMapKey() async {
-    Source source = addSource(r'''
-f(a) {
-  return const {a : 0};
-}''');
-    await computeAnalysisResult(source);
-    assertErrors(source, [CompileTimeErrorCode.NON_CONSTANT_MAP_KEY]);
-    verify([source]);
-  }
-
-  test_nonConstMapKeyFromDeferredLibrary() async {
-    await resolveWithErrors(<String>[
-      r'''
-library lib1;
-const int c = 1;''',
-      r'''
-library root;
-import 'lib1.dart' deferred as a;
-f() {
-  return const {a.c : 0};
-}'''
-    ], [
-      CompileTimeErrorCode.NON_CONSTANT_MAP_KEY_FROM_DEFERRED_LIBRARY
-    ]);
-  }
-
-  test_nonConstMapKeyFromDeferredLibrary_nested() async {
-    await resolveWithErrors(<String>[
-      r'''
-library lib1;
-const int c = 1;''',
-      r'''
-library root;
-import 'lib1.dart' deferred as a;
-f() {
-  return const {a.c + 1 : 0};
-}'''
-    ], [
-      CompileTimeErrorCode.NON_CONSTANT_MAP_KEY_FROM_DEFERRED_LIBRARY
-    ]);
-  }
-
-  test_nonConstMapValue() async {
-    Source source = addSource(r'''
-f(a) {
-  return const {'a' : a};
-}''');
-    await computeAnalysisResult(source);
-    assertErrors(source, [CompileTimeErrorCode.NON_CONSTANT_MAP_VALUE]);
-    verify([source]);
-  }
-
-  test_nonConstMapValueFromDeferredLibrary() async {
-    await resolveWithErrors(<String>[
-      r'''
-library lib1;
-const int c = 1;''',
-      r'''
-library root;
-import 'lib1.dart' deferred as a;
-f() {
-  return const {'a' : a.c};
-}'''
-    ], [
-      CompileTimeErrorCode.NON_CONSTANT_MAP_VALUE_FROM_DEFERRED_LIBRARY
-    ]);
-  }
-
-  test_nonConstMapValueFromDeferredLibrary_nested() async {
-    await resolveWithErrors(<String>[
-      r'''
-library lib1;
-const int c = 1;''',
-      r'''
-library root;
-import 'lib1.dart' deferred as a;
-f() {
-  return const {'a' : a.c + 1};
-}'''
-    ], [
-      CompileTimeErrorCode.NON_CONSTANT_MAP_VALUE_FROM_DEFERRED_LIBRARY
+}
+''', [
+      ParserErrorCode.EXPECTED_TOKEN,
+      ParserErrorCode.EXPECTED_TOKEN,
+      ParserErrorCode.EXPECTED_TOKEN,
+      ParserErrorCode.EXPECTED_TOKEN,
+      ParserErrorCode.EXPECTED_TOKEN,
+      ParserErrorCode.EXPECTED_TOKEN,
+      ParserErrorCode.EXPECTED_TOKEN,
+      ParserErrorCode.MISSING_IDENTIFIER,
+      ParserErrorCode.MISSING_IDENTIFIER,
+      ParserErrorCode.MISSING_IDENTIFIER,
+      ParserErrorCode.UNEXPECTED_TOKEN,
+      ParserErrorCode.UNEXPECTED_TOKEN,
+      ParserErrorCode.UNEXPECTED_TOKEN,
     ]);
   }
 
   test_nonConstValueInInitializer_assert_condition() async {
-    Source source = addSource(r'''
+    await assertErrorsInCode(r'''
 class A {
   const A(int i) : assert(i.isNegative);
-}''');
-    await computeAnalysisResult(source);
-    assertErrors(
-        source, [CompileTimeErrorCode.NON_CONSTANT_VALUE_IN_INITIALIZER]);
-    verify([source]);
+}
+''', [CompileTimeErrorCode.INVALID_CONSTANT]);
   }
 
   test_nonConstValueInInitializer_assert_message() async {
-    Source source = addSource(r'''
+    await assertErrorsInCode(r'''
 class A {
   const A(int i) : assert(i < 0, 'isNegative = ${i.isNegative}');
-}''');
-    await computeAnalysisResult(source);
-    assertErrors(
-        source, [CompileTimeErrorCode.NON_CONSTANT_VALUE_IN_INITIALIZER]);
-    verify([source]);
-  }
-
-  test_nonConstValueInInitializer_binary_notBool_left() async {
-    Source source = addSource(r'''
-class A {
-  final bool a;
-  const A(String p) : a = p && true;
-}''');
-    await computeAnalysisResult(source);
-    assertErrors(source, [
-      CompileTimeErrorCode.CONST_EVAL_TYPE_BOOL,
-      StaticTypeWarningCode.NON_BOOL_OPERAND
-    ]);
-    verify([source]);
-  }
-
-  test_nonConstValueInInitializer_binary_notBool_right() async {
-    Source source = addSource(r'''
-class A {
-  final bool a;
-  const A(String p) : a = true && p;
-}''');
-    await computeAnalysisResult(source);
-    assertErrors(source, [
-      CompileTimeErrorCode.CONST_EVAL_TYPE_BOOL,
-      StaticTypeWarningCode.NON_BOOL_OPERAND
-    ]);
-    verify([source]);
-  }
-
-  test_nonConstValueInInitializer_binary_notInt() async {
-    Source source = addSource(r'''
-class A {
-  final int a;
-  const A(String p) : a = 5 & p;
-}''');
-    await computeAnalysisResult(source);
-    assertErrors(source, [
-      CompileTimeErrorCode.CONST_EVAL_TYPE_BOOL_INT,
-      StaticWarningCode.ARGUMENT_TYPE_NOT_ASSIGNABLE
-    ]);
-    verify([source]);
-  }
-
-  test_nonConstValueInInitializer_binary_notNum() async {
-    Source source = addSource(r'''
-class A {
-  final int a;
-  const A(String p) : a = 5 + p;
-}''');
-    await computeAnalysisResult(source);
-    assertErrors(source, [
-      CompileTimeErrorCode.CONST_EVAL_TYPE_NUM,
-      StaticWarningCode.ARGUMENT_TYPE_NOT_ASSIGNABLE
-    ]);
-    verify([source]);
+}
+''', [CompileTimeErrorCode.INVALID_CONSTANT]);
   }
 
   test_nonConstValueInInitializer_field() async {
-    Source source = addSource(r'''
+    await assertErrorsInCode(r'''
 class A {
   static int C;
   final int a;
   const A() : a = C;
-}''');
-    await computeAnalysisResult(source);
-    assertErrors(
-        source, [CompileTimeErrorCode.NON_CONSTANT_VALUE_IN_INITIALIZER]);
-    verify([source]);
+}
+''', [CompileTimeErrorCode.INVALID_CONSTANT]);
   }
 
   test_nonConstValueInInitializer_instanceCreation() async {
-    Source source = addSource(r'''
+    // TODO(scheglov): the error CONST_EVAL_THROWS_EXCEPTION is redundant and
+    // ought to be suppressed. Or not?
+    await assertErrorsInCode(r'''
 class A {
   A();
 }
@@ -4512,15 +3314,11 @@
   const B() : a = new A();
   final a;
 }
-var b = const B();''');
-    // TODO(scheglov): the error CONST_EVAL_THROWS_EXCEPTION is redundant and
-    // ought to be suppressed. Or not?
-    await computeAnalysisResult(source);
-    assertErrors(source, [
-      CompileTimeErrorCode.NON_CONSTANT_VALUE_IN_INITIALIZER,
+var b = const B();
+''', [
+      CompileTimeErrorCode.INVALID_CONSTANT,
       CompileTimeErrorCode.CONST_EVAL_THROWS_EXCEPTION
     ]);
-    verify([source]);
   }
 
   test_nonConstValueInInitializer_instanceCreation_inDifferentFile() async {
@@ -4543,31 +3341,25 @@
   }
 
   test_nonConstValueInInitializer_redirecting() async {
-    Source source = addSource(r'''
+    await assertErrorsInCode(r'''
 class A {
   static var C;
   const A.named(p);
   const A() : this.named(C);
-}''');
-    await computeAnalysisResult(source);
-    assertErrors(
-        source, [CompileTimeErrorCode.NON_CONSTANT_VALUE_IN_INITIALIZER]);
-    verify([source]);
+}
+''', [CompileTimeErrorCode.INVALID_CONSTANT]);
   }
 
   test_nonConstValueInInitializer_super() async {
-    Source source = addSource(r'''
+    await assertErrorsInCode(r'''
 class A {
   const A(p);
 }
 class B extends A {
   static var C;
   const B() : super(C);
-}''');
-    await computeAnalysisResult(source);
-    assertErrors(
-        source, [CompileTimeErrorCode.NON_CONSTANT_VALUE_IN_INITIALIZER]);
-    verify([source]);
+}
+''', [CompileTimeErrorCode.INVALID_CONSTANT]);
   }
 
   test_nonConstValueInInitializerFromDeferredLibrary_field() async {
@@ -4581,10 +3373,10 @@
 class A {
   final int x;
   const A() : x = a.c;
-}'''
+}
+'''
     ], <ErrorCode>[
-      CompileTimeErrorCode
-          .NON_CONSTANT_VALUE_IN_INITIALIZER_FROM_DEFERRED_LIBRARY
+      CompileTimeErrorCode.INVALID_CONSTANT
     ]);
   }
 
@@ -4592,17 +3384,18 @@
     await resolveWithErrors(<String>[
       r'''
 library lib1;
-const int c = 1;''',
+const int c = 1;
+''',
       r'''
 library root;
 import 'lib1.dart' deferred as a;
 class A {
   final int x;
   const A() : x = a.c + 1;
-}'''
+}
+'''
     ], <ErrorCode>[
-      CompileTimeErrorCode
-          .NON_CONSTANT_VALUE_IN_INITIALIZER_FROM_DEFERRED_LIBRARY
+      CompileTimeErrorCode.INVALID_CONSTANT
     ]);
   }
 
@@ -4610,17 +3403,18 @@
     await resolveWithErrors(<String>[
       r'''
 library lib1;
-const int c = 1;''',
+const int c = 1;
+''',
       r'''
 library root;
 import 'lib1.dart' deferred as a;
 class A {
   const A.named(p);
   const A() : this.named(a.c);
-}'''
+}
+'''
     ], <ErrorCode>[
-      CompileTimeErrorCode
-          .NON_CONSTANT_VALUE_IN_INITIALIZER_FROM_DEFERRED_LIBRARY
+      CompileTimeErrorCode.INVALID_CONSTANT
     ]);
   }
 
@@ -4628,7 +3422,8 @@
     await resolveWithErrors(<String>[
       r'''
 library lib1;
-const int c = 1;''',
+const int c = 1;
+''',
       r'''
 library root;
 import 'lib1.dart' deferred as a;
@@ -4637,366 +3432,303 @@
 }
 class B extends A {
   const B() : super(a.c);
-}'''
+}
+'''
     ], <ErrorCode>[
-      CompileTimeErrorCode
-          .NON_CONSTANT_VALUE_IN_INITIALIZER_FROM_DEFERRED_LIBRARY
+      CompileTimeErrorCode.INVALID_CONSTANT
     ]);
   }
 
   test_nonGenerativeConstructor_explicit() async {
-    Source source = addSource(r'''
+    await assertErrorsInCode(r'''
 class A {
   factory A.named() => null;
 }
 class B extends A {
   B() : super.named();
-}''');
-    await computeAnalysisResult(source);
-    assertErrors(source, [CompileTimeErrorCode.NON_GENERATIVE_CONSTRUCTOR]);
-    verify([source]);
+}
+''', [CompileTimeErrorCode.NON_GENERATIVE_CONSTRUCTOR]);
   }
 
   test_nonGenerativeConstructor_implicit() async {
-    Source source = addSource(r'''
+    await assertErrorsInCode(r'''
 class A {
   factory A() => null;
 }
 class B extends A {
   B();
-}''');
-    await computeAnalysisResult(source);
-    assertErrors(source, [CompileTimeErrorCode.NON_GENERATIVE_CONSTRUCTOR]);
-    verify([source]);
+}
+''', [CompileTimeErrorCode.NON_GENERATIVE_CONSTRUCTOR]);
   }
 
   test_nonGenerativeConstructor_implicit2() async {
-    Source source = addSource(r'''
+    await assertErrorsInCode(r'''
 class A {
   factory A() => null;
 }
 class B extends A {
-}''');
-    await computeAnalysisResult(source);
-    assertErrors(source, [CompileTimeErrorCode.NON_GENERATIVE_CONSTRUCTOR]);
-    verify([source]);
+}
+''', [CompileTimeErrorCode.NON_GENERATIVE_CONSTRUCTOR]);
   }
 
   test_notEnoughRequiredArguments_const() async {
-    Source source = addSource(r'''
+    await assertErrorsInCode(r'''
 class A {
   const A(int p);
 }
 main() {
   const A();
-}''');
-    await computeAnalysisResult(source);
-    assertErrors(source, [CompileTimeErrorCode.NOT_ENOUGH_REQUIRED_ARGUMENTS]);
-    verify([source]);
+}
+''', [CompileTimeErrorCode.NOT_ENOUGH_REQUIRED_ARGUMENTS]);
   }
 
   test_notEnoughRequiredArguments_const_super() async {
-    Source source = addSource(r'''
+    await assertErrorsInCode(r'''
 class A {
   const A(int p);
 }
 class B extends A {
   const B() : super();
-}''');
-    await computeAnalysisResult(source);
-    assertErrors(source, [CompileTimeErrorCode.NOT_ENOUGH_REQUIRED_ARGUMENTS]);
-    verify([source]);
+}
+''', [CompileTimeErrorCode.NOT_ENOUGH_REQUIRED_ARGUMENTS]);
   }
 
   test_objectCannotExtendAnotherClass() async {
-    Source source = addSource(r'''
-''');
-    await computeAnalysisResult(source);
-    assertErrors(
-        source, [CompileTimeErrorCode.OBJECT_CANNOT_EXTEND_ANOTHER_CLASS]);
-    verify([source]);
+    await assertErrorsInCode(r'''
+class Object extends List {}
+''', [CompileTimeErrorCode.OBJECT_CANNOT_EXTEND_ANOTHER_CLASS]);
   }
 
   test_optionalParameterInOperator_named() async {
-    Source source = addSource(r'''
+    await assertErrorsInCode(r'''
 class A {
   operator +({p}) {}
-}''');
-    await computeAnalysisResult(source);
-    assertErrors(source, [CompileTimeErrorCode.OPTIONAL_PARAMETER_IN_OPERATOR]);
-    verify([source]);
+}
+''', [CompileTimeErrorCode.OPTIONAL_PARAMETER_IN_OPERATOR]);
   }
 
   test_optionalParameterInOperator_positional() async {
-    Source source = addSource(r'''
+    await assertErrorsInCode(r'''
 class A {
   operator +([p]) {}
-}''');
-    await computeAnalysisResult(source);
-    assertErrors(source, [CompileTimeErrorCode.OPTIONAL_PARAMETER_IN_OPERATOR]);
-    verify([source]);
+}
+''', [CompileTimeErrorCode.OPTIONAL_PARAMETER_IN_OPERATOR]);
   }
 
   test_partOfNonPart() async {
-    Source source = addSource(r'''
+    newFile("/l2.dart", content: '''
+library l2;
+''');
+    await assertErrorsInCode(r'''
 library l1;
-part 'l2.dart';''');
-    addNamedSource("/l2.dart", "library l2;");
-    await computeAnalysisResult(source);
-    assertErrors(source, [CompileTimeErrorCode.PART_OF_NON_PART]);
-    verify([source]);
+part 'l2.dart';
+''', [CompileTimeErrorCode.PART_OF_NON_PART]);
   }
 
   test_partOfNonPart_self() async {
-    Source source = addSource(r'''
+    await assertErrorsInCode(r'''
 library lib;
-part 'test.dart';''');
-    await computeAnalysisResult(source);
-    assertErrors(source, [CompileTimeErrorCode.PART_OF_NON_PART]);
-    verify([source]);
+part 'test.dart';
+''', [CompileTimeErrorCode.PART_OF_NON_PART]);
   }
 
   test_prefix_assignment_compound_in_method() async {
-    addNamedSource('/lib.dart', 'library lib;');
-    Source source = addSource('''
+    newFile('/lib.dart', content: '''
+library lib;
+''');
+    await assertErrorsInCode('''
 import 'lib.dart' as p;
 class C {
   f() {
     p += 1;
   }
 }
-''');
-    await computeAnalysisResult(source);
-    assertErrors(
-        source, [CompileTimeErrorCode.PREFIX_IDENTIFIER_NOT_FOLLOWED_BY_DOT]);
-    verify([source]);
+''', [CompileTimeErrorCode.PREFIX_IDENTIFIER_NOT_FOLLOWED_BY_DOT]);
   }
 
   test_prefix_assignment_compound_not_in_method() async {
-    addNamedSource('/lib.dart', 'library lib;');
-    Source source = addSource('''
+    newFile('/lib.dart', content: '''
+library lib;
+''');
+    await assertErrorsInCode('''
 import 'lib.dart' as p;
 f() {
   p += 1;
 }
-''');
-    await computeAnalysisResult(source);
-    assertErrors(
-        source, [CompileTimeErrorCode.PREFIX_IDENTIFIER_NOT_FOLLOWED_BY_DOT]);
-    verify([source]);
+''', [CompileTimeErrorCode.PREFIX_IDENTIFIER_NOT_FOLLOWED_BY_DOT]);
   }
 
   test_prefix_assignment_in_method() async {
-    addNamedSource('/lib.dart', 'library lib;');
-    Source source = addSource('''
+    newFile('/lib.dart', content: '''
+library lib;
+''');
+    await assertErrorsInCode('''
 import 'lib.dart' as p;
 class C {
   f() {
     p = 1;
   }
 }
-''');
-    await computeAnalysisResult(source);
-    assertErrors(
-        source, [CompileTimeErrorCode.PREFIX_IDENTIFIER_NOT_FOLLOWED_BY_DOT]);
-    verify([source]);
+''', [CompileTimeErrorCode.PREFIX_IDENTIFIER_NOT_FOLLOWED_BY_DOT]);
   }
 
   test_prefix_assignment_not_in_method() async {
-    addNamedSource('/lib.dart', 'library lib;');
-    Source source = addSource('''
+    newFile('/lib.dart', content: '''
+library lib;
+''');
+    await assertErrorsInCode('''
 import 'lib.dart' as p;
 f() {
   p = 1;
 }
-''');
-    await computeAnalysisResult(source);
-    assertErrors(
-        source, [CompileTimeErrorCode.PREFIX_IDENTIFIER_NOT_FOLLOWED_BY_DOT]);
-    verify([source]);
+''', [CompileTimeErrorCode.PREFIX_IDENTIFIER_NOT_FOLLOWED_BY_DOT]);
   }
 
   test_prefix_conditionalPropertyAccess_call_loadLibrary() async {
-    addNamedSource('/lib.dart', '''
+    newFile('/lib.dart', content: '''
 library lib;
 ''');
-    Source source = addSource('''
+    await assertErrorsInCode('''
 import 'lib.dart' deferred as p;
 f() {
   p?.loadLibrary();
 }
-''');
-    await computeAnalysisResult(source);
-    assertErrors(
-        source, [CompileTimeErrorCode.PREFIX_IDENTIFIER_NOT_FOLLOWED_BY_DOT]);
-    verify([source]);
+''', [CompileTimeErrorCode.PREFIX_IDENTIFIER_NOT_FOLLOWED_BY_DOT]);
   }
 
   test_prefix_conditionalPropertyAccess_get() async {
-    addNamedSource('/lib.dart', '''
+    newFile('/lib.dart', content: '''
 library lib;
 var x;
 ''');
-    Source source = addSource('''
+    await assertErrorsInCode('''
 import 'lib.dart' as p;
 f() {
   return p?.x;
 }
-''');
-    await computeAnalysisResult(source);
-    assertErrors(
-        source, [CompileTimeErrorCode.PREFIX_IDENTIFIER_NOT_FOLLOWED_BY_DOT]);
-    verify([source]);
+''', [CompileTimeErrorCode.PREFIX_IDENTIFIER_NOT_FOLLOWED_BY_DOT]);
   }
 
   test_prefix_conditionalPropertyAccess_get_loadLibrary() async {
-    addNamedSource('/lib.dart', '''
+    newFile('/lib.dart', content: '''
 library lib;
 ''');
-    Source source = addSource('''
+    await assertErrorsInCode('''
 import 'lib.dart' deferred as p;
 f() {
   return p?.loadLibrary;
 }
-''');
-    await computeAnalysisResult(source);
-    assertErrors(
-        source, [CompileTimeErrorCode.PREFIX_IDENTIFIER_NOT_FOLLOWED_BY_DOT]);
-    verify([source]);
+''', [CompileTimeErrorCode.PREFIX_IDENTIFIER_NOT_FOLLOWED_BY_DOT]);
   }
 
   test_prefix_conditionalPropertyAccess_set() async {
-    addNamedSource('/lib.dart', '''
+    newFile('/lib.dart', content: '''
 library lib;
 var x;
 ''');
-    Source source = addSource('''
+    await assertErrorsInCode('''
 import 'lib.dart' as p;
 f() {
   p?.x = null;
 }
-''');
-    await computeAnalysisResult(source);
-    assertErrors(
-        source, [CompileTimeErrorCode.PREFIX_IDENTIFIER_NOT_FOLLOWED_BY_DOT]);
-    verify([source]);
+''', [CompileTimeErrorCode.PREFIX_IDENTIFIER_NOT_FOLLOWED_BY_DOT]);
   }
 
   test_prefix_conditionalPropertyAccess_set_loadLibrary() async {
-    addNamedSource('/lib.dart', '''
+    newFile('/lib.dart', content: '''
 library lib;
 ''');
-    Source source = addSource('''
+    await assertErrorsInCode('''
 import 'lib.dart' deferred as p;
 f() {
   p?.loadLibrary = null;
 }
-''');
-    await computeAnalysisResult(source);
-    assertErrors(
-        source, [CompileTimeErrorCode.PREFIX_IDENTIFIER_NOT_FOLLOWED_BY_DOT]);
-    verify([source]);
+''', [CompileTimeErrorCode.PREFIX_IDENTIFIER_NOT_FOLLOWED_BY_DOT]);
   }
 
   test_prefixCollidesWithTopLevelMembers_functionTypeAlias() async {
-    addNamedSource("/lib.dart", r'''
+    newFile("/lib.dart", content: r'''
 library lib;
-class A{}''');
-    Source source = addSource(r'''
+class A{}
+''');
+    await assertErrorsInCode(r'''
 import 'lib.dart' as p;
 typedef p();
-p.A a;''');
-    await computeAnalysisResult(source);
-    assertErrors(
-        source, [CompileTimeErrorCode.PREFIX_COLLIDES_WITH_TOP_LEVEL_MEMBER]);
-    verify([source]);
+p.A a;
+''', [CompileTimeErrorCode.PREFIX_COLLIDES_WITH_TOP_LEVEL_MEMBER]);
   }
 
   test_prefixCollidesWithTopLevelMembers_topLevelFunction() async {
-    addNamedSource("/lib.dart", r'''
+    newFile("/lib.dart", content: r'''
 library lib;
-class A{}''');
-    Source source = addSource(r'''
+class A{}
+''');
+    await assertErrorsInCode(r'''
 import 'lib.dart' as p;
 p() {}
-p.A a;''');
-    await computeAnalysisResult(source);
-    assertErrors(
-        source, [CompileTimeErrorCode.PREFIX_COLLIDES_WITH_TOP_LEVEL_MEMBER]);
-    verify([source]);
+p.A a;
+''', [CompileTimeErrorCode.PREFIX_COLLIDES_WITH_TOP_LEVEL_MEMBER]);
   }
 
   test_prefixCollidesWithTopLevelMembers_topLevelVariable() async {
-    addNamedSource("/lib.dart", r'''
+    newFile("/lib.dart", content: r'''
 library lib;
-class A{}''');
-    Source source = addSource(r'''
+class A{}
+''');
+    await assertErrorsInCode(r'''
 import 'lib.dart' as p;
 var p = null;
-p.A a;''');
-    await computeAnalysisResult(source);
-    assertErrors(
-        source, [CompileTimeErrorCode.PREFIX_COLLIDES_WITH_TOP_LEVEL_MEMBER]);
-    verify([source]);
+p.A a;
+''', [CompileTimeErrorCode.PREFIX_COLLIDES_WITH_TOP_LEVEL_MEMBER]);
   }
 
   test_prefixCollidesWithTopLevelMembers_type() async {
-    addNamedSource("/lib.dart", r'''
+    newFile("/lib.dart", content: r'''
 library lib;
-class A{}''');
-    Source source = addSource(r'''
+class A{}
+''');
+    await assertErrorsInCode(r'''
 import 'lib.dart' as p;
 class p {}
-p.A a;''');
-    await computeAnalysisResult(source);
-    assertErrors(
-        source, [CompileTimeErrorCode.PREFIX_COLLIDES_WITH_TOP_LEVEL_MEMBER]);
-    verify([source]);
+p.A a;
+''', [CompileTimeErrorCode.PREFIX_COLLIDES_WITH_TOP_LEVEL_MEMBER]);
   }
 
   test_prefixNotFollowedByDot() async {
-    addNamedSource('/lib.dart', 'library lib;');
-    Source source = addSource('''
+    newFile('/lib.dart', content: '''
+library lib;
+''');
+    await assertErrorsInCode('''
 import 'lib.dart' as p;
 f() {
   return p;
 }
-''');
-    await computeAnalysisResult(source);
-    assertErrors(
-        source, [CompileTimeErrorCode.PREFIX_IDENTIFIER_NOT_FOLLOWED_BY_DOT]);
-    verify([source]);
+''', [CompileTimeErrorCode.PREFIX_IDENTIFIER_NOT_FOLLOWED_BY_DOT]);
   }
 
   test_prefixNotFollowedByDot_compoundAssignment() async {
-    addNamedSource('/lib.dart', 'library lib;');
-    Source source = addSource('''
+    newFile('/lib.dart', content: '''
+library lib;
+''');
+    await assertErrorsInCode('''
 import 'lib.dart' as p;
 f() {
   p += 1;
 }
-''');
-    await computeAnalysisResult(source);
-    assertErrors(
-        source, [CompileTimeErrorCode.PREFIX_IDENTIFIER_NOT_FOLLOWED_BY_DOT]);
-    verify([source]);
+''', [CompileTimeErrorCode.PREFIX_IDENTIFIER_NOT_FOLLOWED_BY_DOT]);
   }
 
   test_prefixNotFollowedByDot_conditionalMethodInvocation() async {
-    addNamedSource('/lib.dart', '''
+    newFile('/lib.dart', content: '''
 library lib;
 g() {}
 ''');
-    Source source = addSource('''
+    await assertErrorsInCode('''
 import 'lib.dart' as p;
 f() {
   p?.g();
 }
-''');
-    await computeAnalysisResult(source);
-    assertErrors(
-        source, [CompileTimeErrorCode.PREFIX_IDENTIFIER_NOT_FOLLOWED_BY_DOT]);
-    verify([source]);
+''', [CompileTimeErrorCode.PREFIX_IDENTIFIER_NOT_FOLLOWED_BY_DOT]);
   }
 
   test_privateCollisionInClassTypeAlias_mixinAndMixin() {
@@ -5058,61 +3790,45 @@
   }
 
   test_privateOptionalParameter() async {
-    Source source = addSource("f({var _p}) {}");
-    await computeAnalysisResult(source);
-    assertErrors(source, [CompileTimeErrorCode.PRIVATE_OPTIONAL_PARAMETER]);
-    verify([source]);
+    await assertErrorsInCode('''
+f({var _p}) {}
+''', [CompileTimeErrorCode.PRIVATE_OPTIONAL_PARAMETER]);
   }
 
   test_privateOptionalParameter_fieldFormal() async {
-    Source source = addSource(r'''
+    await assertErrorsInCode(r'''
 class A {
   var _p;
   A({this._p: 0});
-}''');
-    await computeAnalysisResult(source);
-    assertErrors(source, [CompileTimeErrorCode.PRIVATE_OPTIONAL_PARAMETER]);
-    verify([source]);
+}
+''', [CompileTimeErrorCode.PRIVATE_OPTIONAL_PARAMETER]);
   }
 
   test_privateOptionalParameter_withDefaultValue() async {
-    Source source = addSource("f({_p : 0}) {}");
-    await computeAnalysisResult(source);
-    assertErrors(source, [CompileTimeErrorCode.PRIVATE_OPTIONAL_PARAMETER]);
-    verify([source]);
+    await assertErrorsInCode('''
+f({_p : 0}) {}
+''', [CompileTimeErrorCode.PRIVATE_OPTIONAL_PARAMETER]);
   }
 
   test_recursiveCompileTimeConstant() async {
-    Source source = addSource(r'''
+    await assertErrorsInCode(r'''
 class A {
   const A();
   final m = const A();
-}''');
-    await computeAnalysisResult(source);
-    assertErrors(
-        source, [CompileTimeErrorCode.RECURSIVE_COMPILE_TIME_CONSTANT]);
-    verify([source]);
+}
+''', [CompileTimeErrorCode.RECURSIVE_COMPILE_TIME_CONSTANT]);
   }
 
   test_recursiveCompileTimeConstant_cycle() async {
-    Source source = addSource(r'''
+    await assertErrorsInCode(r'''
 const x = y + 1;
-const y = x + 1;''');
-    await computeAnalysisResult(source);
-    if (!enableNewAnalysisDriver) {
-      assertErrors(source, [
-        CompileTimeErrorCode.RECURSIVE_COMPILE_TIME_CONSTANT,
-        CompileTimeErrorCode.RECURSIVE_COMPILE_TIME_CONSTANT,
-      ]);
-    } else {
-      assertErrors(source, [
-        CompileTimeErrorCode.RECURSIVE_COMPILE_TIME_CONSTANT,
-        CompileTimeErrorCode.RECURSIVE_COMPILE_TIME_CONSTANT,
-        StrongModeCode.TOP_LEVEL_CYCLE,
-        StrongModeCode.TOP_LEVEL_CYCLE,
-      ]);
-    }
-    verify([source]);
+const y = x + 1;
+''', [
+      CompileTimeErrorCode.RECURSIVE_COMPILE_TIME_CONSTANT,
+      CompileTimeErrorCode.RECURSIVE_COMPILE_TIME_CONSTANT,
+      StrongModeCode.TOP_LEVEL_CYCLE,
+      StrongModeCode.TOP_LEVEL_CYCLE,
+    ]);
   }
 
   test_recursiveCompileTimeConstant_fromMapLiteral() async {
@@ -5123,96 +3839,67 @@
 const int y = x;
 ''',
     );
-    Source source = addSource(r'''
+    // No errors, because the cycle is not in this source.
+    await assertNoErrorsInCode(r'''
 import 'constants.dart';
 final z = {x: 0, y: 1};
 ''');
-    await computeAnalysisResult(source);
-    // No errors, because the cycle is not in this source.
-    assertNoErrors(source);
-    verify([source]);
   }
 
   test_recursiveCompileTimeConstant_initializer_after_toplevel_var() async {
-    Source source = addSource('''
+    await assertErrorsInCode('''
 const y = const C();
 class C {
   const C() : x = y;
   final x;
 }
-''');
-    await computeAnalysisResult(source);
-    assertErrors(
-        source, [CompileTimeErrorCode.RECURSIVE_COMPILE_TIME_CONSTANT]);
-    verify([source]);
+''', [CompileTimeErrorCode.RECURSIVE_COMPILE_TIME_CONSTANT]);
   }
 
   test_recursiveCompileTimeConstant_singleVariable() async {
-    Source source = addSource(r'''
+    await assertErrorsInCode(r'''
 const x = x;
-''');
-    await computeAnalysisResult(source);
-    if (!enableNewAnalysisDriver) {
-      assertErrors(source, [
-        CompileTimeErrorCode.RECURSIVE_COMPILE_TIME_CONSTANT,
-      ]);
-    } else {
-      assertErrors(source, [
-        CompileTimeErrorCode.RECURSIVE_COMPILE_TIME_CONSTANT,
-        StrongModeCode.TOP_LEVEL_CYCLE
-      ]);
-    }
-    verify([source]);
+''', [
+      CompileTimeErrorCode.RECURSIVE_COMPILE_TIME_CONSTANT,
+      StrongModeCode.TOP_LEVEL_CYCLE
+    ]);
   }
 
   test_recursiveCompileTimeConstant_singleVariable_fromConstList() async {
-    Source source = addSource(r'''
+    await assertErrorsInCode(r'''
 const elems = const [
   const [
     1, elems, 3,
   ],
 ];
-''');
-    await computeAnalysisResult(source);
-    if (!enableNewAnalysisDriver) {
-      assertErrors(source, [
-        CompileTimeErrorCode.RECURSIVE_COMPILE_TIME_CONSTANT,
-      ]);
-    } else {
-      assertErrors(source, [
-        CompileTimeErrorCode.RECURSIVE_COMPILE_TIME_CONSTANT,
-        StrongModeCode.TOP_LEVEL_CYCLE,
-      ]);
-    }
-    verify([source]);
+''', [
+      CompileTimeErrorCode.RECURSIVE_COMPILE_TIME_CONSTANT,
+      StrongModeCode.TOP_LEVEL_CYCLE,
+    ]);
   }
 
   test_recursiveConstructorRedirect() async {
-    Source source = addSource(r'''
+    await assertErrorsInCode(r'''
 class A {
   A.a() : this.b();
   A.b() : this.a();
-}''');
-    await computeAnalysisResult(source);
-    assertErrors(source, [
+}
+''', [
       CompileTimeErrorCode.RECURSIVE_CONSTRUCTOR_REDIRECT,
       CompileTimeErrorCode.RECURSIVE_CONSTRUCTOR_REDIRECT
     ]);
-    verify([source]);
   }
 
   test_recursiveConstructorRedirect_directSelfReference() async {
-    Source source = addSource(r'''
+    await assertErrorsInCode(r'''
 class A {
   A() : this();
-}''');
-    await computeAnalysisResult(source);
-    assertErrors(source, [CompileTimeErrorCode.RECURSIVE_CONSTRUCTOR_REDIRECT]);
-    verify([source]);
+}
+''', [CompileTimeErrorCode.RECURSIVE_CONSTRUCTOR_REDIRECT]);
   }
 
   test_recursiveFactoryRedirect() async {
-    Source source = addSource(r'''
+    await assertErrorsInCode(r'''
 class A implements B {
   factory A() = C;
 }
@@ -5221,9 +3908,8 @@
 }
 class C implements A {
   factory C() = B;
-}''');
-    await computeAnalysisResult(source);
-    assertErrors(source, [
+}
+''', [
       CompileTimeErrorCode.RECURSIVE_FACTORY_REDIRECT,
       CompileTimeErrorCode.RECURSIVE_FACTORY_REDIRECT,
       CompileTimeErrorCode.RECURSIVE_FACTORY_REDIRECT,
@@ -5231,38 +3917,32 @@
       CompileTimeErrorCode.RECURSIVE_INTERFACE_INHERITANCE,
       CompileTimeErrorCode.RECURSIVE_INTERFACE_INHERITANCE
     ]);
-    verify([source]);
   }
 
   test_recursiveFactoryRedirect_directSelfReference() async {
-    Source source = addSource(r'''
+    await assertErrorsInCode(r'''
 class A {
   factory A() = A;
-}''');
-    await computeAnalysisResult(source);
-    assertErrors(source, [CompileTimeErrorCode.RECURSIVE_FACTORY_REDIRECT]);
-    verify([source]);
+}
+''', [CompileTimeErrorCode.RECURSIVE_FACTORY_REDIRECT]);
   }
 
   test_recursiveFactoryRedirect_diverging() async {
     // Analysis should terminate even though the redirections don't reach a
     // fixed point.  (C<int> redirects to C<C<int>>, then to C<C<C<int>>>, and
     // so on).
-    Source source = addSource('''
+    await assertErrorsInCode('''
 class C<T> {
   const factory C() = C<C<T>>;
 }
 main() {
   const C<int>();
 }
-''');
-    await computeAnalysisResult(source);
-    assertErrors(source, [CompileTimeErrorCode.RECURSIVE_FACTORY_REDIRECT]);
-    verify([source]);
+''', [CompileTimeErrorCode.RECURSIVE_FACTORY_REDIRECT]);
   }
 
   test_recursiveFactoryRedirect_generic() async {
-    Source source = addSource(r'''
+    await assertErrorsInCode(r'''
 class A<T> implements B<T> {
   factory A() = C;
 }
@@ -5271,9 +3951,8 @@
 }
 class C<T> implements A<T> {
   factory C() = B;
-}''');
-    await computeAnalysisResult(source);
-    assertErrors(source, [
+}
+''', [
       CompileTimeErrorCode.RECURSIVE_FACTORY_REDIRECT,
       CompileTimeErrorCode.RECURSIVE_FACTORY_REDIRECT,
       CompileTimeErrorCode.RECURSIVE_FACTORY_REDIRECT,
@@ -5281,11 +3960,10 @@
       CompileTimeErrorCode.RECURSIVE_INTERFACE_INHERITANCE,
       CompileTimeErrorCode.RECURSIVE_INTERFACE_INHERITANCE
     ]);
-    verify([source]);
   }
 
   test_recursiveFactoryRedirect_named() async {
-    Source source = addSource(r'''
+    await assertErrorsInCode(r'''
 class A implements B {
   factory A.nameA() = C.nameC;
 }
@@ -5294,9 +3972,8 @@
 }
 class C implements A {
   factory C.nameC() = B.nameB;
-}''');
-    await computeAnalysisResult(source);
-    assertErrors(source, [
+}
+''', [
       CompileTimeErrorCode.RECURSIVE_FACTORY_REDIRECT,
       CompileTimeErrorCode.RECURSIVE_FACTORY_REDIRECT,
       CompileTimeErrorCode.RECURSIVE_FACTORY_REDIRECT,
@@ -5304,7 +3981,6 @@
       CompileTimeErrorCode.RECURSIVE_INTERFACE_INHERITANCE,
       CompileTimeErrorCode.RECURSIVE_INTERFACE_INHERITANCE
     ]);
-    verify([source]);
   }
 
   /**
@@ -5312,7 +3988,7 @@
    * not the part of a cycle.
    */
   test_recursiveFactoryRedirect_outsideCycle() async {
-    Source source = addSource(r'''
+    await assertErrorsInCode(r'''
 class A {
   factory A() = C;
 }
@@ -5321,136 +3997,115 @@
 }
 class C implements A, B {
   factory C() = B;
-}''');
-    await computeAnalysisResult(source);
-    assertErrors(source, [
+}
+''', [
       CompileTimeErrorCode.RECURSIVE_FACTORY_REDIRECT,
       CompileTimeErrorCode.RECURSIVE_FACTORY_REDIRECT,
       CompileTimeErrorCode.RECURSIVE_INTERFACE_INHERITANCE,
       CompileTimeErrorCode.RECURSIVE_INTERFACE_INHERITANCE
     ]);
-    verify([source]);
   }
 
   test_redirectGenerativeToMissingConstructor() async {
-    Source source = addSource(r'''
+    await assertErrorsInCode(r'''
 class A {
   A() : this.noSuchConstructor();
-}''');
-    await computeAnalysisResult(source);
-    assertErrors(source,
-        [CompileTimeErrorCode.REDIRECT_GENERATIVE_TO_MISSING_CONSTRUCTOR]);
+}
+''', [CompileTimeErrorCode.REDIRECT_GENERATIVE_TO_MISSING_CONSTRUCTOR],
+        verify: false);
   }
 
   test_redirectGenerativeToNonGenerativeConstructor() async {
-    Source source = addSource(r'''
+    await assertErrorsInCode(r'''
 class A {
   A() : this.x();
   factory A.x() => null;
-}''');
-    await computeAnalysisResult(source);
-    assertErrors(source, [
-      CompileTimeErrorCode.REDIRECT_GENERATIVE_TO_NON_GENERATIVE_CONSTRUCTOR
-    ]);
-    verify([source]);
+}
+''', [CompileTimeErrorCode.REDIRECT_GENERATIVE_TO_NON_GENERATIVE_CONSTRUCTOR]);
   }
 
   test_redirectToMissingConstructor_named() async {
-    Source source = addSource(r'''
+    await assertErrorsInCode(r'''
 class A implements B{
   A() {}
 }
 class B {
   const factory B() = A.name;
-}''');
-    await computeAnalysisResult(source);
-    assertErrors(
-        source, [CompileTimeErrorCode.REDIRECT_TO_MISSING_CONSTRUCTOR]);
+}
+''', [CompileTimeErrorCode.REDIRECT_TO_MISSING_CONSTRUCTOR], verify: false);
   }
 
   test_redirectToMissingConstructor_unnamed() async {
-    Source source = addSource(r'''
+    await assertErrorsInCode(r'''
 class A implements B{
   A.name() {}
 }
 class B {
   const factory B() = A;
-}''');
-    await computeAnalysisResult(source);
-    assertErrors(
-        source, [CompileTimeErrorCode.REDIRECT_TO_MISSING_CONSTRUCTOR]);
+}
+''', [CompileTimeErrorCode.REDIRECT_TO_MISSING_CONSTRUCTOR]);
   }
 
   test_redirectToNonClass_notAType() async {
-    Source source = addSource(r'''
+    await assertErrorsInCode(r'''
 int A;
 class B {
   const factory B() = A;
-}''');
-    await computeAnalysisResult(source);
-    assertErrors(source, [CompileTimeErrorCode.REDIRECT_TO_NON_CLASS]);
-    verify([source]);
+}
+''', [CompileTimeErrorCode.REDIRECT_TO_NON_CLASS]);
   }
 
   test_redirectToNonClass_undefinedIdentifier() async {
-    Source source = addSource(r'''
+    await assertErrorsInCode(r'''
 class B {
   const factory B() = A;
-}''');
-    await computeAnalysisResult(source);
-    assertErrors(source, [CompileTimeErrorCode.REDIRECT_TO_NON_CLASS]);
-    verify([source]);
+}
+''', [CompileTimeErrorCode.REDIRECT_TO_NON_CLASS]);
   }
 
   test_redirectToNonConstConstructor() async {
-    Source source = addSource(r'''
+    await assertErrorsInCode(r'''
 class A {
   A.a() {}
   const factory A.b() = A.a;
-}''');
-    await computeAnalysisResult(source);
-    assertErrors(
-        source, [CompileTimeErrorCode.REDIRECT_TO_NON_CONST_CONSTRUCTOR]);
-    verify([source]);
+}
+''', [CompileTimeErrorCode.REDIRECT_TO_NON_CONST_CONSTRUCTOR]);
   }
 
   test_referencedBeforeDeclaration_hideInBlock_comment() async {
-    Source source = addSource(r'''
+    await assertNoErrorsInCode(r'''
 main() {
   /// [v] is a variable.
   var v = 2;
 }
-print(x) {}''');
-    await computeAnalysisResult(source);
-    assertNoErrors(source);
+print(x) {}
+''');
   }
 
   test_referencedBeforeDeclaration_hideInBlock_function() async {
-    Source source = addSource(r'''
+    await assertErrorsInCode(r'''
 var v = 1;
 main() {
   print(v);
   v() {}
 }
-print(x) {}''');
-    await computeAnalysisResult(source);
-    assertErrors(source, [CompileTimeErrorCode.REFERENCED_BEFORE_DECLARATION]);
+print(x) {}
+''', [CompileTimeErrorCode.REFERENCED_BEFORE_DECLARATION]);
   }
 
   test_referencedBeforeDeclaration_hideInBlock_local() async {
-    Source source = addSource(r'''
+    await assertErrorsInCode(r'''
 var v = 1;
 main() {
   print(v);
   var v = 2;
 }
-print(x) {}''');
-    await computeAnalysisResult(source);
-    assertErrors(source, [CompileTimeErrorCode.REFERENCED_BEFORE_DECLARATION]);
+print(x) {}
+''', [CompileTimeErrorCode.REFERENCED_BEFORE_DECLARATION]);
   }
 
   test_referencedBeforeDeclaration_hideInBlock_subBlock() async {
-    Source source = addSource(r'''
+    await assertErrorsInCode(r'''
 var v = 1;
 main() {
   {
@@ -5458,158 +4113,131 @@
   }
   var v = 2;
 }
-print(x) {}''');
-    await computeAnalysisResult(source);
-    assertErrors(source, [CompileTimeErrorCode.REFERENCED_BEFORE_DECLARATION]);
+print(x) {}
+''', [CompileTimeErrorCode.REFERENCED_BEFORE_DECLARATION]);
   }
 
   test_referencedBeforeDeclaration_inInitializer_closure() async {
-    Source source = addSource(r'''
+    await assertErrorsInCode(r'''
 main() {
   var v = () => v;
-}''');
-    await computeAnalysisResult(source);
-    assertErrors(source, [CompileTimeErrorCode.REFERENCED_BEFORE_DECLARATION]);
+}
+''', [CompileTimeErrorCode.REFERENCED_BEFORE_DECLARATION]);
   }
 
   test_referencedBeforeDeclaration_inInitializer_directly() async {
-    Source source = addSource(r'''
+    await assertErrorsInCode(r'''
 main() {
   var v = v;
-}''');
-    await computeAnalysisResult(source);
-    assertErrors(source, [CompileTimeErrorCode.REFERENCED_BEFORE_DECLARATION]);
+}
+''', [CompileTimeErrorCode.REFERENCED_BEFORE_DECLARATION]);
   }
 
   test_referencedBeforeDeclaration_type_localFunction() async {
-    Source source = addSource(r'''
+    await assertErrorsInCode(r'''
 void testTypeRef() {
   String s = '';
   int String(int x) => x + 1;
 }
-''');
-    await computeAnalysisResult(source);
-    assertErrors(source, [CompileTimeErrorCode.REFERENCED_BEFORE_DECLARATION]);
+''', [CompileTimeErrorCode.REFERENCED_BEFORE_DECLARATION]);
   }
 
   test_referencedBeforeDeclaration_type_localVariable() async {
-    Source source = addSource(r'''
+    await assertErrorsInCode(r'''
 void testTypeRef() {
   String s = '';
   var String = '';
 }
-''');
-    await computeAnalysisResult(source);
-    assertErrors(source, [CompileTimeErrorCode.REFERENCED_BEFORE_DECLARATION]);
+''', [CompileTimeErrorCode.REFERENCED_BEFORE_DECLARATION]);
   }
 
   test_rethrowOutsideCatch() async {
-    Source source = addSource(r'''
+    await assertErrorsInCode(r'''
 f() {
   rethrow;
-}''');
-    await computeAnalysisResult(source);
-    assertErrors(source, [CompileTimeErrorCode.RETHROW_OUTSIDE_CATCH]);
-    verify([source]);
+}
+''', [CompileTimeErrorCode.RETHROW_OUTSIDE_CATCH]);
   }
 
   test_returnInGenerativeConstructor() async {
-    Source source = addSource(r'''
+    await assertErrorsInCode(r'''
 class A {
   A() { return 0; }
-}''');
-    await computeAnalysisResult(source);
-    assertErrors(
-        source, [CompileTimeErrorCode.RETURN_IN_GENERATIVE_CONSTRUCTOR]);
-    verify([source]);
+}
+''', [CompileTimeErrorCode.RETURN_IN_GENERATIVE_CONSTRUCTOR]);
   }
 
   test_returnInGenerativeConstructor_expressionFunctionBody() async {
-    Source source = addSource(r'''
+    await assertErrorsInCode(r'''
 class A {
   A() => null;
-}''');
-    await computeAnalysisResult(source);
-    assertErrors(
-        source, [CompileTimeErrorCode.RETURN_IN_GENERATIVE_CONSTRUCTOR]);
-    verify([source]);
+}
+''', [CompileTimeErrorCode.RETURN_IN_GENERATIVE_CONSTRUCTOR]);
   }
 
   test_returnInGenerator_asyncStar() async {
-    Source source = addSource(r'''
+    await assertErrorsInCode(r'''
 f() async* {
   return 0;
-}''');
-    await computeAnalysisResult(source);
-    assertErrors(
-        source,
-        usingFastaParser
-            ? [
-                CompileTimeErrorCode.RETURN_IN_GENERATOR,
-                CompileTimeErrorCode.RETURN_IN_GENERATOR
-              ]
-            : [CompileTimeErrorCode.RETURN_IN_GENERATOR]);
-    verify([source]);
+}
+''', [
+      CompileTimeErrorCode.RETURN_IN_GENERATOR,
+      CompileTimeErrorCode.RETURN_IN_GENERATOR
+    ]);
   }
 
   test_returnInGenerator_syncStar() async {
-    Source source = addSource(r'''
+    await assertErrorsInCode(r'''
 f() sync* {
   return 0;
-}''');
-    await computeAnalysisResult(source);
-    assertErrors(
-        source,
-        usingFastaParser
-            ? [
-                CompileTimeErrorCode.RETURN_IN_GENERATOR,
-                CompileTimeErrorCode.RETURN_IN_GENERATOR
-              ]
-            : [CompileTimeErrorCode.RETURN_IN_GENERATOR]);
-    verify([source]);
+}
+''', [
+      CompileTimeErrorCode.RETURN_IN_GENERATOR,
+      CompileTimeErrorCode.RETURN_IN_GENERATOR
+    ]);
   }
 
   test_sharedDeferredPrefix() async {
     await resolveWithErrors(<String>[
       r'''
 library lib1;
-f1() {}''',
+f1() {}
+''',
       r'''
 library lib2;
-f2() {}''',
+f2() {}
+''',
       r'''
 library root;
 import 'lib1.dart' deferred as lib;
 import 'lib2.dart' as lib;
-main() { lib.f1(); lib.f2(); }'''
+main() { lib.f1(); lib.f2(); }
+'''
     ], <ErrorCode>[
       CompileTimeErrorCode.SHARED_DEFERRED_PREFIX
     ]);
   }
 
   test_superInInvalidContext_binaryExpression() async {
-    Source source = addSource("var v = super + 0;");
-    await computeAnalysisResult(source);
-    assertErrors(source, [CompileTimeErrorCode.SUPER_IN_INVALID_CONTEXT]);
-    // no verify(), 'super.v' is not resolved
+    await assertErrorsInCode('''
+var v = super + 0;
+''', [CompileTimeErrorCode.SUPER_IN_INVALID_CONTEXT]);
   }
 
   test_superInInvalidContext_constructorFieldInitializer() async {
-    Source source = addSource(r'''
+    await assertErrorsInCode(r'''
 class A {
   m() {}
 }
 class B extends A {
   var f;
   B() : f = super.m();
-}''');
-    await computeAnalysisResult(source);
-    assertErrors(source, [CompileTimeErrorCode.SUPER_IN_INVALID_CONTEXT]);
-    // no verify(), 'super.m' is not resolved
+}
+''', [CompileTimeErrorCode.SUPER_IN_INVALID_CONTEXT], verify: false);
   }
 
   test_superInInvalidContext_factoryConstructor() async {
-    Source source = addSource(r'''
+    await assertErrorsInCode(r'''
 class A {
   m() {}
 }
@@ -5618,113 +4246,96 @@
     super.m();
     return null;
   }
-}''');
-    await computeAnalysisResult(source);
-    assertErrors(source, [CompileTimeErrorCode.SUPER_IN_INVALID_CONTEXT]);
-    // no verify(), 'super.m' is not resolved
+}
+''', [CompileTimeErrorCode.SUPER_IN_INVALID_CONTEXT], verify: false);
   }
 
   test_superInInvalidContext_instanceVariableInitializer() async {
-    Source source = addSource(r'''
+    await assertErrorsInCode(r'''
 class A {
   var a;
 }
 class B extends A {
  var b = super.a;
-}''');
-    await computeAnalysisResult(source);
-    assertErrors(source, [CompileTimeErrorCode.SUPER_IN_INVALID_CONTEXT]);
-    // no verify(), 'super.a' is not resolved
+}
+''', [CompileTimeErrorCode.SUPER_IN_INVALID_CONTEXT]);
   }
 
   test_superInInvalidContext_staticMethod() async {
-    Source source = addSource(r'''
+    await assertErrorsInCode(r'''
 class A {
   static m() {}
 }
 class B extends A {
   static n() { return super.m(); }
-}''');
-    await computeAnalysisResult(source);
-    assertErrors(source, [CompileTimeErrorCode.SUPER_IN_INVALID_CONTEXT]);
-    // no verify(), 'super.m' is not resolved
+}
+''', [CompileTimeErrorCode.SUPER_IN_INVALID_CONTEXT], verify: false);
   }
 
   test_superInInvalidContext_staticVariableInitializer() async {
-    Source source = addSource(r'''
+    await assertErrorsInCode(r'''
 class A {
   static int a = 0;
 }
 class B extends A {
   static int b = super.a;
-}''');
-    await computeAnalysisResult(source);
-    assertErrors(source, [CompileTimeErrorCode.SUPER_IN_INVALID_CONTEXT]);
-    // no verify(), 'super.a' is not resolved
+}
+''', [CompileTimeErrorCode.SUPER_IN_INVALID_CONTEXT]);
   }
 
   test_superInInvalidContext_topLevelFunction() async {
-    Source source = addSource(r'''
+    await assertErrorsInCode(r'''
 f() {
   super.f();
-}''');
-    await computeAnalysisResult(source);
-    assertErrors(source, [CompileTimeErrorCode.SUPER_IN_INVALID_CONTEXT]);
-    // no verify(), 'super.f' is not resolved
+}
+''', [CompileTimeErrorCode.SUPER_IN_INVALID_CONTEXT]);
   }
 
   test_superInInvalidContext_topLevelVariableInitializer() async {
-    Source source = addSource("var v = super.y;");
-    await computeAnalysisResult(source);
-    assertErrors(source, [CompileTimeErrorCode.SUPER_IN_INVALID_CONTEXT]);
-    // no verify(), 'super.y' is not resolved
+    await assertErrorsInCode('''
+var v = super.y;
+''', [CompileTimeErrorCode.SUPER_IN_INVALID_CONTEXT]);
   }
 
   test_superInitializerInObject() async {
-    Source source = addSource(r'''
-''');
-    await computeAnalysisResult(source);
-    assertErrors(source, [CompileTimeErrorCode.SUPER_INITIALIZER_IN_OBJECT]);
-    verify([source]);
+    await assertErrorsInCode(r'''
+class Object {
+  Object() : super();
+}
+''', [CompileTimeErrorCode.SUPER_INITIALIZER_IN_OBJECT]);
   }
 
   test_superInRedirectingConstructor_redirectionSuper() async {
-    Source source = addSource(r'''
+    await assertErrorsInCode(r'''
 class A {}
 class B {
   B() : this.name(), super();
   B.name() {}
-}''');
-    await computeAnalysisResult(source);
-    assertErrors(
-        source, [CompileTimeErrorCode.SUPER_IN_REDIRECTING_CONSTRUCTOR]);
-    verify([source]);
+}
+''', [CompileTimeErrorCode.SUPER_IN_REDIRECTING_CONSTRUCTOR]);
   }
 
   test_superInRedirectingConstructor_superRedirection() async {
-    Source source = addSource(r'''
+    await assertErrorsInCode(r'''
 class A {}
 class B {
   B() : super(), this.name();
   B.name() {}
-}''');
-    await computeAnalysisResult(source);
-    assertErrors(source, [
+}
+''', [
       CompileTimeErrorCode.SUPER_IN_REDIRECTING_CONSTRUCTOR,
       StrongModeCode.INVALID_SUPER_INVOCATION
     ]);
-    verify([source]);
   }
 
   test_symbol_constructor_badArgs() async {
-    Source source = addSource(r'''
+    await assertErrorsInCode(r'''
 var s1 = const Symbol('3');
 var s2 = const Symbol(3);
 var s3 = const Symbol();
 var s4 = const Symbol('x', 'y');
-var s5 = const Symbol('x', foo: 'x');''');
-    await computeAnalysisResult(source);
-    assertErrors(source, [
+var s5 = const Symbol('x', foo: 'x');
+''', [
       CompileTimeErrorCode.CONST_EVAL_THROWS_EXCEPTION,
       CompileTimeErrorCode.CONST_EVAL_THROWS_EXCEPTION,
       StaticWarningCode.ARGUMENT_TYPE_NOT_ASSIGNABLE,
@@ -5732,44 +4343,31 @@
       CompileTimeErrorCode.EXTRA_POSITIONAL_ARGUMENTS,
       CompileTimeErrorCode.UNDEFINED_NAMED_PARAMETER
     ]);
-    verify([source]);
   }
 
   test_test_fieldInitializerOutsideConstructor_topLevelFunction() async {
-    Source source = addSource(r'''
+    await assertErrorsInCode(r'''
 f(this.x(y)) {}
-''');
-    await computeAnalysisResult(source);
-    assertErrors(
-        source,
-        usingFastaParser
-            ? [CompileTimeErrorCode.FIELD_INITIALIZER_OUTSIDE_CONSTRUCTOR]
-            : [
-                ParserErrorCode.FIELD_INITIALIZER_OUTSIDE_CONSTRUCTOR,
-                CompileTimeErrorCode.FIELD_INITIALIZER_OUTSIDE_CONSTRUCTOR
-              ]);
-    verify([source]);
+''', [CompileTimeErrorCode.FIELD_INITIALIZER_OUTSIDE_CONSTRUCTOR]);
   }
 
   test_typeAliasCannotReferenceItself_11987() async {
-    Source source = addSource(r'''
+    await assertErrorsInCode(r'''
 typedef void F(List<G> l);
 typedef void G(List<F> l);
 main() {
   F foo(G g) => g;
-}''');
-    await computeAnalysisResult(source);
-    assertErrors(source, [
+}
+''', [
       CompileTimeErrorCode.TYPE_ALIAS_CANNOT_REFERENCE_ITSELF,
       CompileTimeErrorCode.TYPE_ALIAS_CANNOT_REFERENCE_ITSELF
     ]);
-    verify([source]);
   }
 
   test_typeAliasCannotReferenceItself_19459() async {
     // A complex example involving multiple classes.  This is legal, since
     // typedef F references itself only via a class.
-    Source source = addSource(r'''
+    await assertNoErrorsInCode(r'''
 class A<B, C> {}
 abstract class D {
   f(E e);
@@ -5777,289 +4375,232 @@
 abstract class E extends A<dynamic, F> {}
 typedef D F();
 ''');
-    await computeAnalysisResult(source);
-    assertNoErrors(source);
-    verify([source]);
   }
 
   test_typeAliasCannotReferenceItself_functionTypedParameter_returnType() async {
-    Source source = addSource("typedef A(A b());");
-    await computeAnalysisResult(source);
-    assertErrors(
-        source, [CompileTimeErrorCode.TYPE_ALIAS_CANNOT_REFERENCE_ITSELF]);
-    verify([source]);
+    await assertErrorsInCode('''
+typedef A(A b());
+''', [CompileTimeErrorCode.TYPE_ALIAS_CANNOT_REFERENCE_ITSELF]);
   }
 
   test_typeAliasCannotReferenceItself_generic() async {
-    Source source = addSource(r'''
+    await assertErrorsInCode(r'''
 typedef F = void Function(List<G> l);
 typedef G = void Function(List<F> l);
 main() {
   F foo(G g) => g;
 }
-''');
-    await computeAnalysisResult(source);
-    assertErrors(source, [
+''', [
       CompileTimeErrorCode.TYPE_ALIAS_CANNOT_REFERENCE_ITSELF,
       CompileTimeErrorCode.TYPE_ALIAS_CANNOT_REFERENCE_ITSELF
     ]);
-    verify([source]);
   }
 
   test_typeAliasCannotReferenceItself_parameterType_named() async {
-    Source source = addSource("typedef A({A a});");
-    await computeAnalysisResult(source);
-    assertErrors(
-        source, [CompileTimeErrorCode.TYPE_ALIAS_CANNOT_REFERENCE_ITSELF]);
-    verify([source]);
+    await assertErrorsInCode('''
+typedef A({A a});
+''', [CompileTimeErrorCode.TYPE_ALIAS_CANNOT_REFERENCE_ITSELF]);
   }
 
   test_typeAliasCannotReferenceItself_parameterType_positional() async {
-    Source source = addSource("typedef A([A a]);");
-    await computeAnalysisResult(source);
-    assertErrors(
-        source, [CompileTimeErrorCode.TYPE_ALIAS_CANNOT_REFERENCE_ITSELF]);
-    verify([source]);
+    await assertErrorsInCode('''
+typedef A([A a]);
+''', [CompileTimeErrorCode.TYPE_ALIAS_CANNOT_REFERENCE_ITSELF]);
   }
 
   test_typeAliasCannotReferenceItself_parameterType_required() async {
-    Source source = addSource("typedef A(A a);");
-    await computeAnalysisResult(source);
-    assertErrors(
-        source, [CompileTimeErrorCode.TYPE_ALIAS_CANNOT_REFERENCE_ITSELF]);
-    verify([source]);
+    await assertErrorsInCode('''
+typedef A(A a);
+''', [CompileTimeErrorCode.TYPE_ALIAS_CANNOT_REFERENCE_ITSELF]);
   }
 
   test_typeAliasCannotReferenceItself_parameterType_typeArgument() async {
-    Source source = addSource("typedef A(List<A> a);");
-    await computeAnalysisResult(source);
-    assertErrors(
-        source, [CompileTimeErrorCode.TYPE_ALIAS_CANNOT_REFERENCE_ITSELF]);
-    verify([source]);
+    await assertErrorsInCode('''
+typedef A(List<A> a);
+''', [CompileTimeErrorCode.TYPE_ALIAS_CANNOT_REFERENCE_ITSELF]);
   }
 
   test_typeAliasCannotReferenceItself_returnClass_withTypeAlias() async {
     // A typedef is allowed to indirectly reference itself via a class.
-    Source source = addSource(r'''
+    await assertNoErrorsInCode(r'''
 typedef C A();
 typedef A B();
 class C {
   B a;
-}''');
-    await computeAnalysisResult(source);
-    assertNoErrors(source);
-    verify([source]);
+}
+''');
   }
 
   test_typeAliasCannotReferenceItself_returnType() async {
-    Source source = addSource("typedef A A();");
-    await computeAnalysisResult(source);
-    assertErrors(
-        source, [CompileTimeErrorCode.TYPE_ALIAS_CANNOT_REFERENCE_ITSELF]);
-    verify([source]);
+    await assertErrorsInCode('''
+typedef A A();
+''', [CompileTimeErrorCode.TYPE_ALIAS_CANNOT_REFERENCE_ITSELF]);
   }
 
   test_typeAliasCannotReferenceItself_returnType_indirect() async {
-    Source source = addSource(r'''
+    await assertErrorsInCode(r'''
 typedef B A();
-typedef A B();''');
-    await computeAnalysisResult(source);
-    assertErrors(source, [
+typedef A B();
+''', [
       CompileTimeErrorCode.TYPE_ALIAS_CANNOT_REFERENCE_ITSELF,
       CompileTimeErrorCode.TYPE_ALIAS_CANNOT_REFERENCE_ITSELF
     ]);
-    verify([source]);
   }
 
   test_typeAliasCannotReferenceItself_typeVariableBounds() async {
-    Source source = addSource("typedef A<T extends A<int>>();");
-    await computeAnalysisResult(source);
-    assertErrors(source, [
+    await assertErrorsInCode('''
+typedef A<T extends A<int>>();
+''', [
       CompileTimeErrorCode.TYPE_ALIAS_CANNOT_REFERENCE_ITSELF,
       StaticTypeWarningCode.TYPE_ARGUMENT_NOT_MATCHING_BOUNDS
     ]);
-    verify([source]);
   }
 
   test_typeArgumentNotMatchingBounds_const() async {
-    Source source = addSource(r'''
+    await assertErrorsInCode(r'''
 class A {}
 class B {}
 class G<E extends A> {
   const G();
 }
-f() { return const G<B>(); }''');
-    await computeAnalysisResult(source);
-    assertErrors(
-        source, [CompileTimeErrorCode.TYPE_ARGUMENT_NOT_MATCHING_BOUNDS]);
-    verify([source]);
+f() { return const G<B>(); }
+''', [CompileTimeErrorCode.TYPE_ARGUMENT_NOT_MATCHING_BOUNDS]);
   }
 
   test_typedef_infiniteParameterBoundCycle() async {
-    Source source = addSource(r'''
+    await assertErrorsInCode(r'''
 typedef F<X extends F> = F Function();
-''');
-    await computeAnalysisResult(source);
-    assertErrors(source, [
+''', [
       CompileTimeErrorCode.TYPE_ALIAS_CANNOT_REFERENCE_ITSELF,
       StrongModeCode.NOT_INSTANTIATED_BOUND,
     ]);
-    verify([source]);
   }
 
   test_undefinedAnnotation_unresolved_identifier() async {
-    Source source = addSource(r'''
+    await assertErrorsInCode(r'''
 @unresolved
 main() {
-}''');
-    await computeAnalysisResult(source);
-    assertErrors(source, [CompileTimeErrorCode.UNDEFINED_ANNOTATION]);
+}
+''', [CompileTimeErrorCode.UNDEFINED_ANNOTATION]);
   }
 
   test_undefinedAnnotation_unresolved_invocation() async {
-    Source source = addSource(r'''
+    await assertErrorsInCode(r'''
 @Unresolved()
 main() {
-}''');
-    await computeAnalysisResult(source);
-    assertErrors(source, [CompileTimeErrorCode.UNDEFINED_ANNOTATION]);
+}
+''', [CompileTimeErrorCode.UNDEFINED_ANNOTATION]);
   }
 
   test_undefinedAnnotation_unresolved_prefixedIdentifier() async {
-    Source source = addSource(r'''
+    await assertErrorsInCode(r'''
 import 'dart:math' as p;
 @p.unresolved
 main() {
-}''');
-    await computeAnalysisResult(source);
-    assertErrors(source, [CompileTimeErrorCode.UNDEFINED_ANNOTATION]);
+}
+''', [CompileTimeErrorCode.UNDEFINED_ANNOTATION]);
   }
 
   test_undefinedAnnotation_useLibraryScope() async {
-    Source source = addSource(r'''
+    await assertErrorsInCode(r'''
 @foo
 class A {
   static const foo = null;
-}''');
-    await computeAnalysisResult(source);
-    assertErrors(source, [CompileTimeErrorCode.UNDEFINED_ANNOTATION]);
+}
+''', [CompileTimeErrorCode.UNDEFINED_ANNOTATION]);
   }
 
   test_undefinedClass_const() async {
-    Source source = addSource(r'''
+    await assertErrorsInCode(r'''
 f() {
   return const A();
-}''');
-    await computeAnalysisResult(source);
-    assertErrors(source, [StaticWarningCode.UNDEFINED_CLASS]);
-    verify([source]);
+}
+''', [StaticWarningCode.UNDEFINED_CLASS]);
   }
 
   test_undefinedConstructorInInitializer_explicit_named() async {
-    Source source = addSource(r'''
+    await assertErrorsInCode(r'''
 class A {}
 class B extends A {
   B() : super.named();
-}''');
-    await computeAnalysisResult(source);
-    assertErrors(
-        source, [CompileTimeErrorCode.UNDEFINED_CONSTRUCTOR_IN_INITIALIZER]);
-    // no verify(), "super.named()" is not resolved
+}
+''', [CompileTimeErrorCode.UNDEFINED_CONSTRUCTOR_IN_INITIALIZER],
+        verify: false);
   }
 
   test_undefinedConstructorInInitializer_explicit_unnamed() async {
-    Source source = addSource(r'''
+    await assertErrorsInCode(r'''
 class A {
   A.named() {}
 }
 class B extends A {
   B() : super();
-}''');
-    await computeAnalysisResult(source);
-    assertErrors(source,
-        [CompileTimeErrorCode.UNDEFINED_CONSTRUCTOR_IN_INITIALIZER_DEFAULT]);
-    verify([source]);
+}
+''', [CompileTimeErrorCode.UNDEFINED_CONSTRUCTOR_IN_INITIALIZER_DEFAULT]);
   }
 
   test_undefinedConstructorInInitializer_implicit() async {
-    Source source = addSource(r'''
+    await assertErrorsInCode(r'''
 class A {
   A.named() {}
 }
 class B extends A {
   B();
-}''');
-    await computeAnalysisResult(source);
-    assertErrors(source,
-        [CompileTimeErrorCode.UNDEFINED_CONSTRUCTOR_IN_INITIALIZER_DEFAULT]);
-    verify([source]);
+}
+''', [CompileTimeErrorCode.UNDEFINED_CONSTRUCTOR_IN_INITIALIZER_DEFAULT]);
   }
 
   test_undefinedNamedParameter() async {
-    Source source = addSource(r'''
+    await assertErrorsInCode(r'''
 class A {
   const A();
 }
 main() {
   const A(p: 0);
-}''');
-    await computeAnalysisResult(source);
-    assertErrors(source, [CompileTimeErrorCode.UNDEFINED_NAMED_PARAMETER]);
-    // no verify(), 'p' is not resolved
+}
+''', [CompileTimeErrorCode.UNDEFINED_NAMED_PARAMETER]);
   }
 
   test_uriDoesNotExist_export() async {
-    Source source = addSource("export 'unknown.dart';");
-    await computeAnalysisResult(source);
-    assertErrors(source, [CompileTimeErrorCode.URI_DOES_NOT_EXIST]);
+    await assertErrorsInCode('''
+export 'unknown.dart';
+''', [CompileTimeErrorCode.URI_DOES_NOT_EXIST]);
   }
 
   test_uriDoesNotExist_import() async {
-    Source source = addSource("import 'unknown.dart';");
-    await computeAnalysisResult(source);
-    assertErrors(source, [CompileTimeErrorCode.URI_DOES_NOT_EXIST]);
+    await assertErrorsInCode('''
+import 'unknown.dart';
+''', [CompileTimeErrorCode.URI_DOES_NOT_EXIST]);
   }
 
   test_uriDoesNotExist_import_appears_after_deleting_target() async {
-    Source test = addSource("import 'target.dart';");
-    Source target = addNamedSource("/target.dart", "");
+    Source target = addNamedSource("/target.dart", '''
+''');
+    Source test = addSource('''
+import 'target.dart';
+''');
     await computeAnalysisResult(test);
     assertErrors(test, [HintCode.UNUSED_IMPORT]);
 
     // Remove the overlay in the same way as AnalysisServer.
     deleteFile(target.fullName);
-    if (enableNewAnalysisDriver) {
-      driver.removeFile(target.fullName);
-    } else {
-      analysisContext2.setContents(target, null);
-      ChangeSet changeSet = new ChangeSet()..removedSource(target);
-      analysisContext2.applyChanges(changeSet);
-    }
+    driver.removeFile(target.fullName);
 
     await computeAnalysisResult(test);
     assertErrors(test, [CompileTimeErrorCode.URI_DOES_NOT_EXIST]);
   }
 
   test_uriDoesNotExist_import_disappears_when_fixed() async {
-    Source source = addSource("import 'target.dart';");
+    Source source = addSource('''
+import 'target.dart';
+''');
     await computeAnalysisResult(source);
     assertErrors(source, [CompileTimeErrorCode.URI_DOES_NOT_EXIST]);
 
     String targetPath = convertPath('/target.dart');
-    if (enableNewAnalysisDriver) {
-      // Add an overlay in the same way as AnalysisServer.
-      fileContentOverlay[targetPath] = '';
-      driver.changeFile(targetPath);
-    } else {
-      // Check that the file is represented as missing.
-      Source target = analysisContext2.getSourcesWithFullName(targetPath).first;
-      expect(analysisContext2.getModificationStamp(target), -1);
-
-      // Add an overlay in the same way as AnalysisServer.
-      analysisContext2
-        ..setContents(target, "")
-        ..handleContentsChanged(target, null, "", true);
-    }
+    // Add an overlay in the same way as AnalysisServer.
+    fileContentOverlay[targetPath] = '';
+    driver.changeFile(targetPath);
 
     // Make sure the error goes away.
     await computeAnalysisResult(source);
@@ -6067,311 +4608,232 @@
   }
 
   test_uriDoesNotExist_part() async {
-    Source source = addSource(r'''
+    await assertErrorsInCode(r'''
 library lib;
-part 'unknown.dart';''');
-    await computeAnalysisResult(source);
-    assertErrors(source, [CompileTimeErrorCode.URI_DOES_NOT_EXIST]);
+part 'unknown.dart';
+''', [CompileTimeErrorCode.URI_DOES_NOT_EXIST]);
   }
 
   test_uriWithInterpolation_constant() async {
-    Source source = addSource("import 'stuff_\$platform.dart';");
-    await computeAnalysisResult(source);
-    assertErrors(source, [
+    await assertErrorsInCode('''
+import 'stuff_\$platform.dart';
+''', [
       CompileTimeErrorCode.URI_WITH_INTERPOLATION,
       StaticWarningCode.UNDEFINED_IDENTIFIER
     ]);
-    // We cannot verify resolution with an unresolvable
-    // URI: 'stuff_$platform.dart'
   }
 
   test_uriWithInterpolation_nonConstant() async {
-    Source source = addSource(r'''
+    await assertErrorsInCode(r'''
 library lib;
-part '${'a'}.dart';''');
-    await computeAnalysisResult(source);
-    assertErrors(source, [CompileTimeErrorCode.URI_WITH_INTERPOLATION]);
-    // We cannot verify resolution with an unresolvable URI: '${'a'}.dart'
+part '${'a'}.dart';
+''', [CompileTimeErrorCode.URI_WITH_INTERPOLATION]);
   }
 
   test_wrongNumberOfParametersForOperator1() async {
-    await _check_wrongNumberOfParametersForOperator1("<");
-    await _check_wrongNumberOfParametersForOperator1(">");
-    await _check_wrongNumberOfParametersForOperator1("<=");
-    await _check_wrongNumberOfParametersForOperator1(">=");
-    await _check_wrongNumberOfParametersForOperator1("+");
-    await _check_wrongNumberOfParametersForOperator1("/");
-    await _check_wrongNumberOfParametersForOperator1("~/");
-    await _check_wrongNumberOfParametersForOperator1("*");
-    await _check_wrongNumberOfParametersForOperator1("%");
-    await _check_wrongNumberOfParametersForOperator1("|");
-    await _check_wrongNumberOfParametersForOperator1("^");
-    await _check_wrongNumberOfParametersForOperator1("&");
-    await _check_wrongNumberOfParametersForOperator1("<<");
-    await _check_wrongNumberOfParametersForOperator1(">>");
-    await _check_wrongNumberOfParametersForOperator1("[]");
+    await _check_wrongNumberOfParametersForOperator1('<');
+    await _check_wrongNumberOfParametersForOperator1('>');
+    await _check_wrongNumberOfParametersForOperator1('<=');
+    await _check_wrongNumberOfParametersForOperator1('>=');
+    await _check_wrongNumberOfParametersForOperator1('+');
+    await _check_wrongNumberOfParametersForOperator1('/');
+    await _check_wrongNumberOfParametersForOperator1('~/');
+    await _check_wrongNumberOfParametersForOperator1('*');
+    await _check_wrongNumberOfParametersForOperator1('%');
+    await _check_wrongNumberOfParametersForOperator1('|');
+    await _check_wrongNumberOfParametersForOperator1('^');
+    await _check_wrongNumberOfParametersForOperator1('&');
+    await _check_wrongNumberOfParametersForOperator1('<<');
+    await _check_wrongNumberOfParametersForOperator1('>>');
+    await _check_wrongNumberOfParametersForOperator1('[]');
   }
 
   test_wrongNumberOfParametersForOperator_minus() async {
-    Source source = addSource(r'''
+    await assertErrorsInCode(r'''
 class A {
   operator -(a, b) {}
-}''');
-    await computeAnalysisResult(source);
-    assertErrors(source,
-        [CompileTimeErrorCode.WRONG_NUMBER_OF_PARAMETERS_FOR_OPERATOR_MINUS]);
-    verify([source]);
+}
+''', [CompileTimeErrorCode.WRONG_NUMBER_OF_PARAMETERS_FOR_OPERATOR_MINUS]);
   }
 
   test_wrongNumberOfParametersForOperator_tilde() async {
-    await _check_wrongNumberOfParametersForOperator("~", "a");
-    await _check_wrongNumberOfParametersForOperator("~", "a, b");
+    await _check_wrongNumberOfParametersForOperator('~', 'a');
+    await _check_wrongNumberOfParametersForOperator('~', 'a, b');
   }
 
   test_wrongNumberOfParametersForSetter_function_named() async {
-    Source source = addSource("set x({p}) {}");
-    await computeAnalysisResult(source);
-    assertErrors(
-        source, [CompileTimeErrorCode.WRONG_NUMBER_OF_PARAMETERS_FOR_SETTER]);
-    verify([source]);
+    await assertErrorsInCode('''
+set x({p}) {}
+''', [CompileTimeErrorCode.WRONG_NUMBER_OF_PARAMETERS_FOR_SETTER]);
   }
 
   test_wrongNumberOfParametersForSetter_function_optional() async {
-    Source source = addSource("set x([p]) {}");
-    await computeAnalysisResult(source);
-    assertErrors(
-        source, [CompileTimeErrorCode.WRONG_NUMBER_OF_PARAMETERS_FOR_SETTER]);
-    verify([source]);
+    await assertErrorsInCode('''
+set x([p]) {}
+''', [CompileTimeErrorCode.WRONG_NUMBER_OF_PARAMETERS_FOR_SETTER]);
   }
 
   test_wrongNumberOfParametersForSetter_function_tooFew() async {
-    Source source = addSource("set x() {}");
-    await computeAnalysisResult(source);
-    assertErrors(
-        source, [CompileTimeErrorCode.WRONG_NUMBER_OF_PARAMETERS_FOR_SETTER]);
-    verify([source]);
+    await assertErrorsInCode('''
+set x() {}
+''', [CompileTimeErrorCode.WRONG_NUMBER_OF_PARAMETERS_FOR_SETTER]);
   }
 
   test_wrongNumberOfParametersForSetter_function_tooMany() async {
-    Source source = addSource("set x(a, b) {}");
-    await computeAnalysisResult(source);
-    assertErrors(
-        source, [CompileTimeErrorCode.WRONG_NUMBER_OF_PARAMETERS_FOR_SETTER]);
-    verify([source]);
+    await assertErrorsInCode('''
+set x(a, b) {}
+''', [CompileTimeErrorCode.WRONG_NUMBER_OF_PARAMETERS_FOR_SETTER]);
   }
 
   test_wrongNumberOfParametersForSetter_method_named() async {
-    Source source = addSource(r'''
+    await assertErrorsInCode(r'''
 class A {
   set x({p}) {}
-}''');
-    await computeAnalysisResult(source);
-    assertErrors(
-        source, [CompileTimeErrorCode.WRONG_NUMBER_OF_PARAMETERS_FOR_SETTER]);
-    verify([source]);
+}
+''', [CompileTimeErrorCode.WRONG_NUMBER_OF_PARAMETERS_FOR_SETTER]);
   }
 
   test_wrongNumberOfParametersForSetter_method_optional() async {
-    Source source = addSource(r'''
+    await assertErrorsInCode(r'''
 class A {
   set x([p]) {}
-}''');
-    await computeAnalysisResult(source);
-    assertErrors(
-        source, [CompileTimeErrorCode.WRONG_NUMBER_OF_PARAMETERS_FOR_SETTER]);
-    verify([source]);
+}
+''', [CompileTimeErrorCode.WRONG_NUMBER_OF_PARAMETERS_FOR_SETTER]);
   }
 
   test_wrongNumberOfParametersForSetter_method_tooFew() async {
-    Source source = addSource(r'''
+    await assertErrorsInCode(r'''
 class A {
   set x() {}
-}''');
-    await computeAnalysisResult(source);
-    assertErrors(
-        source, [CompileTimeErrorCode.WRONG_NUMBER_OF_PARAMETERS_FOR_SETTER]);
-    verify([source]);
+}
+''', [CompileTimeErrorCode.WRONG_NUMBER_OF_PARAMETERS_FOR_SETTER]);
   }
 
   test_wrongNumberOfParametersForSetter_method_tooMany() async {
-    Source source = addSource(r'''
+    await assertErrorsInCode(r'''
 class A {
   set x(a, b) {}
-}''');
-    await computeAnalysisResult(source);
-    assertErrors(
-        source, [CompileTimeErrorCode.WRONG_NUMBER_OF_PARAMETERS_FOR_SETTER]);
-    verify([source]);
+}
+''', [CompileTimeErrorCode.WRONG_NUMBER_OF_PARAMETERS_FOR_SETTER]);
   }
 
   test_yield_used_as_identifier_in_async_method() async {
-    Source source = addSource('''
+    await assertErrorsInCode('''
 f() async {
   var yield = 1;
 }
-''');
-    await computeAnalysisResult(source);
-    assertErrors(source, [ParserErrorCode.ASYNC_KEYWORD_USED_AS_IDENTIFIER]);
-    verify([source]);
+''', [ParserErrorCode.ASYNC_KEYWORD_USED_AS_IDENTIFIER]);
   }
 
   test_yield_used_as_identifier_in_async_star_method() async {
-    Source source = addSource('''
+    await assertErrorsInCode('''
 f() async* {
   var yield = 1;
 }
-''');
-    await computeAnalysisResult(source);
-    assertErrors(source, [ParserErrorCode.ASYNC_KEYWORD_USED_AS_IDENTIFIER]);
-    verify([source]);
+''', [ParserErrorCode.ASYNC_KEYWORD_USED_AS_IDENTIFIER]);
   }
 
   test_yield_used_as_identifier_in_sync_star_method() async {
-    Source source = addSource('''
+    await assertErrorsInCode('''
 f() sync* {
   var yield = 1;
 }
-''');
-    await computeAnalysisResult(source);
-    assertErrors(source, [ParserErrorCode.ASYNC_KEYWORD_USED_AS_IDENTIFIER]);
-    verify([source]);
+''', [ParserErrorCode.ASYNC_KEYWORD_USED_AS_IDENTIFIER]);
   }
 
   test_yieldEachInNonGenerator_async() async {
     // TODO(brianwilkerson) We are currently parsing the yield statement as a
     // binary expression.
-    Source source = addSource(r'''
+    await assertErrorsInCode(r'''
 f() async {
   yield* 0;
-}''');
-    await computeAnalysisResult(source);
-    assertErrors(source, [CompileTimeErrorCode.YIELD_EACH_IN_NON_GENERATOR]);
-    verify([source]);
+}
+''', [CompileTimeErrorCode.YIELD_EACH_IN_NON_GENERATOR]);
   }
 
   test_yieldEachInNonGenerator_sync() async {
     // TODO(brianwilkerson) We are currently parsing the yield statement as a
     // binary expression.
-    Source source = addSource(r'''
+    await assertErrorsInCode(r'''
 f() {
   yield* 0;
-}''');
-    await computeAnalysisResult(source);
-    assertErrors(source, [CompileTimeErrorCode.YIELD_IN_NON_GENERATOR]);
-    verify([source]);
+}
+''', [CompileTimeErrorCode.YIELD_IN_NON_GENERATOR]);
   }
 
   test_yieldInNonGenerator_async() async {
     // TODO(brianwilkerson) We are currently trying to parse the yield statement
     // as a binary expression.
-    Source source = addSource(r'''
+    await assertErrorsInCode(r'''
 f() async {
   yield 0;
-}''');
-    await computeAnalysisResult(source);
-    assertErrors(source, [CompileTimeErrorCode.YIELD_IN_NON_GENERATOR]);
-    verify([source]);
+}
+''', [CompileTimeErrorCode.YIELD_IN_NON_GENERATOR]);
   }
 
   test_yieldInNonGenerator_sync() async {
     // TODO(brianwilkerson) We are currently trying to parse the yield statement
     // as a binary expression.
-    Source source = addSource(r'''
+    await assertErrorsInCode(r'''
 f() {
   yield 0;
-}''');
-    await computeAnalysisResult(source);
-    assertErrors(source, [CompileTimeErrorCode.YIELD_EACH_IN_NON_GENERATOR]);
-    verify([source]);
+}
+''', [CompileTimeErrorCode.YIELD_EACH_IN_NON_GENERATOR]);
   }
 
   Future<void> _check_constEvalThrowsException_binary_null(
       String expr, bool resolved) async {
-    Source source = addSource("const C = $expr;");
-    await computeAnalysisResult(source);
-    assertErrors(source, [CompileTimeErrorCode.CONST_EVAL_THROWS_EXCEPTION]);
-    if (resolved) {
-      verify([source]);
-    }
+    await assertErrorsInCode('''
+const C = $expr;
+''', [CompileTimeErrorCode.CONST_EVAL_THROWS_EXCEPTION], verify: false);
   }
 
-  Future<void> _check_constEvalTypeBool_withParameter_binary(
-      String expr) async {
-    Source source = addSource('''
-class A {
-  final a;
-  const A(bool p) : a = $expr;
-}''');
-    await computeAnalysisResult(source);
-    assertErrors(source, [
-      CompileTimeErrorCode.CONST_EVAL_TYPE_BOOL,
-      StaticTypeWarningCode.NON_BOOL_OPERAND
-    ]);
-    verify([source]);
-  }
-
-  Future<void> _check_constEvalTypeBoolOrInt_withParameter_binary(
-      String expr) async {
-    Source source = addSource('''
-class A {
-  final a;
-  const A(int p) : a = $expr;
-}''');
-    await computeAnalysisResult(source);
-    assertErrors(source, [
+  Future<void> _check_constEvalTypeBoolOrInt_binary(String expr) async {
+    await assertErrorsInCode('''
+const int a = 0;
+const _ = $expr;
+''', [
       CompileTimeErrorCode.CONST_EVAL_TYPE_BOOL_INT,
       StaticWarningCode.ARGUMENT_TYPE_NOT_ASSIGNABLE
     ]);
-    verify([source]);
   }
 
-  Future<void> _check_constEvalTypeInt_withParameter_binary(String expr) async {
-    Source source = addSource('''
-class A {
-  final a;
-  const A(int p) : a = $expr;
-}''');
-    await computeAnalysisResult(source);
-    assertErrors(source, [
+  Future<void> _check_constEvalTypeInt_binary(String expr) async {
+    await assertErrorsInCode('''
+const int a = 0;
+const _ = $expr;
+''', [
       CompileTimeErrorCode.CONST_EVAL_TYPE_INT,
       StaticWarningCode.ARGUMENT_TYPE_NOT_ASSIGNABLE
     ]);
-    verify([source]);
   }
 
-  Future<void> _check_constEvalTypeNum_withParameter_binary(String expr) async {
-    Source source = addSource('''
-class A {
-  final a;
-  const A(num p) : a = $expr;
-}''');
-    await computeAnalysisResult(source);
-    assertErrors(source, [
+  Future<void> _check_constEvalTypeNum_binary(String expr) async {
+    await assertErrorsInCode('''
+const num a = 0;
+const _ = $expr;
+''', [
       CompileTimeErrorCode.CONST_EVAL_TYPE_NUM,
       StaticWarningCode.ARGUMENT_TYPE_NOT_ASSIGNABLE
     ]);
-    verify([source]);
   }
 
   Future<void> _check_wrongNumberOfParametersForOperator(
       String name, String parameters) async {
-    Source source = addSource('''
+    await assertErrorsInCode('''
 class A {
   operator $name($parameters) {}
-}''');
-    await computeAnalysisResult(source);
-    assertErrors(
-        source, [CompileTimeErrorCode.WRONG_NUMBER_OF_PARAMETERS_FOR_OPERATOR]);
-    verify([source]);
+}
+''', [CompileTimeErrorCode.WRONG_NUMBER_OF_PARAMETERS_FOR_OPERATOR]);
   }
 
   Future<void> _check_wrongNumberOfParametersForOperator1(String name) async {
-    await _check_wrongNumberOfParametersForOperator(name, "");
-    await _check_wrongNumberOfParametersForOperator(name, "a, b");
+    await _check_wrongNumberOfParametersForOperator(name, '');
+    await _check_wrongNumberOfParametersForOperator(name, 'a, b');
   }
 
   Future<void> _privateCollisionInMixinApplicationTest(String testCode) async {
-    addNamedSource('/lib1.dart', '''
+    newFile('/lib1.dart', content: '''
 class A {
   int _x;
 }
@@ -6380,10 +4842,7 @@
   int _x;
 }
 ''');
-    Source source = addSource(testCode);
-    await computeAnalysisResult(source);
-    assertErrors(
-        source, [CompileTimeErrorCode.PRIVATE_COLLISION_IN_MIXIN_APPLICATION]);
-    verify([source]);
+    await assertErrorsInCode(testCode,
+        [CompileTimeErrorCode.PRIVATE_COLLISION_IN_MIXIN_APPLICATION]);
   }
 }
diff --git a/pkg/analyzer/test/generated/compile_time_error_code_test.dart b/pkg/analyzer/test/generated/compile_time_error_code_test.dart
index 2389261..2ab9c7b 100644
--- a/pkg/analyzer/test/generated/compile_time_error_code_test.dart
+++ b/pkg/analyzer/test/generated/compile_time_error_code_test.dart
@@ -5,30 +5,24 @@
 import 'package:analyzer/src/dart/analysis/experiments.dart';
 import 'package:analyzer/src/dart/error/syntactic_errors.dart';
 import 'package:analyzer/src/error/codes.dart';
-import 'package:analyzer/src/generated/source.dart';
+import 'package:analyzer/src/generated/engine.dart';
 import 'package:test_reflective_loader/test_reflective_loader.dart';
 
+import '../src/dart/resolution/driver_resolution.dart';
 import 'compile_time_error_code.dart';
-import 'resolver_test_case.dart';
 
 main() {
   defineReflectiveSuite(() {
     defineReflectiveTests(CompileTimeErrorCodeTest);
     defineReflectiveTests(CompileTimeErrorCodeTest_WithUIAsCode);
-    defineReflectiveTests(ConstSetElementTypeImplementsEqualsTest);
     defineReflectiveTests(ControlFlowCollectionsTest);
     defineReflectiveTests(InvalidTypeArgumentInConstSetTest);
-    defineReflectiveTests(NonConstSetElementFromDeferredLibraryTest);
-    defineReflectiveTests(NonConstSetElementTest);
   });
 }
 
 @reflectiveTest
 class CompileTimeErrorCodeTest extends CompileTimeErrorCodeTestBase {
   @override
-  bool get enableNewAnalysisDriver => true;
-
-  @override
   @failingTest
   test_awaitInWrongContext_sync() {
     return super.test_awaitInWrongContext_sync();
@@ -42,24 +36,6 @@
 
   @override
   @failingTest
-  test_invalidIdentifierInAsync_async() {
-    return super.test_invalidIdentifierInAsync_async();
-  }
-
-  @override
-  @failingTest
-  test_invalidIdentifierInAsync_await() {
-    return super.test_invalidIdentifierInAsync_await();
-  }
-
-  @override
-  @failingTest
-  test_invalidIdentifierInAsync_yield() {
-    return super.test_invalidIdentifierInAsync_yield();
-  }
-
-  @override
-  @failingTest
   test_mixinOfNonClass() {
     return super.test_mixinOfNonClass();
   }
@@ -102,149 +78,40 @@
 }
 
 @reflectiveTest
-class CompileTimeErrorCodeTest_WithUIAsCode extends ResolverTestCase {
+class CompileTimeErrorCodeTest_WithUIAsCode extends DriverResolutionTest {
   @override
-  List<String> get enabledExperiments =>
-      [EnableString.control_flow_collections, EnableString.spread_collections];
-
-  @override
-  bool get enableNewAnalysisDriver => true;
+  AnalysisOptionsImpl get analysisOptions => AnalysisOptionsImpl()
+    ..enabledExperiments = [
+      EnableString.control_flow_collections,
+      EnableString.spread_collections
+    ];
 
   test_defaultValueInFunctionTypeAlias_new_named() async {
     // This test used to fail with UI as code enabled. Test the fix here.
-    Source source = addSource('''
+    await assertErrorsInCode('''
 typedef F = int Function({Map<String, String> m: const {}});
-''');
-    await computeAnalysisResult(source);
-    assertErrors(source, [
+''', [
       ParserErrorCode.DEFAULT_VALUE_IN_FUNCTION_TYPE,
     ]);
-    verify([source]);
   }
 
   test_defaultValueInFunctionTypeAlias_new_named_ambiguous() async {
     // Test that the strong checker does not crash when given an ambiguous
     // set or map literal.
-    Source source = addSource('''
+    await assertErrorsInCode('''
 typedef F = int Function({Object m: const {1, 2: 3}});
-''');
-    await computeAnalysisResult(source);
-    assertErrors(source, [
+''', [
       ParserErrorCode.DEFAULT_VALUE_IN_FUNCTION_TYPE,
       CompileTimeErrorCode.AMBIGUOUS_SET_OR_MAP_LITERAL_BOTH,
     ]);
-    verify([source]);
   }
 }
 
 @reflectiveTest
-class ConstSetElementTypeImplementsEqualsTest extends ResolverTestCase {
+class ControlFlowCollectionsTest extends DriverResolutionTest {
   @override
-  bool get enableNewAnalysisDriver => true;
-
-  test_constField() async {
-    Source source = addSource(r'''
-class A {
-  static const a = const A();
-  const A();
-  operator ==(other) => false;
-}
-main() {
-  const {A.a};
-}
-''');
-    await computeAnalysisResult(source);
-    assertErrors(source,
-        [CompileTimeErrorCode.CONST_SET_ELEMENT_TYPE_IMPLEMENTS_EQUALS]);
-    verify([source]);
-  }
-
-  test_direct() async {
-    Source source = addSource(r'''
-class A {
-  const A();
-  operator ==(other) => false;
-}
-main() {
-  const {const A()};
-}
-''');
-    await computeAnalysisResult(source);
-    assertErrors(source,
-        [CompileTimeErrorCode.CONST_SET_ELEMENT_TYPE_IMPLEMENTS_EQUALS]);
-    verify([source]);
-  }
-
-  test_dynamic() async {
-    // Note: static type of B.a is "dynamic", but actual type of the const
-    // object is A.  We need to make sure we examine the actual type when
-    // deciding whether there is a problem with operator==.
-    Source source = addSource(r'''
-class A {
-  const A();
-  operator ==(other) => false;
-}
-class B {
-  static const a = const A();
-}
-main() {
-  const {B.a};
-}
-''');
-    await computeAnalysisResult(source);
-    assertErrors(source,
-        [CompileTimeErrorCode.CONST_SET_ELEMENT_TYPE_IMPLEMENTS_EQUALS]);
-    verify([source]);
-  }
-
-  test_factory() async {
-    Source source = addSource(r'''
-class A { const factory A() = B; }
-
-class B implements A {
-  const B();
-
-  operator ==(o) => true;
-}
-
-main() {
-  var m = const {const A()};
-}
-''');
-    await computeAnalysisResult(source);
-    assertErrors(source,
-        [CompileTimeErrorCode.CONST_SET_ELEMENT_TYPE_IMPLEMENTS_EQUALS]);
-    verify([source]);
-  }
-
-  test_super() async {
-    Source source = addSource(r'''
-class A {
-  const A();
-  operator ==(other) => false;
-}
-class B extends A {
-  const B();
-}
-main() {
-  const {const B()};
-}
-''');
-    await computeAnalysisResult(source);
-    assertErrors(source,
-        [CompileTimeErrorCode.CONST_SET_ELEMENT_TYPE_IMPLEMENTS_EQUALS]);
-    verify([source]);
-  }
-}
-
-@reflectiveTest
-class ControlFlowCollectionsTest extends ResolverTestCase {
-  @override
-  List<String> get enabledExperiments =>
-      [EnableString.control_flow_collections];
-
-  @override
-  bool get enableNewAnalysisDriver => true;
+  AnalysisOptionsImpl get analysisOptions => AnalysisOptionsImpl()
+    ..enabledExperiments = [EnableString.control_flow_collections];
 
   test_awaitForIn_declaredVariableWrongType() async {
     await assertErrorsInCode('''
@@ -276,14 +143,11 @@
   }
 
   test_duplicateDefinition_for_initializers() async {
-    Source source = addSource(r'''
+    await assertErrorsInCode(r'''
 f() {
   for (int i = 0, i = 0; i < 5;) {}
 }
-''');
-    await computeAnalysisResult(source);
-    assertErrors(source, [CompileTimeErrorCode.DUPLICATE_DEFINITION]);
-    verify([source]);
+''', [CompileTimeErrorCode.DUPLICATE_DEFINITION]);
   }
 
   test_expectedOneListTypeArgument() async {
@@ -352,115 +216,91 @@
   }
 
   test_forInWithConstVariable_forEach_identifier() async {
-    Source source = addSource(r'''
+    await assertErrorsInCode(r'''
 f() {
   const x = 0;
   for (x in [0, 1, 2]) {}
 }
-''');
-    await computeAnalysisResult(source);
-    assertErrors(source, [CompileTimeErrorCode.FOR_IN_WITH_CONST_VARIABLE]);
-    verify([source]);
+''', [CompileTimeErrorCode.FOR_IN_WITH_CONST_VARIABLE]);
   }
 
   test_forInWithConstVariable_forEach_loopVariable() async {
-    Source source = addSource(r'''
+    await assertErrorsInCode(r'''
 f() {
   for (const x in [0, 1, 2]) {}
 }
-''');
-    await computeAnalysisResult(source);
-    assertErrors(source, [CompileTimeErrorCode.FOR_IN_WITH_CONST_VARIABLE]);
-    verify([source]);
+''', [CompileTimeErrorCode.FOR_IN_WITH_CONST_VARIABLE]);
   }
 
   test_generalizedVoid_useOfInForeachIterableError() async {
-    Source source = addSource(r'''
+    await assertErrorsInCode(r'''
 void main() {
   void x;
   for (var v in x) {}
 }
-''');
-    await computeAnalysisResult(source);
-    assertErrors(source, [StaticWarningCode.USE_OF_VOID_RESULT]);
+''', [StaticWarningCode.USE_OF_VOID_RESULT]);
   }
 
   test_generalizedVoid_useOfVoidInForeachVariableError() async {
-    Source source = addSource(r'''
+    await assertErrorsInCode(r'''
 void main() {
   void x;
   var y;
   for (y in x) {}
 }
-''');
-    await computeAnalysisResult(source);
-    assertErrors(source, [StaticWarningCode.USE_OF_VOID_RESULT]);
+''', [StaticWarningCode.USE_OF_VOID_RESULT]);
   }
 
   test_invalidTypeArgumentInConstList() async {
-    Source source = addSource(r'''
+    await assertErrorsInCode(r'''
 class A<E> {
   m() {
     return const <E>[];
   }
-}''');
-    await computeAnalysisResult(source);
-    assertErrors(
-        source, [CompileTimeErrorCode.INVALID_TYPE_ARGUMENT_IN_CONST_LIST]);
-    verify([source]);
+}
+''', [CompileTimeErrorCode.INVALID_TYPE_ARGUMENT_IN_CONST_LIST]);
   }
 
   test_invalidTypeArgumentInConstMap_key() async {
-    Source source = addSource(r'''
+    await assertErrorsInCode(r'''
 class A<E> {
   m() {
     return const <E, String>{};
   }
-}''');
-    await computeAnalysisResult(source);
-    assertErrors(
-        source, [CompileTimeErrorCode.INVALID_TYPE_ARGUMENT_IN_CONST_MAP]);
-    verify([source]);
+}
+''', [CompileTimeErrorCode.INVALID_TYPE_ARGUMENT_IN_CONST_MAP]);
   }
 
   test_invalidTypeArgumentInConstMap_value() async {
-    Source source = addSource(r'''
+    await assertErrorsInCode(r'''
 class A<E> {
   m() {
     return const <String, E>{};
   }
-}''');
-    await computeAnalysisResult(source);
-    assertErrors(
-        source, [CompileTimeErrorCode.INVALID_TYPE_ARGUMENT_IN_CONST_MAP]);
-    verify([source]);
+}
+''', [CompileTimeErrorCode.INVALID_TYPE_ARGUMENT_IN_CONST_MAP]);
   }
 
   test_invalidTypeArgumentInConstSet_class() async {
-    Source source = addSource(r'''
+    await assertErrorsInCode(r'''
 class A<E> {
   m() {
     return const <E>{};
   }
-}''');
-    await computeAnalysisResult(source);
-    assertErrors(
-        source, [CompileTimeErrorCode.INVALID_TYPE_ARGUMENT_IN_CONST_SET]);
-    verify([source]);
+}
+''', [CompileTimeErrorCode.INVALID_TYPE_ARGUMENT_IN_CONST_SET]);
   }
 
   test_listElementTypeNotAssignable_const() async {
-    Source source = addSource("var v = const <String>[42];");
-    await computeAnalysisResult(source);
-    assertErrors(source, [StaticWarningCode.LIST_ELEMENT_TYPE_NOT_ASSIGNABLE]);
-    verify([source]);
+    await assertErrorsInCode('''
+var v = const <String>[42];
+''', [StaticWarningCode.LIST_ELEMENT_TYPE_NOT_ASSIGNABLE]);
   }
 
   test_mapValueTypeNotAssignable_const() async {
-    Source source = addSource("var v = const <String, String>{'a' : 2};");
-    await computeAnalysisResult(source);
-    assertErrors(source, [StaticWarningCode.MAP_VALUE_TYPE_NOT_ASSIGNABLE]);
-    verify([source]);
+    await assertErrorsInCode('''
+var v = const <String, String>{'a' : 2};
+''', [StaticWarningCode.MAP_VALUE_TYPE_NOT_ASSIGNABLE]);
   }
 
   test_nonBoolCondition_for_declaration() async {
@@ -482,13 +322,14 @@
   }
 
   test_nonConstMapAsExpressionStatement_begin() async {
-    Source source = addSource(r'''
+    // TODO(danrubel) Fasta is not recovering well.
+    // Ideally we would produce a single diagnostic:
+    // CompileTimeErrorCode.NON_CONST_MAP_AS_EXPRESSION_STATEMENT
+    await assertErrorsInCode(r'''
 f() {
   {'a' : 0, 'b' : 1}.length;
-}''');
-    await computeAnalysisResult(source);
-    // TODO(danrubel) Fasta is not recovering.
-    assertErrors(source, [
+}
+''', [
       ParserErrorCode.UNEXPECTED_TOKEN,
       ParserErrorCode.UNEXPECTED_TOKEN,
       ParserErrorCode.UNEXPECTED_TOKEN,
@@ -504,19 +345,17 @@
       ParserErrorCode.MISSING_IDENTIFIER,
       ParserErrorCode.MISSING_IDENTIFIER
     ]);
-//    assertErrors(
-//        source, [CompileTimeErrorCode.NON_CONST_MAP_AS_EXPRESSION_STATEMENT]);
-    verify([source]);
   }
 
   test_nonConstMapAsExpressionStatement_only() async {
-    Source source = addSource(r'''
+    // TODO(danrubel) Fasta is not recovering well.
+    // Ideally we would produce a single diagnostic:
+    // CompileTimeErrorCode.NON_CONST_MAP_AS_EXPRESSION_STATEMENT
+    await assertErrorsInCode(r'''
 f() {
   {'a' : 0, 'b' : 1};
-}''');
-    await computeAnalysisResult(source);
-    // TODO(danrubel) Fasta is not recovering.
-    assertErrors(source, [
+}
+''', [
       ParserErrorCode.UNEXPECTED_TOKEN,
       ParserErrorCode.UNEXPECTED_TOKEN,
       ParserErrorCode.UNEXPECTED_TOKEN,
@@ -531,88 +370,24 @@
       ParserErrorCode.MISSING_IDENTIFIER,
       ParserErrorCode.MISSING_IDENTIFIER
     ]);
-//    assertErrors(
-//        source, [CompileTimeErrorCode.NON_CONST_MAP_AS_EXPRESSION_STATEMENT]);
-    verify([source]);
   }
 
   test_setElementTypeNotAssignable_const() async {
-    Source source = addSource("var v = const <String>{42};");
-    await computeAnalysisResult(source);
-    assertErrors(source, [StaticWarningCode.SET_ELEMENT_TYPE_NOT_ASSIGNABLE]);
-    verify([source]);
+    await assertErrorsInCode('''
+var v = const <String>{42};
+''', [StaticWarningCode.SET_ELEMENT_TYPE_NOT_ASSIGNABLE]);
   }
 }
 
 @reflectiveTest
-class InvalidTypeArgumentInConstSetTest extends ResolverTestCase {
-  @override
-  bool get enableNewAnalysisDriver => true;
-
+class InvalidTypeArgumentInConstSetTest extends DriverResolutionTest {
   test_class() async {
-    Source source = addSource(r'''
+    await assertErrorsInCode(r'''
 class A<E> {
   m() {
     return const <E>{};
   }
-}''');
-    await computeAnalysisResult(source);
-    assertErrors(
-        source, [CompileTimeErrorCode.INVALID_TYPE_ARGUMENT_IN_CONST_SET]);
-    verify([source]);
-  }
 }
-
-@reflectiveTest
-class NonConstSetElementFromDeferredLibraryTest extends ResolverTestCase {
-  @override
-  bool get enableNewAnalysisDriver => true;
-
-  test_topLevelVariable_immediate() async {
-    await resolveWithErrors(<String>[
-      r'''
-library lib1;
-const int c = 1;''',
-      r'''
-library root;
-import 'lib1.dart' deferred as a;
-f() {
-  return const {a.c};
-}'''
-    ], [
-      CompileTimeErrorCode.NON_CONSTANT_SET_ELEMENT_FROM_DEFERRED_LIBRARY
-    ]);
-  }
-
-  test_topLevelVariable_nested() async {
-    await resolveWithErrors(<String>[
-      r'''
-library lib1;
-const int c = 1;''',
-      r'''
-library root;
-import 'lib1.dart' deferred as a;
-f() {
-  return const {a.c + 1};
-}'''
-    ], [
-      CompileTimeErrorCode.NON_CONSTANT_SET_ELEMENT_FROM_DEFERRED_LIBRARY
-    ]);
-  }
-}
-
-@reflectiveTest
-class NonConstSetElementTest extends ResolverTestCase {
-  @override
-  bool get enableNewAnalysisDriver => true;
-
-  test_parameter() async {
-    Source source = addSource(r'''
-f(a) {
-  return const {a};
-}''');
-    await computeAnalysisResult(source);
-    assertErrors(source, [CompileTimeErrorCode.NON_CONSTANT_SET_ELEMENT]);
-    verify([source]);
+''', [CompileTimeErrorCode.INVALID_TYPE_ARGUMENT_IN_CONST_SET]);
   }
 }
diff --git a/pkg/analyzer/test/generated/constant_test.dart b/pkg/analyzer/test/generated/constant_test.dart
index d4e7df3..7d8db75 100644
--- a/pkg/analyzer/test/generated/constant_test.dart
+++ b/pkg/analyzer/test/generated/constant_test.dart
@@ -1,4 +1,4 @@
-// Copyright (c) 2016, the Dart project authors.  Please see the AUTHORS file
+// Copyright (c) 2016, the Dart project authors. Please see the AUTHORS file
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
 
diff --git a/pkg/analyzer/test/generated/element_resolver_test.dart b/pkg/analyzer/test/generated/element_resolver_test.dart
index 4808365..8cb223e 100644
--- a/pkg/analyzer/test/generated/element_resolver_test.dart
+++ b/pkg/analyzer/test/generated/element_resolver_test.dart
@@ -12,6 +12,7 @@
 import 'package:analyzer/dart/element/type.dart';
 import 'package:analyzer/src/dart/element/element.dart';
 import 'package:analyzer/src/dart/element/inheritance_manager2.dart';
+import 'package:analyzer/src/error/codes.dart';
 import 'package:analyzer/src/generated/element_resolver.dart';
 import 'package:analyzer/src/generated/engine.dart';
 import 'package:analyzer/src/generated/resolver.dart';
@@ -838,6 +839,32 @@
     _listener.assertNoErrors();
   }
 
+  @failingTest
+  test_visitPostfixExpression_bang() async {
+    InterfaceType numType = _typeProvider.numType;
+    SimpleIdentifier operand = AstTestFactory.identifier3("i");
+    operand.staticType = numType;
+    PostfixExpression expression =
+        AstTestFactory.postfixExpression(operand, TokenType.BANG);
+    // TODO(danrubel): fails with Unsupported operation
+    _resolveNode(expression);
+    _listener.assertErrorsWithCodes([StaticTypeWarningCode.UNDEFINED_OPERATOR]);
+  }
+
+  @failingTest
+  test_visitPostfixExpression_bang_NNBD() async {
+    // TODO(danrubel): enable NNBD
+    InterfaceType numType = _typeProvider.numType;
+    SimpleIdentifier operand = AstTestFactory.identifier3("i");
+    operand.staticType = numType;
+    PostfixExpression expression =
+        AstTestFactory.postfixExpression(operand, TokenType.BANG);
+    _resolveNode(expression);
+    // TODO(danrubel): fails with Unsupported operation
+    expect(expression.staticElement, getMethod(numType, "!"));
+    _listener.assertNoErrors();
+  }
+
   test_visitPrefixedIdentifier_dynamic() async {
     DartType dynamicType = _typeProvider.dynamicType;
     SimpleIdentifier target = AstTestFactory.identifier3("a");
@@ -1257,9 +1284,6 @@
 @reflectiveTest
 class PreviewDart2Test extends ResolverTestCase {
   @override
-  bool get enableNewAnalysisDriver => true;
-
-  @override
   void setUp() {
     AnalysisOptionsImpl options = new AnalysisOptionsImpl();
     resetWith(options: options);
diff --git a/pkg/analyzer/test/generated/engine_test.dart b/pkg/analyzer/test/generated/engine_test.dart
index 7a8053c..dfd1476 100644
--- a/pkg/analyzer/test/generated/engine_test.dart
+++ b/pkg/analyzer/test/generated/engine_test.dart
@@ -1,24 +1,10 @@
-// Copyright (c) 2014, the Dart project authors.  Please see the AUTHORS file
+// Copyright (c) 2014, the Dart project authors. Please see the AUTHORS file
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
 
-import 'dart:async';
-
-import 'package:analyzer/dart/ast/ast.dart';
-import 'package:analyzer/dart/element/element.dart';
-import 'package:analyzer/error/error.dart';
-import 'package:analyzer/src/cancelable_future.dart';
-import 'package:analyzer/src/context/builder.dart' show EmbedderYamlLocator;
-import 'package:analyzer/src/context/cache.dart';
-import 'package:analyzer/src/context/context.dart';
-import 'package:analyzer/src/context/source.dart';
-import 'package:analyzer/src/generated/constant.dart';
 import 'package:analyzer/src/generated/engine.dart';
-import 'package:analyzer/src/generated/resolver.dart';
 import 'package:analyzer/src/generated/source_io.dart';
-import 'package:analyzer/src/plugin/resolver_provider.dart';
 import 'package:analyzer/src/string_source.dart';
-import 'package:analyzer/src/task/api/model.dart';
 import 'package:test/test.dart';
 import 'package:test_reflective_loader/test_reflective_loader.dart';
 
@@ -77,55 +63,6 @@
   }
 }
 
-/**
- * A listener used to gather the [ImplicitAnalysisEvent]s that are produced
- * during analysis.
- */
-class AnalyzedSourcesListener {
-  /**
-   * The events that have been gathered.
-   */
-  List<ImplicitAnalysisEvent> actualEvents = <ImplicitAnalysisEvent>[];
-
-  /**
-   * The sources that are being implicitly analyzed.
-   */
-  List<Source> analyzedSources = <Source>[];
-
-  /**
-   * Assert that the given source is currently being implicitly analyzed.
-   */
-  void expectAnalyzed(Source source) {
-    expect(analyzedSources, contains(source));
-  }
-
-  /**
-   * Assert that the given source is not currently being implicitly analyzed.
-   */
-  void expectNotAnalyzed(Source source) {
-    expect(analyzedSources, isNot(contains(source)));
-  }
-
-  /**
-   * Record that the given event was produced.
-   */
-  void onData(ImplicitAnalysisEvent event) {
-    actualEvents.add(event);
-    if (event.isAnalyzed) {
-      analyzedSources.add(event.source);
-    } else {
-      analyzedSources.remove(event.source);
-    }
-  }
-}
-
-class MockSourceFactory extends SourceFactoryImpl {
-  MockSourceFactory() : super([]);
-  Source resolveUri(Source containingSource, String containedUri) {
-    throw new UnimplementedError();
-  }
-}
-
 @reflectiveTest
 class SourcesChangedEventTest {
   void test_added() {
@@ -196,487 +133,3 @@
     expect(event.wereSourcesRemoved, wereSourcesRemoved);
   }
 }
-
-class SourcesChangedListener {
-  List<SourcesChangedEvent> actualEvents = [];
-
-  void assertEvent(
-      {bool wereSourcesAdded: false,
-      List<Source> changedSources: const <Source>[],
-      bool wereSourcesRemovedOrDeleted: false}) {
-    if (actualEvents.isEmpty) {
-      fail('Expected event but found none');
-    }
-    SourcesChangedEvent actual = actualEvents.removeAt(0);
-    SourcesChangedEventTest.assertEvent(actual,
-        wereSourcesAdded: wereSourcesAdded,
-        changedSources: changedSources,
-        wereSourcesRemoved: wereSourcesRemovedOrDeleted);
-  }
-
-  void assertNoMoreEvents() {
-    expect(actualEvents, []);
-  }
-
-  void onData(SourcesChangedEvent event) {
-    actualEvents.add(event);
-  }
-}
-
-/**
- * An analysis context in which almost every method will cause a test to fail
- * when invoked.
- */
-class TestAnalysisContext implements InternalAnalysisContext {
-  @override
-  final ReentrantSynchronousStream<InvalidatedResult> onResultInvalidated =
-      new ReentrantSynchronousStream<InvalidatedResult>();
-
-  @override
-  ResultProvider resultProvider;
-
-  @override
-  AnalysisCache get analysisCache {
-    fail("Unexpected invocation of analysisCache");
-  }
-
-  @override
-  AnalysisOptions get analysisOptions {
-    fail("Unexpected invocation of getAnalysisOptions");
-  }
-
-  @override
-  void set analysisOptions(AnalysisOptions options) {
-    fail("Unexpected invocation of setAnalysisOptions");
-  }
-
-  @override
-  void set analysisPriorityOrder(List<Source> sources) {
-    fail("Unexpected invocation of setAnalysisPriorityOrder");
-  }
-
-  @override
-  CacheConsistencyValidator get cacheConsistencyValidator {
-    fail("Unexpected invocation of cacheConsistencyValidator");
-  }
-
-  @override
-  set contentCache(ContentCache value) {
-    fail("Unexpected invocation of setContentCache");
-  }
-
-  @override
-  DeclaredVariables get declaredVariables {
-    fail("Unexpected invocation of getDeclaredVariables");
-  }
-
-  @deprecated
-  @override
-  EmbedderYamlLocator get embedderYamlLocator {
-    fail("Unexpected invocation of get embedderYamlLocator");
-  }
-
-  @override
-  List<AnalysisTarget> get explicitTargets {
-    fail("Unexpected invocation of visitCacheItems");
-  }
-
-  @override
-  ResolverProvider get fileResolverProvider {
-    fail("Unexpected invocation of fileResolverProvider");
-  }
-
-  @override
-  void set fileResolverProvider(ResolverProvider resolverProvider) {
-    fail("Unexpected invocation of fileResolverProvider");
-  }
-
-  @override
-  List<Source> get htmlSources {
-    fail("Unexpected invocation of getHtmlSources");
-  }
-
-  @override
-  Stream<ImplicitAnalysisEvent> get implicitAnalysisEvents {
-    fail("Unexpected invocation of analyzedSources");
-  }
-
-  bool get isActive {
-    fail("Unexpected invocation of isActive");
-  }
-
-  void set isActive(bool isActive) {
-    fail("Unexpected invocation of isActive");
-  }
-
-  @override
-  bool get isDisposed {
-    fail("Unexpected invocation of isDisposed");
-  }
-
-  @override
-  List<Source> get launchableClientLibrarySources {
-    fail("Unexpected invocation of getLaunchableClientLibrarySources");
-  }
-
-  @override
-  List<Source> get launchableServerLibrarySources {
-    fail("Unexpected invocation of getLaunchableServerLibrarySources");
-  }
-
-  @override
-  List<Source> get librarySources {
-    fail("Unexpected invocation of getLibrarySources");
-  }
-
-  @override
-  String get name {
-    fail("Unexpected invocation of name");
-  }
-
-  @override
-  set name(String value) {
-    fail("Unexpected invocation of name");
-  }
-
-  @override
-  Stream<SourcesChangedEvent> get onSourcesChanged {
-    fail("Unexpected invocation of onSourcesChanged");
-  }
-
-  @override
-  List<Source> get prioritySources {
-    fail("Unexpected invocation of getPrioritySources");
-  }
-
-  @override
-  List<AnalysisTarget> get priorityTargets {
-    fail("Unexpected invocation of visitCacheItems");
-  }
-
-  @override
-  CachePartition get privateAnalysisCachePartition {
-    fail("Unexpected invocation of privateAnalysisCachePartition");
-  }
-
-  @override
-  SourceFactory get sourceFactory {
-    fail("Unexpected invocation of getSourceFactory");
-  }
-
-  @override
-  void set sourceFactory(SourceFactory factory) {
-    fail("Unexpected invocation of setSourceFactory");
-  }
-
-  @override
-  List<Source> get sources {
-    fail("Unexpected invocation of sources");
-  }
-
-  @override
-  TypeProvider get typeProvider {
-    fail("Unexpected invocation of getTypeProvider");
-  }
-
-  @override
-  void set typeProvider(TypeProvider typeProvider) {
-    fail("Unexpected invocation of set typeProvider");
-  }
-
-  @override
-  TypeSystem get typeSystem {
-    fail("Unexpected invocation of getTypeSystem");
-  }
-
-  @override
-  List<WorkManager> get workManagers {
-    fail("Unexpected invocation of workManagers");
-  }
-
-  @override
-  bool aboutToComputeResult(CacheEntry entry, ResultDescriptor result) {
-    fail("Unexpected invocation of aboutToComputeResult");
-  }
-
-  @override
-  void addListener(AnalysisListener listener) {
-    fail("Unexpected invocation of addListener");
-  }
-
-  @override
-  void applyAnalysisDelta(AnalysisDelta delta) {
-    fail("Unexpected invocation of applyAnalysisDelta");
-  }
-
-  @override
-  void applyChanges(ChangeSet changeSet) {
-    fail("Unexpected invocation of applyChanges");
-  }
-
-  @override
-  String computeDocumentationComment(Element element) {
-    fail("Unexpected invocation of computeDocumentationComment");
-  }
-
-  @override
-  List<AnalysisError> computeErrors(Source source) {
-    fail("Unexpected invocation of computeErrors");
-  }
-
-  @override
-  List<Source> computeExportedLibraries(Source source) {
-    fail("Unexpected invocation of computeExportedLibraries");
-  }
-
-  @override
-  List<Source> computeImportedLibraries(Source source) {
-    fail("Unexpected invocation of computeImportedLibraries");
-  }
-
-  @override
-  SourceKind computeKindOf(Source source) {
-    fail("Unexpected invocation of computeKindOf");
-  }
-
-  @override
-  LibraryElement computeLibraryElement(Source source) {
-    fail("Unexpected invocation of computeLibraryElement");
-  }
-
-  @override
-  LineInfo computeLineInfo(Source source) {
-    fail("Unexpected invocation of computeLineInfo");
-  }
-
-  @override
-  CancelableFuture<CompilationUnit> computeResolvedCompilationUnitAsync(
-      Source source, Source librarySource) {
-    fail("Unexpected invocation of getResolvedCompilationUnitFuture");
-  }
-
-  @override
-  V computeResult<V>(AnalysisTarget target, ResultDescriptor<V> result) {
-    fail("Unexpected invocation of computeResult");
-  }
-
-  @override
-  void dispose() {
-    fail("Unexpected invocation of dispose");
-  }
-
-  @override
-  List<CompilationUnit> ensureResolvedDartUnits(Source source) {
-    fail("Unexpected invocation of ensureResolvedDartUnits");
-  }
-
-  @override
-  bool exists(Source source) {
-    fail("Unexpected invocation of exists");
-  }
-
-  @override
-  CacheEntry getCacheEntry(AnalysisTarget target) {
-    fail("Unexpected invocation of visitCacheItems");
-  }
-
-  @override
-  CompilationUnitElement getCompilationUnitElement(
-      Source unitSource, Source librarySource) {
-    fail("Unexpected invocation of getCompilationUnitElement");
-  }
-
-  @deprecated
-  @override
-  V getConfigurationData<V>(ResultDescriptor<V> key) {
-    fail("Unexpected invocation of getConfigurationData");
-  }
-
-  @override
-  TimestampedData<String> getContents(Source source) {
-    fail("Unexpected invocation of getContents");
-  }
-
-  @override
-  InternalAnalysisContext getContextFor(Source source) {
-    fail("Unexpected invocation of getContextFor");
-  }
-
-  @override
-  Element getElement(ElementLocation location) {
-    fail("Unexpected invocation of getElement");
-  }
-
-  @override
-  AnalysisErrorInfo getErrors(Source source) {
-    fail("Unexpected invocation of getErrors");
-  }
-
-  @override
-  List<Source> getHtmlFilesReferencing(Source source) {
-    fail("Unexpected invocation of getHtmlFilesReferencing");
-  }
-
-  @override
-  SourceKind getKindOf(Source source) {
-    fail("Unexpected invocation of getKindOf");
-  }
-
-  @override
-  List<Source> getLibrariesContaining(Source source) {
-    fail("Unexpected invocation of getLibrariesContaining");
-  }
-
-  @override
-  List<Source> getLibrariesDependingOn(Source librarySource) {
-    fail("Unexpected invocation of getLibrariesDependingOn");
-  }
-
-  @override
-  List<Source> getLibrariesReferencedFromHtml(Source htmlSource) {
-    fail("Unexpected invocation of getLibrariesReferencedFromHtml");
-  }
-
-  @override
-  LibraryElement getLibraryElement(Source source) {
-    fail("Unexpected invocation of getLibraryElement");
-  }
-
-  @override
-  LineInfo getLineInfo(Source source) {
-    fail("Unexpected invocation of getLineInfo");
-  }
-
-  @override
-  int getModificationStamp(Source source) {
-    fail("Unexpected invocation of getModificationStamp");
-  }
-
-  @override
-  ChangeNoticeImpl getNotice(Source source) {
-    fail("Unexpected invocation of getNotice");
-  }
-
-  @override
-  Namespace getPublicNamespace(LibraryElement library) {
-    fail("Unexpected invocation of getPublicNamespace");
-  }
-
-  @override
-  CompilationUnit getResolvedCompilationUnit(
-      Source unitSource, LibraryElement library) {
-    fail("Unexpected invocation of getResolvedCompilationUnit");
-  }
-
-  @override
-  CompilationUnit getResolvedCompilationUnit2(
-      Source unitSource, Source librarySource) {
-    fail("Unexpected invocation of getResolvedCompilationUnit");
-  }
-
-  @override
-  V getResult<V>(AnalysisTarget target, ResultDescriptor<V> result) {
-    fail("Unexpected invocation of getResult");
-  }
-
-  @override
-  List<Source> getSourcesWithFullName(String path) {
-    fail("Unexpected invocation of getSourcesWithFullName");
-  }
-
-  @override
-  bool handleContentsChanged(
-      Source source, String originalContents, String newContents, bool notify) {
-    fail("Unexpected invocation of handleContentsChanged");
-  }
-
-  @override
-  void invalidateLibraryHints(Source librarySource) {
-    fail("Unexpected invocation of invalidateLibraryHints");
-  }
-
-  @override
-  bool isClientLibrary(Source librarySource) {
-    fail("Unexpected invocation of isClientLibrary");
-  }
-
-  @override
-  bool isServerLibrary(Source librarySource) {
-    fail("Unexpected invocation of isServerLibrary");
-  }
-
-  @override
-  Stream<ResultChangedEvent> onResultChanged(ResultDescriptor descriptor) {
-    fail("Unexpected invocation of onResultChanged");
-  }
-
-  @deprecated
-  @override
-  Stream<ComputedResult> onResultComputed(ResultDescriptor descriptor) {
-    fail("Unexpected invocation of onResultComputed");
-  }
-
-  @override
-  CompilationUnit parseCompilationUnit(Source source) {
-    fail("Unexpected invocation of parseCompilationUnit");
-  }
-
-  @override
-  AnalysisResult performAnalysisTask() {
-    fail("Unexpected invocation of performAnalysisTask");
-  }
-
-  @override
-  void recordLibraryElements(Map<Source, LibraryElement> elementMap) {
-    fail("Unexpected invocation of recordLibraryElements");
-  }
-
-  @override
-  void removeListener(AnalysisListener listener) {
-    fail("Unexpected invocation of removeListener");
-  }
-
-  @override
-  CompilationUnit resolveCompilationUnit(
-      Source unitSource, LibraryElement library) {
-    fail("Unexpected invocation of resolveCompilationUnit");
-  }
-
-  @override
-  CompilationUnit resolveCompilationUnit2(
-      Source unitSource, Source librarySource) {
-    fail("Unexpected invocation of resolveCompilationUnit");
-  }
-
-  @override
-  void setChangedContents(Source source, String contents, int offset,
-      int oldLength, int newLength) {
-    fail("Unexpected invocation of setChangedContents");
-  }
-
-  @deprecated
-  @override
-  void setConfigurationData(ResultDescriptor key, Object data) {
-    fail("Unexpected invocation of setConfigurationData");
-  }
-
-  @override
-  void setContents(Source source, String contents) {
-    fail("Unexpected invocation of setContents");
-  }
-
-  @override
-  bool shouldErrorsBeAnalyzed(Source source) {
-    fail("Unexpected invocation of shouldErrorsBeAnalyzed");
-  }
-
-  @override
-  void test_flushAstStructures(Source source) {
-    fail("Unexpected invocation of test_flushAstStructures");
-  }
-
-  @override
-  void visitContentCache(ContentCacheVisitor visitor) {
-    fail("Unexpected invocation of visitContentCache");
-  }
-}
diff --git a/pkg/analyzer/test/generated/error_suppression_test.dart b/pkg/analyzer/test/generated/error_suppression_test.dart
index 8eb21cf..fc6c5d50c 100644
--- a/pkg/analyzer/test/generated/error_suppression_test.dart
+++ b/pkg/analyzer/test/generated/error_suppression_test.dart
@@ -18,9 +18,6 @@
 
 @reflectiveTest
 class ErrorSuppressionTest extends ResolverTestCase {
-  @override
-  bool get enableNewAnalysisDriver => true;
-
   String get ignoredCode => 'const_initialized_with_non_constant_value';
 
   List<ErrorCode> get reportedCodes => [
diff --git a/pkg/analyzer/test/generated/hint_code_test.dart b/pkg/analyzer/test/generated/hint_code_test.dart
index eebd8bb..18bb4a8 100644
--- a/pkg/analyzer/test/generated/hint_code_test.dart
+++ b/pkg/analyzer/test/generated/hint_code_test.dart
@@ -68,9 +68,6 @@
 @reflectiveTest
 class HintCodeTest extends ResolverTestCase {
   @override
-  bool get enableNewAnalysisDriver => true;
-
-  @override
   void reset() {
     super.resetWith(packages: [
       ['meta', _metaLibraryStub],
@@ -151,51 +148,6 @@
     verify([source]);
   }
 
-  test_duplicateImport() async {
-    Source source = addSource(r'''
-library L;
-import 'lib1.dart';
-import 'lib1.dart';
-A a;''');
-    addNamedSource("/lib1.dart", r'''
-library lib1;
-class A {}''');
-    await computeAnalysisResult(source);
-    assertErrors(source, [HintCode.DUPLICATE_IMPORT]);
-    verify([source]);
-  }
-
-  test_duplicateImport2() async {
-    Source source = addSource(r'''
-library L;
-import 'lib1.dart';
-import 'lib1.dart';
-import 'lib1.dart';
-A a;''');
-    addNamedSource("/lib1.dart", r'''
-library lib1;
-class A {}''');
-    await computeAnalysisResult(source);
-    assertErrors(
-        source, [HintCode.DUPLICATE_IMPORT, HintCode.DUPLICATE_IMPORT]);
-    verify([source]);
-  }
-
-  test_duplicateImport3() async {
-    Source source = addSource(r'''
-library L;
-import 'lib1.dart' as M show A hide B;
-import 'lib1.dart' as M show A hide B;
-M.A a;''');
-    addNamedSource("/lib1.dart", r'''
-library lib1;
-class A {}
-class B {}''');
-    await computeAnalysisResult(source);
-    assertErrors(source, [HintCode.DUPLICATE_IMPORT]);
-    verify([source]);
-  }
-
   test_duplicateShownHiddenName_hidden() async {
     Source source = addSource(r'''
 library L;
@@ -402,21 +354,6 @@
     verify([source]);
   }
 
-  test_importDeferredLibraryWithLoadFunction() async {
-    await resolveWithErrors(<String>[
-      r'''
-library lib1;
-loadLibrary() {}
-f() {}''',
-      r'''
-library root;
-import 'lib1.dart' deferred as lib1;
-main() { lib1.f(); }'''
-    ], <ErrorCode>[
-      HintCode.IMPORT_DEFERRED_LIBRARY_WITH_LOAD_FUNCTION
-    ]);
-  }
-
   test_invalidUseOfProtectedMember_closure() async {
     Source source = addNamedSource('/lib1.dart', r'''
 import 'package:meta/meta.dart';
@@ -1356,300 +1293,6 @@
     verify([source]);
   }
 
-  test_nullAwareBeforeOperator_minus() async {
-    Source source = addSource(r'''
-m(x) {
-  x?.a - '';
-}
-''');
-    await computeAnalysisResult(source);
-    assertErrors(source, [HintCode.NULL_AWARE_BEFORE_OPERATOR]);
-    verify([source]);
-  }
-
-  test_nullAwareBeforeOperator_ok_assignment() async {
-    Source source = addSource(r'''
-m(x) {
-  x?.a = '';
-}
-''');
-    await computeAnalysisResult(source);
-    assertNoErrors(source);
-    verify([source]);
-  }
-
-  test_nullAwareBeforeOperator_ok_equal_equal() async {
-    Source source = addSource(r'''
-m(x) {
-  x?.a == '';
-}
-''');
-    await computeAnalysisResult(source);
-    assertNoErrors(source);
-    verify([source]);
-  }
-
-  test_nullAwareBeforeOperator_ok_is() async {
-    Source source = addSource(r'''
-m(x) {
-  x?.a is String;
-}
-''');
-    await computeAnalysisResult(source);
-    assertNoErrors(source);
-    verify([source]);
-  }
-
-  test_nullAwareBeforeOperator_ok_is_not() async {
-    Source source = addSource(r'''
-m(x) {
-  x?.a is! String;
-}
-''');
-    await computeAnalysisResult(source);
-    assertNoErrors(source);
-    verify([source]);
-  }
-
-  test_nullAwareBeforeOperator_ok_not_equal() async {
-    Source source = addSource(r'''
-m(x) {
-  x?.a != '';
-}
-''');
-    await computeAnalysisResult(source);
-    assertNoErrors(source);
-    verify([source]);
-  }
-
-  test_nullAwareBeforeOperator_ok_question_question() async {
-    Source source = addSource(r'''
-m(x) {
-  x?.a ?? true;
-}
-''');
-    await computeAnalysisResult(source);
-    assertNoErrors(source);
-    verify([source]);
-  }
-
-  test_nullAwareInCondition_assert() async {
-    Source source = addSource(r'''
-m(x) {
-  assert (x?.a);
-}
-''');
-    await computeAnalysisResult(source);
-    assertErrors(source, [HintCode.NULL_AWARE_IN_CONDITION]);
-    verify([source]);
-  }
-
-  test_nullAwareInCondition_conditionalExpression() async {
-    Source source = addSource(r'''
-m(x) {
-  return x?.a ? 0 : 1;
-}
-''');
-    await computeAnalysisResult(source);
-    assertErrors(source, [HintCode.NULL_AWARE_IN_CONDITION]);
-    verify([source]);
-  }
-
-  test_nullAwareInCondition_do() async {
-    Source source = addSource(r'''
-m(x) {
-  do {} while (x?.a);
-}
-''');
-    await computeAnalysisResult(source);
-    assertErrors(source, [HintCode.NULL_AWARE_IN_CONDITION]);
-    verify([source]);
-  }
-
-  test_nullAwareInCondition_for() async {
-    Source source = addSource(r'''
-m(x) {
-  for (var v = x; v?.a; v = v.next) {}
-}
-''');
-    await computeAnalysisResult(source);
-    assertErrors(source, [HintCode.NULL_AWARE_IN_CONDITION]);
-    verify([source]);
-  }
-
-  test_nullAwareInCondition_if() async {
-    Source source = addSource(r'''
-m(x) {
-  if (x?.a) {}
-}
-''');
-    await computeAnalysisResult(source);
-    assertErrors(source, [HintCode.NULL_AWARE_IN_CONDITION]);
-    verify([source]);
-  }
-
-  test_nullAwareInCondition_if_parenthesized() async {
-    Source source = addSource(r'''
-m(x) {
-  if ((x?.a)) {}
-}
-''');
-    await computeAnalysisResult(source);
-    assertErrors(source, [HintCode.NULL_AWARE_IN_CONDITION]);
-    verify([source]);
-  }
-
-  test_nullAwareInCondition_while() async {
-    Source source = addSource(r'''
-m(x) {
-  while (x?.a) {}
-}
-''');
-    await computeAnalysisResult(source);
-    assertErrors(source, [HintCode.NULL_AWARE_IN_CONDITION]);
-    verify([source]);
-  }
-
-  test_nullAwareInLogicalOperator_conditionalAnd_first() async {
-    Source source = addSource(r'''
-m(x) {
-  x?.a && x.b;
-}
-''');
-    await computeAnalysisResult(source);
-    assertErrors(source, [HintCode.NULL_AWARE_IN_LOGICAL_OPERATOR]);
-    verify([source]);
-  }
-
-  test_nullAwareInLogicalOperator_conditionalAnd_second() async {
-    Source source = addSource(r'''
-m(x) {
-  x.a && x?.b;
-}
-''');
-    await computeAnalysisResult(source);
-    assertErrors(source, [HintCode.NULL_AWARE_IN_LOGICAL_OPERATOR]);
-    verify([source]);
-  }
-
-  test_nullAwareInLogicalOperator_conditionalAnd_third() async {
-    Source source = addSource(r'''
-m(x) {
-  x.a && x.b && x?.c;
-}
-''');
-    await computeAnalysisResult(source);
-    assertErrors(source, [HintCode.NULL_AWARE_IN_LOGICAL_OPERATOR]);
-    verify([source]);
-  }
-
-  test_nullAwareInLogicalOperator_conditionalOr_first() async {
-    Source source = addSource(r'''
-m(x) {
-  x?.a || x.b;
-}
-''');
-    await computeAnalysisResult(source);
-    assertErrors(source, [HintCode.NULL_AWARE_IN_LOGICAL_OPERATOR]);
-    verify([source]);
-  }
-
-  test_nullAwareInLogicalOperator_conditionalOr_second() async {
-    Source source = addSource(r'''
-m(x) {
-  x.a || x?.b;
-}
-''');
-    await computeAnalysisResult(source);
-    assertErrors(source, [HintCode.NULL_AWARE_IN_LOGICAL_OPERATOR]);
-    verify([source]);
-  }
-
-  test_nullAwareInLogicalOperator_conditionalOr_third() async {
-    Source source = addSource(r'''
-m(x) {
-  x.a || x.b || x?.c;
-}
-''');
-    await computeAnalysisResult(source);
-    assertErrors(source, [HintCode.NULL_AWARE_IN_LOGICAL_OPERATOR]);
-    verify([source]);
-  }
-
-  test_nullAwareInLogicalOperator_not() async {
-    Source source = addSource(r'''
-m(x) {
-  !x?.a;
-}
-''');
-    await computeAnalysisResult(source);
-    assertErrors(source, [HintCode.NULL_AWARE_IN_LOGICAL_OPERATOR]);
-    verify([source]);
-  }
-
-  @failingTest
-  test_overrideEqualsButNotHashCode() async {
-    Source source = addSource(r'''
-class A {
-  bool operator ==(x) {}
-}''');
-    await computeAnalysisResult(source);
-    assertErrors(source, [HintCode.OVERRIDE_EQUALS_BUT_NOT_HASH_CODE]);
-    verify([source]);
-  }
-
-  test_overrideOnNonOverridingField_invalid() async {
-    Source source = addSource(r'''
-class A {
-}
-class B extends A {
-  @override
-  final int m = 1;
-}''');
-    await computeAnalysisResult(source);
-    assertErrors(source, [HintCode.OVERRIDE_ON_NON_OVERRIDING_FIELD]);
-    verify([source]);
-  }
-
-  test_overrideOnNonOverridingGetter_invalid() async {
-    Source source = addSource(r'''
-class A {
-}
-class B extends A {
-  @override
-  int get m => 1;
-}''');
-    await computeAnalysisResult(source);
-    assertErrors(source, [HintCode.OVERRIDE_ON_NON_OVERRIDING_GETTER]);
-    verify([source]);
-  }
-
-  test_overrideOnNonOverridingMethod_invalid() async {
-    Source source = addSource(r'''
-class A {
-}
-class B extends A {
-  @override
-  int m() => 1;
-}''');
-    await computeAnalysisResult(source);
-    assertErrors(source, [HintCode.OVERRIDE_ON_NON_OVERRIDING_METHOD]);
-    verify([source]);
-  }
-
-  test_overrideOnNonOverridingSetter_invalid() async {
-    Source source = addSource(r'''
-class A {
-}
-class B extends A {
-  @override
-  set m(int x) {}
-}''');
-    await computeAnalysisResult(source);
-    assertErrors(source, [HintCode.OVERRIDE_ON_NON_OVERRIDING_SETTER]);
-    verify([source]);
-  }
-
   test_required_constructor_param() async {
     Source source = addSource(r'''
 import 'package:meta/meta.dart';
diff --git a/pkg/analyzer/test/generated/invalid_code_test.dart b/pkg/analyzer/test/generated/invalid_code_test.dart
index 23bcf7d..3d24f99 100644
--- a/pkg/analyzer/test/generated/invalid_code_test.dart
+++ b/pkg/analyzer/test/generated/invalid_code_test.dart
@@ -28,9 +28,6 @@
   @override
   AnalysisOptions get defaultAnalysisOptions => new AnalysisOptionsImpl();
 
-  @override
-  bool get enableNewAnalysisDriver => true;
-
   /**
    * This code results in a method with the empty name, and the default
    * constructor, which also has the empty name. The `Map` in `f` initializer
diff --git a/pkg/analyzer/test/generated/non_error_resolver_test.dart b/pkg/analyzer/test/generated/non_error_resolver_test.dart
index 0c3d5cb..a033b5c 100644
--- a/pkg/analyzer/test/generated/non_error_resolver_test.dart
+++ b/pkg/analyzer/test/generated/non_error_resolver_test.dart
@@ -32,9 +32,6 @@
   @override
   List<String> get enabledExperiments => [EnableString.constant_update_2018];
 
-  @override
-  bool get enableNewAnalysisDriver => true;
-
   test_intLiteralInDoubleContext_const_exact() async {
     Source source = addSource(r'''
 const double x = 0;
@@ -77,9 +74,6 @@
   @override
   AnalysisOptions get defaultAnalysisOptions => new AnalysisOptionsImpl();
 
-  @override
-  bool get enableNewAnalysisDriver => true;
-
   test_ambiguousExport() async {
     Source source = addSource(r'''
 library L;
diff --git a/pkg/analyzer/test/generated/non_hint_code_test.dart b/pkg/analyzer/test/generated/non_hint_code_test.dart
index 359dd7f..03d2693 100644
--- a/pkg/analyzer/test/generated/non_hint_code_test.dart
+++ b/pkg/analyzer/test/generated/non_hint_code_test.dart
@@ -17,9 +17,6 @@
 
 @reflectiveTest
 class NonHintCodeTest extends ResolverTestCase {
-  @override
-  bool get enableNewAnalysisDriver => true;
-
   test_async_future_object_without_return() async {
     Source source = addSource('''
 import 'dart:async';
@@ -30,65 +27,6 @@
     verify([source]);
   }
 
-  test_duplicateImport_as() async {
-    Source source = addSource(r'''
-library L;
-import 'lib1.dart';
-import 'lib1.dart' as one;
-A a;
-one.A a2;''');
-    addNamedSource("/lib1.dart", r'''
-library lib1;
-class A {}''');
-    await computeAnalysisResult(source);
-    assertNoErrors(source);
-    verify([source]);
-  }
-
-  test_duplicateImport_hide() async {
-    Source source = addSource(r'''
-library L;
-import 'lib1.dart';
-import 'lib1.dart' hide A;
-A a;
-B b;''');
-    addNamedSource("/lib1.dart", r'''
-library lib1;
-class A {}
-class B {}''');
-    await computeAnalysisResult(source);
-    assertNoErrors(source);
-    verify([source]);
-  }
-
-  test_duplicateImport_show() async {
-    Source source = addSource(r'''
-library L;
-import 'lib1.dart';
-import 'lib1.dart' show A;
-A a;
-B b;''');
-    addNamedSource("/lib1.dart", r'''
-library lib1;
-class A {}
-class B {}''');
-    await computeAnalysisResult(source);
-    assertNoErrors(source);
-    verify([source]);
-  }
-
-  test_importDeferredLibraryWithLoadFunction() async {
-    await resolveWithErrors(<String>[
-      r'''
-library lib1;
-f() {}''',
-      r'''
-library root;
-import 'lib1.dart' deferred as lib1;
-main() { lib1.f(); }'''
-    ], const <ErrorCode>[]);
-  }
-
   test_issue20904BuggyTypePromotionAtIfJoin_1() async {
     // https://code.google.com/p/dart/issues/detail?id=20904
     Source source = addSource(r'''
@@ -136,203 +74,6 @@
     verify([source]);
   }
 
-  test_nullAwareInCondition_for_noCondition() async {
-    Source source = addSource(r'''
-m(x) {
-  for (var v = x; ; v++) {}
-}
-''');
-    await computeAnalysisResult(source);
-    assertNoErrors(source);
-    verify([source]);
-  }
-
-  test_nullAwareInCondition_if_notTopLevel() async {
-    Source source = addSource(r'''
-m(x) {
-  if (x?.y == null) {}
-}
-''');
-    await computeAnalysisResult(source);
-    assertNoErrors(source);
-    verify([source]);
-  }
-
-  test_overrideEqualsButNotHashCode() async {
-    Source source = addSource(r'''
-class A {
-  bool operator ==(x) { return x; }
-  get hashCode => 0;
-}''');
-    await computeAnalysisResult(source);
-    assertNoErrors(source);
-    verify([source]);
-  }
-
-  test_overrideOnNonOverridingField_inInterface() async {
-    Source source = addSource(r'''
-class A {
-  int get a => 0;
-  void set b(_) {}
-  int c;
-}
-class B implements A {
-  @override
-  final int a = 1;
-  @override
-  int b;
-  @override
-  int c;
-}''');
-    await computeAnalysisResult(source);
-    assertErrors(
-      source,
-      [CompileTimeErrorCode.INVALID_OVERRIDE],
-    );
-    verify([source]);
-  }
-
-  test_overrideOnNonOverridingField_inSuperclass() async {
-    Source source = addSource(r'''
-class A {
-  int get a => 0;
-  void set b(_) {}
-  int c;
-}
-class B extends A {
-  @override
-  final int a = 1;
-  @override
-  int b;
-  @override
-  int c;
-}''');
-    await computeAnalysisResult(source);
-    assertErrors(
-      source,
-      [CompileTimeErrorCode.INVALID_OVERRIDE],
-    );
-    verify([source]);
-  }
-
-  test_overrideOnNonOverridingGetter_inInterface() async {
-    Source source = addSource(r'''
-class A {
-  int get m => 0;
-}
-class B implements A {
-  @override
-  int get m => 1;
-}''');
-    await computeAnalysisResult(source);
-    assertNoErrors(source);
-    verify([source]);
-  }
-
-  test_overrideOnNonOverridingGetter_inSuperclass() async {
-    Source source = addSource(r'''
-class A {
-  int get m => 0;
-}
-class B extends A {
-  @override
-  int get m => 1;
-}''');
-    await computeAnalysisResult(source);
-    assertNoErrors(source);
-    verify([source]);
-  }
-
-  test_overrideOnNonOverridingMethod_inInterface() async {
-    Source source = addSource(r'''
-class A {
-  int m() => 0;
-}
-class B implements A {
-  @override
-  int m() => 1;
-}''');
-    await computeAnalysisResult(source);
-    assertNoErrors(source);
-    verify([source]);
-  }
-
-  test_overrideOnNonOverridingMethod_inInterfaces() async {
-    Source source = addSource(r'''
-abstract class I {
-  void foo(int _);
-}
-
-abstract class J {
-  void foo(String _);
-}
-
-class C implements I, J {
-  @override
-  void foo(Object _) {}
-}
-''');
-    await computeAnalysisResult(source);
-    assertNoErrors(source);
-    verify([source]);
-  }
-
-  test_overrideOnNonOverridingMethod_inSuperclass() async {
-    Source source = addSource(r'''
-class A {
-  int m() => 0;
-}
-class B extends A {
-  @override
-  int m() => 1;
-}''');
-    await computeAnalysisResult(source);
-    assertNoErrors(source);
-    verify([source]);
-  }
-
-  test_overrideOnNonOverridingMethod_inSuperclass_abstract() async {
-    Source source = addSource(r'''
-abstract class A {
-  int m();
-}
-class B extends A {
-  @override
-  int m() => 1;
-}''');
-    await computeAnalysisResult(source);
-    assertNoErrors(source);
-    verify([source]);
-  }
-
-  test_overrideOnNonOverridingSetter_inInterface() async {
-    Source source = addSource(r'''
-class A {
-  set m(int x) {}
-}
-class B implements A {
-  @override
-  set m(int x) {}
-}''');
-    await computeAnalysisResult(source);
-    assertNoErrors(source);
-    verify([source]);
-  }
-
-  test_overrideOnNonOverridingSetter_inSuperclass() async {
-    Source source = addSource(r'''
-class A {
-  set m(int x) {}
-}
-class B extends A {
-  @override
-  set m(int x) {}
-}''');
-    await computeAnalysisResult(source);
-    assertNoErrors(source);
-    verify([source]);
-  }
-
   test_propagatedFieldType() async {
     Source source = addSource(r'''
 class A { }
diff --git a/pkg/analyzer/test/generated/parser_fasta_listener.dart b/pkg/analyzer/test/generated/parser_fasta_listener.dart
index 7217806..45b0b61 100644
--- a/pkg/analyzer/test/generated/parser_fasta_listener.dart
+++ b/pkg/analyzer/test/generated/parser_fasta_listener.dart
@@ -1,4 +1,4 @@
-// Copyright (c) 2017, the Dart project authors.  Please see the AUTHORS file
+// Copyright (c) 2017, the Dart project authors. Please see the AUTHORS file
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
 
diff --git a/pkg/analyzer/test/generated/parser_fasta_test.dart b/pkg/analyzer/test/generated/parser_fasta_test.dart
index f5becf3..1beed7e 100644
--- a/pkg/analyzer/test/generated/parser_fasta_test.dart
+++ b/pkg/analyzer/test/generated/parser_fasta_test.dart
@@ -56,42 +56,12 @@
 class ClassMemberParserTest_Fasta extends FastaParserTestCase
     with ClassMemberParserTestMixin {
   void test_parseClassMember_operator_gtgtgt() {
-    final sourceText = 'class C { bool operator >>>(other) => false; }';
-
-    // ---------------------------------------------------
-    // TODO(danrubel): Replace this section with a call to parseCompilationUnit
-    // once '>>>' token support is enabled permanently.
-
-    var source = new StringSource(sourceText, 'parser_test_StringSource.dart');
-    GatheringErrorListener errorListener =
-        new GatheringErrorListener(checkRanges: true);
-
-    // Scan tokens
-    StringScanner scanner = new StringScanner(sourceText, includeComments: true)
-      ..enableGtGtGt = true;
-    Token tokens = scanner.tokenize();
-    expect(scanner.hasErrors, isFalse);
-
-    // Run parser
-    ErrorReporter errorReporter = new ErrorReporter(errorListener, source);
-    fasta.Parser parser = new fasta.Parser(null);
-    AstBuilder astBuilder = new AstBuilder(errorReporter, source.uri, true);
-    parser.listener = astBuilder;
-    astBuilder.parser = parser;
-    parser.parseUnit(tokens);
-
-    CompilationUnitImpl unit = astBuilder.pop();
-    expect(unit, isNotNull);
-    unit.localDeclarations = astBuilder.localDeclarations;
-    errorListener.assertNoErrors();
-
-    // ---------------------------------------------------
-
+    CompilationUnitImpl unit = parseCompilationUnit(
+        'class C { bool operator >>>(other) => false; }',
+        enableGtGtGt: true);
     ClassDeclaration declaration = unit.declarations[0];
-    ClassMember member = declaration.members[0];
-    expect(member, isNotNull);
-    expect(member, new TypeMatcher<MethodDeclaration>());
-    MethodDeclaration method = member;
+    MethodDeclaration method = declaration.members[0];
+
     expect(method.documentationComment, isNull);
     expect(method.externalKeyword, isNull);
     expect(method.modifierKeyword, isNull);
@@ -103,6 +73,24 @@
     expect(method.parameters, isNotNull);
     expect(method.body, isNotNull);
   }
+
+  void test_parseClassMember_operator_gtgtgteq() {
+    CompilationUnitImpl unit = parseCompilationUnit(
+        'class C { foo(int value) { x >>>= value; } }',
+        enableGtGtGtEq: true);
+    ClassDeclaration declaration = unit.declarations[0];
+    MethodDeclaration method = declaration.members[0];
+    BlockFunctionBody blockFunctionBody = method.body;
+    NodeList<Statement> statements = blockFunctionBody.block.statements;
+    expect(statements, hasLength(1));
+    ExpressionStatement statement = statements[0];
+    AssignmentExpression assignment = statement.expression;
+    SimpleIdentifier leftHandSide = assignment.leftHandSide;
+    expect(leftHandSide.name, 'x');
+    expect(assignment.operator.lexeme, '>>>=');
+    SimpleIdentifier rightHandSide = assignment.rightHandSide;
+    expect(rightHandSide.name, 'value');
+  }
 }
 
 /**
@@ -129,11 +117,11 @@
       '[1, await for (var x in list) 2]',
       inAsync: true,
     );
-    expect(list.elements2, hasLength(2));
-    IntegerLiteral first = list.elements2[0];
+    expect(list.elements, hasLength(2));
+    IntegerLiteral first = list.elements[0];
     expect(first.value, 1);
 
-    ForElement second = list.elements2[1];
+    ForElement second = list.elements[1];
     expect(second.awaitKeyword, isNotNull);
     expect(second.forKeyword.isKeyword, isTrue);
     expect(second.leftParenthesis.lexeme, '(');
@@ -151,11 +139,11 @@
       '[1, await for (var x in list) if (c) 2]',
       inAsync: true,
     );
-    expect(list.elements2, hasLength(2));
-    IntegerLiteral first = list.elements2[0];
+    expect(list.elements, hasLength(2));
+    IntegerLiteral first = list.elements[0];
     expect(first.value, 1);
 
-    ForElement second = list.elements2[1];
+    ForElement second = list.elements[1];
     expect(second.awaitKeyword, isNotNull);
     expect(second.forKeyword.isKeyword, isTrue);
     expect(second.leftParenthesis.lexeme, '(');
@@ -177,11 +165,11 @@
   void test_listLiteral_forSpread() {
     ListLiteral list =
         parseCollectionLiteral('[1, for (int x = 0; x < 10; ++x) ...[2]]');
-    expect(list.elements2, hasLength(2));
-    IntegerLiteral first = list.elements2[0];
+    expect(list.elements, hasLength(2));
+    IntegerLiteral first = list.elements[0];
     expect(first.value, 1);
 
-    ForElement second = list.elements2[1];
+    ForElement second = list.elements[1];
     expect(second.awaitKeyword, isNull);
     expect(second.forKeyword.isKeyword, isTrue);
     expect(second.leftParenthesis.lexeme, '(');
@@ -199,11 +187,11 @@
 
   void test_listLiteral_if() {
     ListLiteral list = parseCollectionLiteral('[1, if (true) 2]');
-    expect(list.elements2, hasLength(2));
-    IntegerLiteral first = list.elements2[0];
+    expect(list.elements, hasLength(2));
+    IntegerLiteral first = list.elements[0];
     expect(first.value, 1);
 
-    IfElement second = list.elements2[1];
+    IfElement second = list.elements[1];
     BooleanLiteral condition = second.condition;
     expect(condition.value, isTrue);
     IntegerLiteral thenElement = second.thenElement;
@@ -213,11 +201,11 @@
 
   void test_listLiteral_ifElse() {
     ListLiteral list = parseCollectionLiteral('[1, if (true) 2 else 5]');
-    expect(list.elements2, hasLength(2));
-    IntegerLiteral first = list.elements2[0];
+    expect(list.elements, hasLength(2));
+    IntegerLiteral first = list.elements[0];
     expect(first.value, 1);
 
-    IfElement second = list.elements2[1];
+    IfElement second = list.elements[1];
     BooleanLiteral condition = second.condition;
     expect(condition.value, isTrue);
     IntegerLiteral thenElement = second.thenElement;
@@ -229,11 +217,11 @@
   void test_listLiteral_ifElseFor() {
     ListLiteral list =
         parseCollectionLiteral('[1, if (true) 2 else for (a in b) 5]');
-    expect(list.elements2, hasLength(2));
-    IntegerLiteral first = list.elements2[0];
+    expect(list.elements, hasLength(2));
+    IntegerLiteral first = list.elements[0];
     expect(first.value, 1);
 
-    IfElement second = list.elements2[1];
+    IfElement second = list.elements[1];
     BooleanLiteral condition = second.condition;
     expect(condition.value, isTrue);
     IntegerLiteral thenElement = second.thenElement;
@@ -250,11 +238,11 @@
   void test_listLiteral_ifElseSpread() {
     ListLiteral list =
         parseCollectionLiteral('[1, if (true) ...[2] else ...?[5]]');
-    expect(list.elements2, hasLength(2));
-    IntegerLiteral first = list.elements2[0];
+    expect(list.elements, hasLength(2));
+    IntegerLiteral first = list.elements[0];
     expect(first.value, 1);
 
-    IfElement second = list.elements2[1];
+    IfElement second = list.elements[1];
     BooleanLiteral condition = second.condition;
     expect(condition.value, isTrue);
     SpreadElement thenElement = second.thenElement;
@@ -265,11 +253,11 @@
 
   void test_listLiteral_ifFor() {
     ListLiteral list = parseCollectionLiteral('[1, if (true) for (a in b) 2]');
-    expect(list.elements2, hasLength(2));
-    IntegerLiteral first = list.elements2[0];
+    expect(list.elements, hasLength(2));
+    IntegerLiteral first = list.elements[0];
     expect(first.value, 1);
 
-    IfElement second = list.elements2[1];
+    IfElement second = list.elements[1];
     BooleanLiteral condition = second.condition;
     expect(condition.value, isTrue);
 
@@ -284,11 +272,11 @@
 
   void test_listLiteral_ifSpread() {
     ListLiteral list = parseCollectionLiteral('[1, if (true) ...[2]]');
-    expect(list.elements2, hasLength(2));
-    IntegerLiteral first = list.elements2[0];
+    expect(list.elements, hasLength(2));
+    IntegerLiteral first = list.elements[0];
     expect(first.value, 1);
 
-    IfElement second = list.elements2[1];
+    IfElement second = list.elements[1];
     BooleanLiteral condition = second.condition;
     expect(condition.value, isTrue);
     SpreadElement thenElement = second.thenElement;
@@ -298,38 +286,38 @@
 
   void test_listLiteral_spread() {
     ListLiteral list = parseCollectionLiteral('[1, ...[2]]');
-    expect(list.elements2, hasLength(2));
-    IntegerLiteral first = list.elements2[0];
+    expect(list.elements, hasLength(2));
+    IntegerLiteral first = list.elements[0];
     expect(first.value, 1);
 
-    SpreadElement element = list.elements2[1];
+    SpreadElement element = list.elements[1];
     expect(element.spreadOperator.lexeme, '...');
     ListLiteral spreadExpression = element.expression;
-    expect(spreadExpression.elements2, hasLength(1));
+    expect(spreadExpression.elements, hasLength(1));
   }
 
   void test_listLiteral_spreadQ() {
     ListLiteral list = parseCollectionLiteral('[1, ...?[2]]');
-    expect(list.elements2, hasLength(2));
-    IntegerLiteral first = list.elements2[0];
+    expect(list.elements, hasLength(2));
+    IntegerLiteral first = list.elements[0];
     expect(first.value, 1);
 
-    SpreadElement element = list.elements2[1];
+    SpreadElement element = list.elements[1];
     expect(element.spreadOperator.lexeme, '...?');
     ListLiteral spreadExpression = element.expression;
-    expect(spreadExpression.elements2, hasLength(1));
+    expect(spreadExpression.elements, hasLength(1));
   }
 
   void test_mapLiteral_for() {
     SetOrMapLiteral map = parseCollectionLiteral(
         '{1:7, await for (y in list) 2:3}',
         inAsync: true);
-    expect(map.elements2, hasLength(2));
-    MapLiteralEntry first = map.elements2[0];
+    expect(map.elements, hasLength(2));
+    MapLiteralEntry first = map.elements[0];
     IntegerLiteral firstValue = first.value;
     expect(firstValue.value, 7);
 
-    ForElement second = map.elements2[1];
+    ForElement second = map.elements[1];
     expect(second.awaitKeyword, isNotNull);
     expect(second.forKeyword.isKeyword, isTrue);
     expect(second.leftParenthesis.lexeme, '(');
@@ -346,12 +334,12 @@
     SetOrMapLiteral map = parseCollectionLiteral(
         '{1:7, await for (y in list) if (c) 2:3}',
         inAsync: true);
-    expect(map.elements2, hasLength(2));
-    MapLiteralEntry first = map.elements2[0];
+    expect(map.elements, hasLength(2));
+    MapLiteralEntry first = map.elements[0];
     IntegerLiteral firstValue = first.value;
     expect(firstValue.value, 7);
 
-    ForElement second = map.elements2[1];
+    ForElement second = map.elements[1];
     expect(second.awaitKeyword, isNotNull);
     expect(second.forKeyword.isKeyword, isTrue);
     expect(second.leftParenthesis.lexeme, '(');
@@ -374,12 +362,12 @@
   void test_mapLiteral_forSpread() {
     SetOrMapLiteral map =
         parseCollectionLiteral('{1:7, for (x = 0; x < 10; ++x) ...{2:3}}');
-    expect(map.elements2, hasLength(2));
-    MapLiteralEntry first = map.elements2[0];
+    expect(map.elements, hasLength(2));
+    MapLiteralEntry first = map.elements[0];
     IntegerLiteral firstValue = first.value;
     expect(firstValue.value, 7);
 
-    ForElement second = map.elements2[1];
+    ForElement second = map.elements[1];
     expect(second.awaitKeyword, isNull);
     expect(second.forKeyword.isKeyword, isTrue);
     expect(second.leftParenthesis.lexeme, '(');
@@ -398,12 +386,12 @@
 
   void test_mapLiteral_if() {
     SetOrMapLiteral map = parseCollectionLiteral('{1:1, if (true) 2:4}');
-    expect(map.elements2, hasLength(2));
-    MapLiteralEntry first = map.elements2[0];
+    expect(map.elements, hasLength(2));
+    MapLiteralEntry first = map.elements[0];
     IntegerLiteral firstValue = first.value;
     expect(firstValue.value, 1);
 
-    IfElement second = map.elements2[1];
+    IfElement second = map.elements[1];
     BooleanLiteral condition = second.condition;
     expect(condition.value, isTrue);
     MapLiteralEntry thenElement = second.thenElement;
@@ -415,12 +403,12 @@
   void test_mapLiteral_ifElse() {
     SetOrMapLiteral map =
         parseCollectionLiteral('{1:1, if (true) 2:4 else 5:6}');
-    expect(map.elements2, hasLength(2));
-    MapLiteralEntry first = map.elements2[0];
+    expect(map.elements, hasLength(2));
+    MapLiteralEntry first = map.elements[0];
     IntegerLiteral firstValue = first.value;
     expect(firstValue.value, 1);
 
-    IfElement second = map.elements2[1];
+    IfElement second = map.elements[1];
     BooleanLiteral condition = second.condition;
     expect(condition.value, isTrue);
     MapLiteralEntry thenElement = second.thenElement;
@@ -434,12 +422,12 @@
   void test_mapLiteral_ifElseFor() {
     SetOrMapLiteral map =
         parseCollectionLiteral('{1:1, if (true) 2:4 else for (c in d) 5:6}');
-    expect(map.elements2, hasLength(2));
-    MapLiteralEntry first = map.elements2[0];
+    expect(map.elements, hasLength(2));
+    MapLiteralEntry first = map.elements[0];
     IntegerLiteral firstValue = first.value;
     expect(firstValue.value, 1);
 
-    IfElement second = map.elements2[1];
+    IfElement second = map.elements[1];
     BooleanLiteral condition = second.condition;
     expect(condition.value, isTrue);
     MapLiteralEntry thenElement = second.thenElement;
@@ -458,12 +446,12 @@
   void test_mapLiteral_ifElseSpread() {
     SetOrMapLiteral map =
         parseCollectionLiteral('{1:7, if (true) ...{2:4} else ...?{5:6}}');
-    expect(map.elements2, hasLength(2));
-    MapLiteralEntry first = map.elements2[0];
+    expect(map.elements, hasLength(2));
+    MapLiteralEntry first = map.elements[0];
     IntegerLiteral firstValue = first.value;
     expect(firstValue.value, 7);
 
-    IfElement second = map.elements2[1];
+    IfElement second = map.elements[1];
     BooleanLiteral condition = second.condition;
     expect(condition.value, isTrue);
     SpreadElement thenElement = second.thenElement;
@@ -471,8 +459,8 @@
     SpreadElement elseElement = second.elseElement;
     expect(elseElement.spreadOperator.lexeme, '...?');
     SetOrMapLiteral elseElementExpression = elseElement.expression;
-    expect(elseElementExpression.elements2, hasLength(1));
-    MapLiteralEntry entry = elseElementExpression.elements2[0];
+    expect(elseElementExpression.elements, hasLength(1));
+    MapLiteralEntry entry = elseElementExpression.elements[0];
     IntegerLiteral entryValue = entry.value;
     expect(entryValue.value, 6);
   }
@@ -480,12 +468,12 @@
   void test_mapLiteral_ifFor() {
     SetOrMapLiteral map =
         parseCollectionLiteral('{1:1, if (true) for (a in b) 2:4}');
-    expect(map.elements2, hasLength(2));
-    MapLiteralEntry first = map.elements2[0];
+    expect(map.elements, hasLength(2));
+    MapLiteralEntry first = map.elements[0];
     IntegerLiteral firstValue = first.value;
     expect(firstValue.value, 1);
 
-    IfElement second = map.elements2[1];
+    IfElement second = map.elements[1];
     BooleanLiteral condition = second.condition;
     expect(condition.value, isTrue);
 
@@ -501,12 +489,12 @@
 
   void test_mapLiteral_ifSpread() {
     SetOrMapLiteral map = parseCollectionLiteral('{1:1, if (true) ...{2:4}}');
-    expect(map.elements2, hasLength(2));
-    MapLiteralEntry first = map.elements2[0];
+    expect(map.elements, hasLength(2));
+    MapLiteralEntry first = map.elements[0];
     IntegerLiteral firstValue = first.value;
     expect(firstValue.value, 1);
 
-    IfElement second = map.elements2[1];
+    IfElement second = map.elements[1];
     BooleanLiteral condition = second.condition;
     expect(condition.value, isTrue);
     SpreadElement thenElement = second.thenElement;
@@ -518,48 +506,48 @@
     SetOrMapLiteral map = parseCollectionLiteral('{1: 2, ...{3: 4}}');
     expect(map.constKeyword, isNull);
     expect(map.typeArguments, isNull);
-    expect(map.elements2, hasLength(2));
+    expect(map.elements, hasLength(2));
 
-    SpreadElement element = map.elements2[1];
+    SpreadElement element = map.elements[1];
     expect(element.spreadOperator.lexeme, '...');
     SetOrMapLiteral spreadExpression = element.expression;
-    expect(spreadExpression.elements2, hasLength(1));
+    expect(spreadExpression.elements, hasLength(1));
   }
 
   void test_mapLiteral_spread2_typed() {
     SetOrMapLiteral map = parseCollectionLiteral('<int, int>{1: 2, ...{3: 4}}');
     expect(map.constKeyword, isNull);
     expect(map.typeArguments.arguments, hasLength(2));
-    expect(map.elements2, hasLength(2));
+    expect(map.elements, hasLength(2));
 
-    SpreadElement element = map.elements2[1];
+    SpreadElement element = map.elements[1];
     expect(element.spreadOperator.lexeme, '...');
     SetOrMapLiteral spreadExpression = element.expression;
-    expect(spreadExpression.elements2, hasLength(1));
+    expect(spreadExpression.elements, hasLength(1));
   }
 
   void test_mapLiteral_spread_typed() {
     SetOrMapLiteral map = parseCollectionLiteral('<int, int>{...{3: 4}}');
     expect(map.constKeyword, isNull);
     expect(map.typeArguments.arguments, hasLength(2));
-    expect(map.elements2, hasLength(1));
+    expect(map.elements, hasLength(1));
 
-    SpreadElement element = map.elements2[0];
+    SpreadElement element = map.elements[0];
     expect(element.spreadOperator.lexeme, '...');
     SetOrMapLiteral spreadExpression = element.expression;
-    expect(spreadExpression.elements2, hasLength(1));
+    expect(spreadExpression.elements, hasLength(1));
   }
 
   void test_mapLiteral_spreadQ() {
     SetOrMapLiteral map = parseCollectionLiteral('{1: 2, ...?{3: 4}}');
     expect(map.constKeyword, isNull);
     expect(map.typeArguments, isNull);
-    expect(map.elements2, hasLength(2));
+    expect(map.elements, hasLength(2));
 
-    SpreadElement element = map.elements2[1];
+    SpreadElement element = map.elements[1];
     expect(element.spreadOperator.lexeme, '...?');
     SetOrMapLiteral spreadExpression = element.expression;
-    expect(spreadExpression.elements2, hasLength(1));
+    expect(spreadExpression.elements, hasLength(1));
   }
 
   void test_mapLiteral_spreadQ2_typed() {
@@ -567,33 +555,33 @@
         parseCollectionLiteral('<int, int>{1: 2, ...?{3: 4}}');
     expect(map.constKeyword, isNull);
     expect(map.typeArguments.arguments, hasLength(2));
-    expect(map.elements2, hasLength(2));
+    expect(map.elements, hasLength(2));
 
-    SpreadElement element = map.elements2[1];
+    SpreadElement element = map.elements[1];
     expect(element.spreadOperator.lexeme, '...?');
     SetOrMapLiteral spreadExpression = element.expression;
-    expect(spreadExpression.elements2, hasLength(1));
+    expect(spreadExpression.elements, hasLength(1));
   }
 
   void test_mapLiteral_spreadQ_typed() {
     SetOrMapLiteral map = parseCollectionLiteral('<int, int>{...?{3: 4}}');
     expect(map.constKeyword, isNull);
     expect(map.typeArguments.arguments, hasLength(2));
-    expect(map.elements2, hasLength(1));
+    expect(map.elements, hasLength(1));
 
-    SpreadElement element = map.elements2[0];
+    SpreadElement element = map.elements[0];
     expect(element.spreadOperator.lexeme, '...?');
     SetOrMapLiteral spreadExpression = element.expression;
-    expect(spreadExpression.elements2, hasLength(1));
+    expect(spreadExpression.elements, hasLength(1));
   }
 
   void test_setLiteral_if() {
     SetOrMapLiteral setLiteral = parseCollectionLiteral('{1, if (true) 2}');
-    expect(setLiteral.elements2, hasLength(2));
-    IntegerLiteral first = setLiteral.elements2[0];
+    expect(setLiteral.elements, hasLength(2));
+    IntegerLiteral first = setLiteral.elements[0];
     expect(first.value, 1);
 
-    IfElement second = setLiteral.elements2[1];
+    IfElement second = setLiteral.elements[1];
     BooleanLiteral condition = second.condition;
     expect(condition.value, isTrue);
     IntegerLiteral thenElement = second.thenElement;
@@ -604,11 +592,11 @@
   void test_setLiteral_ifElse() {
     SetOrMapLiteral setLiteral =
         parseCollectionLiteral('{1, if (true) 2 else 5}');
-    expect(setLiteral.elements2, hasLength(2));
-    IntegerLiteral first = setLiteral.elements2[0];
+    expect(setLiteral.elements, hasLength(2));
+    IntegerLiteral first = setLiteral.elements[0];
     expect(first.value, 1);
 
-    IfElement second = setLiteral.elements2[1];
+    IfElement second = setLiteral.elements[1];
     BooleanLiteral condition = second.condition;
     expect(condition.value, isTrue);
     IntegerLiteral thenElement = second.thenElement;
@@ -620,31 +608,31 @@
   void test_setLiteral_ifElseSpread() {
     SetOrMapLiteral setLiteral =
         parseCollectionLiteral('{1, if (true) ...{2} else ...?[5]}');
-    expect(setLiteral.elements2, hasLength(2));
-    IntegerLiteral first = setLiteral.elements2[0];
+    expect(setLiteral.elements, hasLength(2));
+    IntegerLiteral first = setLiteral.elements[0];
     expect(first.value, 1);
 
-    IfElement second = setLiteral.elements2[1];
+    IfElement second = setLiteral.elements[1];
     BooleanLiteral condition = second.condition;
     expect(condition.value, isTrue);
     SpreadElement thenElement = second.thenElement;
     expect(thenElement.spreadOperator.lexeme, '...');
     SetOrMapLiteral theExpression = thenElement.expression;
-    expect(theExpression.elements2, hasLength(1));
+    expect(theExpression.elements, hasLength(1));
     SpreadElement elseElement = second.elseElement;
     expect(elseElement.spreadOperator.lexeme, '...?');
     ListLiteral elseExpression = elseElement.expression;
-    expect(elseExpression.elements2, hasLength(1));
+    expect(elseExpression.elements, hasLength(1));
   }
 
   void test_setLiteral_ifSpread() {
     SetOrMapLiteral setLiteral =
         parseCollectionLiteral('{1, if (true) ...[2]}');
-    expect(setLiteral.elements2, hasLength(2));
-    IntegerLiteral first = setLiteral.elements2[0];
+    expect(setLiteral.elements, hasLength(2));
+    IntegerLiteral first = setLiteral.elements[0];
     expect(first.value, 1);
 
-    IfElement second = setLiteral.elements2[1];
+    IfElement second = setLiteral.elements[1];
     BooleanLiteral condition = second.condition;
     expect(condition.value, isTrue);
     SpreadElement thenElement = second.thenElement;
@@ -656,76 +644,76 @@
     SetOrMapLiteral set = parseCollectionLiteral('{3, ...[4]}');
     expect(set.constKeyword, isNull);
     expect(set.typeArguments, isNull);
-    expect(set.elements2, hasLength(2));
-    IntegerLiteral value = set.elements2[0];
+    expect(set.elements, hasLength(2));
+    IntegerLiteral value = set.elements[0];
     expect(value.value, 3);
 
-    SpreadElement element = set.elements2[1];
+    SpreadElement element = set.elements[1];
     expect(element.spreadOperator.lexeme, '...');
     ListLiteral spreadExpression = element.expression;
-    expect(spreadExpression.elements2, hasLength(1));
+    expect(spreadExpression.elements, hasLength(1));
   }
 
   void test_setLiteral_spread2Q() {
     SetOrMapLiteral set = parseCollectionLiteral('{3, ...?[4]}');
     expect(set.constKeyword, isNull);
     expect(set.typeArguments, isNull);
-    expect(set.elements2, hasLength(2));
-    IntegerLiteral value = set.elements2[0];
+    expect(set.elements, hasLength(2));
+    IntegerLiteral value = set.elements[0];
     expect(value.value, 3);
 
-    SpreadElement element = set.elements2[1];
+    SpreadElement element = set.elements[1];
     expect(element.spreadOperator.lexeme, '...?');
     ListLiteral spreadExpression = element.expression;
-    expect(spreadExpression.elements2, hasLength(1));
+    expect(spreadExpression.elements, hasLength(1));
   }
 
   void test_setLiteral_spread_typed() {
     SetOrMapLiteral set = parseCollectionLiteral('<int>{...[3]}');
     expect(set.constKeyword, isNull);
     expect(set.typeArguments, isNotNull);
-    expect(set.elements2, hasLength(1));
+    expect(set.elements, hasLength(1));
 
-    SpreadElement element = set.elements2[0];
+    SpreadElement element = set.elements[0];
     expect(element.spreadOperator.lexeme, '...');
     ListLiteral spreadExpression = element.expression;
-    expect(spreadExpression.elements2, hasLength(1));
+    expect(spreadExpression.elements, hasLength(1));
   }
 
   void test_setLiteral_spreadQ_typed() {
     SetOrMapLiteral set = parseCollectionLiteral('<int>{...?[3]}');
     expect(set.constKeyword, isNull);
     expect(set.typeArguments, isNotNull);
-    expect(set.elements2, hasLength(1));
+    expect(set.elements, hasLength(1));
 
-    SpreadElement element = set.elements2[0];
+    SpreadElement element = set.elements[0];
     expect(element.spreadOperator.lexeme, '...?');
     ListLiteral spreadExpression = element.expression;
-    expect(spreadExpression.elements2, hasLength(1));
+    expect(spreadExpression.elements, hasLength(1));
   }
 
   void test_setOrMapLiteral_spread() {
     SetOrMapLiteral map = parseCollectionLiteral('{...{3: 4}}');
     expect(map.constKeyword, isNull);
     expect(map.typeArguments, isNull);
-    expect(map.elements2, hasLength(1));
+    expect(map.elements, hasLength(1));
 
-    SpreadElement element = map.elements2[0];
+    SpreadElement element = map.elements[0];
     expect(element.spreadOperator.lexeme, '...');
     SetOrMapLiteral spreadExpression = element.expression;
-    expect(spreadExpression.elements2, hasLength(1));
+    expect(spreadExpression.elements, hasLength(1));
   }
 
   void test_setOrMapLiteral_spreadQ() {
     SetOrMapLiteral map = parseCollectionLiteral('{...?{3: 4}}');
     expect(map.constKeyword, isNull);
     expect(map.typeArguments, isNull);
-    expect(map.elements2, hasLength(1));
+    expect(map.elements, hasLength(1));
 
-    SpreadElement element = map.elements2[0];
+    SpreadElement element = map.elements[0];
     expect(element.spreadOperator.lexeme, '...?');
     SetOrMapLiteral spreadExpression = element.expression;
-    expect(spreadExpression.elements2, hasLength(1));
+    expect(spreadExpression.elements, hasLength(1));
   }
 }
 
@@ -803,16 +791,6 @@
 @reflectiveTest
 class ErrorParserTest_Fasta extends FastaParserTestCase
     with ErrorParserTestMixin {
-  void test_await_missing_async_issue36048() {
-    parseCompilationUnit('''
-main() { // missing async
-  await foo();
-}
-''', errors: [
-      expectedError(CompileTimeErrorCode.AWAIT_IN_WRONG_CONTEXT, 28, 5)
-    ]);
-  }
-
   void test_await_missing_async2_issue36048() {
     parseCompilationUnit('''
 main() { // missing async
@@ -843,6 +821,49 @@
     ]);
   }
 
+  void test_await_missing_async_issue36048() {
+    parseCompilationUnit('''
+main() { // missing async
+  await foo();
+}
+''', errors: [
+      expectedError(CompileTimeErrorCode.AWAIT_IN_WRONG_CONTEXT, 28, 5)
+    ]);
+  }
+
+  void test_constructor_super_field() {
+    // https://github.com/dart-lang/sdk/issues/36262
+    // https://github.com/dart-lang/sdk/issues/31198
+    parseCompilationUnit('class B extends A { B(): super().foo {} }', errors: [
+      expectedError(ParserErrorCode.INVALID_SUPER_IN_INITIALIZER, 25, 5),
+    ]);
+  }
+
+  void test_constructor_super_method() {
+    // https://github.com/dart-lang/sdk/issues/36262
+    // https://github.com/dart-lang/sdk/issues/31198
+    parseCompilationUnit('class B extends A { B(): super().foo() {} }',
+        errors: [
+          expectedError(ParserErrorCode.INVALID_SUPER_IN_INITIALIZER, 25, 5),
+        ]);
+  }
+
+  void test_constructor_this_field() {
+    // https://github.com/dart-lang/sdk/issues/36262
+    // https://github.com/dart-lang/sdk/issues/31198
+    parseCompilationUnit('class B extends A { B(): this().foo; }', errors: [
+      expectedError(ParserErrorCode.INVALID_THIS_IN_INITIALIZER, 25, 4),
+    ]);
+  }
+
+  void test_constructor_this_method() {
+    // https://github.com/dart-lang/sdk/issues/36262
+    // https://github.com/dart-lang/sdk/issues/31198
+    parseCompilationUnit('class B extends A { B(): this().foo(); }', errors: [
+      expectedError(ParserErrorCode.INVALID_THIS_IN_INITIALIZER, 25, 4),
+    ]);
+  }
+
   @override
   void test_expectedListOrMapLiteral() {
     // The fasta parser returns an 'IntegerLiteralImpl' when parsing '1'.
@@ -907,13 +928,28 @@
 @reflectiveTest
 class ExpressionParserTest_Fasta extends FastaParserTestCase
     with ExpressionParserTestMixin {
+  void test_binaryExpression_allOperators() {
+    // https://github.com/dart-lang/sdk/issues/36255
+    for (TokenType type in TokenType.all) {
+      if (type.precedence > 0) {
+        var source = 'a ${type.lexeme} b';
+        try {
+          parseExpression(source);
+        } on TestFailure {
+          // Ensure that there are no infinite loops or exceptions thrown
+          // by the parser. Test failures are fine.
+        }
+      }
+    }
+  }
+
   void test_listLiteral_spread() {
     // TODO(danrubel): Remove this once spread_collections is enabled by default
     ListLiteral list = parseExpression('[1, ...[2]]', errors: [
       expectedError(ParserErrorCode.EXPERIMENT_NOT_ENABLED, 4, 3),
     ]);
-    expect(list.elements2, hasLength(1));
-    IntegerLiteral first = list.elements2[0];
+    expect(list.elements, hasLength(1));
+    IntegerLiteral first = list.elements[0];
     expect(first.value, 1);
   }
 
@@ -922,8 +958,8 @@
     ListLiteral list = parseExpression('[1, ...?[2]]', errors: [
       expectedError(ParserErrorCode.EXPERIMENT_NOT_ENABLED, 4, 4),
     ]);
-    expect(list.elements2, hasLength(1));
-    IntegerLiteral first = list.elements2[0];
+    expect(list.elements, hasLength(1));
+    IntegerLiteral first = list.elements[0];
     expect(first.value, 1);
   }
 
@@ -931,8 +967,8 @@
     SetOrMapLiteral map = parseExpression('{3: 6}');
     expect(map.constKeyword, isNull);
     expect(map.typeArguments, isNull);
-    expect(map.elements2, hasLength(1));
-    MapLiteralEntry entry = map.elements2[0];
+    expect(map.elements, hasLength(1));
+    MapLiteralEntry entry = map.elements[0];
     IntegerLiteral key = entry.key;
     expect(key.value, 3);
     IntegerLiteral value = entry.value;
@@ -943,8 +979,8 @@
     SetOrMapLiteral map = parseExpression('const {3: 6}');
     expect(map.constKeyword, isNotNull);
     expect(map.typeArguments, isNull);
-    expect(map.elements2, hasLength(1));
-    MapLiteralEntry entry = map.elements2[0];
+    expect(map.elements, hasLength(1));
+    MapLiteralEntry entry = map.elements[0];
     IntegerLiteral key = entry.key;
     expect(key.value, 3);
     IntegerLiteral value = entry.value;
@@ -958,7 +994,7 @@
     ]);
     expect(map.constKeyword, isNull);
     expect(map.typeArguments.arguments, hasLength(2));
-    expect(map.elements2, hasLength(1));
+    expect(map.elements, hasLength(1));
   }
 
   @failingTest
@@ -973,7 +1009,7 @@
           3),
     ]);
     expect(map.constKeyword, isNull);
-    expect(map.elements2, hasLength(0));
+    expect(map.elements, hasLength(0));
   }
 
   @failingTest
@@ -988,7 +1024,7 @@
           3),
     ]);
     expect(map.constKeyword, isNull);
-    expect(map.elements2, hasLength(0));
+    expect(map.elements, hasLength(0));
   }
 
   void test_mapLiteral_spread() {
@@ -998,7 +1034,7 @@
     ]);
     expect(map.constKeyword, isNull);
     expect(map.typeArguments, isNull);
-    expect(map.elements2, hasLength(1));
+    expect(map.elements, hasLength(1));
   }
 
   void test_mapLiteral_spread2_typed() {
@@ -1009,7 +1045,7 @@
     ]);
     expect(map.constKeyword, isNull);
     expect(map.typeArguments.arguments, hasLength(2));
-    expect(map.elements2, hasLength(1));
+    expect(map.elements, hasLength(1));
   }
 
   void test_mapLiteral_spread_typed() {
@@ -1019,7 +1055,7 @@
     ]);
     expect(map.constKeyword, isNull);
     expect(map.typeArguments.arguments, hasLength(2));
-    expect(map.elements2, hasLength(0));
+    expect(map.elements, hasLength(0));
   }
 
   void test_mapLiteral_spreadQ() {
@@ -1029,7 +1065,7 @@
     ]);
     expect(map.constKeyword, isNull);
     expect(map.typeArguments, isNull);
-    expect(map.elements2, hasLength(1));
+    expect(map.elements, hasLength(1));
   }
 
   void test_mapLiteral_spreadQ2_typed() {
@@ -1040,7 +1076,7 @@
     ]);
     expect(map.constKeyword, isNull);
     expect(map.typeArguments.arguments, hasLength(2));
-    expect(map.elements2, hasLength(1));
+    expect(map.elements, hasLength(1));
   }
 
   void test_mapLiteral_spreadQ_typed() {
@@ -1050,7 +1086,7 @@
     ]);
     expect(map.constKeyword, isNull);
     expect(map.typeArguments.arguments, hasLength(2));
-    expect(map.elements2, hasLength(0));
+    expect(map.elements, hasLength(0));
   }
 
   @override
@@ -1075,8 +1111,8 @@
     SetOrMapLiteral set = parseExpression('{3}');
     expect(set.constKeyword, isNull);
     expect(set.typeArguments, isNull);
-    expect(set.elements2, hasLength(1));
-    IntegerLiteral value = set.elements2[0];
+    expect(set.elements, hasLength(1));
+    IntegerLiteral value = set.elements[0];
     expect(value.value, 3);
   }
 
@@ -1084,10 +1120,10 @@
     SetOrMapLiteral set = parseExpression('const {3, 6}');
     expect(set.constKeyword, isNotNull);
     expect(set.typeArguments, isNull);
-    expect(set.elements2, hasLength(2));
-    IntegerLiteral value1 = set.elements2[0];
+    expect(set.elements, hasLength(2));
+    IntegerLiteral value1 = set.elements[0];
     expect(value1.value, 3);
-    IntegerLiteral value2 = set.elements2[1];
+    IntegerLiteral value2 = set.elements[1];
     expect(value2.value, 6);
   }
 
@@ -1097,8 +1133,8 @@
     expect(set.typeArguments.arguments, hasLength(1));
     NamedType typeArg = set.typeArguments.arguments[0];
     expect(typeArg.name.name, 'int');
-    expect(set.elements2.length, 1);
-    IntegerLiteral value = set.elements2[0];
+    expect(set.elements.length, 1);
+    IntegerLiteral value = set.elements[0];
     expect(value.value, 3);
   }
 
@@ -1110,7 +1146,7 @@
     expect(set.typeArguments.arguments, hasLength(1));
     NamedType typeArg = set.typeArguments.arguments[0];
     expect(typeArg.name.name, 'int');
-    expect(set.elements2.length, 1);
+    expect(set.elements.length, 1);
   }
 
   void test_setLiteral_nested_typeArgument() {
@@ -1122,10 +1158,10 @@
     expect(typeArg1.typeArguments.arguments, hasLength(1));
     NamedType typeArg2 = typeArg1.typeArguments.arguments[0];
     expect(typeArg2.name.name, 'int');
-    expect(set.elements2.length, 1);
-    SetOrMapLiteral intSet = set.elements2[0];
-    expect(intSet.elements2, hasLength(1));
-    IntegerLiteral value = intSet.elements2[0];
+    expect(set.elements.length, 1);
+    SetOrMapLiteral intSet = set.elements[0];
+    expect(intSet.elements, hasLength(1));
+    IntegerLiteral value = intSet.elements[0];
     expect(value.value, 3);
   }
 
@@ -1135,8 +1171,8 @@
         errors: [expectedError(ParserErrorCode.EXPERIMENT_NOT_ENABLED, 4, 3)]);
     expect(set.constKeyword, isNull);
     expect(set.typeArguments, isNull);
-    expect(set.elements2, hasLength(1));
-    IntegerLiteral value = set.elements2[0];
+    expect(set.elements, hasLength(1));
+    IntegerLiteral value = set.elements[0];
     expect(value.value, 3);
   }
 
@@ -1146,8 +1182,8 @@
         errors: [expectedError(ParserErrorCode.EXPERIMENT_NOT_ENABLED, 4, 4)]);
     expect(set.constKeyword, isNull);
     expect(set.typeArguments, isNull);
-    expect(set.elements2, hasLength(1));
-    IntegerLiteral value = set.elements2[0];
+    expect(set.elements, hasLength(1));
+    IntegerLiteral value = set.elements[0];
     expect(value.value, 3);
   }
 
@@ -1157,7 +1193,7 @@
         errors: [expectedError(ParserErrorCode.EXPERIMENT_NOT_ENABLED, 6, 3)]);
     expect(set.constKeyword, isNull);
     expect(set.typeArguments, isNotNull);
-    expect(set.elements2, hasLength(0));
+    expect(set.elements, hasLength(0));
   }
 
   void test_setLiteral_spreadQ_typed() {
@@ -1166,7 +1202,7 @@
         errors: [expectedError(ParserErrorCode.EXPERIMENT_NOT_ENABLED, 6, 4)]);
     expect(set.constKeyword, isNull);
     expect(set.typeArguments, isNotNull);
-    expect(set.elements2, hasLength(0));
+    expect(set.elements, hasLength(0));
   }
 
   void test_setLiteral_typed() {
@@ -1175,8 +1211,8 @@
     expect(set.typeArguments.arguments, hasLength(1));
     NamedType typeArg = set.typeArguments.arguments[0];
     expect(typeArg.name.name, 'int');
-    expect(set.elements2.length, 1);
-    IntegerLiteral value = set.elements2[0];
+    expect(set.elements.length, 1);
+    IntegerLiteral value = set.elements[0];
     expect(value.value, 3);
   }
 
@@ -1186,7 +1222,7 @@
         errors: [expectedError(ParserErrorCode.EXPERIMENT_NOT_ENABLED, 1, 3)]);
     expect(map.constKeyword, isNull);
     expect(map.typeArguments, isNull);
-    expect(map.elements2, hasLength(0));
+    expect(map.elements, hasLength(0));
   }
 
   void test_setOrMapLiteral_spreadQ() {
@@ -1195,7 +1231,7 @@
         errors: [expectedError(ParserErrorCode.EXPERIMENT_NOT_ENABLED, 1, 4)]);
     expect(map.constKeyword, isNull);
     expect(map.typeArguments, isNull);
-    expect(map.elements2, hasLength(0));
+    expect(map.elements, hasLength(0));
   }
 }
 
@@ -1358,12 +1394,16 @@
   CompilationUnit parseCompilationUnit(String content,
       {List<ErrorCode> codes,
       List<ExpectedError> errors,
-      bool enableControlFlowCollections}) {
+      bool enableControlFlowCollections,
+      bool enableGtGtGt,
+      bool enableGtGtGtEq}) {
     GatheringErrorListener listener =
         new GatheringErrorListener(checkRanges: true);
 
     CompilationUnit unit = parseCompilationUnit2(content, listener,
-        enableControlFlowCollections: enableControlFlowCollections);
+        enableControlFlowCollections: enableControlFlowCollections,
+        enableGtGtGt: enableGtGtGt,
+        enableGtGtGtEq: enableGtGtGtEq);
 
     // Assert and return result
     if (codes != null) {
@@ -1379,7 +1419,9 @@
 
   CompilationUnit parseCompilationUnit2(
       String content, GatheringErrorListener listener,
-      {bool enableControlFlowCollections}) {
+      {bool enableControlFlowCollections,
+      bool enableGtGtGt,
+      bool enableGtGtGtEq}) {
     var source = new StringSource(content, 'parser_test_StringSource.dart');
 
     void reportError(
@@ -1389,7 +1431,10 @@
     }
 
     // Scan tokens
-    ScannerResult result = scanString(content, includeComments: true);
+    ScannerResult result = scanString(content,
+        includeComments: true,
+        enableGtGtGt: enableGtGtGt ?? enableGtGtGtEq ?? false,
+        enableGtGtGtEq: enableGtGtGtEq ?? false);
     Token token = result.tokens;
     if (result.hasErrors) {
       // The default recovery strategy used by scanString
@@ -1411,6 +1456,8 @@
     if (enableControlFlowCollections != null) {
       astBuilder.enableControlFlowCollections = enableControlFlowCollections;
     }
+    astBuilder.enableTripleShift =
+        enableGtGtGt == true || enableGtGtGtEq == true;
     parser.parseUnit(_fastaTokens);
     CompilationUnitImpl unit = astBuilder.pop();
     unit.localDeclarations = astBuilder.localDeclarations;
@@ -1479,7 +1526,7 @@
   @override
   List<Expression> parseExpressionList(String code) {
     return (_parseExpression('[$code]') as ListLiteral)
-        .elements2
+        .elements
         .toList()
         .cast<Expression>();
   }
@@ -1587,7 +1634,7 @@
   @override
   MapLiteralEntry parseMapLiteralEntry(String code) {
     var mapLiteral = parseMapLiteral(null, null, '{ $code }');
-    return mapLiteral.elements2.single;
+    return mapLiteral.elements.single;
   }
 
   @override
@@ -2223,7 +2270,7 @@
   }
 
   void test_incompleteForEach2() {
-    ForStatement2 statement = parseStatement('for (String item i) {}',
+    ForStatement statement = parseStatement('for (String item i) {}',
         parseControlFlowCollections: true);
     listener.assertErrors([
       expectedError(ParserErrorCode.EXPECTED_TOKEN, 12, 4),
@@ -2341,7 +2388,7 @@
   }
 
   void test_parseForStatement_each_await2() {
-    ForStatement2 forStatement = parseStatement(
+    ForStatement forStatement = parseStatement(
       'await for (element in list) {}',
       inAsync: true,
       parseControlFlowCollections: true,
@@ -2359,7 +2406,7 @@
   }
 
   void test_parseForStatement_each_genericFunctionType2() {
-    ForStatement2 forStatement = parseStatement(
+    ForStatement forStatement = parseStatement(
       'for (void Function<T>(T) element in list) {}',
       parseControlFlowCollections: true,
     );
@@ -2376,7 +2423,7 @@
   }
 
   void test_parseForStatement_each_identifier2() {
-    ForStatement2 forStatement = parseStatement(
+    ForStatement forStatement = parseStatement(
       'for (element in list) {}',
       parseControlFlowCollections: true,
     );
@@ -2393,7 +2440,7 @@
   }
 
   void test_parseForStatement_each_noType_metadata2() {
-    ForStatement2 forStatement = parseStatement(
+    ForStatement forStatement = parseStatement(
       'for (@A var element in list) {}',
       parseControlFlowCollections: true,
     );
@@ -2411,7 +2458,7 @@
   }
 
   void test_parseForStatement_each_type2() {
-    ForStatement2 forStatement = parseStatement(
+    ForStatement forStatement = parseStatement(
       'for (A element in list) {}',
       parseControlFlowCollections: true,
     );
@@ -2428,7 +2475,7 @@
   }
 
   void test_parseForStatement_each_var2() {
-    ForStatement2 forStatement = parseStatement(
+    ForStatement forStatement = parseStatement(
       'for (var element in list) {}',
       parseControlFlowCollections: true,
     );
@@ -2445,7 +2492,7 @@
   }
 
   void test_parseForStatement_loop_c2() {
-    ForStatement2 forStatement = parseStatement(
+    ForStatement forStatement = parseStatement(
       'for (; i < count;) {}',
       parseControlFlowCollections: true,
     );
@@ -2463,7 +2510,7 @@
   }
 
   void test_parseForStatement_loop_cu2() {
-    ForStatement2 forStatement = parseStatement(
+    ForStatement forStatement = parseStatement(
       'for (; i < count; i++) {}',
       parseControlFlowCollections: true,
     );
@@ -2481,7 +2528,7 @@
   }
 
   void test_parseForStatement_loop_ecu2() {
-    ForStatement2 forStatement = parseStatement(
+    ForStatement forStatement = parseStatement(
       'for (i--; i < count; i++) {}',
       parseSpreadCollections: true,
     );
@@ -2499,7 +2546,7 @@
   }
 
   void test_parseForStatement_loop_i2() {
-    ForStatement2 forStatement = parseStatement(
+    ForStatement forStatement = parseStatement(
       'for (var i = 0;;) {}',
       parseSpreadCollections: true,
     );
@@ -2520,7 +2567,7 @@
   }
 
   void test_parseForStatement_loop_i_withMetadata2() {
-    ForStatement2 forStatement = parseStatement(
+    ForStatement forStatement = parseStatement(
       'for (@A var i = 0;;) {}',
       parseSpreadCollections: true,
     );
@@ -2541,7 +2588,7 @@
   }
 
   void test_parseForStatement_loop_ic2() {
-    ForStatement2 forStatement = parseStatement(
+    ForStatement forStatement = parseStatement(
       'for (var i = 0; i < count;) {}',
       parseSpreadCollections: true,
     );
@@ -2561,7 +2608,7 @@
   }
 
   void test_parseForStatement_loop_icu2() {
-    ForStatement2 forStatement = parseStatement(
+    ForStatement forStatement = parseStatement(
       'for (var i = 0; i < count; i++) {}',
       parseSpreadCollections: true,
     );
@@ -2581,7 +2628,7 @@
   }
 
   void test_parseForStatement_loop_iicuu2() {
-    ForStatement2 forStatement = parseStatement(
+    ForStatement forStatement = parseStatement(
       'for (int i = 0, j = count; i < j; i++, j--) {}',
       parseSpreadCollections: true,
     );
@@ -2601,7 +2648,7 @@
   }
 
   void test_parseForStatement_loop_iu2() {
-    ForStatement2 forStatement = parseStatement(
+    ForStatement forStatement = parseStatement(
       'for (var i = 0;; i++) {}',
       parseSpreadCollections: true,
     );
@@ -2621,7 +2668,7 @@
   }
 
   void test_parseForStatement_loop_u2() {
-    ForStatement2 forStatement = parseStatement(
+    ForStatement forStatement = parseStatement(
       'for (;; i++) {}',
       parseSpreadCollections: true,
     );
diff --git a/pkg/analyzer/test/generated/parser_test.dart b/pkg/analyzer/test/generated/parser_test.dart
index 2dc3f7a..fae0a92 100644
--- a/pkg/analyzer/test/generated/parser_test.dart
+++ b/pkg/analyzer/test/generated/parser_test.dart
@@ -1,4 +1,4 @@
-// Copyright (c) 2014, the Dart project authors.  Please see the AUTHORS file
+// Copyright (c) 2014, the Dart project authors. Please see the AUTHORS file
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
 
@@ -3000,11 +3000,8 @@
   }
 
   void test_expectedInterpolationIdentifier() {
-    StringLiteral literal = parseExpression("'\$x\$'", errors: [
-      usingFastaParser
-          ? expectedError(ScannerErrorCode.UNEXPECTED_DOLLAR_IN_STRING, 4, 1)
-          : expectedError(ScannerErrorCode.MISSING_IDENTIFIER, 4, 1)
-    ]);
+    StringLiteral literal = parseExpression("'\$x\$'",
+        errors: [expectedError(ScannerErrorCode.MISSING_IDENTIFIER, 4, 1)]);
     expectNotNullIfNoErrors(literal);
   }
 
@@ -3012,11 +3009,8 @@
     // The scanner inserts an empty string token between the two $'s; we need to
     // make sure that the MISSING_IDENTIFIER error that is generated has a
     // nonzero width so that it will show up in the editor UI.
-    StringLiteral literal = parseExpression("'\$\$foo'", errors: [
-      usingFastaParser
-          ? expectedError(ScannerErrorCode.UNEXPECTED_DOLLAR_IN_STRING, 2, 1)
-          : expectedError(ScannerErrorCode.MISSING_IDENTIFIER, 2, 1)
-    ]);
+    StringLiteral literal = parseExpression("'\$\$foo'",
+        errors: [expectedError(ScannerErrorCode.MISSING_IDENTIFIER, 2, 1)]);
     expectNotNullIfNoErrors(literal);
   }
 
@@ -3949,11 +3943,8 @@
   }
 
   void test_invalidInterpolationIdentifier_startWithDigit() {
-    StringLiteral literal = parseExpression("'\$1'", errors: [
-      usingFastaParser
-          ? expectedError(ScannerErrorCode.UNEXPECTED_DOLLAR_IN_STRING, 2, 1)
-          : expectedError(ScannerErrorCode.MISSING_IDENTIFIER, 2, 1)
-    ]);
+    StringLiteral literal = parseExpression("'\$1'",
+        errors: [expectedError(ScannerErrorCode.MISSING_IDENTIFIER, 2, 1)]);
     expectNotNullIfNoErrors(literal);
   }
 
@@ -4707,18 +4698,16 @@
     createParser('(a, {b: 0)');
     FormalParameterList list = parser.parseFormalParameterList();
     expectNotNullIfNoErrors(list);
-    listener.assertErrors(usingFastaParser
-        ? [expectedError(ParserErrorCode.EXPECTED_TOKEN, 4, 1)]
-        : [expectedError(ScannerErrorCode.EXPECTED_TOKEN, 9, 1)]);
+    listener
+        .assertErrors([expectedError(ScannerErrorCode.EXPECTED_TOKEN, 9, 1)]);
   }
 
   void test_missingTerminatorForParameterGroup_optional() {
     createParser('(a, [b = 0)');
     FormalParameterList list = parser.parseFormalParameterList();
     expectNotNullIfNoErrors(list);
-    listener.assertErrors(usingFastaParser
-        ? [expectedError(ParserErrorCode.EXPECTED_TOKEN, 4, 1)]
-        : [expectedError(ScannerErrorCode.EXPECTED_TOKEN, 10, 1)]);
+    listener
+        .assertErrors([expectedError(ScannerErrorCode.EXPECTED_TOKEN, 10, 1)]);
   }
 
   void test_missingTypedefParameters_nonVoid() {
@@ -5708,7 +5697,7 @@
     if (usingFastaParser) {
       listener.assertErrors([
         expectedError(ParserErrorCode.EXPECTED_TOKEN, 9, 1),
-        expectedError(ParserErrorCode.EXPECTED_TOKEN, 4, 1)
+        expectedError(ScannerErrorCode.EXPECTED_TOKEN, 10, 1)
       ]);
     } else {
       listener.assertErrors([
@@ -5727,7 +5716,7 @@
     if (usingFastaParser) {
       listener.assertErrors([
         expectedError(ParserErrorCode.EXPECTED_TOKEN, 9, 1),
-        expectedError(ParserErrorCode.EXPECTED_TOKEN, 4, 1)
+        expectedError(ScannerErrorCode.EXPECTED_TOKEN, 10, 1)
       ]);
     } else {
       listener.assertErrors([
@@ -6278,7 +6267,7 @@
     expect(literal.constKeyword, isNotNull);
     expect(literal.typeArguments, isNotNull);
     expect(literal.leftBracket, isNotNull);
-    expect(literal.elements2, hasLength(0));
+    expect(literal.elements, hasLength(0));
     expect(literal.rightBracket, isNotNull);
   }
 
@@ -6290,7 +6279,7 @@
     expect(literal.constKeyword, isNotNull);
     expect(literal.typeArguments, isNull);
     expect(literal.leftBracket, isNotNull);
-    expect(literal.elements2, hasLength(0));
+    expect(literal.elements, hasLength(0));
     expect(literal.rightBracket, isNotNull);
   }
 
@@ -6300,7 +6289,7 @@
     assertNoErrors();
     var literal = expression as SetOrMapLiteral;
     expect(literal.leftBracket, isNotNull);
-    expect(literal.elements2, hasLength(0));
+    expect(literal.elements, hasLength(0));
     expect(literal.rightBracket, isNotNull);
     expect(literal.typeArguments, isNotNull);
   }
@@ -6311,7 +6300,7 @@
     expect(expression, isNotNull);
     var literal = expression as SetOrMapLiteral;
     expect(literal.leftBracket, isNotNull);
-    expect(literal.elements2, hasLength(0));
+    expect(literal.elements, hasLength(0));
     expect(literal.rightBracket, isNotNull);
     expect(literal.typeArguments, isNotNull);
   }
@@ -6322,7 +6311,7 @@
     assertNoErrors();
     var literal = expression as SetOrMapLiteral;
     expect(literal.leftBracket, isNotNull);
-    expect(literal.elements2, hasLength(0));
+    expect(literal.elements, hasLength(0));
     expect(literal.rightBracket, isNotNull);
     expect(literal.typeArguments, isNull);
   }
@@ -6813,7 +6802,7 @@
     expect(literal.constKeyword.keyword, Keyword.CONST);
     expect(literal.typeArguments, isNull);
     expect(literal.leftBracket, isNotNull);
-    expect(literal.elements2, hasLength(0));
+    expect(literal.elements, hasLength(0));
     expect(literal.rightBracket, isNotNull);
   }
 
@@ -6826,7 +6815,7 @@
     Token leftBracket = literal.leftBracket;
     expect(leftBracket, isNotNull);
     expect(leftBracket.precedingComments, isNotNull);
-    expect(literal.elements2, hasLength(0));
+    expect(literal.elements, hasLength(0));
     expect(literal.rightBracket, isNotNull);
   }
 
@@ -6838,7 +6827,7 @@
     expect(literal.constKeyword.keyword, Keyword.CONST);
     expect(literal.typeArguments, isNull);
     expect(literal.leftBracket, isNotNull);
-    expect(literal.elements2, hasLength(0));
+    expect(literal.elements, hasLength(0));
     expect(literal.rightBracket, isNotNull);
   }
 
@@ -6849,7 +6838,7 @@
     expect(literal.constKeyword, isNull);
     expect(literal.typeArguments, isNull);
     expect(literal.leftBracket, isNotNull);
-    expect(literal.elements2, hasLength(3));
+    expect(literal.elements, hasLength(3));
     expect(literal.rightBracket, isNotNull);
   }
 
@@ -6860,7 +6849,7 @@
     expect(literal.constKeyword, isNull);
     expect(literal.typeArguments, isNull);
     expect(literal.leftBracket, isNotNull);
-    expect(literal.elements2, hasLength(1));
+    expect(literal.elements, hasLength(1));
     expect(literal.rightBracket, isNotNull);
   }
 
@@ -6871,7 +6860,7 @@
     expect(literal.constKeyword, isNull);
     expect(literal.typeArguments, isNotNull);
     expect(literal.leftBracket, isNotNull);
-    expect(literal.elements2, hasLength(1));
+    expect(literal.elements, hasLength(1));
     expect(literal.rightBracket, isNotNull);
   }
 
@@ -6883,7 +6872,7 @@
     expect(listLiteral.constKeyword, isNull);
     expect(listLiteral.typeArguments, isNull);
     expect(listLiteral.leftBracket, isNotNull);
-    expect(listLiteral.elements2, hasLength(1));
+    expect(listLiteral.elements, hasLength(1));
     expect(listLiteral.rightBracket, isNotNull);
   }
 
@@ -6895,7 +6884,7 @@
     expect(listLiteral.constKeyword, isNull);
     expect(listLiteral.typeArguments, isNotNull);
     expect(listLiteral.leftBracket, isNotNull);
-    expect(listLiteral.elements2, hasLength(1));
+    expect(listLiteral.elements, hasLength(1));
     expect(listLiteral.rightBracket, isNotNull);
   }
 
@@ -6907,7 +6896,7 @@
     expect(mapLiteral.constKeyword, isNull);
     expect(mapLiteral.typeArguments, isNull);
     expect(mapLiteral.leftBracket, isNotNull);
-    expect(mapLiteral.elements2, hasLength(1));
+    expect(mapLiteral.elements, hasLength(1));
     expect(mapLiteral.rightBracket, isNotNull);
   }
 
@@ -6920,7 +6909,7 @@
     expect(mapLiteral.constKeyword, isNull);
     expect(mapLiteral.typeArguments, isNotNull);
     expect(mapLiteral.leftBracket, isNotNull);
-    expect(mapLiteral.elements2, hasLength(1));
+    expect(mapLiteral.elements, hasLength(1));
     expect(mapLiteral.rightBracket, isNotNull);
   }
 
@@ -6954,7 +6943,7 @@
     expect(literal.constKeyword.keyword, Keyword.CONST);
     expect(literal.typeArguments, isNotNull);
     expect(literal.leftBracket, isNotNull);
-    expect(literal.elements2, hasLength(0));
+    expect(literal.elements, hasLength(0));
     expect(literal.rightBracket, isNotNull);
   }
 
@@ -6963,7 +6952,7 @@
     expect(literal, isNotNull);
     assertNoErrors();
     expect(literal.leftBracket, isNotNull);
-    expect(literal.elements2, hasLength(2));
+    expect(literal.elements, hasLength(2));
     expect(literal.rightBracket, isNotNull);
   }
 
@@ -6973,7 +6962,7 @@
     expect(literal, isNotNull);
     assertNoErrors();
     expect(literal.leftBracket, isNotNull);
-    expect(literal.elements2, hasLength(2));
+    expect(literal.elements, hasLength(2));
     expect(literal.rightBracket, isNotNull);
   }
 
@@ -6982,7 +6971,7 @@
     expect(literal, isNotNull);
     assertNoErrors();
     expect(literal.leftBracket, isNotNull);
-    expect(literal.elements2, hasLength(1));
+    expect(literal.elements, hasLength(1));
     expect(literal.rightBracket, isNotNull);
   }
 
@@ -9555,7 +9544,7 @@
     if (usingFastaParser) {
       createParser('[$code]');
       return (parser.parseExpression2() as ListLiteral)
-          .elements2
+          .elements
           .toList()
           .cast<Expression>();
     } else {
@@ -9721,7 +9710,7 @@
   MapLiteralEntry parseMapLiteralEntry(String code) {
     if (usingFastaParser) {
       var mapLiteral = parseMapLiteral(null, null, '{ $code }');
-      return mapLiteral.elements2.single;
+      return mapLiteral.elements.single;
     } else {
       createParser(code);
       return parser.parseMapLiteralEntry();
@@ -10876,7 +10865,7 @@
   void test_incompleteForEach() {
     // TODO(danrubel): remove this once control flow and spread collection
     // entry parsing is enabled by default
-    ForStatement2 statement = parseStatement('for (String item i) {}');
+    ForStatement statement = parseStatement('for (String item i) {}');
     listener.assertErrors([
       expectedError(ParserErrorCode.EXPECTED_TOKEN, 12, 4),
       expectedError(ParserErrorCode.EXPECTED_TOKEN, 17, 1)
@@ -14648,7 +14637,7 @@
     // TODO(danrubel): remove this once control flow and spread collection
     // entry parsing is enabled by default
     String code = 'await for (element in list) {}';
-    var forStatement = _parseAsyncStatement(code) as ForStatement2;
+    var forStatement = _parseAsyncStatement(code) as ForStatement;
     assertNoErrors();
     expect(forStatement.awaitKeyword, usingFastaParser ? isNotNull : isNull);
     expect(forStatement.forKeyword, isNotNull);
@@ -14666,7 +14655,7 @@
     // entry parsing is enabled by default
     var forStatement =
         parseStatement('for (void Function<T>(T) element in list) {}')
-            as ForStatement2;
+            as ForStatement;
     assertNoErrors();
     expect(forStatement.awaitKeyword, isNull);
     expect(forStatement.forKeyword, isNotNull);
@@ -14683,7 +14672,7 @@
     // TODO(danrubel): remove this once control flow and spread collection
     // entry parsing is enabled by default
     var forStatement =
-        parseStatement('for (element in list) {}') as ForStatement2;
+        parseStatement('for (element in list) {}') as ForStatement;
     assertNoErrors();
     expect(forStatement.awaitKeyword, isNull);
     expect(forStatement.forKeyword, isNotNull);
@@ -14700,7 +14689,7 @@
     // TODO(danrubel): remove this once control flow and spread collection
     // entry parsing is enabled by default
     var forStatement =
-        parseStatement('for (@A var element in list) {}') as ForStatement2;
+        parseStatement('for (@A var element in list) {}') as ForStatement;
     assertNoErrors();
     expect(forStatement.awaitKeyword, isNull);
     expect(forStatement.forKeyword, isNotNull);
@@ -14718,7 +14707,7 @@
     // TODO(danrubel): remove this once control flow and spread collection
     // entry parsing is enabled by default
     var forStatement =
-        parseStatement('for (A element in list) {}') as ForStatement2;
+        parseStatement('for (A element in list) {}') as ForStatement;
     assertNoErrors();
     expect(forStatement.awaitKeyword, isNull);
     expect(forStatement.forKeyword, isNotNull);
@@ -14735,7 +14724,7 @@
     // TODO(danrubel): remove this once control flow and spread collection
     // entry parsing is enabled by default
     var forStatement =
-        parseStatement('for (var element in list) {}') as ForStatement2;
+        parseStatement('for (var element in list) {}') as ForStatement;
     assertNoErrors();
     expect(forStatement.awaitKeyword, isNull);
     expect(forStatement.forKeyword, isNotNull);
@@ -14751,7 +14740,7 @@
   void test_parseForStatement_loop_c() {
     // TODO(danrubel): remove this once control flow and spread collection
     // entry parsing is enabled by default
-    var forStatement = parseStatement('for (; i < count;) {}') as ForStatement2;
+    var forStatement = parseStatement('for (; i < count;) {}') as ForStatement;
     assertNoErrors();
     expect(forStatement.forKeyword, isNotNull);
     expect(forStatement.leftParenthesis, isNotNull);
@@ -14769,7 +14758,7 @@
     // TODO(danrubel): remove this once control flow and spread collection
     // entry parsing is enabled by default
     var forStatement =
-        parseStatement('for (; i < count; i++) {}') as ForStatement2;
+        parseStatement('for (; i < count; i++) {}') as ForStatement;
     assertNoErrors();
     expect(forStatement.forKeyword, isNotNull);
     expect(forStatement.leftParenthesis, isNotNull);
@@ -14787,7 +14776,7 @@
     // TODO(danrubel): remove this once control flow and spread collection
     // entry parsing is enabled by default
     var forStatement =
-        parseStatement('for (i--; i < count; i++) {}') as ForStatement2;
+        parseStatement('for (i--; i < count; i++) {}') as ForStatement;
     assertNoErrors();
     expect(forStatement.forKeyword, isNotNull);
     expect(forStatement.leftParenthesis, isNotNull);
@@ -14804,7 +14793,7 @@
   void test_parseForStatement_loop_i() {
     // TODO(danrubel): remove this once control flow and spread collection
     // entry parsing is enabled by default
-    var forStatement = parseStatement('for (var i = 0;;) {}') as ForStatement2;
+    var forStatement = parseStatement('for (var i = 0;;) {}') as ForStatement;
     assertNoErrors();
     expect(forStatement.forKeyword, isNotNull);
     expect(forStatement.leftParenthesis, isNotNull);
@@ -14825,7 +14814,7 @@
     // TODO(danrubel): remove this once control flow and spread collection
     // entry parsing is enabled by default
     var forStatement =
-        parseStatement('for (@A var i = 0;;) {}') as ForStatement2;
+        parseStatement('for (@A var i = 0;;) {}') as ForStatement;
     assertNoErrors();
     expect(forStatement.forKeyword, isNotNull);
     expect(forStatement.leftParenthesis, isNotNull);
@@ -14846,7 +14835,7 @@
     // TODO(danrubel): remove this once control flow and spread collection
     // entry parsing is enabled by default
     var forStatement =
-        parseStatement('for (var i = 0; i < count;) {}') as ForStatement2;
+        parseStatement('for (var i = 0; i < count;) {}') as ForStatement;
     assertNoErrors();
     expect(forStatement.forKeyword, isNotNull);
     expect(forStatement.leftParenthesis, isNotNull);
@@ -14866,7 +14855,7 @@
     // TODO(danrubel): remove this once control flow and spread collection
     // entry parsing is enabled by default
     var forStatement =
-        parseStatement('for (var i = 0; i < count; i++) {}') as ForStatement2;
+        parseStatement('for (var i = 0; i < count; i++) {}') as ForStatement;
     assertNoErrors();
     expect(forStatement.forKeyword, isNotNull);
     expect(forStatement.leftParenthesis, isNotNull);
@@ -14887,7 +14876,7 @@
     // entry parsing is enabled by default
     var forStatement =
         parseStatement('for (int i = 0, j = count; i < j; i++, j--) {}')
-            as ForStatement2;
+            as ForStatement;
     assertNoErrors();
     expect(forStatement.forKeyword, isNotNull);
     expect(forStatement.leftParenthesis, isNotNull);
@@ -14907,7 +14896,7 @@
     // TODO(danrubel): remove this once control flow and spread collection
     // entry parsing is enabled by default
     var forStatement =
-        parseStatement('for (var i = 0;; i++) {}') as ForStatement2;
+        parseStatement('for (var i = 0;; i++) {}') as ForStatement;
     assertNoErrors();
     expect(forStatement.forKeyword, isNotNull);
     expect(forStatement.leftParenthesis, isNotNull);
@@ -14926,7 +14915,7 @@
   void test_parseForStatement_loop_u() {
     // TODO(danrubel): remove this once control flow and spread collection
     // entry parsing is enabled by default
-    var forStatement = parseStatement('for (;; i++) {}') as ForStatement2;
+    var forStatement = parseStatement('for (;; i++) {}') as ForStatement;
     assertNoErrors();
     expect(forStatement.forKeyword, isNotNull);
     expect(forStatement.leftParenthesis, isNotNull);
diff --git a/pkg/analyzer/test/generated/resolver_test.dart b/pkg/analyzer/test/generated/resolver_test.dart
index 772ed2b..a90bde8 100644
--- a/pkg/analyzer/test/generated/resolver_test.dart
+++ b/pkg/analyzer/test/generated/resolver_test.dart
@@ -570,15 +570,12 @@
 }
 
 /**
- * The class `StrictModeTest` contains tests to ensure that the correct errors and warnings
- * are reported when the analysis engine is run in strict mode.
+ * The class `StrictModeTest` contains tests to ensure that the correct errors
+ * and warnings are reported when the analysis engine is run in strict mode.
  */
 @reflectiveTest
 class StrictModeTest extends ResolverTestCase {
   @override
-  bool get enableNewAnalysisDriver => true;
-
-  @override
   void setUp() {
     AnalysisOptionsImpl options = new AnalysisOptionsImpl();
     options.hint = false;
@@ -731,9 +728,6 @@
 
 @reflectiveTest
 class TypePropagationTest extends ResolverTestCase {
-  @override
-  bool get enableNewAnalysisDriver => true;
-
   test_assignment_null() async {
     String code = r'''
 main() {
diff --git a/pkg/analyzer/test/generated/resolver_test_case.dart b/pkg/analyzer/test/generated/resolver_test_case.dart
index 021bac0..9f11907 100644
--- a/pkg/analyzer/test/generated/resolver_test_case.dart
+++ b/pkg/analyzer/test/generated/resolver_test_case.dart
@@ -313,11 +313,6 @@
 
 class ResolverTestCase extends EngineTestCase with ResourceProviderMixin {
   /**
-   * The analysis context used to parse the compilation units being resolved.
-   */
-  InternalAnalysisContext analysisContext2;
-
-  /**
    * Specifies if [assertErrors] should check for [HintCode.UNUSED_ELEMENT] and
    * [HintCode.UNUSED_FIELD].
    */
@@ -334,10 +329,7 @@
   FileContentOverlay fileContentOverlay = new FileContentOverlay();
   AnalysisDriver driver;
 
-  AnalysisContext get analysisContext => analysisContext2;
-
-  AnalysisOptions get analysisOptions =>
-      analysisContext?.analysisOptions ?? driver?.analysisOptions;
+  AnalysisOptions get analysisOptions => driver?.analysisOptions;
 
   /**
    * The default [AnalysisOptions] that should be used by [reset].
@@ -350,38 +342,27 @@
    */
   List<String> get enabledExperiments => null;
 
-  bool get enableNewAnalysisDriver => false;
-
   /**
    * Return a type provider that can be used to test the results of resolution.
    *
-   * @return a type provider
-   * @throws AnalysisException if dart:core cannot be resolved
+   * Throws an [AnalysisException] if `dart:core` cannot be resolved.
    */
   TypeProvider get typeProvider {
-    if (enableNewAnalysisDriver) {
-      if (analysisResults.isEmpty) {
-        fail('typeProvider called before computing an analysis result.');
-      }
-      return analysisResults
-          .values.first.unit.declaredElement.context.typeProvider;
-    } else {
-      return analysisContext2.typeProvider;
+    if (analysisResults.isEmpty) {
+      fail('typeProvider called before computing an analysis result.');
     }
+    return analysisResults
+        .values.first.unit.declaredElement.context.typeProvider;
   }
 
   /**
    * Return a type system that can be used to test the results of resolution.
    */
   TypeSystem get typeSystem {
-    if (enableNewAnalysisDriver) {
-      if (analysisResults.isEmpty) {
-        fail('typeSystem called before computing an analysis result.');
-      }
-      return analysisResults.values.first.typeSystem;
-    } else {
-      return analysisContext2.typeSystem;
+    if (analysisResults.isEmpty) {
+      fail('typeSystem called before computing an analysis result.');
     }
+    return analysisResults.values.first.typeSystem;
   }
 
   /**
@@ -393,14 +374,7 @@
     filePath = convertPath(filePath);
     File file = newFile(filePath, content: contents);
     Source source = file.createSource();
-    if (enableNewAnalysisDriver) {
-      driver.addFile(filePath);
-    } else {
-      analysisContext2.setContents(source, contents);
-      ChangeSet changeSet = new ChangeSet();
-      changeSet.addedSource(source);
-      analysisContext2.applyChanges(changeSet);
-    }
+    driver.addFile(filePath);
     return source;
   }
 
@@ -523,33 +497,11 @@
     expect(identifier.staticType, expectedStaticType);
   }
 
-  /**
-   * Change the contents of the given [source] to the given [contents].
-   */
-  void changeSource(Source source, String contents) {
-    analysisContext2.setContents(source, contents);
-    ChangeSet changeSet = new ChangeSet();
-    changeSet.changedSource(source);
-    analysisContext2.applyChanges(changeSet);
-  }
-
   Future<TestAnalysisResult> computeAnalysisResult(Source source) async {
     TestAnalysisResult analysisResult;
-    if (enableNewAnalysisDriver) {
-      ResolvedUnitResult result = await driver.getResult(source.fullName);
-      analysisResult = new TestAnalysisResult(
-          source, result.unit, result.errors, result.typeSystem);
-    } else {
-      analysisContext2.computeKindOf(source);
-      List<Source> libraries = analysisContext2.getLibrariesContaining(source);
-      if (libraries.length > 0) {
-        CompilationUnit unit =
-            analysisContext.resolveCompilationUnit2(source, libraries.first);
-        List<AnalysisError> errors = analysisContext.computeErrors(source);
-        analysisResult = new TestAnalysisResult(
-            source, unit, errors, analysisContext2.typeSystem);
-      }
-    }
+    ResolvedUnitResult result = await driver.getResult(source.fullName);
+    analysisResult = new TestAnalysisResult(
+        source, result.unit, result.errors, result.typeSystem);
     analysisResults[source] = analysisResult;
     return analysisResult;
   }
@@ -673,84 +625,39 @@
     if (experiments != null) {
       (options as AnalysisOptionsImpl).enabledExperiments = experiments;
     }
-    if (enableNewAnalysisDriver) {
-      DartSdk sdk = new MockSdk(resourceProvider: resourceProvider)
-        ..context.analysisOptions = options;
+    DartSdk sdk = new MockSdk(resourceProvider: resourceProvider)
+      ..context.analysisOptions = options;
 
-      List<UriResolver> resolvers = <UriResolver>[
-        new DartUriResolver(sdk),
-        new ResourceUriResolver(resourceProvider)
-      ];
-      if (packages != null) {
-        var packageMap = <String, List<Folder>>{};
-        packages.forEach((args) {
-          String name = args[0];
-          String content = args[1];
-          File file = newFile('/packages/$name/$name.dart', content: content);
-          packageMap[name] = <Folder>[file.parent];
-        });
-        resolvers.add(new PackageMapUriResolver(resourceProvider, packageMap));
-      }
-      SourceFactory sourceFactory = new SourceFactory(resolvers);
-
-      PerformanceLog log = new PerformanceLog(_logBuffer);
-      AnalysisDriverScheduler scheduler = new AnalysisDriverScheduler(log);
-      driver = new AnalysisDriver(
-          scheduler,
-          log,
-          resourceProvider,
-          new MemoryByteStore(),
-          fileContentOverlay,
-          null,
-          sourceFactory,
-          options);
-      scheduler.start();
-    } else {
-      if (packages != null) {
-        var packageMap = <String, String>{};
-        packages.forEach((args) {
-          String name = args[0];
-          String content = args[1];
-          packageMap[name] = content;
-        });
-        analysisContext2 = AnalysisContextFactory.contextWithCoreAndPackages(
-            packageMap,
-            resourceProvider: resourceProvider);
-      } else if (options != null) {
-        analysisContext2 = AnalysisContextFactory.contextWithCoreAndOptions(
-            options,
-            resourceProvider: resourceProvider);
-      } else {
-        analysisContext2 = AnalysisContextFactory.contextWithCore(
-            resourceProvider: resourceProvider);
-      }
+    List<UriResolver> resolvers = <UriResolver>[
+      new DartUriResolver(sdk),
+      new ResourceUriResolver(resourceProvider)
+    ];
+    if (packages != null) {
+      var packageMap = <String, List<Folder>>{};
+      packages.forEach((args) {
+        String name = args[0];
+        String content = args[1];
+        File file = newFile('/packages/$name/$name.dart', content: content);
+        packageMap[name] = <Folder>[file.parent];
+      });
+      resolvers.add(new PackageMapUriResolver(resourceProvider, packageMap));
     }
+    SourceFactory sourceFactory = new SourceFactory(resolvers);
+
+    PerformanceLog log = new PerformanceLog(_logBuffer);
+    AnalysisDriverScheduler scheduler = new AnalysisDriverScheduler(log);
+    driver = new AnalysisDriver(
+        scheduler,
+        log,
+        resourceProvider,
+        new MemoryByteStore(),
+        fileContentOverlay,
+        null,
+        sourceFactory,
+        options);
+    scheduler.start();
   }
 
-  /**
-   * Given a library and all of its parts, resolve the contents of the library and the contents of
-   * the parts. This assumes that the sources for the library and its parts have already been added
-   * to the content provider using the method [addNamedSource].
-   *
-   * @param librarySource the source for the compilation unit that defines the library
-   * @return the element representing the resolved library
-   * @throws AnalysisException if the analysis could not be performed
-   */
-  LibraryElement resolve2(Source librarySource) =>
-      analysisContext2.computeLibraryElement(librarySource);
-
-  /**
-   * Return the resolved compilation unit corresponding to the given source in the given library.
-   *
-   * @param source the source of the compilation unit to be returned
-   * @param library the library in which the compilation unit is to be resolved
-   * @return the resolved compilation unit
-   * @throws Exception if the compilation unit could not be resolved
-   */
-  CompilationUnit resolveCompilationUnit(
-          Source source, LibraryElement library) =>
-      analysisContext2.resolveCompilationUnit(source, library);
-
   Future<CompilationUnit> resolveSource(String sourceText) =>
       resolveSource2('/test.dart', sourceText);
 
@@ -811,7 +718,6 @@
 
   @override
   void tearDown() {
-    analysisContext2 = null;
     AnalysisEngine.instance.clearCaches();
     super.tearDown();
   }
diff --git a/pkg/analyzer/test/generated/scanner_test.dart b/pkg/analyzer/test/generated/scanner_test.dart
index 62165ac..79a88bf 100644
--- a/pkg/analyzer/test/generated/scanner_test.dart
+++ b/pkg/analyzer/test/generated/scanner_test.dart
@@ -1,4 +1,4 @@
-// Copyright (c) 2014, the Dart project authors.  Please see the AUTHORS file
+// Copyright (c) 2014, the Dart project authors. Please see the AUTHORS file
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
 
diff --git a/pkg/analyzer/test/generated/simple_resolver_test.dart b/pkg/analyzer/test/generated/simple_resolver_test.dart
index cc3da4a..7924563 100644
--- a/pkg/analyzer/test/generated/simple_resolver_test.dart
+++ b/pkg/analyzer/test/generated/simple_resolver_test.dart
@@ -216,7 +216,7 @@
     expect(break1.target, same(whileStatement));
 
     var break2 = findNode.breakStatement('break loop2;');
-    var forStatement = findNode.forStatement2('for (');
+    var forStatement = findNode.forStatement('for (');
     expect(break2.target, same(forStatement));
   }
 
@@ -245,7 +245,7 @@
 ''');
     await resolveTestFile();
 
-    var forStatement = findNode.forStatement2('for (');
+    var forStatement = findNode.forStatement('for (');
     var breakStatement = findNode.breakStatement('break;');
     expect(breakStatement.target, same(forStatement));
   }
@@ -260,7 +260,7 @@
 ''');
     await resolveTestFile();
 
-    var forStatement = findNode.forStatement2('for (');
+    var forStatement = findNode.forStatement('for (');
     var breakStatement = findNode.breakStatement('break;');
     expect(breakStatement.target, same(forStatement));
   }
@@ -353,7 +353,7 @@
     expect(continue1.target, same(whileStatement));
 
     var continue2 = findNode.continueStatement('continue loop2');
-    var forStatement = findNode.forStatement2('for (');
+    var forStatement = findNode.forStatement('for (');
     expect(continue2.target, same(forStatement));
   }
 
@@ -382,7 +382,7 @@
 ''');
     await resolveTestFile();
 
-    var forStatement = findNode.forStatement2('for (');
+    var forStatement = findNode.forStatement('for (');
     var continueStatement = findNode.continueStatement('continue;');
     expect(continueStatement.target, same(forStatement));
   }
@@ -397,7 +397,7 @@
 ''');
     await resolveTestFile();
 
-    var forStatement = findNode.forStatement2('for (');
+    var forStatement = findNode.forStatement('for (');
     var continueStatement = findNode.continueStatement('continue;');
     expect(continueStatement.target, same(forStatement));
   }
diff --git a/pkg/analyzer/test/generated/source_factory_test.dart b/pkg/analyzer/test/generated/source_factory_test.dart
index 767de68..ad4c7bd 100644
--- a/pkg/analyzer/test/generated/source_factory_test.dart
+++ b/pkg/analyzer/test/generated/source_factory_test.dart
@@ -1,4 +1,4 @@
-// Copyright (c) 2015, the Dart project authors.  Please see the AUTHORS file
+// Copyright (c) 2015, the Dart project authors. Please see the AUTHORS file
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
 
diff --git a/pkg/analyzer/test/generated/static_type_analyzer_test.dart b/pkg/analyzer/test/generated/static_type_analyzer_test.dart
index dcdaa61..aebb310 100644
--- a/pkg/analyzer/test/generated/static_type_analyzer_test.dart
+++ b/pkg/analyzer/test/generated/static_type_analyzer_test.dart
@@ -52,9 +52,6 @@
 
 @reflectiveTest
 class SetLiteralsTest extends StaticTypeAnalyzer2TestShared {
-  @override
-  bool get enableNewAnalysisDriver => true;
-
   test_emptySetLiteral_parameter_typed() async {
     String code = r'''
 main() {
@@ -73,9 +70,6 @@
  */
 @reflectiveTest
 class StaticTypeAnalyzer2Test extends StaticTypeAnalyzer2TestShared {
-  @override
-  bool get enableNewAnalysisDriver => true;
-
   test_FunctionExpressionInvocation_block() async {
     String code = r'''
 main() {
@@ -210,8 +204,6 @@
  */
 @reflectiveTest
 class StaticTypeAnalyzer3Test extends StaticTypeAnalyzer2TestShared {
-  bool get enableNewAnalysisDriver => true;
-
   test_emptyMapLiteral_initializer_var() async {
     String code = r'''
 main() {
@@ -1182,8 +1174,7 @@
 
   void test_visitMapLiteral_empty() {
     // {}
-    // ignore: deprecated_member_use_from_same_package
-    Expression node = AstTestFactory.mapLiteral2();
+    Expression node = AstTestFactory.setOrMapLiteral(null, null);
     DartType resultType = _analyze(node);
     _assertType2(
         _typeProvider.mapType.instantiate(
@@ -1194,9 +1185,8 @@
 
   void test_visitMapLiteral_nonEmpty() {
     // {"k" : 0}
-    // ignore: deprecated_member_use_from_same_package
-    Expression node = AstTestFactory.mapLiteral2(
-        [AstTestFactory.mapLiteralEntry("k", _resolvedInteger(0))]);
+    Expression node = AstTestFactory.setOrMapLiteral(
+        null, null, [AstTestFactory.mapLiteralEntry("k", _resolvedInteger(0))]);
     DartType resultType = _analyze(node);
     _assertType2(
         _typeProvider.mapType.instantiate(
@@ -1667,9 +1657,6 @@
 @reflectiveTest
 class StaticTypeAnalyzerWithSetLiteralsTest
     extends StaticTypeAnalyzer2TestShared {
-  @override
-  bool get enableNewAnalysisDriver => true;
-
   test_emptySetLiteral_inferredFromLinkedHashSet() async {
     String code = r'''
 import 'dart:collection';
@@ -1697,9 +1684,6 @@
 class StaticTypeAnalyzerWithStrictInferenceTest
     extends StaticTypeAnalyzer2TestShared {
   @override
-  bool get enableNewAnalysisDriver => true;
-
-  @override
   void setUp() {
     super.setUp();
     AnalysisOptionsImpl options = new AnalysisOptionsImpl();
diff --git a/pkg/analyzer/test/generated/static_type_warning_code_test.dart b/pkg/analyzer/test/generated/static_type_warning_code_test.dart
index 36ad4c3..23012b9 100644
--- a/pkg/analyzer/test/generated/static_type_warning_code_test.dart
+++ b/pkg/analyzer/test/generated/static_type_warning_code_test.dart
@@ -18,9 +18,6 @@
 
 @reflectiveTest
 class StaticTypeWarningCodeTest extends ResolverTestCase {
-  @override
-  bool get enableNewAnalysisDriver => true;
-
   test_assert_message_suppresses_type_promotion() async {
     // If a variable is assigned to inside the expression for an assert
     // message, type promotion should be suppressed, just as it would be if the
@@ -1297,23 +1294,25 @@
   if (p is B) {
     p.b;
   }
-}''', [StaticTypeWarningCode.UNDEFINED_GETTER]);
+}
+''', [StaticTypeWarningCode.UNDEFINED_GETTER]);
   }
 
-  @failingTest
   test_undefinedEnumConstant() async {
-    // We need a way to set the parseEnum flag in the parser to true.
+    // We should be reporting UNDEFINED_ENUM_CONSTANT here.
     await assertErrorsInCode(r'''
 enum E { ONE }
 E e() {
   return E.TWO;
-}''', [StaticTypeWarningCode.UNDEFINED_ENUM_CONSTANT]);
+}
+''', [StaticTypeWarningCode.UNDEFINED_GETTER], verify: false);
   }
 
   test_undefinedGetter() async {
     await assertErrorsInUnverifiedCode(r'''
 class T {}
-f(T e) { return e.m; }''', [StaticTypeWarningCode.UNDEFINED_GETTER]);
+f(T e) { return e.m; }
+''', [StaticTypeWarningCode.UNDEFINED_GETTER]);
   }
 
   test_undefinedGetter_generic_function_call() async {
@@ -1719,9 +1718,6 @@
 
 @reflectiveTest
 class StrongModeStaticTypeWarningCodeTest extends ResolverTestCase {
-  @override
-  bool get enableNewAnalysisDriver => true;
-
   void setUp() {
     super.setUp();
     AnalysisOptionsImpl options = new AnalysisOptionsImpl();
diff --git a/pkg/analyzer/test/generated/static_warning_code_test.dart b/pkg/analyzer/test/generated/static_warning_code_test.dart
index 096db7f..463cae1 100644
--- a/pkg/analyzer/test/generated/static_warning_code_test.dart
+++ b/pkg/analyzer/test/generated/static_warning_code_test.dart
@@ -13,55 +13,12 @@
 
 main() {
   defineReflectiveSuite(() {
-    defineReflectiveTests(EqualValuesInConstSetTest);
     defineReflectiveTests(StaticWarningCodeTest);
   });
 }
 
 @reflectiveTest
-class EqualValuesInConstSetTest extends ResolverTestCase {
-  @override
-  bool get enableNewAnalysisDriver => true;
-
-  test_simpleValues() async {
-    Source source = addSource('var s = const {0, 1, 0};');
-    await computeAnalysisResult(source);
-    assertErrors(source, [StaticWarningCode.EQUAL_VALUES_IN_CONST_SET]);
-    verify([source]);
-  }
-
-  test_valuesWithEqualTypeParams() async {
-    Source source = addSource(r'''
-class A<T> {
-  const A();
-}
-var s = const {A<int>(), A<int>()};
-''');
-    await computeAnalysisResult(source);
-    assertErrors(source, [StaticWarningCode.EQUAL_VALUES_IN_CONST_SET]);
-    verify([source]);
-  }
-
-  test_valuesWithUnequalTypeParams() async {
-    // No error should be produced because A<int> and A<num> are different
-    // types.
-    Source source = addSource(r'''
-class A<T> {
-  const A();
-}
-const s = {A<int>(), A<num>()};
-''');
-    await computeAnalysisResult(source);
-    assertNoErrors(source);
-    verify([source]);
-  }
-}
-
-@reflectiveTest
 class StaticWarningCodeTest extends ResolverTestCase {
-  @override
-  bool get enableNewAnalysisDriver => true;
-
   test_ambiguousImport_as() async {
     Source source = addSource(r'''
 import 'lib1.dart';
@@ -85,9 +42,7 @@
 Future v;
 ''');
     await computeAnalysisResult(source);
-    if (enableNewAnalysisDriver) {
-      assertErrors(source, [StaticWarningCode.AMBIGUOUS_IMPORT]);
-    }
+    assertErrors(source, [StaticWarningCode.AMBIGUOUS_IMPORT]);
   }
 
   test_ambiguousImport_extends() async {
@@ -1000,37 +955,6 @@
         classA.declaredElement.type.instantiate([typeProvider.intType]));
   }
 
-  test_equalKeysInMap() async {
-    Source source = addSource("var m = {'a' : 0, 'b' : 1, 'a' : 2};");
-    await computeAnalysisResult(source);
-    assertErrors(source, [StaticWarningCode.EQUAL_KEYS_IN_MAP]);
-    verify([source]);
-  }
-
-  test_equalKeysInMap_withEqualTypeParams() async {
-    Source source = addSource(r'''
-class A<T> {
-  const A();
-}
-var m = {const A<int>(): 0, const A<int>(): 1};''');
-    await computeAnalysisResult(source);
-    assertErrors(source, [StaticWarningCode.EQUAL_KEYS_IN_MAP]);
-    verify([source]);
-  }
-
-  test_equalKeysInMap_withUnequalTypeParams() async {
-    // No error should be produced because A<int> and A<num> are different
-    // types.
-    Source source = addSource(r'''
-class A<T> {
-  const A();
-}
-var m = {const A<int>(): 0, const A<num>(): 1};''');
-    await computeAnalysisResult(source);
-    assertNoErrors(source);
-    verify([source]);
-  }
-
   test_exportDuplicatedLibraryNamed() async {
     Source source = addSource(r'''
 library test;
diff --git a/pkg/analyzer/test/generated/strong_mode_test.dart b/pkg/analyzer/test/generated/strong_mode_test.dart
index c0f832d..ae7258d 100644
--- a/pkg/analyzer/test/generated/strong_mode_test.dart
+++ b/pkg/analyzer/test/generated/strong_mode_test.dart
@@ -8,6 +8,7 @@
 import 'package:analyzer/dart/ast/standard_resolution_map.dart';
 import 'package:analyzer/dart/element/element.dart';
 import 'package:analyzer/dart/element/type.dart';
+import 'package:analyzer/src/dart/analysis/experiments.dart';
 import 'package:analyzer/src/dart/element/element.dart';
 import 'package:analyzer/src/error/codes.dart';
 import 'package:analyzer/src/generated/engine.dart';
@@ -26,9 +27,1086 @@
     defineReflectiveTests(StrongModeLocalInferenceTest);
     defineReflectiveTests(StrongModeStaticTypeAnalyzer2Test);
     defineReflectiveTests(StrongModeTypePropagationTest);
+    defineReflectiveTests(StrongModeCastsWithUiAsCodeTest);
   });
 }
 
+@reflectiveTest
+class StrongModeCastsWithUiAsCodeTest extends ResolverTestCase {
+  @override
+  List<String> get enabledExperiments =>
+      [EnableString.spread_collections, EnableString.control_flow_collections];
+
+  test_implicitCastMetadata_ifElement_condition() async {
+    var source = addSource(r'''
+class C {
+  dynamic dyn;
+  Object object;
+  bool boolean;
+
+  void casts() {
+    [if (dyn) null];
+    [if (object) null];
+    <int>{if (dyn) null};
+    <int>{if (object) null};
+    <int, int>{if (dyn) null: null};
+    <int, int>{if (object) null: null};
+  }
+
+  void noCasts() {
+    [if (boolean) null];
+    [if (null) null];
+    <int>{if (dyn) null};
+    <int>{if (object) null};
+    <int, int>{if (boolean) null : null};
+    <int, int>{if (null) null : null};
+  }
+}
+''');
+    var unit = (await computeAnalysisResult(source)).unit;
+    assertNoErrors(source);
+
+    Expression getCondition(ExpressionStatement s) {
+      Expression expression = s.expression;
+      IfElement ifElement;
+      if (expression is ListLiteral) {
+        ifElement = expression.elements[0];
+      } else if (expression is SetOrMapLiteral) {
+        ifElement = expression.elements[0];
+      }
+      return ifElement.condition;
+    }
+
+    for (var s in AstFinder.getStatementsInMethod(unit, 'C', 'casts')) {
+      var expression = getCondition(s);
+      var castType = getImplicitCast(expression);
+      expect(castType, isNotNull,
+          reason: 'Expression $expression does not have implicit cast');
+      expect(castType.toString(), equals('bool'));
+    }
+
+    for (var s in AstFinder.getStatementsInMethod(unit, 'C', 'noCasts')) {
+      var expression = getCondition(s);
+      var spreadCastType = getImplicitSpreadCast(expression);
+      expect(spreadCastType, isNull,
+          reason: 'Expression $expression should not have implicit cast');
+    }
+  }
+
+  test_implicitCastMetadata_ifElement_list_branches() async {
+    var source = addSource(r'''
+class C {
+  bool c;
+  dynamic dyn;
+  Object object;
+  num someNum;
+  int someInt;
+
+  void casts() {
+    <num>[if (c) dyn];
+    <num>[if (c) object];
+    <int>[if (c) dyn];
+    <int>[if (c) object];
+    <int>[if (c) someNum];
+    <Null>[if (c) dyn];
+    <Null>[if (c) object];
+    <Null>[if (c) someNum];
+    <Null>[if (c) someInt];
+    <num>[if (c) dyn else dyn];
+    <num>[if (c) object else object];
+    <int>[if (c) dyn else dyn];
+    <int>[if (c) object else object];
+    <int>[if (c) someNum else someNum];
+    <Null>[if (c) dyn else dyn];
+    <Null>[if (c) object else object];
+    <Null>[if (c) someNum else someNum];
+    <Null>[if (c) someInt else someInt];
+  }
+
+  void noCasts() {
+    <dynamic>[if (c) dyn];
+    <dynamic>[if (c) object];
+    <dynamic>[if (c) someNum];
+    <dynamic>[if (c) someInt];
+    <dynamic>[if (c) null];
+    <Object>[if (c) dyn];
+    <Object>[if (c) object];
+    <Object>[if (c) someNum];
+    <Object>[if (c) someInt];
+    <Object>[if (c) null];
+    <num>[if (c) someNum];
+    <num>[if (c) someInt];
+    <num>[if (c) null];
+    <int>[if (c) someInt];
+    <int>[if (c) null];
+    <Null>[if (c) null];
+    <dynamic>[if (c) dyn else dyn];
+    <dynamic>[if (c) object else object];
+    <dynamic>[if (c) someNum else someNum];
+    <dynamic>[if (c) someInt else someInt];
+    <dynamic>[if (c) null else null];
+    <Object>[if (c) dyn else dyn];
+    <Object>[if (c) object else object];
+    <Object>[if (c) someNum else someNum];
+    <Object>[if (c) someInt else someInt];
+    <Object>[if (c) null else null];
+    <num>[if (c) someNum else someNum];
+    <num>[if (c) someInt else someInt];
+    <num>[if (c) null else null];
+    <int>[if (c) someInt else someInt];
+    <int>[if (c) null else null];
+    <Null>[if (c) null else null];
+  }
+}
+''');
+    var unit = (await computeAnalysisResult(source)).unit;
+    assertNoErrors(source);
+
+    List<Expression> getBranches(ExpressionStatement s) {
+      ListLiteral literal = s.expression;
+      IfElement ifElement = literal.elements[0];
+      return ifElement.elseElement == null
+          ? [ifElement.thenElement]
+          : [ifElement.thenElement, ifElement.elseElement];
+    }
+
+    DartType getListElementType(ExpressionStatement s) {
+      ListLiteral literal = s.expression;
+      return literal.typeArguments.arguments[0].type;
+    }
+
+    for (var s in AstFinder.getStatementsInMethod(unit, 'C', 'casts')) {
+      for (var expression in getBranches(s)) {
+        var castType = getImplicitCast(expression);
+        expect(castType, isNotNull,
+            reason: 'Expression $expression does not have implicit cast');
+        expect(castType, equals(getListElementType(s)));
+      }
+    }
+
+    for (var s in AstFinder.getStatementsInMethod(unit, 'C', 'noCasts')) {
+      for (var expression in getBranches(s)) {
+        var castType = getImplicitCast(expression);
+        expect(castType, isNull,
+            reason: 'Expression $expression should not have implicit cast');
+      }
+    }
+  }
+
+  test_implicitCastMetadata_ifElement_map_keys() async {
+    var source = addSource(r'''
+class C {
+  bool c;
+  dynamic dyn;
+  Object object;
+  num someNum;
+  int someInt;
+
+  void casts() {
+    <num, dynamic>{if (c) dyn: null};
+    <num, dynamic>{if (c) object: null};
+    <int, dynamic>{if (c) dyn: null};
+    <int, dynamic>{if (c) object: null};
+    <int, dynamic>{if (c) someNum: null};
+    <Null, dynamic>{if (c) dyn: null};
+    <Null, dynamic>{if (c) object: null};
+    <Null, dynamic>{if (c) someNum: null};
+    <Null, dynamic>{if (c) someInt: null};
+    <num, dynamic>{if (c) dyn: null else dyn: null};
+    <num, dynamic>{if (c) object: null else object: null};
+    <int, dynamic>{if (c) dyn: null else dyn: null};
+    <int, dynamic>{if (c) object: null else object: null};
+    <int, dynamic>{if (c) someNum: null else someNum: null};
+    <Null, dynamic>{if (c) dyn: null else dyn: null};
+    <Null, dynamic>{if (c) object: null else object: null};
+    <Null, dynamic>{if (c) someNum: null else someNum: null};
+    <Null, dynamic>{if (c) someInt: null else someInt: null};
+  }
+
+  void noCasts() {
+    <dynamic, dynamic>{if (c) dyn: null};
+    <dynamic, dynamic>{if (c) object: null};
+    <dynamic, dynamic>{if (c) someNum: null};
+    <dynamic, dynamic>{if (c) someInt: null};
+    <dynamic, dynamic>{if (c) null: null};
+    <Object, dynamic>{if (c) dyn: null};
+    <Object, dynamic>{if (c) object: null};
+    <Object, dynamic>{if (c) someNum: null};
+    <Object, dynamic>{if (c) someInt: null};
+    <Object, dynamic>{if (c) null: null};
+    <num, dynamic>{if (c) someNum: null};
+    <num, dynamic>{if (c) someInt: null};
+    <num, dynamic>{if (c) null: null};
+    <int, dynamic>{if (c) someInt: null};
+    <int, dynamic>{if (c) null: null};
+    <Null, dynamic>{if (c) null: null};
+    <dynamic, dynamic>{if (c) dyn: null else dyn: null};
+    <dynamic, dynamic>{if (c) object: null else object: null};
+    <dynamic, dynamic>{if (c) someNum: null else someNum: null};
+    <dynamic, dynamic>{if (c) someInt: null else someInt: null};
+    <dynamic, dynamic>{if (c) null: null else null: null};
+    <Object, dynamic>{if (c) dyn: null else dyn: null};
+    <Object, dynamic>{if (c) object: null else object: null};
+    <Object, dynamic>{if (c) someNum: null else someNum: null};
+    <Object, dynamic>{if (c) someInt: null else someInt: null};
+    <Object, dynamic>{if (c) null: null else null: null};
+    <num, dynamic>{if (c) someNum: null else someNum: null};
+    <num, dynamic>{if (c) someInt: null else someInt: null};
+    <num, dynamic>{if (c) null: null else null: null};
+    <int, dynamic>{if (c) someInt: null else someInt: null};
+    <int, dynamic>{if (c) null: null else null: null};
+    <Null, dynamic>{if (c) null: null else null: null};
+  }
+}
+''');
+    var unit = (await computeAnalysisResult(source)).unit;
+    assertNoErrors(source);
+
+    List<Expression> getKeys(ExpressionStatement s) {
+      SetOrMapLiteral literal = s.expression;
+      IfElement ifElement = literal.elements[0];
+      return (ifElement.elseElement == null
+              ? [ifElement.thenElement]
+              : [ifElement.thenElement, ifElement.elseElement])
+          .cast<MapLiteralEntry>()
+          .map((elem) => elem.key)
+          .toList();
+    }
+
+    DartType getMapKeyType(ExpressionStatement s) {
+      SetOrMapLiteral literal = s.expression;
+      return literal.typeArguments.arguments[0].type;
+    }
+
+    for (var s in AstFinder.getStatementsInMethod(unit, 'C', 'casts')) {
+      for (var expression in getKeys(s)) {
+        var castType = getImplicitCast(expression);
+        expect(castType, isNotNull,
+            reason: 'Expression $expression does not have implicit cast');
+        expect(castType, equals(getMapKeyType(s)));
+      }
+    }
+
+    for (var s in AstFinder.getStatementsInMethod(unit, 'C', 'noCasts')) {
+      for (var expression in getKeys(s)) {
+        var castType = getImplicitCast(expression);
+        expect(castType, isNull,
+            reason: 'Expression $expression should not have implicit cast');
+      }
+    }
+  }
+
+  test_implicitCastMetadata_ifElement_map_values() async {
+    var source = addSource(r'''
+class C {
+  bool c;
+  dynamic dyn;
+  Object object;
+  num someNum;
+  int someInt;
+
+  void casts() {
+    <dynamic, num>{if (c) null: dyn};
+    <dynamic, num>{if (c) null: object};
+    <dynamic, int>{if (c) null: dyn};
+    <dynamic, int>{if (c) null: object};
+    <dynamic, int>{if (c) null: someNum};
+    <dynamic, Null>{if (c) null: dyn};
+    <dynamic, Null>{if (c) null: object};
+    <dynamic, Null>{if (c) null: someNum};
+    <dynamic, Null>{if (c) null: someInt};
+    <dynamic, num>{if (c) null: dyn else null: dyn};
+    <dynamic, num>{if (c) null: object else null: object};
+    <dynamic, int>{if (c) null: dyn else null: dyn};
+    <dynamic, int>{if (c) null: object else null: object};
+    <dynamic, int>{if (c) null: someNum else null: someNum};
+    <dynamic, Null>{if (c) null: dyn else null: dyn};
+    <dynamic, Null>{if (c) null: object else null: object};
+    <dynamic, Null>{if (c) null: someNum else null: someNum};
+    <dynamic, Null>{if (c) null: someInt else null: someInt};
+  }
+
+  void noCasts() {
+    <dynamic, dynamic>{if (c) null: dyn};
+    <dynamic, dynamic>{if (c) null: object};
+    <dynamic, dynamic>{if (c) null: someNum};
+    <dynamic, dynamic>{if (c) null: someInt};
+    <dynamic, dynamic>{if (c) null: null};
+    <dynamic, Object>{if (c) null: dyn};
+    <dynamic, Object>{if (c) null: object};
+    <dynamic, Object>{if (c) null: someNum};
+    <dynamic, Object>{if (c) null: someInt};
+    <dynamic, Object>{if (c) null: null};
+    <dynamic, num>{if (c) null: someNum};
+    <dynamic, num>{if (c) null: someInt};
+    <dynamic, num>{if (c) null: null};
+    <dynamic, int>{if (c) null: someInt};
+    <dynamic, int>{if (c) null: null};
+    <dynamic, Null>{if (c) null: null};
+    <dynamic, dynamic>{if (c) null: dyn else null: dyn};
+    <dynamic, dynamic>{if (c) null: object else null: object};
+    <dynamic, dynamic>{if (c) null: someNum else null: someNum};
+    <dynamic, dynamic>{if (c) null: someInt else null: someInt};
+    <dynamic, dynamic>{if (c) null: null else null: null};
+    <dynamic, Object>{if (c) null: dyn else null: dyn};
+    <dynamic, Object>{if (c) null: object else null: object};
+    <dynamic, Object>{if (c) null: someNum else null: someNum};
+    <dynamic, Object>{if (c) null: someInt else null: someInt};
+    <dynamic, Object>{if (c) null: null else null: null};
+    <dynamic, num>{if (c) null: someNum else null: someNum};
+    <dynamic, num>{if (c) null: someInt else null: someInt};
+    <dynamic, num>{if (c) null: null else null: null};
+    <dynamic, int>{if (c) null: someInt else null: someInt};
+    <dynamic, int>{if (c) null: null else null: null};
+    <dynamic, Null>{if (c) null: null else null: null};
+  }
+}
+''');
+    var unit = (await computeAnalysisResult(source)).unit;
+    assertNoErrors(source);
+
+    List<Expression> getValues(ExpressionStatement s) {
+      SetOrMapLiteral literal = s.expression;
+      IfElement ifElement = literal.elements[0];
+      return (ifElement.elseElement == null
+              ? [ifElement.thenElement]
+              : [ifElement.thenElement, ifElement.elseElement])
+          .cast<MapLiteralEntry>()
+          .map((elem) => elem.value)
+          .toList();
+    }
+
+    DartType getMapValueType(ExpressionStatement s) {
+      SetOrMapLiteral literal = s.expression;
+      return literal.typeArguments.arguments[1].type;
+    }
+
+    for (var s in AstFinder.getStatementsInMethod(unit, 'C', 'casts')) {
+      for (var expression in getValues(s)) {
+        var castType = getImplicitCast(expression);
+        expect(castType, isNotNull,
+            reason: 'Expression $expression does not have implicit cast');
+        expect(castType, equals(getMapValueType(s)));
+      }
+    }
+
+    for (var s in AstFinder.getStatementsInMethod(unit, 'C', 'noCasts')) {
+      for (var expression in getValues(s)) {
+        var castType = getImplicitCast(expression);
+        expect(castType, isNull,
+            reason: 'Expression $expression should not have implicit cast');
+      }
+    }
+  }
+
+  test_implicitCastMetadata_ifElement_set_trueBranch() async {
+    var source = addSource(r'''
+class C {
+  bool c;
+  dynamic dyn;
+  Object object;
+  num someNum;
+  int someInt;
+
+  void casts() {
+    <num>{if (c) dyn};
+    <num>{if (c) object};
+    <int>{if (c) dyn};
+    <int>{if (c) object};
+    <int>{if (c) someNum};
+    <Null>{if (c) dyn};
+    <Null>{if (c) object};
+    <Null>{if (c) someNum};
+    <Null>{if (c) someInt};
+    <num>{if (c) dyn else dyn};
+    <num>{if (c) object else object};
+    <int>{if (c) dyn else dyn};
+    <int>{if (c) object else object};
+    <int>{if (c) someNum else someNum};
+    <Null>{if (c) dyn else dyn};
+    <Null>{if (c) object else object};
+    <Null>{if (c) someNum else someNum};
+    <Null>{if (c) someInt else someInt};
+  }
+
+  void noCasts() {
+    <dynamic>{if (c) dyn};
+    <dynamic>{if (c) object};
+    <dynamic>{if (c) someNum};
+    <dynamic>{if (c) someInt};
+    <dynamic>{if (c) null};
+    <Object>{if (c) dyn};
+    <Object>{if (c) object};
+    <Object>{if (c) someNum};
+    <Object>{if (c) someInt};
+    <Object>{if (c) null};
+    <num>{if (c) someNum};
+    <num>{if (c) someInt};
+    <num>{if (c) null};
+    <int>{if (c) someInt};
+    <int>{if (c) null};
+    <Null>{if (c) null};
+    <dynamic>{if (c) dyn else dyn};
+    <dynamic>{if (c) object else object};
+    <dynamic>{if (c) someNum else someNum};
+    <dynamic>{if (c) someInt else someInt};
+    <dynamic>{if (c) null else null};
+    <Object>{if (c) dyn else dyn};
+    <Object>{if (c) object else object};
+    <Object>{if (c) someNum else someNum};
+    <Object>{if (c) someInt else someInt};
+    <Object>{if (c) null else null};
+    <num>{if (c) someNum else someNum};
+    <num>{if (c) someInt else someInt};
+    <num>{if (c) null else null};
+    <int>{if (c) someInt else someInt};
+    <int>{if (c) null else null};
+    <Null>{if (c) null else null};
+ }
+}
+''');
+    var unit = (await computeAnalysisResult(source)).unit;
+    assertNoErrors(source);
+
+    List<Expression> getBranches(ExpressionStatement s) {
+      SetOrMapLiteral literal = s.expression;
+      IfElement ifElement = literal.elements[0];
+      return ifElement.elseElement == null
+          ? [ifElement.thenElement]
+          : [ifElement.thenElement, ifElement.elseElement];
+    }
+
+    DartType getSetElementType(ExpressionStatement s) {
+      SetOrMapLiteral literal = s.expression;
+      return literal.typeArguments.arguments[0].type;
+    }
+
+    for (var s in AstFinder.getStatementsInMethod(unit, 'C', 'casts')) {
+      for (var expression in getBranches(s)) {
+        var castType = getImplicitCast(expression);
+        expect(castType, isNotNull,
+            reason: 'Expression $expression does not have implicit cast');
+        expect(castType, equals(getSetElementType(s)));
+      }
+    }
+
+    for (var s in AstFinder.getStatementsInMethod(unit, 'C', 'noCasts')) {
+      for (var expression in getBranches(s)) {
+        var castType = getImplicitCast(expression);
+        expect(castType, isNull,
+            reason: 'Expression $expression should not have implicit cast');
+      }
+    }
+  }
+
+  test_implicitCastMetadata_spread_list_elements() async {
+    var source = addSource(r'''
+class C {
+  dynamic dyn;
+  Iterable<int> iInt;
+  Iterable<Object> iObject;
+  Iterable<dynamic> iDynamic;
+  Iterable<Null> iNull;
+  List<int> lInt;
+  List<Object> lObject;
+  List<dynamic> lDynamic;
+  List<Null> lNull;
+
+  void casts() {
+    <int>[...dyn];
+    <num>[...dyn];
+    <int>[...iObject];
+    <int>[...iDynamic];
+    <int>[...lObject];
+    <int>[...lDynamic];
+    <Null>[...dyn];
+    <Null>[...iObject];
+    <Null>[...iDynamic];
+    <Null>[...iInt];
+    <Null>[...lObject];
+    <Null>[...lDynamic];
+    <Null>[...lInt];
+  }
+
+  void noCasts() {
+    [...dyn];
+    <dynamic>[...dyn];
+    <Object>[...dyn];
+    <dynamic>[...iInt];
+    <Object>[...iInt];
+    <Object>[...iNull];
+    <dynamic>[...lInt];
+    <Object>[...lInt];
+    <Object>[...lNull];
+    <dynamic>[...iObject];
+    <Object>[...iObject];
+    <Object>[...iNull];
+    <dynamic>[...lObject];
+    <Object>[...lObject];
+    <Object>[...lNull];
+    <dynamic>[...iDynamic];
+    <Object>[...iDynamic];
+    <Object>[...iNull];
+    <dynamic>[...lDynamic];
+    <Object>[...lDynamic];
+    <Object>[...lNull];
+    <num>[...iInt];
+    <num>[...lInt];
+    <num>[...iNull];
+    <num>[...lNull];
+    <int>[...iInt];
+    <int>[...lInt];
+    <int>[...iNull];
+    <int>[...lNull];
+    <Null>[...iNull];
+    <Null>[...lNull];
+  }
+}
+''');
+    var unit = (await computeAnalysisResult(source)).unit;
+    assertNoErrors(source);
+
+    Expression getSpreadExpression(ExpressionStatement s) {
+      ListLiteral literal = s.expression;
+      SpreadElement spread = literal.elements[0];
+      return spread.expression;
+    }
+
+    DartType getListElementType(ExpressionStatement s) {
+      ListLiteral literal = s.expression;
+      return literal.typeArguments.arguments[0].type;
+    }
+
+    for (var s in AstFinder.getStatementsInMethod(unit, 'C', 'casts')) {
+      var expression = getSpreadExpression(s);
+      var spreadCastType = getImplicitSpreadCast(expression);
+      expect(spreadCastType, isNotNull,
+          reason: 'Expression $expression does not have implicit cast');
+      expect(spreadCastType, equals(getListElementType(s)));
+    }
+    for (var s in AstFinder.getStatementsInMethod(unit, 'C', 'noCasts')) {
+      var expression = getSpreadExpression(s);
+      var spreadCastType = getImplicitSpreadCast(expression);
+      expect(spreadCastType, isNull,
+          reason: 'Expression $expression should not have implicit cast');
+    }
+  }
+
+  test_implicitCastMetadata_spread_list_iterable() async {
+    var source = addSource(r'''
+class C {
+  dynamic dyn;
+  Iterable<int> iInt;
+  Iterable<Object> iObject;
+  Iterable<dynamic> iDynamic;
+  Iterable<Null> iNull;
+  List<int> lInt;
+  List<Object> lObject;
+  List<dynamic> lDynamic;
+  List<Null> lNull;
+
+  void casts() {
+    [...dyn];
+    <int>[...dyn];
+    <num>[...dyn];
+  }
+
+  void noCasts() {
+    [...iInt];
+    [...iObject];
+    [...iDynamic];
+    [...iNull];
+    <Null>[...iInt];
+    <Null>[...iObject];
+    <Null>[...iDynamic];
+    <Null>[...iNull];
+    <int>[...iInt];
+    <int>[...iObject];
+    <int>[...iDynamic];
+    <int>[...iNull];
+    [...lInt];
+    [...lObject];
+    [...lDynamic];
+    [...lNull];
+    <Null>[...lInt];
+    <Null>[...lObject];
+    <Null>[...lDynamic];
+    <Null>[...lNull];
+    <int>[...lInt];
+    <int>[...lObject];
+    <int>[...lDynamic];
+    <int>[...lNull];
+  }
+}
+''');
+    var unit = (await computeAnalysisResult(source)).unit;
+    assertNoErrors(source);
+
+    Expression getSpreadExpression(ExpressionStatement e) {
+      ListLiteral expression = e.expression;
+      SpreadElement spread = expression.elements[0];
+      return spread.expression;
+    }
+
+    for (var s in AstFinder.getStatementsInMethod(unit, 'C', 'casts')) {
+      var expression = getSpreadExpression(s);
+      var spreadCastType = getImplicitCast(expression);
+      expect(spreadCastType, isNotNull,
+          reason: 'Expression $expression does not have implicit cast');
+      expect(spreadCastType.toString(), equals('Iterable<dynamic>'));
+    }
+    for (var s in AstFinder.getStatementsInMethod(unit, 'C', 'noCasts')) {
+      var expression = getSpreadExpression(s);
+      var spreadCastType = getImplicitCast(expression);
+      expect(spreadCastType, isNull,
+          reason: 'Expression $expression should not have implicit cast');
+    }
+  }
+
+  test_implicitCastMetadata_spread_map_keys() async {
+    var source = addSource(r'''
+abstract class HashMap<K, V> implements Map<K, V> {}
+class C {
+  dynamic dyn;
+  Map<int, dynamic> mIntDynamic;
+  Map<Object, dynamic> mObjectDynamic;
+  Map<dynamic, dynamic> mDynamicDynamic;
+  Map<Null, dynamic> mNullDynamic;
+  HashMap<int, dynamic> hIntDynamic;
+  HashMap<Object, dynamic> hObjectDynamic;
+  HashMap<dynamic, dynamic> hDynamicDynamic;
+  HashMap<Null, dynamic> hNullDynamic;
+
+  void casts() {
+    Map m0 = <int, dynamic>{...dyn};
+    Map m1 = <num, dynamic>{...dyn};
+    Map m2 = <int, dynamic>{...mObjectDynamic};
+    Map m3 = <int, dynamic>{...mDynamicDynamic};
+    Map m4 = <int, dynamic>{...hObjectDynamic};
+    Map m5 = <int, dynamic>{...hDynamicDynamic};
+    Map m6 = <Null, dynamic>{...dyn};
+    Map m7 = <Null, dynamic>{...mObjectDynamic};
+    Map m8 = <Null, dynamic>{...mDynamicDynamic};
+    Map m9 = <Null, dynamic>{...mIntDynamic};
+    Map m10 = <Null, dynamic>{...hObjectDynamic};
+    Map m11 = <Null, dynamic>{...hDynamicDynamic};
+    Map m12 = <Null, dynamic>{...hIntDynamic};
+  }
+
+  void noCasts() {
+    Map m0 = {...dyn};
+    Map m1 = <dynamic, dynamic>{...dyn};
+    Map m2 = <Object, dynamic>{...dyn};
+    Map m3 = <dynamic, dynamic>{...mIntDynamic};
+    Map m4 = <Object, dynamic>{...mIntDynamic};
+    Map m5 = <Object, dynamic>{...mNullDynamic};
+    Map m6 = <dynamic, dynamic>{...hIntDynamic};
+    Map m7 = <Object, dynamic>{...hIntDynamic};
+    Map m8 = <Object, dynamic>{...hNullDynamic};
+    Map m9 = <dynamic, dynamic>{...mObjectDynamic};
+    Map m10 = <Object, dynamic>{...mObjectDynamic};
+    Map m11 = <Object, dynamic>{...mNullDynamic};
+    Map m12 = <dynamic, dynamic>{...hObjectDynamic};
+    Map m13 = <Object, dynamic>{...hObjectDynamic};
+    Map m14 = <Object, dynamic>{...hNullDynamic};
+    Map m15 = <dynamic, dynamic>{...mDynamicDynamic};
+    Map m16 = <Object, dynamic>{...mDynamicDynamic};
+    Map m17 = <Object, dynamic>{...mNullDynamic};
+    Map m18 = <dynamic, dynamic>{...hDynamicDynamic};
+    Map m19 = <Object, dynamic>{...hDynamicDynamic};
+    Map m20 = <Object, dynamic>{...hNullDynamic};
+    Map m21 = <num, dynamic>{...mIntDynamic};
+    Map m22 = <num, dynamic>{...hIntDynamic};
+    Map m23 = <num, dynamic>{...mNullDynamic};
+    Map m24 = <num, dynamic>{...hNullDynamic};
+    Map m25 = <int, dynamic>{...hIntDynamic};
+    Map m26 = <int, dynamic>{...mIntDynamic};
+    Map m27 = <int, dynamic>{...mNullDynamic};
+    Map m28 = <int, dynamic>{...hNullDynamic};
+    Map m29 = <Null, dynamic>{...mNullDynamic};
+    Map m30 = <Null, dynamic>{...hNullDynamic};
+ }
+}
+''');
+    var unit = (await computeAnalysisResult(source)).unit;
+    assertNoErrors(source);
+
+    Expression getSpreadExpression(VariableDeclarationStatement s) {
+      VariableDeclaration declaration = s.variables.variables[0];
+      SetOrMapLiteral literal = declaration.initializer;
+      SpreadElement spread = literal.elements[0];
+      return spread.expression;
+    }
+
+    DartType getSetElementType(VariableDeclarationStatement s) {
+      VariableDeclaration declaration = s.variables.variables[0];
+      SetOrMapLiteral literal = declaration.initializer;
+      return literal.typeArguments.arguments[0].type;
+    }
+
+    for (var s in AstFinder.getStatementsInMethod(unit, 'C', 'casts')) {
+      var expression = getSpreadExpression(s);
+      var spreadCastType = getImplicitSpreadKeyCast(expression);
+      expect(spreadCastType, isNotNull,
+          reason: 'Expression $expression does not have implicit cast');
+      expect(spreadCastType, equals(getSetElementType(s)));
+    }
+    for (var s in AstFinder.getStatementsInMethod(unit, 'C', 'noCasts')) {
+      var expression = getSpreadExpression(s);
+      var spreadCastType = getImplicitSpreadKeyCast(expression);
+      expect(spreadCastType, isNull,
+          reason: 'Expression $expression should not have implicit cast');
+    }
+  }
+
+  test_implicitCastMetadata_spread_map_map() async {
+    var source = addSource(r'''
+abstract class HashMap<K, V> implements Map<K, V> {}
+class C {
+  dynamic dyn;
+  Map<int, int> mIntInt;
+  Map<int, Object> mIntObject;
+  Map<Object, int> mObjectInt;
+  Map<Object, Object> mObjectObject;
+  Map<dynamic, dynamic> mDynamicDynamic;
+  Map<Null, Null> mNullNull;
+  Map<Object, Null> mObjectNull;
+  Map<Null, Object> mNullObject;
+  HashMap<int, int> hIntInt;
+  HashMap<int, Object> hIntObject;
+  HashMap<Object, int> hObjectInt;
+  HashMap<Object, Object> hObjectObject;
+  HashMap<dynamic, dynamic> hDynamicDynamic;
+  HashMap<Null, Null> hNullNull;
+
+  void casts() {
+    Map m0 = {...dyn};
+    Map m1 = <int, int>{...dyn};
+    Map m2 = <num, int>{...dyn};
+    Map m3 = <int, num>{...dyn};
+    Map m4 = <num, num>{...dyn};
+  }
+
+  void noCasts() {
+    Map m0 = {...mIntInt};
+    Map m1 = {...mIntObject};
+    Map m2 = {...mObjectInt};
+    Map m3 = {...mObjectObject};
+    Map m4 = {...mDynamicDynamic};
+    Map m5 = {...mNullObject};
+    Map m6 = {...mObjectNull};
+    Map m7 = {...mNullNull};
+    Map m8 = <Null, Null>{...mIntInt};
+    Map m9 = <Null, Null>{...mObjectObject};
+    Map m10 = <Null, Null>{...mDynamicDynamic};
+    Map m11 = <Null, Null>{...mNullNull};
+    Map m12 = <int, int>{...mIntInt};
+    Map m13 = <int, int>{...mObjectObject};
+    Map m14 = <int, int>{...mDynamicDynamic};
+    Map m15 = <int, int>{...mNullNull};
+    Map m16 = {...hIntInt};
+    Map m17 = {...hObjectObject};
+    Map m18 = {...hDynamicDynamic};
+    Map m19 = {...hNullNull};
+    Map m20 = <Null, Null>{...hIntInt};
+    Map m21 = <Null, Null>{...hObjectObject};
+    Map m22 = <Null, Null>{...hDynamicDynamic};
+    Map m23 = <Null, Null>{...hNullNull};
+    Map m24 = <int, int>{...hIntInt};
+    Map m25 = <int, int>{...hObjectObject};
+    Map m26 = <int, int>{...hDynamicDynamic};
+    Map m27 = <int, int>{...hNullNull};
+  }
+}
+''');
+    var unit = (await computeAnalysisResult(source)).unit;
+    assertNoErrors(source);
+
+    Expression getSpreadExpression(VariableDeclarationStatement s) {
+      VariableDeclaration declaration = s.variables.variables[0];
+      SetOrMapLiteral literal = declaration.initializer;
+      SpreadElement spread = literal.elements[0];
+      return spread.expression;
+    }
+
+    for (var s in AstFinder.getStatementsInMethod(unit, 'C', 'casts')) {
+      var expression = getSpreadExpression(s);
+      var spreadCastType = getImplicitCast(expression);
+      expect(spreadCastType, isNotNull,
+          reason: 'Expression $expression does not have implicit cast');
+      expect(spreadCastType.toString(), equals('Map<dynamic, dynamic>'));
+    }
+    for (var s in AstFinder.getStatementsInMethod(unit, 'C', 'noCasts')) {
+      var expression = getSpreadExpression(s);
+      var spreadCastType = getImplicitCast(expression);
+      expect(spreadCastType, isNull,
+          reason: 'Expression $expression should not have implicit cast');
+    }
+  }
+
+  test_implicitCastMetadata_spread_map_values() async {
+    var source = addSource(r'''
+abstract class HashMap<K, V> implements Map<K, V> {}
+class C {
+  dynamic dyn;
+  Map<dynamic, int> mDynamicInt;
+  Map<dynamic, Object> mDynamicObject;
+  Map<dynamic, dynamic> mDynamicDynamic;
+  Map<dynamic, Null> mDynamicNull;
+  HashMap<dynamic, int> hDynamicInt;
+  HashMap<dynamic, Object> hDynamicObject;
+  HashMap<dynamic, dynamic> hDynamicDynamic;
+  HashMap<dynamic, Null> hDynamicNull;
+
+  void casts() {
+    Map m0 = <dynamic, int>{...dyn};
+    Map m1 = <dynamic, num>{...dyn};
+    Map m2 = <dynamic, int>{...mDynamicObject};
+    Map m3 = <dynamic, int>{...mDynamicDynamic};
+    Map m4 = <dynamic, int>{...hDynamicObject};
+    Map m5 = <dynamic, int>{...hDynamicDynamic};
+    Map m6 = <dynamic, Null>{...dyn};
+    Map m7 = <dynamic, Null>{...mDynamicObject};
+    Map m8 = <dynamic, Null>{...mDynamicDynamic};
+    Map m9 = <dynamic, Null>{...mDynamicInt};
+    Map m10 = <dynamic, Null>{...hDynamicObject};
+    Map m11 = <dynamic, Null>{...hDynamicDynamic};
+    Map m12 = <dynamic, Null>{...hDynamicInt};
+  }
+
+  void noCasts() {
+    Map m0 = {...dyn};
+    Map m1 = <dynamic, dynamic>{...dyn};
+    Map m2 = <dynamic, Object>{...dyn};
+    Map m3 = <dynamic, dynamic>{...mDynamicInt};
+    Map m4 = <dynamic, Object>{...mDynamicInt};
+    Map m5 = <dynamic, Object>{...mDynamicNull};
+    Map m6 = <dynamic, dynamic>{...hDynamicInt};
+    Map m7 = <dynamic, Object>{...hDynamicInt};
+    Map m8 = <dynamic, Object>{...hDynamicNull};
+    Map m9 = <dynamic, dynamic>{...mDynamicObject};
+    Map m10 = <dynamic, Object>{...mDynamicObject};
+    Map m11 = <dynamic, Object>{...mDynamicNull};
+    Map m12 = <dynamic, dynamic>{...hDynamicObject};
+    Map m13 = <dynamic, Object>{...hDynamicObject};
+    Map m14 = <dynamic, Object>{...hDynamicNull};
+    Map m15 = <dynamic, dynamic>{...mDynamicDynamic};
+    Map m16 = <dynamic, Object>{...mDynamicDynamic};
+    Map m17 = <dynamic, Object>{...mDynamicNull};
+    Map m18 = <dynamic, dynamic>{...hDynamicDynamic};
+    Map m19 = <dynamic, Object>{...hDynamicDynamic};
+    Map m20 = <dynamic, Object>{...hDynamicNull};
+    Map m21 = <dynamic, num>{...mDynamicInt};
+    Map m22 = <dynamic, num>{...hDynamicInt};
+    Map m23 = <dynamic, num>{...mDynamicNull};
+    Map m24 = <dynamic, num>{...hDynamicNull};
+    Map m25 = <dynamic, int>{...hDynamicInt};
+    Map m26 = <dynamic, int>{...mDynamicInt};
+    Map m27 = <dynamic, int>{...mDynamicNull};
+    Map m28 = <dynamic, int>{...hDynamicNull};
+    Map m29 = <dynamic, Null>{...mDynamicNull};
+    Map m30 = <dynamic, Null>{...hDynamicNull};
+ }
+}
+''');
+    var unit = (await computeAnalysisResult(source)).unit;
+    assertNoErrors(source);
+
+    Expression getSpreadExpression(VariableDeclarationStatement s) {
+      VariableDeclaration declaration = s.variables.variables[0];
+      SetOrMapLiteral literal = declaration.initializer;
+      SpreadElement spread = literal.elements[0];
+      return spread.expression;
+    }
+
+    DartType getValueType(VariableDeclarationStatement s) {
+      VariableDeclaration declaration = s.variables.variables[0];
+      SetOrMapLiteral literal = declaration.initializer;
+      return literal.typeArguments.arguments[1].type;
+    }
+
+    for (var s in AstFinder.getStatementsInMethod(unit, 'C', 'casts')) {
+      var expression = getSpreadExpression(s);
+      var spreadCastType = getImplicitSpreadValueCast(expression);
+      expect(spreadCastType, isNotNull,
+          reason: 'Expression $expression does not have implicit cast');
+      expect(spreadCastType, equals(getValueType(s)));
+    }
+    for (var s in AstFinder.getStatementsInMethod(unit, 'C', 'noCasts')) {
+      var expression = getSpreadExpression(s);
+      var spreadCastType = getImplicitSpreadValueCast(expression);
+      expect(spreadCastType, isNull,
+          reason: 'Expression $expression should not have implicit cast');
+    }
+  }
+
+  test_implicitCastMetadata_spread_set_elements() async {
+    var source = addSource(r'''
+class C {
+  dynamic dyn;
+  Iterable<int> iInt;
+  Iterable<Object> iObject;
+  Iterable<dynamic> iDynamic;
+  Iterable<Null> iNull;
+  List<int> lInt;
+  List<Object> lObject;
+  List<dynamic> lDynamic;
+  List<Null> lNull;
+
+  void casts() {
+    Set s0 = <int>{...dyn};
+    Set s1 = <num>{...dyn};
+    Set s2 = <int>{...iObject};
+    Set s3 = <int>{...iDynamic};
+    Set s4 = <int>{...lObject};
+    Set s5 = <int>{...lDynamic};
+    Set s6 = <Null>{...dyn};
+    Set s7 = <Null>{...iObject};
+    Set s8 = <Null>{...iDynamic};
+    Set s9 = <Null>{...iInt};
+    Set s10 = <Null>{...lObject};
+    Set s11 = <Null>{...lDynamic};
+    Set s12 = <Null>{...lInt};
+  }
+
+  void noCasts() {
+    Set s0 = {...dyn};
+    Set s1 = <dynamic>{...dyn};
+    Set s2 = <Object>{...dyn};
+    Set s3 = <dynamic>{...iInt};
+    Set s4 = <Object>{...iInt};
+    Set s5 = <Object>{...iNull};
+    Set s6 = <dynamic>{...lInt};
+    Set s7 = <Object>{...lInt};
+    Set s8 = <Object>{...lNull};
+    Set s9 = <dynamic>{...iObject};
+    Set s10 = <Object>{...iObject};
+    Set s11 = <Object>{...iNull};
+    Set s12 = <dynamic>{...lObject};
+    Set s13 = <Object>{...lObject};
+    Set s14 = <Object>{...lNull};
+    Set s15 = <dynamic>{...iDynamic};
+    Set s16 = <Object>{...iDynamic};
+    Set s17 = <Object>{...iNull};
+    Set s18 = <dynamic>{...lDynamic};
+    Set s19 = <Object>{...lDynamic};
+    Set s20 = <Object>{...lNull};
+    Set s21 = <num>{...iInt};
+    Set s22 = <num>{...lInt};
+    Set s23 = <num>{...iNull};
+    Set s24 = <num>{...lNull};
+    Set s25 = <int>{...iInt};
+    Set s26 = <int>{...lInt};
+    Set s27 = <int>{...iNull};
+    Set s28 = <int>{...lNull};
+    Set s29 = <Null>{...iNull};
+    Set s30 = <Null>{...lNull};
+  }
+}
+''');
+    var unit = (await computeAnalysisResult(source)).unit;
+    assertNoErrors(source);
+
+    Expression getSpreadExpression(VariableDeclarationStatement s) {
+      VariableDeclaration declaration = s.variables.variables[0];
+      SetOrMapLiteral literal = declaration.initializer;
+      SpreadElement spread = literal.elements[0];
+      return spread.expression;
+    }
+
+    DartType getKeyType(VariableDeclarationStatement s) {
+      VariableDeclaration declaration = s.variables.variables[0];
+      SetOrMapLiteral literal = declaration.initializer;
+      return literal.typeArguments.arguments[0].type;
+    }
+
+    for (var s in AstFinder.getStatementsInMethod(unit, 'C', 'casts')) {
+      var expression = getSpreadExpression(s);
+      var spreadCastType = getImplicitSpreadCast(expression);
+      expect(spreadCastType, isNotNull,
+          reason: 'Expression $expression does not have implicit cast');
+      expect(spreadCastType, equals(getKeyType(s)));
+    }
+    for (var s in AstFinder.getStatementsInMethod(unit, 'C', 'noCasts')) {
+      var expression = getSpreadExpression(s);
+      var spreadCastType = getImplicitSpreadCast(expression);
+      expect(spreadCastType, isNull,
+          reason: 'Expression $expression should not have implicit cast');
+    }
+  }
+
+  test_implicitCastMetadata_spread_set_iterable() async {
+    var source = addSource(r'''
+class C {
+  dynamic dyn;
+  Iterable<int> iInt;
+  Iterable<Object> iObject;
+  Iterable<dynamic> iDynamic;
+  Iterable<Null> iNull;
+  List<int> lInt;
+  List<Object> lObject;
+  List<dynamic> lDynamic;
+  List<Null> lNull;
+
+  void casts() {
+    Set s0 = {...dyn};
+    Set s1 = <int>{...dyn};
+    Set s2 = <num>{...dyn};
+  }
+
+  void noCasts() {
+    Set s0 = {...iInt};
+    Set s1 = {...iObject};
+    Set s2 = {...iDynamic};
+    Set s3 = {...iNull};
+    Set s4 = <Null>{...iInt};
+    Set s5 = <Null>{...iObject};
+    Set s6 = <Null>{...iDynamic};
+    Set s7 = <Null>{...iNull};
+    Set s8 = <int>{...iInt};
+    Set s9 = <int>{...iObject};
+    Set s10 = <int>{...iDynamic};
+    Set s11 = <int>{...iNull};
+    Set s12 = {...lInt};
+    Set s13 = {...lObject};
+    Set s14 = {...lDynamic};
+    Set s15 = {...lNull};
+    Set s16 = <Null>{...lInt};
+    Set s17 = <Null>{...lObject};
+    Set s18 = <Null>{...lDynamic};
+    Set s19 = <Null>{...lNull};
+    Set s20 = <int>{...lInt};
+    Set s21 = <int>{...lObject};
+    Set s22 = <int>{...lDynamic};
+  }
+}
+''');
+    var unit = (await computeAnalysisResult(source)).unit;
+    assertNoErrors(source);
+
+    Expression getSpreadExpression(VariableDeclarationStatement s) {
+      VariableDeclaration declaration = s.variables.variables[0];
+      SetOrMapLiteral literal = declaration.initializer;
+      SpreadElement spread = literal.elements[0];
+      return spread.expression;
+    }
+
+    for (var s in AstFinder.getStatementsInMethod(unit, 'C', 'casts')) {
+      var expression = getSpreadExpression(s);
+      var spreadCastType = getImplicitCast(expression);
+      expect(spreadCastType, isNotNull,
+          reason: 'Expression $expression does not have implicit cast');
+      expect(spreadCastType.toString(), equals('Iterable<dynamic>'));
+    }
+    for (var s in AstFinder.getStatementsInMethod(unit, 'C', 'noCasts')) {
+      var expression = getSpreadExpression(s);
+      var spreadCastType = getImplicitCast(expression);
+      expect(spreadCastType, isNull,
+          reason: 'Expression $expression should not have implicit cast');
+    }
+  }
+}
+
 /// Strong mode static analyzer local type inference tests
 @reflectiveTest
 class StrongModeLocalInferenceTest extends ResolverTestCase {
@@ -61,9 +1139,6 @@
   AsserterBuilder<DartType, DartType> _hasElementOf;
 
   @override
-  bool get enableNewAnalysisDriver => true;
-
-  @override
   Future<TestAnalysisResult> computeAnalysisResult(Source source) async {
     TestAnalysisResult result = await super.computeAnalysisResult(source);
     if (_assertions == null) {
@@ -1773,9 +2848,9 @@
     assertMapOfIntToListOfInt(mapLiteralC.staticType);
 
     ListLiteral listLiteralB =
-        (mapLiteralB.elements2[0] as MapLiteralEntry).value;
+        (mapLiteralB.elements[0] as MapLiteralEntry).value;
     ListLiteral listLiteralC =
-        (mapLiteralC.elements2[0] as MapLiteralEntry).value;
+        (mapLiteralC.elements[0] as MapLiteralEntry).value;
     assertListOfInt(listLiteralB.staticType);
     assertListOfInt(listLiteralC.staticType);
   }
@@ -2026,9 +3101,9 @@
     assertListOfListOfInt(literal(2).staticType);
     assertListOfListOfInt(literal(3).staticType);
 
-    assertListOfInt((literal(1).elements2[0] as Expression).staticType);
-    assertListOfInt((literal(2).elements2[0] as Expression).staticType);
-    assertListOfInt((literal(3).elements2[0] as Expression).staticType);
+    assertListOfInt((literal(1).elements[0] as Expression).staticType);
+    assertListOfInt((literal(2).elements[0] as Expression).staticType);
+    assertListOfInt((literal(3).elements[0] as Expression).staticType);
   }
 
   test_listLiteral_simple() async {
@@ -2168,13 +3243,13 @@
     assertMapOfIntToListOfString(literal(4).staticType);
 
     assertListOfString(
-        (literal(1).elements2[0] as MapLiteralEntry).value.staticType);
+        (literal(1).elements[0] as MapLiteralEntry).value.staticType);
     assertListOfString(
-        (literal(2).elements2[0] as MapLiteralEntry).value.staticType);
+        (literal(2).elements[0] as MapLiteralEntry).value.staticType);
     assertListOfString(
-        (literal(3).elements2[0] as MapLiteralEntry).value.staticType);
+        (literal(3).elements[0] as MapLiteralEntry).value.staticType);
     assertListOfString(
-        (literal(4).elements2[0] as MapLiteralEntry).value.staticType);
+        (literal(4).elements[0] as MapLiteralEntry).value.staticType);
   }
 
   test_mapLiteral_simple() async {
@@ -2825,9 +3900,6 @@
 @reflectiveTest
 class StrongModeStaticTypeAnalyzer2Test extends StaticTypeAnalyzer2TestShared
     with StrongModeStaticTypeAnalyzer2TestCases {
-  @override
-  bool get enableNewAnalysisDriver => true;
-
   void setUp() {
     super.setUp();
     AnalysisOptionsImpl options = new AnalysisOptionsImpl();
@@ -2886,25 +3958,6 @@
   test_genericMethod_tearoff_instantiated() {
     return super.test_genericMethod_tearoff_instantiated();
   }
-
-  @override
-  @failingTest
-  test_instantiateToBounds_class_error_extension_malbounded() {
-    return super.test_instantiateToBounds_class_error_extension_malbounded();
-  }
-
-  @override
-  @failingTest
-  test_instantiateToBounds_class_error_instantiation_malbounded() {
-    return super
-        .test_instantiateToBounds_class_error_instantiation_malbounded();
-  }
-
-  @override
-  @failingTest
-  test_instantiateToBounds_generic_function_error_malbounded() {
-    return super.test_instantiateToBounds_generic_function_error_malbounded();
-  }
 }
 
 /// Test cases for [StrongModeStaticTypeAnalyzer2Test]
@@ -3801,7 +4854,8 @@
 class D extends C {}
 ''';
     await resolveTestUnit(code, noErrors: false);
-    assertErrors(testSource, [StrongModeCode.NO_DEFAULT_BOUNDS]);
+    assertErrors(
+        testSource, [StaticTypeWarningCode.TYPE_ARGUMENT_NOT_MATCHING_BOUNDS]);
   }
 
   test_instantiateToBounds_class_error_instantiation_malbounded() async {
@@ -3814,8 +4868,11 @@
 }
 ''';
     await resolveTestUnit(code, noErrors: false);
-    assertErrors(testSource, [StrongModeCode.NO_DEFAULT_BOUNDS]);
-    expectIdentifierType('c;', 'C<List<dynamic>, List<dynamic>>');
+    assertErrors(testSource, [
+      StrongModeCode.COULD_NOT_INFER,
+      StaticTypeWarningCode.TYPE_ARGUMENT_NOT_MATCHING_BOUNDS
+    ]);
+    expectIdentifierType('c =', 'C<List<dynamic>, List<List<dynamic>>>');
   }
 
   test_instantiateToBounds_class_error_recursion() async {
@@ -3943,8 +5000,9 @@
 }
 ''';
     await resolveTestUnit(code, noErrors: false);
-    assertErrors(testSource, [StrongModeCode.NO_DEFAULT_BOUNDS]);
-    expectIdentifierType('c;', 'List<dynamic>');
+    assertErrors(
+        testSource, [HintCode.MISSING_RETURN, StrongModeCode.COULD_NOT_INFER]);
+    expectIdentifierType('c =', 'List<dynamic>');
   }
 
   test_instantiateToBounds_method_ok_referenceOther_before() async {
@@ -4421,9 +5479,6 @@
 @reflectiveTest
 class StrongModeTypePropagationTest extends ResolverTestCase {
   @override
-  bool get enableNewAnalysisDriver => true;
-
-  @override
   void setUp() {
     super.setUp();
     AnalysisOptionsImpl options = new AnalysisOptionsImpl();
diff --git a/pkg/analyzer/test/generated/utilities_test.dart b/pkg/analyzer/test/generated/utilities_test.dart
index 502ee0d..8463f41 100644
--- a/pkg/analyzer/test/generated/utilities_test.dart
+++ b/pkg/analyzer/test/generated/utilities_test.dart
@@ -1,4 +1,4 @@
-// Copyright (c) 2014, the Dart project authors.  Please see the AUTHORS file
+// Copyright (c) 2014, the Dart project authors. Please see the AUTHORS file
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
 
@@ -1706,82 +1706,82 @@
 }
 
 class Getter_NodeReplacerTest_test_forEachStatement_withIdentifier
-    implements NodeReplacerTest_Getter<ForStatement2, Statement> {
+    implements NodeReplacerTest_Getter<ForStatement, Statement> {
   @override
-  Statement get(ForStatement2 node) => node.body;
+  Statement get(ForStatement node) => node.body;
 }
 
 class Getter_NodeReplacerTest_test_forEachStatement_withIdentifier_2
-    implements NodeReplacerTest_Getter<ForStatement2, SimpleIdentifier> {
+    implements NodeReplacerTest_Getter<ForStatement, SimpleIdentifier> {
   @override
-  SimpleIdentifier get(ForStatement2 node) =>
+  SimpleIdentifier get(ForStatement node) =>
       (node.forLoopParts as ForEachPartsWithIdentifier).identifier;
 }
 
 class Getter_NodeReplacerTest_test_forEachStatement_withIdentifier_3
-    implements NodeReplacerTest_Getter<ForStatement2, Expression> {
+    implements NodeReplacerTest_Getter<ForStatement, Expression> {
   @override
-  Expression get(ForStatement2 node) =>
+  Expression get(ForStatement node) =>
       (node.forLoopParts as ForEachParts).iterable;
 }
 
 class Getter_NodeReplacerTest_test_forEachStatement_withLoopVariable
-    implements NodeReplacerTest_Getter<ForStatement2, Expression> {
+    implements NodeReplacerTest_Getter<ForStatement, Expression> {
   @override
-  Expression get(ForStatement2 node) =>
+  Expression get(ForStatement node) =>
       (node.forLoopParts as ForEachParts).iterable;
 }
 
 class Getter_NodeReplacerTest_test_forEachStatement_withLoopVariable_2
-    implements NodeReplacerTest_Getter<ForStatement2, DeclaredIdentifier> {
+    implements NodeReplacerTest_Getter<ForStatement, DeclaredIdentifier> {
   @override
-  DeclaredIdentifier get(ForStatement2 node) =>
+  DeclaredIdentifier get(ForStatement node) =>
       (node.forLoopParts as ForEachPartsWithDeclaration).loopVariable;
 }
 
 class Getter_NodeReplacerTest_test_forEachStatement_withLoopVariable_3
-    implements NodeReplacerTest_Getter<ForStatement2, Statement> {
+    implements NodeReplacerTest_Getter<ForStatement, Statement> {
   @override
-  Statement get(ForStatement2 node) => node.body;
+  Statement get(ForStatement node) => node.body;
 }
 
 class Getter_NodeReplacerTest_test_forStatement_withInitialization
-    implements NodeReplacerTest_Getter<ForStatement2, Statement> {
+    implements NodeReplacerTest_Getter<ForStatement, Statement> {
   @override
-  Statement get(ForStatement2 node) => node.body;
+  Statement get(ForStatement node) => node.body;
 }
 
 class Getter_NodeReplacerTest_test_forStatement_withInitialization_2
-    implements NodeReplacerTest_Getter<ForStatement2, Expression> {
+    implements NodeReplacerTest_Getter<ForStatement, Expression> {
   @override
-  Expression get(ForStatement2 node) =>
+  Expression get(ForStatement node) =>
       (node.forLoopParts as ForParts).condition;
 }
 
 class Getter_NodeReplacerTest_test_forStatement_withInitialization_3
-    implements NodeReplacerTest_Getter<ForStatement2, Expression> {
+    implements NodeReplacerTest_Getter<ForStatement, Expression> {
   @override
-  Expression get(ForStatement2 node) =>
+  Expression get(ForStatement node) =>
       (node.forLoopParts as ForPartsWithExpression).initialization;
 }
 
 class Getter_NodeReplacerTest_test_forStatement_withVariables
-    implements NodeReplacerTest_Getter<ForStatement2, Statement> {
+    implements NodeReplacerTest_Getter<ForStatement, Statement> {
   @override
-  Statement get(ForStatement2 node) => node.body;
+  Statement get(ForStatement node) => node.body;
 }
 
 class Getter_NodeReplacerTest_test_forStatement_withVariables_2
-    implements NodeReplacerTest_Getter<ForStatement2, VariableDeclarationList> {
+    implements NodeReplacerTest_Getter<ForStatement, VariableDeclarationList> {
   @override
-  VariableDeclarationList get(ForStatement2 node) =>
+  VariableDeclarationList get(ForStatement node) =>
       (node.forLoopParts as ForPartsWithDeclarations).variables;
 }
 
 class Getter_NodeReplacerTest_test_forStatement_withVariables_3
-    implements NodeReplacerTest_Getter<ForStatement2, Expression> {
+    implements NodeReplacerTest_Getter<ForStatement, Expression> {
   @override
-  Expression get(ForStatement2 node) =>
+  Expression get(ForStatement node) =>
       (node.forLoopParts as ForParts).condition;
 }
 
@@ -2426,22 +2426,22 @@
 }
 
 class ListGetter_NodeReplacerTest_test_forStatement_withInitialization
-    extends NodeReplacerTest_ListGetter<ForStatement2, Expression> {
+    extends NodeReplacerTest_ListGetter<ForStatement, Expression> {
   ListGetter_NodeReplacerTest_test_forStatement_withInitialization(int arg0)
       : super(arg0);
 
   @override
-  NodeList<Expression> getList(ForStatement2 node) =>
+  NodeList<Expression> getList(ForStatement node) =>
       (node.forLoopParts as ForParts).updaters;
 }
 
 class ListGetter_NodeReplacerTest_test_forStatement_withVariables
-    extends NodeReplacerTest_ListGetter<ForStatement2, Expression> {
+    extends NodeReplacerTest_ListGetter<ForStatement, Expression> {
   ListGetter_NodeReplacerTest_test_forStatement_withVariables(int arg0)
       : super(arg0);
 
   @override
-  NodeList<Expression> getList(ForStatement2 node) =>
+  NodeList<Expression> getList(ForStatement node) =>
       (node.forLoopParts as ForParts).updaters;
 }
 
@@ -2482,15 +2482,15 @@
   ListGetter_NodeReplacerTest_test_listLiteral(int arg0) : super(arg0);
 
   @override
-  NodeList<CollectionElement> getList(ListLiteral node) => node.elements2;
+  NodeList<CollectionElement> getList(ListLiteral node) => node.elements;
 }
 
 class ListGetter_NodeReplacerTest_test_mapLiteral
-    extends NodeReplacerTest_ListGetter<SetOrMapLiteral, MapLiteralEntry> {
+    extends NodeReplacerTest_ListGetter<SetOrMapLiteral, CollectionElement> {
   ListGetter_NodeReplacerTest_test_mapLiteral(int arg0) : super(arg0);
 
   @override
-  NodeList<MapLiteralEntry> getList(SetOrMapLiteral node) => node.elements2;
+  NodeList<CollectionElement> getList(SetOrMapLiteral node) => node.elements;
 }
 
 class ListGetter_NodeReplacerTest_test_showCombinator
@@ -3065,10 +3065,9 @@
   }
 
   void test_forEachStatement_withIdentifier() {
-    // ignore: deprecated_member_use_from_same_package
-    ForStatement2 node = AstTestFactory.forEachStatement2(
-        AstTestFactory.identifier3("i"),
-        AstTestFactory.identifier3("l"),
+    ForStatement node = AstTestFactory.forStatement(
+        AstTestFactory.forEachPartsWithIdentifier(
+            AstTestFactory.identifier3("i"), AstTestFactory.identifier3("l")),
         AstTestFactory.block());
     _assertReplace(node,
         new Getter_NodeReplacerTest_test_forEachStatement_withIdentifier_2());
@@ -3079,10 +3078,10 @@
   }
 
   void test_forEachStatement_withLoopVariable() {
-    // ignore: deprecated_member_use_from_same_package
-    ForStatement2 node = AstTestFactory.forEachStatement(
-        AstTestFactory.declaredIdentifier3("e"),
-        AstTestFactory.identifier3("l"),
+    ForStatement node = AstTestFactory.forStatement(
+        AstTestFactory.forEachPartsWithDeclaration(
+            AstTestFactory.declaredIdentifier3("e"),
+            AstTestFactory.identifier3("l")),
         AstTestFactory.block());
     _assertReplace(node,
         new Getter_NodeReplacerTest_test_forEachStatement_withLoopVariable_2());
@@ -3100,11 +3099,9 @@
   }
 
   void test_forStatement_withInitialization() {
-    // ignore: deprecated_member_use_from_same_package
     ForStatement node = AstTestFactory.forStatement(
-        AstTestFactory.identifier3("a"),
-        AstTestFactory.booleanLiteral(true),
-        [AstTestFactory.integer(0)],
+        AstTestFactory.forPartsWithExpression(AstTestFactory.identifier3("a"),
+            AstTestFactory.booleanLiteral(true), [AstTestFactory.integer(0)]),
         AstTestFactory.block());
     _assertReplace(node,
         new Getter_NodeReplacerTest_test_forStatement_withInitialization_3());
@@ -3119,12 +3116,12 @@
   }
 
   void test_forStatement_withVariables() {
-    // ignore: deprecated_member_use_from_same_package
-    ForStatement node = AstTestFactory.forStatement2(
-        AstTestFactory.variableDeclarationList2(
-            null, [AstTestFactory.variableDeclaration("i")]),
-        AstTestFactory.booleanLiteral(true),
-        [AstTestFactory.integer(0)],
+    ForStatement node = AstTestFactory.forStatement(
+        AstTestFactory.forPartsWithDeclarations(
+            AstTestFactory.variableDeclarationList2(
+                null, [AstTestFactory.variableDeclaration("i")]),
+            AstTestFactory.booleanLiteral(true),
+            [AstTestFactory.integer(0)]),
         AstTestFactory.block());
     _assertReplace(
         node, new Getter_NodeReplacerTest_test_forStatement_withVariables_2());
@@ -3326,8 +3323,7 @@
   }
 
   void test_mapLiteral() {
-    // ignore: deprecated_member_use_from_same_package
-    SetOrMapLiteral node = AstTestFactory.mapLiteral(
+    SetOrMapLiteral node = AstTestFactory.setOrMapLiteral(
         null,
         AstTestFactory.typeArgumentList([AstTestFactory.typeName4("E")]),
         [AstTestFactory.mapLiteralEntry("k", AstTestFactory.identifier3("v"))]);
diff --git a/pkg/analyzer/test/source/analysis_options_provider_test.dart b/pkg/analyzer/test/source/analysis_options_provider_test.dart
index d271900..33e23e4 100644
--- a/pkg/analyzer/test/source/analysis_options_provider_test.dart
+++ b/pkg/analyzer/test/source/analysis_options_provider_test.dart
@@ -1,4 +1,4 @@
-// Copyright (c) 2015, the Dart project authors.  Please see the AUTHORS file
+// Copyright (c) 2015, the Dart project authors. Please see the AUTHORS file
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
 
diff --git a/pkg/analyzer/test/source/embedder_test.dart b/pkg/analyzer/test/source/embedder_test.dart
index 2068361..ad2cd7b 100644
--- a/pkg/analyzer/test/source/embedder_test.dart
+++ b/pkg/analyzer/test/source/embedder_test.dart
@@ -1,4 +1,4 @@
-// Copyright (c) 2015, the Dart project authors.  Please see the AUTHORS file
+// Copyright (c) 2015, the Dart project authors. Please see the AUTHORS file
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
 
diff --git a/pkg/analyzer/test/source/error_processor_test.dart b/pkg/analyzer/test/source/error_processor_test.dart
index 966a8ed..71d8d5e 100644
--- a/pkg/analyzer/test/source/error_processor_test.dart
+++ b/pkg/analyzer/test/source/error_processor_test.dart
@@ -1,4 +1,4 @@
-// Copyright (c) 2015, the Dart project authors.  Please see the AUTHORS file
+// Copyright (c) 2015, the Dart project authors. Please see the AUTHORS file
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
 
diff --git a/pkg/analyzer/test/source/package_map_resolver_test.dart b/pkg/analyzer/test/source/package_map_resolver_test.dart
index ec716dc..498e8f7 100644
--- a/pkg/analyzer/test/source/package_map_resolver_test.dart
+++ b/pkg/analyzer/test/source/package_map_resolver_test.dart
@@ -1,4 +1,4 @@
-// Copyright (c) 2014, the Dart project authors.  Please see the AUTHORS file
+// Copyright (c) 2014, the Dart project authors. Please see the AUTHORS file
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
 
diff --git a/pkg/analyzer/test/source/path_filter_test.dart b/pkg/analyzer/test/source/path_filter_test.dart
index 0dcba2e..279deb4 100644
--- a/pkg/analyzer/test/source/path_filter_test.dart
+++ b/pkg/analyzer/test/source/path_filter_test.dart
@@ -1,4 +1,4 @@
-// Copyright (c) 2015, the Dart project authors.  Please see the AUTHORS file
+// Copyright (c) 2015, the Dart project authors. Please see the AUTHORS file
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
 
diff --git a/pkg/analyzer/test/source/sdk_ext_test.dart b/pkg/analyzer/test/source/sdk_ext_test.dart
index 4f542d1..0172bc6 100644
--- a/pkg/analyzer/test/source/sdk_ext_test.dart
+++ b/pkg/analyzer/test/source/sdk_ext_test.dart
@@ -1,4 +1,4 @@
-// Copyright (c) 2015, the Dart project authors.  Please see the AUTHORS file
+// Copyright (c) 2015, the Dart project authors. Please see the AUTHORS file
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
 
diff --git a/pkg/analyzer/test/source/test_all.dart b/pkg/analyzer/test/source/test_all.dart
index f356dc3..0d8233d 100644
--- a/pkg/analyzer/test/source/test_all.dart
+++ b/pkg/analyzer/test/source/test_all.dart
@@ -5,14 +5,13 @@
 import 'package:test_reflective_loader/test_reflective_loader.dart';
 
 import 'analysis_options_provider_test.dart' as analysis_options_provider_test;
-import 'embedder_test.dart'
-    as embedder_test; // ignore: deprecated_member_use_from_same_package
+import 'embedder_test.dart' // ignore: deprecated_member_use_from_same_package
+    as embedder_test;
 import 'error_processor_test.dart' as error_processor_test;
 import 'package_map_resolver_test.dart' as package_map_resolver_test;
 import 'path_filter_test.dart' as path_filter_test;
 import 'sdk_ext_test.dart' as sdk_ext_test;
 
-/// Utility for manually running all tests.
 main() {
   defineReflectiveSuite(() {
     analysis_options_provider_test.main();
diff --git a/pkg/analyzer/test/src/context/cache_test.dart b/pkg/analyzer/test/src/context/cache_test.dart
index 2b42c7d9..a689ff0 100644
--- a/pkg/analyzer/test/src/context/cache_test.dart
+++ b/pkg/analyzer/test/src/context/cache_test.dart
@@ -1,4 +1,4 @@
-// Copyright (c) 2015, the Dart project authors.  Please see the AUTHORS file
+// Copyright (c) 2015, the Dart project authors. Please see the AUTHORS file
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
 
diff --git a/pkg/analyzer/test/src/context/source_test.dart b/pkg/analyzer/test/src/context/source_test.dart
index 530d908..74b8c43 100644
--- a/pkg/analyzer/test/src/context/source_test.dart
+++ b/pkg/analyzer/test/src/context/source_test.dart
@@ -1,4 +1,4 @@
-// Copyright (c) 2014, the Dart project authors.  Please see the AUTHORS file
+// Copyright (c) 2014, the Dart project authors. Please see the AUTHORS file
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
 
diff --git a/pkg/analyzer/test/src/dart/analysis/base.dart b/pkg/analyzer/test/src/dart/analysis/base.dart
index 98af793..46ac748 100644
--- a/pkg/analyzer/test/src/dart/analysis/base.dart
+++ b/pkg/analyzer/test/src/dart/analysis/base.dart
@@ -1,4 +1,4 @@
-// Copyright (c) 2016, the Dart project authors.  Please see the AUTHORS file
+// Copyright (c) 2016, the Dart project authors. Please see the AUTHORS file
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
 
diff --git a/pkg/analyzer/test/src/dart/analysis/byte_store_test.dart b/pkg/analyzer/test/src/dart/analysis/byte_store_test.dart
index ad06c6a..1a2be58 100644
--- a/pkg/analyzer/test/src/dart/analysis/byte_store_test.dart
+++ b/pkg/analyzer/test/src/dart/analysis/byte_store_test.dart
@@ -1,4 +1,4 @@
-// Copyright (c) 2016, the Dart project authors.  Please see the AUTHORS file
+// Copyright (c) 2016, the Dart project authors. Please see the AUTHORS file
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
 
diff --git a/pkg/analyzer/test/src/dart/analysis/cache_test.dart b/pkg/analyzer/test/src/dart/analysis/cache_test.dart
index 20f190d..60524d6 100644
--- a/pkg/analyzer/test/src/dart/analysis/cache_test.dart
+++ b/pkg/analyzer/test/src/dart/analysis/cache_test.dart
@@ -1,4 +1,4 @@
-// Copyright (c) 2016, the Dart project authors.  Please see the AUTHORS file
+// Copyright (c) 2016, the Dart project authors. Please see the AUTHORS file
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
 
diff --git a/pkg/analyzer/test/src/dart/analysis/context_root_test.dart b/pkg/analyzer/test/src/dart/analysis/context_root_test.dart
index 6edc6d2..3e8299f 100644
--- a/pkg/analyzer/test/src/dart/analysis/context_root_test.dart
+++ b/pkg/analyzer/test/src/dart/analysis/context_root_test.dart
@@ -1,4 +1,4 @@
-// Copyright (c) 2018, the Dart project authors.  Please see the AUTHORS file
+// Copyright (c) 2018, the Dart project authors. Please see the AUTHORS file
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
 
diff --git a/pkg/analyzer/test/src/dart/analysis/crc32_test.dart b/pkg/analyzer/test/src/dart/analysis/crc32_test.dart
index 2480507..cb7e682 100644
--- a/pkg/analyzer/test/src/dart/analysis/crc32_test.dart
+++ b/pkg/analyzer/test/src/dart/analysis/crc32_test.dart
@@ -1,4 +1,4 @@
-// Copyright (c) 2017, the Dart project authors.  Please see the AUTHORS file
+// Copyright (c) 2017, the Dart project authors. Please see the AUTHORS file
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
 
diff --git a/pkg/analyzer/test/src/dart/analysis/defined_names_test.dart b/pkg/analyzer/test/src/dart/analysis/defined_names_test.dart
index 336414a..63f3ad4 100644
--- a/pkg/analyzer/test/src/dart/analysis/defined_names_test.dart
+++ b/pkg/analyzer/test/src/dart/analysis/defined_names_test.dart
@@ -1,4 +1,4 @@
-// Copyright (c) 2017, the Dart project authors.  Please see the AUTHORS file
+// Copyright (c) 2017, the Dart project authors. Please see the AUTHORS file
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
 
diff --git a/pkg/analyzer/test/src/dart/analysis/dependency/test_all.dart b/pkg/analyzer/test/src/dart/analysis/dependency/test_all.dart
index 0abdb5c..9ddb5bd 100644
--- a/pkg/analyzer/test/src/dart/analysis/dependency/test_all.dart
+++ b/pkg/analyzer/test/src/dart/analysis/dependency/test_all.dart
@@ -1,4 +1,4 @@
-// Copyright (c) 2018, the Dart project authors.  Please see the AUTHORS file
+// Copyright (c) 2018, the Dart project authors. Please see the AUTHORS file
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
 
diff --git a/pkg/analyzer/test/src/dart/analysis/driver_resolution_test.dart b/pkg/analyzer/test/src/dart/analysis/driver_resolution_test.dart
index f5bb3d3..b116529 100644
--- a/pkg/analyzer/test/src/dart/analysis/driver_resolution_test.dart
+++ b/pkg/analyzer/test/src/dart/analysis/driver_resolution_test.dart
@@ -2668,17 +2668,15 @@
 
   test_invalid_const_as() async {
     addTestFile(r'''
-class A {
-  final int a;
-  const A(num b) : a = b as int;
-}
+const num a = 1.2;
+const int b = a as int;
 ''');
     await resolveTestFile();
     expect(result.errors, isNotEmpty);
 
-    var bRef = findNode.simple('b as int');
-    assertElement(bRef, findElement.parameter('b'));
-    assertType(bRef, 'num');
+    var aRef = findNode.simple('a as int');
+    assertElement(aRef, findElement.topGet('a'));
+    assertType(aRef, 'num');
 
     assertTypeName(findNode.typeName('int;'), intElement, 'int');
   }
@@ -4940,7 +4938,7 @@
     BlockFunctionBody fooBody = fooDeclaration.body;
     List<Statement> statements = fooBody.block.statements;
 
-    ForStatement2 forEachStatement = statements[0];
+    ForStatement forEachStatement = statements[0];
     Block forBlock = forEachStatement.body;
     var forEachParts =
         forEachStatement.forLoopParts as ForEachPartsWithIdentifier;
@@ -4975,7 +4973,7 @@
     LocalVariableElement vElement = vNode.declaredElement;
     expect(vElement.type, typeProvider.numType);
 
-    ForStatement2 forEachStatement = statements[1];
+    ForStatement forEachStatement = statements[1];
     Block forBlock = forEachStatement.body;
     var forEachParts =
         forEachStatement.forLoopParts as ForEachPartsWithIdentifier;
@@ -5010,7 +5008,7 @@
     TopLevelVariableElement vElement = vNode.declaredElement;
     expect(vElement.type, typeProvider.numType);
 
-    ForStatement2 forEachStatement = statements[0];
+    ForStatement forEachStatement = statements[0];
     Block forBlock = forEachStatement.body;
     var forEachParts =
         forEachStatement.forLoopParts as ForEachPartsWithIdentifier;
@@ -5039,7 +5037,7 @@
 
     List<Statement> statements = _getMainStatements(result);
 
-    ForStatement2 forEachStatement = statements[0];
+    ForStatement forEachStatement = statements[0];
     Block forBlock = forEachStatement.body;
     var forEachParts =
         forEachStatement.forLoopParts as ForEachPartsWithDeclaration;
@@ -5071,7 +5069,7 @@
 
     List<Statement> statements = _getMainStatements(result);
 
-    ForStatement2 forEachStatement = statements[0];
+    ForStatement forEachStatement = statements[0];
     Block forBlock = forEachStatement.body;
     var forEachParts =
         forEachStatement.forLoopParts as ForEachPartsWithDeclaration;
diff --git a/pkg/analyzer/test/src/dart/analysis/file_byte_store_test.dart b/pkg/analyzer/test/src/dart/analysis/file_byte_store_test.dart
index 5975150..120aab9 100644
--- a/pkg/analyzer/test/src/dart/analysis/file_byte_store_test.dart
+++ b/pkg/analyzer/test/src/dart/analysis/file_byte_store_test.dart
@@ -1,4 +1,4 @@
-// Copyright (c) 2017, the Dart project authors.  Please see the AUTHORS file
+// Copyright (c) 2017, the Dart project authors. Please see the AUTHORS file
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
 
diff --git a/pkg/analyzer/test/src/dart/analysis/file_state_test.dart b/pkg/analyzer/test/src/dart/analysis/file_state_test.dart
index f01268d..f69ba70 100644
--- a/pkg/analyzer/test/src/dart/analysis/file_state_test.dart
+++ b/pkg/analyzer/test/src/dart/analysis/file_state_test.dart
@@ -1,4 +1,4 @@
-// Copyright (c) 2016, the Dart project authors.  Please see the AUTHORS file
+// Copyright (c) 2016, the Dart project authors. Please see the AUTHORS file
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
 
diff --git a/pkg/analyzer/test/src/dart/analysis/fletcher16_test.dart b/pkg/analyzer/test/src/dart/analysis/fletcher16_test.dart
index e44e3a7..fb801e5 100644
--- a/pkg/analyzer/test/src/dart/analysis/fletcher16_test.dart
+++ b/pkg/analyzer/test/src/dart/analysis/fletcher16_test.dart
@@ -1,4 +1,4 @@
-// Copyright (c) 2018, the Dart project authors.  Please see the AUTHORS file
+// Copyright (c) 2018, the Dart project authors. Please see the AUTHORS file
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
 
diff --git a/pkg/analyzer/test/src/dart/analysis/mutex_test.dart b/pkg/analyzer/test/src/dart/analysis/mutex_test.dart
index 34a8d86..a70119a 100644
--- a/pkg/analyzer/test/src/dart/analysis/mutex_test.dart
+++ b/pkg/analyzer/test/src/dart/analysis/mutex_test.dart
@@ -1,4 +1,4 @@
-// Copyright (c) 2017, the Dart project authors.  Please see the AUTHORS file
+// Copyright (c) 2017, the Dart project authors. Please see the AUTHORS file
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
 
diff --git a/pkg/analyzer/test/src/dart/analysis/referenced_names_test.dart b/pkg/analyzer/test/src/dart/analysis/referenced_names_test.dart
index 097d3ed..d223d82 100644
--- a/pkg/analyzer/test/src/dart/analysis/referenced_names_test.dart
+++ b/pkg/analyzer/test/src/dart/analysis/referenced_names_test.dart
@@ -1,4 +1,4 @@
-// Copyright (c) 2016, the Dart project authors.  Please see the AUTHORS file
+// Copyright (c) 2016, the Dart project authors. Please see the AUTHORS file
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
 
diff --git a/pkg/analyzer/test/src/dart/analysis/results_test.dart b/pkg/analyzer/test/src/dart/analysis/results_test.dart
index bb60ff5..06a0b47 100644
--- a/pkg/analyzer/test/src/dart/analysis/results_test.dart
+++ b/pkg/analyzer/test/src/dart/analysis/results_test.dart
@@ -1,4 +1,4 @@
-// Copyright (c) 2019, the Dart project authors.  Please see the AUTHORS file
+// Copyright (c) 2019, the Dart project authors. Please see the AUTHORS file
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
 
diff --git a/pkg/analyzer/test/src/dart/analysis/session_helper_test.dart b/pkg/analyzer/test/src/dart/analysis/session_helper_test.dart
index a5b6353..7316c24 100644
--- a/pkg/analyzer/test/src/dart/analysis/session_helper_test.dart
+++ b/pkg/analyzer/test/src/dart/analysis/session_helper_test.dart
@@ -1,4 +1,4 @@
-// Copyright (c) 2018, the Dart project authors.  Please see the AUTHORS file
+// Copyright (c) 2018, the Dart project authors. Please see the AUTHORS file
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
 
diff --git a/pkg/analyzer/test/src/dart/analysis/test_all.dart b/pkg/analyzer/test/src/dart/analysis/test_all.dart
index d1428d6..481b428 100644
--- a/pkg/analyzer/test/src/dart/analysis/test_all.dart
+++ b/pkg/analyzer/test/src/dart/analysis/test_all.dart
@@ -1,4 +1,4 @@
-// Copyright (c) 2016, the Dart project authors.  Please see the AUTHORS file
+// Copyright (c) 2016, the Dart project authors. Please see the AUTHORS file
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
 
diff --git a/pkg/analyzer/test/src/dart/ast/ast_test.dart b/pkg/analyzer/test/src/dart/ast/ast_test.dart
index f0a6265..7c10555 100644
--- a/pkg/analyzer/test/src/dart/ast/ast_test.dart
+++ b/pkg/analyzer/test/src/dart/ast/ast_test.dart
@@ -469,8 +469,6 @@
   String testSource;
   CompilationUnitImpl testUnit;
 
-  bool get enableNewAnalysisDriver => true;
-
   void assertIsConst(String snippet, bool expectedResult) {
     int index = testSource.indexOf(snippet);
     expect(index >= 0, isTrue);
diff --git a/pkg/analyzer/test/src/dart/ast/parse_base.dart b/pkg/analyzer/test/src/dart/ast/parse_base.dart
index 257820f..78f17d5 100644
--- a/pkg/analyzer/test/src/dart/ast/parse_base.dart
+++ b/pkg/analyzer/test/src/dart/ast/parse_base.dart
@@ -39,19 +39,27 @@
     parser.enableSpreadCollections = experimentStatus.spread_collections;
     parser.enableControlFlowCollections =
         experimentStatus.control_flow_collections;
+    parser.enableTripleShift = experimentStatus.triple_shift;
 
     var unit = parser.parseCompilationUnit(token);
     unit.lineInfo = LineInfo(scanner.lineStarts);
 
-    return ParseResult(path, content, unit, errorListener.errors);
+    return ParseResult(
+      path,
+      content,
+      unit.lineInfo,
+      unit,
+      errorListener.errors,
+    );
   }
 }
 
 class ParseResult {
   final String path;
   final String content;
+  final LineInfo lineInfo;
   final CompilationUnit unit;
   final List<AnalysisError> errors;
 
-  ParseResult(this.path, this.content, this.unit, this.errors);
+  ParseResult(this.path, this.content, this.lineInfo, this.unit, this.errors);
 }
diff --git a/pkg/analyzer/test/src/dart/ast/test_all.dart b/pkg/analyzer/test/src/dart/ast/test_all.dart
index 25eb567..2f66d8c 100644
--- a/pkg/analyzer/test/src/dart/ast/test_all.dart
+++ b/pkg/analyzer/test/src/dart/ast/test_all.dart
@@ -1,4 +1,4 @@
-// Copyright (c) 2014, the Dart project authors.  Please see the AUTHORS file
+// Copyright (c) 2014, the Dart project authors. Please see the AUTHORS file
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
 
diff --git a/pkg/analyzer/test/src/dart/ast/utilities_test.dart b/pkg/analyzer/test/src/dart/ast/utilities_test.dart
index 28f67c2..31e9a56 100644
--- a/pkg/analyzer/test/src/dart/ast/utilities_test.dart
+++ b/pkg/analyzer/test/src/dart/ast/utilities_test.dart
@@ -394,8 +394,8 @@
     expect((toNode.updaters[0] as SimpleIdentifier).staticType, same(typeC));
   }
 
-  void test_visitForStatement2() {
-    ForStatement2 createNode() => astFactory.forStatement2(
+  void test_visitForStatement() {
+    ForStatement createNode() => astFactory.forStatement(
         forLoopParts: astFactory.forEachPartsWithIdentifier(
             identifier: AstTestFactory.identifier3('a'),
             iterable: AstTestFactory.identifier3('b')),
@@ -406,14 +406,14 @@
     DartType typeB = ElementFactory.classElement2("B").type;
     DartType typeC = ElementFactory.classElement2("C").type;
 
-    ForStatement2 fromNode = createNode();
+    ForStatement fromNode = createNode();
     ForEachPartsWithIdentifier fromForLoopParts = fromNode.forLoopParts;
     fromForLoopParts.identifier.staticType = typeA;
     (fromForLoopParts.iterable as SimpleIdentifier).staticType = typeB;
     ((fromNode.body as ExpressionStatement).expression as SimpleIdentifier)
         .staticType = typeC;
 
-    ForStatement2 toNode = createNode();
+    ForStatement toNode = createNode();
     ResolutionCopier.copyResolutionData(fromNode, toNode);
     ForEachPartsWithIdentifier toForLoopParts = fromNode.forLoopParts;
     expect(toForLoopParts.identifier.staticType, same(typeA));
@@ -576,23 +576,21 @@
 
     ListLiteral fromNode = createNode();
     (fromNode.typeArguments.arguments[0] as TypeName).type = typeA;
-    (fromNode.elements2[0] as SimpleIdentifier).staticType = typeB;
+    (fromNode.elements[0] as SimpleIdentifier).staticType = typeB;
     fromNode.staticType = typeC;
 
     ListLiteral toNode = createNode();
     ResolutionCopier.copyResolutionData(fromNode, toNode);
     expect((toNode.typeArguments.arguments[0] as TypeName).type, same(typeA));
-    expect((toNode.elements2[0] as SimpleIdentifier).staticType, same(typeB));
+    expect((toNode.elements[0] as SimpleIdentifier).staticType, same(typeB));
     expect(fromNode.staticType, same(typeC));
   }
 
   void test_visitMapLiteral() {
-    // ignore: deprecated_member_use_from_same_package
-    SetOrMapLiteral fromNode = AstTestFactory.mapLiteral2();
+    SetOrMapLiteral fromNode = AstTestFactory.setOrMapLiteral(null, null);
     DartType staticType = ElementFactory.classElement2("C").type;
     fromNode.staticType = staticType;
-    // ignore: deprecated_member_use_from_same_package
-    SetOrMapLiteral toNode = AstTestFactory.mapLiteral2();
+    SetOrMapLiteral toNode = AstTestFactory.setOrMapLiteral(null, null);
     ResolutionCopier.copyResolutionData(fromNode, toNode);
     expect(toNode.staticType, same(staticType));
   }
@@ -747,7 +745,7 @@
     SetOrMapLiteral fromNode = createNode();
     (fromNode.typeArguments.arguments[0] as TypeName).type = typeA;
     (fromNode.typeArguments.arguments[1] as TypeName).type = typeB;
-    MapLiteralEntry fromEntry = fromNode.elements2[0] as MapLiteralEntry;
+    MapLiteralEntry fromEntry = fromNode.elements[0] as MapLiteralEntry;
     (fromEntry.key as SimpleStringLiteral).staticType = typeC;
     (fromEntry.value as SimpleStringLiteral).staticType = typeD;
 
@@ -755,7 +753,7 @@
     ResolutionCopier.copyResolutionData(fromNode, toNode);
     expect((toNode.typeArguments.arguments[0] as TypeName).type, same(typeA));
     expect((toNode.typeArguments.arguments[1] as TypeName).type, same(typeB));
-    MapLiteralEntry toEntry = fromNode.elements2[0] as MapLiteralEntry;
+    MapLiteralEntry toEntry = fromNode.elements[0] as MapLiteralEntry;
     expect((toEntry.key as SimpleStringLiteral).staticType, same(typeC));
     expect((toEntry.value as SimpleStringLiteral).staticType, same(typeD));
   }
@@ -771,12 +769,12 @@
 
     SetOrMapLiteral fromNode = createNode();
     (fromNode.typeArguments.arguments[0] as TypeName).type = typeA;
-    (fromNode.elements2[0] as SimpleIdentifier).staticType = typeB;
+    (fromNode.elements[0] as SimpleIdentifier).staticType = typeB;
 
     SetOrMapLiteral toNode = createNode();
     ResolutionCopier.copyResolutionData(fromNode, toNode);
     expect((toNode.typeArguments.arguments[0] as TypeName).type, same(typeA));
-    expect((toNode.elements2[0] as SimpleIdentifier).staticType, same(typeB));
+    expect((toNode.elements[0] as SimpleIdentifier).staticType, same(typeB));
   }
 
   void test_visitSimpleIdentifier() {
@@ -815,13 +813,13 @@
     DartType typeA = ElementFactory.classElement2("A").type;
 
     SpreadElement fromNode = createNode();
-    ((fromNode.expression as ListLiteral).elements2[0] as SimpleIdentifier)
+    ((fromNode.expression as ListLiteral).elements[0] as SimpleIdentifier)
         .staticType = typeA;
 
     SpreadElement toNode = createNode();
     ResolutionCopier.copyResolutionData(fromNode, toNode);
     expect(
-        ((toNode.expression as ListLiteral).elements2[0] as SimpleIdentifier)
+        ((toNode.expression as ListLiteral).elements[0] as SimpleIdentifier)
             .staticType,
         same(typeA));
   }
@@ -1814,15 +1812,17 @@
   void test_visitForEachStatement_declared() {
     _assertSource(
         "for (var a in b) {}",
-        // ignore: deprecated_member_use_from_same_package
-        AstTestFactory.forEachStatement(AstTestFactory.declaredIdentifier3("a"),
-            AstTestFactory.identifier3("b"), AstTestFactory.block()));
+        AstTestFactory.forStatement(
+            AstTestFactory.forEachPartsWithDeclaration(
+                AstTestFactory.declaredIdentifier3("a"),
+                AstTestFactory.identifier3("b")),
+            AstTestFactory.block()));
   }
 
   void test_visitForEachStatement_variable() {
     _assertSource(
         "for (a in b) {}",
-        astFactory.forStatement2(
+        astFactory.forStatement(
             forKeyword: TokenFactory.tokenFromKeyword(Keyword.FOR),
             leftParenthesis: TokenFactory.tokenFromType(TokenType.OPEN_PAREN),
             forLoopParts: astFactory.forEachPartsWithIdentifier(
@@ -1836,7 +1836,7 @@
   void test_visitForEachStatement_variable_await() {
     _assertSource(
         "await for (a in b) {}",
-        astFactory.forStatement2(
+        astFactory.forStatement(
             awaitKeyword: TokenFactory.tokenFromString("await"),
             forKeyword: TokenFactory.tokenFromKeyword(Keyword.FOR),
             leftParenthesis: TokenFactory.tokenFromType(TokenType.OPEN_PAREN),
@@ -2047,10 +2047,10 @@
             updaters: [AstTestFactory.identifier3('u')]));
   }
 
-  void test_visitForStatement2() {
+  void test_visitForStatement() {
     _assertSource(
         'for (e in l) s;',
-        astFactory.forStatement2(
+        astFactory.forStatement(
             forLoopParts: astFactory.forEachPartsWithIdentifier(
                 identifier: AstTestFactory.identifier3('e'),
                 iterable: AstTestFactory.identifier3('l')),
@@ -2061,104 +2061,120 @@
   void test_visitForStatement_c() {
     _assertSource(
         "for (; c;) {}",
-        // ignore: deprecated_member_use_from_same_package
-        AstTestFactory.forStatement(null, AstTestFactory.identifier3("c"), null,
+        AstTestFactory.forStatement(
+            AstTestFactory.forPartsWithExpression(
+                null, AstTestFactory.identifier3("c"), null),
             AstTestFactory.block()));
   }
 
   void test_visitForStatement_cu() {
     _assertSource(
         "for (; c; u) {}",
-        // ignore: deprecated_member_use_from_same_package
-        AstTestFactory.forStatement(null, AstTestFactory.identifier3("c"),
-            [AstTestFactory.identifier3("u")], AstTestFactory.block()));
+        AstTestFactory.forStatement(
+            AstTestFactory.forPartsWithExpression(
+                null,
+                AstTestFactory.identifier3("c"),
+                [AstTestFactory.identifier3("u")]),
+            AstTestFactory.block()));
   }
 
   void test_visitForStatement_e() {
     _assertSource(
         "for (e;;) {}",
-        // ignore: deprecated_member_use_from_same_package
-        AstTestFactory.forStatement(AstTestFactory.identifier3("e"), null, null,
+        AstTestFactory.forStatement(
+            AstTestFactory.forPartsWithExpression(
+                AstTestFactory.identifier3("e"), null, null),
             AstTestFactory.block()));
   }
 
   void test_visitForStatement_ec() {
     _assertSource(
         "for (e; c;) {}",
-        // ignore: deprecated_member_use_from_same_package
-        AstTestFactory.forStatement(AstTestFactory.identifier3("e"),
-            AstTestFactory.identifier3("c"), null, AstTestFactory.block()));
+        AstTestFactory.forStatement(
+            AstTestFactory.forPartsWithExpression(
+                AstTestFactory.identifier3("e"),
+                AstTestFactory.identifier3("c"),
+                null),
+            AstTestFactory.block()));
   }
 
   void test_visitForStatement_ecu() {
     _assertSource(
         "for (e; c; u) {}",
-        // ignore: deprecated_member_use_from_same_package
         AstTestFactory.forStatement(
-            AstTestFactory.identifier3("e"),
-            AstTestFactory.identifier3("c"),
-            [AstTestFactory.identifier3("u")],
+            AstTestFactory.forPartsWithExpression(
+                AstTestFactory.identifier3("e"),
+                AstTestFactory.identifier3("c"),
+                [AstTestFactory.identifier3("u")]),
             AstTestFactory.block()));
   }
 
   void test_visitForStatement_eu() {
     _assertSource(
         "for (e;; u) {}",
-        // ignore: deprecated_member_use_from_same_package
-        AstTestFactory.forStatement(AstTestFactory.identifier3("e"), null,
-            [AstTestFactory.identifier3("u")], AstTestFactory.block()));
+        AstTestFactory.forStatement(
+            AstTestFactory.forPartsWithExpression(
+                AstTestFactory.identifier3("e"),
+                null,
+                [AstTestFactory.identifier3("u")]),
+            AstTestFactory.block()));
   }
 
   void test_visitForStatement_i() {
     _assertSource(
         "for (var i;;) {}",
-        AstTestFactory.forStatement2(
-            AstTestFactory.variableDeclarationList2(
-                Keyword.VAR, [AstTestFactory.variableDeclaration("i")]),
-            null,
-            null,
+        AstTestFactory.forStatement(
+            AstTestFactory.forPartsWithDeclarations(
+                AstTestFactory.variableDeclarationList2(
+                    Keyword.VAR, [AstTestFactory.variableDeclaration("i")]),
+                null,
+                null),
             AstTestFactory.block()));
   }
 
   void test_visitForStatement_ic() {
     _assertSource(
         "for (var i; c;) {}",
-        AstTestFactory.forStatement2(
-            AstTestFactory.variableDeclarationList2(
-                Keyword.VAR, [AstTestFactory.variableDeclaration("i")]),
-            AstTestFactory.identifier3("c"),
-            null,
+        AstTestFactory.forStatement(
+            AstTestFactory.forPartsWithDeclarations(
+                AstTestFactory.variableDeclarationList2(
+                    Keyword.VAR, [AstTestFactory.variableDeclaration("i")]),
+                AstTestFactory.identifier3("c"),
+                null),
             AstTestFactory.block()));
   }
 
   void test_visitForStatement_icu() {
     _assertSource(
         "for (var i; c; u) {}",
-        AstTestFactory.forStatement2(
-            AstTestFactory.variableDeclarationList2(
-                Keyword.VAR, [AstTestFactory.variableDeclaration("i")]),
-            AstTestFactory.identifier3("c"),
-            [AstTestFactory.identifier3("u")],
+        AstTestFactory.forStatement(
+            AstTestFactory.forPartsWithDeclarations(
+                AstTestFactory.variableDeclarationList2(
+                    Keyword.VAR, [AstTestFactory.variableDeclaration("i")]),
+                AstTestFactory.identifier3("c"),
+                [AstTestFactory.identifier3("u")]),
             AstTestFactory.block()));
   }
 
   void test_visitForStatement_iu() {
     _assertSource(
         "for (var i;; u) {}",
-        AstTestFactory.forStatement2(
-            AstTestFactory.variableDeclarationList2(
-                Keyword.VAR, [AstTestFactory.variableDeclaration("i")]),
-            null,
-            [AstTestFactory.identifier3("u")],
+        AstTestFactory.forStatement(
+            AstTestFactory.forPartsWithDeclarations(
+                AstTestFactory.variableDeclarationList2(
+                    Keyword.VAR, [AstTestFactory.variableDeclaration("i")]),
+                null,
+                [AstTestFactory.identifier3("u")]),
             AstTestFactory.block()));
   }
 
   void test_visitForStatement_u() {
     _assertSource(
         "for (;; u) {}",
-        // ignore: deprecated_member_use_from_same_package
-        AstTestFactory.forStatement(null, null,
-            [AstTestFactory.identifier3("u")], AstTestFactory.block()));
+        AstTestFactory.forStatement(
+            AstTestFactory.forPartsWithExpression(
+                null, null, [AstTestFactory.identifier3("u")]),
+            AstTestFactory.block()));
   }
 
   void test_visitFunctionDeclaration_external() {
@@ -2715,20 +2731,18 @@
   }
 
   void test_visitMapLiteral_const() {
-    // ignore: deprecated_member_use_from_same_package
-    _assertSource("const {}", AstTestFactory.mapLiteral(Keyword.CONST, null));
+    _assertSource(
+        "const {}", AstTestFactory.setOrMapLiteral(Keyword.CONST, null));
   }
 
   void test_visitMapLiteral_empty() {
-    // ignore: deprecated_member_use_from_same_package
-    _assertSource("{}", AstTestFactory.mapLiteral2());
+    _assertSource("{}", AstTestFactory.setOrMapLiteral(null, null));
   }
 
   void test_visitMapLiteral_nonEmpty() {
     _assertSource(
         "{'a' : a, 'b' : b, 'c' : c}",
-        // ignore: deprecated_member_use_from_same_package
-        AstTestFactory.mapLiteral2([
+        AstTestFactory.setOrMapLiteral(null, null, [
           AstTestFactory.mapLiteralEntry("a", AstTestFactory.identifier3("a")),
           AstTestFactory.mapLiteralEntry("b", AstTestFactory.identifier3("b")),
           AstTestFactory.mapLiteralEntry("c", AstTestFactory.identifier3("c"))
@@ -4512,14 +4526,17 @@
   void test_visitForEachStatement_declared() {
     _assertSource(
         "for (var a in b) {}",
-        AstTestFactory.forEachStatement(AstTestFactory.declaredIdentifier3("a"),
-            AstTestFactory.identifier3("b"), AstTestFactory.block()));
+        AstTestFactory.forStatement(
+            AstTestFactory.forEachPartsWithDeclaration(
+                AstTestFactory.declaredIdentifier3("a"),
+                AstTestFactory.identifier3("b")),
+            AstTestFactory.block()));
   }
 
   void test_visitForEachStatement_variable() {
     _assertSource(
         "for (a in b) {}",
-        astFactory.forStatement2(
+        astFactory.forStatement(
             forKeyword: TokenFactory.tokenFromKeyword(Keyword.FOR),
             leftParenthesis: TokenFactory.tokenFromType(TokenType.OPEN_PAREN),
             forLoopParts: astFactory.forEachPartsWithIdentifier(
@@ -4533,7 +4550,7 @@
   void test_visitForEachStatement_variable_await() {
     _assertSource(
         "await for (a in b) {}",
-        astFactory.forStatement2(
+        astFactory.forStatement(
             awaitKeyword: TokenFactory.tokenFromString("await"),
             forKeyword: TokenFactory.tokenFromKeyword(Keyword.FOR),
             leftParenthesis: TokenFactory.tokenFromType(TokenType.OPEN_PAREN),
@@ -4744,10 +4761,10 @@
             updaters: [AstTestFactory.identifier3('u')]));
   }
 
-  void test_visitForStatement2() {
+  void test_visitForStatement() {
     _assertSource(
         'for (e in l) s;',
-        astFactory.forStatement2(
+        astFactory.forStatement(
             forLoopParts: astFactory.forEachPartsWithIdentifier(
                 identifier: AstTestFactory.identifier3('e'),
                 iterable: AstTestFactory.identifier3('l')),
@@ -4758,97 +4775,120 @@
   void test_visitForStatement_c() {
     _assertSource(
         "for (; c;) {}",
-        AstTestFactory.forStatement(null, AstTestFactory.identifier3("c"), null,
+        AstTestFactory.forStatement(
+            AstTestFactory.forPartsWithExpression(
+                null, AstTestFactory.identifier3("c"), null),
             AstTestFactory.block()));
   }
 
   void test_visitForStatement_cu() {
     _assertSource(
         "for (; c; u) {}",
-        AstTestFactory.forStatement(null, AstTestFactory.identifier3("c"),
-            [AstTestFactory.identifier3("u")], AstTestFactory.block()));
+        AstTestFactory.forStatement(
+            AstTestFactory.forPartsWithExpression(
+                null,
+                AstTestFactory.identifier3("c"),
+                [AstTestFactory.identifier3("u")]),
+            AstTestFactory.block()));
   }
 
   void test_visitForStatement_e() {
     _assertSource(
         "for (e;;) {}",
-        AstTestFactory.forStatement(AstTestFactory.identifier3("e"), null, null,
+        AstTestFactory.forStatement(
+            AstTestFactory.forPartsWithExpression(
+                AstTestFactory.identifier3("e"), null, null),
             AstTestFactory.block()));
   }
 
   void test_visitForStatement_ec() {
     _assertSource(
         "for (e; c;) {}",
-        AstTestFactory.forStatement(AstTestFactory.identifier3("e"),
-            AstTestFactory.identifier3("c"), null, AstTestFactory.block()));
+        AstTestFactory.forStatement(
+            AstTestFactory.forPartsWithExpression(
+                AstTestFactory.identifier3("e"),
+                AstTestFactory.identifier3("c"),
+                null),
+            AstTestFactory.block()));
   }
 
   void test_visitForStatement_ecu() {
     _assertSource(
         "for (e; c; u) {}",
         AstTestFactory.forStatement(
-            AstTestFactory.identifier3("e"),
-            AstTestFactory.identifier3("c"),
-            [AstTestFactory.identifier3("u")],
+            AstTestFactory.forPartsWithExpression(
+                AstTestFactory.identifier3("e"),
+                AstTestFactory.identifier3("c"),
+                [AstTestFactory.identifier3("u")]),
             AstTestFactory.block()));
   }
 
   void test_visitForStatement_eu() {
     _assertSource(
         "for (e;; u) {}",
-        AstTestFactory.forStatement(AstTestFactory.identifier3("e"), null,
-            [AstTestFactory.identifier3("u")], AstTestFactory.block()));
+        AstTestFactory.forStatement(
+            AstTestFactory.forPartsWithExpression(
+                AstTestFactory.identifier3("e"),
+                null,
+                [AstTestFactory.identifier3("u")]),
+            AstTestFactory.block()));
   }
 
   void test_visitForStatement_i() {
     _assertSource(
         "for (var i;;) {}",
-        AstTestFactory.forStatement2(
-            AstTestFactory.variableDeclarationList2(
-                Keyword.VAR, [AstTestFactory.variableDeclaration("i")]),
-            null,
-            null,
+        AstTestFactory.forStatement(
+            AstTestFactory.forPartsWithDeclarations(
+                AstTestFactory.variableDeclarationList2(
+                    Keyword.VAR, [AstTestFactory.variableDeclaration("i")]),
+                null,
+                null),
             AstTestFactory.block()));
   }
 
   void test_visitForStatement_ic() {
     _assertSource(
         "for (var i; c;) {}",
-        AstTestFactory.forStatement2(
-            AstTestFactory.variableDeclarationList2(
-                Keyword.VAR, [AstTestFactory.variableDeclaration("i")]),
-            AstTestFactory.identifier3("c"),
-            null,
+        AstTestFactory.forStatement(
+            AstTestFactory.forPartsWithDeclarations(
+                AstTestFactory.variableDeclarationList2(
+                    Keyword.VAR, [AstTestFactory.variableDeclaration("i")]),
+                AstTestFactory.identifier3("c"),
+                null),
             AstTestFactory.block()));
   }
 
   void test_visitForStatement_icu() {
     _assertSource(
         "for (var i; c; u) {}",
-        AstTestFactory.forStatement2(
-            AstTestFactory.variableDeclarationList2(
-                Keyword.VAR, [AstTestFactory.variableDeclaration("i")]),
-            AstTestFactory.identifier3("c"),
-            [AstTestFactory.identifier3("u")],
+        AstTestFactory.forStatement(
+            AstTestFactory.forPartsWithDeclarations(
+                AstTestFactory.variableDeclarationList2(
+                    Keyword.VAR, [AstTestFactory.variableDeclaration("i")]),
+                AstTestFactory.identifier3("c"),
+                [AstTestFactory.identifier3("u")]),
             AstTestFactory.block()));
   }
 
   void test_visitForStatement_iu() {
     _assertSource(
         "for (var i;; u) {}",
-        AstTestFactory.forStatement2(
-            AstTestFactory.variableDeclarationList2(
-                Keyword.VAR, [AstTestFactory.variableDeclaration("i")]),
-            null,
-            [AstTestFactory.identifier3("u")],
+        AstTestFactory.forStatement(
+            AstTestFactory.forPartsWithDeclarations(
+                AstTestFactory.variableDeclarationList2(
+                    Keyword.VAR, [AstTestFactory.variableDeclaration("i")]),
+                null,
+                [AstTestFactory.identifier3("u")]),
             AstTestFactory.block()));
   }
 
   void test_visitForStatement_u() {
     _assertSource(
         "for (;; u) {}",
-        AstTestFactory.forStatement(null, null,
-            [AstTestFactory.identifier3("u")], AstTestFactory.block()));
+        AstTestFactory.forStatement(
+            AstTestFactory.forPartsWithExpression(
+                null, null, [AstTestFactory.identifier3("u")]),
+            AstTestFactory.block()));
   }
 
   void test_visitFunctionDeclaration_external() {
@@ -5405,17 +5445,18 @@
   }
 
   void test_visitMapLiteral_const() {
-    _assertSource("const {}", AstTestFactory.mapLiteral(Keyword.CONST, null));
+    _assertSource(
+        "const {}", AstTestFactory.setOrMapLiteral(Keyword.CONST, null));
   }
 
   void test_visitMapLiteral_empty() {
-    _assertSource("{}", AstTestFactory.mapLiteral2());
+    _assertSource("{}", AstTestFactory.setOrMapLiteral(null, null));
   }
 
   void test_visitMapLiteral_nonEmpty() {
     _assertSource(
         "{'a' : a, 'b' : b, 'c' : c}",
-        AstTestFactory.mapLiteral2([
+        AstTestFactory.setOrMapLiteral(null, null, [
           AstTestFactory.mapLiteralEntry("a", AstTestFactory.identifier3("a")),
           AstTestFactory.mapLiteralEntry("b", AstTestFactory.identifier3("b")),
           AstTestFactory.mapLiteralEntry("c", AstTestFactory.identifier3("c"))
diff --git a/pkg/analyzer/test/src/dart/constant/evaluation_test.dart b/pkg/analyzer/test/src/dart/constant/evaluation_test.dart
index 7b9330f..1c63c45 100644
--- a/pkg/analyzer/test/src/dart/constant/evaluation_test.dart
+++ b/pkg/analyzer/test/src/dart/constant/evaluation_test.dart
@@ -211,7 +211,10 @@
     extends ConstantVisitorTestSupport {
   @override
   AnalysisOptionsImpl get analysisOptions => AnalysisOptionsImpl()
-    ..enabledExperiments = [EnableString.constant_update_2018];
+    ..enabledExperiments = [
+      EnableString.constant_update_2018,
+      EnableString.triple_shift
+    ];
 
   test_visitAsExpression_instanceOfSameClass() async {
     await _resolveTestCode('''
@@ -284,6 +287,19 @@
     expect(result.type, typeProvider.nullType);
   }
 
+  test_visitAsExpression_potentialConst() async {
+    await assertNoErrorsInCode('''
+class A {
+  const A();
+}
+
+class MyClass {
+  final A a;
+  const MyClass(Object o) : a = o as A;
+}
+''');
+  }
+
   test_visitBinaryExpression_and_bool_known_known() async {
     await _resolveTestCode('''
 const c = false & true;
@@ -354,6 +370,15 @@
     expect(result.toIntValue(), 0);
   }
 
+  test_visitBinaryExpression_gtGtGt_negative_moreThan64Bits() async {
+    await _resolveTestCode('''
+const c = 0xFFFFFFFF >>> 65;
+''');
+    DartObjectImpl result = _evaluateConstant('c');
+    expect(result.type, typeProvider.intType);
+    expect(result.toIntValue(), 0);
+  }
+
   test_visitBinaryExpression_gtGtGt_negative_negativeBits() async {
     await _resolveTestCode('''
 const c = 0xFFFFFFFF >>> -2;
@@ -389,6 +414,15 @@
     expect(result.toIntValue(), 0);
   }
 
+  test_visitBinaryExpression_gtGtGt_positive_moreThan64Bits() async {
+    await _resolveTestCode('''
+const c = 0xFF >>> 65;
+''');
+    DartObjectImpl result = _evaluateConstant('c');
+    expect(result.type, typeProvider.intType);
+    expect(result.toIntValue(), 0);
+  }
+
   test_visitBinaryExpression_gtGtGt_positive_negativeBits() async {
     await _resolveTestCode('''
 const c = 0xFF >>> -2;
@@ -573,9 +607,9 @@
   test_visitConditionalExpression_lazy_false_invalid_int() async {
     await _resolveTestCode('''
 const c = false ? new C() : 0;
-class C {}
 ''');
-    DartObjectImpl result = _evaluateConstant('c');
+    DartObjectImpl result = _evaluateConstant('c',
+        errorCodes: [CompileTimeErrorCode.INVALID_CONSTANT]);
     expect(result.type, typeProvider.intType);
     expect(result.toIntValue(), 0);
   }
@@ -599,9 +633,10 @@
 
   test_visitConditionalExpression_lazy_true_int_invalid() async {
     await _resolveTestCode('''
-const c = true ? 1 : new C();
+const c = true ? 1: new C();
 ''');
-    DartObjectImpl result = _evaluateConstant('c');
+    DartObjectImpl result = _evaluateConstant('c',
+        errorCodes: [CompileTimeErrorCode.INVALID_CONSTANT]);
     expect(result.type, typeProvider.intType);
     expect(result.toIntValue(), 1);
   }
diff --git a/pkg/analyzer/test/src/dart/constant/potentially_constant_test.dart b/pkg/analyzer/test/src/dart/constant/potentially_constant_test.dart
index b9ca532..c26a62f 100644
--- a/pkg/analyzer/test/src/dart/constant/potentially_constant_test.dart
+++ b/pkg/analyzer/test/src/dart/constant/potentially_constant_test.dart
@@ -139,6 +139,12 @@
 
 @reflectiveTest
 class PotentiallyConstantTest extends DriverResolutionTest {
+  test_adjacentStrings() async {
+    await _assertConst(r'''
+var x = 'a' 'b';
+''', () => _xInitializer());
+  }
+
   test_asExpression() async {
     await _assertConst(r'''
 const a = 0;
@@ -385,6 +391,14 @@
 ''', () => _xInitializer(), () => [findNode.methodInvocation('a.foo()')]);
   }
 
+  test_namedExpression() async {
+    await _assertConst(r'''
+void f({a}) {}
+
+var x = f(a: 0);
+''', () => findNode.namedExpression('a: 0'));
+  }
+
   test_parenthesizedExpression_const() async {
     await _assertConst(r'''
 const a = 0;
@@ -406,16 +420,6 @@
 ''', () => _xInitializer(), () => [findNode.postfix('a++')]);
   }
 
-  test_prefixedIdentifier_importPrefix() async {
-    newFile('/test/lib/a.dart', content: r'''
-const a = 0;
-''');
-    await _assertConst(r'''
-import 'a.dart' as p;
-var x = p.a + 1;
-''', () => _xInitializer());
-  }
-
   test_prefixedIdentifier_importPrefix_deferred() async {
     newFile('/test/lib/a.dart', content: r'''
 const a = 0;
@@ -426,6 +430,26 @@
 ''', () => _xInitializer(), () => [findNode.prefixed('p.a')]);
   }
 
+  test_prefixedIdentifier_importPrefix_function() async {
+    newFile('/test/lib/a.dart', content: r'''
+void f() {}
+''');
+    await _assertConst(r'''
+import 'a.dart' as p;
+var x = p.f;
+''', () => _xInitializer());
+  }
+
+  test_prefixedIdentifier_importPrefix_topVar() async {
+    newFile('/test/lib/a.dart', content: r'''
+const a = 0;
+''');
+    await _assertConst(r'''
+import 'a.dart' as p;
+var x = p.a + 1;
+''', () => _xInitializer());
+  }
+
   test_prefixedIdentifier_length_const() async {
     await _assertConst(r'''
 const a = 'abc';
@@ -688,6 +712,41 @@
     );
   }
 
+  test_simpleIdentifier_method_static() async {
+    await _assertConst(r'''
+class A {
+  static m() {};
+
+  final Object f;
+
+  const A() : f = m; // ref
+}
+''', () => findNode.simple('m; // ref'));
+  }
+
+  test_simpleIdentifier_parameterOfConstConstructor_inBody() async {
+    await _assertNotConst(
+      r'''
+class C {
+  const C(int a) {
+    var x = a + 1;
+  }
+}
+''',
+      () => _xInitializer(),
+      () => [findNode.simple('a +')],
+    );
+  }
+
+  test_simpleIdentifier_parameterOfConstConstructor_inInitializer() async {
+    await _assertConst(r'''
+class C {
+  final int f;
+  const C(int a) : f = a + 1;
+}
+''', () => findNode.constructorFieldInitializer('f =').expression);
+  }
+
   test_simpleIdentifier_topVar_const() async {
     await _assertConst(r'''
 const a = 0;
@@ -730,6 +789,12 @@
     );
   }
 
+  test_stringLiteral() async {
+    await _assertConst(r'''
+var x = 'a';
+''', () => _xInitializer());
+  }
+
   _assertConst(String code, AstNode Function() getNode) async {
     addTestFile(code);
     await resolveTestFile();
diff --git a/pkg/analyzer/test/src/dart/constant/utilities_test.dart b/pkg/analyzer/test/src/dart/constant/utilities_test.dart
index f501f97..c374591 100644
--- a/pkg/analyzer/test/src/dart/constant/utilities_test.dart
+++ b/pkg/analyzer/test/src/dart/constant/utilities_test.dart
@@ -11,7 +11,6 @@
 import 'package:analyzer/src/dart/constant/evaluation.dart';
 import 'package:analyzer/src/dart/element/element.dart';
 import 'package:analyzer/src/generated/constant.dart';
-import 'package:analyzer/src/generated/engine.dart';
 import 'package:analyzer/src/generated/resolver.dart';
 import 'package:analyzer/src/generated/source.dart';
 import 'package:analyzer/src/generated/source_io.dart';
@@ -21,7 +20,6 @@
 import 'package:test/test.dart';
 import 'package:test_reflective_loader/test_reflective_loader.dart';
 
-import '../../../generated/engine_test.dart';
 import '../../../generated/test_support.dart';
 
 main() {
@@ -35,12 +33,10 @@
 class ConstantFinderTest {
   AstNode _node;
   TypeProvider _typeProvider;
-  AnalysisContext _context;
   Source _source;
 
   void setUp() {
     _typeProvider = new TestTypeProvider();
-    _context = new _TestAnalysisContext();
     _source = new TestSource();
   }
 
@@ -51,7 +47,7 @@
   void test_visitAnnotation_constantVariable() {
     CompilationUnitElement compilationUnitElement =
         ElementFactory.compilationUnit('/test.dart', _source)..source = _source;
-    ElementFactory.library(_context, 'L').definingCompilationUnit =
+    ElementFactory.library(null, 'L').definingCompilationUnit =
         compilationUnitElement;
     ElementAnnotationImpl elementAnnotation =
         new ElementAnnotationImpl(compilationUnitElement);
@@ -77,7 +73,7 @@
   void test_visitAnnotation_invocation() {
     CompilationUnitElement compilationUnitElement =
         ElementFactory.compilationUnit('/test.dart', _source)..source = _source;
-    ElementFactory.library(_context, 'L').definingCompilationUnit =
+    ElementFactory.library(null, 'L').definingCompilationUnit =
         compilationUnitElement;
     ElementAnnotationImpl elementAnnotation =
         new ElementAnnotationImpl(compilationUnitElement);
@@ -174,7 +170,6 @@
     Set<Annotation> annotations = new Set<Annotation>();
     for (ConstantEvaluationTarget target in _findConstants()) {
       if (target is ElementAnnotationImpl) {
-        expect(target.context, same(_context));
         expect(target.source, same(_source));
         annotations.add(target.annotationAst);
       }
@@ -348,8 +343,3 @@
     node.accept(referenceFinder);
   }
 }
-
-class _TestAnalysisContext extends TestAnalysisContext {
-  @override
-  InternalAnalysisContext getContextFor(Source source) => this;
-}
diff --git a/pkg/analyzer/test/src/dart/element/inheritance_manager2_test.dart b/pkg/analyzer/test/src/dart/element/inheritance_manager2_test.dart
index 2755ffb..07b9de2 100644
--- a/pkg/analyzer/test/src/dart/element/inheritance_manager2_test.dart
+++ b/pkg/analyzer/test/src/dart/element/inheritance_manager2_test.dart
@@ -1,4 +1,4 @@
-// Copyright (c) 2018, the Dart project authors.  Please see the AUTHORS file
+// Copyright (c) 2018, the Dart project authors. Please see the AUTHORS file
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
 
diff --git a/pkg/analyzer/test/src/dart/element/test_all.dart b/pkg/analyzer/test/src/dart/element/test_all.dart
index f75596d..134b672 100644
--- a/pkg/analyzer/test/src/dart/element/test_all.dart
+++ b/pkg/analyzer/test/src/dart/element/test_all.dart
@@ -1,4 +1,4 @@
-// Copyright (c) 2014, the Dart project authors.  Please see the AUTHORS file
+// Copyright (c) 2014, the Dart project authors. Please see the AUTHORS file
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
 
diff --git a/pkg/analyzer/test/src/dart/resolution/assignment_test.dart b/pkg/analyzer/test/src/dart/resolution/assignment_test.dart
index 4d0fd0f..d5e4d8a 100644
--- a/pkg/analyzer/test/src/dart/resolution/assignment_test.dart
+++ b/pkg/analyzer/test/src/dart/resolution/assignment_test.dart
@@ -1,4 +1,4 @@
-// Copyright (c) 2018, the Dart project authors.  Please see the AUTHORS file
+// Copyright (c) 2018, the Dart project authors. Please see the AUTHORS file
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
 
diff --git a/pkg/analyzer/test/src/dart/resolution/class_alias_test.dart b/pkg/analyzer/test/src/dart/resolution/class_alias_test.dart
index e97423c..37aa571 100644
--- a/pkg/analyzer/test/src/dart/resolution/class_alias_test.dart
+++ b/pkg/analyzer/test/src/dart/resolution/class_alias_test.dart
@@ -1,4 +1,4 @@
-// Copyright (c) 2018, the Dart project authors.  Please see the AUTHORS file
+// Copyright (c) 2018, the Dart project authors. Please see the AUTHORS file
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
 
diff --git a/pkg/analyzer/test/src/dart/resolution/class_test.dart b/pkg/analyzer/test/src/dart/resolution/class_test.dart
index f8ce37a..a49a209 100644
--- a/pkg/analyzer/test/src/dart/resolution/class_test.dart
+++ b/pkg/analyzer/test/src/dart/resolution/class_test.dart
@@ -1,4 +1,4 @@
-// Copyright (c) 2018, the Dart project authors.  Please see the AUTHORS file
+// Copyright (c) 2018, the Dart project authors. Please see the AUTHORS file
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
 
diff --git a/pkg/analyzer/test/src/dart/resolution/comment_test.dart b/pkg/analyzer/test/src/dart/resolution/comment_test.dart
index 8fba266..dc7def9 100644
--- a/pkg/analyzer/test/src/dart/resolution/comment_test.dart
+++ b/pkg/analyzer/test/src/dart/resolution/comment_test.dart
@@ -1,4 +1,4 @@
-// Copyright (c) 2018, the Dart project authors.  Please see the AUTHORS file
+// Copyright (c) 2018, the Dart project authors. Please see the AUTHORS file
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
 
diff --git a/pkg/analyzer/test/src/dart/resolution/constant_test.dart b/pkg/analyzer/test/src/dart/resolution/constant_test.dart
index 4fde7c2..39a9d4a 100644
--- a/pkg/analyzer/test/src/dart/resolution/constant_test.dart
+++ b/pkg/analyzer/test/src/dart/resolution/constant_test.dart
@@ -1,4 +1,4 @@
-// Copyright (c) 2018, the Dart project authors.  Please see the AUTHORS file
+// Copyright (c) 2018, the Dart project authors. Please see the AUTHORS file
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
 
@@ -143,7 +143,6 @@
 ''');
     await resolveTestFile();
     assertTestErrors([
-      CompileTimeErrorCode.NON_CONSTANT_VALUE_IN_INITIALIZER,
       CompileTimeErrorCode.CONST_NOT_INITIALIZED,
       CompileTimeErrorCode.CONST_NOT_INITIALIZED,
     ]);
diff --git a/pkg/analyzer/test/src/dart/resolution/definite_assignment_test.dart b/pkg/analyzer/test/src/dart/resolution/definite_assignment_test.dart
index 5e163c0..367b0ee 100644
--- a/pkg/analyzer/test/src/dart/resolution/definite_assignment_test.dart
+++ b/pkg/analyzer/test/src/dart/resolution/definite_assignment_test.dart
@@ -1321,7 +1321,7 @@
   }
 
   @override
-  void visitForStatement2(ForStatement2 node) {
+  void visitForStatement(ForStatement node) {
     var parts = node.forLoopParts;
 
     tracker.beginForStatement2(node);
@@ -1498,7 +1498,7 @@
   AstNode _getLabelTarget(AstNode node, LabelElement element) {
     for (; node != null; node = node.parent) {
       if (node is DoStatement ||
-          node is ForStatement2 ||
+          node is ForStatement ||
           node is SwitchStatement ||
           node is WhileStatement) {
         if (element == null) {
diff --git a/pkg/analyzer/test/src/dart/resolution/enum_test.dart b/pkg/analyzer/test/src/dart/resolution/enum_test.dart
index 90a59b1..c21ca09 100644
--- a/pkg/analyzer/test/src/dart/resolution/enum_test.dart
+++ b/pkg/analyzer/test/src/dart/resolution/enum_test.dart
@@ -1,4 +1,4 @@
-// Copyright (c) 2018, the Dart project authors.  Please see the AUTHORS file
+// Copyright (c) 2018, the Dart project authors. Please see the AUTHORS file
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
 
diff --git a/pkg/analyzer/test/src/dart/resolution/flow_analysis_test.dart b/pkg/analyzer/test/src/dart/resolution/flow_analysis_test.dart
index 236303f..3143da1 100644
--- a/pkg/analyzer/test/src/dart/resolution/flow_analysis_test.dart
+++ b/pkg/analyzer/test/src/dart/resolution/flow_analysis_test.dart
@@ -2957,7 +2957,7 @@
   }
 
   @override
-  void visitForStatement2(ForStatement2 node) {
+  void visitForStatement(ForStatement node) {
     var forLoopParts = node.forLoopParts;
     if (forLoopParts is ForParts) {
       if (forLoopParts is ForPartsWithExpression) {
@@ -3232,7 +3232,7 @@
   }
 
   @override
-  void visitForStatement2(ForStatement2 node) {
+  void visitForStatement(ForStatement node) {
     _checkUnreachableNode(node);
 
     ForLoopParts parts = node.forLoopParts;
@@ -3495,7 +3495,7 @@
   AstNode _getLabelTarget(AstNode node, LabelElement element) {
     for (; node != null; node = node.parent) {
       if (node is DoStatement ||
-          node is ForStatement2 ||
+          node is ForStatement ||
           node is SwitchStatement ||
           node is WhileStatement) {
         if (element == null) {
diff --git a/pkg/analyzer/test/src/dart/resolution/for_element_test.dart b/pkg/analyzer/test/src/dart/resolution/for_element_test.dart
index 3069acf..967b539 100644
--- a/pkg/analyzer/test/src/dart/resolution/for_element_test.dart
+++ b/pkg/analyzer/test/src/dart/resolution/for_element_test.dart
@@ -1,4 +1,4 @@
-// Copyright (c) 2018, the Dart project authors.  Please see the AUTHORS file
+// Copyright (c) 2018, the Dart project authors. Please see the AUTHORS file
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
 
diff --git a/pkg/analyzer/test/src/dart/resolution/for_in_test.dart b/pkg/analyzer/test/src/dart/resolution/for_in_test.dart
index e06e3a7..4c8f5b8 100644
--- a/pkg/analyzer/test/src/dart/resolution/for_in_test.dart
+++ b/pkg/analyzer/test/src/dart/resolution/for_in_test.dart
@@ -1,4 +1,4 @@
-// Copyright (c) 2018, the Dart project authors.  Please see the AUTHORS file
+// Copyright (c) 2018, the Dart project authors. Please see the AUTHORS file
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
 
diff --git a/pkg/analyzer/test/src/dart/resolution/generic_type_alias_test.dart b/pkg/analyzer/test/src/dart/resolution/generic_type_alias_test.dart
index 891c0f7..a3cadc7 100644
--- a/pkg/analyzer/test/src/dart/resolution/generic_type_alias_test.dart
+++ b/pkg/analyzer/test/src/dart/resolution/generic_type_alias_test.dart
@@ -1,4 +1,4 @@
-// Copyright (c) 2018, the Dart project authors.  Please see the AUTHORS file
+// Copyright (c) 2018, the Dart project authors. Please see the AUTHORS file
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
 
diff --git a/pkg/analyzer/test/src/dart/resolution/import_prefix_test.dart b/pkg/analyzer/test/src/dart/resolution/import_prefix_test.dart
index 647c4c8..cb5ac0b 100644
--- a/pkg/analyzer/test/src/dart/resolution/import_prefix_test.dart
+++ b/pkg/analyzer/test/src/dart/resolution/import_prefix_test.dart
@@ -1,4 +1,4 @@
-// Copyright (c) 2018, the Dart project authors.  Please see the AUTHORS file
+// Copyright (c) 2018, the Dart project authors. Please see the AUTHORS file
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
 
diff --git a/pkg/analyzer/test/src/dart/resolution/instance_creation_test.dart b/pkg/analyzer/test/src/dart/resolution/instance_creation_test.dart
index a4af48e..8bfb1f0 100644
--- a/pkg/analyzer/test/src/dart/resolution/instance_creation_test.dart
+++ b/pkg/analyzer/test/src/dart/resolution/instance_creation_test.dart
@@ -1,4 +1,4 @@
-// Copyright (c) 2018, the Dart project authors.  Please see the AUTHORS file
+// Copyright (c) 2018, the Dart project authors. Please see the AUTHORS file
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
 
diff --git a/pkg/analyzer/test/src/dart/resolution/instance_member_inference_class_test.dart b/pkg/analyzer/test/src/dart/resolution/instance_member_inference_class_test.dart
index 4c0fd6a..1faee15 100644
--- a/pkg/analyzer/test/src/dart/resolution/instance_member_inference_class_test.dart
+++ b/pkg/analyzer/test/src/dart/resolution/instance_member_inference_class_test.dart
@@ -1,4 +1,4 @@
-// Copyright (c) 2018, the Dart project authors.  Please see the AUTHORS file
+// Copyright (c) 2018, the Dart project authors. Please see the AUTHORS file
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
 
diff --git a/pkg/analyzer/test/src/dart/resolution/instance_member_inference_mixin_test.dart b/pkg/analyzer/test/src/dart/resolution/instance_member_inference_mixin_test.dart
index 0ab92025..7c2104f 100644
--- a/pkg/analyzer/test/src/dart/resolution/instance_member_inference_mixin_test.dart
+++ b/pkg/analyzer/test/src/dart/resolution/instance_member_inference_mixin_test.dart
@@ -1,4 +1,4 @@
-// Copyright (c) 2018, the Dart project authors.  Please see the AUTHORS file
+// Copyright (c) 2018, the Dart project authors. Please see the AUTHORS file
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
 
diff --git a/pkg/analyzer/test/src/dart/resolution/method_invocation_test.dart b/pkg/analyzer/test/src/dart/resolution/method_invocation_test.dart
index 2af994d..f5a709a 100644
--- a/pkg/analyzer/test/src/dart/resolution/method_invocation_test.dart
+++ b/pkg/analyzer/test/src/dart/resolution/method_invocation_test.dart
@@ -1,4 +1,4 @@
-// Copyright (c) 2018, the Dart project authors.  Please see the AUTHORS file
+// Copyright (c) 2018, the Dart project authors. Please see the AUTHORS file
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
 
diff --git a/pkg/analyzer/test/src/dart/resolution/mixin_test.dart b/pkg/analyzer/test/src/dart/resolution/mixin_test.dart
index 496f774..b84f31a 100644
--- a/pkg/analyzer/test/src/dart/resolution/mixin_test.dart
+++ b/pkg/analyzer/test/src/dart/resolution/mixin_test.dart
@@ -1,4 +1,4 @@
-// Copyright (c) 2018, the Dart project authors.  Please see the AUTHORS file
+// Copyright (c) 2018, the Dart project authors. Please see the AUTHORS file
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
 
diff --git a/pkg/analyzer/test/src/dart/resolution/non_nullable_test.dart b/pkg/analyzer/test/src/dart/resolution/non_nullable_test.dart
index e1704c6..1b47f1e 100644
--- a/pkg/analyzer/test/src/dart/resolution/non_nullable_test.dart
+++ b/pkg/analyzer/test/src/dart/resolution/non_nullable_test.dart
@@ -1,4 +1,4 @@
-// Copyright (c) 2019, the Dart project authors.  Please see the AUTHORS file
+// Copyright (c) 2019, the Dart project authors. Please see the AUTHORS file
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
 
diff --git a/pkg/analyzer/test/src/dart/resolution/optional_const_test.dart b/pkg/analyzer/test/src/dart/resolution/optional_const_test.dart
index df32638..895ec43 100644
--- a/pkg/analyzer/test/src/dart/resolution/optional_const_test.dart
+++ b/pkg/analyzer/test/src/dart/resolution/optional_const_test.dart
@@ -1,4 +1,4 @@
-// Copyright (c) 2018, the Dart project authors.  Please see the AUTHORS file
+// Copyright (c) 2018, the Dart project authors. Please see the AUTHORS file
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
 
diff --git a/pkg/analyzer/test/src/dart/resolution/property_access_test.dart b/pkg/analyzer/test/src/dart/resolution/property_access_test.dart
index c127e27..0723755 100644
--- a/pkg/analyzer/test/src/dart/resolution/property_access_test.dart
+++ b/pkg/analyzer/test/src/dart/resolution/property_access_test.dart
@@ -1,4 +1,4 @@
-// Copyright (c) 2018, the Dart project authors.  Please see the AUTHORS file
+// Copyright (c) 2018, the Dart project authors. Please see the AUTHORS file
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
 
diff --git a/pkg/analyzer/test/src/dart/resolution/resolution.dart b/pkg/analyzer/test/src/dart/resolution/resolution.dart
index be8eb31..08971b0 100644
--- a/pkg/analyzer/test/src/dart/resolution/resolution.dart
+++ b/pkg/analyzer/test/src/dart/resolution/resolution.dart
@@ -1,4 +1,4 @@
-// Copyright (c) 2018, the Dart project authors.  Please see the AUTHORS file
+// Copyright (c) 2018, the Dart project authors. Please see the AUTHORS file
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
 
diff --git a/pkg/analyzer/test/src/dart/resolution/top_type_inference_test.dart b/pkg/analyzer/test/src/dart/resolution/top_type_inference_test.dart
index cdb193e..9d08d0e 100644
--- a/pkg/analyzer/test/src/dart/resolution/top_type_inference_test.dart
+++ b/pkg/analyzer/test/src/dart/resolution/top_type_inference_test.dart
@@ -1,4 +1,4 @@
-// Copyright (c) 2018, the Dart project authors.  Please see the AUTHORS file
+// Copyright (c) 2018, the Dart project authors. Please see the AUTHORS file
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
 
diff --git a/pkg/analyzer/test/src/dart/resolver/test_all.dart b/pkg/analyzer/test/src/dart/resolver/test_all.dart
index aff3b4f..e6430bd 100644
--- a/pkg/analyzer/test/src/dart/resolver/test_all.dart
+++ b/pkg/analyzer/test/src/dart/resolver/test_all.dart
@@ -1,4 +1,4 @@
-// Copyright (c) 2019, the Dart project authors.  Please see the AUTHORS file
+// Copyright (c) 2019, the Dart project authors. Please see the AUTHORS file
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
 
diff --git a/pkg/analyzer/test/src/dart/sdk/patch_test.dart b/pkg/analyzer/test/src/dart/sdk/patch_test.dart
index dd57aa6..0357f98 100644
--- a/pkg/analyzer/test/src/dart/sdk/patch_test.dart
+++ b/pkg/analyzer/test/src/dart/sdk/patch_test.dart
@@ -1,4 +1,4 @@
-// Copyright (c) 2016, the Dart project authors.  Please see the AUTHORS file
+// Copyright (c) 2016, the Dart project authors. Please see the AUTHORS file
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
 
diff --git a/pkg/analyzer/test/src/dartdoc/dartdoc_directive_info_test.dart b/pkg/analyzer/test/src/dartdoc/dartdoc_directive_info_test.dart
new file mode 100644
index 0000000..43c386a
--- /dev/null
+++ b/pkg/analyzer/test/src/dartdoc/dartdoc_directive_info_test.dart
@@ -0,0 +1,84 @@
+// Copyright (c) 2019, the Dart project authors. Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+import 'package:analyzer/src/dartdoc/dartdoc_directive_info.dart';
+import 'package:test/test.dart';
+import 'package:test_reflective_loader/test_reflective_loader.dart';
+
+main() {
+  defineReflectiveSuite(() {
+    defineReflectiveTests(DartdocDirectiveInfoTest);
+  });
+}
+
+@reflectiveTest
+class DartdocDirectiveInfoTest {
+  DartdocDirectiveInfo info = new DartdocDirectiveInfo();
+
+  test_processDartdoc_macro_defined() {
+    info.extractTemplate('''
+/**
+ * {@template foo}
+ * Body of the
+ * template.
+ * {@endtemplate}
+ */''');
+    String result = info.processDartdoc('''
+/**
+ * Before macro.
+ * {@macro foo}
+ * After macro.
+ */''');
+    expect(result, '''
+Before macro.
+Body of the
+template.
+After macro.''');
+  }
+
+  test_processDartdoc_macro_undefined() {
+    String result = info.processDartdoc('''
+/**
+ * {@macro foo}
+ */''');
+    expect(result, '''
+{@macro foo}''');
+  }
+
+  test_processDartdoc_multiple() {
+    info.extractTemplate('''
+/**
+ * {@template foo}
+ * First template.
+ * {@endtemplate}
+ */''');
+    info.extractTemplate('''
+/// {@template bar}
+/// Second template.
+/// {@endtemplate}''');
+    String result = info.processDartdoc('''
+/**
+ * Before macro.
+ * {@macro foo}
+ * Between macros.
+ * {@macro bar}
+ * After macro.
+ */''');
+    expect(result, '''
+Before macro.
+First template.
+Between macros.
+Second template.
+After macro.''');
+  }
+
+  test_processDartdoc_noMacro() {
+    String result = info.processDartdoc('''
+/**
+ * Comment without a macro.
+ */''');
+    expect(result, '''
+Comment without a macro.''');
+  }
+}
diff --git a/pkg/analyzer/test/src/dartdoc/test_all.dart b/pkg/analyzer/test/src/dartdoc/test_all.dart
new file mode 100644
index 0000000..963063a
--- /dev/null
+++ b/pkg/analyzer/test/src/dartdoc/test_all.dart
@@ -0,0 +1,13 @@
+// Copyright (c) 2019, the Dart project authors. Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+import 'package:test_reflective_loader/test_reflective_loader.dart';
+
+import 'dartdoc_directive_info_test.dart' as dartdoc_directive_info;
+
+main() {
+  defineReflectiveSuite(() {
+    dartdoc_directive_info.main();
+  }, name: 'dartdoc');
+}
diff --git a/pkg/analyzer/test/src/diagnostics/async_keyword_used_as_identifier_test.dart b/pkg/analyzer/test/src/diagnostics/async_keyword_used_as_identifier_test.dart
new file mode 100644
index 0000000..2e30543
--- /dev/null
+++ b/pkg/analyzer/test/src/diagnostics/async_keyword_used_as_identifier_test.dart
@@ -0,0 +1,263 @@
+// Copyright (c) 2019, the Dart project authors. Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+import 'package:analyzer/src/dart/error/syntactic_errors.dart';
+import 'package:analyzer/src/error/codes.dart';
+import 'package:test_reflective_loader/test_reflective_loader.dart';
+
+import '../dart/resolution/driver_resolution.dart';
+
+main() {
+  defineReflectiveSuite(() {
+    defineReflectiveTests(AsyncKeywordUsedAsIdentifierTest);
+  });
+}
+
+@reflectiveTest
+class AsyncKeywordUsedAsIdentifierTest extends DriverResolutionTest {
+  test_async_annotation() async {
+    await assertErrorsInCode('''
+const int async = 0;
+f() async {
+  g(@async x) {}
+  g(0);
+}
+''', [ParserErrorCode.ASYNC_KEYWORD_USED_AS_IDENTIFIER]);
+  }
+
+  test_async_argumentLabel() async {
+    await assertErrorsInCode('''
+f(c) async {
+  c.g(async: 0);
+}
+''', [ParserErrorCode.ASYNC_KEYWORD_USED_AS_IDENTIFIER]);
+  }
+
+  test_async_async() async {
+    await assertErrorsInCode('''
+f() async {
+  var async = 1;
+}
+''', [ParserErrorCode.ASYNC_KEYWORD_USED_AS_IDENTIFIER]);
+  }
+
+  test_async_asyncStar() async {
+    await assertErrorsInCode('''
+f() async* {
+  var async = 1;
+}
+''', [ParserErrorCode.ASYNC_KEYWORD_USED_AS_IDENTIFIER]);
+  }
+
+  test_async_break() async {
+    await assertErrorsInCode('''
+f() async {
+  while (true) {
+    break async;
+  }
+}
+''', [
+      ParserErrorCode.ASYNC_KEYWORD_USED_AS_IDENTIFIER,
+      CompileTimeErrorCode.LABEL_UNDEFINED
+    ]);
+  }
+
+  test_async_catchException() async {
+    await assertErrorsInCode('''
+g() {}
+f() async {
+  try {
+    g();
+  } catch (async) { }
+}
+''', [ParserErrorCode.ASYNC_KEYWORD_USED_AS_IDENTIFIER]);
+  }
+
+  test_async_catchStacktrace() async {
+    await assertErrorsInCode('''
+g() {}
+f() async {
+  try {
+    g();
+  } catch (e, async) { }
+}
+''', [ParserErrorCode.ASYNC_KEYWORD_USED_AS_IDENTIFIER]);
+  }
+
+  test_async_continue() async {
+    await assertErrorsInCode('''
+f() async {
+  while (true) {
+    continue async;
+  }
+}
+''', [
+      ParserErrorCode.ASYNC_KEYWORD_USED_AS_IDENTIFIER,
+      CompileTimeErrorCode.LABEL_UNDEFINED
+    ]);
+  }
+
+  test_async_for() async {
+    await assertErrorsInCode('''
+var async;
+f() async {
+  for (async in []) {}
+}
+''', [ParserErrorCode.ASYNC_KEYWORD_USED_AS_IDENTIFIER]);
+  }
+
+  test_async_formalParameter() async {
+    await assertErrorsInCode('''
+f() async {
+  g(int async) {}
+  g(0);
+}
+''', [ParserErrorCode.ASYNC_KEYWORD_USED_AS_IDENTIFIER]);
+  }
+
+  test_async_getter() async {
+    await assertErrorsInCode('''
+class C {
+  int get async => 1;
+}
+f() async {
+  return new C().async;
+}
+''', [ParserErrorCode.ASYNC_KEYWORD_USED_AS_IDENTIFIER]);
+  }
+
+  test_async_invocation() async {
+    await assertErrorsInCode('''
+class C {
+  int async() => 1;
+}
+f() async {
+  return new C().async();
+}
+''', [ParserErrorCode.ASYNC_KEYWORD_USED_AS_IDENTIFIER]);
+  }
+
+  test_async_invocation_cascaded() async {
+    await assertErrorsInCode('''
+class C {
+  int async() => 1;
+}
+f() async {
+  return new C()..async();
+}
+''', [ParserErrorCode.ASYNC_KEYWORD_USED_AS_IDENTIFIER]);
+  }
+
+  test_async_label() async {
+    await assertErrorsInCode('''
+f() async {
+  async: g();
+}
+g() {}
+''', [ParserErrorCode.ASYNC_KEYWORD_USED_AS_IDENTIFIER, HintCode.UNUSED_LABEL]);
+  }
+
+  test_async_localFunction() async {
+    await assertErrorsInCode('''
+f() async {
+  int async() => null;
+}
+''', [ParserErrorCode.ASYNC_KEYWORD_USED_AS_IDENTIFIER]);
+  }
+
+  test_async_prefix() async {
+    await assertErrorsInCode('''
+import 'dart:async' as async;
+f() async {
+  return new async.Future.value(0);
+}
+''', [ParserErrorCode.ASYNC_KEYWORD_USED_AS_IDENTIFIER]);
+  }
+
+  test_async_setter() async {
+    await assertErrorsInCode('''
+class C {
+  void set async(int i) {}
+}
+f() async {
+  new C().async = 1;
+}
+''', [ParserErrorCode.ASYNC_KEYWORD_USED_AS_IDENTIFIER]);
+  }
+
+  test_async_setter_cascaded() async {
+    await assertErrorsInCode('''
+class C {
+  void set async(int i) {}
+}
+f() async {
+  return new C()..async = 1;
+}
+''', [ParserErrorCode.ASYNC_KEYWORD_USED_AS_IDENTIFIER]);
+  }
+
+  test_async_stringInterpolation() async {
+    await assertErrorsInCode(r'''
+int async = 1;
+f() async {
+  return "$async";
+}
+''', [ParserErrorCode.ASYNC_KEYWORD_USED_AS_IDENTIFIER]);
+  }
+
+  test_async_suffix() async {
+    newFile("/test/lib/lib1.dart", content: r'''
+library lib1;
+int async;
+''');
+    await assertErrorsInCode('''
+import 'lib1.dart' as l;
+f() async {
+  return l.async;
+}
+''', [ParserErrorCode.ASYNC_KEYWORD_USED_AS_IDENTIFIER]);
+  }
+
+  test_async_switchLabel() async {
+    await assertErrorsInCode('''
+f() async {
+  switch (0) {
+    async: case 0: break;
+  }
+}
+''', [ParserErrorCode.ASYNC_KEYWORD_USED_AS_IDENTIFIER, HintCode.UNUSED_LABEL]);
+  }
+
+  test_async_syncStar() async {
+    await assertErrorsInCode('''
+f() sync* {
+  var async = 1;
+}
+''', [ParserErrorCode.ASYNC_KEYWORD_USED_AS_IDENTIFIER]);
+  }
+
+  test_await_async() async {
+    await assertErrorsInCode('''
+f() async {
+  var await = 1;
+}
+''', [ParserErrorCode.ASYNC_KEYWORD_USED_AS_IDENTIFIER]);
+  }
+
+  test_await_asyncStar() async {
+    await assertErrorsInCode('''
+f() async* {
+  var await = 1;
+}
+''', [ParserErrorCode.ASYNC_KEYWORD_USED_AS_IDENTIFIER]);
+  }
+
+  test_await_syncStar() async {
+    await assertErrorsInCode('''
+f() sync* {
+  var await = 1;
+}
+''', [ParserErrorCode.ASYNC_KEYWORD_USED_AS_IDENTIFIER]);
+  }
+}
diff --git a/pkg/analyzer/test/src/diagnostics/const_eval_throws_exception_test.dart b/pkg/analyzer/test/src/diagnostics/const_eval_throws_exception_test.dart
index 5f92e7f..8c52012 100644
--- a/pkg/analyzer/test/src/diagnostics/const_eval_throws_exception_test.dart
+++ b/pkg/analyzer/test/src/diagnostics/const_eval_throws_exception_test.dart
@@ -141,7 +141,7 @@
     ];
 
   test_ifElement_false_thenNotEvaluated() async {
-    assertNoErrorsInCode('''
+    await assertNoErrorsInCode('''
 const dynamic nil = null;
 const c = [if (1 < 0) nil + 1];
 ''');
@@ -169,7 +169,7 @@
   }
 
   test_ifElement_true_elseNotEvaluated() async {
-    assertNoErrorsInCode('''
+    await assertNoErrorsInCode('''
 const dynamic nil = null;
 const c = [if (0 < 1) 3 else nil + 1];
 ''');
diff --git a/pkg/analyzer/test/src/diagnostics/deprecated_member_use_test.dart b/pkg/analyzer/test/src/diagnostics/deprecated_member_use_test.dart
index 0c4a842..700ae9e 100644
--- a/pkg/analyzer/test/src/diagnostics/deprecated_member_use_test.dart
+++ b/pkg/analyzer/test/src/diagnostics/deprecated_member_use_test.dart
@@ -17,221 +17,39 @@
 }
 
 @reflectiveTest
-class DeprecatedMemberUseTest extends ResolverTestCase {
-  @override
-  bool get enableNewAnalysisDriver => true;
-
-  /// Write a pubspec file at [root], so that BestPracticesVerifier can see that
-  /// [root] is the root of a PubWorkspace, and a PubWorkspacePackage.
-  void newPubPackage(String root) {
-    newFile('$root/pubspec.yaml');
-  }
-
-  test_methodInvocation_contructor() async {
-    resetWithFooLibrary(r'''
-class A {
-  @Deprecated('0.9')
-  m() {}
-}
-''');
-
-    newPubPackage('/pkg1');
-    assertErrorsInCode(r'''
-import 'package:foo/foo.dart';
-void main() => A().m();
-''', [HintCode.DEPRECATED_MEMBER_USE], sourceName: '/pkg1/lib/lib1.dart');
-  }
-
-  test_methodInvocation_constant() async {
-    resetWithFooLibrary(r'''
-class A {
-  @deprecated
-  m() {}
-}
-''');
-
-    newPubPackage('/pkg1');
-    assertErrorsInCode(r'''
-import 'package:foo/foo.dart';
-void main() => A().m();
-''', [HintCode.DEPRECATED_MEMBER_USE], sourceName: '/pkg1/lib/lib1.dart');
-  }
-
-  void resetWithFooLibrary(String source) {
-    super.resetWith(packages: [
-      ['foo', source]
-    ]);
-  }
-
-  test_export() async {
-    resetWithFooLibrary(r'''
-@deprecated
-library deprecated_library;
-class A {}
-''');
-
-    newPubPackage('/pkg1');
-    assertErrorsInCode('''
-export 'package:foo/foo.dart';
-''', [HintCode.DEPRECATED_MEMBER_USE], sourceName: '/pkg1/lib/lib1.dart');
-  }
-
-  test_import() async {
-    resetWithFooLibrary(r'''
-@deprecated
-library deprecated_library;
-class A {}
-''');
-
-    newPubPackage('/pkg1');
-    Source source = addNamedSource('/pkg1/lib/lib1.dart', r'''
-import 'package:foo/foo.dart';
-f(A a) {}
-''');
-    await computeAnalysisResult(source);
-    assertErrors(source, [HintCode.DEPRECATED_MEMBER_USE]);
-    this.verify([source]);
-    TestAnalysisResult result = analysisResults[source];
-    expect(result.errors[0].message, contains('package:foo/foo.dart'));
-  }
-
+class DeprecatedMemberUseFromSamePackageTest extends ResolverTestCase {
   test_basicWorkspace() async {
-    resetWithFooLibrary(r'''
+    addNamedSource('/workspace/lib/deprecated_library.dart', r'''
 @deprecated
 library deprecated_library;
 class A {}
 ''');
 
     assertErrorsInCode(r'''
-import 'package:foo/foo.dart';
+import 'deprecated_library.dart';
 f(A a) {}
-''', // This is a cross-package deprecated member usage.
-        [HintCode.DEPRECATED_MEMBER_USE],
-        sourceName: '/workspace/project/lib/lib1.dart');
+''', [HintCode.DEPRECATED_MEMBER_USE_FROM_SAME_PACKAGE],
+        sourceName: '/workspace/lib/lib1.dart');
   }
 
   test_bazelWorkspace() async {
-    resetWithFooLibrary(r'''
-@deprecated
-library deprecated_library;
-class A {}
-''');
-
     newFile('/workspace/WORKSPACE');
     newFile('/workspace/project/BUILD');
     newFolder('/workspace/bazel-genfiles');
 
+    addNamedSource('/workspace/project/lib/deprecated_library.dart', r'''
+@deprecated
+library deprecated_library;
+class A {}
+''');
+
     assertErrorsInCode(r'''
-import 'package:foo/foo.dart';
+import 'deprecated_library.dart';
 f(A a) {}
-''', // This is a cross-package deprecated member usage.
-        [HintCode.DEPRECATED_MEMBER_USE],
+''', [HintCode.DEPRECATED_MEMBER_USE_FROM_SAME_PACKAGE],
         sourceName: '/workspace/project/lib/lib1.dart');
   }
 
-  test_bazelWorkspace_sameWorkspace() async {
-    newFile('/workspace/WORKSPACE');
-    newFile('/workspace/project_a/BUILD');
-    newFile('/workspace/project_b/BUILD');
-    newFolder('/workspace/bazel-genfiles');
-
-    addNamedSource('/workspace/project_a/lib/deprecated_library.dart', r'''
-@deprecated
-library deprecated_library;
-class A {}
-''');
-
-    assertErrorsInCode(r'''
-import '../../project_a/lib/deprecated_library.dart';
-f(A a) {}
-''', // This is a same-workspace, cross-package deprecated member usage.
-        [HintCode.DEPRECATED_MEMBER_USE],
-        sourceName: '/workspace/project_b/lib/lib1.dart');
-  }
-
-  test_gnWorkspace() async {
-    resetWithFooLibrary(r'''
-@deprecated
-library deprecated_library;
-class A {}
-''');
-
-    newFolder('/workspace/.jiri_root');
-    newFile('/workspace/project/pubspec.yaml');
-    String buildDir = convertPath('out/debug-x87_128');
-    newFile('/workspace/.config',
-        content: 'FOO=foo\n'
-            'FUCHSIA_BUILD_DIR=$buildDir\n'
-            'BAR=bar\n');
-    newFile('/workspace/out/debug-x87_128/dartlang/gen/project/foo.packages');
-
-    assertErrorsInCode(r'''
-import 'package:foo/foo.dart';
-f(A a) {}
-''', // This is a cross-package deprecated member usage.
-        [HintCode.DEPRECATED_MEMBER_USE],
-        sourceName: '/workspace/project/lib/lib1.dart');
-  }
-
-  test_gnWorkspace_sameWorkspace() async {
-    newFolder('/workspace/.jiri_root');
-    newFile('/workspace/project_a/pubspec.yaml');
-    newFile('/workspace/project_b/pubspec.yaml');
-    newFile('/workspace/project_a/BUILD.gn');
-    newFile('/workspace/project_b/BUILD.gn');
-    String buildDir = convertPath('out/debug-x87_128');
-    newFile('/workspace/.config',
-        content: 'FOO=foo\n'
-            'FUCHSIA_BUILD_DIR=$buildDir\n');
-    newFile('/workspace/out/debug-x87_128/dartlang/gen/project_a/foo.packages');
-
-    addNamedSource('/workspace/project_a/lib/deprecated_library.dart', r'''
-@deprecated
-library deprecated_library;
-class A {}
-''');
-
-    assertErrorsInCode(r'''
-import '../../project_a/lib/deprecated_library.dart';
-f(A a) {}
-''', // This is a same-workspace, cross-package deprecated member usage.
-        [HintCode.DEPRECATED_MEMBER_USE],
-        sourceName: '/workspace/project_b/lib/lib1.dart');
-  }
-
-  test_packageBuildWorkspace() async {
-    resetWithFooLibrary(r'''
-@deprecated
-library deprecated_library;
-class A {}
-''');
-
-    newFolder('/workspace/.dart_tool/build/generated/project/lib');
-    newFileWithBytes('/workspace/pubspec.yaml', 'name: project'.codeUnits);
-    assertErrorsInCode(r'''
-import 'package:foo/foo.dart';
-f(A a) {}
-''', // This is a cross-package deprecated member usage.
-        [HintCode.DEPRECATED_MEMBER_USE],
-        sourceName: '/workspace/package/lib/lib1.dart');
-  }
-}
-
-@reflectiveTest
-class DeprecatedMemberUseFromSamePackageTest extends ResolverTestCase {
-  @override
-  bool get enableNewAnalysisDriver => true;
-
-  test_methodInvocation_contructor() async {
-    assertErrorsInCode(r'''
-class A {
-  @Deprecated('0.9')
-  m() {}
-  n() {m();}
-}
-''', [HintCode.DEPRECATED_MEMBER_USE_FROM_SAME_PACKAGE]);
-  }
-
   test_call() async {
     await assertErrorsInCode(r'''
 class A {
@@ -293,6 +111,29 @@
 ''', [HintCode.DEPRECATED_MEMBER_USE_FROM_SAME_PACKAGE]);
   }
 
+  test_gnWorkspace() async {
+    newFolder('/workspace/.jiri_root');
+    newFile('/workspace/project/pubspec.yaml');
+    newFile('/workspace/project/BUILD.gn');
+    String buildDir = convertPath('out/debug-x87_128');
+    newFile('/workspace/.config',
+        content: 'FOO=foo\n'
+            'FUCHSIA_BUILD_DIR=$buildDir\n');
+    newFile('/workspace/out/debug-x87_128/dartlang/gen/project/foo.packages');
+
+    addNamedSource('/workspace/project/lib/deprecated_library.dart', r'''
+@deprecated
+library deprecated_library;
+class A {}
+''');
+
+    assertErrorsInCode(r'''
+import 'deprecated_library.dart';
+f(A a) {}
+''', [HintCode.DEPRECATED_MEMBER_USE_FROM_SAME_PACKAGE],
+        sourceName: '/workspace/project/lib/lib1.dart');
+  }
+
   test_import() async {
     addNamedSource("/deprecated_library.dart", r'''
 @deprecated
@@ -458,6 +299,16 @@
 ''', [HintCode.DEPRECATED_MEMBER_USE_FROM_SAME_PACKAGE]);
   }
 
+  test_methodInvocation_constructor() async {
+    assertErrorsInCode(r'''
+class A {
+  @Deprecated('0.9')
+  m() {}
+  n() {m();}
+}
+''', [HintCode.DEPRECATED_MEMBER_USE_FROM_SAME_PACKAGE]);
+  }
+
   test_operator() async {
     await assertErrorsInCode(r'''
 class A {
@@ -471,6 +322,24 @@
 ''', [HintCode.DEPRECATED_MEMBER_USE_FROM_SAME_PACKAGE]);
   }
 
+  test_packageBuildWorkspace() async {
+    newFolder('/workspace/.dart_tool/build/generated/project/lib');
+    newFileWithBytes('/workspace/pubspec.yaml', 'name: project'.codeUnits);
+    newFileWithBytes('/workspace/.packages', 'project:lib/'.codeUnits);
+
+    addNamedSource('/workspace/lib/deprecated_library.dart', r'''
+@deprecated
+library deprecated_library;
+class A {}
+''');
+
+    assertErrorsInCode(r'''
+import 'deprecated_library.dart';
+f(A a) {}
+''', [HintCode.DEPRECATED_MEMBER_USE_FROM_SAME_PACKAGE],
+        sourceName: '/workspace/lib/lib1.dart');
+  }
+
   test_parameter_named() async {
     await assertErrorsInCode(r'''
 class A {
@@ -566,77 +435,202 @@
 }
 ''', [HintCode.DEPRECATED_MEMBER_USE_FROM_SAME_PACKAGE]);
   }
+}
+
+@reflectiveTest
+class DeprecatedMemberUseTest extends ResolverTestCase {
+  /// Write a pubspec file at [root], so that BestPracticesVerifier can see that
+  /// [root] is the root of a PubWorkspace, and a PubWorkspacePackage.
+  void newPubPackage(String root) {
+    newFile('$root/pubspec.yaml');
+  }
+
+  void resetWithFooLibrary(String source) {
+    super.resetWith(packages: [
+      ['foo', source]
+    ]);
+  }
 
   test_basicWorkspace() async {
-    addNamedSource('/workspace/lib/deprecated_library.dart', r'''
+    resetWithFooLibrary(r'''
 @deprecated
 library deprecated_library;
 class A {}
 ''');
 
     assertErrorsInCode(r'''
-import 'deprecated_library.dart';
+import 'package:foo/foo.dart';
 f(A a) {}
-''', [HintCode.DEPRECATED_MEMBER_USE_FROM_SAME_PACKAGE],
-        sourceName: '/workspace/lib/lib1.dart');
+''', // This is a cross-package deprecated member usage.
+        [HintCode.DEPRECATED_MEMBER_USE],
+        sourceName: '/workspace/project/lib/lib1.dart');
   }
 
   test_bazelWorkspace() async {
+    resetWithFooLibrary(r'''
+@deprecated
+library deprecated_library;
+class A {}
+''');
+
     newFile('/workspace/WORKSPACE');
     newFile('/workspace/project/BUILD');
     newFolder('/workspace/bazel-genfiles');
 
-    addNamedSource('/workspace/project/lib/deprecated_library.dart', r'''
+    assertErrorsInCode(r'''
+import 'package:foo/foo.dart';
+f(A a) {}
+''', // This is a cross-package deprecated member usage.
+        [HintCode.DEPRECATED_MEMBER_USE],
+        sourceName: '/workspace/project/lib/lib1.dart');
+  }
+
+  test_bazelWorkspace_sameWorkspace() async {
+    newFile('/workspace/WORKSPACE');
+    newFile('/workspace/project_a/BUILD');
+    newFile('/workspace/project_b/BUILD');
+    newFolder('/workspace/bazel-genfiles');
+
+    addNamedSource('/workspace/project_a/lib/deprecated_library.dart', r'''
 @deprecated
 library deprecated_library;
 class A {}
 ''');
 
     assertErrorsInCode(r'''
-import 'deprecated_library.dart';
+import '../../project_a/lib/deprecated_library.dart';
 f(A a) {}
-''', [HintCode.DEPRECATED_MEMBER_USE_FROM_SAME_PACKAGE],
-        sourceName: '/workspace/project/lib/lib1.dart');
+''', // This is a same-workspace, cross-package deprecated member usage.
+        [HintCode.DEPRECATED_MEMBER_USE],
+        sourceName: '/workspace/project_b/lib/lib1.dart');
+  }
+
+  test_export() async {
+    resetWithFooLibrary(r'''
+@deprecated
+library deprecated_library;
+class A {}
+''');
+
+    newPubPackage('/pkg1');
+    assertErrorsInCode('''
+export 'package:foo/foo.dart';
+''', [HintCode.DEPRECATED_MEMBER_USE], sourceName: '/pkg1/lib/lib1.dart');
   }
 
   test_gnWorkspace() async {
+    resetWithFooLibrary(r'''
+@deprecated
+library deprecated_library;
+class A {}
+''');
+
     newFolder('/workspace/.jiri_root');
     newFile('/workspace/project/pubspec.yaml');
-    newFile('/workspace/project/BUILD.gn');
+    String buildDir = convertPath('out/debug-x87_128');
+    newFile('/workspace/.config',
+        content: 'FOO=foo\n'
+            'FUCHSIA_BUILD_DIR=$buildDir\n'
+            'BAR=bar\n');
+    newFile('/workspace/out/debug-x87_128/dartlang/gen/project/foo.packages');
+
+    assertErrorsInCode(r'''
+import 'package:foo/foo.dart';
+f(A a) {}
+''', // This is a cross-package deprecated member usage.
+        [HintCode.DEPRECATED_MEMBER_USE],
+        sourceName: '/workspace/project/lib/lib1.dart');
+  }
+
+  test_gnWorkspace_sameWorkspace() async {
+    newFolder('/workspace/.jiri_root');
+    newFile('/workspace/project_a/pubspec.yaml');
+    newFile('/workspace/project_b/pubspec.yaml');
+    newFile('/workspace/project_a/BUILD.gn');
+    newFile('/workspace/project_b/BUILD.gn');
     String buildDir = convertPath('out/debug-x87_128');
     newFile('/workspace/.config',
         content: 'FOO=foo\n'
             'FUCHSIA_BUILD_DIR=$buildDir\n');
-    newFile('/workspace/out/debug-x87_128/dartlang/gen/project/foo.packages');
+    newFile('/workspace/out/debug-x87_128/dartlang/gen/project_a/foo.packages');
 
-    addNamedSource('/workspace/project/lib/deprecated_library.dart', r'''
+    addNamedSource('/workspace/project_a/lib/deprecated_library.dart', r'''
 @deprecated
 library deprecated_library;
 class A {}
 ''');
 
     assertErrorsInCode(r'''
-import 'deprecated_library.dart';
+import '../../project_a/lib/deprecated_library.dart';
 f(A a) {}
-''', [HintCode.DEPRECATED_MEMBER_USE_FROM_SAME_PACKAGE],
-        sourceName: '/workspace/project/lib/lib1.dart');
+''', // This is a same-workspace, cross-package deprecated member usage.
+        [HintCode.DEPRECATED_MEMBER_USE],
+        sourceName: '/workspace/project_b/lib/lib1.dart');
+  }
+
+  test_import() async {
+    resetWithFooLibrary(r'''
+@deprecated
+library deprecated_library;
+class A {}
+''');
+
+    newPubPackage('/pkg1');
+    Source source = addNamedSource('/pkg1/lib/lib1.dart', r'''
+import 'package:foo/foo.dart';
+f(A a) {}
+''');
+    await computeAnalysisResult(source);
+    assertErrors(source, [HintCode.DEPRECATED_MEMBER_USE]);
+    this.verify([source]);
+    TestAnalysisResult result = analysisResults[source];
+    expect(result.errors[0].message, contains('package:foo/foo.dart'));
+  }
+
+  test_methodInvocation_constant() async {
+    resetWithFooLibrary(r'''
+class A {
+  @deprecated
+  m() {}
+}
+''');
+
+    newPubPackage('/pkg1');
+    assertErrorsInCode(r'''
+import 'package:foo/foo.dart';
+void main() => A().m();
+''', [HintCode.DEPRECATED_MEMBER_USE], sourceName: '/pkg1/lib/lib1.dart');
+  }
+
+  test_methodInvocation_contructor() async {
+    resetWithFooLibrary(r'''
+class A {
+  @Deprecated('0.9')
+  m() {}
+}
+''');
+
+    newPubPackage('/pkg1');
+    assertErrorsInCode(r'''
+import 'package:foo/foo.dart';
+void main() => A().m();
+''', [HintCode.DEPRECATED_MEMBER_USE], sourceName: '/pkg1/lib/lib1.dart');
   }
 
   test_packageBuildWorkspace() async {
-    newFolder('/workspace/.dart_tool/build/generated/project/lib');
-    newFileWithBytes('/workspace/pubspec.yaml', 'name: project'.codeUnits);
-    newFileWithBytes('/workspace/.packages', 'project:lib/'.codeUnits);
-
-    addNamedSource('/workspace/lib/deprecated_library.dart', r'''
+    resetWithFooLibrary(r'''
 @deprecated
 library deprecated_library;
 class A {}
 ''');
 
+    newFolder('/workspace/.dart_tool/build/generated/project/lib');
+    newFileWithBytes('/workspace/pubspec.yaml', 'name: project'.codeUnits);
     assertErrorsInCode(r'''
-import 'deprecated_library.dart';
+import 'package:foo/foo.dart';
 f(A a) {}
-''', [HintCode.DEPRECATED_MEMBER_USE_FROM_SAME_PACKAGE],
-        sourceName: '/workspace/lib/lib1.dart');
+''', // This is a cross-package deprecated member usage.
+        [HintCode.DEPRECATED_MEMBER_USE],
+        sourceName: '/workspace/package/lib/lib1.dart');
   }
 }
diff --git a/pkg/analyzer/test/src/diagnostics/duplicate_import_test.dart b/pkg/analyzer/test/src/diagnostics/duplicate_import_test.dart
new file mode 100644
index 0000000..237cf68
--- /dev/null
+++ b/pkg/analyzer/test/src/diagnostics/duplicate_import_test.dart
@@ -0,0 +1,127 @@
+// Copyright (c) 2019, the Dart project authors. Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+import 'package:analyzer/src/error/codes.dart';
+import 'package:analyzer/src/test_utilities/package_mixin.dart';
+import 'package:test_reflective_loader/test_reflective_loader.dart';
+
+import '../dart/resolution/driver_resolution.dart';
+
+main() {
+  defineReflectiveSuite(() {
+    defineReflectiveTests(DuplicateImportTest);
+  });
+}
+
+@reflectiveTest
+class DuplicateImportTest extends DriverResolutionTest {
+  test_duplicateImport() async {
+    newFile('/lib2.dart', content: r'''
+library L;
+import 'lib1.dart';
+import 'lib1.dart';
+A a;''');
+
+    newFile('/lib1.dart', content: r'''
+library lib1;
+class A {}''');
+
+    await _resolveTestFile('/lib1.dart');
+    await _resolveTestFile('/lib2.dart');
+    assertTestErrors([HintCode.DUPLICATE_IMPORT]);
+  }
+
+  test_twoDuplicateImports() async {
+    newFile('/lib2.dart', content: r'''
+library L;
+import 'lib1.dart';
+import 'lib1.dart';
+import 'lib1.dart';
+A a;''');
+    newFile('/lib1.dart', content: r'''
+library lib1;
+class A {}''');
+
+    await _resolveTestFile('/lib1.dart');
+    await _resolveTestFile('/lib2.dart');
+    assertTestErrors([HintCode.DUPLICATE_IMPORT, HintCode.DUPLICATE_IMPORT]);
+  }
+
+  test_importsHaveIdenticalShowHide() async {
+    newFile('/lib2.dart', content: r'''
+library L;
+import 'lib1.dart' as M show A hide B;
+import 'lib1.dart' as M show A hide B;
+M.A a;''');
+
+    newFile('/lib1.dart', content: r'''
+library lib1;
+class A {}
+class B {}''');
+
+    await _resolveTestFile('/lib1.dart');
+    await _resolveTestFile('/lib2.dart');
+    assertTestErrors([HintCode.DUPLICATE_IMPORT]);
+  }
+
+  test_oneImportUsesAs() async {
+    newFile('/lib2.dart', content: r'''
+library L;
+import 'lib1.dart';
+import 'lib1.dart' as one;
+A a;
+one.A a2;''');
+
+    newFile('/lib1.dart', content: r'''
+library lib1;
+class A {}''');
+
+    await _resolveTestFile('/lib1.dart');
+    await _resolveTestFile('/lib2.dart');
+    assertNoTestErrors();
+  }
+
+  test_oneImportHasHide() async {
+    newFile('/lib2.dart', content: r'''
+library L;
+import 'lib1.dart';
+import 'lib1.dart' hide A;
+A a;
+B b;''');
+
+    newFile('/lib1.dart', content: r'''
+library lib1;
+class A {}
+class B {}''');
+
+    await _resolveTestFile('/lib1.dart');
+    await _resolveTestFile('/lib2.dart');
+    assertNoTestErrors();
+  }
+
+  test_oneImportHasShow() async {
+    newFile('/lib2.dart', content: r'''
+library L;
+import 'lib1.dart';
+import 'lib1.dart' show A;
+A a;
+B b;''');
+
+    newFile('/lib1.dart', content: r'''
+library lib1;
+class A {}
+class B {}''');
+
+    await _resolveTestFile('/lib1.dart');
+    await _resolveTestFile('/lib2.dart');
+    assertNoTestErrors();
+  }
+
+  /// Resolve the test file at [path].
+  ///
+  /// Similar to ResolutionTest.resolveTestFile, but a custom path is supported.
+  Future<void> _resolveTestFile(String path) async {
+    result = await resolveFile(convertPath(path));
+  }
+}
diff --git a/pkg/analyzer/test/src/diagnostics/equal_elements_in_const_set_test.dart b/pkg/analyzer/test/src/diagnostics/equal_elements_in_const_set_test.dart
new file mode 100644
index 0000000..6d4a55f
--- /dev/null
+++ b/pkg/analyzer/test/src/diagnostics/equal_elements_in_const_set_test.dart
@@ -0,0 +1,112 @@
+// Copyright (c) 2019, the Dart project authors. Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+import 'package:analyzer/src/dart/analysis/experiments.dart';
+import 'package:analyzer/src/error/codes.dart';
+import 'package:analyzer/src/generated/engine.dart';
+import 'package:test_reflective_loader/test_reflective_loader.dart';
+
+import '../dart/resolution/driver_resolution.dart';
+
+main() {
+  defineReflectiveSuite(() {
+    defineReflectiveTests(EqualElementsInConstSetTest);
+    defineReflectiveTests(EqualElementsInConstSetWithUIAsCodeTest);
+  });
+}
+
+@reflectiveTest
+class EqualElementsInConstSetTest extends DriverResolutionTest {
+  test_const_entry() async {
+    await assertErrorsInCode('''
+var c = const {1, 2, 1};
+''', [CompileTimeErrorCode.EQUAL_ELEMENTS_IN_CONST_SET]);
+  }
+
+  test_const_instanceCreation_equalTypeArgs() async {
+    await assertErrorsInCode(r'''
+class A<T> {
+  const A();
+}
+
+var c = const {const A<int>(), const A<int>()};
+''', [CompileTimeErrorCode.EQUAL_ELEMENTS_IN_CONST_SET]);
+  }
+
+  test_const_instanceCreation_notEqualTypeArgs() async {
+    // No error because A<int> and A<num> are different types.
+    await assertNoErrorsInCode(r'''
+class A<T> {
+  const A();
+}
+
+var c = const {const A<int>(), const A<num>()};
+''');
+  }
+
+  test_nonConst_entry() async {
+    await assertNoErrorsInCode('''
+var c = {1, 2, 1};
+''');
+  }
+}
+
+@reflectiveTest
+class EqualElementsInConstSetWithUIAsCodeTest
+    extends EqualElementsInConstSetTest {
+  @override
+  AnalysisOptionsImpl get analysisOptions => AnalysisOptionsImpl()
+    ..enabledExperiments = [
+      EnableString.control_flow_collections,
+      EnableString.spread_collections,
+    ];
+
+  test_const_ifElement_thenElseFalse() async {
+    await assertErrorsInCode('''
+var c = const {1, if (1 < 0) 2 else 1};
+''', [CompileTimeErrorCode.EQUAL_ELEMENTS_IN_CONST_SET]);
+  }
+
+  test_const_ifElement_thenElseFalse_onlyElse() async {
+    assertNoErrorsInCode('''
+var c = const {if (0 < 1) 1 else 1};
+''');
+  }
+
+  test_const_ifElement_thenElseTrue() async {
+    assertNoErrorsInCode('''
+var c = const {1, if (0 < 1) 2 else 1};
+''');
+  }
+
+  test_const_ifElement_thenElseTrue_onlyThen() async {
+    assertNoErrorsInCode('''
+var c = const {if (0 < 1) 1 else 1};
+''');
+  }
+
+  test_const_ifElement_thenFalse() async {
+    assertNoErrorsInCode('''
+var c = const {2, if (1 < 0) 2};
+''');
+  }
+
+  test_const_ifElement_thenTrue() async {
+    await assertErrorsInCode('''
+var c = const {1, if (0 < 1) 1};
+''', [CompileTimeErrorCode.EQUAL_ELEMENTS_IN_CONST_SET]);
+  }
+
+  test_const_spread__noDuplicate() async {
+    await assertNoErrorsInCode('''
+var c = const {1, ...{2}};
+''');
+  }
+
+  test_const_spread_hasDuplicate() async {
+    await assertErrorsInCode('''
+var c = const {1, ...{1}};
+''', [CompileTimeErrorCode.EQUAL_ELEMENTS_IN_CONST_SET]);
+  }
+}
diff --git a/pkg/analyzer/test/src/diagnostics/equal_keys_in_const_map_test.dart b/pkg/analyzer/test/src/diagnostics/equal_keys_in_const_map_test.dart
new file mode 100644
index 0000000..3ba9ead
--- /dev/null
+++ b/pkg/analyzer/test/src/diagnostics/equal_keys_in_const_map_test.dart
@@ -0,0 +1,111 @@
+// Copyright (c) 2019, the Dart project authors. Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+import 'package:analyzer/src/dart/analysis/experiments.dart';
+import 'package:analyzer/src/error/codes.dart';
+import 'package:analyzer/src/generated/engine.dart';
+import 'package:test_reflective_loader/test_reflective_loader.dart';
+
+import '../dart/resolution/driver_resolution.dart';
+
+main() {
+  defineReflectiveSuite(() {
+    defineReflectiveTests(EqualKeysInConstMapTest);
+    defineReflectiveTests(EqualKeysInConstMapWithUIAsCodeTest);
+  });
+}
+
+@reflectiveTest
+class EqualKeysInConstMapTest extends DriverResolutionTest {
+  test_const_entry() async {
+    await assertErrorsInCode('''
+var c = const {1: null, 2: null, 1: null};
+''', [CompileTimeErrorCode.EQUAL_KEYS_IN_CONST_MAP]);
+  }
+
+  test_const_instanceCreation_equalTypeArgs() async {
+    await assertErrorsInCode(r'''
+class A<T> {
+  const A();
+}
+
+var c = const {const A<int>(): null, const A<int>(): null};
+''', [CompileTimeErrorCode.EQUAL_KEYS_IN_CONST_MAP]);
+  }
+
+  test_const_instanceCreation_notEqualTypeArgs() async {
+    // No error because A<int> and A<num> are different types.
+    await assertNoErrorsInCode(r'''
+class A<T> {
+  const A();
+}
+
+var c = const {const A<int>(): null, const A<num>(): null};
+''');
+  }
+
+  test_nonConst_entry() async {
+    await assertNoErrorsInCode('''
+var c = {1: null, 2: null, 1: null};
+''');
+  }
+}
+
+@reflectiveTest
+class EqualKeysInConstMapWithUIAsCodeTest extends EqualKeysInConstMapTest {
+  @override
+  AnalysisOptionsImpl get analysisOptions => AnalysisOptionsImpl()
+    ..enabledExperiments = [
+      EnableString.control_flow_collections,
+      EnableString.spread_collections,
+    ];
+
+  test_const_ifElement_thenElseFalse() async {
+    await assertErrorsInCode('''
+var c = const {1: null, if (1 < 0) 2: null else 1: null};
+''', [CompileTimeErrorCode.EQUAL_KEYS_IN_CONST_MAP]);
+  }
+
+  test_const_ifElement_thenElseFalse_onlyElse() async {
+    assertNoErrorsInCode('''
+var c = const {if (0 < 1) 1: null else 1: null};
+''');
+  }
+
+  test_const_ifElement_thenElseTrue() async {
+    assertNoErrorsInCode('''
+var c = const {1: null, if (0 < 1) 2: null else 1: null};
+''');
+  }
+
+  test_const_ifElement_thenElseTrue_onlyThen() async {
+    assertNoErrorsInCode('''
+var c = const {if (0 < 1) 1: null else 1: null};
+''');
+  }
+
+  test_const_ifElement_thenFalse() async {
+    assertNoErrorsInCode('''
+var c = const {2: null, if (1 < 0) 2: 2};
+''');
+  }
+
+  test_const_ifElement_thenTrue() async {
+    await assertErrorsInCode('''
+var c = const {1: null, if (0 < 1) 1: null};
+''', [CompileTimeErrorCode.EQUAL_KEYS_IN_CONST_MAP]);
+  }
+
+  test_const_spread__noDuplicate() async {
+    await assertNoErrorsInCode('''
+var c = const {1: null, ...{2: null}};
+''');
+  }
+
+  test_const_spread_hasDuplicate() async {
+    await assertErrorsInCode('''
+var c = const {1: null, ...{1: null}};
+''', [CompileTimeErrorCode.EQUAL_KEYS_IN_CONST_MAP]);
+  }
+}
diff --git a/pkg/analyzer/test/src/diagnostics/equal_keys_in_map_test.dart b/pkg/analyzer/test/src/diagnostics/equal_keys_in_map_test.dart
deleted file mode 100644
index 661e118..0000000
--- a/pkg/analyzer/test/src/diagnostics/equal_keys_in_map_test.dart
+++ /dev/null
@@ -1,87 +0,0 @@
-// Copyright (c) 2019, the Dart project authors. Please see the AUTHORS file
-// for details. All rights reserved. Use of this source code is governed by a
-// BSD-style license that can be found in the LICENSE file.
-
-import 'package:analyzer/src/dart/analysis/experiments.dart';
-import 'package:analyzer/src/error/codes.dart';
-import 'package:analyzer/src/generated/engine.dart';
-import 'package:test_reflective_loader/test_reflective_loader.dart';
-
-import '../dart/resolution/driver_resolution.dart';
-
-main() {
-  defineReflectiveSuite(() {
-    defineReflectiveTests(EqualKeysInMapWithUiAsCodeTest);
-  });
-}
-
-@reflectiveTest
-class EqualKeysInMapWithUiAsCodeTest extends DriverResolutionTest {
-  @override
-  AnalysisOptionsImpl get analysisOptions => AnalysisOptionsImpl()
-    ..enabledExperiments = [
-      EnableString.control_flow_collections,
-      EnableString.spread_collections,
-    ];
-
-  test_ifElement_false_elseEvaluated() async {
-    await assertErrorsInCode('''
-const c = {1: null, if (1 < 0) 2: null else 1: null};
-''', [StaticWarningCode.EQUAL_KEYS_IN_MAP]);
-  }
-
-  test_ifElement_false_onlyElseEvaluated() async {
-    assertNoErrorsInCode('''
-const c = {if (0 < 1) 1 : 1 else 1 : 2};
-''');
-  }
-
-  test_ifElement_false_thenNotEvaluated() async {
-    assertNoErrorsInCode('''
-const c = {2 : 1, if (1 < 0) 2 : 2};
-''');
-  }
-
-  test_ifElement_true_elseNotEvaluated() async {
-    assertNoErrorsInCode('''
-const c = {1 : 1, if (0 < 1) 2 : 2 else 1 : 2};
-''');
-  }
-
-  test_ifElement_true_onlyThenEvaluated() async {
-    assertNoErrorsInCode('''
-const c = {if (0 < 1) 1 : 1 else 1 : 2};
-''');
-  }
-
-  test_ifElement_true_thenEvaluated() async {
-    await assertErrorsInCode('''
-const c = {1: null, if (0 < 1) 1: null};
-''', [StaticWarningCode.EQUAL_KEYS_IN_MAP]);
-  }
-
-  @failingTest
-  test_nonConst_noDuplicateReported() async {
-    await assertNoErrorsInCode('''
-void main() {
-  print({1: null, 1: null});
-}
-''');
-  }
-
-  test_spreadElement_addsDuplicate() async {
-    await assertErrorsInCode('''
-void main() {
-  const {1: null, ...{1: null}};
-}
-''', [StaticWarningCode.EQUAL_KEYS_IN_MAP]);
-  }
-
-  test_spreadElement_doesntAddDuplicate() async {
-    await assertNoErrorsInCode('''
-void main() {
-  const {1: null, ...{2: null}};
-}
-''');
-  }
-}
diff --git a/pkg/analyzer/test/src/diagnostics/expression_in_map_test.dart b/pkg/analyzer/test/src/diagnostics/expression_in_map_test.dart
index 7f81b3c..613210f 100644
--- a/pkg/analyzer/test/src/diagnostics/expression_in_map_test.dart
+++ b/pkg/analyzer/test/src/diagnostics/expression_in_map_test.dart
@@ -19,16 +19,38 @@
 
 @reflectiveTest
 class ExpressionInMapTest extends DriverResolutionTest {
+  bool get isUiAsCode => analysisOptions.experimentStatus.spread_collections;
+
   test_map() async {
-    await assertErrorsInCode('''
+    await assertErrorsInCode(
+      '''
 var m = <String, int>{'a', 'b' : 2};
-''', [ParserErrorCode.EXPECTED_TOKEN, ParserErrorCode.MISSING_IDENTIFIER]);
+''',
+      isUiAsCode
+          ? [
+              CompileTimeErrorCode.EXPRESSION_IN_MAP,
+            ]
+          : [
+              ParserErrorCode.EXPECTED_TOKEN,
+              ParserErrorCode.MISSING_IDENTIFIER
+            ],
+    );
   }
 
   test_map_const() async {
-    await assertErrorsInCode('''
+    await assertErrorsInCode(
+      '''
 var m = <String, int>{'a', 'b' : 2};
-''', [ParserErrorCode.EXPECTED_TOKEN, ParserErrorCode.MISSING_IDENTIFIER]);
+''',
+      isUiAsCode
+          ? [
+              CompileTimeErrorCode.EXPRESSION_IN_MAP,
+            ]
+          : [
+              ParserErrorCode.EXPECTED_TOKEN,
+              ParserErrorCode.MISSING_IDENTIFIER
+            ],
+    );
   }
 }
 
diff --git a/pkg/analyzer/test/src/diagnostics/import_deferred_library_with_load_function_test.dart b/pkg/analyzer/test/src/diagnostics/import_deferred_library_with_load_function_test.dart
new file mode 100644
index 0000000..0500bcc
--- /dev/null
+++ b/pkg/analyzer/test/src/diagnostics/import_deferred_library_with_load_function_test.dart
@@ -0,0 +1,72 @@
+// Copyright (c) 2019, the Dart project authors. Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+import 'package:analyzer/src/error/codes.dart';
+import 'package:analyzer/src/test_utilities/package_mixin.dart';
+import 'package:test_reflective_loader/test_reflective_loader.dart';
+
+import '../dart/resolution/driver_resolution.dart';
+
+main() {
+  defineReflectiveSuite(() {
+    defineReflectiveTests(ImportDeferredLibraryWithLoadFunctionTest);
+  });
+}
+
+@reflectiveTest
+class ImportDeferredLibraryWithLoadFunctionTest extends DriverResolutionTest {
+  test_deferredImport_withLoadLibraryFunction() async {
+    newFile('/pkg1/lib/lib1.dart', content: r'''
+library lib1;
+loadLibrary() {}
+f() {}''');
+
+    newFile('/pkg1/lib/lib2.dart', content: r'''
+library root;
+import 'lib1.dart' deferred as lib1;
+main() { lib1.f(); }''');
+
+    await _resolveTestFile('/pkg1/lib/lib1.dart');
+    await _resolveTestFile('/pkg1/lib/lib2.dart');
+    assertTestErrors([HintCode.IMPORT_DEFERRED_LIBRARY_WITH_LOAD_FUNCTION]);
+  }
+
+  test_nonDeferredImport_withLoadLibraryFunction() async {
+    newFile('/pkg1/lib/lib1.dart', content: r'''
+library lib1;
+loadLibrary() {}
+f() {}''');
+
+    newFile('/pkg1/lib/lib2.dart', content: r'''
+library root;
+import 'lib1.dart' as lib1;
+main() { lib1.f(); }''');
+
+    await _resolveTestFile('/pkg1/lib/lib1.dart');
+    await _resolveTestFile('/pkg1/lib/lib2.dart');
+    assertNoTestErrors();
+  }
+
+  test_deferredImport_withoutLoadLibraryFunction() async {
+    newFile('/pkg1/lib/lib1.dart', content: r'''
+library lib1;
+f() {}''');
+
+    newFile('/pkg1/lib/lib2.dart', content: r'''
+library root;
+import 'lib1.dart' deferred as lib1;
+main() { lib1.f(); }''');
+
+    await _resolveTestFile('/pkg1/lib/lib1.dart');
+    await _resolveTestFile('/pkg1/lib/lib2.dart');
+    assertNoTestErrors();
+  }
+
+  /// Resolve the test file at [path].
+  ///
+  /// Similar to ResolutionTest.resolveTestFile, but a custom path is supported.
+  Future<void> _resolveTestFile(String path) async {
+    result = await resolveFile(convertPath(path));
+  }
+}
diff --git a/pkg/analyzer/test/src/diagnostics/invalid_override_different_default_values_named_test.dart b/pkg/analyzer/test/src/diagnostics/invalid_override_different_default_values_named_test.dart
index 035a8e5..7b57b1e 100644
--- a/pkg/analyzer/test/src/diagnostics/invalid_override_different_default_values_named_test.dart
+++ b/pkg/analyzer/test/src/diagnostics/invalid_override_different_default_values_named_test.dart
@@ -1,4 +1,4 @@
-// Copyright (c) 2019, the Dart project authors.  Please see the AUTHORS file
+// Copyright (c) 2019, the Dart project authors. Please see the AUTHORS file
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
 
diff --git a/pkg/analyzer/test/src/diagnostics/invalid_override_different_default_values_positional_test.dart b/pkg/analyzer/test/src/diagnostics/invalid_override_different_default_values_positional_test.dart
index fc83949..b3f03a6 100644
--- a/pkg/analyzer/test/src/diagnostics/invalid_override_different_default_values_positional_test.dart
+++ b/pkg/analyzer/test/src/diagnostics/invalid_override_different_default_values_positional_test.dart
@@ -1,4 +1,4 @@
-// Copyright (c) 2019, the Dart project authors.  Please see the AUTHORS file
+// Copyright (c) 2019, the Dart project authors. Please see the AUTHORS file
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
 
diff --git a/pkg/analyzer/test/src/diagnostics/list_element_type_not_assignable_test.dart b/pkg/analyzer/test/src/diagnostics/list_element_type_not_assignable_test.dart
index c92a8a0..98381f5 100644
--- a/pkg/analyzer/test/src/diagnostics/list_element_type_not_assignable_test.dart
+++ b/pkg/analyzer/test/src/diagnostics/list_element_type_not_assignable_test.dart
@@ -17,31 +17,56 @@
 
 @reflectiveTest
 class ListElementTypeNotAssignableTest extends DriverResolutionTest {
-  test_explicitTypeArgs_const() async {
+  test_const_stringInt() async {
     await assertErrorsInCode('''
 var v = const <String>[42];
 ''', [StaticWarningCode.LIST_ELEMENT_TYPE_NOT_ASSIGNABLE]);
   }
 
-  test_explicitTypeArgs_const_actualTypeMatch() async {
-    await assertNoErrorsInCode('''
-const dynamic x = null;
-var v = const <String>[x];
-''');
-  }
-
-  test_explicitTypeArgs_const_actualTypeMismatch() async {
+  test_const_stringInt_dynamic() async {
     await assertErrorsInCode('''
 const dynamic x = 42;
 var v = const <String>[x];
 ''', [StaticWarningCode.LIST_ELEMENT_TYPE_NOT_ASSIGNABLE]);
   }
 
-  test_explicitTypeArgs_notConst() async {
+  test_const_stringNull() async {
+    await assertNoErrorsInCode('''
+var v = const <String>[null];
+''');
+  }
+
+  test_const_stringNull_dynamic() async {
+    await assertNoErrorsInCode('''
+const dynamic x = null;
+var v = const <String>[x];
+''');
+  }
+
+  test_const_voidInt() async {
+    await assertNoErrorsInCode('''
+var v = const <void>[42];
+''');
+  }
+
+  test_nonConst_stringInt() async {
     await assertErrorsInCode('''
-var v = <String> [42];
+var v = <String>[42];
 ''', [StaticWarningCode.LIST_ELEMENT_TYPE_NOT_ASSIGNABLE]);
   }
+
+  test_nonConst_stringInt_dynamic() async {
+    await assertNoErrorsInCode('''
+const dynamic x = 42;
+var v = <String>[x];
+''');
+  }
+
+  test_nonConst_voidInt() async {
+    await assertNoErrorsInCode('''
+var v = <void>[42];
+''');
+  }
 }
 
 @reflectiveTest
diff --git a/pkg/analyzer/test/src/diagnostics/map_entry_not_in_map_test.dart b/pkg/analyzer/test/src/diagnostics/map_entry_not_in_map_test.dart
index 140e53e..673c83a 100644
--- a/pkg/analyzer/test/src/diagnostics/map_entry_not_in_map_test.dart
+++ b/pkg/analyzer/test/src/diagnostics/map_entry_not_in_map_test.dart
@@ -19,16 +19,26 @@
 
 @reflectiveTest
 class MapEntryNotInMapTest extends DriverResolutionTest {
+  bool get isUiAsCode => analysisOptions.experimentStatus.spread_collections;
+
   test_set() async {
     await assertErrorsInCode('''
 var c = <int>{1:2};
-''', [ParserErrorCode.UNEXPECTED_TOKEN]);
+''', [
+      isUiAsCode
+          ? CompileTimeErrorCode.MAP_ENTRY_NOT_IN_MAP
+          : ParserErrorCode.UNEXPECTED_TOKEN
+    ]);
   }
 
   test_set_const() async {
     await assertErrorsInCode('''
 var c = const <int>{1:2};
-''', [ParserErrorCode.UNEXPECTED_TOKEN]);
+''', [
+      isUiAsCode
+          ? CompileTimeErrorCode.MAP_ENTRY_NOT_IN_MAP
+          : ParserErrorCode.UNEXPECTED_TOKEN
+    ]);
   }
 }
 
diff --git a/pkg/analyzer/test/src/diagnostics/non_constant_if_element_condition_from_deferred_library_test.dart b/pkg/analyzer/test/src/diagnostics/non_constant_if_element_condition_from_deferred_library_test.dart
new file mode 100644
index 0000000..2da7688
--- /dev/null
+++ b/pkg/analyzer/test/src/diagnostics/non_constant_if_element_condition_from_deferred_library_test.dart
@@ -0,0 +1,126 @@
+// Copyright (c) 2019, the Dart project authors. Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+import 'package:analyzer/src/dart/analysis/experiments.dart';
+import 'package:analyzer/src/error/codes.dart';
+import 'package:analyzer/src/generated/engine.dart';
+import 'package:test_reflective_loader/test_reflective_loader.dart';
+
+import '../dart/resolution/driver_resolution.dart';
+
+main() {
+  defineReflectiveSuite(() {
+    defineReflectiveTests(NonConstantIfElementConditionFromDeferredLibraryTest);
+  });
+}
+
+@reflectiveTest
+class NonConstantIfElementConditionFromDeferredLibraryTest
+    extends DriverResolutionTest {
+  @override
+  AnalysisOptionsImpl get analysisOptions => AnalysisOptionsImpl()
+    ..enabledExperiments = [
+      EnableString.control_flow_collections,
+      EnableString.spread_collections
+    ];
+
+  test_inList_deferred() async {
+    newFile(convertPath('/test/lib/lib1.dart'), content: r'''
+const bool c = true;''');
+    await assertErrorsInCode(r'''
+import 'lib1.dart' deferred as a;
+f() {
+  return const [if(a.c) 0];
+}''', [
+      CompileTimeErrorCode
+          .NON_CONSTANT_IF_ELEMENT_CONDITION_FROM_DEFERRED_LIBRARY
+    ]);
+  }
+
+  test_inList_nonConst() async {
+    newFile(convertPath('/test/lib/lib1.dart'), content: r'''
+const bool c = true;''');
+    await assertNoErrorsInCode(r'''
+import 'lib1.dart' deferred as a;
+f() {
+  return [if(a.c) 0];
+}''');
+  }
+
+  test_inList_notDeferred() async {
+    newFile(convertPath('/test/lib/lib1.dart'), content: r'''
+const bool c = true;''');
+    await assertNoErrorsInCode(r'''
+import 'lib1.dart' as a;
+f() {
+  return const [if(a.c) 0];
+}''');
+  }
+
+  test_inMap_deferred() async {
+    newFile(convertPath('/test/lib/lib1.dart'), content: r'''
+const bool c = true;''');
+    await assertErrorsInCode(r'''
+import 'lib1.dart' deferred as a;
+f() {
+  return const {if(a.c) 0 : 0};
+}''', [
+      CompileTimeErrorCode
+          .NON_CONSTANT_IF_ELEMENT_CONDITION_FROM_DEFERRED_LIBRARY
+    ]);
+  }
+
+  test_inMap_notConst() async {
+    newFile(convertPath('/test/lib/lib1.dart'), content: r'''
+const bool c = true;''');
+    await assertNoErrorsInCode(r'''
+import 'lib1.dart' deferred as a;
+f() {
+  return {if(a.c) 0 : 0};
+}''');
+  }
+
+  test_inMap_notDeferred() async {
+    newFile(convertPath('/test/lib/lib1.dart'), content: r'''
+const bool c = true;''');
+    await assertNoErrorsInCode(r'''
+import 'lib1.dart' as a;
+f() {
+  return const {if(a.c) 0 : 0};
+}''');
+  }
+
+  test_inSet_deferred() async {
+    newFile(convertPath('/test/lib/lib1.dart'), content: r'''
+const bool c = true;''');
+    await assertErrorsInCode(r'''
+import 'lib1.dart' deferred as a;
+f() {
+  return const {if(a.c) 0};
+}''', [
+      CompileTimeErrorCode
+          .NON_CONSTANT_IF_ELEMENT_CONDITION_FROM_DEFERRED_LIBRARY
+    ]);
+  }
+
+  test_inSet_notConst() async {
+    newFile(convertPath('/test/lib/lib1.dart'), content: r'''
+const bool c = true;''');
+    await assertNoErrorsInCode(r'''
+import 'lib1.dart' deferred as a;
+f() {
+  return {if(a.c) 0};
+}''');
+  }
+
+  test_inSet_notDeferred() async {
+    newFile(convertPath('/test/lib/lib1.dart'), content: r'''
+const bool c = true;''');
+    await assertNoErrorsInCode(r'''
+import 'lib1.dart' as a;
+f() {
+  return const {if(a.c) 0};
+}''');
+  }
+}
diff --git a/pkg/analyzer/test/src/diagnostics/non_constant_list_element_from_deferred_library_test.dart b/pkg/analyzer/test/src/diagnostics/non_constant_list_element_from_deferred_library_test.dart
new file mode 100644
index 0000000..9a486ea
--- /dev/null
+++ b/pkg/analyzer/test/src/diagnostics/non_constant_list_element_from_deferred_library_test.dart
@@ -0,0 +1,73 @@
+// Copyright (c) 2019, the Dart project authors. Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+import 'package:analyzer/src/dart/analysis/experiments.dart';
+import 'package:analyzer/src/error/codes.dart';
+import 'package:analyzer/src/generated/engine.dart';
+import 'package:test_reflective_loader/test_reflective_loader.dart';
+
+import '../dart/resolution/driver_resolution.dart';
+
+main() {
+  defineReflectiveSuite(() {
+    defineReflectiveTests(NonConstantListElementFromDeferredLibraryTest);
+    defineReflectiveTests(
+        NonConstantListValueFromDeferredLibraryWithUiAsCodeTest);
+  });
+}
+
+@reflectiveTest
+class NonConstantListElementFromDeferredLibraryTest
+    extends DriverResolutionTest {
+  test_const_topLevel_deferred() async {
+    newFile(convertPath('/test/lib/lib1.dart'), content: r'''
+const int c = 1;''');
+    await assertErrorsInCode(r'''
+import 'lib1.dart' deferred as a;
+var v = const [a.c];
+''', [CompileTimeErrorCode.NON_CONSTANT_LIST_ELEMENT_FROM_DEFERRED_LIBRARY]);
+  }
+
+  test_const_topLevel_deferred_nested() async {
+    newFile(convertPath('/test/lib/lib1.dart'), content: r'''
+const int c = 1;''');
+    await assertErrorsInCode(r'''
+import 'lib1.dart' deferred as a;
+var v = const [a.c + 1];
+''', [CompileTimeErrorCode.NON_CONSTANT_LIST_ELEMENT_FROM_DEFERRED_LIBRARY]);
+  }
+}
+
+@reflectiveTest
+class NonConstantListValueFromDeferredLibraryWithUiAsCodeTest
+    extends NonConstantListElementFromDeferredLibraryTest {
+  @override
+  AnalysisOptionsImpl get analysisOptions => AnalysisOptionsImpl()
+    ..enabledExperiments = [
+      EnableString.control_flow_collections,
+      EnableString.spread_collections
+    ];
+
+  @failingTest
+  test_const_ifElement_thenTrue_deferredElse() async {
+    // reports wrong error code (which is not crucial to fix)
+    newFile(convertPath('/test/lib/lib1.dart'), content: r'''
+const int c = 1;''');
+    await assertErrorsInCode(r'''
+import 'lib1.dart' deferred as a;
+const cond = true;
+var v = const [ if (cond) 'a' else a.c ];
+''', [CompileTimeErrorCode.NON_CONSTANT_LIST_ELEMENT_FROM_DEFERRED_LIBRARY]);
+  }
+
+  test_const_ifElement_thenTrue_deferredThen() async {
+    newFile(convertPath('/test/lib/lib1.dart'), content: r'''
+const int c = 1;''');
+    await assertErrorsInCode(r'''
+import 'lib1.dart' deferred as a;
+const cond = true;
+var v = const [ if (cond) a.c ];
+''', [CompileTimeErrorCode.NON_CONSTANT_LIST_ELEMENT_FROM_DEFERRED_LIBRARY]);
+  }
+}
diff --git a/pkg/analyzer/test/src/diagnostics/non_constant_list_element_test.dart b/pkg/analyzer/test/src/diagnostics/non_constant_list_element_test.dart
index f90a4c4..96fd900 100644
--- a/pkg/analyzer/test/src/diagnostics/non_constant_list_element_test.dart
+++ b/pkg/analyzer/test/src/diagnostics/non_constant_list_element_test.dart
@@ -25,6 +25,13 @@
 ''', [CompileTimeErrorCode.NON_CONSTANT_LIST_ELEMENT]);
   }
 
+  test_const_topVar_nested() async {
+    await assertErrorsInCode(r'''
+final dynamic a = 0;
+var v = const [a + 1];
+''', [CompileTimeErrorCode.NON_CONSTANT_LIST_ELEMENT]);
+  }
+
   test_nonConst_topVar() async {
     await assertNoErrorsInCode('''
 final dynamic a = 0;
@@ -43,6 +50,13 @@
       EnableString.spread_collections,
     ];
 
+  test_const_forElement() async {
+    await assertErrorsInCode(r'''
+const Set set = {};
+var v = const [for(final x in set) x];
+''', [CompileTimeErrorCode.NON_CONSTANT_LIST_ELEMENT]);
+  }
+
   test_const_ifElement_thenElseFalse_finalElse() async {
     await assertErrorsInCode('''
 final dynamic a = 0;
diff --git a/pkg/analyzer/test/src/diagnostics/non_constant_map_key_from_deferred_library_test.dart b/pkg/analyzer/test/src/diagnostics/non_constant_map_key_from_deferred_library_test.dart
new file mode 100644
index 0000000..be77d50
--- /dev/null
+++ b/pkg/analyzer/test/src/diagnostics/non_constant_map_key_from_deferred_library_test.dart
@@ -0,0 +1,71 @@
+// Copyright (c) 2019, the Dart project authors. Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+import 'package:analyzer/src/dart/analysis/experiments.dart';
+import 'package:analyzer/src/error/codes.dart';
+import 'package:analyzer/src/generated/engine.dart';
+import 'package:test_reflective_loader/test_reflective_loader.dart';
+
+import '../dart/resolution/driver_resolution.dart';
+
+main() {
+  defineReflectiveSuite(() {
+    defineReflectiveTests(NonConstantMapKeyFromDeferredLibraryTest);
+    defineReflectiveTests(NonConstantMapKeyFromDeferredLibraryWithUiAsCodeTest);
+  });
+}
+
+@reflectiveTest
+class NonConstantMapKeyFromDeferredLibraryTest extends DriverResolutionTest {
+  test_const_topLevel_deferred() async {
+    newFile(convertPath('/test/lib/lib1.dart'), content: r'''
+const int c = 1;''');
+    await assertErrorsInCode(r'''
+import 'lib1.dart' deferred as a;
+var v = const {a.c : 0};
+''', [CompileTimeErrorCode.NON_CONSTANT_MAP_KEY_FROM_DEFERRED_LIBRARY]);
+  }
+
+  test_const_topLevel_deferred_nested() async {
+    newFile(convertPath('/test/lib/lib1.dart'), content: r'''
+const int c = 1;''');
+    await assertErrorsInCode(r'''
+import 'lib1.dart' deferred as a;
+var v = const {a.c + 1 : 0};
+''', [CompileTimeErrorCode.NON_CONSTANT_MAP_KEY_FROM_DEFERRED_LIBRARY]);
+  }
+}
+
+@reflectiveTest
+class NonConstantMapKeyFromDeferredLibraryWithUiAsCodeTest
+    extends NonConstantMapKeyFromDeferredLibraryTest {
+  @override
+  AnalysisOptionsImpl get analysisOptions => AnalysisOptionsImpl()
+    ..enabledExperiments = [
+      EnableString.control_flow_collections,
+      EnableString.spread_collections
+    ];
+
+  @failingTest
+  test_const_ifElement_thenTrue_deferredElse() async {
+// reports wrong error code
+    newFile(convertPath('/test/lib/lib1.dart'), content: r'''
+const int c = 1;''');
+    await assertErrorsInCode(r'''
+import 'lib1.dart' deferred as a;
+const cond = true;
+var v = const { if (cond) 0: 1 else a.c : 0};
+''', [CompileTimeErrorCode.NON_CONSTANT_MAP_KEY_FROM_DEFERRED_LIBRARY]);
+  }
+
+  test_const_ifElement_thenTrue_deferredThen() async {
+    newFile(convertPath('/test/lib/lib1.dart'), content: r'''
+const int c = 1;''');
+    await assertErrorsInCode(r'''
+import 'lib1.dart' deferred as a;
+const cond = true;
+var v = const { if (cond) a.c : 0};
+''', [CompileTimeErrorCode.NON_CONSTANT_MAP_KEY_FROM_DEFERRED_LIBRARY]);
+  }
+}
diff --git a/pkg/analyzer/test/src/diagnostics/non_constant_map_key_test.dart b/pkg/analyzer/test/src/diagnostics/non_constant_map_key_test.dart
new file mode 100644
index 0000000..95ec677
--- /dev/null
+++ b/pkg/analyzer/test/src/diagnostics/non_constant_map_key_test.dart
@@ -0,0 +1,53 @@
+// Copyright (c) 2019, the Dart project authors. Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+import 'package:analyzer/src/dart/analysis/experiments.dart';
+import 'package:analyzer/src/error/codes.dart';
+import 'package:analyzer/src/generated/engine.dart';
+import 'package:test_reflective_loader/test_reflective_loader.dart';
+
+import '../dart/resolution/driver_resolution.dart';
+
+main() {
+  defineReflectiveSuite(() {
+    defineReflectiveTests(NonConstantMapKeyTest);
+    defineReflectiveTests(NonConstantMapKeyWithUiAsCodeTest);
+  });
+}
+
+@reflectiveTest
+class NonConstantMapKeyTest extends DriverResolutionTest {
+  test_const_topLevel() async {
+    await assertErrorsInCode(r'''
+final dynamic a = 0;
+var v = const {a : 0};
+''', [CompileTimeErrorCode.NON_CONSTANT_MAP_KEY]);
+  }
+}
+
+@reflectiveTest
+class NonConstantMapKeyWithUiAsCodeTest extends NonConstantMapKeyTest {
+  @override
+  AnalysisOptionsImpl get analysisOptions => AnalysisOptionsImpl()
+    ..enabledExperiments = [
+      EnableString.control_flow_collections,
+      EnableString.spread_collections
+    ];
+
+  test_const_ifElement_thenTrue_elseFinal() async {
+    await assertErrorsInCode(r'''
+final dynamic a = 0;
+const cond = true;
+var v = const {if (cond) 0: 1 else a : 0};
+''', [CompileTimeErrorCode.NON_CONSTANT_MAP_KEY]);
+  }
+
+  test_const_ifElement_thenTrue_thenFinal() async {
+    await assertErrorsInCode(r'''
+final dynamic a = 0;
+const cond = true;
+var v = const {if (cond) a : 0};
+''', [CompileTimeErrorCode.NON_CONSTANT_MAP_KEY]);
+  }
+}
diff --git a/pkg/analyzer/test/src/diagnostics/non_constant_map_value_from_deferred_library_test.dart b/pkg/analyzer/test/src/diagnostics/non_constant_map_value_from_deferred_library_test.dart
new file mode 100644
index 0000000..ce04f02
--- /dev/null
+++ b/pkg/analyzer/test/src/diagnostics/non_constant_map_value_from_deferred_library_test.dart
@@ -0,0 +1,72 @@
+// Copyright (c) 2019, the Dart project authors. Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+import 'package:analyzer/src/dart/analysis/experiments.dart';
+import 'package:analyzer/src/error/codes.dart';
+import 'package:analyzer/src/generated/engine.dart';
+import 'package:test_reflective_loader/test_reflective_loader.dart';
+
+import '../dart/resolution/driver_resolution.dart';
+
+main() {
+  defineReflectiveSuite(() {
+    defineReflectiveTests(NonConstantMapValueFromDeferredLibraryTest);
+    defineReflectiveTests(
+        NonConstantMapValueFromDeferredLibraryWithUiAsCodeTest);
+  });
+}
+
+@reflectiveTest
+class NonConstantMapValueFromDeferredLibraryTest extends DriverResolutionTest {
+  test_const_topLevel_deferred() async {
+    newFile(convertPath('/test/lib/lib1.dart'), content: r'''
+const int c = 1;''');
+    await assertErrorsInCode(r'''
+import 'lib1.dart' deferred as a;
+var v = const {'a' : a.c};
+''', [CompileTimeErrorCode.NON_CONSTANT_MAP_VALUE_FROM_DEFERRED_LIBRARY]);
+  }
+
+  test_const_topLevel_deferred_nested() async {
+    newFile(convertPath('/test/lib/lib1.dart'), content: r'''
+const int c = 1;''');
+    await assertErrorsInCode(r'''
+import 'lib1.dart' deferred as a;
+var v = const {'a' : a.c + 1};
+''', [CompileTimeErrorCode.NON_CONSTANT_MAP_VALUE_FROM_DEFERRED_LIBRARY]);
+  }
+}
+
+@reflectiveTest
+class NonConstantMapValueFromDeferredLibraryWithUiAsCodeTest
+    extends NonConstantMapValueFromDeferredLibraryTest {
+  @override
+  AnalysisOptionsImpl get analysisOptions => AnalysisOptionsImpl()
+    ..enabledExperiments = [
+      EnableString.control_flow_collections,
+      EnableString.spread_collections
+    ];
+
+  @failingTest
+  test_const_ifElement_thenTrue_elseDeferred() async {
+    // reports wrong error code
+    newFile(convertPath('/test/lib/lib1.dart'), content: r'''
+const int c = 1;''');
+    await assertErrorsInCode(r'''
+import 'lib1.dart' deferred as a;
+const cond = true;
+var v = const { if (cond) 'a': 'b' else 'c' : a.c};
+''', [CompileTimeErrorCode.NON_CONSTANT_MAP_VALUE_FROM_DEFERRED_LIBRARY]);
+  }
+
+  test_const_ifElement_thenTrue_thenDeferred() async {
+    newFile(convertPath('/test/lib/lib1.dart'), content: r'''
+const int c = 1;''');
+    await assertErrorsInCode(r'''
+import 'lib1.dart' deferred as a;
+const cond = true;
+var v = const { if (cond) 'a' : a.c};
+''', [CompileTimeErrorCode.NON_CONSTANT_MAP_VALUE_FROM_DEFERRED_LIBRARY]);
+  }
+}
diff --git a/pkg/analyzer/test/src/diagnostics/non_constant_map_value_test.dart b/pkg/analyzer/test/src/diagnostics/non_constant_map_value_test.dart
new file mode 100644
index 0000000..75b20d5
--- /dev/null
+++ b/pkg/analyzer/test/src/diagnostics/non_constant_map_value_test.dart
@@ -0,0 +1,53 @@
+// Copyright (c) 2019, the Dart project authors. Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+import 'package:analyzer/src/dart/analysis/experiments.dart';
+import 'package:analyzer/src/error/codes.dart';
+import 'package:analyzer/src/generated/engine.dart';
+import 'package:test_reflective_loader/test_reflective_loader.dart';
+
+import '../dart/resolution/driver_resolution.dart';
+
+main() {
+  defineReflectiveSuite(() {
+    defineReflectiveTests(NonConstantMapValueTest);
+    defineReflectiveTests(NonConstantMapValueWithUiAsCodeTest);
+  });
+}
+
+@reflectiveTest
+class NonConstantMapValueTest extends DriverResolutionTest {
+  test_const_topLevel() async {
+    await assertErrorsInCode(r'''
+final dynamic a = 0;
+var v = const {'a' : a};
+''', [CompileTimeErrorCode.NON_CONSTANT_MAP_VALUE]);
+  }
+}
+
+@reflectiveTest
+class NonConstantMapValueWithUiAsCodeTest extends NonConstantMapValueTest {
+  @override
+  AnalysisOptionsImpl get analysisOptions => AnalysisOptionsImpl()
+    ..enabledExperiments = [
+      EnableString.control_flow_collections,
+      EnableString.spread_collections
+    ];
+
+  test_const_ifTrue_elseFinal() async {
+    await assertErrorsInCode(r'''
+final dynamic a = 0;
+const cond = true;
+var v = const {if (cond) 'a': 'b', 'c' : a};
+''', [CompileTimeErrorCode.NON_CONSTANT_MAP_VALUE]);
+  }
+
+  test_const_ifTrue_thenFinal() async {
+    await assertErrorsInCode(r'''
+final dynamic a = 0;
+const cond = true;
+var v = const {if (cond) 'a' : a};
+''', [CompileTimeErrorCode.NON_CONSTANT_MAP_VALUE]);
+  }
+}
diff --git a/pkg/analyzer/test/src/diagnostics/non_constant_set_element_from_deferred_library_test.dart b/pkg/analyzer/test/src/diagnostics/non_constant_set_element_from_deferred_library_test.dart
new file mode 100644
index 0000000..59bdddb
--- /dev/null
+++ b/pkg/analyzer/test/src/diagnostics/non_constant_set_element_from_deferred_library_test.dart
@@ -0,0 +1,73 @@
+// Copyright (c) 2019, the Dart project authors. Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+import 'package:analyzer/src/dart/analysis/experiments.dart';
+import 'package:analyzer/src/error/codes.dart';
+import 'package:analyzer/src/generated/engine.dart';
+import 'package:test_reflective_loader/test_reflective_loader.dart';
+
+import '../dart/resolution/driver_resolution.dart';
+
+main() {
+  defineReflectiveSuite(() {
+    defineReflectiveTests(NonConstantSetElementFromDeferredLibraryTest);
+    defineReflectiveTests(
+        NonConstantSetElementFromDeferredLibraryWithUiAsCodeTest);
+  });
+}
+
+@reflectiveTest
+class NonConstantSetElementFromDeferredLibraryTest
+    extends DriverResolutionTest {
+  test_const_topLevel_deferred() async {
+    newFile(convertPath('/test/lib/lib1.dart'), content: r'''
+const int c = 1;''');
+    await assertErrorsInCode(r'''
+import 'lib1.dart' deferred as a;
+var v = const {a.c};
+''', [CompileTimeErrorCode.NON_CONSTANT_SET_ELEMENT_FROM_DEFERRED_LIBRARY]);
+  }
+
+  test_const_topLevel_deferred_nested() async {
+    newFile(convertPath('/test/lib/lib1.dart'), content: r'''
+const int c = 1;''');
+    await assertErrorsInCode(r'''
+import 'lib1.dart' deferred as a;
+var v = const {a.c + 1};
+''', [CompileTimeErrorCode.NON_CONSTANT_SET_ELEMENT_FROM_DEFERRED_LIBRARY]);
+  }
+}
+
+@reflectiveTest
+class NonConstantSetElementFromDeferredLibraryWithUiAsCodeTest
+    extends NonConstantSetElementFromDeferredLibraryTest {
+  @override
+  AnalysisOptionsImpl get analysisOptions => AnalysisOptionsImpl()
+    ..enabledExperiments = [
+      EnableString.control_flow_collections,
+      EnableString.spread_collections
+    ];
+
+  @failingTest
+  test_const_ifElement_thenTrue_elseDeferred() async {
+    // reports wrong error code
+    newFile(convertPath('/test/lib/lib1.dart'), content: r'''
+const int c = 1;''');
+    await assertErrorsInCode(r'''
+import 'lib1.dart' deferred as a;
+const cond = true;
+var v = const {if (cond) null else a.c};
+''', [CompileTimeErrorCode.NON_CONSTANT_SET_ELEMENT_FROM_DEFERRED_LIBRARY]);
+  }
+
+  test_const_ifElement_thenTrue_thenDeferred() async {
+    newFile(convertPath('/test/lib/lib1.dart'), content: r'''
+const int c = 1;''');
+    await assertErrorsInCode(r'''
+import 'lib1.dart' deferred as a;
+const cond = true;
+var v = const {if (cond) a.c};
+''', [CompileTimeErrorCode.NON_CONSTANT_SET_ELEMENT_FROM_DEFERRED_LIBRARY]);
+  }
+}
diff --git a/pkg/analyzer/test/src/diagnostics/non_constant_set_element_test.dart b/pkg/analyzer/test/src/diagnostics/non_constant_set_element_test.dart
index 1d8c475..ac0fdf9 100644
--- a/pkg/analyzer/test/src/diagnostics/non_constant_set_element_test.dart
+++ b/pkg/analyzer/test/src/diagnostics/non_constant_set_element_test.dart
@@ -18,6 +18,13 @@
 
 @reflectiveTest
 class NonConstantSetElementTest extends DriverResolutionTest {
+  test_const_parameter() async {
+    await assertErrorsInCode(r'''
+f(a) {
+  return const {a};
+}''', [CompileTimeErrorCode.NON_CONSTANT_SET_ELEMENT]);
+  }
+
   test_const_topVar() async {
     await assertErrorsInCode('''
 final dynamic a = 0;
@@ -97,4 +104,11 @@
 var v = const <int>{if (1 > 0) a};
 ''', [CompileTimeErrorCode.NON_CONSTANT_SET_ELEMENT]);
   }
+
+  test_const_spread_final() async {
+    await assertErrorsInCode(r'''
+final Set x = null;
+var v = const {...x};
+''', [CompileTimeErrorCode.NON_CONSTANT_SET_ELEMENT]);
+  }
 }
diff --git a/pkg/analyzer/test/src/diagnostics/non_constant_spread_expression_from_deferred_library_test.dart b/pkg/analyzer/test/src/diagnostics/non_constant_spread_expression_from_deferred_library_test.dart
new file mode 100644
index 0000000..c7f752bd
--- /dev/null
+++ b/pkg/analyzer/test/src/diagnostics/non_constant_spread_expression_from_deferred_library_test.dart
@@ -0,0 +1,123 @@
+// Copyright (c) 2019, the Dart project authors. Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+import 'package:analyzer/src/dart/analysis/experiments.dart';
+import 'package:analyzer/src/error/codes.dart';
+import 'package:analyzer/src/generated/engine.dart';
+import 'package:test_reflective_loader/test_reflective_loader.dart';
+
+import '../dart/resolution/driver_resolution.dart';
+
+main() {
+  defineReflectiveSuite(() {
+    defineReflectiveTests(NonConstantSpreadExpressionFromDeferredLibraryTest);
+  });
+}
+
+@reflectiveTest
+class NonConstantSpreadExpressionFromDeferredLibraryTest
+    extends DriverResolutionTest {
+  @override
+  AnalysisOptionsImpl get analysisOptions => AnalysisOptionsImpl()
+    ..enabledExperiments = [
+      EnableString.control_flow_collections,
+      EnableString.spread_collections
+    ];
+
+  test_inList_deferred() async {
+    newFile(convertPath('/test/lib/lib1.dart'), content: r'''
+const List c = [];''');
+    await assertErrorsInCode(r'''
+import 'lib1.dart' deferred as a;
+f() {
+  return const [...a.c];
+}''', [
+      CompileTimeErrorCode.NON_CONSTANT_SPREAD_EXPRESSION_FROM_DEFERRED_LIBRARY
+    ]);
+  }
+
+  test_inList_deferred_notConst() async {
+    newFile(convertPath('/test/lib/lib1.dart'), content: r'''
+const List c = [];''');
+    await assertNoErrorsInCode(r'''
+import 'lib1.dart' deferred as a;
+f() {
+  return [...a.c];
+}''');
+  }
+
+  test_inList_notDeferred() async {
+    newFile(convertPath('/test/lib/lib1.dart'), content: r'''
+const List c = [];''');
+    await assertNoErrorsInCode(r'''
+import 'lib1.dart' as a;
+f() {
+  return const [...a.c];
+}''');
+  }
+
+  test_inMap_deferred() async {
+    newFile(convertPath('/test/lib/lib1.dart'), content: r'''
+const Map c = <int, int>{};''');
+    await assertErrorsInCode(r'''
+import 'lib1.dart' deferred as a;
+f() {
+  return const {...a.c};
+}''', [
+      CompileTimeErrorCode.NON_CONSTANT_SPREAD_EXPRESSION_FROM_DEFERRED_LIBRARY
+    ]);
+  }
+
+  test_inMap_notConst() async {
+    newFile(convertPath('/test/lib/lib1.dart'), content: r'''
+const Map c = <int, int>{};''');
+    await assertNoErrorsInCode(r'''
+import 'lib1.dart' deferred as a;
+f() {
+  return {...a.c};
+}''');
+  }
+
+  test_inMap_notDeferred() async {
+    newFile(convertPath('/test/lib/lib1.dart'), content: r'''
+const Map c = <int, int>{};''');
+    await assertNoErrorsInCode(r'''
+import 'lib1.dart' as a;
+f() {
+  return const {...a.c};
+}''');
+  }
+
+  test_inSet_deferred() async {
+    newFile(convertPath('/test/lib/lib1.dart'), content: r'''
+const Set c = <int>{};''');
+    await assertErrorsInCode(r'''
+import 'lib1.dart' deferred as a;
+f() {
+  return const {...a.c};
+}''', [
+      CompileTimeErrorCode.NON_CONSTANT_SPREAD_EXPRESSION_FROM_DEFERRED_LIBRARY
+    ]);
+  }
+
+  test_inSet_notConst() async {
+    newFile(convertPath('/test/lib/lib1.dart'), content: r'''
+const Set c = <int>{};''');
+    await assertNoErrorsInCode(r'''
+import 'lib1.dart' deferred as a;
+f() {
+  return {...a.c};
+}''');
+  }
+
+  test_inSet_notDeferred() async {
+    newFile(convertPath('/test/lib/lib1.dart'), content: r'''
+const Set c = <int>{};''');
+    await assertNoErrorsInCode(r'''
+import 'lib1.dart' as a;
+f() {
+  return const {...a.c};
+}''');
+  }
+}
diff --git a/pkg/analyzer/test/src/diagnostics/null_aware_before_operator_test.dart b/pkg/analyzer/test/src/diagnostics/null_aware_before_operator_test.dart
new file mode 100644
index 0000000..a5b4154
--- /dev/null
+++ b/pkg/analyzer/test/src/diagnostics/null_aware_before_operator_test.dart
@@ -0,0 +1,74 @@
+// Copyright (c) 2019, the Dart project authors. Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+import 'package:analyzer/src/error/codes.dart';
+import 'package:analyzer/src/test_utilities/package_mixin.dart';
+import 'package:test_reflective_loader/test_reflective_loader.dart';
+
+import '../dart/resolution/driver_resolution.dart';
+
+main() {
+  defineReflectiveSuite(() {
+    defineReflectiveTests(NullAwareBeforeOperatorTest);
+  });
+}
+
+@reflectiveTest
+class NullAwareBeforeOperatorTest extends DriverResolutionTest {
+  test_minus() async {
+    await assertErrorsInCode(r'''
+m(x) {
+  x?.a - '';
+}
+''', [HintCode.NULL_AWARE_BEFORE_OPERATOR]);
+  }
+
+  test_assignment() async {
+    await assertNoErrorsInCode(r'''
+m(x) {
+  x?.a = '';
+}
+''');
+  }
+
+  test_equal_equal() async {
+    await assertNoErrorsInCode(r'''
+m(x) {
+  x?.a == '';
+}
+''');
+  }
+
+  test_is() async {
+    await assertNoErrorsInCode(r'''
+m(x) {
+  x?.a is String;
+}
+''');
+  }
+
+  test_is_not() async {
+    await assertNoErrorsInCode(r'''
+m(x) {
+  x?.a is! String;
+}
+''');
+  }
+
+  test_not_equal() async {
+    await assertNoErrorsInCode(r'''
+m(x) {
+  x?.a != '';
+}
+''');
+  }
+
+  test_question_question() async {
+    await assertNoErrorsInCode(r'''
+m(x) {
+  x?.a ?? true;
+}
+''');
+  }
+}
diff --git a/pkg/analyzer/test/src/diagnostics/null_aware_in_condition_test.dart b/pkg/analyzer/test/src/diagnostics/null_aware_in_condition_test.dart
new file mode 100644
index 0000000..db754f2
--- /dev/null
+++ b/pkg/analyzer/test/src/diagnostics/null_aware_in_condition_test.dart
@@ -0,0 +1,74 @@
+// Copyright (c) 2019, the Dart project authors. Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+import 'package:analyzer/src/error/codes.dart';
+import 'package:analyzer/src/test_utilities/package_mixin.dart';
+import 'package:test_reflective_loader/test_reflective_loader.dart';
+
+import '../dart/resolution/driver_resolution.dart';
+
+main() {
+  defineReflectiveSuite(() {
+    defineReflectiveTests(NullAwareInConditionTest);
+  });
+}
+
+@reflectiveTest
+class NullAwareInConditionTest extends DriverResolutionTest {
+  test_assert() async {
+    await assertErrorsInCode(r'''
+m(x) {
+  assert (x?.a);
+}
+''', [HintCode.NULL_AWARE_IN_CONDITION]);
+  }
+
+  test_conditionalExpression() async {
+    await assertErrorsInCode(r'''
+m(x) {
+  return x?.a ? 0 : 1;
+}
+''', [HintCode.NULL_AWARE_IN_CONDITION]);
+  }
+
+  test_do() async {
+    await assertErrorsInCode(r'''
+m(x) {
+  do {} while (x?.a);
+}
+''', [HintCode.NULL_AWARE_IN_CONDITION]);
+  }
+
+  test_for() async {
+    await assertErrorsInCode(r'''
+m(x) {
+  for (var v = x; v?.a; v = v.next) {}
+}
+''', [HintCode.NULL_AWARE_IN_CONDITION]);
+  }
+
+  test_if() async {
+    await assertErrorsInCode(r'''
+m(x) {
+  if (x?.a) {}
+}
+''', [HintCode.NULL_AWARE_IN_CONDITION]);
+  }
+
+  test_if_parenthesized() async {
+    await assertErrorsInCode(r'''
+m(x) {
+  if ((x?.a)) {}
+}
+''', [HintCode.NULL_AWARE_IN_CONDITION]);
+  }
+
+  test_while() async {
+    await assertErrorsInCode(r'''
+m(x) {
+  while (x?.a) {}
+}
+''', [HintCode.NULL_AWARE_IN_CONDITION]);
+  }
+}
diff --git a/pkg/analyzer/test/src/diagnostics/null_aware_in_logical_operator_test.dart b/pkg/analyzer/test/src/diagnostics/null_aware_in_logical_operator_test.dart
new file mode 100644
index 0000000..e3b48d2
--- /dev/null
+++ b/pkg/analyzer/test/src/diagnostics/null_aware_in_logical_operator_test.dart
@@ -0,0 +1,90 @@
+// Copyright (c) 2019, the Dart project authors. Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+import 'package:analyzer/src/error/codes.dart';
+import 'package:analyzer/src/test_utilities/package_mixin.dart';
+import 'package:test_reflective_loader/test_reflective_loader.dart';
+
+import '../dart/resolution/driver_resolution.dart';
+
+main() {
+  defineReflectiveSuite(() {
+    defineReflectiveTests(NullAwareInLogicalOperatorTest);
+  });
+}
+
+@reflectiveTest
+class NullAwareInLogicalOperatorTest extends DriverResolutionTest {
+  test_conditionalAnd_first() async {
+    await assertErrorsInCode(r'''
+m(x) {
+  x?.a && x.b;
+}
+''', [HintCode.NULL_AWARE_IN_LOGICAL_OPERATOR]);
+  }
+
+  test_conditionalAnd_second() async {
+    await assertErrorsInCode(r'''
+m(x) {
+  x.a && x?.b;
+}
+''', [HintCode.NULL_AWARE_IN_LOGICAL_OPERATOR]);
+  }
+
+  test_conditionalAnd_third() async {
+    await assertErrorsInCode(r'''
+m(x) {
+  x.a && x.b && x?.c;
+}
+''', [HintCode.NULL_AWARE_IN_LOGICAL_OPERATOR]);
+  }
+
+  test_conditionalOr_first() async {
+    await assertErrorsInCode(r'''
+m(x) {
+  x?.a || x.b;
+}
+''', [HintCode.NULL_AWARE_IN_LOGICAL_OPERATOR]);
+  }
+
+  test_conditionalOr_second() async {
+    await assertErrorsInCode(r'''
+m(x) {
+  x.a || x?.b;
+}
+''', [HintCode.NULL_AWARE_IN_LOGICAL_OPERATOR]);
+  }
+
+  test_conditionalOr_third() async {
+    await assertErrorsInCode(r'''
+m(x) {
+  x.a || x.b || x?.c;
+}
+''', [HintCode.NULL_AWARE_IN_LOGICAL_OPERATOR]);
+  }
+
+  test_not() async {
+    await assertErrorsInCode(r'''
+m(x) {
+  !x?.a;
+}
+''', [HintCode.NULL_AWARE_IN_LOGICAL_OPERATOR]);
+  }
+
+  test_for_noCondition() async {
+    await assertNoErrorsInCode(r'''
+m(x) {
+  for (var v = x; ; v++) {}
+}
+''');
+  }
+
+  test_if_notTopLevel() async {
+    await assertNoErrorsInCode(r'''
+m(x) {
+  if (x?.y == null) {}
+}
+''');
+  }
+}
diff --git a/pkg/analyzer/test/src/diagnostics/override_equals_but_not_hashcode_test.dart b/pkg/analyzer/test/src/diagnostics/override_equals_but_not_hashcode_test.dart
new file mode 100644
index 0000000..4a8a42c
--- /dev/null
+++ b/pkg/analyzer/test/src/diagnostics/override_equals_but_not_hashcode_test.dart
@@ -0,0 +1,34 @@
+// Copyright (c) 2019, the Dart project authors. Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+import 'package:analyzer/src/error/codes.dart';
+import 'package:analyzer/src/test_utilities/package_mixin.dart';
+import 'package:test_reflective_loader/test_reflective_loader.dart';
+
+import '../dart/resolution/driver_resolution.dart';
+
+main() {
+  defineReflectiveSuite(() {
+    defineReflectiveTests(OverrideEqualsButNotHashCodeTest);
+  });
+}
+
+@reflectiveTest
+class OverrideEqualsButNotHashCodeTest extends DriverResolutionTest {
+  @failingTest
+  test_overrideEquals_andNotHashCode() async {
+    await assertErrorsInCode(r'''
+class A {
+  bool operator ==(x) {}
+}''', [HintCode.OVERRIDE_EQUALS_BUT_NOT_HASH_CODE]);
+  }
+
+  test_overrideBoth() async {
+    await assertNoErrorsInCode(r'''
+class A {
+  bool operator ==(x) { return x; }
+  get hashCode => 0;
+}''');
+  }
+}
diff --git a/pkg/analyzer/test/src/diagnostics/override_on_non_overriding_field_test.dart b/pkg/analyzer/test/src/diagnostics/override_on_non_overriding_field_test.dart
new file mode 100644
index 0000000..3bd7122
--- /dev/null
+++ b/pkg/analyzer/test/src/diagnostics/override_on_non_overriding_field_test.dart
@@ -0,0 +1,62 @@
+// Copyright (c) 2019, the Dart project authors. Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+import 'package:analyzer/src/error/codes.dart';
+import 'package:analyzer/src/test_utilities/package_mixin.dart';
+import 'package:test_reflective_loader/test_reflective_loader.dart';
+
+import '../dart/resolution/driver_resolution.dart';
+
+main() {
+  defineReflectiveSuite(() {
+    defineReflectiveTests(OverrideOnNonOverridingFieldTest);
+  });
+}
+
+@reflectiveTest
+class OverrideOnNonOverridingFieldTest extends DriverResolutionTest {
+  test_invalid() async {
+    await assertErrorsInCode(r'''
+class A {
+}
+class B extends A {
+  @override
+  final int m = 1;
+}''', [HintCode.OVERRIDE_ON_NON_OVERRIDING_FIELD]);
+  }
+
+  test_inInterface() async {
+    await assertErrorsInCode(r'''
+class A {
+  int get a => 0;
+  void set b(_) {}
+  int c;
+}
+class B implements A {
+  @override
+  final int a = 1;
+  @override
+  int b;
+  @override
+  int c;
+}''', [CompileTimeErrorCode.INVALID_OVERRIDE]);
+  }
+
+  test_inSuperclass() async {
+    await assertErrorsInCode(r'''
+class A {
+  int get a => 0;
+  void set b(_) {}
+  int c;
+}
+class B extends A {
+  @override
+  final int a = 1;
+  @override
+  int b;
+  @override
+  int c;
+}''', [CompileTimeErrorCode.INVALID_OVERRIDE]);
+  }
+}
diff --git a/pkg/analyzer/test/src/diagnostics/override_on_non_overriding_getter_test.dart b/pkg/analyzer/test/src/diagnostics/override_on_non_overriding_getter_test.dart
new file mode 100644
index 0000000..7ccce0e
--- /dev/null
+++ b/pkg/analyzer/test/src/diagnostics/override_on_non_overriding_getter_test.dart
@@ -0,0 +1,50 @@
+// Copyright (c) 2019, the Dart project authors. Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+import 'package:analyzer/src/error/codes.dart';
+import 'package:analyzer/src/test_utilities/package_mixin.dart';
+import 'package:test_reflective_loader/test_reflective_loader.dart';
+
+import '../dart/resolution/driver_resolution.dart';
+
+main() {
+  defineReflectiveSuite(() {
+    defineReflectiveTests(OverrideOnNonOverridingGetterTest);
+  });
+}
+
+@reflectiveTest
+class OverrideOnNonOverridingGetterTest extends DriverResolutionTest {
+  test_invalid() async {
+    await assertErrorsInCode(r'''
+class A {
+}
+class B extends A {
+  @override
+  int get m => 1;
+}''', [HintCode.OVERRIDE_ON_NON_OVERRIDING_GETTER]);
+  }
+
+  test_inInterface() async {
+    await assertNoErrorsInCode(r'''
+class A {
+  int get m => 0;
+}
+class B implements A {
+  @override
+  int get m => 1;
+}''');
+  }
+
+  test_inSupertype() async {
+    await assertNoErrorsInCode(r'''
+class A {
+  int get m => 0;
+}
+class B extends A {
+  @override
+  int get m => 1;
+}''');
+  }
+}
diff --git a/pkg/analyzer/test/src/diagnostics/override_on_non_overriding_method_test.dart b/pkg/analyzer/test/src/diagnostics/override_on_non_overriding_method_test.dart
new file mode 100644
index 0000000..bc7f3f1
--- /dev/null
+++ b/pkg/analyzer/test/src/diagnostics/override_on_non_overriding_method_test.dart
@@ -0,0 +1,77 @@
+// Copyright (c) 2019, the Dart project authors. Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+import 'package:analyzer/src/error/codes.dart';
+import 'package:analyzer/src/test_utilities/package_mixin.dart';
+import 'package:test_reflective_loader/test_reflective_loader.dart';
+
+import '../dart/resolution/driver_resolution.dart';
+
+main() {
+  defineReflectiveSuite(() {
+    defineReflectiveTests(OverrideOnNonOverridingMethodTest);
+  });
+}
+
+@reflectiveTest
+class OverrideOnNonOverridingMethodTest extends DriverResolutionTest {
+  test_invalid() async {
+    await assertErrorsInCode(r'''
+class A {
+}
+class B extends A {
+  @override
+  int m() => 1;
+}''', [HintCode.OVERRIDE_ON_NON_OVERRIDING_METHOD]);
+  }
+
+  test_inInterface() async {
+    await assertNoErrorsInCode(r'''
+class A {
+  int m() => 1;
+}
+class B implements A {
+  @override
+  int m() => 1;
+}''');
+  }
+
+  test_inInterfaces() async {
+    await assertNoErrorsInCode(r'''
+abstract class I {
+  void foo(int _);
+}
+
+abstract class J {
+  void foo(String _);
+}
+
+class C implements I, J {
+  @override
+  void foo(Object _) {}
+}''');
+  }
+
+  test_inSuperclass() async {
+    await assertNoErrorsInCode(r'''
+class A {
+  int m() => 1;
+}
+class B extends A {
+  @override
+  int m() => 1;
+}''');
+  }
+
+  test_inSuperclass_abstract() async {
+    await assertNoErrorsInCode(r'''
+abstract class A {
+  int m();
+}
+class B extends A {
+  @override
+  int m() => 1;
+}''');
+  }
+}
diff --git a/pkg/analyzer/test/src/diagnostics/override_on_non_overriding_setter_test.dart b/pkg/analyzer/test/src/diagnostics/override_on_non_overriding_setter_test.dart
new file mode 100644
index 0000000..2cf04df
--- /dev/null
+++ b/pkg/analyzer/test/src/diagnostics/override_on_non_overriding_setter_test.dart
@@ -0,0 +1,50 @@
+// Copyright (c) 2019, the Dart project authors. Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+import 'package:analyzer/src/error/codes.dart';
+import 'package:analyzer/src/test_utilities/package_mixin.dart';
+import 'package:test_reflective_loader/test_reflective_loader.dart';
+
+import '../dart/resolution/driver_resolution.dart';
+
+main() {
+  defineReflectiveSuite(() {
+    defineReflectiveTests(OverrideOnNonOverridingSetterTest);
+  });
+}
+
+@reflectiveTest
+class OverrideOnNonOverridingSetterTest extends DriverResolutionTest {
+  test_invalid() async {
+    await assertErrorsInCode(r'''
+class A {
+}
+class B extends A {
+  @override
+  set m(int x) {}
+}''', [HintCode.OVERRIDE_ON_NON_OVERRIDING_SETTER]);
+  }
+
+  test_inInterface() async {
+    await assertNoErrorsInCode(r'''
+class A {
+  set m(int x) {}
+}
+class B implements A {
+  @override
+  set m(int x) {}
+}''');
+  }
+
+  test_inSupertype() async {
+    await assertNoErrorsInCode(r'''
+class A {
+  set m(int x) {}
+}
+class B extends A {
+  @override
+  set m(int x) {}
+}''');
+  }
+}
diff --git a/pkg/analyzer/test/src/diagnostics/sdk_constraint_verifier_support.dart b/pkg/analyzer/test/src/diagnostics/sdk_constraint_verifier_support.dart
new file mode 100644
index 0000000..0624d6a
--- /dev/null
+++ b/pkg/analyzer/test/src/diagnostics/sdk_constraint_verifier_support.dart
@@ -0,0 +1,22 @@
+// Copyright (c) 2018, the Dart project authors. Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+import 'package:analyzer/error/error.dart';
+import 'package:pub_semver/pub_semver.dart';
+
+import '../dart/resolution/driver_resolution.dart';
+
+/// A base class designed to be used by tests of the hints produced by the
+/// SdkConstraintVerifier.
+class SdkConstraintVerifierTest extends DriverResolutionTest {
+  /// Verify that the [errorCodes] are produced if the [source] is analyzed in
+  /// a context that specifies the minimum SDK version to be [version].
+  verifyVersion(String version, String source,
+      {List<ErrorCode> errorCodes}) async {
+    driver.configure(
+        analysisOptions: analysisOptions
+          ..sdkVersionConstraint = VersionConstraint.parse(version));
+    await assertErrorsInCode(source, errorCodes ?? []);
+  }
+}
diff --git a/pkg/analyzer/test/src/diagnostics/sdk_version_as_expression_in_const_context_test.dart b/pkg/analyzer/test/src/diagnostics/sdk_version_as_expression_in_const_context_test.dart
new file mode 100644
index 0000000..b63e481
--- /dev/null
+++ b/pkg/analyzer/test/src/diagnostics/sdk_version_as_expression_in_const_context_test.dart
@@ -0,0 +1,38 @@
+// Copyright (c) 2019, the Dart project authors. Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+import 'package:analyzer/src/dart/analysis/experiments.dart';
+import 'package:analyzer/src/error/codes.dart';
+import 'package:analyzer/src/generated/engine.dart';
+import 'package:test_reflective_loader/test_reflective_loader.dart';
+
+import 'sdk_constraint_verifier_support.dart';
+
+main() {
+  defineReflectiveSuite(() {
+    defineReflectiveTests(SdkVersionAsExpressionInConstContextTest);
+  });
+}
+
+@reflectiveTest
+class SdkVersionAsExpressionInConstContextTest
+    extends SdkConstraintVerifierTest {
+  @override
+  AnalysisOptionsImpl get analysisOptions => AnalysisOptionsImpl()
+    ..enabledExperiments = [EnableString.constant_update_2018];
+
+  test_equals() {
+    verifyVersion('2.2.2', '''
+const dynamic a = 2;
+const c = (a as int) + 2;
+''');
+  }
+
+  test_lessThan() {
+    verifyVersion('2.2.0', '''
+const dynamic a = 2;
+const c = (a as int) + 2;
+''', errorCodes: [HintCode.SDK_VERSION_AS_EXPRESSION_IN_CONST_CONTEXT]);
+  }
+}
diff --git a/pkg/analyzer/test/src/hint/sdk_version_async_exported_from_core_test.dart b/pkg/analyzer/test/src/diagnostics/sdk_version_async_exported_from_core_test.dart
similarity index 94%
rename from pkg/analyzer/test/src/hint/sdk_version_async_exported_from_core_test.dart
rename to pkg/analyzer/test/src/diagnostics/sdk_version_async_exported_from_core_test.dart
index a9f42b6..7e04d6d 100644
--- a/pkg/analyzer/test/src/hint/sdk_version_async_exported_from_core_test.dart
+++ b/pkg/analyzer/test/src/diagnostics/sdk_version_async_exported_from_core_test.dart
@@ -5,7 +5,7 @@
 import 'package:analyzer/src/dart/error/hint_codes.dart';
 import 'package:test_reflective_loader/test_reflective_loader.dart';
 
-import 'sdk_constraint_verifier.dart';
+import 'sdk_constraint_verifier_support.dart';
 
 main() {
   defineReflectiveSuite(() {
@@ -32,7 +32,7 @@
   }
 
   test_equals_explicitImportOfExportingLibrary() async {
-    addNamedSource('/exporter.dart', '''
+    newFile('/test/lib/exporter.dart', content: '''
 export 'dart:async';
 ''');
     await verifyVersion('2.1.0', '''
@@ -76,7 +76,7 @@
   }
 
   test_lessThan_explicitImportOfExportingLibrary() async {
-    addNamedSource('/exporter.dart', '''
+    newFile('/test/lib/exporter.dart', content: '''
 export 'dart:async';
 ''');
     await verifyVersion('2.0.0', '''
diff --git a/pkg/analyzer/test/src/diagnostics/sdk_version_bool_operator_test.dart b/pkg/analyzer/test/src/diagnostics/sdk_version_bool_operator_test.dart
new file mode 100644
index 0000000..1b16612
--- /dev/null
+++ b/pkg/analyzer/test/src/diagnostics/sdk_version_bool_operator_test.dart
@@ -0,0 +1,95 @@
+// Copyright (c) 2019, the Dart project authors. Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+import 'package:analyzer/src/dart/analysis/experiments.dart';
+import 'package:analyzer/src/error/codes.dart';
+import 'package:analyzer/src/generated/engine.dart';
+import 'package:test_reflective_loader/test_reflective_loader.dart';
+
+import 'sdk_constraint_verifier_support.dart';
+
+main() {
+  defineReflectiveSuite(() {
+    defineReflectiveTests(SdkVersionBoolOperatorTest);
+  });
+}
+
+@reflectiveTest
+class SdkVersionBoolOperatorTest extends SdkConstraintVerifierTest {
+  @override
+  AnalysisOptionsImpl get analysisOptions => AnalysisOptionsImpl()
+    ..enabledExperiments = [EnableString.constant_update_2018];
+
+  test_and_const_equals() {
+    verifyVersion('2.2.2', '''
+const c = true & false;
+''');
+  }
+
+  test_and_const_lessThan() {
+    verifyVersion('2.2.0', '''
+const c = true & false;
+''', errorCodes: [HintCode.SDK_VERSION_BOOL_OPERATOR]);
+  }
+
+  test_and_nonConst_equals() {
+    verifyVersion('2.2.2', '''
+var c = true & false;
+''');
+  }
+
+  test_and_nonConst_lessThan() {
+    verifyVersion('2.2.0', '''
+var c = true & false;
+''');
+  }
+
+  test_or_const_equals() {
+    verifyVersion('2.2.2', '''
+const c = true | false;
+''');
+  }
+
+  test_or_const_lessThan() {
+    verifyVersion('2.2.0', '''
+const c = true | false;
+''', errorCodes: [HintCode.SDK_VERSION_BOOL_OPERATOR]);
+  }
+
+  test_or_nonConst_equals() {
+    verifyVersion('2.2.2', '''
+var c = true | false;
+''');
+  }
+
+  test_or_nonConst_lessThan() {
+    verifyVersion('2.2.0', '''
+var c = true | false;
+''');
+  }
+
+  test_xor_const_equals() {
+    verifyVersion('2.2.2', '''
+const c = true ^ false;
+''');
+  }
+
+  test_xor_const_lessThan() {
+    verifyVersion('2.2.0', '''
+const c = true ^ false;
+''', errorCodes: [HintCode.SDK_VERSION_BOOL_OPERATOR]);
+  }
+
+  test_xor_nonConst_equals() {
+    verifyVersion('2.2.2', '''
+var c = true ^ false;
+''');
+  }
+
+  test_xor_nonConst_lessThan() {
+    verifyVersion('2.2.0', '''
+var c = true ^ false;
+''');
+  }
+}
diff --git a/pkg/analyzer/test/src/diagnostics/sdk_version_eq_eq_operator_test.dart b/pkg/analyzer/test/src/diagnostics/sdk_version_eq_eq_operator_test.dart
new file mode 100644
index 0000000..3d6b6ca
--- /dev/null
+++ b/pkg/analyzer/test/src/diagnostics/sdk_version_eq_eq_operator_test.dart
@@ -0,0 +1,63 @@
+// Copyright (c) 2019, the Dart project authors. Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+import 'package:analyzer/src/dart/analysis/experiments.dart';
+import 'package:analyzer/src/error/codes.dart';
+import 'package:analyzer/src/generated/engine.dart';
+import 'package:test_reflective_loader/test_reflective_loader.dart';
+
+import 'sdk_constraint_verifier_support.dart';
+
+main() {
+  defineReflectiveSuite(() {
+    defineReflectiveTests(SdkVersionEqEqOperatorTest);
+  });
+}
+
+@reflectiveTest
+class SdkVersionEqEqOperatorTest extends SdkConstraintVerifierTest {
+  @override
+  AnalysisOptionsImpl get analysisOptions => AnalysisOptionsImpl()
+    ..enabledExperiments = [EnableString.constant_update_2018];
+
+  test_left_equals() {
+    verifyVersion('2.2.2', '''
+class A {
+  const A();
+}
+const A a = A();
+const c = a == null;
+''');
+  }
+
+  test_left_lessThan() {
+    verifyVersion('2.2.0', '''
+class A {
+  const A();
+}
+const A a = A();
+const c = a == null;
+''', errorCodes: [HintCode.SDK_VERSION_EQ_EQ_OPERATOR_IN_CONST_CONTEXT]);
+  }
+
+  test_right_equals() {
+    verifyVersion('2.2.2', '''
+class A {
+  const A();
+}
+const A a = A();
+const c = null == a;
+''');
+  }
+
+  test_right_lessThan() {
+    verifyVersion('2.2.0', '''
+class A {
+  const A();
+}
+const A a = A();
+const c = null == a;
+''', errorCodes: [HintCode.SDK_VERSION_EQ_EQ_OPERATOR_IN_CONST_CONTEXT]);
+  }
+}
diff --git a/pkg/analyzer/test/src/diagnostics/sdk_version_gt_gt_gt_operator_test.dart b/pkg/analyzer/test/src/diagnostics/sdk_version_gt_gt_gt_operator_test.dart
new file mode 100644
index 0000000..5e5f140
--- /dev/null
+++ b/pkg/analyzer/test/src/diagnostics/sdk_version_gt_gt_gt_operator_test.dart
@@ -0,0 +1,77 @@
+// Copyright (c) 2019, the Dart project authors. Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+import 'package:analyzer/src/dart/analysis/experiments.dart';
+import 'package:analyzer/src/error/codes.dart';
+import 'package:analyzer/src/generated/engine.dart';
+import 'package:test_reflective_loader/test_reflective_loader.dart';
+
+import 'sdk_constraint_verifier_support.dart';
+
+main() {
+  defineReflectiveSuite(() {
+    defineReflectiveTests(SdkVersionGtGtGtOperatorTest);
+  });
+}
+
+@reflectiveTest
+class SdkVersionGtGtGtOperatorTest extends SdkConstraintVerifierTest {
+  @override
+  AnalysisOptionsImpl get analysisOptions =>
+      AnalysisOptionsImpl()..enabledExperiments = [EnableString.triple_shift];
+
+  test_const_equals() {
+    // TODO(brianwilkerson) Add '>>>' to MockSdk and remove the code
+    //  UNDEFINED_OPERATOR when triple_shift is enabled by default.
+    verifyVersion('2.2.2', '''
+const a = 42 >>> 3;
+''', errorCodes: [StaticTypeWarningCode.UNDEFINED_OPERATOR]);
+  }
+
+  test_const_lessThan() {
+    // TODO(brianwilkerson) Add '>>>' to MockSdk and remove the code
+    //  UNDEFINED_OPERATOR when triple_shift is enabled by default.
+    verifyVersion('2.2.0', '''
+const a = 42 >>> 3;
+''', errorCodes: [
+      StaticTypeWarningCode.UNDEFINED_OPERATOR,
+      HintCode.SDK_VERSION_GT_GT_GT_OPERATOR
+    ]);
+  }
+
+  test_declaration_equals() {
+    verifyVersion('2.2.2', '''
+class A {
+  A operator >>>(A a) => this;
+}
+''');
+  }
+
+  test_declaration_lessThan() {
+    verifyVersion('2.2.0', '''
+class A {
+  A operator >>>(A a) => this;
+}
+''', errorCodes: [HintCode.SDK_VERSION_GT_GT_GT_OPERATOR]);
+  }
+
+  test_nonConst_equals() {
+    // TODO(brianwilkerson) Add '>>>' to MockSdk and remove the code
+    //  UNDEFINED_OPERATOR when constant update is enabled by default.
+    verifyVersion('2.2.2', '''
+var a = 42 >>> 3;
+''', errorCodes: [StaticTypeWarningCode.UNDEFINED_OPERATOR]);
+  }
+
+  test_nonConst_lessThan() {
+    // TODO(brianwilkerson) Add '>>>' to MockSdk and remove the code
+    //  UNDEFINED_OPERATOR when constant update is enabled by default.
+    verifyVersion('2.2.0', '''
+var a = 42 >>> 3;
+''', errorCodes: [
+      StaticTypeWarningCode.UNDEFINED_OPERATOR,
+      HintCode.SDK_VERSION_GT_GT_GT_OPERATOR
+    ]);
+  }
+}
diff --git a/pkg/analyzer/test/src/diagnostics/sdk_version_is_expression_in_const_context_test.dart b/pkg/analyzer/test/src/diagnostics/sdk_version_is_expression_in_const_context_test.dart
new file mode 100644
index 0000000..70778cf
--- /dev/null
+++ b/pkg/analyzer/test/src/diagnostics/sdk_version_is_expression_in_const_context_test.dart
@@ -0,0 +1,38 @@
+// Copyright (c) 2019, the Dart project authors. Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+import 'package:analyzer/src/dart/analysis/experiments.dart';
+import 'package:analyzer/src/error/codes.dart';
+import 'package:analyzer/src/generated/engine.dart';
+import 'package:test_reflective_loader/test_reflective_loader.dart';
+
+import 'sdk_constraint_verifier_support.dart';
+
+main() {
+  defineReflectiveSuite(() {
+    defineReflectiveTests(SdkVersionIsExpressionInConstContextTest);
+  });
+}
+
+@reflectiveTest
+class SdkVersionIsExpressionInConstContextTest
+    extends SdkConstraintVerifierTest {
+  @override
+  AnalysisOptionsImpl get analysisOptions => AnalysisOptionsImpl()
+    ..enabledExperiments = [EnableString.constant_update_2018];
+
+  test_equals() {
+    verifyVersion('2.2.2', '''
+const dynamic a = 2;
+const c = a is int;
+''');
+  }
+
+  test_lessThan() {
+    verifyVersion('2.2.0', '''
+const dynamic a = 2;
+const c = a is int;
+''', errorCodes: [HintCode.SDK_VERSION_IS_EXPRESSION_IN_CONST_CONTEXT]);
+  }
+}
diff --git a/pkg/analyzer/test/src/diagnostics/sdk_version_set_literal_test.dart b/pkg/analyzer/test/src/diagnostics/sdk_version_set_literal_test.dart
new file mode 100644
index 0000000..4a7b294
--- /dev/null
+++ b/pkg/analyzer/test/src/diagnostics/sdk_version_set_literal_test.dart
@@ -0,0 +1,35 @@
+// Copyright (c) 2018, the Dart project authors. Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+import 'package:analyzer/src/dart/error/hint_codes.dart';
+import 'package:test_reflective_loader/test_reflective_loader.dart';
+
+import 'sdk_constraint_verifier_support.dart';
+
+main() {
+  defineReflectiveSuite(() {
+    defineReflectiveTests(SdkVersionSetLiteralTest);
+  });
+}
+
+@reflectiveTest
+class SdkVersionSetLiteralTest extends SdkConstraintVerifierTest {
+  test_equals() async {
+    await verifyVersion('2.2.0', '''
+Set<int> zero() => <int>{0};
+''');
+  }
+
+  test_greaterThan() async {
+    await verifyVersion('2.3.0', '''
+Set<int> zero() => <int>{0};
+''');
+  }
+
+  test_lessThan() async {
+    await verifyVersion('2.1.0', '''
+Set<int> zero() => <int>{0};
+''', errorCodes: [HintCode.SDK_VERSION_SET_LITERAL]);
+  }
+}
diff --git a/pkg/analyzer/test/src/diagnostics/sdk_version_ui_as_code_test.dart b/pkg/analyzer/test/src/diagnostics/sdk_version_ui_as_code_test.dart
new file mode 100644
index 0000000..d14a9a2
--- /dev/null
+++ b/pkg/analyzer/test/src/diagnostics/sdk_version_ui_as_code_test.dart
@@ -0,0 +1,44 @@
+// Copyright (c) 2018, the Dart project authors. Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+import 'package:analyzer/src/dart/analysis/experiments.dart';
+import 'package:analyzer/src/dart/error/hint_codes.dart';
+import 'package:analyzer/src/generated/engine.dart';
+import 'package:test_reflective_loader/test_reflective_loader.dart';
+
+import 'sdk_constraint_verifier_support.dart';
+
+main() {
+  defineReflectiveSuite(() {
+    defineReflectiveTests(SdkVersionUiAsCodeTest);
+  });
+}
+
+@reflectiveTest
+class SdkVersionUiAsCodeTest extends SdkConstraintVerifierTest {
+  @override
+  AnalysisOptionsImpl get analysisOptions => AnalysisOptionsImpl()
+    ..enabledExperiments = [
+      EnableString.control_flow_collections,
+      EnableString.spread_collections
+    ];
+
+  test_equals() async {
+    await verifyVersion('2.2.2', '''
+List<int> zero() => [for (var e in [0]) e];
+''');
+  }
+
+  test_greaterThan() async {
+    await verifyVersion('2.3.0', '''
+List<int> zero() => [...[0]];
+''');
+  }
+
+  test_lessThan() async {
+    await verifyVersion('2.2.1', '''
+List<int> zero() => [if (0 < 1) 0];
+''', errorCodes: [HintCode.SDK_VERSION_UI_AS_CODE]);
+  }
+}
diff --git a/pkg/analyzer/test/src/diagnostics/set_element_type_not_assignable_test.dart b/pkg/analyzer/test/src/diagnostics/set_element_type_not_assignable_test.dart
index 10364de..1296385 100644
--- a/pkg/analyzer/test/src/diagnostics/set_element_type_not_assignable_test.dart
+++ b/pkg/analyzer/test/src/diagnostics/set_element_type_not_assignable_test.dart
@@ -30,12 +30,11 @@
 ''');
   }
 
-  @FailingTest(issue: 'https://github.com/dart-lang/sdk/issues/21119')
   test_explicitTypeArgs_const_actualTypeMismatch() async {
     await assertErrorsInCode('''
 const dynamic x = 42;
 var v = const <String>{x};
-''', [CheckedModeCompileTimeErrorCode.SET_ELEMENT_TYPE_NOT_ASSIGNABLE]);
+''', [StaticWarningCode.SET_ELEMENT_TYPE_NOT_ASSIGNABLE]);
   }
 
   test_explicitTypeArgs_notConst() async {
diff --git a/pkg/analyzer/test/src/diagnostics/test_all.dart b/pkg/analyzer/test/src/diagnostics/test_all.dart
index f1f3b5f..8de2941 100644
--- a/pkg/analyzer/test/src/diagnostics/test_all.dart
+++ b/pkg/analyzer/test/src/diagnostics/test_all.dart
@@ -6,6 +6,8 @@
 
 import 'ambiguous_set_or_map_literal_test.dart' as ambiguous_set_or_map_literal;
 import 'argument_type_not_assignable_test.dart' as argument_type_not_assignable;
+import 'async_keyword_used_as_identifier_test.dart'
+    as async_keyword_used_as_identifier;
 import 'can_be_null_after_null_aware_test.dart' as can_be_null_after_null_aware;
 import 'const_constructor_param_type_mismatch_test.dart'
     as const_constructor_param_type_mismatch;
@@ -22,8 +24,12 @@
 import 'dead_code_test.dart' as dead_code;
 import 'deprecated_member_use_test.dart' as deprecated_member_use;
 import 'division_optimization_test.dart' as division_optimization;
-import 'equal_keys_in_map_test.dart' as equal_keys_in_map;
+import 'duplicate_import_test.dart' as duplicate_import;
+import 'equal_elements_in_const_set_test.dart' as equal_elements_in_const_set;
+import 'equal_keys_in_const_map_test.dart' as equal_keys_in_const_map;
 import 'expression_in_map_test.dart' as expression_in_map;
+import 'import_deferred_library_with_load_function_test.dart'
+    as import_deferred_library_with_load_function;
 import 'invalid_assignment_test.dart' as invalid_assignment;
 import 'invalid_cast_new_expr_test.dart' as invalid_cast_new_expr;
 import 'invalid_immutable_annotation_test.dart' as invalid_immutable_annotation;
@@ -47,11 +53,51 @@
 import 'must_be_immutable_test.dart' as must_be_immutable;
 import 'must_call_super_test.dart' as must_call_super;
 import 'non_bool_condition_test.dart' as non_bool_condition;
+import 'non_constant_if_element_condition_from_deferred_library_test.dart'
+    as non_constant_if_element_condition_from_deferred_library;
+import 'non_constant_list_element_from_deferred_library_test.dart'
+    as non_constant_list_element_from_deferred_library;
 import 'non_constant_list_element_test.dart' as non_constant_list_element;
 import 'non_constant_map_element_test.dart' as non_constant_map_element;
+import 'non_constant_map_key_from_deferred_library_test.dart'
+    as non_constant_map_key_from_deferred_library;
+import 'non_constant_map_key_test.dart' as non_constant_map_key;
+import 'non_constant_map_value_from_deferred_library_test.dart'
+    as non_constant_map_value_from_deferred_library;
+import 'non_constant_map_value_test.dart' as non_constant_map_value;
+import 'non_constant_set_element_from_deferred_library_test.dart'
+    as non_constant_set_element_from_deferred_library;
 import 'non_constant_set_element_test.dart' as non_constant_set_element;
+import 'non_constant_spread_expression_from_deferred_library_test.dart'
+    as non_constant_spread_expression_from_deferred_library;
 import 'not_iterable_spread_test.dart' as not_iterable_spread;
 import 'not_map_spread_test.dart' as not_map_spread;
+import 'null_aware_before_operator_test.dart' as null_aware_before_operator;
+import 'null_aware_in_condition_test.dart' as null_aware_in_condition;
+import 'null_aware_in_logical_operator_test.dart'
+    as null_aware_in_logical_operator;
+import 'override_equals_but_not_hashcode_test.dart'
+    as override_equals_but_not_hashcode;
+import 'override_on_non_overriding_field_test.dart'
+    as override_on_non_overriding_field;
+import 'override_on_non_overriding_getter_test.dart'
+    as override_on_non_overriding_getter;
+import 'override_on_non_overriding_method_test.dart'
+    as override_on_non_overriding_method;
+import 'override_on_non_overriding_setter_test.dart'
+    as override_on_non_overriding_setter;
+import 'sdk_version_as_expression_in_const_context_test.dart'
+    as sdk_version_as_expression_in_const_context;
+import 'sdk_version_async_exported_from_core_test.dart'
+    as sdk_version_async_exported_from_core;
+import 'sdk_version_bool_operator_test.dart' as sdk_version_bool_operator;
+import 'sdk_version_eq_eq_operator_test.dart' as sdk_version_eq_eq_operator;
+import 'sdk_version_gt_gt_gt_operator_test.dart'
+    as sdk_version_gt_gt_gt_operator;
+import 'sdk_version_is_expression_in_const_context_test.dart'
+    as sdk_version_is_expression_in_const_context;
+import 'sdk_version_set_literal_test.dart' as sdk_version_set_literal;
+import 'sdk_version_ui_as_code_test.dart' as sdk_version_ui_as_code;
 import 'set_element_type_not_assignable_test.dart'
     as set_element_type_not_assignable;
 import 'subtype_of_sealed_class_test.dart' as subtype_of_sealed_class;
@@ -63,6 +109,7 @@
     as unchecked_use_of_nullable_value;
 import 'undefined_getter_test.dart' as undefined_getter;
 import 'undefined_hidden_name_test.dart' as undefined_hidden_name;
+import 'undefined_identifier_test.dart' as undefined_identifier;
 import 'undefined_operator_test.dart' as undefined_operator;
 import 'undefined_prefixed_name_test.dart' as undefined_prefixed_name;
 import 'undefined_setter_test.dart' as undefined_setter;
@@ -87,6 +134,7 @@
   defineReflectiveSuite(() {
     ambiguous_set_or_map_literal.main();
     argument_type_not_assignable.main();
+    async_keyword_used_as_identifier.main();
     can_be_null_after_null_aware.main();
     const_constructor_param_type_mismatch.main();
     const_constructor_with_mixin_with_field.main();
@@ -98,8 +146,11 @@
     dead_code.main();
     deprecated_member_use.main();
     division_optimization.main();
-    equal_keys_in_map.main();
+    duplicate_import.main();
+    equal_elements_in_const_set.main();
+    equal_keys_in_const_map.main();
     expression_in_map.main();
+    import_deferred_library_with_load_function.main();
     invalid_assignment.main();
     invalid_cast_new_expr.main();
     invalid_immutable_annotation.main();
@@ -118,11 +169,35 @@
     must_be_immutable.main();
     must_call_super.main();
     non_bool_condition.main();
+    non_constant_if_element_condition_from_deferred_library.main();
     non_constant_list_element.main();
+    non_constant_list_element_from_deferred_library.main();
+    non_constant_map_key.main();
+    non_constant_map_key_from_deferred_library.main();
     non_constant_map_element.main();
+    non_constant_map_value.main();
+    non_constant_map_value_from_deferred_library.main();
     non_constant_set_element.main();
+    non_constant_set_element_from_deferred_library.main();
+    non_constant_spread_expression_from_deferred_library.main();
     not_iterable_spread.main();
     not_map_spread.main();
+    null_aware_before_operator.main();
+    null_aware_in_condition.main();
+    null_aware_in_logical_operator.main();
+    override_equals_but_not_hashcode.main();
+    override_on_non_overriding_field.main();
+    override_on_non_overriding_getter.main();
+    override_on_non_overriding_method.main();
+    override_on_non_overriding_setter.main();
+    sdk_version_as_expression_in_const_context.main();
+    sdk_version_async_exported_from_core.main();
+    sdk_version_bool_operator.main();
+    sdk_version_eq_eq_operator.main();
+    sdk_version_gt_gt_gt_operator.main();
+    sdk_version_is_expression_in_const_context.main();
+    sdk_version_set_literal.main();
+    sdk_version_ui_as_code.main();
     set_element_type_not_assignable.main();
     subtype_of_sealed_class.main();
     top_level_instance_getter.main();
@@ -131,6 +206,7 @@
     type_check_is_null.main();
     unchecked_use_of_nullable_value.main();
     undefined_getter.main();
+    undefined_identifier.main();
     undefined_hidden_name.main();
     undefined_operator.main();
     undefined_prefixed_name.main();
diff --git a/pkg/analyzer/test/src/diagnostics/undefined_identifier_test.dart b/pkg/analyzer/test/src/diagnostics/undefined_identifier_test.dart
new file mode 100644
index 0000000..2df536e
--- /dev/null
+++ b/pkg/analyzer/test/src/diagnostics/undefined_identifier_test.dart
@@ -0,0 +1,63 @@
+// Copyright (c) 2019, the Dart project authors. Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+import 'package:analyzer/src/dart/analysis/experiments.dart';
+import 'package:analyzer/src/error/codes.dart';
+import 'package:analyzer/src/generated/engine.dart';
+import 'package:test_reflective_loader/test_reflective_loader.dart';
+
+import '../dart/resolution/driver_resolution.dart';
+
+main() {
+  defineReflectiveSuite(() {
+    defineReflectiveTests(UndefinedIdentifierTest);
+    defineReflectiveTests(UndefinedIdentifierWithControlFlowCollectionsTest);
+  });
+}
+
+@reflectiveTest
+class UndefinedIdentifierTest extends DriverResolutionTest {
+  test_forStatement_inBody() async {
+    await assertNoErrorsInCode('''
+f() {
+  for (int x in []) {
+    x;
+  }
+}
+''');
+  }
+
+  test_forStatement_outsideBody() async {
+    await assertErrorsInCode('''
+f() {
+  for (int x in []) {}
+  x;
+}
+''', [StaticWarningCode.UNDEFINED_IDENTIFIER]);
+  }
+}
+
+@reflectiveTest
+class UndefinedIdentifierWithControlFlowCollectionsTest
+    extends DriverResolutionTest {
+  @override
+  AnalysisOptionsImpl get analysisOptions => AnalysisOptionsImpl()
+    ..enabledExperiments = [EnableString.control_flow_collections];
+
+  test_forElement_inList_insideElement() async {
+    await assertNoErrorsInCode('''
+f(Object x) {
+  return [for(int x in []) x, null];
+}
+''');
+  }
+
+  test_forElement_inList_outsideElement() async {
+    await assertErrorsInCode('''
+f() {
+  return [for (int x in []) null, x];
+}
+''', [StaticWarningCode.UNDEFINED_IDENTIFIER]);
+  }
+}
diff --git a/pkg/analyzer/test/src/diagnostics/unnecessary_null_aware_call_test.dart b/pkg/analyzer/test/src/diagnostics/unnecessary_null_aware_call_test.dart
index 49c7eb1..6ca3733 100644
--- a/pkg/analyzer/test/src/diagnostics/unnecessary_null_aware_call_test.dart
+++ b/pkg/analyzer/test/src/diagnostics/unnecessary_null_aware_call_test.dart
@@ -10,18 +10,15 @@
 
 main() {
   defineReflectiveSuite(() {
-    defineReflectiveTests(UnnecesaryNullAwareCallTest);
+    defineReflectiveTests(UnnecessaryNullAwareCallTest);
   });
 }
 
 @reflectiveTest
-class UnnecesaryNullAwareCallTest extends ResolverTestCase {
+class UnnecessaryNullAwareCallTest extends ResolverTestCase {
   @override
   List<String> get enabledExperiments => [EnableString.non_nullable];
 
-  @override
-  bool get enableNewAnalysisDriver => true;
-
   test_getter_parenthesized_nonNull() async {
     await assertErrorsInCode('''
 @pragma('analyzer:non-nullable')
diff --git a/pkg/analyzer/test/src/hint/sdk_constraint_verifier.dart b/pkg/analyzer/test/src/hint/sdk_constraint_verifier.dart
deleted file mode 100644
index ad910f0..0000000
--- a/pkg/analyzer/test/src/hint/sdk_constraint_verifier.dart
+++ /dev/null
@@ -1,32 +0,0 @@
-// Copyright (c) 2018, the Dart project authors. Please see the AUTHORS file
-// for details. All rights reserved. Use of this source code is governed by a
-// BSD-style license that can be found in the LICENSE file.
-
-import 'package:analyzer/error/error.dart';
-import 'package:analyzer/src/generated/engine.dart' show AnalysisOptionsImpl;
-import 'package:pub_semver/pub_semver.dart';
-
-import '../../generated/resolver_test_case.dart';
-import '../../generated/test_support.dart';
-
-/// A base class designed to be used by tests of the hints produced by an
-/// SdkConstraintVerifier.
-class SdkConstraintVerifierTest extends ResolverTestCase {
-  bool get enableNewAnalysisDriver => true;
-
-  verifyVersion(String version, String source,
-      {List<ErrorCode> errorCodes}) async {
-    driver.configure(
-        analysisOptions: AnalysisOptionsImpl()
-          ..sdkVersionConstraint = VersionConstraint.parse(version));
-
-    TestAnalysisResult result = await computeTestAnalysisResult(source);
-    GatheringErrorListener listener = new GatheringErrorListener();
-    listener.addAll(result.errors);
-    if (errorCodes == null) {
-      listener.assertNoErrors();
-    } else {
-      listener.assertErrorsWithCodes(errorCodes);
-    }
-  }
-}
diff --git a/pkg/analyzer/test/src/hint/test_all.dart b/pkg/analyzer/test/src/hint/test_all.dart
index 0234ba4..0933671 100644
--- a/pkg/analyzer/test/src/hint/test_all.dart
+++ b/pkg/analyzer/test/src/hint/test_all.dart
@@ -5,12 +5,9 @@
 import 'package:test_reflective_loader/test_reflective_loader.dart';
 
 import 'sdk_constraint_extractor_test.dart' as sdk_constraint_extractor;
-import 'sdk_version_async_exported_from_core_test.dart'
-    as sdk_version_async_exported_from_core;
 
 main() {
   defineReflectiveSuite(() {
     sdk_constraint_extractor.main();
-    sdk_version_async_exported_from_core.main();
   }, name: 'hint');
 }
diff --git a/pkg/analyzer/test/src/lint/config_test.dart b/pkg/analyzer/test/src/lint/config_test.dart
index 2b44f9b..bd39e89 100644
--- a/pkg/analyzer/test/src/lint/config_test.dart
+++ b/pkg/analyzer/test/src/lint/config_test.dart
@@ -1,4 +1,4 @@
-// Copyright (c) 2015, the Dart project authors.  Please see the AUTHORS file
+// Copyright (c) 2015, the Dart project authors. Please see the AUTHORS file
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
 
diff --git a/pkg/analyzer/test/src/lint/io_test.dart b/pkg/analyzer/test/src/lint/io_test.dart
index 3a377f0..e92b940 100644
--- a/pkg/analyzer/test/src/lint/io_test.dart
+++ b/pkg/analyzer/test/src/lint/io_test.dart
@@ -1,4 +1,4 @@
-// Copyright (c) 2015, the Dart project authors.  Please see the AUTHORS file
+// Copyright (c) 2015, the Dart project authors. Please see the AUTHORS file
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
 
diff --git a/pkg/analyzer/test/src/lint/linter/linter_context_impl_test.dart b/pkg/analyzer/test/src/lint/linter/linter_context_impl_test.dart
index c8aed44..4c9693a 100644
--- a/pkg/analyzer/test/src/lint/linter/linter_context_impl_test.dart
+++ b/pkg/analyzer/test/src/lint/linter/linter_context_impl_test.dart
@@ -26,8 +26,6 @@
   CompilationUnitImpl testUnit;
   LinterContextImpl context;
 
-  bool get enableNewAnalysisDriver => true;
-
   void assertCanBeConst(String snippet, bool expectedResult) {
     int index = testSource.indexOf(snippet);
     expect(index >= 0, isTrue);
diff --git a/pkg/analyzer/test/src/lint/project_test.dart b/pkg/analyzer/test/src/lint/project_test.dart
index 5dcaa89..1c67dfb 100644
--- a/pkg/analyzer/test/src/lint/project_test.dart
+++ b/pkg/analyzer/test/src/lint/project_test.dart
@@ -1,4 +1,4 @@
-// Copyright (c) 2015, the Dart project authors.  Please see the AUTHORS file
+// Copyright (c) 2015, the Dart project authors. Please see the AUTHORS file
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
 
diff --git a/pkg/analyzer/test/src/lint/pub_test.dart b/pkg/analyzer/test/src/lint/pub_test.dart
index aa3412e..ea778f3 100644
--- a/pkg/analyzer/test/src/lint/pub_test.dart
+++ b/pkg/analyzer/test/src/lint/pub_test.dart
@@ -1,4 +1,4 @@
-// Copyright (c) 2015, the Dart project authors.  Please see the AUTHORS file
+// Copyright (c) 2015, the Dart project authors. Please see the AUTHORS file
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
 
diff --git a/pkg/analyzer/test/src/options/options_rule_validator_test.dart b/pkg/analyzer/test/src/options/options_rule_validator_test.dart
index 5150828..c4aa442 100644
--- a/pkg/analyzer/test/src/options/options_rule_validator_test.dart
+++ b/pkg/analyzer/test/src/options/options_rule_validator_test.dart
@@ -1,4 +1,4 @@
-// Copyright (c) 2018, the Dart project authors.  Please see the AUTHORS file
+// Copyright (c) 2018, the Dart project authors. Please see the AUTHORS file
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
 
diff --git a/pkg/analyzer/test/src/options/test_all.dart b/pkg/analyzer/test/src/options/test_all.dart
index e38e167..4d8d6a6 100644
--- a/pkg/analyzer/test/src/options/test_all.dart
+++ b/pkg/analyzer/test/src/options/test_all.dart
@@ -1,4 +1,4 @@
-// Copyright (c) 2018, the Dart project authors.  Please see the AUTHORS file
+// Copyright (c) 2018, the Dart project authors. Please see the AUTHORS file
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
 
diff --git a/pkg/analyzer/test/src/pubspec/test_all.dart b/pkg/analyzer/test/src/pubspec/test_all.dart
index a7e7ebe..c4aa6ea 100644
--- a/pkg/analyzer/test/src/pubspec/test_all.dart
+++ b/pkg/analyzer/test/src/pubspec/test_all.dart
@@ -1,4 +1,4 @@
-// Copyright (c) 2017, the Dart project authors.  Please see the AUTHORS file
+// Copyright (c) 2017, the Dart project authors. Please see the AUTHORS file
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
 
diff --git a/pkg/analyzer/test/src/services/available_declarations_test.dart b/pkg/analyzer/test/src/services/available_declarations_test.dart
index e82719f..8045e44 100644
--- a/pkg/analyzer/test/src/services/available_declarations_test.dart
+++ b/pkg/analyzer/test/src/services/available_declarations_test.dart
@@ -1,11 +1,13 @@
-// Copyright (c) 2019, the Dart project authors.  Please see the AUTHORS file
+// Copyright (c) 2019, the Dart project authors. Please see the AUTHORS file
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
 
 import 'package:analyzer/dart/analysis/analysis_context.dart';
 import 'package:analyzer/dart/analysis/analysis_context_collection.dart';
+import 'package:analyzer/file_system/file_system.dart';
 import 'package:analyzer/src/dart/analysis/analysis_context_collection.dart';
 import 'package:analyzer/src/dart/analysis/byte_store.dart';
+import 'package:analyzer/src/dart/analysis/driver_based_analysis_context.dart';
 import 'package:analyzer/src/services/available_declarations.dart';
 import 'package:analyzer/src/test_utilities/mock_sdk.dart';
 import 'package:analyzer/src/test_utilities/resource_provider_mixin.dart';
@@ -17,6 +19,7 @@
   defineReflectiveSuite(() {
     defineReflectiveTests(AvailableDeclarationsTest);
     defineReflectiveTests(ChangeFileTest);
+    defineReflectiveTests(DartdocInfoTest);
     defineReflectiveTests(DeclarationTest);
     defineReflectiveTests(ExportTest);
     defineReflectiveTests(GetLibrariesTest);
@@ -790,6 +793,36 @@
 }
 
 @reflectiveTest
+class DartdocInfoTest extends _Base {
+  test_samePackage() async {
+    File file = newFile('/home/aaa/lib/definition.dart', content: '''
+/// {@template foo}
+/// Body of the template.
+/// {@endtemplate}
+class A {}
+''');
+
+    createAnalysisContexts();
+
+    DriverBasedAnalysisContext context =
+        analysisContextCollection.contextFor(file.path);
+
+    tracker.addContext(context);
+    await _doAllTrackerWork();
+
+    String result =
+        tracker.getContext(context).dartdocDirectiveInfo.processDartdoc('''
+/// Before macro.
+/// {@macro foo}
+/// After macro.''');
+    expect(result, '''
+Before macro.
+Body of the template.
+After macro.''');
+  }
+}
+
+@reflectiveTest
 class DeclarationTest extends _Base {
   test_CLASS() async {
     newFile('/home/test/lib/test.dart', content: r'''
@@ -883,6 +916,79 @@
     );
   }
 
+  test_CONSTRUCTOR() async {
+    newFile('/home/test/lib/test.dart', content: r'''
+class C {
+  int f1;
+  int f2;
+
+  C() {}
+
+  C.a() {}
+
+  @deprecated
+  C.b() {}
+
+  /// aaa
+  ///
+  /// bbb bbb
+  C.c() {}
+
+  C.d(Map<String, int> p1, int p2, {double p3}) {}
+
+  C.e(this.f1, this.f2) {}
+}
+''');
+
+    tracker.addContext(testAnalysisContext);
+    await _doAllTrackerWork();
+
+    var library = _getLibrary('package:test/test.dart');
+    _assertDeclaration(library, '', DeclarationKind.CONSTRUCTOR,
+        name2: 'C',
+        parameterNames: [],
+        parameters: '()',
+        parameterTypes: [],
+        requiredParameterCount: 0);
+    _assertDeclaration(library, 'a', DeclarationKind.CONSTRUCTOR,
+        name2: 'C',
+        parameterNames: [],
+        parameters: '()',
+        parameterTypes: [],
+        requiredParameterCount: 0);
+    _assertDeclaration(library, 'b', DeclarationKind.CONSTRUCTOR,
+        isDeprecated: true,
+        name2: 'C',
+        parameters: '()',
+        parameterNames: [],
+        parameterTypes: [],
+        requiredParameterCount: 0);
+    _assertDeclaration(library, 'c', DeclarationKind.CONSTRUCTOR,
+        docSummary: 'aaa',
+        docComplete: 'aaa\n\nbbb bbb',
+        name2: 'C',
+        parameters: '()',
+        parameterNames: [],
+        parameterTypes: [],
+        requiredParameterCount: 0);
+    _assertDeclaration(library, 'd', DeclarationKind.CONSTRUCTOR,
+        defaultArgumentListString: 'p1, p2',
+        defaultArgumentListTextRanges: [0, 2, 4, 2],
+        name2: 'C',
+        parameters: '(Map<String, int> p1, int p2, {double p3})',
+        parameterNames: ['p1', 'p2', 'p3'],
+        parameterTypes: ['Map<String, int>', 'int', 'double'],
+        requiredParameterCount: 2);
+    _assertDeclaration(library, 'e', DeclarationKind.CONSTRUCTOR,
+        defaultArgumentListString: 'f1, f2',
+        defaultArgumentListTextRanges: [0, 2, 4, 2],
+        name2: 'C',
+        parameters: '(this.f1, this.f2)',
+        parameterNames: ['f1', 'f2'],
+        parameterTypes: ['', ''],
+        requiredParameterCount: 2);
+  }
+
   test_ENUM() async {
     newFile('/home/test/lib/test.dart', content: r'''
 enum A {v}
@@ -2262,7 +2368,7 @@
     String returnType,
     String typeParameters,
   }) {
-    var declaration = _getDeclaration(library, name);
+    var declaration = _getDeclaration(library, name, name2);
     expect(declaration.defaultArgumentListString, defaultArgumentListString);
     expect(
       declaration.defaultArgumentListTextRanges,
@@ -2350,9 +2456,9 @@
     await pumpEventQueue();
   }
 
-  Declaration _getDeclaration(Library library, String name) {
-    return library.declarations
-        .singleWhere((declaration) => declaration.name == name);
+  Declaration _getDeclaration(Library library, String name, String name2) {
+    return library.declarations.singleWhere((declaration) =>
+        declaration.name == name && declaration.name2 == name2);
   }
 
   Library _getLibrary(String uriStr) {
diff --git a/pkg/analyzer/test/src/summary/api_signature_test.dart b/pkg/analyzer/test/src/summary/api_signature_test.dart
index 348d091..b302076 100644
--- a/pkg/analyzer/test/src/summary/api_signature_test.dart
+++ b/pkg/analyzer/test/src/summary/api_signature_test.dart
@@ -1,4 +1,4 @@
-// Copyright (c) 2016, the Dart project authors.  Please see the AUTHORS file
+// Copyright (c) 2016, the Dart project authors. Please see the AUTHORS file
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
 
diff --git a/pkg/analyzer/test/src/summary/dependency_walker_test.dart b/pkg/analyzer/test/src/summary/dependency_walker_test.dart
index 15a7306..1e4e9dc 100644
--- a/pkg/analyzer/test/src/summary/dependency_walker_test.dart
+++ b/pkg/analyzer/test/src/summary/dependency_walker_test.dart
@@ -1,4 +1,4 @@
-// Copyright (c) 2016, the Dart project authors.  Please see the AUTHORS file
+// Copyright (c) 2016, the Dart project authors. Please see the AUTHORS file
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
 
diff --git a/pkg/analyzer/test/src/summary/element_text.dart b/pkg/analyzer/test/src/summary/element_text.dart
index b3a61b2..ca7d14f 100644
--- a/pkg/analyzer/test/src/summary/element_text.dart
+++ b/pkg/analyzer/test/src/summary/element_text.dart
@@ -1,4 +1,4 @@
-// Copyright (c) 2017, the Dart project authors.  Please see the AUTHORS file
+// Copyright (c) 2017, the Dart project authors. Please see the AUTHORS file
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
 
@@ -55,6 +55,7 @@
 void checkElementText(LibraryElement library, String expected,
     {bool withCodeRanges: false,
     bool withConstElements: true,
+    bool withExportScope: false,
     bool withOffsets: false,
     bool withSyntheticAccessors: false,
     bool withSyntheticFields: false,
@@ -62,6 +63,7 @@
   var writer = new _ElementWriter(
       withCodeRanges: withCodeRanges,
       withConstElements: withConstElements,
+      withExportScope: withExportScope,
       withOffsets: withOffsets,
       withSyntheticAccessors: withSyntheticAccessors,
       withSyntheticFields: withSyntheticFields,
@@ -127,6 +129,7 @@
  */
 class _ElementWriter {
   final bool withCodeRanges;
+  final bool withExportScope;
   final bool withOffsets;
   final bool withConstElements;
   final bool withSyntheticAccessors;
@@ -137,6 +140,7 @@
   _ElementWriter(
       {this.withCodeRanges,
       this.withConstElements: true,
+      this.withExportScope: false,
       this.withOffsets: false,
       this.withSyntheticAccessors: false,
       this.withSyntheticFields: false,
@@ -405,6 +409,8 @@
     e.parts.forEach(writePartElement);
 
     e.units.forEach(writeUnitElement);
+
+    writeExportScope(e);
   }
 
   void writeList<T>(String open, String close, List<T> items, String separator,
@@ -481,7 +487,7 @@
   void writeNode(AstNode e, [Expression enclosing]) {
     bool needsParenthesis = e is Expression &&
         enclosing != null &&
-        e.precedence2 < enclosing.precedence2;
+        e.precedence < enclosing.precedence;
 
     if (needsParenthesis) {
       buffer.write('(');
@@ -565,7 +571,7 @@
       } else if (withTypes) {
         writeInterfaceTypeArgsComment(e);
       }
-      writeList('[', ']', e.elements2, ', ', writeNode, includeEmpty: true);
+      writeList('[', ']', e.elements, ', ', writeNode, includeEmpty: true);
     } else if (e is Label) {
       writeNode(e.label);
       buffer.write(': ');
@@ -578,7 +584,7 @@
       } else if (withTypes) {
         writeInterfaceTypeArgsComment(e);
       }
-      writeList('{', '}', e.elements2, ', ', writeNode, includeEmpty: true);
+      writeList('{', '}', e.elements, ', ', writeNode, includeEmpty: true);
       if (e.isMap) {
         buffer.write('/*isMap*/');
       }
@@ -907,6 +913,7 @@
 
   void writeTypeParameterElement(TypeParameterElement e) {
     writeName(e);
+    writeCodeRange(e);
     if (e.bound != null && !e.bound.isObject) {
       buffer.write(' extends ');
       writeType(e.bound);
@@ -932,6 +939,22 @@
     e.functions.forEach(writeFunctionElement);
   }
 
+  void writeExportScope(LibraryElement e) {
+    if (!withExportScope) return;
+
+    buffer.writeln();
+    buffer.writeln('-' * 20);
+    buffer.writeln('Exports:');
+
+    var map = e.exportNamespace.definedNames;
+    var names = map.keys.toList()..sort();
+    for (var name in names) {
+      var element = map[name];
+      var elementLocationStr = _getElementLocationString(element);
+      buffer.writeln('  $name: $elementLocationStr');
+    }
+  }
+
   void writeUri(Source source) {
     if (source != null) {
       Uri uri = source.uri;
diff --git a/pkg/analyzer/test/src/summary/expr_builder_test.dart b/pkg/analyzer/test/src/summary/expr_builder_test.dart
index 67a8ae9..d2c9611 100644
--- a/pkg/analyzer/test/src/summary/expr_builder_test.dart
+++ b/pkg/analyzer/test/src/summary/expr_builder_test.dart
@@ -5,6 +5,7 @@
 import 'package:analyzer/dart/ast/ast.dart';
 import 'package:analyzer/dart/ast/token.dart';
 import 'package:analyzer/error/listener.dart';
+import 'package:analyzer/src/dart/analysis/experiments.dart';
 import 'package:analyzer/src/dart/element/element.dart';
 import 'package:analyzer/src/dart/scanner/reader.dart';
 import 'package:analyzer/src/dart/scanner/scanner.dart';
@@ -23,6 +24,7 @@
 main() {
   defineReflectiveSuite(() {
     defineReflectiveTests(ExprBuilderTest);
+    defineReflectiveTests(ExprBuilderWithConstantUpdateTest);
     defineReflectiveTests(TokensToStringTest);
   });
 }
@@ -293,6 +295,178 @@
     checkSimpleExpression('0 <= 1');
   }
 
+  void test_list_for() {
+    experimentStatus = ExperimentStatus(control_flow_collections: true);
+    var sourceText = '[for (i = 0; i < 10; i++) i]';
+    // Resynthesis inserts synthetic "const" tokens; work around that.
+    var expectedText = 'const $sourceText';
+    checkSimpleExpression(sourceText,
+        expectedText: expectedText, extraDeclarations: 'int i;');
+  }
+
+  void test_list_for_each_with_declaration_typed() {
+    experimentStatus = ExperimentStatus(control_flow_collections: true);
+    var sourceText = '[for (int i in const []) i]';
+    // Resynthesis inserts synthetic "const" tokens; work around that.
+    var expectedText = 'const $sourceText';
+    var list = checkSimpleExpression(sourceText, expectedText: expectedText)
+        as ListLiteral;
+    var forElement = list.elements[0] as ForElement;
+    var loopParts = forElement.forLoopParts as ForEachPartsWithDeclaration;
+    var iElement = loopParts.loopVariable.identifier.staticElement;
+    var iRef = forElement.body as SimpleIdentifier;
+    expect(iRef.staticElement, same(iElement));
+  }
+
+  void test_list_for_each_with_declaration_untyped() {
+    experimentStatus = ExperimentStatus(control_flow_collections: true);
+    var sourceText = '[for (var i in const []) i]';
+    // Resynthesis inserts synthetic "const" tokens; work around that.
+    var expectedText = 'const $sourceText';
+    var list = checkSimpleExpression(sourceText, expectedText: expectedText)
+        as ListLiteral;
+    var forElement = list.elements[0] as ForElement;
+    var loopParts = forElement.forLoopParts as ForEachPartsWithDeclaration;
+    var iElement = loopParts.loopVariable.identifier.staticElement;
+    var iRef = forElement.body as SimpleIdentifier;
+    expect(iRef.staticElement, same(iElement));
+  }
+
+  void test_list_for_each_with_identifier() {
+    experimentStatus = ExperimentStatus(control_flow_collections: true);
+    var sourceText = '[for (i in const []) i]';
+    // Resynthesis inserts synthetic "const" tokens; work around that.
+    var expectedText = 'const $sourceText';
+    checkSimpleExpression(sourceText,
+        expectedText: expectedText, extraDeclarations: 'int i;');
+  }
+
+  void test_list_for_each_with_identifier_await() {
+    experimentStatus = ExperimentStatus(control_flow_collections: true);
+    var sourceText = '[await for (i in const []) i]';
+    // Resynthesis inserts synthetic "const" tokens; work around that.
+    var expectedText = 'const $sourceText';
+    checkSimpleExpression(sourceText,
+        expectedText: expectedText, extraDeclarations: 'int i;');
+  }
+
+  void test_list_for_empty_condition() {
+    experimentStatus = ExperimentStatus(control_flow_collections: true);
+    var sourceText = '[for (i = 0;; i++) i]';
+    // Resynthesis inserts synthetic "const" tokens; work around that.
+    var expectedText = 'const $sourceText';
+    checkSimpleExpression(sourceText,
+        expectedText: expectedText, extraDeclarations: 'int i;');
+  }
+
+  void test_list_for_empty_initializer() {
+    experimentStatus = ExperimentStatus(control_flow_collections: true);
+    var sourceText = '[for (; i < 10; i++) i]';
+    // Resynthesis inserts synthetic "const" tokens; work around that.
+    var expectedText = 'const $sourceText';
+    checkSimpleExpression(sourceText,
+        expectedText: expectedText, extraDeclarations: 'int i;');
+  }
+
+  void test_list_for_two_updaters() {
+    experimentStatus = ExperimentStatus(control_flow_collections: true);
+    var sourceText = '[for (i = 0; i < 10; i++, j++) i]';
+    // Resynthesis inserts synthetic "const" tokens; work around that.
+    var expectedText = 'const $sourceText';
+    checkSimpleExpression(sourceText,
+        expectedText: expectedText, extraDeclarations: 'int i; int j;');
+  }
+
+  void test_list_for_with_one_declaration_typed() {
+    experimentStatus = ExperimentStatus(control_flow_collections: true);
+    var sourceText = '[for (int i = 0; i < 10; i++) i]';
+    // Resynthesis inserts synthetic "const" tokens; work around that.
+    var expectedText = 'const $sourceText';
+    var list = checkSimpleExpression(sourceText, expectedText: expectedText)
+        as ListLiteral;
+    var forElement = list.elements[0] as ForElement;
+    var loopParts = forElement.forLoopParts as ForPartsWithDeclarations;
+    var iElement = loopParts.variables.variables[0].name.staticElement;
+    var condition = loopParts.condition as BinaryExpression;
+    var iRef1 = condition.leftOperand as SimpleIdentifier;
+    expect(iRef1.staticElement, same(iElement));
+    var updater = loopParts.updaters[0] as PostfixExpression;
+    var iRef2 = updater.operand as SimpleIdentifier;
+    expect(iRef2.staticElement, same(iElement));
+    var iRef3 = forElement.body as SimpleIdentifier;
+    expect(iRef3.staticElement, same(iElement));
+  }
+
+  void test_list_for_with_one_declaration_untyped() {
+    experimentStatus = ExperimentStatus(control_flow_collections: true);
+    var sourceText = '[for (var i = 0; i < 10; i++) i]';
+    // Resynthesis inserts synthetic "const" tokens; work around that.
+    var expectedText = 'const $sourceText';
+    var list = checkSimpleExpression(sourceText, expectedText: expectedText)
+        as ListLiteral;
+    var forElement = list.elements[0] as ForElement;
+    var loopParts = forElement.forLoopParts as ForPartsWithDeclarations;
+    var iElement = loopParts.variables.variables[0].name.staticElement;
+    var condition = loopParts.condition as BinaryExpression;
+    var iRef1 = condition.leftOperand as SimpleIdentifier;
+    expect(iRef1.staticElement, same(iElement));
+    var updater = loopParts.updaters[0] as PostfixExpression;
+    var iRef2 = updater.operand as SimpleIdentifier;
+    expect(iRef2.staticElement, same(iElement));
+    var iRef3 = forElement.body as SimpleIdentifier;
+    expect(iRef3.staticElement, same(iElement));
+  }
+
+  void test_list_for_with_two_declarations_untyped() {
+    experimentStatus = ExperimentStatus(control_flow_collections: true);
+    var sourceText = '[for (var i = 0, j = 0; i < 10; j++) i]';
+    // Resynthesis inserts synthetic "const" tokens; work around that.
+    var expectedText = 'const $sourceText';
+    var list = checkSimpleExpression(sourceText, expectedText: expectedText)
+        as ListLiteral;
+    var forElement = list.elements[0] as ForElement;
+    var loopParts = forElement.forLoopParts as ForPartsWithDeclarations;
+    var iElement = loopParts.variables.variables[0].name.staticElement;
+    var jElement = loopParts.variables.variables[1].name.staticElement;
+    var condition = loopParts.condition as BinaryExpression;
+    var iRef1 = condition.leftOperand as SimpleIdentifier;
+    expect(iRef1.staticElement, same(iElement));
+    var updater = loopParts.updaters[0] as PostfixExpression;
+    var jRef = updater.operand as SimpleIdentifier;
+    expect(jRef.staticElement, same(jElement));
+    var iRef2 = forElement.body as SimpleIdentifier;
+    expect(iRef2.staticElement, same(iElement));
+  }
+
+  void test_list_for_with_uninitialized_declaration_untyped() {
+    experimentStatus = ExperimentStatus(control_flow_collections: true);
+    var sourceText = '[for (var i; i < 10; i++) i]';
+    // Resynthesis inserts synthetic "const" tokens; work around that.
+    var expectedText = 'const $sourceText';
+    var list = checkSimpleExpression(sourceText, expectedText: expectedText)
+        as ListLiteral;
+    var forElement = list.elements[0] as ForElement;
+    var loopParts = forElement.forLoopParts as ForPartsWithDeclarations;
+    var iElement = loopParts.variables.variables[0].name.staticElement;
+    var condition = loopParts.condition as BinaryExpression;
+    var iRef1 = condition.leftOperand as SimpleIdentifier;
+    expect(iRef1.staticElement, same(iElement));
+    var updater = loopParts.updaters[0] as PostfixExpression;
+    var iRef2 = updater.operand as SimpleIdentifier;
+    expect(iRef2.staticElement, same(iElement));
+    var iRef3 = forElement.body as SimpleIdentifier;
+    expect(iRef3.staticElement, same(iElement));
+  }
+
+  void test_list_for_zero_updaters() {
+    experimentStatus = ExperimentStatus(control_flow_collections: true);
+    var sourceText = '[for (i = 0; i < 10;) i]';
+    // Resynthesis inserts synthetic "const" tokens; work around that.
+    var expectedText = 'const $sourceText';
+    checkSimpleExpression(sourceText,
+        expectedText: expectedText, extraDeclarations: 'int i;');
+  }
+
   void test_makeSymbol() {
     checkSimpleExpression('#foo');
   }
@@ -313,6 +487,15 @@
     checkSimpleExpression('const {0 : false}');
   }
 
+  void test_map_for() {
+    experimentStatus = ExperimentStatus(control_flow_collections: true);
+    var sourceText = '{1 : 2, for (i = 0; i < 10; i++) i : i}';
+    // Resynthesis inserts synthetic "const" tokens; work around that.
+    var expectedText = 'const $sourceText';
+    checkSimpleExpression(sourceText,
+        expectedText: expectedText, extraDeclarations: 'int i;');
+  }
+
   void test_modulo() {
     checkSimpleExpression('0 % 1');
   }
@@ -462,6 +645,15 @@
     checkSimpleExpression('true');
   }
 
+  void test_set_for() {
+    experimentStatus = ExperimentStatus(control_flow_collections: true);
+    var sourceText = '{1, for (i = 0; i < 10; i++) i}';
+    // Resynthesis inserts synthetic "const" tokens; work around that.
+    var expectedText = 'const $sourceText';
+    checkSimpleExpression(sourceText,
+        expectedText: expectedText, extraDeclarations: 'int i;');
+  }
+
   void test_subtract() {
     checkSimpleExpression('0 - 1');
   }
@@ -577,6 +769,18 @@
 }
 
 @reflectiveTest
+class ExprBuilderWithConstantUpdateTest extends ResynthesizeTestStrategyTwoPhase
+    with ExprBuilderTestHelpers {
+  @override
+  ExperimentStatus get experimentStatus =>
+      new ExperimentStatus.fromStrings([EnableString.constant_update_2018]);
+
+  void test_bitShiftRightLogical() {
+    checkSimpleExpression('0 >>> 1');
+  }
+}
+
+@reflectiveTest
 class TokensToStringTest {
   void test_empty_list_no_space() {
     // This is an interesting test case because "[]" is scanned as a single
diff --git a/pkg/analyzer/test/src/summary/flat_buffers_test.dart b/pkg/analyzer/test/src/summary/flat_buffers_test.dart
index d5cb5cc..405b5ac 100644
--- a/pkg/analyzer/test/src/summary/flat_buffers_test.dart
+++ b/pkg/analyzer/test/src/summary/flat_buffers_test.dart
@@ -1,4 +1,4 @@
-// Copyright (c) 2016, the Dart project authors.  Please see the AUTHORS file
+// Copyright (c) 2016, the Dart project authors. Please see the AUTHORS file
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
 
diff --git a/pkg/analyzer/test/src/summary/linker_test.dart b/pkg/analyzer/test/src/summary/linker_test.dart
index e406c24..ab21dcd 100644
--- a/pkg/analyzer/test/src/summary/linker_test.dart
+++ b/pkg/analyzer/test/src/summary/linker_test.dart
@@ -1,4 +1,4 @@
-// Copyright (c) 2016, the Dart project authors.  Please see the AUTHORS file
+// Copyright (c) 2016, the Dart project authors. Please see the AUTHORS file
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
 
diff --git a/pkg/analyzer/test/src/summary/name_filter_test.dart b/pkg/analyzer/test/src/summary/name_filter_test.dart
index ef66cc5..73a80fe 100644
--- a/pkg/analyzer/test/src/summary/name_filter_test.dart
+++ b/pkg/analyzer/test/src/summary/name_filter_test.dart
@@ -1,4 +1,4 @@
-// Copyright (c) 2016, the Dart project authors.  Please see the AUTHORS file
+// Copyright (c) 2016, the Dart project authors. Please see the AUTHORS file
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
 
diff --git a/pkg/analyzer/test/src/summary/package_bundle_reader_test.dart b/pkg/analyzer/test/src/summary/package_bundle_reader_test.dart
index e5bc13c..9daafee 100644
--- a/pkg/analyzer/test/src/summary/package_bundle_reader_test.dart
+++ b/pkg/analyzer/test/src/summary/package_bundle_reader_test.dart
@@ -1,4 +1,4 @@
-// Copyright (c) 2016, the Dart project authors.  Please see the AUTHORS file
+// Copyright (c) 2016, the Dart project authors. Please see the AUTHORS file
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
 
diff --git a/pkg/analyzer/test/src/summary/prelinker_test.dart b/pkg/analyzer/test/src/summary/prelinker_test.dart
index 6ac254a..59d8a62 100644
--- a/pkg/analyzer/test/src/summary/prelinker_test.dart
+++ b/pkg/analyzer/test/src/summary/prelinker_test.dart
@@ -1,4 +1,4 @@
-// Copyright (c) 2016, the Dart project authors.  Please see the AUTHORS file
+// Copyright (c) 2016, the Dart project authors. Please see the AUTHORS file
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
 
diff --git a/pkg/analyzer/test/src/summary/resynthesize_ast2_test.dart b/pkg/analyzer/test/src/summary/resynthesize_ast2_test.dart
index 32edf88..2cf841b 100644
--- a/pkg/analyzer/test/src/summary/resynthesize_ast2_test.dart
+++ b/pkg/analyzer/test/src/summary/resynthesize_ast2_test.dart
@@ -2,6 +2,7 @@
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
 
+import 'package:analyzer/dart/ast/ast.dart';
 import 'package:analyzer/src/dart/element/element.dart';
 import 'package:analyzer/src/generated/engine.dart';
 import 'package:analyzer/src/generated/resolver.dart';
@@ -33,6 +34,9 @@
   Future<LibraryElementImpl> checkLibrary(String text,
       {bool allowErrors = false, bool dumpSummaries = false}) async {
     var dartCoreSource = sourceFactory.forUri('dart:core');
+    var dartAsyncSource = sourceFactory.forUri('dart:async');
+    var dartMathSource = sourceFactory.forUri('dart:math');
+
     var dartCoreCode = getFile(dartCoreSource.fullName).readAsStringSync();
     dartCoreCode = r'''
 library dart.core;
@@ -112,20 +116,45 @@
 }
 ''';
 
-    var dartCoreResult = _link(dartCoreSource, dartCoreCode);
+    var dartAsyncCode = r'''
+library dart.async;
+
+class Future<T> {}
+
+class FutureOr<T> {}
+
+class Stream<T> {}
+''';
+
+    var dartMathCode = r'''
+library dart.math;
+
+const double E = 2.718281828459045;
+const double PI = 3.1415926535897932;
+const double LN10 =  2.302585092994046;
+
+T min<T extends num>(T a, T b) => null;
+T max<T extends num>(T a, T b) => null;
+''';
+
+    var dartCoreResult = _link({
+      dartCoreSource: dartCoreCode,
+      dartAsyncSource: dartAsyncCode,
+      dartMathSource: dartMathCode,
+    });
 
     var source = addTestSource(text);
     var unit = parseText(text, experimentStatus: experimentStatus);
 
-    // TODO(scheglov) add other libraries
     var libraryUnitMap = {
-      source: {source: unit},
+      source: _unitsOfLibrary(source, unit),
     };
 
     for (var otherLibrarySource in otherLibrarySources) {
       var text = getFile(otherLibrarySource.fullName).readAsStringSync();
       var unit = parseText(text, experimentStatus: experimentStatus);
-      libraryUnitMap[otherLibrarySource] = {otherLibrarySource: unit};
+      var unitMap = _unitsOfLibrary(otherLibrarySource, unit);
+      libraryUnitMap[otherLibrarySource] = unitMap;
     }
 
     var linkResult = link(
@@ -150,7 +179,10 @@
     elementFactory.addBundle(linkResult.bundle);
 
     var dartCore = elementFactory.libraryOfUri('dart:core');
-    var typeProvider = SummaryTypeProvider()..initializeCore(dartCore);
+    var dartAsync = elementFactory.libraryOfUri('dart:async');
+    var typeProvider = SummaryTypeProvider()
+      ..initializeCore(dartCore)
+      ..initializeAsync(dartAsync);
     analysisContext.typeProvider = typeProvider;
     analysisContext.typeSystem = Dart2TypeSystem(typeProvider);
 
@@ -159,70 +191,6 @@
 
   @override
   @failingTest
-  test_class_alias_with_forwarding_constructors() async {
-    await super.test_class_alias_with_forwarding_constructors();
-  }
-
-  @override
-  @failingTest
-  test_class_alias_with_forwarding_constructors_type_substitution() async {
-    await super
-        .test_class_alias_with_forwarding_constructors_type_substitution();
-  }
-
-  @override
-  @failingTest
-  test_class_alias_with_forwarding_constructors_type_substitution_complex() async {
-    await super
-        .test_class_alias_with_forwarding_constructors_type_substitution_complex();
-  }
-
-  @override
-  @failingTest
-  test_class_constructor_field_formal_functionTyped_noReturnType() async {
-    await super
-        .test_class_constructor_field_formal_functionTyped_noReturnType();
-  }
-
-  @override
-  @failingTest
-  test_class_constructor_field_formal_functionTyped_withReturnType() async {
-    await super
-        .test_class_constructor_field_formal_functionTyped_withReturnType();
-  }
-
-  @override
-  @failingTest
-  test_class_constructor_field_formal_multiple_matching_fields() async {
-    await super.test_class_constructor_field_formal_multiple_matching_fields();
-  }
-
-  @override
-  @failingTest
-  test_class_constructor_fieldFormal_named_noDefault() async {
-    await super.test_class_constructor_fieldFormal_named_noDefault();
-  }
-
-  @override
-  @failingTest
-  test_class_constructor_fieldFormal_named_withDefault() async {
-    await super.test_class_constructor_fieldFormal_named_withDefault();
-  }
-
-  @override
-  @failingTest
-  test_class_constructor_fieldFormal_optional_noDefault() async {
-    await super.test_class_constructor_fieldFormal_optional_noDefault();
-  }
-
-  @override
-  @failingTest
-  test_class_constructor_fieldFormal_optional_withDefault() async {
-    await super.test_class_constructor_fieldFormal_optional_withDefault();
-  }
-
-  @override
-  @failingTest
   test_class_type_parameters_f_bound_complex() async {
     await super.test_class_type_parameters_f_bound_complex();
   }
@@ -241,84 +209,6 @@
 
   @override
   @failingTest
-  test_closure_in_variable_declaration_in_part() async {
-    await super.test_closure_in_variable_declaration_in_part();
-  }
-
-  @override
-  @failingTest
-  test_codeRange_class() async {
-    await super.test_codeRange_class();
-  }
-
-  @override
-  @failingTest
-  test_codeRange_class_namedMixin() async {
-    await super.test_codeRange_class_namedMixin();
-  }
-
-  @override
-  @failingTest
-  test_codeRange_constructor() async {
-    await super.test_codeRange_constructor();
-  }
-
-  @override
-  @failingTest
-  test_codeRange_constructor_factory() async {
-    await super.test_codeRange_constructor_factory();
-  }
-
-  @override
-  @failingTest
-  test_codeRange_field() async {
-    await super.test_codeRange_field();
-  }
-
-  @override
-  @failingTest
-  test_codeRange_field_annotations() async {
-    await super.test_codeRange_field_annotations();
-  }
-
-  @override
-  @failingTest
-  test_codeRange_function() async {
-    await super.test_codeRange_function();
-  }
-
-  @override
-  @failingTest
-  test_codeRange_method() async {
-    await super.test_codeRange_method();
-  }
-
-  @override
-  @failingTest
-  test_codeRange_parameter() async {
-    await super.test_codeRange_parameter();
-  }
-
-  @override
-  @failingTest
-  test_codeRange_parameter_annotations() async {
-    await super.test_codeRange_parameter_annotations();
-  }
-
-  @override
-  @failingTest
-  test_codeRange_topLevelVariable() async {
-    await super.test_codeRange_topLevelVariable();
-  }
-
-  @override
-  @failingTest
-  test_codeRange_topLevelVariable_annotations() async {
-    await super.test_codeRange_topLevelVariable_annotations();
-  }
-
-  @override
-  @failingTest
   test_const_constructor_inferred_args() async {
     await super.test_const_constructor_inferred_args();
   }
@@ -326,97 +216,12 @@
   @override
   @failingTest
   test_const_finalField_hasConstConstructor() async {
+    // TODO(scheglov) Needs initializer, because of const constructor.
     await super.test_const_finalField_hasConstConstructor();
   }
 
   @override
   @failingTest
-  test_const_invalid_field_const() async {
-    await super.test_const_invalid_field_const();
-  }
-
-  @override
-  @failingTest
-  test_const_invalid_field_final() async {
-    await super.test_const_invalid_field_final();
-  }
-
-  @override
-  @failingTest
-  test_const_invokeConstructor_generic_named_imported_withPrefix() async {
-    await super
-        .test_const_invokeConstructor_generic_named_imported_withPrefix();
-  }
-
-  @override
-  @failingTest
-  test_const_invokeConstructor_generic_unnamed_imported_withPrefix() async {
-    await super
-        .test_const_invokeConstructor_generic_unnamed_imported_withPrefix();
-  }
-
-  @override
-  @failingTest
-  test_const_invokeConstructor_named() async {
-    await super.test_const_invokeConstructor_named();
-  }
-
-  @override
-  @failingTest
-  test_const_invokeConstructor_named_imported_withPrefix() async {
-    await super.test_const_invokeConstructor_named_imported_withPrefix();
-  }
-
-  @override
-  @failingTest
-  test_const_invokeConstructor_named_unresolved() async {
-    await super.test_const_invokeConstructor_named_unresolved();
-  }
-
-  @override
-  @failingTest
-  test_const_invokeConstructor_named_unresolved3() async {
-    await super.test_const_invokeConstructor_named_unresolved3();
-  }
-
-  @override
-  @failingTest
-  test_const_invokeConstructor_named_unresolved4() async {
-    await super.test_const_invokeConstructor_named_unresolved4();
-  }
-
-  @override
-  @failingTest
-  test_const_invokeConstructor_named_unresolved6() async {
-    await super.test_const_invokeConstructor_named_unresolved6();
-  }
-
-  @override
-  @failingTest
-  test_const_invokeConstructor_unnamed_imported_withPrefix() async {
-    await super.test_const_invokeConstructor_unnamed_imported_withPrefix();
-  }
-
-  @override
-  @failingTest
-  test_const_invokeConstructor_unnamed_unresolved2() async {
-    await super.test_const_invokeConstructor_unnamed_unresolved2();
-  }
-
-  @override
-  @failingTest
-  test_const_length_ofClassConstField_imported_withPrefix() async {
-    await super.test_const_length_ofClassConstField_imported_withPrefix();
-  }
-
-  @override
-  @failingTest
-  test_const_length_ofTopLevelVariable_imported_withPrefix() async {
-    await super.test_const_length_ofTopLevelVariable_imported_withPrefix();
-  }
-
-  @override
-  @failingTest
   test_const_parameterDefaultValue_initializingFormal_functionTyped() async {
     await super
         .test_const_parameterDefaultValue_initializingFormal_functionTyped();
@@ -424,49 +229,12 @@
 
   @override
   @failingTest
-  test_const_parameterDefaultValue_initializingFormal_named() async {
-    await super.test_const_parameterDefaultValue_initializingFormal_named();
-  }
-
-  @override
-  @failingTest
-  test_const_parameterDefaultValue_initializingFormal_positional() async {
-    await super
-        .test_const_parameterDefaultValue_initializingFormal_positional();
-  }
-
-  @override
-  @failingTest
-  test_const_reference_staticField_imported_withPrefix() async {
-    await super.test_const_reference_staticField_imported_withPrefix();
-  }
-
-  @override
-  @failingTest
-  test_const_reference_staticMethod_imported() async {
-    await super.test_const_reference_staticMethod_imported();
-  }
-
-  @override
-  @failingTest
-  test_const_reference_staticMethod_imported_withPrefix() async {
-    await super.test_const_reference_staticMethod_imported_withPrefix();
-  }
-
-  @override
-  @failingTest
   test_const_reference_topLevelFunction_generic() async {
     await super.test_const_reference_topLevelFunction_generic();
   }
 
   @override
   @failingTest
-  test_const_reference_topLevelFunction_imported_withPrefix() async {
-    await super.test_const_reference_topLevelFunction_imported_withPrefix();
-  }
-
-  @override
-  @failingTest
   test_const_reference_topLevelVariable_imported() async {
     await super.test_const_reference_topLevelVariable_imported();
   }
@@ -479,42 +247,6 @@
 
   @override
   @failingTest
-  test_const_reference_type_functionType() async {
-    await super.test_const_reference_type_functionType();
-  }
-
-  @override
-  @failingTest
-  test_const_reference_type_imported() async {
-    await super.test_const_reference_type_imported();
-  }
-
-  @override
-  @failingTest
-  test_const_reference_type_imported_withPrefix() async {
-    await super.test_const_reference_type_imported_withPrefix();
-  }
-
-  @override
-  @failingTest
-  test_const_reference_type_typeParameter() async {
-    await super.test_const_reference_type_typeParameter();
-  }
-
-  @override
-  @failingTest
-  test_const_reference_unresolved_prefix2() async {
-    await super.test_const_reference_unresolved_prefix2();
-  }
-
-  @override
-  @failingTest
-  test_const_topLevel_typedList_importedWithPrefix() async {
-    await super.test_const_topLevel_typedList_importedWithPrefix();
-  }
-
-  @override
-  @failingTest
   test_const_topLevel_typedList_typedefArgument() async {
     await super.test_const_topLevel_typedList_typedefArgument();
   }
@@ -527,187 +259,42 @@
 
   @override
   @failingTest
-  test_constExpr_pushReference_staticMethod_simpleIdentifier() async {
-    await super.test_constExpr_pushReference_staticMethod_simpleIdentifier();
-  }
-
-  @override
-  @failingTest
-  test_constructor_initializers_assertInvocation() async {
-    await super.test_constructor_initializers_assertInvocation();
-  }
-
-  @override
-  @failingTest
-  test_constructor_initializers_assertInvocation_message() async {
-    await super.test_constructor_initializers_assertInvocation_message();
-  }
-
-  @override
-  @failingTest
-  test_constructor_initializers_field() async {
-    await super.test_constructor_initializers_field();
-  }
-
-  @override
-  @failingTest
-  test_constructor_initializers_field_notConst() async {
-    await super.test_constructor_initializers_field_notConst();
-  }
-
-  @override
-  @failingTest
-  test_constructor_initializers_field_withParameter() async {
-    await super.test_constructor_initializers_field_withParameter();
-  }
-
-  @override
-  @failingTest
-  test_constructor_initializers_superInvocation_named() async {
-    await super.test_constructor_initializers_superInvocation_named();
-  }
-
-  @override
-  @failingTest
-  test_constructor_initializers_superInvocation_named_underscore() async {
-    await super
-        .test_constructor_initializers_superInvocation_named_underscore();
-  }
-
-  @override
-  @failingTest
-  test_constructor_initializers_superInvocation_namedExpression() async {
-    await super.test_constructor_initializers_superInvocation_namedExpression();
-  }
-
-  @override
-  @failingTest
-  test_constructor_initializers_superInvocation_unnamed() async {
-    await super.test_constructor_initializers_superInvocation_unnamed();
-  }
-
-  @override
-  @failingTest
-  test_constructor_initializers_thisInvocation_named() async {
-    await super.test_constructor_initializers_thisInvocation_named();
-  }
-
-  @override
-  @failingTest
-  test_constructor_initializers_thisInvocation_namedExpression() async {
-    await super.test_constructor_initializers_thisInvocation_namedExpression();
-  }
-
-  @override
-  @failingTest
-  test_constructor_initializers_thisInvocation_unnamed() async {
-    await super.test_constructor_initializers_thisInvocation_unnamed();
-  }
-
-  @override
-  @failingTest
-  test_constructor_redirected_factory_named() async {
-    await super.test_constructor_redirected_factory_named();
-  }
-
-  @override
-  @failingTest
   test_constructor_redirected_factory_named_generic() async {
     await super.test_constructor_redirected_factory_named_generic();
   }
 
   @override
   @failingTest
-  test_constructor_redirected_factory_named_imported() async {
-    await super.test_constructor_redirected_factory_named_imported();
-  }
-
-  @override
-  @failingTest
   test_constructor_redirected_factory_named_imported_generic() async {
     await super.test_constructor_redirected_factory_named_imported_generic();
   }
 
   @override
   @failingTest
-  test_constructor_redirected_factory_named_prefixed() async {
-    await super.test_constructor_redirected_factory_named_prefixed();
-  }
-
-  @override
-  @failingTest
   test_constructor_redirected_factory_named_prefixed_generic() async {
     await super.test_constructor_redirected_factory_named_prefixed_generic();
   }
 
   @override
   @failingTest
-  test_constructor_redirected_factory_unnamed() async {
-    await super.test_constructor_redirected_factory_unnamed();
-  }
-
-  @override
-  @failingTest
   test_constructor_redirected_factory_unnamed_generic() async {
     await super.test_constructor_redirected_factory_unnamed_generic();
   }
 
   @override
   @failingTest
-  test_constructor_redirected_factory_unnamed_imported() async {
-    await super.test_constructor_redirected_factory_unnamed_imported();
-  }
-
-  @override
-  @failingTest
   test_constructor_redirected_factory_unnamed_imported_generic() async {
     await super.test_constructor_redirected_factory_unnamed_imported_generic();
   }
 
   @override
   @failingTest
-  test_constructor_redirected_factory_unnamed_prefixed() async {
-    await super.test_constructor_redirected_factory_unnamed_prefixed();
-  }
-
-  @override
-  @failingTest
   test_constructor_redirected_factory_unnamed_prefixed_generic() async {
     await super.test_constructor_redirected_factory_unnamed_prefixed_generic();
   }
 
   @override
   @failingTest
-  test_constructor_redirected_thisInvocation_named() async {
-    await super.test_constructor_redirected_thisInvocation_named();
-  }
-
-  @override
-  @failingTest
-  test_constructor_redirected_thisInvocation_named_generic() async {
-    await super.test_constructor_redirected_thisInvocation_named_generic();
-  }
-
-  @override
-  @failingTest
-  test_constructor_redirected_thisInvocation_unnamed() async {
-    await super.test_constructor_redirected_thisInvocation_unnamed();
-  }
-
-  @override
-  @failingTest
-  test_constructor_redirected_thisInvocation_unnamed_generic() async {
-    await super.test_constructor_redirected_thisInvocation_unnamed_generic();
-  }
-
-  @override
-  @failingTest
-  test_constructor_withCycles_const() async {
-    await super.test_constructor_withCycles_const();
-  }
-
-  @override
-  @failingTest
   test_defaultValue_genericFunction() async {
     await super.test_defaultValue_genericFunction();
   }
@@ -750,30 +337,6 @@
 
   @override
   @failingTest
-  test_executable_parameter_type_typedef() async {
-    await super.test_executable_parameter_type_typedef();
-  }
-
-  @override
-  @failingTest
-  test_export_class() async {
-    await super.test_export_class();
-  }
-
-  @override
-  @failingTest
-  test_export_class_type_alias() async {
-    await super.test_export_class_type_alias();
-  }
-
-  @override
-  @failingTest
-  test_export_configurations_useDefault() async {
-    await super.test_export_configurations_useDefault();
-  }
-
-  @override
-  @failingTest
   test_export_configurations_useFirst() async {
     await super.test_export_configurations_useFirst();
   }
@@ -786,120 +349,24 @@
 
   @override
   @failingTest
-  test_export_function() async {
-    await super.test_export_function();
-  }
-
-  @override
-  @failingTest
-  test_export_getter() async {
-    await super.test_export_getter();
-  }
-
-  @override
-  @failingTest
-  test_export_hide() async {
-    await super.test_export_hide();
-  }
-
-  @override
-  @failingTest
-  test_export_multiple_combinators() async {
-    await super.test_export_multiple_combinators();
-  }
-
-  @override
-  @failingTest
-  test_export_setter() async {
-    await super.test_export_setter();
-  }
-
-  @override
-  @failingTest
-  test_export_show() async {
-    await super.test_export_show();
-  }
-
-  @override
-  @failingTest
-  test_export_typedef() async {
-    await super.test_export_typedef();
-  }
-
-  @override
-  @failingTest
-  test_export_variable() async {
-    await super.test_export_variable();
-  }
-
-  @override
-  @failingTest
-  test_export_variable_const() async {
-    await super.test_export_variable_const();
-  }
-
-  @override
-  @failingTest
-  test_export_variable_final() async {
-    await super.test_export_variable_final();
-  }
-
-  @override
-  @failingTest
-  test_exportImport_configurations_useDefault() async {
-    await super.test_exportImport_configurations_useDefault();
-  }
-
-  @override
-  @failingTest
   test_exportImport_configurations_useFirst() async {
     await super.test_exportImport_configurations_useFirst();
   }
 
   @override
   @failingTest
-  test_exports() async {
-    await super.test_exports();
-  }
-
-  @override
-  @failingTest
-  test_field_covariant() async {
-    await super.test_field_covariant();
-  }
-
-  @override
-  @failingTest
   test_field_formal_param_inferred_type_implicit() async {
     await super.test_field_formal_param_inferred_type_implicit();
   }
 
   @override
   @failingTest
-  test_field_inferred_type_nonStatic_implicit_initialized() async {
-    await super.test_field_inferred_type_nonStatic_implicit_initialized();
-  }
-
-  @override
-  @failingTest
   test_field_inferred_type_nonStatic_implicit_uninitialized() async {
     await super.test_field_inferred_type_nonStatic_implicit_uninitialized();
   }
 
   @override
   @failingTest
-  test_field_inferred_type_static_implicit_initialized() async {
-    await super.test_field_inferred_type_static_implicit_initialized();
-  }
-
-  @override
-  @failingTest
-  test_field_propagatedType_const_noDep() async {
-    await super.test_field_propagatedType_const_noDep();
-  }
-
-  @override
-  @failingTest
   test_field_propagatedType_final_dep_inLib() async {
     await super.test_field_propagatedType_final_dep_inLib();
   }
@@ -912,144 +379,6 @@
 
   @override
   @failingTest
-  test_field_propagatedType_final_noDep_instance() async {
-    await super.test_field_propagatedType_final_noDep_instance();
-  }
-
-  @override
-  @failingTest
-  test_field_propagatedType_final_noDep_static() async {
-    await super.test_field_propagatedType_final_noDep_static();
-  }
-
-  @override
-  @failingTest
-  test_field_static_final_untyped() async {
-    await super.test_field_static_final_untyped();
-  }
-
-  @override
-  @failingTest
-  test_field_untyped() async {
-    await super.test_field_untyped();
-  }
-
-  @override
-  @failingTest
-  test_function_async() async {
-    await super.test_function_async();
-  }
-
-  @override
-  @failingTest
-  test_function_asyncStar() async {
-    await super.test_function_asyncStar();
-  }
-
-  @override
-  @failingTest
-  test_function_entry_point_in_export() async {
-    await super.test_function_entry_point_in_export();
-  }
-
-  @override
-  @failingTest
-  test_function_entry_point_in_export_hidden() async {
-    await super.test_function_entry_point_in_export_hidden();
-  }
-
-  @override
-  @failingTest
-  test_function_entry_point_in_part() async {
-    await super.test_function_entry_point_in_part();
-  }
-
-  @override
-  @failingTest
-  test_function_parameter_parameters() async {
-    await super.test_function_parameter_parameters();
-  }
-
-  @override
-  @failingTest
-  test_function_parameter_return_type() async {
-    await super.test_function_parameter_return_type();
-  }
-
-  @override
-  @failingTest
-  test_function_parameter_return_type_void() async {
-    await super.test_function_parameter_return_type_void();
-  }
-
-  @override
-  @failingTest
-  test_function_type_parameter_with_function_typed_parameter() async {
-    await super.test_function_type_parameter_with_function_typed_parameter();
-  }
-
-  @override
-  @failingTest
-  test_function_typed_parameter_implicit() async {
-    await super.test_function_typed_parameter_implicit();
-  }
-
-  @override
-  @failingTest
-  test_futureOr() async {
-    await super.test_futureOr();
-  }
-
-  @override
-  @failingTest
-  test_futureOr_const() async {
-    await super.test_futureOr_const();
-  }
-
-  @override
-  @failingTest
-  test_futureOr_inferred() async {
-    await super.test_futureOr_inferred();
-  }
-
-  @override
-  @failingTest
-  test_genericFunction_asFunctionReturnType() async {
-    await super.test_genericFunction_asFunctionReturnType();
-  }
-
-  @override
-  @failingTest
-  test_genericFunction_asFunctionTypedParameterReturnType() async {
-    await super.test_genericFunction_asFunctionTypedParameterReturnType();
-  }
-
-  @override
-  @failingTest
-  test_genericFunction_asGenericFunctionReturnType() async {
-    await super.test_genericFunction_asGenericFunctionReturnType();
-  }
-
-  @override
-  @failingTest
-  test_genericFunction_asMethodReturnType() async {
-    await super.test_genericFunction_asMethodReturnType();
-  }
-
-  @override
-  @failingTest
-  test_genericFunction_asParameterType() async {
-    await super.test_genericFunction_asParameterType();
-  }
-
-  @override
-  @failingTest
-  test_genericFunction_asTopLevelVariableType() async {
-    await super.test_genericFunction_asTopLevelVariableType();
-  }
-
-  @override
-  @failingTest
   test_getter_inferred_type_nonStatic_implicit_return() async {
     await super.test_getter_inferred_type_nonStatic_implicit_return();
   }
@@ -1062,48 +391,12 @@
 
   @override
   @failingTest
-  test_import_deferred() async {
-    await super.test_import_deferred();
-  }
-
-  @override
-  @failingTest
-  test_import_export() async {
-    await super.test_import_export();
-  }
-
-  @override
-  @failingTest
-  test_import_hide() async {
-    await super.test_import_hide();
-  }
-
-  @override
-  @failingTest
   test_import_invalidUri_metadata() async {
     await super.test_import_invalidUri_metadata();
   }
 
   @override
   @failingTest
-  test_import_multiple_combinators() async {
-    await super.test_import_multiple_combinators();
-  }
-
-  @override
-  @failingTest
-  test_import_prefixed() async {
-    await super.test_import_prefixed();
-  }
-
-  @override
-  @failingTest
-  test_import_self() async {
-    await super.test_import_self();
-  }
-
-  @override
-  @failingTest
   test_import_short_absolute() async {
     // TODO(scheglov) fails on Windows
     fail('test_import_short_absolute on Windows');
@@ -1112,12 +405,6 @@
 
   @override
   @failingTest
-  test_import_show() async {
-    await super.test_import_show();
-  }
-
-  @override
-  @failingTest
   test_infer_generic_typedef_simple() async {
     await super.test_infer_generic_typedef_simple();
   }
@@ -1148,12 +435,6 @@
 
   @override
   @failingTest
-  test_inferred_type_refers_to_function_typed_param_of_typedef() async {
-    await super.test_inferred_type_refers_to_function_typed_param_of_typedef();
-  }
-
-  @override
-  @failingTest
   test_inferred_type_refers_to_function_typed_parameter_type_generic_class() async {
     await super
         .test_inferred_type_refers_to_function_typed_parameter_type_generic_class();
@@ -1175,19 +456,6 @@
 
   @override
   @failingTest
-  test_inferred_type_refers_to_nested_function_typed_param() async {
-    await super.test_inferred_type_refers_to_nested_function_typed_param();
-  }
-
-  @override
-  @failingTest
-  test_inferred_type_refers_to_nested_function_typed_param_named() async {
-    await super
-        .test_inferred_type_refers_to_nested_function_typed_param_named();
-  }
-
-  @override
-  @failingTest
   test_inferred_type_refers_to_setter_function_typed_parameter_type() async {
     await super
         .test_inferred_type_refers_to_setter_function_typed_parameter_type();
@@ -1207,60 +475,6 @@
 
   @override
   @failingTest
-  test_inferredType_implicitCreation_prefixed() async {
-    await super.test_inferredType_implicitCreation_prefixed();
-  }
-
-  @override
-  @failingTest
-  test_inferredType_usesSyntheticFunctionType_functionTypedParam() async {
-    await super
-        .test_inferredType_usesSyntheticFunctionType_functionTypedParam();
-  }
-
-  @override
-  @failingTest
-  test_initializer_executable_with_return_type_from_closure() async {
-    await super.test_initializer_executable_with_return_type_from_closure();
-  }
-
-  @override
-  @failingTest
-  test_initializer_executable_with_return_type_from_closure_await_dynamic() async {
-    await super
-        .test_initializer_executable_with_return_type_from_closure_await_dynamic();
-  }
-
-  @override
-  @failingTest
-  test_initializer_executable_with_return_type_from_closure_await_future3_int() async {
-    await super
-        .test_initializer_executable_with_return_type_from_closure_await_future3_int();
-  }
-
-  @override
-  @failingTest
-  test_initializer_executable_with_return_type_from_closure_await_future_int() async {
-    await super
-        .test_initializer_executable_with_return_type_from_closure_await_future_int();
-  }
-
-  @override
-  @failingTest
-  test_initializer_executable_with_return_type_from_closure_await_future_noArg() async {
-    await super
-        .test_initializer_executable_with_return_type_from_closure_await_future_noArg();
-  }
-
-  @override
-  @failingTest
-  test_initializer_executable_with_return_type_from_closure_field() async {
-    await super
-        .test_initializer_executable_with_return_type_from_closure_field();
-  }
-
-  @override
-  @failingTest
   test_instantiateToBounds_boundRefersToEarlierTypeArgument() async {
     await super.test_instantiateToBounds_boundRefersToEarlierTypeArgument();
   }
@@ -1297,24 +511,6 @@
 
   @override
   @failingTest
-  test_invalid_annotation_prefixed_constructor() async {
-    await super.test_invalid_annotation_prefixed_constructor();
-  }
-
-  @override
-  @failingTest
-  test_invalid_importPrefix_asTypeArgument() async {
-    await super.test_invalid_importPrefix_asTypeArgument();
-  }
-
-  @override
-  @failingTest
-  test_invalid_nameConflict_imported_exported() async {
-    await super.test_invalid_nameConflict_imported_exported();
-  }
-
-  @override
-  @failingTest
   test_invalid_setterParameter_fieldFormalParameter() async {
     await super.test_invalid_setterParameter_fieldFormalParameter();
   }
@@ -1351,132 +547,18 @@
 
   @override
   @failingTest
-  test_main_class_alias_via_export() async {
-    await super.test_main_class_alias_via_export();
-  }
-
-  @override
-  @failingTest
-  test_main_class_via_export() async {
-    await super.test_main_class_via_export();
-  }
-
-  @override
-  @failingTest
-  test_main_getter_via_export() async {
-    await super.test_main_getter_via_export();
-  }
-
-  @override
-  @failingTest
-  test_main_typedef_via_export() async {
-    await super.test_main_typedef_via_export();
-  }
-
-  @override
-  @failingTest
-  test_main_variable_via_export() async {
-    await super.test_main_variable_via_export();
-  }
-
-  @override
-  @failingTest
-  test_member_function_async() async {
-    await super.test_member_function_async();
-  }
-
-  @override
-  @failingTest
-  test_member_function_asyncStar() async {
-    await super.test_member_function_asyncStar();
-  }
-
-  @override
-  @failingTest
-  test_member_function_syncStar() async {
-    await super.test_member_function_syncStar();
-  }
-
-  @override
-  @failingTest
-  test_metadata_constructor_call_named_prefixed() async {
-    await super.test_metadata_constructor_call_named_prefixed();
-  }
-
-  @override
-  @failingTest
-  test_metadata_constructor_call_unnamed_prefixed() async {
-    await super.test_metadata_constructor_call_unnamed_prefixed();
-  }
-
-  @override
-  @failingTest
-  test_metadata_exportDirective() async {
-    await super.test_metadata_exportDirective();
-  }
-
-  @override
-  @failingTest
-  test_metadata_fieldFormalParameter() async {
-    await super.test_metadata_fieldFormalParameter();
-  }
-
-  @override
-  @failingTest
-  test_metadata_fieldFormalParameter_withDefault() async {
-    await super.test_metadata_fieldFormalParameter_withDefault();
-  }
-
-  @override
-  @failingTest
-  test_metadata_functionTypedFormalParameter() async {
-    await super.test_metadata_functionTypedFormalParameter();
-  }
-
-  @override
-  @failingTest
-  test_metadata_functionTypedFormalParameter_withDefault() async {
-    await super.test_metadata_functionTypedFormalParameter_withDefault();
-  }
-
-  @override
-  @failingTest
   test_metadata_importDirective() async {
     await super.test_metadata_importDirective();
   }
 
   @override
   @failingTest
-  test_metadata_invalid_classDeclaration() async {
-    await super.test_metadata_invalid_classDeclaration();
-  }
-
-  @override
-  @failingTest
-  test_metadata_libraryDirective() async {
-    await super.test_metadata_libraryDirective();
-  }
-
-  @override
-  @failingTest
   test_metadata_partDirective() async {
     await super.test_metadata_partDirective();
   }
 
   @override
   @failingTest
-  test_metadata_prefixed_variable() async {
-    await super.test_metadata_prefixed_variable();
-  }
-
-  @override
-  @failingTest
-  test_metadata_simpleFormalParameter_withDefault() async {
-    await super.test_metadata_simpleFormalParameter_withDefault();
-  }
-
-  @override
-  @failingTest
   test_method_inferred_type_nonStatic_implicit_param() async {
     await super.test_method_inferred_type_nonStatic_implicit_param();
   }
@@ -1489,42 +571,6 @@
 
   @override
   @failingTest
-  test_method_type_parameter_with_function_typed_parameter() async {
-    await super.test_method_type_parameter_with_function_typed_parameter();
-  }
-
-  @override
-  @failingTest
-  test_mixin() async {
-    await super.test_mixin();
-  }
-
-  @override
-  @failingTest
-  test_mixin_implicitObjectSuperclassConstraint() async {
-    await super.test_mixin_implicitObjectSuperclassConstraint();
-  }
-
-  @override
-  @failingTest
-  test_nameConflict_exportedAndLocal() async {
-    await super.test_nameConflict_exportedAndLocal();
-  }
-
-  @override
-  @failingTest
-  test_nameConflict_exportedAndLocal_exported() async {
-    await super.test_nameConflict_exportedAndLocal_exported();
-  }
-
-  @override
-  @failingTest
-  test_nameConflict_exportedAndParted() async {
-    await super.test_nameConflict_exportedAndParted();
-  }
-
-  @override
-  @failingTest
   test_nameConflict_importWithRelativeUri_exportWithAbsolute() async {
     // TODO(scheglov) unexpectedly passes on Windows
     fail('unexpectedly passes on Windows');
@@ -1539,48 +585,6 @@
 
   @override
   @failingTest
-  test_parameter_parameters() async {
-    await super.test_parameter_parameters();
-  }
-
-  @override
-  @failingTest
-  test_parameter_parameters_in_generic_class() async {
-    await super.test_parameter_parameters_in_generic_class();
-  }
-
-  @override
-  @failingTest
-  test_parameter_return_type() async {
-    await super.test_parameter_return_type();
-  }
-
-  @override
-  @failingTest
-  test_parameter_return_type_void() async {
-    await super.test_parameter_return_type_void();
-  }
-
-  @override
-  @failingTest
-  test_parameterTypeNotInferred_initializingFormal() async {
-    await super.test_parameterTypeNotInferred_initializingFormal();
-  }
-
-  @override
-  @failingTest
-  test_parts() async {
-    await super.test_parts();
-  }
-
-  @override
-  @failingTest
-  test_parts_invalidUri() async {
-    await super.test_parts_invalidUri();
-  }
-
-  @override
-  @failingTest
   test_parts_invalidUri_nullStringValue() async {
     await super.test_parts_invalidUri_nullStringValue();
   }
@@ -1599,30 +603,6 @@
 
   @override
   @failingTest
-  test_syntheticFunctionType_inGenericClass() async {
-    await super.test_syntheticFunctionType_inGenericClass();
-  }
-
-  @override
-  @failingTest
-  test_syntheticFunctionType_noArguments() async {
-    await super.test_syntheticFunctionType_noArguments();
-  }
-
-  @override
-  @failingTest
-  test_syntheticFunctionType_withArguments() async {
-    await super.test_syntheticFunctionType_withArguments();
-  }
-
-  @override
-  @failingTest
-  test_type_arguments_implicit() async {
-    await super.test_type_arguments_implicit();
-  }
-
-  @override
-  @failingTest
   test_type_inference_based_on_loadLibrary() async {
     await super.test_type_inference_based_on_loadLibrary();
   }
@@ -1647,156 +627,12 @@
 
   @override
   @failingTest
-  test_type_inference_nested_function() async {
-    await super.test_type_inference_nested_function();
-  }
-
-  @override
-  @failingTest
-  test_type_inference_nested_function_with_parameter_types() async {
-    await super.test_type_inference_nested_function_with_parameter_types();
-  }
-
-  @override
-  @failingTest
   test_type_inference_of_closure_with_default_value() async {
     await super.test_type_inference_of_closure_with_default_value();
   }
 
   @override
   @failingTest
-  test_type_invalid_topLevelVariableElement_asType() async {
-    await super.test_type_invalid_topLevelVariableElement_asType();
-  }
-
-  @override
-  @failingTest
-  test_type_invalid_topLevelVariableElement_asTypeArgument() async {
-    await super.test_type_invalid_topLevelVariableElement_asTypeArgument();
-  }
-
-  @override
-  @failingTest
-  test_type_invalid_typeParameter_asPrefix() async {
-    await super.test_type_invalid_typeParameter_asPrefix();
-  }
-
-  @override
-  @failingTest
-  test_type_reference_lib_to_lib() async {
-    await super.test_type_reference_lib_to_lib();
-  }
-
-  @override
-  @failingTest
-  test_type_reference_lib_to_part() async {
-    await super.test_type_reference_lib_to_part();
-  }
-
-  @override
-  @failingTest
-  test_type_reference_part_to_lib() async {
-    await super.test_type_reference_part_to_lib();
-  }
-
-  @override
-  @failingTest
-  test_type_reference_part_to_other_part() async {
-    await super.test_type_reference_part_to_other_part();
-  }
-
-  @override
-  @failingTest
-  test_type_reference_part_to_part() async {
-    await super.test_type_reference_part_to_part();
-  }
-
-  @override
-  @failingTest
-  test_type_reference_to_class_with_type_arguments_implicit() async {
-    await super.test_type_reference_to_class_with_type_arguments_implicit();
-  }
-
-  @override
-  @failingTest
-  test_type_reference_to_import() async {
-    await super.test_type_reference_to_import();
-  }
-
-  @override
-  @failingTest
-  test_type_reference_to_import_export() async {
-    await super.test_type_reference_to_import_export();
-  }
-
-  @override
-  @failingTest
-  test_type_reference_to_import_export_export() async {
-    await super.test_type_reference_to_import_export_export();
-  }
-
-  @override
-  @failingTest
-  test_type_reference_to_import_export_export_in_subdirs() async {
-    await super.test_type_reference_to_import_export_export_in_subdirs();
-  }
-
-  @override
-  @failingTest
-  test_type_reference_to_import_export_in_subdirs() async {
-    await super.test_type_reference_to_import_export_in_subdirs();
-  }
-
-  @override
-  @failingTest
-  test_type_reference_to_import_part() async {
-    await super.test_type_reference_to_import_part();
-  }
-
-  @override
-  @failingTest
-  test_type_reference_to_import_part2() async {
-    await super.test_type_reference_to_import_part2();
-  }
-
-  @override
-  @failingTest
-  test_type_reference_to_import_part_in_subdir() async {
-    await super.test_type_reference_to_import_part_in_subdir();
-  }
-
-  @override
-  @failingTest
-  test_type_reference_to_import_relative() async {
-    await super.test_type_reference_to_import_relative();
-  }
-
-  @override
-  @failingTest
-  test_type_reference_to_typedef() async {
-    await super.test_type_reference_to_typedef();
-  }
-
-  @override
-  @failingTest
-  test_type_reference_to_typedef_with_type_arguments() async {
-    await super.test_type_reference_to_typedef_with_type_arguments();
-  }
-
-  @override
-  @failingTest
-  test_type_reference_to_typedef_with_type_arguments_implicit() async {
-    await super.test_type_reference_to_typedef_with_type_arguments_implicit();
-  }
-
-  @override
-  @failingTest
-  test_type_unresolved_prefixed() async {
-    await super.test_type_unresolved_prefixed();
-  }
-
-  @override
-  @failingTest
   test_typedef_generic() async {
     await super.test_typedef_generic();
   }
@@ -1809,30 +645,6 @@
 
   @override
   @failingTest
-  test_typedef_parameter_parameters() async {
-    await super.test_typedef_parameter_parameters();
-  }
-
-  @override
-  @failingTest
-  test_typedef_parameter_parameters_in_generic_class() async {
-    await super.test_typedef_parameter_parameters_in_generic_class();
-  }
-
-  @override
-  @failingTest
-  test_typedef_parameter_return_type() async {
-    await super.test_typedef_parameter_return_type();
-  }
-
-  @override
-  @failingTest
-  test_typedef_parameters_named() async {
-    await super.test_typedef_parameters_named();
-  }
-
-  @override
-  @failingTest
   test_typedef_type_parameters_bound_recursive() async {
     await super.test_typedef_type_parameters_bound_recursive();
   }
@@ -1863,33 +675,6 @@
 
   @override
   @failingTest
-  test_unresolved_annotation_prefixedIdentifier_noDeclaration() async {
-    await super.test_unresolved_annotation_prefixedIdentifier_noDeclaration();
-  }
-
-  @override
-  @failingTest
-  test_unresolved_annotation_prefixedNamedConstructorCall_noClass() async {
-    await super
-        .test_unresolved_annotation_prefixedNamedConstructorCall_noClass();
-  }
-
-  @override
-  @failingTest
-  test_unresolved_annotation_prefixedNamedConstructorCall_noConstructor() async {
-    await super
-        .test_unresolved_annotation_prefixedNamedConstructorCall_noConstructor();
-  }
-
-  @override
-  @failingTest
-  test_unresolved_annotation_prefixedUnnamedConstructorCall_noClass() async {
-    await super
-        .test_unresolved_annotation_prefixedUnnamedConstructorCall_noClass();
-  }
-
-  @override
-  @failingTest
   test_unresolved_export() async {
     await super.test_unresolved_export();
   }
@@ -1902,30 +687,6 @@
 
   @override
   @failingTest
-  test_unresolved_part() async {
-    await super.test_unresolved_part();
-  }
-
-  @override
-  @failingTest
-  test_variable_getterInLib_setterInPart() async {
-    await super.test_variable_getterInLib_setterInPart();
-  }
-
-  @override
-  @failingTest
-  test_variable_getterInPart_setterInLib() async {
-    await super.test_variable_getterInPart_setterInLib();
-  }
-
-  @override
-  @failingTest
-  test_variable_getterInPart_setterInPart() async {
-    await super.test_variable_getterInPart_setterInPart();
-  }
-
-  @override
-  @failingTest
   test_variable_propagatedType_final_dep_inLib() async {
     await super.test_variable_propagatedType_final_dep_inLib();
   }
@@ -1936,19 +697,14 @@
     await super.test_variable_propagatedType_final_dep_inPart();
   }
 
-  @override
-  @failingTest
-  test_variable_setterInPart_getterInPart() async {
-    await super.test_variable_setterInPart_getterInPart();
-  }
-
-  LinkResult _link(Source source, String code) {
-    var unit = parseText(code, experimentStatus: experimentStatus);
-
-    // TODO(scheglov) add other libraries
-    var libraryUnitMap = {
-      source: {source: unit},
-    };
+  LinkResult _link(Map<Source, String> codeMap) {
+    // TODO(scheglov) support for parts
+    var libraryUnitMap = <Source, Map<Source, CompilationUnit>>{};
+    for (var source in codeMap.keys) {
+      var code = codeMap[source];
+      var unit = parseText(code, experimentStatus: experimentStatus);
+      libraryUnitMap[source] = {source: unit};
+    }
 
     return link(
       AnalysisOptionsImpl(),
@@ -1957,6 +713,35 @@
       libraryUnitMap,
     );
   }
+
+  Map<Source, CompilationUnit> _unitsOfLibrary(
+      Source definingSource, CompilationUnit definingUnit) {
+    var result = <Source, CompilationUnit>{
+      definingSource: definingUnit,
+    };
+    for (var directive in definingUnit.directives) {
+      if (directive is PartDirective) {
+        var relativeUriStr = directive.uri.stringValue;
+
+        var partSource = sourceFactory.resolveUri(
+          definingSource,
+          relativeUriStr,
+        );
+
+        String text;
+        try {
+          var partFile = resourceProvider.getFile(partSource.fullName);
+          text = partFile.readAsStringSync();
+        } catch (_) {
+          text = '';
+        }
+
+        var partUnit = parseText(text, experimentStatus: experimentStatus);
+        result[partSource] = partUnit;
+      }
+    }
+    return result;
+  }
 }
 
 class _FakeAnalysisContext implements AnalysisContext {
diff --git a/pkg/analyzer/test/src/summary/resynthesize_ast_test.dart b/pkg/analyzer/test/src/summary/resynthesize_ast_test.dart
index a931ac3..de84750 100644
--- a/pkg/analyzer/test/src/summary/resynthesize_ast_test.dart
+++ b/pkg/analyzer/test/src/summary/resynthesize_ast_test.dart
@@ -1,4 +1,4 @@
-// Copyright (c) 2016, the Dart project authors.  Please see the AUTHORS file
+// Copyright (c) 2016, the Dart project authors. Please see the AUTHORS file
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
 
diff --git a/pkg/analyzer/test/src/summary/resynthesize_common.dart b/pkg/analyzer/test/src/summary/resynthesize_common.dart
index bb73374..b8f7ab6 100644
--- a/pkg/analyzer/test/src/summary/resynthesize_common.dart
+++ b/pkg/analyzer/test/src/summary/resynthesize_common.dart
@@ -1958,6 +1958,22 @@
         withConstElements: false);
   }
 
+  test_codeRange_type_parameter() async {
+    var library = await checkLibrary('''
+class A<T> {}
+void f<U extends num> {}
+''');
+    checkElementText(
+        library,
+        r'''
+class A/*codeOffset=0, codeLength=13*/<T/*codeOffset=8, codeLength=1*/> {
+}
+void f/*codeOffset=14, codeLength=24*/<U/*codeOffset=21, codeLength=13*/ extends num>() {}
+''',
+        withCodeRanges: true,
+        withConstElements: false);
+  }
+
   test_const_constructor_inferred_args() async {
     var library = await checkLibrary('''
 class C<T> {
@@ -2120,7 +2136,18 @@
 import 'a.dart' as p;
 const V = const p.C<int, String>.named(1, '222');
 ''');
-    checkElementText(library, r'''
+    if (isAstBasedSummary) {
+      checkElementText(library, r'''
+import 'a.dart' as p;
+const C<int, String> V = const
+        p/*location: test.dart;p*/.
+        C/*location: a.dart;C*/<
+        int/*location: dart:core;int*/,
+        String/*location: dart:core;String*/>.
+        named/*location: a.dart;C;named*/(1, '222');
+''');
+    } else {
+      checkElementText(library, r'''
 import 'a.dart' as p;
 const C<int, String> V = const
         C/*location: a.dart;C*/<
@@ -2128,6 +2155,7 @@
         String/*location: dart:core;String*/>.
         named/*location: a.dart;C;named*/(1, '222');
 ''');
+    }
   }
 
   test_const_invokeConstructor_generic_noTypeArguments() async {
@@ -2193,13 +2221,24 @@
 import 'a.dart' as p;
 const V = const p.C<int, String>();
 ''');
-    checkElementText(library, r'''
+    if (isAstBasedSummary) {
+      checkElementText(library, r'''
+import 'a.dart' as p;
+const C<int, String> V = const
+        p/*location: test.dart;p*/.
+        C/*location: a.dart;C*/<
+        int/*location: dart:core;int*/,
+        String/*location: dart:core;String*/>();
+''');
+    } else {
+      checkElementText(library, r'''
 import 'a.dart' as p;
 const C<int, String> V = const
         C/*location: a.dart;C*/<
         int/*location: dart:core;int*/,
         String/*location: dart:core;String*/>();
 ''');
+    }
   }
 
   test_const_invokeConstructor_named() async {
@@ -2209,7 +2248,19 @@
 }
 const V = const C.named(true, 1, 2, d: 'ccc', e: 3.4);
 ''');
-    checkElementText(library, r'''
+    if (isAstBasedSummary) {
+      checkElementText(library, r'''
+class C {
+  const C.named(bool a, int b, int c, {String d}, {double e});
+}
+const C V = const
+        C/*location: test.dart;C*/.
+        named/*location: test.dart;C;named*/(true, 1, 2,
+        d/*location: test.dart;C;named;d*/: 'ccc',
+        e/*location: test.dart;C;named;e*/: 3.4);
+''');
+    } else {
+      checkElementText(library, r'''
 class C {
   const C.named(bool a, int b, int c, {String d}, {double e});
 }
@@ -2219,6 +2270,7 @@
         d/*location: null*/: 'ccc',
         e/*location: null*/: 3.4);
 ''');
+    }
   }
 
   test_const_invokeConstructor_named_imported() async {
@@ -2249,12 +2301,22 @@
 import 'a.dart' as p;
 const V = const p.C.named();
 ''');
-    checkElementText(library, r'''
+    if (isAstBasedSummary) {
+      checkElementText(library, r'''
+import 'a.dart' as p;
+const C V = const
+        p/*location: test.dart;p*/.
+        C/*location: a.dart;C*/.
+        named/*location: a.dart;C;named*/();
+''');
+    } else {
+      checkElementText(library, r'''
 import 'a.dart' as p;
 const C V = const
         C/*location: a.dart;C*/.
         named/*location: a.dart;C;named*/();
 ''');
+    }
   }
 
   test_const_invokeConstructor_named_unresolved() async {
@@ -2262,13 +2324,23 @@
 class C {}
 const V = const C.named();
 ''', allowErrors: true);
-    checkElementText(library, r'''
+    if (isAstBasedSummary) {
+      checkElementText(library, r'''
+class C {
+}
+const C V = const
+        C/*location: test.dart;C*/.
+        named/*location: null*/();
+''');
+    } else {
+      checkElementText(library, r'''
 class C {
 }
 const dynamic V = const
         C/*location: test.dart;C*/.
         named/*location: null*/();
 ''');
+    }
   }
 
   test_const_invokeConstructor_named_unresolved2() async {
@@ -2291,13 +2363,23 @@
 import 'a.dart' as p;
 const V = const p.C.named();
 ''', allowErrors: true);
-    checkElementText(library, r'''
+    if (isAstBasedSummary) {
+      checkElementText(library, r'''
+import 'a.dart' as p;
+const C V = const
+        p/*location: test.dart;p*/.
+        C/*location: a.dart;C*/.
+        named/*location: null*/();
+''');
+    } else {
+      checkElementText(library, r'''
 import 'a.dart' as p;
 const dynamic V = const
         p/*location: test.dart;p*/.
         C/*location: a.dart;C*/.
         named/*location: null*/();
 ''');
+    }
   }
 
   test_const_invokeConstructor_named_unresolved4() async {
@@ -2332,13 +2414,23 @@
 class C<T> {}
 const V = const C.named();
 ''', allowErrors: true);
-    checkElementText(library, r'''
+    if (isAstBasedSummary) {
+      checkElementText(library, r'''
+class C<T> {
+}
+const C<dynamic> V = const
+        C/*location: test.dart;C*/.
+        named/*location: null*/();
+''');
+    } else {
+      checkElementText(library, r'''
 class C<T> {
 }
 const dynamic V = const
         C/*location: test.dart;C*/.
         named/*location: null*/();
 ''');
+    }
   }
 
   test_const_invokeConstructor_unnamed() async {
@@ -2384,11 +2476,20 @@
 import 'a.dart' as p;
 const V = const p.C();
 ''');
-    checkElementText(library, r'''
+    if (isAstBasedSummary) {
+      checkElementText(library, r'''
+import 'a.dart' as p;
+const C V = const
+        p/*location: test.dart;p*/.
+        C/*location: a.dart;C*/();
+''');
+    } else {
+      checkElementText(library, r'''
 import 'a.dart' as p;
 const C V = const
         C/*location: a.dart;C*/();
 ''');
+    }
   }
 
   test_const_invokeConstructor_unnamed_unresolved() async {
@@ -3517,11 +3618,20 @@
 import 'a.dart' as p;
 const v = const <p.C>[];
 ''');
-    checkElementText(library, r'''
+    if (isAstBasedSummary) {
+      checkElementText(library, r'''
+import 'a.dart' as p;
+const List<C> v = const <
+        p/*location: test.dart;p*/.
+        C/*location: a.dart;C*/>[];
+''');
+    } else {
+      checkElementText(library, r'''
 import 'a.dart' as p;
 const List<C> v = const <
         C/*location: a.dart;C*/>[];
 ''');
+    }
   }
 
   test_const_topLevel_typedList_typedefArgument() async {
@@ -3666,7 +3776,16 @@
   static m() {}
 }
 ''');
-    checkElementText(library, r'''
+    if (isAstBasedSummary) {
+      checkElementText(library, r'''
+class C {
+  static const () → dynamic a =
+        m/*location: test.dart;C;m*/;
+  static dynamic m() {}
+}
+''');
+    } else {
+      checkElementText(library, r'''
 class C {
   static const () → dynamic a =
         C/*location: test.dart;C*/.
@@ -3674,6 +3793,7 @@
   static dynamic m() {}
 }
 ''');
+    }
   }
 
   test_constructor_documented() async {
@@ -3824,7 +3944,19 @@
   const C() : super.aaa(1, b: 2);
 }
 ''');
-    checkElementText(library, r'''
+    if (isAstBasedSummary) {
+      checkElementText(library, r'''
+class A {
+  const A.aaa(dynamic a, {int b});
+}
+class C extends A {
+  const C() : super.
+        aaa/*location: test.dart;A;aaa*/(1,
+        b/*location: test.dart;A;aaa;b*/: 2);
+}
+''');
+    } else {
+      checkElementText(library, r'''
 class A {
   const A.aaa(dynamic a, {int b});
 }
@@ -3834,6 +3966,7 @@
         b/*location: null*/: 2);
 }
 ''');
+    }
   }
 
   test_constructor_initializers_superInvocation_unnamed() async {
@@ -3878,7 +4011,17 @@
   const C.named(a, {int b});
 }
 ''');
-    checkElementText(library, r'''
+    if (isAstBasedSummary) {
+      checkElementText(library, r'''
+class C {
+  const C() = C.named : this.
+        named/*location: test.dart;C;named*/(1,
+        b/*location: test.dart;C;named;b*/: 2);
+  const C.named(dynamic a, {int b});
+}
+''');
+    } else {
+      checkElementText(library, r'''
 class C {
   const C() = C.named : this.
         named/*location: test.dart;C;named*/(1,
@@ -3886,6 +4029,7 @@
   const C.named(dynamic a, {int b});
 }
 ''');
+    }
   }
 
   test_constructor_initializers_thisInvocation_unnamed() async {
@@ -4220,12 +4364,22 @@
   C() : this.named();
 }
 ''');
-    checkElementText(library, r'''
+    if (isAstBasedSummary) {
+      checkElementText(library, r'''
+class C {
+  C.named();
+  C() = C.named : this.
+        named/*location: test.dart;C;named*/();
+}
+''');
+    } else {
+      checkElementText(library, r'''
 class C {
   C.named();
   C() = C.named;
 }
 ''');
+    }
   }
 
   test_constructor_redirected_thisInvocation_named_generic() async {
@@ -4235,12 +4389,22 @@
   C() : this.named();
 }
 ''');
-    checkElementText(library, r'''
+    if (isAstBasedSummary) {
+      checkElementText(library, r'''
+class C<T> {
+  C.named();
+  C() = C<T>.named : this.
+        named/*location: test.dart;C;named*/();
+}
+''');
+    } else {
+      checkElementText(library, r'''
 class C<T> {
   C.named();
   C() = C<T>.named;
 }
 ''');
+    }
   }
 
   test_constructor_redirected_thisInvocation_unnamed() async {
@@ -4250,12 +4414,21 @@
   C.named() : this();
 }
 ''');
-    checkElementText(library, r'''
+    if (isAstBasedSummary) {
+      checkElementText(library, r'''
+class C {
+  C();
+  C.named() = C : this();
+}
+''');
+    } else {
+      checkElementText(library, r'''
 class C {
   C();
   C.named() = C;
 }
 ''');
+    }
   }
 
   test_constructor_redirected_thisInvocation_unnamed_generic() async {
@@ -4265,12 +4438,21 @@
   C.named() : this();
 }
 ''');
-    checkElementText(library, r'''
+    if (isAstBasedSummary) {
+      checkElementText(library, r'''
+class C<T> {
+  C();
+  C.named() = C<T> : this();
+}
+''');
+    } else {
+      checkElementText(library, r'''
 class C<T> {
   C();
   C.named() = C<T>;
 }
 ''');
+    }
   }
 
   test_constructor_withCycles_const() async {
@@ -4601,9 +4783,16 @@
   test_export_class() async {
     addLibrarySource('/a.dart', 'class C {}');
     var library = await checkLibrary('export "a.dart";');
-    checkElementText(library, r'''
+    checkElementText(
+        library,
+        r'''
 export 'a.dart';
-''');
+
+--------------------
+Exports:
+  C: a.dart;C
+''',
+        withExportScope: true);
   }
 
   test_export_class_type_alias() async {
@@ -4613,9 +4802,16 @@
 class _E {}
 ''');
     var library = await checkLibrary('export "a.dart";');
-    checkElementText(library, r'''
+    checkElementText(
+        library,
+        r'''
 export 'a.dart';
-''');
+
+--------------------
+Exports:
+  C: a.dart;C
+''',
+        withExportScope: true);
   }
 
   test_export_configurations_useDefault() async {
@@ -4629,9 +4825,16 @@
   if (dart.library.io) 'foo_io.dart'
   if (dart.library.html) 'foo_html.dart';
 ''');
-    checkElementText(library, r'''
+    checkElementText(
+        library,
+        r'''
 export 'foo.dart';
-''');
+
+--------------------
+Exports:
+  A: foo.dart;A
+''',
+        withExportScope: true);
     expect(library.exports[0].exportedLibrary.source.shortName, 'foo.dart');
   }
 
@@ -4646,9 +4849,16 @@
   if (dart.library.io) 'foo_io.dart'
   if (dart.library.html) 'foo_html.dart';
 ''');
-    checkElementText(library, r'''
+    checkElementText(
+        library,
+        r'''
 export 'foo_io.dart';
-''');
+
+--------------------
+Exports:
+  A: foo_io.dart;A
+''',
+        withExportScope: true);
     expect(library.exports[0].exportedLibrary.source.shortName, 'foo_io.dart');
   }
 
@@ -4663,9 +4873,16 @@
   if (dart.library.io) 'foo_io.dart'
   if (dart.library.html) 'foo_html.dart';
 ''');
-    checkElementText(library, r'''
+    checkElementText(
+        library,
+        r'''
 export 'foo_html.dart';
-''');
+
+--------------------
+Exports:
+  A: foo_html.dart;A
+''',
+        withExportScope: true);
     ExportElement export = library.exports[0];
     expect(export.exportedLibrary.source.shortName, 'foo_html.dart');
   }
@@ -4673,9 +4890,16 @@
   test_export_function() async {
     addLibrarySource('/a.dart', 'f() {}');
     var library = await checkLibrary('export "a.dart";');
-    checkElementText(library, r'''
+    checkElementText(
+        library,
+        r'''
 export 'a.dart';
-''');
+
+--------------------
+Exports:
+  f: a.dart;f
+''',
+        withExportScope: true);
   }
 
   test_export_getter() async {
@@ -4690,67 +4914,130 @@
     addLibrary('dart:async');
     var library =
         await checkLibrary('export "dart:async" hide Stream, Future;');
-    checkElementText(library, r'''
+    checkElementText(
+        library,
+        r'''
 export 'dart:async' hide Stream, Future;
-''');
+
+--------------------
+Exports:
+  Completer: dart:async;Completer
+  FutureOr: dart:async;FutureOr
+  StreamIterator: dart:async;dart:async/stream.dart;StreamIterator
+  StreamSubscription: dart:async;dart:async/stream.dart;StreamSubscription
+  StreamTransformer: dart:async;dart:async/stream.dart;StreamTransformer
+  Timer: dart:async;Timer
+''',
+        withExportScope: true);
   }
 
   test_export_multiple_combinators() async {
     addLibrary('dart:async');
     var library =
         await checkLibrary('export "dart:async" hide Stream show Future;');
-    checkElementText(library, r'''
+    checkElementText(
+        library,
+        r'''
 export 'dart:async' hide Stream show Future;
-''');
+
+--------------------
+Exports:
+  Future: dart:async;Future
+''',
+        withExportScope: true);
   }
 
   test_export_setter() async {
     addLibrarySource('/a.dart', 'void set f(value) {}');
     var library = await checkLibrary('export "a.dart";');
-    checkElementText(library, r'''
+    checkElementText(
+        library,
+        r'''
 export 'a.dart';
-''');
+
+--------------------
+Exports:
+  f=: a.dart;f=
+''',
+        withExportScope: true);
   }
 
   test_export_show() async {
     addLibrary('dart:async');
     var library =
         await checkLibrary('export "dart:async" show Future, Stream;');
-    checkElementText(library, r'''
+    checkElementText(
+        library,
+        r'''
 export 'dart:async' show Future, Stream;
-''');
+
+--------------------
+Exports:
+  Future: dart:async;Future
+  Stream: dart:async;dart:async/stream.dart;Stream
+''',
+        withExportScope: true);
   }
 
   test_export_typedef() async {
     addLibrarySource('/a.dart', 'typedef F();');
     var library = await checkLibrary('export "a.dart";');
-    checkElementText(library, r'''
+    checkElementText(
+        library,
+        r'''
 export 'a.dart';
-''');
+
+--------------------
+Exports:
+  F: a.dart;F
+''',
+        withExportScope: true);
   }
 
   test_export_variable() async {
     addLibrarySource('/a.dart', 'var x;');
     var library = await checkLibrary('export "a.dart";');
-    checkElementText(library, r'''
+    checkElementText(
+        library,
+        r'''
 export 'a.dart';
-''');
+
+--------------------
+Exports:
+  x: a.dart;x?
+  x=: a.dart;x=
+''',
+        withExportScope: true);
   }
 
   test_export_variable_const() async {
     addLibrarySource('/a.dart', 'const x = 0;');
     var library = await checkLibrary('export "a.dart";');
-    checkElementText(library, r'''
+    checkElementText(
+        library,
+        r'''
 export 'a.dart';
-''');
+
+--------------------
+Exports:
+  x: a.dart;x?
+''',
+        withExportScope: true);
   }
 
   test_export_variable_final() async {
     addLibrarySource('/a.dart', 'final x = 0;');
     var library = await checkLibrary('export "a.dart";');
-    checkElementText(library, r'''
+    checkElementText(
+        library,
+        r'''
 export 'a.dart';
-''');
+
+--------------------
+Exports:
+  x: a.dart;x?
+''',
+        withExportScope: true);
   }
 
   test_exportImport_configurations_useDefault() async {
@@ -4805,10 +5092,16 @@
     addLibrarySource('/a.dart', 'library a;');
     addLibrarySource('/b.dart', 'library b;');
     var library = await checkLibrary('export "a.dart"; export "b.dart";');
-    checkElementText(library, r'''
+    checkElementText(
+        library,
+        r'''
 export 'a.dart';
 export 'b.dart';
-''');
+
+--------------------
+Exports:
+''',
+        withExportScope: true);
   }
 
   test_expr_invalid_typeParameter_asPrefix() async {
@@ -6015,11 +6308,19 @@
 var a1 = foo.A();
 var a2 = foo.A.named();
 ''');
-    checkElementText(library, r'''
+    if (isAstBasedSummary) {
+      checkElementText(library, r'''
+import 'foo.dart' as foo;
+dynamic a1;
+dynamic a2;
+''');
+    } else {
+      checkElementText(library, r'''
 import 'foo.dart' as foo;
 A a1;
 A a2;
 ''');
+    }
   }
 
   test_inferredType_usesSyntheticFunctionType_functionTypedParam() async {
@@ -6773,7 +7074,18 @@
 @foo.A.named()
 class C {}
 ''');
-    checkElementText(library, r'''
+    if (isAstBasedSummary) {
+      checkElementText(library, r'''
+import 'foo.dart' as foo;
+@
+        foo/*location: test.dart;foo*/.
+        A/*location: foo.dart;A*/.
+        named/*location: foo.dart;A;named*/()
+class C {
+}
+''');
+    } else {
+      checkElementText(library, r'''
 import 'foo.dart' as foo;
 @
         A/*location: foo.dart;A*/.
@@ -6781,6 +7093,7 @@
 class C {
 }
 ''');
+    }
   }
 
   test_metadata_constructor_call_unnamed() async {
@@ -6800,13 +7113,24 @@
     addLibrarySource('/foo.dart', 'class A { const A(); }');
     var library =
         await checkLibrary('import "foo.dart" as foo; @foo.A() class C {}');
-    checkElementText(library, r'''
+    if (isAstBasedSummary) {
+      checkElementText(library, r'''
+import 'foo.dart' as foo;
+@
+        foo/*location: test.dart;foo*/.
+        A/*location: foo.dart;A*/()
+class C {
+}
+''');
+    } else {
+      checkElementText(library, r'''
 import 'foo.dart' as foo;
 @
         A/*location: foo.dart;A*/()
 class C {
 }
 ''');
+    }
   }
 
   test_metadata_constructor_call_with_args() async {
@@ -7008,13 +7332,23 @@
 
   test_metadata_invalid_classDeclaration() async {
     var library = await checkLibrary('f(_) {} @f(42) class C {}');
-    checkElementText(library, r'''
+    if (isAstBasedSummary) {
+      checkElementText(library, r'''
+@
+        f/*location: test.dart;f*/(42)
+class C {
+}
+dynamic f(dynamic _) {}
+''');
+    } else {
+      checkElementText(library, r'''
 @
         __unresolved__/*location: null*/
 class C {
 }
 dynamic f(dynamic _) {}
 ''');
+    }
   }
 
   test_metadata_libraryDirective() async {
@@ -8115,6 +8449,15 @@
 ''');
   }
 
+  test_type_invalid_unresolvedPrefix() async {
+    var library = await checkLibrary('''
+p.C v;
+''', allowErrors: true);
+    checkElementText(library, r'''
+dynamic v;
+''');
+  }
+
   test_type_reference_lib_to_lib() async {
     var library = await checkLibrary('''
 class C {}
diff --git a/pkg/analyzer/test/src/summary/summarize_ast_strong_test.dart b/pkg/analyzer/test/src/summary/summarize_ast_strong_test.dart
index b83b616..7a9c6bf 100644
--- a/pkg/analyzer/test/src/summary/summarize_ast_strong_test.dart
+++ b/pkg/analyzer/test/src/summary/summarize_ast_strong_test.dart
@@ -1,4 +1,4 @@
-// Copyright (c) 2016, the Dart project authors.  Please see the AUTHORS file
+// Copyright (c) 2016, the Dart project authors. Please see the AUTHORS file
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
 
diff --git a/pkg/analyzer/test/src/summary/summary_common.dart b/pkg/analyzer/test/src/summary/summary_common.dart
index e5a4dfb..e4043ad 100644
--- a/pkg/analyzer/test/src/summary/summary_common.dart
+++ b/pkg/analyzer/test/src/summary/summary_common.dart
@@ -805,6 +805,19 @@
     return findVariable(variableName, failIfAbsent: true);
   }
 
+  test_constExpr_binary_bitShiftRightLogical() {
+    experimentStatus = ExperimentStatus(constant_update_2018: true);
+    UnlinkedVariable variable = serializeVariableText('const v = 1 >>> 2;');
+    assertUnlinkedConst(variable.initializer.bodyExpr, '1 >>> 2', operators: [
+      UnlinkedExprOperation.pushInt,
+      UnlinkedExprOperation.pushInt,
+      UnlinkedExprOperation.bitShiftRightLogical
+    ], ints: [
+      1,
+      2
+    ]);
+  }
+
   test_apiSignature() {
     List<int> signature1;
     List<int> signature2;
@@ -7650,6 +7663,483 @@
         forTypeInferenceOnly: true);
   }
 
+  test_expr_list_for() {
+    experimentStatus = ExperimentStatus(
+        control_flow_collections: true, spread_collections: true);
+    UnlinkedVariable variable =
+        serializeVariableText('int i; var v = [for (i = 0; i < 10; i++) i];');
+    assertUnlinkedConst(
+        variable.initializer.bodyExpr, '[for (i = 0; i < 10; i++) i]',
+        isValidConst: false,
+        operators: [
+          UnlinkedExprOperation.pushInt,
+          UnlinkedExprOperation.assignToRef,
+          UnlinkedExprOperation.pushReference,
+          UnlinkedExprOperation.pushInt,
+          UnlinkedExprOperation.less,
+          UnlinkedExprOperation.assignToRef,
+          UnlinkedExprOperation.forParts,
+          UnlinkedExprOperation.pushReference,
+          UnlinkedExprOperation.forElement,
+          UnlinkedExprOperation.makeUntypedList
+        ],
+        assignmentOperators: [
+          UnlinkedExprAssignOperator.assign,
+          UnlinkedExprAssignOperator.postfixIncrement
+        ],
+        ints: [
+          0,
+          10,
+          1,
+          1
+        ],
+        referenceValidators: [
+          (EntityRef r) => checkTypeRef(r, null, 'i',
+              expectedKind: ReferenceKind.topLevelPropertyAccessor),
+          (EntityRef r) => checkTypeRef(r, null, 'i',
+              expectedKind: ReferenceKind.topLevelPropertyAccessor),
+          (EntityRef r) => checkTypeRef(r, null, 'i',
+              expectedKind: ReferenceKind.topLevelPropertyAccessor),
+          (EntityRef r) => checkTypeRef(r, null, 'i',
+              expectedKind: ReferenceKind.topLevelPropertyAccessor)
+        ]);
+  }
+
+  test_expr_list_for_each_with_declaration_typed() {
+    experimentStatus = ExperimentStatus(
+        control_flow_collections: true, spread_collections: true);
+    UnlinkedVariable variable =
+        serializeVariableText('var v = [for (int i in []) i];');
+    assertUnlinkedConst(variable.initializer.bodyExpr, '[for (int i in []) i]',
+        isValidConst: false,
+        operators: [
+          UnlinkedExprOperation.makeUntypedList,
+          UnlinkedExprOperation.forEachPartsWithTypedDeclaration,
+          UnlinkedExprOperation.pushParameter,
+          UnlinkedExprOperation.forElement,
+          UnlinkedExprOperation.makeUntypedList
+        ],
+        ints: [
+          0,
+          1
+        ],
+        strings: [
+          'i',
+          'i'
+        ],
+        referenceValidators: [
+          (EntityRef r) => checkTypeRef(r, 'dart:core', 'int')
+        ]);
+  }
+
+  test_expr_list_for_each_with_declaration_untyped() {
+    experimentStatus = ExperimentStatus(
+        control_flow_collections: true, spread_collections: true);
+    UnlinkedVariable variable =
+        serializeVariableText('var v = [for (var i in []) i];');
+    assertUnlinkedConst(variable.initializer.bodyExpr, '[for (var i in []) i]',
+        isValidConst: false,
+        operators: [
+          UnlinkedExprOperation.makeUntypedList,
+          UnlinkedExprOperation.forEachPartsWithUntypedDeclaration,
+          UnlinkedExprOperation.pushParameter,
+          UnlinkedExprOperation.forElement,
+          UnlinkedExprOperation.makeUntypedList
+        ],
+        ints: [
+          0,
+          1
+        ],
+        strings: [
+          'i',
+          'i'
+        ]);
+  }
+
+  test_expr_list_for_each_with_identifier() {
+    experimentStatus = ExperimentStatus(
+        control_flow_collections: true, spread_collections: true);
+    UnlinkedVariable variable =
+        serializeVariableText('int i; var v = [for (i in []) i];');
+    assertUnlinkedConst(variable.initializer.bodyExpr, '[for (i in []) i]',
+        isValidConst: false,
+        operators: [
+          UnlinkedExprOperation.pushReference,
+          UnlinkedExprOperation.makeUntypedList,
+          UnlinkedExprOperation.forEachPartsWithIdentifier,
+          UnlinkedExprOperation.pushReference,
+          UnlinkedExprOperation.forElement,
+          UnlinkedExprOperation.makeUntypedList
+        ],
+        ints: [
+          0,
+          1
+        ],
+        referenceValidators: [
+          (EntityRef r) => checkTypeRef(r, null, 'i',
+              expectedKind: ReferenceKind.topLevelPropertyAccessor),
+          (EntityRef r) => checkTypeRef(r, null, 'i',
+              expectedKind: ReferenceKind.topLevelPropertyAccessor)
+        ]);
+  }
+
+  test_expr_list_for_each_with_identifier_await() {
+    experimentStatus = ExperimentStatus(
+        control_flow_collections: true, spread_collections: true);
+    UnlinkedVariable variable =
+        serializeVariableText('int i; var v = [await for (i in []) i];');
+    assertUnlinkedConst(
+        variable.initializer.bodyExpr, '[await for (i in []) i]',
+        isValidConst: false,
+        operators: [
+          UnlinkedExprOperation.pushReference,
+          UnlinkedExprOperation.makeUntypedList,
+          UnlinkedExprOperation.forEachPartsWithIdentifier,
+          UnlinkedExprOperation.pushReference,
+          UnlinkedExprOperation.forElementWithAwait,
+          UnlinkedExprOperation.makeUntypedList
+        ],
+        ints: [
+          0,
+          1
+        ],
+        referenceValidators: [
+          (EntityRef r) => checkTypeRef(r, null, 'i',
+              expectedKind: ReferenceKind.topLevelPropertyAccessor),
+          (EntityRef r) => checkTypeRef(r, null, 'i',
+              expectedKind: ReferenceKind.topLevelPropertyAccessor)
+        ]);
+  }
+
+  test_expr_list_for_empty_condition() {
+    experimentStatus = ExperimentStatus(
+        control_flow_collections: true, spread_collections: true);
+    UnlinkedVariable variable =
+        serializeVariableText('int i; var v = [for (i = 0;; i++) i];');
+    assertUnlinkedConst(variable.initializer.bodyExpr, '[for (i = 0;; i++) i]',
+        isValidConst: false,
+        operators: [
+          UnlinkedExprOperation.pushInt,
+          UnlinkedExprOperation.assignToRef,
+          UnlinkedExprOperation.pushEmptyExpression,
+          UnlinkedExprOperation.assignToRef,
+          UnlinkedExprOperation.forParts,
+          UnlinkedExprOperation.pushReference,
+          UnlinkedExprOperation.forElement,
+          UnlinkedExprOperation.makeUntypedList
+        ],
+        assignmentOperators: [
+          UnlinkedExprAssignOperator.assign,
+          UnlinkedExprAssignOperator.postfixIncrement
+        ],
+        ints: [
+          0,
+          1,
+          1
+        ],
+        referenceValidators: [
+          (EntityRef r) => checkTypeRef(r, null, 'i',
+              expectedKind: ReferenceKind.topLevelPropertyAccessor),
+          (EntityRef r) => checkTypeRef(r, null, 'i',
+              expectedKind: ReferenceKind.topLevelPropertyAccessor),
+          (EntityRef r) => checkTypeRef(r, null, 'i',
+              expectedKind: ReferenceKind.topLevelPropertyAccessor)
+        ]);
+  }
+
+  test_expr_list_for_empty_initializer() {
+    experimentStatus = ExperimentStatus(
+        control_flow_collections: true, spread_collections: true);
+    UnlinkedVariable variable =
+        serializeVariableText('int i; var v = [for (; i < 10; i++) i];');
+    assertUnlinkedConst(
+        variable.initializer.bodyExpr, '[for (; i < 10; i++) i]',
+        isValidConst: false,
+        operators: [
+          UnlinkedExprOperation.pushEmptyExpression,
+          UnlinkedExprOperation.pushReference,
+          UnlinkedExprOperation.pushInt,
+          UnlinkedExprOperation.less,
+          UnlinkedExprOperation.assignToRef,
+          UnlinkedExprOperation.forParts,
+          UnlinkedExprOperation.pushReference,
+          UnlinkedExprOperation.forElement,
+          UnlinkedExprOperation.makeUntypedList
+        ],
+        assignmentOperators: [
+          UnlinkedExprAssignOperator.postfixIncrement
+        ],
+        ints: [
+          10,
+          1,
+          1
+        ],
+        referenceValidators: [
+          (EntityRef r) => checkTypeRef(r, null, 'i',
+              expectedKind: ReferenceKind.topLevelPropertyAccessor),
+          (EntityRef r) => checkTypeRef(r, null, 'i',
+              expectedKind: ReferenceKind.topLevelPropertyAccessor),
+          (EntityRef r) => checkTypeRef(r, null, 'i',
+              expectedKind: ReferenceKind.topLevelPropertyAccessor)
+        ]);
+  }
+
+  test_expr_list_for_two_updaters() {
+    experimentStatus = ExperimentStatus(
+        control_flow_collections: true, spread_collections: true);
+    UnlinkedVariable variable = serializeVariableText(
+        'int i; int j; var v = [for (i = 0; i < 10; i++, j++) i];');
+    assertUnlinkedConst(
+        variable.initializer.bodyExpr, '[for (i = 0; i < 10; i++, j++) i]',
+        isValidConst: false,
+        operators: [
+          UnlinkedExprOperation.pushInt,
+          UnlinkedExprOperation.assignToRef,
+          UnlinkedExprOperation.pushReference,
+          UnlinkedExprOperation.pushInt,
+          UnlinkedExprOperation.less,
+          UnlinkedExprOperation.assignToRef,
+          UnlinkedExprOperation.assignToRef,
+          UnlinkedExprOperation.forParts,
+          UnlinkedExprOperation.pushReference,
+          UnlinkedExprOperation.forElement,
+          UnlinkedExprOperation.makeUntypedList
+        ],
+        assignmentOperators: [
+          UnlinkedExprAssignOperator.assign,
+          UnlinkedExprAssignOperator.postfixIncrement,
+          UnlinkedExprAssignOperator.postfixIncrement
+        ],
+        ints: [
+          0,
+          10,
+          2,
+          1
+        ],
+        referenceValidators: [
+          (EntityRef r) => checkTypeRef(r, null, 'i',
+              expectedKind: ReferenceKind.topLevelPropertyAccessor),
+          (EntityRef r) => checkTypeRef(r, null, 'i',
+              expectedKind: ReferenceKind.topLevelPropertyAccessor),
+          (EntityRef r) => checkTypeRef(r, null, 'i',
+              expectedKind: ReferenceKind.topLevelPropertyAccessor),
+          (EntityRef r) => checkTypeRef(r, null, 'j',
+              expectedKind: ReferenceKind.topLevelPropertyAccessor),
+          (EntityRef r) => checkTypeRef(r, null, 'i',
+              expectedKind: ReferenceKind.topLevelPropertyAccessor)
+        ]);
+  }
+
+  test_expr_list_for_with_one_declaration_typed() {
+    experimentStatus = ExperimentStatus(
+        control_flow_collections: true, spread_collections: true);
+    UnlinkedVariable variable =
+        serializeVariableText('var v = [for (int i = 0; i < 10; i++) i];');
+    assertUnlinkedConst(
+        variable.initializer.bodyExpr, '[for (int i = 0; i < 10; i++) i]',
+        isValidConst: false,
+        operators: [
+          UnlinkedExprOperation.variableDeclarationStart,
+          UnlinkedExprOperation.pushInt,
+          UnlinkedExprOperation.variableDeclaration,
+          UnlinkedExprOperation.forInitializerDeclarationsTyped,
+          UnlinkedExprOperation.pushParameter,
+          UnlinkedExprOperation.pushInt,
+          UnlinkedExprOperation.less,
+          UnlinkedExprOperation.assignToParameter,
+          UnlinkedExprOperation.forParts,
+          UnlinkedExprOperation.pushParameter,
+          UnlinkedExprOperation.forElement,
+          UnlinkedExprOperation.makeUntypedList
+        ],
+        assignmentOperators: [
+          UnlinkedExprAssignOperator.postfixIncrement
+        ],
+        ints: [
+          0,
+          0,
+          1,
+          10,
+          1,
+          1
+        ],
+        strings: [
+          'i',
+          'i',
+          'i',
+          'i'
+        ],
+        referenceValidators: [
+          (EntityRef r) => checkTypeRef(r, 'dart:core', 'int')
+        ]);
+  }
+
+  test_expr_list_for_with_one_declaration_untyped() {
+    experimentStatus = ExperimentStatus(
+        control_flow_collections: true, spread_collections: true);
+    UnlinkedVariable variable =
+        serializeVariableText('var v = [for (var i = 0; i < 10; i++) i];');
+    assertUnlinkedConst(
+        variable.initializer.bodyExpr, '[for (var i = 0; i < 10; i++) i]',
+        isValidConst: false,
+        operators: [
+          UnlinkedExprOperation.variableDeclarationStart,
+          UnlinkedExprOperation.pushInt,
+          UnlinkedExprOperation.variableDeclaration,
+          UnlinkedExprOperation.forInitializerDeclarationsUntyped,
+          UnlinkedExprOperation.pushParameter,
+          UnlinkedExprOperation.pushInt,
+          UnlinkedExprOperation.less,
+          UnlinkedExprOperation.assignToParameter,
+          UnlinkedExprOperation.forParts,
+          UnlinkedExprOperation.pushParameter,
+          UnlinkedExprOperation.forElement,
+          UnlinkedExprOperation.makeUntypedList
+        ],
+        assignmentOperators: [
+          UnlinkedExprAssignOperator.postfixIncrement
+        ],
+        ints: [
+          0,
+          0,
+          1,
+          10,
+          1,
+          1
+        ],
+        strings: [
+          'i',
+          'i',
+          'i',
+          'i'
+        ]);
+  }
+
+  test_expr_list_for_with_two_declarations_untyped() {
+    experimentStatus = ExperimentStatus(
+        control_flow_collections: true, spread_collections: true);
+    UnlinkedVariable variable = serializeVariableText(
+        'var v = [for (var i = 0, j = 0; i < 10; i++) i];');
+    assertUnlinkedConst(variable.initializer.bodyExpr,
+        '[for (var i = 0, j = 0; i < 10; i++) i]',
+        isValidConst: false,
+        operators: [
+          UnlinkedExprOperation.variableDeclarationStart,
+          UnlinkedExprOperation.pushInt,
+          UnlinkedExprOperation.variableDeclaration,
+          UnlinkedExprOperation.variableDeclarationStart,
+          UnlinkedExprOperation.pushInt,
+          UnlinkedExprOperation.variableDeclaration,
+          UnlinkedExprOperation.forInitializerDeclarationsUntyped,
+          UnlinkedExprOperation.pushParameter,
+          UnlinkedExprOperation.pushInt,
+          UnlinkedExprOperation.less,
+          UnlinkedExprOperation.assignToParameter,
+          UnlinkedExprOperation.forParts,
+          UnlinkedExprOperation.pushParameter,
+          UnlinkedExprOperation.forElement,
+          UnlinkedExprOperation.makeUntypedList
+        ],
+        assignmentOperators: [
+          UnlinkedExprAssignOperator.postfixIncrement
+        ],
+        ints: [
+          0,
+          0,
+          0,
+          0,
+          2,
+          10,
+          1,
+          1
+        ],
+        strings: [
+          'i',
+          'j',
+          'i',
+          'i',
+          'i'
+        ]);
+  }
+
+  test_expr_list_for_with_uninitialized_declaration_untyped() {
+    experimentStatus = ExperimentStatus(
+        control_flow_collections: true, spread_collections: true);
+    UnlinkedVariable variable =
+        serializeVariableText('var v = [for (var i; i < 10; i++) i];');
+    assertUnlinkedConst(
+        variable.initializer.bodyExpr, '[for (var i; i < 10; i++) i]',
+        isValidConst: false,
+        operators: [
+          UnlinkedExprOperation.variableDeclarationStart,
+          UnlinkedExprOperation.pushEmptyExpression,
+          UnlinkedExprOperation.variableDeclaration,
+          UnlinkedExprOperation.forInitializerDeclarationsUntyped,
+          UnlinkedExprOperation.pushParameter,
+          UnlinkedExprOperation.pushInt,
+          UnlinkedExprOperation.less,
+          UnlinkedExprOperation.assignToParameter,
+          UnlinkedExprOperation.forParts,
+          UnlinkedExprOperation.pushParameter,
+          UnlinkedExprOperation.forElement,
+          UnlinkedExprOperation.makeUntypedList
+        ],
+        assignmentOperators: [
+          UnlinkedExprAssignOperator.postfixIncrement
+        ],
+        ints: [
+          0,
+          1,
+          10,
+          1,
+          1
+        ],
+        strings: [
+          'i',
+          'i',
+          'i',
+          'i'
+        ]);
+  }
+
+  test_expr_list_for_zero_updaters() {
+    experimentStatus = ExperimentStatus(
+        control_flow_collections: true, spread_collections: true);
+    UnlinkedVariable variable =
+        serializeVariableText('int i; var v = [for (i = 0; i < 10;) i];');
+    assertUnlinkedConst(
+        variable.initializer.bodyExpr, '[for (i = 0; i < 10;) i]',
+        isValidConst: false,
+        operators: [
+          UnlinkedExprOperation.pushInt,
+          UnlinkedExprOperation.assignToRef,
+          UnlinkedExprOperation.pushReference,
+          UnlinkedExprOperation.pushInt,
+          UnlinkedExprOperation.less,
+          UnlinkedExprOperation.forParts,
+          UnlinkedExprOperation.pushReference,
+          UnlinkedExprOperation.forElement,
+          UnlinkedExprOperation.makeUntypedList
+        ],
+        assignmentOperators: [
+          UnlinkedExprAssignOperator.assign
+        ],
+        ints: [
+          0,
+          10,
+          0,
+          1
+        ],
+        referenceValidators: [
+          (EntityRef r) => checkTypeRef(r, null, 'i',
+              expectedKind: ReferenceKind.topLevelPropertyAccessor),
+          (EntityRef r) => checkTypeRef(r, null, 'i',
+              expectedKind: ReferenceKind.topLevelPropertyAccessor),
+          (EntityRef r) => checkTypeRef(r, null, 'i',
+              expectedKind: ReferenceKind.topLevelPropertyAccessor)
+        ]);
+  }
+
   test_expr_makeTypedList() {
     UnlinkedVariable variable =
         serializeVariableText('var v = <int>[11, 22, 33];');
@@ -7742,6 +8232,101 @@
         forTypeInferenceOnly: true);
   }
 
+  test_expr_map_for() {
+    experimentStatus = ExperimentStatus(
+        control_flow_collections: true, spread_collections: true);
+    UnlinkedVariable variable = serializeVariableText(
+        'int i; var v = {1: 2, for (i = 0; i < 10; i++) i: i};');
+    assertUnlinkedConst(
+        variable.initializer.bodyExpr, '{1: 2, for (i = 0; i < 10; i++) i: i}',
+        isValidConst: false,
+        operators: [
+          UnlinkedExprOperation.pushInt,
+          UnlinkedExprOperation.pushInt,
+          UnlinkedExprOperation.makeMapLiteralEntry,
+          UnlinkedExprOperation.pushInt,
+          UnlinkedExprOperation.assignToRef,
+          UnlinkedExprOperation.pushReference,
+          UnlinkedExprOperation.pushInt,
+          UnlinkedExprOperation.less,
+          UnlinkedExprOperation.assignToRef,
+          UnlinkedExprOperation.forParts,
+          UnlinkedExprOperation.pushReference,
+          UnlinkedExprOperation.pushReference,
+          UnlinkedExprOperation.makeMapLiteralEntry,
+          UnlinkedExprOperation.forElement,
+          UnlinkedExprOperation.makeUntypedSetOrMap
+        ],
+        assignmentOperators: [
+          UnlinkedExprAssignOperator.assign,
+          UnlinkedExprAssignOperator.postfixIncrement
+        ],
+        ints: [
+          1,
+          2,
+          0,
+          10,
+          1,
+          2
+        ],
+        referenceValidators: [
+          (EntityRef r) => checkTypeRef(r, null, 'i',
+              expectedKind: ReferenceKind.topLevelPropertyAccessor),
+          (EntityRef r) => checkTypeRef(r, null, 'i',
+              expectedKind: ReferenceKind.topLevelPropertyAccessor),
+          (EntityRef r) => checkTypeRef(r, null, 'i',
+              expectedKind: ReferenceKind.topLevelPropertyAccessor),
+          (EntityRef r) => checkTypeRef(r, null, 'i',
+              expectedKind: ReferenceKind.topLevelPropertyAccessor),
+          (EntityRef r) => checkTypeRef(r, null, 'i',
+              expectedKind: ReferenceKind.topLevelPropertyAccessor)
+        ]);
+  }
+
+  test_expr_set_for() {
+    experimentStatus = ExperimentStatus(
+        control_flow_collections: true, spread_collections: true);
+    UnlinkedVariable variable = serializeVariableText(
+        'int i; var v = {1, for (i = 0; i < 10; i++) i};');
+    assertUnlinkedConst(
+        variable.initializer.bodyExpr, '{1, for (i = 0; i < 10; i++) i}',
+        isValidConst: false,
+        operators: [
+          UnlinkedExprOperation.pushInt,
+          UnlinkedExprOperation.pushInt,
+          UnlinkedExprOperation.assignToRef,
+          UnlinkedExprOperation.pushReference,
+          UnlinkedExprOperation.pushInt,
+          UnlinkedExprOperation.less,
+          UnlinkedExprOperation.assignToRef,
+          UnlinkedExprOperation.forParts,
+          UnlinkedExprOperation.pushReference,
+          UnlinkedExprOperation.forElement,
+          UnlinkedExprOperation.makeUntypedSetOrMap
+        ],
+        assignmentOperators: [
+          UnlinkedExprAssignOperator.assign,
+          UnlinkedExprAssignOperator.postfixIncrement
+        ],
+        ints: [
+          1,
+          0,
+          10,
+          1,
+          2
+        ],
+        referenceValidators: [
+          (EntityRef r) => checkTypeRef(r, null, 'i',
+              expectedKind: ReferenceKind.topLevelPropertyAccessor),
+          (EntityRef r) => checkTypeRef(r, null, 'i',
+              expectedKind: ReferenceKind.topLevelPropertyAccessor),
+          (EntityRef r) => checkTypeRef(r, null, 'i',
+              expectedKind: ReferenceKind.topLevelPropertyAccessor),
+          (EntityRef r) => checkTypeRef(r, null, 'i',
+              expectedKind: ReferenceKind.topLevelPropertyAccessor)
+        ]);
+  }
+
   test_expr_super() {
     UnlinkedVariable variable = serializeVariableText('''
 final v = super;
@@ -11060,7 +11645,8 @@
     var errorListener = AnalysisErrorListener.NULL_LISTENER;
     var reader = new CharSequenceReader(sourceText);
     var stringSource = new StringSource(sourceText, null);
-    var scanner = new Scanner(stringSource, reader, errorListener);
+    var scanner = new Scanner(stringSource, reader, errorListener)
+      ..enableGtGtGt = true;
     var startToken = scanner.tokenize();
     var parser = new Parser(stringSource, errorListener)
       ..enableNonNullable = experimentStatus.non_nullable;
diff --git a/pkg/analyzer/test/src/summary/test_strategies.dart b/pkg/analyzer/test/src/summary/test_strategies.dart
index eed8b58..bc55e22 100644
--- a/pkg/analyzer/test/src/summary/test_strategies.dart
+++ b/pkg/analyzer/test/src/summary/test_strategies.dart
@@ -1,4 +1,4 @@
-// Copyright (c) 2018, the Dart project authors.  Please see the AUTHORS file
+// Copyright (c) 2018, the Dart project authors. Please see the AUTHORS file
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
 
@@ -41,13 +41,15 @@
   experimentStatus ??= ExperimentStatus();
   CharSequenceReader reader = new CharSequenceReader(text);
   Scanner scanner =
-      new Scanner(null, reader, AnalysisErrorListener.NULL_LISTENER);
+      new Scanner(null, reader, AnalysisErrorListener.NULL_LISTENER)
+        ..enableGtGtGt = experimentStatus.constant_update_2018;
   Token token = scanner.tokenize();
   Parser parser = new Parser(
       NonExistingSource.unknown, AnalysisErrorListener.NULL_LISTENER)
     ..enableNonNullable = experimentStatus.non_nullable
     ..enableSpreadCollections = experimentStatus.spread_collections
-    ..enableControlFlowCollections = experimentStatus.control_flow_collections;
+    ..enableControlFlowCollections = experimentStatus.control_flow_collections
+    ..enableTripleShift = experimentStatus.triple_shift;
   CompilationUnit unit = parser.parseCompilationUnit(token);
   unit.lineInfo = new LineInfo(scanner.lineStarts);
   return unit;
diff --git a/pkg/analyzer/test/src/summary2/ast_binary_writer_integration_test.dart b/pkg/analyzer/test/src/summary2/ast_binary_writer_integration_test.dart
new file mode 100644
index 0000000..efe0133
--- /dev/null
+++ b/pkg/analyzer/test/src/summary2/ast_binary_writer_integration_test.dart
@@ -0,0 +1,125 @@
+// Copyright (c) 2019, the Dart project authors. Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+import 'dart:io';
+
+import 'package:analyzer/file_system/physical_file_system.dart';
+import 'package:analyzer/source/line_info.dart';
+import 'package:analyzer/src/summary/idl.dart';
+import 'package:analyzer/src/summary2/ast_binary_reader.dart';
+import 'package:analyzer/src/summary2/ast_binary_writer.dart';
+import 'package:analyzer/src/summary2/ast_text_printer.dart';
+import 'package:analyzer/src/summary2/linked_bundle_context.dart';
+import 'package:analyzer/src/summary2/linked_element_factory.dart';
+import 'package:analyzer/src/summary2/linked_unit_context.dart';
+import 'package:analyzer/src/summary2/linking_bundle_context.dart';
+import 'package:analyzer/src/summary2/reference.dart';
+import 'package:analyzer/src/summary2/tokens_context.dart';
+import 'package:analyzer/src/summary2/tokens_writer.dart';
+import 'package:front_end/src/testing/package_root.dart' as package_root;
+import 'package:test/test.dart';
+
+import '../dart/ast/parse_base.dart';
+
+main() {
+  group('AstBinaryWriter |', () {
+    _buildTests();
+  });
+}
+
+/// Parse the [code] into AST, serialize using [AstBinaryWriter], read using
+/// [AstBinaryReader], and dump back into code. The resulting code must be
+/// the same as the input [code].
+///
+/// Whitespaces and newlines are normalized and ignored.
+/// Files with parsing errors are silently skipped.
+void _assertCode(ParseBase base, String code) {
+  code = code.trimRight();
+  code = code.replaceAll('\t', ' ');
+  code = code.replaceAll('\r\n', '\n');
+  code = code.replaceAll('\r', '\n');
+
+  LineInfo lineInfo;
+  LinkedNodeReferences nodeReferences;
+  UnlinkedTokens unlinkedTokens;
+  LinkedNode unitLinkedNode;
+  {
+    var path = base.newFile('/home/test/lib/test.dart', content: code).path;
+
+    ParseResult parseResult;
+    try {
+      parseResult = base.parseUnit(path);
+    } catch (e) {
+      return;
+    }
+
+    // Code with parsing errors cannot be restored.
+    if (parseResult.errors.isNotEmpty) {
+      return;
+    }
+
+    lineInfo = parseResult.lineInfo;
+    var originalUnit = parseResult.unit;
+
+    TokensResult tokensResult = TokensWriter().writeTokens(
+      originalUnit.beginToken,
+      originalUnit.endToken,
+    );
+    var tokensContext = tokensResult.toContext();
+
+    var rootReference = Reference.root();
+    var dynamicRef = rootReference.getChild('dart:core').getChild('dynamic');
+
+    var linkingBundleContext = LinkingBundleContext(dynamicRef);
+    var writer = new AstBinaryWriter(linkingBundleContext, tokensContext);
+    unitLinkedNode = writer.writeNode(originalUnit);
+
+    unlinkedTokens = tokensResult.tokens;
+    nodeReferences = linkingBundleContext.referencesBuilder;
+  }
+
+  var rootReference = Reference.root();
+  var bundleContext = LinkedBundleContext(
+    LinkedElementFactory(null, null, rootReference),
+    nodeReferences,
+  );
+  var tokensContext = TokensContext(unlinkedTokens);
+  var unitContext = LinkedUnitContext(bundleContext, tokensContext);
+
+  var reader = AstBinaryReader(unitContext);
+  var deserializedUnit = reader.readNode(unitLinkedNode);
+
+  var buffer = StringBuffer();
+  deserializedUnit.accept(
+    AstTextPrinter(buffer, lineInfo),
+  );
+
+  expect(buffer.toString(), code);
+}
+
+void _buildTests() {
+  var provider = PhysicalResourceProvider.INSTANCE;
+  var pathContext = provider.pathContext;
+
+  var packageRoot = pathContext.normalize(package_root.packageRoot);
+  var dartFiles = Directory(packageRoot)
+      .listSync(recursive: true)
+      .whereType<File>()
+      .where((e) => e.path.endsWith('.dart'))
+      .toList();
+
+  var base = ParseBase();
+  for (var file in dartFiles) {
+    // TODO(scheglov) https://github.com/dart-lang/sdk/issues/36262
+    if (file.path.endsWith('issue_31198.dart')) {
+      continue;
+    }
+
+    var relPath = pathContext.relative(file.path, from: packageRoot);
+    test(relPath, () {
+      var code = file.readAsStringSync();
+      _assertCode(base, code);
+    });
+  }
+}
diff --git a/pkg/analyzer/test/src/summary2/ast_text_printer_integration_test.dart b/pkg/analyzer/test/src/summary2/ast_text_printer_integration_test.dart
new file mode 100644
index 0000000..48bbada
--- /dev/null
+++ b/pkg/analyzer/test/src/summary2/ast_text_printer_integration_test.dart
@@ -0,0 +1,44 @@
+// Copyright (c) 2019, the Dart project authors. Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+import 'dart:io';
+
+import 'package:analyzer/file_system/physical_file_system.dart';
+import 'package:front_end/src/testing/package_root.dart' as package_root;
+import 'package:test/test.dart';
+
+import '../dart/ast/parse_base.dart';
+import 'ast_text_printer_test.dart';
+
+main() {
+  group('Parse and print AST |', () {
+    _buildTests();
+  });
+}
+
+void _buildTests() {
+  var provider = PhysicalResourceProvider.INSTANCE;
+  var pathContext = provider.pathContext;
+
+  var packageRoot = pathContext.normalize(package_root.packageRoot);
+  var dartFiles = Directory(packageRoot)
+      .listSync(recursive: true)
+      .whereType<File>()
+      .where((e) => e.path.endsWith('.dart'))
+      .toList();
+
+  var base = ParseBase();
+  for (var file in dartFiles) {
+    // TODO(scheglov) https://github.com/dart-lang/sdk/issues/36262
+    if (file.path.endsWith('issue_31198.dart')) {
+      continue;
+    }
+
+    var relPath = pathContext.relative(file.path, from: packageRoot);
+    test(relPath, () {
+      var code = file.readAsStringSync();
+      assertParseCodeAndPrintAst(base, code, mightHasParseErrors: true);
+    });
+  }
+}
diff --git a/pkg/analyzer/test/src/summary2/ast_text_printer_test.dart b/pkg/analyzer/test/src/summary2/ast_text_printer_test.dart
new file mode 100644
index 0000000..7e04023
--- /dev/null
+++ b/pkg/analyzer/test/src/summary2/ast_text_printer_test.dart
@@ -0,0 +1,124 @@
+// Copyright (c) 2019, the Dart project authors. Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+import 'package:analyzer/src/dart/analysis/experiments.dart';
+import 'package:analyzer/src/generated/engine.dart';
+import 'package:analyzer/src/summary2/ast_text_printer.dart';
+import 'package:test/test.dart';
+import 'package:test_reflective_loader/test_reflective_loader.dart';
+
+import '../dart/ast/parse_base.dart';
+
+main() {
+  defineReflectiveSuite(() {
+    defineReflectiveTests(AstTextPrinterTest);
+    defineReflectiveTests(AstTextPrinterWithUiAsCodeTest);
+  });
+}
+
+/// Assert that the [code] parsed into AST, when it does not have parse errors,
+/// and printed with [AstTextPrinter], gives exactly the same [code].
+///
+/// Whitespaces and newlines are normalized and ignored.
+void assertParseCodeAndPrintAst(ParseBase base, String code,
+    {bool mightHasParseErrors: false}) {
+  code = code.trimRight();
+  code = code.replaceAll('\t', ' ');
+  code = code.replaceAll('\r\n', '\n');
+  code = code.replaceAll('\r', '\n');
+
+  var path = base.newFile('/home/test/lib/test.dart', content: code).path;
+
+  ParseResult parseResult;
+  try {
+    parseResult = base.parseUnit(path);
+  } catch (e) {
+    return;
+  }
+
+  // Code with parsing errors cannot be restored.
+  if (parseResult.errors.isNotEmpty) {
+    if (mightHasParseErrors) return;
+    expect(parseResult.errors, isEmpty);
+  }
+
+  var buffer = StringBuffer();
+  parseResult.unit.accept(
+    AstTextPrinter(buffer, parseResult.lineInfo),
+  );
+
+//    print('---------------------');
+//    print(buffer.toString());
+//    print('---------------------');
+  expect(buffer.toString(), code);
+}
+
+@reflectiveTest
+class AstTextPrinterTest extends ParseBase {
+  test_commentOnly() async {
+    assertParseCodeAndPrintAst(this, r'''
+// aaa
+// bbb
+''');
+  }
+
+  test_simple() async {
+    assertParseCodeAndPrintAst(this, r'''
+class C {
+  void foo() {
+    1;
+    2 + 3;
+  }
+}
+''');
+  }
+
+  test_spaces_emptyLine() async {
+    assertParseCodeAndPrintAst(this, '''
+class A {}
+${' ' * 2}
+class B {}
+''');
+  }
+}
+
+@reflectiveTest
+class AstTextPrinterWithUiAsCodeTest extends ParseBase {
+  @override
+  AnalysisOptionsImpl get analysisOptions => AnalysisOptionsImpl()
+    ..enabledExperiments = [
+      EnableString.control_flow_collections,
+      EnableString.spread_collections,
+    ];
+
+  test_forElement() async {
+    assertParseCodeAndPrintAst(this, r'''
+var _ = [1, for (var v in [2, 3, 4]) v, 5];
+''');
+  }
+
+  test_ifElement_then() async {
+    assertParseCodeAndPrintAst(this, r'''
+var _ = [1, if (true) 2, 3];
+''');
+  }
+
+  test_ifElement_thenElse() async {
+    assertParseCodeAndPrintAst(this, r'''
+var _ = [1, if (true) 2 else 3, 4];
+''');
+  }
+
+  test_spreadElement() async {
+    assertParseCodeAndPrintAst(this, r'''
+var _ = [1, ...[2, 3], 4];
+''');
+  }
+
+  test_spreadElement_nullable() async {
+    assertParseCodeAndPrintAst(this, r'''
+var _ = [1, ...?[2, 3], 4];
+''');
+  }
+}
diff --git a/pkg/analyzer/test/src/summary2/test_all.dart b/pkg/analyzer/test/src/summary2/test_all.dart
index f77acf5..d7b4c0b 100644
--- a/pkg/analyzer/test/src/summary2/test_all.dart
+++ b/pkg/analyzer/test/src/summary2/test_all.dart
@@ -5,9 +5,11 @@
 import 'package:test_reflective_loader/test_reflective_loader.dart';
 
 import 'ast_binary_writer_test.dart' as ast_binary_writer;
+import 'ast_text_printer_test.dart' as ast_text_printer;
 
 main() {
   defineReflectiveSuite(() {
     ast_binary_writer.main();
+    ast_text_printer.main();
   }, name: 'summary2');
 }
diff --git a/pkg/analyzer/test/src/task/options_test.dart b/pkg/analyzer/test/src/task/options_test.dart
index 8032e06..93af17b 100644
--- a/pkg/analyzer/test/src/task/options_test.dart
+++ b/pkg/analyzer/test/src/task/options_test.dart
@@ -36,9 +36,6 @@
   });
 }
 
-final isGenerateOptionsErrorsTask =
-    new TypeMatcher<GenerateOptionsErrorsTask>();
-
 @reflectiveTest
 class ContextConfigurationTest {
   final AnalysisOptions analysisOptions = AnalysisOptionsImpl();
@@ -201,7 +198,6 @@
         removeCode(StrongModeCode.INVALID_SUPER_INVOCATION);
         removeCode(StrongModeCode.NON_GROUND_TYPE_CHECK_INFO);
         removeCode(StrongModeCode.DYNAMIC_INVOKE);
-        removeCode(StrongModeCode.INVALID_FIELD_OVERRIDE);
         removeCode(StrongModeCode.IMPLICIT_DYNAMIC_PARAMETER);
         removeCode(StrongModeCode.IMPLICIT_DYNAMIC_RETURN);
         removeCode(StrongModeCode.IMPLICIT_DYNAMIC_VARIABLE);
@@ -212,14 +208,12 @@
         removeCode(StrongModeCode.IMPLICIT_DYNAMIC_FUNCTION);
         removeCode(StrongModeCode.IMPLICIT_DYNAMIC_METHOD);
         removeCode(StrongModeCode.IMPLICIT_DYNAMIC_INVOKE);
-        removeCode(StrongModeCode.NO_DEFAULT_BOUNDS);
         removeCode(StrongModeCode.NOT_INSTANTIATED_BOUND);
         removeCode(StrongModeCode.TOP_LEVEL_CYCLE);
         removeCode(StrongModeCode.TOP_LEVEL_FUNCTION_LITERAL_BLOCK);
         removeCode(StrongModeCode.TOP_LEVEL_IDENTIFIER_NO_TYPE);
         removeCode(StrongModeCode.TOP_LEVEL_INSTANCE_GETTER);
         removeCode(StrongModeCode.TOP_LEVEL_INSTANCE_METHOD);
-        removeCode(StrongModeCode.TOP_LEVEL_UNSUPPORTED);
       } else if (errorType == TodoCode) {
         declaredNames.remove('TODO_REGEX');
       }
diff --git a/pkg/analyzer/test/src/task/strong/checker_test.dart b/pkg/analyzer/test/src/task/strong/checker_test.dart
index d56773e..972e5ad 100644
--- a/pkg/analyzer/test/src/task/strong/checker_test.dart
+++ b/pkg/analyzer/test/src/task/strong/checker_test.dart
@@ -2,6 +2,7 @@
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
 
+import 'package:analyzer/src/dart/analysis/experiments.dart';
 import 'package:test_reflective_loader/test_reflective_loader.dart';
 
 import 'strong_test_helper.dart';
@@ -9,6 +10,7 @@
 void main() {
   defineReflectiveSuite(() {
     defineReflectiveTests(CheckerTest);
+    defineReflectiveTests(CheckerWithUiAsCodeTest);
   });
 }
 
@@ -4511,3 +4513,631 @@
     ''', name: '/meta.dart');
   }
 }
+
+@reflectiveTest
+class CheckerWithUiAsCodeTest extends AbstractStrongTest {
+  @override
+  List<String> get enabledExperiments =>
+      [EnableString.spread_collections, EnableString.control_flow_collections];
+
+  @override
+  bool get enableNewAnalysisDriver => true;
+
+  test_list_ifElement_dynamicCondition_disableImplicitCasts() async {
+    addFile(r'''
+dynamic c;
+void main() {
+  <int>[if (/*error:NON_BOOL_CONDITION*/c) 0];
+}
+''');
+    await check(implicitCasts: false);
+  }
+
+  test_list_ifElement_dynamicCondition_implicitCasts() async {
+    addFile(r'''
+dynamic c;
+void main() {
+  <int>[if (/*info:DYNAMIC_CAST*/c) 0];
+}
+''');
+    await check();
+  }
+
+  test_list_ifElement_falseBranch_dynamic_disableImplicitCasts() async {
+    addFile(r'''
+bool c;
+dynamic dyn;
+void main() {
+  <int>[if (c) 0 else /*error:LIST_ELEMENT_TYPE_NOT_ASSIGNABLE*/dyn];
+}
+''');
+    await check(implicitCasts: false);
+  }
+
+  test_list_ifElement_falseBranch_dynamic_implicitCasts() async {
+    addFile(r'''
+bool c;
+dynamic dyn;
+void main() {
+  <int>[if (c) 0 else /*info:DYNAMIC_CAST*/dyn];
+}
+''');
+    await check();
+  }
+
+  test_list_ifElement_falseBranch_supertype_disableImplicitCasts() async {
+    addFile(r'''
+bool c;
+num someNum;
+void main() {
+  <int>[if (c) 0 else /*error:LIST_ELEMENT_TYPE_NOT_ASSIGNABLE*/someNum];
+}
+''');
+    await check(implicitCasts: false);
+  }
+
+  test_list_ifElement_falseBranch_supertype_implicitCasts() async {
+    addFile(r'''
+bool c;
+num someNum;
+void main() {
+  <int>[if (c) 0 else /*info:DOWN_CAST_IMPLICIT*/someNum];
+}
+''');
+    await check();
+  }
+
+  test_list_ifElement_objectCondition_disableImplicitCasts() async {
+    addFile(r'''
+Object c;
+void main() {
+  <int>[if (/*error:NON_BOOL_CONDITION*/c) 0];
+}
+''');
+    await check(implicitCasts: false);
+  }
+
+  test_list_ifElement_objectCondition_implicitCasts() async {
+    addFile(r'''
+Object c;
+void main() {
+  <int>[if (/*info:DOWN_CAST_IMPLICIT*/c) 0];
+}
+''');
+    await check();
+  }
+
+  test_list_ifElement_trueBranch_dynamic_disableImplicitCasts() async {
+    addFile(r'''
+bool c;
+dynamic dyn;
+void main() {
+  <int>[if (c) /*error:LIST_ELEMENT_TYPE_NOT_ASSIGNABLE*/dyn];
+}
+''');
+    await check(implicitCasts: false);
+  }
+
+  test_list_ifElement_trueBranch_dynamic_implicitCasts() async {
+    addFile(r'''
+bool c;
+dynamic dyn;
+void main() {
+  <int>[if (c) /*info:DYNAMIC_CAST*/dyn];
+}
+''');
+    await check();
+  }
+
+  test_list_ifElement_trueBranch_supertype_disableImplicitCasts() async {
+    addFile(r'''
+bool c;
+num someNum;
+void main() {
+  <int>[if (c) /*error:LIST_ELEMENT_TYPE_NOT_ASSIGNABLE*/someNum];
+}
+''');
+    await check(implicitCasts: false);
+  }
+
+  test_list_ifElement_trueBranch_supertype_implicitCasts() async {
+    addFile(r'''
+bool c;
+num someNum;
+void main() {
+  <int>[if (c) /*info:DOWN_CAST_IMPLICIT*/someNum];
+}
+''');
+    await check();
+  }
+
+  test_map_ifElement_dynamicCondition_disableImplicitCasts() async {
+    addFile(r'''
+dynamic c;
+void main() {
+  <int, int>{if (/*error:NON_BOOL_CONDITION*/c) 0: 0};
+}
+''');
+    await check(implicitCasts: false);
+  }
+
+  test_map_ifElement_dynamicCondition_implicitCasts() async {
+    addFile(r'''
+dynamic c;
+void main() {
+  <int, int>{if (/*info:DYNAMIC_CAST*/c) 0: 0};
+}
+''');
+    await check();
+  }
+
+  test_map_ifElement_falseBranch_dynamicKey_disableImplicitCasts() async {
+    addFile(r'''
+bool c;
+dynamic dyn;
+void main() {
+  <int, int>{if (c) 0:0 else /*error:MAP_KEY_TYPE_NOT_ASSIGNABLE*/dyn:0};
+}
+''');
+    await check(implicitCasts: false);
+  }
+
+  test_map_ifElement_falseBranch_dynamicKey_implicitCasts() async {
+    addFile(r'''
+bool c;
+dynamic dyn;
+void main() {
+  <int, int>{if (c) 0:0 else /*info:DYNAMIC_CAST*/dyn:0};
+}
+''');
+    await check();
+  }
+
+  test_map_ifElement_falseBranch_dynamicValue_disableImplicitCasts() async {
+    addFile(r'''
+bool c;
+dynamic dyn;
+void main() {
+  <int, int>{if (c) 0:0 else 0:/*error:MAP_VALUE_TYPE_NOT_ASSIGNABLE*/dyn};
+}
+''');
+    await check(implicitCasts: false);
+  }
+
+  test_map_ifElement_falseBranch_dynamicValue_implicitCasts() async {
+    addFile(r'''
+bool c;
+dynamic dyn;
+void main() {
+  <int, int>{if (c) 0:0 else 0:/*info:DYNAMIC_CAST*/dyn};
+}
+''');
+    await check();
+  }
+
+  test_map_ifElement_falseBranch_supertypeKey_disableImplicitCasts() async {
+    addFile(r'''
+bool c;
+num someNum;
+void main() {
+  <int, int>{if (c) 0:0 else /*error:MAP_KEY_TYPE_NOT_ASSIGNABLE*/someNum:0};
+}
+''');
+    await check(implicitCasts: false);
+  }
+
+  test_map_ifElement_falseBranch_supertypeKey_implicitCasts() async {
+    addFile(r'''
+bool c;
+num someNum;
+void main() {
+  <int, int>{if (c) 0:0 else /*info:DOWN_CAST_IMPLICIT*/someNum:0};
+}
+''');
+    await check();
+  }
+
+  test_map_ifElement_falseBranch_supertypeValue_disableImplicitCasts() async {
+    addFile(r'''
+bool c;
+num someNum;
+void main() {
+  <int, int>{if (c) 0:0 else 0:/*error:MAP_VALUE_TYPE_NOT_ASSIGNABLE*/someNum};
+}
+''');
+    await check(implicitCasts: false);
+  }
+
+  test_map_ifElement_falseBranch_supertypeValue_implicitCasts() async {
+    addFile(r'''
+bool c;
+num someNum;
+void main() {
+  <int, int>{if (c) 0:0 else 0:/*info:DOWN_CAST_IMPLICIT*/someNum};
+}
+''');
+    await check();
+  }
+
+  test_map_ifElement_objectCondition_disableImplicitCasts() async {
+    addFile(r'''
+Object c;
+void main() {
+  <int, int>{if (/*error:NON_BOOL_CONDITION*/c) 0: 0};
+}
+''');
+    await check(implicitCasts: false);
+  }
+
+  test_map_ifElement_objectCondition_implicitCasts() async {
+    addFile(r'''
+Object c;
+void main() {
+  <int, int>{if (/*info:DOWN_CAST_IMPLICIT*/c) 0: 0};
+}
+''');
+    await check();
+  }
+
+  test_map_ifElement_trueBranch_dynamicKey_disableImplicitCasts() async {
+    addFile(r'''
+bool c;
+dynamic dyn;
+void main() {
+  <int, int>{if (c) /*error:MAP_KEY_TYPE_NOT_ASSIGNABLE*/dyn:0 else 0:0};
+}
+''');
+    await check(implicitCasts: false);
+  }
+
+  test_map_ifElement_trueBranch_dynamicKey_implicitCasts() async {
+    addFile(r'''
+bool c;
+dynamic dyn;
+void main() {
+  <int, int>{if (c) /*info:DYNAMIC_CAST*/dyn:0 else 0:0};
+}
+''');
+    await check();
+  }
+
+  test_map_ifElement_trueBranch_dynamicValue_disableImplicitCasts() async {
+    addFile(r'''
+bool c;
+dynamic dyn;
+void main() {
+  <int, int>{if (c) 0:/*error:MAP_VALUE_TYPE_NOT_ASSIGNABLE*/dyn else 0:0};
+}
+''');
+    await check(implicitCasts: false);
+  }
+
+  test_map_ifElement_trueBranch_dynamicValue_implicitCasts() async {
+    addFile(r'''
+bool c;
+dynamic dyn;
+void main() {
+  <int, int>{if (c) 0:/*info:DYNAMIC_CAST*/dyn else 0:0};
+}
+''');
+    await check();
+  }
+
+  test_map_ifElement_trueBranch_supertypeKey_disableImplicitCasts() async {
+    addFile(r'''
+bool c;
+num someNum;
+void main() {
+  <int, int>{if (c) /*error:MAP_KEY_TYPE_NOT_ASSIGNABLE*/someNum:0 else 0:0};
+}
+''');
+    await check(implicitCasts: false);
+  }
+
+  test_map_ifElement_trueBranch_supertypeKey_implicitCasts() async {
+    addFile(r'''
+bool c;
+num someNum;
+void main() {
+  <int, int>{if (c) /*info:DOWN_CAST_IMPLICIT*/someNum:0 else 0:0};
+}
+''');
+    await check();
+  }
+
+  test_map_ifElement_trueBranch_supertypeValue_disableImplicitCasts() async {
+    addFile(r'''
+bool c;
+num someNum;
+void main() {
+  <int, int>{if (c) 0:/*error:MAP_VALUE_TYPE_NOT_ASSIGNABLE*/someNum else 0:0};
+}
+''');
+    await check(implicitCasts: false);
+  }
+
+  test_map_ifElement_trueBranch_supertypeValue_implicitCasts() async {
+    addFile(r'''
+bool c;
+num someNum;
+void main() {
+  <int, int>{if (c) 0:/*info:DOWN_CAST_IMPLICIT*/someNum else 0:0};
+}
+''');
+    await check();
+  }
+
+  test_set_ifElement_dynamicCondition_disableImplicitCasts() async {
+    addFile(r'''
+dynamic c;
+void main() {
+  <int>{if (/*error:NON_BOOL_CONDITION*/c) 0};
+}
+''');
+    await check(implicitCasts: false);
+  }
+
+  test_set_ifElement_dynamicCondition_implicitCasts() async {
+    addFile(r'''
+dynamic c;
+void main() {
+  <int>{if (/*info:DYNAMIC_CAST*/c) 0};
+}
+''');
+    await check();
+  }
+
+  test_set_ifElement_falseBranch_dynamic_disableImplicitCasts() async {
+    addFile(r'''
+bool c;
+dynamic dyn;
+void main() {
+  <int>{if (c) 0 else /*error:SET_ELEMENT_TYPE_NOT_ASSIGNABLE*/dyn};
+}
+''');
+    await check(implicitCasts: false);
+  }
+
+  test_set_ifElement_falseBranch_dynamic_implicitCasts() async {
+    addFile(r'''
+bool c;
+dynamic dyn;
+void main() {
+  <int>{if (c) 0 else /*info:DYNAMIC_CAST*/dyn};
+}
+''');
+    await check();
+  }
+
+  test_set_ifElement_falseBranch_supertype_disableImplicitCasts() async {
+    addFile(r'''
+bool c;
+num someNum;
+void main() {
+  <int>{if (c) 0 else /*error:SET_ELEMENT_TYPE_NOT_ASSIGNABLE*/someNum};
+}
+''');
+    await check(implicitCasts: false);
+  }
+
+  test_set_ifElement_falseBranch_supertype_implicitCasts() async {
+    addFile(r'''
+bool c;
+num someNum;
+void main() {
+  <int>{if (c) 0 else /*info:DOWN_CAST_IMPLICIT*/someNum};
+}
+''');
+    await check();
+  }
+
+  test_set_ifElement_objectCondition_disableImplicitCasts() async {
+    addFile(r'''
+Object c;
+void main() {
+  <int>{if (/*error:NON_BOOL_CONDITION*/c) 0};
+}
+''');
+    await check(implicitCasts: false);
+  }
+
+  test_set_ifElement_objectCondition_implicitCasts() async {
+    addFile(r'''
+Object c;
+void main() {
+  <int>{if (/*info:DOWN_CAST_IMPLICIT*/c) 0};
+}
+''');
+    await check();
+  }
+
+  test_set_ifElement_trueBranch_dynamic_disableImplicitCasts() async {
+    addFile(r'''
+bool c;
+dynamic dyn;
+void main() {
+  <int>{if (c) /*error:SET_ELEMENT_TYPE_NOT_ASSIGNABLE*/dyn};
+}
+''');
+    await check(implicitCasts: false);
+  }
+
+  test_set_ifElement_trueBranch_dynamic_implicitCasts() async {
+    addFile(r'''
+bool c;
+dynamic dyn;
+void main() {
+  <int>[if (c) /*info:DYNAMIC_CAST*/dyn];
+}
+''');
+    await check();
+  }
+
+  test_set_ifElement_trueBranch_supertype_disableImplicitCasts() async {
+    addFile(r'''
+bool c;
+num someNum;
+void main() {
+  <int>{if (c) /*error:SET_ELEMENT_TYPE_NOT_ASSIGNABLE*/someNum};
+}
+''');
+    await check(implicitCasts: false);
+  }
+
+  test_set_ifElement_trueBranch_supertype_implicitCasts() async {
+    addFile(r'''
+bool c;
+num someNum;
+void main() {
+  <int>{if (c) /*info:DOWN_CAST_IMPLICIT*/someNum};
+}
+''');
+    await check();
+  }
+
+  @failingTest
+  test_spread_dynamicInList_disableImplicitCasts() async {
+    // TODO(mfairhurst) fix this, see https://github.com/dart-lang/sdk/issues/35569
+    addFile(r'''
+dynamic dyn;
+void main() {
+  [.../*error:INVALID_ASSIGNMENT*/dyn];
+}
+''');
+    await check(implicitCasts: false);
+  }
+
+  test_spread_dynamicInList_implicitCasts() async {
+    addFile(r'''
+dynamic dyn;
+void main() {
+  [.../*info:DYNAMIC_CAST*/dyn];
+}
+''');
+    await check();
+  }
+
+  @failingTest
+  test_spread_dynamicInMap_disableImplicitCasts() async {
+    // TODO(mfairhurst) fix this, see https://github.com/dart-lang/sdk/issues/35569
+    addFile(r'''
+dynamic dyn;
+void main() {
+  <dynamic, dynamic>{.../*error:INVALID_ASSIGNMENT*/dyn};
+}
+''');
+    await check(implicitCasts: false);
+  }
+
+  test_spread_dynamicInMap_implicitCasts() async {
+    addFile(r'''
+dynamic dyn;
+void main() {
+  <dynamic, dynamic>{.../*info:DYNAMIC_CAST*/dyn};
+}
+''');
+    await check();
+  }
+
+  @failingTest
+  test_spread_dynamicInSet_disableImplicitCasts() async {
+    // TODO(mfairhurst) fix this, see https://github.com/dart-lang/sdk/issues/35569
+    addFile(r'''
+dynamic dyn;
+void main() {
+  <dynamic>{.../*error:INVALID_ASSIGNMENT*/dyn};
+}
+''');
+    await check(implicitCasts: false);
+  }
+
+  test_spread_dynamicInSet_implicitCasts() async {
+    addFile(r'''
+dynamic dyn;
+void main() {
+  <dynamic>{.../*info:DYNAMIC_CAST*/dyn};
+}
+''');
+    await check();
+  }
+
+  test_spread_listElement_disableImplicitCasts() async {
+    addFile(r'''
+Iterable<num> i;
+void main() {
+  <int>[.../*error:LIST_ELEMENT_TYPE_NOT_ASSIGNABLE*/i];
+}
+''');
+    await check(implicitCasts: false);
+  }
+
+  test_spread_listElement_implicitCasts() async {
+    addFile(r'''
+Iterable<num> i;
+void main() {
+  <int>[.../*info:DOWN_CAST_IMPLICIT*/i];
+}
+''');
+    await check();
+  }
+
+  test_spread_mapKey_disableImplicitCasts() async {
+    addFile(r'''
+Map<num, dynamic> map;
+void main() {
+  <int, dynamic>{1: 2, .../*error:MAP_KEY_TYPE_NOT_ASSIGNABLE*/map};
+}
+''');
+    await check(implicitCasts: false);
+  }
+
+  test_spread_mapKey_implicitCasts() async {
+    addFile(r'''
+Map<num, dynamic> map;
+void main() {
+  <int, dynamic>{1: 2, .../*info:DOWN_CAST_IMPLICIT*/map};
+}
+''');
+    await check();
+  }
+
+  test_spread_mapValue_disableImplicitCasts() async {
+    addFile(r'''
+Map<dynamic, num> map;
+void main() {
+  <dynamic, int>{1: 2, .../*error:MAP_VALUE_TYPE_NOT_ASSIGNABLE*/map};
+}
+''');
+    await check(implicitCasts: false);
+  }
+
+  test_spread_mapValue_implicitCasts() async {
+    addFile(r'''
+Map<dynamic, num> map;
+void main() {
+  <dynamic, int>{1: 2, .../*info:DOWN_CAST_IMPLICIT*/map};
+}
+''');
+    await check();
+  }
+
+  test_spread_setElement_disableImplicitCasts() async {
+    addFile(r'''
+Iterable<num> i;
+void main() {
+  <int>{.../*error:SET_ELEMENT_TYPE_NOT_ASSIGNABLE*/i};
+}
+''');
+    await check(implicitCasts: false);
+  }
+
+  test_spread_setElement_implicitCasts() async {
+    addFile(r'''
+Iterable<num> i;
+void main() {
+  <int>{.../*info:DOWN_CAST_IMPLICIT*/i};
+}
+''');
+    await check();
+  }
+}
diff --git a/pkg/analyzer/test/src/task/strong/dart2_inference_test.dart b/pkg/analyzer/test/src/task/strong/dart2_inference_test.dart
index 0036bd3..c2960c3 100644
--- a/pkg/analyzer/test/src/task/strong/dart2_inference_test.dart
+++ b/pkg/analyzer/test/src/task/strong/dart2_inference_test.dart
@@ -1,4 +1,4 @@
-// Copyright (c) 2017, the Dart project authors.  Please see the AUTHORS file
+// Copyright (c) 2017, the Dart project authors. Please see the AUTHORS file
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
 
@@ -28,9 +28,6 @@
   @override
   AnalysisOptions get defaultAnalysisOptions => new AnalysisOptionsImpl();
 
-  @override
-  bool get enableNewAnalysisDriver => true;
-
   test_bool_assert() async {
     var code = r'''
 T f<T>() => null;
diff --git a/pkg/analyzer/test/src/task/strong/strong_test_helper.dart b/pkg/analyzer/test/src/task/strong/strong_test_helper.dart
index fadd403..9589973 100644
--- a/pkg/analyzer/test/src/task/strong/strong_test_helper.dart
+++ b/pkg/analyzer/test/src/task/strong/strong_test_helper.dart
@@ -1,4 +1,4 @@
-// Copyright (c) 2015, the Dart project authors.  Please see the AUTHORS file
+// Copyright (c) 2015, the Dart project authors. Please see the AUTHORS file
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
 
diff --git a/pkg/analyzer/test/src/task/strong/test_all.dart b/pkg/analyzer/test/src/task/strong/test_all.dart
index cf07437..69e4bd3 100644
--- a/pkg/analyzer/test/src/task/strong/test_all.dart
+++ b/pkg/analyzer/test/src/task/strong/test_all.dart
@@ -1,4 +1,4 @@
-// Copyright (c) 2016, the Dart project authors.  Please see the AUTHORS file
+// Copyright (c) 2016, the Dart project authors. Please see the AUTHORS file
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
 
diff --git a/pkg/analyzer/test/src/test_all.dart b/pkg/analyzer/test/src/test_all.dart
index 32548b3..90a00db 100644
--- a/pkg/analyzer/test/src/test_all.dart
+++ b/pkg/analyzer/test/src/test_all.dart
@@ -7,6 +7,7 @@
 import 'command_line/test_all.dart' as command_line;
 import 'context/test_all.dart' as context;
 import 'dart/test_all.dart' as dart;
+import 'dartdoc/test_all.dart' as dartdoc;
 import 'diagnostics/test_all.dart' as diagnostics;
 import 'fasta/test_all.dart' as fasta;
 import 'hint/test_all.dart' as hint;
@@ -26,6 +27,7 @@
     command_line.main();
     context.main();
     dart.main();
+    dartdoc.main();
     diagnostics.main();
     fasta.main();
     hint.main();
diff --git a/pkg/analyzer/test/src/util/yaml_test.dart b/pkg/analyzer/test/src/util/yaml_test.dart
index d184a38..683708e 100644
--- a/pkg/analyzer/test/src/util/yaml_test.dart
+++ b/pkg/analyzer/test/src/util/yaml_test.dart
@@ -1,4 +1,4 @@
-// Copyright (c) 2015, the Dart project authors.  Please see the AUTHORS file
+// Copyright (c) 2015, the Dart project authors. Please see the AUTHORS file
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
 
diff --git a/pkg/analyzer/test/util/ast_type_matchers.dart b/pkg/analyzer/test/util/ast_type_matchers.dart
index 9682a87..d47a240 100644
--- a/pkg/analyzer/test/util/ast_type_matchers.dart
+++ b/pkg/analyzer/test/util/ast_type_matchers.dart
@@ -114,7 +114,7 @@
 /// TODO(paulberry): remove the explicit type `Matcher` once an SDK has been
 /// released that includes ba5644b76cb811e8f01ffb375b87d20d6295749c.
 final Matcher isForEachStatement = predicate(
-    (Object o) => o is ForStatement2 && o.forLoopParts is ForEachParts);
+    (Object o) => o is ForStatement && o.forLoopParts is ForEachParts);
 
 const isFormalParameter = const TypeMatcher<FormalParameter>();
 
@@ -123,7 +123,7 @@
 /// TODO(paulberry): remove the explicit type `Matcher` once an SDK has been
 /// released that includes ba5644b76cb811e8f01ffb375b87d20d6295749c.
 final Matcher isForStatement =
-    predicate((Object o) => o is ForStatement2 && o.forLoopParts is ForParts);
+    predicate((Object o) => o is ForStatement && o.forLoopParts is ForParts);
 
 const isFunctionBody = const TypeMatcher<FunctionBody>();
 
diff --git a/pkg/analyzer/test/verify_tests_test.dart b/pkg/analyzer/test/verify_tests_test.dart
index d22aa57..147ae8a 100644
--- a/pkg/analyzer/test/verify_tests_test.dart
+++ b/pkg/analyzer/test/verify_tests_test.dart
@@ -46,6 +46,8 @@
       String name = child.shortName;
       if (name == 'test_all.dart') {
         testAllFile = child;
+      } else if (name.endsWith('_integration_test.dart')) {
+        // ignored
       } else if (name.endsWith('_test.dart')) {
         testFileNames.add(name);
       }
diff --git a/pkg/analyzer/tool/analysis_driver/inspect_exception.dart b/pkg/analyzer/tool/analysis_driver/inspect_exception.dart
index 9813944..b15b904 100644
--- a/pkg/analyzer/tool/analysis_driver/inspect_exception.dart
+++ b/pkg/analyzer/tool/analysis_driver/inspect_exception.dart
@@ -1,4 +1,4 @@
-// Copyright (c) 2017, the Dart project authors.  Please see the AUTHORS file
+// Copyright (c) 2017, the Dart project authors. Please see the AUTHORS file
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
 
diff --git a/pkg/analyzer/tool/summary/check_test.dart b/pkg/analyzer/tool/summary/check_test.dart
index ff689ba..af669fb 100644
--- a/pkg/analyzer/tool/summary/check_test.dart
+++ b/pkg/analyzer/tool/summary/check_test.dart
@@ -13,7 +13,10 @@
  * user to run generate.dart.
  */
 main() async {
-  String pkgPath = normalize(join(package_root.packageRoot, 'analyzer'));
-  await GeneratedContent.checkAll(
-      pkgPath, 'tool/summary/generate.dart', allTargets);
+  var idlFolderPath = normalize(
+      join(package_root.packageRoot, 'analyzer', 'lib', 'src', 'summary'));
+  var idlPath = normalize(join(idlFolderPath, 'idl.dart'));
+  await GeneratedContent.checkAll(idlFolderPath,
+      'pkg/analyzer/tool/summary/generate.dart', getAllTargets(idlPath),
+      args: [idlPath]);
 }
diff --git a/pkg/analyzer/tool/summary/dump_inferred_types.dart b/pkg/analyzer/tool/summary/dump_inferred_types.dart
index ffc71af..81d2a34 100644
--- a/pkg/analyzer/tool/summary/dump_inferred_types.dart
+++ b/pkg/analyzer/tool/summary/dump_inferred_types.dart
@@ -1,4 +1,4 @@
-// Copyright (c) 2016, the Dart project authors.  Please see the AUTHORS file
+// Copyright (c) 2016, the Dart project authors. Please see the AUTHORS file
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
 
diff --git a/pkg/analyzer/tool/summary/generate.dart b/pkg/analyzer/tool/summary/generate.dart
index f3426c1..f8a77f4 100644
--- a/pkg/analyzer/tool/summary/generate.dart
+++ b/pkg/analyzer/tool/summary/generate.dart
@@ -23,35 +23,36 @@
 import 'package:analysis_tool/tools.dart';
 import 'package:front_end/src/fasta/scanner/string_scanner.dart';
 import 'package:front_end/src/scanner/token.dart' show Token;
-import 'package:front_end/src/testing/package_root.dart' as package_root;
-import 'package:path/path.dart';
 
 import 'idl_model.dart' as idlModel;
 import 'mini_ast.dart';
 
-main() async {
-  String pkgPath = normalize(join(package_root.packageRoot, 'analyzer'));
-  await GeneratedContent.generateAll(pkgPath, allTargets);
+main(List<String> args) async {
+  if (args.length != 1) {
+    print('Error: IDL path is required');
+    print('usage: dart generate.dart path/to/idl.dart');
+  }
+  String idlPath = args[0];
+  await GeneratedContent.generateAll(
+      File(idlPath).parent.path, getAllTargets(idlPath));
 }
 
-final List<GeneratedContent> allTargets = <GeneratedContent>[
-  formatTarget,
-  schemaTarget
-];
+List<GeneratedContent> getAllTargets(String idlPath) {
+  final GeneratedFile formatTarget =
+      new GeneratedFile('format.dart', (_) async {
+    _CodeGenerator codeGenerator = new _CodeGenerator(idlPath);
+    codeGenerator.generateFormatCode();
+    return codeGenerator._outBuffer.toString();
+  });
 
-final GeneratedFile formatTarget =
-    new GeneratedFile('lib/src/summary/format.dart', (String pkgPath) async {
-  _CodeGenerator codeGenerator = new _CodeGenerator(pkgPath);
-  codeGenerator.generateFormatCode();
-  return codeGenerator._outBuffer.toString();
-});
+  final GeneratedFile schemaTarget = new GeneratedFile('format.fbs', (_) async {
+    _CodeGenerator codeGenerator = new _CodeGenerator(idlPath);
+    codeGenerator.generateFlatBufferSchema();
+    return codeGenerator._outBuffer.toString();
+  });
 
-final GeneratedFile schemaTarget =
-    new GeneratedFile('lib/src/summary/format.fbs', (String pkgPath) async {
-  _CodeGenerator codeGenerator = new _CodeGenerator(pkgPath);
-  codeGenerator.generateFlatBufferSchema();
-  return codeGenerator._outBuffer.toString();
-});
+  return <GeneratedContent>[formatTarget, schemaTarget];
+}
 
 typedef String _StringToString(String s);
 
@@ -74,9 +75,8 @@
    */
   idlModel.Idl _idl;
 
-  _CodeGenerator(String pkgPath) {
+  _CodeGenerator(String idlPath) {
     // Parse the input "IDL" file.
-    String idlPath = join(pkgPath, 'lib', 'src', 'summary', 'idl.dart');
     File idlFile = new File(idlPath);
     String idlText =
         idlFile.readAsStringSync().replaceAll(new RegExp('\r\n?'), '\n');
@@ -478,12 +478,14 @@
   }
 
   void outputHeader() {
-    out('// Copyright (c) 2015, the Dart project authors.  Please see the AUTHORS file');
+    out('// Copyright (c) 2015, the Dart project authors. Please see the AUTHORS file');
     out('// for details. All rights reserved. Use of this source code is governed by a');
     out('// BSD-style license that can be found in the LICENSE file.');
     out('//');
     out('// This file has been automatically generated.  Please do not edit it manually.');
-    out('// To regenerate the file, use the script "pkg/analyzer/tool/generate_files".');
+    out('// To regenerate the file, use the SDK script');
+    out('// "pkg/analyzer/tool/summary/generate.dart \$IDL_FILE_PATH",');
+    out('// or "pkg/analyzer/tool/generate_files" for the analyzer package IDL/sources.');
     out();
   }
 
diff --git a/pkg/analyzer/tool/summary/inspect.dart b/pkg/analyzer/tool/summary/inspect.dart
index e1daf10..b968118 100644
--- a/pkg/analyzer/tool/summary/inspect.dart
+++ b/pkg/analyzer/tool/summary/inspect.dart
@@ -1,4 +1,4 @@
-// Copyright (c) 2016, the Dart project authors.  Please see the AUTHORS file
+// Copyright (c) 2016, the Dart project authors. Please see the AUTHORS file
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
 
diff --git a/pkg/analyzer/tool/summary/mini_ast.dart b/pkg/analyzer/tool/summary/mini_ast.dart
index a4e718e..cf52e31 100644
--- a/pkg/analyzer/tool/summary/mini_ast.dart
+++ b/pkg/analyzer/tool/summary/mini_ast.dart
@@ -1,4 +1,4 @@
-// Copyright (c) 2017, the Dart project authors.  Please see the AUTHORS file
+// Copyright (c) 2017, the Dart project authors. Please see the AUTHORS file
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
 
diff --git a/pkg/analyzer_cli/lib/src/driver.dart b/pkg/analyzer_cli/lib/src/driver.dart
index dea039b..7e910dc 100644
--- a/pkg/analyzer_cli/lib/src/driver.dart
+++ b/pkg/analyzer_cli/lib/src/driver.dart
@@ -347,9 +347,8 @@
           File file = resourceProvider.getFile(path);
           String content = file.readAsStringSync();
           LineInfo lineInfo = new LineInfo.fromContent(content);
-          List<AnalysisError> errors =
-              GenerateOptionsErrorsTask.analyzeAnalysisOptions(
-                  file.createSource(), content, analysisDriver.sourceFactory);
+          List<AnalysisError> errors = analyzeAnalysisOptions(
+              file.createSource(), content, analysisDriver.sourceFactory);
           formatter.formatErrors([new AnalysisErrorInfoImpl(errors, lineInfo)]);
           for (AnalysisError error in errors) {
             ErrorSeverity severity = determineProcessedSeverity(
diff --git a/pkg/analyzer_cli/test/mocks.dart b/pkg/analyzer_cli/test/mocks.dart
index 49f7251..3d3ad59 100644
--- a/pkg/analyzer_cli/test/mocks.dart
+++ b/pkg/analyzer_cli/test/mocks.dart
@@ -63,6 +63,9 @@
   @override
   String name;
 
+  @override
+  String url;
+
   MockErrorCode(this.type, this.errorSeverity, this.name);
 
   @override
diff --git a/pkg/analyzer_plugin/doc/api.html b/pkg/analyzer_plugin/doc/api.html
index 40ba1aa..53599dd 100644
--- a/pkg/analyzer_plugin/doc/api.html
+++ b/pkg/analyzer_plugin/doc/api.html
@@ -900,6 +900,11 @@
         <p>
           The name, as a string, of the error code associated with this error.
         </p>
+      </dd><dt class="field"><b>url: String<span style="color:#999999"> (optional)</span></b></dt><dd>
+        
+        <p>
+          The URL of a page containing documentation associated with this error.
+        </p>
       </dd><dt class="field"><b>hasFix: bool<span style="color:#999999"> (optional)</span></b></dt><dd>
         
         <p>
diff --git a/pkg/analyzer_plugin/lib/protocol/protocol_common.dart b/pkg/analyzer_plugin/lib/protocol/protocol_common.dart
index 120085a..cbc0442 100644
--- a/pkg/analyzer_plugin/lib/protocol/protocol_common.dart
+++ b/pkg/analyzer_plugin/lib/protocol/protocol_common.dart
@@ -102,6 +102,7 @@
  *   "message": String
  *   "correction": optional String
  *   "code": String
+ *   "url": optional String
  *   "hasFix": optional bool
  * }
  *
@@ -120,6 +121,8 @@
 
   String _code;
 
+  String _url;
+
   bool _hasFix;
 
   /**
@@ -206,6 +209,18 @@
   }
 
   /**
+   * The URL of a page containing documentation associated with this error.
+   */
+  String get url => _url;
+
+  /**
+   * The URL of a page containing documentation associated with this error.
+   */
+  void set url(String value) {
+    this._url = value;
+  }
+
+  /**
    * A hint to indicate to interested clients that this error has an associated
    * fix (or fixes). The absence of this field implies there are not known to
    * be fixes. Note that since the operation to calculate whether fixes apply
@@ -233,13 +248,14 @@
 
   AnalysisError(AnalysisErrorSeverity severity, AnalysisErrorType type,
       Location location, String message, String code,
-      {String correction, bool hasFix}) {
+      {String correction, String url, bool hasFix}) {
     this.severity = severity;
     this.type = type;
     this.location = location;
     this.message = message;
     this.correction = correction;
     this.code = code;
+    this.url = url;
     this.hasFix = hasFix;
   }
 
@@ -288,12 +304,16 @@
       } else {
         throw jsonDecoder.mismatch(jsonPath, "code");
       }
+      String url;
+      if (json.containsKey("url")) {
+        url = jsonDecoder.decodeString(jsonPath + ".url", json["url"]);
+      }
       bool hasFix;
       if (json.containsKey("hasFix")) {
         hasFix = jsonDecoder.decodeBool(jsonPath + ".hasFix", json["hasFix"]);
       }
       return new AnalysisError(severity, type, location, message, code,
-          correction: correction, hasFix: hasFix);
+          correction: correction, url: url, hasFix: hasFix);
     } else {
       throw jsonDecoder.mismatch(jsonPath, "AnalysisError", json);
     }
@@ -310,6 +330,9 @@
       result["correction"] = correction;
     }
     result["code"] = code;
+    if (url != null) {
+      result["url"] = url;
+    }
     if (hasFix != null) {
       result["hasFix"] = hasFix;
     }
@@ -328,6 +351,7 @@
           message == other.message &&
           correction == other.correction &&
           code == other.code &&
+          url == other.url &&
           hasFix == other.hasFix;
     }
     return false;
@@ -342,6 +366,7 @@
     hash = JenkinsSmiHash.combine(hash, message.hashCode);
     hash = JenkinsSmiHash.combine(hash, correction.hashCode);
     hash = JenkinsSmiHash.combine(hash, code.hashCode);
+    hash = JenkinsSmiHash.combine(hash, url.hashCode);
     hash = JenkinsSmiHash.combine(hash, hasFix.hashCode);
     return JenkinsSmiHash.finish(hash);
   }
diff --git a/pkg/analyzer_plugin/lib/src/utilities/change_builder/dart/syntactic_scope.dart b/pkg/analyzer_plugin/lib/src/utilities/change_builder/dart/syntactic_scope.dart
index c12faf9..1739677 100644
--- a/pkg/analyzer_plugin/lib/src/utilities/change_builder/dart/syntactic_scope.dart
+++ b/pkg/analyzer_plugin/lib/src/utilities/change_builder/dart/syntactic_scope.dart
@@ -151,12 +151,12 @@
   }
 
   @override
-  void visitForStatement2(ForStatement2 node) {
+  void visitForStatement(ForStatement node) {
     if (!_isCoveredBy(node)) return;
 
     _addForLoopParts(node.forLoopParts, node.body);
 
-    super.visitForStatement2(node);
+    super.visitForStatement(node);
   }
 
   @override
diff --git a/pkg/analyzer_plugin/lib/src/utilities/completion/optype.dart b/pkg/analyzer_plugin/lib/src/utilities/completion/optype.dart
index c25eb10..93c1024 100644
--- a/pkg/analyzer_plugin/lib/src/utilities/completion/optype.dart
+++ b/pkg/analyzer_plugin/lib/src/utilities/completion/optype.dart
@@ -687,7 +687,7 @@
   }
 
   @override
-  void visitForStatement2(ForStatement2 node) {
+  void visitForStatement(ForStatement node) {
     var entity = this.entity;
     var entity2 = entity; // Work around limitations of type promotion
     if (entity2 is SyntacticEntity &&
diff --git a/pkg/analyzer_plugin/lib/src/utilities/visitors/local_declaration_visitor.dart b/pkg/analyzer_plugin/lib/src/utilities/visitors/local_declaration_visitor.dart
index 4f3fdd1..99bb973 100644
--- a/pkg/analyzer_plugin/lib/src/utilities/visitors/local_declaration_visitor.dart
+++ b/pkg/analyzer_plugin/lib/src/utilities/visitors/local_declaration_visitor.dart
@@ -147,7 +147,7 @@
   }
 
   @override
-  visitForStatement2(ForStatement2 node) {
+  visitForStatement(ForStatement node) {
     var forLoopParts = node.forLoopParts;
     if (forLoopParts is ForEachPartsWithDeclaration) {
       DeclaredIdentifier loopVar = forLoopParts.loopVariable;
diff --git a/pkg/analyzer_plugin/test/integration/support/protocol_matchers.dart b/pkg/analyzer_plugin/test/integration/support/protocol_matchers.dart
index 3691e51..9e28ca2 100644
--- a/pkg/analyzer_plugin/test/integration/support/protocol_matchers.dart
+++ b/pkg/analyzer_plugin/test/integration/support/protocol_matchers.dart
@@ -34,6 +34,7 @@
  *   "message": String
  *   "correction": optional String
  *   "code": String
+ *   "url": optional String
  *   "hasFix": optional bool
  * }
  */
@@ -46,6 +47,7 @@
           "code": isString
         }, optionalFields: {
           "correction": isString,
+          "url": isString,
           "hasFix": isBool
         }));
 
diff --git a/pkg/analyzer_plugin/test/src/utilities/visitors/local_declaration_visitor_test.dart b/pkg/analyzer_plugin/test/src/utilities/visitors/local_declaration_visitor_test.dart
index 1b68a17..ee9466e 100644
--- a/pkg/analyzer_plugin/test/src/utilities/visitors/local_declaration_visitor_test.dart
+++ b/pkg/analyzer_plugin/test/src/utilities/visitors/local_declaration_visitor_test.dart
@@ -45,7 +45,7 @@
     FunctionDeclaration f = declarations[1] as FunctionDeclaration;
     expect(f, isNotNull);
     BlockFunctionBody body = f.functionExpression.body as BlockFunctionBody;
-    var statement = body.block.statements[0] as ForStatement2;
+    var statement = body.block.statements[0] as ForStatement;
     expect(statement.forLoopParts, const TypeMatcher<ForEachParts>());
     statement.accept(new TestVisitor(statement.offset));
   }
diff --git a/pkg/analyzer_plugin/test/test_all.dart b/pkg/analyzer_plugin/test/test_all.dart
index 155cc47..b5cdb54 100644
--- a/pkg/analyzer_plugin/test/test_all.dart
+++ b/pkg/analyzer_plugin/test/test_all.dart
@@ -8,12 +8,14 @@
 import 'plugin/test_all.dart' as plugin;
 import 'src/test_all.dart' as src;
 import 'utilities/test_all.dart' as utilities;
+import 'verify_tests_test.dart' as verify_tests;
 
 main() {
   defineReflectiveSuite(() {
     plugin.main();
     src.main();
     utilities.main();
+    verify_tests.main();
     defineReflectiveSuite(() {
       defineReflectiveTests(SpecTest);
     }, name: 'spec');
diff --git a/pkg/analyzer_plugin/test/verify_tests_test.dart b/pkg/analyzer_plugin/test/verify_tests_test.dart
new file mode 100644
index 0000000..6b3ccd0
--- /dev/null
+++ b/pkg/analyzer_plugin/test/verify_tests_test.dart
@@ -0,0 +1,85 @@
+// Copyright (c) 2019, the Dart project authors. Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+import 'package:analyzer/dart/analysis/analysis_context.dart';
+import 'package:analyzer/dart/analysis/analysis_context_collection.dart';
+import 'package:analyzer/dart/analysis/results.dart';
+import 'package:analyzer/dart/analysis/session.dart';
+import 'package:analyzer/dart/ast/ast.dart';
+import 'package:analyzer/file_system/file_system.dart';
+import 'package:analyzer/file_system/physical_file_system.dart';
+import 'package:front_end/src/testing/package_root.dart' as package_root;
+import 'package:path/path.dart' as path;
+import 'package:test/test.dart';
+
+main() {
+  PhysicalResourceProvider provider = PhysicalResourceProvider.INSTANCE;
+  String packageRoot = provider.pathContext.normalize(package_root.packageRoot);
+  String analysisServerPath =
+      provider.pathContext.join(packageRoot, 'analysis_server');
+  String testDirPath = provider.pathContext.join(analysisServerPath, 'test');
+
+  AnalysisContextCollection collection = new AnalysisContextCollection(
+      includedPaths: <String>[testDirPath], resourceProvider: provider);
+  List<AnalysisContext> contexts = collection.contexts;
+  if (contexts.length != 1) {
+    fail('The test directory contains multiple analysis contexts.');
+  }
+
+  buildTestsIn(
+      contexts[0].currentSession, testDirPath, provider.getFolder(testDirPath));
+}
+
+void buildTestsIn(
+    AnalysisSession session, String testDirPath, Folder directory) {
+  List<String> testFileNames = [];
+  File testAllFile;
+  List<Resource> children = directory.getChildren();
+  children.sort((first, second) => first.shortName.compareTo(second.shortName));
+  for (Resource child in children) {
+    if (child is Folder) {
+      if (child.shortName == 'integration') {
+        continue;
+      } else if (child.getChildAssumingFile('test_all.dart').exists) {
+        testFileNames.add('${child.shortName}/test_all.dart');
+      }
+      buildTestsIn(session, testDirPath, child);
+    } else if (child is File) {
+      String name = child.shortName;
+      if (name == 'test_all.dart') {
+        testAllFile = child;
+      } else if (name.endsWith('_test.dart')) {
+        testFileNames.add(name);
+      }
+    }
+  }
+  String relativePath = path.relative(directory.path, from: testDirPath);
+  test(relativePath, () {
+    if (testFileNames.isEmpty) {
+      return;
+    }
+    if (testAllFile == null) {
+      fail('Missing "test_all.dart" in $relativePath');
+    }
+    ParsedUnitResult result = session.getParsedUnit(testAllFile.path);
+    if (result.state != ResultState.VALID) {
+      fail('Could not parse ${testAllFile.path}');
+    }
+    List<String> importedFiles = [];
+    for (var directive in result.unit.directives) {
+      if (directive is ImportDirective) {
+        importedFiles.add(directive.uri.stringValue);
+      }
+    }
+    List<String> missingFiles = [];
+    for (String testFileName in testFileNames) {
+      if (!importedFiles.contains(testFileName)) {
+        missingFiles.add(testFileName);
+      }
+    }
+    if (missingFiles.isNotEmpty) {
+      fail('Tests missing from "test_all.dart": ${missingFiles.join(', ')}');
+    }
+  });
+}
diff --git a/pkg/analyzer_plugin/tool/spec/check_all_test.dart b/pkg/analyzer_plugin/tool/spec/check_all_test.dart
index 82806db..9de2a717 100644
--- a/pkg/analyzer_plugin/tool/spec/check_all_test.dart
+++ b/pkg/analyzer_plugin/tool/spec/check_all_test.dart
@@ -19,5 +19,5 @@
   int index = components.indexOf('analyzer_plugin');
   String pkgPath = joinAll(components.sublist(0, index + 1));
   await GeneratedContent.checkAll(
-      pkgPath, join('tool', 'spec', 'generate_all.dart'), allTargets);
+      pkgPath, join(pkgPath, 'tool', 'spec', 'generate_all.dart'), allTargets);
 }
diff --git a/pkg/analyzer_plugin/tool/spec/common_types_spec.html b/pkg/analyzer_plugin/tool/spec/common_types_spec.html
index ddb7f01..3572838 100644
--- a/pkg/analyzer_plugin/tool/spec/common_types_spec.html
+++ b/pkg/analyzer_plugin/tool/spec/common_types_spec.html
@@ -95,6 +95,12 @@
           The name, as a string, of the error code associated with this error.
         </p>
       </field>
+      <field name="url" optional="true">
+        <ref>String</ref>
+        <p>
+          The URL of a page containing documentation associated with this error.
+        </p>
+      </field>
       <field name="hasFix" optional="true">
         <ref>bool</ref>
         <p>
diff --git a/pkg/async_helper/lib/async_helper.dart b/pkg/async_helper/lib/async_helper.dart
index 961d1d6..509af15 100644
--- a/pkg/async_helper/lib/async_helper.dart
+++ b/pkg/async_helper/lib/async_helper.dart
@@ -25,6 +25,8 @@
 
 import 'dart:async';
 
+import 'package:expect/expect.dart';
+
 bool _initialized = false;
 int _asyncLevel = 0;
 
@@ -87,3 +89,52 @@
   asyncStart();
   return f().then(asyncSuccess);
 }
+
+/// Calls [f] and verifies that it throws a `T`.
+///
+/// The optional [check] function can provide additional validation that the
+/// correct object is being thrown. For example, to check the content of the
+/// thrown object you could write this:
+///
+///     asyncExpectThrows<MyException>(myThrowingFunction,
+///          (e) => e.myMessage.contains("WARNING"));
+///
+/// If `f` fails an expectation (i.e., throws an [ExpectException]), that
+/// exception is not caught by [asyncExpectThrows]. The test is still considered
+/// failing.
+void asyncExpectThrows<T>(Future<void> f(),
+    [bool check(T error), String reason]) {
+  var type = "";
+  if (T != dynamic && T != Object) type = "<$T>";
+  var header = "asyncExpectThrows$type(${reason ?? ''}):";
+
+  // TODO(rnystrom): It might useful to validate that T is not bound to
+  // ExpectException since that won't work.
+
+  if (f is! Function()) {
+    // Only throws from executing the function body should count as throwing.
+    // The failure to even call `f` should throw outside the try/catch.
+    Expect.testError("$header Function not callable with zero arguments.");
+  }
+
+  var result = f();
+  if (result is! Future) {
+    Expect.testError("$header Function did not return a Future.");
+  }
+
+  asyncStart();
+  result.then((_) {
+    throw ExpectException("$header Did not throw.");
+  }).catchError((error, stack) {
+    // A test failure doesn't count as throwing.
+    if (error is ExpectException) throw error;
+
+    if (error is! T || (check != null && !check(error))) {
+      // Throws something unexpected.
+      throw ExpectException(
+          "$header Unexpected '${Error.safeToString(error)}'\n$stack");
+    }
+
+    asyncEnd();
+  });
+}
diff --git a/pkg/compiler/lib/src/apiimpl.dart b/pkg/compiler/lib/src/apiimpl.dart
index 17c84a4..4888037 100644
--- a/pkg/compiler/lib/src/apiimpl.dart
+++ b/pkg/compiler/lib/src/apiimpl.dart
@@ -197,12 +197,14 @@
 
 class _Environment implements Environment {
   final Map<String, String> definitions;
+  Map<String, String> _completeMap;
   Set<String> supportedLibraries;
 
   _Environment(this.definitions);
 
   @override
   String valueOf(String name) {
+    if (_completeMap != null) return _completeMap[name];
     var result = definitions[name];
     if (result != null || definitions.containsKey(name)) return result;
     if (!name.startsWith(_dartLibraryEnvironmentPrefix)) return null;
@@ -214,6 +216,22 @@
     if (supportedLibraries.contains(libraryName)) return "true";
     return null;
   }
+
+  @override
+  Map<String, String> toMap() {
+    if (_completeMap == null) {
+      _completeMap = new Map<String, String>.from(definitions);
+      for (String libraryName in supportedLibraries) {
+        if (!libraryName.startsWith("_")) {
+          String key = '${_dartLibraryEnvironmentPrefix}${libraryName}';
+          if (!definitions.containsKey(key)) {
+            _completeMap[key] = "true";
+          }
+        }
+      }
+    }
+    return _completeMap;
+  }
 }
 
 /// For every 'dart:' library, a corresponding environment variable is set
diff --git a/pkg/compiler/lib/src/commandline_options.dart b/pkg/compiler/lib/src/commandline_options.dart
index 053c508..82b1fe8 100644
--- a/pkg/compiler/lib/src/commandline_options.dart
+++ b/pkg/compiler/lib/src/commandline_options.dart
@@ -22,8 +22,6 @@
   static const String enableCheckedMode = '--enable-checked-mode';
   static const String enableAsserts = '--enable-asserts';
   static const String enableDiagnosticColors = '--enable-diagnostic-colors';
-  static const String enableExperimentalMirrors =
-      '--enable-experimental-mirrors';
   static const String experimentalTrackAllocations =
       '--experimental-track-allocations';
   static const String experimentalAllocationsPath =
@@ -81,6 +79,7 @@
   static const String progress = '--show-internal-progress';
   static const String version = '--version';
 
+  static const String dillDependencies = '--dill-dependencies';
   static const String readData = '--read-data';
   static const String writeData = '--write-data';
   static const String cfeOnly = '--cfe-only';
diff --git a/pkg/compiler/lib/src/common/tasks.dart b/pkg/compiler/lib/src/common/tasks.dart
index ebf692e..077972c 100644
--- a/pkg/compiler/lib/src/common/tasks.dart
+++ b/pkg/compiler/lib/src/common/tasks.dart
@@ -32,8 +32,10 @@
   /// only measure time if measurements are enabled.
   bool get _isDisabled => _watch == null;
 
-  /// Name to use for reporting timing information. Subclasses should override
-  /// this with a proper name, otherwise we use the runtime type of the task.
+  /// Name to use for reporting timing information.
+  ///
+  /// Subclasses should override this with a proper name, otherwise we use the
+  /// runtime type of the task.
   String get name => "Unknown task '${this.runtimeType}'";
 
   bool get isRunning => _watch?.isRunning == true;
diff --git a/pkg/compiler/lib/src/common_elements.dart b/pkg/compiler/lib/src/common_elements.dart
index 4ca6b63..008c8d3 100644
--- a/pkg/compiler/lib/src/common_elements.dart
+++ b/pkg/compiler/lib/src/common_elements.dart
@@ -103,19 +103,25 @@
   /// The `NativeTypedData` class from dart:typed_data.
   ClassEntity get typedDataClass;
 
-  /// Constructor of the `Symbol` class in dart:internal. This getter will
-  /// ensure that `Symbol` is resolved and lookup the constructor on demand.
+  /// Constructor of the `Symbol` class in dart:internal.
+  ///
+  /// This getter will ensure that `Symbol` is resolved and lookup the
+  /// constructor on demand.
   ConstructorEntity get symbolConstructorTarget;
 
-  /// Whether [element] is the same as [symbolConstructor]. Used to check
-  /// for the constructor without computing it until it is likely to be seen.
+  /// Whether [element] is the same as [symbolConstructor].
+  ///
+  /// Used to check for the constructor without computing it until it is likely
+  /// to be seen.
   bool isSymbolConstructor(ConstructorEntity element);
 
   /// The function `identical` in dart:core.
   FunctionEntity get identicalFunction;
 
-  /// Whether [element] is the `Function.apply` method. This will not
-  /// resolve the apply method if it hasn't been seen yet during compilation.
+  /// Whether [element] is the `Function.apply` method.
+  ///
+  /// This will not resolve the apply method if it hasn't been seen yet during
+  /// compilation.
   bool isFunctionApplyMethod(MemberEntity element);
 
   /// The `dynamic` type.
@@ -481,6 +487,7 @@
 
   // From dart:_js_embedded_names
 
+  /// Holds the class for the [JsGetName] enum.
   ClassEntity get jsGetNameEnum;
 
   /// Returns `true` if [member] is a "foreign helper", that is, a member whose
@@ -522,13 +529,15 @@
 }
 
 abstract class JCommonElements implements CommonElements {
-  /// Returns `true` if [element] is the unnamed constructor of `List`. This
-  /// will not resolve the constructor if it hasn't been seen yet during
+  /// Returns `true` if [element] is the unnamed constructor of `List`.
+  ///
+  /// This will not resolve the constructor if it hasn't been seen yet during
   /// compilation.
   bool isUnnamedListConstructor(ConstructorEntity element);
 
-  /// Returns `true` if [element] is the 'filled' constructor of `List`. This
-  /// will not resolve the constructor if it hasn't been seen yet during
+  /// Returns `true` if [element] is the 'filled' constructor of `List`.
+  ///
+  /// This will not resolve the constructor if it hasn't been seen yet during
   /// compilation.
   bool isFilledListConstructor(ConstructorEntity element);
 
@@ -578,6 +587,7 @@
 
   ClassEntity get typedArrayOfDoubleClass;
 
+  /// Holds the class for the [JsBuiltins] enum.
   ClassEntity get jsBuiltinEnum;
 
   bool isForeign(MemberEntity element);
@@ -593,131 +603,111 @@
 
   CommonElementsImpl(this._env);
 
-  /// The `Object` class defined in 'dart:core'.
   ClassEntity _objectClass;
   @override
   ClassEntity get objectClass =>
       _objectClass ??= _findClass(coreLibrary, 'Object');
 
-  /// The `bool` class defined in 'dart:core'.
   ClassEntity _boolClass;
   @override
   ClassEntity get boolClass => _boolClass ??= _findClass(coreLibrary, 'bool');
 
-  /// The `num` class defined in 'dart:core'.
   ClassEntity _numClass;
   @override
   ClassEntity get numClass => _numClass ??= _findClass(coreLibrary, 'num');
 
-  /// The `int` class defined in 'dart:core'.
   ClassEntity _intClass;
   @override
   ClassEntity get intClass => _intClass ??= _findClass(coreLibrary, 'int');
 
-  /// The `double` class defined in 'dart:core'.
   ClassEntity _doubleClass;
   @override
   ClassEntity get doubleClass =>
       _doubleClass ??= _findClass(coreLibrary, 'double');
 
-  /// The `String` class defined in 'dart:core'.
   ClassEntity _stringClass;
   @override
   ClassEntity get stringClass =>
       _stringClass ??= _findClass(coreLibrary, 'String');
 
-  /// The `Function` class defined in 'dart:core'.
   ClassEntity _functionClass;
   @override
   ClassEntity get functionClass =>
       _functionClass ??= _findClass(coreLibrary, 'Function');
 
-  /// The `Resource` class defined in 'dart:core'.
   ClassEntity _resourceClass;
   @override
   ClassEntity get resourceClass =>
       _resourceClass ??= _findClass(coreLibrary, 'Resource');
 
-  /// The `Symbol` class defined in 'dart:core'.
   ClassEntity _symbolClass;
   @override
   ClassEntity get symbolClass =>
       _symbolClass ??= _findClass(coreLibrary, 'Symbol');
 
-  /// The `Null` class defined in 'dart:core'.
   ClassEntity _nullClass;
   @override
   ClassEntity get nullClass => _nullClass ??= _findClass(coreLibrary, 'Null');
 
-  /// The `Type` class defined in 'dart:core'.
   ClassEntity _typeClass;
   @override
   ClassEntity get typeClass => _typeClass ??= _findClass(coreLibrary, 'Type');
 
-  /// The `StackTrace` class defined in 'dart:core';
   ClassEntity _stackTraceClass;
   @override
   ClassEntity get stackTraceClass =>
       _stackTraceClass ??= _findClass(coreLibrary, 'StackTrace');
 
-  /// The `List` class defined in 'dart:core';
   ClassEntity _listClass;
   @override
   ClassEntity get listClass => _listClass ??= _findClass(coreLibrary, 'List');
 
-  /// The `Set` class defined in 'dart:core'.
   ClassEntity _setClass;
   @override
   ClassEntity get setClass => _setClass ??= _findClass(coreLibrary, 'Set');
 
-  /// The `Map` class defined in 'dart:core';
   ClassEntity _mapClass;
   @override
   ClassEntity get mapClass => _mapClass ??= _findClass(coreLibrary, 'Map');
 
-  /// The `_UnmodifiableSet` class defined in 'dart:collection';
   ClassEntity _unmodifiableSetClass;
   @override
   ClassEntity get unmodifiableSetClass => _unmodifiableSetClass ??=
       _findClass(_env.lookupLibrary(Uris.dart_collection), '_UnmodifiableSet');
 
-  /// The `Iterable` class defined in 'dart:core';
   ClassEntity _iterableClass;
   @override
   ClassEntity get iterableClass =>
       _iterableClass ??= _findClass(coreLibrary, 'Iterable');
 
-  /// The `Future` class defined in 'async';.
   ClassEntity _futureClass;
   @override
   ClassEntity get futureClass =>
       _futureClass ??= _findClass(asyncLibrary, 'Future');
 
-  /// The `Stream` class defined in 'async';
   ClassEntity _streamClass;
   @override
   ClassEntity get streamClass =>
       _streamClass ??= _findClass(asyncLibrary, 'Stream');
 
-  /// The dart:core library.
   LibraryEntity _coreLibrary;
   @override
   LibraryEntity get coreLibrary =>
       _coreLibrary ??= _env.lookupLibrary(Uris.dart_core, required: true);
 
-  /// The dart:async library.
   LibraryEntity _asyncLibrary;
   @override
   LibraryEntity get asyncLibrary =>
       _asyncLibrary ??= _env.lookupLibrary(Uris.dart_async);
 
-  /// The dart:mirrors library. Null if the program doesn't access dart:mirrors.
+  /// The dart:mirrors library.
+  ///
+  /// Null if the program doesn't access dart:mirrors.
   LibraryEntity _mirrorsLibrary;
   @override
   LibraryEntity get mirrorsLibrary =>
       _mirrorsLibrary ??= _env.lookupLibrary(Uris.dart_mirrors);
 
-  /// The dart:typed_data library.
   LibraryEntity _typedDataLibrary;
   @override
   LibraryEntity get typedDataLibrary =>
@@ -744,14 +734,11 @@
   LibraryEntity get internalLibrary => _internalLibrary ??=
       _env.lookupLibrary(Uris.dart__internal, required: true);
 
-  /// The `NativeTypedData` class from dart:typed_data.
   ClassEntity _typedDataClass;
   @override
   ClassEntity get typedDataClass =>
       _typedDataClass ??= _findClass(typedDataLibrary, 'NativeTypedData');
 
-  /// Constructor of the `Symbol` class in dart:internal. This getter will
-  /// ensure that `Symbol` is resolved and lookup the constructor on demand.
   ConstructorEntity _symbolConstructorTarget;
   @override
   ConstructorEntity get symbolConstructorTarget {
@@ -788,8 +775,6 @@
         _findConstructor(symbolClass, '', required: false);
   }
 
-  /// Whether [element] is the same as [symbolConstructor]. Used to check
-  /// for the constructor without computing it until it is likely to be seen.
   @override
   bool isSymbolConstructor(ConstructorEntity element) {
     assert(element != null);
@@ -798,88 +783,71 @@
         element == _symbolConstructorTarget;
   }
 
-  /// The function `identical` in dart:core.
   FunctionEntity _identicalFunction;
   @override
   FunctionEntity get identicalFunction =>
       _identicalFunction ??= _findLibraryMember(coreLibrary, 'identical');
 
-  /// Whether [element] is the `Function.apply` method. This will not
-  /// resolve the apply method if it hasn't been seen yet during compilation.
   @override
   bool isFunctionApplyMethod(MemberEntity element) =>
       element.name == 'apply' && element.enclosingClass == functionClass;
 
-  /// Returns `true` if [element] is the unnamed constructor of `List`. This
-  /// will not resolve the constructor if it hasn't been seen yet during
+  /// Returns `true` if [element] is the unnamed constructor of `List`.
+  ///
+  /// This will not resolve the constructor if it hasn't been seen yet during
   /// compilation.
   @override
   bool isUnnamedListConstructor(ConstructorEntity element) =>
       (element.name == '' && element.enclosingClass == listClass) ||
       (element.name == 'list' && element.enclosingClass == jsArrayClass);
 
-  /// Returns `true` if [element] is the 'filled' constructor of `List`. This
-  /// will not resolve the constructor if it hasn't been seen yet during
+  /// Returns `true` if [element] is the 'filled' constructor of `List`.
+  ///
+  /// This will not resolve the constructor if it hasn't been seen yet during
   /// compilation.
   @override
   bool isFilledListConstructor(ConstructorEntity element) =>
       element.name == 'filled' && element.enclosingClass == listClass;
 
-  /// The `dynamic` type.
   @override
   DynamicType get dynamicType => _env.dynamicType;
 
-  /// The `Object` type defined in 'dart:core'.
   @override
   InterfaceType get objectType => _getRawType(objectClass);
 
-  /// The `bool` type defined in 'dart:core'.
   @override
   InterfaceType get boolType => _getRawType(boolClass);
 
-  /// The `num` type defined in 'dart:core'.
   @override
   InterfaceType get numType => _getRawType(numClass);
 
-  /// The `int` type defined in 'dart:core'.
   @override
   InterfaceType get intType => _getRawType(intClass);
 
-  /// The `double` type defined in 'dart:core'.
   @override
   InterfaceType get doubleType => _getRawType(doubleClass);
 
-  /// The `String` type defined in 'dart:core'.
   @override
   InterfaceType get stringType => _getRawType(stringClass);
 
-  /// The `Symbol` type defined in 'dart:core'.
   @override
   InterfaceType get symbolType => _getRawType(symbolClass);
 
-  /// The `Function` type defined in 'dart:core'.
   @override
   InterfaceType get functionType => _getRawType(functionClass);
 
-  /// The `Null` type defined in 'dart:core'.
   @override
   InterfaceType get nullType => _getRawType(nullClass);
 
-  /// The `Type` type defined in 'dart:core'.
   @override
   InterfaceType get typeType => _getRawType(typeClass);
 
   @override
   InterfaceType get typeLiteralType => _getRawType(typeLiteralClass);
 
-  /// The `StackTrace` type defined in 'dart:core';
   @override
   InterfaceType get stackTraceType => _getRawType(stackTraceClass);
 
-  /// Returns an instance of the `List` type defined in 'dart:core' with
-  /// [elementType] as its type argument.
-  ///
-  /// If no type argument is provided, the canonical raw type is returned.
   @override
   InterfaceType listType([DartType elementType]) {
     if (elementType == null) {
@@ -888,10 +856,6 @@
     return _createInterfaceType(listClass, [elementType]);
   }
 
-  /// Returns an instance of the `Set` type defined in 'dart:core' with
-  /// [elementType] as its type argument.
-  ///
-  /// If no type argument is provided, the canonical raw type is returned.
   @override
   InterfaceType setType([DartType elementType]) {
     if (elementType == null) {
@@ -900,10 +864,6 @@
     return _createInterfaceType(setClass, [elementType]);
   }
 
-  /// Returns an instance of the `Map` type defined in 'dart:core' with
-  /// [keyType] and [valueType] as its type arguments.
-  ///
-  /// If no type arguments are provided, the canonical raw type is returned.
   @override
   InterfaceType mapType([DartType keyType, DartType valueType]) {
     if (keyType == null && valueType == null) {
@@ -916,10 +876,6 @@
     return _createInterfaceType(mapClass, [keyType, valueType]);
   }
 
-  /// Returns an instance of the `Iterable` type defined in 'dart:core' with
-  /// [elementType] as its type argument.
-  ///
-  /// If no type argument is provided, the canonical raw type is returned.
   @override
   InterfaceType iterableType([DartType elementType]) {
     if (elementType == null) {
@@ -928,10 +884,6 @@
     return _createInterfaceType(iterableClass, [elementType]);
   }
 
-  /// Returns an instance of the `Future` type defined in 'dart:async' with
-  /// [elementType] as its type argument.
-  ///
-  /// If no type argument is provided, the canonical raw type is returned.
   @override
   InterfaceType futureType([DartType elementType]) {
     if (elementType == null) {
@@ -940,10 +892,6 @@
     return _createInterfaceType(futureClass, [elementType]);
   }
 
-  /// Returns an instance of the `Stream` type defined in 'dart:async' with
-  /// [elementType] as its type argument.
-  ///
-  /// If no type argument is provided, the canonical raw type is returned.
   @override
   InterfaceType streamType([DartType elementType]) {
     if (elementType == null) {
@@ -952,19 +900,16 @@
     return _createInterfaceType(streamClass, [elementType]);
   }
 
-  /// Returns `true` if [element] is a superclass of `String` or `num`.
   @override
   bool isNumberOrStringSupertype(ClassEntity element) {
     return element == _findClass(coreLibrary, 'Comparable', required: false);
   }
 
-  /// Returns `true` if [element] is a superclass of `String`.
   @override
   bool isStringOnlySupertype(ClassEntity element) {
     return element == _findClass(coreLibrary, 'Pattern', required: false);
   }
 
-  /// Returns `true` if [element] is a superclass of `List`.
   @override
   bool isListSupertype(ClassEntity element) => element == iterableClass;
 
@@ -1354,8 +1299,6 @@
   ClassEntity get jsUInt31Class =>
       _jsUInt31Class ??= _findInterceptorsClass('JSUInt31');
 
-  /// Returns `true` member is the 'findIndexForNativeSubclassType' method
-  /// declared in `dart:_interceptors`.
   @override
   bool isFindIndexForNativeSubclassType(MemberEntity member) {
     return member.name == 'findIndexForNativeSubclassType' &&
@@ -1369,7 +1312,6 @@
       _getNativeInterceptorMethod ??=
           _findInterceptorsFunction('getNativeInterceptor');
 
-  /// Returns `true` if [selector] applies to `JSIndexable.length`.
   @override
   bool appliesToJsIndexableLength(Selector selector) {
     return selector.name == 'length' && (selector.isGetter || selector.isCall);
@@ -1401,10 +1343,6 @@
         _isJsStringClass(member.enclosingClass);
   }
 
-  /// Returns `true` if [selector] applies to `JSString.split` on [receiver]
-  /// in the given [world].
-  ///
-  /// Returns `false` if `JSString.split` is not available.
   @override
   bool appliesToJsStringSplit(Selector selector, AbstractValue receiver,
       AbstractValueDomain abstractValueDomain) {
@@ -1465,8 +1403,6 @@
     return _jsAnonymousClass;
   }
 
-  // From dart:_js_helper
-  // TODO(johnniwinther): Avoid the need for this (from [CheckedModeHelper]).
   @override
   FunctionEntity findHelperFunction(String name) => _findHelperFunction(name);
 
@@ -1533,8 +1469,6 @@
       _invocationTypeArgumentGetter ??=
           _findClassMember(jsInvocationMirrorClass, 'typeArguments');
 
-  /// Interface used to determine if an object has the JavaScript
-  /// indexing behavior. The interface is only visible to specific libraries.
   ClassEntity _jsIndexingBehaviorInterface;
   @override
   ClassEntity get jsIndexingBehaviorInterface =>
@@ -1566,7 +1500,6 @@
   @override
   ClassEntity get annotationJSNameClass => _findHelperClass('JSName');
 
-  /// The class for native annotations defined in dart:_js_helper.
   ClassEntity _nativeAnnotationClass;
   @override
   ClassEntity get nativeAnnotationClass =>
@@ -1597,15 +1530,12 @@
   FunctionEntity get assertUnreachableMethod =>
       _assertUnreachableMethod ??= _findHelperFunction('assertUnreachable');
 
-  /// Holds the method "getIsolateAffinityTag" when dart:_js_helper has been
-  /// loaded.
   FunctionEntity _getIsolateAffinityTagMarker;
   @override
   FunctionEntity get getIsolateAffinityTagMarker =>
       _getIsolateAffinityTagMarker ??=
           _findHelperFunction('getIsolateAffinityTag');
 
-  /// Holds the method "requiresPreamble" in _js_helper.
   FunctionEntity _requiresPreambleMarker;
   @override
   FunctionEntity get requiresPreambleMarker =>
@@ -1670,8 +1600,6 @@
   FunctionEntity get throwConcurrentModificationError =>
       _findHelperFunction('throwConcurrentModificationError');
 
-  /// Return `true` if [member] is the 'checkInt' function defined in
-  /// dart:_js_helpers.
   @override
   bool isCheckInt(MemberEntity member) {
     return member.isFunction &&
@@ -1680,8 +1608,6 @@
         member.name == 'checkInt';
   }
 
-  /// Return `true` if [member] is the 'checkNum' function defined in
-  /// dart:_js_helpers.
   @override
   bool isCheckNum(MemberEntity member) {
     return member.isFunction &&
@@ -1690,8 +1616,6 @@
         member.name == 'checkNum';
   }
 
-  /// Return `true` if [member] is the 'checkString' function defined in
-  /// dart:_js_helpers.
   @override
   bool isCheckString(MemberEntity member) {
     return member.isFunction &&
@@ -1867,7 +1791,6 @@
   ClassEntity get symbolImplementationClass =>
       _symbolImplementationClass ??= _findClass(internalLibrary, 'Symbol');
 
-  /// Used to annotate items that have the keyword "native".
   ClassEntity _externalNameClass;
   @override
   ClassEntity get externalNameClass =>
@@ -1913,14 +1836,12 @@
 
   // From dart:_js_embedded_names
 
-  /// Holds the class for the [JsGetName] enum.
   ClassEntity _jsGetNameEnum;
   @override
   ClassEntity get jsGetNameEnum => _jsGetNameEnum ??= _findClass(
       _env.lookupLibrary(Uris.dart__js_embedded_names, required: true),
       'JsGetName');
 
-  /// Holds the class for the [JsBuiltins] enum.
   ClassEntity _jsBuiltinEnum;
   @override
   ClassEntity get jsBuiltinEnum => _jsBuiltinEnum ??= _findClass(
@@ -1962,23 +1883,12 @@
   @override
   bool isForeign(MemberEntity element) => element.library == foreignLibrary;
 
-  /// Returns `true` if [member] is a "foreign helper", that is, a member whose
-  /// semantics is defined synthetically and not through Dart code.
-  ///
-  /// Most foreign helpers are located in the `dart:_foreign_helper` library.
   @override
   bool isForeignHelper(MemberEntity member) {
     return member.library == foreignLibrary ||
         isCreateInvocationMirrorHelper(member);
   }
 
-  /// Returns `true` if [function] is allowed to be external.
-  ///
-  /// This returns `true` for foreign helpers, from environment constructors and
-  /// members of libraries that support native.
-  ///
-  /// This returns `false` for JS interop members which therefore must be
-  /// allowed to be external through the JS interop annotation handling.
   @override
   bool isExternalAllowed(FunctionEntity function) {
     return isForeignHelper(function) ||
@@ -1990,8 +1900,6 @@
         function.library.canonicalUri == Uris.dart_mirrors;
   }
 
-  /// Returns `true` if the implementation of the 'operator ==' [function] is
-  /// known to handle `null` as argument.
   @override
   bool operatorEqHandlesNullArgument(FunctionEntity function) {
     assert(function.name == '==',
diff --git a/pkg/compiler/lib/src/compiler.dart b/pkg/compiler/lib/src/compiler.dart
index 2eb6455..8598e78 100644
--- a/pkg/compiler/lib/src/compiler.dart
+++ b/pkg/compiler/lib/src/compiler.dart
@@ -221,7 +221,8 @@
         measurer.startWallClock();
 
         return new Future.sync(() => runInternal(uri))
-            .catchError((error) => _reporter.onError(uri, error))
+            .catchError((error, StackTrace stackTrace) =>
+                _reporter.onError(uri, error, stackTrace))
             .whenComplete(() {
           measurer.stopWallClock();
         }).then((_) {
@@ -911,7 +912,7 @@
     }
   }
 
-  onError(Uri uri, error) {
+  onError(Uri uri, error, StackTrace stackTrace) {
     try {
       if (!hasCrashed) {
         hasCrashed = true;
@@ -929,7 +930,7 @@
     } catch (doubleFault) {
       // Ignoring exceptions in exception handling.
     }
-    throw error;
+    return new Future.error(error, stackTrace);
   }
 
   @override
@@ -981,6 +982,9 @@
 
   @override
   String valueOf(String key) => null;
+
+  @override
+  Map<String, String> toMap() => const {};
 }
 
 /// Interface for showing progress during compilation.
diff --git a/pkg/compiler/lib/src/constants/values.dart b/pkg/compiler/lib/src/constants/values.dart
index 98af5f5..ffb7acf 100644
--- a/pkg/compiler/lib/src/constants/values.dart
+++ b/pkg/compiler/lib/src/constants/values.dart
@@ -668,7 +668,7 @@
     _unparseTypeArguments(sb);
     sb.write('{');
     sb.writeAll(values.map((v) => v.toStructuredText()), ', ');
-    sb.write('}');
+    sb.write('})');
     return sb.toString();
   }
 
diff --git a/pkg/compiler/lib/src/dart2js.dart b/pkg/compiler/lib/src/dart2js.dart
index 65dc8c6..85abe2a 100644
--- a/pkg/compiler/lib/src/dart2js.dart
+++ b/pkg/compiler/lib/src/dart2js.dart
@@ -127,7 +127,7 @@
   bool showHints;
   bool enableColors;
   int optimizationLevel = null;
-  Uri platformBinaries = fe.computePlatformBinariesLocation();
+  Uri platformBinaries;
   Map<String, String> environment = new Map<String, String>();
   CompilationStrategy compilationStrategy = CompilationStrategy.direct;
 
@@ -250,12 +250,18 @@
       fail("Cannot read and write serialized simultaneously.");
     }
     if (argument != Flags.readData) {
-      readDataUri = currentDirectory
-          .resolve(nativeToUriPath(extractPath(argument, isDirectory: false)));
+      readDataUri = nativeToUri(extractPath(argument, isDirectory: false));
     }
     compilationStrategy = CompilationStrategy.fromData;
   }
 
+  void setDillDependencies(String argument) {
+    String dependencies = extractParameter(argument);
+    String uriDependencies = dependencies.splitMapJoin(',',
+        onMatch: (_) => ',', onNonMatch: (p) => '${nativeToUri(p)}');
+    options.add('${Flags.dillDependencies}=${uriDependencies}');
+  }
+
   void setCfeOnly(String argument) {
     compilationStrategy = CompilationStrategy.toKernel;
   }
@@ -265,8 +271,7 @@
       fail("Cannot read and write serialized simultaneously.");
     }
     if (argument != Flags.writeData) {
-      writeDataUri = currentDirectory
-          .resolve(nativeToUriPath(extractPath(argument, isDirectory: false)));
+      writeDataUri = nativeToUri(extractPath(argument, isDirectory: false));
     }
     compilationStrategy = CompilationStrategy.toData;
   }
@@ -341,6 +346,7 @@
     new OptionHandler(Flags.version, (_) => wantVersion = true),
     new OptionHandler('--library-root=.+', ignoreOption),
     new OptionHandler('--libraries-spec=.+', setLibrarySpecificationUri),
+    new OptionHandler('${Flags.dillDependencies}=.+', setDillDependencies),
     new OptionHandler('${Flags.readData}|${Flags.readData}=.+', setReadData),
     new OptionHandler('${Flags.writeData}|${Flags.writeData}=.+', setWriteData),
     new OptionHandler(Flags.cfeOnly, setCfeOnly),
@@ -391,7 +397,7 @@
     new OptionHandler(Option.showPackageWarnings, passThrough),
     new OptionHandler(Option.enableLanguageExperiments, passThrough),
     new OptionHandler(Flags.useContentSecurityPolicy, passThrough),
-    new OptionHandler(Flags.enableExperimentalMirrors, passThrough),
+    new OptionHandler('--enable-experimental-mirrors', ignoreOption),
     new OptionHandler(Flags.enableAssertMessage, passThrough),
     new OptionHandler('--strong', ignoreOption),
     new OptionHandler(Flags.previewDart2, ignoreOption),
diff --git a/pkg/compiler/lib/src/deferred_load.dart b/pkg/compiler/lib/src/deferred_load.dart
index dbce4ff..a412c65 100644
--- a/pkg/compiler/lib/src/deferred_load.dart
+++ b/pkg/compiler/lib/src/deferred_load.dart
@@ -8,7 +8,8 @@
 
 import 'common/tasks.dart' show CompilerTask;
 import 'common.dart';
-import 'common_elements.dart' show ElementEnvironment, KElementEnvironment;
+import 'common_elements.dart'
+    show CommonElements, ElementEnvironment, KElementEnvironment;
 import 'compiler.dart' show Compiler;
 import 'constants/values.dart'
     show
@@ -85,7 +86,6 @@
 /// import is loaded. Elements that are used by several deferred imports are in
 /// shared OutputUnits.
 abstract class DeferredLoadTask extends CompilerTask {
-  /// The name of this task.
   @override
   String get name => 'Deferred Loading';
 
@@ -145,6 +145,9 @@
 
   KElementEnvironment get elementEnvironment =>
       compiler.frontendStrategy.elementEnvironment;
+
+  CommonElements get commonElements => compiler.frontendStrategy.commonElements;
+
   DiagnosticReporter get reporter => compiler.reporter;
 
   /// Given [imports] that refer to an element from a library, determine whether
@@ -248,42 +251,17 @@
   void collectConstantsInBody(MemberEntity element, Dependencies dependencies);
 
   /// Recursively collects all the dependencies of [type].
-  void _collectTypeDependencies(DartType type, Dependencies dependencies) {
-    if (type is FunctionType) {
-      _collectFunctionTypeDependencies(type, dependencies);
-    } else if (type is TypedefType) {
-      _collectTypeArgumentDependencies(type.typeArguments, dependencies);
-      _collectTypeDependencies(type.unaliased, dependencies);
-    } else if (type is InterfaceType) {
-      _collectTypeArgumentDependencies(type.typeArguments, dependencies);
-      // TODO(sigmund): when we are able to split classes from types in our
-      // runtime-type representation, this should track type.element as a type
-      // dependency instead.
-      dependencies.addClass(type.element);
-    }
+  void _collectTypeDependencies(DartType type, Dependencies dependencies,
+      [ImportEntity import]) {
+    new TypeDependencyVisitor(dependencies, import, commonElements).visit(type);
   }
 
   void _collectTypeArgumentDependencies(
-      Iterable<DartType> typeArguments, Dependencies dependencies) {
+      Iterable<DartType> typeArguments, Dependencies dependencies,
+      [ImportEntity import]) {
     if (typeArguments == null) return;
-    typeArguments.forEach((t) => _collectTypeDependencies(t, dependencies));
-  }
-
-  void _collectFunctionTypeDependencies(
-      FunctionType type, Dependencies dependencies) {
-    for (FunctionTypeVariable typeVariable in type.typeVariables) {
-      _collectTypeDependencies(typeVariable.bound, dependencies);
-    }
-    for (DartType argumentType in type.parameterTypes) {
-      _collectTypeDependencies(argumentType, dependencies);
-    }
-    for (DartType argumentType in type.optionalParameterTypes) {
-      _collectTypeDependencies(argumentType, dependencies);
-    }
-    for (DartType argumentType in type.namedParameterTypes) {
-      _collectTypeDependencies(argumentType, dependencies);
-    }
-    _collectTypeDependencies(type.returnType, dependencies);
+    new TypeDependencyVisitor(dependencies, import, commonElements)
+        .visitList(typeArguments);
   }
 
   /// Extract any dependencies that are known from the impact of [element].
@@ -302,8 +280,7 @@
                 failedAt(usedEntity, "Unexpected static use $staticUse."));
             KLocalFunction localFunction = usedEntity;
             // TODO(sra): Consult KClosedWorld to see if signature is needed.
-            _collectFunctionTypeDependencies(
-                localFunction.functionType, dependencies);
+            _collectTypeDependencies(localFunction.functionType, dependencies);
             dependencies.localFunctions.add(localFunction);
           }
           switch (staticUse.kind) {
@@ -339,6 +316,10 @@
                     interface.element, typeUse.deferredImport);
               }
               break;
+            case TypeUseKind.CONST_INSTANTIATION:
+              _collectTypeDependencies(
+                  type, dependencies, typeUse.deferredImport);
+              break;
             case TypeUseKind.INSTANTIATION:
             case TypeUseKind.NATIVE_INSTANTIATION:
             case TypeUseKind.IS_CHECK:
@@ -608,14 +589,6 @@
     });
   }
 
-  /// Adds extra dependencies coming from mirror usage.
-  void addDeferredMirrorElements(WorkQueue queue);
-
-  /// Add extra dependencies coming from mirror usage in [root] marking it with
-  /// [newSet].
-  void addMirrorElementsForLibrary(
-      WorkQueue queue, LibraryEntity root, ImportSet newSet);
-
   /// Computes a unique string for the name field for each outputUnit.
   void _createOutputUnits() {
     int counter = 1;
@@ -1466,6 +1439,21 @@
     return outputUnitTo._imports.containsAll(outputUnitFrom._imports);
   }
 
+  /// Returns `true` if constant [to] is reachable from element [from] without
+  /// crossing a deferred import.
+  ///
+  /// For example, if we have two deferred libraries `A` and `B` that both
+  /// import a library `C`, then even though elements from `A` and `C` end up in
+  /// different output units, there is a non-deferred path between `A` and `C`.
+  bool hasOnlyNonDeferredImportPathsToConstant(
+      MemberEntity from, ConstantValue to) {
+    OutputUnit outputUnitFrom = outputUnitForMember(from);
+    OutputUnit outputUnitTo = outputUnitForConstant(to);
+    if (outputUnitTo == mainOutputUnit) return true;
+    if (outputUnitFrom == mainOutputUnit) return false;
+    return outputUnitTo._imports.containsAll(outputUnitFrom._imports);
+  }
+
   /// Registers that a constant is used in the same deferred output unit as
   /// [field].
   void registerConstantDeferredUse(
@@ -1590,3 +1578,72 @@
     }
   }
 }
+
+class TypeDependencyVisitor implements DartTypeVisitor<void, Null> {
+  final Dependencies _dependencies;
+  final ImportEntity _import;
+  final CommonElements _commonElements;
+
+  TypeDependencyVisitor(this._dependencies, this._import, this._commonElements);
+
+  @override
+  void visit(DartType type, [_]) {
+    type.accept(this, null);
+  }
+
+  void visitList(List<DartType> types) {
+    types.forEach(visit);
+  }
+
+  @override
+  void visitFutureOrType(FutureOrType type, Null argument) {
+    _dependencies.addClass(_commonElements.futureClass);
+    visit(type.typeArgument);
+  }
+
+  @override
+  void visitDynamicType(DynamicType type, Null argument) {
+    // Nothing to add.
+  }
+
+  @override
+  void visitTypedefType(TypedefType type, Null argument) {
+    visitList(type.typeArguments);
+    visit(type.unaliased);
+  }
+
+  @override
+  void visitInterfaceType(InterfaceType type, Null argument) {
+    visitList(type.typeArguments);
+    // TODO(sigmund): when we are able to split classes from types in our
+    // runtime-type representation, this should track type.element as a type
+    // dependency instead.
+    _dependencies.addClass(type.element, _import);
+  }
+
+  @override
+  void visitFunctionType(FunctionType type, Null argument) {
+    for (FunctionTypeVariable typeVariable in type.typeVariables) {
+      visit(typeVariable.bound);
+    }
+    visitList(type.parameterTypes);
+    visitList(type.optionalParameterTypes);
+    visitList(type.namedParameterTypes);
+    visit(type.returnType);
+  }
+
+  @override
+  void visitFunctionTypeVariable(FunctionTypeVariable type, Null argument) {
+    // Nothing to add. Handled in [visitFunctionType].
+  }
+
+  @override
+  void visitTypeVariableType(TypeVariableType type, Null argument) {
+    // TODO(johnniwinther): Do we need to collect the bound?
+  }
+
+  @override
+  void visitVoidType(VoidType type, Null argument) {
+    // Nothing to add.
+  }
+}
diff --git a/pkg/compiler/lib/src/diagnostics/messages.dart b/pkg/compiler/lib/src/diagnostics/messages.dart
index 16aee21..d04410f 100644
--- a/pkg/compiler/lib/src/diagnostics/messages.dart
+++ b/pkg/compiler/lib/src/diagnostics/messages.dart
@@ -88,6 +88,7 @@
   LIBRARY_NOT_FOUND,
   MIRRORS_LIBRARY_NOT_SUPPORT_WITH_CFE,
   MISSING_EXPRESSION_IN_THROW,
+  NATIVE_NON_INSTANCE_IN_NON_NATIVE_CLASS,
   NO_SUCH_SUPER_MEMBER,
   NON_NATIVE_EXTERNAL,
   NOT_A_COMPILE_TIME_CONSTANT,
@@ -677,6 +678,10 @@
               "Try removing 'external' keyword or annotating the function "
               "as a js-interop function."),
 
+      MessageKind.NATIVE_NON_INSTANCE_IN_NON_NATIVE_CLASS: const MessageTemplate(
+          MessageKind.NATIVE_NON_INSTANCE_IN_NON_NATIVE_CLASS,
+          "Native non-instance members are only allowed in native classes."),
+
       // TODO(32557): Remove these when issue 32557 is fixed.
       MessageKind.SWITCH_CASE_VALUE_OVERRIDES_EQUALS: const MessageTemplate(
           MessageKind.SWITCH_CASE_VALUE_OVERRIDES_EQUALS,
diff --git a/pkg/compiler/lib/src/enqueue.dart b/pkg/compiler/lib/src/enqueue.dart
index d42e48c..ef66b6e 100644
--- a/pkg/compiler/lib/src/enqueue.dart
+++ b/pkg/compiler/lib/src/enqueue.dart
@@ -308,7 +308,7 @@
         _reporter.internalError(member,
             'Unenqueued use of $member: ${useSet.iterable(MemberUse.values)}');
       }
-    });
+    }, dryRun: true);
   }
 
   /// Callback for applying the use of a [member].
@@ -387,6 +387,7 @@
     DartType type = typeUse.type;
     switch (typeUse.kind) {
       case TypeUseKind.INSTANTIATION:
+      case TypeUseKind.CONST_INSTANTIATION:
         _registerInstantiatedType(type, globalDependency: false);
         break;
       case TypeUseKind.NATIVE_INSTANTIATION:
diff --git a/pkg/compiler/lib/src/environment.dart b/pkg/compiler/lib/src/environment.dart
index 29c9861..67db9ac 100644
--- a/pkg/compiler/lib/src/environment.dart
+++ b/pkg/compiler/lib/src/environment.dart
@@ -13,4 +13,7 @@
   /// Note that `bool.fromEnvironment` and `int.fromEnvironment` are also
   /// implemented in terms of `String.fromEnvironment`.
   String valueOf(String key);
+
+  /// Returns the full environment as map.
+  Map<String, String> toMap();
 }
diff --git a/pkg/compiler/lib/src/filenames.dart b/pkg/compiler/lib/src/filenames.dart
index 32aca53..be671f9 100644
--- a/pkg/compiler/lib/src/filenames.dart
+++ b/pkg/compiler/lib/src/filenames.dart
@@ -31,4 +31,7 @@
 
 final Uri currentDirectory = Uri.base;
 
+Uri nativeToUri(String filename) =>
+    currentDirectory.resolve(nativeToUriPath(filename));
+
 String appendSlash(String path) => path.endsWith('/') ? path : '$path/';
diff --git a/pkg/compiler/lib/src/inferrer/builder_kernel.dart b/pkg/compiler/lib/src/inferrer/builder_kernel.dart
index dd872ab..b3098c9 100644
--- a/pkg/compiler/lib/src/inferrer/builder_kernel.dart
+++ b/pkg/compiler/lib/src/inferrer/builder_kernel.dart
@@ -25,6 +25,7 @@
 import '../options.dart';
 import '../universe/selector.dart';
 import '../universe/side_effects.dart';
+import '../util/util.dart';
 import 'inferrer_engine.dart';
 import 'locals_handler.dart';
 import 'type_graph_nodes.dart';
@@ -434,11 +435,16 @@
 
   @override
   TypeInformation visitInstantiation(ir.Instantiation node) {
+    return createInstantiationTypeInformation(visit(node.expression));
+  }
+
+  TypeInformation createInstantiationTypeInformation(
+      TypeInformation expressionType) {
     // TODO(sra): Add a TypeInformation for Instantiations.  Instantiated
     // generic methods will need to be traced separately, and have the
     // information gathered in tracing reflected back to the generic method. For
     // now, pass along the uninstantiated method.
-    return visit(node.expression);
+    return expressionType;
   }
 
   @override
@@ -455,6 +461,10 @@
 
   @override
   TypeInformation visitNullLiteral(ir.NullLiteral literal) {
+    return createNullTypeInformation();
+  }
+
+  TypeInformation createNullTypeInformation() {
     return _types.nullType;
   }
 
@@ -606,14 +616,21 @@
   }
 
   @override
-  TypeInformation visitListLiteral(ir.ListLiteral listLiteral) {
+  TypeInformation visitListLiteral(ir.ListLiteral node) {
+    return createListTypeInformation(
+        node, node.expressions.map((e) => visit(e)),
+        isConst: node.isConst);
+  }
+
+  TypeInformation createListTypeInformation(
+      ir.TreeNode node, Iterable<TypeInformation> elementTypes,
+      {bool isConst}) {
     // We only set the type once. We don't need to re-visit the children
     // when re-analyzing the node.
-    return _inferrer.concreteTypes.putIfAbsent(listLiteral, () {
+    return _inferrer.concreteTypes.putIfAbsent(node, () {
       TypeInformation elementType;
       int length = 0;
-      for (ir.Expression element in listLiteral.expressions) {
-        TypeInformation type = visit(element);
+      for (TypeInformation type in elementTypes) {
         elementType = elementType == null
             ? _types.allocatePhi(null, null, type, isTry: false)
             : _types.addPhiInput(null, elementType, type);
@@ -623,18 +640,24 @@
           ? _types.nonNullEmpty()
           : _types.simplifyPhi(null, null, elementType);
       TypeInformation containerType =
-          listLiteral.isConst ? _types.constListType : _types.growableListType;
+          isConst ? _types.constListType : _types.growableListType;
       return _types.allocateList(
-          containerType, listLiteral, _analyzedMember, elementType, length);
+          containerType, node, _analyzedMember, elementType, length);
     });
   }
 
   @override
   TypeInformation visitSetLiteral(ir.SetLiteral node) {
+    return createSetTypeInformation(node, node.expressions.map((e) => visit(e)),
+        isConst: node.isConst);
+  }
+
+  TypeInformation createSetTypeInformation(
+      ir.TreeNode node, Iterable<TypeInformation> elementTypes,
+      {bool isConst}) {
     return _inferrer.concreteTypes.putIfAbsent(node, () {
       TypeInformation elementType;
-      for (ir.Expression element in node.expressions) {
-        TypeInformation type = visit(element);
+      for (TypeInformation type in elementTypes) {
         elementType = elementType == null
             ? _types.allocatePhi(null, null, type, isTry: false)
             : _types.addPhiInput(null, elementType, type);
@@ -643,7 +666,7 @@
           ? _types.nonNullEmpty()
           : _types.simplifyPhi(null, null, elementType);
       TypeInformation containerType =
-          node.isConst ? _types.constSetType : _types.setType;
+          isConst ? _types.constSetType : _types.setType;
       return _types.allocateSet(
           containerType, node, _analyzedMember, elementType);
     });
@@ -651,17 +674,24 @@
 
   @override
   TypeInformation visitMapLiteral(ir.MapLiteral node) {
+    return createMapTypeInformation(
+        node, node.entries.map((e) => new Pair(visit(e.key), visit(e.value))),
+        isConst: node.isConst);
+  }
+
+  TypeInformation createMapTypeInformation(ir.TreeNode node,
+      Iterable<Pair<TypeInformation, TypeInformation>> entryTypes,
+      {bool isConst}) {
     return _inferrer.concreteTypes.putIfAbsent(node, () {
       List keyTypes = <TypeInformation>[];
       List valueTypes = <TypeInformation>[];
 
-      for (ir.MapEntry entry in node.entries) {
-        keyTypes.add(visit(entry.key));
-        valueTypes.add(visit(entry.value));
+      for (Pair<TypeInformation, TypeInformation> entryType in entryTypes) {
+        keyTypes.add(entryType.a);
+        valueTypes.add(entryType.b);
       }
 
-      TypeInformation type =
-          node.isConst ? _types.constMapType : _types.mapType;
+      TypeInformation type = isConst ? _types.constMapType : _types.mapType;
       return _types.allocateMap(
           type, node, _analyzedMember, keyTypes, valueTypes);
     });
@@ -678,28 +708,45 @@
 
   @override
   TypeInformation visitBoolLiteral(ir.BoolLiteral node) {
-    return _types.boolLiteralType(node.value);
+    return createBoolTypeInformation(node.value);
+  }
+
+  TypeInformation createBoolTypeInformation(bool value) {
+    return _types.boolLiteralType(value);
   }
 
   @override
-  TypeInformation visitIntLiteral(ir.IntLiteral node) =>
-      // The JavaScript backend may turn this literal into a double at
-      // runtime.
-      _types.getConcreteTypeFor(_closedWorld.abstractValueDomain
-          .computeAbstractValueForConstant(
-              constant_system.createIntFromInt(node.value)));
+  TypeInformation visitIntLiteral(ir.IntLiteral node) {
+    return createIntTypeInformation(node.value);
+  }
+
+  TypeInformation createIntTypeInformation(int value) {
+    // The JavaScript backend may turn this literal into a double at
+    // runtime.
+    return _types.getConcreteTypeFor(_closedWorld.abstractValueDomain
+        .computeAbstractValueForConstant(
+            constant_system.createIntFromInt(value)));
+  }
 
   @override
-  TypeInformation visitDoubleLiteral(ir.DoubleLiteral node) =>
-      // The JavaScript backend may turn this literal into an integer at
-      // runtime.
-      _types.getConcreteTypeFor(_closedWorld.abstractValueDomain
-          .computeAbstractValueForConstant(
-              constant_system.createDouble(node.value)));
+  TypeInformation visitDoubleLiteral(ir.DoubleLiteral node) {
+    return createDoubleTypeInformation(node.value);
+  }
+
+  TypeInformation createDoubleTypeInformation(double value) {
+    // The JavaScript backend may turn this literal into a double at
+    // runtime.
+    return _types.getConcreteTypeFor(_closedWorld.abstractValueDomain
+        .computeAbstractValueForConstant(constant_system.createDouble(value)));
+  }
 
   @override
   TypeInformation visitStringLiteral(ir.StringLiteral node) {
-    return _types.stringLiteralType(node.value);
+    return createStringTypeInformation(node.value);
+  }
+
+  TypeInformation createStringTypeInformation(String value) {
+    return _types.stringLiteralType(value);
   }
 
   @override
@@ -720,12 +767,20 @@
 
   @override
   TypeInformation visitSymbolLiteral(ir.SymbolLiteral node) {
+    return createSymbolLiteralTypeInformation();
+  }
+
+  TypeInformation createSymbolLiteralTypeInformation() {
     return _types
         .nonNullSubtype(_closedWorld.commonElements.symbolImplementationClass);
   }
 
   @override
   TypeInformation visitTypeLiteral(ir.TypeLiteral node) {
+    return createTypeLiteralInformation();
+  }
+
+  TypeInformation createTypeLiteralInformation() {
     return _types.typeType;
   }
 
@@ -947,6 +1002,12 @@
   }
 
   @override
+  TypeInformation visitBlockExpression(ir.BlockExpression node) {
+    visit(node.body);
+    return visit(node.value);
+  }
+
+  @override
   TypeInformation visitForInStatement(ir.ForInStatement node) {
     if (node.iterable is ir.ThisExpression) {
       // Any reasonable implementation of an iterator would expose
@@ -1065,7 +1126,11 @@
   /// Try to find the length given to a fixed array constructor call.
   int _findLength(ir.Arguments arguments) {
     ir.Expression firstArgument = arguments.positional.first;
-    if (firstArgument is ir.IntLiteral) {
+    if (firstArgument is ir.ConstantExpression &&
+        firstArgument.constant is ir.IntConstant) {
+      ir.IntConstant constant = firstArgument.constant;
+      return constant.value;
+    } else if (firstArgument is ir.IntLiteral) {
       return firstArgument.value;
     } else if (firstArgument is ir.StaticGet) {
       MemberEntity member = _elementMap.getMember(firstArgument.target);
@@ -1231,8 +1296,14 @@
 
   @override
   TypeInformation visitStaticGet(ir.StaticGet node) {
-    MemberEntity member = _elementMap.getMember(node.target);
     AbstractValue mask = _memberData.typeOfSend(node);
+    assert(mask == null);
+    return createStaticGetTypeInformation(node, node.target, mask: mask);
+  }
+
+  TypeInformation createStaticGetTypeInformation(ir.Node node, ir.Member target,
+      {AbstractValue mask}) {
+    MemberEntity member = _elementMap.getMember(target);
     return handleStaticInvoke(
         node, new Selector.getter(member.memberName), mask, member, null);
   }
@@ -1622,9 +1693,10 @@
     if (stackTrace != null) {
       Local local = _localsMap.getLocalVariable(stackTrace);
       // TODO(johnniwinther): Use a mask based on [StackTrace].
+      // Note: stack trace may be null if users omit a stack in
+      // `completer.completeError`.
       _state.updateLocal(_inferrer, _capturedAndBoxed, local,
-          _types.dynamicType, node, const DynamicType(),
-          isNullable: false /* if requested, the stack is never null */);
+          _types.dynamicType, node, const DynamicType());
     }
     visit(node.body);
     return null;
@@ -1765,8 +1837,110 @@
 
   @override
   TypeInformation visitConstantExpression(ir.ConstantExpression node) {
-    // TODO(johnniwinther,fishythefish): Compute the precise type information.
-    return _types.dynamicType;
+    return node.constant.accept(new TypeInformationConstantVisitor(this, node));
+  }
+}
+
+class TypeInformationConstantVisitor
+    implements ir.ConstantVisitor<TypeInformation> {
+  final KernelTypeGraphBuilder builder;
+  final ir.ConstantExpression expression;
+
+  TypeInformationConstantVisitor(this.builder, this.expression);
+
+  @override
+  TypeInformation defaultConstant(ir.Constant node) {
+    throw new UnsupportedError("Unexpected constant: "
+        "${node} (${node.runtimeType})");
+  }
+
+  @override
+  TypeInformation visitNullConstant(ir.NullConstant node) {
+    return builder.createNullTypeInformation();
+  }
+
+  @override
+  TypeInformation visitBoolConstant(ir.BoolConstant node) {
+    return builder.createBoolTypeInformation(node.value);
+  }
+
+  @override
+  TypeInformation visitIntConstant(ir.IntConstant node) {
+    return builder.createIntTypeInformation(node.value);
+  }
+
+  @override
+  TypeInformation visitDoubleConstant(ir.DoubleConstant node) {
+    return builder.createDoubleTypeInformation(node.value);
+  }
+
+  @override
+  TypeInformation visitStringConstant(ir.StringConstant node) {
+    return builder.createStringTypeInformation(node.value);
+  }
+
+  @override
+  TypeInformation visitSymbolConstant(ir.SymbolConstant node) {
+    return builder.createSymbolLiteralTypeInformation();
+  }
+
+  @override
+  TypeInformation visitMapConstant(ir.MapConstant node) {
+    return builder.createMapTypeInformation(
+        new ConstantReference(expression, node),
+        node.entries
+            .map((e) => new Pair(e.key.accept(this), e.value.accept(this))),
+        isConst: true);
+  }
+
+  @override
+  TypeInformation visitListConstant(ir.ListConstant node) {
+    return builder.createListTypeInformation(
+        new ConstantReference(expression, node),
+        node.entries.map((e) => e.accept(this)),
+        isConst: true);
+  }
+
+  @override
+  TypeInformation visitSetConstant(ir.SetConstant node) {
+    return builder.createSetTypeInformation(
+        new ConstantReference(expression, node),
+        node.entries.map((e) => e.accept(this)),
+        isConst: true);
+  }
+
+  @override
+  TypeInformation visitInstanceConstant(ir.InstanceConstant node) {
+    node.fieldValues.forEach((ir.Reference reference, ir.Constant value) {
+      builder._inferrer.recordTypeOfField(
+          builder._elementMap.getField(reference.asField), value.accept(this));
+    });
+    return builder._types.getConcreteTypeFor(builder
+        ._closedWorld.abstractValueDomain
+        .createNonNullExact(builder._elementMap.getClass(node.classNode)));
+  }
+
+  @override
+  TypeInformation visitPartialInstantiationConstant(
+      ir.PartialInstantiationConstant node) {
+    return builder
+        .createInstantiationTypeInformation(node.tearOffConstant.accept(this));
+  }
+
+  @override
+  TypeInformation visitTearOffConstant(ir.TearOffConstant node) {
+    return builder.createStaticGetTypeInformation(node, node.procedure);
+  }
+
+  @override
+  TypeInformation visitTypeLiteralConstant(ir.TypeLiteralConstant node) {
+    return builder.createTypeLiteralInformation();
+  }
+
+  @override
+  TypeInformation visitUnevaluatedConstant(ir.UnevaluatedConstant node) {
+    assert(false, "Unexpected unevaluated constant: $node");
+    return builder._types.dynamicType;
   }
 }
 
@@ -1991,3 +2165,51 @@
     return sb.toString();
   }
 }
+
+/// Class to represent a reference to a constant in allocation nodes.
+///
+/// This class is needed in order to support serialization of references to
+/// constant nodes. Since the constant nodes are not [ir.TreeNode]s we can only
+/// serialize the constants as values which would bypass by the canonicalization
+/// performed by the CFE. This class extends only as a trick to easily pass
+/// it through serialization.
+///
+/// By adding a reference to the constant expression in which the constant
+/// occurred, we can serialize references to constants in two steps: a reference
+/// to the constant expression followed by an index of the referred constant
+/// in the traversal order of the constant held by the constant expression.
+///
+/// This is used for list, map, and set literals.
+class ConstantReference extends ir.TreeNode {
+  final ir.ConstantExpression expression;
+  final ir.Constant constant;
+
+  ConstantReference(this.expression, this.constant);
+
+  @override
+  void visitChildren(ir.Visitor v) {
+    throw new UnsupportedError("ConstantReference.visitChildren");
+  }
+
+  @override
+  accept(ir.TreeVisitor v) {
+    throw new UnsupportedError("ConstantReference.accept");
+  }
+
+  @override
+  transformChildren(ir.Transformer v) {
+    throw new UnsupportedError("ConstantReference.transformChildren");
+  }
+
+  @override
+  int get hashCode => 13 * constant.hashCode;
+
+  @override
+  bool operator ==(Object other) {
+    if (identical(this, other)) return true;
+    return other is ConstantReference && constant == other.constant;
+  }
+
+  @override
+  String toString() => 'ConstantReference(constant=$constant)';
+}
diff --git a/pkg/compiler/lib/src/inferrer/inferrer_engine.dart b/pkg/compiler/lib/src/inferrer/inferrer_engine.dart
index 801da74..a33cffc 100644
--- a/pkg/compiler/lib/src/inferrer/inferrer_engine.dart
+++ b/pkg/compiler/lib/src/inferrer/inferrer_engine.dart
@@ -59,6 +59,8 @@
   ]);
 
   CompilerOptions get options;
+
+  /// The [JClosedWorld] on which inference reasoning is based.
   JClosedWorld get closedWorld;
   DiagnosticReporter get reporter;
   AbstractValueDomain get abstractValueDomain =>
@@ -70,7 +72,7 @@
   NoSuchMethodData get noSuchMethodData => closedWorld.noSuchMethodData;
 
   TypeSystem get types;
-  Map<ir.Node, TypeInformation> get concreteTypes;
+  Map<ir.TreeNode, TypeInformation> get concreteTypes;
   InferredDataBuilder get inferredDataBuilder;
 
   FunctionEntity get mainElement;
@@ -271,7 +273,6 @@
   final DiagnosticReporter reporter;
   final CompilerOutput _compilerOutput;
 
-  /// The [JClosedWorld] on which inference reasoning is based.
   @override
   final JsClosedWorld closedWorld;
   @override
@@ -280,8 +281,8 @@
   @override
   final TypeSystem types;
   @override
-  final Map<ir.Node, TypeInformation> concreteTypes =
-      new Map<ir.Node, TypeInformation>();
+  final Map<ir.TreeNode, TypeInformation> concreteTypes =
+      new Map<ir.TreeNode, TypeInformation>();
 
   final Set<ConstructorEntity> generativeConstructorsExposingThis =
       new Set<ConstructorEntity>();
@@ -1286,11 +1287,6 @@
     }
   }
 
-  /// Returns true if global optimizations such as type inferencing can apply to
-  /// the field [element].
-  ///
-  /// One category of elements that do not apply is runtime helpers that the
-  /// backend calls, but the optimizations don't see those calls.
   @override
   bool canFieldBeUsedForGlobalOptimizations(FieldEntity element) {
     if (closedWorld.backendUsage.isFieldUsedByBackend(element)) {
@@ -1302,11 +1298,6 @@
     return true;
   }
 
-  /// Returns true if global optimizations such as type inferencing can apply to
-  /// the parameter [element].
-  ///
-  /// One category of elements that do not apply is runtime helpers that the
-  /// backend calls, but the optimizations don't see those calls.
   @override
   bool canFunctionParametersBeUsedForGlobalOptimizations(
       FunctionEntity function) {
@@ -1467,7 +1458,6 @@
         sendMap, iteratorMap, currentMap, moveNextMap);
   }
 
-  /// Serializes this [GlobalTypeInferenceElementData] to [sink].
   @override
   void writeToDataSink(DataSink sink, AbstractValueDomain abstractValueDomain) {
     sink.begin(tag);
diff --git a/pkg/compiler/lib/src/inferrer/type_system.dart b/pkg/compiler/lib/src/inferrer/type_system.dart
index aa827d3..c5c32cf 100644
--- a/pkg/compiler/lib/src/inferrer/type_system.dart
+++ b/pkg/compiler/lib/src/inferrer/type_system.dart
@@ -431,7 +431,7 @@
   }
 
   TypeInformation allocateList(
-      TypeInformation type, ir.Node node, MemberEntity enclosing,
+      TypeInformation type, ir.TreeNode node, MemberEntity enclosing,
       [TypeInformation elementType, int length]) {
     assert(strategy.checkListNode(node));
     ClassEntity typedDataClass = _closedWorld.commonElements.typedDataClass;
@@ -472,7 +472,7 @@
   }
 
   TypeInformation allocateSet(
-      TypeInformation type, ir.Node node, MemberEntity enclosing,
+      TypeInformation type, ir.TreeNode node, MemberEntity enclosing,
       [TypeInformation elementType]) {
     assert(strategy.checkSetNode(node));
     bool isConst = type.type == _abstractValueDomain.constSetType;
@@ -491,7 +491,7 @@
   }
 
   TypeInformation allocateMap(
-      ConcreteTypeInformation type, ir.Node node, MemberEntity element,
+      ConcreteTypeInformation type, ir.TreeNode node, MemberEntity element,
       [List<TypeInformation> keyTypes, List<TypeInformation> valueTypes]) {
     assert(strategy.checkMapNode(node));
     assert(keyTypes.length == valueTypes.length);
diff --git a/pkg/compiler/lib/src/inferrer/typemasks/container_type_mask.dart b/pkg/compiler/lib/src/inferrer/typemasks/container_type_mask.dart
index e920091..f2fda3d 100644
--- a/pkg/compiler/lib/src/inferrer/typemasks/container_type_mask.dart
+++ b/pkg/compiler/lib/src/inferrer/typemasks/container_type_mask.dart
@@ -4,9 +4,9 @@
 
 part of masks;
 
-/// A [ContainerTypeMask] is a [TypeMask] for a specific allocation
-/// site of a container (currently only List) that will get specialized
-/// once the [TypeGraphInferrer] phase finds an element type for it.
+/// A [TypeMask] for a specific allocation site of a container (currently only
+/// List) that will get specialized once the [TypeGraphInferrer] phase finds an
+/// element type for it.
 class ContainerTypeMask extends AllocationTypeMask {
   /// Tag used for identifying serialized [ContainerTypeMask] objects in a
   /// debugging data stream.
@@ -15,11 +15,9 @@
   @override
   final TypeMask forwardTo;
 
-  // The [Node] where this type mask was created.
   @override
-  final ir.TreeNode allocationNode;
+  final ir.Node allocationNode;
 
-  // The [Entity] where this type mask was created.
   @override
   final MemberEntity allocationElement;
 
diff --git a/pkg/compiler/lib/src/inferrer/typemasks/dictionary_type_mask.dart b/pkg/compiler/lib/src/inferrer/typemasks/dictionary_type_mask.dart
index 827840c..ef15561 100644
--- a/pkg/compiler/lib/src/inferrer/typemasks/dictionary_type_mask.dart
+++ b/pkg/compiler/lib/src/inferrer/typemasks/dictionary_type_mask.dart
@@ -20,7 +20,7 @@
 
   DictionaryTypeMask(
       TypeMask forwardTo,
-      ir.TreeNode allocationNode,
+      ir.Node allocationNode,
       MemberEntity allocationElement,
       TypeMask keyType,
       TypeMask valueType,
diff --git a/pkg/compiler/lib/src/inferrer/typemasks/flat_type_mask.dart b/pkg/compiler/lib/src/inferrer/typemasks/flat_type_mask.dart
index d8ddc8a..b7845d2 100644
--- a/pkg/compiler/lib/src/inferrer/typemasks/flat_type_mask.dart
+++ b/pkg/compiler/lib/src/inferrer/typemasks/flat_type_mask.dart
@@ -265,8 +265,6 @@
     return false;
   }
 
-  /// Returns the [Entity] if this type represents a single class, otherwise
-  /// returns `null`.  This method is conservative.
   @override
   ClassEntity singleClass(JClosedWorld closedWorld) {
     if (isEmptyOrNull) return null;
@@ -283,7 +281,6 @@
     }
   }
 
-  /// Returns whether or not this type mask contains all types.
   @override
   bool containsAll(JClosedWorld closedWorld) {
     if (isEmptyOrNull || isExact) return false;
@@ -544,9 +541,6 @@
         : new TypeMask.nonNullEmpty();
   }
 
-  /// Returns whether [element] is a potential target when being
-  /// invoked on this type mask. [selector] is used to ensure library
-  /// privacy is taken into account.
   @override
   bool canHit(MemberEntity element, Name name, JClosedWorld closedWorld) {
     CommonElements commonElements = closedWorld.commonElements;
diff --git a/pkg/compiler/lib/src/inferrer/typemasks/forwarding_type_mask.dart b/pkg/compiler/lib/src/inferrer/typemasks/forwarding_type_mask.dart
index 39f850c..8d86f0c 100644
--- a/pkg/compiler/lib/src/inferrer/typemasks/forwarding_type_mask.dart
+++ b/pkg/compiler/lib/src/inferrer/typemasks/forwarding_type_mask.dart
@@ -154,8 +154,8 @@
 }
 
 abstract class AllocationTypeMask extends ForwardingTypeMask {
-  // The [ir.TreeNode] where this type mask was created.
-  ir.TreeNode get allocationNode;
+  // The [ir.Node] where this type mask was created.
+  ir.Node get allocationNode;
 
   // The [Entity] where this type mask was created.
   MemberEntity get allocationElement;
diff --git a/pkg/compiler/lib/src/inferrer/typemasks/map_type_mask.dart b/pkg/compiler/lib/src/inferrer/typemasks/map_type_mask.dart
index 7ba33af..3b4d729 100644
--- a/pkg/compiler/lib/src/inferrer/typemasks/map_type_mask.dart
+++ b/pkg/compiler/lib/src/inferrer/typemasks/map_type_mask.dart
@@ -15,11 +15,9 @@
   @override
   final TypeMask forwardTo;
 
-  // The [Node] where this type mask was created.
   @override
-  final ir.TreeNode allocationNode;
+  final ir.Node allocationNode;
 
-  // The [MemberEntity] where this type mask was created.
   @override
   final MemberEntity allocationElement;
 
diff --git a/pkg/compiler/lib/src/inferrer/typemasks/set_type_mask.dart b/pkg/compiler/lib/src/inferrer/typemasks/set_type_mask.dart
index 966cbdf..0b1ffb6e 100644
--- a/pkg/compiler/lib/src/inferrer/typemasks/set_type_mask.dart
+++ b/pkg/compiler/lib/src/inferrer/typemasks/set_type_mask.dart
@@ -15,11 +15,9 @@
   @override
   final TypeMask forwardTo;
 
-  // The [Node] where this type mask was created.
   @override
-  final ir.TreeNode allocationNode;
+  final ir.Node allocationNode;
 
-  // The [Entity] where this type mask was created.
   @override
   final MemberEntity allocationElement;
 
diff --git a/pkg/compiler/lib/src/inferrer/typemasks/type_mask.dart b/pkg/compiler/lib/src/inferrer/typemasks/type_mask.dart
index cf6099d..21a4723 100644
--- a/pkg/compiler/lib/src/inferrer/typemasks/type_mask.dart
+++ b/pkg/compiler/lib/src/inferrer/typemasks/type_mask.dart
@@ -400,7 +400,10 @@
   TypeMask intersection(TypeMask other, JClosedWorld closedWorld);
 
   /// Returns whether [element] is a potential target when being invoked on this
-  /// type mask. [name] is used to ensure library privacy is taken into account.
+  /// type mask.
+  ///
+  ///
+  /// [name] is used to ensure library privacy is taken into account.
   bool canHit(MemberEntity element, Name name, JClosedWorld closedWorld);
 
   /// Returns whether this [TypeMask] applied to [selector] can hit a
diff --git a/pkg/compiler/lib/src/io/location_provider.dart b/pkg/compiler/lib/src/io/location_provider.dart
index 3455e31..fff55c5 100644
--- a/pkg/compiler/lib/src/io/location_provider.dart
+++ b/pkg/compiler/lib/src/io/location_provider.dart
@@ -40,7 +40,7 @@
   @override
   Location getLocation(int offset) {
     RangeError.checkValueInInterval(offset, 0, length, 'offset');
-    return new Source(lineStarts, null).getLocation(null, offset);
+    return new Source(lineStarts, null, null, null).getLocation(null, offset);
   }
 
   @override
diff --git a/pkg/compiler/lib/src/io/source_file.dart b/pkg/compiler/lib/src/io/source_file.dart
index ffdb8d0..1b358bc 100644
--- a/pkg/compiler/lib/src/io/source_file.dart
+++ b/pkg/compiler/lib/src/io/source_file.dart
@@ -26,9 +26,14 @@
   kernel.Source cachedKernelSource;
 
   kernel.Source get kernelSource {
-    return cachedKernelSource ??=
-        new kernel.Source(lineStarts, slowUtf8ZeroTerminatedBytes())
-          ..cachedText = slowText();
+    // TODO(johnniwinther): Instead of creating a new Source object,
+    // we should use the one provided by the front-end.
+    return cachedKernelSource ??= new kernel.Source(
+        lineStarts,
+        slowUtf8ZeroTerminatedBytes(),
+        uri /* TODO(jensj): What is the import URI? */,
+        uri)
+      ..cachedText = slowText();
   }
 
   /// The name of the file.
diff --git a/pkg/compiler/lib/src/io/source_information.dart b/pkg/compiler/lib/src/io/source_information.dart
index 7709884..64ca507 100644
--- a/pkg/compiler/lib/src/io/source_information.dart
+++ b/pkg/compiler/lib/src/io/source_information.dart
@@ -267,27 +267,21 @@
   AbstractSourceLocation.fromOther(AbstractSourceLocation location)
       : this.fromLocation(location._location);
 
-  /// The absolute URI of the source file of this source location.
   @override
   Uri get sourceUri => _sourceFile.uri;
 
-  /// The character offset of the this source location into the source file.
   @override
   int get offset;
 
-  /// The 1-based line number of the [offset].
   @override
   int get line => (_location ??= _sourceFile.getLocation(offset)).line;
 
-  /// The 1-based column number of the [offset] with its line.
   @override
   int get column => (_location ??= _sourceFile.getLocation(offset)).column;
 
-  /// The name associated with this source location, if any.
   @override
   String get sourceName;
 
-  /// `true` if the offset within the length of the source file.
   @override
   bool get isValid => offset < _sourceFile.length;
 
diff --git a/pkg/compiler/lib/src/ir/annotations.dart b/pkg/compiler/lib/src/ir/annotations.dart
index 1cd8bcf..ae07571 100644
--- a/pkg/compiler/lib/src/ir/annotations.dart
+++ b/pkg/compiler/lib/src/ir/annotations.dart
@@ -55,6 +55,68 @@
   // Returns a list of the `@pragma('dart2js:<suffix>')` annotations on [node].
   List<PragmaAnnotationData> getMemberPragmaAnnotationData(ir.Member node) =>
       _memberPragmaAnnotations[node] ?? const [];
+
+  void forEachNativeClass(void Function(ir.Class, String) f) {
+    _nativeClassNames.forEach(f);
+  }
+
+  void forEachJsInteropLibrary(void Function(ir.Library, String) f) {
+    _jsInteropLibraryNames.forEach(f);
+  }
+
+  void forEachJsInteropClass(
+      void Function(ir.Class, String, {bool isAnonymous}) f) {
+    _jsInteropClassNames.forEach((ir.Class node, String name) {
+      f(node, name, isAnonymous: isAnonymousJsInteropClass(node));
+    });
+  }
+
+  void forEachJsInteropMember(void Function(ir.Member, String) f) {
+    _jsInteropLibraryNames.forEach((ir.Library library, _) {
+      for (ir.Member member in library.members) {
+        if (member.isExternal) {
+          f(member, _jsInteropMemberNames[member] ?? member.name.name);
+        }
+      }
+    });
+    _jsInteropClassNames.forEach((ir.Class cls, _) {
+      for (ir.Member member in cls.members) {
+        if (member is ir.Field) continue;
+        String name = _jsInteropMemberNames[member];
+        if (member.isExternal) {
+          name ??= member.name.name;
+        }
+        f(member, name);
+      }
+    });
+  }
+
+  void forEachNativeMethodData(
+      void Function(ir.Member, String name, Iterable<String> createsAnnotations,
+              Iterable<String> returnsAnnotations)
+          f) {
+    for (ir.Member node in _nativeMembers) {
+      if (node is! ir.Field) {
+        String name = _nativeMemberNames[node] ?? node.name.name;
+        f(node, name, getCreatesAnnotations(node), getReturnsAnnotations(node));
+      }
+    }
+  }
+
+  void forEachNativeFieldData(
+      void Function(ir.Member, String name, Iterable<String> createsAnnotations,
+              Iterable<String> returnsAnnotations)
+          f) {
+    for (ir.Class cls in _nativeClassNames.keys) {
+      for (ir.Field field in cls.fields) {
+        if (field.isInstanceMember) {
+          String name = _nativeMemberNames[field] ?? field.name.name;
+          f(field, name, getCreatesAnnotations(field),
+              getReturnsAnnotations(field));
+        }
+      }
+    }
+  }
 }
 
 IrAnnotationData processAnnotations(ir.Component component) {
diff --git a/pkg/compiler/lib/src/ir/constants.dart b/pkg/compiler/lib/src/ir/constants.dart
new file mode 100644
index 0000000..bf36eee
--- /dev/null
+++ b/pkg/compiler/lib/src/ir/constants.dart
@@ -0,0 +1,141 @@
+// Copyright (c) 2019, the Dart project authors.  Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+import 'package:kernel/ast.dart' as ir;
+import 'package:kernel/type_environment.dart' as ir;
+import 'package:front_end/src/api_prototype/constant_evaluator.dart' as ir;
+import 'package:front_end/src/api_unstable/dart2js.dart' as ir;
+
+import '../kernel/dart2js_target.dart';
+
+typedef ReportErrorFunction = void Function(
+    ir.LocatedMessage message, List<ir.LocatedMessage> context);
+
+class Dart2jsConstantEvaluator extends ir.ConstantEvaluator {
+  final bool _supportReevaluationForTesting;
+
+  bool requiresConstant;
+
+  Dart2jsConstantEvaluator(
+      ir.TypeEnvironment typeEnvironment, ReportErrorFunction reportError,
+      {bool enableAsserts,
+      Map<String, String> environment: const {},
+      bool supportReevaluationForTesting: false})
+      : _supportReevaluationForTesting = supportReevaluationForTesting,
+        super(const Dart2jsConstantsBackend(), environment, typeEnvironment,
+            enableAsserts, new ErrorReporter(reportError));
+
+  @override
+  ErrorReporter get errorReporter => super.errorReporter;
+
+  @override
+  ir.Constant evaluate(ir.Expression node, {bool requireConstant: true}) {
+    errorReporter.requiresConstant = requireConstant;
+    if (node is ir.ConstantExpression) {
+      ir.Constant constant = node.constant;
+      if (constant is ir.UnevaluatedConstant) {
+        ir.Constant result = super.evaluate(constant.expression);
+        assert(
+            result is ir.UnevaluatedConstant ||
+                !result.accept(const UnevaluatedConstantFinder()),
+            "Invalid constant result $result from ${constant.expression}.");
+        if (!_supportReevaluationForTesting) {
+          node.constant = result;
+        }
+        return result;
+      }
+      return constant;
+    }
+    if (requireConstant) {
+      // TODO(johnniwinther): Handle reporting of compile-time constant
+      // evaluation errors.
+      return super.evaluate(node);
+    } else {
+      try {
+        return super.evaluate(node);
+      } catch (e) {
+        return null;
+      }
+    }
+  }
+}
+
+class ErrorReporter implements ir.ErrorReporter {
+  final ReportErrorFunction _reportError;
+  bool requiresConstant;
+
+  ErrorReporter(this._reportError);
+
+  @override
+  void reportInvalidExpression(ir.InvalidExpression node) {
+    // Ignore.
+  }
+
+  @override
+  void report(ir.LocatedMessage message, List<ir.LocatedMessage> context) {
+    if (requiresConstant) {
+      _reportError(message, context);
+    }
+  }
+}
+
+/// [ir.Constant] visitor that returns `true` if the visitor constant contains
+/// an [ir.UnevaluatedConstant].
+class UnevaluatedConstantFinder extends ir.ConstantVisitor<bool> {
+  const UnevaluatedConstantFinder();
+
+  @override
+  bool defaultConstant(ir.Constant node) => false;
+
+  @override
+  bool visitUnevaluatedConstant(ir.UnevaluatedConstant node) => true;
+
+  @override
+  bool visitPartialInstantiationConstant(ir.PartialInstantiationConstant node) {
+    return node.tearOffConstant.accept(this);
+  }
+
+  @override
+  bool visitInstanceConstant(ir.InstanceConstant node) {
+    for (ir.Constant value in node.fieldValues.values) {
+      if (value.accept(this)) {
+        return true;
+      }
+    }
+    return false;
+  }
+
+  @override
+  bool visitSetConstant(ir.SetConstant node) {
+    for (ir.Constant value in node.entries) {
+      if (value.accept(this)) {
+        return true;
+      }
+    }
+    return false;
+  }
+
+  @override
+  bool visitListConstant(ir.ListConstant node) {
+    for (ir.Constant value in node.entries) {
+      if (value.accept(this)) {
+        return true;
+      }
+    }
+    return false;
+  }
+
+  @override
+  bool visitMapConstant(ir.MapConstant node) {
+    for (ir.ConstantMapEntry entry in node.entries) {
+      if (entry.key.accept(this)) {
+        return true;
+      }
+      if (entry.value.accept(this)) {
+        return true;
+      }
+    }
+    return false;
+  }
+}
diff --git a/pkg/compiler/lib/src/ir/impact.dart b/pkg/compiler/lib/src/ir/impact.dart
index c548eae..66a527e 100644
--- a/pkg/compiler/lib/src/ir/impact.dart
+++ b/pkg/compiler/lib/src/ir/impact.dart
@@ -88,7 +88,7 @@
 
   void registerTypeLiteral(ir.DartType type, ir.LibraryDependency import);
 
-  void registerFieldInitializer(ir.Field node);
+  void registerFieldInitialization(ir.Field node);
 
   void registerLoadLibrary();
 
@@ -111,6 +111,9 @@
       ir.LibraryDependency import,
       {bool isConst});
 
+  void registerConstInstantiation(ir.Class cls, List<ir.DartType> typeArguments,
+      ir.LibraryDependency import);
+
   void registerStaticInvocation(
       ir.Procedure target,
       int positionalArguments,
@@ -175,8 +178,6 @@
   void registerRuntimeTypeUse(ir.PropertyGet node, RuntimeTypeUseKind kind,
       ir.DartType receiverType, ir.DartType argumentType);
 
-  void registerConstant(ir.ConstantExpression node);
-
   // TODO(johnniwinther): Remove these when CFE provides constants.
   void registerConstructorNode(ir.Constructor node);
   void registerFieldNode(ir.Field node);
@@ -399,7 +400,7 @@
 
   @override
   void handleFieldInitializer(ir.FieldInitializer node) {
-    registerFieldInitializer(node.field);
+    registerFieldInitialization(node.field);
   }
 
   @override
@@ -653,7 +654,8 @@
 
   @override
   void handleConstantExpression(ir.ConstantExpression node) {
-    registerConstant(node);
+    ir.LibraryDependency import = getDeferredImport(node);
+    node.constant.accept(new ConstantImpactVisitor(this, import));
   }
 }
 
@@ -692,3 +694,109 @@
   ImpactBuilderData(
       this.impactData, this.typeMapsForTesting, this.cachedStaticTypes);
 }
+
+class ConstantImpactVisitor implements ir.ConstantVisitor<void> {
+  final ImpactRegistry registry;
+  final ir.LibraryDependency import;
+
+  ConstantImpactVisitor(this.registry, this.import);
+
+  @override
+  void defaultConstant(ir.Constant node) {
+    throw new UnsupportedError(
+        "Unexpected constant ${node} (${node.runtimeType}).");
+  }
+
+  @override
+  void visitUnevaluatedConstant(ir.UnevaluatedConstant node) {
+    // Do nothing. This occurs when the constant couldn't be evaluated because
+    // of a compile-time error.
+  }
+
+  @override
+  void visitTypeLiteralConstant(ir.TypeLiteralConstant node) {
+    registry.registerTypeLiteral(node.type, import);
+  }
+
+  @override
+  void visitTearOffConstant(ir.TearOffConstant node) {
+    registry.registerStaticTearOff(node.procedure, import);
+  }
+
+  @override
+  void visitPartialInstantiationConstant(ir.PartialInstantiationConstant node) {
+    registry.registerGenericInstantiation(
+        node.tearOffConstant.procedure.function.functionType, node.types);
+    node.tearOffConstant.accept(this);
+  }
+
+  @override
+  void visitInstanceConstant(ir.InstanceConstant node) {
+    registry.registerConstInstantiation(
+        node.classNode, node.typeArguments, import);
+    node.fieldValues.forEach((ir.Reference reference, ir.Constant value) {
+      ir.Field field = reference.asField;
+      registry.registerFieldInitialization(field);
+      value.accept(this);
+    });
+  }
+
+  @override
+  void visitSetConstant(ir.SetConstant node) {
+    registry.registerSetLiteral(node.typeArgument,
+        isConst: true, isEmpty: node.entries.isEmpty);
+    for (ir.Constant element in node.entries) {
+      element.accept(this);
+    }
+  }
+
+  @override
+  void visitListConstant(ir.ListConstant node) {
+    registry.registerListLiteral(node.typeArgument,
+        isConst: true, isEmpty: node.entries.isEmpty);
+    for (ir.Constant element in node.entries) {
+      element.accept(this);
+    }
+  }
+
+  @override
+  void visitMapConstant(ir.MapConstant node) {
+    registry.registerMapLiteral(node.keyType, node.valueType,
+        isConst: true, isEmpty: node.entries.isEmpty);
+    for (ir.ConstantMapEntry entry in node.entries) {
+      entry.key.accept(this);
+      entry.value.accept(this);
+    }
+  }
+
+  @override
+  void visitSymbolConstant(ir.SymbolConstant node) {
+    // TODO(johnniwinther): Handle the library reference.
+    registry.registerSymbolLiteral(node.name);
+  }
+
+  @override
+  void visitStringConstant(ir.StringConstant node) {
+    registry.registerStringLiteral(node.value);
+  }
+
+  @override
+  void visitDoubleConstant(ir.DoubleConstant node) {
+    registry.registerDoubleLiteral(node.value);
+  }
+
+  @override
+  void visitIntConstant(ir.IntConstant node) {
+    registry.registerIntLiteral(node.value);
+  }
+
+  @override
+  void visitBoolConstant(ir.BoolConstant node) {
+    registry.registerBoolLiteral(node.value);
+  }
+
+  @override
+  void visitNullConstant(ir.NullConstant node) {
+    registry.registerNullLiteral();
+  }
+}
diff --git a/pkg/compiler/lib/src/ir/impact_data.dart b/pkg/compiler/lib/src/ir/impact_data.dart
index cf3ab20..1d0abe6 100644
--- a/pkg/compiler/lib/src/ir/impact_data.dart
+++ b/pkg/compiler/lib/src/ir/impact_data.dart
@@ -188,6 +188,14 @@
   }
 
   @override
+  void registerConstInstantiation(ir.Class cls, List<ir.DartType> typeArguments,
+      ir.LibraryDependency import) {
+    _data._constInstantiations ??= [];
+    _data._constInstantiations
+        .add(new _ConstInstantiation(cls, typeArguments, import));
+  }
+
+  @override
   void registerLazyField() {
     _registerFeature(_Feature.lazyField);
   }
@@ -216,7 +224,7 @@
   }
 
   @override
-  void registerFieldInitializer(ir.Field node) {
+  void registerFieldInitialization(ir.Field node) {
     _data._fieldInitializers ??= [];
     _data._fieldInitializers.add(node);
   }
@@ -405,12 +413,6 @@
   }
 
   @override
-  void registerConstant(ir.ConstantExpression node) {
-    _data._constants ??= [];
-    _data._constants.add(node);
-  }
-
-  @override
   void registerConstructorNode(ir.Constructor node) {
     _data._constructorNodes ??= [];
     _data._constructorNodes.add(node);
@@ -475,6 +477,7 @@
   List<_LocalFunctionInvocation> _localFunctionInvocations;
   List<_StaticInvocation> _staticInvocations;
   List<_ConstructorInvocation> _constructorInvocations;
+  List<_ConstInstantiation> _constInstantiations;
   EnumSet<_Feature> _features;
   List<_TypeUse> _typeUses;
   List<_RedirectingInitializer> _redirectingInitializers;
@@ -494,7 +497,6 @@
   List<double> _doubleLiterals;
   List<int> _intLiterals;
   List<_RuntimeTypeUse> _runtimeTypeUses;
-  List<ir.ConstantExpression> _constants;
 
   // TODO(johnniwinther): Remove these when CFE provides constants.
   List<ir.Constructor> _constructorNodes;
@@ -802,6 +804,12 @@
             isConst: data.isConst);
       }
     }
+    if (_constInstantiations != null) {
+      for (_ConstInstantiation data in _constInstantiations) {
+        registry.registerConstInstantiation(
+            data.cls, data.typeArguments, data.import);
+      }
+    }
     if (_features != null) {
       for (_Feature data in _features.iterable(_Feature.values)) {
         switch (data) {
@@ -885,7 +893,7 @@
     }
     if (_fieldInitializers != null) {
       for (ir.Field data in _fieldInitializers) {
-        registry.registerFieldInitializer(data);
+        registry.registerFieldInitialization(data);
       }
     }
     if (_typeLiterals != null) {
@@ -1319,6 +1327,33 @@
   }
 }
 
+class _ConstInstantiation {
+  static const String tag = '_ConstInstantiation';
+
+  final ir.Class cls;
+  final List<ir.DartType> typeArguments;
+  final ir.LibraryDependency import;
+
+  _ConstInstantiation(this.cls, this.typeArguments, this.import);
+
+  factory _ConstInstantiation.fromDataSource(DataSource source) {
+    source.begin(tag);
+    ir.Class cls = source.readClassNode();
+    List<ir.DartType> typeArguments = source.readDartTypeNodes();
+    ir.LibraryDependency import = source.readLibraryDependencyNodeOrNull();
+    source.end(tag);
+    return new _ConstInstantiation(cls, typeArguments, import);
+  }
+
+  void toDataSink(DataSink sink) {
+    sink.begin(tag);
+    sink.writeClassNode(cls);
+    sink.writeDartTypeNodes(typeArguments);
+    sink.writeLibraryDependencyNodeOrNull(import);
+    sink.end(tag);
+  }
+}
+
 enum _Feature {
   lazyField,
   loadLibrary,
diff --git a/pkg/compiler/lib/src/ir/scope.dart b/pkg/compiler/lib/src/ir/scope.dart
index 1d2a300..2a9cee6 100644
--- a/pkg/compiler/lib/src/ir/scope.dart
+++ b/pkg/compiler/lib/src/ir/scope.dart
@@ -5,6 +5,7 @@
 import 'package:kernel/ast.dart' as ir;
 import 'closure.dart';
 import 'scope_visitor.dart';
+import 'package:front_end/src/api_prototype/constant_evaluator.dart' as ir;
 
 class ScopeModel {
   final ClosureScopeModel closureScopeModel;
@@ -19,8 +20,9 @@
 
   /// Inspect members and mark if those members capture any state that needs to
   /// be marked as free variables.
-  factory ScopeModel.from(ir.Member node) {
-    ScopeModelBuilder builder = new ScopeModelBuilder();
+  factory ScopeModel.from(
+      ir.Member node, ir.ConstantEvaluator constantEvaluator) {
+    ScopeModelBuilder builder = new ScopeModelBuilder(constantEvaluator);
     return builder.computeModel(node);
   }
 }
diff --git a/pkg/compiler/lib/src/ir/scope_visitor.dart b/pkg/compiler/lib/src/ir/scope_visitor.dart
index 7fcac8a..ede0784 100644
--- a/pkg/compiler/lib/src/ir/scope_visitor.dart
+++ b/pkg/compiler/lib/src/ir/scope_visitor.dart
@@ -3,6 +3,7 @@
 // BSD-style license that can be found in the LICENSE file.
 
 import 'package:kernel/ast.dart' as ir;
+import 'package:front_end/src/api_prototype/constant_evaluator.dart' as ir;
 
 import 'closure.dart';
 import 'scope.dart';
@@ -13,6 +14,8 @@
 /// variable is being used at any point in the code.
 class ScopeModelBuilder extends ir.Visitor<InitializerComplexity>
     with VariableCollectorMixin {
+  final ir.ConstantEvaluator _constantEvaluator;
+
   final ClosureScopeModel _model = new ClosureScopeModel();
 
   /// A map of each visited call node with the associated information about what
@@ -74,6 +77,8 @@
   /// type variable usage, such as type argument in method invocations.
   VariableUse _currentTypeUsage;
 
+  ScopeModelBuilder(this._constantEvaluator);
+
   ScopeModel computeModel(ir.Member node) {
     if (node.isAbstract && !node.isExternal) {
       return const ScopeModel(
@@ -921,6 +926,13 @@
   }
 
   @override
+  InitializerComplexity visitBlockExpression(ir.BlockExpression node) {
+    visitNode(node.body);
+    visitNode(node.value);
+    return const InitializerComplexity.lazy();
+  }
+
+  @override
   InitializerComplexity visitCatch(ir.Catch node) {
     visitInContext(node.guard, VariableUse.explicit);
     visitNode(node.exception);
@@ -1064,6 +1076,9 @@
 
   @override
   InitializerComplexity visitConstantExpression(ir.ConstantExpression node) {
+    if (node.constant is ir.UnevaluatedConstant) {
+      node.constant = _constantEvaluator.evaluate(node);
+    }
     return const InitializerComplexity.constant();
   }
 
diff --git a/pkg/compiler/lib/src/ir/static_type.dart b/pkg/compiler/lib/src/ir/static_type.dart
index 1300bd8..6907520 100644
--- a/pkg/compiler/lib/src/ir/static_type.dart
+++ b/pkg/compiler/lib/src/ir/static_type.dart
@@ -919,6 +919,12 @@
     return super.visitLet(node);
   }
 
+  @override
+  ir.DartType visitBlockExpression(ir.BlockExpression node) {
+    visitNode(node.body);
+    return super.visitBlockExpression(node);
+  }
+
   ir.DartType _computeInstantiationType(
       ir.Instantiation node, ir.FunctionType expressionType) {
     return ir.Substitution.fromPairs(
diff --git a/pkg/compiler/lib/src/ir/static_type_base.dart b/pkg/compiler/lib/src/ir/static_type_base.dart
index 272689a..2da7c24 100644
--- a/pkg/compiler/lib/src/ir/static_type_base.dart
+++ b/pkg/compiler/lib/src/ir/static_type_base.dart
@@ -212,6 +212,11 @@
   }
 
   @override
+  ir.DartType visitBlockExpression(ir.BlockExpression node) {
+    return visitNode(node.value);
+  }
+
+  @override
   ir.DartType visitInvalidExpression(ir.InvalidExpression node) =>
       const DoesNotCompleteType();
 
diff --git a/pkg/compiler/lib/src/ir/util.dart b/pkg/compiler/lib/src/ir/util.dart
index 2ce8d7d..9850a1a 100644
--- a/pkg/compiler/lib/src/ir/util.dart
+++ b/pkg/compiler/lib/src/ir/util.dart
@@ -134,7 +134,7 @@
   // instead of:
   //
   //   (let _ = check(prefix) in prefix::field).property
-  if (node is ir.StaticGet) {
+  if (node is ir.StaticGet || node is ir.ConstantExpression) {
     while (parent is ir.PropertyGet || parent is ir.MethodInvocation) {
       parent = parent.parent;
     }
diff --git a/pkg/compiler/lib/src/ir/visitors.dart b/pkg/compiler/lib/src/ir/visitors.dart
index 0b7e8e4..b5b5e64 100644
--- a/pkg/compiler/lib/src/ir/visitors.dart
+++ b/pkg/compiler/lib/src/ir/visitors.dart
@@ -434,6 +434,11 @@
     return defaultExpression(node);
   }
 
+  @override
+  ConstantExpression visitBlockExpression(ir.BlockExpression node) {
+    return defaultExpression(node);
+  }
+
   /// Compute the [ConstantConstructor] corresponding to the const constructor
   /// [node].
   ConstantConstructor computeConstantConstructor(ir.Constructor node) {
@@ -690,7 +695,7 @@
     for (ir.DartType type in node.types) {
       typeArguments.add(elementMap.getDartType(type));
     }
-    FunctionConstantValue function = node.accept(this);
+    FunctionConstantValue function = node.tearOffConstant.accept(this);
     return new InstantiationConstantValue(typeArguments, function);
   }
 
@@ -719,8 +724,13 @@
 
   @override
   ConstantValue visitSetConstant(ir.SetConstant node) {
-    // TODO(johnniwinther, fishythefish): Create a set constant value.
-    throw new UnsupportedError("Set literal constants not implemented.");
+    List<ConstantValue> elements = [];
+    for (ir.Constant element in node.entries) {
+      elements.add(element.accept(this));
+    }
+    DartType type = elementMap.commonElements
+        .setType(elementMap.getDartType(node.typeArgument));
+    return constant_system.createSet(elementMap.commonElements, type, elements);
   }
 
   @override
diff --git a/pkg/compiler/lib/src/js_backend/backend_usage.dart b/pkg/compiler/lib/src/js_backend/backend_usage.dart
index 1dc5108..09ce162 100644
--- a/pkg/compiler/lib/src/js_backend/backend_usage.dart
+++ b/pkg/compiler/lib/src/js_backend/backend_usage.dart
@@ -113,14 +113,12 @@
   /// `true` if a core-library function requires the preamble file to function.
   bool requiresPreamble = false;
 
-  /// `true` if `Function.apply` is used.
   @override
   bool isFunctionApplyUsed = false;
 
   /// `true` if 'dart:mirrors' features are used.
   bool isMirrorsUsed = false;
 
-  /// `true` if `noSuchMethod` is used.
   @override
   bool isNoSuchMethodUsed = false;
 
@@ -301,19 +299,15 @@
   @override
   bool needToInitializeDispatchProperty;
 
-  /// `true` if a core-library function requires the preamble file to function.
   @override
   final bool requiresPreamble;
 
-  /// `true` if `Function.apply` is used.
   @override
   final bool isFunctionApplyUsed;
 
-  /// `true` if 'dart:mirrors' features are used.
   @override
   final bool isMirrorsUsed;
 
-  /// `true` if `noSuchMethod` is used.
   @override
   final bool isNoSuchMethodUsed;
 
diff --git a/pkg/compiler/lib/src/js_backend/enqueuer.dart b/pkg/compiler/lib/src/js_backend/enqueuer.dart
index a0c3009..9eb8195 100644
--- a/pkg/compiler/lib/src/js_backend/enqueuer.dart
+++ b/pkg/compiler/lib/src/js_backend/enqueuer.dart
@@ -121,12 +121,13 @@
 
   @override
   void checkClass(ClassEntity cls) {
-    _worldBuilder.processClassMembers(cls, (MemberEntity member, useSet) {
+    _worldBuilder.processClassMembers(cls,
+        (MemberEntity member, EnumSet<MemberUse> useSet) {
       if (useSet.isNotEmpty) {
         failedAt(member,
             'Unenqueued use of $member: ${useSet.iterable(MemberUse.values)}');
       }
-    });
+    }, dryRun: true);
   }
 
   /// Callback for applying the use of a [cls].
@@ -222,6 +223,8 @@
       case TypeUseKind.TYPE_ARGUMENT:
         _worldBuilder.registerTypeArgument(type);
         break;
+      case TypeUseKind.CONST_INSTANTIATION:
+        failedAt(CURRENT_ELEMENT_SPANNABLE, "Unexpected type use: $typeUse.");
     }
   }
 
diff --git a/pkg/compiler/lib/src/js_backend/impact_transformer.dart b/pkg/compiler/lib/src/js_backend/impact_transformer.dart
index 4ee816a2..5536b96 100644
--- a/pkg/compiler/lib/src/js_backend/impact_transformer.dart
+++ b/pkg/compiler/lib/src/js_backend/impact_transformer.dart
@@ -154,6 +154,7 @@
       DartType type = typeUse.type;
       switch (typeUse.kind) {
         case TypeUseKind.INSTANTIATION:
+        case TypeUseKind.CONST_INSTANTIATION:
         case TypeUseKind.NATIVE_INSTANTIATION:
           break;
         case TypeUseKind.IS_CHECK:
diff --git a/pkg/compiler/lib/src/js_backend/interceptor_data.dart b/pkg/compiler/lib/src/js_backend/interceptor_data.dart
index 0a206a5..1d604c9 100644
--- a/pkg/compiler/lib/src/js_backend/interceptor_data.dart
+++ b/pkg/compiler/lib/src/js_backend/interceptor_data.dart
@@ -35,8 +35,16 @@
   bool fieldHasInterceptedSetter(FieldEntity element);
   bool isInterceptedName(String name);
   bool isInterceptedSelector(Selector selector);
+
+  /// Returns `true` iff [selector] matches an element defined in a class mixed
+  /// into an intercepted class.
+  ///
+  /// These selectors are not eligible for the 'dummy explicit receiver'
+  /// optimization.
   bool isInterceptedMixinSelector(
       Selector selector, AbstractValue mask, JClosedWorld closedWorld);
+
+  /// Set of classes whose methods are intercepted.
   Iterable<ClassEntity> get interceptedClasses;
   bool isMixedIntoInterceptedClass(ClassEntity element);
 
@@ -71,7 +79,6 @@
   /// know whether a send must be intercepted or not.
   final Map<String, Set<MemberEntity>> interceptedMembers;
 
-  /// Set of classes whose methods are intercepted.
   @override
   final Set<ClassEntity> interceptedClasses;
 
@@ -169,9 +176,6 @@
     return interceptedMembers[selector.name] != null;
   }
 
-  /// Returns `true` iff [selector] matches an element defined in a class mixed
-  /// into an intercepted class.  These selectors are not eligible for the
-  /// 'dummy explicit receiver' optimization.
   @override
   bool isInterceptedMixinSelector(
       Selector selector, AbstractValue mask, JClosedWorld closedWorld) {
diff --git a/pkg/compiler/lib/src/js_backend/native_data.dart b/pkg/compiler/lib/src/js_backend/native_data.dart
index 7b31ddc..3342b54 100644
--- a/pkg/compiler/lib/src/js_backend/native_data.dart
+++ b/pkg/compiler/lib/src/js_backend/native_data.dart
@@ -4,9 +4,13 @@
 
 library js_backend.native_data;
 
+import 'package:kernel/ast.dart' as ir;
+
 import '../common.dart';
 import '../common_elements.dart' show ElementEnvironment;
 import '../elements/entities.dart';
+import '../ir/annotations.dart';
+import '../kernel/element_map.dart';
 import '../native/behavior.dart' show NativeBehavior;
 import '../serialization/serialization.dart';
 import '../util/util.dart';
@@ -97,7 +101,6 @@
   /// JavaScript names for the library and/or the enclosing class.
   String getFixedBackendMethodPath(FunctionEntity element);
 
-  /// Returns `true` if [element] is a JsInterop method.
   @override
   bool isJsInteropMember(MemberEntity element);
 
@@ -160,8 +163,9 @@
   /// Registers the [behavior] for writing to the native [field].
   void setNativeFieldStoreBehavior(FieldEntity field, NativeBehavior behavior);
 
-  /// Sets the native [name] for the member [element]. This name is used for
-  /// [element] in the generated JavaScript.
+  /// Sets the native [name] for the member [element].
+  ///
+  /// This name is used for [element] in the generated JavaScript.
   void setNativeMemberName(MemberEntity element, String name);
 
   /// Closes this builder and creates the resulting [NativeData] object.
@@ -188,11 +192,6 @@
   /// The JavaScript members implemented via typed JavaScript interop.
   Map<MemberEntity, String> jsInteropMembers = <MemberEntity, String>{};
 
-  /// Sets the native tag info for [cls].
-  ///
-  /// The tag info string contains comma-separated 'words' which are either
-  /// dispatch tags (having JavaScript identifier syntax) and directives that
-  /// begin with `!`.
   @override
   void setNativeClassTagInfo(ClassEntity cls, String tagText) {
     assert(
@@ -302,6 +301,38 @@
       this.anonymousJsInteropClasses,
       this.jsInteropMembers);
 
+  factory NativeBasicDataImpl.fromIr(
+      KernelToElementMap map, IrAnnotationData data) {
+    ElementEnvironment env = map.elementEnvironment;
+    Map<ClassEntity, NativeClassTag> nativeClassTagInfo = {};
+    Map<LibraryEntity, String> jsInteropLibraries = {};
+    Map<ClassEntity, String> jsInteropClasses = {};
+    Set<ClassEntity> anonymousJsInteropClasses = {};
+    Map<MemberEntity, String> jsInteropMembers = {};
+
+    data.forEachNativeClass((ir.Class node, String text) {
+      nativeClassTagInfo[map.getClass(node)] = new NativeClassTag(text);
+    });
+    data.forEachJsInteropLibrary((ir.Library node, String name) {
+      jsInteropLibraries[env.lookupLibrary(node.importUri, required: true)] =
+          name;
+    });
+    data.forEachJsInteropClass((ir.Class node, String name,
+        {bool isAnonymous}) {
+      ClassEntity cls = map.getClass(node);
+      jsInteropClasses[cls] = name;
+      if (isAnonymous) {
+        anonymousJsInteropClasses.add(cls);
+      }
+    });
+    data.forEachJsInteropMember((ir.Member node, String name) {
+      jsInteropMembers[map.getMember(node)] = name;
+    });
+
+    return new NativeBasicDataImpl(env, nativeClassTagInfo, jsInteropLibraries,
+        jsInteropClasses, anonymousJsInteropClasses, jsInteropMembers);
+  }
+
   factory NativeBasicDataImpl.readFromDataSource(
       DataSource source, ElementEnvironment elementEnvironment) {
     source.begin(tag);
@@ -372,6 +403,7 @@
     return jsInteropClasses.containsKey(element);
   }
 
+  /// Returns `true` if [element] is explicitly marked as part of JsInterop.
   bool _isJsInteropMember(MemberEntity element) {
     return jsInteropMembers.containsKey(element);
   }
@@ -429,8 +461,6 @@
 
   NativeDataBuilderImpl(this._nativeBasicData);
 
-  /// Sets the native [name] for the member [element]. This name is used for
-  /// [element] in the generated JavaScript.
   @override
   void setNativeMemberName(MemberEntity element, String name) {
     // TODO(johnniwinther): Avoid setting this more than once. The enqueuer
@@ -446,19 +476,16 @@
     nativeMemberName[element] = name;
   }
 
-  /// Registers the [behavior] for calling the native [method].
   @override
   void setNativeMethodBehavior(FunctionEntity method, NativeBehavior behavior) {
     nativeMethodBehavior[method] = behavior;
   }
 
-  /// Registers the [behavior] for reading from the native [field].
   @override
   void setNativeFieldLoadBehavior(FieldEntity field, NativeBehavior behavior) {
     nativeFieldLoadBehavior[field] = behavior;
   }
 
-  /// Registers the [behavior] for writing to the native [field].
   @override
   void setNativeFieldStoreBehavior(FieldEntity field, NativeBehavior behavior) {
     nativeFieldStoreBehavior[field] = behavior;
@@ -501,6 +528,48 @@
       this.nativeFieldLoadBehavior,
       this.nativeFieldStoreBehavior);
 
+  factory NativeDataImpl.fromIr(KernelToElementMap map, IrAnnotationData data) {
+    NativeBasicDataImpl nativeBasicData =
+        new NativeBasicDataImpl.fromIr(map, data);
+    Map<MemberEntity, String> nativeMemberName = {};
+    Map<FunctionEntity, NativeBehavior> nativeMethodBehavior = {};
+    Map<MemberEntity, NativeBehavior> nativeFieldLoadBehavior = {};
+    Map<MemberEntity, NativeBehavior> nativeFieldStoreBehavior = {};
+
+    data.forEachNativeMethodData((ir.Member node,
+        String name,
+        Iterable<String> createsAnnotations,
+        Iterable<String> returnsAnnotations) {
+      MemberEntity member = map.getMember(node);
+      nativeMemberName[member] = name;
+      bool isJsInterop = nativeBasicData.isJsInteropMember(member);
+      nativeMethodBehavior[member] = map.getNativeBehaviorForMethod(
+          node, createsAnnotations, returnsAnnotations,
+          isJsInterop: isJsInterop);
+    });
+
+    data.forEachNativeFieldData((ir.Member node,
+        String name,
+        Iterable<String> createsAnnotations,
+        Iterable<String> returnsAnnotations) {
+      FieldEntity field = map.getMember(node);
+      nativeMemberName[field] = name;
+      bool isJsInterop = nativeBasicData.isJsInteropMember(field);
+      nativeFieldLoadBehavior[field] = map.getNativeBehaviorForFieldLoad(
+          node, createsAnnotations, returnsAnnotations,
+          isJsInterop: isJsInterop);
+      nativeFieldStoreBehavior[field] =
+          map.getNativeBehaviorForFieldStore(node);
+    });
+
+    return new NativeDataImpl(
+        nativeBasicData,
+        nativeMemberName,
+        nativeMethodBehavior,
+        nativeFieldLoadBehavior,
+        nativeFieldStoreBehavior);
+  }
+
   factory NativeDataImpl.readFromDataSource(
       DataSource source, ElementEnvironment elementEnvironment) {
     source.begin(tag);
@@ -544,25 +613,18 @@
     sink.end(tag);
   }
 
-  /// The JavaScript names for libraries implemented via typed JavaScript
-  /// interop.
   @override
   Map<LibraryEntity, String> get jsInteropLibraries =>
       _nativeBasicData.jsInteropLibraries;
 
-  /// JavaScript interop classes annotated with `@anonymous`
   @override
   Set<ClassEntity> get anonymousJsInteropClasses =>
       _nativeBasicData.anonymousJsInteropClasses;
 
-  /// The JavaScript names for classes implemented via typed JavaScript
-  /// interop.
   @override
   Map<ClassEntity, String> get jsInteropClasses =>
       _nativeBasicData.jsInteropClasses;
 
-  /// The JavaScript names for members implemented via typed JavaScript
-  /// interop.
   @override
   Map<MemberEntity, String> get jsInteropMembers =>
       _nativeBasicData.jsInteropMembers;
@@ -572,17 +634,14 @@
     return anonymousJsInteropClasses.contains(element);
   }
 
-  /// Returns `true` if [cls] is a native class.
   @override
   bool isNativeClass(ClassEntity element) =>
       _nativeBasicData.isNativeClass(element);
 
-  /// Returns the list of non-directive native tag words for [cls].
   @override
   List<String> getNativeTagsOfClass(ClassEntity cls) =>
       _nativeBasicData.getNativeTagsOfClass(cls);
 
-  /// Returns `true` if [cls] has a `!nonleaf` tag word.
   @override
   bool hasNativeTagsForcedNonLeaf(ClassEntity cls) =>
       _nativeBasicData.hasNativeTagsForcedNonLeaf(cls);
@@ -590,46 +649,38 @@
   @override
   bool get isJsInteropUsed => _nativeBasicData.isJsInteropUsed;
 
-  /// Returns `true` if [element] is a JsInterop library.
   @override
   bool isJsInteropLibrary(LibraryEntity element) =>
       _nativeBasicData.isJsInteropLibrary(element);
 
-  /// Returns `true` if [element] is a JsInterop class.
   @override
   bool isJsInteropClass(ClassEntity element) =>
       _nativeBasicData.isJsInteropClass(element);
 
-  /// Returns `true` if [element] or any of its superclasses is native.
   @override
   bool isNativeOrExtendsNative(ClassEntity element) =>
       _nativeBasicData.isNativeOrExtendsNative(element);
 
-  /// Returns the explicit js interop name for library [element].
   @override
   String getJsInteropLibraryName(LibraryEntity element) {
     return jsInteropLibraries[element];
   }
 
-  /// Returns the explicit js interop name for class [element].
   @override
   String getJsInteropClassName(ClassEntity element) {
     return jsInteropClasses[element];
   }
 
-  /// Returns the explicit js interop name for member [element].
   @override
   String getJsInteropMemberName(MemberEntity element) {
     return jsInteropMembers[element];
   }
 
-  /// Returns `true` if [element] is explicitly marked as part of JsInterop.
   @override
   bool _isJsInteropMember(MemberEntity element) {
     return jsInteropMembers.containsKey(element);
   }
 
-  /// Returns `true` if [element] is a JsInterop method.
   @override
   bool isJsInteropMember(MemberEntity element) {
     if (element.isFunction ||
@@ -652,15 +703,11 @@
     }
   }
 
-  /// Returns `true` if the name of [element] is fixed for the generated
-  /// JavaScript.
   @override
   bool hasFixedBackendName(MemberEntity element) {
     return isJsInteropMember(element) || nativeMemberName.containsKey(element);
   }
 
-  /// Computes the name for [element] to use in the generated JavaScript. This
-  /// is either given through a native annotation or a js interop annotation.
   @override
   String getFixedBackendName(MemberEntity element) {
     String name = nativeMemberName[element];
@@ -727,14 +774,12 @@
     return _jsLibraryNameHelper(element.library);
   }
 
-  /// Returns `true` if [element] is a native member of a native class.
   @override
   bool isNativeMember(MemberEntity element) {
     if (isJsInteropMember(element)) return true;
     return nativeMemberName.containsKey(element);
   }
 
-  /// Returns the [NativeBehavior] for calling the native [method].
   @override
   NativeBehavior getNativeMethodBehavior(FunctionEntity method) {
     assert(
@@ -744,7 +789,6 @@
     return nativeMethodBehavior[method];
   }
 
-  /// Returns the [NativeBehavior] for reading from the native [field].
   @override
   NativeBehavior getNativeFieldLoadBehavior(FieldEntity field) {
     assert(
@@ -756,7 +800,6 @@
     return nativeFieldLoadBehavior[field];
   }
 
-  /// Returns the [NativeBehavior] for writing to the native [field].
   @override
   NativeBehavior getNativeFieldStoreBehavior(FieldEntity field) {
     assert(
@@ -766,8 +809,6 @@
     return nativeFieldStoreBehavior[field];
   }
 
-  /// Apply JS$ escaping scheme to convert possible escaped Dart names into
-  /// JS names.
   @override
   String computeUnescapedJSInteropName(String name) {
     return name.startsWith(_jsInteropEscapePrefix)
diff --git a/pkg/compiler/lib/src/js_backend/no_such_method_registry.dart b/pkg/compiler/lib/src/js_backend/no_such_method_registry.dart
index b579c07..3589a76 100644
--- a/pkg/compiler/lib/src/js_backend/no_such_method_registry.dart
+++ b/pkg/compiler/lib/src/js_backend/no_such_method_registry.dart
@@ -250,9 +250,6 @@
     sink.end(tag);
   }
 
-  /// Now that type inference is complete, split category D into two
-  /// subcategories: D1, those that have no return type, and D2, those
-  /// that have a return type.
   @override
   void categorizeComplexImplementations(GlobalTypeInferenceResults results) {
     otherImpls.forEach((FunctionEntity element) {
@@ -264,7 +261,6 @@
     });
   }
 
-  /// Emits a diagnostic
   @override
   void emitDiagnostic(DiagnosticReporter reporter) {
     throwingImpls.forEach((e) {
@@ -284,9 +280,6 @@
     });
   }
 
-  /// Returns [true] if the given element is a complex [noSuchMethod]
-  /// implementation. An implementation is complex if it falls into
-  /// category D, as described above.
   @override
   bool isComplex(FunctionEntity element) {
     assert(element.name == Identifiers.noSuchMethod_);
diff --git a/pkg/compiler/lib/src/js_model/element_map_impl.dart b/pkg/compiler/lib/src/js_model/element_map_impl.dart
index 10db057..657dadf 100644
--- a/pkg/compiler/lib/src/js_model/element_map_impl.dart
+++ b/pkg/compiler/lib/src/js_model/element_map_impl.dart
@@ -1279,7 +1279,6 @@
     return node.arguments.positional[index].accept(new Stringifier());
   }
 
-  /// Computes the [native.NativeBehavior] for a call to the [JS] function.
   // TODO(johnniwinther): Cache this for later use.
   @override
   NativeBehavior getNativeBehaviorForJsCall(ir.StaticInvocation node) {
@@ -1312,8 +1311,6 @@
         commonElements);
   }
 
-  /// Computes the [NativeBehavior] for a call to the [JS_BUILTIN]
-  /// function.
   // TODO(johnniwinther): Cache this for later use.
   @override
   NativeBehavior getNativeBehaviorForJsBuiltinCall(ir.StaticInvocation node) {
@@ -1341,8 +1338,6 @@
         commonElements);
   }
 
-  /// Computes the [NativeBehavior] for a call to the
-  /// [JS_EMBEDDED_GLOBAL] function.
   // TODO(johnniwinther): Cache this for later use.
   @override
   NativeBehavior getNativeBehaviorForJsEmbeddedGlobalCall(
diff --git a/pkg/compiler/lib/src/js_model/env.dart b/pkg/compiler/lib/src/js_model/env.dart
index 9fb97dc..4bd4808 100644
--- a/pkg/compiler/lib/src/js_model/env.dart
+++ b/pkg/compiler/lib/src/js_model/env.dart
@@ -209,13 +209,13 @@
   MemberEntity lookupMember(IrToElementMap elementMap, String name,
       {bool setter: false});
 
-  /// Calls [f] for each member of the class.
+  /// Calls [f] for each member of [cls].
   void forEachMember(IrToElementMap elementMap, void f(MemberEntity member));
 
-  /// Return the [ConstructorEntity] for the constructor [name] in the class.
+  /// Return the [ConstructorEntity] for the constructor [name] in [cls].
   ConstructorEntity lookupConstructor(IrToElementMap elementMap, String name);
 
-  /// Calls [f] for each constructor of the class.
+  /// Calls [f] for each constructor of [cls].
   void forEachConstructor(
       IrToElementMap elementMap, void f(ConstructorEntity constructor));
 
@@ -277,9 +277,6 @@
   @override
   bool get isUnnamedMixinApplication => cls.isAnonymousMixin;
 
-  /// Return the [MemberEntity] for the member [name] in [cls]. If [setter] is
-  /// `true`, the setter or assignable field corresponding to [name] is
-  /// returned.
   @override
   MemberEntity lookupMember(IrToElementMap elementMap, String name,
       {bool setter: false}) {
@@ -287,7 +284,6 @@
     return member != null ? elementMap.getMember(member) : null;
   }
 
-  /// Calls [f] for each member of [cls].
   @override
   void forEachMember(IrToElementMap elementMap, void f(MemberEntity member)) {
     _members.forEach((ir.Member member) {
@@ -295,14 +291,12 @@
     });
   }
 
-  /// Return the [ConstructorEntity] for the constructor [name] in [cls].
   @override
   ConstructorEntity lookupConstructor(IrToElementMap elementMap, String name) {
     ir.Member constructor = _constructorMap[name];
     return constructor != null ? elementMap.getConstructor(constructor) : null;
   }
 
-  /// Calls [f] for each constructor of [cls].
   @override
   void forEachConstructor(
       IrToElementMap elementMap, void f(ConstructorEntity constructor)) {
diff --git a/pkg/compiler/lib/src/js_model/js_world.dart b/pkg/compiler/lib/src/js_model/js_world.dart
index fdf9a69..bcb9df1 100644
--- a/pkg/compiler/lib/src/js_model/js_world.dart
+++ b/pkg/compiler/lib/src/js_model/js_world.dart
@@ -229,7 +229,6 @@
   @override
   DartTypes get dartTypes => elementMap.types;
 
-  /// Returns `true` if [cls] is implemented by an instantiated class.
   @override
   bool isImplemented(ClassEntity cls) {
     return implementedClasses.contains(cls);
@@ -255,13 +254,11 @@
     return classSet != null ? classSet.getLubOfInstantiatedSubtypes() : null;
   }
 
-  /// Returns `true` if [cls] is mixed into a live class.
   @override
   bool isUsedAsMixin(ClassEntity cls) {
     return !mixinUsesOf(cls).isEmpty;
   }
 
-  /// Returns `true` if any live class that mixes in [cls] implements [type].
   @override
   bool hasAnySubclassOfMixinUseThatImplements(
       ClassEntity cls, ClassEntity type) {
@@ -269,8 +266,6 @@
         .any((use) => hasAnySubclassThatImplements(use, type));
   }
 
-  /// Returns `true` if every subtype of [x] is a subclass of [y] or a subclass
-  /// of a mixin application of [y].
   @override
   bool everySubtypeIsSubclassOfOrMixinUseOf(ClassEntity x, ClassEntity y) {
     Map<ClassEntity, bool> secondMap =
@@ -281,7 +276,6 @@
             isSubclassOfMixinUseOf(cls, y));
   }
 
-  /// Returns `true` if any subclass of [superclass] implements [type].
   @override
   bool hasAnySubclassThatImplements(ClassEntity superclass, ClassEntity type) {
     Set<ClassEntity> subclasses = typesImplementedBySubclasses[superclass];
@@ -340,7 +334,6 @@
     }
   }
 
-  /// Returns an iterable over the common supertypes of the [classes].
   @override
   Iterable<ClassEntity> commonSupertypesOf(Iterable<ClassEntity> classes) {
     Iterator<ClassEntity> iterator = classes.iterator;
@@ -381,7 +374,6 @@
     return commonSupertypes;
   }
 
-  /// Returns an iterable over the live mixin applications that mixin [cls].
   @override
   Iterable<ClassEntity> mixinUsesOf(ClassEntity cls) {
     if (_liveMixinUses == null) {
@@ -410,8 +402,6 @@
     return uses != null ? uses : const <ClassEntity>[];
   }
 
-  /// Returns `true` if any live class that mixes in [mixin] is also a subclass
-  /// of [superclass].
   @override
   bool hasAnySubclassThatMixes(ClassEntity superclass, ClassEntity mixin) {
     return mixinUsesOf(mixin).any((ClassEntity each) {
@@ -419,7 +409,6 @@
     });
   }
 
-  /// Returns `true` if [cls] or any superclass mixes in [mixin].
   @override
   bool isSubclassOfMixinUseOf(ClassEntity cls, ClassEntity mixin) {
     if (isUsedAsMixin(mixin)) {
@@ -441,12 +430,6 @@
     }
   }
 
-  /// Returns `true` if [selector] on [receiver] can hit a `call` method on a
-  /// subclass of `Closure`.
-  ///
-  /// Every implementation of `Closure` has a 'call' method with its own
-  /// signature so it cannot be modelled by a [FunctionEntity]. Also,
-  /// call-methods for tear-off are not part of the element model.
   @override
   bool includesClosureCall(Selector selector, AbstractValue receiver) {
     return selector.name == Identifiers.call &&
diff --git a/pkg/compiler/lib/src/kernel/dart2js_target.dart b/pkg/compiler/lib/src/kernel/dart2js_target.dart
index cc810d1..3d32f5f 100644
--- a/pkg/compiler/lib/src/kernel/dart2js_target.dart
+++ b/pkg/compiler/lib/src/kernel/dart2js_target.dart
@@ -10,7 +10,6 @@
 import 'package:kernel/core_types.dart';
 import 'package:kernel/class_hierarchy.dart';
 import 'package:kernel/target/targets.dart';
-import 'package:kernel/transformations/constants.dart' show ConstantsBackend;
 import 'invocation_mirror_constants.dart';
 
 const Iterable<String> _allowedDartSchemePaths = const <String>[
@@ -31,7 +30,8 @@
   bool allowedTestLibrary() {
     String scriptName = uri.path;
     return scriptName.contains('tests/compiler/dart2js_native') ||
-        scriptName.contains('tests/compiler/dart2js_extra');
+        scriptName.contains('tests/compiler/dart2js_extra') ||
+        scriptName.contains('generated_tests/dart2js_native/native_test');
   }
 
   bool allowedDartLibrary() {
@@ -147,10 +147,9 @@
     return new ir.InvalidExpression(null);
   }
 
-  // TODO(askesc): Return specialized dart2js constants backend.
   @override
   ConstantsBackend constantsBackend(CoreTypes coreTypes) =>
-      const ConstantsBackend();
+      const Dart2jsConstantsBackend();
 }
 
 // TODO(sigmund): this "extraRequiredLibraries" needs to be removed...
@@ -195,3 +194,10 @@
     'dart:mirrors',
   ]
 };
+
+class Dart2jsConstantsBackend extends ConstantsBackend {
+  const Dart2jsConstantsBackend();
+
+  @override
+  NumberSemantics get numberSemantics => NumberSemantics.js;
+}
diff --git a/pkg/compiler/lib/src/kernel/deferred_load.dart b/pkg/compiler/lib/src/kernel/deferred_load.dart
index ba487b3..87a90be 100644
--- a/pkg/compiler/lib/src/kernel/deferred_load.dart
+++ b/pkg/compiler/lib/src/kernel/deferred_load.dart
@@ -95,22 +95,6 @@
     node.function?.accept(visitor);
   }
 
-  /// Adds extra dependencies coming from mirror usage.
-  @override
-  void addDeferredMirrorElements(WorkQueue queue) {
-    throw new UnsupportedError(
-        "KernelDeferredLoadTask.addDeferredMirrorElements");
-  }
-
-  /// Add extra dependencies coming from mirror usage in [root] marking it with
-  /// [newSet].
-  @override
-  void addMirrorElementsForLibrary(
-      WorkQueue queue, LibraryEntity root, ImportSet newSet) {
-    throw new UnsupportedError(
-        "KernelDeferredLoadTask.addMirrorElementsForLibrary");
-  }
-
   Set<ir.NamedNode> additionalExports(ir.Library library) {
     return _additionalExportsSets[library] ??= new Set<ir.NamedNode>.from(
         library.additionalExports.map((ir.Reference ref) => ref.node));
@@ -227,5 +211,11 @@
     // TODO(johnniwinther): The CFE should mark constant instantiations as
     // constant.
     add(node, required: false);
+    super.visitInstantiation(node);
+  }
+
+  @override
+  void visitConstantExpression(ir.ConstantExpression node) {
+    add(node);
   }
 }
diff --git a/pkg/compiler/lib/src/kernel/element_map.dart b/pkg/compiler/lib/src/kernel/element_map.dart
index d69ff52..3c523ff 100644
--- a/pkg/compiler/lib/src/kernel/element_map.dart
+++ b/pkg/compiler/lib/src/kernel/element_map.dart
@@ -142,9 +142,6 @@
   ConstructorEntity getSuperConstructor(
       ir.Constructor constructor, ir.Member target);
 
-  /// Returns `true` is [node] has a `@Native(...)` annotation.
-  bool isNativeClass(ir.Class node);
-
   /// Computes the native behavior for reading the native [field].
   NativeBehavior getNativeBehaviorForFieldLoad(ir.Field field,
       Iterable<String> createsAnnotations, Iterable<String> returnsAnnotations,
diff --git a/pkg/compiler/lib/src/kernel/element_map_impl.dart b/pkg/compiler/lib/src/kernel/element_map_impl.dart
index 6f2491d..0353f59 100644
--- a/pkg/compiler/lib/src/kernel/element_map_impl.dart
+++ b/pkg/compiler/lib/src/kernel/element_map_impl.dart
@@ -4,7 +4,7 @@
 
 library dart2js.kernel.element_map;
 
-import 'package:front_end/src/api_unstable/dart2js.dart' show Link, LinkBuilder;
+import 'package:front_end/src/api_unstable/dart2js.dart' as ir;
 import 'package:js_runtime/shared/embedded_names.dart';
 import 'package:kernel/ast.dart' as ir;
 import 'package:kernel/class_hierarchy.dart' as ir;
@@ -28,6 +28,7 @@
 import '../environment.dart';
 import '../frontend_strategy.dart';
 import '../ir/annotations.dart';
+import '../ir/constants.dart';
 import '../ir/debug.dart';
 import '../ir/element_map.dart';
 import '../ir/impact.dart';
@@ -67,6 +68,7 @@
   final CompilerOptions options;
   @override
   final DiagnosticReporter reporter;
+  final Environment _environment;
   CommonElementsImpl _commonElements;
   KernelElementEnvironment _elementEnvironment;
   DartTypeConverter _typeConverter;
@@ -74,6 +76,7 @@
   KernelDartTypes _types;
   ir.TypeEnvironment _typeEnvironment;
   ir.ClassHierarchy _classHierarchy;
+  Dart2jsConstantEvaluator _constantEvaluator;
 
   /// Library environment. Used for fast lookup.
   KProgramEnv env = new KProgramEnv();
@@ -115,11 +118,11 @@
 
   Map<KMember, Map<ir.Expression, TypeMap>> typeMapsForTesting;
 
-  KernelToElementMapImpl(this.reporter, Environment environment,
-      this._frontendStrategy, this.options) {
+  KernelToElementMapImpl(
+      this.reporter, this._environment, this._frontendStrategy, this.options) {
     _elementEnvironment = new KernelElementEnvironment(this);
     _commonElements = new CommonElementsImpl(_elementEnvironment);
-    _constantEnvironment = new KernelConstantEnvironment(this, environment);
+    _constantEnvironment = new KernelConstantEnvironment(this, _environment);
     _typeConverter = new DartTypeConverter(this);
     _types = new KernelDartTypes(this);
   }
@@ -305,8 +308,8 @@
         }
 
         InterfaceType supertype;
-        LinkBuilder<InterfaceType> linkBuilder =
-            new LinkBuilder<InterfaceType>();
+        ir.LinkBuilder<InterfaceType> linkBuilder =
+            new ir.LinkBuilder<InterfaceType>();
         if (node.isMixinDeclaration) {
           // A mixin declaration
           //
@@ -348,12 +351,12 @@
         node.implementedTypes.forEach((ir.Supertype supertype) {
           linkBuilder.addLast(processSupertype(supertype));
         });
-        Link<InterfaceType> interfaces =
-            linkBuilder.toLink(const Link<InterfaceType>());
+        ir.Link<InterfaceType> interfaces =
+            linkBuilder.toLink(const ir.Link<InterfaceType>());
         OrderedTypeSetBuilder setBuilder =
             new KernelOrderedTypeSetBuilder(this, cls);
         data.orderedTypeSet = setBuilder.createOrderedTypeSet(
-            data.supertype, interfaces.reverse(const Link<InterfaceType>()));
+            data.supertype, interfaces.reverse(const ir.Link<InterfaceType>()));
         data.interfaces = new List<InterfaceType>.from(interfaces.toList());
       }
     }
@@ -742,19 +745,22 @@
 
   @override
   ir.TypeEnvironment get typeEnvironment {
-    if (_typeEnvironment == null) {
-      _typeEnvironment ??= new ir.TypeEnvironment(
-          new ir.CoreTypes(env.mainComponent), classHierarchy);
-    }
-    return _typeEnvironment;
+    return _typeEnvironment ??= new ir.TypeEnvironment(
+        new ir.CoreTypes(env.mainComponent), classHierarchy);
   }
 
   @override
   ir.ClassHierarchy get classHierarchy {
-    if (_classHierarchy == null) {
-      _classHierarchy ??= new ir.ClassHierarchy(env.mainComponent);
-    }
-    return _classHierarchy;
+    return _classHierarchy ??= new ir.ClassHierarchy(env.mainComponent);
+  }
+
+  Dart2jsConstantEvaluator get constantEvaluator {
+    return _constantEvaluator ??= new Dart2jsConstantEvaluator(typeEnvironment,
+        (ir.LocatedMessage message, List<ir.LocatedMessage> context) {
+      reportLocatedMessage(reporter, message, context);
+    },
+        enableAsserts: options.enableUserAssertions,
+        environment: _environment.toMap());
   }
 
   @override
@@ -894,7 +900,6 @@
     return node.arguments.positional[index].accept(new Stringifier());
   }
 
-  /// Computes the [NativeBehavior] for a call to the [JS] function.
   // TODO(johnniwinther): Cache this for later use.
   @override
   NativeBehavior getNativeBehaviorForJsCall(ir.StaticInvocation node) {
@@ -927,8 +932,6 @@
         commonElements);
   }
 
-  /// Computes the [NativeBehavior] for a call to the [JS_BUILTIN]
-  /// function.
   // TODO(johnniwinther): Cache this for later use.
   @override
   NativeBehavior getNativeBehaviorForJsBuiltinCall(ir.StaticInvocation node) {
@@ -956,8 +959,6 @@
         commonElements);
   }
 
-  /// Computes the [NativeBehavior] for a call to the
-  /// [JS_EMBEDDED_GLOBAL] function.
   // TODO(johnniwinther): Cache this for later use.
   @override
   NativeBehavior getNativeBehaviorForJsEmbeddedGlobalCall(
@@ -1021,7 +1022,17 @@
       bool implicitNull: false,
       bool checkCasts: true}) {
     if (node is ir.ConstantExpression) {
-      return node.constant.accept(new ConstantValuefier(this));
+      ir.Constant constant =
+          constantEvaluator.evaluate(node, requireConstant: requireConstant);
+      if (constant == null) {
+        if (requireConstant) {
+          throw new UnsupportedError(
+              'No constant for ${DebugPrinter.prettyPrint(node)}');
+        }
+        return null;
+      } else {
+        return constant.accept(new ConstantValuefier(this));
+      }
     }
 
     ConstantExpression constant;
@@ -1337,10 +1348,6 @@
   @override
   NativeBasicData get nativeBasicData => _frontendStrategy.nativeBasicData;
 
-  /// Adds libraries in [component] to the set of libraries.
-  ///
-  /// The main method of the first component is used as the main method for the
-  /// compilation.
   @override
   void addComponent(ir.Component component) {
     env.addComponent(component);
@@ -1472,22 +1479,6 @@
     return _getTypedefNode(typedef);
   }
 
-  /// Returns `true` is [node] has a `@Native(...)` annotation.
-  // TODO(johnniwinther): Cache this for later use.
-  @override
-  bool isNativeClass(ir.Class node) {
-    for (ir.Expression annotation in node.annotations) {
-      if (annotation is ir.ConstructorInvocation) {
-        FunctionEntity target = getConstructor(annotation.target);
-        if (target.enclosingClass == commonElements.nativeAnnotationClass) {
-          return true;
-        }
-      }
-    }
-    return false;
-  }
-
-  /// Compute the kind of foreign helper function called by [node], if any.
   @override
   ForeignKind getForeignKind(ir.StaticInvocation node) {
     if (commonElements.isForeignHelper(getMember(node.target))) {
@@ -1505,8 +1496,6 @@
     return ForeignKind.NONE;
   }
 
-  /// Computes the [InterfaceType] referenced by a call to the
-  /// [JS_INTERCEPTOR_CONSTANT] function, if any.
   @override
   InterfaceType getInterfaceTypeForJsInterceptorCall(ir.StaticInvocation node) {
     if (node.arguments.positional.length != 1 ||
@@ -1521,7 +1510,6 @@
     return null;
   }
 
-  /// Computes the native behavior for reading the native [field].
   // TODO(johnniwinther): Cache this for later use.
   @override
   NativeBehavior getNativeBehaviorForFieldLoad(ir.Field field,
@@ -1533,7 +1521,6 @@
         isJsInterop: isJsInterop);
   }
 
-  /// Computes the native behavior for writing to the native [field].
   // TODO(johnniwinther): Cache this for later use.
   @override
   NativeBehavior getNativeBehaviorForFieldStore(ir.Field field) {
@@ -1541,7 +1528,6 @@
     return nativeBehaviorBuilder.buildFieldStoreBehavior(type);
   }
 
-  /// Computes the native behavior for calling [member].
   // TODO(johnniwinther): Cache this for later use.
   @override
   NativeBehavior getNativeBehaviorForMethod(ir.Member member,
@@ -1980,24 +1966,20 @@
   CommonElements get _commonElements => _elementMap.commonElements;
 
   @override
-  void resolveNativeMember(
-      MemberEntity element, IrAnnotationData annotationData) {
-    bool isJsInterop = _isJsInteropMember(element);
-    if (element.isFunction ||
-        element.isConstructor ||
-        element.isGetter ||
-        element.isSetter) {
-      FunctionEntity method = element;
-      bool isNative = _processMethodAnnotations(method, annotationData);
+  void resolveNativeMember(ir.Member node, IrAnnotationData annotationData) {
+    bool isJsInterop = _isJsInteropMember(node);
+    if (node is ir.Procedure || node is ir.Constructor) {
+      FunctionEntity method = _elementMap.getMember(node);
+      bool isNative = _processMethodAnnotations(node, annotationData);
       if (isNative || isJsInterop) {
         NativeBehavior behavior = _computeNativeMethodBehavior(
             method, annotationData,
             isJsInterop: isJsInterop);
         _nativeDataBuilder.setNativeMethodBehavior(method, behavior);
       }
-    } else if (element.isField) {
-      FieldEntity field = element;
-      bool isNative = _processFieldAnnotations(field, annotationData);
+    } else if (node is ir.Field) {
+      FieldEntity field = _elementMap.getMember(node);
+      bool isNative = _processFieldAnnotations(node, annotationData);
       if (isNative || isJsInterop) {
         NativeBehavior fieldLoadBehavior = _computeNativeFieldLoadBehavior(
             field, annotationData,
@@ -2014,22 +1996,23 @@
   /// Process the potentially native [field]. Adds information from metadata
   /// attributes. Returns `true` of [method] is native.
   bool _processFieldAnnotations(
-      FieldEntity element, IrAnnotationData annotationData) {
-    if (element.isInstanceMember &&
-        _nativeBasicData.isNativeClass(element.enclosingClass)) {
+      ir.Field node, IrAnnotationData annotationData) {
+    if (node.isInstanceMember &&
+        _nativeBasicData
+            .isNativeClass(_elementMap.getClass(node.enclosingClass))) {
       // Exclude non-instance (static) fields - they are not really native and
       // are compiled as isolate globals.  Access of a property of a constructor
       // function or a non-method property in the prototype chain, must be coded
       // using a JS-call.
-      _setNativeName(element, annotationData);
+      _setNativeName(node, annotationData);
       return true;
     } else {
-      String name = _findJsNameFromAnnotation(element, annotationData);
+      String name = _findJsNameFromAnnotation(node, annotationData);
       if (name != null) {
         failedAt(
-            element,
+            computeSourceSpanFromTreeNode(node),
             '@JSName(...) annotation is not supported for static fields: '
-            '$element.');
+            '$node.');
       }
     }
     return false;
@@ -2038,12 +2021,19 @@
   /// Process the potentially native [method]. Adds information from metadata
   /// attributes. Returns `true` of [method] is native.
   bool _processMethodAnnotations(
-      FunctionEntity method, IrAnnotationData annotationData) {
-    if (_isNativeMethod(method, annotationData)) {
-      if (method.isStatic) {
-        _setNativeNameForStaticMethod(method, annotationData);
+      ir.Member node, IrAnnotationData annotationData) {
+    if (_isNativeMethod(node, annotationData)) {
+      if (node.enclosingClass != null && !node.isInstanceMember) {
+        if (!_nativeBasicData
+            .isNativeClass(_elementMap.getClass(node.enclosingClass))) {
+          _elementMap.reporter.reportErrorMessage(
+              computeSourceSpanFromTreeNode(node),
+              MessageKind.NATIVE_NON_INSTANCE_IN_NON_NATIVE_CLASS);
+          return false;
+        }
+        _setNativeNameForStaticMethod(node, annotationData);
       } else {
-        _setNativeName(method, annotationData);
+        _setNativeName(node, annotationData);
       }
       return true;
     }
@@ -2052,10 +2042,10 @@
 
   /// Sets the native name of [element], either from an annotation, or
   /// defaulting to the Dart name.
-  void _setNativeName(MemberEntity element, IrAnnotationData annotationData) {
-    String name = _findJsNameFromAnnotation(element, annotationData);
-    name ??= element.name;
-    _nativeDataBuilder.setNativeMemberName(element, name);
+  void _setNativeName(ir.Member node, IrAnnotationData annotationData) {
+    String name = _findJsNameFromAnnotation(node, annotationData);
+    name ??= node.name.name;
+    _nativeDataBuilder.setNativeMemberName(_elementMap.getMember(node), name);
   }
 
   /// Sets the native name of the static native method [element], using the
@@ -2067,22 +2057,22 @@
   /// 3. If [element] does not have a @JSName annotation, qualify the name of
   ///    the method with the @Native name of the enclosing class.
   void _setNativeNameForStaticMethod(
-      FunctionEntity element, IrAnnotationData annotationData) {
-    String name = _findJsNameFromAnnotation(element, annotationData);
-    name ??= element.name;
+      ir.Member node, IrAnnotationData annotationData) {
+    String name = _findJsNameFromAnnotation(node, annotationData);
+    name ??= node.name.name;
     if (_isIdentifier(name)) {
-      List<String> nativeNames =
-          _nativeBasicData.getNativeTagsOfClass(element.enclosingClass);
+      ClassEntity cls = _elementMap.getClass(node.enclosingClass);
+      List<String> nativeNames = _nativeBasicData.getNativeTagsOfClass(cls);
       if (nativeNames.length != 1) {
         failedAt(
-            element,
+            computeSourceSpanFromTreeNode(node),
             'Unable to determine a native name for the enclosing class, '
             'options: $nativeNames');
       }
       _nativeDataBuilder.setNativeMemberName(
-          element, '${nativeNames[0]}.$name');
+          _elementMap.getMember(node), '${nativeNames[0]}.$name');
     } else {
-      _nativeDataBuilder.setNativeMemberName(element, name);
+      _nativeDataBuilder.setNativeMemberName(_elementMap.getMember(node), name);
     }
   }
 
@@ -2091,21 +2081,21 @@
   /// Returns the JSName annotation string or `null` if no JSName annotation is
   /// present.
   String _findJsNameFromAnnotation(
-      MemberEntity element, IrAnnotationData annotationData) {
+      ir.Member node, IrAnnotationData annotationData) {
     String jsName;
     if (annotationData != null) {
-      jsName = annotationData
-          .getNativeMemberName(_elementMap.getMemberNode(element));
+      jsName = annotationData.getNativeMemberName(node);
     } else {
-      for (ConstantValue value
-          in _elementEnvironment.getMemberMetadata(element)) {
+      SourceSpan sourceSpan = computeSourceSpanFromTreeNode(node);
+      for (ConstantValue value in _elementEnvironment
+          .getMemberMetadata(_elementMap.getMember(node))) {
         String name = readAnnotationName(
-            element, value, _commonElements.annotationJSNameClass);
+            sourceSpan, value, _commonElements.annotationJSNameClass);
         if (jsName == null) {
           jsName = name;
         } else if (name != null) {
           failedAt(
-              element, 'Too many JSName annotations: ${value.toDartText()}');
+              sourceSpan, 'Too many JSName annotations: ${value.toDartText()}');
         }
       }
     }
@@ -2161,23 +2151,31 @@
         isJsInterop: isJsInterop);
   }
 
-  bool _isNativeMethod(
-      covariant KFunction function, IrAnnotationData annotationData) {
-    if (!maybeEnableNative(function.library.canonicalUri)) return false;
-    ir.Member node = _elementMap.getMemberNode(function);
+  bool _isNativeMethod(ir.Member node, IrAnnotationData annotationData) {
+    if (!maybeEnableNative(node.enclosingLibrary.importUri)) return false;
+    bool hasNativeBody;
     if (annotationData != null) {
-      return annotationData.hasNativeBody(node);
+      hasNativeBody = annotationData.hasNativeBody(node);
     } else {
-      return node.annotations.any((ir.Expression expression) {
+      hasNativeBody = node.annotations.any((ir.Expression expression) {
         return expression is ir.ConstructorInvocation &&
             _elementMap.getInterfaceType(expression.constructedType) ==
                 _commonElements.externalNameType;
       });
     }
+    if (!hasNativeBody &&
+        node.isExternal &&
+        !_nativeBasicData.isJsInteropMember(_elementMap.getMember(node))) {
+      // TODO(johnniwinther): Should we change dart:html and friends to use
+      //  `external` instead of the native body syntax?
+      _elementMap.reporter.reportErrorMessage(
+          computeSourceSpanFromTreeNode(node), MessageKind.NON_NATIVE_EXTERNAL);
+    }
+    return hasNativeBody;
   }
 
-  bool _isJsInteropMember(MemberEntity element) {
-    return _nativeBasicData.isJsInteropMember(element);
+  bool _isJsInteropMember(ir.Member node) {
+    return _nativeBasicData.isJsInteropMember(_elementMap.getMember(node));
   }
 }
 
@@ -2216,3 +2214,22 @@
     return elementMap.getAppliedMixin(cls);
   }
 }
+
+DiagnosticMessage _createDiagnosticMessage(
+    DiagnosticReporter reporter, ir.LocatedMessage message) {
+  SourceSpan sourceSpan = new SourceSpan(
+      message.uri, message.charOffset, message.charOffset + message.length);
+  return reporter.createMessage(
+      sourceSpan, MessageKind.GENERIC, {'text': message.message});
+}
+
+void reportLocatedMessage(DiagnosticReporter reporter,
+    ir.LocatedMessage message, List<ir.LocatedMessage> context) {
+  DiagnosticMessage diagnosticMessage =
+      _createDiagnosticMessage(reporter, message);
+  List<DiagnosticMessage> infos = [];
+  for (ir.LocatedMessage message in context) {
+    infos.add(_createDiagnosticMessage(reporter, message));
+  }
+  reporter.reportError(diagnosticMessage, infos);
+}
diff --git a/pkg/compiler/lib/src/kernel/env.dart b/pkg/compiler/lib/src/kernel/env.dart
index b7c9246..0f004e3 100644
--- a/pkg/compiler/lib/src/kernel/env.dart
+++ b/pkg/compiler/lib/src/kernel/env.dart
@@ -253,13 +253,13 @@
   MemberEntity lookupMember(IrToElementMap elementMap, String name,
       {bool setter: false});
 
-  /// Calls [f] for each member of the class.
+  /// Calls [f] for each member of [cls].
   void forEachMember(IrToElementMap elementMap, void f(MemberEntity member));
 
-  /// Return the [ConstructorEntity] for the constructor [name] in the class.
+  /// Return the [ConstructorEntity] for the constructor [name] in [cls].
   ConstructorEntity lookupConstructor(IrToElementMap elementMap, String name);
 
-  /// Calls [f] for each constructor of the class.
+  /// Calls [f] for each constructor of [cls].
   void forEachConstructor(
       IrToElementMap elementMap, void f(ConstructorEntity constructor));
 
@@ -506,9 +506,6 @@
     _members = members;
   }
 
-  /// Return the [MemberEntity] for the member [name] in [cls]. If [setter] is
-  /// `true`, the setter or assignable field corresponding to [name] is
-  /// returned.
   @override
   MemberEntity lookupMember(IrToElementMap elementMap, String name,
       {bool setter: false}) {
@@ -517,7 +514,6 @@
     return member != null ? elementMap.getMember(member) : null;
   }
 
-  /// Calls [f] for each member of [cls].
   @override
   void forEachMember(IrToElementMap elementMap, void f(MemberEntity member)) {
     _ensureMaps(elementMap);
@@ -526,7 +522,6 @@
     });
   }
 
-  /// Return the [ConstructorEntity] for the constructor [name] in [cls].
   @override
   ConstructorEntity lookupConstructor(IrToElementMap elementMap, String name) {
     _ensureMaps(elementMap);
@@ -534,7 +529,6 @@
     return constructor != null ? elementMap.getConstructor(constructor) : null;
   }
 
-  /// Calls [f] for each constructor of [cls].
   @override
   void forEachConstructor(
       IrToElementMap elementMap, void f(ConstructorEntity constructor)) {
diff --git a/pkg/compiler/lib/src/kernel/kernel_impact.dart b/pkg/compiler/lib/src/kernel/kernel_impact.dart
index 2b2499e..4de44d7 100644
--- a/pkg/compiler/lib/src/kernel/kernel_impact.dart
+++ b/pkg/compiler/lib/src/kernel/kernel_impact.dart
@@ -149,7 +149,8 @@
   @override
   void registerFieldNode(ir.Field field) {
     if (field.isInstanceMember &&
-        elementMap.isNativeClass(field.enclosingClass)) {
+        _nativeBasicData
+            .isNativeClass(elementMap.getClass(field.enclosingClass))) {
       MemberEntity member = elementMap.getMember(field);
       // TODO(johnniwinther): NativeDataBuilder already has the native behavior
       // at this point. Use that instead.
@@ -330,6 +331,15 @@
   }
 
   @override
+  void registerConstInstantiation(ir.Class cls, List<ir.DartType> typeArguments,
+      ir.LibraryDependency import) {
+    ImportEntity deferredImport = elementMap.getImport(import);
+    InterfaceType type = elementMap.createInterfaceType(cls, typeArguments);
+    impactBuilder
+        .registerTypeUse(new TypeUse.constInstantiation(type, deferredImport));
+  }
+
+  @override
   void registerConstConstructorInvocationNode(ir.ConstructorInvocation node) {
     assert(node.isConst);
     ConstructorEntity constructor = elementMap.getConstructor(node.target);
@@ -765,7 +775,7 @@
   }
 
   @override
-  void registerFieldInitializer(ir.Field node) {
+  void registerFieldInitialization(ir.Field node) {
     impactBuilder
         .registerStaticUse(new StaticUse.fieldInit(elementMap.getField(node)));
   }
@@ -784,12 +794,6 @@
   }
 
   @override
-  void registerConstant(ir.ConstantExpression node) {
-    ConstantValue value = elementMap.getConstantValue(node);
-    impactBuilder.registerConstantUse(new ConstantUse.literal(value));
-  }
-
-  @override
   void registerLoadLibrary() {
     impactBuilder.registerStaticUse(new StaticUse.staticInvoke(
         commonElements.loadDeferredLibrary, CallStructure.ONE_ARG));
diff --git a/pkg/compiler/lib/src/kernel/kernel_strategy.dart b/pkg/compiler/lib/src/kernel/kernel_strategy.dart
index 46f5293..1559108 100644
--- a/pkg/compiler/lib/src/kernel/kernel_strategy.dart
+++ b/pkg/compiler/lib/src/kernel/kernel_strategy.dart
@@ -70,7 +70,7 @@
   @override
   void registerLoadedLibraries(KernelResult kernelResult) {
     _elementMap.addComponent(kernelResult.component);
-    if (useIrAnnotationsDataForTesting) {
+    if (_options.useCFEConstants) {
       _irAnnotationData = processAnnotations(kernelResult.component);
     }
     _annotationProcessor = new KernelAnnotationProcessor(
@@ -114,8 +114,6 @@
     return new KernelNoSuchMethodResolver(elementMap);
   }
 
-  /// Computes the main function from [mainLibrary] adding additional world
-  /// impact to [impactBuilder].
   @override
   FunctionEntity computeMain(WorldImpactBuilder impactBuilder) {
     return elementEnvironment.mainFunction;
@@ -274,8 +272,8 @@
   @override
   WorldImpact run() {
     return _compilerTask.measure(() {
-      _nativeMemberResolver.resolveNativeMember(element, _irAnnotationData);
       ir.Member node = _elementMap.getMemberNode(element);
+      _nativeMemberResolver.resolveNativeMember(node, _irAnnotationData);
 
       List<PragmaAnnotationData> pragmaAnnotationData =
           _modularStrategy.getPragmaAnnotationData(node);
@@ -314,6 +312,9 @@
       });
     });
   }
+
+  @override
+  String toString() => 'KernelWorkItem($element)';
 }
 
 /// If `true` kernel impacts are computed as [ImpactData] directly on kernel
@@ -321,10 +322,6 @@
 /// the world impact computation.
 bool useImpactDataForTesting = false;
 
-/// If `true` pragma annotations are computed directly on kernel. This is a
-/// pre-step to modularizing the world impact computation.
-bool useIrAnnotationsDataForTesting = false;
-
 class KernelModularStrategy extends ModularStrategy {
   final CompilerTask _compilerTask;
   final KernelToElementMapImpl _elementMap;
@@ -333,7 +330,7 @@
 
   @override
   List<PragmaAnnotationData> getPragmaAnnotationData(ir.Member node) {
-    if (useIrAnnotationsDataForTesting) {
+    if (_elementMap.options.useCFEConstants) {
       return computePragmaAnnotationDataFromIr(node);
     } else {
       return computePragmaAnnotationData(_elementMap.commonElements,
@@ -344,8 +341,8 @@
   @override
   ModularMemberData getModularMemberData(
       ir.Member node, EnumSet<PragmaAnnotation> annotations) {
-    ScopeModel scopeModel = _compilerTask.measureSubtask(
-        'closures', () => new ScopeModel.from(node));
+    ScopeModel scopeModel = _compilerTask.measureSubtask('closures',
+        () => new ScopeModel.from(node, _elementMap.constantEvaluator));
     ImpactBuilderData impactBuilderData;
     if (useImpactDataForTesting) {
       // TODO(johnniwinther): Always create and use the [ImpactBuilderData].
diff --git a/pkg/compiler/lib/src/kernel/kernel_world.dart b/pkg/compiler/lib/src/kernel/kernel_world.dart
index 053c528..c9d4200 100644
--- a/pkg/compiler/lib/src/kernel/kernel_world.dart
+++ b/pkg/compiler/lib/src/kernel/kernel_world.dart
@@ -51,7 +51,6 @@
   @override
   final Iterable<MemberEntity> liveInstanceMembers;
 
-  /// Members that are written either directly or through a setter selector.
   @override
   final Iterable<MemberEntity> assignedInstanceMembers;
   @override
@@ -100,7 +99,6 @@
   @override
   RuntimeTypesNeed get rtiNeed => _rtiNeed;
 
-  /// Returns `true` if [cls] is implemented by an instantiated class.
   @override
   bool isImplemented(ClassEntity cls) {
     return _implementedClasses.contains(cls);
diff --git a/pkg/compiler/lib/src/kernel/loader.dart b/pkg/compiler/lib/src/kernel/loader.dart
index b972976..bfdf6ee 100644
--- a/pkg/compiler/lib/src/kernel/loader.dart
+++ b/pkg/compiler/lib/src/kernel/loader.dart
@@ -57,22 +57,53 @@
   /// Loads an entire Kernel [Component] from a file on disk.
   Future<KernelResult> load(Uri resolvedUri) {
     return measure(() async {
+      String targetName =
+          _options.compileForServer ? "dart2js_server" : "dart2js";
+      String platform = '${targetName}_platform.dill';
       var isDill = resolvedUri.path.endsWith('.dill');
       ir.Component component;
       if (isDill) {
-        api.Input input = await _compilerInput.readFromUri(resolvedUri,
-            inputKind: api.InputKind.binary);
         component = new ir.Component();
-        new BinaryBuilder(input.data).readComponent(component);
+        Future<void> read(Uri uri) async {
+          api.Input input = await _compilerInput.readFromUri(uri,
+              inputKind: api.InputKind.binary);
+          new BinaryBuilder(input.data).readComponent(component);
+        }
+
+        await read(resolvedUri);
+        if (_options.dillDependencies != null) {
+          // Modular compiles do not include the platform on the input dill
+          // either.
+          if (_options.platformBinaries != null) {
+            await read(_options.platformBinaries.resolve(platform));
+          }
+          for (Uri dependency in _options.dillDependencies) {
+            await read(dependency);
+          }
+        }
+
+        // This is not expected to be null when creating a whole-program .dill
+        // file, but needs to be checked for modular inputs.
+        if (component.mainMethod == null) {
+          // TODO(sigmund): move this so that we use the same error template
+          // from the CFE.
+          _reporter.reportError(_reporter.createMessage(NO_LOCATION_SPANNABLE,
+              MessageKind.GENERIC, {'text': "No 'main' method found."}));
+          return null;
+        }
       } else {
-        String targetName =
-            _options.compileForServer ? "dart2js_server" : "dart2js";
-        String platform = '${targetName}_platform.dill';
+        List<Uri> dependencies = [];
+        if (_options.platformBinaries != null) {
+          dependencies.add(_options.platformBinaries.resolve(platform));
+        }
+        if (_options.dillDependencies != null) {
+          dependencies.addAll(_options.dillDependencies);
+        }
         initializedCompilerState = fe.initializeCompiler(
             initializedCompilerState,
             new Dart2jsTarget(targetName, new TargetFlags()),
             _options.librariesSpecificationUri,
-            _options.platformBinaries.resolve(platform),
+            dependencies,
             _options.packageConfig,
             experimentalFlags: _options.languageExperiments);
         component = await fe.compile(
diff --git a/pkg/compiler/lib/src/native/resolver.dart b/pkg/compiler/lib/src/native/resolver.dart
index 8a9ed11..e72f3ab 100644
--- a/pkg/compiler/lib/src/native/resolver.dart
+++ b/pkg/compiler/lib/src/native/resolver.dart
@@ -2,6 +2,8 @@
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
 
+import 'package:kernel/ast.dart' as ir;
+
 import '../common.dart';
 import '../common_elements.dart' show KElementEnvironment;
 import '../constants/values.dart';
@@ -11,9 +13,8 @@
 
 /// Interface for computing native members.
 abstract class NativeMemberResolver {
-  /// Computes whether [element] is native or JsInterop.
-  void resolveNativeMember(
-      MemberEntity element, IrAnnotationData annotationData);
+  /// Computes whether [node] is native or JsInterop.
+  void resolveNativeMember(ir.Member node, IrAnnotationData annotationData);
 }
 
 /// Determines all native classes in a set of libraries.
diff --git a/pkg/compiler/lib/src/options.dart b/pkg/compiler/lib/src/options.dart
index 9ee2539..83db5ad2 100644
--- a/pkg/compiler/lib/src/options.dart
+++ b/pkg/compiler/lib/src/options.dart
@@ -7,6 +7,7 @@
 import 'package:front_end/src/api_unstable/dart2js.dart' as fe;
 
 import 'commandline_options.dart' show Flags;
+import 'util/util.dart';
 
 /// Options used for controlling diagnostic messages.
 abstract class DiagnosticOptions {
@@ -51,6 +52,19 @@
   /// If not null then [packageRoot] should be null.
   Uri packageConfig;
 
+  /// List of kernel files to load.
+  ///
+  /// When compiling modularly, this contains kernel files that are needed
+  /// to compile a single module.
+  ///
+  /// When linking, this contains all kernel files that form part of the final
+  /// program.
+  ///
+  /// At this time, this list points to full kernel files. In the future, we may
+  /// use a list of outline files for modular compiles, and only use full kernel
+  /// files for linking.
+  List<Uri> dillDependencies;
+
   /// Location from which serialized inference data is read.
   ///
   /// If this is set, the [entryPoint] is expected to be a .dill file and the
@@ -82,6 +96,10 @@
   /// Flags enabling language experiments.
   Map<fe.ExperimentalFlag, bool> languageExperiments = {};
 
+  /// `true` if CFE performs constant evaluation.
+  bool get useCFEConstants =>
+      languageExperiments[fe.ExperimentalFlag.constantUpdate2018];
+
   /// A possibly null state object for kernel compilation.
   fe.InitializedCompilerState kernelInitializedCompilerState;
 
@@ -181,10 +199,6 @@
   /// without causing dart2js to crash. The flag has no effect.
   bool enableAssertMessage = true;
 
-  /// Whether the user specified a flag to allow the use of dart:mirrors. This
-  /// silences a warning produced by the compiler.
-  bool enableExperimentalMirrors = false;
-
   /// Whether to enable minification
   // TODO(sigmund): rename to minify
   bool enableMinification = false;
@@ -311,6 +325,11 @@
   /// Create an options object by parsing flags from [options].
   static CompilerOptions parse(List<String> options,
       {Uri librariesSpecificationUri, Uri platformBinaries}) {
+    Map<fe.ExperimentalFlag, bool> languageExperiments =
+        _extractExperiments(options);
+    if (equalMaps(languageExperiments, fe.defaultExperimentalFlags)) {
+      platformBinaries ??= fe.computePlatformBinariesLocation();
+    }
     return new CompilerOptions()
       ..librariesSpecificationUri = librariesSpecificationUri
       ..allowMockCompilation = _hasOption(options, Flags.allowMockCompilation)
@@ -329,7 +348,7 @@
       ..suppressHints = _hasOption(options, Flags.suppressHints)
       ..shownPackageWarnings =
           _extractOptionalCsvOption(options, Flags.showPackageWarnings)
-      ..languageExperiments = _extractExperiments(options)
+      ..languageExperiments = languageExperiments
       ..disableInlining = _hasOption(options, Flags.disableInlining)
       ..disableProgramSplit = _hasOption(options, Flags.disableProgramSplit)
       ..disableTypeInference = _hasOption(options, Flags.disableTypeInference)
@@ -340,8 +359,6 @@
       ..dumpInfo = _hasOption(options, Flags.dumpInfo)
       ..useDumpInfoBinaryFormat =
           _hasOption(options, "${Flags.dumpInfo}=binary")
-      ..enableExperimentalMirrors =
-          _hasOption(options, Flags.enableExperimentalMirrors)
       ..enableMinification = _hasOption(options, Flags.minify)
       .._disableMinification = _hasOption(options, Flags.noMinify)
       ..enableNativeLiveTypeAnalysis =
@@ -380,6 +397,8 @@
       ..useNewSourceInfo = _hasOption(options, Flags.useNewSourceInfo)
       ..verbose = _hasOption(options, Flags.verbose)
       ..showInternalProgress = _hasOption(options, Flags.progress)
+      ..dillDependencies =
+          _extractUriListOption(options, '${Flags.dillDependencies}')
       ..readDataUri = _extractUriOption(options, '${Flags.readData}=')
       ..writeDataUri = _extractUriOption(options, '${Flags.writeData}=')
       ..cfeOnly = _hasOption(options, Flags.cfeOnly)
@@ -404,7 +423,8 @@
     if (packageRoot != null && !packageRoot.path.endsWith("/")) {
       throw new ArgumentError("[packageRoot] must end with a /");
     }
-    if (platformBinaries == null) {
+    if (platformBinaries == null &&
+        equalMaps(languageExperiments, fe.defaultExperimentalFlags)) {
       throw new ArgumentError("Missing required ${Flags.platformBinaries}");
     }
   }
@@ -532,6 +552,15 @@
   return null;
 }
 
+/// Extract list of comma separated Uris provided for [flag]. Returns an
+/// empty list if [option] contain [flag] without arguments. Returns `null` if
+/// [option] doesn't contain [flag] with or without arguments.
+List<Uri> _extractUriListOption(List<String> options, String flag) {
+  List<String> stringUris = _extractOptionalCsvOption(options, flag);
+  if (stringUris == null) return null;
+  return stringUris.map(Uri.parse).toList();
+}
+
 Map<fe.ExperimentalFlag, bool> _extractExperiments(List<String> options) {
   List<String> experiments =
       _extractOptionalCsvOption(options, Flags.enableLanguageExperiments);
diff --git a/pkg/compiler/lib/src/serialization/abstract_sink.dart b/pkg/compiler/lib/src/serialization/abstract_sink.dart
index 737c314..dfe4e9b 100644
--- a/pkg/compiler/lib/src/serialization/abstract_sink.dart
+++ b/pkg/compiler/lib/src/serialization/abstract_sink.dart
@@ -232,6 +232,12 @@
     } else if (value is ir.TypeParameter) {
       _writeEnumInternal(_TreeNodeKind.typeParameter);
       _writeTypeParameter(value);
+    } else if (value is ConstantReference) {
+      _writeEnumInternal(_TreeNodeKind.constant);
+      _writeTreeNode(value.expression);
+      _ConstantNodeIndexerVisitor indexer = new _ConstantNodeIndexerVisitor();
+      value.expression.constant.accept(indexer);
+      _writeIntInternal(indexer.getIndex(value.constant));
     } else {
       _writeEnumInternal(_TreeNodeKind.node);
       ir.TreeNode member = value;
diff --git a/pkg/compiler/lib/src/serialization/abstract_source.dart b/pkg/compiler/lib/src/serialization/abstract_source.dart
index b9660bd..f4160ce 100644
--- a/pkg/compiler/lib/src/serialization/abstract_source.dart
+++ b/pkg/compiler/lib/src/serialization/abstract_source.dart
@@ -518,6 +518,14 @@
         return _readFunctionNode();
       case _TreeNodeKind.typeParameter:
         return _readTypeParameter();
+      case _TreeNodeKind.constant:
+        // TODO(johnniwinther): Support serialization within a member context
+        // and use this to temporarily cache constant node indices.
+        ir.ConstantExpression expression = _readTreeNode();
+        _ConstantNodeIndexerVisitor indexer = new _ConstantNodeIndexerVisitor();
+        expression.constant.accept(indexer);
+        ir.Constant constant = indexer.getConstant(_readIntInternal());
+        return new ConstantReference(expression, constant);
       case _TreeNodeKind.node:
         _MemberData data = _readMemberData();
         int index = _readIntInternal();
diff --git a/pkg/compiler/lib/src/serialization/helpers.dart b/pkg/compiler/lib/src/serialization/helpers.dart
index 4bb57a4..40cc83d 100644
--- a/pkg/compiler/lib/src/serialization/helpers.dart
+++ b/pkg/compiler/lib/src/serialization/helpers.dart
@@ -48,7 +48,8 @@
   node,
   functionNode,
   typeParameter,
-  functionDeclarationVariable
+  functionDeclarationVariable,
+  constant,
 }
 
 /// Enum used for identifying [ir.FunctionNode] context in serialization.
diff --git a/pkg/compiler/lib/src/serialization/node_indexer.dart b/pkg/compiler/lib/src/serialization/node_indexer.dart
index f54ac9c..8e92ebf 100644
--- a/pkg/compiler/lib/src/serialization/node_indexer.dart
+++ b/pkg/compiler/lib/src/serialization/node_indexer.dart
@@ -193,4 +193,108 @@
     registerNode(node);
     super.visitSuperPropertyGet(node);
   }
+
+  @override
+  void visitConstantExpression(ir.ConstantExpression node) {
+    registerNode(node);
+    super.visitConstantExpression(node);
+  }
+}
+
+/// Visitor that ascribes an index to all [ir.Constant]s that we potentially
+/// need to reference for serialization and deserialization.
+///
+/// Currently this is only list, map, and set constants, which are used as
+/// allocation identities in the global inference.
+class _ConstantNodeIndexerVisitor implements ir.ConstantVisitor<void> {
+  int _currentIndex = 0;
+  final Map<int, ir.Constant> _indexToNodeMap = {};
+  final Map<ir.Constant, int> _nodeToIndexMap = {};
+
+  void registerConstant(ir.Constant node) {
+    _indexToNodeMap[_currentIndex] = node;
+    _nodeToIndexMap[node] = _currentIndex;
+    _currentIndex++;
+  }
+
+  int getIndex(ir.Constant node) {
+    assert(_nodeToIndexMap.containsKey(node), "Constant without index: $node");
+    return _nodeToIndexMap[node];
+  }
+
+  ir.Constant getConstant(int index) {
+    assert(
+        _indexToNodeMap.containsKey(index), "Index without constant: $index");
+    return _indexToNodeMap[index];
+  }
+
+  @override
+  void visitUnevaluatedConstant(ir.UnevaluatedConstant node) {}
+
+  @override
+  void visitTypeLiteralConstant(ir.TypeLiteralConstant node) {}
+
+  @override
+  void visitTearOffConstant(ir.TearOffConstant node) {}
+
+  @override
+  void visitPartialInstantiationConstant(ir.PartialInstantiationConstant node) {
+    node.tearOffConstant.accept(this);
+  }
+
+  @override
+  void visitInstanceConstant(ir.InstanceConstant node) {
+    node.fieldValues.forEach((_, ir.Constant value) {
+      value.accept(this);
+    });
+  }
+
+  @override
+  void visitSetConstant(ir.SetConstant node) {
+    registerConstant(node);
+    for (ir.Constant element in node.entries) {
+      element.accept(this);
+    }
+  }
+
+  @override
+  void visitListConstant(ir.ListConstant node) {
+    registerConstant(node);
+    for (ir.Constant element in node.entries) {
+      element.accept(this);
+    }
+  }
+
+  @override
+  void visitMapConstant(ir.MapConstant node) {
+    registerConstant(node);
+    for (ir.ConstantMapEntry entry in node.entries) {
+      entry.key.accept(this);
+      entry.value.accept(this);
+    }
+  }
+
+  @override
+  void visitSymbolConstant(ir.SymbolConstant node) {}
+
+  @override
+  void visitStringConstant(ir.StringConstant node) {}
+
+  @override
+  void visitDoubleConstant(ir.DoubleConstant node) {}
+
+  @override
+  void visitIntConstant(ir.IntConstant node) {}
+
+  @override
+  void visitBoolConstant(ir.BoolConstant node) {}
+
+  @override
+  void visitNullConstant(ir.NullConstant node) {}
+
+  @override
+  void defaultConstant(ir.Constant node) {
+    throw new UnimplementedError(
+        "Unexpected constant: $node (${node.runtimeType})");
+  }
 }
diff --git a/pkg/compiler/lib/src/serialization/serialization.dart b/pkg/compiler/lib/src/serialization/serialization.dart
index b974951..65276b3 100644
--- a/pkg/compiler/lib/src/serialization/serialization.dart
+++ b/pkg/compiler/lib/src/serialization/serialization.dart
@@ -15,6 +15,7 @@
 import '../elements/entities.dart';
 import '../elements/indexed.dart';
 import '../elements/types.dart';
+import '../inferrer/builder_kernel.dart';
 import '../ir/static_type_base.dart';
 import '../js_model/closure.dart';
 import '../js_model/locals.dart';
diff --git a/pkg/compiler/lib/src/ssa/builder_kernel.dart b/pkg/compiler/lib/src/ssa/builder_kernel.dart
index 8047624..844bdb4 100644
--- a/pkg/compiler/lib/src/ssa/builder_kernel.dart
+++ b/pkg/compiler/lib/src/ssa/builder_kernel.dart
@@ -1526,8 +1526,17 @@
 
   @override
   void visitConstantExpression(ir.ConstantExpression node) {
-    stack.add(
-        graph.addConstant(_elementMap.getConstantValue(node), closedWorld));
+    ConstantValue value = _elementMap.getConstantValue(node);
+    if (!closedWorld.outputUnitData
+        .hasOnlyNonDeferredImportPathsToConstant(targetElement, value)) {
+      stack.add(graph.addDeferredConstant(
+          value,
+          closedWorld.outputUnitData.outputUnitForConstant(value),
+          _sourceInformationBuilder.buildGet(node),
+          closedWorld));
+    } else {
+      stack.add(graph.addConstant(value, closedWorld));
+    }
   }
 
   /// Returns true if the [type] is a valid return type for an asynchronous
@@ -3094,8 +3103,8 @@
         // unit, the old FE would still generate a deferred wrapper here.
         if (!closedWorld.outputUnitData
             .hasOnlyNonDeferredImportPaths(targetElement, field)) {
-          stack.add(graph.addDeferredConstant(fieldData.initialValue, unit,
-              sourceInformation, compiler, closedWorld));
+          stack.add(graph.addDeferredConstant(
+              fieldData.initialValue, unit, sourceInformation, closedWorld));
         } else {
           stack.add(graph.addConstant(fieldData.initialValue, closedWorld,
               sourceInformation: sourceInformation));
@@ -3295,6 +3304,12 @@
     node.body.accept(this);
   }
 
+  @override
+  void visitBlockExpression(ir.BlockExpression node) {
+    node.body.accept(this);
+    node.value.accept(this);
+  }
+
   /// Extracts the list of instructions for the positional subset of arguments.
   List<HInstruction> _visitPositionalArguments(ir.Arguments arguments) {
     List<HInstruction> result = <HInstruction>[];
@@ -3811,7 +3826,8 @@
 
     ir.ListLiteral positionalArgumentsLiteral =
         invocation.arguments.positional[2];
-    ir.MapLiteral namedArgumentsLiteral = invocation.arguments.positional[3];
+    ir.Expression namedArgumentsLiteral = invocation.arguments.positional[3];
+    Map<String, ir.Expression> namedArguments = {};
     ir.IntLiteral kindLiteral = invocation.arguments.positional[4];
 
     Name memberName = new Name(name, _currentFrame.member.library);
@@ -3829,12 +3845,28 @@
         } else if (memberName == Names.INDEX_SET_NAME) {
           selector = new Selector.indexSet();
         } else {
+          if (namedArgumentsLiteral is ir.MapLiteral) {
+            namedArgumentsLiteral.entries.forEach((ir.MapEntry entry) {
+              ir.StringLiteral key = entry.key;
+              namedArguments[key.value] = entry.value;
+            });
+          } else if (namedArgumentsLiteral is ir.ConstantExpression &&
+              namedArgumentsLiteral.constant is ir.MapConstant) {
+            ir.MapConstant constant = namedArgumentsLiteral.constant;
+            for (ir.ConstantMapEntry entry in constant.entries) {
+              ir.StringConstant key = entry.key;
+              namedArguments[key.value] =
+                  new ir.ConstantExpression(entry.value);
+            }
+          } else {
+            reporter.internalError(
+                computeSourceSpanFromTreeNode(invocation),
+                "Unexpected named arguments value in createInvocationMirrror: "
+                "${namedArgumentsLiteral}.");
+          }
           CallStructure callStructure = new CallStructure(
               positionalArgumentsLiteral.expressions.length,
-              namedArgumentsLiteral.entries.map<String>((ir.MapEntry entry) {
-                ir.StringLiteral key = entry.key;
-                return key.value;
-              }).toList(),
+              namedArguments.keys.toList(),
               typeArguments.length);
           if (Selector.isOperatorName(name)) {
             selector =
@@ -3855,14 +3887,12 @@
       argument.accept(this);
       arguments.add(pop());
     }
-    if (namedArgumentsLiteral.entries.isNotEmpty) {
+    if (namedArguments.isNotEmpty) {
       Map<String, HInstruction> namedValues = <String, HInstruction>{};
-      for (ir.MapEntry entry in namedArgumentsLiteral.entries) {
-        ir.StringLiteral key = entry.key;
-        String name = key.value;
-        entry.value.accept(this);
+      namedArguments.forEach((String name, ir.Expression value) {
+        value.accept(this);
         namedValues[name] = pop();
-      }
+      });
       for (String name in selector.callStructure.getOrderedNamedArguments()) {
         arguments.add(namedValues[name]);
       }
@@ -4001,27 +4031,41 @@
 
     ir.Expression closure = invocation.arguments.positional.single;
     String problem = 'requires a static method or top-level method';
+
+    bool handleTarget(ir.Procedure procedure) {
+      ir.FunctionNode function = procedure.function;
+      if (function != null &&
+          function.requiredParameterCount ==
+              function.positionalParameters.length &&
+          function.namedParameters.isEmpty) {
+        push(new HForeignCode(
+            js.js.expressionTemplateYielding(
+                emitter.staticFunctionAccess(_elementMap.getMethod(procedure))),
+            abstractValueDomain.dynamicType,
+            <HInstruction>[],
+            nativeBehavior: NativeBehavior.PURE,
+            foreignFunction: _elementMap.getMethod(procedure)));
+        return true;
+      }
+      problem = 'does not handle a closure with optional parameters';
+      return false;
+    }
+
     if (closure is ir.StaticGet) {
       ir.Member staticTarget = closure.target;
       if (staticTarget is ir.Procedure) {
         if (staticTarget.kind == ir.ProcedureKind.Method) {
-          ir.FunctionNode function = staticTarget.function;
-          if (function != null &&
-              function.requiredParameterCount ==
-                  function.positionalParameters.length &&
-              function.namedParameters.isEmpty) {
-            push(new HForeignCode(
-                js.js.expressionTemplateYielding(emitter
-                    .staticFunctionAccess(_elementMap.getMethod(staticTarget))),
-                abstractValueDomain.dynamicType,
-                <HInstruction>[],
-                nativeBehavior: NativeBehavior.PURE,
-                foreignFunction: _elementMap.getMethod(staticTarget)));
+          if (handleTarget(staticTarget)) {
             return;
           }
-          problem = 'does not handle a closure with optional parameters';
         }
       }
+    } else if (closure is ir.ConstantExpression &&
+        closure.constant is ir.TearOffConstant) {
+      ir.TearOffConstant tearOff = closure.constant;
+      if (handleTarget(tearOff.procedure)) {
+        return;
+      }
     }
 
     reporter.reportErrorMessage(
diff --git a/pkg/compiler/lib/src/ssa/invoke_dynamic_specializers.dart b/pkg/compiler/lib/src/ssa/invoke_dynamic_specializers.dart
index 42e3113..0601adb 100644
--- a/pkg/compiler/lib/src/ssa/invoke_dynamic_specializers.dart
+++ b/pkg/compiler/lib/src/ssa/invoke_dynamic_specializers.dart
@@ -197,13 +197,14 @@
       JCommonElements commonElements,
       JClosedWorld closedWorld,
       OptimizationTestLog log) {
+    var abstractValueDomain = closedWorld.abstractValueDomain;
     if (instruction.inputs[1]
-        .isIndexablePrimitive(closedWorld.abstractValueDomain)
+        .isIndexablePrimitive(abstractValueDomain)
         .isPotentiallyFalse) {
       return null;
     }
     if (instruction.inputs[2]
-            .isInteger(closedWorld.abstractValueDomain)
+            .isInteger(abstractValueDomain)
             .isPotentiallyFalse &&
         options.parameterCheckPolicy.isEmitted) {
       // We want the right checked mode error.
@@ -211,10 +212,13 @@
     }
     AbstractValue receiverType =
         instruction.getDartReceiver(closedWorld).instructionType;
-    AbstractValue type = AbstractValueFactory.inferredTypeForSelector(
+    AbstractValue elementType = AbstractValueFactory.inferredTypeForSelector(
         instruction.selector, receiverType, results);
+    if (abstractValueDomain.isTypedArray(receiverType).isDefinitelyTrue) {
+      elementType = abstractValueDomain.excludeNull(elementType);
+    }
     HIndex converted = new HIndex(instruction.inputs[1], instruction.inputs[2],
-        instruction.selector, type);
+        instruction.selector, elementType);
     log?.registerIndex(instruction, converted);
     return converted;
   }
diff --git a/pkg/compiler/lib/src/ssa/nodes.dart b/pkg/compiler/lib/src/ssa/nodes.dart
index 0ec907d..fe5bbfd 100644
--- a/pkg/compiler/lib/src/ssa/nodes.dart
+++ b/pkg/compiler/lib/src/ssa/nodes.dart
@@ -6,7 +6,6 @@
 
 import '../closure.dart';
 import '../common.dart';
-import '../compiler.dart' show Compiler;
 import '../constants/constant_system.dart' as constant_system;
 import '../constants/values.dart';
 import '../deferred_load.dart' show OutputUnit;
@@ -286,12 +285,8 @@
     return result;
   }
 
-  HConstant addDeferredConstant(
-      ConstantValue constant,
-      OutputUnit unit,
-      SourceInformation sourceInformation,
-      Compiler compiler,
-      JClosedWorld closedWorld) {
+  HConstant addDeferredConstant(ConstantValue constant, OutputUnit unit,
+      SourceInformation sourceInformation, JClosedWorld closedWorld) {
     ConstantValue wrapper = new DeferredGlobalConstantValue(constant, unit);
     closedWorld.outputUnitData.registerConstantDeferredUse(wrapper, unit);
     return addConstant(wrapper, closedWorld,
diff --git a/pkg/compiler/lib/src/universe/class_hierarchy.dart b/pkg/compiler/lib/src/universe/class_hierarchy.dart
index 940d180..776b4f1 100644
--- a/pkg/compiler/lib/src/universe/class_hierarchy.dart
+++ b/pkg/compiler/lib/src/universe/class_hierarchy.dart
@@ -47,19 +47,19 @@
   /// subclass.
   bool isIndirectlyInstantiated(ClassEntity cls);
 
-  /// Return `true` if [x] is a subclass of [y].
+  /// Return `true` if [x] is a (non-strict) subclass of [y].
   bool isSubclassOf(ClassEntity x, ClassEntity y);
 
   /// Returns `true` if [x] is a subtype of [y], that is, if [x] implements an
   /// instance of [y].
   bool isSubtypeOf(ClassEntity x, ClassEntity y);
 
-  /// Returns an iterable over the live classes that extend [cls] including
-  /// [cls] itself.
+  /// Returns an iterable over the directly instantiated classes that extend
+  /// [cls] possibly including [cls] itself, if it is live.
   Iterable<ClassEntity> subclassesOf(ClassEntity cls);
 
-  /// Returns an iterable over the live classes that extend [cls] _not_
-  /// including [cls] itself.
+  /// Returns an iterable over the directly instantiated classes that extend
+  /// [cls] _not_ including [cls] itself.
   Iterable<ClassEntity> strictSubclassesOf(ClassEntity cls);
 
   /// Returns the number of live classes that extend [cls] _not_
@@ -79,8 +79,8 @@
   /// possibly including [cls] itself, if it is live.
   Iterable<ClassEntity> subtypesOf(ClassEntity cls);
 
-  /// Returns an iterable over the live classes that implement [cls] _not_
-  /// including [cls] if it is live.
+  /// Returns an iterable over the directly instantiated that implement [cls]
+  /// _not_ including [cls].
   Iterable<ClassEntity> strictSubtypesOf(ClassEntity cls);
 
   /// Returns the number of live classes that implement [cls] _not_
@@ -99,13 +99,16 @@
   /// Returns `true` if [a] and [b] have any known common subtypes.
   bool haveAnyCommonSubtypes(ClassEntity a, ClassEntity b);
 
-  /// Returns `true` if any live class other than [cls] extends [cls].
+  /// Returns `true` if any directly instantiated class other than [cls] extends
+  /// [cls].
   bool hasAnyStrictSubclass(ClassEntity cls);
 
-  /// Returns `true` if any live class other than [cls] implements [cls].
+  /// Returns `true` if any directly instantiated class other than [cls]
+  /// implements [cls].
   bool hasAnyStrictSubtype(ClassEntity cls);
 
-  /// Returns `true` if all live classes that implement [cls] extend it.
+  /// Returns `true` if all directly instantiated classes that implement [cls]
+  /// extend it.
   bool hasOnlySubclasses(ClassEntity cls);
 
   /// Returns a [SubclassResult] for the subclasses that are contained in
@@ -230,8 +233,6 @@
     return node != null && node.isIndirectlyInstantiated;
   }
 
-  /// Returns `true` if [x] is a subtype of [y], that is, if [x] implements an
-  /// instance of [y].
   @override
   bool isSubtypeOf(ClassEntity x, ClassEntity y) {
     ClassSet classSet = _classSets[y];
@@ -247,14 +248,11 @@
     return classSet.hasSubtype(classHierarchyNode);
   }
 
-  /// Return `true` if [x] is a (non-strict) subclass of [y].
   @override
   bool isSubclassOf(ClassEntity x, ClassEntity y) {
     return _classHierarchyNodes[y].hasSubclass(_classHierarchyNodes[x]);
   }
 
-  /// Returns an iterable over the directly instantiated classes that extend
-  /// [cls] possibly including [cls] itself, if it is live.
   @override
   Iterable<ClassEntity> subclassesOf(ClassEntity cls) {
     ClassHierarchyNode hierarchy = _classHierarchyNodes[cls];
@@ -263,8 +261,6 @@
         .subclassesByMask(ClassHierarchyNode.EXPLICITLY_INSTANTIATED);
   }
 
-  /// Returns an iterable over the directly instantiated classes that extend
-  /// [cls] _not_ including [cls] itself.
   @override
   Iterable<ClassEntity> strictSubclassesOf(ClassEntity cls) {
     ClassHierarchyNode subclasses = _classHierarchyNodes[cls];
@@ -274,8 +270,6 @@
         strict: true);
   }
 
-  /// Returns the number of live classes that extend [cls] _not_
-  /// including [cls] itself.
   @override
   int strictSubclassCount(ClassEntity cls) {
     ClassHierarchyNode subclasses = _classHierarchyNodes[cls];
@@ -283,8 +277,6 @@
     return subclasses.instantiatedSubclassCount;
   }
 
-  /// Applies [f] to each live class that extend [cls] _not_ including [cls]
-  /// itself.
   @override
   void forEachStrictSubclassOf(
       ClassEntity cls, IterationStep f(ClassEntity cls)) {
@@ -294,8 +286,6 @@
         strict: true);
   }
 
-  /// Returns `true` if [predicate] applies to any live class that extend [cls]
-  /// _not_ including [cls] itself.
   @override
   bool anyStrictSubclassOf(ClassEntity cls, bool predicate(ClassEntity cls)) {
     ClassHierarchyNode subclasses = _classHierarchyNodes[cls];
@@ -305,8 +295,6 @@
         strict: true);
   }
 
-  /// Returns an iterable over the directly instantiated that implement [cls]
-  /// possibly including [cls] itself, if it is live.
   @override
   Iterable<ClassEntity> subtypesOf(ClassEntity cls) {
     ClassSet classSet = _classSets[cls];
@@ -318,8 +306,6 @@
     }
   }
 
-  /// Returns an iterable over the directly instantiated that implement [cls]
-  /// _not_ including [cls].
   @override
   Iterable<ClassEntity> strictSubtypesOf(ClassEntity cls) {
     ClassSet classSet = _classSets[cls];
@@ -331,8 +317,6 @@
     }
   }
 
-  /// Returns the number of live classes that implement [cls] _not_
-  /// including [cls] itself.
   @override
   int strictSubtypeCount(ClassEntity cls) {
     ClassSet classSet = _classSets[cls];
@@ -340,8 +324,6 @@
     return classSet.instantiatedSubtypeCount;
   }
 
-  /// Applies [f] to each live class that implements [cls] _not_ including [cls]
-  /// itself.
   @override
   void forEachStrictSubtypeOf(
       ClassEntity cls, IterationStep f(ClassEntity cls)) {
@@ -351,8 +333,6 @@
         strict: true);
   }
 
-  /// Returns `true` if [predicate] applies to any live class that extend [cls]
-  /// _not_ including [cls] itself.
   @override
   bool anyStrictSubtypeOf(ClassEntity cls, bool predicate(ClassEntity cls)) {
     ClassSet classSet = _classSets[cls];
@@ -362,7 +342,6 @@
         strict: true);
   }
 
-  /// Returns `true` if [a] and [b] have any known common subtypes.
   @override
   bool haveAnyCommonSubtypes(ClassEntity a, ClassEntity b) {
     ClassSet classSetA = _classSets[a];
@@ -378,8 +357,6 @@
     return false;
   }
 
-  /// Returns `true` if any directly instantiated class other than [cls] extends
-  /// [cls].
   @override
   bool hasAnyStrictSubclass(ClassEntity cls) {
     ClassHierarchyNode subclasses = _classHierarchyNodes[cls];
@@ -387,15 +364,11 @@
     return subclasses.isIndirectlyInstantiated;
   }
 
-  /// Returns `true` if any directly instantiated class other than [cls]
-  /// implements [cls].
   @override
   bool hasAnyStrictSubtype(ClassEntity cls) {
     return strictSubtypeCount(cls) > 0;
   }
 
-  /// Returns `true` if all directly instantiated classes that implement [cls]
-  /// extend it.
   @override
   bool hasOnlySubclasses(ClassEntity cls) {
     // TODO(johnniwinther): move this to ClassSet?
@@ -554,21 +527,11 @@
     }
   }
 
-  /// Returns [ClassHierarchyNode] for [cls] used to model the class hierarchies
-  /// of known classes.
-  ///
-  /// This method is only provided for testing. For queries on classes, use the
-  /// methods defined in [JClosedWorld].
   @override
   ClassHierarchyNode getClassHierarchyNode(ClassEntity cls) {
     return _classHierarchyNodes[cls];
   }
 
-  /// Returns [ClassSet] for [cls] used to model the extends and implements
-  /// relations of known classes.
-  ///
-  /// This method is only provided for testing. For queries on classes, use the
-  /// methods defined in [JClosedWorld].
   @override
   ClassSet getClassSet(ClassEntity cls) {
     return _classSets[cls];
diff --git a/pkg/compiler/lib/src/universe/codegen_world_builder.dart b/pkg/compiler/lib/src/universe/codegen_world_builder.dart
index 4ece571..8ab3ae4 100644
--- a/pkg/compiler/lib/src/universe/codegen_world_builder.dart
+++ b/pkg/compiler/lib/src/universe/codegen_world_builder.dart
@@ -18,13 +18,7 @@
 import 'member_usage.dart';
 import 'selector.dart' show Selector;
 import 'use.dart'
-    show
-        ConstantUse,
-        ConstantUseKind,
-        DynamicUse,
-        DynamicUseKind,
-        StaticUse,
-        StaticUseKind;
+    show ConstantUse, DynamicUse, DynamicUseKind, StaticUse, StaticUseKind;
 import 'world_builder.dart';
 
 /// World builder specific to codegen.
@@ -89,7 +83,6 @@
   /// Invariant: Elements are declaration elements.
   Iterable<FieldEntity> get allReferencedStaticFields;
 
-  /// Set of methods in instantiated classes that are potentially closurized.
   @override
   Iterable<FunctionEntity> get closurizedMembers;
 
@@ -134,15 +127,9 @@
   /// Classes implemented by directly instantiated classes.
   final Set<ClassEntity> _implementedClasses = new Set<ClassEntity>();
 
-  /// The set of all referenced static fields.
-  ///
-  /// Invariant: Elements are declaration elements.
   @override
   final Set<FieldEntity> allReferencedStaticFields = new Set<FieldEntity>();
 
-  /// Documentation wanted -- johnniwinther
-  ///
-  /// Invariant: Elements are declaration elements.
   @override
   final Set<FunctionEntity> staticFunctionsNeedingGetter =
       new Set<FunctionEntity>();
@@ -210,26 +197,17 @@
   Iterable<ClassEntity> get instantiatedClasses => _processedClasses.keys
       .where((cls) => _processedClasses[cls].isInstantiated);
 
-  /// All directly instantiated classes, that is, classes with a generative
-  /// constructor that has been called directly and not only through a
-  /// super-call.
   // TODO(johnniwinther): Improve semantic precision.
   @override
   Iterable<ClassEntity> get directlyInstantiatedClasses {
     return _directlyInstantiatedClasses;
   }
 
-  /// All directly instantiated types, that is, the types of the directly
-  /// instantiated classes.
-  ///
-  /// See [directlyInstantiatedClasses].
   // TODO(johnniwinther): Improve semantic precision.
   @override
   Iterable<InterfaceType> get instantiatedTypes => _instantiatedTypes;
 
   /// Register [type] as (directly) instantiated.
-  ///
-  /// If [byMirrors] is `true`, the instantiation is through mirrors.
   // TODO(johnniwinther): Fully enforce the separation between exact, through
   // subclass and through subtype instantiated types/classes.
   // TODO(johnniwinther): Support unknown type arguments for generic types.
@@ -500,29 +478,33 @@
     closurizedMembers.add(element);
   }
 
-  void processClassMembers(ClassEntity cls, MemberUsedCallback memberUsed) {
+  void processClassMembers(ClassEntity cls, MemberUsedCallback memberUsed,
+      {bool dryRun: false}) {
     _elementEnvironment.forEachClassMember(cls,
         (ClassEntity cls, MemberEntity member) {
-      _processInstantiatedClassMember(cls, member, memberUsed);
+      _processInstantiatedClassMember(cls, member, memberUsed, dryRun: dryRun);
     });
   }
 
   void _processInstantiatedClassMember(ClassEntity cls,
-      covariant MemberEntity member, MemberUsedCallback memberUsed) {
+      covariant MemberEntity member, MemberUsedCallback memberUsed,
+      {bool dryRun: false}) {
     if (!member.isInstanceMember) return;
     _getMemberUsage(member, memberUsed);
   }
 
   MemberUsage _getMemberUsage(
-      covariant MemberEntity member, MemberUsedCallback memberUsed) {
+      covariant MemberEntity member, MemberUsedCallback memberUsed,
+      {bool dryRun: false}) {
     // TODO(johnniwinther): Change [TypeMask] to not apply to a superclass
     // member unless the class has been instantiated. Similar to
     // [StrongModeConstraint].
-    return _instanceMemberUsage.putIfAbsent(member, () {
+    MemberUsage usage = _instanceMemberUsage[member];
+    if (usage == null) {
       String memberName = member.name;
       ClassEntity cls = member.enclosingClass;
       bool isNative = _nativeBasicData.isNativeClass(cls);
-      MemberUsage usage = new MemberUsage(member, isNative: isNative);
+      usage = new MemberUsage(member, isNative: isNative);
       EnumSet<MemberUse> useSet = new EnumSet<MemberUse>();
       useSet.addAll(usage.appliedUse);
       if (!usage.hasRead && hasInvokedGetter(member)) {
@@ -537,23 +519,30 @@
         useSet.addAll(usage.invoke(null));
       }
 
-      if (usage.hasPendingClosurizationUse) {
-        // Store the member in [instanceFunctionsByName] to catch
-        // getters on the function.
-        _instanceFunctionsByName
-            .putIfAbsent(usage.entity.name, () => new Set<MemberUsage>())
-            .add(usage);
-      }
-      if (usage.hasPendingNormalUse) {
-        // The element is not yet used. Add it to the list of instance
-        // members to still be processed.
-        _instanceMembersByName
-            .putIfAbsent(memberName, () => new Set<MemberUsage>())
-            .add(usage);
+      if (!dryRun) {
+        if (usage.hasPendingClosurizationUse) {
+          // Store the member in [instanceFunctionsByName] to catch
+          // getters on the function.
+          _instanceFunctionsByName
+              .putIfAbsent(usage.entity.name, () => new Set<MemberUsage>())
+              .add(usage);
+        }
+        if (usage.hasPendingNormalUse) {
+          // The element is not yet used. Add it to the list of instance
+          // members to still be processed.
+          _instanceMembersByName
+              .putIfAbsent(memberName, () => new Set<MemberUsage>())
+              .add(usage);
+        }
+        _instanceMemberUsage[member] = usage;
       }
       memberUsed(member, useSet);
-      return usage;
-    });
+    } else {
+      if (dryRun) {
+        usage = usage.clone();
+      }
+    }
+    return usage;
   }
 
   void _processSet(Map<String, Set<MemberUsage>> map, String memberName,
@@ -629,9 +618,7 @@
   /// Register the constant [use] with this world builder. Returns `true` if
   /// the constant use was new to the world.
   bool registerConstantUse(ConstantUse use) {
-    if (use.kind == ConstantUseKind.DIRECT) {
-      addCompileTimeConstantForEmission(use.value);
-    }
+    addCompileTimeConstantForEmission(use.value);
     return _constantValues.add(use.value);
   }
 
diff --git a/pkg/compiler/lib/src/universe/member_usage.dart b/pkg/compiler/lib/src/universe/member_usage.dart
index 50fc2dc..1eb99bb 100644
--- a/pkg/compiler/lib/src/universe/member_usage.dart
+++ b/pkg/compiler/lib/src/universe/member_usage.dart
@@ -11,9 +11,11 @@
 import 'call_structure.dart';
 
 abstract class AbstractUsage<T> {
-  final EnumSet<T> _pendingUse = new EnumSet<T>();
+  final EnumSet<T> _pendingUse;
 
-  AbstractUsage() {
+  AbstractUsage.cloned(this._pendingUse);
+
+  AbstractUsage() : this._pendingUse = new EnumSet<T>() {
     _pendingUse.addAll(_originalUse);
   }
 
@@ -37,7 +39,10 @@
 abstract class MemberUsage extends AbstractUsage<MemberUse> {
   final MemberEntity entity;
 
-  MemberUsage.internal(this.entity);
+  MemberUsage.internal(this.entity) : super();
+
+  MemberUsage.cloned(this.entity, EnumSet<MemberUse> pendingUse)
+      : super.cloned(pendingUse);
 
   factory MemberUsage(MemberEntity member,
       {bool isNative: false, bool trackParameters: false}) {
@@ -150,20 +155,43 @@
     return entity == other.entity;
   }
 
+  MemberUsage clone();
+
+  bool dataEquals(MemberUsage other) {
+    assert(entity == other.entity);
+    return hasInit == other.hasInit &&
+        hasRead == other.hasRead &&
+        hasInvoke == other.hasInvoke &&
+        hasWrite == other.hasWrite &&
+        hasPendingClosurizationUse == other.hasPendingClosurizationUse &&
+        hasPendingNormalUse == other.hasPendingNormalUse &&
+        fullyUsed == other.fullyUsed &&
+        isFullyInvoked == other.isFullyInvoked &&
+        _pendingUse == other._pendingUse &&
+        appliedUse == other.appliedUse;
+  }
+
   @override
   String toString() => '$entity:${appliedUse.iterable(MemberUse.values)}';
 }
 
 class FieldUsage extends MemberUsage {
   @override
-  bool hasInit = false;
+  bool hasInit;
   @override
-  bool hasRead = false;
+  bool hasRead;
   @override
-  bool hasWrite = false;
+  bool hasWrite;
+
+  FieldUsage.cloned(FieldEntity field, EnumSet<MemberUse> pendingUse,
+      {this.hasInit, this.hasRead, this.hasWrite})
+      : super.cloned(field, pendingUse);
 
   FieldUsage(FieldEntity field, {bool isNative: false})
-      : super.internal(field) {
+      : hasInit = false,
+        hasRead = false,
+        hasWrite = false,
+        super.internal(field) {
     // TODO(johnniwinther): Track native fields through member usage.
     if (!isNative) {
       init();
@@ -228,18 +256,30 @@
   }
 
   @override
+  MemberUsage clone() {
+    return new FieldUsage.cloned(entity, _pendingUse.clone(),
+        hasInit: hasInit, hasRead: hasRead, hasWrite: hasWrite);
+  }
+
+  @override
   String toString() => 'FieldUsage($entity,hasInit=$hasInit,hasRead=$hasRead,'
       'hasWrite=$hasWrite,pendingUse=${_pendingUse.iterable(MemberUse.values)}';
 }
 
 class FinalFieldUsage extends MemberUsage {
   @override
-  bool hasInit = false;
+  bool hasInit;
   @override
-  bool hasRead = false;
+  bool hasRead;
+
+  FinalFieldUsage.cloned(FieldEntity field, EnumSet<MemberUse> pendingUse,
+      {this.hasInit, this.hasRead})
+      : super.cloned(field, pendingUse);
 
   FinalFieldUsage(FieldEntity field, {bool isNative: false})
-      : super.internal(field) {
+      : this.hasInit = false,
+        this.hasRead = false,
+        super.internal(field) {
     if (!isNative) {
       init();
     }
@@ -290,17 +330,30 @@
   }
 
   @override
+  MemberUsage clone() {
+    return new FinalFieldUsage.cloned(entity, _pendingUse.clone(),
+        hasInit: hasInit, hasRead: hasRead);
+  }
+
+  @override
   String toString() => 'FinalFieldUsage($entity,hasInit=$hasInit,'
       'hasRead=$hasRead,pendingUse=${_pendingUse.iterable(MemberUse.values)}';
 }
 
 class FunctionUsage extends MemberUsage {
   @override
-  bool hasInvoke = false;
+  bool hasInvoke;
   @override
-  bool hasRead = false;
+  bool hasRead;
 
-  FunctionUsage(FunctionEntity function) : super.internal(function) {
+  FunctionUsage.cloned(FunctionEntity function, EnumSet<MemberUse> pendingUse,
+      {this.hasInvoke, this.hasRead})
+      : super.cloned(function, pendingUse);
+
+  FunctionUsage(FunctionEntity function)
+      : this.hasInvoke = false,
+        this.hasRead = false,
+        super.internal(function) {
     if (function is JSignatureMethod) {
       // We mark signature methods as "always used" to prevent them from being
       // optimized away.
@@ -361,16 +414,28 @@
   @override
   ParameterStructure get invokedParameters =>
       hasInvoke ? entity.parameterStructure : null;
+
+  @override
+  MemberUsage clone() {
+    return new FunctionUsage.cloned(entity, _pendingUse.clone(),
+        hasInvoke: hasInvoke, hasRead: hasRead);
+  }
 }
 
 class ParameterTrackingFunctionUsage extends MemberUsage {
   @override
-  bool hasRead = false;
+  bool hasRead;
 
   final ParameterUsage _parameterUsage;
 
+  ParameterTrackingFunctionUsage.cloned(FunctionEntity function,
+      this._parameterUsage, EnumSet<MemberUse> pendingUse,
+      {this.hasRead})
+      : super.cloned(function, pendingUse);
+
   ParameterTrackingFunctionUsage(FunctionEntity function)
-      : _parameterUsage = new ParameterUsage(function.parameterStructure),
+      : hasRead = false,
+        _parameterUsage = new ParameterUsage(function.parameterStructure),
         super.internal(function) {
     if (function is JSignatureMethod) {
       // We mark signature methods as "always used" to prevent them from being
@@ -447,13 +512,26 @@
 
   @override
   ParameterStructure get invokedParameters => _parameterUsage.invokedParameters;
+
+  @override
+  MemberUsage clone() {
+    return new ParameterTrackingFunctionUsage.cloned(
+        entity, _parameterUsage.clone(), _pendingUse.clone(),
+        hasRead: hasRead);
+  }
 }
 
 class GetterUsage extends MemberUsage {
   @override
-  bool hasRead = false;
+  bool hasRead;
 
-  GetterUsage(FunctionEntity getter) : super.internal(getter);
+  GetterUsage.cloned(FunctionEntity getter, EnumSet<MemberUse> pendingUse,
+      {this.hasRead})
+      : super.cloned(getter, pendingUse);
+
+  GetterUsage(FunctionEntity getter)
+      : hasRead = false,
+        super.internal(getter);
 
   @override
   bool get fullyUsed => hasRead;
@@ -472,13 +550,25 @@
 
   @override
   EnumSet<MemberUse> fullyUse() => read();
+
+  @override
+  MemberUsage clone() {
+    return new GetterUsage.cloned(entity, _pendingUse.clone(),
+        hasRead: hasRead);
+  }
 }
 
 class SetterUsage extends MemberUsage {
   @override
-  bool hasWrite = false;
+  bool hasWrite;
 
-  SetterUsage(FunctionEntity setter) : super.internal(setter);
+  SetterUsage.cloned(FunctionEntity setter, EnumSet<MemberUse> pendingUse,
+      {this.hasWrite})
+      : super.cloned(setter, pendingUse);
+
+  SetterUsage(FunctionEntity setter)
+      : hasWrite = false,
+        super.internal(setter);
 
   @override
   bool get fullyUsed => hasWrite;
@@ -494,13 +584,26 @@
 
   @override
   EnumSet<MemberUse> fullyUse() => write();
+
+  @override
+  MemberUsage clone() {
+    return new SetterUsage.cloned(entity, _pendingUse.clone(),
+        hasWrite: hasWrite);
+  }
 }
 
 class ConstructorUsage extends MemberUsage {
   @override
-  bool hasInvoke = false;
+  bool hasInvoke;
 
-  ConstructorUsage(ConstructorEntity constructor) : super.internal(constructor);
+  ConstructorUsage.cloned(
+      ConstructorEntity constructor, EnumSet<MemberUse> pendingUse,
+      {this.hasInvoke})
+      : super.cloned(constructor, pendingUse);
+
+  ConstructorUsage(ConstructorEntity constructor)
+      : hasInvoke = false,
+        super.internal(constructor);
 
   @override
   ConstructorEntity get entity => super.entity;
@@ -528,11 +631,21 @@
   @override
   ParameterStructure get invokedParameters =>
       hasInvoke ? entity.parameterStructure : null;
+
+  @override
+  MemberUsage clone() {
+    return new ConstructorUsage.cloned(entity, _pendingUse.clone(),
+        hasInvoke: hasInvoke);
+  }
 }
 
 class ParameterTrackingConstructorUsage extends MemberUsage {
   final ParameterUsage _parameterUsage;
 
+  ParameterTrackingConstructorUsage.cloned(ConstructorEntity constructor,
+      this._parameterUsage, EnumSet<MemberUse> pendingUse)
+      : super.cloned(constructor, pendingUse);
+
   ParameterTrackingConstructorUsage(ConstructorEntity constructor)
       : _parameterUsage = new ParameterUsage(constructor.parameterStructure),
         super.internal(constructor);
@@ -580,6 +693,12 @@
 
   @override
   ParameterStructure get invokedParameters => _parameterUsage.invokedParameters;
+
+  @override
+  MemberUsage clone() {
+    return new ParameterTrackingConstructorUsage.cloned(
+        entity, _parameterUsage.clone(), _pendingUse.clone());
+  }
 }
 
 /// Enum class for the possible kind of use of [MemberEntity] objects.
@@ -627,7 +746,7 @@
 
   final ClassEntity cls;
 
-  ClassUsage(this.cls);
+  ClassUsage(this.cls) : super();
 
   EnumSet<ClassUse> instantiate() {
     if (isInstantiated) {
@@ -673,10 +792,16 @@
   @override
   final MemberEntity entity;
 
-  bool hasNormalUse = false;
+  bool hasNormalUse;
   bool get hasClosurization => false;
 
-  StaticMemberUsage.internal(this.entity);
+  StaticMemberUsage.cloned(this.entity, EnumSet<MemberUse> pendingUse,
+      {this.hasNormalUse: false})
+      : super.cloned(pendingUse);
+
+  StaticMemberUsage.internal(this.entity)
+      : this.hasNormalUse = false,
+        super();
 
   EnumSet<MemberUse> normalUse() {
     if (hasNormalUse) {
@@ -713,12 +838,32 @@
   EnumSet<MemberUse> get _originalUse => MemberUses.NORMAL_ONLY;
 
   @override
+  bool dataEquals(MemberUsage other) {
+    assert(entity == other.entity);
+    return hasInit == other.hasInit &&
+        hasRead == other.hasRead &&
+        hasInvoke == other.hasInvoke &&
+        hasWrite == other.hasWrite &&
+        hasPendingClosurizationUse == other.hasPendingClosurizationUse &&
+        hasPendingNormalUse == other.hasPendingNormalUse &&
+        fullyUsed == other.fullyUsed &&
+        isFullyInvoked == other.isFullyInvoked &&
+        _pendingUse == other._pendingUse &&
+        appliedUse == other.appliedUse;
+  }
+
+  @override
   String toString() => '$entity:${appliedUse.iterable(MemberUse.values)}';
 }
 
 class GeneralStaticMemberUsage extends StaticMemberUsage {
   GeneralStaticMemberUsage(MemberEntity entity) : super.internal(entity);
 
+  GeneralStaticMemberUsage.cloned(
+      MemberEntity entity, EnumSet<MemberUse> pendingUse,
+      {bool hasNormalUse})
+      : super.cloned(entity, pendingUse, hasNormalUse: hasNormalUse);
+
   @override
   EnumSet<MemberUse> tearOff() => normalUse();
 
@@ -742,13 +887,26 @@
 
   @override
   ParameterStructure get invokedParameters => null;
+
+  @override
+  MemberUsage clone() {
+    return new GeneralStaticMemberUsage.cloned(entity, _pendingUse.clone(),
+        hasNormalUse: hasNormalUse);
+  }
 }
 
 class StaticFunctionUsage extends StaticMemberUsage {
   @override
-  bool hasClosurization = false;
+  bool hasClosurization;
 
-  StaticFunctionUsage(FunctionEntity entity) : super.internal(entity);
+  StaticFunctionUsage(FunctionEntity entity)
+      : hasClosurization = false,
+        super.internal(entity);
+
+  StaticFunctionUsage.cloned(
+      FunctionEntity entity, EnumSet<MemberUse> pendingUse,
+      {bool hasNormalUse, this.hasClosurization})
+      : super.cloned(entity, pendingUse, hasNormalUse: hasNormalUse);
 
   @override
   FunctionEntity get entity => super.entity;
@@ -787,6 +945,12 @@
   @override
   ParameterStructure get invokedParameters =>
       hasInvoke ? entity.parameterStructure : null;
+
+  @override
+  MemberUsage clone() {
+    return new StaticFunctionUsage.cloned(entity, _pendingUse.clone(),
+        hasNormalUse: hasNormalUse, hasClosurization: hasClosurization);
+  }
 }
 
 /// Object used for tracking parameter use in constructor and method
@@ -827,6 +991,16 @@
     }
   }
 
+  ParameterUsage.cloned(this._parameterStructure,
+      {bool hasInvoke,
+      int providedPositionalParameters,
+      bool areAllTypeParametersProvided,
+      Set<String> unprovidedNamedParameters})
+      : _hasInvoke = hasInvoke,
+        _providedPositionalParameters = providedPositionalParameters,
+        _areAllTypeParametersProvided = areAllTypeParametersProvided,
+        _unprovidedNamedParameters = unprovidedNamedParameters;
+
   bool invoke(CallStructure callStructure) {
     if (isFullyUsed) return false;
     _hasInvoke = true;
@@ -888,4 +1062,12 @@
                 .toList(),
         _areAllTypeParametersProvided ? _parameterStructure.typeParameters : 0);
   }
+
+  ParameterUsage clone() {
+    return new ParameterUsage.cloned(_parameterStructure,
+        hasInvoke: _hasInvoke,
+        providedPositionalParameters: _providedPositionalParameters,
+        areAllTypeParametersProvided: _areAllTypeParametersProvided,
+        unprovidedNamedParameters: _unprovidedNamedParameters?.toSet());
+  }
 }
diff --git a/pkg/compiler/lib/src/universe/resolution_world_builder.dart b/pkg/compiler/lib/src/universe/resolution_world_builder.dart
index 0111c4d..008a742 100644
--- a/pkg/compiler/lib/src/universe/resolution_world_builder.dart
+++ b/pkg/compiler/lib/src/universe/resolution_world_builder.dart
@@ -99,8 +99,6 @@
   void registerClosurizedMember(MemberEntity element);
 
   /// Register [type] as (directly) instantiated.
-  ///
-  /// If [byMirrors] is `true`, the instantiation is through mirrors.
   // TODO(johnniwinther): Fully enforce the separation between exact, through
   // subclass and through subtype instantiated types/classes.
   // TODO(johnniwinther): Support unknown type arguments for generic types.
@@ -110,7 +108,8 @@
 
   /// Computes usage for all members declared by [cls]. Calls [membersUsed] with
   /// the usage changes for each member.
-  void processClassMembers(ClassEntity cls, MemberUsedCallback memberUsed);
+  void processClassMembers(ClassEntity cls, MemberUsedCallback memberUsed,
+      {bool dryRun: false});
 
   /// Applies the [dynamicUse] to applicable instance members. Calls
   /// [membersUsed] with the usage changes for each member.
@@ -369,7 +368,6 @@
   final Map<String, Set<MemberUsage>> _instanceFunctionsByName =
       <String, Set<MemberUsage>>{};
 
-  /// Fields set.
   @override
   final Set<FieldEntity> fieldSetters = new Set<FieldEntity>();
   @override
@@ -388,10 +386,6 @@
   @override
   final Set<Local> localFunctionsWithFreeTypeVariables = new Set<Local>();
 
-  /// Set of live closurized members whose signatures reference type variables.
-  ///
-  /// A closurized method is considered live if the enclosing class has been
-  /// instantiated.
   @override
   final Set<FunctionEntity> closurizedMembersWithFreeTypeVariables =
       new Set<FunctionEntity>();
@@ -504,9 +498,6 @@
     return _closedWorldCache;
   }
 
-  /// All directly instantiated classes, that is, classes with a generative
-  /// constructor that has been called directly and not only through a
-  /// super-call.
   // TODO(johnniwinther): Improve semantic precision.
   @override
   Iterable<ClassEntity> get directlyInstantiatedClasses {
@@ -519,10 +510,6 @@
     return classes;
   }
 
-  /// All directly instantiated types, that is, the types of the directly
-  /// instantiated classes.
-  ///
-  /// See [directlyInstantiatedClasses].
   // TODO(johnniwinther): Improve semantic precision.
   @override
   Iterable<InterfaceType> get instantiatedTypes {
@@ -553,9 +540,6 @@
     }
   }
 
-  /// Register [type] as (directly) instantiated.
-  ///
-  /// If [byMirrors] is `true`, the instantiation is through mirrors.
   // TODO(johnniwinther): Fully enforce the separation between exact, through
   // subclass and through subtype instantiated types/classes.
   // TODO(johnniwinther): Support unknown type arguments for generic types.
@@ -755,11 +739,7 @@
 
     MemberEntity element = staticUse.element;
     EnumSet<MemberUse> useSet = new EnumSet<MemberUse>();
-    MemberUsage usage = _memberUsage.putIfAbsent(element, () {
-      MemberUsage usage = new MemberUsage(element, trackParameters: true);
-      useSet.addAll(usage.appliedUse);
-      return usage;
-    });
+    MemberUsage usage = _getMemberUsage(element, useSet);
 
     if ((element.isStatic || element.isTopLevel) && element.isField) {
       allReferencedStaticFields.add(staticUse.element);
@@ -853,13 +833,12 @@
     }
   }
 
-  /// Computes usage for all members declared by [cls]. Calls [membersUsed] with
-  /// the usage changes for each member.
   @override
-  void processClassMembers(ClassEntity cls, MemberUsedCallback memberUsed) {
+  void processClassMembers(ClassEntity cls, MemberUsedCallback memberUsed,
+      {bool dryRun: false}) {
     _elementEnvironment.forEachClassMember(cls,
         (ClassEntity cls, MemberEntity member) {
-      _processInstantiatedClassMember(cls, member, memberUsed);
+      _processInstantiatedClassMember(cls, member, memberUsed, dryRun: dryRun);
     });
   }
 
@@ -883,97 +862,132 @@
     map[memberName].addAll(remaining);
   }
 
+  MemberUsage _getMemberUsage(MemberEntity member, EnumSet<MemberUse> useSet,
+      {bool dryRun: false}) {
+    MemberUsage usage = _memberUsage[member];
+    if (usage == null) {
+      if (member.isInstanceMember) {
+        String memberName = member.name;
+        ClassEntity cls = member.enclosingClass;
+        // TODO(johnniwinther): Change this to use isNativeMember when we use
+        // CFE constants.
+        // The obvious thing to test here would be "member.isNative",
+        // however, that only works after metadata has been parsed/analyzed,
+        // and that may not have happened yet.
+        // So instead we use the enclosing class, which we know have had
+        // its metadata parsed and analyzed.
+        // Note: this assumes that there are no non-native fields on native
+        // classes, which may not be the case when a native class is subclassed.
+        bool isNative = _nativeBasicData.isNativeClass(cls);
+        usage =
+            new MemberUsage(member, isNative: isNative, trackParameters: true);
+        useSet.addAll(usage.appliedUse);
+        if (!dryRun) {
+          if (member.isField && isNative) {
+            registerUsedElement(member);
+          }
+          if (member.isFunction &&
+              member.name == Identifiers.call &&
+              _elementEnvironment.isGenericClass(cls)) {
+            closurizedMembersWithFreeTypeVariables.add(member);
+          }
+        }
+
+        if (!usage.hasRead && _hasInvokedGetter(member)) {
+          useSet.addAll(usage.read());
+        }
+        if (!usage.isFullyInvoked) {
+          Iterable<CallStructure> callStructures =
+              _getInvocationCallStructures(member);
+          for (CallStructure callStructure in callStructures) {
+            useSet.addAll(usage.invoke(callStructure));
+            if (usage.isFullyInvoked) {
+              break;
+            }
+          }
+        }
+        if (!usage.hasWrite && hasInvokedSetter(member)) {
+          useSet.addAll(usage.write());
+        }
+
+        if (!dryRun) {
+          if (usage.hasPendingNormalUse) {
+            // The element is not yet used. Add it to the list of instance
+            // members to still be processed.
+            _instanceMembersByName
+                .putIfAbsent(memberName, () => new Set<MemberUsage>())
+                .add(usage);
+          }
+          if (usage.hasPendingClosurizationUse) {
+            // Store the member in [instanceFunctionsByName] to catch
+            // getters on the function.
+            _instanceFunctionsByName
+                .putIfAbsent(memberName, () => new Set<MemberUsage>())
+                .add(usage);
+          }
+        }
+      } else {
+        usage = new MemberUsage(member, trackParameters: true);
+        useSet.addAll(usage.appliedUse);
+      }
+    }
+    if (!dryRun) {
+      _memberUsage[member] = usage;
+    }
+    return usage;
+  }
+
   void _processInstantiatedClassMember(ClassEntity cls,
-      covariant MemberEntity member, MemberUsedCallback memberUsed) {
+      covariant MemberEntity member, MemberUsedCallback memberUsed,
+      {bool dryRun: false}) {
     if (!member.isInstanceMember) return;
     String memberName = member.name;
-    // The obvious thing to test here would be "member.isNative",
-    // however, that only works after metadata has been parsed/analyzed,
-    // and that may not have happened yet.
-    // So instead we use the enclosing class, which we know have had
-    // its metadata parsed and analyzed.
-    // Note: this assumes that there are no non-native fields on native
-    // classes, which may not be the case when a native class is subclassed.
-    bool newUsage = false;
-    MemberUsage usage = _memberUsage.putIfAbsent(member, () {
-      newUsage = true;
-      bool isNative = _nativeBasicData.isNativeClass(cls);
-      EnumSet<MemberUse> useSet = new EnumSet<MemberUse>();
-      MemberUsage usage =
-          new MemberUsage(member, isNative: isNative, trackParameters: true);
-      useSet.addAll(usage.appliedUse);
-      if (member.isField && isNative) {
-        registerUsedElement(member);
-      }
-      if (member.isFunction &&
-          member.name == Identifiers.call &&
-          _elementEnvironment.isGenericClass(cls)) {
-        closurizedMembersWithFreeTypeVariables.add(member);
-      }
 
-      if (!usage.hasRead && _hasInvokedGetter(member)) {
-        useSet.addAll(usage.read());
+    MemberUsage usage = _memberUsage[member];
+    if (usage == null) {
+      EnumSet<MemberUse> useSet = new EnumSet<MemberUse>();
+      usage = _getMemberUsage(member, useSet, dryRun: dryRun);
+      memberUsed(usage.entity, useSet);
+    } else {
+      MemberUsage original = usage;
+      if (dryRun) {
+        usage = usage.clone();
       }
-      if (!usage.isFullyInvoked) {
-        Iterable<CallStructure> callStructures =
-            _getInvocationCallStructures(member);
-        for (CallStructure callStructure in callStructures) {
-          useSet.addAll(usage.invoke(callStructure));
-          if (usage.isFullyInvoked) {
-            break;
+      if (!usage.fullyUsed) {
+        EnumSet<MemberUse> useSet = new EnumSet<MemberUse>();
+        if (!usage.hasRead && _hasInvokedGetter(member)) {
+          useSet.addAll(usage.read());
+        }
+        if (!usage.isFullyInvoked) {
+          Iterable<CallStructure> callStructures =
+              _getInvocationCallStructures(member);
+          for (CallStructure callStructure in callStructures) {
+            useSet.addAll(usage.invoke(callStructure));
+            if (usage.isFullyInvoked) {
+              break;
+            }
           }
         }
-      }
-      if (!usage.hasWrite && hasInvokedSetter(member)) {
-        useSet.addAll(usage.write());
-      }
-
-      if (usage.hasPendingNormalUse) {
-        // The element is not yet used. Add it to the list of instance
-        // members to still be processed.
-        _instanceMembersByName
-            .putIfAbsent(memberName, () => new Set<MemberUsage>())
-            .add(usage);
-      }
-      if (usage.hasPendingClosurizationUse) {
-        // Store the member in [instanceFunctionsByName] to catch
-        // getters on the function.
-        _instanceFunctionsByName
-            .putIfAbsent(memberName, () => new Set<MemberUsage>())
-            .add(usage);
-      }
-      memberUsed(usage.entity, useSet);
-      return usage;
-    });
-    if (!usage.fullyUsed && !newUsage) {
-      EnumSet<MemberUse> useSet = new EnumSet<MemberUse>();
-      if (!usage.hasRead && _hasInvokedGetter(member)) {
-        useSet.addAll(usage.read());
-      }
-      if (!usage.isFullyInvoked) {
-        Iterable<CallStructure> callStructures =
-            _getInvocationCallStructures(member);
-        for (CallStructure callStructure in callStructures) {
-          useSet.addAll(usage.invoke(callStructure));
-          if (usage.isFullyInvoked) {
-            break;
+        if (!usage.hasWrite && hasInvokedSetter(member)) {
+          useSet.addAll(usage.write());
+        }
+        if (!dryRun) {
+          if (!usage.hasPendingNormalUse) {
+            _instanceMembersByName[memberName]?.remove(usage);
+          }
+          if (!usage.hasPendingClosurizationUse) {
+            _instanceFunctionsByName[memberName]?.remove(usage);
           }
         }
+        memberUsed(usage.entity, useSet);
       }
-      if (!usage.hasWrite && hasInvokedSetter(member)) {
-        useSet.addAll(usage.write());
+      if (dryRun && !original.dataEquals(usage)) {
+        _elementMap.reporter.internalError(member,
+            'Unenqueued usage of $member: before: $original, after: $usage');
       }
-      if (!usage.hasPendingNormalUse) {
-        _instanceMembersByName[memberName]?.remove(usage);
-      }
-      if (!usage.hasPendingClosurizationUse) {
-        _instanceFunctionsByName[memberName]?.remove(usage);
-      }
-      memberUsed(usage.entity, useSet);
     }
   }
 
-  /// Returns an iterable over all mixin applications that mixin [cls].
   @override
   Iterable<ClassEntity> allMixinUsesOf(ClassEntity cls) {
     Iterable<ClassEntity> uses = _classHierarchyBuilder.mixinUses[cls];
@@ -996,8 +1010,8 @@
     Map<ClassEntity, Set<ClassEntity>> typesImplementedBySubclasses =
         new Map<ClassEntity, Set<ClassEntity>>();
 
-    /// Updates the `isDirectlyInstantiated` and `isIndirectlyInstantiated`
-    /// properties of the [ClassHierarchyNode] for [cls].
+    // Updates the `isDirectlyInstantiated` and `isIndirectlyInstantiated`
+    // properties of the [ClassHierarchyNode] for [cls].
 
     void addSubtypes(ClassEntity cls, InstantiationInfo info) {
       if (!info.hasInstantiation) {
diff --git a/pkg/compiler/lib/src/universe/use.dart b/pkg/compiler/lib/src/universe/use.dart
index 6e19b31..c8984b2 100644
--- a/pkg/compiler/lib/src/universe/use.dart
+++ b/pkg/compiler/lib/src/universe/use.dart
@@ -233,6 +233,11 @@
       }
       sb.write(')');
     }
+    if (deferredImport != null) {
+      sb.write('{');
+      sb.write(deferredImport.name);
+      sb.write('}');
+    }
     return sb.toString();
   }
 
@@ -643,6 +648,7 @@
   TYPE_LITERAL,
   INSTANTIATION,
   NATIVE_INSTANTIATION,
+  CONST_INSTANTIATION,
   IMPLICIT_CAST,
   PARAMETER_CHECK,
   RTI_VALUE,
@@ -681,6 +687,9 @@
       case TypeUseKind.INSTANTIATION:
         sb.write('inst:');
         break;
+      case TypeUseKind.CONST_INSTANTIATION:
+        sb.write('const:');
+        break;
       case TypeUseKind.NATIVE_INSTANTIATION:
         sb.write('native:');
         break;
@@ -698,6 +707,11 @@
         break;
     }
     sb.write(type);
+    if (deferredImport != null) {
+      sb.write('{');
+      sb.write(deferredImport.name);
+      sb.write('}');
+    }
     return sb.toString();
   }
 
@@ -744,6 +758,13 @@
     return new TypeUse.internal(type, TypeUseKind.INSTANTIATION);
   }
 
+  /// [type] used in a constant instantiation, like `const T();`.
+  factory TypeUse.constInstantiation(
+      InterfaceType type, ImportEntity deferredImport) {
+    return new TypeUse.internal(
+        type, TypeUseKind.CONST_INSTANTIATION, deferredImport);
+  }
+
   /// [type] used in a native instantiation.
   factory TypeUse.nativeInstantiation(InterfaceType type) {
     return new TypeUse.internal(type, TypeUseKind.NATIVE_INSTANTIATION);
@@ -780,22 +801,11 @@
   String toString() => 'TypeUse($type,$kind)';
 }
 
-enum ConstantUseKind {
-  // A constant that is directly accessible in code.
-  DIRECT,
-  // A constant that is only accessible through other constants.
-  INDIRECT,
-}
-
 /// Use of a [ConstantValue].
 class ConstantUse {
   final ConstantValue value;
-  final ConstantUseKind kind;
-  @override
-  final int hashCode;
 
-  ConstantUse._(this.value, this.kind)
-      : this.hashCode = Hashing.objectHash(value, kind.hashCode);
+  ConstantUse._(this.value);
 
   /// Short textual representation use for testing.
   String get shortText {
@@ -803,25 +813,13 @@
   }
 
   /// Constant used as the initial value of a field.
-  ConstantUse.init(ConstantValue value) : this._(value, ConstantUseKind.DIRECT);
+  ConstantUse.init(ConstantValue value) : this._(value);
 
   /// Type constant used for registration of custom elements.
-  ConstantUse.customElements(TypeConstantValue value)
-      : this._(value, ConstantUseKind.DIRECT);
-
-  /// Constant used through mirrors.
-  // TODO(johnniwinther): Maybe if this is `DIRECT` and we can avoid the
-  // extra calls to `addCompileTimeConstantForEmission`.
-  ConstantUse.mirrors(ConstantValue value)
-      : this._(value, ConstantUseKind.INDIRECT);
-
-  /// Constant used for accessing type variables through mirrors.
-  ConstantUse.typeVariableMirror(ConstantValue value)
-      : this._(value, ConstantUseKind.DIRECT);
+  ConstantUse.customElements(TypeConstantValue value) : this._(value);
 
   /// Constant literal used on code.
-  ConstantUse.literal(ConstantValue value)
-      : this._(value, ConstantUseKind.DIRECT);
+  ConstantUse.literal(ConstantValue value) : this._(value);
 
   @override
   bool operator ==(other) {
@@ -831,5 +829,8 @@
   }
 
   @override
-  String toString() => 'ConstantUse(${value.toStructuredText()},$kind)';
+  int get hashCode => value.hashCode;
+
+  @override
+  String toString() => 'ConstantUse(${value.toStructuredText()})';
 }
diff --git a/pkg/compiler/lib/src/universe/world_builder.dart b/pkg/compiler/lib/src/universe/world_builder.dart
index 49d452d..a26e453 100644
--- a/pkg/compiler/lib/src/universe/world_builder.dart
+++ b/pkg/compiler/lib/src/universe/world_builder.dart
@@ -221,8 +221,8 @@
   /// All types that are checked either through is, as or checked mode checks.
   Iterable<DartType> get isChecks;
 
-  /// All directly instantiated types, that is, the types of the directly
-  /// instantiated classes.
+  /// All directly instantiated types, that is, the types of
+  /// [directlyInstantiatedClasses].
   // TODO(johnniwinther): Improve semantic precision.
   Iterable<InterfaceType> get instantiatedTypes;
 
diff --git a/pkg/compiler/lib/src/util/enumset.dart b/pkg/compiler/lib/src/util/enumset.dart
index 587b00064..4872be1 100644
--- a/pkg/compiler/lib/src/util/enumset.dart
+++ b/pkg/compiler/lib/src/util/enumset.dart
@@ -98,6 +98,9 @@
   /// Returns `true` if this set is not empty.
   bool get isNotEmpty => value != 0;
 
+  /// Returns a new mutable enum set that contains the values of this set.
+  EnumSet<E> clone() => new EnumSet<E>.fromValue(value);
+
   @override
   int get hashCode => value.hashCode * 19;
 
diff --git a/pkg/compiler/lib/src/util/util.dart b/pkg/compiler/lib/src/util/util.dart
index 3dfee4b..92be403 100644
--- a/pkg/compiler/lib/src/util/util.dart
+++ b/pkg/compiler/lib/src/util/util.dart
@@ -114,6 +114,16 @@
   return a.length == b.length && a.containsAll(b) && b.containsAll(a);
 }
 
+bool equalMaps<K, V>(Map<K, V> a, Map<K, V> b) {
+  if (identical(a, b)) return true;
+  if (a == null || b == null) return false;
+  if (a.length != b.length) return false;
+  for (K key in a.keys) {
+    if (a[key] != b[key]) return false;
+  }
+  return true;
+}
+
 /// File name prefix used to shorten the file name in stack traces printed by
 /// [trace].
 String stackTraceFilePrefix = null;
diff --git a/pkg/dev_compiler/lib/src/analyzer/code_generator.dart b/pkg/dev_compiler/lib/src/analyzer/code_generator.dart
index 6e08dfb..676be05 100644
--- a/pkg/dev_compiler/lib/src/analyzer/code_generator.dart
+++ b/pkg/dev_compiler/lib/src/analyzer/code_generator.dart
@@ -44,7 +44,7 @@
 import 'extension_types.dart' show ExtensionTypeSet;
 import 'js_interop.dart';
 import 'js_typerep.dart';
-import 'module_compiler.dart' show CompilerOptions, JSModuleFile;
+import 'module_compiler.dart' show CompilerOptions;
 import 'nullable_type_inference.dart' show NullableTypeInference;
 import 'property_model.dart';
 import 'reify_coercions.dart' show CoercionReifier;
@@ -70,8 +70,10 @@
     with
         UIAsCodeVisitorMixin<JS.Node>,
         NullableTypeInference,
-        SharedCompiler<LibraryElement, ClassElement>
-    implements AstVisitor<JS.Node> {
+        SharedCompiler<LibraryElement, ClassElement, InterfaceType,
+            FunctionBody>
+    implements
+        AstVisitor<JS.Node> {
   final SummaryDataStore summaryData;
 
   final CompilerOptions options;
@@ -82,16 +84,6 @@
 
   JSTypeRep jsTypeRep;
 
-  /// The set of libraries we are currently compiling, and the temporaries used
-  /// to refer to them.
-  ///
-  /// We sometimes special case codegen for a single library, as it simplifies
-  /// name scoping requirements.
-  final _libraries = Map<LibraryElement, JS.Identifier>();
-
-  /// Imported libraries, and the temporaries used to refer to them.
-  final _imports = Map<LibraryElement, JS.TemporaryId>();
-
   /// The list of dart:_runtime SDK functions; these are assumed by other code
   /// in the SDK to be generated before anything else.
   final _internalSdkFunctions = <JS.ModuleItem>[];
@@ -116,9 +108,6 @@
 
   final _initializingFormalTemps = HashMap<ParameterElement, JS.TemporaryId>();
 
-  JS.Identifier _extensionSymbolsModule;
-  final _extensionSymbols = Map<String, JS.TemporaryId>();
-
   /// The  type provider from the current Analysis [context].
   final TypeProvider types;
 
@@ -142,6 +131,7 @@
   final ClassElement objectClass;
   final ClassElement stringClass;
   final ClassElement functionClass;
+  final ClassElement internalSymbolClass;
   final ClassElement privateSymbolClass;
   final InterfaceType linkedHashMapImplType;
   final InterfaceType identityHashMapImplType;
@@ -183,8 +173,6 @@
 
   final _superHelpers = Map<String, JS.Method>();
 
-  List<TypeParameterType> _typeParamInConst;
-
   /// Whether we are currently generating code for the body of a `JS()` call.
   bool _isInForeignJS = false;
 
@@ -226,6 +214,7 @@
         objectClass = driver.getClass('dart:core', 'Object'),
         stringClass = driver.getClass('dart:core', 'String'),
         functionClass = driver.getClass('dart:core', 'Function'),
+        internalSymbolClass = driver.getClass('dart:_internal', 'Symbol'),
         privateSymbolClass =
             driver.getClass('dart:_js_helper', 'PrivateSymbol'),
         linkedHashMapImplType =
@@ -246,8 +235,18 @@
 
   LibraryElement get currentLibrary => _currentElement.library;
 
+  @override
   Uri get currentLibraryUri => _currentElement.librarySource.uri;
 
+  @override
+  FunctionBody get currentFunction => _currentFunction;
+
+  @override
+  InterfaceType get privateSymbolType => privateSymbolClass.type;
+
+  @override
+  InterfaceType get internalSymbolType => internalSymbolClass.type;
+
   CompilationUnitElement get _currentCompilationUnit {
     for (var e = _currentElement;; e = e.enclosingElement) {
       if (e is CompilationUnitElement) return e;
@@ -274,48 +273,17 @@
 
     // Transform the AST to make coercions explicit.
     compilationUnits = CoercionReifier.reify(compilationUnits);
-    var items = <JS.ModuleItem>[];
-    var root = JS.Identifier('_root');
-    items.add(js.statement('const # = Object.create(null)', [root]));
+    var libraries = compilationUnits
+        .where((unit) {
+          var library = unit.declaredElement.library;
+          return unit.declaredElement == library.definingCompilationUnit;
+        })
+        .map((unit) => unit.declaredElement.library)
+        .toList();
 
-    var isBuildingSdk = compilationUnits
-        .any((u) => isSdkInternalRuntime(u.declaredElement.library));
-    if (isBuildingSdk) {
-      // Don't allow these to be renamed when we're building the SDK.
-      // There is JS code in dart:* that depends on their names.
-      runtimeModule = JS.Identifier('dart');
-      _extensionSymbolsModule = JS.Identifier('dartx');
-    } else {
-      // Otherwise allow these to be renamed so users can write them.
-      runtimeModule = JS.TemporaryId('dart');
-      _extensionSymbolsModule = JS.TemporaryId('dartx');
-    }
+    var items = startModule(libraries);
     _typeTable = TypeTable(runtimeModule);
 
-    // Initialize our library variables.
-    var exports = <JS.NameSpecifier>[];
-    void emitLibrary(JS.Identifier id) {
-      items.add(js.statement('const # = Object.create(#)', [id, root]));
-      exports.add(JS.NameSpecifier(id));
-    }
-
-    for (var unit in compilationUnits) {
-      var library = unit.declaredElement.library;
-      if (unit.declaredElement != library.definingCompilationUnit) continue;
-
-      var libraryTemp = isSdkInternalRuntime(library)
-          ? runtimeModule
-          : JS.TemporaryId(jsLibraryName(_libraryRoot, library));
-      _libraries[library] = libraryTemp;
-      emitLibrary(libraryTemp);
-    }
-
-    // dart:_runtime has a magic module that holds extension method symbols.
-    // TODO(jmesserly): find a cleaner design for this.
-    if (isBuildingSdk) emitLibrary(_extensionSymbolsModule);
-
-    items.add(JS.ExportDeclaration(JS.ExportClause(exports)));
-
     // Collect all class/type Element -> Node mappings
     // in case we need to forward declare any classes.
     _declarationNodes = HashMap<TypeDefiningElement, AstNode>();
@@ -351,50 +319,15 @@
     // Visit directives (for exports)
     compilationUnits.forEach(_emitExportDirectives);
 
-    // Declare imports
-    _finishImports(items);
-    // Initialize extension symbols
-    _extensionSymbols.forEach((name, id) {
-      JS.Expression value =
-          JS.PropertyAccess(_extensionSymbolsModule, _propertyName(name));
-      if (isBuildingSdk) {
-        value = js.call('# = Symbol(#)', [value, js.string("dartx.$name")]);
-      }
-      items.add(js.statement('const # = #;', [id, value]));
-    });
-
-    _emitDebuggerExtensionInfo(options.moduleName);
+    // Declare imports and extension symbols
+    emitImportsAndExtensionSymbols(items);
 
     // Discharge the type table cache variables and
     // hoisted definitions.
     items.addAll(_typeTable.discharge());
     items.addAll(_internalSdkFunctions);
 
-    // Add the module's code (produced by visiting compilation units, above)
-    _copyAndFlattenBlocks(items, moduleItems);
-
-    // Build the module.
-    return JS.Program(items, name: options.moduleName);
-  }
-
-  void _emitDebuggerExtensionInfo(String name) {
-    var properties = <JS.Property>[];
-    _libraries.forEach((library, value) {
-      // TODO(jacobr): we could specify a short library name instead of the
-      // full library uri if we wanted to save space.
-      properties.add(JS.Property(
-          js.escapedString(jsLibraryDebuggerName(_libraryRoot, library)),
-          value));
-    });
-
-    // Track the module name for each library in the module.
-    // This data is only required for debugging.
-    moduleItems.add(js
-        .statement('#.trackLibraries(#, #, ${JSModuleFile.sourceMapHoleID});', [
-      runtimeModule,
-      js.string(name),
-      JS.ObjectInitializer(properties, multiline: true)
-    ]));
+    return finishModule(items, options.moduleName);
   }
 
   /// If [e] is a property accessor element, this returns the
@@ -453,7 +386,21 @@
     return access;
   }
 
-  JS.Expression _emitJSInteropStaticMemberName(Element e) {
+  /// If the element [e] uses JS interop, this returns the string containing the
+  /// JS member's name, otherwise returns null.
+  ///
+  /// The member name is specified by the parameter to the `@JS()` annotation,
+  /// defaulting to the member's name in Dart, for example:
+  ///
+  ///     @JS('foo')
+  ///     external static bar(); // JS name is "foo"
+  ///
+  ///     @JS()
+  ///     external static bar(); // JS name is "bar"
+  ///
+  ///     static bar() { /* ... */ } // not a JS member; JS name is null
+  ///
+  String _getJSInteropStaticMemberName(Element e) {
     if (!_usesJSInterop(e)) return null;
     var name = getAnnotationName(e, isPublicJSAnnotation);
     if (name != null) {
@@ -465,25 +412,57 @@
     } else {
       name = _getElementName(e);
     }
-    return js.escapedString(name, "'");
+    return name;
   }
 
-  /// Flattens blocks in [items] to a single list.
+  /// Choose a canonical name from the [library] element.
   ///
-  /// This will not flatten blocks that are marked as being scopes.
-  void _copyAndFlattenBlocks(
-      List<JS.ModuleItem> result, Iterable<JS.ModuleItem> items) {
-    for (var item in items) {
-      if (item is JS.Block && !item.isScope) {
-        _copyAndFlattenBlocks(result, item.statements);
-      } else if (item != null) {
-        result.add(item);
-      }
+  /// This never uses the library's name (the identifier in the `library`
+  /// declaration) as it doesn't have any meaningful rules enforced.
+  @override
+  String jsLibraryName(LibraryElement library) {
+    var uri = library.source.uri;
+    if (uri.scheme == 'dart') {
+      return uri.path;
     }
+    // TODO(vsm): This is not necessarily unique if '__' appears in a file name.
+    var encodedSeparator = '__';
+    String qualifiedPath;
+    if (uri.scheme == 'package') {
+      // Strip the package name.
+      // TODO(vsm): This is not unique if an escaped '/'appears in a filename.
+      // E.g., "foo/bar.dart" and "foo$47bar.dart" would collide.
+      qualifiedPath = uri.pathSegments.skip(1).join(encodedSeparator);
+    } else {
+      qualifiedPath = path
+          .relative(uri.toFilePath(), from: _libraryRoot)
+          .replaceAll(path.separator, encodedSeparator)
+          .replaceAll('..', encodedSeparator);
+    }
+    return pathToJSIdentifier(qualifiedPath);
   }
 
-  String _libraryToModule(LibraryElement library) {
-    assert(!_libraries.containsKey(library));
+  /// Debugger friendly name for a Dart Library.
+  @override
+  String jsLibraryDebuggerName(LibraryElement library) {
+    var uri = library.source.uri;
+    // For package: and dart: uris show the entire
+    if (uri.scheme == 'dart' || uri.scheme == 'package') return uri.toString();
+
+    var filePath = uri.toFilePath();
+    // Relative path to the library.
+    return path.relative(filePath, from: _libraryRoot);
+  }
+
+  /// Returns true if the library [l] is dart:_runtime.
+  @override
+  bool isSdkInternalRuntime(LibraryElement l) {
+    var uri = l.source.uri;
+    return uri.scheme == 'dart' && uri.path == '_runtime';
+  }
+
+  @override
+  String libraryToModule(LibraryElement library) {
     var source = library.source;
     // TODO(jmesserly): we need to split out HTML.
     if (source.uri.scheme == 'dart') {
@@ -498,39 +477,6 @@
     return moduleName;
   }
 
-  void _finishImports(List<JS.ModuleItem> items) {
-    var modules = Map<String, List<LibraryElement>>();
-
-    for (var import in _imports.keys) {
-      modules.putIfAbsent(_libraryToModule(import), () => []).add(import);
-    }
-
-    String coreModuleName;
-    if (!_libraries.containsKey(coreLibrary)) {
-      coreModuleName = _libraryToModule(coreLibrary);
-    }
-    modules.forEach((module, libraries) {
-      // Generate import directives.
-      //
-      // Our import variables are temps and can get renamed. Since our renaming
-      // is integrated into js_ast, it is aware of this possibility and will
-      // generate an "as" if needed. For example:
-      //
-      //     import {foo} from 'foo';         // if no rename needed
-      //     import {foo as foo$} from 'foo'; // if rename was needed
-      //
-      var imports =
-          libraries.map((l) => JS.NameSpecifier(_imports[l])).toList();
-      if (module == coreModuleName) {
-        imports.add(JS.NameSpecifier(runtimeModule));
-        imports.add(JS.NameSpecifier(_extensionSymbolsModule));
-      }
-
-      items.add(JS.ImportDeclaration(
-          namedImports: imports, from: js.string(module, "'")));
-    });
-  }
-
   /// Called to emit class declarations.
   ///
   /// During the course of emitting one item, we may emit another. For example
@@ -1480,7 +1426,7 @@
       // Dart does not use ES6 constructors.
       // Add an error to catch any invalid usage.
       jsMethods
-          .add(JS.Method(_propertyName('constructor'), js.fun(r'''function() {
+          .add(JS.Method(propertyName('constructor'), js.fun(r'''function() {
                   throw Error("use `new " + #.typeName(#.getReifiedType(this)) +
                       ".new(...)` to create a Dart object");
               }''', [runtimeModule, runtimeModule])));
@@ -1587,7 +1533,7 @@
           if (param.kind == ParameterKind.NAMED) {
             foundNamedParams = true;
 
-            var name = _propertyName(param.name);
+            var name = propertyName(param.name);
             body.add(js.statement('if (# in #) #;', [
               name,
               namedArgumentTemp,
@@ -1717,7 +1663,7 @@
       // Sort the names to match dart2js order.
       var sortedNames = (namedParameterTypes.keys.toList())..sort();
       var named = sortedNames
-          .map((n) => JS.Property(_propertyName(n), JS.Identifier(n)));
+          .map((n) => JS.Property(propertyName(n), JS.Identifier(n)));
       addProperty('namedArguments', JS.ObjectInitializer(named.toList()));
       positionalArgs.removeLast();
     }
@@ -1863,7 +1809,7 @@
       return _emitInstanceCreationExpression(
           element,
           element.returnType as InterfaceType,
-          () => _emitArgumentList(node.arguments),
+          _emitArgumentList(node.arguments),
           isConst: true);
     } else {
       return _visitExpression(node.name);
@@ -1991,7 +1937,7 @@
       // Emit enum static fields
       var type = classElem.type;
       void addField(FieldElement e, JS.Expression value) {
-        body.add(defineValueOnClass(classElem, _emitStaticClassName(classElem),
+        body.add(defineValueOnClass(classElem, _emitStaticClassName(e),
                 _declareMemberName(e.getter), value)
             .toStatement());
       }
@@ -2002,9 +1948,9 @@
         if (f.type != type) continue;
         // static const E id_i = const E(i);
         values.add(JS.PropertyAccess(
-            _emitStaticClassName(classElem), _declareMemberName(f.getter)));
+            _emitStaticClassName(f), _declareMemberName(f.getter)));
         var enumValue = runtimeCall('const(new (#.#)(#))', [
-          _emitConstructorAccess(type),
+          emitConstructorAccess(type),
           _constructorName(''),
           js.number(index++)
         ]);
@@ -2016,11 +1962,14 @@
     }
 
     var lazyStatics = classElem.fields
-        .where((f) => f.isStatic && !f.isSynthetic)
+        .where((f) => f.isStatic && !f.isSynthetic && !_isExternal(f))
         .map((f) => members[f] as VariableDeclaration)
         .toList();
     if (lazyStatics.isNotEmpty) {
-      body.add(_emitLazyFields(_emitStaticClassName(classElem), lazyStatics,
+      // Because we filtered out external fields, we don't need to use
+      // `_emitStaticClassName` here as we normally would.
+      _declareBeforeUse(classElem);
+      body.add(_emitLazyFields(_emitTopLevelName(classElem), lazyStatics,
           (e) => _emitStaticMemberName(e.name, e)));
     }
   }
@@ -2056,7 +2005,7 @@
       if (extensions.isEmpty) return;
 
       var names = extensions
-          .map((e) => _propertyName(JS.memberNameForDartMember(e)))
+          .map((e) => propertyName(JS.memberNameForDartMember(e)))
           .toList();
       body.add(js.statement('#.#(#, #);', [
         runtimeModule,
@@ -2090,7 +2039,7 @@
         var proto = classElem.type.isObject
             ? js.call('Object.create(null)')
             : runtimeCall('get${name}s(#.__proto__)', [className]);
-        elements.insert(0, JS.Property(_propertyName('__proto__'), proto));
+        elements.insert(0, JS.Property(propertyName('__proto__'), proto));
       }
       body.add(runtimeStatement('set${name}Signature(#, () => #)', [
         className,
@@ -2304,7 +2253,7 @@
   JS.Expression _constructorName(String name) {
     if (name == '') {
       // Default constructors (factory or not) use `new` as their name.
-      return _propertyName('new');
+      return propertyName('new');
     }
     return _emitStaticMemberName(name);
   }
@@ -2689,7 +2638,7 @@
   JS.Method _emitTopLevelProperty(FunctionDeclaration node) {
     var name = node.name.name;
     return JS.Method(
-        _propertyName(name), _emitFunctionExpression(node.functionExpression),
+        propertyName(name), _emitFunctionExpression(node.functionExpression),
         isGetter: node.isGetter, isSetter: node.isSetter)
       ..sourceInformation = _functionEnd(node);
   }
@@ -2861,7 +2810,7 @@
       t = covariantParams.lookup(t) as TypeParameterElement;
       if (t != null) {
         body.add(runtimeStatement('checkTypeBound(#, #, #)',
-            [_emitType(t.type), _emitType(t.bound), _propertyName(t.name)]));
+            [_emitType(t.type), _emitType(t.bound), propertyName(t.name)]));
       }
     }
   }
@@ -2895,7 +2844,7 @@
             genFn);
       }
       gen.sourceInformation = _functionEnd(body);
-      if (JS.This.foundIn(gen)) gen = js.call('#.bind(this)', gen);
+      if (usesThisOrSuper(gen)) gen = js.call('#.bind(this)', gen);
 
       _superAllowed = savedSuperAllowed;
       _asyncStarController = savedController;
@@ -2973,14 +2922,9 @@
     }
 
     var fn = _emitFunctionExpression(func.functionExpression);
-
     var name = _emitVariableDef(func.name);
     JS.Statement declareFn;
-    if (JS.This.foundIn(fn)) {
-      declareFn = js.statement('const # = #.bind(this);', [name, fn]);
-    } else {
-      declareFn = JS.FunctionDeclaration(name, fn);
-    }
+    declareFn = toBoundFunctionStatement(fn, name);
     var element = func.declaredElement;
     if (_reifyFunctionType(element)) {
       declareFn = JS.Block(
@@ -3097,28 +3041,9 @@
     var member = _emitMemberName(element.name,
         isStatic: isStatic, type: type, element: accessor);
 
-    // A static native element should just forward directly to the
-    // JS type's member.
-    //
-    // TODO(jmesserly): this code path seems broken. It doesn't exist
-    // elsewhere, such as [_emitAccess], so it will only take affect for
-    // unqualified static access inside of the the same class.
-    //
-    // If we want this feature to work, we'll need to implement it in the
-    // standard [_emitStaticClassName] code path, which will need to know the
-    // member we're calling so it can determine whether to use the Dart class
-    // name or the native JS class name.
-    if (isStatic && _isExternal(element)) {
-      var nativeName = _extensionTypes.getNativePeers(classElem);
-      if (nativeName.isNotEmpty) {
-        var memberName = getAnnotationName(element, isJSName) ?? member;
-        return runtimeCall('global.#.#', [nativeName[0], memberName]);
-      }
-    }
-
     // For instance members, we add implicit-this.
     // For method tear-offs, we ensure it's a bound method.
-    var target = isStatic ? _emitStaticClassName(classElem) : JS.This();
+    var target = isStatic ? _emitStaticClassName(element) : JS.This();
     if (element is MethodElement && _reifyTearoff(element, node)) {
       if (isStatic) {
         // TODO(jmesserly): we could tag static/top-level function types once
@@ -3220,7 +3145,7 @@
       {bool cacheType = true}) {
     var properties = <JS.Property>[];
     types.forEach((name, type) {
-      var key = _propertyName(name);
+      var key = propertyName(name);
       var value = _emitType(type, cacheType: cacheType);
       properties.add(JS.Property(key, value));
     });
@@ -3295,14 +3220,29 @@
     return _emitAnnotatedResult(result, metadata);
   }
 
-  /// Emits an expression that lets you access statics on a [type] from code.
-  JS.Expression _emitConstructorAccess(DartType type) {
+  @override
+  JS.Expression emitConstructorAccess(DartType type) {
     return _emitJSInterop(type.element) ?? _emitType(type);
   }
 
-  /// Emits an expression that lets you access statics on an [c] from code.
-  JS.Expression _emitStaticClassName(ClassElement c) {
+  /// Emits an expression referring to the class of static [member].
+  ///
+  /// Typically this is equivalent to [_declareBeforeUse] followed by
+  /// [_emitTopLevelName] on the class, but if the member is external, then the
+  /// native class name will be used, for direct access to the native member.
+  JS.Expression _emitStaticClassName(ClassMemberElement member) {
+    var c = member.enclosingElement;
     _declareBeforeUse(c);
+
+    // A static native element should just forward directly to the JS type's
+    // member, for example `Css.supports(...)` in dart:html should be replaced
+    // by a direct call to the DOM API: `global.CSS.supports`.
+    if (_isExternal(member)) {
+      var nativeName = _extensionTypes.getNativePeers(c);
+      if (nativeName.isNotEmpty) {
+        return runtimeCall('global.#', nativeName[0]);
+      }
+    }
     return _emitTopLevelName(c);
   }
 
@@ -3348,7 +3288,6 @@
 
     var name = type.name;
     if (type is TypeParameterType) {
-      _typeParamInConst?.add(type);
       return JS.Identifier(name);
     }
 
@@ -3397,7 +3336,7 @@
   /// function does not handle JS interop.
   JS.Expression _emitTopLevelMemberName(Element e, {String suffix = ''}) {
     var name = getJSExportName(e) ?? _getElementName(e);
-    return _propertyName(name + suffix);
+    return propertyName(name + suffix);
   }
 
   @override
@@ -3587,7 +3526,7 @@
     var member = _emitMemberName(field.name,
         isStatic: isStatic, type: classElem.type, element: field.setter);
     jsTarget = isStatic
-        ? (JS.PropertyAccess(_emitStaticClassName(classElem), member)
+        ? (JS.PropertyAccess(_emitStaticClassName(field), member)
           ..sourceInformation = _nodeSpan(id))
         : _emitTargetAccess(jsTarget, member, field.setter, id);
     return _visitExpression(right).toAssignExpression(jsTarget);
@@ -3662,7 +3601,7 @@
         }
       }
       if (e.name == 'extensionSymbol' && firstArg is StringLiteral) {
-        return _getExtensionSymbolInternal(firstArg.stringValue);
+        return getExtensionSymbolInternal(firstArg.stringValue);
       }
     }
 
@@ -3683,18 +3622,18 @@
   JS.Expression _emitTarget(Expression target, Element member, bool isStatic) {
     if (isStatic) {
       if (member is ConstructorElement) {
-        return _emitConstructorAccess(member.enclosingElement.type)
+        return emitConstructorAccess(member.enclosingElement.type)
           ..sourceInformation = _nodeSpan(target);
       }
       if (member is PropertyAccessorElement) {
         var field = member.variable;
         if (field is FieldElement) {
-          return _emitStaticClassName(field.enclosingElement)
+          return _emitStaticClassName(field)
             ..sourceInformation = _nodeSpan(target);
         }
       }
       if (member is MethodElement) {
-        return _emitStaticClassName(member.enclosingElement)
+        return _emitStaticClassName(member)
           ..sourceInformation = _nodeSpan(target);
       }
     }
@@ -4101,7 +4040,7 @@
   JS.Property visitNamedExpression(NamedExpression node) {
     assert(node.parent is ArgumentList);
     return JS.Property(
-        _propertyName(node.name.label.name), _visitExpression(node.expression));
+        propertyName(node.name.label.name), _visitExpression(node.expression));
   }
 
   List<JS.Parameter> _emitParametersForElement(ExecutableElement member) {
@@ -4351,7 +4290,7 @@
 
   JS.Expression _emitConstructorName(DartType type, String name) {
     return _emitJSInterop(type.element) ??
-        JS.PropertyAccess(_emitConstructorAccess(type), _constructorName(name));
+        JS.PropertyAccess(emitConstructorAccess(type), _constructorName(name));
   }
 
   @override
@@ -4359,8 +4298,8 @@
     return _emitConstructorName(node.type.type, node.staticElement.name);
   }
 
-  JS.Expression _emitInstanceCreationExpression(ConstructorElement element,
-      InterfaceType type, List<JS.Expression> Function() emitArguments,
+  JS.Expression _emitInstanceCreationExpression(
+      ConstructorElement element, InterfaceType type, List<JS.Expression> args,
       {bool isConst = false, ConstructorName ctorNode}) {
     if (element == null) {
       return _throwUnsafe('unresolved constructor: ${type?.name ?? '<null>'}'
@@ -4369,13 +4308,11 @@
 
     var classElem = type.element;
     if (_isObjectLiteral(classElem)) {
-      var args = emitArguments();
       return args.isEmpty ? js.call('{}') : args.single as JS.ObjectInitializer;
     }
 
-    var name = element.name;
     JS.Expression emitNew() {
-      var args = emitArguments();
+      var name = element.name;
       if (args.isEmpty && classElem.source.isInSystemLibrary) {
         // Skip the slow SDK factory constructors when possible.
         switch (classElem.name) {
@@ -4414,7 +4351,8 @@
           : JS.New(ctor, args);
     }
 
-    return isConst ? _emitConst(emitNew) : emitNew();
+    var result = emitNew();
+    return isConst ? canonicalizeConstObject(result) : result;
   }
 
   bool _isObjectLiteral(Element classElem) {
@@ -4468,25 +4406,23 @@
       return js.escapedString(stringValue);
     }
     if (type == types.symbolType) {
-      return _emitDartSymbol(value.toSymbolValue());
+      return emitDartSymbol(value.toSymbolValue());
     }
     if (type == types.typeType) {
       return _emitType(value.toTypeValue());
     }
     if (type is InterfaceType) {
       if (type.element == types.listType.element) {
-        return _cacheConst(() => _emitConstList(type.typeArguments[0],
-            value.toListValue().map(_emitDartObject).toList()));
+        return _emitConstList(type.typeArguments[0],
+            value.toListValue().map(_emitDartObject).toList());
       }
       if (type.element == types.mapType.element) {
-        return _cacheConst(() {
-          var entries = <JS.Expression>[];
-          value.toMapValue().forEach((key, value) {
-            entries.add(_emitDartObject(key));
-            entries.add(_emitDartObject(value));
-          });
-          return _emitConstMap(type, entries);
+        var entries = <JS.Expression>[];
+        value.toMapValue().forEach((key, value) {
+          entries.add(_emitDartObject(key));
+          entries.add(_emitDartObject(value));
         });
+        return _emitConstMap(type, entries);
       }
       if (value is DartObjectImpl && value.isUserDefinedObject) {
         var ctor = value.getInvocation();
@@ -4502,15 +4438,14 @@
               classElem.fields.where((f) => f.type == type).elementAt(index);
           return _emitClassMemberElement(field, field.getter, null);
         }
-        return _emitInstanceCreationExpression(ctor.constructor, type, () {
-          var args = ctor.positionalArguments.map(_emitDartObject).toList();
-          var named = <JS.Property>[];
-          ctor.namedArguments.forEach((name, value) {
-            named.add(JS.Property(_propertyName(name), _emitDartObject(value)));
-          });
-          if (named.isNotEmpty) args.add(JS.ObjectInitializer(named));
-          return args;
-        }, isConst: true);
+        var args = ctor.positionalArguments.map(_emitDartObject).toList();
+        var named = <JS.Property>[];
+        ctor.namedArguments.forEach((name, value) {
+          named.add(JS.Property(propertyName(name), _emitDartObject(value)));
+        });
+        if (named.isNotEmpty) args.add(JS.ObjectInitializer(named));
+        return _emitInstanceCreationExpression(ctor.constructor, type, args,
+            isConst: true);
       }
     }
     if (value is DartObjectImpl && type is FunctionType) {
@@ -4557,7 +4492,7 @@
     return _emitInstanceCreationExpression(
         element,
         getType(constructor.type) as InterfaceType,
-        () => _emitArgumentList(node.argumentList),
+        _emitArgumentList(node.argumentList),
         isConst: node.isConst,
         ctorNode: constructor);
   }
@@ -4954,28 +4889,6 @@
     return id;
   }
 
-  JS.Expression _cacheConst(JS.Expression expr()) {
-    var savedTypeParams = _typeParamInConst;
-    _typeParamInConst = [];
-
-    var jsExpr = expr();
-
-    bool usesTypeParams = _typeParamInConst.isNotEmpty;
-    _typeParamInConst = savedTypeParams;
-
-    // TODO(jmesserly): if it uses type params we can still hoist it up as far
-    // as it will go, e.g. at the level the generic class is defined where type
-    // params are available.
-    if (_currentFunction == null || usesTypeParams) return jsExpr;
-
-    var temp = JS.TemporaryId('const');
-    moduleItems.add(js.statement('let #;', [temp]));
-    return js.call('# || (# = #)', [temp, temp, jsExpr]);
-  }
-
-  JS.Expression _emitConst(JS.Expression expr()) =>
-      _cacheConst(() => runtimeCall('const(#)', expr()));
-
   /// Returns a new expression, which can be be used safely *once* on the
   /// left hand side, and *once* on the right side of an assignment.
   /// For example: `expr1[expr2] += y` can be compiled as
@@ -5437,11 +5350,7 @@
     return JS.Do(_visitScope(node.body), _visitTest(node.condition));
   }
 
-  JS.Statement _emitAwaitFor(
-      SimpleIdentifier identifier,
-      DeclaredIdentifier loopVariable,
-      Expression iterable,
-      JS.Statement jsBody) {
+  JS.Statement _emitAwaitFor(ForEachParts forParts, JS.Statement jsBody) {
     // Emits `await for (var value in stream) ...`, which desugars as:
     //
     // let iter = new StreamIterator(stream);
@@ -5464,14 +5373,19 @@
     var createStreamIter = _emitInstanceCreationExpression(
         streamIterator.element.unnamedConstructor,
         streamIterator,
-        () => [_visitExpression(iterable)]);
+        [_visitExpression(forParts.iterable)]);
     var iter = JS.TemporaryId('iter');
-    var variable = identifier ?? loopVariable.identifier;
-    var init = _visitExpression(identifier);
-    if (init == null) {
+    SimpleIdentifier variable;
+    JS.Expression init;
+    if (forParts is ForEachPartsWithIdentifier) {
+      variable = forParts.identifier;
+      init = js
+          .call('# = #.current', [_visitExpression(forParts.identifier), iter]);
+    } else if (forParts is ForEachPartsWithDeclaration) {
+      variable = forParts.loopVariable.identifier;
       init = js.call('let # = #.current', [_emitVariableDef(variable), iter]);
     } else {
-      init = js.call('# = #.current', [init, iter]);
+      throw new StateError('Unrecognized for loop parts');
     }
     return js.statement(
         '{'
@@ -5701,51 +5615,31 @@
 
   @override
   visitSymbolLiteral(SymbolLiteral node) {
-    return _emitConst(() => _emitDartSymbol(node.components.join('.')));
-  }
-
-  JS.Expression _emitDartSymbol(String name) {
-    // TODO(vsm): Handle qualified symbols correctly.
-    var last = name.substring(name.lastIndexOf('.') + 1);
-    var jsName = js.string(name, "'");
-    if (last.startsWith('_')) {
-      var nativeSymbol = emitPrivateNameSymbol(currentLibrary, last);
-      return js.call('new #.new(#, #)', [
-        _emitConstructorAccess(privateSymbolClass.type),
-        jsName,
-        nativeSymbol
-      ]);
-    } else {
-      return js
-          .call('#.new(#)', [_emitConstructorAccess(types.symbolType), jsName]);
-    }
+    return emitDartSymbol(node.components.join('.'));
   }
 
   @override
   JS.Expression visitListLiteral(ListLiteral node) {
     var elementType = (node.staticType as InterfaceType).typeArguments[0];
-    var elements = _visitCollectionElementList(node.elements2, elementType);
+    var elements = _visitCollectionElementList(node.elements, elementType);
     if (!node.isConst) {
       return _emitList(elementType, elements);
     }
-
-    return _cacheConst(() => _emitConstList(elementType, elements));
+    return _emitConstList(elementType, elements);
   }
 
-  // TODO(nshahan) Cleanup after control flow collections experiments are removed.
-  JS.Expression _emitSetLiteral(
-      Iterable<CollectionElement> elements, SetOrMapLiteral node) {
+  JS.Expression _emitSetLiteral(SetOrMapLiteral node) {
     var type = node.staticType as InterfaceType;
     var elementType = type.typeArguments[0];
-    var jsElements = _visitCollectionElementList(elements, elementType);
+    var jsElements = _visitCollectionElementList(node.elements, elementType);
     if (!node.isConst) {
       var setType = _emitType(type);
-      if (elements.isEmpty) {
+      if (node.elements.isEmpty) {
         return js.call('#.new()', [setType]);
       }
       return js.call('#.from([#])', [setType, jsElements]);
     }
-    return _cacheConst(() =>
+    return cacheConst(
         runtimeCall('constSet(#, [#])', [_emitType(elementType), jsElements]));
   }
 
@@ -5753,7 +5647,8 @@
       DartType elementType, List<JS.Expression> elements) {
     // dart.constList helper internally depends on _interceptors.JSArray.
     _declareBeforeUse(_jsArray);
-    return runtimeCall('constList([#], #)', [elements, _emitType(elementType)]);
+    return cacheConst(
+        runtimeCall('constList([#], #)', [elements, _emitType(elementType)]));
   }
 
   JS.Expression _emitList(DartType itemType, List<JS.Expression> items) {
@@ -5769,25 +5664,24 @@
     return js.call('#.of(#)', [_emitType(arrayType), list]);
   }
 
-  JS.Expression _emitMapLiteral(
-      Iterable<CollectionElement> elements, SetOrMapLiteral node) {
+  JS.Expression _emitMapLiteral(SetOrMapLiteral node) {
     var type = node.staticType as InterfaceType;
     var elementType = type.typeArguments[0];
-    var jsElements = _visitCollectionElementList(elements, elementType);
+    var jsElements = _visitCollectionElementList(node.elements, elementType);
     if (!node.isConst) {
       var mapType = _emitMapImplType(type);
-      if (elements.isEmpty) {
+      if (node.elements.isEmpty) {
         return js.call('new #.new()', [mapType]);
       }
       return js.call('new #.from([#])', [mapType, jsElements]);
     }
-    return _cacheConst(() => _emitConstMap(type, jsElements));
+    return _emitConstMap(type, jsElements);
   }
 
   JS.Expression _emitConstMap(InterfaceType type, List<JS.Expression> entries) {
     var typeArgs = type.typeArguments;
-    return runtimeCall('constMap(#, #, [#])',
-        [_emitType(typeArgs[0]), _emitType(typeArgs[1]), entries]);
+    return cacheConst(runtimeCall('constMap(#, #, [#])',
+        [_emitType(typeArgs[0]), _emitType(typeArgs[1]), entries]));
   }
 
   JS.Expression _emitMapImplType(InterfaceType type, {bool identity}) {
@@ -5892,13 +5786,32 @@
   ///     })(), 10]
   List<JS.Expression> _visitCollectionElementList(
       Iterable<CollectionElement> nodes, DartType elementType) {
+    /// Returns [body] wrapped in a function and a call.
+    ///
+    /// Alternatively if [body] contains a yield, will wrap body in a gerarator
+    /// fucntion, call it, and yield the result of [yieldType].
+    /// TODO(nshahan) Move to share between compilers. Need to work out a common
+    /// emitLibraryName().
+    JS.Expression detectYieldAndCall(
+        JS.Statement body, InterfaceType yieldType) {
+      var finder = YieldFinder();
+      body.accept(finder);
+      if (finder.hasYield) {
+        var genFn = JS.Fun([], body, isGenerator: true);
+        var asyncLibrary = emitLibraryName(types.futureType.element.library);
+        return JS.Yield(js.call(
+            '#.async(#, #)', [asyncLibrary, _emitType(yieldType), genFn]));
+      }
+      return JS.Call(JS.ArrowFun([], body), []);
+    }
+
     var expressions = <JS.Expression>[];
     for (var node in nodes) {
       if (_isUiAsCodeElement(node)) {
         // Create a temporary variable to build a new collection from.
         var previousCollectionVariable = _currentCollectionVariable;
-        var temporaryIdentifier =
-            _createTemporary('items', _jsArray.type.instantiate([elementType]));
+        var arrayType = _jsArray.type.instantiate([elementType]);
+        var temporaryIdentifier = _createTemporary('items', arrayType);
         _currentCollectionVariable = _emitSimpleIdentifier(temporaryIdentifier);
         var items = js.statement('let # = #',
             [_currentCollectionVariable, _emitList(elementType, [])]);
@@ -5910,7 +5823,7 @@
           node.accept<JS.Node>(this),
           JS.Return(_currentCollectionVariable)
         ]);
-        var functionCall = JS.Call(JS.ArrowFun([], functionBody), []);
+        var functionCall = detectYieldAndCall(functionBody, arrayType);
 
         // Finally, spread the temporary control-flow-collections list.
         expressions.add(JS.Spread(functionCall));
@@ -6131,11 +6044,11 @@
       var runtimeName = getJSExportName(element);
       if (runtimeName != null) {
         var parts = runtimeName.split('.');
-        if (parts.length < 2) return _propertyName(runtimeName);
+        if (parts.length < 2) return propertyName(runtimeName);
 
         JS.Expression result = JS.Identifier(parts[0]);
         for (int i = 1; i < parts.length; i++) {
-          result = JS.PropertyAccess(result, _propertyName(parts[i]));
+          result = JS.PropertyAccess(result, propertyName(parts[i]));
         }
         return result;
       }
@@ -6150,15 +6063,22 @@
     // actually try to access those JS members via interop.
     name = JS.memberNameForDartMember(name, _isExternal(element));
     if (useExtension) {
-      return _getExtensionSymbolInternal(name);
+      return getExtensionSymbolInternal(name);
     }
-    return _propertyName(name);
+    return propertyName(name);
   }
 
+  /// Emits the name of a static member, suitable for use in a JS property
+  /// access when combined with [_emitStaticClassName].
+  ///
+  /// The member [name] should be passed, as well as its [element] when it's
+  /// available. If the element is `external`, the element is used to statically
+  /// resolve the JS interop/dart:html static member. Otherwise it is ignored.
   JS.Expression _emitStaticMemberName(String name, [Element element]) {
-    if (element != null) {
-      var jsName = _emitJSInteropStaticMemberName(element);
-      if (jsName != null) return jsName;
+    if (element != null && _isExternal(element)) {
+      var newName = getAnnotationName(element, isJSName) ??
+          _getJSInteropStaticMemberName(element);
+      if (newName != null) return js.escapedString(newName, "'");
     }
 
     switch (name) {
@@ -6184,20 +6104,7 @@
           name += '_';
         }
     }
-    return _propertyName(name);
-  }
-
-  /// This is an internal method used by [_emitMemberName] and the
-  /// optimized `dart:_runtime extensionSymbol` builtin to get the symbol
-  /// for `dartx.<name>`.
-  ///
-  /// Do not call this directly; you want [_emitMemberName], which knows how to
-  /// handle the many details involved in naming.
-  JS.TemporaryId _getExtensionSymbolInternal(String name) {
-    return _extensionSymbols.putIfAbsent(
-        name,
-        () => JS.TemporaryId(
-            '\$${JS.friendlyNameForDartOperator[name] ?? name}'));
+    return propertyName(name);
   }
 
   var _forwardingCache = HashMap<Element, Map<String, Element>>();
@@ -6264,14 +6171,6 @@
     return false;
   }
 
-  /// Returns the canonical name to refer to the Dart library.
-  JS.Identifier emitLibraryName(LibraryElement library) {
-    // It's either one of the libraries in this module, or it's an import.
-    return _libraries[library] ??
-        _imports.putIfAbsent(library,
-            () => JS.TemporaryId(jsLibraryName(_libraryRoot, library)));
-  }
-
   /// Return true if this is one of the methods/properties on all Dart Objects
   /// (toString, hashCode, noSuchMethod, runtimeType, ==).
   bool isObjectMember(String name) {
@@ -6388,7 +6287,7 @@
   @override
   visitRedirectingConstructorInvocation(node) => _unreachable(node);
 
-  /// Unused. Handled in [visitForStatement2].
+  /// Unused. Handled in [visitForStatement].
   @override
   visitDeclaredIdentifier(node) => _unreachable(node);
 
@@ -6492,35 +6391,33 @@
   @override
   visitWithClause(node) => _unreachable(node);
 
-  // TODO(nshahan) Simplify when control-flow-collections experiments are removed.
-  // Should just accept a ForParts as an arg with fewer casts.
-  JS.For _emitFor(Expression initialization, VariableDeclarationList variables,
-      Expression condition, Iterable<Expression> updaters, JS.Statement body) {
-    var init = _visitExpression(initialization) ??
-        visitVariableDeclarationList(variables);
-    JS.Expression update;
-    if (updaters != null && updaters.isNotEmpty) {
-      update =
-          JS.Expression.binary(updaters.map(_visitExpression).toList(), ',')
-              .toVoidExpression();
+  JS.For _emitFor(ForParts forParts, JS.Statement body) {
+    JS.Expression init;
+    if (forParts is ForPartsWithExpression)
+      init = _visitExpression(forParts.initialization);
+    else if (forParts is ForPartsWithDeclarations) {
+      init = visitVariableDeclarationList(forParts.variables);
+    } else {
+      throw new StateError('Unrecognized for loop parts');
     }
-
-    return JS.For(init, _visitTest(condition), update, body);
+    JS.Expression update;
+    if (forParts.updaters != null && forParts.updaters.isNotEmpty) {
+      update = JS.Expression.binary(
+              forParts.updaters.map(_visitExpression).toList(), ',')
+          .toVoidExpression();
+    }
+    return JS.For(init, _visitTest(forParts.condition), update, body);
   }
 
-  // TODO(nshahan) Simplify when control-flow-collections experiments are removed.
-  // Should just accept a ForEachParts as an arg with fewer casts.
-  JS.Statement _emitForEach(
-      SimpleIdentifier identifier,
-      DeclaredIdentifier loopVariable,
-      Expression iterable,
-      JS.Statement jsBody) {
-    var jsLeftExpression = _visitExpression(identifier);
-    var jsIterable = _visitExpression(iterable);
-    if (jsLeftExpression == null) {
-      var id = _emitVariableDef(loopVariable.identifier);
+  JS.Statement _emitForEach(ForEachParts forParts, JS.Statement jsBody) {
+    var jsIterable = _visitExpression(forParts.iterable);
+    JS.Expression jsLeftExpression;
+    if (forParts is ForEachPartsWithIdentifier) {
+      jsLeftExpression = _visitExpression(forParts.identifier);
+    } else if (forParts is ForEachPartsWithDeclaration) {
+      var id = _emitVariableDef(forParts.loopVariable.identifier);
       jsLeftExpression = js.call('let #', id);
-      if (_annotatedNullCheck(loopVariable.declaredElement)) {
+      if (_annotatedNullCheck(forParts.loopVariable.declaredElement)) {
         jsBody =
             JS.Block([_nullParameterCheck(JS.Identifier(id.name)), jsBody]);
       }
@@ -6531,18 +6428,17 @@
           JS.ForOf(jsLeftExpression, temp, jsBody)
         ]);
       }
+    } else {
+      throw new StateError('Unrecognized for loop parts');
     }
     return JS.ForOf(jsLeftExpression, jsIterable, jsBody);
   }
 
   @override
   JS.Statement visitForElement(ForElement node) {
-    // TODO(nshahan) Need to support await for in collections.
-    if (node.awaitKeyword != null) return _unreachable(node);
     var jsBody = _isUiAsCodeElement(node.body)
         ? node.body.accept(this)
         : _visitNestedCollectionElement(node.body);
-
     return _forAdaptor(node.forLoopParts, node.awaitKeyword, jsBody);
   }
 
@@ -6573,55 +6469,150 @@
       _unreachable(node);
 
   @override
-  JS.Statement visitForStatement2(ForStatement2 node) =>
+  JS.Statement visitForStatement(ForStatement node) =>
       _forAdaptor(node.forLoopParts, node.awaitKeyword, _visitScope(node.body));
 
-  // TODO(nshahan) Simplify when control-flow-collections experiment is removed.
   JS.Statement _forAdaptor(
       ForLoopParts forParts, Token awaitKeyword, JS.Statement jsBody) {
-    if (forParts is ForPartsWithExpression) {
-      return _emitFor(forParts.initialization, null, forParts.condition,
-          forParts.updaters, jsBody);
-    } else if (forParts is ForPartsWithDeclarations) {
-      return _emitFor(null, forParts.variables, forParts.condition,
-          forParts.updaters, jsBody);
-    } else if (awaitKeyword == null) {
-      if (forParts is ForEachPartsWithIdentifier) {
-        return _emitForEach(
-            forParts.identifier, null, forParts.iterable, jsBody);
-      } else if (forParts is ForEachPartsWithDeclaration) {
-        return _emitForEach(
-            null, forParts.loopVariable, forParts.iterable, jsBody);
+    /// Returns a new scoped block starting with [first] followed by [rest].
+    ///
+    /// Performs one level of scope flattening when [rest] is already a scoped
+    /// block.
+    JS.Block insertFirst(JS.Statement first, JS.Statement rest) {
+      var bodyStatements = [first];
+      if (rest is JS.Block) {
+        bodyStatements.addAll(rest.statements);
+      } else {
+        bodyStatements.add(rest);
       }
-    } else if (forParts is ForEachPartsWithIdentifier) {
-      return _emitAwaitFor(
-          forParts.identifier, null, forParts.iterable, jsBody);
-    } else if (forParts is ForEachPartsWithDeclaration) {
-      return _emitAwaitFor(
-          null, forParts.loopVariable, forParts.iterable, jsBody);
+      return JS.Block(bodyStatements);
+    }
+
+    if (forParts is ForParts) {
+      return _emitFor(forParts, jsBody);
+    } else if (forParts is ForEachParts) {
+      // If needed, assert a cast inside the body before the variable is read.
+      SimpleIdentifier variable;
+      if (forParts is ForEachPartsWithIdentifier) {
+        variable = forParts.identifier;
+      } else if (forParts is ForEachPartsWithDeclaration) {
+        variable = forParts.loopVariable.identifier;
+      } else {
+        throw new StateError('Unrecognized for loop parts');
+      }
+      var castType = getImplicitCast(variable);
+      if (castType != null) {
+        var castStatement =
+            _emitCast(castType, _visitExpression(variable)).toStatement();
+        jsBody = insertFirst(castStatement, jsBody);
+      }
+      if (awaitKeyword == null) {
+        return _emitForEach(forParts, jsBody);
+      } else {
+        return _emitAwaitFor(forParts, jsBody);
+      }
     }
     return _unreachable(forParts);
   }
 
-  @deprecated
   @override
-  visitListLiteral2(ListLiteral2 node) => _unreachable(node);
-
-  @deprecated
-  @override
-  visitMapLiteral2(MapLiteral2 node) => _unreachable(node);
-
-  @deprecated
-  @override
-  visitSetLiteral2(SetLiteral2 node) => _unreachable(node);
+  visitSetOrMapLiteral(SetOrMapLiteral node) =>
+      node.isSet ? _emitSetLiteral(node) : _emitMapLiteral(node);
 
   @override
-  visitSetOrMapLiteral(SetOrMapLiteral node) => node.isSet
-      ? _emitSetLiteral(node.elements2, node)
-      : _emitMapLiteral(node.elements2, node);
+  JS.Statement visitSpreadElement(SpreadElement node) {
+    /// Returns `true` if [node] is or is a child element of a map literal.
+    bool isMap(AstNode node) {
+      if (node is SetOrMapLiteral) return node.isMap;
+      if (node is ListLiteral) return false;
+      return isMap(node.parent);
+    }
 
-  @override
-  visitSpreadElement(SpreadElement node) => _unreachable(node);
+    /// Returns [expression] wrapped in an implict cast to [castType] or
+    /// [expression] as provided if [castType] is `null` signifying that
+    /// no cast is needed.
+    JS.Expression wrapInImplicitCast(JS.Expression expression, castType) =>
+        castType == null ? expression : _emitCast(castType, expression);
+
+    /// Returns a statement spreading the elements of [expression] into
+    /// [_currentCollectionVariable].
+    ///
+    /// Expects the collection literal containing [expression] to be a list or
+    /// set literal. Inserts implicit casts to [elementCastType] for each
+    /// element if needed.
+    JS.Statement emitListOrSetSpread(
+        JS.Expression expression, DartType elementCastType) {
+      var forEachTemp =
+          _emitSimpleIdentifier(_createTemporary('i', types.dynamicType));
+      return js.statement('#.forEach((#) => #.push(#))', [
+        expression,
+        forEachTemp,
+        _currentCollectionVariable,
+        wrapInImplicitCast(forEachTemp, elementCastType)
+      ]);
+    }
+
+    /// Returns a statement spreading the key/value pairs of [expression]
+    /// into [_currentCollectionVariable].
+    ///
+    /// Expects the collection literal containing [expression] to be a map
+    /// literal. Inserts implicit casts to [keyCastType] for keys and
+    /// [valueCastType] for values if needed.
+    JS.Statement emitMapSpread(JS.Expression expression, DartType keyCastType,
+        DartType valueCastType) {
+      var keyTemp =
+          _emitSimpleIdentifier(_createTemporary('k', types.dynamicType));
+      var valueTemp =
+          _emitSimpleIdentifier(_createTemporary('v', types.dynamicType));
+      return js.statement('#.forEach((#, #) => {#.push(#); #.push(#)})', [
+        expression,
+        keyTemp,
+        valueTemp,
+        _currentCollectionVariable,
+        wrapInImplicitCast(keyTemp, keyCastType),
+        _currentCollectionVariable,
+        wrapInImplicitCast(valueTemp, valueCastType)
+      ]);
+    }
+
+    /// Appends all elements in [expression] to the collection being built.
+    ///
+    /// Uses implict cast information from [node] to insert the correct casts
+    /// for the collection elements when spreading. Inspects parents of [node]
+    /// to determine the type of the enclosing collection literal.
+    JS.Statement emitSpread(JS.Expression expression, Expression node) {
+      expression = wrapInImplicitCast(expression, getImplicitCast(node));
+
+      // Start searching for a map literal at the parent of the SpreadElement.
+      if (isMap(node.parent.parent)) {
+        return emitMapSpread(expression, getImplicitSpreadKeyCast(node),
+            getImplicitSpreadValueCast(node));
+      }
+      return emitListOrSetSpread(expression, getImplicitSpreadCast(node));
+    }
+
+    /// Emits a null check on [expression] then appends all elements to the
+    /// collection being built.
+    ///
+    /// Uses implict cast information from [node] to insert the correct casts
+    /// for the collection elements when spreading. Inspects parents of [node]
+    /// to determine the type of the enclosing collection literal.
+    JS.Statement emitNullSafeSpread(JS.Expression expression, Expression node) {
+      // TODO(nshahan) Could optimize out if we know the value is null.
+      var spreadItems =
+          _emitSimpleIdentifier(_createTemporary('items', getStaticType(node)));
+      return JS.Block([
+        js.statement('let # = #', [spreadItems, expression]),
+        js.statement(
+            'if (# != null) #', [spreadItems, emitSpread(spreadItems, node)])
+      ]);
+    }
+
+    var expression = _visitExpression(node.expression);
+    return node.beginToken.lexeme == '...?'
+        ? emitNullSafeSpread(expression, node.expression)
+        : emitSpread(expression, node.expression);
+  }
 
   @override
   visitForPartsWithDeclarations(ForPartsWithDeclarations node) =>
@@ -6632,49 +6623,6 @@
       _unreachable(node);
 }
 
-/// Choose a canonical name from the [library] element.
-///
-/// This never uses the library's name (the identifier in the `library`
-/// declaration) as it doesn't have any meaningful rules enforced.
-String jsLibraryName(String libraryRoot, LibraryElement library) {
-  var uri = library.source.uri;
-  if (uri.scheme == 'dart') {
-    return uri.path;
-  }
-  // TODO(vsm): This is not necessarily unique if '__' appears in a file name.
-  var encodedSeparator = '__';
-  String qualifiedPath;
-  if (uri.scheme == 'package') {
-    // Strip the package name.
-    // TODO(vsm): This is not unique if an escaped '/'appears in a filename.
-    // E.g., "foo/bar.dart" and "foo$47bar.dart" would collide.
-    qualifiedPath = uri.pathSegments.skip(1).join(encodedSeparator);
-  } else {
-    qualifiedPath = path
-        .relative(uri.toFilePath(), from: libraryRoot)
-        .replaceAll(path.separator, encodedSeparator)
-        .replaceAll('..', encodedSeparator);
-  }
-  return pathToJSIdentifier(qualifiedPath);
-}
-
-/// Debugger friendly name for a Dart Library.
-String jsLibraryDebuggerName(String libraryRoot, LibraryElement library) {
-  var uri = library.source.uri;
-  // For package: and dart: uris show the entire
-  if (uri.scheme == 'dart' || uri.scheme == 'package') return uri.toString();
-
-  var filePath = uri.toFilePath();
-  // Relative path to the library.
-  return path.relative(filePath, from: libraryRoot);
-}
-
-/// Shorthand for identifier-like property names.
-/// For now, we emit them as strings and the printer restores them to
-/// identifiers if it can.
-// TODO(jmesserly): avoid the round tripping through quoted form.
-JS.LiteralString _propertyName(String name) => js.string(name, "'");
-
 // TODO(jacobr): we would like to do something like the following
 // but we don't have summary support yet.
 // bool _supportJsExtensionMethod(AnnotatedNode node) =>
diff --git a/pkg/dev_compiler/lib/src/analyzer/driver.dart b/pkg/dev_compiler/lib/src/analyzer/driver.dart
index a4fd216..7c5d95b 100644
--- a/pkg/dev_compiler/lib/src/analyzer/driver.dart
+++ b/pkg/dev_compiler/lib/src/analyzer/driver.dart
@@ -243,13 +243,18 @@
     /// Create an analysis context to contain the state for this build unit.
     var context = RestrictedAnalysisContext(
         analysisOptions, declaredVariables, sourceFactory);
-    var resultProvider = InputPackagesResultProvider(
-        context,
-        SummaryDataStore([])
-          ..addStore(summaryData)
-          ..addBundle(null, bundle));
+    var resynthesizer = StoreBasedSummaryResynthesizer(
+      context,
+      null,
+      context.sourceFactory,
+      /*strongMode*/ true,
+      SummaryDataStore([])
+        ..addStore(summaryData)
+        ..addBundle(null, bundle),
+    );
+    resynthesizer.finishCoreAsyncLibraries();
+    context.typeProvider = resynthesizer.typeProvider;
 
-    var resynthesizer = resultProvider.resynthesizer;
     _extensionTypes ??= ExtensionTypeSet(context.typeProvider, resynthesizer);
 
     return LinkedAnalysisDriver(
diff --git a/pkg/dev_compiler/lib/src/analyzer/element_helpers.dart b/pkg/dev_compiler/lib/src/analyzer/element_helpers.dart
index fc060a9..45f443f 100644
--- a/pkg/dev_compiler/lib/src/analyzer/element_helpers.dart
+++ b/pkg/dev_compiler/lib/src/analyzer/element_helpers.dart
@@ -66,10 +66,14 @@
   return element.type;
 }
 
-/// Given an annotated [node] and a [test] function, returns the first matching
-/// constant valued annotation.
+/// Given an [element] and a [test] function, returns the first matching
+/// constant valued metadata annotation on the element.
 ///
-/// For example if we had the ClassDeclaration node for `FontElement`:
+/// If the element is a synthetic getter/setter (Analyzer creates these for
+/// fields), then this will use the corresponding real element, which will have
+/// the metadata annotations.
+///
+/// For example if we had the [ClassDeclaration] node for `FontElement`:
 ///
 ///    @js.JS('HTMLFontElement')
 ///    @deprecated
@@ -81,6 +85,11 @@
 ///
 DartObject findAnnotation(Element element, bool test(DartObjectImpl value)) {
   if (element == null) return null;
+  var accessor = element;
+  if (accessor is PropertyAccessorElement && accessor.isSynthetic) {
+    // Look for metadata on the real element, not the synthetic one.
+    element = accessor.variable;
+  }
   for (var metadata in element.metadata) {
     var value = metadata.computeConstantValue();
     if (value is DartObjectImpl && test(value)) return value;
diff --git a/pkg/dev_compiler/lib/src/analyzer/js_interop.dart b/pkg/dev_compiler/lib/src/analyzer/js_interop.dart
index 2247840..5d51b33 100644
--- a/pkg/dev_compiler/lib/src/analyzer/js_interop.dart
+++ b/pkg/dev_compiler/lib/src/analyzer/js_interop.dart
@@ -54,6 +54,8 @@
 bool isJSExportNameAnnotation(DartObjectImpl value) =>
     isBuiltinAnnotation(value, '_foreign_helper', 'JSExportName');
 
+/// Whether [value] is a `@JSName` (internal annotation used in dart:html for
+/// renaming members).
 bool isJSName(DartObjectImpl value) =>
     isBuiltinAnnotation(value, '_js_helper', 'JSName');
 
diff --git a/pkg/dev_compiler/lib/src/analyzer/module_compiler.dart b/pkg/dev_compiler/lib/src/analyzer/module_compiler.dart
index 7ad873d..3997597 100644
--- a/pkg/dev_compiler/lib/src/analyzer/module_compiler.dart
+++ b/pkg/dev_compiler/lib/src/analyzer/module_compiler.dart
@@ -19,6 +19,7 @@
 import '../compiler/module_builder.dart'
     show transformModuleFormat, ModuleFormat;
 import '../compiler/shared_command.dart';
+import '../compiler/shared_compiler.dart';
 import '../js_ast/js_ast.dart' as JS;
 import '../js_ast/js_ast.dart' show js;
 import '../js_ast/source_map_printer.dart' show SourceMapPrintingContext;
@@ -135,9 +136,6 @@
   /// into the output JavaScript module.
   final bool sourceMapComment;
 
-  /// Whether to emit the source mapping file inline as a data url.
-  final bool inlineSourceMap;
-
   /// The file extension for summaries.
   final String summaryExtension;
 
@@ -159,7 +157,6 @@
   CompilerOptions(
       {bool sourceMap = true,
       this.sourceMapComment = true,
-      this.inlineSourceMap = false,
       bool summarizeApi = true,
       this.summaryExtension = 'sum',
       this.unsafeForceCompile = false,
@@ -182,7 +179,6 @@
 
   CompilerOptions.fromArguments(ArgResults args)
       : sourceMapComment = args['source-map-comment'] as bool,
-        inlineSourceMap = args['inline-source-map'] as bool,
         summaryExtension = args['summary-extension'] as String,
         unsafeForceCompile = args['unsafe-force-compile'] as bool,
         summaryOutPath = args['summary-out'] as String,
@@ -203,8 +199,6 @@
               'disable if using X-SourceMap header',
           defaultsTo: true,
           hide: hide)
-      ..addFlag('inline-source-map',
-          help: 'emit source mapping inline', defaultsTo: false, hide: hide)
       ..addFlag('unsafe-force-compile',
           help: 'Compile code even if it has errors. ಠ_ಠ\n'
               'This has undefined behavior!',
@@ -242,13 +236,6 @@
   /// the libraries in this module.
   final List<int> summaryBytes;
 
-  /// Unique identifier indicating hole to inline the source map.
-  ///
-  /// We cannot generate the source map before the script it is for is
-  /// generated so we have generate the script including this id and then
-  /// replace the ID once the source map is generated.
-  static String sourceMapHoleID = 'SourceMap3G5a8h6JVhHfdGuDxZr1EF9GQC8y0e6u';
-
   JSModuleFile(this.errors, this.options, this.moduleTree, this.summaryBytes);
 
   JSModuleFile.invalid(this.errors, this.options)
@@ -303,7 +290,7 @@
     var rawSourceMap = options.inlineSourceMap
         ? js.escapedString(json.encode(builtMap), "'").value
         : 'null';
-    text = text.replaceFirst(sourceMapHoleID, rawSourceMap);
+    text = text.replaceFirst(SharedCompiler.sourceMapLocationID, rawSourceMap);
 
     return JSModuleCode(text, builtMap);
   }
diff --git a/pkg/dev_compiler/lib/src/analyzer/nullable_type_inference.dart b/pkg/dev_compiler/lib/src/analyzer/nullable_type_inference.dart
index 4716548..ef723c2 100644
--- a/pkg/dev_compiler/lib/src/analyzer/nullable_type_inference.dart
+++ b/pkg/dev_compiler/lib/src/analyzer/nullable_type_inference.dart
@@ -352,7 +352,7 @@
   }
 
   @override
-  visitForStatement2(ForStatement2 node) {
+  visitForStatement(ForStatement node) {
     var forLoopParts = node.forLoopParts;
     if (forLoopParts is ForEachParts) {
       if (forLoopParts is ForEachPartsWithIdentifier &&
@@ -372,7 +372,7 @@
         throw new StateError('Unrecognized for loop parts');
       }
     }
-    super.visitForStatement2(node);
+    super.visitForStatement(node);
   }
 
   @override
diff --git a/pkg/dev_compiler/lib/src/analyzer/reify_coercions.dart b/pkg/dev_compiler/lib/src/analyzer/reify_coercions.dart
index 3ad9677..a071fcb 100644
--- a/pkg/dev_compiler/lib/src/analyzer/reify_coercions.dart
+++ b/pkg/dev_compiler/lib/src/analyzer/reify_coercions.dart
@@ -9,7 +9,6 @@
 import 'package:analyzer/src/dart/ast/ast.dart' show FunctionBodyImpl;
 import 'package:analyzer/src/dart/ast/utilities.dart'
     show AstCloner, NodeReplacer;
-import 'package:analyzer/src/dart/element/type.dart' show DynamicTypeImpl;
 import 'package:analyzer/src/generated/parser.dart' show ResolutionCopier;
 import 'package:analyzer/src/task/strong/ast_properties.dart' as ast_properties;
 
@@ -67,6 +66,13 @@
   }
 
   @override
+  visitSpreadElement(SpreadElement node) {
+    // Skip visiting the expression so we can handle all casts during code
+    // generation.
+    node.expression.visitChildren(this);
+  }
+
+  @override
   visitMethodInvocation(MethodInvocation node) {
     if (isInlineJS(node.methodName.staticElement)) {
       // Don't cast our inline-JS code in SDK.
@@ -82,41 +88,26 @@
   }
 
   @override
-  void visitForStatement2(ForStatement2 node) {
+  void visitForStatement(ForStatement node) {
     var forLoopParts = node.forLoopParts;
     if (forLoopParts is ForEachParts) {
       // Visit other children.
       forLoopParts.iterable.accept(this);
       node.body.accept(this);
-
-      // If needed, assert a cast inside the body before the variable is read.
-      SimpleIdentifier variable;
-      if (forLoopParts is ForEachPartsWithIdentifier) {
-        variable = forLoopParts.identifier;
-      } else if (forLoopParts is ForEachPartsWithDeclaration) {
-        variable = forLoopParts.loopVariable.identifier;
-      } else {
-        throw new StateError('Unrecognized for loop parts');
-      }
-      var castType = ast_properties.getImplicitCast(variable);
-      if (castType != null) {
-        // Build the cast. We will place this cast in the body, so need to clone
-        // the variable's AST node and clear out its static type (otherwise we
-        // will optimize away the cast).
-        var cast = castExpression(
-            _clone(variable)..staticType = DynamicTypeImpl.instance, castType);
-
-        var body = node.body;
-        var blockBody = <Statement>[ast.expressionStatement(cast)];
-        if (body is Block) {
-          blockBody.addAll(body.statements);
-        } else {
-          blockBody.add(body);
-        }
-        _replaceNode(node, body, ast.block(blockBody));
-      }
     } else {
-      super.visitForStatement2(node);
+      super.visitForStatement(node);
+    }
+  }
+
+  @override
+  void visitForElement(ForElement node) {
+    var forLoopParts = node.forLoopParts;
+    if (forLoopParts is ForEachParts) {
+      // Visit other children.
+      forLoopParts.iterable.accept(this);
+      node.body.accept(this);
+    } else {
+      super.visitForElement(node);
     }
   }
 
@@ -143,6 +134,12 @@
           clone, ast_properties.getImplicitCast(node));
       ast_properties.setImplicitOperationCast(
           clone, ast_properties.getImplicitOperationCast(node));
+      ast_properties.setImplicitSpreadCast(
+          clone, ast_properties.getImplicitSpreadCast(node));
+      ast_properties.setImplicitSpreadKeyCast(
+          clone, ast_properties.getImplicitSpreadKeyCast(node));
+      ast_properties.setImplicitSpreadValueCast(
+          clone, ast_properties.getImplicitSpreadValueCast(node));
       ast_properties.setIsDynamicInvoke(
           clone, ast_properties.isDynamicInvoke(node));
     }
diff --git a/pkg/dev_compiler/lib/src/compiler/shared_command.dart b/pkg/dev_compiler/lib/src/compiler/shared_command.dart
index 03558be..397f0ed 100644
--- a/pkg/dev_compiler/lib/src/compiler/shared_command.dart
+++ b/pkg/dev_compiler/lib/src/compiler/shared_command.dart
@@ -56,6 +56,10 @@
   /// code.
   final bool sourceMap;
 
+  /// Whether to emit the source mapping file in the program text, so the
+  /// runtime can enable synchronous stack trace deobsfuscation.
+  final bool inlineSourceMap;
+
   /// Whether to emit a summary file containing API signatures.
   ///
   /// This is required for a modular build process.
@@ -95,6 +99,7 @@
 
   SharedCompilerOptions(
       {this.sourceMap = true,
+      this.inlineSourceMap = false,
       this.summarizeApi = true,
       this.emitMetadata = false,
       this.enableAsserts = true,
@@ -109,6 +114,7 @@
       [String moduleRoot, String summaryExtension])
       : this(
             sourceMap: args['source-map'] as bool,
+            inlineSourceMap: args['inline-source-map'] as bool,
             summarizeApi: args['summarize'] as bool,
             emitMetadata: args['emit-metadata'] as bool,
             enableAsserts: args['enable-asserts'] as bool,
@@ -119,7 +125,8 @@
             summaryModules: _parseCustomSummaryModules(
                 args['summary'] as List<String>, moduleRoot, summaryExtension),
             moduleFormats: parseModuleFormatOption(args),
-            moduleName: _getModuleName(args, moduleRoot));
+            moduleName: _getModuleName(args, moduleRoot),
+            replCompile: args['repl-compile'] as bool);
 
   static void addArguments(ArgParser parser, {bool hide = true}) {
     addModuleFormatOptions(parser, hide: hide);
@@ -136,6 +143,8 @@
           help: 'emit an API summary file', defaultsTo: true, hide: hide)
       ..addFlag('source-map',
           help: 'emit source mapping', defaultsTo: true, hide: hide)
+      ..addFlag('inline-source-map',
+          help: 'emit source mapping inline', defaultsTo: false, hide: hide)
       ..addFlag('emit-metadata',
           help: 'emit metadata annotations queriable via mirrors', hide: hide)
       ..addFlag('enable-asserts',
@@ -152,6 +161,12 @@
       ..addOption('library-root',
           help: '(deprecated) used to name libraries inside the module, '
               'ignored with -k.',
+          hide: hide)
+      ..addFlag('repl-compile',
+          help: 'compile in a more permissive REPL mode, allowing access'
+              ' to private members across library boundaries. This should'
+              ' only be used by debugging tools.',
+          defaultsTo: false,
           hide: hide);
   }
 
@@ -384,7 +399,8 @@
   }
   if (args.isKernel) {
     return kernel_compiler.compile(args.rest,
-        compilerState: previousResult?.kernelState);
+        compilerState: previousResult?.kernelState,
+        useIncrementalCompiler: args.useIncrementalCompiler);
   } else {
     var result = analyzer_compiler.compile(args.rest,
         compilerState: previousResult?.analyzerState);
@@ -477,11 +493,17 @@
   /// e.g. in a debugger REPL.
   final bool reuseResult;
 
+  /// Whether to use the incremental compiler for compiling.
+  ///
+  /// Note that this only makes sense when also reusing results.
+  final bool useIncrementalCompiler;
+
   ParsedArguments._(this.rest,
       {this.isBatch = false,
       this.isWorker = false,
       this.isKernel = false,
-      this.reuseResult = false});
+      this.reuseResult = false,
+      this.useIncrementalCompiler = false});
 
   /// Preprocess arguments to determine whether DDK is used in batch mode or as a
   /// persistent worker.
@@ -500,6 +522,7 @@
     bool isBatch = false;
     bool isKernel = false;
     bool reuseResult = false;
+    bool useIncrementalCompiler = false;
     var len = args.length;
     for (int i = 0; i < len; i++) {
       var arg = args[i];
@@ -518,6 +541,8 @@
         isKernel = true;
       } else if (arg == '--reuse-compiler-result') {
         reuseResult = true;
+      } else if (arg == '--use-incremental-compiler') {
+        useIncrementalCompiler = true;
       } else {
         newArgs.add(arg);
       }
@@ -526,7 +551,8 @@
         isWorker: isWorker,
         isBatch: isBatch,
         isKernel: isKernel,
-        reuseResult: reuseResult);
+        reuseResult: reuseResult,
+        useIncrementalCompiler: useIncrementalCompiler);
   }
 
   /// Whether the compiler is running in [isBatch] or [isWorker] mode.
@@ -552,7 +578,9 @@
         isWorker: isWorker,
         isBatch: isBatch,
         isKernel: isKernel || newArgs.isKernel,
-        reuseResult: reuseResult);
+        reuseResult: reuseResult || newArgs.reuseResult,
+        useIncrementalCompiler:
+            useIncrementalCompiler || newArgs.useIncrementalCompiler);
   }
 }
 
diff --git a/pkg/dev_compiler/lib/src/compiler/shared_compiler.dart b/pkg/dev_compiler/lib/src/compiler/shared_compiler.dart
index be9b13f..c72b51a 100644
--- a/pkg/dev_compiler/lib/src/compiler/shared_compiler.dart
+++ b/pkg/dev_compiler/lib/src/compiler/shared_compiler.dart
@@ -3,6 +3,8 @@
 // BSD-style license that can be found in the LICENSE file.
 
 import 'dart:collection';
+import 'package:meta/meta.dart';
+
 import '../compiler/js_metalet.dart' as JS;
 import '../compiler/js_names.dart' as JS;
 import '../compiler/js_utils.dart' as JS;
@@ -13,27 +15,115 @@
 ///
 /// This class should only implement functionality that depends purely on JS
 /// classes, rather than on Analyzer/Kernel types.
-abstract class SharedCompiler<Library, Class> {
+abstract class SharedCompiler<Library, Class, InterfaceType, FunctionNode> {
   /// When inside a `[]=` operator, this will be a non-null value that should be
   /// returned by any `return;` statement.
   ///
   /// This lets DDC use the setter method's return value directly.
   final List<JS.Identifier> _operatorSetResultStack = [];
 
-  JS.Identifier runtimeModule;
-  final namedArgumentTemp = JS.TemporaryId('opts');
-
+  /// Private member names in this module, organized by their library.
   final _privateNames = HashMap<Library, HashMap<String, JS.TemporaryId>>();
 
+  /// Extension member symbols for adding Dart members to JS types.
+  ///
+  /// These are added to the [extensionSymbolsModule]; see that field for more
+  /// information.
+  final _extensionSymbols = <String, JS.TemporaryId>{};
+
+  /// The set of libraries we are currently compiling, and the temporaries used
+  /// to refer to them.
+  final _libraries = <Library, JS.Identifier>{};
+
+  /// Imported libraries, and the temporaries used to refer to them.
+  final _imports = <Library, JS.TemporaryId>{};
+
+  /// The identifier used to reference DDC's core "dart:_runtime" library from
+  /// generated JS code, typically called "dart" e.g. `dart.dcall`.
+  @protected
+  JS.Identifier runtimeModule;
+
+  /// The identifier used to reference DDC's "extension method" symbols, used to
+  /// safely add Dart-specific member names to JavaScript classes, such as
+  /// primitive types (e.g. String) or DOM types in "dart:html".
+  @protected
+  JS.Identifier extensionSymbolsModule;
+
+  /// Whether we're currently building the SDK, which may require special
+  /// bootstrapping logic.
+  ///
+  /// This is initialized by [startModule], which must be called before
+  /// accessing this field.
+  @protected
+  bool isBuildingSdk;
+
+  /// The temporary variable that stores named arguments (these are passed via a
+  /// JS object literal, to match JS conventions).
+  @protected
+  final namedArgumentTemp = JS.TemporaryId('opts');
+
   /// The list of output module items, in the order they need to be emitted in.
+  @protected
   final moduleItems = <JS.ModuleItem>[];
 
   /// Like [moduleItems] but for items that should be emitted after classes.
   ///
   /// This is used for deferred supertypes of mutually recursive non-generic
   /// classes.
+  @protected
   final afterClassDefItems = <JS.ModuleItem>[];
 
+  /// The type used for private Dart [Symbol]s.
+  @protected
+  InterfaceType get privateSymbolType;
+
+  /// The type used for public Dart [Symbol]s.
+  @protected
+  InterfaceType get internalSymbolType;
+
+  /// The current library being compiled.
+  @protected
+  Library get currentLibrary;
+
+  /// The library for dart:core in the SDK.
+  @protected
+  Library get coreLibrary;
+
+  /// The import URI of current library.
+  @protected
+  Uri get currentLibraryUri;
+
+  /// The current function being compiled, if any.
+  @protected
+  FunctionNode get currentFunction;
+
+  /// Choose a canonical name from the [library] element.
+  ///
+  /// This never uses the library's name (the identifier in the `library`
+  /// declaration) as it doesn't have any meaningful rules enforced.
+  @protected
+  String jsLibraryName(Library library);
+
+  /// Debugger friendly name for a Dart [library].
+  @protected
+  String jsLibraryDebuggerName(Library library);
+
+  /// Gets the module import URI that contains [library].
+  @protected
+  String libraryToModule(Library library);
+
+  /// Returns true if the library [l] is "dart:_runtime".
+  @protected
+  bool isSdkInternalRuntime(Library l);
+
+  /// Whether any superclass of [c] defines a static [name].
+  @protected
+  bool superclassHasStatic(Class c, String name);
+
+  /// Emits the expression necessary to access a constructor of [type];
+  @protected
+  JS.Expression emitConstructorAccess(InterfaceType type);
+
   /// When compiling the body of a `operator []=` method, this will be non-null
   /// and will indicate the the value that should be returned from any `return;`
   /// statements.
@@ -42,9 +132,11 @@
     return stack.isEmpty ? null : stack.last;
   }
 
-  /// The import URI of current library.
-  Uri get currentLibraryUri;
-
+  /// Called when starting to emit methods/functions, in particular so we can
+  /// implement special handling of the user-defined `[]=` and `==` methods.
+  ///
+  /// See also [exitFunction] and [emitReturnStatement].
+  @protected
   void enterFunction(String name, List<JS.Parameter> formals,
       bool Function() isLastParamMutated) {
     if (name == '[]=') {
@@ -56,6 +148,9 @@
     }
   }
 
+  /// Called when finished emitting methods/functions, and must correspond to a
+  /// previous [enterFunction] call.
+  @protected
   JS.Block exitFunction(
       String name, List<JS.Parameter> formals, JS.Block code) {
     if (name == "==" &&
@@ -93,6 +188,7 @@
 
   /// Emits a return statement `return <value>;`, handling special rules for
   /// the `operator []=` method.
+  @protected
   JS.Statement emitReturnStatement(JS.Expression value) {
     if (_operatorSetResult != null) {
       var result = JS.Return(_operatorSetResult);
@@ -112,6 +208,7 @@
   ///
   ///     dart.asInt(<expr>)
   ///
+  @protected
   JS.Expression runtimeCall(String code, [args]) {
     if (args != null) {
       var newArgs = <Object>[runtimeModule];
@@ -129,11 +226,30 @@
 
   /// Calls [runtimeCall] and uses `toStatement()` to convert the resulting
   /// expression into a statement.
+  @protected
   JS.Statement runtimeStatement(String code, [args]) {
     return runtimeCall(code, args).toStatement();
   }
 
+  /// Emits a private name JS Symbol for [name] scoped to the Dart [library].
+  ///
+  /// If the same name is used in multiple libraries in the same module,
+  /// distinct symbols will be used, so the names cannot be referenced outside
+  /// of their library.
+  @protected
   JS.TemporaryId emitPrivateNameSymbol(Library library, String name) {
+    // TODO(jmesserly): fix this to support referring to private symbols from
+    // libraries that aren't in the current module.
+    //
+    // This is needed for several uses cases:
+    // - const instances of classes (which directly initialize fields via an
+    //   object literal).
+    // - noSuchMethod stubs created when an interface is implemented that had
+    //   private members from another library.
+    // - stateful hot reload, where we need the ability to patch private
+    //   class members.
+    //
+    // See https://github.com/dart-lang/sdk/issues/36252
     return _privateNames.putIfAbsent(library, () => HashMap()).putIfAbsent(name,
         () {
       var idName = name;
@@ -152,7 +268,8 @@
   ///
   /// This will use `className.name = value` if possible, otherwise it will use
   /// `dart.defineValue(className, name, value)`. This is required when
-  /// `Function.prototype` already defins a getters with the same name.
+  /// `FunctionNode.prototype` already defins a getters with the same name.
+  @protected
   JS.Expression defineValueOnClass(Class c, JS.Expression className,
       JS.Expression nameExpr, JS.Expression value) {
     var args = [className, nameExpr, value];
@@ -165,8 +282,274 @@
     return js.call('#.# = #', args);
   }
 
-  /// Whether any superclass of [c] defines a static [name].
-  bool superclassHasStatic(Class c, String name);
+  /// Caches a constant (list/set/map or class instance) in a variable, so it's
+  /// only canonicalized once at this location in the code, which improves
+  /// performance.
+  ///
+  /// This method ensures the constant is not initialized until use.
+  ///
+  /// The expression [jsExpr] should contain the already-canonicalized constant.
+  /// If the constant is not canonicalized yet, it should be wrapped in the
+  /// appropriate call, such as:
+  ///
+  /// - dart.constList (for Lists),
+  /// - dart.constMap (for Maps),
+  /// - dart.constSet (for Sets),
+  /// - dart.const (for other instances of classes)
+  ///
+  /// [canonicalizeConstObject] can be used for class instances; it will wrap
+  /// the expression in `dart.const` and then call this method.
+  ///
+  /// If the same consant is used elsewhere (in this module, or another module),
+  /// that will require a second canonicalization. In general it is uncommon
+  /// to define the same large constant (such as lists, maps) in different
+  /// locations, because that requires copy+paste, so in practice this
+  /// optimization is rather effective (we should consider caching once
+  /// per-module, though, as that would be relatively easy for the compiler to
+  /// implement once we have a single Kernel backend).
+  @protected
+  JS.Expression cacheConst(JS.Expression jsExpr) {
+    if (currentFunction == null) return jsExpr;
+
+    var temp = JS.TemporaryId('const');
+    moduleItems.add(js.statement('let #;', [temp]));
+    return js.call('# || (# = #)', [temp, temp, jsExpr]);
+  }
+
+  /// Emits a Dart Symbol with the given member [symbolName].
+  ///
+  /// If the symbol refers to a private name, its library will be set to the
+  /// [currentLibrary], so the Symbol is scoped properly.
+  @protected
+  JS.Expression emitDartSymbol(String symbolName) {
+    // TODO(vsm): Handle qualified symbols correctly.
+    var last = symbolName.split('.').last;
+    var name = js.escapedString(symbolName, "'");
+    JS.Expression result;
+    if (last.startsWith('_')) {
+      var nativeSymbol = emitPrivateNameSymbol(currentLibrary, last);
+      result = js.call('new #.new(#, #)',
+          [emitConstructorAccess(privateSymbolType), name, nativeSymbol]);
+    } else {
+      result = js.call(
+          'new #.new(#)', [emitConstructorAccess(internalSymbolType), name]);
+    }
+    return canonicalizeConstObject(result);
+  }
+
+  /// Calls the `dart.const` function in "dart:_runtime" to canonicalize a
+  /// constant instance of a user-defined class stored in [expr].
+  @protected
+  JS.Expression canonicalizeConstObject(JS.Expression expr) =>
+      cacheConst(runtimeCall('const(#)', expr));
+
+  /// Emits preamble for the module containing [libraries], and returns the
+  /// list of module items for further items to be added.
+  ///
+  /// The preamble consists of initializing the identifiers for each library,
+  /// that will be used to store their members. It also generates the
+  /// appropriate ES6 `export` declaration to export them from this module.
+  ///
+  /// After the code for all of the library members is emitted,
+  /// [emitImportsAndExtensionSymbols] should be used to emit imports/extension
+  /// symbols into the list returned by this method. Finally, [finishModule]
+  /// can be called to complete the module and return the resulting JS AST.
+  ///
+  /// This also initializes several fields: [isBuildingSdk], [runtimeModule],
+  /// [extensionSymbolsModule], as well as the [_libraries] map needed by
+  /// [emitLibraryName].
+  @protected
+  List<JS.ModuleItem> startModule(Iterable<Library> libraries) {
+    isBuildingSdk = libraries.any(isSdkInternalRuntime);
+    if (isBuildingSdk) {
+      // Don't allow these to be renamed when we're building the SDK.
+      // There is JS code in dart:* that depends on their names.
+      runtimeModule = JS.Identifier('dart');
+      extensionSymbolsModule = JS.Identifier('dartx');
+    } else {
+      // Otherwise allow these to be renamed so users can write them.
+      runtimeModule = JS.TemporaryId('dart');
+      extensionSymbolsModule = JS.TemporaryId('dartx');
+    }
+
+    // Initialize our library variables.
+    var items = <JS.ModuleItem>[];
+    var exports = <JS.NameSpecifier>[];
+
+    if (isBuildingSdk) {
+      // Bootstrap the ability to create Dart library objects.
+      var libraryProto = JS.TemporaryId('_library');
+      items.add(js.statement('const # = Object.create(null)', libraryProto));
+      items.add(js.statement(
+          'const # = Object.create(#)', [runtimeModule, libraryProto]));
+      items.add(js.statement('#.library = #', [runtimeModule, libraryProto]));
+      exports.add(JS.NameSpecifier(runtimeModule));
+    }
+
+    for (var library in libraries) {
+      if (isBuildingSdk && isSdkInternalRuntime(library)) {
+        _libraries[library] = runtimeModule;
+        continue;
+      }
+      var id = JS.TemporaryId(jsLibraryName(library));
+      _libraries[library] = id;
+
+      items.add(js.statement(
+          'const # = Object.create(#.library)', [id, runtimeModule]));
+      exports.add(JS.NameSpecifier(id));
+    }
+
+    // dart:_runtime has a magic module that holds extension method symbols.
+    // TODO(jmesserly): find a cleaner design for this.
+    if (isBuildingSdk) {
+      var id = extensionSymbolsModule;
+      items.add(js.statement(
+          'const # = Object.create(#.library)', [id, runtimeModule]));
+      exports.add(JS.NameSpecifier(id));
+    }
+
+    items.add(JS.ExportDeclaration(JS.ExportClause(exports)));
+    return items;
+  }
+
+  /// Returns the canonical name to refer to the Dart library.
+  @protected
+  JS.Identifier emitLibraryName(Library library) {
+    // It's either one of the libraries in this module, or it's an import.
+    return _libraries[library] ??
+        _imports.putIfAbsent(
+            library, () => JS.TemporaryId(jsLibraryName(library)));
+  }
+
+  /// Emits imports and extension methods into [items].
+  @protected
+  void emitImportsAndExtensionSymbols(List<JS.ModuleItem> items) {
+    var modules = Map<String, List<Library>>();
+
+    for (var import in _imports.keys) {
+      modules.putIfAbsent(libraryToModule(import), () => []).add(import);
+    }
+
+    String coreModuleName;
+    if (!_libraries.containsKey(coreLibrary)) {
+      coreModuleName = libraryToModule(coreLibrary);
+    }
+    modules.forEach((module, libraries) {
+      // Generate import directives.
+      //
+      // Our import variables are temps and can get renamed. Since our renaming
+      // is integrated into js_ast, it is aware of this possibility and will
+      // generate an "as" if needed. For example:
+      //
+      //     import {foo} from 'foo';         // if no rename needed
+      //     import {foo as foo$} from 'foo'; // if rename was needed
+      //
+      var imports =
+          libraries.map((l) => JS.NameSpecifier(_imports[l])).toList();
+      if (module == coreModuleName) {
+        imports.add(JS.NameSpecifier(runtimeModule));
+        imports.add(JS.NameSpecifier(extensionSymbolsModule));
+      }
+
+      items.add(JS.ImportDeclaration(
+          namedImports: imports, from: js.string(module, "'")));
+    });
+
+    // Initialize extension symbols
+    _extensionSymbols.forEach((name, id) {
+      JS.Expression value =
+          JS.PropertyAccess(extensionSymbolsModule, propertyName(name));
+      if (isBuildingSdk) {
+        value = js.call('# = Symbol(#)', [value, js.string("dartx.$name")]);
+      }
+      items.add(js.statement('const # = #;', [id, value]));
+    });
+  }
+
+  void _emitDebuggerExtensionInfo(String name) {
+    var properties = <JS.Property>[];
+    _libraries.forEach((library, value) {
+      // TODO(jacobr): we could specify a short library name instead of the
+      // full library uri if we wanted to save space.
+      properties.add(
+          JS.Property(js.escapedString(jsLibraryDebuggerName(library)), value));
+    });
+    var module = JS.ObjectInitializer(properties, multiline: true);
+
+    // Track the module name for each library in the module.
+    // This data is only required for debugging.
+    moduleItems.add(js.statement(
+        '#.trackLibraries(#, #, $sourceMapLocationID);',
+        [runtimeModule, js.string(name), module]));
+  }
+
+  /// Finishes the module created by [startModule], by combining the preable
+  /// [items] with the [moduleItems] that have been emitted.
+  ///
+  /// The [moduleName] should specify the module's name, and the items should
+  /// be the list resulting from startModule, with additional items added,
+  /// but not including the contents of moduleItems (which will be handled by
+  /// this method itself).
+  ///
+  /// Note, this function mutates the items list and returns it as the `body`
+  /// field of the result.
+  @protected
+  JS.Program finishModule(List<JS.ModuleItem> items, String moduleName) {
+    // TODO(jmesserly): there's probably further consolidation we can do
+    // between DDC's two backends, by moving more code into this method, as the
+    // code between `startModule` and `finishModule` is very similar in both.
+    _emitDebuggerExtensionInfo(moduleName);
+
+    // Add the module's code (produced by visiting compilation units, above)
+    _copyAndFlattenBlocks(items, moduleItems);
+    moduleItems.clear();
+
+    // Build the module.
+    return JS.Program(items, name: moduleName);
+  }
+
+  /// Flattens blocks in [items] to a single list.
+  ///
+  /// This will not flatten blocks that are marked as being scopes.
+  void _copyAndFlattenBlocks(
+      List<JS.ModuleItem> result, Iterable<JS.ModuleItem> items) {
+    for (var item in items) {
+      if (item is JS.Block && !item.isScope) {
+        _copyAndFlattenBlocks(result, item.statements);
+      } else if (item != null) {
+        result.add(item);
+      }
+    }
+  }
+
+  /// This is an internal method used by [_emitMemberName] and the
+  /// optimized `dart:_runtime extensionSymbol` builtin to get the symbol
+  /// for `dartx.<name>`.
+  ///
+  /// Do not call this directly; you want [_emitMemberName], which knows how to
+  /// handle the many details involved in naming.
+  @protected
+  JS.TemporaryId getExtensionSymbolInternal(String name) {
+    return _extensionSymbols.putIfAbsent(
+        name,
+        () => JS.TemporaryId(
+            '\$${JS.friendlyNameForDartOperator[name] ?? name}'));
+  }
+
+  /// Shorthand for identifier-like property names.
+  /// For now, we emit them as strings and the printer restores them to
+  /// identifiers if it can.
+  // TODO(jmesserly): avoid the round tripping through quoted form.
+  @protected
+  JS.LiteralString propertyName(String name) => js.string(name, "'");
+
+  /// Unique identifier indicating the location to inline the source map.
+  ///
+  /// We cannot generate the source map before the script it is for is
+  /// generated so we have generate the script including this identifier in the
+  /// JS AST, and then replace it once the source map is generated.
+  static const String sourceMapLocationID =
+      'SourceMap3G5a8h6JVhHfdGuDxZr1EF9GQC8y0e6u';
 }
 
 /// Whether a variable with [name] is referenced in the [node].
@@ -223,3 +606,42 @@
     super.visitNode(node);
   }
 }
+
+/// Given the function [fn], returns a function declaration statement, binding
+/// `this` and `super` if necessary (using an arrow function).
+JS.Statement toBoundFunctionStatement(JS.Fun fn, JS.Identifier name) {
+  if (usesThisOrSuper(fn)) {
+    return js.statement('const # = (#) => {#}', [name, fn.params, fn.body]);
+  } else {
+    return JS.FunctionDeclaration(name, fn);
+  }
+}
+
+/// Returns whether [node] uses `this` or `super`.
+bool usesThisOrSuper(JS.Expression node) {
+  var finder = _ThisOrSuperFinder.instance;
+  finder.found = false;
+  node.accept(finder);
+  return finder.found;
+}
+
+class _ThisOrSuperFinder extends JS.BaseVisitor<void> {
+  bool found = false;
+
+  static final instance = _ThisOrSuperFinder();
+
+  @override
+  visitThis(JS.This node) {
+    found = true;
+  }
+
+  @override
+  visitSuper(JS.Super node) {
+    found = true;
+  }
+
+  @override
+  visitNode(JS.Node node) {
+    if (!found) super.visitNode(node);
+  }
+}
diff --git a/pkg/dev_compiler/lib/src/flutter/track_widget_constructor_locations.dart b/pkg/dev_compiler/lib/src/flutter/track_widget_constructor_locations.dart
index e44eb59..02d12f2 100644
--- a/pkg/dev_compiler/lib/src/flutter/track_widget_constructor_locations.dart
+++ b/pkg/dev_compiler/lib/src/flutter/track_widget_constructor_locations.dart
@@ -80,7 +80,15 @@
     return;
   }
   if (!_hasNamedParameter(function, _creationLocationParameterName)) {
-    return;
+    // TODO(jakemac): We don't apply the transformation to dependencies kernel
+    // outlines, so instead we just assume the named parameter exists.
+    //
+    // The only case in which it shouldn't exist is if the function has optional
+    // positional parameters so it cannot have optional named parameters.
+    if (function.requiredParameterCount !=
+        function.positionalParameters.length) {
+      return;
+    }
   }
 
   final NamedExpression namedArgument =
@@ -315,17 +323,18 @@
     // the latest version
     for (Library library in libraries) {
       final Uri importUri = library.importUri;
-      if (!library.isExternal &&
-          importUri != null &&
-          importUri.scheme == 'package') {
-        if (importUri.path == 'flutter/src/widgets/framework.dart') {
+      if (importUri != null && importUri.scheme == 'package') {
+        if (importUri.path == 'flutter/src/widgets/framework.dart' ||
+            importUri.path == 'flutter_web/src/widgets/framework.dart') {
           for (Class class_ in library.classes) {
             if (class_.name == 'Widget') {
               _widgetClass = class_;
             }
           }
         } else {
-          if (importUri.path == 'flutter/src/widgets/widget_inspector.dart') {
+          if (importUri.path == 'flutter/src/widgets/widget_inspector.dart' ||
+              importUri.path ==
+                  'flutter_web/src/widgets/widget_inspector.dart') {
             for (Class class_ in library.classes) {
               if (class_.name == '_HasCreationLocation') {
                 _hasCreationLocationClass = class_;
diff --git a/pkg/dev_compiler/lib/src/js_ast/nodes.dart b/pkg/dev_compiler/lib/src/js_ast/nodes.dart
index 4b39d7e..68d15cd 100644
--- a/pkg/dev_compiler/lib/src/js_ast/nodes.dart
+++ b/pkg/dev_compiler/lib/src/js_ast/nodes.dart
@@ -1189,27 +1189,6 @@
   This _clone() => This();
   int get precedenceLevel => PRIMARY;
   void visitChildren(NodeVisitor visitor) {}
-
-  static bool foundIn(Node node) {
-    var finder = _ThisFinder._instance;
-    finder.found = false;
-    node.accept(finder);
-    return finder.found;
-  }
-}
-
-class _ThisFinder extends BaseVisitor<void> {
-  bool found = false;
-
-  static final _instance = _ThisFinder();
-
-  visitThis(This node) {
-    found = true;
-  }
-
-  visitNode(Node node) {
-    if (!found) super.visitNode(node);
-  }
 }
 
 // `super` is more restricted in the ES6 spec, but for simplicity we accept
diff --git a/pkg/dev_compiler/lib/src/kernel/analyzer_to_kernel.dart b/pkg/dev_compiler/lib/src/kernel/analyzer_to_kernel.dart
index 917daa3..308e199 100644
--- a/pkg/dev_compiler/lib/src/kernel/analyzer_to_kernel.dart
+++ b/pkg/dev_compiler/lib/src/kernel/analyzer_to_kernel.dart
@@ -79,11 +79,9 @@
   final _typeParams = HashMap<a.TypeParameterElement, TypeParameter>();
   final _namespaceBuilder = a.NamespaceBuilder();
 
-  AnalyzerToKernel._(a.AnalysisContextImpl context, this._summaryData)
-      : _resynth = (context.resultProvider as a.InputPackagesResultProvider)
-            .resynthesizer,
-        types = context.typeProvider,
-        rules = context.typeSystem as a.Dart2TypeSystem;
+  AnalyzerToKernel._(this._resynth, this._summaryData)
+      : types = _resynth.typeProvider,
+        rules = _resynth.typeSystem as a.Dart2TypeSystem;
 
   /// Create an Analyzer summary to Kernel tree converter, using the provided
   /// [analyzerSdkSummary] and [summaryPaths].
@@ -98,7 +96,7 @@
         disallowOverlappingSummaries: false);
     var resynthesizer =
         _createSummaryResynthesizer(summaryData, analyzerSdkSummary);
-    return AnalyzerToKernel._(resynthesizer.context, summaryData);
+    return AnalyzerToKernel._(resynthesizer, summaryData);
   }
 
   /// Converts the SDK summary to a Kernel component and returns it.
@@ -150,7 +148,11 @@
     var uriToSource = <Uri, Source>{};
 
     void addCompilationUnit(a.CompilationUnitElement unit) {
-      uriToSource[unit.source.uri] = Source(unit.lineInfo.lineStarts, []);
+      uriToSource[unit.source.uri] = Source(
+          unit.lineInfo.lineStarts,
+          [],
+          unit.uri != null ? Uri.base.resolve(unit.uri) : unit.source.uri,
+          unit.source.uri);
     }
 
     for (var uri in bundle.unlinkedUnitUris) {
@@ -867,8 +869,11 @@
 a.StoreBasedSummaryResynthesizer _createSummaryResynthesizer(
     a.SummaryDataStore summaryData, String dartSdkPath) {
   var context = _createContextForSummaries(summaryData, dartSdkPath);
-  return a.StoreBasedSummaryResynthesizer(
+  var resynthesizer = a.StoreBasedSummaryResynthesizer(
       context, null, context.sourceFactory, /*strongMode*/ true, summaryData);
+  resynthesizer.finishCoreAsyncLibraries();
+  context.typeProvider = resynthesizer.typeProvider;
+  return resynthesizer;
 }
 
 /// Creates a dummy Analyzer context so we can use summary resynthesizer.
@@ -890,6 +895,5 @@
       [a.DartUriResolver(sdk), a.InSummaryUriResolver(null, summaryData)]);
   context.useSdkCachePartition = false;
   // TODO(jmesserly): do we need to set analysisOptions or declaredVariables?
-  context.resultProvider = a.InputPackagesResultProvider(context, summaryData);
   return context;
 }
diff --git a/pkg/dev_compiler/lib/src/kernel/command.dart b/pkg/dev_compiler/lib/src/kernel/command.dart
index e7a764c..596b6e6 100644
--- a/pkg/dev_compiler/lib/src/kernel/command.dart
+++ b/pkg/dev_compiler/lib/src/kernel/command.dart
@@ -9,7 +9,6 @@
 import 'package:args/args.dart';
 import 'package:build_integration/file_system/multi_root.dart';
 import 'package:cli_util/cli_util.dart' show getSdkPath;
-import 'package:dev_compiler/src/flutter/track_widget_constructor_locations.dart';
 import 'package:front_end/src/api_unstable/ddc.dart' as fe;
 import 'package:kernel/kernel.dart' hide MapEntry;
 import 'package:kernel/text/ast_to_text.dart' as kernel show Printer;
@@ -20,7 +19,10 @@
 import '../compiler/js_names.dart' as JS;
 import '../compiler/module_builder.dart';
 import '../compiler/shared_command.dart';
+import '../compiler/shared_compiler.dart';
+import '../flutter/track_widget_constructor_locations.dart';
 import '../js_ast/js_ast.dart' as JS;
+import '../js_ast/js_ast.dart' show js;
 import '../js_ast/source_map_printer.dart' show SourceMapPrintingContext;
 
 import 'analyzer_to_kernel.dart';
@@ -33,9 +35,12 @@
 ///
 /// Returns `true` if the program compiled without any fatal errors.
 Future<CompilerResult> compile(List<String> args,
-    {fe.InitializedCompilerState compilerState}) async {
+    {fe.InitializedCompilerState compilerState,
+    bool useIncrementalCompiler: false}) async {
   try {
-    return await _compile(args, compilerState: compilerState);
+    return await _compile(args,
+        compilerState: compilerState,
+        useIncrementalCompiler: useIncrementalCompiler);
   } catch (error, stackTrace) {
     print('''
 We're sorry, you've found a bug in our compiler.
@@ -61,7 +66,8 @@
     '${ddcArgParser.usage}';
 
 Future<CompilerResult> _compile(List<String> args,
-    {fe.InitializedCompilerState compilerState}) async {
+    {fe.InitializedCompilerState compilerState,
+    bool useIncrementalCompiler: false}) async {
   // TODO(jmesserly): refactor options to share code with dartdevc CLI.
   var argParser = ArgParser(allowTrailingOptions: true)
     ..addFlag('help',
@@ -192,15 +198,37 @@
   }
 
   var oldCompilerState = compilerState;
-  compilerState = await fe.initializeCompiler(
-      oldCompilerState,
-      sourcePathToUri(sdkSummaryPath),
-      sourcePathToUri(packageFile),
-      sourcePathToUri(librarySpecPath),
-      summaryModules.keys.toList(),
-      DevCompilerTarget(),
-      fileSystem: fileSystem,
-      experiments: experiments);
+  List<Component> doneInputSummaries;
+  fe.IncrementalCompiler incrementalCompiler;
+  fe.WorkerInputComponent cachedSdkInput;
+  if (useAnalyzer || !useIncrementalCompiler) {
+    compilerState = await fe.initializeCompiler(
+        oldCompilerState,
+        sourcePathToUri(sdkSummaryPath),
+        sourcePathToUri(packageFile),
+        sourcePathToUri(librarySpecPath),
+        summaryModules.keys.toList(),
+        DevCompilerTarget(),
+        fileSystem: fileSystem,
+        experiments: experiments);
+  } else {
+    doneInputSummaries = new List<Component>(summaryModules.length);
+    compilerState = await fe.initializeIncrementalCompiler(
+        oldCompilerState,
+        doneInputSummaries,
+        sourcePathToUri(sdkSummaryPath),
+        sourcePathToUri(packageFile),
+        sourcePathToUri(librarySpecPath),
+        summaryModules.keys.toList(),
+        DevCompilerTarget(),
+        fileSystem: fileSystem,
+        experiments: experiments);
+    incrementalCompiler = compilerState.incrementalCompiler;
+    cachedSdkInput =
+        compilerState.workerInputCache[sourcePathToUri(sdkSummaryPath)];
+  }
+
+  List<Uri> inputSummaries = compilerState.options.inputSummaries;
 
   var output = argResults['out'] as String;
   // TODO(jmesserly): is there a cleaner way to do this?
@@ -217,8 +245,26 @@
     converter.dispose();
   }
 
-  fe.DdcResult result =
-      await fe.compile(compilerState, inputs, diagnosticMessageHandler);
+  var hierarchy;
+  fe.DdcResult result;
+  if (useAnalyzer || !useIncrementalCompiler) {
+    result = await fe.compile(compilerState, inputs, diagnosticMessageHandler);
+  } else {
+    Component incrementalComponent = await incrementalCompiler.computeDelta(
+        entryPoints: inputs, fullComponent: true);
+    hierarchy = incrementalCompiler.userCode.loader.hierarchy;
+    result = new fe.DdcResult(incrementalComponent, doneInputSummaries);
+
+    // Workaround for DDC relying on isExternal being set to true.
+    for (var lib in cachedSdkInput.component.libraries) {
+      lib.isExternal = true;
+    }
+    for (Component c in doneInputSummaries) {
+      for (Library lib in c.libraries) {
+        lib.isExternal = true;
+      }
+    }
+  }
   if (result == null || !succeeded) {
     return CompilerResult(1, kernelState: compilerState);
   }
@@ -254,8 +300,10 @@
     kernel.Printer(sb, showExternal: false).writeComponentFile(component);
     outFiles.add(File(output + '.txt').writeAsString(sb.toString()));
   }
-  var target = compilerState.options.target as DevCompilerTarget;
-  var hierarchy = target.hierarchy;
+  if (hierarchy == null) {
+    var target = compilerState.options.target as DevCompilerTarget;
+    hierarchy = target.hierarchy;
+  }
 
   // TODO(jmesserly): remove this hack once Flutter SDK has a `dartdevc` with
   // support for the widget inspector.
@@ -266,8 +314,8 @@
   var compiler =
       ProgramCompiler(component, hierarchy, options, declaredVariables);
 
-  var jsModule = compiler.emitModule(component, result.inputSummaries,
-      compilerState.options.inputSummaries, summaryModules);
+  var jsModule = compiler.emitModule(
+      component, result.inputSummaries, inputSummaries, summaryModules);
 
   // TODO(jmesserly): support for multiple output formats?
   //
@@ -275,7 +323,8 @@
   // --single-out-file is used, but that option does not appear to be used by
   // any of our build systems.
   var jsCode = jsProgramToCode(jsModule, options.moduleFormats.first,
-      buildSourceMap: argResults['source-map'] as bool,
+      buildSourceMap: options.sourceMap,
+      inlineSourceMap: options.inlineSourceMap,
       jsUrl: path.toUri(output).toString(),
       mapUrl: path.toUri(output + '.map').toString(),
       bazelMapping: options.bazelMapping,
@@ -311,6 +360,7 @@
 
 JSCode jsProgramToCode(JS.Program moduleTree, ModuleFormat format,
     {bool buildSourceMap = false,
+    bool inlineSourceMap = false,
     String jsUrl,
     String mapUrl,
     Map<String, String> bazelMapping,
@@ -344,6 +394,10 @@
   }
 
   var text = printer.getText();
+  var rawSourceMap = inlineSourceMap
+      ? js.escapedString(json.encode(builtMap), "'").value
+      : 'null';
+  text = text.replaceFirst(SharedCompiler.sourceMapLocationID, rawSourceMap);
 
   return JSCode(text, builtMap);
 }
diff --git a/pkg/dev_compiler/lib/src/kernel/compiler.dart b/pkg/dev_compiler/lib/src/kernel/compiler.dart
index a2cba73..6076be4 100644
--- a/pkg/dev_compiler/lib/src/kernel/compiler.dart
+++ b/pkg/dev_compiler/lib/src/kernel/compiler.dart
@@ -32,7 +32,7 @@
 import 'type_table.dart';
 
 class ProgramCompiler extends Object
-    with SharedCompiler<Library, Class>
+    with SharedCompiler<Library, Class, InterfaceType, FunctionNode>
     implements
         StatementVisitor<JS.Statement>,
         ExpressionVisitor<JS.Expression>,
@@ -40,13 +40,6 @@
         ConstantVisitor<JS.Expression> {
   final SharedCompilerOptions options;
 
-  /// The set of libraries we are currently compiling, and the temporaries used
-  /// to refer to them.
-  ///
-  /// We sometimes special case codegen for a single library, as it simplifies
-  /// name scoping requirements.
-  final _libraries = Map<Library, JS.Identifier>.identity();
-
   /// Maps a library URI import, that is not in [_libraries], to the
   /// corresponding Kernel summary module we imported it with.
   final _importToSummary = Map<Library, Component>.identity();
@@ -54,18 +47,12 @@
   /// Maps a summary to the JS import name for the module.
   final _summaryToModule = Map<Component, String>.identity();
 
-  /// Imported libraries, and the temporaries used to refer to them.
-  final _imports = Map<Library, JS.TemporaryId>();
-
   /// The variable for the current catch clause
   VariableDeclaration _rethrowParameter;
 
   /// In an async* function, this represents the stream controller parameter.
   JS.TemporaryId _asyncStarController;
 
-  JS.Identifier _extensionSymbolsModule;
-  final _extensionSymbols = Map<String, JS.TemporaryId>();
-
   Set<Class> _pendingClasses;
 
   /// Temporary variables mapped to their corresponding JavaScript variable.
@@ -100,8 +87,6 @@
 
   FunctionNode _currentFunction;
 
-  List<TypeParameter> _typeParamInConst;
-
   /// Whether we are currently generating code for the body of a `JS()` call.
   bool _isInForeignJS = false;
 
@@ -233,8 +218,24 @@
         syncIterableClass = sdk.getClass('dart:_js_helper', 'SyncIterable'),
         asyncStarImplClass = sdk.getClass('dart:async', '_AsyncStarImpl');
 
+  @override
   Uri get currentLibraryUri => _currentLibrary.importUri;
 
+  @override
+  Library get currentLibrary => _currentLibrary;
+
+  @override
+  Library get coreLibrary => coreTypes.coreLibrary;
+
+  @override
+  FunctionNode get currentFunction => _currentFunction;
+
+  @override
+  InterfaceType get privateSymbolType => privateSymbolClass.rawType;
+
+  @override
+  InterfaceType get internalSymbolType => coreTypes.internalSymbolClass.rawType;
+
   bool get emitMetadata => options.emitMetadata;
 
   JS.Program emitModule(Component component, List<Component> summaries,
@@ -255,47 +256,11 @@
     }
 
     var libraries = component.libraries.where((l) => !l.isExternal);
-    var ddcRuntime =
-        libraries.firstWhere(isSdkInternalRuntime, orElse: () => null);
-    if (ddcRuntime != null) {
-      // Don't allow these to be renamed when we're building the SDK.
-      // There is JS code in dart:* that depends on their names.
-      runtimeModule = JS.Identifier('dart');
-      _extensionSymbolsModule = JS.Identifier('dartx');
-      _nullableInference.allowNotNullDeclarations = true;
-    } else {
-      // Otherwise allow these to be renamed so users can write them.
-      runtimeModule = JS.TemporaryId('dart');
-      _extensionSymbolsModule = JS.TemporaryId('dartx');
-    }
-    _typeTable = TypeTable(runtimeModule);
 
     // Initialize our library variables.
-    var items = <JS.ModuleItem>[];
-    var exports = <JS.NameSpecifier>[];
-    // TODO(jmesserly): this is a performance optimization for V8 to prevent it
-    // from treating our Dart library objects as JS Maps.
-    var root = JS.Identifier('_root');
-    items.add(js.statement('const # = Object.create(null)', [root]));
-
-    void emitLibrary(JS.Identifier id) {
-      items.add(js.statement('const # = Object.create(#)', [id, root]));
-      exports.add(JS.NameSpecifier(id));
-    }
-
-    for (var library in libraries) {
-      var libraryTemp = library == ddcRuntime
-          ? runtimeModule
-          : JS.TemporaryId(jsLibraryName(library));
-      _libraries[library] = libraryTemp;
-      emitLibrary(libraryTemp);
-    }
-
-    // dart:_runtime has a magic module that holds extension method symbols.
-    // TODO(jmesserly): find a cleaner design for this.
-    if (ddcRuntime != null) emitLibrary(_extensionSymbolsModule);
-
-    items.add(JS.ExportDeclaration(JS.ExportClause(exports)));
+    var items = startModule(libraries);
+    _nullableInference.allowNotNullDeclarations = isBuildingSdk;
+    _typeTable = TypeTable(runtimeModule);
 
     // Collect all class/type Element -> Node mappings
     // in case we need to forward declare any classes.
@@ -320,53 +285,54 @@
     // Visit directives (for exports)
     libraries.forEach(_emitExports);
 
-    // Declare imports
-    _finishImports(items);
-    // Initialize extension symbols
-    _extensionSymbols.forEach((name, id) {
-      JS.Expression value =
-          JS.PropertyAccess(_extensionSymbolsModule, _propertyName(name));
-      if (ddcRuntime != null) {
-        value = js.call('# = Symbol(#)', [value, js.string("dartx.$name")]);
-      }
-      items.add(js.statement('const # = #;', [id, value]));
-    });
+    // Declare imports and extension symbols
+    emitImportsAndExtensionSymbols(items);
 
     // Discharge the type table cache variables and
     // hoisted definitions.
     items.addAll(_typeTable.discharge());
 
-    // Add the module's code (produced by visiting compilation units, above)
-    _copyAndFlattenBlocks(items, moduleItems);
-
-    // Build the module.
-    return JS.Program(items, name: options.moduleName);
+    return finishModule(items, options.moduleName);
   }
 
-  /// Flattens blocks in [items] to a single list.
-  ///
-  /// This will not flatten blocks that are marked as being scopes.
-  void _copyAndFlattenBlocks(
-      List<JS.ModuleItem> result, Iterable<JS.ModuleItem> items) {
-    for (var item in items) {
-      if (item is JS.Block && !item.isScope) {
-        _copyAndFlattenBlocks(result, item.statements);
-      } else if (item != null) {
-        result.add(item);
-      }
+  @override
+  String jsLibraryName(Library library) {
+    var uri = library.importUri;
+    if (uri.scheme == 'dart') return uri.path;
+
+    // TODO(vsm): This is not necessarily unique if '__' appears in a file name.
+    Iterable<String> segments;
+    if (uri.scheme == 'package') {
+      // Strip the package name.
+      // TODO(vsm): This is not unique if an escaped '/'appears in a filename.
+      // E.g., "foo/bar.dart" and "foo__bar.dart" would collide.
+      segments = uri.pathSegments.skip(1);
+    } else {
+      // TODO(jmesserly): this is not unique typically.
+      segments = [uri.pathSegments.last];
     }
+
+    var qualifiedPath = segments.map((p) => p == '..' ? '' : p).join('__');
+    return pathToJSIdentifier(qualifiedPath);
   }
 
-  /// Returns the canonical name to refer to the Dart library.
-  JS.Identifier emitLibraryName(Library library) {
-    // It's either one of the libraries in this module, or it's an import.
-    return _libraries[library] ??
-        _imports.putIfAbsent(
-            library, () => JS.TemporaryId(jsLibraryName(library)));
+  @override
+  String jsLibraryDebuggerName(Library library) {
+    var uri = library.importUri;
+    // For package: and dart: uris show the entire
+    if (uri.scheme == 'dart' || uri.scheme == 'package') return uri.toString();
+    // TODO(jmesserly): this is not unique typically.
+    return uri.pathSegments.last;
   }
 
-  String _libraryToModule(Library library) {
-    assert(!_libraries.containsKey(library));
+  @override
+  bool isSdkInternalRuntime(Library l) {
+    var uri = l.importUri;
+    return uri.scheme == 'dart' && uri.path == '_runtime';
+  }
+
+  @override
+  String libraryToModule(Library library) {
     if (library.importUri.scheme == 'dart') {
       // TODO(jmesserly): we need to split out HTML.
       return JS.dartSdkModule;
@@ -380,39 +346,6 @@
     return moduleName;
   }
 
-  void _finishImports(List<JS.ModuleItem> items) {
-    var modules = Map<String, List<Library>>();
-
-    for (var import in _imports.keys) {
-      modules.putIfAbsent(_libraryToModule(import), () => []).add(import);
-    }
-
-    String coreModuleName;
-    if (!_libraries.containsKey(coreTypes.coreLibrary)) {
-      coreModuleName = _libraryToModule(coreTypes.coreLibrary);
-    }
-    modules.forEach((module, libraries) {
-      // Generate import directives.
-      //
-      // Our import variables are temps and can get renamed. Since our renaming
-      // is integrated into js_ast, it is aware of this possibility and will
-      // generate an "as" if needed. For example:
-      //
-      //     import {foo} from 'foo';         // if no rename needed
-      //     import {foo as foo$} from 'foo'; // if rename was needed
-      //
-      var imports =
-          libraries.map((l) => JS.NameSpecifier(_imports[l])).toList();
-      if (module == coreModuleName) {
-        imports.add(JS.NameSpecifier(runtimeModule));
-        imports.add(JS.NameSpecifier(_extensionSymbolsModule));
-      }
-
-      items.add(JS.ImportDeclaration(
-          namedImports: imports, from: js.string(module, "'")));
-    });
-  }
-
   void _emitLibrary(Library library) {
     // NOTE: this method isn't the right place to initialize per-library state.
     // Classes can be visited out of order, so this is only to catch things that
@@ -1119,25 +1052,6 @@
     return runtimeStatement('addTypeTests(#, #)', [defaultInst, isClassSymbol]);
   }
 
-  JS.Expression _emitDartSymbol(String symbolName) {
-    // TODO(vsm): Handle qualified symbols correctly.
-    var last = symbolName.split('.').last;
-    var name = js.escapedString(symbolName, "'");
-    if (last.startsWith('_')) {
-      var nativeSymbol = emitPrivateNameSymbol(_currentLibrary, last);
-      return js.call('new #.new(#, #)', [
-        _emitConstructorAccess(privateSymbolClass.rawType),
-        name,
-        nativeSymbol
-      ]);
-    } else {
-      return js.call('new #.new(#)', [
-        _emitConstructorAccess(coreTypes.internalSymbolClass.rawType),
-        name
-      ]);
-    }
-  }
-
   void _emitDartSymbols(
       Iterable<JS.TemporaryId> vars, List<JS.ModuleItem> body) {
     for (var id in vars) {
@@ -1211,7 +1125,7 @@
       if (extensions.isEmpty) return;
 
       var names = extensions
-          .map((e) => _propertyName(JS.memberNameForDartMember(e)))
+          .map((e) => propertyName(JS.memberNameForDartMember(e)))
           .toList();
       body.add(js.statement('#.#(#, #);', [
         runtimeModule,
@@ -1232,11 +1146,13 @@
     var savedClass = _classEmittingSignatures;
     _classEmittingSignatures = c;
 
-    if (c.implementedTypes.isNotEmpty) {
+    var interfaces = List.from(c.implementedTypes)
+      ..addAll(c.superclassConstraints());
+    if (interfaces.isNotEmpty) {
       body.add(js.statement('#[#.implements] = () => [#];', [
         className,
         runtimeModule,
-        c.implementedTypes.map((i) => _emitType(i.asInterfaceType))
+        interfaces.map((i) => _emitType(i.asInterfaceType))
       ]));
     }
 
@@ -1247,7 +1163,7 @@
         var proto = c == coreTypes.objectClass
             ? js.call('Object.create(null)')
             : runtimeCall('get${name}s(#.__proto__)', [className]);
-        elements.insert(0, JS.Property(_propertyName('__proto__'), proto));
+        elements.insert(0, JS.Property(propertyName('__proto__'), proto));
       }
       body.add(runtimeStatement('set${name}Signature(#, () => #)', [
         className,
@@ -1488,7 +1404,7 @@
   JS.Expression _constructorName(String name) {
     if (name == '') {
       // Default constructors (factory or not) use `new` as their name.
-      return _propertyName('new');
+      return propertyName('new');
     }
     return _emitStaticMemberName(name);
   }
@@ -1666,7 +1582,7 @@
       // Dart does not use ES6 constructors.
       // Add an error to catch any invalid usage.
       jsMethods
-          .add(JS.Method(_propertyName('constructor'), js.fun(r'''function() {
+          .add(JS.Method(propertyName('constructor'), js.fun(r'''function() {
                   throw Error("use `new " + #.typeName(#.getReifiedType(this)) +
                       ".new(...)` to create a Dart object");
               }''', [runtimeModule, runtimeModule])));
@@ -1872,7 +1788,7 @@
       if (isCovariantParameter(param) &&
           !isCovariantParameter(superMember.function.namedParameters
               .firstWhere((n) => n.name == param.name))) {
-        var name = _propertyName(param.name);
+        var name = propertyName(param.name);
         var paramType = superMethodType.namedParameters
             .firstWhere((n) => n.name == param.name);
         body.add(js.statement('if (# in #) #;', [
@@ -1901,7 +1817,7 @@
       ..sourceInformation = _nodeEnd(node.fileEndOffset);
   }
 
-  /// Emits an expression that lets you access statics on a [type] from code.
+  @override
   JS.Expression emitConstructorAccess(InterfaceType type) {
     return _emitJSInterop(type.classNode) ?? visitInterfaceType(type);
   }
@@ -2213,41 +2129,32 @@
       var runtimeName = getJSExportName(member);
       if (runtimeName != null) {
         var parts = runtimeName.split('.');
-        if (parts.length < 2) return _propertyName(runtimeName);
+        if (parts.length < 2) return propertyName(runtimeName);
 
         JS.Expression result = JS.Identifier(parts[0]);
         for (int i = 1; i < parts.length; i++) {
-          result = JS.PropertyAccess(result, _propertyName(parts[i]));
+          result = JS.PropertyAccess(result, propertyName(parts[i]));
         }
         return result;
       }
     }
 
+    memberClass ??= member?.enclosingClass;
     if (name.startsWith('_')) {
-      return emitPrivateNameSymbol(_currentLibrary, name);
+      // Use the library that this private member's name is scoped to.
+      var memberLibrary = member?.name?.library ??
+          memberClass?.enclosingLibrary ??
+          _currentLibrary;
+      return emitPrivateNameSymbol(memberLibrary, name);
     }
 
-    memberClass ??= member?.enclosingClass;
     useExtension ??= _isSymbolizedMember(memberClass, name);
     name = JS.memberNameForDartMember(
         name, member is Procedure && member.isExternal);
     if (useExtension) {
-      return _getExtensionSymbolInternal(name);
+      return getExtensionSymbolInternal(name);
     }
-    return _propertyName(name);
-  }
-
-  /// This is an internal method used by [_emitMemberName] and the
-  /// optimized `dart:_runtime extensionSymbol` builtin to get the symbol
-  /// for `dartx.<name>`.
-  ///
-  /// Do not call this directly; you want [_emitMemberName], which knows how to
-  /// handle the many details involved in naming.
-  JS.TemporaryId _getExtensionSymbolInternal(String name) {
-    return _extensionSymbols.putIfAbsent(
-        name,
-        () => JS.TemporaryId(
-            '\$${JS.friendlyNameForDartOperator[name] ?? name}'));
+    return propertyName(name);
   }
 
   /// Don't symbolize native members that just forward to the underlying
@@ -2326,7 +2233,7 @@
           name += '_';
         }
     }
-    return _propertyName(name);
+    return propertyName(name);
   }
 
   JS.Expression _emitJSInteropStaticMemberName(NamedNode n) {
@@ -2356,7 +2263,7 @@
   /// function does not handle JS interop.
   JS.Expression _emitTopLevelMemberName(NamedNode n, {String suffix = ''}) {
     var name = getJSExportName(n) ?? getTopLevelName(n);
-    return _propertyName(name + suffix);
+    return propertyName(name + suffix);
   }
 
   String _getJSNameWithoutGlobal(NamedNode n) {
@@ -2409,7 +2316,7 @@
 
     var name = node.name.name;
     var result = JS.Method(
-        _propertyName(name), _emitFunction(node.function, node.name.name),
+        propertyName(name), _emitFunction(node.function, node.name.name),
         isGetter: node.isGetter, isSetter: node.isSetter)
       ..sourceInformation = _nodeEnd(node.fileEndOffset);
 
@@ -2704,7 +2611,7 @@
 
   JS.ObjectInitializer _emitTypeProperties(Iterable<NamedType> types) {
     return JS.ObjectInitializer(types
-        .map((t) => JS.Property(_propertyName(t.name), _emitType(t.type)))
+        .map((t) => JS.Property(propertyName(t.name), _emitType(t.type)))
         .toList());
   }
 
@@ -2725,7 +2632,6 @@
   visitTypeParameterType(type) => _emitTypeParameter(type.parameter);
 
   JS.Identifier _emitTypeParameter(TypeParameter t) {
-    _typeParamInConst?.add(t);
     return JS.Identifier(getTypeParameterName(t));
   }
 
@@ -2814,7 +2720,7 @@
         }
 
         gen.sourceInformation = _nodeEnd(function.fileEndOffset);
-        if (JS.This.foundIn(gen)) gen = js.call('#.bind(this)', gen);
+        if (usesThisOrSuper(gen)) gen = js.call('#.bind(this)', gen);
       });
 
       _asyncStarController = savedController;
@@ -3025,7 +2931,7 @@
         body.add(runtimeStatement('checkTypeBound(#, #, #)', [
           _emitType(TypeParameterType(t)),
           _emitType(t.bound),
-          _propertyName(t.name)
+          propertyName(t.name)
         ]));
       }
     }
@@ -3665,11 +3571,7 @@
 
     var name = _emitVariableDef(node.variable);
     JS.Statement declareFn;
-    if (JS.This.foundIn(fn)) {
-      declareFn = js.statement('const # = #.bind(this);', [name, fn]);
-    } else {
-      declareFn = JS.FunctionDeclaration(name, fn);
-    }
+    declareFn = toBoundFunctionStatement(fn, name);
     if (_reifyFunctionType(func)) {
       declareFn = JS.Block([
         declareFn,
@@ -3839,10 +3741,9 @@
   @override
   visitStaticGet(StaticGet node) {
     var target = node.target;
-    if (target is Field && target.isConst) {
-      var value = _constants.evaluate(target.initializer, cache: true);
-      if (value is PrimitiveConstant) return value.accept(this);
-    }
+
+    // TODO(vsm): Re-inline constants.  See:
+    // https://github.com/dart-lang/sdk/issues/36285
 
     // TODO(markzipan): reifyTearOff check can be removed when we enable
     // front-end constant evaluation because static tear-offs will be
@@ -4406,7 +4307,7 @@
         return _emitType(firstArg.type);
       }
       if (name == 'extensionSymbol' && firstArg is StringLiteral) {
-        return _getExtensionSymbolInternal(firstArg.value);
+        return getExtensionSymbolInternal(firstArg.value);
       }
     }
     if (target == coreTypes.identicalProcedure) {
@@ -4467,8 +4368,9 @@
   JS.Expression _emitStaticTarget(Member target) {
     var c = target.enclosingClass;
     if (c != null) {
-      // A static native element should just forward directly to the
-      // JS type's member.
+      // A static native element should just forward directly to the JS type's
+      // member, for example `Css.supports(...)` in dart:html should be replaced
+      // by a direct call to the DOM API: `global.CSS.supports`.
       if (target is Procedure && target.isStatic && target.isExternal) {
         var nativeName = _extensionTypes.getNativePeers(c);
         if (nativeName.isNotEmpty) {
@@ -4509,7 +4411,7 @@
   }
 
   JS.Property _emitNamedExpression(NamedExpression arg) {
-    return JS.Property(_propertyName(arg.name), _visitExpression(arg.value));
+    return JS.Property(propertyName(arg.name), _visitExpression(arg.value));
   }
 
   /// Emits code for the `JS(...)` macro.
@@ -4623,12 +4525,10 @@
   visitConstructorInvocation(ConstructorInvocation node) {
     var ctor = node.target;
     var args = node.arguments;
-    JS.Expression emitNew() {
-      return JS.New(_emitConstructorName(node.constructedType, ctor),
-          _emitArgumentList(args, types: false));
-    }
+    var result = JS.New(_emitConstructorName(node.constructedType, ctor),
+        _emitArgumentList(args, types: false));
 
-    return node.isConst ? _emitConst(emitNew) : emitNew();
+    return node.isConst ? canonicalizeConstObject(result) : result;
   }
 
   JS.Expression _emitFactoryInvocation(StaticInvocation node) {
@@ -4681,12 +4581,10 @@
       }
     }
 
-    JS.Expression emitNew() {
-      return JS.Call(_emitConstructorName(type, ctor),
-          _emitArgumentList(args, types: false));
-    }
+    var result = JS.Call(_emitConstructorName(type, ctor),
+        _emitArgumentList(args, types: false));
 
-    return node.isConst ? _emitConst(emitNew) : emitNew();
+    return node.isConst ? canonicalizeConstObject(result) : result;
   }
 
   JS.Expression _emitJSInteropNew(Member ctor, Arguments args) {
@@ -4777,19 +4675,73 @@
   @override
   visitListConcatenation(ListConcatenation node) {
     // Only occurs inside unevaluated constants.
-    throw new UnsupportedError("List concatenation");
+    List<JS.Expression> entries = [];
+    _concatenate(Expression node) {
+      if (node is ListConcatenation)
+        node.lists.forEach(_concatenate);
+      else {
+        node.accept(this);
+        if (node is ConstantExpression) {
+          var list = node.constant as ListConstant;
+          entries.addAll(list.entries.map(visitConstant));
+        } else if (node is ListLiteral) {
+          entries.addAll(node.expressions.map(_visitExpression));
+        }
+      }
+    }
+
+    node.lists.forEach(_concatenate);
+    return _emitConstList(node.typeArgument, entries);
   }
 
   @override
   visitSetConcatenation(SetConcatenation node) {
     // Only occurs inside unevaluated constants.
-    throw new UnsupportedError("Set concatenation");
+    List<JS.Expression> entries = [];
+    _concatenate(Expression node) {
+      if (node is SetConcatenation)
+        node.sets.forEach(_concatenate);
+      else {
+        node.accept(this);
+        if (node is ConstantExpression) {
+          var set = node.constant as SetConstant;
+          entries.addAll(set.entries.map(visitConstant));
+        } else if (node is SetLiteral) {
+          entries.addAll(node.expressions.map(_visitExpression));
+        }
+      }
+    }
+
+    node.sets.forEach(_concatenate);
+    return _emitConstSet(node.typeArgument, entries);
   }
 
   @override
   visitMapConcatenation(MapConcatenation node) {
     // Only occurs inside unevaluated constants.
-    throw new UnsupportedError("Map concatenation");
+    List<JS.Expression> entries = [];
+    _concatenate(Expression node) {
+      if (node is MapConcatenation)
+        node.maps.forEach(_concatenate);
+      else {
+        node.accept(this);
+        if (node is ConstantExpression) {
+          var map = node.constant as MapConstant;
+          for (var entry in map.entries) {
+            entries.add(visitConstant(entry.key));
+            entries.add(visitConstant(entry.value));
+          }
+        } else if (node is MapLiteral) {
+          for (var entry in node.entries) {
+            entries.add(_visitExpression(entry.key));
+            entries.add(_visitExpression(entry.value));
+          }
+        }
+      }
+    }
+
+    node.maps.forEach(_concatenate);
+    return _emitConstMap(node.keyType, node.valueType, entries);
   }
 
   @override
@@ -4863,31 +4815,7 @@
   }
 
   @override
-  visitSymbolLiteral(SymbolLiteral node) {
-    return _emitConst(() => _emitDartSymbol(node.value));
-  }
-
-  JS.Expression _cacheConst(JS.Expression expr()) {
-    var savedTypeParams = _typeParamInConst;
-    _typeParamInConst = [];
-
-    var jsExpr = expr();
-
-    bool usesTypeParams = _typeParamInConst.isNotEmpty;
-    _typeParamInConst = savedTypeParams;
-
-    // TODO(jmesserly): if it uses type params we can still hoist it up as far
-    // as it will go, e.g. at the level the generic class is defined where type
-    // params are available.
-    if (_currentFunction == null || usesTypeParams) return jsExpr;
-
-    var temp = JS.TemporaryId('const');
-    moduleItems.add(js.statement('let #;', [temp]));
-    return js.call('# || (# = #)', [temp, temp, jsExpr]);
-  }
-
-  JS.Expression _emitConst(JS.Expression expr()) =>
-      _cacheConst(() => runtimeCall('const(#)', expr()));
+  visitSymbolLiteral(SymbolLiteral node) => emitDartSymbol(node.value);
 
   @override
   visitTypeLiteral(TypeLiteral node) => _emitTypeLiteral(node.type);
@@ -4914,37 +4842,12 @@
   @override
   visitListLiteral(ListLiteral node) {
     var elementType = node.typeArgument;
+    var elements = _visitExpressionList(node.expressions);
     // TODO(markzipan): remove const check when we use front-end const eval
     if (!node.isConst) {
-      return _emitList(elementType, _visitExpressionList(node.expressions));
+      return _emitList(elementType, elements);
     }
-    return _cacheConst(() =>
-        _emitConstList(elementType, _visitExpressionList(node.expressions)));
-  }
-
-  @override
-  visitSetLiteral(SetLiteral node) {
-    // TODO(markzipan): remove const check when we use front-end const eval
-    if (!node.isConst) {
-      var setType = visitInterfaceType(
-          InterfaceType(linkedHashSetClass, [node.typeArgument]));
-      if (node.expressions.isEmpty) {
-        return js.call('#.new()', [setType]);
-      }
-      return js.call(
-          '#.from([#])', [setType, _visitExpressionList(node.expressions)]);
-    }
-    return _cacheConst(() => runtimeCall('constSet(#, [#])', [
-          _emitType(node.typeArgument),
-          _visitExpressionList(node.expressions)
-        ]));
-  }
-
-  JS.Expression _emitConstList(
-      DartType elementType, List<JS.Expression> elements) {
-    // dart.constList helper internally depends on _interceptors.JSArray.
-    _declareBeforeUse(_jsArrayClass);
-    return runtimeCall('constList([#], #)', [elements, _emitType(elementType)]);
+    return _emitConstList(elementType, elements);
   }
 
   JS.Expression _emitList(DartType itemType, List<JS.Expression> items) {
@@ -4960,15 +4863,42 @@
     return js.call('#.of(#)', [_emitType(arrayType), list]);
   }
 
+  JS.Expression _emitConstList(
+      DartType elementType, List<JS.Expression> elements) {
+    // dart.constList helper internally depends on _interceptors.JSArray.
+    _declareBeforeUse(_jsArrayClass);
+    return cacheConst(
+        runtimeCall('constList([#], #)', [elements, _emitType(elementType)]));
+  }
+
+  @override
+  visitSetLiteral(SetLiteral node) {
+    // TODO(markzipan): remove const check when we use front-end const eval
+    if (!node.isConst) {
+      var setType = visitInterfaceType(
+          InterfaceType(linkedHashSetClass, [node.typeArgument]));
+      if (node.expressions.isEmpty) {
+        return js.call('#.new()', [setType]);
+      }
+      return js.call(
+          '#.from([#])', [setType, _visitExpressionList(node.expressions)]);
+    }
+    return _emitConstSet(
+        node.typeArgument, _visitExpressionList(node.expressions));
+  }
+
+  JS.Expression _emitConstSet(
+      DartType elementType, List<JS.Expression> elements) {
+    return cacheConst(
+        runtimeCall('constSet(#, [#])', [_emitType(elementType), elements]));
+  }
+
   @override
   visitMapLiteral(MapLiteral node) {
-    emitEntries() {
-      var entries = <JS.Expression>[];
-      for (var e in node.entries) {
-        entries.add(_visitExpression(e.key));
-        entries.add(_visitExpression(e.value));
-      }
-      return JS.ArrayInitializer(entries);
+    var entries = <JS.Expression>[];
+    for (var e in node.entries) {
+      entries.add(_visitExpression(e.key));
+      entries.add(_visitExpression(e.value));
     }
 
     // TODO(markzipan): remove const check when we use front-end const eval
@@ -4978,10 +4908,15 @@
       if (node.entries.isEmpty) {
         return js.call('new #.new()', [mapType]);
       }
-      return js.call('new #.from(#)', [mapType, emitEntries()]);
+      return js.call('new #.from([#])', [mapType, entries]);
     }
-    return _cacheConst(() => runtimeCall('constMap(#, #, #)',
-        [_emitType(node.keyType), _emitType(node.valueType), emitEntries()]));
+    return _emitConstMap(node.keyType, node.valueType, entries);
+  }
+
+  JS.Expression _emitConstMap(
+      DartType keyType, DartType valueType, List<JS.Expression> entries) {
+    return cacheConst(runtimeCall('constMap(#, #, [#])',
+        [_emitType(keyType), _emitType(valueType), entries]));
   }
 
   @override
@@ -5159,44 +5094,29 @@
   // are emitted via their normal expression nodes.
   @override
   defaultConstant(Constant node) => _emitInvalidNode(node);
+
   @override
-  visitSymbolConstant(node) {
-    return _emitConst(() => _emitDartSymbol(node.name));
-  }
+  visitSymbolConstant(node) => emitDartSymbol(node.name);
 
   @override
   visitMapConstant(node) {
-    emitEntries() {
-      var entries = <JS.Expression>[];
-      for (var e in node.entries) {
-        entries.add(visitConstant(e.key));
-        entries.add(visitConstant(e.value));
-      }
-      return JS.ArrayInitializer(entries);
+    var entries = <JS.Expression>[];
+    for (var e in node.entries) {
+      entries.add(visitConstant(e.key));
+      entries.add(visitConstant(e.value));
     }
 
-    return _cacheConst(() => runtimeCall('constMap(#, #, #)',
-        [_emitType(node.keyType), _emitType(node.valueType), emitEntries()]));
+    return _emitConstMap(node.keyType, node.valueType, entries);
   }
 
   @override
-  visitListConstant(node) => visitConstantList(node.typeArgument, node.entries);
-
-  /// Visits [Constant] with [_visitConstant].
-  visitConstantList(DartType typeArgument, List<Constant> entries) {
-    return _cacheConst(() =>
-        _emitConstList(typeArgument, entries.map(visitConstant).toList()));
-  }
+  visitListConstant(node) => _emitConstList(
+      node.typeArgument, node.entries.map(visitConstant).toList());
 
   @override
   visitSetConstant(node) {
-    // Set literals are currently desugared in the frontend.
-    // Implement this method before flipping the supportsSetLiterals flag
-    // in DevCompilerTarget to true.
-    return _cacheConst(() => runtimeCall('constSet(#, #)', [
-          _emitType(node.typeArgument),
-          visitConstantList(node.typeArgument, node.entries)
-        ]));
+    return _emitConstSet(
+        node.typeArgument, node.entries.map(visitConstant).toList());
   }
 
   @override
@@ -5205,21 +5125,17 @@
       var field = entry.key.asField.name.name;
       var constant = entry.value.accept(this);
       var member = entry.key.asField;
-      var prevLibrary = _currentLibrary;
-      _currentLibrary = member.enclosingLibrary;
       var result =
           JS.Property(_emitMemberName(field, member: member), constant);
-      _currentLibrary = prevLibrary;
       return result;
     }
 
     var type = visitInterfaceType(node.getType(types) as InterfaceType);
-    JS.Expression prototype = js("#.prototype", [type]);
-    JS.Property proto_prop = JS.Property(_propertyName("__proto__"), prototype);
-    List<JS.Property> properties = [proto_prop]
+    var prototype = js.call("#.prototype", [type]);
+    var properties = [JS.Property(propertyName("__proto__"), prototype)]
       ..addAll(node.fieldValues.entries.map(entryToProperty));
-    var objectInit = JS.ObjectInitializer(properties, multiline: true);
-    return _emitConst(() => objectInit);
+    return canonicalizeConstObject(
+        JS.ObjectInitializer(properties, multiline: true));
   }
 
   @override
@@ -5249,39 +5165,6 @@
   }
 }
 
-bool isSdkInternalRuntime(Library l) =>
-    l.importUri.toString() == 'dart:_runtime';
-
-/// Choose a canonical name from the [library] element.
-///
-/// This never uses the library's name (the identifier in the `library`
-/// declaration) as it doesn't have any meaningful rules enforced.
-String jsLibraryName(Library library) {
-  var uri = library.importUri;
-  if (uri.scheme == 'dart') return uri.path;
-
-  // TODO(vsm): This is not necessarily unique if '__' appears in a file name.
-  Iterable<String> segments;
-  if (uri.scheme == 'package') {
-    // Strip the package name.
-    // TODO(vsm): This is not unique if an escaped '/'appears in a filename.
-    // E.g., "foo/bar.dart" and "foo__bar.dart" would collide.
-    segments = uri.pathSegments.skip(1);
-  } else {
-    // TODO(jmesserly): this is not unique typically.
-    segments = [uri.pathSegments.last];
-  }
-
-  var qualifiedPath = segments.map((p) => p == '..' ? '' : p).join('__');
-  return pathToJSIdentifier(qualifiedPath);
-}
-
-/// Shorthand for identifier-like property names.
-/// For now, we emit them as strings and the printer restores them to
-/// identifiers if it can.
-// TODO(jmesserly): avoid the round tripping through quoted form.
-JS.LiteralString _propertyName(String name) => js.string(name, "'");
-
 bool _isInlineJSFunction(Statement body) {
   var block = body;
   if (block is Block) {
diff --git a/pkg/dev_compiler/lib/src/kernel/constants.dart b/pkg/dev_compiler/lib/src/kernel/constants.dart
index 5f1e815..7f550cb 100644
--- a/pkg/dev_compiler/lib/src/kernel/constants.dart
+++ b/pkg/dev_compiler/lib/src/kernel/constants.dart
@@ -2,9 +2,14 @@
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
 
+// TODO(askesc): We should not need to call the constant evaluator
+// explicitly once constant-update-2018 is shipped.
+import 'package:front_end/src/api_prototype/constant_evaluator.dart'
+    show ConstantEvaluator, SimpleErrorReporter;
+
 import 'package:kernel/core_types.dart';
 import 'package:kernel/kernel.dart';
-import 'package:kernel/transformations/constants.dart';
+import 'package:kernel/target/targets.dart';
 import 'package:kernel/type_environment.dart';
 import 'kernel_helpers.dart';
 
@@ -29,27 +34,11 @@
   /// failed, or if the constant was unavailable.
   ///
   /// Returns [NullConstant] to represent the `null` value.
-  ///
-  /// To avoid performance costs associated with try+catch on invalid constant
-  /// evaluation, call this after [isConstant] is known to be true.
-  Constant evaluate(Expression e, {bool cache = false}) {
+  Constant evaluate(Expression e) {
     if (e == null) return null;
 
-    try {
-      var result = cache ? _evaluator.evaluate(e) : e.accept(_evaluator);
-      return result is UnevaluatedConstant ? null : result;
-    } on _AbortCurrentEvaluation {
-      // TODO(jmesserly): the try+catch is necessary because the front end is
-      // not issuing sufficient errors, so the constant evaluation can fail.
-      //
-      // It can also be caused by methods in the evaluator that don't understand
-      // unavailable constants.
-      return null;
-    } on NoSuchMethodError {
-      // TODO(jmesserly): this is probably the same issue as above, but verify
-      // that it's fixed once Kernel does constant evaluation.
-      return null;
-    }
+    Constant result = _evaluator.evaluate(e);
+    return result is UnevaluatedConstant ? null : result;
   }
 
   /// If [node] is an annotation with a field named `name`, returns that field's
@@ -179,12 +168,7 @@
 class _ErrorReporter extends SimpleErrorReporter {
   const _ErrorReporter();
 
+  // Ignore reported errors.
   @override
-  report(context, message, node) => throw const _AbortCurrentEvaluation();
-}
-
-// TODO(jmesserly): this class is private in Kernel constants library, so
-// we have our own version.
-class _AbortCurrentEvaluation {
-  const _AbortCurrentEvaluation();
+  reportMessage(Uri uri, int offset, String message) {}
 }
diff --git a/pkg/dev_compiler/lib/src/kernel/target.dart b/pkg/dev_compiler/lib/src/kernel/target.dart
index db69224..4b08093 100644
--- a/pkg/dev_compiler/lib/src/kernel/target.dart
+++ b/pkg/dev_compiler/lib/src/kernel/target.dart
@@ -8,7 +8,6 @@
 import 'package:kernel/core_types.dart';
 import 'package:kernel/class_hierarchy.dart';
 import 'package:kernel/target/targets.dart';
-import 'package:kernel/transformations/constants.dart' show ConstantsBackend;
 import 'constants.dart' show DevCompilerConstantsBackend;
 import 'kernel_helpers.dart';
 
diff --git a/pkg/dev_compiler/tool/input_sdk/patch/convert_patch.dart b/pkg/dev_compiler/tool/input_sdk/patch/convert_patch.dart
index 787c677..7ff6d09 100644
--- a/pkg/dev_compiler/tool/input_sdk/patch/convert_patch.dart
+++ b/pkg/dev_compiler/tool/input_sdk/patch/convert_patch.dart
@@ -373,7 +373,7 @@
  */
 // TODO(floitsch): don't accumulate everything before starting to decode.
 class _JsonDecoderSink extends _StringSinkConversionSink {
-  final _Reviver _reviver;
+  final Function(Object key, Object value) _reviver;
   final Sink<Object> _sink;
 
   _JsonDecoderSink(this._reviver, this._sink) : super(StringBuffer(''));
diff --git a/pkg/dev_compiler/tool/input_sdk/patch/isolate_patch.dart b/pkg/dev_compiler/tool/input_sdk/patch/isolate_patch.dart
index 999f518..9ccdada 100644
--- a/pkg/dev_compiler/tool/input_sdk/patch/isolate_patch.dart
+++ b/pkg/dev_compiler/tool/input_sdk/patch/isolate_patch.dart
@@ -15,6 +15,9 @@
   static Isolate get current => _unsupported();
 
   @patch
+  String get debugName => _unsupported();
+
+  @patch
   static Future<Uri> get packageRoot => _unsupported();
 
   @patch
diff --git a/pkg/dev_compiler/tool/input_sdk/private/ddc_runtime/operations.dart b/pkg/dev_compiler/tool/input_sdk/private/ddc_runtime/operations.dart
index b3865c1..6f67aa9 100644
--- a/pkg/dev_compiler/tool/input_sdk/private/ddc_runtime/operations.dart
+++ b/pkg/dev_compiler/tool/input_sdk/private/ddc_runtime/operations.dart
@@ -254,6 +254,10 @@
     // We're not a function (and hence not a method either)
     // Grab the `call` method if it's not a function.
     if ($f != null) {
+      // Getting the member succeeded, so update the originalTarget.
+      // (we're now trying `call()` on `f`, so we want to call its nSM rather
+      // than the original target's nSM).
+      originalTarget = f;
       $f = ${bindCall(f, _canonicalMember(f, 'call'))};
       $ftype = null;
     }
diff --git a/pkg/dev_compiler/tool/input_sdk/private/ddc_runtime/runtime.dart b/pkg/dev_compiler/tool/input_sdk/private/ddc_runtime/runtime.dart
index 7b161fb..665aae3 100644
--- a/pkg/dev_compiler/tool/input_sdk/private/ddc_runtime/runtime.dart
+++ b/pkg/dev_compiler/tool/input_sdk/private/ddc_runtime/runtime.dart
@@ -147,6 +147,22 @@
 
 final JsSymbol = JS('', 'Symbol');
 
+/// The prototype used for all Dart libraries.
+///
+/// This makes it easy to identify Dart library objects, and also improves
+/// performance (JS engines such as V8 tend to assume `Object.create(null)` is
+/// used for a Map, so they don't optimize it as they normally would for
+/// class-like objects).
+///
+/// The `dart.library` field is set by the compiler during SDK bootstrapping
+/// (because it is needed for dart:_runtime itself), so we don't need to
+/// initialize it here. The name `dart.library` is used because it reads nicely,
+/// for example:
+///
+///     const my_library = Object.create(dart.library);
+///
+Object libraryPrototype = JS('', 'dart.library');
+
 // TODO(vsm): Remove once this flag we've removed the ability to
 // whitelist / fallback on the old behavior.
 bool startAsyncSynchronously = true;
diff --git a/pkg/dev_compiler/tool/input_sdk/private/foreign_helper.dart b/pkg/dev_compiler/tool/input_sdk/private/foreign_helper.dart
index 9df99fec1..0c86cc1 100644
--- a/pkg/dev_compiler/tool/input_sdk/private/foreign_helper.dart
+++ b/pkg/dev_compiler/tool/input_sdk/private/foreign_helper.dart
@@ -132,6 +132,8 @@
 /// Similar behaviour to `JS` from `package:js/js.dart` (but usable from runtime
 /// files), and not to be confused with `JSName` from `js_helper` (which deals
 /// with names of externs).
+// TODO(jmesserly): remove this in favor of js_helper's `@JSName`
+// (Currently they have slightly different semantics, but they can be unified.)
 class JSExportName {
   final String name;
   const JSExportName(this.name);
diff --git a/pkg/dev_compiler/tool/input_sdk/private/js_helper.dart b/pkg/dev_compiler/tool/input_sdk/private/js_helper.dart
index 8916dcc..cf6b1e6 100644
--- a/pkg/dev_compiler/tool/input_sdk/private/js_helper.dart
+++ b/pkg/dev_compiler/tool/input_sdk/private/js_helper.dart
@@ -10,7 +10,11 @@
 
 import 'dart:_interceptors';
 import 'dart:_internal'
-    show EfficientLengthIterable, MappedIterable, IterableElementError;
+    show
+        EfficientLengthIterable,
+        MappedIterable,
+        IterableElementError,
+        SubListIterable;
 
 import 'dart:_native_typed_data';
 import 'dart:_runtime' as dart;
diff --git a/pkg/dev_compiler/tool/input_sdk/private/regexp_helper.dart b/pkg/dev_compiler/tool/input_sdk/private/regexp_helper.dart
index 2d6ff70..9206685 100644
--- a/pkg/dev_compiler/tool/input_sdk/private/regexp_helper.dart
+++ b/pkg/dev_compiler/tool/input_sdk/private/regexp_helper.dart
@@ -159,7 +159,7 @@
   bool get isCaseSensitive => _isCaseSensitive;
 }
 
-class _MatchImplementation implements Match {
+class _MatchImplementation implements RegExpMatch {
   final Pattern pattern;
   // Contains a JS RegExp match object.
   // It is an Array of String values with extra "index" and "input" properties.
@@ -185,6 +185,26 @@
     }
     return out;
   }
+
+  String namedGroup(String name) {
+    var groups = JS('Object', '#.groups', _match);
+    if (groups != null) {
+      var result = JS('String|Null', '#[#]', groups, name);
+      if (result != null || JS('bool', '# in #', name, groups)) {
+        return result;
+      }
+    }
+    throw ArgumentError.value(name, "name", "Not a capture group name");
+  }
+
+  Iterable<String> get groupNames {
+    var groups = JS('Object', '#.groups', _match);
+    if (groups != null) {
+      var keys = JSArray<String>.of(JS('', 'Object.keys(#)', groups));
+      return SubListIterable(keys, 0, null);
+    }
+    return Iterable.empty();
+  }
 }
 
 class _AllMatchesIterable extends IterableBase<Match> {
diff --git a/pkg/front_end/lib/src/api_prototype/compiler_options.dart b/pkg/front_end/lib/src/api_prototype/compiler_options.dart
index a1c0ef4..ac0217a 100644
--- a/pkg/front_end/lib/src/api_prototype/compiler_options.dart
+++ b/pkg/front_end/lib/src/api_prototype/compiler_options.dart
@@ -8,7 +8,8 @@
 
 import 'diagnostic_message.dart' show DiagnosticMessageHandler;
 
-import 'experimental_flags.dart' show ExperimentalFlag, parseExperimentalFlag;
+import 'experimental_flags.dart'
+    show defaultExperimentalFlags, ExperimentalFlag, parseExperimentalFlag;
 
 import 'file_system.dart' show FileSystem;
 
@@ -209,30 +210,38 @@
 
 /// Parse experimental flags from a list of strings, each of which is either a
 /// flag name or a flag name prefixed by 'no-'. Return a map of flags to their
-/// values that can be passed to [experimentalFlags].
+/// values that can be passed to [experimentalFlags]. The returned map is
+/// normalized to contain default values for unmentioned flags.
 ///
 /// If an unknown flag is mentioned, or a flag is mentioned more than once,
 /// the supplied error handler is called with an error message.
 Map<ExperimentalFlag, bool> parseExperimentalFlags(
     Iterable<String> experiments, void onError(String message)) {
   Map<ExperimentalFlag, bool> flags = <ExperimentalFlag, bool>{};
-  if (experiments == null) return flags;
-  for (String experiment in experiments) {
-    bool value = true;
-    if (experiment.startsWith("no-")) {
-      value = false;
-      experiment = experiment.substring(3);
-    }
-    ExperimentalFlag flag = parseExperimentalFlag(experiment);
-    if (flag == null) {
-      onError("Unknown experiment: " + experiment);
-    } else if (flags.containsKey(flag)) {
-      if (flags[flag] != value) {
-        onError("Experiment specified with conflicting values: " + experiment);
+  if (experiments != null) {
+    for (String experiment in experiments) {
+      bool value = true;
+      if (experiment.startsWith("no-")) {
+        value = false;
+        experiment = experiment.substring(3);
       }
-    } else {
-      flags[flag] = value;
+      ExperimentalFlag flag = parseExperimentalFlag(experiment);
+      if (flag == null) {
+        onError("Unknown experiment: " + experiment);
+      } else if (flags.containsKey(flag)) {
+        if (flags[flag] != value) {
+          onError(
+              "Experiment specified with conflicting values: " + experiment);
+        }
+      } else {
+        flags[flag] = value;
+      }
     }
   }
+  for (ExperimentalFlag flag in ExperimentalFlag.values) {
+    assert(defaultExperimentalFlags.containsKey(flag),
+        "No default value for $flag.");
+    flags[flag] ??= defaultExperimentalFlags[flag];
+  }
   return flags;
 }
diff --git a/pkg/front_end/lib/src/api_prototype/constant_evaluator.dart b/pkg/front_end/lib/src/api_prototype/constant_evaluator.dart
new file mode 100644
index 0000000..5eeb2a6
--- /dev/null
+++ b/pkg/front_end/lib/src/api_prototype/constant_evaluator.dart
@@ -0,0 +1,15 @@
+// Copyright (c) 2019, the Dart project authors.  Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+library front_end.constant_evaluator;
+
+export '../fasta/kernel/constant_evaluator.dart'
+    show
+        ConstantEvaluator,
+        ConstantsTransformer,
+        ErrorReporter,
+        EvaluationEnvironment,
+        SimpleErrorReporter,
+        transformComponent,
+        transformLibraries;
diff --git a/pkg/front_end/lib/src/api_prototype/experimental_flags.dart b/pkg/front_end/lib/src/api_prototype/experimental_flags.dart
index a9b772d..84dc067 100644
--- a/pkg/front_end/lib/src/api_prototype/experimental_flags.dart
+++ b/pkg/front_end/lib/src/api_prototype/experimental_flags.dart
@@ -24,3 +24,10 @@
   }
   return null;
 }
+
+const Map<ExperimentalFlag, bool> defaultExperimentalFlags = {
+  ExperimentalFlag.constantUpdate2018: false,
+  ExperimentalFlag.controlFlowCollections: false,
+  ExperimentalFlag.setLiterals: true,
+  ExperimentalFlag.spreadCollections: false,
+};
diff --git a/pkg/front_end/lib/src/api_unstable/bazel_worker.dart b/pkg/front_end/lib/src/api_unstable/bazel_worker.dart
index 5555840..4f0b8a3 100644
--- a/pkg/front_end/lib/src/api_unstable/bazel_worker.dart
+++ b/pkg/front_end/lib/src/api_unstable/bazel_worker.dart
@@ -7,6 +7,8 @@
 
 import 'dart:async' show Future;
 
+import 'package:kernel/kernel.dart' show Component, CanonicalName;
+
 import 'package:kernel/target/targets.dart' show Target;
 
 import '../api_prototype/compiler_options.dart' show CompilerOptions;
@@ -17,11 +19,16 @@
 
 import '../base/processed_options.dart' show ProcessedOptions;
 
+import '../fasta/compiler_context.dart' show CompilerContext;
+
+import '../fasta/incremental_compiler.dart' show IncrementalCompiler;
+
 import '../fasta/kernel/utils.dart' show serializeComponent;
 
 import '../kernel_generator_impl.dart' show generateKernel;
 
-import 'compiler_state.dart' show InitializedCompilerState;
+import 'compiler_state.dart'
+    show InitializedCompilerState, WorkerInputComponent, digestsEqual;
 
 export '../api_prototype/diagnostic_message.dart' show DiagnosticMessage;
 
@@ -30,10 +37,138 @@
 export '../api_prototype/terminal_color_support.dart'
     show printDiagnosticMessage;
 
+export '../fasta/kernel/utils.dart' show serializeComponent;
+
 export '../fasta/severity.dart' show Severity;
 
 export 'compiler_state.dart' show InitializedCompilerState;
 
+/// Initializes the compiler for a modular build.
+///
+/// Re-uses cached components from [_workerInputCache], and reloads them
+/// as necessary based on [workerInputDigests].
+Future<InitializedCompilerState> initializeIncrementalCompiler(
+    InitializedCompilerState oldState,
+    Uri sdkSummary,
+    Uri packagesFile,
+    Uri librariesSpecificationUri,
+    List<Uri> summaryInputs,
+    Map<Uri, List<int>> workerInputDigests,
+    Target target,
+    FileSystem fileSystem,
+    bool outlineOnly) async {
+  List<int> sdkDigest = workerInputDigests[sdkSummary];
+  IncrementalCompiler incrementalCompiler;
+  CompilerOptions options;
+  ProcessedOptions processedOpts;
+  WorkerInputComponent cachedSdkInput;
+  Map<Uri, WorkerInputComponent> workerInputCache =
+      oldState?.workerInputCache ?? new Map<Uri, WorkerInputComponent>();
+  bool startOver = false;
+
+  if (oldState == null ||
+      oldState.incrementalCompiler == null ||
+      oldState.incrementalCompiler.outlineOnly != outlineOnly) {
+    // No previous state.
+    startOver = true;
+  } else {
+    // We do have a previous state.
+    cachedSdkInput = workerInputCache[sdkSummary];
+    if (cachedSdkInput == null ||
+        !digestsEqual(cachedSdkInput.digest, workerInputDigests[sdkSummary])) {
+      // The sdk is out of date.
+      startOver = true;
+    }
+  }
+
+  if (startOver) {
+    // The sdk was either not cached or it has changed.
+    options = new CompilerOptions()
+      ..sdkSummary = sdkSummary
+      ..packagesFileUri = packagesFile
+      ..librariesSpecificationUri = librariesSpecificationUri
+      ..target = target
+      ..fileSystem = fileSystem
+      ..omitPlatform = true;
+
+    processedOpts = new ProcessedOptions(options: options);
+    cachedSdkInput = WorkerInputComponent(
+        sdkDigest, await processedOpts.loadSdkSummary(null));
+    workerInputCache[sdkSummary] = cachedSdkInput;
+
+    incrementalCompiler = new IncrementalCompiler.fromComponent(
+        new CompilerContext(processedOpts),
+        cachedSdkInput.component,
+        outlineOnly);
+  } else {
+    options = oldState.options;
+    processedOpts = oldState.processedOpts;
+
+    var sdkComponent = cachedSdkInput.component;
+    // Reset the state of the component.
+    for (var lib in sdkComponent.libraries) {
+      lib.isExternal = cachedSdkInput.externalLibs.contains(lib.importUri);
+    }
+    sdkComponent.adoptChildren();
+    for (WorkerInputComponent cachedInput in workerInputCache.values) {
+      cachedInput.component.adoptChildren();
+    }
+    sdkComponent.unbindCanonicalNames();
+    sdkComponent.computeCanonicalNames();
+
+    // Reuse the incremental compiler, but reset as needed.
+    incrementalCompiler = oldState.incrementalCompiler;
+    incrementalCompiler.invalidateAllSources();
+    options.packagesFileUri = packagesFile;
+    options.fileSystem = fileSystem;
+  }
+
+  // Then read all the input summary components.
+  // The nameRoot from the sdk was either just created or just unbound.
+  // If just unbound, only the sdk stuff is bound. Either way, don't clear it
+  // again and bind as much as possible before loading new stuff!
+  CanonicalName nameRoot = cachedSdkInput.component.root;
+  final inputSummaries = <Component>[];
+  List<Uri> loadFromDill = new List<Uri>();
+  for (Uri summary in summaryInputs) {
+    var cachedInput = workerInputCache[summary];
+    var summaryDigest = workerInputDigests[summary];
+    if (cachedInput == null ||
+        cachedInput.component.root != nameRoot ||
+        !digestsEqual(cachedInput.digest, summaryDigest)) {
+      loadFromDill.add(summary);
+    } else {
+      // Need to reset cached components so they are usable again.
+      var component = cachedInput.component;
+      for (var lib in component.libraries) {
+        lib.isExternal = cachedInput.externalLibs.contains(lib.importUri);
+      }
+      // We don't unbind as the root was unbound already. We do have to compute
+      // the canonical names though, to rebind everything in the component.
+      component.adoptChildren();
+      component.computeCanonicalNames();
+      inputSummaries.add(component);
+    }
+  }
+
+  for (int i = 0; i < loadFromDill.length; i++) {
+    Uri summary = loadFromDill[i];
+    var summaryDigest = workerInputDigests[summary];
+    WorkerInputComponent cachedInput = WorkerInputComponent(
+        summaryDigest,
+        await processedOpts.loadComponent(
+            await fileSystem.entityForUri(summary).readAsBytes(), nameRoot));
+    workerInputCache[summary] = cachedInput;
+    inputSummaries.add(cachedInput.component);
+  }
+
+  incrementalCompiler.setModulesToLoadOnNextComputeDelta(inputSummaries);
+
+  return new InitializedCompilerState(options, processedOpts,
+      workerInputCache: workerInputCache,
+      incrementalCompiler: incrementalCompiler);
+}
+
 Future<InitializedCompilerState> initializeCompiler(
     InitializedCompilerState oldState,
     Uri sdkSummary,
diff --git a/pkg/front_end/lib/src/api_unstable/compiler_state.dart b/pkg/front_end/lib/src/api_unstable/compiler_state.dart
index 13d1327..dc80525 100644
--- a/pkg/front_end/lib/src/api_unstable/compiler_state.dart
+++ b/pkg/front_end/lib/src/api_unstable/compiler_state.dart
@@ -6,9 +6,41 @@
 
 import '../base/processed_options.dart' show ProcessedOptions;
 
+import 'package:front_end/src/fasta/incremental_compiler.dart'
+    show IncrementalCompiler;
+
+import 'package:kernel/kernel.dart' show Component;
+
 class InitializedCompilerState {
   final CompilerOptions options;
   final ProcessedOptions processedOpts;
+  final Map<Uri, WorkerInputComponent> workerInputCache;
+  final IncrementalCompiler incrementalCompiler;
 
-  InitializedCompilerState(this.options, this.processedOpts);
+  InitializedCompilerState(this.options, this.processedOpts,
+      {this.workerInputCache, this.incrementalCompiler});
+}
+
+/// A cached [Component] for a summary input file.
+///
+/// Tracks the originally marked "external" libs so that they can be restored,
+/// since the kernel generator mutates the state.
+class WorkerInputComponent {
+  final List<int> digest;
+  final Component component;
+  final Set<Uri> externalLibs;
+  WorkerInputComponent(this.digest, this.component)
+      : externalLibs = component.libraries
+            .where((lib) => lib.isExternal)
+            .map((lib) => lib.importUri)
+            .toSet();
+}
+
+bool digestsEqual(List<int> a, List<int> b) {
+  if (a == null || b == null) return false;
+  if (a.length != b.length) return false;
+  for (int i = 0; i < a.length; i++) {
+    if (a[i] != b[i]) return false;
+  }
+  return true;
 }
diff --git a/pkg/front_end/lib/src/api_unstable/dart2js.dart b/pkg/front_end/lib/src/api_unstable/dart2js.dart
index d716845..7b95a51 100644
--- a/pkg/front_end/lib/src/api_unstable/dart2js.dart
+++ b/pkg/front_end/lib/src/api_unstable/dart2js.dart
@@ -44,7 +44,8 @@
         getMessageRelatedInformation,
         getMessageUri;
 
-export '../api_prototype/experimental_flags.dart' show ExperimentalFlag;
+export '../api_prototype/experimental_flags.dart'
+    show defaultExperimentalFlags, ExperimentalFlag;
 
 export '../api_prototype/file_system.dart'
     show FileSystem, FileSystemEntity, FileSystemException;
@@ -56,6 +57,8 @@
 export '../compute_platform_binaries_location.dart'
     show computePlatformBinariesLocation;
 
+export '../fasta/fasta_codes.dart' show LocatedMessage;
+
 export '../fasta/kernel/redirecting_factory_body.dart'
     show RedirectingFactoryBody;
 
@@ -107,9 +110,11 @@
     InitializedCompilerState oldState,
     Target target,
     Uri librariesSpecificationUri,
-    Uri sdkPlatformUri,
+    List<Uri> linkedDependencies,
     Uri packagesFileUri,
-    {Map<ExperimentalFlag, bool> experimentalFlags}) {
+    {List<Uri> dependencies,
+    Map<ExperimentalFlag, bool> experimentalFlags,
+    bool verify: false}) {
   bool mapEqual(Map<ExperimentalFlag, bool> a, Map<ExperimentalFlag, bool> b) {
     if (a == null || b == null) return a == b;
     if (a.length != b.length) return false;
@@ -119,10 +124,20 @@
     return true;
   }
 
+  bool listEqual(List<Uri> a, List<Uri> b) {
+    if (a.length != b.length) return false;
+    for (int i = 0; i < a.length; ++i) {
+      if (a[i] != b[i]) return false;
+    }
+    return true;
+  }
+
+  linkedDependencies.sort((a, b) => a.toString().compareTo(b.toString()));
+
   if (oldState != null &&
       oldState.options.packagesFileUri == packagesFileUri &&
       oldState.options.librariesSpecificationUri == librariesSpecificationUri &&
-      oldState.options.linkedDependencies[0] == sdkPlatformUri &&
+      listEqual(oldState.options.linkedDependencies, linkedDependencies) &&
       mapEqual(oldState.options.experimentalFlags, experimentalFlags)) {
     return oldState;
   }
@@ -130,10 +145,11 @@
   CompilerOptions options = new CompilerOptions()
     ..target = target
     ..legacyMode = target.legacyMode
-    ..linkedDependencies = [sdkPlatformUri]
+    ..linkedDependencies = linkedDependencies
     ..librariesSpecificationUri = librariesSpecificationUri
     ..packagesFileUri = packagesFileUri
-    ..experimentalFlags = experimentalFlags;
+    ..experimentalFlags = experimentalFlags
+    ..verify = verify;
 
   ProcessedOptions processedOpts = new ProcessedOptions(options: options);
 
diff --git a/pkg/front_end/lib/src/api_unstable/ddc.dart b/pkg/front_end/lib/src/api_unstable/ddc.dart
index 0a129d8..4542aa3 100644
--- a/pkg/front_end/lib/src/api_unstable/ddc.dart
+++ b/pkg/front_end/lib/src/api_unstable/ddc.dart
@@ -4,7 +4,7 @@
 
 import 'dart:async' show Future;
 
-import 'package:kernel/kernel.dart' show Component;
+import 'package:kernel/kernel.dart' show Component, CanonicalName;
 
 import 'package:kernel/target/targets.dart' show Target;
 
@@ -20,9 +20,14 @@
 
 import '../base/processed_options.dart' show ProcessedOptions;
 
+import '../fasta/compiler_context.dart' show CompilerContext;
+
+import '../fasta/incremental_compiler.dart' show IncrementalCompiler;
+
 import '../kernel_generator_impl.dart' show generateKernel;
 
-import 'compiler_state.dart' show InitializedCompilerState;
+import 'compiler_state.dart'
+    show InitializedCompilerState, WorkerInputComponent, digestsEqual;
 
 export '../api_prototype/compiler_options.dart' show CompilerOptions;
 
@@ -40,6 +45,12 @@
 export '../api_prototype/terminal_color_support.dart'
     show printDiagnosticMessage;
 
+export '../base/processed_options.dart' show ProcessedOptions;
+
+export '../fasta/compiler_context.dart' show CompilerContext;
+
+export '../fasta/incremental_compiler.dart' show IncrementalCompiler;
+
 export '../fasta/kernel/redirecting_factory_body.dart'
     show RedirectingFactoryBody;
 
@@ -48,7 +59,8 @@
 export '../fasta/type_inference/type_schema_environment.dart'
     show TypeSchemaEnvironment;
 
-export 'compiler_state.dart' show InitializedCompilerState;
+export 'compiler_state.dart'
+    show InitializedCompilerState, WorkerInputComponent, digestsEqual;
 
 class DdcResult {
   final Component component;
@@ -119,6 +131,119 @@
   return new InitializedCompilerState(options, processedOpts);
 }
 
+Future<InitializedCompilerState> initializeIncrementalCompiler(
+    InitializedCompilerState oldState,
+    List<Component> doneInputSummaries,
+    Uri sdkSummary,
+    Uri packagesFile,
+    Uri librariesSpecificationUri,
+    List<Uri> inputSummaries,
+    Target target,
+    {FileSystem fileSystem,
+    Map<ExperimentalFlag, bool> experiments}) async {
+  inputSummaries.sort((a, b) => a.toString().compareTo(b.toString()));
+
+  IncrementalCompiler incrementalCompiler;
+  WorkerInputComponent cachedSdkInput;
+  CompilerOptions options;
+  ProcessedOptions processedOpts;
+
+  Map<Uri, WorkerInputComponent> workerInputCache =
+      oldState?.workerInputCache ?? new Map<Uri, WorkerInputComponent>();
+  cachedSdkInput = workerInputCache[sdkSummary];
+
+  if (oldState == null ||
+      oldState.incrementalCompiler == null ||
+      cachedSdkInput == null) {
+    // No previous state.
+    options = new CompilerOptions()
+      ..sdkSummary = sdkSummary
+      ..packagesFileUri = packagesFile
+      ..inputSummaries = inputSummaries
+      ..librariesSpecificationUri = librariesSpecificationUri
+      ..target = target
+      ..fileSystem = fileSystem ?? StandardFileSystem.instance;
+    if (experiments != null) options.experimentalFlags = experiments;
+
+    processedOpts = new ProcessedOptions(options: options);
+
+    cachedSdkInput = new WorkerInputComponent(null /* not compared anyway */,
+        await processedOpts.loadSdkSummary(null));
+    workerInputCache[sdkSummary] = cachedSdkInput;
+    incrementalCompiler = new IncrementalCompiler.fromComponent(
+        new CompilerContext(processedOpts), cachedSdkInput.component);
+  } else {
+    options = oldState.options;
+    options.inputSummaries = inputSummaries;
+    processedOpts = oldState.processedOpts;
+
+    for (var lib in cachedSdkInput.component.libraries) {
+      lib.isExternal = false;
+    }
+    for (WorkerInputComponent cachedInput in workerInputCache.values) {
+      cachedInput.component.adoptChildren();
+    }
+    cachedSdkInput.component.unbindCanonicalNames();
+    cachedSdkInput.component.computeCanonicalNames();
+
+    // Reuse the incremental compiler, but reset as needed.
+    incrementalCompiler = oldState.incrementalCompiler;
+    incrementalCompiler.invalidateAllSources();
+    options.packagesFileUri = packagesFile;
+    options.fileSystem = fileSystem;
+  }
+  InitializedCompilerState compilerState = new InitializedCompilerState(
+      options, processedOpts,
+      workerInputCache: workerInputCache,
+      incrementalCompiler: incrementalCompiler);
+
+  CanonicalName nameRoot = cachedSdkInput.component.root;
+  List<int> loadFromDillIndexes = new List<int>();
+
+  // Notice that the ordering of the input summaries matter, so we need to
+  // keep them in order.
+  if (doneInputSummaries.length != inputSummaries.length) {
+    throw new ArgumentError("Invalid length.");
+  }
+  for (int i = 0; i < inputSummaries.length; i++) {
+    Uri inputSummary = inputSummaries[i];
+    WorkerInputComponent cachedInput = workerInputCache[inputSummary];
+    if (cachedInput == null ||
+        cachedInput.component.root != nameRoot ||
+        !digestsEqual(await fileSystem.entityForUri(inputSummary).readAsBytes(),
+            cachedInput.digest)) {
+      loadFromDillIndexes.add(i);
+    } else {
+      // Need to reset cached components so they are usable again.
+      var component = cachedInput.component;
+      for (var lib in component.libraries) {
+        lib.isExternal = cachedInput.externalLibs.contains(lib.importUri);
+      }
+      // We don't unbind as the root was unbound already. We do have to
+      // compute the canonical names though, to rebind everything in the
+      // component.
+      component.computeCanonicalNames();
+      doneInputSummaries[i] = component;
+    }
+  }
+
+  for (int i = 0; i < loadFromDillIndexes.length; i++) {
+    int index = loadFromDillIndexes[i];
+    Uri summary = inputSummaries[index];
+    List<int> data = await fileSystem.entityForUri(summary).readAsBytes();
+    WorkerInputComponent cachedInput = WorkerInputComponent(
+        data, await compilerState.processedOpts.loadComponent(data, nameRoot));
+    workerInputCache[summary] = cachedInput;
+    doneInputSummaries[index] = cachedInput.component;
+  }
+
+  incrementalCompiler.setModulesToLoadOnNextComputeDelta(doneInputSummaries);
+
+  return new InitializedCompilerState(options, processedOpts,
+      workerInputCache: workerInputCache,
+      incrementalCompiler: incrementalCompiler);
+}
+
 Future<DdcResult> compile(InitializedCompilerState compilerState,
     List<Uri> inputs, DiagnosticMessageHandler diagnosticMessageHandler) async {
   CompilerOptions options = compilerState.options;
diff --git a/pkg/front_end/lib/src/api_unstable/vm.dart b/pkg/front_end/lib/src/api_unstable/vm.dart
index e3ef443..20ad6ad 100644
--- a/pkg/front_end/lib/src/api_unstable/vm.dart
+++ b/pkg/front_end/lib/src/api_unstable/vm.dart
@@ -34,25 +34,6 @@
 export '../fasta/fasta_codes.dart'
     show
         LocatedMessage,
-        Message,
-        messageConstEvalCircularity,
-        messageConstEvalContext,
-        messageConstEvalFailedAssertion,
-        noLength,
-        templateConstEvalFreeTypeParameter,
-        templateConstEvalDeferredLibrary,
-        templateConstEvalDuplicateKey,
-        templateConstEvalFailedAssertionWithMessage,
-        templateConstEvalInvalidBinaryOperandType,
-        templateConstEvalInvalidMethodInvocation,
-        templateConstEvalInvalidStaticInvocation,
-        templateConstEvalInvalidStringInterpolationOperand,
-        templateConstEvalInvalidSymbolName,
-        templateConstEvalInvalidType,
-        templateConstEvalNegativeShift,
-        templateConstEvalNonConstantLiteral,
-        templateConstEvalNonConstantVariableGet,
-        templateConstEvalZeroDivisor,
         templateFfiFieldAnnotation,
         templateFfiStructAnnotation,
         templateFfiNotStatic,
diff --git a/pkg/front_end/lib/src/base/errors.dart b/pkg/front_end/lib/src/base/errors.dart
index 1f01f89..2fbd323 100644
--- a/pkg/front_end/lib/src/base/errors.dart
+++ b/pkg/front_end/lib/src/base/errors.dart
@@ -1,4 +1,4 @@
-// Copyright (c) 2016, the Dart project authors.  Please see the AUTHORS file
+// Copyright (c) 2016, the Dart project authors. Please see the AUTHORS file
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
 
@@ -26,6 +26,12 @@
   final String correction;
 
   /**
+   * The URL of a page containing documentation for errors with this code, or
+   * `null` if there is no known documentation.
+   */
+  final String url;
+
+  /**
    * Whether this error is caused by an unresolved identifier.
    */
   final bool isUnresolvedIdentifier;
@@ -36,7 +42,7 @@
    * template. The correction associated with the error will be created from the
    * given [correction] template.
    */
-  const ErrorCode(this.name, this.message, [this.correction])
+  const ErrorCode(this.name, this.message, [this.correction, this.url])
       : isUnresolvedIdentifier = false;
 
   /**
@@ -46,7 +52,7 @@
    * given [correction] template.
    */
   const ErrorCode.temporary(this.name, this.message,
-      {this.correction, this.isUnresolvedIdentifier: false});
+      {this.correction, this.isUnresolvedIdentifier: false, this.url});
 
   /**
    * The severity of the error.
diff --git a/pkg/front_end/lib/src/base/instrumentation.dart b/pkg/front_end/lib/src/base/instrumentation.dart
index ab62b21..5c16ee9 100644
--- a/pkg/front_end/lib/src/base/instrumentation.dart
+++ b/pkg/front_end/lib/src/base/instrumentation.dart
@@ -2,9 +2,7 @@
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
 
-import 'package:kernel/ast.dart';
-
-import '../fasta/problems.dart';
+import 'package:kernel/ast.dart' show DartType, Member;
 
 /// Convert '→' to '->' because '→' doesn't show up in some terminals.
 /// Remove prefixes that are used very often in tests.
@@ -36,94 +34,6 @@
   bool matches(String description) => description == toString();
 }
 
-/// Instance of [InstrumentationValue] describing a forwarding stub.
-class InstrumentationValueForForwardingStub extends InstrumentationValue {
-  final Procedure procedure;
-
-  InstrumentationValueForForwardingStub(this.procedure);
-
-  @override
-  String toString() {
-    var buffer = new StringBuffer();
-    void writeParameter(VariableDeclaration parameter) {
-      var covariances = <String>[];
-      if (parameter.isGenericCovariantImpl) {
-        covariances.add('genericImpl');
-      }
-      if (parameter.isCovariant) {
-        covariances.add('explicit');
-      }
-      buffer.write('covariance=(${covariances.join(', ')}) ');
-      buffer.write(parameter.type);
-      buffer.write(' ');
-      buffer.write(parameter.name);
-    }
-
-    if (procedure.isAbstract) {
-      buffer.write('abstract ');
-    }
-    var function = procedure.function;
-    buffer.write(function.returnType);
-    buffer.write(' ');
-    switch (procedure.kind) {
-      case ProcedureKind.Operator:
-        buffer.write('operator');
-        break;
-      case ProcedureKind.Method:
-        break;
-      case ProcedureKind.Setter:
-        buffer.write('set ');
-        break;
-      case ProcedureKind.Getter:
-        buffer.write('get ');
-        break;
-      default:
-        unhandled('${procedure.kind}', 'InstrumentationValueForForwardingStub',
-            -1, null);
-        break;
-    }
-    buffer.write(procedure.name.name);
-    if (function.typeParameters.isNotEmpty) {
-      buffer.write('<');
-      for (int i = 0; i < function.typeParameters.length; i++) {
-        if (i != 0) buffer.write(', ');
-        var typeParameter = function.typeParameters[i];
-        var covariances = <String>[];
-        if (typeParameter.isGenericCovariantImpl) {
-          covariances.add('genericImpl');
-        }
-        buffer.write('covariance=(${covariances.join(', ')}) ');
-        buffer.write(typeParameter.name);
-        buffer.write(' extends ');
-        buffer.write(
-            new InstrumentationValueForType(typeParameter.bound).toString());
-      }
-      buffer.write('>');
-    }
-    buffer.write('(');
-    for (int i = 0; i < function.positionalParameters.length; i++) {
-      if (i != 0) buffer.write(', ');
-      if (i == function.requiredParameterCount) buffer.write('[');
-      writeParameter(function.positionalParameters[i]);
-    }
-    if (function.requiredParameterCount <
-        function.positionalParameters.length) {
-      buffer.write(']');
-    }
-    if (function.namedParameters.isNotEmpty) {
-      if (function.positionalParameters.length != 0) buffer.write(', ');
-      buffer.write('{');
-      for (int i = 0; i < function.namedParameters.length; i++) {
-        if (i != 0) buffer.write(', ');
-        writeParameter(function.namedParameters[i]);
-      }
-      buffer.write('}');
-    }
-    buffer.write(')');
-    return _shortenInstrumentationString(buffer.toString());
-  }
-}
-
 /// Instance of [InstrumentationValue] describing a [Member].
 class InstrumentationValueForMember extends InstrumentationValue {
   final Member member;
diff --git a/pkg/front_end/lib/src/base/processed_options.dart b/pkg/front_end/lib/src/base/processed_options.dart
index e56f20f..79d7201 100644
--- a/pkg/front_end/lib/src/base/processed_options.dart
+++ b/pkg/front_end/lib/src/base/processed_options.dart
@@ -24,7 +24,8 @@
 import '../api_prototype/compiler_options.dart'
     show CompilerOptions, DiagnosticMessage;
 
-import '../api_prototype/experimental_flags.dart' show ExperimentalFlag;
+import '../api_prototype/experimental_flags.dart'
+    show defaultExperimentalFlags, ExperimentalFlag;
 
 import '../api_prototype/file_system.dart'
     show FileSystem, FileSystemEntity, FileSystemException;
@@ -310,9 +311,11 @@
       _raw.target ?? new NoneTarget(new TargetFlags(legacyMode: legacyMode));
 
   bool isExperimentEnabled(ExperimentalFlag flag) {
+    assert(defaultExperimentalFlags.containsKey(flag),
+        "No default value for $flag.");
     // TODO(askesc): Determine default flag value from specification file.
     if (flag == ExperimentalFlag.setLiterals) return true;
-    return _raw.experimentalFlags[flag] ?? false;
+    return _raw.experimentalFlags[flag] ?? defaultExperimentalFlags[flag];
   }
 
   /// Get an outline component that summarizes the SDK, if any.
diff --git a/pkg/front_end/lib/src/compute_platform_binaries_location.dart b/pkg/front_end/lib/src/compute_platform_binaries_location.dart
index 9ac1f54..ad98f28 100644
--- a/pkg/front_end/lib/src/compute_platform_binaries_location.dart
+++ b/pkg/front_end/lib/src/compute_platform_binaries_location.dart
@@ -69,8 +69,11 @@
           Map<Uri, Source> uriToSource = CompilerContext.current.uriToSource;
           Source source = uriToSource[uri];
           if (source.source.isEmpty) {
-            uriToSource[uri] = new Source(source.lineStarts,
-                new File.fromUri(candidate).readAsBytesSync());
+            uriToSource[uri] = new Source(
+                source.lineStarts,
+                new File.fromUri(candidate).readAsBytesSync(),
+                source.importUri,
+                source.fileUri);
           }
         }
         return candidate;
diff --git a/pkg/front_end/lib/src/fasta/builder/declaration.dart b/pkg/front_end/lib/src/fasta/builder/declaration.dart
index 392b3e6..4b3d601 100644
--- a/pkg/front_end/lib/src/fasta/builder/declaration.dart
+++ b/pkg/front_end/lib/src/fasta/builder/declaration.dart
@@ -83,6 +83,4 @@
   /// Resolve constructors (lookup names in scope) recorded in this builder and
   /// return the number of constructors resolved.
   int resolveConstructors(covariant Declaration parent) => 0;
-
-  void instrumentTopLevelInference(covariant instrumentation) {}
 }
diff --git a/pkg/front_end/lib/src/fasta/dill/dill_library_builder.dart b/pkg/front_end/lib/src/fasta/dill/dill_library_builder.dart
index 610dcea..c76a2bc 100644
--- a/pkg/front_end/lib/src/fasta/dill/dill_library_builder.dart
+++ b/pkg/front_end/lib/src/fasta/dill/dill_library_builder.dart
@@ -53,7 +53,7 @@
 class DillLibraryBuilder extends LibraryBuilder<KernelTypeBuilder, Library> {
   final Library library;
 
-  final DillLoader loader;
+  DillLoader loader;
 
   /// Exports that can't be serialized.
   ///
diff --git a/pkg/front_end/lib/src/fasta/dill/dill_target.dart b/pkg/front_end/lib/src/fasta/dill/dill_target.dart
index 4771d2c..59386d9 100644
--- a/pkg/front_end/lib/src/fasta/dill/dill_target.dart
+++ b/pkg/front_end/lib/src/fasta/dill/dill_target.dart
@@ -39,7 +39,7 @@
 
   @override
   void addSourceInformation(
-      Uri uri, List<int> lineStarts, List<int> sourceCode) {
+      Uri importUri, Uri fileUri, List<int> lineStarts, List<int> sourceCode) {
     unsupported("addSourceInformation", -1, null);
   }
 
diff --git a/pkg/front_end/lib/src/fasta/fasta_codes_generated.dart b/pkg/front_end/lib/src/fasta/fasta_codes_generated.dart
index 574152c..828f7a4 100644
--- a/pkg/front_end/lib/src/fasta/fasta_codes_generated.dart
+++ b/pkg/front_end/lib/src/fasta/fasta_codes_generated.dart
@@ -1049,6 +1049,34 @@
 const Template<
     Message Function(
         Constant
+            _constant)> templateConstEvalDuplicateElement = const Template<
+        Message Function(Constant _constant)>(
+    messageTemplate:
+        r"""The element '#constant' conflicts with another existing element in the set.""",
+    withArguments: _withArgumentsConstEvalDuplicateElement);
+
+// DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE.
+const Code<Message Function(Constant _constant)> codeConstEvalDuplicateElement =
+    const Code<Message Function(Constant _constant)>(
+        "ConstEvalDuplicateElement", templateConstEvalDuplicateElement,
+        analyzerCodes: <String>["EQUAL_ELEMENTS_IN_CONST_SET"]);
+
+// DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE.
+Message _withArgumentsConstEvalDuplicateElement(Constant _constant) {
+  TypeLabeler labeler = new TypeLabeler();
+  List<Object> constantParts = labeler.labelConstant(_constant);
+  String constant = constantParts.join();
+  return new Message(codeConstEvalDuplicateElement,
+      message:
+          """The element '${constant}' conflicts with another existing element in the set.""" +
+              labeler.originMessages,
+      arguments: {'constant': _constant});
+}
+
+// DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE.
+const Template<
+    Message Function(
+        Constant
             _constant)> templateConstEvalDuplicateKey = const Template<
         Message Function(Constant _constant)>(
     messageTemplate:
@@ -1059,7 +1087,7 @@
 const Code<Message Function(Constant _constant)> codeConstEvalDuplicateKey =
     const Code<Message Function(Constant _constant)>(
         "ConstEvalDuplicateKey", templateConstEvalDuplicateKey,
-        analyzerCodes: <String>["EQUAL_KEYS_IN_MAP"]);
+        analyzerCodes: <String>["EQUAL_KEYS_IN_CONST_MAP"]);
 
 // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE.
 Message _withArgumentsConstEvalDuplicateKey(Constant _constant) {
@@ -1217,6 +1245,38 @@
 // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE.
 const Template<
     Message Function(
+        String string,
+        Constant
+            _constant)> templateConstEvalInvalidPropertyGet = const Template<
+        Message Function(String string, Constant _constant)>(
+    messageTemplate:
+        r"""The property '#string' can't be accessed on '#constant' within a const context.""",
+    withArguments: _withArgumentsConstEvalInvalidPropertyGet);
+
+// DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE.
+const Code<Message Function(String string, Constant _constant)>
+    codeConstEvalInvalidPropertyGet =
+    const Code<Message Function(String string, Constant _constant)>(
+        "ConstEvalInvalidPropertyGet", templateConstEvalInvalidPropertyGet,
+        analyzerCodes: <String>["CONST_EVAL_THROWS_EXCEPTION"]);
+
+// DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE.
+Message _withArgumentsConstEvalInvalidPropertyGet(
+    String string, Constant _constant) {
+  if (string.isEmpty) throw 'No string provided';
+  TypeLabeler labeler = new TypeLabeler();
+  List<Object> constantParts = labeler.labelConstant(_constant);
+  String constant = constantParts.join();
+  return new Message(codeConstEvalInvalidPropertyGet,
+      message:
+          """The property '${string}' can't be accessed on '${constant}' within a const context.""" +
+              labeler.originMessages,
+      arguments: {'string': string, 'constant': _constant});
+}
+
+// DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE.
+const Template<
+    Message Function(
         String
             name)> templateConstEvalInvalidStaticInvocation = const Template<
         Message Function(String name)>(
@@ -1339,6 +1399,36 @@
 }
 
 // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE.
+const Code<Null> codeConstEvalIterationInConstList =
+    messageConstEvalIterationInConstList;
+
+// DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE.
+const MessageCode messageConstEvalIterationInConstList = const MessageCode(
+    "ConstEvalIterationInConstList",
+    analyzerCodes: <String>["NON_CONSTANT_LIST_ELEMENT"],
+    message: r"""Iteration can't be used in a constant list.""");
+
+// DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE.
+const Code<Null> codeConstEvalIterationInConstMap =
+    messageConstEvalIterationInConstMap;
+
+// DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE.
+const MessageCode messageConstEvalIterationInConstMap = const MessageCode(
+    "ConstEvalIterationInConstMap",
+    analyzerCodes: <String>["NON_CONSTANT_MAP_ELEMENT"],
+    message: r"""Iteration can't be used in a constant map.""");
+
+// DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE.
+const Code<Null> codeConstEvalIterationInConstSet =
+    messageConstEvalIterationInConstSet;
+
+// DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE.
+const MessageCode messageConstEvalIterationInConstSet = const MessageCode(
+    "ConstEvalIterationInConstSet",
+    analyzerCodes: <String>["NON_CONSTANT_SET_ELEMENT"],
+    message: r"""Iteration can't be used in a constant set.""");
+
+// DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE.
 const Template<
     Message Function(
         String string,
@@ -1423,6 +1513,35 @@
 }
 
 // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE.
+const Code<Null> codeConstEvalNotListOrSetInSpread =
+    messageConstEvalNotListOrSetInSpread;
+
+// DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE.
+const MessageCode messageConstEvalNotListOrSetInSpread = const MessageCode(
+    "ConstEvalNotListOrSetInSpread",
+    analyzerCodes: <String>["CONST_SPREAD_EXPECTED_LIST_OR_SET"],
+    message:
+        r"""Only lists and sets can be used in spreads in constant lists and sets.""");
+
+// DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE.
+const Code<Null> codeConstEvalNotMapInSpread = messageConstEvalNotMapInSpread;
+
+// DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE.
+const MessageCode messageConstEvalNotMapInSpread = const MessageCode(
+    "ConstEvalNotMapInSpread",
+    analyzerCodes: <String>["CONST_SPREAD_EXPECTED_MAP"],
+    message: r"""Only maps can be used in spreads in constant maps.""");
+
+// DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE.
+const Code<Null> codeConstEvalNullValue = messageConstEvalNullValue;
+
+// DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE.
+const MessageCode messageConstEvalNullValue = const MessageCode(
+    "ConstEvalNullValue",
+    analyzerCodes: <String>["CONST_EVAL_THROWS_EXCEPTION"],
+    message: r"""Null value during constant evaluation.""");
+
+// DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE.
 const Template<
     Message Function(
         String string,
@@ -6107,6 +6226,17 @@
 }
 
 // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE.
+const Code<Null> codeInvalidSuperInInitializer =
+    messageInvalidSuperInInitializer;
+
+// DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE.
+const MessageCode messageInvalidSuperInInitializer = const MessageCode(
+    "InvalidSuperInInitializer",
+    index: 95,
+    message:
+        r"""Can only use 'super' in an initializer for calling the superclass constructor (e.g. 'super()' or 'super.namedConstructor()')""");
+
+// DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE.
 const Code<Null> codeInvalidSyncModifier = messageInvalidSyncModifier;
 
 // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE.
@@ -6117,6 +6247,16 @@
     tip: r"""Try replacing 'sync' with 'sync*'.""");
 
 // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE.
+const Code<Null> codeInvalidThisInInitializer = messageInvalidThisInInitializer;
+
+// DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE.
+const MessageCode messageInvalidThisInInitializer = const MessageCode(
+    "InvalidThisInInitializer",
+    index: 96,
+    message:
+        r"""Can only use 'this' in an initializer for field initialization (e.g. 'this.x = something') and constructor redirection (e.g. 'this()' or 'this.namedConstructor())""");
+
+// DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE.
 const Code<Null> codeInvalidUnicodeEscape = messageInvalidUnicodeEscape;
 
 // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE.
@@ -7068,6 +7208,27 @@
     message: r"""Can't assign to this.""");
 
 // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE.
+const Template<Message Function(Token token)> templateNotBinaryOperator =
+    const Template<Message Function(Token token)>(
+        messageTemplate: r"""'#lexeme' isn't a binary operator.""",
+        withArguments: _withArgumentsNotBinaryOperator);
+
+// DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE.
+const Code<Message Function(Token token)> codeNotBinaryOperator =
+    const Code<Message Function(Token token)>(
+  "NotBinaryOperator",
+  templateNotBinaryOperator,
+);
+
+// DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE.
+Message _withArgumentsNotBinaryOperator(Token token) {
+  String lexeme = token.lexeme;
+  return new Message(codeNotBinaryOperator,
+      message: """'${lexeme}' isn't a binary operator.""",
+      arguments: {'token': token});
+}
+
+// DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE.
 const Template<Message Function(String string)> templateNotConstantExpression =
     const Template<Message Function(String string)>(
         messageTemplate: r"""#string is not a constant expression.""",
@@ -8871,7 +9032,7 @@
 const Code<Message Function(String name)> codeThisAccessInFieldInitializer =
     const Code<Message Function(String name)>(
         "ThisAccessInFieldInitializer", templateThisAccessInFieldInitializer,
-        analyzerCodes: <String>["THIS_ACCESS_FROM_INITIALIZER"]);
+        analyzerCodes: <String>["THIS_ACCESS_FROM_FIELD_INITIALIZER"]);
 
 // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE.
 Message _withArgumentsThisAccessInFieldInitializer(String name) {
diff --git a/pkg/front_end/lib/src/fasta/incremental_compiler.dart b/pkg/front_end/lib/src/fasta/incremental_compiler.dart
index e938d69..63f805f 100644
--- a/pkg/front_end/lib/src/fasta/incremental_compiler.dart
+++ b/pkg/front_end/lib/src/fasta/incremental_compiler.dart
@@ -27,6 +27,7 @@
         Procedure,
         ProcedureKind,
         ReturnStatement,
+        Source,
         TreeNode,
         TypeParameter;
 
@@ -210,6 +211,8 @@
 
       Set<Uri> invalidatedUris = this.invalidatedUris.toSet();
 
+      invalidateNotKeptUserBuilders(invalidatedUris);
+
       ClassHierarchy hierarchy = userCode?.loader?.hierarchy;
       Set<LibraryBuilder> notReusedLibraries = new Set<LibraryBuilder>();
       List<LibraryBuilder> reusedLibraries = computeReusedLibraries(
@@ -219,14 +222,36 @@
           new Set<Uri>.from(reusedLibraries.map((b) => b.uri));
       for (Uri uri in new Set<Uri>.from(dillLoadedData.loader.builders.keys)
         ..removeAll(reusedLibraryUris)) {
-        dillLoadedData.loader.builders.remove(uri);
+        LibraryBuilder builder = dillLoadedData.loader.builders.remove(uri);
         userBuilders?.remove(uri);
+        CompilerContext.current.uriToSource.remove(builder.fileUri);
       }
 
-      // Remove component problems for libraries we don't reuse.
-      if (remainingComponentProblems.isNotEmpty) {
-        for (LibraryBuilder builder in notReusedLibraries) {
-          Library lib = builder.target;
+      if (hasToCheckPackageUris) {
+        // The package file was changed.
+        // Make sure the dill loader is on the same page.
+        DillTarget oldDillLoadedData = dillLoadedData;
+        dillLoadedData =
+            new DillTarget(ticker, uriTranslator, c.options.target);
+        for (DillLibraryBuilder library
+            in oldDillLoadedData.loader.builders.values) {
+          library.loader = dillLoadedData.loader;
+          dillLoadedData.loader.builders[library.uri] = library;
+          if (library.uri.scheme == "dart" && library.uri.path == "core") {
+            dillLoadedData.loader.coreLibrary = library;
+          }
+        }
+        dillLoadedData.loader.first = oldDillLoadedData.loader.first;
+        dillLoadedData.loader.libraries
+            .addAll(oldDillLoadedData.loader.libraries);
+      }
+
+      for (LibraryBuilder builder in notReusedLibraries) {
+        Library lib = builder.target;
+        CompilerContext.current.uriToSource.remove(builder.fileUri);
+
+        // Remove component problems for libraries we don't reuse.
+        if (remainingComponentProblems.isNotEmpty) {
           removeLibraryFromRemainingComponentProblems(lib, uriTranslator);
         }
       }
@@ -246,6 +271,8 @@
             " of ${userCode.loader.builders.length} libraries");
       }
 
+      await loadEnsureLoadedComponents(reusedLibraryUris, reusedLibraries);
+
       KernelTarget userCodeOld = userCode;
       userCode = new KernelTarget(
           new HybridFileSystem(
@@ -269,12 +296,20 @@
           userCode.loader.builders[entryPoints.first] != null) {
         userCode.loader.first = userCode.loader.builders[entryPoints.first];
       }
-      await userCode.buildOutlines();
+      Component componentWithDill = await userCode.buildOutlines();
 
-      // This is not the full component. It is the component including all
-      // libraries loaded from .dill files.
-      Component componentWithDill =
-          await userCode.buildComponent(verify: c.options.verify);
+      // This is not the full component. It is the component consisting of all
+      // newly compiled libraries and all libraries loaded from .dill files or
+      // directly from components.
+      // Technically, it's the combination of userCode.loader.libraries and
+      // dillLoadedData.loader.libraries.
+      if (!outlineOnly) {
+        componentWithDill =
+            await userCode.buildComponent(verify: c.options.verify);
+      }
+
+      recordNonFullComponentForTesting(componentWithDill);
+
       if (componentWithDill != null) {
         this.invalidatedUris.clear();
         hasToCheckPackageUris = false;
@@ -291,9 +326,15 @@
 
       List<Library> outputLibraries;
       Set<Library> allLibraries;
+      Map<Uri, Source> uriToSource = componentWithDill?.uriToSource;
       if (data.component != null || fullComponent) {
-        outputLibraries = computeTransitiveClosure(compiledLibraries,
-            entryPoints, reusedLibraries, hierarchy, uriTranslator);
+        outputLibraries = computeTransitiveClosure(
+            compiledLibraries,
+            entryPoints,
+            reusedLibraries,
+            hierarchy,
+            uriTranslator,
+            uriToSource);
         allLibraries = outputLibraries.toSet();
         if (!c.options.omitPlatform) {
           for (int i = 0; i < platformBuilders.length; i++) {
@@ -303,8 +344,14 @@
         }
       } else {
         outputLibraries = new List<Library>();
-        allLibraries = computeTransitiveClosure(compiledLibraries, entryPoints,
-                reusedLibraries, hierarchy, uriTranslator, outputLibraries)
+        allLibraries = computeTransitiveClosure(
+                compiledLibraries,
+                entryPoints,
+                reusedLibraries,
+                hierarchy,
+                uriTranslator,
+                uriToSource,
+                outputLibraries)
             .toSet();
       }
 
@@ -317,9 +364,8 @@
       }
 
       // This is the incremental component.
-      return context.options.target.configureComponent(new Component(
-          libraries: outputLibraries,
-          uriToSource: componentWithDill?.uriToSource))
+      return context.options.target.configureComponent(
+          new Component(libraries: outputLibraries, uriToSource: uriToSource))
         ..mainMethod = mainMethod
         ..problemsAsJson = problemsAsJson;
     });
@@ -327,13 +373,57 @@
 
   /// Internal method.
   void invalidateNotKeptUserBuilders(Set<Uri> invalidatedUris) {
-    throw UnimplementedError("Not implemented yet.");
+    if (modulesToLoad != null && userBuilders != null) {
+      Set<Library> loadedNotKept = new Set<Library>();
+      for (LibraryBuilder builder in userBuilders.values) {
+        loadedNotKept.add(builder.target);
+      }
+      for (Component module in modulesToLoad) {
+        loadedNotKept.removeAll(module.libraries);
+      }
+      for (Library lib in loadedNotKept) {
+        invalidatedUris.add(lib.importUri);
+      }
+    }
   }
 
   /// Internal method.
   Future loadEnsureLoadedComponents(
       Set<Uri> reusedLibraryUris, List<LibraryBuilder> reusedLibraries) async {
-    throw UnimplementedError("Not implemented yet.");
+    if (modulesToLoad != null) {
+      bool loadedAnything = false;
+      for (Component module in modulesToLoad) {
+        bool usedComponent = false;
+        for (Library lib in module.libraries) {
+          if (!reusedLibraryUris.contains(lib.importUri)) {
+            dillLoadedData.loader.libraries.add(lib);
+            dillLoadedData.addLibrary(lib);
+            reusedLibraries.add(dillLoadedData.loader.read(lib.importUri, -1));
+            usedComponent = true;
+          }
+        }
+        if (usedComponent) {
+          dillLoadedData.uriToSource.addAll(module.uriToSource);
+          loadedAnything = true;
+        }
+      }
+      if (loadedAnything) {
+        await dillLoadedData.buildOutlines();
+        userBuilders = <Uri, LibraryBuilder>{};
+        platformBuilders = <LibraryBuilder>[];
+        dillLoadedData.loader.builders.forEach((uri, builder) {
+          if (builder.uri.scheme == "dart") {
+            platformBuilders.add(builder);
+          } else {
+            userBuilders[uri] = builder;
+          }
+        });
+        if (userBuilders.isEmpty) {
+          userBuilders = null;
+        }
+      }
+      modulesToLoad = null;
+    }
   }
 
   /// Internal method.
@@ -415,6 +505,7 @@
       List<LibraryBuilder> reusedLibraries,
       ClassHierarchy hierarchy,
       UriTranslator uriTranslator,
+      Map<Uri, Source> uriToSource,
       [List<Library> inputLibrariesFiltered]) {
     List<Library> result = new List<Library>();
     Map<Uri, Library> libraryMap = <Uri, Library>{};
@@ -468,6 +559,8 @@
         Library lib = builder.target;
         removedLibraries.add(lib);
         dillLoadedData.loader.builders.remove(uri);
+        CompilerContext.current.uriToSource.remove(uri);
+        uriToSource.remove(uri);
         userBuilders?.remove(uri);
         removeLibraryFromRemainingComponentProblems(lib, uriTranslator);
       }
@@ -831,15 +924,22 @@
 
   @override
   void invalidateAllSources() {
-    throw UnimplementedError("Not implemented yet.");
+    if (userCode != null) {
+      Set<Uri> uris = new Set<Uri>.from(userCode.loader.builders.keys);
+      uris.removeAll(dillLoadedData.loader.builders.keys);
+      invalidatedUris.addAll(uris);
+    }
   }
 
   @override
   void setModulesToLoadOnNextComputeDelta(List<Component> components) {
-    throw UnimplementedError("Not implemented yet.");
+    modulesToLoad = components.toList();
   }
 
   /// Internal method.
+  void recordNonFullComponentForTesting(Component component) {}
+
+  /// Internal method.
   void recordInvalidatedImportUrisForTesting(List<Uri> uris) {}
 
   /// Internal method.
diff --git a/pkg/front_end/lib/src/fasta/kernel/body_builder.dart b/pkg/front_end/lib/src/fasta/kernel/body_builder.dart
index 7655108..203386b 100644
--- a/pkg/front_end/lib/src/fasta/kernel/body_builder.dart
+++ b/pkg/front_end/lib/src/fasta/kernel/body_builder.dart
@@ -45,7 +45,8 @@
 
 import '../scanner.dart' show Token;
 
-import '../scanner/token.dart' show isBinaryOperator, isMinusOperator;
+import '../scanner/token.dart'
+    show isBinaryOperator, isMinusOperator, isUserDefinableOperator;
 
 import '../scope.dart' show ProblemBuilder;
 
@@ -65,7 +66,16 @@
 import '../type_inference/type_promotion.dart'
     show TypePromoter, TypePromotionFact, TypePromotionScope;
 
-import 'collections.dart' show SpreadElement, SpreadMapEntry;
+import 'collections.dart'
+    show
+        ForElement,
+        ForInElement,
+        ForInMapEntry,
+        ForMapEntry,
+        IfElement,
+        IfMapEntry,
+        SpreadElement,
+        SpreadMapEntry;
 
 import 'constness.dart' show Constness;
 
@@ -1374,8 +1384,15 @@
       negate = true;
     }
     if (!isBinaryOperator(operator) && !isMinusOperator(operator)) {
-      return buildProblem(fasta.templateInvalidOperator.withArguments(token),
-          token.charOffset, token.length);
+      if (isUserDefinableOperator(operator)) {
+        return buildProblem(
+            fasta.templateNotBinaryOperator.withArguments(token),
+            token.charOffset,
+            token.length);
+      } else {
+        return buildProblem(fasta.templateInvalidOperator.withArguments(token),
+            token.charOffset, token.length);
+      }
     } else {
       Expression result = buildMethodInvocation(a, new Name(operator),
           forest.arguments(<Expression>[b], noLocation), token.charOffset,
@@ -2270,22 +2287,18 @@
 
   @override
   void endForControlFlow(Token token) {
-    debugEvent("endForControlFlow");
-    // TODO(danrubel) implement control flow support
-
+    debugEvent("ForControlFlow");
     var entry = pop();
     int updateExpressionCount = pop();
     pop(); // left separator
     pop(); // left parenthesis
     Token forToken = pop();
-
-    popListForEffect(updateExpressionCount); // updates
-    popStatement(); // condition
+    List<Expression> updates = popListForEffect(updateExpressionCount);
+    Statement conditionStatement = popStatement(); // condition
     Object variableOrExpression = pop();
+    exitLocalScope();
 
-    if (entry != invalidCollectionElement) {
-      // TODO(danrubel): Replace with control flow structures
-      buildVariableDeclarations(variableOrExpression); // variables
+    if (!library.loader.target.enableControlFlowCollections) {
       // TODO(danrubel): Report a more user friendly error message
       // when an experiment is not enabled
       handleRecoverableError(
@@ -2293,9 +2306,27 @@
           forToken,
           forToken);
       push(invalidCollectionElement);
-    } else {
-      // TODO(danrubel): Remove once unified collections enabled by default
+      return;
+    }
+    if (entry == invalidCollectionElement) {
       push(invalidCollectionElement);
+      return;
+    }
+    transformCollections = true;
+    List<VariableDeclaration> variables =
+        buildVariableDeclarations(variableOrExpression);
+    Expression condition;
+    if (forest.isExpressionStatement(conditionStatement)) {
+      condition =
+          forest.getExpressionFromExpressionStatement(conditionStatement);
+    } else {
+      assert(forest.isEmptyStatement(conditionStatement));
+    }
+    if (entry is MapEntry) {
+      push(forest.forMapEntry(variables, condition, updates, entry, forToken));
+    } else {
+      push(forest.forElement(
+          variables, condition, updates, toValue(entry), forToken));
     }
   }
 
@@ -2431,7 +2462,7 @@
         if (entry is MapEntry) {
           // TODO(danrubel): report the error on the colon
           addProblem(fasta.templateExpectedButGot.withArguments(','),
-              entry.value.fileOffset - 1, 1);
+              entry.fileOffset, 1);
         } else {
           // TODO(danrubel): Revise once control flow and spread
           //  collection entries are supported.
@@ -2493,6 +2524,13 @@
     final typeArgCount = typeArguments?.length;
     bool isSet = typeArgCount == 1 ? true : typeArgCount != null ? false : null;
 
+    for (int i = 0; i < setOrMapEntries.length; ++i) {
+      if (setOrMapEntries[i] is! MapEntry &&
+          !isConvertibleToMapEntry(setOrMapEntries[i])) {
+        hasSetEntry = true;
+      }
+    }
+
     // TODO(danrubel): If the type arguments are not known (null) then
     // defer set/map determination until after type resolution as per the
     // unified collection spec: https://github.com/dart-lang/language/pull/200
@@ -2502,7 +2540,15 @@
     if (isSet) {
       buildLiteralSet(typeArguments, constKeyword, leftBrace, setOrMapEntries);
     } else {
-      buildLiteralMap(typeArguments, constKeyword, leftBrace, setOrMapEntries);
+      List<MapEntry> mapEntries = new List<MapEntry>(setOrMapEntries.length);
+      for (int i = 0; i < setOrMapEntries.length; ++i) {
+        if (setOrMapEntries[i] is MapEntry) {
+          mapEntries[i] = setOrMapEntries[i];
+        } else {
+          mapEntries[i] = convertToMapEntry(setOrMapEntries[i]);
+        }
+      }
+      buildLiteralMap(typeArguments, constKeyword, leftBrace, mapEntries);
     }
   }
 
@@ -2526,8 +2572,58 @@
     push(forest.literalNull(token));
   }
 
+  bool isConvertibleToMapEntry(Expression element) {
+    if (element is SpreadElement) return true;
+    if (element is IfElement) {
+      return isConvertibleToMapEntry(element.then) &&
+          (element.otherwise == null ||
+              isConvertibleToMapEntry(element.otherwise));
+    }
+    if (element is ForElement) {
+      return isConvertibleToMapEntry(element.body);
+    }
+    if (element is ForInElement) {
+      return isConvertibleToMapEntry(element.body);
+    }
+    return false;
+  }
+
+  MapEntry convertToMapEntry(Expression element) {
+    if (element is SpreadElement) {
+      return new SpreadMapEntry(element.expression, element.isNullAware)
+        ..fileOffset = element.expression.fileOffset;
+    }
+    if (element is IfElement) {
+      return new IfMapEntry(
+          element.condition,
+          convertToMapEntry(element.then),
+          element.otherwise == null
+              ? null
+              : convertToMapEntry(element.otherwise))
+        ..fileOffset = element.fileOffset;
+    }
+    if (element is ForElement) {
+      return new ForMapEntry(element.variables, element.condition,
+          element.updates, convertToMapEntry(element.body))
+        ..fileOffset = element.fileOffset;
+    }
+    if (element is ForInElement) {
+      return new ForInMapEntry(element.variable, element.iterable,
+          element.prologue, convertToMapEntry(element.body), element.problem)
+        ..fileOffset = element.fileOffset;
+    }
+    return new MapEntry(
+        desugarSyntheticExpression(buildProblem(
+          fasta.templateExpectedAfterButGot.withArguments(':'),
+          element.fileOffset,
+          // TODO(danrubel): what is the length of the expression?
+          1,
+        )),
+        new NullLiteral());
+  }
+
   void buildLiteralMap(List<UnresolvedType<KernelTypeBuilder>> typeArguments,
-      Token constKeyword, Token leftBrace, List<dynamic> setOrMapEntries) {
+      Token constKeyword, Token leftBrace, List<MapEntry> entries) {
     DartType keyType;
     DartType valueType;
     if (typeArguments != null) {
@@ -2548,24 +2644,6 @@
       valueType = implicitTypeArgument;
     }
 
-    List<MapEntry> entries = <MapEntry>[];
-    if (setOrMapEntries != null) {
-      for (var entry in setOrMapEntries) {
-        if (entry is MapEntry) {
-          entries.add(entry);
-        } else if (entry is SpreadElement) {
-          entries.add(new SpreadMapEntry(entry.expression, entry.isNullAware));
-        } else {
-          addProblem(
-            fasta.templateExpectedAfterButGot.withArguments(':'),
-            (entry as Expression).fileOffset,
-            // TODO(danrubel): what is the length of the expression?
-            1,
-          );
-        }
-      }
-    }
-
     Expression node = forest.literalMap(
         constKeyword,
         constKeyword != null || constantContext == ConstantContext.inferred,
@@ -2740,7 +2818,8 @@
     DartType type = buildDartType(pop());
     library.checkBoundsInType(type, typeEnvironment, operator.charOffset);
     Expression expression = popForValue();
-    if (constantContext != ConstantContext.none) {
+    if (!library.loader.target.enableConstantUpdate2018 &&
+        constantContext != ConstantContext.none) {
       push(desugarSyntheticExpression(buildProblem(
           fasta.templateNotConstantExpression.withArguments('As expression'),
           operator.charOffset,
@@ -2764,7 +2843,8 @@
       typePromoter?.handleIsCheck(isExpression, isInverted, operand.variable,
           type, functionNestingLevel);
     }
-    if (constantContext != ConstantContext.none) {
+    if (!library.loader.target.enableConstantUpdate2018 &&
+        constantContext != ConstantContext.none) {
       push(desugarSyntheticExpression(buildProblem(
           fasta.templateNotConstantExpression.withArguments('Is expression'),
           isOperator.charOffset,
@@ -3652,6 +3732,8 @@
     push(ifToken);
   }
 
+  void handleElseControlFlow(Token elseToken) {}
+
   @override
   void endIfControlFlow(Token token) {
     debugEvent("endIfControlFlow");
@@ -4036,18 +4118,16 @@
 
   @override
   void endForInControlFlow(Token token) {
-    debugEvent("endForInControlFlow");
-    // TODO(danrubel) implement control flow support
-
+    debugEvent("ForInControlFlow");
     var entry = pop();
-    pop(); // `in` keyword
+    Token inToken = pop();
     Token forToken = pop();
-    pop(NullValue.AwaitToken); // await token
-    popForValue(); // expression
-    pop(); // lvalue
+    Token awaitToken = pop(NullValue.AwaitToken);
+    Expression iterable = popForValue();
+    Object lvalue = pop(); // lvalue
+    exitLocalScope();
 
-    if (entry != invalidCollectionElement) {
-      // TODO(danrubel): Replace this with control flow element
+    if (!library.loader.target.enableControlFlowCollections) {
       // TODO(danrubel): Report a more user friendly error message
       // when an experiment is not enabled
       handleRecoverableError(
@@ -4055,10 +4135,98 @@
           forToken,
           forToken);
       push(invalidCollectionElement);
-    } else {
-      // TODO(danrubel): Remove once unified collections enabled by default
-      push(invalidCollectionElement);
+      return;
     }
+    if (entry == invalidCollectionElement) {
+      push(invalidCollectionElement);
+      return;
+    }
+    transformCollections = true;
+    VariableDeclaration variable = buildForInVariable(lvalue);
+    Expression problem = checkForInVariable(lvalue, variable, forToken);
+    Statement prologue = buildForInBody(lvalue, variable, forToken, inToken);
+    if (entry is MapEntry) {
+      push(forest.forInMapEntry(
+          variable, iterable, prologue, entry, problem, forToken,
+          isAsync: awaitToken != null));
+    } else {
+      push(forest.forInElement(
+          variable, iterable, prologue, toValue(entry), problem, forToken,
+          isAsync: awaitToken != null));
+    }
+  }
+
+  VariableDeclaration buildForInVariable(Object lvalue) {
+    if (lvalue is VariableDeclaration) return lvalue;
+    return new VariableDeclarationJudgment.forValue(null, functionNestingLevel);
+  }
+
+  Expression checkForInVariable(
+      Object lvalue, VariableDeclaration variable, Token forToken) {
+    if (lvalue is VariableDeclaration) {
+      if (variable.isConst) {
+        return buildProblem(fasta.messageForInLoopWithConstVariable,
+            variable.fileOffset, variable.name.length);
+      }
+    } else if (lvalue is! Generator) {
+      Message message = forest.isVariablesDeclaration(lvalue)
+          ? fasta.messageForInLoopExactlyOneVariable
+          : fasta.messageForInLoopNotAssignable;
+      Token token = forToken.next.next;
+      return buildProblem(
+          message, offsetForToken(token), lengthForToken(token));
+    }
+    return null;
+  }
+
+  Statement buildForInBody(Object lvalue, VariableDeclaration variable,
+      Token forToken, Token inKeyword) {
+    if (lvalue is VariableDeclaration) return null;
+    if (lvalue is Generator) {
+      /// We are in this case, where `lvalue` isn't a [VariableDeclaration]:
+      ///
+      ///     for (lvalue in expression) body
+      ///
+      /// This is normalized to:
+      ///
+      ///     for (final #t in expression) {
+      ///       lvalue = #t;
+      ///       body;
+      ///     }
+      TypePromotionFact fact =
+          typePromoter?.getFactForAccess(variable, functionNestingLevel);
+      TypePromotionScope scope = typePromoter?.currentScope;
+      Expression syntheticAssignment = lvalue.buildAssignment(
+          new VariableGetJudgment(variable, fact, scope)
+            ..fileOffset = inKeyword.offset,
+          voidContext: true);
+      if (syntheticAssignment is shadow.SyntheticExpressionJudgment) {
+        syntheticAssignment = wrapSyntheticExpression(
+            desugarSyntheticExpression(syntheticAssignment),
+            offsetForToken(lvalue.token));
+      }
+      return forest.expressionStatement(syntheticAssignment, null);
+    }
+    Message message = forest.isVariablesDeclaration(lvalue)
+        ? fasta.messageForInLoopExactlyOneVariable
+        : fasta.messageForInLoopNotAssignable;
+    Token token = forToken.next.next;
+    Statement body;
+    if (forest.isVariablesDeclaration(lvalue)) {
+      body = forest.block(
+          null,
+          // New list because the declarations are not a growable list.
+          new List<Statement>.from(
+              forest.variablesDeclarationExtractDeclarations(lvalue)),
+          null);
+    } else {
+      body = forest.expressionStatement(lvalue, null);
+    }
+    return combineStatements(
+        forest.expressionStatement(
+            buildProblem(message, offsetForToken(token), lengthForToken(token)),
+            null),
+        body);
   }
 
   @override
@@ -4079,67 +4247,22 @@
       body = forest.syntheticLabeledStatement(body);
       continueTarget.resolveContinues(forest, body);
     }
-    VariableDeclaration variable;
-    Expression problem;
-    if (lvalue is VariableDeclaration) {
-      variable = lvalue;
-      if (variable.isConst) {
-        problem = buildProblem(fasta.messageForInLoopWithConstVariable,
-            variable.fileOffset, variable.name.length);
-      }
-    } else if (lvalue is Generator) {
-      /// We are in this case, where `lvalue` isn't a [VariableDeclaration]:
-      ///
-      ///     for (lvalue in expression) body
-      ///
-      /// This is normalized to:
-      ///
-      ///     for (final #t in expression) {
-      ///       lvalue = #t;
-      ///       body;
-      ///     }
-      variable =
-          new VariableDeclarationJudgment.forValue(null, functionNestingLevel);
-      TypePromotionFact fact =
-          typePromoter?.getFactForAccess(variable, functionNestingLevel);
-      TypePromotionScope scope = typePromoter?.currentScope;
-      Expression syntheticAssignment = lvalue.buildAssignment(
-          new VariableGetJudgment(variable, fact, scope)
-            ..fileOffset = inKeyword.offset,
-          voidContext: true);
-      if (syntheticAssignment is shadow.SyntheticExpressionJudgment) {
-        syntheticAssignment = wrapSyntheticExpression(
-            desugarSyntheticExpression(syntheticAssignment),
-            offsetForToken(lvalue.token));
-      }
-      body = combineStatements(
-          forest.expressionStatement(syntheticAssignment, null), body);
-    } else {
-      Message message = forest.isVariablesDeclaration(lvalue)
-          ? fasta.messageForInLoopExactlyOneVariable
-          : fasta.messageForInLoopNotAssignable;
-      Token token = forToken.next.next;
-      variable =
-          new VariableDeclarationJudgment.forValue(null, functionNestingLevel);
-      problem =
-          buildProblem(message, offsetForToken(token), lengthForToken(token));
-      if (forest.isVariablesDeclaration(lvalue)) {
-        body = forest.block(
-            null,
-            <Statement>[]
-              ..addAll(forest.variablesDeclarationExtractDeclarations(lvalue))
-              ..add(body),
-            null);
+    VariableDeclaration variable = buildForInVariable(lvalue);
+    Expression problem = checkForInVariable(lvalue, variable, forToken);
+    Statement prologue = buildForInBody(lvalue, variable, forToken, inKeyword);
+    if (prologue != null) {
+      if (prologue is Block) {
+        if (body is Block) {
+          for (Statement statement in body.statements) {
+            prologue.addStatement(statement);
+          }
+        } else {
+          prologue.addStatement(body);
+        }
+        body = prologue;
       } else {
-        body =
-            combineStatements(forest.expressionStatement(lvalue, null), body);
+        body = combineStatements(prologue, body);
       }
-      body = combineStatements(
-          forest.expressionStatement(
-              buildProblem(
-                  message, offsetForToken(token), lengthForToken(token)),
-              null),
-          body);
     }
     Statement result = new ForInStatement(variable, expression, body,
         isAsync: awaitToken != null)
diff --git a/pkg/front_end/lib/src/fasta/kernel/collections.dart b/pkg/front_end/lib/src/fasta/kernel/collections.dart
index 74f6789..c3a79d1 100644
--- a/pkg/front_end/lib/src/fasta/kernel/collections.dart
+++ b/pkg/front_end/lib/src/fasta/kernel/collections.dart
@@ -11,6 +11,7 @@
         Expression,
         MapEntry,
         setParents,
+        Statement,
         transformList,
         TreeNode,
         VariableDeclaration,
@@ -28,10 +29,13 @@
 
 import '../problems.dart' show getFileUri, unsupported;
 
+/// Mixin for spread and control-flow elements.
+///
 /// Spread and control-flow elements are not truly expressions and they cannot
 /// appear in arbitrary expression contexts in the Kernel program.  They can
-/// only appear as elements in list or set literals.
-mixin _FakeExpressionMixin on Expression {
+/// only appear as elements in list or set literals.  They are translated into
+/// a lower-level representation and never serialized to .dill files.
+mixin ControlFlowElement on Expression {
   /// Spread and contol-flow elements are not expressions and do not have a
   /// static type.
   @override
@@ -48,9 +52,10 @@
 }
 
 /// A spread element in a list or set literal.
-class SpreadElement extends Expression with _FakeExpressionMixin {
+class SpreadElement extends Expression with ControlFlowElement {
   Expression expression;
   bool isNullAware;
+  DartType elementType;
 
   SpreadElement(this.expression, this.isNullAware) {
     expression?.parent = this;
@@ -71,7 +76,7 @@
 }
 
 /// An 'if' element in a list or set literal.
-class IfElement extends Expression with _FakeExpressionMixin {
+class IfElement extends Expression with ControlFlowElement {
   Expression condition;
   Expression then;
   Expression otherwise;
@@ -107,7 +112,7 @@
 }
 
 /// A 'for' element in a list or set literal.
-class ForElement extends Expression with _FakeExpressionMixin {
+class ForElement extends Expression with ControlFlowElement {
   final List<VariableDeclaration> variables; // May be empty, but not null.
   Expression condition; // May be null.
   final List<Expression> updates; // May be empty, but not null.
@@ -144,22 +149,30 @@
 }
 
 /// A 'for-in' element in a list or set literal.
-class ForInElement extends Expression with _FakeExpressionMixin {
+class ForInElement extends Expression with ControlFlowElement {
   VariableDeclaration variable; // Has no initializer.
   Expression iterable;
+  Statement prologue; // May be null.
   Expression body;
+  Expression problem; // May be null.
   bool isAsync; // True if this is an 'await for' loop.
 
-  ForInElement(this.variable, this.iterable, this.body, {this.isAsync: false}) {
+  ForInElement(
+      this.variable, this.iterable, this.prologue, this.body, this.problem,
+      {this.isAsync: false}) {
     variable?.parent = this;
     iterable?.parent = this;
+    prologue?.parent = this;
     body?.parent = this;
+    problem?.parent = this;
   }
 
   visitChildren(Visitor<Object> v) {
     variable?.accept(v);
     iterable?.accept(v);
+    prologue?.accept(v);
     body?.accept(v);
+    problem?.accept(v);
   }
 
   transformChildren(Transformer v) {
@@ -171,47 +184,56 @@
       iterable = iterable.accept(v);
       iterable?.parent = this;
     }
+    if (prologue != null) {
+      prologue = prologue.accept(v);
+      prologue?.parent = this;
+    }
     if (body != null) {
       body = body.accept(v);
       body?.parent = this;
     }
+    if (problem != null) {
+      problem = problem.accept(v);
+      problem?.parent = this;
+    }
   }
 }
 
-mixin _FakeMapEntryMixin implements MapEntry {
+mixin ControlFlowMapEntry implements MapEntry {
   @override
-  Expression get key => throw UnsupportedError('SpreadMapEntry.key getter');
+  Expression get key {
+    throw UnsupportedError('ControlFlowMapEntry.key getter');
+  }
 
   @override
   void set key(Expression expr) {
-    throw UnsupportedError('SpreadMapEntry.key setter');
+    throw UnsupportedError('ControlFlowMapEntry.key setter');
   }
 
   @override
-  Expression get value => throw UnsupportedError('SpreadMapEntry.value getter');
+  Expression get value {
+    throw UnsupportedError('ControlFlowMapEntry.value getter');
+  }
 
   @override
   void set value(Expression expr) {
-    throw UnsupportedError('SpreadMapEntry.value setter');
+    throw UnsupportedError('ControlFlowMapEntry.value setter');
   }
 
   @override
-  accept(TreeVisitor<Object> v) {
-    throw UnsupportedError('SpreadMapEntry.accept');
-  }
+  accept(TreeVisitor<Object> v) => v.defaultTreeNode(this);
 }
 
 /// A spread element in a map literal.
-class SpreadMapEntry extends TreeNode with _FakeMapEntryMixin {
+class SpreadMapEntry extends TreeNode with ControlFlowMapEntry {
   Expression expression;
   bool isNullAware;
+  DartType entryType;
 
   SpreadMapEntry(this.expression, this.isNullAware) {
     expression?.parent = this;
   }
 
-  accept(TreeVisitor<Object> v) => v.defaultTreeNode(this);
-
   @override
   visitChildren(Visitor<Object> v) {
     expression?.accept(v);
@@ -227,7 +249,7 @@
 }
 
 /// An 'if' element in a map literal.
-class IfMapEntry extends TreeNode with _FakeMapEntryMixin {
+class IfMapEntry extends TreeNode with ControlFlowMapEntry {
   Expression condition;
   MapEntry then;
   MapEntry otherwise;
@@ -263,7 +285,7 @@
 }
 
 /// A 'for' element in a map literal.
-class ForMapEntry extends TreeNode with _FakeMapEntryMixin {
+class ForMapEntry extends TreeNode with ControlFlowMapEntry {
   final List<VariableDeclaration> variables; // May be empty, but not null.
   Expression condition; // May be null.
   final List<Expression> updates; // May be empty, but not null.
@@ -300,23 +322,30 @@
 }
 
 /// A 'for-in' element in a map literal.
-class ForInMapEntry extends TreeNode with _FakeMapEntryMixin {
+class ForInMapEntry extends TreeNode with ControlFlowMapEntry {
   VariableDeclaration variable; // Has no initializer.
   Expression iterable;
+  Statement prologue; // May be null.
   MapEntry body;
+  Expression problem; // May be null.
   bool isAsync; // True if this is an 'await for' loop.
 
-  ForInMapEntry(this.variable, this.iterable, this.body,
+  ForInMapEntry(
+      this.variable, this.iterable, this.prologue, this.body, this.problem,
       {this.isAsync: false}) {
     variable?.parent = this;
     iterable?.parent = this;
+    prologue?.parent = this;
     body?.parent = this;
+    problem?.parent = this;
   }
 
   visitChildren(Visitor<Object> v) {
     variable?.accept(v);
     iterable?.accept(v);
+    prologue?.accept(v);
     body?.accept(v);
+    problem?.accept(v);
   }
 
   transformChildren(Transformer v) {
@@ -328,9 +357,17 @@
       iterable = iterable.accept(v);
       iterable?.parent = this;
     }
+    if (prologue != null) {
+      prologue = prologue.accept(v);
+      prologue?.parent = this;
+    }
     if (body != null) {
       body = body.accept(v);
       body?.parent = this;
     }
+    if (problem != null) {
+      problem = problem.accept(v);
+      problem?.parent = this;
+    }
   }
 }
diff --git a/pkg/front_end/lib/src/fasta/kernel/constant_evaluator.dart b/pkg/front_end/lib/src/fasta/kernel/constant_evaluator.dart
new file mode 100644
index 0000000..85c5de0
--- /dev/null
+++ b/pkg/front_end/lib/src/fasta/kernel/constant_evaluator.dart
@@ -0,0 +1,2304 @@
+// Copyright (c) 2017, the Dart project authors.  Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+/// This library implements a kernel2kernel constant evaluation transformation.
+///
+/// Even though it is expected that the frontend does not emit kernel AST which
+/// contains compile-time errors, this transformation still performs some
+/// valiation and throws a [ConstantEvaluationError] if there was a compile-time
+/// errors.
+///
+/// Due to the lack information which is is only available in the front-end,
+/// this validation is incomplete (e.g. whether an integer literal used the
+/// hexadecimal syntax or not).
+///
+/// Furthermore due to the lowering of certain constructs in the front-end
+/// (e.g. '??') we need to support a super-set of the normal constant expression
+/// language.  Issue(http://dartbug.com/31799)
+library fasta.constant_evaluator;
+
+import 'dart:core' hide MapEntry;
+
+import 'dart:io' as io;
+
+import 'package:kernel/ast.dart';
+import 'package:kernel/class_hierarchy.dart';
+import 'package:kernel/clone.dart';
+import 'package:kernel/core_types.dart';
+import 'package:kernel/kernel.dart';
+import 'package:kernel/type_algebra.dart';
+import 'package:kernel/type_environment.dart';
+
+import 'package:kernel/target/targets.dart';
+
+import '../fasta_codes.dart'
+    show
+        LocatedMessage,
+        Message,
+        messageConstEvalCircularity,
+        messageConstEvalContext,
+        messageConstEvalFailedAssertion,
+        messageConstEvalIterationInConstList,
+        messageConstEvalIterationInConstSet,
+        messageConstEvalIterationInConstMap,
+        messageConstEvalNotListOrSetInSpread,
+        messageConstEvalNotMapInSpread,
+        messageConstEvalNullValue,
+        noLength,
+        templateConstEvalDeferredLibrary,
+        templateConstEvalDuplicateElement,
+        templateConstEvalDuplicateKey,
+        templateConstEvalFailedAssertionWithMessage,
+        templateConstEvalFreeTypeParameter,
+        templateConstEvalInvalidType,
+        templateConstEvalInvalidBinaryOperandType,
+        templateConstEvalInvalidMethodInvocation,
+        templateConstEvalInvalidPropertyGet,
+        templateConstEvalInvalidStaticInvocation,
+        templateConstEvalInvalidStringInterpolationOperand,
+        templateConstEvalInvalidSymbolName,
+        templateConstEvalNegativeShift,
+        templateConstEvalNonConstantLiteral,
+        templateConstEvalNonConstantVariableGet,
+        templateConstEvalZeroDivisor;
+
+import 'collections.dart'
+    show
+        ForElement,
+        ForInElement,
+        IfElement,
+        SpreadElement,
+        ForMapEntry,
+        ForInMapEntry,
+        IfMapEntry,
+        SpreadMapEntry;
+
+Component transformComponent(Component component, ConstantsBackend backend,
+    Map<String, String> environmentDefines, ErrorReporter errorReporter,
+    {bool keepFields: true,
+    bool enableAsserts: false,
+    bool evaluateAnnotations: true,
+    bool desugarSets: false,
+    CoreTypes coreTypes,
+    ClassHierarchy hierarchy}) {
+  coreTypes ??= new CoreTypes(component);
+  hierarchy ??= new ClassHierarchy(component);
+
+  final typeEnvironment = new TypeEnvironment(coreTypes, hierarchy);
+
+  transformLibraries(component.libraries, backend, environmentDefines,
+      typeEnvironment, errorReporter,
+      keepFields: keepFields,
+      enableAsserts: enableAsserts,
+      desugarSets: desugarSets,
+      evaluateAnnotations: evaluateAnnotations);
+  return component;
+}
+
+void transformLibraries(
+    List<Library> libraries,
+    ConstantsBackend backend,
+    Map<String, String> environmentDefines,
+    TypeEnvironment typeEnvironment,
+    ErrorReporter errorReporter,
+    {bool keepFields: true,
+    bool keepVariables: false,
+    bool evaluateAnnotations: true,
+    bool desugarSets: false,
+    bool enableAsserts: false}) {
+  final ConstantsTransformer constantsTransformer = new ConstantsTransformer(
+      backend,
+      environmentDefines,
+      keepFields,
+      keepVariables,
+      evaluateAnnotations,
+      desugarSets,
+      typeEnvironment,
+      enableAsserts,
+      errorReporter);
+  for (final Library library in libraries) {
+    constantsTransformer.convertLibrary(library);
+  }
+}
+
+class ConstantsTransformer extends Transformer {
+  final ConstantEvaluator constantEvaluator;
+  final TypeEnvironment typeEnvironment;
+
+  /// Whether to preserve constant [Field]s.  All use-sites will be rewritten.
+  final bool keepFields;
+  final bool keepVariables;
+  final bool evaluateAnnotations;
+  final bool desugarSets;
+
+  ConstantsTransformer(
+      ConstantsBackend backend,
+      Map<String, String> environmentDefines,
+      this.keepFields,
+      this.keepVariables,
+      this.evaluateAnnotations,
+      this.desugarSets,
+      this.typeEnvironment,
+      bool enableAsserts,
+      ErrorReporter errorReporter)
+      : constantEvaluator = new ConstantEvaluator(backend, environmentDefines,
+            typeEnvironment, enableAsserts, errorReporter,
+            desugarSets: desugarSets);
+
+  // Transform the library/class members:
+
+  void convertLibrary(Library library) {
+    transformAnnotations(library.annotations, library);
+
+    transformList(library.dependencies, this, library);
+    transformList(library.parts, this, library);
+    transformList(library.typedefs, this, library);
+    transformList(library.classes, this, library);
+    transformList(library.procedures, this, library);
+    transformList(library.fields, this, library);
+
+    if (!keepFields) {
+      // The transformer API does not iterate over `Library.additionalExports`,
+      // so we manually delete the references to shaken nodes.
+      library.additionalExports.removeWhere((Reference reference) {
+        return reference.node is Field && reference.canonicalName == null;
+      });
+    }
+  }
+
+  visitLibraryPart(LibraryPart node) {
+    constantEvaluator.withNewEnvironment(() {
+      transformAnnotations(node.annotations, node);
+    });
+    return node;
+  }
+
+  visitLibraryDependency(LibraryDependency node) {
+    constantEvaluator.withNewEnvironment(() {
+      transformAnnotations(node.annotations, node);
+    });
+    return node;
+  }
+
+  visitClass(Class node) {
+    constantEvaluator.withNewEnvironment(() {
+      transformAnnotations(node.annotations, node);
+      transformList(node.fields, this, node);
+      transformList(node.typeParameters, this, node);
+      transformList(node.constructors, this, node);
+      transformList(node.procedures, this, node);
+      transformList(node.redirectingFactoryConstructors, this, node);
+    });
+    return node;
+  }
+
+  visitProcedure(Procedure node) {
+    constantEvaluator.withNewEnvironment(() {
+      transformAnnotations(node.annotations, node);
+      node.function = node.function.accept(this)..parent = node;
+    });
+    return node;
+  }
+
+  visitConstructor(Constructor node) {
+    constantEvaluator.withNewEnvironment(() {
+      transformAnnotations(node.annotations, node);
+      transformList(node.initializers, this, node);
+      node.function = node.function.accept(this)..parent = node;
+    });
+    return node;
+  }
+
+  visitTypedef(Typedef node) {
+    constantEvaluator.withNewEnvironment(() {
+      transformAnnotations(node.annotations, node);
+      transformList(node.typeParameters, this, node);
+      transformList(node.typeParametersOfFunctionType, this, node);
+      transformList(node.positionalParameters, this, node);
+      transformList(node.namedParameters, this, node);
+    });
+    return node;
+  }
+
+  visitRedirectingFactoryConstructor(RedirectingFactoryConstructor node) {
+    constantEvaluator.withNewEnvironment(() {
+      transformAnnotations(node.annotations, node);
+      transformList(node.typeParameters, this, node);
+      transformList(node.positionalParameters, this, node);
+      transformList(node.namedParameters, this, node);
+    });
+    return node;
+  }
+
+  visitTypeParameter(TypeParameter node) {
+    transformAnnotations(node.annotations, node);
+    return node;
+  }
+
+  void transformAnnotations(List<Expression> nodes, TreeNode parent) {
+    if (evaluateAnnotations && nodes.length > 0) {
+      transformExpressions(nodes, parent);
+    }
+  }
+
+  void transformExpressions(List<Expression> nodes, TreeNode parent) {
+    constantEvaluator.withNewEnvironment(() {
+      for (int i = 0; i < nodes.length; ++i) {
+        nodes[i] = tryEvaluateAndTransformWithContext(parent, nodes[i])
+          ..parent = parent;
+      }
+    });
+  }
+
+  // Handle definition of constants:
+
+  visitFunctionNode(FunctionNode node) {
+    final positionalParameterCount = node.positionalParameters.length;
+    for (int i = 0; i < positionalParameterCount; ++i) {
+      final VariableDeclaration variable = node.positionalParameters[i];
+      transformAnnotations(variable.annotations, variable);
+      if (variable.initializer != null) {
+        variable.initializer =
+            tryEvaluateAndTransformWithContext(variable, variable.initializer)
+              ..parent = variable;
+      }
+    }
+    for (final VariableDeclaration variable in node.namedParameters) {
+      transformAnnotations(variable.annotations, variable);
+      if (variable.initializer != null) {
+        variable.initializer =
+            tryEvaluateAndTransformWithContext(variable, variable.initializer)
+              ..parent = variable;
+      }
+    }
+    if (node.body != null) {
+      node.body = node.body.accept(this)..parent = node;
+    }
+    return node;
+  }
+
+  visitVariableDeclaration(VariableDeclaration node) {
+    transformAnnotations(node.annotations, node);
+
+    if (node.initializer != null) {
+      if (node.isConst) {
+        final Constant constant =
+            tryEvaluateWithContext(node, node.initializer);
+
+        // If there was a constant evaluation error we will not continue and
+        // simply keep the old [node].
+        if (constant != null) {
+          constantEvaluator.env.addVariableValue(node, constant);
+
+          if (keepVariables) {
+            // So the value of the variable is still available for debugging
+            // purposes we convert the constant variable to be a final variable
+            // initialized to the evaluated constant expression.
+            node.initializer = makeConstantExpression(constant)..parent = node;
+            node.isFinal = true;
+            node.isConst = false;
+          } else {
+            // Since we convert all use-sites of constants, the constant
+            // [VariableDeclaration] is unused and we'll therefore remove it.
+            return null;
+          }
+        }
+      } else {
+        node.initializer = node.initializer.accept(this)..parent = node;
+      }
+    }
+    return node;
+  }
+
+  visitField(Field node) {
+    return constantEvaluator.withNewEnvironment(() {
+      if (node.isConst) {
+        // Since we convert all use-sites of constants, the constant [Field]
+        // cannot be referenced anymore.  We therefore get rid of it if
+        // [keepFields] was not specified.
+        if (!keepFields) {
+          return null;
+        }
+
+        // Otherwise we keep the constant [Field] and convert it's initializer.
+        transformAnnotations(node.annotations, node);
+        if (node.initializer != null) {
+          node.initializer =
+              tryEvaluateAndTransformWithContext(node, node.initializer)
+                ..parent = node;
+        }
+      } else {
+        transformAnnotations(node.annotations, node);
+        if (node.initializer != null) {
+          node.initializer = node.initializer.accept(this)..parent = node;
+        }
+      }
+      return node;
+    });
+  }
+
+  // Handle use-sites of constants (and "inline" constant expressions):
+
+  visitSymbolLiteral(SymbolLiteral node) {
+    return makeConstantExpression(constantEvaluator.evaluate(node));
+  }
+
+  visitStaticGet(StaticGet node) {
+    final Member target = node.target;
+    if (target is Field && target.isConst) {
+      final Constant constant =
+          tryEvaluateWithContext(node, target.initializer);
+      return constant != null ? makeConstantExpression(constant) : node;
+    } else if (target is Procedure && target.kind == ProcedureKind.Method) {
+      return tryEvaluateAndTransformWithContext(node, node);
+    }
+    return super.visitStaticGet(node);
+  }
+
+  visitSwitchCase(SwitchCase node) {
+    transformExpressions(node.expressions, node);
+    return super.visitSwitchCase(node);
+  }
+
+  visitVariableGet(VariableGet node) {
+    if (node.variable.isConst) {
+      return tryEvaluateAndTransformWithContext(node, node);
+    }
+    return super.visitVariableGet(node);
+  }
+
+  visitListLiteral(ListLiteral node) {
+    if (node.isConst) {
+      return tryEvaluateAndTransformWithContext(node, node);
+    }
+    return super.visitListLiteral(node);
+  }
+
+  visitSetLiteral(SetLiteral node) {
+    if (node.isConst) {
+      return tryEvaluateAndTransformWithContext(node, node);
+    }
+    return super.visitSetLiteral(node);
+  }
+
+  visitMapLiteral(MapLiteral node) {
+    if (node.isConst) {
+      return tryEvaluateAndTransformWithContext(node, node);
+    }
+    return super.visitMapLiteral(node);
+  }
+
+  visitConstructorInvocation(ConstructorInvocation node) {
+    if (node.isConst) {
+      return tryEvaluateAndTransformWithContext(node, node);
+    }
+    return super.visitConstructorInvocation(node);
+  }
+
+  visitStaticInvocation(StaticInvocation node) {
+    if (node.isConst) {
+      return tryEvaluateAndTransformWithContext(node, node);
+    }
+    return super.visitStaticInvocation(node);
+  }
+
+  visitConstantExpression(ConstantExpression node) {
+    Constant constant = node.constant;
+    if (constant is UnevaluatedConstant) {
+      Expression expression = constant.expression;
+      return tryEvaluateAndTransformWithContext(expression, expression);
+    } else {
+      node.constant = constantEvaluator.canonicalize(constant);
+      return node;
+    }
+  }
+
+  tryEvaluateAndTransformWithContext(TreeNode treeContext, Expression node) {
+    final Constant constant = tryEvaluateWithContext(treeContext, node);
+    return constant != null ? makeConstantExpression(constant) : node;
+  }
+
+  tryEvaluateWithContext(TreeNode treeContext, Expression node) {
+    if (treeContext == node) {
+      return constantEvaluator.evaluate(node);
+    }
+
+    return constantEvaluator.runInsideContext(treeContext, () {
+      return constantEvaluator.evaluate(node);
+    });
+  }
+
+  Expression makeConstantExpression(Constant constant) {
+    if (constant is UnevaluatedConstant &&
+        constant.expression is InvalidExpression) {
+      return constant.expression;
+    }
+    return new ConstantExpression(constant);
+  }
+}
+
+class ConstantEvaluator extends RecursiveVisitor<Constant> {
+  final ConstantsBackend backend;
+  final NumberSemantics numberSemantics;
+  Map<String, String> environmentDefines;
+  final CoreTypes coreTypes;
+  final TypeEnvironment typeEnvironment;
+  final bool enableAsserts;
+  final ErrorReporter errorReporter;
+
+  final bool desugarSets;
+  final Field unmodifiableSetMap;
+
+  final isInstantiated = new IsInstantiatedVisitor().isInstantiated;
+
+  final Map<Constant, Constant> canonicalizationCache;
+  final Map<Node, Object> nodeCache;
+  final CloneVisitor cloner = new CloneVisitor();
+
+  final NullConstant nullConstant = new NullConstant();
+  final BoolConstant trueConstant = new BoolConstant(true);
+  final BoolConstant falseConstant = new BoolConstant(false);
+
+  final List<TreeNode> contextChain = [];
+
+  InstanceBuilder instanceBuilder;
+  EvaluationEnvironment env;
+  Set<Expression> replacementNodes = new Set<Expression>.identity();
+  Map<Constant, Constant> lowered = new Map<Constant, Constant>.identity();
+
+  bool seenUnevaluatedChild; // Any children that were left unevaluated?
+  int lazyDepth; // Current nesting depth of lazy regions.
+
+  bool get shouldBeUnevaluated => seenUnevaluatedChild || lazyDepth != 0;
+
+  bool get targetingJavaScript => numberSemantics == NumberSemantics.js;
+
+  ConstantEvaluator(this.backend, this.environmentDefines, this.typeEnvironment,
+      this.enableAsserts, this.errorReporter,
+      {this.desugarSets = false})
+      : numberSemantics = backend.numberSemantics,
+        coreTypes = typeEnvironment.coreTypes,
+        canonicalizationCache = <Constant, Constant>{},
+        nodeCache = <Node, Constant>{},
+        env = new EvaluationEnvironment(),
+        unmodifiableSetMap = desugarSets
+            ? typeEnvironment.coreTypes.index
+                .getMember('dart:collection', '_UnmodifiableSet', '_map')
+            : null;
+
+  Uri getFileUri(TreeNode node) {
+    while (node != null && node is! FileUriNode) {
+      node = node.parent;
+    }
+    return (node as FileUriNode)?.fileUri;
+  }
+
+  int getFileOffset(Uri uri, TreeNode node) {
+    if (uri == null) return TreeNode.noOffset;
+    while (node != null && node.fileOffset == TreeNode.noOffset) {
+      node = node.parent;
+    }
+    return node == null ? TreeNode.noOffset : node.fileOffset;
+  }
+
+  /// Evaluate [node] and possibly cache the evaluation result.
+  /// Returns UnevaluatedConstant if the constant could not be evaluated.
+  /// If the expression in the UnevaluatedConstant is an InvalidExpression,
+  /// an error occurred during constant evaluation.
+  Constant evaluate(Expression node) {
+    seenUnevaluatedChild = false;
+    lazyDepth = 0;
+    try {
+      return _evaluateSubexpression(node);
+    } on _AbortDueToError catch (e) {
+      final Uri uri = getFileUri(e.node);
+      final int fileOffset = getFileOffset(uri, e.node);
+      final locatedMessage = e.message.withLocation(uri, fileOffset, noLength);
+
+      final contextMessages = <LocatedMessage>[];
+      if (e.context != null) contextMessages.addAll(e.context);
+      for (final TreeNode node in contextChain) {
+        final Uri uri = getFileUri(node);
+        final int fileOffset = getFileOffset(uri, node);
+        contextMessages.add(
+            messageConstEvalContext.withLocation(uri, fileOffset, noLength));
+      }
+      errorReporter.report(locatedMessage, contextMessages);
+      return new UnevaluatedConstant(new InvalidExpression(e.message.message));
+    } on _AbortDueToInvalidExpression catch (e) {
+      // TODO(askesc): Copy position from erroneous node.
+      // Currently not possible, as it might be in a different file.
+      // Can be done if we add an explicit URI to InvalidExpression.
+      InvalidExpression invalid = new InvalidExpression(e.message);
+      if (invalid.fileOffset == TreeNode.noOffset) {
+        invalid.fileOffset = node.fileOffset;
+      }
+      errorReporter.reportInvalidExpression(invalid);
+      return new UnevaluatedConstant(invalid);
+    }
+  }
+
+  /// Report an error that has been detected during constant evaluation.
+  Null report(TreeNode node, Message message, {List<LocatedMessage> context}) {
+    throw new _AbortDueToError(node, message, context: context);
+  }
+
+  /// Report a construct that should not occur inside a potentially constant
+  /// expression. It is assumed that an error has already been reported.
+  Null reportInvalid(TreeNode node, String message) {
+    throw new _AbortDueToInvalidExpression(node, message);
+  }
+
+  /// Produce an unevaluated constant node for an expression.
+  Constant unevaluated(Expression original, Expression replacement) {
+    replacement.fileOffset = original.fileOffset;
+    // TODO(askesc,johnniwinther): Preserve fileUri on [replacement].
+    return new UnevaluatedConstant(replacement);
+  }
+
+  /// Extract an expression from a (possibly unevaluated) constant to become
+  /// part of the expression tree of another unevaluated constant.
+  /// Makes sure a particular expression occurs only once in the tree by
+  /// cloning further instances.
+  Expression extract(Constant constant) {
+    Expression expression = constant.asExpression();
+    if (!replacementNodes.add(expression)) {
+      expression = cloner.clone(expression);
+      replacementNodes.add(expression);
+    }
+    return expression;
+  }
+
+  /// Enter a region of lazy evaluation. All leaf nodes are evaluated normally
+  /// (to ensure inlining of referenced local variables), but composite nodes
+  /// always treat their children as unevaluated, resulting in a partially
+  /// evaluated clone of the original expression tree.
+  /// Lazy evaluation is used for the subtrees of lazy operations with
+  /// unevaluated conditions to ensure no errors are reported for problems
+  /// in the subtree as long as the subtree is potentially constant.
+  void enterLazy() => lazyDepth++;
+
+  /// Leave a (possibly nested) region of lazy evaluation.
+  void leaveLazy() => lazyDepth--;
+
+  Constant lower(Constant original, Constant replacement) {
+    if (!identical(original, replacement)) {
+      original = canonicalize(original);
+      replacement = canonicalize(replacement);
+      lowered[replacement] = original;
+      return replacement;
+    }
+    return canonicalize(replacement);
+  }
+
+  Constant unlower(Constant constant) {
+    return lowered[constant] ?? constant;
+  }
+
+  Constant lowerListConstant(ListConstant constant) {
+    if (shouldBeUnevaluated) return constant;
+    return lower(constant, backend.lowerListConstant(constant));
+  }
+
+  Constant lowerSetConstant(SetConstant constant) {
+    if (shouldBeUnevaluated) return constant;
+    return lower(constant, backend.lowerSetConstant(constant));
+  }
+
+  Constant lowerMapConstant(MapConstant constant) {
+    if (shouldBeUnevaluated) return constant;
+    return lower(constant, backend.lowerMapConstant(constant));
+  }
+
+  /// Evaluate [node] and possibly cache the evaluation result.
+  /// @throws _AbortDueToError or _AbortDueToInvalidExpression if expression
+  /// can't be evaluated.
+  Constant _evaluateSubexpression(Expression node) {
+    if (node == null) return nullConstant;
+    bool wasUnevaluated = seenUnevaluatedChild;
+    seenUnevaluatedChild = false;
+    Constant result;
+    if (env.isEmpty) {
+      // We only try to evaluate the same [node] *once* within an empty
+      // environment.
+      if (nodeCache.containsKey(node)) {
+        result = nodeCache[node] ?? report(node, messageConstEvalCircularity);
+      } else {
+        nodeCache[node] = null;
+        result = nodeCache[node] = node.accept(this);
+      }
+    } else {
+      result = node.accept(this);
+    }
+    seenUnevaluatedChild = wasUnevaluated || result is UnevaluatedConstant;
+    return result;
+  }
+
+  Constant runInsideContext(TreeNode node, Constant fun()) {
+    try {
+      pushContext(node);
+      return fun();
+    } finally {
+      popContext(node);
+    }
+  }
+
+  Constant runInsideContextIfNoContext(TreeNode node, Constant fun()) {
+    if (contextChain.isEmpty) {
+      return runInsideContext(node, fun);
+    } else {
+      return fun();
+    }
+  }
+
+  pushContext(TreeNode contextNode) {
+    contextChain.add(contextNode);
+  }
+
+  popContext(TreeNode contextNode) {
+    assert(contextChain.last == contextNode);
+    contextChain.length = contextChain.length - 1;
+  }
+
+  defaultTreeNode(Node node) {
+    // Only a subset of the expression language is valid for constant
+    // evaluation.
+    return reportInvalid(
+        node, 'Constant evaluation has no support for ${node.runtimeType}!');
+  }
+
+  visitNullLiteral(NullLiteral node) => nullConstant;
+
+  visitBoolLiteral(BoolLiteral node) {
+    return node.value ? trueConstant : falseConstant;
+  }
+
+  visitIntLiteral(IntLiteral node) {
+    // The frontend will ensure the integer literals are in signed 64-bit
+    // range.
+    return canonicalize(new IntConstant(node.value));
+  }
+
+  visitDoubleLiteral(DoubleLiteral node) {
+    return canonicalize(makeDoubleConstant(node.value));
+  }
+
+  visitStringLiteral(StringLiteral node) {
+    return canonicalize(new StringConstant(node.value));
+  }
+
+  visitTypeLiteral(TypeLiteral node) {
+    final DartType type = evaluateDartType(node, node.type);
+    return canonicalize(new TypeLiteralConstant(type));
+  }
+
+  visitConstantExpression(ConstantExpression node) {
+    Constant constant = node.constant;
+    Constant result = constant;
+    if (constant is UnevaluatedConstant) {
+      result = runInsideContext(constant.expression, () {
+        return _evaluateSubexpression(constant.expression);
+      });
+    }
+    // If there were already constants in the AST then we make sure we
+    // re-canonicalize them.  After running the transformer we will therefore
+    // have a fully-canonicalized constant DAG with roots coming from the
+    // [ConstantExpression] nodes in the AST.
+    return canonicalize(result);
+  }
+
+  /// Add an element (which is possibly a spread or an if element) to a
+  /// constant list or set represented as a list of (possibly unevaluated)
+  /// lists or sets to be concatenated.
+  /// Each element of [parts] is either a `List<Constant>` (containing fully
+  /// evaluated constants) or a `Constant` (potentially unevaluated).
+  /// Pass an identity set as [seen] for sets and omit it for lists.
+  void addToListOrSetConstant(
+      List<Object> parts, Expression element, DartType elementType,
+      [Set<Constant> seen]) {
+    bool isSet = seen != null;
+    if (element is SpreadElement) {
+      Constant spread = unlower(_evaluateSubexpression(element.expression));
+      if (shouldBeUnevaluated) {
+        // Unevaluated spread
+        if (element.isNullAware) {
+          VariableDeclaration temp =
+              new VariableDeclaration(null, initializer: extract(spread));
+          parts.add(unevaluated(
+              element.expression,
+              new Let(
+                  temp,
+                  new ConditionalExpression(
+                      new MethodInvocation(new VariableGet(temp),
+                          new Name('=='), new Arguments([new NullLiteral()])),
+                      new ListLiteral([], isConst: true),
+                      new VariableGet(temp),
+                      const DynamicType()))));
+        } else {
+          parts.add(spread);
+        }
+      } else if (spread == nullConstant) {
+        // Null spread
+        if (!element.isNullAware) {
+          report(element.expression, messageConstEvalNullValue);
+        }
+      } else {
+        // Fully evaluated spread
+        List<Constant> entries;
+        if (spread is ListConstant) {
+          entries = spread.entries;
+        } else if (spread is SetConstant) {
+          entries = spread.entries;
+        } else {
+          // Not list or set in spread
+          return report(
+              element.expression, messageConstEvalNotListOrSetInSpread);
+        }
+        for (Constant entry in entries) {
+          addToListOrSetConstant(
+              parts, new ConstantExpression(entry), elementType, seen);
+        }
+      }
+    } else if (element is IfElement) {
+      Constant condition = _evaluateSubexpression(element.condition);
+      if (shouldBeUnevaluated) {
+        // Unevaluated if
+        enterLazy();
+        Constant then = _evaluateSubexpression(isSet
+            ? new SetLiteral([cloner.clone(element.then)], isConst: true)
+            : new ListLiteral([cloner.clone(element.then)], isConst: true));
+        Constant otherwise;
+        if (element.otherwise != null) {
+          otherwise = _evaluateSubexpression(isSet
+              ? new SetLiteral([cloner.clone(element.otherwise)], isConst: true)
+              : new ListLiteral([cloner.clone(element.otherwise)],
+                  isConst: true));
+        } else {
+          otherwise = isSet
+              ? new SetConstant(const DynamicType(), [])
+              : new ListConstant(const DynamicType(), []);
+        }
+        leaveLazy();
+        parts.add(unevaluated(
+            element.condition,
+            new ConditionalExpression(extract(condition), extract(then),
+                extract(otherwise), const DynamicType())));
+      } else {
+        // Fully evaluated if
+        if (condition == trueConstant) {
+          addToListOrSetConstant(parts, element.then, elementType, seen);
+        } else if (condition == falseConstant) {
+          if (element.otherwise != null) {
+            addToListOrSetConstant(parts, element.otherwise, elementType, seen);
+          }
+        } else if (condition == nullConstant) {
+          report(element.condition, messageConstEvalNullValue);
+        } else {
+          report(
+              element.condition,
+              templateConstEvalInvalidType.withArguments(
+                  condition,
+                  typeEnvironment.boolType,
+                  condition.getType(typeEnvironment)));
+        }
+      }
+    } else if (element is ForElement || element is ForInElement) {
+      // For or for-in
+      report(
+          element,
+          isSet
+              ? messageConstEvalIterationInConstSet
+              : messageConstEvalIterationInConstList);
+    } else {
+      // Ordinary expresion element
+      Constant constant = _evaluateSubexpression(element);
+      if (shouldBeUnevaluated) {
+        parts.add(unevaluated(
+            element,
+            isSet
+                ? new SetLiteral([extract(constant)],
+                    typeArgument: elementType, isConst: true)
+                : new ListLiteral([extract(constant)],
+                    typeArgument: elementType, isConst: true)));
+      } else {
+        List<Constant> listOrSet;
+        if (parts.last is List<Constant>) {
+          listOrSet = parts.last;
+        } else {
+          parts.add(listOrSet = <Constant>[]);
+        }
+        if (isSet && !seen.add(constant)) {
+          report(element,
+              templateConstEvalDuplicateElement.withArguments(constant));
+        } else {
+          listOrSet.add(ensureIsSubtype(constant, elementType, element));
+        }
+      }
+    }
+  }
+
+  Constant makeListConstantFromParts(
+      List<Object> parts, Expression node, DartType elementType) {
+    if (parts.length == 1) {
+      // Fully evaluated
+      return lowerListConstant(new ListConstant(elementType, parts.single));
+    }
+    List<Expression> lists = <Expression>[];
+    for (Object part in parts) {
+      if (part is List<Constant>) {
+        lists.add(new ConstantExpression(new ListConstant(elementType, part)));
+      } else if (part is Constant) {
+        lists.add(extract(part));
+      } else {
+        throw 'Non-constant in constant list';
+      }
+    }
+    return unevaluated(
+        node, new ListConcatenation(lists, typeArgument: elementType));
+  }
+
+  visitListLiteral(ListLiteral node) {
+    if (!node.isConst) {
+      return report(
+          node, templateConstEvalNonConstantLiteral.withArguments('List'));
+    }
+    final List<Object> parts = <Object>[<Constant>[]];
+    for (Expression element in node.expressions) {
+      addToListOrSetConstant(parts, element, node.typeArgument);
+    }
+    return makeListConstantFromParts(parts, node, node.typeArgument);
+  }
+
+  visitListConcatenation(ListConcatenation node) {
+    final List<Object> parts = <Object>[<Constant>[]];
+    for (Expression list in node.lists) {
+      addToListOrSetConstant(parts,
+          new SpreadElement(cloner.clone(list), false), node.typeArgument);
+    }
+    return makeListConstantFromParts(parts, node, node.typeArgument);
+  }
+
+  Constant makeSetConstantFromParts(
+      List<Object> parts, Expression node, DartType elementType) {
+    if (parts.length == 1) {
+      // Fully evaluated
+      List<Constant> entries = parts.single;
+      SetConstant result = new SetConstant(elementType, entries);
+      if (desugarSets) {
+        final List<ConstantMapEntry> mapEntries =
+            new List<ConstantMapEntry>(entries.length);
+        for (int i = 0; i < entries.length; ++i) {
+          mapEntries[i] = new ConstantMapEntry(entries[i], nullConstant);
+        }
+        Constant map = lowerMapConstant(
+            new MapConstant(elementType, typeEnvironment.nullType, mapEntries));
+        return lower(
+            result,
+            new InstanceConstant(
+                unmodifiableSetMap.enclosingClass.reference,
+                [elementType],
+                <Reference, Constant>{unmodifiableSetMap.reference: map}));
+      } else {
+        return lowerSetConstant(result);
+      }
+    }
+    List<Expression> sets = <Expression>[];
+    for (Object part in parts) {
+      if (part is List<Constant>) {
+        sets.add(new ConstantExpression(new SetConstant(elementType, part)));
+      } else if (part is Constant) {
+        sets.add(extract(part));
+      } else {
+        throw 'Non-constant in constant set';
+      }
+    }
+    return unevaluated(
+        node, new SetConcatenation(sets, typeArgument: elementType));
+  }
+
+  visitSetLiteral(SetLiteral node) {
+    if (!node.isConst) {
+      return report(
+          node, templateConstEvalNonConstantLiteral.withArguments('Set'));
+    }
+    final Set<Constant> seen = new Set<Constant>.identity();
+    final List<Object> parts = <Object>[<Constant>[]];
+    for (Expression element in node.expressions) {
+      addToListOrSetConstant(parts, element, node.typeArgument, seen);
+    }
+    return makeSetConstantFromParts(parts, node, node.typeArgument);
+  }
+
+  visitSetConcatenation(SetConcatenation node) {
+    final Set<Constant> seen = new Set<Constant>.identity();
+    final List<Object> parts = <Object>[<Constant>[]];
+    for (Expression set_ in node.sets) {
+      addToListOrSetConstant(
+          parts,
+          new SpreadElement(cloner.clone(set_), false),
+          node.typeArgument,
+          seen);
+    }
+    return makeSetConstantFromParts(parts, node, node.typeArgument);
+  }
+
+  /// Add a map entry (which is possibly a spread or an if map entry) to a
+  /// constant map represented as a list of (possibly unevaluated)
+  /// maps to be concatenated.
+  /// Each element of [parts] is either a `List<ConstantMapEntry>` (containing
+  /// fully evaluated map entries) or a `Constant` (potentially unevaluated).
+  void addToMapConstant(List<Object> parts, MapEntry element, DartType keyType,
+      DartType valueType, Set<Constant> seenKeys) {
+    if (element is SpreadMapEntry) {
+      Constant spread = unlower(_evaluateSubexpression(element.expression));
+      if (shouldBeUnevaluated) {
+        // Unevaluated spread
+        if (element.isNullAware) {
+          VariableDeclaration temp =
+              new VariableDeclaration(null, initializer: extract(spread));
+          parts.add(unevaluated(
+              element.expression,
+              new Let(
+                  temp,
+                  new ConditionalExpression(
+                      new MethodInvocation(new VariableGet(temp),
+                          new Name('=='), new Arguments([new NullLiteral()])),
+                      new MapLiteral([], isConst: true),
+                      new VariableGet(temp),
+                      const DynamicType()))));
+        } else {
+          parts.add(spread);
+        }
+      } else if (spread == nullConstant) {
+        // Null spread
+        if (!element.isNullAware) {
+          report(element.expression, messageConstEvalNullValue);
+        }
+      } else {
+        // Fully evaluated spread
+        if (spread is MapConstant) {
+          for (ConstantMapEntry entry in spread.entries) {
+            addToMapConstant(
+                parts,
+                new MapEntry(new ConstantExpression(entry.key),
+                    new ConstantExpression(entry.value)),
+                keyType,
+                valueType,
+                seenKeys);
+          }
+        } else {
+          // Not map in spread
+          return report(element.expression, messageConstEvalNotMapInSpread);
+        }
+      }
+    } else if (element is IfMapEntry) {
+      Constant condition = _evaluateSubexpression(element.condition);
+      if (shouldBeUnevaluated) {
+        // Unevaluated if
+        enterLazy();
+        Constant then = _evaluateSubexpression(
+            new MapLiteral([cloner.clone(element.then)], isConst: true));
+        Constant otherwise;
+        if (element.otherwise != null) {
+          otherwise = _evaluateSubexpression(
+              new MapLiteral([cloner.clone(element.otherwise)], isConst: true));
+        } else {
+          otherwise =
+              new MapConstant(const DynamicType(), const DynamicType(), []);
+        }
+        leaveLazy();
+        parts.add(unevaluated(
+            element.condition,
+            new ConditionalExpression(extract(condition), extract(then),
+                extract(otherwise), const DynamicType())));
+      } else {
+        // Fully evaluated if
+        if (condition == trueConstant) {
+          addToMapConstant(parts, element.then, keyType, valueType, seenKeys);
+        } else if (condition == falseConstant) {
+          if (element.otherwise != null) {
+            addToMapConstant(
+                parts, element.otherwise, keyType, valueType, seenKeys);
+          }
+        } else if (condition == nullConstant) {
+          report(element.condition, messageConstEvalNullValue);
+        } else {
+          report(
+              element.condition,
+              templateConstEvalInvalidType.withArguments(
+                  condition,
+                  typeEnvironment.boolType,
+                  condition.getType(typeEnvironment)));
+        }
+      }
+    } else if (element is ForMapEntry || element is ForInMapEntry) {
+      // For or for-in
+      report(element, messageConstEvalIterationInConstMap);
+    } else {
+      // Ordinary map entry
+      Constant key = _evaluateSubexpression(element.key);
+      Constant value = _evaluateSubexpression(element.value);
+      if (shouldBeUnevaluated) {
+        parts.add(unevaluated(
+            element.key,
+            new MapLiteral([new MapEntry(extract(key), extract(value))],
+                isConst: true)));
+      } else {
+        List<ConstantMapEntry> entries;
+        if (parts.last is List<ConstantMapEntry>) {
+          entries = parts.last;
+        } else {
+          parts.add(entries = <ConstantMapEntry>[]);
+        }
+        if (!seenKeys.add(key)) {
+          report(element.key, templateConstEvalDuplicateKey.withArguments(key));
+        } else {
+          entries.add(new ConstantMapEntry(
+              ensureIsSubtype(key, keyType, element.key),
+              ensureIsSubtype(value, valueType, element.value)));
+        }
+      }
+    }
+  }
+
+  Constant makeMapConstantFromParts(List<Object> parts, Expression node,
+      DartType keyType, DartType valueType) {
+    if (parts.length == 1) {
+      // Fully evaluated
+      return lowerMapConstant(
+          new MapConstant(keyType, valueType, parts.single));
+    }
+    List<Expression> maps = <Expression>[];
+    for (Object part in parts) {
+      if (part is List<ConstantMapEntry>) {
+        maps.add(
+            new ConstantExpression(new MapConstant(keyType, valueType, part)));
+      } else if (part is Constant) {
+        maps.add(extract(part));
+      } else {
+        throw 'Non-constant in constant map';
+      }
+    }
+    return unevaluated(node,
+        new MapConcatenation(maps, keyType: keyType, valueType: valueType));
+  }
+
+  visitMapLiteral(MapLiteral node) {
+    if (!node.isConst) {
+      return report(
+          node, templateConstEvalNonConstantLiteral.withArguments('Map'));
+    }
+    final Set<Constant> seen = new Set<Constant>.identity();
+    final List<Object> parts = <Object>[<ConstantMapEntry>[]];
+    for (MapEntry element in node.entries) {
+      addToMapConstant(parts, element, node.keyType, node.valueType, seen);
+    }
+    return makeMapConstantFromParts(parts, node, node.keyType, node.valueType);
+  }
+
+  visitMapConcatenation(MapConcatenation node) {
+    final Set<Constant> seen = new Set<Constant>.identity();
+    final List<Object> parts = <Object>[<ConstantMapEntry>[]];
+    for (Expression map in node.maps) {
+      addToMapConstant(parts, new SpreadMapEntry(cloner.clone(map), false),
+          node.keyType, node.valueType, seen);
+    }
+    return makeMapConstantFromParts(parts, node, node.keyType, node.valueType);
+  }
+
+  visitFunctionExpression(FunctionExpression node) {
+    return report(
+        node, templateConstEvalNonConstantLiteral.withArguments('Function'));
+  }
+
+  visitConstructorInvocation(ConstructorInvocation node) {
+    final Constructor constructor = node.target;
+    final Class klass = constructor.enclosingClass;
+    if (!constructor.isConst) {
+      return reportInvalid(node, 'Non-const constructor invocation.');
+    }
+    if (constructor.function.body != null &&
+        constructor.function.body is! EmptyStatement) {
+      return reportInvalid(
+          node,
+          'Constructor "$node" has non-trivial body '
+          '"${constructor.function.body.runtimeType}".');
+    }
+    if (klass.isAbstract) {
+      return reportInvalid(
+          node, 'Constructor "$node" belongs to abstract class "${klass}".');
+    }
+
+    final positionals = evaluatePositionalArguments(node.arguments);
+    final named = evaluateNamedArguments(node.arguments);
+
+    // Is the constructor unavailable due to separate compilation?
+    bool isUnavailable = constructor.isInExternalLibrary &&
+        constructor.initializers.isEmpty &&
+        constructor.enclosingClass.supertype != null;
+
+    if (isUnavailable || shouldBeUnevaluated) {
+      return unevaluated(
+          node,
+          new ConstructorInvocation(constructor,
+              unevaluatedArguments(positionals, named, node.arguments.types),
+              isConst: true));
+    }
+
+    final typeArguments = evaluateTypeArguments(node, node.arguments);
+
+    // Fill in any missing type arguments with "dynamic".
+    for (int i = typeArguments.length; i < klass.typeParameters.length; i++) {
+      typeArguments.add(const DynamicType());
+    }
+
+    // Start building a new instance.
+    return withNewInstanceBuilder(klass, typeArguments, () {
+      return runInsideContextIfNoContext(node, () {
+        // "Run" the constructor (and any super constructor calls), which will
+        // initialize the fields of the new instance.
+        handleConstructorInvocation(
+            constructor, typeArguments, positionals, named);
+        final InstanceConstant result = instanceBuilder.buildInstance();
+
+        // Special case the dart:core's Symbol class here and convert it to a
+        // [SymbolConstant].  For invalid values we report a compile-time error.
+        if (result.classNode == coreTypes.internalSymbolClass) {
+          // The dart:_internal's Symbol class has only the name field.
+          assert(coreTypes.internalSymbolClass.fields
+                  .where((f) => !f.isStatic)
+                  .length ==
+              1);
+          final nameValue = result.fieldValues.values.single;
+
+          if (nameValue is StringConstant &&
+              isValidSymbolName(nameValue.value)) {
+            return canonicalize(new SymbolConstant(nameValue.value, null));
+          }
+          return report(node.arguments.positional.first,
+              templateConstEvalInvalidSymbolName.withArguments(nameValue));
+        }
+
+        return canonicalize(result);
+      });
+    });
+  }
+
+  bool isValidSymbolName(String name) {
+    // See https://api.dartlang.org/stable/2.0.0/dart-core/Symbol/Symbol.html:
+    //
+    //  A qualified name is a valid name preceded by a public identifier name and
+    //  a '.', e.g., foo.bar.baz= is a qualified version of baz=.
+    //
+    //  That means that the content of the name String must be either
+    //     - a valid public Dart identifier (that is, an identifier not
+    //       starting with "_"),
+    //     - such an identifier followed by "=" (a setter name),
+    //     - the name of a declarable operator,
+    //     - any of the above preceded by any number of qualifiers, where a
+    //       qualifier is a non-private identifier followed by '.',
+    //     - or the empty string (the default name of a library with no library
+    //       name declaration).
+
+    const operatorNames = const <String>[
+      '+',
+      '-',
+      '*',
+      '/',
+      '%',
+      '~/',
+      '&',
+      '|',
+      '^',
+      '~',
+      '<<',
+      '>>',
+      '<',
+      '<=',
+      '>',
+      '>=',
+      '==',
+      '[]',
+      '[]=',
+      'unary-'
+    ];
+
+    if (name == null) return false;
+    if (name == '') return true;
+
+    final parts = name.split('.');
+
+    // Each qualifier must be a public identifier.
+    for (int i = 0; i < parts.length - 1; ++i) {
+      if (!isValidPublicIdentifier(parts[i])) return false;
+    }
+
+    String last = parts.last;
+    if (operatorNames.contains(last)) {
+      return true;
+    }
+    if (last.endsWith('=')) {
+      last = last.substring(0, last.length - 1);
+    }
+    if (!isValidPublicIdentifier(last)) return false;
+
+    return true;
+  }
+
+  /// From the Dart Language specification:
+  ///
+  ///   IDENTIFIER:
+  ///     IDENTIFIER_START IDENTIFIER_PART*
+  ///
+  ///   IDENTIFIER_START:
+  ///       IDENTIFIER_START_NO_DOLLAR | ‘$’
+  ///
+  ///   IDENTIFIER_PART:
+  ///       IDENTIFIER_START | DIGIT
+  ///
+  ///   IDENTIFIER_NO_DOLLAR:
+  ///     IDENTIFIER_START_NO_DOLLAR IDENTIFIER_PART_NO_DOLLAR*
+  ///
+  ///   IDENTIFIER_START_NO_DOLLAR:
+  ///       LETTER | '_'
+  ///
+  ///   IDENTIFIER_PART_NO_DOLLAR:
+  ///       IDENTIFIER_START_NO_DOLLAR | DIGIT
+  ///
+  static final publicIdentifierRegExp =
+      new RegExp(r'^[a-zA-Z$][a-zA-Z0-9_$]*$');
+
+  static const nonUsableKeywords = const <String>[
+    'assert',
+    'break',
+    'case',
+    'catch',
+    'class',
+    'const',
+    'continue',
+    'default',
+    'do',
+    'else',
+    'enum',
+    'extends',
+    'false',
+    'final',
+    'finally',
+    'for',
+    'if',
+    'in',
+    'is',
+    'new',
+    'null',
+    'rethrow',
+    'return',
+    'super',
+    'switch',
+    'this',
+    'throw',
+    'true',
+    'try',
+    'var',
+    'while',
+    'with',
+  ];
+
+  bool isValidPublicIdentifier(String name) {
+    return publicIdentifierRegExp.hasMatch(name) &&
+        !nonUsableKeywords.contains(name);
+  }
+
+  handleConstructorInvocation(
+      Constructor constructor,
+      List<DartType> typeArguments,
+      List<Constant> positionalArguments,
+      Map<String, Constant> namedArguments) {
+    return runInsideContext(constructor, () {
+      return withNewEnvironment(() {
+        final Class klass = constructor.enclosingClass;
+        final FunctionNode function = constructor.function;
+
+        // We simulate now the constructor invocation.
+
+        // Step 1) Map type arguments and normal arguments from caller to callee.
+        for (int i = 0; i < klass.typeParameters.length; i++) {
+          env.addTypeParameterValue(klass.typeParameters[i], typeArguments[i]);
+        }
+        for (int i = 0; i < function.positionalParameters.length; i++) {
+          final VariableDeclaration parameter =
+              function.positionalParameters[i];
+          final Constant value = (i < positionalArguments.length)
+              ? positionalArguments[i]
+              : _evaluateSubexpression(parameter.initializer);
+          env.addVariableValue(parameter, value);
+        }
+        for (final VariableDeclaration parameter in function.namedParameters) {
+          final Constant value = namedArguments[parameter.name] ??
+              _evaluateSubexpression(parameter.initializer);
+          env.addVariableValue(parameter, value);
+        }
+
+        // Step 2) Run all initializers (including super calls) with environment setup.
+        for (final Field field in klass.fields) {
+          if (!field.isStatic) {
+            instanceBuilder.setFieldValue(
+                field, _evaluateSubexpression(field.initializer));
+          }
+        }
+        for (final Initializer init in constructor.initializers) {
+          if (init is FieldInitializer) {
+            instanceBuilder.setFieldValue(
+                init.field, _evaluateSubexpression(init.value));
+          } else if (init is LocalInitializer) {
+            final VariableDeclaration variable = init.variable;
+            env.addVariableValue(
+                variable, _evaluateSubexpression(variable.initializer));
+          } else if (init is SuperInitializer) {
+            handleConstructorInvocation(
+                init.target,
+                evaluateSuperTypeArguments(
+                    init, constructor.enclosingClass.supertype),
+                evaluatePositionalArguments(init.arguments),
+                evaluateNamedArguments(init.arguments));
+          } else if (init is RedirectingInitializer) {
+            // Since a redirecting constructor targets a constructor of the same
+            // class, we pass the same [typeArguments].
+            handleConstructorInvocation(
+                init.target,
+                typeArguments,
+                evaluatePositionalArguments(init.arguments),
+                evaluateNamedArguments(init.arguments));
+          } else if (init is AssertInitializer) {
+            if (enableAsserts) {
+              final Constant condition =
+                  _evaluateSubexpression(init.statement.condition);
+
+              if (condition is BoolConstant) {
+                if (!condition.value) {
+                  if (init.statement.message == null) {
+                    return report(init.statement.condition,
+                        messageConstEvalFailedAssertion);
+                  }
+                  final Constant message =
+                      _evaluateSubexpression(init.statement.message);
+                  if (message is StringConstant) {
+                    return report(
+                        init.statement.condition,
+                        templateConstEvalFailedAssertionWithMessage
+                            .withArguments(message.value));
+                  }
+                  return report(
+                      init.statement.message,
+                      templateConstEvalInvalidType.withArguments(
+                          message,
+                          typeEnvironment.stringType,
+                          message.getType(typeEnvironment)));
+                }
+              } else {
+                return report(
+                    init.statement.condition,
+                    templateConstEvalInvalidType.withArguments(
+                        condition,
+                        typeEnvironment.boolType,
+                        condition.getType(typeEnvironment)));
+              }
+            }
+          } else {
+            return reportInvalid(
+                constructor,
+                'No support for handling initializer of type '
+                '"${init.runtimeType}".');
+          }
+        }
+      });
+    });
+  }
+
+  visitInvalidExpression(InvalidExpression node) {
+    return reportInvalid(node, node.message);
+  }
+
+  visitMethodInvocation(MethodInvocation node) {
+    // We have no support for generic method invocation atm.
+    assert(node.arguments.named.isEmpty);
+
+    final Constant receiver = _evaluateSubexpression(node.receiver);
+    final List<Constant> arguments =
+        evaluatePositionalArguments(node.arguments);
+
+    if (shouldBeUnevaluated) {
+      return unevaluated(
+          node,
+          new MethodInvocation(extract(receiver), node.name,
+              unevaluatedArguments(arguments, {}, node.arguments.types)));
+    }
+
+    // TODO(http://dartbug.com/31799): Ensure we only invoke ==/!= on
+    // null/bool/int/double/String objects.
+
+    // Handle == and != first (it's common between all types).
+    if (arguments.length == 1 && node.name.name == '==') {
+      final right = arguments[0];
+      return receiver == right ? trueConstant : falseConstant;
+    }
+    if (arguments.length == 1 && node.name.name == '!=') {
+      final right = arguments[0];
+      return receiver != right ? trueConstant : falseConstant;
+    }
+
+    // This is a white-listed set of methods we need to support on constants.
+    if (receiver is StringConstant) {
+      if (arguments.length == 1) {
+        switch (node.name.name) {
+          case '+':
+            final Constant other = arguments[0];
+            if (other is StringConstant) {
+              return canonicalize(
+                  new StringConstant(receiver.value + other.value));
+            }
+            return report(
+                node,
+                templateConstEvalInvalidBinaryOperandType.withArguments(
+                    '+',
+                    receiver,
+                    typeEnvironment.stringType,
+                    other.getType(typeEnvironment)));
+        }
+      }
+    } else if (receiver is IntConstant) {
+      if (arguments.length == 0) {
+        switch (node.name.name) {
+          case 'unary-':
+            return canonicalize(new IntConstant(-receiver.value));
+          case '~':
+            return canonicalize(new IntConstant(~receiver.value));
+        }
+      } else if (arguments.length == 1) {
+        final Constant other = arguments[0];
+        final op = node.name.name;
+        if (other is IntConstant) {
+          if ((op == '<<' || op == '>>' || op == '>>>') && other.value < 0) {
+            return report(
+                node.arguments.positional.first,
+                // TODO(askesc): Change argument types in template to constants.
+                templateConstEvalNegativeShift.withArguments(
+                    op, '${receiver.value}', '${other.value}'));
+          }
+          switch (op) {
+            case '|':
+              return canonicalize(
+                  new IntConstant(receiver.value | other.value));
+            case '&':
+              return canonicalize(
+                  new IntConstant(receiver.value & other.value));
+            case '^':
+              return canonicalize(
+                  new IntConstant(receiver.value ^ other.value));
+            case '<<':
+              return canonicalize(
+                  new IntConstant(receiver.value << other.value));
+            case '>>':
+              return canonicalize(
+                  new IntConstant(receiver.value >> other.value));
+            case '>>>':
+              int result = other.value >= 64
+                  ? 0
+                  : (receiver.value >> other.value) &
+                      ((1 << (64 - other.value)) - 1);
+              return canonicalize(new IntConstant(result));
+          }
+        }
+
+        if (other is IntConstant) {
+          if (other.value == 0 && (op == '%' || op == '~/')) {
+            return report(
+                node.arguments.positional.first,
+                // TODO(askesc): Change argument type in template to constant.
+                templateConstEvalZeroDivisor.withArguments(
+                    op, '${receiver.value}'));
+          }
+
+          return evaluateBinaryNumericOperation(
+              node.name.name, receiver.value, other.value, node);
+        } else if (other is DoubleConstant) {
+          return evaluateBinaryNumericOperation(
+              node.name.name, receiver.value, other.value, node);
+        }
+        return report(
+            node,
+            templateConstEvalInvalidBinaryOperandType.withArguments(
+                node.name.name,
+                receiver,
+                typeEnvironment.numType,
+                other.getType(typeEnvironment)));
+      }
+    } else if (receiver is DoubleConstant) {
+      if (arguments.length == 0) {
+        switch (node.name.name) {
+          case 'unary-':
+            return canonicalize(makeDoubleConstant(-receiver.value));
+        }
+      } else if (arguments.length == 1) {
+        final Constant other = arguments[0];
+
+        if (other is IntConstant || other is DoubleConstant) {
+          final num value = (other is IntConstant)
+              ? other.value
+              : (other as DoubleConstant).value;
+          return evaluateBinaryNumericOperation(
+              node.name.name, receiver.value, value, node);
+        }
+        return report(
+            node,
+            templateConstEvalInvalidBinaryOperandType.withArguments(
+                node.name.name,
+                receiver,
+                typeEnvironment.numType,
+                other.getType(typeEnvironment)));
+      }
+    } else if (receiver is BoolConstant) {
+      if (arguments.length == 1) {
+        final Constant other = arguments[0];
+        if (other is BoolConstant) {
+          switch (node.name.name) {
+            case '|':
+              return canonicalize(
+                  new BoolConstant(receiver.value || other.value));
+            case '&':
+              return canonicalize(
+                  new BoolConstant(receiver.value && other.value));
+            case '^':
+              return canonicalize(
+                  new BoolConstant(receiver.value != other.value));
+          }
+        }
+      }
+    } else if (receiver is NullConstant) {
+      return report(node, messageConstEvalNullValue);
+    }
+
+    return report(
+        node,
+        templateConstEvalInvalidMethodInvocation.withArguments(
+            node.name.name, receiver));
+  }
+
+  visitLogicalExpression(LogicalExpression node) {
+    final Constant left = _evaluateSubexpression(node.left);
+    if (shouldBeUnevaluated) {
+      enterLazy();
+      Constant right = _evaluateSubexpression(node.right);
+      leaveLazy();
+      return unevaluated(node,
+          new LogicalExpression(extract(left), node.operator, extract(right)));
+    }
+    switch (node.operator) {
+      case '||':
+        if (left is BoolConstant) {
+          if (left.value) return trueConstant;
+
+          final Constant right = _evaluateSubexpression(node.right);
+          if (right is BoolConstant || right is UnevaluatedConstant) {
+            return right;
+          }
+
+          return report(
+              node,
+              templateConstEvalInvalidBinaryOperandType.withArguments(
+                  node.operator,
+                  left,
+                  typeEnvironment.boolType,
+                  right.getType(typeEnvironment)));
+        }
+        return report(
+            node,
+            templateConstEvalInvalidMethodInvocation.withArguments(
+                node.operator, left));
+      case '&&':
+        if (left is BoolConstant) {
+          if (!left.value) return falseConstant;
+
+          final Constant right = _evaluateSubexpression(node.right);
+          if (right is BoolConstant || right is UnevaluatedConstant) {
+            return right;
+          }
+
+          return report(
+              node,
+              templateConstEvalInvalidBinaryOperandType.withArguments(
+                  node.operator,
+                  left,
+                  typeEnvironment.boolType,
+                  right.getType(typeEnvironment)));
+        }
+        return report(
+            node,
+            templateConstEvalInvalidMethodInvocation.withArguments(
+                node.operator, left));
+      case '??':
+        return (left is! NullConstant)
+            ? left
+            : _evaluateSubexpression(node.right);
+      default:
+        return report(
+            node,
+            templateConstEvalInvalidMethodInvocation.withArguments(
+                node.operator, left));
+    }
+  }
+
+  visitConditionalExpression(ConditionalExpression node) {
+    final Constant condition = _evaluateSubexpression(node.condition);
+    if (condition == trueConstant) {
+      return _evaluateSubexpression(node.then);
+    } else if (condition == falseConstant) {
+      return _evaluateSubexpression(node.otherwise);
+    } else if (shouldBeUnevaluated) {
+      enterLazy();
+      Constant then = _evaluateSubexpression(node.then);
+      Constant otherwise = _evaluateSubexpression(node.otherwise);
+      leaveLazy();
+      return unevaluated(
+          node,
+          new ConditionalExpression(extract(condition), extract(then),
+              extract(otherwise), node.staticType));
+    } else {
+      return report(
+          node,
+          templateConstEvalInvalidType.withArguments(condition,
+              typeEnvironment.boolType, condition.getType(typeEnvironment)));
+    }
+  }
+
+  visitPropertyGet(PropertyGet node) {
+    if (node.receiver is ThisExpression) {
+      // Access "this" during instance creation.
+      if (instanceBuilder == null) {
+        return reportInvalid(node, 'Instance field access outside constructor');
+      }
+      for (final Field field in instanceBuilder.fields.keys) {
+        if (field.name == node.name) {
+          return instanceBuilder.fields[field];
+        }
+      }
+      return reportInvalid(node,
+          'Could not evaluate field get ${node.name} on incomplete instance');
+    }
+
+    final Constant receiver = _evaluateSubexpression(node.receiver);
+    if (receiver is StringConstant && node.name.name == 'length') {
+      return canonicalize(new IntConstant(receiver.value.length));
+    } else if (shouldBeUnevaluated) {
+      return unevaluated(node,
+          new PropertyGet(extract(receiver), node.name, node.interfaceTarget));
+    } else if (receiver is NullConstant) {
+      return report(node, messageConstEvalNullValue);
+    }
+    return report(
+        node,
+        templateConstEvalInvalidPropertyGet.withArguments(
+            node.name.name, receiver));
+  }
+
+  visitLet(Let node) {
+    env.addVariableValue(
+        node.variable, _evaluateSubexpression(node.variable.initializer));
+    return _evaluateSubexpression(node.body);
+  }
+
+  visitVariableGet(VariableGet node) {
+    // Not every variable which a [VariableGet] refers to must be marked as
+    // constant.  For example function parameters as well as constructs
+    // desugared to [Let] expressions are ok.
+    //
+    // TODO(kustermann): The heuristic of allowing all [VariableGet]s on [Let]
+    // variables might allow more than it should.
+    final VariableDeclaration variable = node.variable;
+    if (variable.parent is Let || _isFormalParameter(variable)) {
+      return env.lookupVariable(node.variable) ??
+          report(
+              node,
+              templateConstEvalNonConstantVariableGet
+                  .withArguments(variable.name));
+    }
+    if (variable.isConst) {
+      return _evaluateSubexpression(variable.initializer);
+    }
+    return reportInvalid(node, 'Variable get of a non-const variable.');
+  }
+
+  visitStaticGet(StaticGet node) {
+    return withNewEnvironment(() {
+      final Member target = node.target;
+      if (target is Field) {
+        if (target.isConst) {
+          if (target.isInExternalLibrary && target.initializer == null) {
+            // The variable is unavailable due to separate compilation.
+            return unevaluated(node, new StaticGet(target));
+          }
+          return runInsideContext(target, () {
+            return _evaluateSubexpression(target.initializer);
+          });
+        }
+        return report(
+            node,
+            templateConstEvalInvalidStaticInvocation
+                .withArguments(target.name.name));
+      } else if (target is Procedure) {
+        if (target.kind == ProcedureKind.Method) {
+          return canonicalize(new TearOffConstant(target));
+        }
+        return report(
+            node,
+            templateConstEvalInvalidStaticInvocation
+                .withArguments(target.name.name));
+      } else {
+        reportInvalid(
+            node, 'No support for ${target.runtimeType} in a static-get.');
+      }
+    });
+  }
+
+  visitStringConcatenation(StringConcatenation node) {
+    final List<Object> concatenated = <Object>[new StringBuffer()];
+    for (int i = 0; i < node.expressions.length; i++) {
+      Constant constant = _evaluateSubexpression(node.expressions[i]);
+      if (constant is PrimitiveConstant<Object>) {
+        String value = constant.value.toString();
+        Object last = concatenated.last;
+        if (last is StringBuffer) {
+          last.write(value);
+        } else {
+          concatenated.add(new StringBuffer(value));
+        }
+      } else if (shouldBeUnevaluated) {
+        concatenated.add(constant);
+      } else {
+        return report(
+            node,
+            templateConstEvalInvalidStringInterpolationOperand
+                .withArguments(constant));
+      }
+    }
+    if (concatenated.length > 1) {
+      final expressions = new List<Expression>(concatenated.length);
+      for (int i = 0; i < concatenated.length; i++) {
+        Object value = concatenated[i];
+        if (value is UnevaluatedConstant) {
+          expressions[i] = extract(value);
+        } else {
+          expressions[i] = new ConstantExpression(
+              canonicalize(new StringConstant(value.toString())));
+        }
+      }
+      return unevaluated(node, new StringConcatenation(expressions));
+    }
+    return canonicalize(new StringConstant(concatenated.single.toString()));
+  }
+
+  visitStaticInvocation(StaticInvocation node) {
+    final Procedure target = node.target;
+    final Arguments arguments = node.arguments;
+    final positionals = evaluatePositionalArguments(arguments);
+    final named = evaluateNamedArguments(arguments);
+    if (shouldBeUnevaluated) {
+      return unevaluated(
+          node,
+          new StaticInvocation(
+              target, unevaluatedArguments(positionals, named, arguments.types),
+              isConst: true));
+    }
+    if (target.kind == ProcedureKind.Factory) {
+      if (target.isConst &&
+          target.name.name == "fromEnvironment" &&
+          target.enclosingLibrary == coreTypes.coreLibrary &&
+          positionals.length == 1) {
+        if (environmentDefines != null) {
+          // Evaluate environment constant.
+          Constant name = positionals.single;
+          if (name is StringConstant) {
+            String value = environmentDefines[name.value];
+            Constant defaultValue = named["defaultValue"];
+
+            if (target.enclosingClass == coreTypes.boolClass) {
+              Constant boolConstant = value == "true"
+                  ? trueConstant
+                  : value == "false"
+                      ? falseConstant
+                      : defaultValue is BoolConstant
+                          ? defaultValue.value ? trueConstant : falseConstant
+                          : defaultValue is NullConstant
+                              ? nullConstant
+                              : falseConstant;
+              return boolConstant;
+            } else if (target.enclosingClass == coreTypes.intClass) {
+              int intValue = value != null ? int.tryParse(value) : null;
+              intValue ??=
+                  defaultValue is IntConstant ? defaultValue.value : null;
+              if (intValue == null) return nullConstant;
+              return canonicalize(new IntConstant(intValue));
+            } else if (target.enclosingClass == coreTypes.stringClass) {
+              value ??=
+                  defaultValue is StringConstant ? defaultValue.value : null;
+              if (value == null) return nullConstant;
+              return canonicalize(new StringConstant(value));
+            }
+          } else if (name is NullConstant) {
+            return report(node, messageConstEvalNullValue);
+          }
+        } else {
+          // Leave environment constant unevaluated.
+          return unevaluated(
+              node,
+              new StaticInvocation(target,
+                  unevaluatedArguments(positionals, named, arguments.types),
+                  isConst: true));
+        }
+      }
+    } else if (target.name.name == 'identical') {
+      // Ensure the "identical()" function comes from dart:core.
+      final parent = target.parent;
+      if (parent is Library && parent == coreTypes.coreLibrary) {
+        final Constant left = positionals[0];
+        final Constant right = positionals[1];
+        // Since we canonicalize constants during the evaluation, we can use
+        // identical here.
+        return identical(left, right) ? trueConstant : falseConstant;
+      }
+    }
+
+    // TODO(kmillikin) For an invalid factory invocation we should adopt a
+    // better message.  This will show something like:
+    //
+    // "The invocation of 'List' is not allowed within a const context."
+    //
+    // Which is not quite right when the code was "new List()".
+    String name = target.name.name;
+    if (target is Procedure && target.isFactory) {
+      if (name.isEmpty) {
+        name = target.enclosingClass.name;
+      } else {
+        name = '${target.enclosingClass.name}.${name}';
+      }
+    }
+    return report(
+        node, templateConstEvalInvalidStaticInvocation.withArguments(name));
+  }
+
+  visitAsExpression(AsExpression node) {
+    final Constant constant = _evaluateSubexpression(node.operand);
+    if (shouldBeUnevaluated) {
+      return unevaluated(node, new AsExpression(extract(constant), node.type));
+    }
+    return ensureIsSubtype(constant, evaluateDartType(node, node.type), node);
+  }
+
+  visitIsExpression(IsExpression node) {
+    final Constant constant = node.operand.accept(this);
+    if (shouldBeUnevaluated) {
+      return unevaluated(node, new IsExpression(extract(constant), node.type));
+    }
+    if (constant is NullConstant) {
+      return node.type == typeEnvironment.nullType ||
+              node.type == typeEnvironment.objectType ||
+              node.type is DynamicType
+          ? trueConstant
+          : falseConstant;
+    }
+    return isSubtype(constant, evaluateDartType(node, node.type))
+        ? trueConstant
+        : falseConstant;
+  }
+
+  visitNot(Not node) {
+    final Constant constant = _evaluateSubexpression(node.operand);
+    if (constant is BoolConstant) {
+      return constant == trueConstant ? falseConstant : trueConstant;
+    }
+    if (shouldBeUnevaluated) {
+      return unevaluated(node, new Not(extract(constant)));
+    }
+    return report(
+        node,
+        templateConstEvalInvalidType.withArguments(constant,
+            typeEnvironment.boolType, constant.getType(typeEnvironment)));
+  }
+
+  visitSymbolLiteral(SymbolLiteral node) {
+    final libraryReference =
+        node.value.startsWith('_') ? libraryOf(node).reference : null;
+    return canonicalize(new SymbolConstant(node.value, libraryReference));
+  }
+
+  visitInstantiation(Instantiation node) {
+    final Constant constant = _evaluateSubexpression(node.expression);
+    if (shouldBeUnevaluated) {
+      return unevaluated(
+          node, new Instantiation(extract(constant), node.typeArguments));
+    }
+    if (constant is TearOffConstant) {
+      if (node.typeArguments.length ==
+          constant.procedure.function.typeParameters.length) {
+        final typeArguments = evaluateDartTypes(node, node.typeArguments);
+        return canonicalize(
+            new PartialInstantiationConstant(constant, typeArguments));
+      }
+      return reportInvalid(
+          node,
+          'The number of type arguments supplied in the partial instantiation '
+          'does not match the number of type arguments of the $constant.');
+    }
+    // The inner expression in an instantiation can never be null, since
+    // instantiations are only inferred on direct references to declarations.
+    return reportInvalid(
+        node, 'Only tear-off constants can be partially instantiated.');
+  }
+
+  @override
+  visitCheckLibraryIsLoaded(CheckLibraryIsLoaded node) {
+    return report(
+        node, templateConstEvalDeferredLibrary.withArguments(node.import.name));
+  }
+
+  // Helper methods:
+
+  Constant makeDoubleConstant(double value) {
+    if (targetingJavaScript) {
+      // Convert to an integer when possible (matching the runtime behavior
+      // of `is int`).
+      if (value.isFinite) {
+        var i = value.toInt();
+        if (value == i.toDouble()) return new IntConstant(i);
+      }
+    }
+    return new DoubleConstant(value);
+  }
+
+  bool isSubtype(Constant constant, DartType type) {
+    DartType constantType = constant.getType(typeEnvironment);
+    if (targetingJavaScript) {
+      if (constantType == typeEnvironment.intType &&
+          type == typeEnvironment.doubleType) {
+        // With JS semantics, an integer is also a double.
+        return true;
+      }
+    }
+    return typeEnvironment.isSubtypeOf(constantType, type);
+  }
+
+  Constant ensureIsSubtype(Constant constant, DartType type, TreeNode node) {
+    if (!isSubtype(constant, type)) {
+      return report(
+          node,
+          templateConstEvalInvalidType.withArguments(
+              constant, type, constant.getType(typeEnvironment)));
+    }
+    return constant;
+  }
+
+  List<DartType> evaluateTypeArguments(TreeNode node, Arguments arguments) {
+    return evaluateDartTypes(node, arguments.types);
+  }
+
+  List<DartType> evaluateSuperTypeArguments(TreeNode node, Supertype type) {
+    return evaluateDartTypes(node, type.typeArguments);
+  }
+
+  List<DartType> evaluateDartTypes(TreeNode node, List<DartType> types) {
+    // TODO: Once the frontend gurantees that there are no free type variables
+    // left over after stubstitution, we can enable this shortcut again:
+    // if (env.isEmpty) return types;
+    return types.map((t) => evaluateDartType(node, t)).toList();
+  }
+
+  DartType evaluateDartType(TreeNode node, DartType type) {
+    final result = env.subsituteType(type);
+
+    if (!isInstantiated(result)) {
+      return report(
+          node, templateConstEvalFreeTypeParameter.withArguments(type));
+    }
+
+    return result;
+  }
+
+  List<Constant> evaluatePositionalArguments(Arguments arguments) {
+    return arguments.positional.map((Expression node) {
+      return _evaluateSubexpression(node);
+    }).toList();
+  }
+
+  Map<String, Constant> evaluateNamedArguments(Arguments arguments) {
+    if (arguments.named.isEmpty) return const <String, Constant>{};
+
+    final Map<String, Constant> named = {};
+    arguments.named.forEach((NamedExpression pair) {
+      named[pair.name] = _evaluateSubexpression(pair.value);
+    });
+    return named;
+  }
+
+  Arguments unevaluatedArguments(List<Constant> positionalArgs,
+      Map<String, Constant> namedArgs, List<DartType> types) {
+    final positional = new List<Expression>(positionalArgs.length);
+    final named = new List<NamedExpression>(namedArgs.length);
+    for (int i = 0; i < positionalArgs.length; ++i) {
+      positional[i] = extract(positionalArgs[i]);
+    }
+    int i = 0;
+    namedArgs.forEach((String name, Constant value) {
+      named[i++] = new NamedExpression(name, extract(value));
+    });
+    return new Arguments(positional, named: named, types: types);
+  }
+
+  Constant canonicalize(Constant constant) {
+    return canonicalizationCache.putIfAbsent(constant, () => constant);
+  }
+
+  withNewInstanceBuilder(Class klass, List<DartType> typeArguments, fn()) {
+    InstanceBuilder old = instanceBuilder;
+    try {
+      instanceBuilder = new InstanceBuilder(klass, typeArguments);
+      return fn();
+    } finally {
+      instanceBuilder = old;
+    }
+  }
+
+  withNewEnvironment(fn()) {
+    final EvaluationEnvironment oldEnv = env;
+    try {
+      env = new EvaluationEnvironment();
+      return fn();
+    } finally {
+      env = oldEnv;
+    }
+  }
+
+  Constant evaluateBinaryNumericOperation(
+      String op, num a, num b, TreeNode node) {
+    if (targetingJavaScript) {
+      a = a.toDouble();
+      b = b.toDouble();
+    }
+    num result;
+    switch (op) {
+      case '+':
+        result = a + b;
+        break;
+      case '-':
+        result = a - b;
+        break;
+      case '*':
+        result = a * b;
+        break;
+      case '/':
+        result = a / b;
+        break;
+      case '~/':
+        result = a ~/ b;
+        break;
+      case '%':
+        result = a % b;
+        break;
+    }
+
+    if (result is int) {
+      return canonicalize(new IntConstant(result.toSigned(64)));
+    }
+    if (result is double) {
+      return canonicalize(makeDoubleConstant(result));
+    }
+
+    switch (op) {
+      case '<':
+        return a < b ? trueConstant : falseConstant;
+      case '<=':
+        return a <= b ? trueConstant : falseConstant;
+      case '>=':
+        return a >= b ? trueConstant : falseConstant;
+      case '>':
+        return a > b ? trueConstant : falseConstant;
+    }
+
+    return reportInvalid(node, "Unexpected binary numeric operation '$op'.");
+  }
+
+  Library libraryOf(TreeNode node) {
+    // The tree structure of the kernel AST ensures we always have an enclosing
+    // library.
+    while (true) {
+      if (node is Library) return node;
+      node = node.parent;
+    }
+  }
+}
+
+/// Holds the necessary information for a constant object, namely
+///   * the [klass] being instantiated
+///   * the [typeArguments] used for the instantiation
+///   * the [fields] the instance will obtain (all fields from the
+///     instantiated [klass] up to the [Object] klass).
+class InstanceBuilder {
+  /// The class of the new instance.
+  final Class klass;
+
+  /// The values of the type parameters of the new instance.
+  final List<DartType> typeArguments;
+
+  /// The field values of the new instance.
+  final Map<Field, Constant> fields = <Field, Constant>{};
+
+  InstanceBuilder(this.klass, this.typeArguments);
+
+  void setFieldValue(Field field, Constant constant) {
+    fields[field] = constant;
+  }
+
+  InstanceConstant buildInstance() {
+    final Map<Reference, Constant> fieldValues = <Reference, Constant>{};
+    fields.forEach((Field field, Constant value) {
+      fieldValues[field.reference] = value;
+    });
+    return new InstanceConstant(klass.reference, typeArguments, fieldValues);
+  }
+}
+
+/// Holds an environment of type parameters, parameters and variables.
+class EvaluationEnvironment {
+  /// The values of the type parameters in scope.
+  final Map<TypeParameter, DartType> _typeVariables =
+      <TypeParameter, DartType>{};
+
+  /// The values of the parameters/variables in scope.
+  final Map<VariableDeclaration, Constant> _variables =
+      <VariableDeclaration, Constant>{};
+
+  /// Whether the current environment is empty.
+  bool get isEmpty => _typeVariables.isEmpty && _variables.isEmpty;
+
+  void addTypeParameterValue(TypeParameter parameter, DartType value) {
+    assert(!_typeVariables.containsKey(parameter));
+    _typeVariables[parameter] = value;
+  }
+
+  void addVariableValue(VariableDeclaration variable, Constant value) {
+    _variables[variable] = value;
+  }
+
+  DartType lookupParameterValue(TypeParameter parameter) {
+    final DartType value = _typeVariables[parameter];
+    assert(value != null);
+    return value;
+  }
+
+  Constant lookupVariable(VariableDeclaration variable) {
+    return _variables[variable];
+  }
+
+  DartType subsituteType(DartType type) {
+    if (_typeVariables.isEmpty) return type;
+    return substitute(type, _typeVariables);
+  }
+}
+
+// Used as control-flow to abort the current evaluation.
+class _AbortDueToError {
+  final TreeNode node;
+  final Message message;
+  final List<LocatedMessage> context;
+
+  _AbortDueToError(this.node, this.message, {this.context});
+}
+
+class _AbortDueToInvalidExpression {
+  final TreeNode node;
+  final String message;
+
+  _AbortDueToInvalidExpression(this.node, this.message);
+}
+
+abstract class ErrorReporter {
+  const ErrorReporter();
+
+  void report(LocatedMessage message, List<LocatedMessage> context);
+
+  void reportInvalidExpression(InvalidExpression node);
+}
+
+class SimpleErrorReporter implements ErrorReporter {
+  const SimpleErrorReporter();
+
+  @override
+  void report(LocatedMessage message, List<LocatedMessage> context) {
+    _report(message);
+    for (LocatedMessage contextMessage in context) {
+      _report(contextMessage);
+    }
+  }
+
+  @override
+  void reportInvalidExpression(InvalidExpression node) {
+    // Ignored
+  }
+
+  void _report(LocatedMessage message) {
+    reportMessage(message.uri, message.charOffset, message.message);
+  }
+
+  void reportMessage(Uri uri, int offset, String message) {
+    io.exitCode = 42;
+    io.stderr.writeln('$uri:$offset Constant evaluation error: $message');
+  }
+}
+
+class IsInstantiatedVisitor extends DartTypeVisitor<bool> {
+  final _availableVariables = new Set<TypeParameter>();
+
+  bool isInstantiated(DartType type) {
+    return type.accept(this);
+  }
+
+  bool defaultDartType(DartType node) {
+    throw 'A visitor method seems to be unimplemented!';
+  }
+
+  bool visitInvalidType(InvalidType node) => true;
+  bool visitDynamicType(DynamicType node) => true;
+  bool visitVoidType(VoidType node) => true;
+  bool visitBottomType(BottomType node) => true;
+
+  bool visitTypeParameterType(TypeParameterType node) {
+    return _availableVariables.contains(node.parameter);
+  }
+
+  bool visitInterfaceType(InterfaceType node) {
+    return node.typeArguments
+        .every((DartType typeArgument) => typeArgument.accept(this));
+  }
+
+  bool visitFunctionType(FunctionType node) {
+    final parameters = node.typeParameters;
+    _availableVariables.addAll(parameters);
+    final bool result = node.returnType.accept(this) &&
+        node.positionalParameters.every((p) => p.accept(this)) &&
+        node.namedParameters.every((p) => p.type.accept(this));
+    _availableVariables.removeAll(parameters);
+    return result;
+  }
+
+  bool visitTypedefType(TypedefType node) {
+    return node.unalias.accept(this);
+  }
+}
+
+bool _isFormalParameter(VariableDeclaration variable) {
+  final parent = variable.parent;
+  if (parent is FunctionNode) {
+    return parent.positionalParameters.contains(variable) ||
+        parent.namedParameters.contains(variable);
+  }
+  return false;
+}
diff --git a/pkg/front_end/lib/src/fasta/kernel/expression_generator.dart b/pkg/front_end/lib/src/fasta/kernel/expression_generator.dart
index 1434f9f..db33cf1 100644
--- a/pkg/front_end/lib/src/fasta/kernel/expression_generator.dart
+++ b/pkg/front_end/lib/src/fasta/kernel/expression_generator.dart
@@ -40,7 +40,8 @@
         mustacheName,
         percentName,
         plusName,
-        rightShiftName;
+        rightShiftName,
+        tripleShiftName;
 
 import '../parser.dart' show lengthForToken, lengthOfSpan, offsetForToken;
 
@@ -956,6 +957,9 @@
     } else if (identical(">>=", assignmentOperator)) {
       return generator.buildCompoundAssignment(rightShiftName, value,
           offset: offsetForToken(token), voidContext: voidContext);
+    } else if (identical(">>>=", assignmentOperator)) {
+      return generator.buildCompoundAssignment(tripleShiftName, value,
+          offset: offsetForToken(token), voidContext: voidContext);
     } else if (identical("??=", assignmentOperator)) {
       return generator.buildNullAwareAssignment(
           value, const DynamicType(), offsetForToken(token),
diff --git a/pkg/front_end/lib/src/fasta/kernel/fangorn.dart b/pkg/front_end/lib/src/fasta/kernel/fangorn.dart
index 005376d..1616ce7 100644
--- a/pkg/front_end/lib/src/fasta/kernel/fangorn.dart
+++ b/pkg/front_end/lib/src/fasta/kernel/fangorn.dart
@@ -53,7 +53,15 @@
 
 import 'body_builder.dart' show LabelTarget;
 
-import 'collections.dart' show IfElement, IfMapEntry, SpreadElement;
+import 'collections.dart'
+    show
+        ForElement,
+        ForInElement,
+        ForInMapEntry,
+        ForMapEntry,
+        IfElement,
+        IfMapEntry,
+        SpreadElement;
 
 import 'kernel_expression_generator.dart'
     show
@@ -297,6 +305,46 @@
   }
 
   @override
+  Expression forElement(
+      List<VariableDeclaration> variables,
+      Expression condition,
+      List<Expression> updates,
+      Expression body,
+      Token token) {
+    return new ForElement(variables, condition, updates, body)
+      ..fileOffset = offsetForToken(token);
+  }
+
+  @override
+  MapEntry forMapEntry(
+      List<VariableDeclaration> variables,
+      Expression condition,
+      List<Expression> updates,
+      MapEntry body,
+      Token token) {
+    return new ForMapEntry(variables, condition, updates, body)
+      ..fileOffset = offsetForToken(token);
+  }
+
+  @override
+  Expression forInElement(VariableDeclaration variable, Expression iterable,
+      Statement prologue, Expression body, Expression problem, Token token,
+      {bool isAsync: false}) {
+    return new ForInElement(variable, iterable, prologue, body, problem,
+        isAsync: isAsync)
+      ..fileOffset = offsetForToken(token);
+  }
+
+  @override
+  MapEntry forInMapEntry(VariableDeclaration variable, Expression iterable,
+      Statement prologue, MapEntry body, Expression problem, Token token,
+      {bool isAsync: false}) {
+    return new ForInMapEntry(variable, iterable, prologue, body, problem,
+        isAsync: isAsync)
+      ..fileOffset = offsetForToken(token);
+  }
+
+  @override
   AssertInitializer assertInitializer(
       Token assertKeyword,
       Token leftParenthesis,
diff --git a/pkg/front_end/lib/src/fasta/kernel/forest.dart b/pkg/front_end/lib/src/fasta/kernel/forest.dart
index 8cf916f..818a3b1 100644
--- a/pkg/front_end/lib/src/fasta/kernel/forest.dart
+++ b/pkg/front_end/lib/src/fasta/kernel/forest.dart
@@ -196,6 +196,28 @@
   MapEntry ifMapEntry(
       Expression condition, MapEntry then, MapEntry otherwise, Token token);
 
+  Expression forElement(
+      List<VariableDeclaration> variables,
+      Expression condition,
+      List<Expression> updates,
+      Expression body,
+      Token token);
+
+  MapEntry forMapEntry(
+      List<VariableDeclaration> variables,
+      Expression condition,
+      List<Expression> updates,
+      MapEntry body,
+      Token token);
+
+  Expression forInElement(VariableDeclaration variable, Expression iterable,
+      Statement prologue, Expression body, Expression problem, Token token,
+      {bool isAsync: false});
+
+  MapEntry forInMapEntry(VariableDeclaration variable, Expression iterable,
+      Statement prologue, MapEntry body, Expression problem, Token token,
+      {bool isAsync: false});
+
   /// Return a representation of an assert that appears in a constructor's
   /// initializer list.
   Object assertInitializer(Token assertKeyword, Token leftParenthesis,
diff --git a/pkg/front_end/lib/src/fasta/kernel/inference_visitor.dart b/pkg/front_end/lib/src/fasta/kernel/inference_visitor.dart
index a678e10..89a79f1 100644
--- a/pkg/front_end/lib/src/fasta/kernel/inference_visitor.dart
+++ b/pkg/front_end/lib/src/fasta/kernel/inference_visitor.dart
@@ -11,10 +11,6 @@
 
   @override
   void defaultExpression(Expression node, DartType typeContext) {
-    if (node is IfElement) {
-      visitIfElement(node, typeContext);
-      return;
-    }
     unhandled("${node.runtimeType}", "InferenceVisitor", node.fileOffset,
         inferrer.helper.uri);
   }
@@ -25,11 +21,6 @@
         inferrer.helper.uri);
   }
 
-  visitIfElement(IfElement node, DartType typeContext) {
-    node.parent.replaceChild(node,
-        new InvalidExpression('unhandled if element in collection literal'));
-  }
-
   @override
   void visitInvalidExpression(InvalidExpression node, DartType typeContext) {}
 
@@ -148,10 +139,10 @@
           name.length,
           node.target.fileUri);
       for (var declaration in node.target.function.positionalParameters) {
-        declaration.type ??= const DynamicType();
+        declaration.type ??= const InvalidType();
       }
       for (var declaration in node.target.function.namedParameters) {
-        declaration.type ??= const DynamicType();
+        declaration.type ??= const InvalidType();
       }
     } else if ((library = inferrer.engine.toBeInferred[node.target]) != null) {
       inferrer.engine.toBeInferred.remove(node.target);
@@ -253,11 +244,12 @@
         node.field.type, initializerType, node.value, node.fileOffset);
   }
 
-  void handleForInStatementDeclaringVariable(ForInStatement node) {
+  void handleForInDeclaringVariable(
+      VariableDeclaration variable, Expression iterable, Statement body,
+      {bool isAsync: false}) {
     DartType elementType;
     bool typeNeeded = false;
     bool typeChecksNeeded = !inferrer.isTopLevel;
-    final VariableDeclaration variable = node.variable;
     if (VariableDeclarationJudgment.isImplicitlyTyped(variable)) {
       typeNeeded = true;
       elementType = const UnknownType();
@@ -265,45 +257,58 @@
       elementType = variable.type;
     }
 
-    DartType inferredType =
-        inferForInIterable(node, elementType, typeNeeded || typeChecksNeeded);
+    DartType inferredType = inferForInIterable(
+        iterable, elementType, typeNeeded || typeChecksNeeded,
+        isAsync: isAsync);
     if (typeNeeded) {
       inferrer.instrumentation?.record(inferrer.uri, variable.fileOffset,
           'type', new InstrumentationValueForType(inferredType));
       variable.type = inferredType;
     }
 
-    inferrer.inferStatement(node.body);
+    if (body != null) inferrer.inferStatement(body);
 
     VariableDeclaration tempVar =
         new VariableDeclaration(null, type: inferredType, isFinal: true);
     VariableGet variableGet = new VariableGet(tempVar)
       ..fileOffset = variable.fileOffset;
+    TreeNode parent = variable.parent;
     Expression implicitDowncast = inferrer.ensureAssignable(
-        variable.type, inferredType, variableGet, node.fileOffset,
+        variable.type, inferredType, variableGet, parent.fileOffset,
         template: templateForInLoopElementTypeNotAssignable);
     if (implicitDowncast != null) {
-      node.variable = tempVar..parent = node;
+      parent.replaceChild(variable, tempVar);
       variable.initializer = implicitDowncast..parent = variable;
-      node.body = combineStatements(variable, node.body)..parent = node;
+      if (body == null) {
+        if (parent is ForInElement) {
+          parent.prologue = variable;
+        } else if (parent is ForInMapEntry) {
+          parent.prologue = variable;
+        } else {
+          unhandled("${parent.runtimeType}", "handleForInDeclaringVariable",
+              variable.fileOffset, variable.location.file);
+        }
+      } else {
+        parent.replaceChild(body, combineStatements(variable, body));
+      }
     }
   }
 
   DartType inferForInIterable(
-      ForInStatement node, DartType elementType, bool typeNeeded) {
-    Class iterableClass = node.isAsync
+      Expression iterable, DartType elementType, bool typeNeeded,
+      {bool isAsync: false}) {
+    Class iterableClass = isAsync
         ? inferrer.coreTypes.streamClass
         : inferrer.coreTypes.iterableClass;
     DartType context = inferrer.wrapType(elementType, iterableClass);
-    Expression iterable = node.iterable;
     inferrer.inferExpression(iterable, context, typeNeeded);
     DartType inferredExpressionType =
         inferrer.resolveTypeParameter(getInferredType(iterable, inferrer));
     inferrer.ensureAssignable(
         inferrer.wrapType(const DynamicType(), iterableClass),
         inferredExpressionType,
-        node.iterable,
-        node.iterable.fileOffset,
+        iterable,
+        iterable.fileOffset,
         template: templateForInLoopTypeNotIterable);
     DartType inferredType;
     if (typeNeeded) {
@@ -319,15 +324,17 @@
     return inferredType;
   }
 
-  void handleForInStatementWithoutVariable(ForInStatement node) {
+  void handleForInWithoutVariable(
+      VariableDeclaration variable, Expression iterable, Statement body,
+      {bool isAsync: false}) {
     DartType elementType;
     bool typeChecksNeeded = !inferrer.isTopLevel;
     DartType syntheticWriteType;
     Expression syntheticAssignment;
-    Block block = node.body;
-    ExpressionStatement statement = block.statements[0];
-    SyntheticExpressionJudgment judgment = statement.expression;
     Expression rhs;
+    ExpressionStatement statement =
+        body is Block ? body.statements.first : body;
+    SyntheticExpressionJudgment judgment = statement.expression;
     syntheticAssignment = judgment.desugared;
     if (syntheticAssignment is VariableSet) {
       syntheticWriteType = elementType = syntheticAssignment.variable.type;
@@ -357,18 +364,19 @@
           inferrer.helper.uri);
     }
 
-    DartType inferredType =
-        inferForInIterable(node, elementType, typeChecksNeeded);
+    DartType inferredType = inferForInIterable(
+        iterable, elementType, typeChecksNeeded,
+        isAsync: isAsync);
     if (typeChecksNeeded) {
-      node.variable.type = inferredType;
+      variable.type = inferredType;
     }
 
-    inferrer.inferStatement(node.body);
+    inferrer.inferStatement(body);
 
     if (syntheticWriteType != null) {
       inferrer.ensureAssignable(
           greatestClosure(inferrer.coreTypes, syntheticWriteType),
-          node.variable.type,
+          variable.type,
           rhs,
           rhs.fileOffset,
           template: templateForInLoopElementTypeNotAssignable,
@@ -379,9 +387,11 @@
   @override
   void visitForInStatement(ForInStatement node, _) {
     if (node.variable.name == null) {
-      handleForInStatementWithoutVariable(node);
+      handleForInWithoutVariable(node.variable, node.iterable, node.body,
+          isAsync: node.isAsync);
     } else {
-      handleForInStatementDeclaringVariable(node);
+      handleForInDeclaringVariable(node.variable, node.iterable, node.body,
+          isAsync: node.isAsync);
     }
   }
 
@@ -665,6 +675,197 @@
     return null;
   }
 
+  DartType inferElement(
+      Expression element,
+      TreeNode parent,
+      DartType inferredTypeArgument,
+      Map<TreeNode, DartType> inferredSpreadTypes,
+      bool inferenceNeeded,
+      bool typeChecksNeeded) {
+    if (element is SpreadElement) {
+      DartType spreadType = inferrer.inferExpression(
+          element.expression,
+          new InterfaceType(inferrer.coreTypes.iterableClass,
+              <DartType>[inferredTypeArgument]),
+          inferenceNeeded || typeChecksNeeded,
+          isVoidAllowed: true);
+      inferredSpreadTypes[element.expression] = spreadType;
+      if (typeChecksNeeded) {
+        DartType spreadElementType =
+            getSpreadElementType(spreadType, element.isNullAware);
+        if (spreadElementType == null) {
+          if (spreadType is InterfaceType &&
+              spreadType.classNode == inferrer.coreTypes.nullClass &&
+              !element.isNullAware) {
+            parent.replaceChild(
+                element,
+                inferrer.helper.desugarSyntheticExpression(inferrer.helper
+                    .buildProblem(messageNonNullAwareSpreadIsNull,
+                        element.expression.fileOffset, 1)));
+          } else {
+            parent.replaceChild(
+                element,
+                inferrer.helper.desugarSyntheticExpression(inferrer.helper
+                    .buildProblem(
+                        templateSpreadTypeMismatch.withArguments(spreadType),
+                        element.expression.fileOffset,
+                        1)));
+          }
+        } else if (spreadType is InterfaceType) {
+          if (!inferrer.isAssignable(inferredTypeArgument, spreadElementType)) {
+            parent.replaceChild(
+                element,
+                inferrer.helper.desugarSyntheticExpression(inferrer.helper
+                    .buildProblem(
+                        templateSpreadElementTypeMismatch.withArguments(
+                            spreadElementType, inferredTypeArgument),
+                        element.expression.fileOffset,
+                        1)));
+          }
+        }
+      }
+      // Use 'dynamic' for error recovery.
+      return element.elementType =
+          getSpreadElementType(spreadType, element.isNullAware) ??
+              const DynamicType();
+    } else if (element is IfElement) {
+      inferrer.inferExpression(element.condition,
+          inferrer.coreTypes.boolClass.rawType, typeChecksNeeded,
+          isVoidAllowed: false);
+      DartType thenType = inferElement(
+          element.then,
+          element,
+          inferredTypeArgument,
+          inferredSpreadTypes,
+          inferenceNeeded,
+          typeChecksNeeded);
+      DartType otherwiseType;
+      if (element.otherwise != null) {
+        otherwiseType = inferElement(
+            element.otherwise,
+            element,
+            inferredTypeArgument,
+            inferredSpreadTypes,
+            inferenceNeeded,
+            typeChecksNeeded);
+      }
+      return otherwiseType == null
+          ? thenType
+          : inferrer.typeSchemaEnvironment
+              .getStandardUpperBound(thenType, otherwiseType);
+    } else if (element is ForElement) {
+      for (VariableDeclaration declaration in element.variables) {
+        if (declaration.initializer != null) {
+          inferrer.inferExpression(declaration.initializer, declaration.type,
+              inferenceNeeded || typeChecksNeeded,
+              isVoidAllowed: true);
+        }
+      }
+      if (element.condition != null) {
+        inferrer.inferExpression(
+            element.condition,
+            inferrer.coreTypes.boolClass.rawType,
+            inferenceNeeded || typeChecksNeeded,
+            isVoidAllowed: false);
+      }
+      for (Expression expression in element.updates) {
+        inferrer.inferExpression(expression, const UnknownType(),
+            inferenceNeeded || typeChecksNeeded,
+            isVoidAllowed: true);
+      }
+      return inferElement(element.body, element, inferredTypeArgument,
+          inferredSpreadTypes, inferenceNeeded, typeChecksNeeded);
+    } else if (element is ForInElement) {
+      if (element.variable.name == null) {
+        handleForInWithoutVariable(
+            element.variable, element.iterable, element.prologue,
+            isAsync: element.isAsync);
+      } else {
+        handleForInDeclaringVariable(
+            element.variable, element.iterable, element.prologue,
+            isAsync: element.isAsync);
+      }
+      if (element.problem != null) {
+        inferrer.inferExpression(element.problem, const UnknownType(),
+            inferenceNeeded || typeChecksNeeded,
+            isVoidAllowed: true);
+      }
+      return inferElement(element.body, element, inferredTypeArgument,
+          inferredSpreadTypes, inferenceNeeded, typeChecksNeeded);
+    } else {
+      return inferrer.inferExpression(
+          element, inferredTypeArgument, inferenceNeeded || typeChecksNeeded,
+          isVoidAllowed: true);
+    }
+  }
+
+  void checkElement(Expression item, Expression parent, DartType typeArgument,
+      DartType actualType, Map<TreeNode, DartType> inferredSpreadTypes) {
+    if (item is SpreadElement) {
+      DartType spreadType = inferredSpreadTypes[item.expression];
+      if (spreadType is DynamicType) {
+        inferrer.ensureAssignable(inferrer.coreTypes.iterableClass.rawType,
+            spreadType, item.expression, item.expression.fileOffset);
+      }
+    } else if (item is IfElement) {
+      if (!inferrer.isAssignable(typeArgument, actualType)) {
+        int offset =
+            item.otherwise == null ? item.then.fileOffset : item.fileOffset;
+        parent.replaceChild(
+            item,
+            inferrer.helper.desugarSyntheticExpression(inferrer.helper
+                .buildProblem(
+                    templateInvalidAssignment.withArguments(
+                        actualType, typeArgument),
+                    offset,
+                    1)));
+      } else {
+        checkElement(
+            item.then, item, typeArgument, actualType, inferredSpreadTypes);
+        if (item.otherwise != null) {
+          checkElement(item.otherwise, item, typeArgument, actualType,
+              inferredSpreadTypes);
+        }
+      }
+    } else if (item is ForElement) {
+      if (item.condition != null) {
+        DartType conditionType = getInferredType(item.condition, inferrer);
+        inferrer.ensureAssignable(inferrer.coreTypes.boolClass.rawType,
+            conditionType, item.condition, item.condition.fileOffset);
+      }
+      if (!inferrer.isAssignable(typeArgument, actualType)) {
+        parent.replaceChild(
+            item,
+            inferrer.helper.desugarSyntheticExpression(inferrer.helper
+                .buildProblem(
+                    templateInvalidAssignment.withArguments(
+                        actualType, typeArgument),
+                    item.body.fileOffset,
+                    1)));
+      } else {
+        checkElement(
+            item.body, item, typeArgument, actualType, inferredSpreadTypes);
+      }
+    } else if (item is ForInElement) {
+      if (!inferrer.isAssignable(typeArgument, actualType)) {
+        parent.replaceChild(
+            item,
+            inferrer.helper.desugarSyntheticExpression(inferrer.helper
+                .buildProblem(
+                    templateInvalidAssignment.withArguments(
+                        actualType, typeArgument),
+                    item.body.fileOffset,
+                    1)));
+      } else {
+        checkElement(
+            item.body, item, typeArgument, actualType, inferredSpreadTypes);
+      }
+    } else {
+      inferrer.ensureAssignable(typeArgument, actualType, item, item.fileOffset,
+          isVoidAllowed: typeArgument is VoidType);
+    }
+  }
+
   void visitListLiteralJudgment(
       ListLiteralJudgment node, DartType typeContext) {
     var listClass = inferrer.coreTypes.listClass;
@@ -675,9 +876,11 @@
     List<DartType> actualTypes;
     bool inferenceNeeded = node.typeArgument is ImplicitTypeArgument;
     bool typeChecksNeeded = !inferrer.isTopLevel;
+    Map<TreeNode, DartType> inferredSpreadTypes;
     if (inferenceNeeded || typeChecksNeeded) {
       formalTypes = [];
       actualTypes = [];
+      inferredSpreadTypes = new Map<TreeNode, DartType>.identity();
     }
     if (inferenceNeeded) {
       inferredTypes = [const UnknownType()];
@@ -688,36 +891,18 @@
     } else {
       inferredTypeArgument = node.typeArgument;
     }
-    List<DartType> spreadTypes =
-        typeChecksNeeded ? new List<DartType>(node.expressions.length) : null;
     if (inferenceNeeded || typeChecksNeeded) {
       for (int i = 0; i < node.expressions.length; ++i) {
-        Expression judgment = node.expressions[i];
-        if (judgment is SpreadElement) {
-          DartType spreadType = inferrer.inferExpression(
-              judgment.expression,
-              new InterfaceType(inferrer.coreTypes.iterableClass,
-                  <DartType>[inferredTypeArgument]),
-              inferenceNeeded || typeChecksNeeded,
-              isVoidAllowed: true);
-          if (inferenceNeeded) {
-            formalTypes.add(listType.typeArguments[0]);
-          }
-          if (typeChecksNeeded) {
-            spreadTypes[i] = spreadType;
-          }
-          // Use 'dynamic' for error recovery.
-          actualTypes.add(
-              getSpreadElementType(spreadType, judgment.isNullAware) ??
-                  const DynamicType());
-        } else {
-          inferrer.inferExpression(judgment, inferredTypeArgument,
-              inferenceNeeded || typeChecksNeeded,
-              isVoidAllowed: true);
-          if (inferenceNeeded) {
-            formalTypes.add(listType.typeArguments[0]);
-          }
-          actualTypes.add(getInferredType(judgment, inferrer));
+        DartType type = inferElement(
+            node.expressions[i],
+            node,
+            inferredTypeArgument,
+            inferredSpreadTypes,
+            inferenceNeeded,
+            typeChecksNeeded);
+        actualTypes.add(type);
+        if (inferenceNeeded) {
+          formalTypes.add(listType.typeArguments[0]);
         }
       }
     }
@@ -739,49 +924,8 @@
     }
     if (typeChecksNeeded) {
       for (int i = 0; i < node.expressions.length; i++) {
-        Expression item = node.expressions[i];
-        if (item is SpreadElement) {
-          DartType spreadType = spreadTypes[i];
-          DartType spreadElementType =
-              getSpreadElementType(spreadType, item.isNullAware);
-          if (spreadElementType == null) {
-            if (spreadType is InterfaceType &&
-                spreadType.classNode == inferrer.coreTypes.nullClass &&
-                !item.isNullAware) {
-              node.replaceChild(
-                  node.expressions[i],
-                  inferrer.helper.desugarSyntheticExpression(inferrer.helper
-                      .buildProblem(messageNonNullAwareSpreadIsNull,
-                          item.expression.fileOffset, 1)));
-            } else {
-              node.replaceChild(
-                  node.expressions[i],
-                  inferrer.helper.desugarSyntheticExpression(inferrer.helper
-                      .buildProblem(
-                          templateSpreadTypeMismatch.withArguments(spreadType),
-                          item.expression.fileOffset,
-                          1)));
-            }
-          } else if (spreadType is DynamicType) {
-            inferrer.ensureAssignable(inferrer.coreTypes.iterableClass.rawType,
-                spreadType, item.expression, item.expression.fileOffset);
-          } else if (spreadType is InterfaceType) {
-            if (!inferrer.isAssignable(node.typeArgument, spreadElementType)) {
-              node.replaceChild(
-                  node.expressions[i],
-                  inferrer.helper.desugarSyntheticExpression(inferrer.helper
-                      .buildProblem(
-                          templateSpreadElementTypeMismatch.withArguments(
-                              spreadElementType, node.typeArgument),
-                          item.expression.fileOffset,
-                          1)));
-            }
-          }
-        } else {
-          inferrer.ensureAssignable(
-              node.typeArgument, actualTypes[i], item, item.fileOffset,
-              isVoidAllowed: node.typeArgument is VoidType);
-        }
+        checkElement(node.expressions[i], node, node.typeArgument,
+            actualTypes[i], inferredSpreadTypes);
       }
     }
     node.inferredType = new InterfaceType(listClass, [inferredTypeArgument]);
@@ -832,6 +976,406 @@
     }
   }
 
+  // Note that inferMapEntry adds exactly two elements to actualTypes -- the
+  // actual types of the key and the value.
+  int mapEntryOffset = null;
+  int mapSpreadOffset = null;
+  int iterableSpreadOffset = null;
+  DartType iterableSpreadType = null;
+  void inferMapEntry(
+      MapEntry entry,
+      TreeNode parent,
+      DartType inferredKeyType,
+      DartType inferredValueType,
+      DartType spreadContext,
+      List<DartType> actualTypes,
+      List<DartType> actualTypesForSet,
+      Map<TreeNode, DartType> inferredSpreadTypes,
+      bool inferenceNeeded,
+      bool typeChecksNeeded) {
+    if (entry is SpreadMapEntry) {
+      DartType spreadType = inferrer.inferExpression(
+          entry.expression, spreadContext, inferenceNeeded || typeChecksNeeded,
+          isVoidAllowed: true);
+      inferredSpreadTypes[entry.expression] = spreadType;
+      int length = actualTypes.length;
+      actualTypes.add(null);
+      actualTypes.add(null);
+      storeSpreadMapEntryElementTypes(
+          spreadType, entry.isNullAware, actualTypes, length);
+      DartType actualKeyType = actualTypes[length];
+      DartType actualValueType = actualTypes[length + 1];
+      DartType actualElementType =
+          getSpreadElementType(spreadType, entry.isNullAware);
+
+      if (typeChecksNeeded) {
+        if (actualKeyType == null) {
+          if (spreadType is InterfaceType &&
+              spreadType.classNode == inferrer.coreTypes.nullClass &&
+              !entry.isNullAware) {
+            parent.replaceChild(
+                entry,
+                new MapEntry(
+                    inferrer.helper.desugarSyntheticExpression(inferrer.helper
+                        .buildProblem(messageNonNullAwareSpreadIsNull,
+                            entry.expression.fileOffset, 1)),
+                    new NullLiteral())
+                  ..fileOffset = entry.fileOffset);
+          } else if (actualElementType != null) {
+            // Don't report the error here, it might be an ambiguous Set.  The
+            // error is reported in checkMapEntry if it's disambiguated as map.
+            iterableSpreadType = spreadType;
+          } else {
+            parent.replaceChild(
+                entry,
+                new MapEntry(
+                    inferrer.helper.desugarSyntheticExpression(inferrer.helper
+                        .buildProblem(
+                            templateSpreadMapEntryTypeMismatch
+                                .withArguments(spreadType),
+                            entry.expression.fileOffset,
+                            1)),
+                    new NullLiteral())
+                  ..fileOffset = entry.fileOffset);
+          }
+        } else if (spreadType is InterfaceType) {
+          Expression keyError;
+          Expression valueError;
+          if (!inferrer.isAssignable(inferredKeyType, actualKeyType)) {
+            keyError = inferrer.helper.desugarSyntheticExpression(
+                inferrer.helper.buildProblem(
+                    templateSpreadMapEntryElementKeyTypeMismatch.withArguments(
+                        actualKeyType, inferredKeyType),
+                    entry.expression.fileOffset,
+                    1));
+          }
+          if (!inferrer.isAssignable(inferredValueType, actualValueType)) {
+            valueError = inferrer.helper.desugarSyntheticExpression(
+                inferrer.helper.buildProblem(
+                    templateSpreadMapEntryElementValueTypeMismatch
+                        .withArguments(actualValueType, inferredValueType),
+                    entry.expression.fileOffset,
+                    1));
+          }
+          if (keyError != null || valueError != null) {
+            keyError ??= new NullLiteral();
+            valueError ??= new NullLiteral();
+            parent.replaceChild(
+                entry,
+                new MapEntry(keyError, valueError)
+                  ..fileOffset = entry.fileOffset);
+          }
+        }
+      }
+
+      // Use 'dynamic' for error recovery.
+      if (actualKeyType == null) {
+        actualKeyType = actualTypes[length] = const DynamicType();
+        actualValueType = actualTypes[length + 1] = const DynamicType();
+      }
+      // Store the type in case of an ambiguous Set.  Use 'dynamic' for error
+      // recovery.
+      actualTypesForSet.add(actualElementType ?? const DynamicType());
+
+      Class mapEntryClass =
+          inferrer.coreTypes.index.getClass('dart:core', 'MapEntry');
+      // TODO(dmitryas):  Handle the case of an ambiguous Set.
+      entry.entryType = new InterfaceType(
+          mapEntryClass, <DartType>[actualKeyType, actualValueType]);
+
+      bool isMap = inferrer.typeSchemaEnvironment
+          .isSubtypeOf(spreadType, inferrer.coreTypes.mapClass.rawType);
+      bool isIterable = inferrer.typeSchemaEnvironment
+          .isSubtypeOf(spreadType, inferrer.coreTypes.iterableClass.rawType);
+      if (isMap && !isIterable) {
+        mapSpreadOffset = entry.fileOffset;
+      }
+      if (!isMap && isIterable) {
+        iterableSpreadOffset = entry.expression.fileOffset;
+      }
+
+      return;
+    } else if (entry is IfMapEntry) {
+      inferrer.inferExpression(entry.condition,
+          inferrer.coreTypes.boolClass.rawType, typeChecksNeeded,
+          isVoidAllowed: false);
+      // Note that this recursive invocation of inferMapEntry will add two types
+      // to actualTypes; they are the actual types of the current invocation if
+      // the 'else' branch is empty.
+      inferMapEntry(
+          entry.then,
+          entry,
+          inferredKeyType,
+          inferredValueType,
+          spreadContext,
+          actualTypes,
+          actualTypesForSet,
+          inferredSpreadTypes,
+          inferenceNeeded,
+          typeChecksNeeded);
+      if (entry.otherwise != null) {
+        // We need to modify the actual types added in the recursive call to
+        // inferMapEntry.
+        DartType actualValueType = actualTypes.removeLast();
+        DartType actualKeyType = actualTypes.removeLast();
+        DartType actualTypeForSet = actualTypesForSet.removeLast();
+        inferMapEntry(
+            entry.otherwise,
+            entry,
+            inferredKeyType,
+            inferredValueType,
+            spreadContext,
+            actualTypes,
+            actualTypesForSet,
+            inferredSpreadTypes,
+            inferenceNeeded,
+            typeChecksNeeded);
+        int length = actualTypes.length;
+        actualTypes[length - 2] = inferrer.typeSchemaEnvironment
+            .getStandardUpperBound(actualKeyType, actualTypes[length - 2]);
+        actualTypes[length - 1] = inferrer.typeSchemaEnvironment
+            .getStandardUpperBound(actualValueType, actualTypes[length - 1]);
+        int lengthForSet = actualTypesForSet.length;
+        actualTypesForSet[lengthForSet - 1] = inferrer.typeSchemaEnvironment
+            .getStandardUpperBound(
+                actualTypeForSet, actualTypesForSet[lengthForSet - 1]);
+      }
+      return;
+    } else if (entry is ForMapEntry) {
+      for (VariableDeclaration declaration in entry.variables) {
+        if (declaration.initializer != null) {
+          inferrer.inferExpression(declaration.initializer, declaration.type,
+              inferenceNeeded || typeChecksNeeded,
+              isVoidAllowed: true);
+        }
+      }
+      if (entry.condition != null) {
+        inferrer.inferExpression(
+            entry.condition,
+            inferrer.coreTypes.boolClass.rawType,
+            inferenceNeeded || typeChecksNeeded,
+            isVoidAllowed: false);
+      }
+      for (Expression expression in entry.updates) {
+        inferrer.inferExpression(expression, const UnknownType(),
+            inferenceNeeded || typeChecksNeeded,
+            isVoidAllowed: true);
+      }
+      // Actual types are added by the recursive call.
+      return inferMapEntry(
+          entry.body,
+          entry,
+          inferredKeyType,
+          inferredValueType,
+          spreadContext,
+          actualTypes,
+          actualTypesForSet,
+          inferredSpreadTypes,
+          inferenceNeeded,
+          typeChecksNeeded);
+    } else if (entry is ForInMapEntry) {
+      if (entry.variable.name == null) {
+        handleForInWithoutVariable(
+            entry.variable, entry.iterable, entry.prologue,
+            isAsync: entry.isAsync);
+      } else {
+        handleForInDeclaringVariable(
+            entry.variable, entry.iterable, entry.prologue,
+            isAsync: entry.isAsync);
+      }
+      if (entry.problem != null) {
+        inferrer.inferExpression(entry.problem, const UnknownType(),
+            inferenceNeeded || typeChecksNeeded,
+            isVoidAllowed: true);
+      }
+      // Actual types are added by the recursive call.
+      inferMapEntry(
+          entry.body,
+          entry,
+          inferredKeyType,
+          inferredValueType,
+          spreadContext,
+          actualTypes,
+          actualTypesForSet,
+          inferredSpreadTypes,
+          inferenceNeeded,
+          typeChecksNeeded);
+    } else {
+      DartType keyType = inferrer.inferExpression(
+          entry.key, inferredKeyType, true,
+          isVoidAllowed: true);
+      DartType valueType = inferrer.inferExpression(
+          entry.value, inferredValueType, true,
+          isVoidAllowed: true);
+      inferrer.ensureAssignable(
+          inferredKeyType, keyType, entry.key, entry.key.fileOffset,
+          isVoidAllowed: inferredKeyType is VoidType);
+      inferrer.ensureAssignable(
+          inferredValueType, valueType, entry.value, entry.value.fileOffset,
+          isVoidAllowed: inferredValueType is VoidType);
+      actualTypes.add(keyType);
+      actualTypes.add(valueType);
+      // Use 'dynamic' for error recovery.
+      actualTypesForSet.add(const DynamicType());
+      mapEntryOffset = entry.fileOffset;
+      return;
+    }
+  }
+
+  void checkMapEntry(
+      MapEntry entry,
+      TreeNode parent,
+      Expression cachedKey,
+      Expression cachedValue,
+      DartType keyType,
+      DartType valueType,
+      DartType actualKeyType,
+      DartType actualValueType,
+      Map<TreeNode, DartType> inferredSpreadTypes) {
+    // It's disambiguated as a map literal.
+    if (iterableSpreadOffset != null) {
+      parent.replaceChild(
+          entry,
+          new MapEntry(
+              inferrer.helper.desugarSyntheticExpression(inferrer.helper
+                  .buildProblem(
+                      templateSpreadMapEntryTypeMismatch
+                          .withArguments(iterableSpreadType),
+                      iterableSpreadOffset,
+                      1)),
+              new NullLiteral()));
+    }
+    if (entry is SpreadMapEntry) {
+      DartType spreadType = inferredSpreadTypes[entry.expression];
+      if (spreadType is DynamicType) {
+        inferrer.ensureAssignable(inferrer.coreTypes.mapClass.rawType,
+            spreadType, entry.expression, entry.expression.fileOffset);
+      }
+    } else if (entry is IfMapEntry) {
+      Expression keyError;
+      Expression valueError;
+      int offset =
+          entry.otherwise == null ? entry.then.fileOffset : entry.fileOffset;
+      if (!inferrer.isAssignable(keyType, actualKeyType)) {
+        keyError = inferrer.helper.desugarSyntheticExpression(inferrer.helper
+            .buildProblem(
+                templateInvalidAssignment.withArguments(actualKeyType, keyType),
+                offset,
+                1));
+      }
+      if (!inferrer.isAssignable(valueType, actualValueType)) {
+        valueError = inferrer.helper.desugarSyntheticExpression(inferrer.helper
+            .buildProblem(
+                templateInvalidAssignment.withArguments(
+                    actualValueType, valueType),
+                offset,
+                1));
+      }
+      if (keyError != null || valueError != null) {
+        keyError ??= new NullLiteral();
+        valueError ??= new NullLiteral();
+        parent.replaceChild(entry,
+            new MapEntry(keyError, valueError)..fileOffset = entry.fileOffset);
+      } else {
+        checkMapEntry(entry.then, entry, cachedKey, cachedValue, keyType,
+            valueType, actualKeyType, actualValueType, inferredSpreadTypes);
+        if (entry.otherwise != null) {
+          checkMapEntry(entry.otherwise, entry, cachedKey, cachedValue, keyType,
+              valueType, actualKeyType, actualValueType, inferredSpreadTypes);
+        }
+      }
+    } else if (entry is ForMapEntry) {
+      if (entry.condition != null) {
+        DartType conditionType = getInferredType(entry.condition, inferrer);
+        inferrer.ensureAssignable(inferrer.coreTypes.boolClass.rawType,
+            conditionType, entry.condition, entry.condition.fileOffset);
+      }
+      Expression keyError;
+      Expression valueError;
+      if (!inferrer.isAssignable(keyType, actualKeyType)) {
+        keyError = inferrer.helper.desugarSyntheticExpression(inferrer.helper
+            .buildProblem(
+                templateInvalidAssignment.withArguments(actualKeyType, keyType),
+                entry.fileOffset,
+                1));
+      }
+      if (!inferrer.isAssignable(valueType, actualValueType)) {
+        valueError = inferrer.helper.desugarSyntheticExpression(inferrer.helper
+            .buildProblem(
+                templateInvalidAssignment.withArguments(
+                    actualValueType, valueType),
+                entry.fileOffset,
+                1));
+      }
+      if (keyError != null || valueError != null) {
+        keyError ??= new NullLiteral();
+        valueError ??= new NullLiteral();
+        parent.replaceChild(entry,
+            new MapEntry(keyError, valueError)..fileOffset = entry.fileOffset);
+      } else {
+        checkMapEntry(entry.body, entry, cachedKey, cachedValue, keyType,
+            valueType, actualKeyType, actualValueType, inferredSpreadTypes);
+      }
+    } else if (entry is ForInMapEntry) {
+      Expression keyError;
+      Expression valueError;
+      if (!inferrer.isAssignable(keyType, actualKeyType)) {
+        keyError = inferrer.helper.desugarSyntheticExpression(inferrer.helper
+            .buildProblem(
+                templateInvalidAssignment.withArguments(actualKeyType, keyType),
+                entry.fileOffset,
+                1));
+      }
+      if (!inferrer.isAssignable(valueType, actualValueType)) {
+        valueError = inferrer.helper.desugarSyntheticExpression(inferrer.helper
+            .buildProblem(
+                templateInvalidAssignment.withArguments(
+                    actualValueType, valueType),
+                entry.fileOffset,
+                1));
+      }
+      if (keyError != null || valueError != null) {
+        keyError ??= new NullLiteral();
+        valueError ??= new NullLiteral();
+        parent.replaceChild(entry,
+            new MapEntry(keyError, valueError)..fileOffset = entry.fileOffset);
+      } else {
+        checkMapEntry(entry.body, entry, cachedKey, cachedValue, keyType,
+            valueType, actualKeyType, actualValueType, inferredSpreadTypes);
+      }
+    } else {
+      // Do nothing.  Assignability checks are done during type inference.
+    }
+  }
+
+  Expression convertToElement(MapEntry entry) {
+    if (entry is SpreadMapEntry) {
+      return new SpreadElement(entry.expression, entry.isNullAware)
+        ..fileOffset = entry.expression.fileOffset;
+    }
+    if (entry is IfMapEntry) {
+      return new IfElement(entry.condition, convertToElement(entry.then),
+          entry.otherwise == null ? null : convertToElement(entry.otherwise))
+        ..fileOffset = entry.fileOffset;
+    }
+    if (entry is ForMapEntry) {
+      return new ForElement(entry.variables, entry.condition, entry.updates,
+          convertToElement(entry.body))
+        ..fileOffset = entry.fileOffset;
+    }
+    if (entry is ForInMapEntry) {
+      return new ForInElement(entry.variable, entry.iterable, entry.prologue,
+          convertToElement(entry.body), entry.problem)
+        ..fileOffset = entry.fileOffset;
+    }
+    return inferrer.helper
+        .desugarSyntheticExpression(inferrer.helper.buildProblem(
+      templateExpectedButGot.withArguments(','),
+      entry.fileOffset,
+      1,
+    ));
+  }
+
   void visitMapLiteralJudgment(MapLiteralJudgment node, DartType typeContext) {
     var mapClass = inferrer.coreTypes.mapClass;
     var mapType = mapClass.thisType;
@@ -840,11 +1384,12 @@
     DartType inferredValueType;
     List<DartType> formalTypes;
     List<DartType> actualTypes;
+    List<DartType> actualTypesForSet;
     assert((node.keyType is ImplicitTypeArgument) ==
         (node.valueType is ImplicitTypeArgument));
     bool inferenceNeeded = node.keyType is ImplicitTypeArgument;
     KernelLibraryBuilder library = inferrer.library;
-    bool typeContextIsMap = false;
+    bool typeContextIsMap = node.keyType is! ImplicitTypeArgument;
     bool typeContextIsIterable = false;
     if (!inferrer.isTopLevel) {
       if (library.loader.target.enableSetLiterals && inferenceNeeded) {
@@ -852,10 +1397,12 @@
         DartType context =
             inferrer.typeSchemaEnvironment.unfutureType(typeContext);
         if (context is InterfaceType) {
-          typeContextIsMap = inferrer.classHierarchy
-              .isSubtypeOf(context.classNode, inferrer.coreTypes.mapClass);
-          typeContextIsIterable = inferrer.classHierarchy
-              .isSubtypeOf(context.classNode, inferrer.coreTypes.iterableClass);
+          typeContextIsMap = typeContextIsMap ||
+              inferrer.classHierarchy
+                  .isSubtypeOf(context.classNode, inferrer.coreTypes.mapClass);
+          typeContextIsIterable = typeContextIsIterable ||
+              inferrer.classHierarchy.isSubtypeOf(
+                  context.classNode, inferrer.coreTypes.iterableClass);
           if (node.entries.isEmpty &&
               typeContextIsIterable &&
               !typeContextIsMap) {
@@ -873,9 +1420,12 @@
       }
     }
     bool typeChecksNeeded = !inferrer.isTopLevel;
+    Map<TreeNode, DartType> inferredSpreadTypes;
     if (inferenceNeeded || typeChecksNeeded) {
       formalTypes = [];
       actualTypes = [];
+      actualTypesForSet = [];
+      inferredSpreadTypes = new Map<TreeNode, DartType>.identity();
     }
     if (inferenceNeeded) {
       inferredTypes = [const UnknownType(), const UnknownType()];
@@ -890,102 +1440,103 @@
     }
     List<Expression> cachedKeys = new List(node.entries.length);
     List<Expression> cachedValues = new List(node.entries.length);
-    List<DartType> spreadMapEntryTypes =
-        typeChecksNeeded ? new List<DartType>(node.entries.length) : null;
     for (int i = 0; i < node.entries.length; i++) {
       MapEntry entry = node.entries[i];
-      if (entry is! SpreadMapEntry && entry is! IfMapEntry) {
+      if (entry is! ControlFlowMapEntry) {
         cachedKeys[i] = node.entries[i].key;
         cachedValues[i] = node.entries[i].value;
       }
     }
-    int iterableSpreadOffset = -1;
-    int mapSpreadOffset = -1;
-    int mapEntryOffset = -1;
+    bool hasMapEntry = false;
+    bool hasMapSpread = false;
+    bool hasIterableSpread = false;
     if (inferenceNeeded || typeChecksNeeded) {
+      mapEntryOffset = null;
+      mapSpreadOffset = null;
+      iterableSpreadOffset = null;
+      iterableSpreadType = null;
       DartType spreadTypeContext = const UnknownType();
       if (typeContextIsIterable && !typeContextIsMap) {
         spreadTypeContext = inferrer.typeSchemaEnvironment
             .getTypeAsInstanceOf(typeContext, inferrer.coreTypes.iterableClass);
       } else if (!typeContextIsIterable && typeContextIsMap) {
-        spreadTypeContext =
-            new InterfaceType(inferrer.coreTypes.mapClass, inferredTypes);
+        spreadTypeContext = new InterfaceType(inferrer.coreTypes.mapClass,
+            <DartType>[inferredKeyType, inferredValueType]);
       }
       for (int i = 0; i < node.entries.length; ++i) {
         MapEntry entry = node.entries[i];
-        if (entry is SpreadMapEntry) {
-          DartType spreadMapEntryType = inferrer.inferExpression(
-              entry.expression,
-              spreadTypeContext,
-              inferenceNeeded || typeChecksNeeded,
-              isVoidAllowed: true);
-          if (inferenceNeeded) {
-            formalTypes.add(mapType.typeArguments[0]);
-            formalTypes.add(mapType.typeArguments[1]);
-          }
-          if (typeChecksNeeded) {
-            spreadMapEntryTypes[i] = spreadMapEntryType;
-          }
-
-          bool isMap = inferrer.typeSchemaEnvironment.isSubtypeOf(
-              spreadMapEntryType, inferrer.coreTypes.mapClass.rawType);
-          bool isSet = inferrer.typeSchemaEnvironment.isSubtypeOf(
-              spreadMapEntryType, inferrer.coreTypes.iterableClass.rawType);
-
-          if (isMap && !isSet) {
-            mapSpreadOffset = entry.expression.fileOffset;
-          }
-          if (!isMap && isSet) {
-            iterableSpreadOffset = entry.expression.fileOffset;
-          }
-
-          // Use 'dynamic' for error recovery.
-          int length = actualTypes.length;
-          actualTypes.add(const DynamicType());
-          actualTypes.add(const DynamicType());
-          storeSpreadMapEntryElementTypes(
-              spreadMapEntryType, entry.isNullAware, actualTypes, length);
-        } else if (entry is IfMapEntry) {
-          node.entries[i] = new MapEntry(
-              new InvalidExpression('unimplemented spread entry')
-                ..fileOffset = node.fileOffset,
-              new NullLiteral());
-          actualTypes.add(const DynamicType());
-          actualTypes.add(const DynamicType());
-        } else {
-          Expression key = entry.key;
-          inferrer.inferExpression(key, inferredKeyType, true,
-              isVoidAllowed: true);
-          actualTypes.add(getInferredType(key, inferrer));
-          Expression value = entry.value;
-          inferrer.inferExpression(value, inferredValueType, true,
-              isVoidAllowed: true);
-          actualTypes.add(getInferredType(value, inferrer));
-          if (inferenceNeeded) {
-            formalTypes.addAll(mapType.typeArguments);
-          }
-
-          mapEntryOffset = entry.fileOffset;
+        inferMapEntry(
+            entry,
+            node,
+            inferredKeyType,
+            inferredValueType,
+            spreadTypeContext,
+            actualTypes,
+            actualTypesForSet,
+            inferredSpreadTypes,
+            inferenceNeeded,
+            typeChecksNeeded);
+        if (inferenceNeeded) {
+          formalTypes.add(mapType.typeArguments[0]);
+          formalTypes.add(mapType.typeArguments[1]);
         }
       }
+      hasMapEntry = mapEntryOffset != null;
+      hasMapSpread = mapSpreadOffset != null;
+      hasIterableSpread = iterableSpreadOffset != null;
     }
     if (inferenceNeeded) {
-      bool canBeSet =
-          mapSpreadOffset == -1 && mapEntryOffset == -1 && !typeContextIsMap;
-      bool canBeMap = iterableSpreadOffset == -1 && !typeContextIsIterable;
+      bool canBeSet = !hasMapSpread && !hasMapEntry && !typeContextIsMap;
+      bool canBeMap = !hasIterableSpread && !typeContextIsIterable;
       if (canBeSet && !canBeMap) {
         List<Expression> setElements = <Expression>[];
+        List<DartType> formalTypesForSet = <DartType>[];
+        InterfaceType setType = inferrer.coreTypes.setClass.thisType;
         for (int i = 0; i < node.entries.length; ++i) {
-          SpreadMapEntry entry = node.entries[i];
-          setElements
-              .add(new SpreadElement(entry.expression, entry.isNullAware));
+          setElements.add(convertToElement(node.entries[i]));
+          formalTypesForSet.add(setType.typeArguments[0]);
         }
+
+        List<DartType> inferredTypesForSet = <DartType>[const UnknownType()];
+        inferrer.typeSchemaEnvironment.inferGenericFunctionOrType(
+            setType,
+            inferrer.coreTypes.setClass.typeParameters,
+            null,
+            null,
+            typeContext,
+            inferredTypesForSet,
+            isConst: node.isConst);
+        inferrer.typeSchemaEnvironment.inferGenericFunctionOrType(
+            inferrer.coreTypes.setClass.thisType,
+            inferrer.coreTypes.setClass.typeParameters,
+            formalTypesForSet,
+            actualTypesForSet,
+            typeContext,
+            inferredTypesForSet);
+        DartType inferredTypeArgument = inferredTypesForSet[0];
+        inferrer.instrumentation?.record(
+            inferrer.uri,
+            node.fileOffset,
+            'typeArgs',
+            new InstrumentationValueForTypeArgs([inferredTypeArgument]));
+
         SetLiteralJudgment setLiteral = new SetLiteralJudgment(setElements,
-            typeArgument: const ImplicitTypeArgument(), isConst: node.isConst)
+            typeArgument: inferredTypeArgument, isConst: node.isConst)
           ..fileOffset = node.fileOffset;
         node.parent.replaceChild(node, setLiteral);
-        visitSetLiteralJudgment(setLiteral, typeContext);
-        node.inferredType = setLiteral.inferredType;
+        if (typeChecksNeeded) {
+          for (int i = 0; i < setLiteral.expressions.length; i++) {
+            checkElement(
+                setLiteral.expressions[i],
+                setLiteral,
+                setLiteral.typeArgument,
+                actualTypesForSet[i],
+                inferredSpreadTypes);
+          }
+        }
+
+        node.inferredType = setLiteral.inferredType =
+            new InterfaceType(inferrer.coreTypes.setClass, inferredTypesForSet);
         return;
       }
       if (canBeSet && canBeMap && node.entries.isNotEmpty) {
@@ -999,24 +1550,11 @@
       }
       if (!canBeSet && !canBeMap) {
         if (!inferrer.isTopLevel) {
-          LocatedMessage iterableContextMessage = messageSpreadElement
-              .withLocation(library.uri, iterableSpreadOffset, 1);
-          LocatedMessage mapContextMessage = messageSpreadMapElement
-              .withLocation(library.uri, mapSpreadOffset, 1);
-          List<LocatedMessage> context = <LocatedMessage>[];
-          if (iterableSpreadOffset < mapSpreadOffset) {
-            context.add(iterableContextMessage);
-            context.add(mapContextMessage);
-          } else {
-            context.add(mapContextMessage);
-            context.add(iterableContextMessage);
-          }
           node.parent.replaceChild(
               node,
               inferrer.helper.desugarSyntheticExpression(inferrer.helper
                   .buildProblem(messageCantDisambiguateAmbiguousInformation,
-                      node.fileOffset, 1,
-                      context: context)));
+                      node.fileOffset, 1)));
         }
         node.inferredType = const BottomType();
         return;
@@ -1041,85 +1579,16 @@
     }
     if (typeChecksNeeded) {
       for (int i = 0; i < node.entries.length; ++i) {
-        MapEntry entry = node.entries[i];
-        List<DartType> spreadMapEntryElementTypes = new List<DartType>(2);
-        if (entry is SpreadMapEntry) {
-          DartType spreadMapEntryType = spreadMapEntryTypes[i];
-          spreadMapEntryElementTypes[0] = spreadMapEntryElementTypes[1] = null;
-          storeSpreadMapEntryElementTypes(spreadMapEntryType, entry.isNullAware,
-              spreadMapEntryElementTypes, 0);
-          if (spreadMapEntryElementTypes[0] == null) {
-            if (spreadMapEntryType is InterfaceType &&
-                spreadMapEntryType.classNode == inferrer.coreTypes.nullClass &&
-                !entry.isNullAware) {
-              node.replaceChild(
-                  node.entries[i],
-                  new MapEntry(
-                      inferrer.helper.desugarSyntheticExpression(inferrer.helper
-                          .buildProblem(messageNonNullAwareSpreadIsNull,
-                              entry.expression.fileOffset, 1)),
-                      new NullLiteral()));
-            } else {
-              node.replaceChild(
-                  node.entries[i],
-                  new MapEntry(
-                      inferrer.helper.desugarSyntheticExpression(inferrer.helper
-                          .buildProblem(
-                              templateSpreadMapEntryTypeMismatch
-                                  .withArguments(spreadMapEntryType),
-                              entry.expression.fileOffset,
-                              1)),
-                      new NullLiteral()));
-            }
-          } else if (spreadMapEntryType is DynamicType) {
-            inferrer.ensureAssignable(
-                inferrer.coreTypes.mapClass.rawType,
-                spreadMapEntryType,
-                entry.expression,
-                entry.expression.fileOffset);
-          } else if (spreadMapEntryType is InterfaceType) {
-            Expression keyError;
-            Expression valueError;
-            if (!inferrer.isAssignable(
-                node.keyType, spreadMapEntryElementTypes[0])) {
-              keyError = inferrer.helper.desugarSyntheticExpression(
-                  inferrer.helper.buildProblem(
-                      templateSpreadMapEntryElementKeyTypeMismatch
-                          .withArguments(
-                              spreadMapEntryElementTypes[0], node.keyType),
-                      entry.expression.fileOffset,
-                      1));
-            }
-            if (!inferrer.isAssignable(
-                node.valueType, spreadMapEntryElementTypes[1])) {
-              valueError = inferrer.helper.desugarSyntheticExpression(
-                  inferrer.helper.buildProblem(
-                      templateSpreadMapEntryElementValueTypeMismatch
-                          .withArguments(
-                              spreadMapEntryElementTypes[1], node.valueType),
-                      entry.expression.fileOffset,
-                      1));
-            }
-            if (keyError != null || valueError != null) {
-              keyError ??= new NullLiteral();
-              valueError ??= new NullLiteral();
-              node.replaceChild(
-                  node.entries[i], new MapEntry(keyError, valueError));
-            }
-          }
-        } else {
-          Expression keyJudgment = cachedKeys[i];
-          if (keyJudgment != null) {
-            inferrer.ensureAssignable(node.keyType, actualTypes[2 * i],
-                keyJudgment, keyJudgment.fileOffset,
-                isVoidAllowed: node.keyType is VoidType);
-
-            Expression valueJudgment = cachedValues[i];
-            inferrer.ensureAssignable(node.valueType, actualTypes[2 * i + 1],
-                valueJudgment, valueJudgment.fileOffset,
-                isVoidAllowed: node.valueType is VoidType);
-          }
-        }
+        checkMapEntry(
+            node.entries[i],
+            node,
+            cachedKeys[i],
+            cachedValues[i],
+            node.keyType,
+            node.valueType,
+            actualTypes[2 * i],
+            actualTypes[2 * i + 1],
+            inferredSpreadTypes);
       }
     }
     node.inferredType =
@@ -1358,9 +1827,11 @@
     List<DartType> actualTypes;
     bool inferenceNeeded = node.typeArgument is ImplicitTypeArgument;
     bool typeChecksNeeded = !inferrer.isTopLevel;
+    Map<TreeNode, DartType> inferredSpreadTypes;
     if (inferenceNeeded || typeChecksNeeded) {
       formalTypes = [];
       actualTypes = [];
+      inferredSpreadTypes = new Map<TreeNode, DartType>.identity();
     }
     if (inferenceNeeded) {
       inferredTypes = [const UnknownType()];
@@ -1371,36 +1842,18 @@
     } else {
       inferredTypeArgument = node.typeArgument;
     }
-    List<DartType> spreadTypes =
-        typeChecksNeeded ? new List<DartType>(node.expressions.length) : null;
     if (inferenceNeeded || typeChecksNeeded) {
       for (int i = 0; i < node.expressions.length; ++i) {
-        Expression judgment = node.expressions[i];
-        if (judgment is SpreadElement) {
-          DartType spreadType = inferrer.inferExpression(
-              judgment.expression,
-              new InterfaceType(inferrer.coreTypes.iterableClass,
-                  <DartType>[inferredTypeArgument]),
-              inferenceNeeded || typeChecksNeeded,
-              isVoidAllowed: true);
-          if (inferenceNeeded) {
-            formalTypes.add(setType.typeArguments[0]);
-          }
-          if (typeChecksNeeded) {
-            spreadTypes[i] = spreadType;
-          }
-          // Use 'dynamic' for error recovery.
-          actualTypes.add(
-              getSpreadElementType(spreadType, judgment.isNullAware) ??
-                  const DynamicType());
-        } else {
-          inferrer.inferExpression(judgment, inferredTypeArgument,
-              inferenceNeeded || typeChecksNeeded,
-              isVoidAllowed: true);
-          if (inferenceNeeded) {
-            formalTypes.add(setType.typeArguments[0]);
-          }
-          actualTypes.add(getInferredType(judgment, inferrer));
+        DartType type = inferElement(
+            node.expressions[i],
+            node,
+            inferredTypeArgument,
+            inferredSpreadTypes,
+            inferenceNeeded,
+            typeChecksNeeded);
+        actualTypes.add(type);
+        if (inferenceNeeded) {
+          formalTypes.add(setType.typeArguments[0]);
         }
       }
     }
@@ -1422,49 +1875,8 @@
     }
     if (typeChecksNeeded) {
       for (int i = 0; i < node.expressions.length; i++) {
-        Expression item = node.expressions[i];
-        if (item is SpreadElement) {
-          DartType spreadType = spreadTypes[i];
-          DartType spreadElementType =
-              getSpreadElementType(spreadType, item.isNullAware);
-          if (spreadElementType == null) {
-            if (spreadType is InterfaceType &&
-                spreadType.classNode == inferrer.coreTypes.nullClass &&
-                !item.isNullAware) {
-              node.replaceChild(
-                  node.expressions[i],
-                  inferrer.helper.desugarSyntheticExpression(inferrer.helper
-                      .buildProblem(messageNonNullAwareSpreadIsNull,
-                          item.expression.fileOffset, 1)));
-            } else {
-              node.replaceChild(
-                  node.expressions[i],
-                  inferrer.helper.desugarSyntheticExpression(inferrer.helper
-                      .buildProblem(
-                          templateSpreadTypeMismatch.withArguments(spreadType),
-                          item.expression.fileOffset,
-                          1)));
-            }
-          } else if (spreadType is DynamicType) {
-            inferrer.ensureAssignable(inferrer.coreTypes.iterableClass.rawType,
-                spreadType, item.expression, item.expression.fileOffset);
-          } else if (spreadType is InterfaceType) {
-            if (!inferrer.isAssignable(node.typeArgument, spreadElementType)) {
-              node.replaceChild(
-                  node.expressions[i],
-                  inferrer.helper.desugarSyntheticExpression(inferrer.helper
-                      .buildProblem(
-                          templateSpreadElementTypeMismatch.withArguments(
-                              spreadElementType, node.typeArgument),
-                          item.expression.fileOffset,
-                          1)));
-            }
-          }
-        } else {
-          inferrer.ensureAssignable(node.typeArgument, actualTypes[i],
-              node.expressions[i], node.expressions[i].fileOffset,
-              isVoidAllowed: node.typeArgument is VoidType);
-        }
+        checkElement(node.expressions[i], node, node.typeArgument,
+            actualTypes[i], inferredSpreadTypes);
       }
     }
     node.inferredType = new InterfaceType(setClass, [inferredTypeArgument]);
diff --git a/pkg/front_end/lib/src/fasta/kernel/inferred_type_visitor.dart b/pkg/front_end/lib/src/fasta/kernel/inferred_type_visitor.dart
index 91ae51b..05513ad 100644
--- a/pkg/front_end/lib/src/fasta/kernel/inferred_type_visitor.dart
+++ b/pkg/front_end/lib/src/fasta/kernel/inferred_type_visitor.dart
@@ -28,18 +28,11 @@
 
   @override
   DartType defaultExpression(Expression node, TypeInferrerImpl inferrer) {
-    if (node is IfElement) {
-      return visitIfElement(node, inferrer);
-    }
     unhandled("${node.runtimeType}", "getInferredType", node.fileOffset,
         inferrer.uri);
     return const InvalidType();
   }
 
-  DartType visitIfElement(IfElement node, TypeInferrerImpl inferrer) {
-    return const BottomType();
-  }
-
   @override
   DartType visitIntLiteral(IntLiteral node, TypeInferrerImpl inferrer) {
     return inferrer.coreTypes.intClass.rawType;
diff --git a/pkg/front_end/lib/src/fasta/kernel/kernel_ast_api.dart b/pkg/front_end/lib/src/fasta/kernel/kernel_ast_api.dart
index cded049..8e04138 100644
--- a/pkg/front_end/lib/src/fasta/kernel/kernel_ast_api.dart
+++ b/pkg/front_end/lib/src/fasta/kernel/kernel_ast_api.dart
@@ -53,6 +53,7 @@
         NamedExpression,
         NamedType,
         Node,
+        NullLiteral,
         Procedure,
         ProcedureKind,
         PropertyGet,
diff --git a/pkg/front_end/lib/src/fasta/kernel/kernel_class_builder.dart b/pkg/front_end/lib/src/fasta/kernel/kernel_class_builder.dart
index 80b38e4..151c074 100644
--- a/pkg/front_end/lib/src/fasta/kernel/kernel_class_builder.dart
+++ b/pkg/front_end/lib/src/fasta/kernel/kernel_class_builder.dart
@@ -6,31 +6,32 @@
 
 import 'package:kernel/ast.dart'
     show
+        Arguments,
+        AsExpression,
         Class,
         Constructor,
-        ThisExpression,
         DartType,
         DynamicType,
         Expression,
         Field,
         FunctionNode,
         InterfaceType,
-        AsExpression,
+        InvalidType,
         ListLiteral,
         Member,
+        MethodInvocation,
         Name,
         Procedure,
+        ProcedureKind,
         RedirectingFactoryConstructor,
         ReturnStatement,
-        VoidType,
-        MethodInvocation,
-        ProcedureKind,
         StaticGet,
         Supertype,
+        ThisExpression,
         TypeParameter,
         TypeParameterType,
-        Arguments,
-        VariableDeclaration;
+        VariableDeclaration,
+        VoidType;
 
 import 'package:kernel/ast.dart' show FunctionType, TypeParameterType;
 
@@ -1021,6 +1022,9 @@
     } else if (isCovariant && typeEnvironment.isSubtypeOf(supertype, subtype)) {
       // No problem--the overriding parameter is marked "covariant" and has
       // a type which is a subtype of the parameter it overrides.
+    } else if (subtype is InvalidType || supertype is InvalidType) {
+      // Don't report a problem as something else is wrong that has already
+      // been reported.
     } else {
       // Report an error.
       String declaredMemberName =
diff --git a/pkg/front_end/lib/src/fasta/kernel/kernel_constants.dart b/pkg/front_end/lib/src/fasta/kernel/kernel_constants.dart
index 6cb0a71..5f8b4f5 100644
--- a/pkg/front_end/lib/src/fasta/kernel/kernel_constants.dart
+++ b/pkg/front_end/lib/src/fasta/kernel/kernel_constants.dart
@@ -4,177 +4,28 @@
 
 library fasta.kernel_constants;
 
-import 'package:kernel/ast.dart'
-    show Constant, DartType, IntConstant, Library, Member, Procedure, TreeNode;
+import 'package:kernel/ast.dart' show InvalidExpression, Library;
 
-import 'package:kernel/type_environment.dart' show TypeEnvironment;
-
-import 'package:kernel/transformations/constants.dart' show ErrorReporter;
-
-import '../fasta_codes.dart'
-    show
-        Message,
-        noLength,
-        messageConstEvalCircularity,
-        messageConstEvalFailedAssertion,
-        templateConstEvalDeferredLibrary,
-        templateConstEvalDuplicateKey,
-        templateConstEvalFailedAssertionWithMessage,
-        templateConstEvalFreeTypeParameter,
-        templateConstEvalInvalidBinaryOperandType,
-        templateConstEvalInvalidMethodInvocation,
-        templateConstEvalInvalidStaticInvocation,
-        templateConstEvalInvalidStringInterpolationOperand,
-        templateConstEvalInvalidSymbolName,
-        templateConstEvalInvalidType,
-        templateConstEvalNegativeShift,
-        templateConstEvalNonConstantLiteral,
-        templateConstEvalNonConstantVariableGet,
-        templateConstEvalZeroDivisor;
+import '../fasta_codes.dart' show LocatedMessage;
 
 import '../loader.dart' show Loader;
 
+import 'constant_evaluator.dart' show ErrorReporter;
+
 class KernelConstantErrorReporter extends ErrorReporter {
   final Loader<Library> loader;
-  final TypeEnvironment typeEnvironment;
 
-  KernelConstantErrorReporter(this.loader, this.typeEnvironment);
+  KernelConstantErrorReporter(this.loader);
 
-  String addProblem(TreeNode node, Message message) {
-    int offset = getFileOffset(node);
-    Uri uri = getFileUri(node);
-    loader.addProblem(message, offset, noLength, uri);
-    return loader.target.context.format(
-        message.withLocation(uri, offset, noLength), message.code.severity);
+  @override
+  void report(LocatedMessage message, List<LocatedMessage> context) {
+    loader.addProblem(
+        message.messageObject, message.charOffset, message.length, message.uri,
+        context: context);
   }
 
   @override
-  String freeTypeParameter(
-      List<TreeNode> context, TreeNode node, DartType type) {
-    return addProblem(
-        node, templateConstEvalFreeTypeParameter.withArguments(type));
-  }
-
-  @override
-  String duplicateKey(List<TreeNode> context, TreeNode node, Constant key) {
-    return addProblem(node, templateConstEvalDuplicateKey.withArguments(key));
-  }
-
-  @override
-  String invalidDartType(List<TreeNode> context, TreeNode node,
-      Constant receiver, DartType expectedType) {
-    return addProblem(
-        node,
-        templateConstEvalInvalidType.withArguments(
-            receiver, expectedType, receiver.getType(typeEnvironment)));
-  }
-
-  @override
-  String invalidBinaryOperandType(
-      List<TreeNode> context,
-      TreeNode node,
-      Constant receiver,
-      String op,
-      DartType expectedType,
-      DartType actualType) {
-    return addProblem(
-        node,
-        templateConstEvalInvalidBinaryOperandType.withArguments(
-            op, receiver, expectedType, actualType));
-  }
-
-  @override
-  String invalidMethodInvocation(
-      List<TreeNode> context, TreeNode node, Constant receiver, String op) {
-    return addProblem(node,
-        templateConstEvalInvalidMethodInvocation.withArguments(op, receiver));
-  }
-
-  @override
-  String invalidStaticInvocation(
-      List<TreeNode> context, TreeNode node, Member target) {
-    // TODO(kmillikin) For an invalid factory invocation we should adopt a
-    // better message.  This will show something like:
-    //
-    // "The invocation of 'List' is not allowed within a const context."
-    //
-    // Which is not quite right when the code was "new List()".
-    String name = target.name.toString();
-    if (target is Procedure && target.isFactory) {
-      if (name.isEmpty) {
-        name = target.enclosingClass.name;
-      } else {
-        name = '${target.enclosingClass.name}.${name}';
-      }
-    }
-    return addProblem(
-        node, templateConstEvalInvalidStaticInvocation.withArguments(name));
-  }
-
-  @override
-  String invalidStringInterpolationOperand(
-      List<TreeNode> context, TreeNode node, Constant constant) {
-    return addProblem(
-        node,
-        templateConstEvalInvalidStringInterpolationOperand
-            .withArguments(constant));
-  }
-
-  @override
-  String invalidSymbolName(
-      List<TreeNode> context, TreeNode node, Constant constant) {
-    return addProblem(
-        node, templateConstEvalInvalidSymbolName.withArguments(constant));
-  }
-
-  @override
-  String zeroDivisor(
-      List<TreeNode> context, TreeNode node, IntConstant receiver, String op) {
-    return addProblem(node,
-        templateConstEvalZeroDivisor.withArguments(op, '${receiver.value}'));
-  }
-
-  @override
-  String negativeShift(List<TreeNode> context, TreeNode node,
-      IntConstant receiver, String op, IntConstant argument) {
-    return addProblem(
-        node,
-        templateConstEvalNegativeShift.withArguments(
-            op, '${receiver.value}', '${argument.value}'));
-  }
-
-  @override
-  String nonConstLiteral(List<TreeNode> context, TreeNode node, String klass) {
-    return addProblem(
-        node, templateConstEvalNonConstantLiteral.withArguments(klass));
-  }
-
-  @override
-  String failedAssertion(List<TreeNode> context, TreeNode node, String string) {
-    return addProblem(
-        node,
-        (string == null)
-            ? messageConstEvalFailedAssertion
-            : templateConstEvalFailedAssertionWithMessage
-                .withArguments(string));
-  }
-
-  @override
-  String nonConstantVariableGet(
-      List<TreeNode> context, TreeNode node, String variableName) {
-    return addProblem(node,
-        templateConstEvalNonConstantVariableGet.withArguments(variableName));
-  }
-
-  @override
-  String deferredLibrary(
-      List<TreeNode> context, TreeNode node, String importName) {
-    return addProblem(
-        node, templateConstEvalDeferredLibrary.withArguments(importName));
-  }
-
-  @override
-  String circularity(List<TreeNode> context, TreeNode node) {
-    return addProblem(node, messageConstEvalCircularity);
+  void reportInvalidExpression(InvalidExpression node) {
+    // Assumed to be already reported.
   }
 }
diff --git a/pkg/front_end/lib/src/fasta/kernel/kernel_field_builder.dart b/pkg/front_end/lib/src/fasta/kernel/kernel_field_builder.dart
index 38d5e24..904f47d 100644
--- a/pkg/front_end/lib/src/fasta/kernel/kernel_field_builder.dart
+++ b/pkg/front_end/lib/src/fasta/kernel/kernel_field_builder.dart
@@ -5,22 +5,23 @@
 library fasta.kernel_field_builder;
 
 import 'package:kernel/ast.dart'
-    show DartType, DynamicType, Expression, Field, Name, NullLiteral;
-
-import '../../base/instrumentation.dart'
-    show Instrumentation, InstrumentationValueForType;
+    show Class, DartType, DynamicType, Expression, Field, Name, NullLiteral;
 
 import '../fasta_codes.dart' show messageInternalProblemAlreadyInitialized;
 
 import '../problems.dart' show internalProblem, unsupported;
 
+import '../type_inference/type_inference_engine.dart'
+    show IncludesTypeParametersCovariantly;
+
 import 'kernel_body_builder.dart' show KernelBodyBuilder;
 
 import 'kernel_builder.dart'
     show
+        ClassBuilder,
         Declaration,
-        ImplicitFieldType,
         FieldBuilder,
+        ImplicitFieldType,
         KernelLibraryBuilder,
         KernelTypeBuilder,
         MetadataBuilder;
@@ -58,6 +59,22 @@
     field.name ??= new Name(name, library.target);
     if (type != null) {
       field.type = type.build(library);
+
+      if (!isFinal && !isConst) {
+        IncludesTypeParametersCovariantly needsCheckVisitor;
+        if (parent is ClassBuilder) {
+          Class enclosingClass = parent.target;
+          if (enclosingClass.typeParameters.isNotEmpty) {
+            needsCheckVisitor = new IncludesTypeParametersCovariantly(
+                enclosingClass.typeParameters);
+          }
+        }
+        if (needsCheckVisitor != null) {
+          if (field.type.accept(needsCheckVisitor)) {
+            field.isGenericCovariantImpl = true;
+          }
+        }
+      }
     }
     bool isInstanceMember = !isStatic && !isTopLevel;
     field
@@ -96,13 +113,5 @@
   }
 
   @override
-  void instrumentTopLevelInference(Instrumentation instrumentation) {
-    if (isEligibleForInference) {
-      instrumentation.record(field.fileUri, field.fileOffset, 'topType',
-          new InstrumentationValueForType(field.type));
-    }
-  }
-
-  @override
   DartType get builtType => field.type;
 }
diff --git a/pkg/front_end/lib/src/fasta/kernel/kernel_procedure_builder.dart b/pkg/front_end/lib/src/fasta/kernel/kernel_procedure_builder.dart
index 9dec3ab..2434d09 100644
--- a/pkg/front_end/lib/src/fasta/kernel/kernel_procedure_builder.dart
+++ b/pkg/front_end/lib/src/fasta/kernel/kernel_procedure_builder.dart
@@ -8,6 +8,7 @@
     show
         Arguments,
         AsyncMarker,
+        Class,
         Constructor,
         ConstructorInvocation,
         DartType,
@@ -34,9 +35,6 @@
 
 import 'package:kernel/type_algebra.dart' show containsTypeVariable, substitute;
 
-import '../../base/instrumentation.dart'
-    show Instrumentation, InstrumentationValueForType;
-
 import '../loader.dart' show Loader;
 
 import '../messages.dart'
@@ -56,6 +54,9 @@
 
 import '../source/source_library_builder.dart' show SourceLibraryBuilder;
 
+import '../type_inference/type_inference_engine.dart'
+    show IncludesTypeParametersCovariantly;
+
 import 'kernel_builder.dart'
     show
         ClassBuilder,
@@ -145,15 +146,34 @@
   FunctionNode buildFunction(LibraryBuilder library) {
     assert(function == null);
     FunctionNode result = new FunctionNode(body, asyncMarker: asyncModifier);
+    IncludesTypeParametersCovariantly needsCheckVisitor;
+    if (!isConstructor && !isFactory && parent is ClassBuilder) {
+      Class enclosingClass = parent.target;
+      if (enclosingClass.typeParameters.isNotEmpty) {
+        needsCheckVisitor = new IncludesTypeParametersCovariantly(
+            enclosingClass.typeParameters);
+      }
+    }
     if (typeVariables != null) {
       for (KernelTypeVariableBuilder t in typeVariables) {
-        result.typeParameters.add(t.parameter);
+        TypeParameter parameter = t.parameter;
+        result.typeParameters.add(parameter);
+        if (needsCheckVisitor != null) {
+          if (parameter.bound.accept(needsCheckVisitor)) {
+            parameter.isGenericCovariantImpl = true;
+          }
+        }
       }
       setParents(result.typeParameters, result);
     }
     if (formals != null) {
       for (KernelFormalParameterBuilder formal in formals) {
         VariableDeclaration parameter = formal.build(library, 0);
+        if (needsCheckVisitor != null) {
+          if (parameter.type.accept(needsCheckVisitor)) {
+            parameter.isGenericCovariantImpl = true;
+          }
+        }
         if (formal.isNamed) {
           result.namedParameters.add(parameter);
         } else {
@@ -344,26 +364,6 @@
   Procedure get target => origin.procedure;
 
   @override
-  void instrumentTopLevelInference(Instrumentation instrumentation) {
-    bool isEligibleForTopLevelInference = this.isEligibleForTopLevelInference;
-    if ((isEligibleForTopLevelInference || isSetter) && returnType == null) {
-      instrumentation.record(procedure.fileUri, procedure.fileOffset, 'topType',
-          new InstrumentationValueForType(procedure.function.returnType));
-    }
-    if (isEligibleForTopLevelInference) {
-      if (formals != null) {
-        for (var formal in formals) {
-          if (formal.type == null) {
-            VariableDeclaration formalTarget = formal.target;
-            instrumentation.record(procedure.fileUri, formalTarget.fileOffset,
-                'topType', new InstrumentationValueForType(formalTarget.type));
-          }
-        }
-      }
-    }
-  }
-
-  @override
   int finishPatch() {
     if (!isPatch) return 0;
 
@@ -566,7 +566,7 @@
 
     origin.constructor.isExternal = constructor.isExternal;
     origin.constructor.function = constructor.function;
-    origin.constructor.function.parent = constructor.function;
+    origin.constructor.function.parent = origin.constructor;
     origin.constructor.initializers = constructor.initializers;
     setParents(origin.constructor.initializers, origin.constructor);
     return 1;
diff --git a/pkg/front_end/lib/src/fasta/kernel/kernel_shadow_ast.dart b/pkg/front_end/lib/src/fasta/kernel/kernel_shadow_ast.dart
index 56c6840..f89f7ea 100644
--- a/pkg/front_end/lib/src/fasta/kernel/kernel_shadow_ast.dart
+++ b/pkg/front_end/lib/src/fasta/kernel/kernel_shadow_ast.dart
@@ -35,19 +35,18 @@
 
 import '../fasta_codes.dart'
     show
-        LocatedMessage,
         messageCantDisambiguateAmbiguousInformation,
         messageCantDisambiguateNotEnoughInformation,
         messageNonNullAwareSpreadIsNull,
-        messageSpreadElement,
-        messageSpreadMapElement,
         messageSwitchExpressionNotAssignableCause,
         messageVoidExpression,
         noLength,
         templateCantInferTypeDueToCircularity,
+        templateExpectedButGot,
         templateForInLoopElementTypeNotAssignable,
         templateForInLoopTypeNotIterable,
         templateIntegerLiteralIsOutOfRange,
+        templateInvalidAssignment,
         templateSpreadElementTypeMismatch,
         templateSpreadMapEntryElementKeyTypeMismatch,
         templateSpreadMapEntryElementValueTypeMismatch,
@@ -83,7 +82,16 @@
 import 'body_builder.dart' show combineStatements;
 
 import 'collections.dart'
-    show IfElement, SpreadElement, IfMapEntry, SpreadMapEntry;
+    show
+        ControlFlowMapEntry,
+        ForElement,
+        ForInElement,
+        ForInMapEntry,
+        ForMapEntry,
+        IfElement,
+        IfMapEntry,
+        SpreadElement,
+        SpreadMapEntry;
 
 import 'implicit_type_argument.dart' show ImplicitTypeArgument;
 
@@ -301,7 +309,6 @@
         this, _inferenceInfo.gettersAndMethods, _inferenceInfo.builder.library);
     interfaceResolver.finalizeCovariance(
         this, _inferenceInfo.setters, _inferenceInfo.builder.library);
-    interfaceResolver.recordInstrumentation(this);
   }
 
   /// Creates API members for this class.
diff --git a/pkg/front_end/lib/src/fasta/kernel/kernel_target.dart b/pkg/front_end/lib/src/fasta/kernel/kernel_target.dart
index a766167..e2598abc 100644
--- a/pkg/front_end/lib/src/fasta/kernel/kernel_target.dart
+++ b/pkg/front_end/lib/src/fasta/kernel/kernel_target.dart
@@ -43,9 +43,6 @@
 
 import 'package:kernel/type_environment.dart' show TypeEnvironment;
 
-import 'package:kernel/transformations/constants.dart' as constants
-    show transformLibraries;
-
 import '../../api_prototype/file_system.dart' show FileSystem;
 
 import '../compiler_context.dart' show CompilerContext;
@@ -85,6 +82,8 @@
 
 import '../uri_translator.dart' show UriTranslator;
 
+import 'constant_evaluator.dart' as constants show transformLibraries;
+
 import 'kernel_builder.dart'
     show
         ClassBuilder,
@@ -156,8 +155,9 @@
       new SourceLoader(fileSystem, includeComments, this);
 
   void addSourceInformation(
-      Uri uri, List<int> lineStarts, List<int> sourceCode) {
-    uriToSource[uri] = new Source(lineStarts, sourceCode);
+      Uri importUri, Uri fileUri, List<int> lineStarts, List<int> sourceCode) {
+    uriToSource[fileUri] =
+        new Source(lineStarts, sourceCode, importUri, fileUri);
   }
 
   /// Return list of same size as input with possibly translated uris.
@@ -329,8 +329,10 @@
 
     Map<Uri, Source> uriToSource = new Map<Uri, Source>();
     void copySource(Uri uri, Source source) {
-      uriToSource[uri] =
-          excludeSource ? new Source(source.lineStarts, const <int>[]) : source;
+      uriToSource[uri] = excludeSource
+          ? new Source(source.lineStarts, const <int>[], source.importUri,
+              source.fileUri)
+          : source;
     }
 
     this.uriToSource.forEach(copySource);
@@ -559,6 +561,10 @@
     for (String platformLibrary in const [
       "dart:_internal",
       "dart:async",
+      // TODO(askesc): When all backends support set literals, we no longer
+      // need to index dart:collection, as it is only needed for desugaring of
+      // const sets. We can remove it from this list at that time.
+      "dart:collection",
       "dart:core",
       "dart:mirrors"
     ]) {
@@ -709,11 +715,21 @@
         field.initializer = new NullLiteral()..parent = field;
         if (field.isFinal &&
             (cls.constructors.isNotEmpty || cls.isMixinDeclaration)) {
-          builder.library.addProblem(
-              templateFinalFieldNotInitialized.withArguments(field.name.name),
-              field.fileOffset,
-              field.name.name.length,
-              field.fileUri);
+          String uri = '${field.enclosingLibrary.importUri}';
+          String file = field.fileUri.pathSegments.last;
+          if (uri == 'dart:html' ||
+              uri == 'dart:svg' ||
+              uri == 'dart:_native_typed_data' ||
+              uri == 'dart:_interceptors' && file == 'js_string.dart') {
+            // TODO(johnniwinther): Use external getters instead of final
+            // fields. See https://github.com/dart-lang/sdk/issues/33762
+          } else {
+            builder.library.addProblem(
+                templateFinalFieldNotInitialized.withArguments(field.name.name),
+                field.fileOffset,
+                field.name.name.length,
+                field.fileUri);
+          }
         }
       }
     }
@@ -759,8 +775,9 @@
           backendTarget.constantsBackend(loader.coreTypes),
           environmentDefines,
           environment,
-          new KernelConstantErrorReporter(loader, environment),
-          enableAsserts: enableAsserts);
+          new KernelConstantErrorReporter(loader),
+          enableAsserts: enableAsserts,
+          desugarSets: !backendTarget.supportsSetLiterals);
       ticker.logMs("Evaluated constants");
     }
     backendTarget.performModularTransformationsOnLibraries(
diff --git a/pkg/front_end/lib/src/fasta/kernel/transform_collections.dart b/pkg/front_end/lib/src/fasta/kernel/transform_collections.dart
index 1afd831..bbc7186 100644
--- a/pkg/front_end/lib/src/fasta/kernel/transform_collections.dart
+++ b/pkg/front_end/lib/src/fasta/kernel/transform_collections.dart
@@ -9,6 +9,7 @@
 import 'package:kernel/ast.dart'
     show
         Arguments,
+        AsExpression,
         Block,
         BlockExpression,
         Class,
@@ -18,9 +19,9 @@
         ExpressionStatement,
         Field,
         ForInStatement,
+        ForStatement,
         IfStatement,
         InterfaceType,
-        InvalidExpression,
         ListLiteral,
         MapEntry,
         MapLiteral,
@@ -33,15 +34,29 @@
         SetLiteral,
         Statement,
         StaticInvocation,
+        transformList,
         TreeNode,
         VariableDeclaration,
         VariableGet;
 
 import 'package:kernel/core_types.dart' show CoreTypes;
 
+import 'package:kernel/type_environment.dart' show TypeEnvironment;
+
 import 'package:kernel/visitor.dart' show Transformer;
 
-import 'collections.dart' show SpreadElement, SpreadMapEntry;
+import 'collections.dart'
+    show
+        ControlFlowElement,
+        ControlFlowMapEntry,
+        ForElement,
+        ForInElement,
+        ForInMapEntry,
+        ForMapEntry,
+        IfElement,
+        IfMapEntry,
+        SpreadElement,
+        SpreadMapEntry;
 
 import '../source/source_loader.dart' show SourceLoader;
 
@@ -49,6 +64,7 @@
 
 class CollectionTransformer extends Transformer {
   final CoreTypes coreTypes;
+  final TypeEnvironment typeEnvironment;
   final Procedure listAdd;
   final Procedure setFactory;
   final Procedure setAdd;
@@ -67,6 +83,7 @@
 
   CollectionTransformer(SourceLoader loader)
       : coreTypes = loader.coreTypes,
+        typeEnvironment = loader.typeInferenceEngine.typeSchemaEnvironment,
         listAdd = loader.coreTypes.index.getMember('dart:core', 'List', 'add'),
         setFactory = _findSetFactory(loader.coreTypes),
         setAdd = loader.coreTypes.index.getMember('dart:core', 'Set', 'add'),
@@ -84,33 +101,17 @@
 
   TreeNode _translateListOrSet(
       Expression node, DartType elementType, List<Expression> elements,
-      {bool isSet: false, bool isConst: false}) {
-    // Translate elements in place up to the first spread if any.
+      {bool isSet: false}) {
+    // Translate elements in place up to the first non-expression, if any.
     int i = 0;
     for (; i < elements.length; ++i) {
-      if (elements[i] is SpreadElement) break;
+      if (elements[i] is ControlFlowElement) break;
       elements[i] = elements[i].accept(this)..parent = node;
     }
 
-    // If there was no spread, we are done.
+    // If there were only expressions, we are done.
     if (i == elements.length) return node;
 
-    if (isConst) {
-      // We don't desugar const lists here.  Remove spread for now so that they
-      // don't leak out.
-      for (; i < elements.length; ++i) {
-        Expression element = elements[i];
-        if (element is SpreadElement) {
-          elements[i] = InvalidExpression('unimplemented spread element')
-            ..fileOffset = element.fileOffset
-            ..parent = node;
-        } else {
-          elements[i] = element.accept(this)..parent = node;
-        }
-      }
-      return node;
-    }
-
     // Build a block expression and create an empty list or set.
     VariableDeclaration result;
     if (isSet) {
@@ -128,165 +129,354 @@
           isFinal: true);
     }
     List<Statement> body = [result];
-    // Add the elements up to the first spread.
+    // Add the elements up to the first non-expression.
     for (int j = 0; j < i; ++j) {
-      body.add(new ExpressionStatement(new MethodInvocation(
-          new VariableGet(result),
-          new Name('add'),
-          new Arguments([elements[j]]),
-          isSet ? setAdd : listAdd)));
+      _addExpressionElement(elements[j], isSet, result, body);
     }
-    // Translate the elements starting with the first spread.
+    // Translate the elements starting with the first non-expression.
     for (; i < elements.length; ++i) {
-      Expression element = elements[i];
-      if (element is SpreadElement) {
-        Expression value = element.expression.accept(this);
-        // Null-aware spreads require testing the subexpression's value.
-        VariableDeclaration temp;
-        if (element.isNullAware) {
-          temp = new VariableDeclaration.forValue(value,
-              type: const DynamicType(), isFinal: true);
-          body.add(temp);
-          value = new VariableGet(temp);
-        }
-
-        VariableDeclaration elt =
-            new VariableDeclaration(null, type: elementType, isFinal: true);
-        Statement statement = new ForInStatement(
-            elt,
-            value,
-            new ExpressionStatement(new MethodInvocation(
-                new VariableGet(result),
-                new Name('add'),
-                new Arguments([new VariableGet(elt)]),
-                isSet ? setAdd : listAdd)));
-
-        if (element.isNullAware) {
-          statement = new IfStatement(
-              new Not(new MethodInvocation(
-                  new VariableGet(temp),
-                  new Name('=='),
-                  new Arguments([new NullLiteral()]),
-                  objectEquals)),
-              statement,
-              null);
-        }
-        body.add(statement);
-      } else {
-        body.add(new ExpressionStatement(new MethodInvocation(
-            new VariableGet(result),
-            new Name('add'),
-            new Arguments([element.accept(this)]),
-            isSet ? setAdd : listAdd)));
-      }
+      _translateElement(elements[i], elementType, isSet, result, body);
     }
 
     return new BlockExpression(new Block(body), new VariableGet(result));
   }
 
+  void _translateElement(Expression element, DartType elementType, bool isSet,
+      VariableDeclaration result, List<Statement> body) {
+    if (element is SpreadElement) {
+      _translateSpreadElement(element, elementType, isSet, result, body);
+    } else if (element is IfElement) {
+      _translateIfElement(element, elementType, isSet, result, body);
+    } else if (element is ForElement) {
+      _translateForElement(element, elementType, isSet, result, body);
+    } else if (element is ForInElement) {
+      _translateForInElement(element, elementType, isSet, result, body);
+    } else {
+      _addExpressionElement(element.accept(this), isSet, result, body);
+    }
+  }
+
+  void _addExpressionElement(Expression element, bool isSet,
+      VariableDeclaration result, List<Statement> body) {
+    body.add(new ExpressionStatement(new MethodInvocation(
+        new VariableGet(result),
+        new Name('add'),
+        new Arguments([element]),
+        isSet ? setAdd : listAdd)));
+  }
+
+  void _translateIfElement(IfElement element, DartType elementType, bool isSet,
+      VariableDeclaration result, List<Statement> body) {
+    List<Statement> thenStatements = [];
+    _translateElement(element.then, elementType, isSet, result, thenStatements);
+    List<Statement> elseStatements;
+    if (element.otherwise != null) {
+      _translateElement(element.otherwise, elementType, isSet, result,
+          elseStatements = <Statement>[]);
+    }
+    Statement thenBody = thenStatements.length == 1
+        ? thenStatements.first
+        : new Block(thenStatements);
+    Statement elseBody;
+    if (elseStatements != null && elseStatements.isNotEmpty) {
+      elseBody = elseStatements.length == 1
+          ? elseStatements.first
+          : new Block(elseStatements);
+    }
+    body.add(new IfStatement(element.condition.accept(this), thenBody, elseBody)
+      ..fileOffset = element.fileOffset);
+  }
+
+  void _translateForElement(ForElement element, DartType elementType,
+      bool isSet, VariableDeclaration result, List<Statement> body) {
+    List<Statement> statements = <Statement>[];
+    _translateElement(element.body, elementType, isSet, result, statements);
+    Statement loopBody =
+        statements.length == 1 ? statements.first : new Block(statements);
+    ForStatement loop = new ForStatement(element.variables,
+        element.condition?.accept(this), element.updates, loopBody)
+      ..fileOffset = element.fileOffset;
+    transformList(loop.variables, this, loop);
+    transformList(loop.updates, this, loop);
+    body.add(loop);
+  }
+
+  void _translateForInElement(ForInElement element, DartType elementType,
+      bool isSet, VariableDeclaration result, List<Statement> body) {
+    List<Statement> statements;
+    Statement prologue = element.prologue;
+    if (prologue == null) {
+      statements = <Statement>[];
+    } else {
+      prologue = prologue.accept(this);
+      statements =
+          prologue is Block ? prologue.statements : <Statement>[prologue];
+    }
+    _translateElement(element.body, elementType, isSet, result, statements);
+    Statement loopBody =
+        statements.length == 1 ? statements.first : new Block(statements);
+    if (element.problem != null) {
+      body.add(new ExpressionStatement(element.problem.accept(this)));
+    }
+    body.add(new ForInStatement(
+        element.variable, element.iterable.accept(this), loopBody,
+        isAsync: element.isAsync)
+      ..fileOffset = element.fileOffset);
+  }
+
+  void _translateSpreadElement(SpreadElement element, DartType elementType,
+      bool isSet, VariableDeclaration result, List<Statement> body) {
+    Expression value = element.expression.accept(this);
+    // Null-aware spreads require testing the subexpression's value.
+    VariableDeclaration temp;
+    if (element.isNullAware) {
+      temp = new VariableDeclaration.forValue(value,
+          type: const DynamicType(), isFinal: true);
+      body.add(temp);
+      value = new VariableGet(temp);
+    }
+
+    VariableDeclaration elt;
+    Statement loopBody;
+    if (element.elementType == null ||
+        !typeEnvironment.isSubtypeOf(element.elementType, elementType)) {
+      elt = new VariableDeclaration(null,
+          type: const DynamicType(), isFinal: true);
+      VariableDeclaration castedVar = new VariableDeclaration.forValue(
+          new AsExpression(new VariableGet(elt), elementType)
+            ..isTypeError = true
+            ..fileOffset = element.expression.fileOffset,
+          type: elementType);
+      loopBody = new Block(<Statement>[
+        castedVar,
+        new ExpressionStatement(new MethodInvocation(
+            new VariableGet(result),
+            new Name('add'),
+            new Arguments([new VariableGet(castedVar)]),
+            isSet ? setAdd : listAdd))
+      ]);
+    } else {
+      elt = new VariableDeclaration(null, type: elementType, isFinal: true);
+      loopBody = new ExpressionStatement(new MethodInvocation(
+          new VariableGet(result),
+          new Name('add'),
+          new Arguments([new VariableGet(elt)]),
+          isSet ? setAdd : listAdd));
+    }
+    Statement statement = new ForInStatement(elt, value, loopBody);
+
+    if (element.isNullAware) {
+      statement = new IfStatement(
+          new Not(new MethodInvocation(new VariableGet(temp), new Name('=='),
+              new Arguments([new NullLiteral()]), objectEquals)),
+          statement,
+          null);
+    }
+    body.add(statement);
+  }
+
   @override
   TreeNode visitListLiteral(ListLiteral node) {
+    // Const collections are handled by the constant evaluator.
+    if (node.isConst) return node;
+
     return _translateListOrSet(node, node.typeArgument, node.expressions,
-        isConst: node.isConst, isSet: false);
+        isSet: false);
   }
 
   @override
   TreeNode visitSetLiteral(SetLiteral node) {
+    // Const collections are handled by the constant evaluator.
+    if (node.isConst) return node;
+
     return _translateListOrSet(node, node.typeArgument, node.expressions,
-        isConst: node.isConst, isSet: true);
+        isSet: true);
   }
 
   @override
   TreeNode visitMapLiteral(MapLiteral node) {
+    // Const collections are handled by the constant evaluator.
+    if (node.isConst) return node;
+
+    // Translate entries in place up to the first control-flow entry, if any.
     int i = 0;
     for (; i < node.entries.length; ++i) {
-      if (node.entries[i] is SpreadMapEntry) break;
+      if (node.entries[i] is ControlFlowMapEntry) break;
       node.entries[i] = node.entries[i].accept(this)..parent = node;
     }
 
+    // If there were no control-flow entries we are done.
     if (i == node.entries.length) return node;
 
-    if (node.isConst) {
-      // We don't desugar const maps here.  REmove spread for now so that they
-      // don't leak out.
-      for (; i < node.entries.length; ++i) {
-        MapEntry entry = node.entries[i];
-        if (entry is SpreadMapEntry) {
-          entry.parent.replaceChild(
-              entry,
-              new MapEntry(
-                  InvalidExpression('unimplemented spread element')
-                    ..fileOffset = entry.fileOffset,
-                  new NullLiteral()));
-        }
-      }
-    }
-
-    VariableDeclaration map = new VariableDeclaration.forValue(
+    // Build a block expression and create an empty map.
+    VariableDeclaration result = new VariableDeclaration.forValue(
         new MapLiteral([], keyType: node.keyType, valueType: node.valueType),
         type: new InterfaceType(
             coreTypes.mapClass, [node.keyType, node.valueType]),
         isFinal: true);
-    List<Statement> body = [map];
+    List<Statement> body = [result];
+    // Add all the entries up to the first control-flow entry.
     for (int j = 0; j < i; ++j) {
-      body.add(new ExpressionStatement(new MethodInvocation(
-          new VariableGet(map),
-          new Name('[]='),
-          new Arguments([node.entries[j].key, node.entries[j].value]),
-          mapPut)));
+      _addNormalEntry(node.entries[j], result, body);
     }
-    DartType mapEntryType =
-        new InterfaceType(mapEntryClass, [node.keyType, node.valueType]);
     for (; i < node.entries.length; ++i) {
-      MapEntry entry = node.entries[i];
-      if (entry is SpreadMapEntry) {
-        Expression value = entry.expression.accept(this);
-        // Null-aware spreads require testing the subexpression's value.
-        VariableDeclaration temp;
-        if (entry.isNullAware) {
-          temp = new VariableDeclaration.forValue(value,
-              type: coreTypes.mapClass.rawType);
-          body.add(temp);
-          value = new VariableGet(temp);
-        }
-
-        VariableDeclaration elt =
-            new VariableDeclaration(null, type: mapEntryType, isFinal: true);
-        Statement statement = new ForInStatement(
-            elt,
-            new PropertyGet(value, new Name('entries'), mapEntries),
-            new ExpressionStatement(new MethodInvocation(
-                new VariableGet(map),
-                new Name('[]='),
-                new Arguments([
-                  new PropertyGet(
-                      new VariableGet(elt), new Name('key'), mapEntryKey),
-                  new PropertyGet(
-                      new VariableGet(elt), new Name('value'), mapEntryValue)
-                ]),
-                mapPut)));
-
-        if (entry.isNullAware) {
-          statement = new IfStatement(
-              new Not(new MethodInvocation(
-                  new VariableGet(temp),
-                  new Name('=='),
-                  new Arguments([new NullLiteral()]),
-                  objectEquals)),
-              statement,
-              null);
-        }
-        body.add(statement);
-      } else {
-        entry = entry.accept(this);
-        body.add(new ExpressionStatement(new MethodInvocation(
-            new VariableGet(map),
-            new Name('[]='),
-            new Arguments([entry.key, entry.value]),
-            mapPut)));
-      }
+      _translateEntry(
+          node.entries[i], node.keyType, node.valueType, result, body);
     }
 
-    return new BlockExpression(new Block(body), new VariableGet(map));
+    return new BlockExpression(new Block(body), new VariableGet(result));
+  }
+
+  void _translateEntry(MapEntry entry, DartType keyType, DartType valueType,
+      VariableDeclaration result, List<Statement> body) {
+    if (entry is SpreadMapEntry) {
+      _translateSpreadEntry(entry, keyType, valueType, result, body);
+    } else if (entry is IfMapEntry) {
+      _translateIfEntry(entry, keyType, valueType, result, body);
+    } else if (entry is ForMapEntry) {
+      _translateForEntry(entry, keyType, valueType, result, body);
+    } else if (entry is ForInMapEntry) {
+      _translateForInEntry(entry, keyType, valueType, result, body);
+    } else {
+      _addNormalEntry(entry.accept(this), result, body);
+    }
+  }
+
+  void _addNormalEntry(
+      MapEntry entry, VariableDeclaration result, List<Statement> body) {
+    body.add(new ExpressionStatement(new MethodInvocation(
+        new VariableGet(result),
+        new Name('[]='),
+        new Arguments([entry.key, entry.value]),
+        mapPut)));
+  }
+
+  void _translateIfEntry(IfMapEntry entry, DartType keyType, DartType valueType,
+      VariableDeclaration result, List<Statement> body) {
+    List<Statement> thenBody = [];
+    _translateEntry(entry.then, keyType, valueType, result, thenBody);
+    List<Statement> elseBody;
+    if (entry.otherwise != null) {
+      _translateEntry(entry.otherwise, keyType, valueType, result,
+          elseBody = <Statement>[]);
+    }
+    Statement thenStatement =
+        thenBody.length == 1 ? thenBody.first : new Block(thenBody);
+    Statement elseStatement;
+    if (elseBody != null && elseBody.isNotEmpty) {
+      elseStatement =
+          elseBody.length == 1 ? elseBody.first : new Block(elseBody);
+    }
+    body.add(new IfStatement(
+        entry.condition.accept(this), thenStatement, elseStatement));
+  }
+
+  void _translateForEntry(ForMapEntry entry, DartType keyType,
+      DartType valueType, VariableDeclaration result, List<Statement> body) {
+    List<Statement> statements = <Statement>[];
+    _translateEntry(entry.body, keyType, valueType, result, statements);
+    Statement loopBody =
+        statements.length == 1 ? statements.first : new Block(statements);
+    ForStatement loop = new ForStatement(
+        entry.variables, entry.condition?.accept(this), entry.updates, loopBody)
+      ..fileOffset = entry.fileOffset;
+    transformList(loop.variables, this, loop);
+    transformList(loop.updates, this, loop);
+    body.add(loop);
+  }
+
+  void _translateForInEntry(ForInMapEntry entry, DartType keyType,
+      DartType valueType, VariableDeclaration result, List<Statement> body) {
+    List<Statement> statements;
+    Statement prologue = entry.prologue;
+    if (prologue == null) {
+      statements = <Statement>[];
+    } else {
+      prologue = prologue.accept(this);
+      statements =
+          prologue is Block ? prologue.statements : <Statement>[prologue];
+    }
+    _translateEntry(entry.body, keyType, valueType, result, statements);
+    Statement loopBody =
+        statements.length == 1 ? statements.first : new Block(statements);
+    if (entry.problem != null) {
+      body.add(new ExpressionStatement(entry.problem.accept(this)));
+    }
+    body.add(new ForInStatement(
+        entry.variable, entry.iterable.accept(this), loopBody,
+        isAsync: entry.isAsync)
+      ..fileOffset = entry.fileOffset);
+  }
+
+  void _translateSpreadEntry(SpreadMapEntry entry, DartType keyType,
+      DartType valueType, VariableDeclaration result, List<Statement> body) {
+    Expression value = entry.expression.accept(this);
+    // Null-aware spreads require testing the subexpression's value.
+    VariableDeclaration temp;
+    if (entry.isNullAware) {
+      temp = new VariableDeclaration.forValue(value,
+          type: coreTypes.mapClass.rawType);
+      body.add(temp);
+      value = new VariableGet(temp);
+    }
+
+    DartType entryType =
+        new InterfaceType(mapEntryClass, <DartType>[keyType, valueType]);
+    VariableDeclaration elt;
+    Statement loopBody;
+    if (entry.entryType == null ||
+        !typeEnvironment.isSubtypeOf(entry.entryType, entryType)) {
+      elt = new VariableDeclaration(null,
+          type: new InterfaceType(mapEntryClass,
+              <DartType>[const DynamicType(), const DynamicType()]),
+          isFinal: true);
+      VariableDeclaration keyVar = new VariableDeclaration.forValue(
+          new AsExpression(
+              new PropertyGet(
+                  new VariableGet(elt), new Name('key'), mapEntryKey),
+              keyType)
+            ..isTypeError = true
+            ..fileOffset = entry.expression.fileOffset,
+          type: keyType);
+      VariableDeclaration valueVar = new VariableDeclaration.forValue(
+          new AsExpression(
+              new PropertyGet(
+                  new VariableGet(elt), new Name('value'), mapEntryValue),
+              valueType)
+            ..isTypeError = true
+            ..fileOffset = entry.expression.fileOffset,
+          type: valueType);
+      loopBody = new Block(<Statement>[
+        keyVar,
+        valueVar,
+        new ExpressionStatement(new MethodInvocation(
+            new VariableGet(result),
+            new Name('[]='),
+            new Arguments([new VariableGet(keyVar), new VariableGet(valueVar)]),
+            mapPut))
+      ]);
+    } else {
+      elt = new VariableDeclaration(null, type: entryType, isFinal: true);
+      loopBody = new ExpressionStatement(new MethodInvocation(
+          new VariableGet(result),
+          new Name('[]='),
+          new Arguments([
+            new PropertyGet(new VariableGet(elt), new Name('key'), mapEntryKey),
+            new PropertyGet(
+                new VariableGet(elt), new Name('value'), mapEntryValue)
+          ]),
+          mapPut));
+    }
+    Statement statement = new ForInStatement(
+        elt, new PropertyGet(value, new Name('entries'), mapEntries), loopBody);
+
+    if (entry.isNullAware) {
+      statement = new IfStatement(
+          new Not(new MethodInvocation(new VariableGet(temp), new Name('=='),
+              new Arguments([new NullLiteral()]), objectEquals)),
+          statement,
+          null);
+    }
+    body.add(statement);
   }
 }
diff --git a/pkg/front_end/lib/src/fasta/kernel/transform_set_literals.dart b/pkg/front_end/lib/src/fasta/kernel/transform_set_literals.dart
index abc2f4d..3480b2b 100644
--- a/pkg/front_end/lib/src/fasta/kernel/transform_set_literals.dart
+++ b/pkg/front_end/lib/src/fasta/kernel/transform_set_literals.dart
@@ -44,6 +44,7 @@
   final Procedure setFactory;
   final Procedure addMethod;
   final Constructor unmodifiableSetConstructor;
+  final bool transformConst;
 
   static Procedure _findSetFactory(CoreTypes coreTypes) {
     Procedure factory = coreTypes.index.getMember('dart:core', 'Set', '');
@@ -76,7 +77,7 @@
     return null;
   }
 
-  SetLiteralTransformer(SourceLoader loader)
+  SetLiteralTransformer(SourceLoader loader, {this.transformConst: true})
       : coreTypes = loader.coreTypes,
         nullType = new InterfaceType(loader.coreTypes.nullClass, []),
         setFactory = _findSetFactory(loader.coreTypes),
@@ -85,6 +86,7 @@
 
   TreeNode visitSetLiteral(SetLiteral node) {
     if (node.isConst) {
+      if (!transformConst) return node;
       List<MapEntry> entries = new List<MapEntry>(node.expressions.length);
       for (int i = 0; i < node.expressions.length; i++) {
         // expression_i: null
diff --git a/pkg/front_end/lib/src/fasta/kernel/utils.dart b/pkg/front_end/lib/src/fasta/kernel/utils.dart
index ac98334..1b96164 100644
--- a/pkg/front_end/lib/src/fasta/kernel/utils.dart
+++ b/pkg/front_end/lib/src/fasta/kernel/utils.dart
@@ -60,12 +60,12 @@
 
 /// Serialize the libraries in [component] that match [filter].
 List<int> serializeComponent(Component component,
-    {bool filter(Library library), bool excludeUriToSource: false}) {
+    {bool filter(Library library), bool includeSources: true}) {
   ByteSink byteSink = new ByteSink();
-  BinaryPrinter printer = filter == null && !excludeUriToSource
-      ? new BinaryPrinter(byteSink)
+  BinaryPrinter printer = filter == null
+      ? new BinaryPrinter(byteSink, includeSources: includeSources)
       : new LimitedBinaryPrinter(
-          byteSink, filter ?? (_) => true, excludeUriToSource);
+          byteSink, filter ?? (_) => true, !includeSources);
   printer.writeComponentFile(component);
   return byteSink.builder.takeBytes();
 }
diff --git a/pkg/front_end/lib/src/fasta/loader.dart b/pkg/front_end/lib/src/fasta/loader.dart
index da5a124..67b5cb2 100644
--- a/pkg/front_end/lib/src/fasta/loader.dart
+++ b/pkg/front_end/lib/src/fasta/loader.dart
@@ -170,6 +170,10 @@
   void ensureCoreLibrary() {
     if (coreLibrary == null) {
       read(Uri.parse("dart:core"), 0, accessor: first);
+      // TODO(askesc): When all backends support set literals, we no longer
+      // need to index dart:collection, as it is only needed for desugaring of
+      // const sets. We can remove it from this list at that time.
+      read(Uri.parse("dart:collection"), 0, accessor: first);
       assert(coreLibrary != null);
     }
   }
@@ -275,8 +279,6 @@
     target.context.report(
         message.withLocation(fileUri, charOffset, length), severity,
         context: context);
-    recordMessage(severity, message, charOffset, length, fileUri,
-        context: context);
     if (severity == Severity.error) {
       (wasHandled ? handledErrors : unhandledErrors)
           .add(message.withLocation(fileUri, charOffset, length));
@@ -301,10 +303,6 @@
 
   Declaration getNativeAnnotation() => target.getNativeAnnotation(this);
 
-  void recordMessage(Severity severity, Message message, int charOffset,
-      int length, Uri fileUri,
-      {List<LocatedMessage> context}) {}
-
   ClassBuilder<TypeBuilder, Object> computeClassBuilderFromTargetClass(
       covariant Object cls);
 
diff --git a/pkg/front_end/lib/src/fasta/names.dart b/pkg/front_end/lib/src/fasta/names.dart
index ab5b774..421d4be 100644
--- a/pkg/front_end/lib/src/fasta/names.dart
+++ b/pkg/front_end/lib/src/fasta/names.dart
@@ -60,6 +60,8 @@
 
 final Name rightShiftName = new Name(">>");
 
+final Name tripleShiftName = new Name(">>>");
+
 final Name tildeName = new Name("~");
 
 final Name unaryMinusName = new Name("unary-");
diff --git a/pkg/front_end/lib/src/fasta/operator.dart b/pkg/front_end/lib/src/fasta/operator.dart
index dad4440..1617a5a 100644
--- a/pkg/front_end/lib/src/fasta/operator.dart
+++ b/pkg/front_end/lib/src/fasta/operator.dart
@@ -25,6 +25,7 @@
   modulo,
   multiply,
   rightShift,
+  tripleShift,
   subtract,
   truncatingDivide,
   unaryMinus,
@@ -48,6 +49,7 @@
   if (identical("%", string)) return Operator.modulo;
   if (identical("*", string)) return Operator.multiply;
   if (identical(">>", string)) return Operator.rightShift;
+  if (identical(">>>", string)) return Operator.tripleShift;
   if (identical("-", string)) return Operator.subtract;
   if (identical("~/", string)) return Operator.truncatingDivide;
   if (identical("unary-", string)) return Operator.unaryMinus;
@@ -90,6 +92,8 @@
       return "*";
     case Operator.rightShift:
       return ">>";
+    case Operator.tripleShift:
+      return ">>>";
     case Operator.subtract:
       return "-";
     case Operator.truncatingDivide:
@@ -121,6 +125,7 @@
     case Operator.modulo:
     case Operator.multiply:
     case Operator.rightShift:
+    case Operator.tripleShift:
     case Operator.subtract:
     case Operator.truncatingDivide:
       return 1;
diff --git a/pkg/front_end/lib/src/fasta/parser/forwarding_listener.dart b/pkg/front_end/lib/src/fasta/parser/forwarding_listener.dart
index 10f0a20..ed8f7b2 100644
--- a/pkg/front_end/lib/src/fasta/parser/forwarding_listener.dart
+++ b/pkg/front_end/lib/src/fasta/parser/forwarding_listener.dart
@@ -1027,6 +1027,11 @@
   }
 
   @override
+  void handleErrorToken(ErrorToken token) {
+    listener?.handleErrorToken(token);
+  }
+
+  @override
   void handleExpressionFunctionBody(Token arrowToken, Token endToken) {
     listener?.handleExpressionFunctionBody(arrowToken, endToken);
   }
diff --git a/pkg/front_end/lib/src/fasta/parser/listener.dart b/pkg/front_end/lib/src/fasta/parser/listener.dart
index 5dc7b63..8a24cdf 100644
--- a/pkg/front_end/lib/src/fasta/parser/listener.dart
+++ b/pkg/front_end/lib/src/fasta/parser/listener.dart
@@ -10,6 +10,8 @@
 
 import '../quote.dart' show UnescapeErrorListener;
 
+import '../scanner/error_token.dart' show ErrorToken;
+
 import 'assert.dart' show Assert;
 
 import 'formal_parameter_kind.dart' show FormalParameterKind;
@@ -1115,7 +1117,9 @@
 
   /// Called before parsing the `else` portion of an `if` control flow list,
   /// set, or map entry.
-  void handleElseControlFlow(Token elseToken) {}
+  void handleElseControlFlow(Token elseToken) {
+    logEvent("ElseControlFlow");
+  }
 
   /// Called after parsing an `if` control flow list, set, or map entry.
   /// Substructures:
@@ -1371,6 +1375,14 @@
   void handleRecoverableError(
       Message message, Token startToken, Token endToken) {}
 
+  /// The parser encountered an [ErrorToken] representing an error
+  /// from the scanner but recovered from it. By default, the error is reported
+  /// by calling [handleRecoverableError] with the message associated
+  /// with the error [token].
+  void handleErrorToken(ErrorToken token) {
+    handleRecoverableError(token.assertionMessage, token, token);
+  }
+
   @override
   void handleUnescapeError(
       Message message, Token location, int stringOffset, int length) {
diff --git a/pkg/front_end/lib/src/fasta/parser/parser.dart b/pkg/front_end/lib/src/fasta/parser/parser.dart
index 774daef..6ec8e5a 100644
--- a/pkg/front_end/lib/src/fasta/parser/parser.dart
+++ b/pkg/front_end/lib/src/fasta/parser/parser.dart
@@ -258,11 +258,6 @@
 /// doesn't matter how we got there, only that we've identified that it's
 /// easier if the parser reports as many errors it can, but informs the
 /// listener if the error is recoverable or not.
-///
-/// Currently, the parser is particularly lax when it comes to the order of
-/// modifiers such as `abstract`, `final`, `static`, etc. Historically, dart2js
-/// would handle such errors in later phases. We hope that these cases will go
-/// away as Fasta matures.
 class Parser {
   Listener listener;
 
@@ -3824,13 +3819,12 @@
             listener.handleUnaryPostfixAssignmentExpression(token.next);
             token = next;
           }
-        } else if (identical(tokenLevel, PREFIX_PRECEDENCE)) {
+        } else if (identical(tokenLevel, PREFIX_PRECEDENCE) &&
+            (identical(type, TokenType.BANG))) {
           // The '!' has prefix precedence but here it's being used as a
           // postfix operator to assert the expression has a non-null value.
-          if ((identical(type, TokenType.BANG))) {
-            listener.handleNonNullAssertExpression(token.next);
-            token = next;
-          }
+          listener.handleNonNullAssertExpression(token.next);
+          token = next;
         } else if (identical(tokenLevel, SELECTOR_PRECEDENCE)) {
           if (identical(type, TokenType.PERIOD) ||
               identical(type, TokenType.QUESTION_PERIOD)) {
@@ -6182,7 +6176,7 @@
   }
 
   void reportErrorToken(ErrorToken token) {
-    listener.handleRecoverableError(token.assertionMessage, token, token);
+    listener.handleErrorToken(token);
   }
 
   Token parseInvalidTopLevelDeclaration(Token token) {
diff --git a/pkg/front_end/lib/src/fasta/parser/type_info.dart b/pkg/front_end/lib/src/fasta/parser/type_info.dart
index 8214825..cf59846 100644
--- a/pkg/front_end/lib/src/fasta/parser/type_info.dart
+++ b/pkg/front_end/lib/src/fasta/parser/type_info.dart
@@ -34,26 +34,26 @@
   /// This function will call the appropriate event methods on the [Parser]'s
   /// listener to handle the type, inserting a synthetic type reference if
   /// necessary. This may modify the token stream when parsing `>>` or `>>>`
-  /// in valid code or during recovery.
+  /// or `>>>=` in valid code or during recovery.
   Token ensureTypeNotVoid(Token token, Parser parser);
 
   /// Call this function when the token after [token] must be a type or void.
   /// This function will call the appropriate event methods on the [Parser]'s
   /// listener to handle the type, inserting a synthetic type reference if
   /// necessary. This may modify the token stream when parsing `>>` or `>>>`
-  /// in valid code or during recovery.
+  /// or `>>>=` in valid code or during recovery.
   Token ensureTypeOrVoid(Token token, Parser parser);
 
   /// Call this function to parse an optional type (not void) after [token].
   /// This function will call the appropriate event methods on the [Parser]'s
   /// listener to handle the type. This may modify the token stream
-  /// when parsing `>>` or `>>>` in valid code or during recovery.
+  /// when parsing `>>` or `>>>` or `>>>=`  in valid code or during recovery.
   Token parseTypeNotVoid(Token token, Parser parser);
 
   /// Call this function to parse an optional type or void after [token].
   /// This function will call the appropriate event methods on the [Parser]'s
   /// listener to handle the type. This may modify the token stream
-  /// when parsing `>>` or `>>>` in valid code or during recovery.
+  /// when parsing `>>` or `>>>` or `>>>=` in valid code or during recovery.
   Token parseType(Token token, Parser parser);
 
   /// Call this function with the [token] before the type to obtain
@@ -83,14 +83,14 @@
   /// Call this function to parse optional type arguments after [token].
   /// This function will call the appropriate event methods on the [Parser]'s
   /// listener to handle the arguments. This may modify the token stream
-  /// when parsing `>>` or `>>>` in valid code or during recovery.
+  /// when parsing `>>` or `>>>` or `>>>=` in valid code or during recovery.
   Token parseArguments(Token token, Parser parser);
 
   /// Call this function to parse optional type parameters
   /// (also known as type variables) after [token].
   /// This function will call the appropriate event methods on the [Parser]'s
   /// listener to handle the parameters. This may modify the token stream
-  /// when parsing `>>` or `>>>` in valid code or during recovery.
+  /// when parsing `>>` or `>>>` or `>>>=` in valid code or during recovery.
   Token parseVariables(Token token, Parser parser);
 
   /// Call this function with the [token] before the type var to obtain
diff --git a/pkg/front_end/lib/src/fasta/parser/type_info_impl.dart b/pkg/front_end/lib/src/fasta/parser/type_info_impl.dart
index 6d670a1..b6d698e 100644
--- a/pkg/front_end/lib/src/fasta/parser/type_info_impl.dart
+++ b/pkg/front_end/lib/src/fasta/parser/type_info_impl.dart
@@ -31,6 +31,7 @@
         splitGtEq,
         splitGtFromGtGtEq,
         splitGtFromGtGtGt,
+        splitGtFromGtGtGtEq,
         splitGtGt,
         syntheticGt;
 
@@ -1163,17 +1164,18 @@
   }
 }
 
-/// Return `true` if [token] is one of `>`, `>>`, `>=`, `>>>`, or `>>=`.
+/// Return `true` if [token] is one of `>`, `>>`, `>>>`, `>=`, `>>=`, or `>>>=`.
 bool isCloser(Token token) {
   final value = token.stringValue;
   return identical(value, '>') ||
       identical(value, '>>') ||
       identical(value, '>=') ||
       identical(value, '>>>') ||
-      identical(value, '>>=');
+      identical(value, '>>=') ||
+      identical(value, '>>>=');
 }
 
-/// If [beforeCloser].next is one of `>`, `>>`, `>=`, `>>>`, or `>>=`,
+/// If [beforeCloser].next is one of `>`, `>>`, `>>>`, `>=`, `>>=`, or `>>>=`
 /// then update the token stream and return `true`.
 bool parseCloser(Token beforeCloser) {
   Token unsplit = beforeCloser.next;
@@ -1189,8 +1191,8 @@
 }
 
 /// If [closer] is `>` then return it.
-/// If [closer] is one of `>>`, `>=`, `>>>`, or `>>=` then split then token
-/// and return the leading `>` without updating the token stream.
+/// If [closer] is one of `>>`, `>>>`, `>=`, `>>=`,  or `>>>=` then split
+/// the token and return the leading `>` without updating the token stream.
 /// If [closer] is none of the above, then return null;
 Token splitCloser(Token closer) {
   String value = closer.stringValue;
@@ -1204,6 +1206,8 @@
     return splitGtFromGtGtGt(closer);
   } else if (identical(value, '>>=')) {
     return splitGtFromGtGtEq(closer);
+  } else if (identical(value, '>>>=')) {
+    return splitGtFromGtGtGtEq(closer);
   }
   return null;
 }
diff --git a/pkg/front_end/lib/src/fasta/parser/util.dart b/pkg/front_end/lib/src/fasta/parser/util.dart
index e02385f..2e7b441 100644
--- a/pkg/front_end/lib/src/fasta/parser/util.dart
+++ b/pkg/front_end/lib/src/fasta/parser/util.dart
@@ -190,6 +190,18 @@
       ..next = token.next);
 }
 
+/// Split `>>>=` into two separate tokens... `>` followed by `>>=`.
+/// Call [Token.setNext] to add the token to the stream.
+Token splitGtFromGtGtGtEq(Token token) {
+  assert(optional('>>>=', token));
+  return new SimpleToken(
+      TokenType.GT, token.charOffset, token.precedingComments)
+    ..setNext(new SimpleToken(TokenType.GT_GT_EQ, token.charOffset + 1)
+      // Set next rather than calling Token.setNext
+      // so that the previous token is not set.
+      ..next = token.next);
+}
+
 /// Return a synthetic `<` followed by [next].
 /// Call [Token.setNext] to add the token to the stream.
 Token syntheticGt(Token next) {
diff --git a/pkg/front_end/lib/src/fasta/rewrite_severity.dart b/pkg/front_end/lib/src/fasta/rewrite_severity.dart
index 5d521bb..40f5b8c 100644
--- a/pkg/front_end/lib/src/fasta/rewrite_severity.dart
+++ b/pkg/front_end/lib/src/fasta/rewrite_severity.dart
@@ -9,20 +9,6 @@
 Severity rewriteSeverity(
     Severity severity, msg.Code<Object> code, Uri fileUri) {
   if (severity != Severity.ignored) {
-    if (code == msg.codeFinalFieldNotInitialized) {
-      // TODO(johnniwinther): Use external getters instead of final fields.
-      // See https://github.com/dart-lang/sdk/issues/33762
-      for (String path in [
-        "/pkg/dev_compiler/tool/input_sdk/private/js_string.dart",
-        "/sdk/lib/html/dart2js/html_dart2js.dart",
-        "/sdk/lib/svg/dart2js/svg_dart2js.dart",
-        "/sdk/lib/_internal/js_runtime/lib/native_typed_data.dart"
-      ]) {
-        if (fileUri.path.endsWith(path)) {
-          return Severity.ignored;
-        }
-      }
-    }
     return severity;
   }
 
diff --git a/pkg/front_end/lib/src/fasta/scanner.dart b/pkg/front_end/lib/src/fasta/scanner.dart
index f276eda..8f8e495 100644
--- a/pkg/front_end/lib/src/fasta/scanner.dart
+++ b/pkg/front_end/lib/src/fasta/scanner.dart
@@ -6,8 +6,6 @@
 
 import 'dart:convert' show unicodeReplacementCharacterRune, utf8;
 
-import 'fasta_codes.dart' show LocatedMessage;
-
 import '../scanner/token.dart' show Token;
 
 import 'scanner/string_scanner.dart' show StringScanner;
@@ -41,14 +39,6 @@
 typedef Token Recover(List<int> bytes, Token tokens, List<int> lineStarts);
 
 abstract class Scanner {
-  /// A list of errors that occured during [tokenize] or `null` if none.
-  List<LocatedMessage> errors;
-
-  /// Set true if errors should be reported via the [errors] list.
-  // TODO(danrubel): Remove this once all scanner clients can process
-  // errors reported via the [errors] list.
-  bool reportErrors;
-
   /// Returns true if an error occured during [tokenize].
   bool get hasErrors;
 
@@ -62,10 +52,7 @@
   final List<int> lineStarts;
   final bool hasErrors;
 
-  /// Returns a list of errors that occured during [tokenize] or `null` if none.
-  final List<LocatedMessage> errors;
-
-  ScannerResult(this.tokens, this.lineStarts, this.hasErrors, this.errors);
+  ScannerResult(this.tokens, this.lineStarts, this.hasErrors);
 }
 
 /// Scan/tokenize the given UTF8 [bytes].
@@ -84,6 +71,7 @@
 /// If [recover] is null, then the [defaultRecoveryStrategy] is used.
 ScannerResult scanString(String source,
     {bool enableGtGtGt: false,
+    bool enableGtGtGtEq: false,
     bool includeComments: false,
     bool scanLazyAssignmentOperators: false,
     Recover recover}) {
@@ -93,6 +81,7 @@
   StringScanner scanner =
       new StringScanner(source, includeComments: includeComments);
   scanner.enableGtGtGt = enableGtGtGt;
+  scanner.enableGtGtGtEq = enableGtGtGtEq;
   return _tokenizeAndRecover(scanner, recover, source: source);
 }
 
@@ -104,6 +93,5 @@
     recover ??= defaultRecoveryStrategy;
     tokens = recover(bytes, tokens, scanner.lineStarts);
   }
-  return new ScannerResult(
-      tokens, scanner.lineStarts, scanner.hasErrors, scanner.errors);
+  return new ScannerResult(tokens, scanner.lineStarts, scanner.hasErrors);
 }
diff --git a/pkg/front_end/lib/src/fasta/scanner/abstract_scanner.dart b/pkg/front_end/lib/src/fasta/scanner/abstract_scanner.dart
index 3377316..ddbf88a 100644
--- a/pkg/front_end/lib/src/fasta/scanner/abstract_scanner.dart
+++ b/pkg/front_end/lib/src/fasta/scanner/abstract_scanner.dart
@@ -16,8 +16,7 @@
         messageExpectedHexDigit,
         messageMissingExponent,
         messageUnexpectedDollarInString,
-        messageUnterminatedComment,
-        templateUnterminatedString;
+        messageUnterminatedComment;
 
 import '../scanner.dart'
     show ErrorToken, Keyword, Scanner, buildUnexpectedCharacterToken;
@@ -44,11 +43,16 @@
 
   final bool includeComments;
 
-  /// Experimental flag for enabling parsing of `>>>`.
+  /// Experimental flag for enabling scanning of `>>>`.
   /// See https://github.com/dart-lang/language/issues/61
   /// and https://github.com/dart-lang/language/issues/60
   bool enableGtGtGt = false;
 
+  /// Experimental flag for enabling scanning of `>>>=`.
+  /// See https://github.com/dart-lang/language/issues/61
+  /// and https://github.com/dart-lang/language/issues/60
+  bool enableGtGtGtEq = false;
+
   /**
    * The string offset for the next token that will be created.
    *
@@ -643,7 +647,7 @@
   }
 
   int tokenizeGreaterThan(int next) {
-    // > >= >> >>= >>>
+    // > >= >> >>= >>> >>>=
     next = advance();
     if (identical($EQ, next)) {
       appendPrecedenceToken(TokenType.GT_EQ);
@@ -654,8 +658,13 @@
         appendPrecedenceToken(TokenType.GT_GT_EQ);
         return advance();
       } else if (enableGtGtGt && identical($GT, next)) {
+        next = advance();
+        if (enableGtGtGtEq && identical($EQ, next)) {
+          appendPrecedenceToken(TokenType.GT_GT_GT_EQ);
+          return advance();
+        }
         appendPrecedenceToken(TokenType.GT_GT_GT);
-        return advance();
+        return next;
       } else {
         appendGtGt(TokenType.GT_GT);
         return next;
@@ -1262,17 +1271,9 @@
     appendSyntheticSubstringToken(TokenType.STRING, start, asciiOnly, suffix);
     // Ensure that the error is reported on a visible token
     int errorStart = tokenStart < stringOffset ? tokenStart : quoteStart;
-    if (reportErrors) {
-      addError(errorStart, stringOffset - errorStart,
-          templateUnterminatedString.withArguments(prefix, suffix));
-    } else {
-      appendErrorToken(
-          new UnterminatedString(prefix, errorStart, stringOffset));
-    }
+    appendErrorToken(new UnterminatedString(prefix, errorStart, stringOffset));
   }
 
-  void addError(int charOffset, int length, Message message);
-
   int advanceAfterError(bool shouldAdvance) {
     if (atEndOfFile()) return $EOF;
     if (shouldAdvance) {
diff --git a/pkg/front_end/lib/src/fasta/scanner/array_based_scanner.dart b/pkg/front_end/lib/src/fasta/scanner/array_based_scanner.dart
index 39fba7f..b6e0f09 100644
--- a/pkg/front_end/lib/src/fasta/scanner/array_based_scanner.dart
+++ b/pkg/front_end/lib/src/fasta/scanner/array_based_scanner.dart
@@ -6,8 +6,6 @@
 
 import 'error_token.dart' show ErrorToken, UnmatchedToken;
 
-import '../fasta_codes.dart' show LocatedMessage, Message;
-
 import '../../scanner/token.dart'
     show BeginToken, Keyword, KeywordToken, SyntheticToken, Token, TokenType;
 
@@ -27,8 +25,6 @@
 import '../util/link.dart' show Link;
 
 abstract class ArrayBasedScanner extends AbstractScanner {
-  List<LocatedMessage> errors;
-  bool reportErrors = false;
   bool hasErrors = false;
 
   ArrayBasedScanner(bool includeComments, {int numberOfBytesHint})
@@ -367,10 +363,4 @@
     begin.endGroup = tail;
     appendErrorToken(new UnmatchedToken(begin));
   }
-
-  void addError(int charOffset, int length, Message message) {
-    hasErrors = true;
-    (errors ??= <LocatedMessage>[])
-        .add(new LocatedMessage(null, charOffset, length, message));
-  }
 }
diff --git a/pkg/front_end/lib/src/fasta/scanner/string_scanner.dart b/pkg/front_end/lib/src/fasta/scanner/string_scanner.dart
index b5cb240..952099d 100644
--- a/pkg/front_end/lib/src/fasta/scanner/string_scanner.dart
+++ b/pkg/front_end/lib/src/fasta/scanner/string_scanner.dart
@@ -25,8 +25,7 @@
   /** The current offset in [string]. */
   int scanOffset = -1;
 
-  StringScanner(String string,
-      {bool includeComments: false, bool scanLazyAssignmentOperators: false})
+  StringScanner(String string, {bool includeComments: false})
       : string = ensureZeroTermination(string),
         super(includeComments);
 
diff --git a/pkg/front_end/lib/src/fasta/scanner/token.dart b/pkg/front_end/lib/src/fasta/scanner/token.dart
index f10081d..26ab536 100644
--- a/pkg/front_end/lib/src/fasta/scanner/token.dart
+++ b/pkg/front_end/lib/src/fasta/scanner/token.dart
@@ -299,6 +299,7 @@
       identical(value, "+") ||
       identical(value, "<<") ||
       identical(value, ">>") ||
+      identical(value, ">>>") ||
       identical(value, ">=") ||
       identical(value, ">") ||
       identical(value, "<=") ||
diff --git a/pkg/front_end/lib/src/fasta/scanner/token_constants.dart b/pkg/front_end/lib/src/fasta/scanner/token_constants.dart
index f29765c..fff742e 100644
--- a/pkg/front_end/lib/src/fasta/scanner/token_constants.dart
+++ b/pkg/front_end/lib/src/fasta/scanner/token_constants.dart
@@ -88,3 +88,4 @@
 const int GENERIC_METHOD_TYPE_LIST_TOKEN = GENERIC_METHOD_TYPE_ASSIGN_TOKEN + 1;
 const int GT_GT_GT_TOKEN = GENERIC_METHOD_TYPE_LIST_TOKEN + 1;
 const int PERIOD_PERIOD_PERIOD_QUESTION_TOKEN = GT_GT_GT_TOKEN + 1;
+const int GT_GT_GT_EQ_TOKEN = PERIOD_PERIOD_PERIOD_QUESTION_TOKEN + 1;
diff --git a/pkg/front_end/lib/src/fasta/source/scope_listener.dart b/pkg/front_end/lib/src/fasta/source/scope_listener.dart
index c49ce08..80db65e 100644
--- a/pkg/front_end/lib/src/fasta/source/scope_listener.dart
+++ b/pkg/front_end/lib/src/fasta/source/scope_listener.dart
@@ -94,6 +94,12 @@
   }
 
   @override
+  void beginForControlFlow(Token awaitToken, Token forToken) {
+    debugEvent("beginForControlFlow");
+    enterLocalScope("for in a collection");
+  }
+
+  @override
   void beginBlock(Token token) {
     debugEvent("beginBlock");
     enterLocalScope("block");
@@ -102,7 +108,7 @@
   @override
   void beginSwitchBlock(Token token) {
     debugEvent("beginSwitchBlock");
-    enterLocalScope("swithc block");
+    enterLocalScope("switch block");
     enterBreakTarget(token.charOffset);
   }
 
diff --git a/pkg/front_end/lib/src/fasta/source/source_class_builder.dart b/pkg/front_end/lib/src/fasta/source/source_class_builder.dart
index bfcb069..be97aab 100644
--- a/pkg/front_end/lib/src/fasta/source/source_class_builder.dart
+++ b/pkg/front_end/lib/src/fasta/source/source_class_builder.dart
@@ -7,8 +7,6 @@
 import 'package:kernel/ast.dart'
     show Class, Constructor, Member, Supertype, TreeNode;
 
-import '../../base/instrumentation.dart' show Instrumentation;
-
 import '../dill/dill_member_builder.dart' show DillMemberBuilder;
 
 import '../fasta_codes.dart'
@@ -259,13 +257,6 @@
   }
 
   @override
-  void instrumentTopLevelInference(Instrumentation instrumentation) {
-    scope.forEach((name, declaration) {
-      declaration.instrumentTopLevelInference(instrumentation);
-    });
-  }
-
-  @override
   int finishPatch() {
     if (!isPatch) return 0;
 
diff --git a/pkg/front_end/lib/src/fasta/source/source_library_builder.dart b/pkg/front_end/lib/src/fasta/source/source_library_builder.dart
index 3d178d3..7aadb95 100644
--- a/pkg/front_end/lib/src/fasta/source/source_library_builder.dart
+++ b/pkg/front_end/lib/src/fasta/source/source_library_builder.dart
@@ -8,8 +8,6 @@
 
 import '../../base/resolve_relative_uri.dart' show resolveRelativeUri;
 
-import '../../base/instrumentation.dart' show Instrumentation;
-
 import '../../scanner/token.dart' show Token;
 
 import '../builder/builder.dart'
@@ -881,14 +879,6 @@
   }
 
   @override
-  void instrumentTopLevelInference(Instrumentation instrumentation) {
-    Iterator<Declaration> iterator = this.iterator;
-    while (iterator.moveNext()) {
-      iterator.current.instrumentTopLevelInference(instrumentation);
-    }
-  }
-
-  @override
   void recordAccess(int charOffset, int length, Uri fileUri) {
     accessors.add(fileUri);
     accessors.add(charOffset);
diff --git a/pkg/front_end/lib/src/fasta/source/source_loader.dart b/pkg/front_end/lib/src/fasta/source/source_loader.dart
index dee067a..97a0382 100644
--- a/pkg/front_end/lib/src/fasta/source/source_loader.dart
+++ b/pkg/front_end/lib/src/fasta/source/source_loader.dart
@@ -33,8 +33,7 @@
 
 import '../../api_prototype/file_system.dart';
 
-import '../../base/instrumentation.dart'
-    show Instrumentation, InstrumentationValueLiteral;
+import '../../base/instrumentation.dart' show Instrumentation;
 
 import '../blacklisted_classes.dart' show blacklistedCoreClasses;
 
@@ -69,8 +68,6 @@
         templateSourceOutlineSummary,
         templateUntranslatableUri;
 
-import '../fasta_codes.dart' as fasta_codes;
-
 import '../kernel/kernel_shadow_ast.dart'
     show ShadowClass, ShadowTypeInferenceEngine;
 
@@ -104,12 +101,10 @@
 
 import '../parser.dart' show Parser, lengthForToken, offsetForToken;
 
-import '../problems.dart' show internalProblem, unhandled;
+import '../problems.dart' show internalProblem;
 
 import '../scanner.dart' show ErrorToken, ScannerResult, Token, scan;
 
-import '../severity.dart' show Severity;
-
 import '../type_inference/interface_resolver.dart' show InterfaceResolver;
 
 import 'diet_listener.dart' show DietListener;
@@ -208,7 +203,22 @@
     Token token = result.tokens;
     if (!suppressLexicalErrors) {
       List<int> source = getSource(bytes);
-      target.addSourceInformation(library.fileUri, result.lineStarts, source);
+      Uri importUri = library.uri;
+      if (library.isPatch) {
+        // For patch files we create a "fake" import uri.
+        // We cannot use the import uri from the patched libarary because
+        // several different files would then have the same import uri,
+        // and the VM does not support that. Also, what would, for instance,
+        // setting a breakpoint on line 42 of some import uri mean, if the uri
+        // represented several files?
+        List<String> newPathSegments =
+            new List<String>.from(importUri.pathSegments);
+        newPathSegments.add(library.fileUri.pathSegments.last);
+        newPathSegments[0] = "${newPathSegments[0]}-patch";
+        importUri = importUri.replace(pathSegments: newPathSegments);
+      }
+      target.addSourceInformation(
+          importUri, library.fileUri, result.lineStarts, source);
     }
     while (token is ErrorToken) {
       if (!suppressLexicalErrors) {
@@ -998,13 +1008,6 @@
     }
 
     typeInferenceEngine.finishTopLevelInitializingFormals();
-    if (instrumentation != null) {
-      builders.forEach((Uri uri, LibraryBuilder library) {
-        if (library.loader == this) {
-          library.instrumentTopLevelInference(instrumentation);
-        }
-      });
-    }
     interfaceResolver = null;
     // Since finalization of covariance may have added forwarding stubs, we need
     // to recompute the class hierarchy so that method compilation will properly
@@ -1020,15 +1023,17 @@
       node.accept(collectionTransformer ??= new CollectionTransformer(this));
     }
     if (transformSetLiterals) {
-      node.accept(setLiteralTransformer ??= new SetLiteralTransformer(this));
+      node.accept(setLiteralTransformer ??= new SetLiteralTransformer(this,
+          transformConst: !target.enableConstantUpdate2018));
     }
   }
 
   void transformListPostInference(List<TreeNode> list,
       bool transformSetLiterals, bool transformCollections) {
     if (transformSetLiterals) {
-      SetLiteralTransformer transformer =
-          setLiteralTransformer ??= new SetLiteralTransformer(this);
+      SetLiteralTransformer transformer = setLiteralTransformer ??=
+          new SetLiteralTransformer(this,
+              transformConst: !target.enableConstantUpdate2018);
       for (int i = 0; i < list.length; ++i) {
         list[i] = list[i].accept(transformer);
       }
@@ -1074,67 +1079,6 @@
         isTopLevel: isTopLevel);
   }
 
-  void recordMessage(Severity severity, Message message, int charOffset,
-      int length, Uri fileUri,
-      {List<LocatedMessage> context}) {
-    if (instrumentation == null) return;
-
-    if (charOffset == -1 &&
-        (message.code == fasta_codes.codeConstConstructorWithBody ||
-            message.code == fasta_codes.codeConstructorNotFound ||
-            message.code == fasta_codes.codeSuperclassHasNoDefaultConstructor ||
-            message.code == fasta_codes.codeTypeArgumentsOnTypeVariable ||
-            message.code == fasta_codes.codeUnspecified)) {
-      // TODO(ahe): All warnings should have a charOffset, but currently, some
-      // warnings lack them.
-      return;
-    }
-
-    String severityString;
-    switch (severity) {
-      case Severity.error:
-        severityString = "error";
-        break;
-
-      case Severity.internalProblem:
-        severityString = "internal problem";
-        break;
-
-      case Severity.warning:
-        severityString = "warning";
-        break;
-
-      case Severity.errorLegacyWarning:
-        // Should have been resolved to either error or warning at this point.
-        // Use a property name expressing that, in case it slips through.
-        severityString = "unresolved severity";
-        break;
-
-      case Severity.context:
-        severityString = "context";
-        break;
-
-      case Severity.ignored:
-        unhandled("IGNORED", "recordMessage", charOffset, fileUri);
-        return;
-    }
-    instrumentation.record(
-        fileUri,
-        charOffset,
-        severityString,
-        // TODO(ahe): Should I add an InstrumentationValue for Message?
-        new InstrumentationValueLiteral(message.code.name));
-    if (context != null) {
-      for (LocatedMessage contextMessage in context) {
-        instrumentation.record(
-            contextMessage.uri,
-            contextMessage.charOffset,
-            "context",
-            new InstrumentationValueLiteral(contextMessage.code.name));
-      }
-    }
-  }
-
   void releaseAncillaryResources() {
     hierarchy = null;
     typeInferenceEngine = null;
diff --git a/pkg/front_end/lib/src/fasta/source/type_promotion_look_ahead_listener.dart b/pkg/front_end/lib/src/fasta/source/type_promotion_look_ahead_listener.dart
index c818a43..e6d7ef8 100644
--- a/pkg/front_end/lib/src/fasta/source/type_promotion_look_ahead_listener.dart
+++ b/pkg/front_end/lib/src/fasta/source/type_promotion_look_ahead_listener.dart
@@ -139,6 +139,10 @@
 
   Uri get uri => state.uri;
 
+  void logEvent(String name) {
+    throw new UnimplementedError(name);
+  }
+
   void debugEvent(String name, Token token) {
     // state.trace(name, token);
   }
@@ -389,15 +393,21 @@
   }
 
   @override
+  void handleElseControlFlow(Token token) {}
+
+  @override
   void endIfControlFlow(Token token) {
-    // TODO(danrubel) add support for if control flow collection entries
-    // but for now this is ignored and an error reported in the body builder.
+    state.pop(); // Element.
+    state.pop(); // Condition.
+    state.pushNull("%IfControlFlow%", token);
   }
 
   @override
   void endIfElseControlFlow(Token token) {
-    // TODO(danrubel) add support for if control flow collection entries
-    // but for now this is ignored and an error reported in the body builder.
+    state.pop(); // Else element.
+    state.pop(); // Then element.
+    state.pop(); // Condition.
+    state.pushNull("%IfElseControlFlow%", token);
   }
 
   @override
diff --git a/pkg/front_end/lib/src/fasta/target_implementation.dart b/pkg/front_end/lib/src/fasta/target_implementation.dart
index 037e74e..6e82a7d 100644
--- a/pkg/front_end/lib/src/fasta/target_implementation.dart
+++ b/pkg/front_end/lib/src/fasta/target_implementation.dart
@@ -131,7 +131,7 @@
   }
 
   void addSourceInformation(
-      Uri uri, List<int> lineStarts, List<int> sourceCode);
+      Uri importUri, Uri fileUri, List<int> lineStarts, List<int> sourceCode);
 
   void readPatchFiles(covariant LibraryBuilder library) {}
 
diff --git a/pkg/front_end/lib/src/fasta/testing/validating_instrumentation.dart b/pkg/front_end/lib/src/fasta/testing/validating_instrumentation.dart
index b721d4e..5547c5f 100644
--- a/pkg/front_end/lib/src/fasta/testing/validating_instrumentation.dart
+++ b/pkg/front_end/lib/src/fasta/testing/validating_instrumentation.dart
@@ -30,7 +30,6 @@
   /// Map from feature names to the property names they are short for.
   static const _FEATURES = const {
     'inference': const [
-      'topType',
       'typeArg',
       'typeArgs',
       'promotedType',
@@ -39,10 +38,8 @@
       'target',
     ],
     'checks': const [
-      'covariance',
       'checkGetterReturn',
       'checkReturn',
-      'forwardingStub',
       'genericContravariant',
     ],
   };
diff --git a/pkg/front_end/lib/src/fasta/type_inference/interface_resolver.dart b/pkg/front_end/lib/src/fasta/type_inference/interface_resolver.dart
index 65db7c3..d596481 100644
--- a/pkg/front_end/lib/src/fasta/type_inference/interface_resolver.dart
+++ b/pkg/front_end/lib/src/fasta/type_inference/interface_resolver.dart
@@ -12,6 +12,7 @@
         Field,
         FunctionNode,
         FunctionType,
+        InvalidType,
         Member,
         Name,
         NamedExpression,
@@ -37,10 +38,7 @@
     show HierarchyBasedTypeEnvironment;
 
 import '../../base/instrumentation.dart'
-    show
-        Instrumentation,
-        InstrumentationValueForForwardingStub,
-        InstrumentationValueLiteral;
+    show Instrumentation, InstrumentationValueLiteral;
 
 import '../builder/builder.dart' show LibraryBuilder;
 
@@ -119,23 +117,25 @@
     var declaredMethod = _declaredMethod;
     var kind = declaredMethod.kind;
     var overriddenTypes = _computeAccessorOverriddenTypes();
+    DartType inferredType;
     if (isCircular) {
+      inferredType = const InvalidType();
       _library.addProblem(
           templateCantInferTypeDueToCircularity.withArguments(_name),
           _offset,
           noLength,
           _fileUri);
     } else {
-      var inferredType = _interfaceResolver.matchTypes(
+      inferredType = _interfaceResolver.matchTypes(
           overriddenTypes, _library, _name, _fileUri, _offset);
-      if (declaredMethod is SyntheticAccessor) {
-        declaredMethod._field.type = inferredType;
+    }
+    if (declaredMethod is SyntheticAccessor) {
+      declaredMethod._field.type = inferredType;
+    } else {
+      if (kind == ProcedureKind.Getter) {
+        declaredMethod.function.returnType = inferredType;
       } else {
-        if (kind == ProcedureKind.Getter) {
-          declaredMethod.function.returnType = inferredType;
-        } else {
-          declaredMethod.function.positionalParameters[0].type = inferredType;
-        }
+        declaredMethod.function.positionalParameters[0].type = inferredType;
       }
     }
   }
@@ -374,8 +374,7 @@
     }
     for (int i = 0; i < interfaceTypeParameters.length; i++) {
       var typeParameter = interfaceTypeParameters[i];
-      var isGenericCovariantImpl = typeParameter.isGenericCovariantImpl ||
-          needsCheck(typeParameter.bound);
+      var isGenericCovariantImpl = typeParameter.isGenericCovariantImpl;
       var superTypeParameter = typeParameter;
       for (int j = _start; j < _end; j++) {
         var otherMember = _finalizedCandidate(j);
@@ -946,11 +945,6 @@
           resolution.isSyntheticForwarder &&
           identical(resolution.enclosingClass, class_)) {
         class_.addMember(resolution);
-        _instrumentation?.record(
-            class_.location.file,
-            class_.fileOffset,
-            'forwardingStub',
-            new InstrumentationValueForForwardingStub(resolution));
       }
     }
   }
@@ -977,14 +971,6 @@
     return candidates;
   }
 
-  /// If instrumentation is enabled, records the covariance bits for the given
-  /// [class_] to [_instrumentation].
-  void recordInstrumentation(Class class_) {
-    if (_instrumentation != null) {
-      _recordInstrumentation(class_);
-    }
-  }
-
   /// Creates the appropriate [InferenceNode] for inferring [procedure] in the
   /// context of [class_].
   ///
@@ -1081,51 +1067,6 @@
     return result;
   }
 
-  /// Records the covariance bits for the given [class_] to [_instrumentation].
-  ///
-  /// Caller is responsible for checking whether [_instrumentation] is `null`.
-  void _recordInstrumentation(Class class_) {
-    var uri = class_.fileUri;
-    void recordCovariance(int fileOffset, bool isExplicitlyCovariant,
-        bool isGenericCovariantImpl) {
-      var covariance = <String>[];
-      if (isExplicitlyCovariant) covariance.add('explicit');
-      if (!isExplicitlyCovariant && isGenericCovariantImpl) {
-        covariance.add('genericImpl');
-      }
-      if (covariance.isNotEmpty) {
-        _instrumentation.record(uri, fileOffset, 'covariance',
-            new InstrumentationValueLiteral(covariance.join(', ')));
-      }
-    }
-
-    for (var procedure in class_.procedures) {
-      if (procedure.isStatic) continue;
-      // Forwarding stubs are annotated separately
-      if (procedure.isSyntheticForwarder) {
-        continue;
-      }
-      void recordFormalAnnotations(VariableDeclaration formal) {
-        recordCovariance(formal.fileOffset, formal.isCovariant,
-            formal.isGenericCovariantImpl);
-      }
-
-      void recordTypeParameterAnnotations(TypeParameter typeParameter) {
-        recordCovariance(typeParameter.fileOffset, false,
-            typeParameter.isGenericCovariantImpl);
-      }
-
-      procedure.function.positionalParameters.forEach(recordFormalAnnotations);
-      procedure.function.namedParameters.forEach(recordFormalAnnotations);
-      procedure.function.typeParameters.forEach(recordTypeParameterAnnotations);
-    }
-    for (var field in class_.fields) {
-      if (field.isStatic) continue;
-      recordCovariance(
-          field.fileOffset, field.isCovariant, field.isGenericCovariantImpl);
-    }
-  }
-
   /// Determines the appropriate substitution to translate type parameters
   /// mentioned in the given [candidate] to type parameters on [class_].
   Substitution _substitutionFor(Procedure candidate, Class class_) {
diff --git a/pkg/front_end/lib/src/fasta/type_inference/standard_bounds.dart b/pkg/front_end/lib/src/fasta/type_inference/standard_bounds.dart
index 2d5cb3a..2a97c19 100644
--- a/pkg/front_end/lib/src/fasta/type_inference/standard_bounds.dart
+++ b/pkg/front_end/lib/src/fasta/type_inference/standard_bounds.dart
@@ -12,6 +12,7 @@
         DynamicType,
         FunctionType,
         InterfaceType,
+        InvalidType,
         NamedType,
         TypeParameterType,
         VoidType;
@@ -177,8 +178,12 @@
       return _functionStandardUpperBound(type1, type2);
     }
 
+    if (type1 is InvalidType || type2 is InvalidType) {
+      return const InvalidType();
+    }
+
     // Should never happen. As a defensive measure, return the dynamic type.
-    assert(false);
+    assert(false, "type1 = $type1; type2 = $type2");
     return const DynamicType();
   }
 
diff --git a/pkg/front_end/lib/src/fasta/type_inference/type_inference_engine.dart b/pkg/front_end/lib/src/fasta/type_inference/type_inference_engine.dart
index a3251d6..bbf090a 100644
--- a/pkg/front_end/lib/src/fasta/type_inference/type_inference_engine.dart
+++ b/pkg/front_end/lib/src/fasta/type_inference/type_inference_engine.dart
@@ -11,6 +11,7 @@
         Field,
         FunctionType,
         InterfaceType,
+        InvalidType,
         Member,
         TypeParameter,
         TypeParameterType,
@@ -64,7 +65,7 @@
             field.fileOffset,
             noLength,
             field.fileUri);
-        inferredType = const DynamicType();
+        inferredType = const InvalidType();
       }
       field.setInferredType(
           _typeInferenceEngine, typeInferrer.uri, inferredType);
diff --git a/pkg/front_end/lib/src/fasta/type_inference/type_inferrer.dart b/pkg/front_end/lib/src/fasta/type_inference/type_inferrer.dart
index 98cbf73..05052a6 100644
--- a/pkg/front_end/lib/src/fasta/type_inference/type_inferrer.dart
+++ b/pkg/front_end/lib/src/fasta/type_inference/type_inferrer.dart
@@ -22,6 +22,7 @@
         FunctionType,
         Instantiation,
         InterfaceType,
+        InvalidType,
         InvocationExpression,
         Let,
         ListLiteral,
@@ -677,21 +678,22 @@
     if (!typeSchemaEnvironment.isSubtypeOf(expectedType, actualType)) {
       // Error: not assignable.  Perform error recovery.
       var parent = expression.parent;
-      var errorNode = helper.wrapInProblem(
-          new AsExpression(
-              expression,
-              // TODO(ahe): The outline phase doesn't correctly remove invalid
-              // uses of type variables, for example, on static members. Once
-              // that has been fixed, we should always be able to use
-              // [expectedType] directly here.
-              hasAnyTypeVariables(expectedType)
-                  ? const BottomType()
-                  : expectedType)
-            ..isTypeError = true
-            ..fileOffset = expression.fileOffset,
-          (template ?? templateInvalidAssignment)
-              .withArguments(actualType, expectedType),
-          noLength);
+      Expression errorNode = new AsExpression(
+          expression,
+          // TODO(ahe): The outline phase doesn't correctly remove invalid
+          // uses of type variables, for example, on static members. Once
+          // that has been fixed, we should always be able to use
+          // [expectedType] directly here.
+          hasAnyTypeVariables(expectedType) ? const BottomType() : expectedType)
+        ..isTypeError = true
+        ..fileOffset = expression.fileOffset;
+      if (expectedType is! InvalidType && actualType is! InvalidType) {
+        errorNode = helper.wrapInProblem(
+            errorNode,
+            (template ?? templateInvalidAssignment)
+                .withArguments(actualType, expectedType),
+            noLength);
+      }
       parent?.replaceChild(expression, errorNode);
       return errorNode;
     } else {
@@ -759,6 +761,7 @@
     if (!isTopLevel &&
         interfaceMember == null &&
         receiverType is! DynamicType &&
+        receiverType is! InvalidType &&
         !(receiverType == coreTypes.functionClass.rawType &&
             name.name == 'call') &&
         errorTemplate != null) {
diff --git a/pkg/front_end/lib/src/kernel_generator_impl.dart b/pkg/front_end/lib/src/kernel_generator_impl.dart
index 61d49fb..0a4fad1 100644
--- a/pkg/front_end/lib/src/kernel_generator_impl.dart
+++ b/pkg/front_end/lib/src/kernel_generator_impl.dart
@@ -117,7 +117,7 @@
             libraryFilter: kernelTarget.isSourceLibrary);
       }
 
-      // Copy the component to exclude the uriToSource map from the summary.
+      // Create the requested component ("truncating" or not).
       //
       // Note: we don't pass the library argument to the constructor to
       // preserve the the libraries parent pointer (it should continue to point
@@ -128,6 +128,7 @@
                 ? kernelTarget.loader.libraries
                 : summaryComponent.libraries);
       trimmedSummaryComponent.metadata.addAll(summaryComponent.metadata);
+      trimmedSummaryComponent.uriToSource.addAll(summaryComponent.uriToSource);
 
       // As documented, we only run outline transformations when we are building
       // summaries without building a full component (at this time, that's
@@ -136,7 +137,9 @@
         options.target.performOutlineTransformations(trimmedSummaryComponent);
         options.ticker.logMs("Transformed outline");
       }
-      summary = serializeComponent(trimmedSummaryComponent);
+      // Don't include source (but do add it above to include importUris).
+      summary =
+          serializeComponent(trimmedSummaryComponent, includeSources: false);
       options.ticker.logMs("Generated outline");
     }
 
diff --git a/pkg/front_end/lib/src/scanner/errors.dart b/pkg/front_end/lib/src/scanner/errors.dart
index 9e54680..6cdb878 100644
--- a/pkg/front_end/lib/src/scanner/errors.dart
+++ b/pkg/front_end/lib/src/scanner/errors.dart
@@ -174,22 +174,6 @@
   }
 }
 
-void translateScanError(
-    Code errorCode, int charOffset, int length, ReportError reportError) {
-  switch (errorCode.analyzerCodes?.first) {
-    case "UNTERMINATED_STRING_LITERAL":
-      // TODO(paulberry,ahe): Fasta reports the error location as the entire
-      // string; analyzer expects the end of the string.
-      reportError(ScannerErrorCode.UNTERMINATED_STRING_LITERAL,
-          charOffset + length - 1, null);
-      break;
-
-    default:
-      throw new UnimplementedError(
-          '$errorCode "${errorCode.analyzerCodes?.first}"');
-  }
-}
-
 /**
  * Determines whether the given [charOffset], which came from the non-EOF token
  * [token], represents the end of the input.
diff --git a/pkg/front_end/lib/src/scanner/token.dart b/pkg/front_end/lib/src/scanner/token.dart
index 5a78cd2..62718b0 100644
--- a/pkg/front_end/lib/src/scanner/token.dart
+++ b/pkg/front_end/lib/src/scanner/token.dart
@@ -1279,6 +1279,10 @@
       '>>>', 'GT_GT_GT', SHIFT_PRECEDENCE, GT_GT_GT_TOKEN,
       isOperator: true, isUserDefinableOperator: true);
 
+  static const TokenType GT_GT_GT_EQ = const TokenType(
+      '>>>=', 'GT_GT_GT_EQ', ASSIGNMENT_PRECEDENCE, GT_GT_GT_EQ_TOKEN,
+      isOperator: true);
+
   static const TokenType HASH =
       const TokenType('#', 'HASH', NO_PRECEDENCE, HASH_TOKEN);
 
diff --git a/pkg/front_end/messages.status b/pkg/front_end/messages.status
index cfa04f1..5a1995a 100644
--- a/pkg/front_end/messages.status
+++ b/pkg/front_end/messages.status
@@ -64,6 +64,7 @@
 ConstEvalContext/analyzerCode: Fail # This is just used for displaying the context.
 ConstEvalContext/example: Fail # This is just used for displaying the context.
 ConstEvalDeferredLibrary/example: Fail
+ConstEvalDuplicateElement/example: Fail
 ConstEvalDuplicateKey/example: Fail
 ConstEvalFailedAssertion/example: Fail
 ConstEvalFailedAssertionWithMessage/example: Fail
@@ -72,15 +73,22 @@
 ConstEvalInvalidBinaryOperandType/analyzerCode: Fail # CONST_EVAL_TYPE_NUM / CONST_EVAL_TYPE_BOOL
 ConstEvalInvalidBinaryOperandType/example: Fail
 ConstEvalInvalidMethodInvocation/example: Fail
+ConstEvalInvalidPropertyGet/example: Fail
 ConstEvalInvalidStaticInvocation/example: Fail
 ConstEvalInvalidStringInterpolationOperand/example: Fail
 ConstEvalInvalidSymbolName/example: Fail
 ConstEvalInvalidType/analyzerCode: Fail # CONST_CONSTRUCTOR_FIELD_TYPE_MISMATCH / CONST_CONSTRUCTOR_PARAM_TYPE_MISMATCH / CONST_CONSTRUCTOR_PARAM_TYPE_MISMATCH / ...
 ConstEvalInvalidType/example: Fail
+ConstEvalIterationInConstList/example: Fail
+ConstEvalIterationInConstMap/example: Fail
+ConstEvalIterationInConstSet/example: Fail
 ConstEvalNegativeShift/analyzerCode: Fail # http://dartbug.com/33481
 ConstEvalNegativeShift/example: Fail
 ConstEvalNonConstantLiteral/example: Fail
 ConstEvalNonConstantVariableGet/example: Fail
+ConstEvalNotListOrSetInSpread/example: Fail
+ConstEvalNotMapInSpread/example: Fail
+ConstEvalNullValue/example: Fail
 ConstEvalZeroDivisor/example: Fail
 ConstFieldWithoutInitializer/example: Fail
 ConstructorNotFound/example: Fail
@@ -239,6 +247,8 @@
 InvalidInitializer/example: Fail
 InvalidPackageUri/analyzerCode: Fail
 InvalidPackageUri/example: Fail
+InvalidSuperInInitializer/example: Fail
+InvalidThisInInitializer/example: Fail
 InvalidUseOfNullAwareAccess/example: Fail
 InvalidVoid/script1: Fail
 InvalidVoid/script2: Fail
@@ -282,6 +292,7 @@
 NotAConstantExpression/example: Fail
 NotAType/example: Fail
 NotAnLvalue/example: Fail
+NotBinaryOperator/analyzerCode: Fail
 NotConstantExpression/example: Fail
 OperatorMinusParameterMismatch/example: Fail
 OperatorParameterMismatch0/analyzerCode: Fail
diff --git a/pkg/front_end/messages.yaml b/pkg/front_end/messages.yaml
index 195f967..558bd5b 100644
--- a/pkg/front_end/messages.yaml
+++ b/pkg/front_end/messages.yaml
@@ -85,9 +85,13 @@
 ConstEvalContext:
   template: "While analyzing:"
 
+ConstEvalDuplicateElement:
+  template: "The element '#constant' conflicts with another existing element in the set."
+  analyzerCode: EQUAL_ELEMENTS_IN_CONST_SET
+
 ConstEvalDuplicateKey:
   template: "The key '#constant' conflicts with another existing key in the map."
-  analyzerCode: EQUAL_KEYS_IN_MAP
+  analyzerCode: EQUAL_KEYS_IN_CONST_MAP
 
 ConstEvalNonConstantLiteral:
   template: "Can't have a non-constant #string literal within a const context."
@@ -110,6 +114,10 @@
   template: "The method '#string' can't be invoked on '#constant' within a const context."
   analyzerCode: UNDEFINED_OPERATOR
 
+ConstEvalInvalidPropertyGet:
+  template: "The property '#string' can't be accessed on '#constant' within a const context."
+  analyzerCode: CONST_EVAL_THROWS_EXCEPTION
+
 ConstEvalInvalidStringInterpolationOperand:
   template: "The '#constant' can't be used as part of a string interpolation within a const context, only values of type 'null', 'bool', 'int', 'double', or 'String' can be used."
   analyzerCode: CONST_EVAL_TYPE_BOOL_NUM_STRING
@@ -150,6 +158,30 @@
   template: "Constant expression depends on itself."
   analyzerCode: RECURSIVE_COMPILE_TIME_CONSTANT
 
+ConstEvalNullValue:
+  template: "Null value during constant evaluation."
+  analyzerCode: CONST_EVAL_THROWS_EXCEPTION
+
+ConstEvalNotListOrSetInSpread:
+  template: "Only lists and sets can be used in spreads in constant lists and sets."
+  analyzerCode: CONST_SPREAD_EXPECTED_LIST_OR_SET
+
+ConstEvalNotMapInSpread:
+  template: "Only maps can be used in spreads in constant maps."
+  analyzerCode: CONST_SPREAD_EXPECTED_MAP
+
+ConstEvalIterationInConstList:
+  template: "Iteration can't be used in a constant list."
+  analyzerCode: NON_CONSTANT_LIST_ELEMENT
+
+ConstEvalIterationInConstSet:
+  template: "Iteration can't be used in a constant set."
+  analyzerCode: NON_CONSTANT_SET_ELEMENT
+
+ConstEvalIterationInConstMap:
+  template: "Iteration can't be used in a constant map."
+  analyzerCode: NON_CONSTANT_MAP_ELEMENT
+
 NotConstantExpression:
   template: "#string is not a constant expression."
   analyzerCode: NOT_CONSTANT_EXPRESSION
@@ -2444,6 +2476,16 @@
   script:
     - "class C { void operator %=(x) {} }"
 
+NotBinaryOperator:
+  template: "'#lexeme' isn't a binary operator."
+  script: >
+    class C { operator~() { return null; } }
+
+    main() {
+      C c = new C();
+      print(c ~ 2);
+    }
+
 OperatorParameterMismatch0:
   template: "Operator '#name' shouldn't have any parameters."
 
@@ -2506,9 +2548,19 @@
   template: "SDK libraries specification not found: #uri."
   tip: "Normally, the specification is a file named 'libraries.json' in the Dart SDK install location."
 
+InvalidSuperInInitializer:
+  index: 95
+  template: "Can only use 'super' in an initializer for calling the superclass constructor (e.g. 'super()' or 'super.namedConstructor()')"
+  analyzerCode: ParserErrorCode.INVALID_SUPER_IN_INITIALIZER
+
+InvalidThisInInitializer:
+  index: 96
+  template: "Can only use 'this' in an initializer for field initialization (e.g. 'this.x = something') and constructor redirection (e.g. 'this()' or 'this.namedConstructor())"
+  analyzerCode: ParserErrorCode.INVALID_THIS_IN_INITIALIZER
+
 ThisAccessInFieldInitializer:
   template: "Can't access 'this' in a field initializer to read '#name'."
-  analyzerCode: THIS_ACCESS_FROM_INITIALIZER
+  analyzerCode: THIS_ACCESS_FROM_FIELD_INITIALIZER
 
 ThisOrSuperAccessInFieldInitializer:
   template: "Can't access '#string' in a field initializer."
diff --git a/pkg/front_end/pubspec.yaml b/pkg/front_end/pubspec.yaml
index b3f5034..a9c0c28 100644
--- a/pkg/front_end/pubspec.yaml
+++ b/pkg/front_end/pubspec.yaml
@@ -1,7 +1,7 @@
 name: front_end
 # Currently, front_end API is not stable and users should not
 # depend on semver semantics when depending on this package.
-version: 0.1.14
+version: 0.1.15
 author: Dart Team <misc@dartlang.org>
 description: Front end for compilation of Dart code.
 homepage: https://github.com/dart-lang/sdk/tree/master/pkg/front_end
@@ -11,14 +11,14 @@
   charcode: '^1.1.1'
   convert: '^2.0.1'
   crypto: '^2.0.2'
-  kernel: 0.3.14
+  kernel: 0.3.15
   meta: '^1.1.1'
   package_config: '^1.0.1'
   path: '^1.3.9'
   source_span: '^1.2.3'
   yaml: '^2.1.12'
 dev_dependencies:
-  analyzer: 0.35.4
+  analyzer: 0.36.0
   args: '>=0.13.0 <2.0.0'
   build_integration:
     path: ../build_integration
diff --git a/pkg/front_end/test/fasta/object_supertype_test.dart b/pkg/front_end/test/fasta/object_supertype_test.dart
index fd00300..a3bc5bd 100644
--- a/pkg/front_end/test/fasta/object_supertype_test.dart
+++ b/pkg/front_end/test/fasta/object_supertype_test.dart
@@ -62,7 +62,7 @@
         ..fileSystem = fs
         ..compileSdk = true
         ..librariesSpecificationUri = librariesSpecificationUri,
-      inputs: [Uri.parse("dart:core")]));
+      inputs: [Uri.parse("dart:core"), Uri.parse("dart:collection")]));
 
   await context.runInContext<void>((_) async {
     CompileTask task = new CompileTask(context, ticker);
diff --git a/pkg/front_end/test/fasta/parser/type_info_test.dart b/pkg/front_end/test/fasta/parser/type_info_test.dart
index eced64d..5c37a69 100644
--- a/pkg/front_end/test/fasta/parser/type_info_test.dart
+++ b/pkg/front_end/test/fasta/parser/type_info_test.dart
@@ -45,7 +45,8 @@
   assert(source != null, 'source must not be null');
   StringScanner scanner =
       new StringScanner(source, includeComments: includeComments)
-        ..enableGtGtGt = true;
+        ..enableGtGtGt = true
+        ..enableGtGtGtEq = true;
   return _tokenizeAndRecover(scanner, recover, source: source);
 }
 
@@ -58,8 +59,7 @@
     recover ??= defaultRecoveryStrategy;
     tokens = recover(bytes, tokens, scanner.lineStarts);
   }
-  return new ScannerResult(
-      tokens, scanner.lineStarts, scanner.hasErrors, scanner.errors);
+  return new ScannerResult(tokens, scanner.lineStarts, scanner.hasErrors);
 }
 
 @reflectiveTest
@@ -1807,6 +1807,45 @@
       'handleType S null',
       'endTypeArguments 1 < >'
     ]);
+    expectComplexTypeArg('<S<T<U>>>=',
+        typeArgumentCount: 1,
+        expectedAfter: '=',
+        expectedCalls: [
+          'beginTypeArguments <',
+          'handleIdentifier S typeReference',
+          'beginTypeArguments <',
+          'handleIdentifier T typeReference',
+          'beginTypeArguments <',
+          'handleIdentifier U typeReference',
+          'handleNoTypeArguments >>>=',
+          'handleType U null',
+          'endTypeArguments 1 < >',
+          'handleType T null',
+          'endTypeArguments 1 < >',
+          'handleType S null',
+          'endTypeArguments 1 < >'
+        ]);
+    expectComplexTypeArg('<S<T<U,V>>>=',
+        typeArgumentCount: 1,
+        expectedAfter: '=',
+        expectedCalls: [
+          'beginTypeArguments <',
+          'handleIdentifier S typeReference',
+          'beginTypeArguments <',
+          'handleIdentifier T typeReference',
+          'beginTypeArguments <',
+          'handleIdentifier U typeReference',
+          'handleNoTypeArguments ,',
+          'handleType U null',
+          'handleIdentifier V typeReference',
+          'handleNoTypeArguments >>>=',
+          'handleType V null',
+          'endTypeArguments 2 < >',
+          'handleType T null',
+          'endTypeArguments 1 < >',
+          'handleType S null',
+          'endTypeArguments 1 < >'
+        ]);
     expectComplexTypeArg('<S<Function()>>',
         typeArgumentCount: 1,
         expectedCalls: [
@@ -1876,6 +1915,27 @@
           'handleType S null',
           'endTypeArguments 1 < >'
         ]);
+    expectComplexTypeArg('<S<T<void Function()>>>=',
+        typeArgumentCount: 1,
+        expectedAfter: '=',
+        expectedCalls: [
+          'beginTypeArguments <',
+          'handleIdentifier S typeReference',
+          'beginTypeArguments <',
+          'handleIdentifier T typeReference',
+          'beginTypeArguments <',
+          'handleNoTypeVariables (',
+          'beginFunctionType void', // was 'beginFunctionType Function'
+          'handleVoidKeyword void', // was 'handleNoType <'
+          'beginFormalParameters ( MemberKind.GeneralizedFunctionType',
+          'endFormalParameters 0 ( ) MemberKind.GeneralizedFunctionType',
+          'endFunctionType Function null',
+          'endTypeArguments 1 < >',
+          'handleType T null',
+          'endTypeArguments 1 < >',
+          'handleType S null',
+          'endTypeArguments 1 < >'
+        ]);
   }
 
   void test_computeTypeArg_complex_recovery() {
@@ -2363,6 +2423,33 @@
           'endTypeVariable > 0 extends',
           'endTypeVariables < >'
         ]);
+    expectComplexTypeParam('<T extends List<Map<S, T>>>=',
+        typeArgumentCount: 1,
+        expectedAfter: '=',
+        expectedCalls: [
+          'beginTypeVariables <',
+          'beginMetadataStar T',
+          'endMetadataStar 0',
+          'handleIdentifier T typeVariableDeclaration',
+          'beginTypeVariable T',
+          'handleTypeVariablesDefined > 1',
+          'handleIdentifier List typeReference',
+          'beginTypeArguments <',
+          'handleIdentifier Map typeReference',
+          'beginTypeArguments <',
+          'handleIdentifier S typeReference',
+          'handleNoTypeArguments ,',
+          'handleType S null',
+          'handleIdentifier T typeReference',
+          'handleNoTypeArguments >>>=',
+          'handleType T null',
+          'endTypeArguments 2 < >',
+          'handleType Map null',
+          'endTypeArguments 1 < >',
+          'handleType List null',
+          'endTypeVariable >= 0 extends',
+          'endTypeVariables < >'
+        ]);
   }
 
   void test_computeTypeParam_34850() {
diff --git a/pkg/front_end/test/fasta/testing/suite.dart b/pkg/front_end/test/fasta/testing/suite.dart
index 7a22a03..cc77877 100644
--- a/pkg/front_end/test/fasta/testing/suite.dart
+++ b/pkg/front_end/test/fasta/testing/suite.dart
@@ -131,6 +131,7 @@
   final Uri vm;
   final bool legacyMode;
   final bool onlyCrashes;
+  final bool enableControlFlowCollections;
   final bool enableSetLiterals;
   final bool enableSpreadCollections;
   final bool skipVm;
@@ -156,6 +157,7 @@
       this.legacyMode,
       this.platformBinaries,
       this.onlyCrashes,
+      this.enableControlFlowCollections,
       this.enableSetLiterals,
       this.enableSpreadCollections,
       bool ignoreExpectations,
@@ -246,6 +248,8 @@
     Uri vm = Uri.base.resolveUri(new Uri.file(Platform.resolvedExecutable));
     Uri packages = Uri.base.resolve(".packages");
     bool legacyMode = environment.containsKey(LEGACY_MODE);
+    bool enableControlFlowCollections =
+        environment["enableControlFlowCollections"] != "false" && !legacyMode;
     bool enableSetLiterals = environment["enableSetLiterals"] != "false";
     bool enableSpreadCollections =
         environment["enableSpreadCollections"] != "false" && !legacyMode;
@@ -257,6 +261,8 @@
           ..sdkRoot = sdk
           ..packagesFileUri = packages
           ..experimentalFlags = <ExperimentalFlag, bool>{
+            ExperimentalFlag.controlFlowCollections:
+                enableControlFlowCollections,
             ExperimentalFlag.setLiterals: enableSetLiterals,
             ExperimentalFlag.spreadCollections: enableSpreadCollections,
           });
@@ -279,6 +285,7 @@
             ? computePlatformBinariesLocation(forceBuildDir: true)
             : Uri.base.resolve(platformBinaries),
         onlyCrashes,
+        enableControlFlowCollections,
         enableSetLiterals,
         enableSpreadCollections,
         ignoreExpectations,
@@ -347,6 +354,8 @@
             errors.writeAll(message.plainTextFormatted, "\n");
           }
           ..experimentalFlags = <ExperimentalFlag, bool>{
+            ExperimentalFlag.controlFlowCollections:
+                context.enableControlFlowCollections,
             ExperimentalFlag.setLiterals: context.enableSetLiterals,
             ExperimentalFlag.spreadCollections: context.enableSpreadCollections,
           },
diff --git a/pkg/front_end/test/fasta/type_inference/interface_resolver_test.dart b/pkg/front_end/test/fasta/type_inference/interface_resolver_test.dart
index 0b6ee37..b19a80f 100644
--- a/pkg/front_end/test/fasta/type_inference/interface_resolver_test.dart
+++ b/pkg/front_end/test/fasta/type_inference/interface_resolver_test.dart
@@ -595,7 +595,8 @@
 
   void test_direct_isGenericCovariant() {
     var typeParameter = new TypeParameter('T', objectType);
-    var u = new TypeParameter('U', new TypeParameterType(typeParameter));
+    var u = new TypeParameter('U', new TypeParameterType(typeParameter))
+      ..isGenericCovariantImpl = true;
     var x = new VariableDeclarationJudgment('x', 0,
         type: new TypeParameterType(typeParameter));
     var y = new VariableDeclarationJudgment('y', 0,
diff --git a/pkg/front_end/test/fasta/type_promotion_look_ahead_test.dart b/pkg/front_end/test/fasta/type_promotion_look_ahead_test.dart
index d4a75fb..8b4fe9a 100644
--- a/pkg/front_end/test/fasta/type_promotion_look_ahead_test.dart
+++ b/pkg/front_end/test/fasta/type_promotion_look_ahead_test.dart
@@ -91,7 +91,8 @@
     return context.context
         .runInContext<Result<TypePromotionResult>>((CompilerContext c) async {
       Uri uri = file.file.uri;
-      c.uriToSource[uri] = new Source(file.result.lineStarts, file.file.bytes);
+      c.uriToSource[uri] =
+          new Source(file.result.lineStarts, file.file.bytes, uri, uri);
       StringBuffer buffer = new StringBuffer();
       Parser parser = new Parser(new TestListener(uri, buffer));
       try {
diff --git a/pkg/front_end/test/incremental_load_from_dill_test.dart b/pkg/front_end/test/incremental_load_from_dill_test.dart
index d20b5c7..abdd2f2 100644
--- a/pkg/front_end/test/incremental_load_from_dill_test.dart
+++ b/pkg/front_end/test/incremental_load_from_dill_test.dart
@@ -14,7 +14,10 @@
 import 'package:front_end/src/fasta/compiler_context.dart' show CompilerContext;
 
 import 'package:front_end/src/api_prototype/compiler_options.dart'
-    show CompilerOptions, DiagnosticMessage;
+    show CompilerOptions;
+
+import 'package:front_end/src/api_prototype/diagnostic_message.dart'
+    show DiagnosticMessage, getMessageCodeObject;
 
 import "package:front_end/src/api_prototype/memory_file_system.dart"
     show MemoryFileSystem;
@@ -27,7 +30,10 @@
 
 import 'package:front_end/src/fasta/severity.dart' show Severity;
 
-import 'package:kernel/kernel.dart' show Component, Library;
+import 'package:kernel/binary/ast_from_binary.dart' show BinaryBuilder;
+
+import 'package:kernel/kernel.dart'
+    show Class, Component, EmptyStatement, Field, Library, Procedure;
 
 import 'package:kernel/target/targets.dart' show TargetFlags;
 
@@ -111,6 +117,7 @@
         await newWorldTest(
           map["strong"],
           map["worlds"],
+          map["modules"],
           map["omitPlatform"],
         );
         break;
@@ -180,7 +187,74 @@
   checkIsEqual(normalDillData, initializedDillData);
 }
 
-Future<Null> newWorldTest(bool strong, List worlds, bool omitPlatform) async {
+Future<Map<String, List<int>>> createModules(
+    Map module, final List<int> sdkSummaryData, bool strong) async {
+  final Uri base = Uri.parse("org-dartlang-test:///");
+  final Uri sdkSummary = base.resolve("vm_platform.dill");
+
+  MemoryFileSystem fs = new MemoryFileSystem(base);
+  fs.entityForUri(sdkSummary).writeAsBytesSync(sdkSummaryData);
+
+  // Setup all sources
+  for (Map moduleSources in module.values) {
+    for (String filename in moduleSources.keys) {
+      String data = moduleSources[filename];
+      Uri uri = base.resolve(filename);
+      if (await fs.entityForUri(uri).exists())
+        throw "More than one entry for $filename";
+      fs.entityForUri(uri).writeAsStringSync(data);
+    }
+  }
+
+  Map<String, List<int>> moduleResult = new Map<String, List<int>>();
+
+  for (String moduleName in module.keys) {
+    List<Uri> moduleSources = new List<Uri>();
+    Uri packagesUri;
+    for (String filename in module[moduleName].keys) {
+      Uri uri = base.resolve(filename);
+      if (uri.pathSegments.last == ".packages") {
+        packagesUri = uri;
+      } else {
+        moduleSources.add(uri);
+      }
+    }
+    CompilerOptions options = getOptions(strong);
+    options.fileSystem = fs;
+    options.sdkRoot = null;
+    options.sdkSummary = sdkSummary;
+    options.omitPlatform = true;
+    options.onDiagnostic = (DiagnosticMessage message) {
+      if (getMessageCodeObject(message)?.name == "InferredPackageUri") return;
+      throw message.ansiFormatted;
+    };
+    if (packagesUri != null) {
+      options.packagesFileUri = packagesUri;
+    }
+    TestIncrementalCompiler compiler =
+        new TestIncrementalCompiler(options, moduleSources.first, null);
+    Component c = await compiler.computeDelta(entryPoints: moduleSources);
+    c.computeCanonicalNames();
+    List<Library> wantedLibs = new List<Library>();
+    for (Library lib in c.libraries) {
+      if (moduleSources.contains(lib.importUri) ||
+          moduleSources.contains(lib.fileUri)) {
+        wantedLibs.add(lib);
+      }
+    }
+    if (wantedLibs.length != moduleSources.length) {
+      throw "Module probably not setup right.";
+    }
+    Component result = new Component(libraries: wantedLibs);
+    List<int> resultBytes = util.postProcess(result);
+    moduleResult[moduleName] = resultBytes;
+  }
+
+  return moduleResult;
+}
+
+Future<Null> newWorldTest(
+    bool strong, List worlds, Map modules, bool omitPlatform) async {
   final Uri sdkRoot = computePlatformBinariesLocation(forceBuildDir: true);
   final Uri base = Uri.parse("org-dartlang-test:///");
   final Uri sdkSummary = base.resolve("vm_platform.dill");
@@ -200,7 +274,49 @@
   Map<String, String> sourceFiles;
   CompilerOptions options;
   TestIncrementalCompiler compiler;
+
+  Map<String, List<int>> moduleData;
+  Map<String, Component> moduleComponents;
+  Component sdk;
+  if (modules != null) {
+    moduleData = await createModules(modules, sdkSummaryData, strong);
+    sdk = newestWholeComponent = new Component();
+    new BinaryBuilder(sdkSummaryData, filename: null, disableLazyReading: false)
+        .readComponent(newestWholeComponent);
+  }
+
   for (YamlMap world in worlds) {
+    List<Component> modulesToUse;
+    if (world["modules"] != null) {
+      moduleComponents ??= new Map<String, Component>();
+
+      sdk.adoptChildren();
+      for (Component c in moduleComponents.values) {
+        c.adoptChildren();
+      }
+      sdk.unbindCanonicalNames();
+      sdk.computeCanonicalNames();
+
+      modulesToUse = new List<Component>();
+      for (String moduleName in world["modules"]) {
+        Component moduleComponent = moduleComponents[moduleName];
+        if (moduleComponent != null) {
+          moduleComponent.computeCanonicalNames();
+          modulesToUse.add(moduleComponent);
+        }
+      }
+      for (String moduleName in world["modules"]) {
+        Component moduleComponent = moduleComponents[moduleName];
+        if (moduleComponent == null) {
+          moduleComponent = new Component(nameRoot: sdk.root);
+          new BinaryBuilder(moduleData[moduleName],
+                  filename: null, disableLazyReading: false)
+              .readComponent(moduleComponent);
+          moduleComponents[moduleName] = moduleComponent;
+          modulesToUse.add(moduleComponent);
+        }
+      }
+    }
     bool brandNewWorld = true;
     if (world["worldType"] == "updated") {
       brandNewWorld = false;
@@ -289,13 +405,14 @@
         entries.add(base.resolve(entry));
       }
     }
+    bool outlineOnly = world["outlineOnly"] == true;
     if (brandNewWorld) {
       if (world["fromComponent"] == true) {
         compiler = new TestIncrementalCompiler.fromComponent(
-            options, entries.first, newestWholeComponent);
+            options, entries.first, newestWholeComponent, outlineOnly);
       } else {
-        compiler =
-            new TestIncrementalCompiler(options, entries.first, initializeFrom);
+        compiler = new TestIncrementalCompiler(
+            options, entries.first, initializeFrom, outlineOnly);
       }
     }
 
@@ -308,20 +425,51 @@
       }
     }
 
+    if (modulesToUse != null) {
+      compiler.setModulesToLoadOnNextComputeDelta(modulesToUse);
+      compiler.invalidateAllSources();
+    }
+
     Stopwatch stopwatch = new Stopwatch()..start();
     Component component = await compiler.computeDelta(
         entryPoints: entries,
         fullComponent:
             brandNewWorld ? false : (noFullComponent ? false : true));
+    if (outlineOnly) {
+      for (Library lib in component.libraries) {
+        for (Class c in lib.classes) {
+          for (Procedure p in c.procedures) {
+            if (p.function.body is! EmptyStatement) throw "Got body";
+          }
+        }
+        for (Procedure p in lib.procedures) {
+          if (p.function.body is! EmptyStatement) throw "Got body";
+        }
+      }
+    }
     performErrorAndWarningCheck(
         world, gotError, formattedErrors, gotWarning, formattedWarnings);
     util.throwOnEmptyMixinBodies(component);
+    util.throwOnInsufficientUriToSource(component);
     print("Compile took ${stopwatch.elapsedMilliseconds} ms");
+
+    checkExpectedContent(world, component);
+
     newestWholeComponentData = util.postProcess(component);
     newestWholeComponent = component;
     print("*****\n\ncomponent:\n"
         "${componentToStringSdkFiltered(component)}\n\n\n");
 
+    if (world["uriToSourcesDoesntInclude"] != null) {
+      for (String filename in world["uriToSourcesDoesntInclude"]) {
+        Uri uri = base.resolve(filename);
+        if (component.uriToSource[uri] != null) {
+          throw "Expected no uriToSource for $uri but found "
+              "${component.uriToSource[uri]}";
+        }
+      }
+    }
+
     int nonSyntheticLibraries = countNonSyntheticLibraries(component);
     int nonSyntheticPlatformLibraries =
         countNonSyntheticPlatformLibraries(component);
@@ -424,6 +572,45 @@
   }
 }
 
+void checkExpectedContent(YamlMap world, Component component) {
+  if (world["expectedContent"] != null) {
+    Map<String, Set<String>> actualContent = new Map<String, Set<String>>();
+    for (Library lib in component.libraries) {
+      Set<String> libContent =
+          actualContent[lib.importUri.toString()] = new Set<String>();
+      for (Class c in lib.classes) {
+        libContent.add("Class ${c.name}");
+      }
+      for (Procedure p in lib.procedures) {
+        libContent.add("Procedure ${p.name}");
+      }
+      for (Field f in lib.fields) {
+        libContent.add("Field ${f.name}");
+      }
+    }
+
+    Map expectedContent = world["expectedContent"];
+
+    doThrow() {
+      throw "Expected and actual content not the same.\n"
+          "Expected $expectedContent.\n"
+          "Got $actualContent";
+    }
+
+    if (actualContent.length != expectedContent.length) doThrow();
+    Set<String> missingKeys = actualContent.keys.toSet()
+      ..removeAll(expectedContent.keys);
+    if (missingKeys.isNotEmpty) doThrow();
+    for (String key in expectedContent.keys) {
+      Set<String> expected = new Set<String>.from(expectedContent[key]);
+      Set<String> actual = actualContent[key].toSet();
+      if (expected.length != actual.length) doThrow();
+      actual.removeAll(expected);
+      if (actual.isNotEmpty) doThrow();
+    }
+  }
+}
+
 String componentToStringSdkFiltered(Component node) {
   Component c = new Component();
   List<Uri> dartUris = new List<Uri>();
@@ -534,6 +721,7 @@
       new TestIncrementalCompiler(options, input);
   Component component = await compiler.computeDelta();
   util.throwOnEmptyMixinBodies(component);
+  util.throwOnInsufficientUriToSource(component);
   new File.fromUri(output).writeAsBytesSync(util.postProcess(component));
   return compiler.initializedFromDill;
 }
@@ -549,6 +737,7 @@
   }
   Component initializedComponent = await compiler.computeDelta();
   util.throwOnEmptyMixinBodies(initializedComponent);
+  util.throwOnInsufficientUriToSource(initializedComponent);
   bool result = compiler.initializedFromDill;
   new File.fromUri(output)
       .writeAsBytesSync(util.postProcess(initializedComponent));
@@ -564,6 +753,7 @@
   Component initializedFullComponent =
       await compiler.computeDelta(fullComponent: true);
   util.throwOnEmptyMixinBodies(initializedFullComponent);
+  util.throwOnInsufficientUriToSource(initializedFullComponent);
   Expect.equals(initializedComponent.libraries.length,
       initializedFullComponent.libraries.length);
   Expect.equals(initializedComponent.uriToSource.length,
@@ -575,6 +765,7 @@
 
   Component partialComponent = await compiler.computeDelta();
   util.throwOnEmptyMixinBodies(partialComponent);
+  util.throwOnInsufficientUriToSource(partialComponent);
   actuallyInvalidatedCount = (compiler
           .getFilteredInvalidatedImportUrisForTesting(invalidateUris)
           ?.length ??
@@ -586,6 +777,7 @@
 
   Component emptyComponent = await compiler.computeDelta();
   util.throwOnEmptyMixinBodies(emptyComponent);
+  util.throwOnInsufficientUriToSource(emptyComponent);
 
   List<Uri> fullLibUris =
       initializedComponent.libraries.map((lib) => lib.importUri).toList();
@@ -629,18 +821,20 @@
   }
 
   TestIncrementalCompiler(CompilerOptions options, this.entryPoint,
-      [Uri initializeFrom])
+      [Uri initializeFrom, bool outlineOnly])
       : super(
             new CompilerContext(
                 new ProcessedOptions(options: options, inputs: [entryPoint])),
-            initializeFrom);
+            initializeFrom,
+            outlineOnly);
 
   TestIncrementalCompiler.fromComponent(CompilerOptions options,
-      this.entryPoint, Component componentToInitializeFrom)
+      this.entryPoint, Component componentToInitializeFrom, [bool outlineOnly])
       : super.fromComponent(
             new CompilerContext(
                 new ProcessedOptions(options: options, inputs: [entryPoint])),
-            componentToInitializeFrom);
+            componentToInitializeFrom,
+            outlineOnly);
 
   @override
   void recordInvalidatedImportUrisForTesting(List<Uri> uris) {
@@ -648,6 +842,17 @@
   }
 
   @override
+  void recordNonFullComponentForTesting(Component component) {
+    // It should at least contain the sdk. Slight smoke test.
+    if (!component.libraries
+        .map((lib) => lib.importUri.toString())
+        .contains("dart:core")) {
+      throw "Loaders builder should contain the sdk, "
+          "but didn't even contain dart:core.";
+    }
+  }
+
+  @override
   Future<Component> computeDelta(
       {List<Uri> entryPoints, bool fullComponent = false}) async {
     Component result = await super
diff --git a/pkg/front_end/test/incremental_utils.dart b/pkg/front_end/test/incremental_utils.dart
index 7cb1c0d..f5c07a6 100644
--- a/pkg/front_end/test/incremental_utils.dart
+++ b/pkg/front_end/test/incremental_utils.dart
@@ -5,7 +5,16 @@
 import 'package:front_end/src/fasta/kernel/utils.dart' show serializeComponent;
 
 import 'package:kernel/kernel.dart'
-    show Class, Component, EmptyStatement, Library, Procedure, Reference;
+    show
+        Class,
+        Component,
+        EmptyStatement,
+        FileUriNode,
+        Library,
+        Node,
+        Procedure,
+        RecursiveVisitor,
+        Reference;
 
 List<int> postProcess(Component c) {
   c.libraries.sort((l1, l2) {
@@ -47,3 +56,23 @@
   }
   return empty;
 }
+
+void throwOnInsufficientUriToSource(Component component) {
+  UriFinder uriFinder = new UriFinder();
+  component.accept(uriFinder);
+  Set<Uri> uris = uriFinder.seenUris.toSet();
+  uris.removeAll(component.uriToSource.keys);
+  if (uris.length != 0) {
+    throw "Expected 0 uris with no source, but found ${uris.length} ($uris)";
+  }
+}
+
+class UriFinder extends RecursiveVisitor {
+  Set<Uri> seenUris = new Set<Uri>();
+  defaultNode(Node node) {
+    super.defaultNode(node);
+    if (node is FileUriNode) {
+      seenUris.add(node.fileUri);
+    }
+  }
+}
diff --git a/pkg/front_end/test/scanner_fasta_test.dart b/pkg/front_end/test/scanner_fasta_test.dart
index 1305b34..4345dd7 100644
--- a/pkg/front_end/test/scanner_fasta_test.dart
+++ b/pkg/front_end/test/scanner_fasta_test.dart
@@ -3,7 +3,6 @@
 // BSD-style license that can be found in the LICENSE file.
 import 'dart:convert';
 
-import 'package:analyzer/src/fasta/token_utils.dart';
 import 'package:front_end/src/fasta/fasta_codes.dart';
 import 'package:front_end/src/fasta/scanner.dart' as usedForFuzzTesting;
 import 'package:front_end/src/fasta/scanner.dart';
@@ -52,13 +51,6 @@
 
 @reflectiveTest
 class ScannerTest_Fasta_UTF8 extends ScannerTest_Fasta {
-  @override
-  createScanner(String source) {
-    List<int> encoded = utf8.encode(source).toList(growable: true);
-    encoded.add(0); // Ensure 0 terminted bytes for UTF8 scanner
-    return new fasta.Utf8BytesScanner(encoded, includeComments: true);
-  }
-
   test_invalid_utf8() {
     printBytes(List<int> bytes) {
       var hex = bytes.map((b) => '0x${b.toRadixString(16).toUpperCase()}');
@@ -92,28 +84,25 @@
 
 @reflectiveTest
 class ScannerTest_Fasta extends ScannerTestBase {
-  ScannerTest_Fasta() {
-    usingFasta = true;
-  }
-
-  createScanner(String source) =>
-      new fasta.StringScanner(source, includeComments: true);
-
   @override
   Token scanWithListener(String source, ErrorListener listener,
       {bool lazyAssignmentOperators: false}) {
-    var scanner = createScanner(source);
-    var token = scanner.tokenize();
-    if (scanner.errors != null) {
-      for (LocatedMessage error in scanner.errors) {
-        translateScanError(error.code, error.charOffset, error.length,
+    var result = scanString(source, includeComments: true);
+    var token = result.tokens;
+
+    // Translate error tokens
+    if (result.hasErrors) {
+      while (token is ErrorToken) {
+        translateErrorToken(token,
             (ScannerErrorCode errorCode, int offset, List<Object> arguments) {
           listener.errors.add(new TestError(offset, errorCode, arguments));
         });
+        token = token.next;
       }
     }
-    return new ToAnalyzerTokenStreamConverter_WithListener(listener)
-        .convertTokens(token);
+
+    new Token.eof(-1)..setNext(token);
+    return token;
   }
 
   void test_comments() {
@@ -135,8 +124,7 @@
     ''';
 
     Token scanSource({bool includeComments}) {
-      return new fasta.StringScanner(source, includeComments: includeComments)
-          .tokenize();
+      return scanString(source, includeComments: includeComments).tokens;
     }
 
     int tokenCount = 0;
@@ -212,7 +200,7 @@
     fasta.CommentToken c3;
 
     void prepareTokens() {
-      token = new fasta.StringScanner(code, includeComments: true).tokenize();
+      token = scanString(code, includeComments: true).tokens;
 
       expect(token.type.kind, fasta.IDENTIFIER_TOKEN);
 
@@ -309,8 +297,7 @@
 
   void test_next_previous() {
     const source = 'int a; /*1*/ /*2*/ /*3*/ B f(){if (a < 2) {}}';
-    Token token =
-        new fasta.StringScanner(source, includeComments: true).tokenize();
+    Token token = scanString(source, includeComments: true).tokens;
     while (!token.isEof) {
       expect(token.next.previous, token);
       fasta.CommentToken commentToken = token.precedingComments;
@@ -347,7 +334,7 @@
     expect(openBracket.endToken, same(closeBracket));
     expect(openParen.endToken, same(closeParen));
     listener.assertErrors([
-      new TestError(2, ScannerErrorCode.EXPECTED_TOKEN, ['}']),
+      new TestError(3, ScannerErrorCode.EXPECTED_TOKEN, ['}']),
       new TestError(3, ScannerErrorCode.EXPECTED_TOKEN, [']']),
       new TestError(3, ScannerErrorCode.EXPECTED_TOKEN, [')']),
     ]);
@@ -356,28 +343,7 @@
 
 /// Base class for scanner tests that examine the token stream in Fasta format.
 abstract class ScannerTest_Fasta_Base {
-  List<LocatedMessage> scanErrors;
-
-  Token scan(String source, {int errorCount});
-
-  expectError(Code code, int charOffset, int length) {
-    if (scanErrors == null) {
-      fail('Expected $code but found no errors');
-    }
-    for (LocatedMessage e in scanErrors) {
-      if (e.code == code && e.charOffset == charOffset && e.length == length) {
-        return;
-      }
-    }
-    final msg = new StringBuffer();
-    msg.writeln('Expected:');
-    msg.writeln('  $code at $charOffset, $length');
-    msg.writeln('but found:');
-    for (LocatedMessage e in scanErrors) {
-      msg.writeln('  ${e.code} at ${e.charOffset}, ${e.length}');
-    }
-    fail(msg.toString());
-  }
+  Token scan(String source);
 
   expectToken(Token token, TokenType type, int offset, int length,
       {bool isSynthetic: false, String lexeme}) {
@@ -393,6 +359,10 @@
 
   void test_string_simple_interpolation_missingIdentifier() {
     Token token = scan("'\$x\$'");
+    expect((token as fasta.ErrorToken).errorCode,
+        same(codeUnexpectedDollarInString));
+
+    token = token.next;
     expectToken(token, TokenType.STRING, 0, 1, lexeme: "'");
 
     token = token.next;
@@ -412,21 +382,25 @@
         lexeme: '', isSynthetic: true);
 
     token = token.next;
-    expect((token as fasta.ErrorToken).errorCode,
-        same(codeUnexpectedDollarInString));
-
-    token = token.next;
     expectToken(token, TokenType.STRING, 4, 1, lexeme: "'");
   }
 
   void test_string_simple_unterminated_interpolation_block() {
-    Token token = scan(r'"foo ${bar', errorCount: 1);
-    expectError(codeUnterminatedString, 0, 10);
+    Token token = scan(r'"foo ${bar');
+    expect((token as fasta.ErrorToken).errorCode, same(codeUnmatchedToken));
+    var interpolationStartErrorToken = token as fasta.UnmatchedToken;
+
+    token = token.next;
+    expect((token as fasta.ErrorToken).errorCode, same(codeUnterminatedString));
+    expect((token as fasta.UnterminatedString).start, '"');
+
+    token = token.next;
     expectToken(token, TokenType.STRING, 0, 5, lexeme: '"foo ');
 
     token = token.next;
     expectToken(token, TokenType.STRING_INTERPOLATION_EXPRESSION, 5, 2);
     BeginToken interpolationStart = token;
+    expect(interpolationStartErrorToken.begin, same(interpolationStart));
 
     token = token.next;
     expectToken(token, TokenType.IDENTIFIER, 7, 3, lexeme: 'bar');
@@ -438,24 +412,33 @@
     expect(interpolationStart.endToken, same(token));
 
     token = token.next;
-    expect((token as fasta.ErrorToken).errorCode, same(codeUnmatchedToken));
-    expect((token as fasta.UnmatchedToken).begin, same(interpolationStart));
-
-    token = token.next;
     expectToken(token, TokenType.STRING, 10, 0, isSynthetic: true, lexeme: '"');
-
-    token = token.next;
-    expect(token.isEof, isTrue);
   }
 
   void test_string_simple_unterminated_interpolation_block2() {
-    Token token = scan(r'"foo ${bar(baz[', errorCount: 1);
-    expectError(codeUnterminatedString, 0, 15);
+    Token token = scan(r'"foo ${bar(baz[');
+    expect((token as fasta.ErrorToken).errorCode, same(codeUnmatchedToken));
+    var openSquareBracketErrorToken = token as fasta.UnmatchedToken;
+
+    token = token.next;
+    expect((token as fasta.ErrorToken).errorCode, same(codeUnmatchedToken));
+    var openParenErrorToken = token as fasta.UnmatchedToken;
+
+    token = token.next;
+    expect((token as fasta.ErrorToken).errorCode, same(codeUnmatchedToken));
+    var interpolationStartErrorToken = token as fasta.UnmatchedToken;
+
+    token = token.next;
+    expect((token as fasta.ErrorToken).errorCode, same(codeUnterminatedString));
+    expect((token as fasta.UnterminatedString).start, '"');
+
+    token = token.next;
     expectToken(token, TokenType.STRING, 0, 5, lexeme: '"foo ');
 
     token = token.next;
     expectToken(token, TokenType.STRING_INTERPOLATION_EXPRESSION, 5, 2);
     BeginToken interpolationStart = token;
+    expect(interpolationStartErrorToken.begin, same(interpolationStart));
 
     token = token.next;
     expectToken(token, TokenType.IDENTIFIER, 7, 3, lexeme: 'bar');
@@ -463,6 +446,7 @@
     token = token.next;
     expectToken(token, TokenType.OPEN_PAREN, 10, 1);
     BeginToken openParen = token;
+    expect(openParenErrorToken.begin, same(openParen));
 
     token = token.next;
     expectToken(token, TokenType.IDENTIFIER, 11, 3, lexeme: 'baz');
@@ -470,6 +454,7 @@
     token = token.next;
     expectToken(token, TokenType.OPEN_SQUARE_BRACKET, 14, 1);
     BeginToken openSquareBracket = token;
+    expect(openSquareBracketErrorToken.begin, same(openSquareBracket));
 
     token = token.next;
     expectToken(token, TokenType.CLOSE_SQUARE_BRACKET, 15, 0,
@@ -477,37 +462,29 @@
     expect(openSquareBracket.endToken, same(token));
 
     token = token.next;
-    expect((token as fasta.ErrorToken).errorCode, same(codeUnmatchedToken));
-    expect((token as fasta.UnmatchedToken).begin, same(openSquareBracket));
-
-    token = token.next;
     expectToken(token, TokenType.CLOSE_PAREN, 15, 0,
         isSynthetic: true, lexeme: ')');
     expect(openParen.endToken, same(token));
 
     token = token.next;
-    expect((token as fasta.ErrorToken).errorCode, same(codeUnmatchedToken));
-    expect((token as fasta.UnmatchedToken).begin, same(openParen));
-
-    token = token.next;
     expectToken(token, TokenType.CLOSE_CURLY_BRACKET, 15, 0,
         isSynthetic: true, lexeme: '}');
     expect(interpolationStart.endToken, same(token));
 
     token = token.next;
-    expect((token as fasta.ErrorToken).errorCode, same(codeUnmatchedToken));
-    expect((token as fasta.UnmatchedToken).begin, same(interpolationStart));
-
-    token = token.next;
     expectToken(token, TokenType.STRING, 15, 0, isSynthetic: true, lexeme: '"');
-
-    token = token.next;
-    expect(token.isEof, isTrue);
   }
 
   void test_string_simple_missing_interpolation_identifier() {
-    Token token = scan(r'"foo $', errorCount: 1);
-    expectError(codeUnterminatedString, 0, 6);
+    Token token = scan(r'"foo $');
+    expect((token as fasta.ErrorToken).errorCode,
+        same(codeUnexpectedDollarInString));
+
+    token = token.next;
+    expect((token as fasta.ErrorToken).errorCode, same(codeUnterminatedString));
+    expect((token as fasta.UnterminatedString).start, '"');
+
+    token = token.next;
     expectToken(token, TokenType.STRING, 0, 5, lexeme: '"foo ');
 
     token = token.next;
@@ -518,75 +495,67 @@
         isSynthetic: true, lexeme: '');
 
     token = token.next;
-    expect((token as fasta.ErrorToken).errorCode,
-        same(codeUnexpectedDollarInString));
-
-    token = token.next;
     expectToken(token, TokenType.STRING, 6, 0, isSynthetic: true, lexeme: '"');
-
-    token = token.next;
-    expect(token.isEof, isTrue);
   }
 
   void test_string_multi_unterminated() {
-    Token token = scan("'''string", errorCount: 1);
-    expectError(codeUnterminatedString, 0, 9);
-    expectToken(token, TokenType.STRING, 0, 9,
-        lexeme: "'''string'''", isSynthetic: true);
+    Token token = scan("'''string");
+    expect((token as fasta.ErrorToken).errorCode, same(codeUnterminatedString));
+    expect((token as fasta.UnterminatedString).start, "'''");
 
     token = token.next;
-    expect(token.isEof, isTrue);
+    expectToken(token, TokenType.STRING, 0, 9,
+        lexeme: "'''string'''", isSynthetic: true);
   }
 
   void test_string_raw_multi_unterminated() {
-    Token token = scan("r'''string", errorCount: 1);
-    expectError(codeUnterminatedString, 0, 10);
-    expectToken(token, TokenType.STRING, 0, 10,
-        lexeme: "r'''string'''", isSynthetic: true);
+    Token token = scan("r'''string");
+    expect((token as fasta.ErrorToken).errorCode, same(codeUnterminatedString));
+    expect((token as fasta.UnterminatedString).start, "r'''");
 
     token = token.next;
-    expect(token.isEof, isTrue);
+    expectToken(token, TokenType.STRING, 0, 10,
+        lexeme: "r'''string'''", isSynthetic: true);
   }
 
   void test_string_raw_simple_unterminated_eof() {
-    Token token = scan("r'string", errorCount: 1);
-    expectError(codeUnterminatedString, 0, 8);
-    expectToken(token, TokenType.STRING, 0, 8,
-        lexeme: "r'string'", isSynthetic: true);
+    Token token = scan("r'string");
+    expect((token as fasta.ErrorToken).errorCode, same(codeUnterminatedString));
+    expect((token as fasta.UnterminatedString).start, "r'");
 
     token = token.next;
-    expect(token.isEof, isTrue);
+    expectToken(token, TokenType.STRING, 0, 8,
+        lexeme: "r'string'", isSynthetic: true);
   }
 
   void test_string_raw_simple_unterminated_eol() {
-    Token token = scan("r'string\n", errorCount: 1);
-    expectError(codeUnterminatedString, 0, 8);
-    expectToken(token, TokenType.STRING, 0, 8,
-        lexeme: "r'string'", isSynthetic: true);
+    Token token = scan("r'string\n");
+    expect((token as fasta.ErrorToken).errorCode, same(codeUnterminatedString));
+    expect((token as fasta.UnterminatedString).start, "r'");
 
     token = token.next;
-    expect(token.isEof, isTrue);
+    expectToken(token, TokenType.STRING, 0, 8,
+        lexeme: "r'string'", isSynthetic: true);
   }
 
   void test_string_simple_unterminated_eof() {
-    Token token = scan("'string", errorCount: 1);
-    expectError(codeUnterminatedString, 0, 7);
-    expectToken(token, TokenType.STRING, 0, 7,
-        lexeme: "'string'", isSynthetic: true);
+    Token token = scan("'string");
+    expect((token as fasta.ErrorToken).errorCode, same(codeUnterminatedString));
+    expect((token as fasta.UnterminatedString).start, "'");
 
     token = token.next;
-    expect(token.isEof, isTrue);
+    expectToken(token, TokenType.STRING, 0, 7,
+        lexeme: "'string'", isSynthetic: true);
   }
 
   void test_string_simple_unterminated_eol() {
-    Token token = scan("'string\n", errorCount: 1);
-    expectError(codeUnterminatedString, 0, 7);
-
-    expectToken(token, TokenType.STRING, 0, 7,
-        lexeme: "'string'", isSynthetic: true);
+    Token token = scan("'string\n");
+    expect((token as fasta.ErrorToken).errorCode, same(codeUnterminatedString));
+    expect((token as fasta.UnterminatedString).start, "'");
 
     token = token.next;
-    expect(token.isEof, isTrue);
+    expectToken(token, TokenType.STRING, 0, 7,
+        lexeme: "'string'", isSynthetic: true);
   }
 
   void test_match_angle_brackets() {
@@ -745,25 +714,23 @@
 /// Scanner tests that exercise the Fasta scanner directly.
 @reflectiveTest
 class ScannerTest_Fasta_Direct_UTF8 extends ScannerTest_Fasta_Direct {
-  createScanner(String source, {bool includeComments}) {
+  ScannerResult scanSource(source, {includeComments: true}) {
     List<int> encoded = utf8.encode(source).toList(growable: true);
     encoded.add(0); // Ensure 0 terminted bytes for UTF8 scanner
-    return new fasta.Utf8BytesScanner(encoded,
-        includeComments: includeComments);
+    return usedForFuzzTesting.scan(encoded, includeComments: includeComments);
   }
 }
 
 /// Scanner tests that exercise the Fasta scanner directly.
 @reflectiveTest
 class ScannerTest_Fasta_Direct extends ScannerTest_Fasta_Base {
-  createScanner(String source, {bool includeComments}) =>
-      new fasta.StringScanner(source, includeComments: includeComments);
+  ScannerResult scanSource(source, {includeComments: true}) =>
+      scanString(source, includeComments: includeComments);
 
   @override
-  Token scan(String source, {int errorCount}) {
-    Scanner scanner = createScanner(source, includeComments: true);
-    scanner.reportErrors = true;
-    final Token first = scanner.tokenize();
+  Token scan(String source) {
+    var result = scanSource(source, includeComments: true);
+    final Token first = result.tokens;
     Token token = first;
     while (!token.isEof) {
       Token next = token.next;
@@ -774,83 +741,54 @@
       }
       token = next;
     }
-    scanErrors = scanner.errors;
-    expect(scanErrors, errorCount == null ? isNull : hasLength(errorCount));
     return first;
   }
 
   void test_linestarts() {
-    var scanner = createScanner("var\r\ni\n=\n1;\n");
-    var token = scanner.tokenize();
+    var result = scanSource("var\r\ni\n=\n1;\n");
+    var token = result.tokens;
     expect(token.lexeme, 'var');
-    var lineStarts = scanner.lineStarts;
+    var lineStarts = result.lineStarts;
     expect(lineStarts, orderedEquals([0, 5, 7, 9, 12, 13]));
   }
 
   void test_linestarts_synthetic_string() {
-    var scanner = createScanner("var\r\ns\n=\n'eh'\n'eh\n;\n");
-    Token firstToken = scanner.tokenize();
-    expect(firstToken.lexeme, 'var');
-    var lineStarts = scanner.lineStarts;
+    var result = scanSource("var\r\ns\n=\n'eh'\n'eh\n;\n");
+    var lineStarts = result.lineStarts;
     expect(lineStarts, orderedEquals([0, 5, 7, 9, 14, 18, 20, 21]));
-    var token = firstToken;
+
+    Token token = result.tokens;
+    expect(token.charOffset, 14, reason: 'error token : $token, ${token.type}');
+    expect(token.charCount, 3, reason: 'error token : $token, ${token.type}');
+
+    token = token.next;
+    expect(token.lexeme, 'var');
     int index = 0;
     while (!token.isEof) {
-      if (token is fasta.ErrorToken) {
-        expect(token.charOffset, 14,
-            reason: 'error token : $token, ${token.type}');
-        expect(token.charCount, 3,
-            reason: 'error token : $token, ${token.type}');
-      } else {
-        expect(token.charOffset, lineStarts[index],
-            reason: 'token # $index : $token, ${token.type}');
-        ++index;
-      }
+      expect(token.charOffset, lineStarts[index],
+          reason: 'token # $index : $token, ${token.type}');
+      ++index;
       token = token.next;
     }
   }
 
   void test_linestarts_synthetic_string_utf8() {
-    var scanner = createScanner("var\r\ns\n=\n'éh'\n'éh\n;\n");
-    Token firstToken = scanner.tokenize();
-    expect(firstToken.lexeme, 'var');
-    var lineStarts = scanner.lineStarts;
+    var result = scanSource("var\r\ns\n=\n'éh'\n'éh\n;\n");
+    var lineStarts = result.lineStarts;
     expect(lineStarts, orderedEquals([0, 5, 7, 9, 14, 18, 20, 21]));
-    var token = firstToken;
+
+    Token token = result.tokens;
+    expect(token, const TypeMatcher<ErrorToken>());
+    expect(token.charOffset, 14, reason: 'token # 0 : $token, ${token.type}');
+
+    token = token.next;
+    expect(token.lexeme, 'var');
     int index = 0;
     while (!token.isEof) {
-      if (token is! fasta.ErrorToken) {
-        expect(token.charOffset, lineStarts[index],
-            reason: 'token # $index : $token, ${token.type}');
-        ++index;
-      }
+      expect(token.charOffset, lineStarts[index],
+          reason: 'token # $index : $token, ${token.type}');
+      ++index;
       token = token.next;
     }
   }
 }
-
-/// Override of [ToAnalyzerTokenStreamConverter] that verifies that there are no
-/// errors.
-class ToAnalyzerTokenStreamConverter_NoErrors
-    extends ToAnalyzerTokenStreamConverter {
-  @override
-  void reportError(
-      ScannerErrorCode errorCode, int offset, List<Object> arguments) {
-    fail('Unexpected error: $errorCode, $offset, $arguments');
-  }
-}
-
-/// Override of [ToAnalyzerTokenStreamConverter] that records errors in an
-/// [ErrorListener].
-class ToAnalyzerTokenStreamConverter_WithListener
-    extends ToAnalyzerTokenStreamConverter {
-  final ErrorListener _listener;
-
-  ToAnalyzerTokenStreamConverter_WithListener(this._listener);
-
-  @override
-  void reportError(
-      ScannerErrorCode errorCode, int offset, List<Object> arguments) {
-    _listener.errors.add(new TestError(offset, errorCode, arguments));
-  }
-}
diff --git a/pkg/front_end/test/scanner_replacement_test.dart b/pkg/front_end/test/scanner_replacement_test.dart
index aa227f1..ea881a8 100644
--- a/pkg/front_end/test/scanner_replacement_test.dart
+++ b/pkg/front_end/test/scanner_replacement_test.dart
@@ -31,10 +31,6 @@
 /// stream conversion.
 @reflectiveTest
 class ScannerTest_Replacement extends ScannerTestBase {
-  ScannerTest_Replacement() {
-    usingFasta = true;
-  }
-
   @override
   analyzer.Token scanWithListener(String source, ErrorListener listener,
       {bool lazyAssignmentOperators: false}) {
diff --git a/pkg/front_end/test/scanner_test.dart b/pkg/front_end/test/scanner_test.dart
index 67a212b..3a0bf75 100644
--- a/pkg/front_end/test/scanner_test.dart
+++ b/pkg/front_end/test/scanner_test.dart
@@ -79,8 +79,6 @@
 }
 
 abstract class ScannerTestBase {
-  bool usingFasta = false;
-
   Token scanWithListener(String source, ErrorListener listener,
       {bool lazyAssignmentOperators: false});
 
@@ -340,20 +338,14 @@
     var expectedErrors = [
       new TestError(9, ScannerErrorCode.UNTERMINATED_STRING_LITERAL, null),
     ];
-    if (usingFasta) {
-      // fasta inserts synthetic closers
-      expectedTokens.addAll([
-        new SyntheticToken(TokenType.CLOSE_CURLY_BRACKET, 10),
-        new SyntheticStringToken(TokenType.STRING, "\"", 10, 0),
-      ]);
-      expectedErrors.addAll([
-        new TestError(10, ScannerErrorCode.EXPECTED_TOKEN, ['}']),
-      ]);
-    } else {
-      expectedTokens.addAll([
-        new StringToken(TokenType.STRING, "", 10),
-      ]);
-    }
+    // fasta inserts synthetic closers
+    expectedTokens.addAll([
+      new SyntheticToken(TokenType.CLOSE_CURLY_BRACKET, 10),
+      new SyntheticStringToken(TokenType.STRING, "\"", 10, 0),
+    ]);
+    expectedErrors.addAll([
+      new TestError(10, ScannerErrorCode.EXPECTED_TOKEN, ['}']),
+    ]);
     ErrorListener listener = new ErrorListener();
     Token token = scanWithListener("\"foo \${bar", listener);
     listener.assertErrors(expectedErrors);
@@ -711,32 +703,23 @@
     ErrorListener listener = new ErrorListener();
     BeginToken openBracket = scanWithListener('[(])', listener);
     BeginToken openParen = openBracket.next;
-    if (usingFasta) {
-      // When openers and closers are mismatched
-      // fasta favors considering the opener to be mismatched,
-      // and inserts synthetic closers as needed.
-      // `[(])` is parsed as `[()])` where the first `)` is synthetic
-      // and the trailing `)` is unmatched.
-      var closeParen = openParen.next;
-      expect(closeParen.isSynthetic, isTrue);
-      var closeBracket = closeParen.next;
-      expect(closeBracket.isSynthetic, isFalse);
-      var closeParen2 = closeBracket.next;
-      expect(closeParen2.isSynthetic, isFalse);
-      expect(closeParen2.next.type, TokenType.EOF);
-      expect(openBracket.endToken, same(closeBracket));
-      expect(openParen.endToken, same(closeParen));
-      listener.assertErrors([
-        new TestError(2, ScannerErrorCode.EXPECTED_TOKEN, [')']),
-      ]);
-    } else {
-      var closeBracket = openParen.next;
-      var closeParen = closeBracket.next;
-      expect(closeParen.next.type, TokenType.EOF);
-      expect(openBracket.endToken, isNull);
-      expect(openParen.endToken, same(closeParen));
-      listener.assertNoErrors();
-    }
+    // When openers and closers are mismatched
+    // fasta favors considering the opener to be mismatched,
+    // and inserts synthetic closers as needed.
+    // `[(])` is parsed as `[()])` where the first `)` is synthetic
+    // and the trailing `)` is unmatched.
+    var closeParen = openParen.next;
+    expect(closeParen.isSynthetic, isTrue);
+    var closeBracket = closeParen.next;
+    expect(closeBracket.isSynthetic, isFalse);
+    var closeParen2 = closeBracket.next;
+    expect(closeParen2.isSynthetic, isFalse);
+    expect(closeParen2.next.type, TokenType.EOF);
+    expect(openBracket.endToken, same(closeBracket));
+    expect(openParen.endToken, same(closeParen));
+    listener.assertErrors([
+      new TestError(2, ScannerErrorCode.EXPECTED_TOKEN, [')']),
+    ]);
   }
 
   void test_mismatched_opener() {
@@ -746,28 +729,20 @@
     ErrorListener listener = new ErrorListener();
     BeginToken openParen = scanWithListener('([)', listener);
     BeginToken openBracket = openParen.next;
-    if (usingFasta) {
-      // When openers and closers are mismatched,
-      // fasta favors considering the opener to be mismatched
-      // and inserts synthetic closers as needed.
-      // `([)` is scanned as `([])` where `]` is synthetic.
-      var closeBracket = openBracket.next;
-      expect(closeBracket.isSynthetic, isTrue);
-      var closeParen = closeBracket.next;
-      expect(closeParen.isSynthetic, isFalse);
-      expect(closeParen.next.type, TokenType.EOF);
-      expect(openBracket.endToken, closeBracket);
-      expect(openParen.endToken, closeParen);
-      listener.assertErrors([
-        new TestError(2, ScannerErrorCode.EXPECTED_TOKEN, [']']),
-      ]);
-    } else {
-      var closeParen = openBracket.next;
-      expect(closeParen.next.type, TokenType.EOF);
-      expect(openParen.endToken, isNull);
-      expect(openBracket.endToken, isNull);
-      listener.assertNoErrors();
-    }
+    // When openers and closers are mismatched,
+    // fasta favors considering the opener to be mismatched
+    // and inserts synthetic closers as needed.
+    // `([)` is scanned as `([])` where `]` is synthetic.
+    var closeBracket = openBracket.next;
+    expect(closeBracket.isSynthetic, isTrue);
+    var closeParen = closeBracket.next;
+    expect(closeParen.isSynthetic, isFalse);
+    expect(closeParen.next.type, TokenType.EOF);
+    expect(openBracket.endToken, closeBracket);
+    expect(openParen.endToken, closeParen);
+    listener.assertErrors([
+      new TestError(2, ScannerErrorCode.EXPECTED_TOKEN, [']']),
+    ]);
   }
 
   void test_mismatched_opener_in_interpolation() {
@@ -958,16 +933,10 @@
 
   void test_string_multi_unterminated() {
     List<Token> expectedTokens = [];
-    if (usingFasta) {
-      // Fasta inserts synthetic closers.
-      expectedTokens.addAll([
-        new SyntheticStringToken(TokenType.STRING, "'''string'''", 0, 9),
-      ]);
-    } else {
-      expectedTokens.addAll([
-        new StringToken(TokenType.STRING, "'''string", 0),
-      ]);
-    }
+    // Fasta inserts synthetic closers.
+    expectedTokens.addAll([
+      new SyntheticStringToken(TokenType.STRING, "'''string'''", 0, 9),
+    ]);
   }
 
   void test_string_multi_unterminated_interpolation_block() {
@@ -979,20 +948,14 @@
     var expectedErrors = [
       new TestError(8, ScannerErrorCode.UNTERMINATED_STRING_LITERAL, null),
     ];
-    if (usingFasta) {
-      // Fasta inserts synthetic closers.
-      expectedTokens.addAll([
-        new SyntheticToken(TokenType.CLOSE_CURLY_BRACKET, 9),
-        new SyntheticStringToken(TokenType.STRING, "'''", 9, 0),
-      ]);
-      expectedErrors.addAll([
-        new TestError(9, ScannerErrorCode.EXPECTED_TOKEN, ['}']),
-      ]);
-    } else {
-      expectedTokens.addAll([
-        new StringToken(TokenType.STRING, "", 9),
-      ]);
-    }
+    // Fasta inserts synthetic closers.
+    expectedTokens.addAll([
+      new SyntheticToken(TokenType.CLOSE_CURLY_BRACKET, 9),
+      new SyntheticStringToken(TokenType.STRING, "'''", 9, 0),
+    ]);
+    expectedErrors.addAll([
+      new TestError(9, ScannerErrorCode.EXPECTED_TOKEN, ['}']),
+    ]);
     ErrorListener listener = new ErrorListener();
     Token token = scanWithListener("'''\${name", listener);
     listener.assertErrors(expectedErrors);
@@ -1005,16 +968,10 @@
       new StringToken(TokenType.STRING_INTERPOLATION_IDENTIFIER, "\$", 3),
       new StringToken(TokenType.IDENTIFIER, "name", 4),
     ];
-    if (usingFasta) {
-      // Fasta inserts synthetic closers.
-      expectedTokens.addAll([
-        new SyntheticStringToken(TokenType.STRING, "'''", 8, 0),
-      ]);
-    } else {
-      expectedTokens.addAll([
-        new StringToken(TokenType.STRING, "", 8),
-      ]);
-    }
+    // Fasta inserts synthetic closers.
+    expectedTokens.addAll([
+      new SyntheticStringToken(TokenType.STRING, "'''", 8, 0),
+    ]);
     _assertErrorAndTokens(ScannerErrorCode.UNTERMINATED_STRING_LITERAL, 7,
         "'''\$name", expectedTokens);
   }
@@ -1030,16 +987,10 @@
   void test_string_raw_multi_unterminated() {
     String source = "r'''string";
     List<Token> expectedTokens = [];
-    if (usingFasta) {
-      // Fasta inserts synthetic closers.
-      expectedTokens.addAll([
-        new SyntheticStringToken(TokenType.STRING, "r'''string'''", 0, 10),
-      ]);
-    } else {
-      expectedTokens.addAll([
-        new StringToken(TokenType.STRING, "r'''string", 0),
-      ]);
-    }
+    // Fasta inserts synthetic closers.
+    expectedTokens.addAll([
+      new SyntheticStringToken(TokenType.STRING, "r'''string'''", 0, 10),
+    ]);
     _assertErrorAndTokens(ScannerErrorCode.UNTERMINATED_STRING_LITERAL, 9,
         source, expectedTokens);
   }
@@ -1055,16 +1006,10 @@
   void test_string_raw_simple_unterminated_eof() {
     String source = "r'string";
     List<Token> expectedTokens = [];
-    if (usingFasta) {
-      // Fasta inserts synthetic closers.
-      expectedTokens.addAll([
-        new SyntheticStringToken(TokenType.STRING, "r'string'", 0, 8),
-      ]);
-    } else {
-      expectedTokens.addAll([
-        new StringToken(TokenType.STRING, "r'string", 0),
-      ]);
-    }
+    // Fasta inserts synthetic closers.
+    expectedTokens.addAll([
+      new SyntheticStringToken(TokenType.STRING, "r'string'", 0, 8),
+    ]);
     _assertErrorAndTokens(ScannerErrorCode.UNTERMINATED_STRING_LITERAL, 7,
         source, expectedTokens);
   }
@@ -1072,18 +1017,12 @@
   void test_string_raw_simple_unterminated_eol() {
     String source = "r'string\n";
     List<Token> expectedTokens = [];
-    if (usingFasta) {
-      // Fasta inserts synthetic closers.
-      expectedTokens.addAll([
-        new SyntheticStringToken(TokenType.STRING, "r'string'", 0, 8),
-      ]);
-    } else {
-      expectedTokens.addAll([
-        new StringToken(TokenType.STRING, "r'string", 0),
-      ]);
-    }
-    _assertErrorAndTokens(ScannerErrorCode.UNTERMINATED_STRING_LITERAL,
-        usingFasta ? 7 : 8, source, expectedTokens);
+    // Fasta inserts synthetic closers.
+    expectedTokens.addAll([
+      new SyntheticStringToken(TokenType.STRING, "r'string'", 0, 8),
+    ]);
+    _assertErrorAndTokens(ScannerErrorCode.UNTERMINATED_STRING_LITERAL, 7,
+        source, expectedTokens);
   }
 
   void test_string_simple_double() {
@@ -1163,20 +1102,14 @@
       new StringToken(TokenType.STRING_INTERPOLATION_IDENTIFIER, "\$", 3),
     ];
     var expectedErrors = <TestError>[];
-    if (usingFasta) {
-      // Fasta scanner inserts a synthetic identifier
-      expectedTokens.addAll([
-        new SyntheticStringToken(TokenType.IDENTIFIER, "", 4, 0),
-        new StringToken(TokenType.STRING, "'", 4),
-      ]);
-      expectedErrors.addAll([
-        new TestError(4, ScannerErrorCode.MISSING_IDENTIFIER, null),
-      ]);
-    } else {
-      expectedTokens.addAll([
-        new StringToken(TokenType.STRING, "'", 4),
-      ]);
-    }
+    // Fasta scanner inserts a synthetic identifier
+    expectedTokens.addAll([
+      new SyntheticStringToken(TokenType.IDENTIFIER, "", 4, 0),
+      new StringToken(TokenType.STRING, "'", 4),
+    ]);
+    expectedErrors.addAll([
+      new TestError(4, ScannerErrorCode.MISSING_IDENTIFIER, null),
+    ]);
     ErrorListener listener = new ErrorListener();
     Token token = scanWithListener("'\$x\$'", listener);
     listener.assertErrors(expectedErrors);
@@ -1189,14 +1122,12 @@
       new StringToken(TokenType.STRING_INTERPOLATION_IDENTIFIER, "\$", 1),
     ];
     var expectedErrors = <TestError>[];
-    if (usingFasta) {
-      expectedTokens.addAll([
-        new SyntheticStringToken(TokenType.IDENTIFIER, "", 2),
-      ]);
-      expectedErrors.addAll([
-        new TestError(2, ScannerErrorCode.MISSING_IDENTIFIER, null),
-      ]);
-    }
+    expectedTokens.addAll([
+      new SyntheticStringToken(TokenType.IDENTIFIER, "", 2),
+    ]);
+    expectedErrors.addAll([
+      new TestError(2, ScannerErrorCode.MISSING_IDENTIFIER, null),
+    ]);
     expectedTokens.addAll([
       new StringToken(TokenType.STRING, "1'", 2),
     ]);
@@ -1213,16 +1144,10 @@
   void test_string_simple_unterminated_eof() {
     String source = "'string";
     List<Token> expectedTokens = [];
-    if (usingFasta) {
-      // Fasta inserts synthetic closers.
-      expectedTokens.addAll([
-        new SyntheticStringToken(TokenType.STRING, "'string'", 0, 7),
-      ]);
-    } else {
-      expectedTokens.addAll([
-        new StringToken(TokenType.STRING, "'string", 0),
-      ]);
-    }
+    // Fasta inserts synthetic closers.
+    expectedTokens.addAll([
+      new SyntheticStringToken(TokenType.STRING, "'string'", 0, 7),
+    ]);
     _assertErrorAndTokens(ScannerErrorCode.UNTERMINATED_STRING_LITERAL, 6,
         source, expectedTokens);
   }
@@ -1230,18 +1155,12 @@
   void test_string_simple_unterminated_eol() {
     String source = "'string\r";
     List<Token> expectedTokens = [];
-    if (usingFasta) {
-      // Fasta inserts synthetic closers.
-      expectedTokens.addAll([
-        new SyntheticStringToken(TokenType.STRING, "'string'", 0, 7),
-      ]);
-    } else {
-      expectedTokens.addAll([
-        new StringToken(TokenType.STRING, "'string", 0),
-      ]);
-    }
-    _assertErrorAndTokens(ScannerErrorCode.UNTERMINATED_STRING_LITERAL,
-        usingFasta ? 6 : 7, source, expectedTokens);
+    // Fasta inserts synthetic closers.
+    expectedTokens.addAll([
+      new SyntheticStringToken(TokenType.STRING, "'string'", 0, 7),
+    ]);
+    _assertErrorAndTokens(ScannerErrorCode.UNTERMINATED_STRING_LITERAL, 6,
+        source, expectedTokens);
   }
 
   void test_string_simple_unterminated_interpolation_block() {
@@ -1253,20 +1172,14 @@
     List<TestError> expectedErrors = [
       new TestError(6, ScannerErrorCode.UNTERMINATED_STRING_LITERAL, null),
     ];
-    if (usingFasta) {
-      // Fasta inserts synthetic closers.
-      expectedTokens.addAll([
-        new SyntheticToken(TokenType.CLOSE_CURLY_BRACKET, 7),
-        new SyntheticStringToken(TokenType.STRING, "'", 7, 0),
-      ]);
-      expectedErrors.addAll([
-        new TestError(7, ScannerErrorCode.EXPECTED_TOKEN, ['}']),
-      ]);
-    } else {
-      expectedTokens.addAll([
-        new StringToken(TokenType.STRING, "", 7),
-      ]);
-    }
+    // Fasta inserts synthetic closers.
+    expectedTokens.addAll([
+      new SyntheticToken(TokenType.CLOSE_CURLY_BRACKET, 7),
+      new SyntheticStringToken(TokenType.STRING, "'", 7, 0),
+    ]);
+    expectedErrors.addAll([
+      new TestError(7, ScannerErrorCode.EXPECTED_TOKEN, ['}']),
+    ]);
     ErrorListener listener = new ErrorListener();
     Token token = scanWithListener("'\${name", listener);
     listener.assertErrors(expectedErrors);
@@ -1279,16 +1192,10 @@
       new StringToken(TokenType.STRING_INTERPOLATION_IDENTIFIER, "\$", 1),
       new StringToken(TokenType.IDENTIFIER, "name", 2),
     ];
-    if (usingFasta) {
-      // Fasta inserts synthetic closers.
-      expectedTokens.addAll([
-        new SyntheticStringToken(TokenType.STRING, "'", 6, 0),
-      ]);
-    } else {
-      expectedTokens.addAll([
-        new StringToken(TokenType.STRING, "", 6),
-      ]);
-    }
+    // Fasta inserts synthetic closers.
+    expectedTokens.addAll([
+      new SyntheticStringToken(TokenType.STRING, "'", 6, 0),
+    ]);
     _assertErrorAndTokens(ScannerErrorCode.UNTERMINATED_STRING_LITERAL, 5,
         "'\$name", expectedTokens);
   }
@@ -1423,8 +1330,7 @@
       {bool lazyAssignmentOperators: false}) {
     // Fasta generates errors for unmatched '{', '[', etc
     Token originalToken = _scan(source,
-        lazyAssignmentOperators: lazyAssignmentOperators,
-        ignoreErrors: usingFasta);
+        lazyAssignmentOperators: lazyAssignmentOperators, ignoreErrors: true);
     expect(originalToken, isNotNull);
     expect(originalToken.type, expectedType);
     expect(originalToken.offset, 0);
@@ -1437,8 +1343,7 @@
     } else if (expectedType == TokenType.SINGLE_LINE_COMMENT) {
       // Adding space to an end-of-line comment changes the comment.
       Token tokenWithSpaces = _scan(" $source",
-          lazyAssignmentOperators: lazyAssignmentOperators,
-          ignoreErrors: usingFasta);
+          lazyAssignmentOperators: lazyAssignmentOperators, ignoreErrors: true);
       expect(tokenWithSpaces, isNotNull);
       expect(tokenWithSpaces.type, expectedType);
       expect(tokenWithSpaces.offset, 1);
@@ -1448,16 +1353,14 @@
     } else if (expectedType == TokenType.INT ||
         expectedType == TokenType.DOUBLE) {
       Token tokenWithLowerD = _scan("${source}d",
-          lazyAssignmentOperators: lazyAssignmentOperators,
-          ignoreErrors: usingFasta);
+          lazyAssignmentOperators: lazyAssignmentOperators, ignoreErrors: true);
       expect(tokenWithLowerD, isNotNull);
       expect(tokenWithLowerD.type, expectedType);
       expect(tokenWithLowerD.offset, 0);
       expect(tokenWithLowerD.length, source.length);
       expect(tokenWithLowerD.lexeme, source);
       Token tokenWithUpperD = _scan("${source}D",
-          lazyAssignmentOperators: lazyAssignmentOperators,
-          ignoreErrors: usingFasta);
+          lazyAssignmentOperators: lazyAssignmentOperators, ignoreErrors: true);
       expect(tokenWithUpperD, isNotNull);
       expect(tokenWithUpperD.type, expectedType);
       expect(tokenWithUpperD.offset, 0);
@@ -1465,8 +1368,7 @@
       expect(tokenWithUpperD.lexeme, source);
     }
     Token tokenWithSpaces = _scan(" $source ",
-        lazyAssignmentOperators: lazyAssignmentOperators,
-        ignoreErrors: usingFasta);
+        lazyAssignmentOperators: lazyAssignmentOperators, ignoreErrors: true);
     expect(tokenWithSpaces, isNotNull);
     expect(tokenWithSpaces.type, expectedType);
     expect(tokenWithSpaces.offset, 1);
diff --git a/pkg/front_end/testcases/argument_mismatch.dart b/pkg/front_end/testcases/argument_mismatch.dart
index 61a678e..7cce446 100644
--- a/pkg/front_end/testcases/argument_mismatch.dart
+++ b/pkg/front_end/testcases/argument_mismatch.dart
@@ -2,9 +2,7 @@
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
 
-/*@testedFeatures=warning,context*/
-
-/*@context=CandidateFound*/ foo() {}
+foo() {}
 
 test() {
   /*@warning=MethodNotFound*/ foo(null);
diff --git a/pkg/front_end/testcases/argument_mismatch.dart.legacy.expect b/pkg/front_end/testcases/argument_mismatch.dart.legacy.expect
index d836fc0..ac488e4 100644
--- a/pkg/front_end/testcases/argument_mismatch.dart.legacy.expect
+++ b/pkg/front_end/testcases/argument_mismatch.dart.legacy.expect
@@ -2,13 +2,13 @@
 //
 // Problems in library:
 //
-// pkg/front_end/testcases/argument_mismatch.dart:10:34: Warning: Too many positional arguments: 0 allowed, but 1 found.
+// pkg/front_end/testcases/argument_mismatch.dart:8:34: Warning: Too many positional arguments: 0 allowed, but 1 found.
 // Try removing the extra positional arguments.
 //   /*@warning=MethodNotFound*/ foo(null);
 //                                  ^
-// pkg/front_end/testcases/argument_mismatch.dart:7:29: Context: Found this candidate, but the arguments don't match.
-// /*@context=CandidateFound*/ foo() {}
-//                             ^^^
+// pkg/front_end/testcases/argument_mismatch.dart:5:1: Context: Found this candidate, but the arguments don't match.
+// foo() {}
+// ^^^
 //
 import self as self;
 import "dart:core" as core;
diff --git a/pkg/front_end/testcases/argument_mismatch.dart.legacy.transformed.expect b/pkg/front_end/testcases/argument_mismatch.dart.legacy.transformed.expect
index d836fc0..ac488e4 100644
--- a/pkg/front_end/testcases/argument_mismatch.dart.legacy.transformed.expect
+++ b/pkg/front_end/testcases/argument_mismatch.dart.legacy.transformed.expect
@@ -2,13 +2,13 @@
 //
 // Problems in library:
 //
-// pkg/front_end/testcases/argument_mismatch.dart:10:34: Warning: Too many positional arguments: 0 allowed, but 1 found.
+// pkg/front_end/testcases/argument_mismatch.dart:8:34: Warning: Too many positional arguments: 0 allowed, but 1 found.
 // Try removing the extra positional arguments.
 //   /*@warning=MethodNotFound*/ foo(null);
 //                                  ^
-// pkg/front_end/testcases/argument_mismatch.dart:7:29: Context: Found this candidate, but the arguments don't match.
-// /*@context=CandidateFound*/ foo() {}
-//                             ^^^
+// pkg/front_end/testcases/argument_mismatch.dart:5:1: Context: Found this candidate, but the arguments don't match.
+// foo() {}
+// ^^^
 //
 import self as self;
 import "dart:core" as core;
diff --git a/pkg/front_end/testcases/bounds_check_depends_on_inference.dart.legacy.expect b/pkg/front_end/testcases/bounds_check_depends_on_inference.dart.legacy.expect
index 92d0def..abff6cf 100644
--- a/pkg/front_end/testcases/bounds_check_depends_on_inference.dart.legacy.expect
+++ b/pkg/front_end/testcases/bounds_check_depends_on_inference.dart.legacy.expect
@@ -6,7 +6,7 @@
   synthetic constructor •() → self::A<self::A::X>
     : super core::Object::•()
     ;
-  method bar<Y extends self::A::X = dynamic>() → dynamic
+  method bar<generic-covariant-impl Y extends self::A::X = dynamic>() → dynamic
     return null;
 }
 class B extends core::Object {
diff --git a/pkg/front_end/testcases/bounds_check_depends_on_inference.dart.legacy.transformed.expect b/pkg/front_end/testcases/bounds_check_depends_on_inference.dart.legacy.transformed.expect
index 92d0def..abff6cf 100644
--- a/pkg/front_end/testcases/bounds_check_depends_on_inference.dart.legacy.transformed.expect
+++ b/pkg/front_end/testcases/bounds_check_depends_on_inference.dart.legacy.transformed.expect
@@ -6,7 +6,7 @@
   synthetic constructor •() → self::A<self::A::X>
     : super core::Object::•()
     ;
-  method bar<Y extends self::A::X = dynamic>() → dynamic
+  method bar<generic-covariant-impl Y extends self::A::X = dynamic>() → dynamic
     return null;
 }
 class B extends core::Object {
diff --git a/pkg/front_end/testcases/bounds_check_depends_on_inference.dart.outline.expect b/pkg/front_end/testcases/bounds_check_depends_on_inference.dart.outline.expect
index ec400af..8a919db 100644
--- a/pkg/front_end/testcases/bounds_check_depends_on_inference.dart.outline.expect
+++ b/pkg/front_end/testcases/bounds_check_depends_on_inference.dart.outline.expect
@@ -5,7 +5,7 @@
 class A<X extends core::Object = dynamic> extends core::Object {
   synthetic constructor •() → self::A<self::A::X>
     ;
-  method bar<Y extends self::A::X = dynamic>() → dynamic
+  method bar<generic-covariant-impl Y extends self::A::X = dynamic>() → dynamic
     ;
 }
 class B extends core::Object {
diff --git a/pkg/front_end/testcases/bug21938.dart b/pkg/front_end/testcases/bug21938.dart
index c8555af..b6e851b 100644
--- a/pkg/front_end/testcases/bug21938.dart
+++ b/pkg/front_end/testcases/bug21938.dart
@@ -2,15 +2,13 @@
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
 
-/*@testedFeatures=error*/
-
 test() {
   Object x;
   Function f;
-  x /*@error=UndefinedMethod*/ ();
-  x /*@error=UndefinedMethod*/ (3);
+  x();
+  x(3);
   f(5, 2);
-  x. /*@error=UndefinedMethod*/ call();
+  x.call();
   f.call;
   f.call(5, 2);
 }
diff --git a/pkg/front_end/testcases/bug21938.dart.strong.expect b/pkg/front_end/testcases/bug21938.dart.strong.expect
index 25e833b..aa88e80 100644
--- a/pkg/front_end/testcases/bug21938.dart.strong.expect
+++ b/pkg/front_end/testcases/bug21938.dart.strong.expect
@@ -2,23 +2,23 @@
 //
 // Problems in library:
 //
-// pkg/front_end/testcases/bug21938.dart:10:4: Error: The method 'call' isn't defined for the class 'Object'.
+// pkg/front_end/testcases/bug21938.dart:8:4: Error: The method 'call' isn't defined for the class 'Object'.
 //  - 'Object' is from 'dart:core'.
 // Try correcting the name to the name of an existing method, or defining a method named 'call'.
-//   x /*@error=UndefinedMethod*/ ();
+//   x();
 //    ^
 //
-// pkg/front_end/testcases/bug21938.dart:11:4: Error: The method 'call' isn't defined for the class 'Object'.
+// pkg/front_end/testcases/bug21938.dart:9:4: Error: The method 'call' isn't defined for the class 'Object'.
 //  - 'Object' is from 'dart:core'.
 // Try correcting the name to the name of an existing method, or defining a method named 'call'.
-//   x /*@error=UndefinedMethod*/ (3);
+//   x(3);
 //    ^
 //
-// pkg/front_end/testcases/bug21938.dart:13:33: Error: The method 'call' isn't defined for the class 'Object'.
+// pkg/front_end/testcases/bug21938.dart:11:5: Error: The method 'call' isn't defined for the class 'Object'.
 //  - 'Object' is from 'dart:core'.
 // Try correcting the name to the name of an existing method, or defining a method named 'call'.
-//   x. /*@error=UndefinedMethod*/ call();
-//                                 ^^^^
+//   x.call();
+//     ^^^^
 //
 import self as self;
 import "dart:core" as core;
@@ -26,22 +26,22 @@
 static method test() → dynamic {
   core::Object x;
   core::Function f;
-  invalid-expression "pkg/front_end/testcases/bug21938.dart:10:4: Error: The method 'call' isn't defined for the class 'Object'.
+  invalid-expression "pkg/front_end/testcases/bug21938.dart:8:4: Error: The method 'call' isn't defined for the class 'Object'.
  - 'Object' is from 'dart:core'.
 Try correcting the name to the name of an existing method, or defining a method named 'call'.
-  x /*@error=UndefinedMethod*/ ();
+  x();
    ^";
-  invalid-expression "pkg/front_end/testcases/bug21938.dart:11:4: Error: The method 'call' isn't defined for the class 'Object'.
+  invalid-expression "pkg/front_end/testcases/bug21938.dart:9:4: Error: The method 'call' isn't defined for the class 'Object'.
  - 'Object' is from 'dart:core'.
 Try correcting the name to the name of an existing method, or defining a method named 'call'.
-  x /*@error=UndefinedMethod*/ (3);
+  x(3);
    ^";
   f.call(5, 2);
-  invalid-expression "pkg/front_end/testcases/bug21938.dart:13:33: Error: The method 'call' isn't defined for the class 'Object'.
+  invalid-expression "pkg/front_end/testcases/bug21938.dart:11:5: Error: The method 'call' isn't defined for the class 'Object'.
  - 'Object' is from 'dart:core'.
 Try correcting the name to the name of an existing method, or defining a method named 'call'.
-  x. /*@error=UndefinedMethod*/ call();
-                                ^^^^";
+  x.call();
+    ^^^^";
   f.call;
   f.call(5, 2);
 }
diff --git a/pkg/front_end/testcases/bug32629.dart b/pkg/front_end/testcases/bug32629.dart
index 88610e0..fc0492f 100644
--- a/pkg/front_end/testcases/bug32629.dart
+++ b/pkg/front_end/testcases/bug32629.dart
@@ -2,8 +2,6 @@
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
 
-/*@testedFeatures=error*/
-
 class A {
   dynamic call(dynamic a, dynamic b) {
     return a;
diff --git a/pkg/front_end/testcases/bug33298.dart.legacy.expect b/pkg/front_end/testcases/bug33298.dart.legacy.expect
index c9a8e28..c12d485 100644
--- a/pkg/front_end/testcases/bug33298.dart.legacy.expect
+++ b/pkg/front_end/testcases/bug33298.dart.legacy.expect
@@ -13,7 +13,7 @@
   synthetic constructor •() → self::B<self::B::T>
     : super core::Object::•()
     ;
-  method call(self::B::T t) → self::B::T
+  method call(generic-covariant-impl self::B::T t) → self::B::T
     return t;
 }
 class C extends core::Object {
diff --git a/pkg/front_end/testcases/bug33298.dart.legacy.transformed.expect b/pkg/front_end/testcases/bug33298.dart.legacy.transformed.expect
index c9a8e28..c12d485 100644
--- a/pkg/front_end/testcases/bug33298.dart.legacy.transformed.expect
+++ b/pkg/front_end/testcases/bug33298.dart.legacy.transformed.expect
@@ -13,7 +13,7 @@
   synthetic constructor •() → self::B<self::B::T>
     : super core::Object::•()
     ;
-  method call(self::B::T t) → self::B::T
+  method call(generic-covariant-impl self::B::T t) → self::B::T
     return t;
 }
 class C extends core::Object {
diff --git a/pkg/front_end/testcases/bug33298.dart.outline.expect b/pkg/front_end/testcases/bug33298.dart.outline.expect
index ed25402..1d7e071 100644
--- a/pkg/front_end/testcases/bug33298.dart.outline.expect
+++ b/pkg/front_end/testcases/bug33298.dart.outline.expect
@@ -11,7 +11,7 @@
 class B<T extends core::Object = dynamic> extends core::Object {
   synthetic constructor •() → self::B<self::B::T>
     ;
-  method call(self::B::T t) → self::B::T
+  method call(generic-covariant-impl self::B::T t) → self::B::T
     ;
 }
 class C extends core::Object {
diff --git a/pkg/front_end/testcases/bug35470.dart.legacy.expect b/pkg/front_end/testcases/bug35470.dart.legacy.expect
index 7f2ad6a..630df24 100644
--- a/pkg/front_end/testcases/bug35470.dart.legacy.expect
+++ b/pkg/front_end/testcases/bug35470.dart.legacy.expect
@@ -6,7 +6,7 @@
   synthetic constructor •() → self::A<self::A::X>
     : super core::Object::•()
     ;
-  method foo<Y extends self::A::X = dynamic>() → dynamic {}
+  method foo<generic-covariant-impl Y extends self::A::X = dynamic>() → dynamic {}
 }
 class B extends self::A<dynamic> {
   synthetic constructor •() → self::B
diff --git a/pkg/front_end/testcases/bug35470.dart.legacy.transformed.expect b/pkg/front_end/testcases/bug35470.dart.legacy.transformed.expect
index 7f2ad6a..630df24 100644
--- a/pkg/front_end/testcases/bug35470.dart.legacy.transformed.expect
+++ b/pkg/front_end/testcases/bug35470.dart.legacy.transformed.expect
@@ -6,7 +6,7 @@
   synthetic constructor •() → self::A<self::A::X>
     : super core::Object::•()
     ;
-  method foo<Y extends self::A::X = dynamic>() → dynamic {}
+  method foo<generic-covariant-impl Y extends self::A::X = dynamic>() → dynamic {}
 }
 class B extends self::A<dynamic> {
   synthetic constructor •() → self::B
diff --git a/pkg/front_end/testcases/bug35470.dart.outline.expect b/pkg/front_end/testcases/bug35470.dart.outline.expect
index 26320fb..33d29f3 100644
--- a/pkg/front_end/testcases/bug35470.dart.outline.expect
+++ b/pkg/front_end/testcases/bug35470.dart.outline.expect
@@ -5,7 +5,7 @@
 class A<X extends core::Object = dynamic> extends core::Object {
   synthetic constructor •() → self::A<self::A::X>
     ;
-  method foo<Y extends self::A::X = dynamic>() → dynamic
+  method foo<generic-covariant-impl Y extends self::A::X = dynamic>() → dynamic
     ;
 }
 class B extends self::A<dynamic> {
diff --git a/pkg/front_end/testcases/constructor_const_inference.dart.legacy.expect b/pkg/front_end/testcases/constructor_const_inference.dart.legacy.expect
index b3c195b..fa5e33f 100644
--- a/pkg/front_end/testcases/constructor_const_inference.dart.legacy.expect
+++ b/pkg/front_end/testcases/constructor_const_inference.dart.legacy.expect
@@ -8,7 +8,7 @@
     ;
 }
 class A<T extends core::Object = dynamic> extends core::Object {
-  field self::_Y<self::A::T> x;
+  generic-covariant-impl field self::_Y<self::A::T> x;
   constructor •(self::_Y<self::A::T> x) → self::A<self::A::T>
     : self::A::x = x, super core::Object::•()
     ;
diff --git a/pkg/front_end/testcases/constructor_const_inference.dart.legacy.transformed.expect b/pkg/front_end/testcases/constructor_const_inference.dart.legacy.transformed.expect
index b3c195b..fa5e33f 100644
--- a/pkg/front_end/testcases/constructor_const_inference.dart.legacy.transformed.expect
+++ b/pkg/front_end/testcases/constructor_const_inference.dart.legacy.transformed.expect
@@ -8,7 +8,7 @@
     ;
 }
 class A<T extends core::Object = dynamic> extends core::Object {
-  field self::_Y<self::A::T> x;
+  generic-covariant-impl field self::_Y<self::A::T> x;
   constructor •(self::_Y<self::A::T> x) → self::A<self::A::T>
     : self::A::x = x, super core::Object::•()
     ;
diff --git a/pkg/front_end/testcases/constructor_const_inference.dart.outline.expect b/pkg/front_end/testcases/constructor_const_inference.dart.outline.expect
index 071faac..2ad0826 100644
--- a/pkg/front_end/testcases/constructor_const_inference.dart.outline.expect
+++ b/pkg/front_end/testcases/constructor_const_inference.dart.outline.expect
@@ -7,7 +7,7 @@
     ;
 }
 class A<T extends core::Object = dynamic> extends core::Object {
-  field self::_Y<self::A::T> x;
+  generic-covariant-impl field self::_Y<self::A::T> x;
   constructor •(self::_Y<self::A::T> x) → self::A<self::A::T>
     ;
 }
diff --git a/pkg/front_end/testcases/control_flow_collection.dart b/pkg/front_end/testcases/control_flow_collection.dart
new file mode 100644
index 0000000..987769f
--- /dev/null
+++ b/pkg/front_end/testcases/control_flow_collection.dart
@@ -0,0 +1,39 @@
+// Copyright (c) 2019, the Dart project authors.  Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+main() {
+  final aList = <int>[
+      1,
+      if (oracle()) 2,
+      if (oracle()) 3 else -1,
+      if (oracle()) if (oracle()) 4,
+      for (int i in <int>[5, 6, 7]) i,
+      for (int i in <int>[8, 9, 10]) if (oracle()) i,
+      for (int i = 11; i <= 14; ++i) i,
+  ];
+  final aSet = <int>{
+      1,
+      if (oracle()) 2,
+      if (oracle()) 3 else -1,
+      if (oracle()) if (oracle()) 4,
+      for (int i in <int>[5, 6, 7]) i,
+      for (int i in <int>[8, 9, 10]) if (oracle()) i,
+      for (int i = 11; i <= 14; ++i) i,
+  };
+  final aMap = <int, int>{
+      1: 1,
+      if (oracle()) 2: 2,
+      if (oracle()) 3: 3 else -1: -1,
+      if (oracle()) if (oracle()) 4: 4,
+      for (int i in <int>[5, 6, 7]) i: i,
+      for (int i in <int>[8, 9, 10]) if (oracle()) i: i,
+      for (int i = 11; i <= 14; ++i) i: i,
+  };
+
+  print(aList);
+  print(aSet);
+  print(aMap);
+}
+
+oracle() => true;
diff --git a/pkg/front_end/testcases/control_flow_collection.dart.legacy.expect b/pkg/front_end/testcases/control_flow_collection.dart.legacy.expect
new file mode 100644
index 0000000..099350f
--- /dev/null
+++ b/pkg/front_end/testcases/control_flow_collection.dart.legacy.expect
@@ -0,0 +1,113 @@
+library;
+//
+// Problems in library:
+//
+// pkg/front_end/testcases/control_flow_collection.dart:8:7: Error: Unexpected token 'if'.
+//       if (oracle()) 2,
+//       ^^
+//
+// pkg/front_end/testcases/control_flow_collection.dart:9:7: Error: Unexpected token 'if'.
+//       if (oracle()) 3 else -1,
+//       ^^
+//
+// pkg/front_end/testcases/control_flow_collection.dart:10:21: Error: Unexpected token 'if'.
+//       if (oracle()) if (oracle()) 4,
+//                     ^^
+//
+// pkg/front_end/testcases/control_flow_collection.dart:10:7: Error: Unexpected token 'if'.
+//       if (oracle()) if (oracle()) 4,
+//       ^^
+//
+// pkg/front_end/testcases/control_flow_collection.dart:11:7: Error: Unexpected token 'for'.
+//       for (int i in <int>[5, 6, 7]) i,
+//       ^^^
+//
+// pkg/front_end/testcases/control_flow_collection.dart:12:38: Error: Unexpected token 'if'.
+//       for (int i in <int>[8, 9, 10]) if (oracle()) i,
+//                                      ^^
+//
+// pkg/front_end/testcases/control_flow_collection.dart:12:7: Error: Unexpected token 'for'.
+//       for (int i in <int>[8, 9, 10]) if (oracle()) i,
+//       ^^^
+//
+// pkg/front_end/testcases/control_flow_collection.dart:13:7: Error: Unexpected token 'for'.
+//       for (int i = 11; i <= 14; ++i) i,
+//       ^^^
+//
+// pkg/front_end/testcases/control_flow_collection.dart:17:7: Error: Unexpected token 'if'.
+//       if (oracle()) 2,
+//       ^^
+//
+// pkg/front_end/testcases/control_flow_collection.dart:18:7: Error: Unexpected token 'if'.
+//       if (oracle()) 3 else -1,
+//       ^^
+//
+// pkg/front_end/testcases/control_flow_collection.dart:19:21: Error: Unexpected token 'if'.
+//       if (oracle()) if (oracle()) 4,
+//                     ^^
+//
+// pkg/front_end/testcases/control_flow_collection.dart:19:7: Error: Unexpected token 'if'.
+//       if (oracle()) if (oracle()) 4,
+//       ^^
+//
+// pkg/front_end/testcases/control_flow_collection.dart:20:7: Error: Unexpected token 'for'.
+//       for (int i in <int>[5, 6, 7]) i,
+//       ^^^
+//
+// pkg/front_end/testcases/control_flow_collection.dart:21:38: Error: Unexpected token 'if'.
+//       for (int i in <int>[8, 9, 10]) if (oracle()) i,
+//                                      ^^
+//
+// pkg/front_end/testcases/control_flow_collection.dart:21:7: Error: Unexpected token 'for'.
+//       for (int i in <int>[8, 9, 10]) if (oracle()) i,
+//       ^^^
+//
+// pkg/front_end/testcases/control_flow_collection.dart:22:7: Error: Unexpected token 'for'.
+//       for (int i = 11; i <= 14; ++i) i,
+//       ^^^
+//
+// pkg/front_end/testcases/control_flow_collection.dart:26:7: Error: Unexpected token 'if'.
+//       if (oracle()) 2: 2,
+//       ^^
+//
+// pkg/front_end/testcases/control_flow_collection.dart:27:7: Error: Unexpected token 'if'.
+//       if (oracle()) 3: 3 else -1: -1,
+//       ^^
+//
+// pkg/front_end/testcases/control_flow_collection.dart:28:21: Error: Unexpected token 'if'.
+//       if (oracle()) if (oracle()) 4: 4,
+//                     ^^
+//
+// pkg/front_end/testcases/control_flow_collection.dart:28:7: Error: Unexpected token 'if'.
+//       if (oracle()) if (oracle()) 4: 4,
+//       ^^
+//
+// pkg/front_end/testcases/control_flow_collection.dart:29:7: Error: Unexpected token 'for'.
+//       for (int i in <int>[5, 6, 7]) i: i,
+//       ^^^
+//
+// pkg/front_end/testcases/control_flow_collection.dart:30:38: Error: Unexpected token 'if'.
+//       for (int i in <int>[8, 9, 10]) if (oracle()) i: i,
+//                                      ^^
+//
+// pkg/front_end/testcases/control_flow_collection.dart:30:7: Error: Unexpected token 'for'.
+//       for (int i in <int>[8, 9, 10]) if (oracle()) i: i,
+//       ^^^
+//
+// pkg/front_end/testcases/control_flow_collection.dart:31:7: Error: Unexpected token 'for'.
+//       for (int i = 11; i <= 14; ++i) i: i,
+//       ^^^
+//
+import self as self;
+import "dart:core" as core;
+
+static method main() → dynamic {
+  final dynamic aList = <core::int>[1];
+  final dynamic aSet = <core::int>{1};
+  final dynamic aMap = <core::int, core::int>{1: 1};
+  core::print(aList);
+  core::print(aSet);
+  core::print(aMap);
+}
+static method oracle() → dynamic
+  return true;
diff --git a/pkg/front_end/testcases/control_flow_collection.dart.legacy.transformed.expect b/pkg/front_end/testcases/control_flow_collection.dart.legacy.transformed.expect
new file mode 100644
index 0000000..099350f
--- /dev/null
+++ b/pkg/front_end/testcases/control_flow_collection.dart.legacy.transformed.expect
@@ -0,0 +1,113 @@
+library;
+//
+// Problems in library:
+//
+// pkg/front_end/testcases/control_flow_collection.dart:8:7: Error: Unexpected token 'if'.
+//       if (oracle()) 2,
+//       ^^
+//
+// pkg/front_end/testcases/control_flow_collection.dart:9:7: Error: Unexpected token 'if'.
+//       if (oracle()) 3 else -1,
+//       ^^
+//
+// pkg/front_end/testcases/control_flow_collection.dart:10:21: Error: Unexpected token 'if'.
+//       if (oracle()) if (oracle()) 4,
+//                     ^^
+//
+// pkg/front_end/testcases/control_flow_collection.dart:10:7: Error: Unexpected token 'if'.
+//       if (oracle()) if (oracle()) 4,
+//       ^^
+//
+// pkg/front_end/testcases/control_flow_collection.dart:11:7: Error: Unexpected token 'for'.
+//       for (int i in <int>[5, 6, 7]) i,
+//       ^^^
+//
+// pkg/front_end/testcases/control_flow_collection.dart:12:38: Error: Unexpected token 'if'.
+//       for (int i in <int>[8, 9, 10]) if (oracle()) i,
+//                                      ^^
+//
+// pkg/front_end/testcases/control_flow_collection.dart:12:7: Error: Unexpected token 'for'.
+//       for (int i in <int>[8, 9, 10]) if (oracle()) i,
+//       ^^^
+//
+// pkg/front_end/testcases/control_flow_collection.dart:13:7: Error: Unexpected token 'for'.
+//       for (int i = 11; i <= 14; ++i) i,
+//       ^^^
+//
+// pkg/front_end/testcases/control_flow_collection.dart:17:7: Error: Unexpected token 'if'.
+//       if (oracle()) 2,
+//       ^^
+//
+// pkg/front_end/testcases/control_flow_collection.dart:18:7: Error: Unexpected token 'if'.
+//       if (oracle()) 3 else -1,
+//       ^^
+//
+// pkg/front_end/testcases/control_flow_collection.dart:19:21: Error: Unexpected token 'if'.
+//       if (oracle()) if (oracle()) 4,
+//                     ^^
+//
+// pkg/front_end/testcases/control_flow_collection.dart:19:7: Error: Unexpected token 'if'.
+//       if (oracle()) if (oracle()) 4,
+//       ^^
+//
+// pkg/front_end/testcases/control_flow_collection.dart:20:7: Error: Unexpected token 'for'.
+//       for (int i in <int>[5, 6, 7]) i,
+//       ^^^
+//
+// pkg/front_end/testcases/control_flow_collection.dart:21:38: Error: Unexpected token 'if'.
+//       for (int i in <int>[8, 9, 10]) if (oracle()) i,
+//                                      ^^
+//
+// pkg/front_end/testcases/control_flow_collection.dart:21:7: Error: Unexpected token 'for'.
+//       for (int i in <int>[8, 9, 10]) if (oracle()) i,
+//       ^^^
+//
+// pkg/front_end/testcases/control_flow_collection.dart:22:7: Error: Unexpected token 'for'.
+//       for (int i = 11; i <= 14; ++i) i,
+//       ^^^
+//
+// pkg/front_end/testcases/control_flow_collection.dart:26:7: Error: Unexpected token 'if'.
+//       if (oracle()) 2: 2,
+//       ^^
+//
+// pkg/front_end/testcases/control_flow_collection.dart:27:7: Error: Unexpected token 'if'.
+//       if (oracle()) 3: 3 else -1: -1,
+//       ^^
+//
+// pkg/front_end/testcases/control_flow_collection.dart:28:21: Error: Unexpected token 'if'.
+//       if (oracle()) if (oracle()) 4: 4,
+//                     ^^
+//
+// pkg/front_end/testcases/control_flow_collection.dart:28:7: Error: Unexpected token 'if'.
+//       if (oracle()) if (oracle()) 4: 4,
+//       ^^
+//
+// pkg/front_end/testcases/control_flow_collection.dart:29:7: Error: Unexpected token 'for'.
+//       for (int i in <int>[5, 6, 7]) i: i,
+//       ^^^
+//
+// pkg/front_end/testcases/control_flow_collection.dart:30:38: Error: Unexpected token 'if'.
+//       for (int i in <int>[8, 9, 10]) if (oracle()) i: i,
+//                                      ^^
+//
+// pkg/front_end/testcases/control_flow_collection.dart:30:7: Error: Unexpected token 'for'.
+//       for (int i in <int>[8, 9, 10]) if (oracle()) i: i,
+//       ^^^
+//
+// pkg/front_end/testcases/control_flow_collection.dart:31:7: Error: Unexpected token 'for'.
+//       for (int i = 11; i <= 14; ++i) i: i,
+//       ^^^
+//
+import self as self;
+import "dart:core" as core;
+
+static method main() → dynamic {
+  final dynamic aList = <core::int>[1];
+  final dynamic aSet = <core::int>{1};
+  final dynamic aMap = <core::int, core::int>{1: 1};
+  core::print(aList);
+  core::print(aSet);
+  core::print(aMap);
+}
+static method oracle() → dynamic
+  return true;
diff --git a/pkg/front_end/testcases/control_flow_collection.dart.outline.expect b/pkg/front_end/testcases/control_flow_collection.dart.outline.expect
new file mode 100644
index 0000000..b0c1797
--- /dev/null
+++ b/pkg/front_end/testcases/control_flow_collection.dart.outline.expect
@@ -0,0 +1,7 @@
+library;
+import self as self;
+
+static method main() → dynamic
+  ;
+static method oracle() → dynamic
+  ;
diff --git a/pkg/front_end/testcases/control_flow_collection.dart.strong.expect b/pkg/front_end/testcases/control_flow_collection.dart.strong.expect
new file mode 100644
index 0000000..9fed289
--- /dev/null
+++ b/pkg/front_end/testcases/control_flow_collection.dart.strong.expect
@@ -0,0 +1,72 @@
+library;
+import self as self;
+import "dart:core" as core;
+import "dart:collection" as col;
+
+static method main() → dynamic {
+  final core::List<core::int> aList = block {
+    final core::List<core::int> #t1 = <core::int>[];
+    #t1.{core::List::add}(1);
+    if(self::oracle())
+      #t1.{core::List::add}(2);
+    if(self::oracle())
+      #t1.{core::List::add}(3);
+    else
+      #t1.{core::List::add}(1.{core::int::unary-}());
+    if(self::oracle())
+      if(self::oracle())
+        #t1.{core::List::add}(4);
+    for (core::int i in <core::int>[5, 6, 7])
+      #t1.{core::List::add}(i);
+    for (core::int i in <core::int>[8, 9, 10])
+      if(self::oracle())
+        #t1.{core::List::add}(i);
+    for (core::int i = 11; i.{core::num::<=}(14); i = i.{core::num::+}(1))
+      #t1.{core::List::add}(i);
+  } =>#t1;
+  final core::Set<core::int> aSet = block {
+    final core::Set<core::int> #t2 = col::LinkedHashSet::•<core::int>();
+    #t2.{core::Set::add}(1);
+    if(self::oracle())
+      #t2.{core::Set::add}(2);
+    if(self::oracle())
+      #t2.{core::Set::add}(3);
+    else
+      #t2.{core::Set::add}(1.{core::int::unary-}());
+    if(self::oracle())
+      if(self::oracle())
+        #t2.{core::Set::add}(4);
+    for (core::int i in <core::int>[5, 6, 7])
+      #t2.{core::Set::add}(i);
+    for (core::int i in <core::int>[8, 9, 10])
+      if(self::oracle())
+        #t2.{core::Set::add}(i);
+    for (core::int i = 11; i.{core::num::<=}(14); i = i.{core::num::+}(1))
+      #t2.{core::Set::add}(i);
+  } =>#t2;
+  final core::Map<core::int, core::int> aMap = block {
+    final core::Map<core::int, core::int> #t3 = <core::int, core::int>{};
+    #t3.{core::Map::[]=}(1, 1);
+    if(self::oracle())
+      #t3.{core::Map::[]=}(2, 2);
+    if(self::oracle())
+      #t3.{core::Map::[]=}(3, 3);
+    else
+      #t3.{core::Map::[]=}(1.{core::int::unary-}(), 1.{core::int::unary-}());
+    if(self::oracle())
+      if(self::oracle())
+        #t3.{core::Map::[]=}(4, 4);
+    for (core::int i in <core::int>[5, 6, 7])
+      #t3.{core::Map::[]=}(i, i);
+    for (core::int i in <core::int>[8, 9, 10])
+      if(self::oracle())
+        #t3.{core::Map::[]=}(i, i);
+    for (core::int i = 11; i.{core::num::<=}(14); i = i.{core::num::+}(1))
+      #t3.{core::Map::[]=}(i, i);
+  } =>#t3;
+  core::print(aList);
+  core::print(aSet);
+  core::print(aMap);
+}
+static method oracle() → dynamic
+  return true;
diff --git a/pkg/front_end/testcases/control_flow_collection.dart.strong.transformed.expect b/pkg/front_end/testcases/control_flow_collection.dart.strong.transformed.expect
new file mode 100644
index 0000000..9fed289
--- /dev/null
+++ b/pkg/front_end/testcases/control_flow_collection.dart.strong.transformed.expect
@@ -0,0 +1,72 @@
+library;
+import self as self;
+import "dart:core" as core;
+import "dart:collection" as col;
+
+static method main() → dynamic {
+  final core::List<core::int> aList = block {
+    final core::List<core::int> #t1 = <core::int>[];
+    #t1.{core::List::add}(1);
+    if(self::oracle())
+      #t1.{core::List::add}(2);
+    if(self::oracle())
+      #t1.{core::List::add}(3);
+    else
+      #t1.{core::List::add}(1.{core::int::unary-}());
+    if(self::oracle())
+      if(self::oracle())
+        #t1.{core::List::add}(4);
+    for (core::int i in <core::int>[5, 6, 7])
+      #t1.{core::List::add}(i);
+    for (core::int i in <core::int>[8, 9, 10])
+      if(self::oracle())
+        #t1.{core::List::add}(i);
+    for (core::int i = 11; i.{core::num::<=}(14); i = i.{core::num::+}(1))
+      #t1.{core::List::add}(i);
+  } =>#t1;
+  final core::Set<core::int> aSet = block {
+    final core::Set<core::int> #t2 = col::LinkedHashSet::•<core::int>();
+    #t2.{core::Set::add}(1);
+    if(self::oracle())
+      #t2.{core::Set::add}(2);
+    if(self::oracle())
+      #t2.{core::Set::add}(3);
+    else
+      #t2.{core::Set::add}(1.{core::int::unary-}());
+    if(self::oracle())
+      if(self::oracle())
+        #t2.{core::Set::add}(4);
+    for (core::int i in <core::int>[5, 6, 7])
+      #t2.{core::Set::add}(i);
+    for (core::int i in <core::int>[8, 9, 10])
+      if(self::oracle())
+        #t2.{core::Set::add}(i);
+    for (core::int i = 11; i.{core::num::<=}(14); i = i.{core::num::+}(1))
+      #t2.{core::Set::add}(i);
+  } =>#t2;
+  final core::Map<core::int, core::int> aMap = block {
+    final core::Map<core::int, core::int> #t3 = <core::int, core::int>{};
+    #t3.{core::Map::[]=}(1, 1);
+    if(self::oracle())
+      #t3.{core::Map::[]=}(2, 2);
+    if(self::oracle())
+      #t3.{core::Map::[]=}(3, 3);
+    else
+      #t3.{core::Map::[]=}(1.{core::int::unary-}(), 1.{core::int::unary-}());
+    if(self::oracle())
+      if(self::oracle())
+        #t3.{core::Map::[]=}(4, 4);
+    for (core::int i in <core::int>[5, 6, 7])
+      #t3.{core::Map::[]=}(i, i);
+    for (core::int i in <core::int>[8, 9, 10])
+      if(self::oracle())
+        #t3.{core::Map::[]=}(i, i);
+    for (core::int i = 11; i.{core::num::<=}(14); i = i.{core::num::+}(1))
+      #t3.{core::Map::[]=}(i, i);
+  } =>#t3;
+  core::print(aList);
+  core::print(aSet);
+  core::print(aMap);
+}
+static method oracle() → dynamic
+  return true;
diff --git a/pkg/front_end/testcases/control_flow_collection.dart.type_promotion.expect b/pkg/front_end/testcases/control_flow_collection.dart.type_promotion.expect
new file mode 100644
index 0000000..5476097
--- /dev/null
+++ b/pkg/front_end/testcases/control_flow_collection.dart.type_promotion.expect
@@ -0,0 +1,9 @@
+pkg/front_end/testcases/control_flow_collection.dart:13:33: Context: Write to i@364
+      for (int i = 11; i <= 14; ++i) i,
+                                ^^
+pkg/front_end/testcases/control_flow_collection.dart:22:33: Context: Write to i@364
+      for (int i = 11; i <= 14; ++i) i,
+                                ^^
+pkg/front_end/testcases/control_flow_collection.dart:31:33: Context: Write to i@364
+      for (int i = 11; i <= 14; ++i) i: i,
+                                ^^
diff --git a/pkg/front_end/testcases/control_flow_collection_inference.dart b/pkg/front_end/testcases/control_flow_collection_inference.dart
new file mode 100644
index 0000000..3d9520f
--- /dev/null
+++ b/pkg/front_end/testcases/control_flow_collection_inference.dart
@@ -0,0 +1,240 @@
+// Copyright (c) 2019, the Dart project authors.  Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+// Oracle is generic to test the inference in conditions of if-elements.
+oracle<T>([T t]) => true;
+
+testIfElement(dynamic dynVar, List<int> listInt, List<double> listDouble,
+    Map<String, int> mapToInt, Map<String, double> mapToDouble) {
+  var list10 = [if (oracle("foo")) 42];
+  var set10 = {if (oracle("foo")) 42, null};
+  var map10 = {if (oracle("foo")) "bar": 42, "baz": null};
+  var list11 = [if (oracle("foo")) dynVar];
+  var set11 = {if (oracle("foo")) dynVar, null};
+  var map11 = {if (oracle("foo")) "bar": dynVar, "baz": null};
+  var list12 = [if (oracle("foo")) [42]];
+  var set12 = {if (oracle("foo")) [42], null};
+  var map12 = {if (oracle("foo")) "bar": [42], "baz": null};
+  var list20 = [if (oracle("foo")) ...[42]];
+  var set20 = {if (oracle("foo")) ...[42], null};
+  var map20 = {if (oracle("foo")) ...{"bar": 42}, "baz": null};
+  var list21 = [if (oracle("foo")) ...[dynVar]];
+  var set21 = {if (oracle("foo")) ...[dynVar], null};
+  var map21 = {if (oracle("foo")) ...{"bar": dynVar}, "baz": null};
+  var list22 = [if (oracle("foo")) ...[[42]]];
+  var set22 = {if (oracle("foo")) ...[[42]], null};
+  var map22 = {if (oracle("foo")) ...{"bar": [42]}, "baz": null};
+  var list30 = [if (oracle("foo")) if (oracle()) ...[42]];
+  var set30 = {if (oracle("foo")) if (oracle()) ...[42], null};
+  var map30 = {if (oracle("foo")) if (oracle()) ...{"bar": 42}, "baz": null};
+  var list31 = [if (oracle("foo")) if (oracle()) ...[dynVar]];
+  var set31 = {if (oracle("foo")) if (oracle()) ...[dynVar], null};
+  var map31 = {if (oracle("foo")) if (oracle()) ...{"bar": dynVar}, "baz": null};
+  var list33 = [if (oracle("foo")) if (oracle()) ...[[42]]];
+  var set33 = {if (oracle("foo")) if (oracle()) ...[[42]], null};
+  var map33 = {if (oracle("foo")) if (oracle()) ...{"bar": [42]}, "baz": null};
+  List<List<int>> list40 = [if (oracle("foo")) ...[[]]];
+  Set<List<int>> set40 = {if (oracle("foo")) ...[[]], null};
+  Map<String, List<int>> map40 = {if (oracle("foo")) ...{"bar", []}, "baz": null};
+  List<List<int>> list41 = [if (oracle("foo")) ...{[]}];
+  Set<List<int>> set41 = {if (oracle("foo")) ...{[]}, null};
+  List<List<int>> list42 = [if (oracle("foo")) if (oracle()) ...[[]]];
+  Set<List<int>> set42 = {if (oracle("foo")) if (oracle()) ...[[]], null};
+  Map<String, List<int>> map42 = {if (oracle("foo")) if (oracle()) ...{"bar": []}, "baz": null};
+  List<int> list50 = [if (oracle("foo")) ...[]];
+  Set<int> set50 = {if (oracle("foo")) ...[], null};
+  Map<String, int> map50 = {if (oracle("foo")) ...{}, "baz": null};
+  List<int> list51 = [if (oracle("foo")) ...{}];
+  Set<int> set51 = {if (oracle("foo")) ...{}, null};
+  List<int> list52 = [if (oracle("foo")) if (oracle()) ...[]];
+  Set<int> set52 = {if (oracle("foo")) if (oracle()) ...[], null};
+  Map<String, int> map52 = {if (oracle("foo")) if (oracle()) ...{}, "baz": null};
+  List<List<int>> list60 = [if (oracle("foo")) ...[[]]];
+  Set<List<int>> set60 = {if (oracle("foo")) ...[[]], null};
+  Map<String, List<int>> map60 = {if (oracle("foo")) ...{"bar": []}, "baz": null};
+  List<List<int>> list61 = [if (oracle("foo")) if (oracle()) ...[[]]];
+  Set<List<int>> set61 = {if (oracle("foo")) if (oracle()) ...[[]], null};
+  Map<String, List<int>> map61 = {if (oracle("foo")) if (oracle()) ...{"bar": []}, "baz": null};
+  List<List<int>> list70 = [if (oracle("foo")) []];
+  Set<List<int>> set70 = {if (oracle("foo")) [], null};
+  List<List<int>> list71 = [if (oracle("foo")) if (oracle()) []];
+  Set<List<int>> set71 = {if (oracle("foo")) if (oracle()) [], null};
+  var list80 = [if (oracle("foo")) 42 else 3.14];
+  var set80 = {if (oracle("foo")) 42 else 3.14, null};
+  var map80 = {if (oracle("foo")) "bar": 42 else "bar": 3.14, "baz": null};
+  var list81 = [if (oracle("foo")) ...listInt else ...listDouble];
+  var set81 = {if (oracle("foo")) ...listInt else ...listDouble, null};
+  var map81 = {if (oracle("foo")) ...mapToInt else ...mapToDouble, "baz": null};
+  var list82 = [if (oracle("foo")) ...listInt else ...dynVar];
+  var set82 = {if (oracle("foo")) ...listInt else ...dynVar, null};
+  var map82 = {if (oracle("foo")) ...mapToInt else ...dynVar, null};
+  var list83 = [if (oracle("foo")) 42 else ...listDouble];
+  var set83 = {if (oracle("foo")) ...listInt else 3.14, null};
+  var map83 = {if (oracle("foo")) ...mapToInt else "bar": 3.14, "baz": null};
+  List<int> list90 = [if (oracle("foo")) dynVar];
+  Set<int> set90 = {if (oracle("foo")) dynVar, null};
+  Map<String, int> map90 = {if (oracle("foo")) "bar": dynVar, "baz": null};
+  List<int> list91 = [if (oracle("foo")) ...dynVar];
+  Set<int> set91 = {if (oracle("foo")) ...dynVar, null};
+  Map<String, int> map91 = {if (oracle("foo")) ...dynVar, "baz": null};
+}
+
+testIfElementErrors(Map<int, int> map) {
+  <int>[if (oracle("foo")) "bar"];
+  <int>{if (oracle("foo")) "bar", null};
+  <String, int>{if (oracle("foo")) "bar": "bar", "baz": null};
+  <int>[if (oracle("foo")) ...["bar"]];
+  <int>{if (oracle("foo")) ...["bar"], null};
+  <String, int>{if (oracle("foo")) ...{"bar": "bar"}, "baz": null};
+  <int>[if (oracle("foo")) ...map];
+  <int>{if (oracle("foo")) ...map, null};
+  <String, int>{if (oracle("foo")) ...["bar"], "baz": null};
+  <String>[if (oracle("foo")) 42 else 3.14];
+  <String>{if (oracle("foo")) 42 else 3.14, null};
+  <String, String>{if (oracle("foo")) "bar": 42 else "baz": 3.14, "baz": null};
+  <int>[if (oracle("foo")) ...map else 42];
+  <int>{if (oracle("foo")) ...map else 42, null};
+  <String, int>{if (oracle("foo")) ...[42] else "bar": 42, "baz": null};
+  <int>[if (oracle("foo")) 42 else ...map];
+  <int>{if (oracle("foo")) ...map else 42, null};
+  <String, int>{if (oracle("foo")) "bar": 42 else ...[42], "baz": null};
+}
+
+testForElement(dynamic dynVar, List<int> listInt, List<double> listDouble, int
+    index, Map<String, int> mapStringInt, Map<String, double> mapStringDouble) {
+  var list10 = [for (int i = 0; oracle("foo"); i++) 42];
+  var set10 = {for (int i = 0; oracle("foo"); i++) 42, null};
+  var map10 = {for (int i = 0; oracle("foo"); i++) "bar": 42, "baz": null};
+  var list11 = [for (int i = 0; oracle("foo"); i++) dynVar];
+  var set11 = {for (int i = 0; oracle("foo"); i++) dynVar, null};
+  var map11 = {for (int i = 0; oracle("foo"); i++) "bar": dynVar, "baz": null};
+  var list12 = [for (int i = 0; oracle("foo"); i++) [42]];
+  var set12 = {for (int i = 0; oracle("foo"); i++) [42], null};
+  var map12 = {for (int i = 0; oracle("foo"); i++) "bar": [42], "baz": null};
+  var list20 = [for (int i = 0; oracle("foo"); i++) ...[42]];
+  var set20 = {for (int i = 0; oracle("foo"); i++) ...[42], null};
+  var map20 = {for (int i = 0; oracle("foo"); i++) ...{"bar": 42}, "baz": null};
+  var list21 = [for (int i = 0; oracle("foo"); i++) ...[dynVar]];
+  var set21 = {for (int i = 0; oracle("foo"); i++) ...[dynVar], null};
+  var map21 = {for (int i = 0; oracle("foo"); i++) ...{"bar": dynVar}, "baz": null};
+  var list22 = [for (int i = 0; oracle("foo"); i++) ...[[42]]];
+  var set22 = {for (int i = 0; oracle("foo"); i++) ...[[42]], null};
+  var map22 = {for (int i = 0; oracle("foo"); i++) ...{"bar": [42]}, "baz": null};
+  var list30 = [for (int i = 0; oracle("foo"); i++) if (oracle()) ...[42]];
+  var set30 = {for (int i = 0; oracle("foo"); i++) if (oracle()) ...[42], null};
+  var map30 = {for (int i = 0; oracle("foo"); i++) if (oracle()) ...{"bar": 42}, "baz": null};
+  var list31 = [for (int i = 0; oracle("foo"); i++) if (oracle()) ...[dynVar]];
+  var set31 = {for (int i = 0; oracle("foo"); i++) if (oracle()) ...[dynVar], null};
+  var map31 = {for (int i = 0; oracle("foo"); i++) if (oracle()) ...{"bar": dynVar}, "baz": null};
+  var list33 = [for (int i = 0; oracle("foo"); i++) if (oracle()) ...[[42]]];
+  var set33 = {for (int i = 0; oracle("foo"); i++) if (oracle()) ...[[42]], null};
+  var map33 = {for (int i = 0; oracle("foo"); i++) if (oracle()) ...{"bar": [42]}, "baz": null};
+  List<List<int>> list40 = [for (int i = 0; oracle("foo"); i++) ...[[]]];
+  Set<List<int>> set40 = {for (int i = 0; oracle("foo"); i++) ...[[]], null};
+  Map<String, List<int>> map40 = {for (int i = 0; oracle("foo"); i++) ...{"bar": []}, "baz": null};
+  List<List<int>> list41 = [for (int i = 0; oracle("foo"); i++) ...{[]}];
+  Set<List<int>> set41 = {for (int i = 0; oracle("foo"); i++) ...{[]}, null};
+  List<List<int>> list42 = [for (int i = 0; oracle("foo"); i++) if (oracle()) ...[[]]];
+  Set<List<int>> set42 = {for (int i = 0; oracle("foo"); i++) if (oracle()) ...[[]], null};
+  Map<String, List<int>> map42 = {for (int i = 0; oracle("foo"); i++) if (oracle()) ...{"bar": []}, "baz": null};
+  List<int> list50 = [for (int i = 0; oracle("foo"); i++) ...[]];
+  Set<int> set50 = {for (int i = 0; oracle("foo"); i++) ...[], null};
+  Map<String, int> map50 = {for (int i = 0; oracle("foo"); i++) ...{}, "baz": null};
+  List<int> list51 = [for (int i = 0; oracle("foo"); i++) ...{}];
+  Set<int> set51 = {for (int i = 0; oracle("foo"); i++) ...{}, null};
+  List<int> list52 = [for (int i = 0; oracle("foo"); i++) if (oracle()) ...[]];
+  Set<int> set52 = {for (int i = 0; oracle("foo"); i++) if (oracle()) ...[], null};
+  List<List<int>> list60 = [for (int i = 0; oracle("foo"); i++) ...[[]]];
+  Set<List<int>> set60 = {for (int i = 0; oracle("foo"); i++) ...[[]], null};
+  Map<String, List<int>> map60 = {for (int i = 0; oracle("foo"); i++) ...{"bar": []}, "baz": null};
+  List<List<int>> list61 = [for (int i = 0; oracle("foo"); i++) if (oracle()) ...[[]]];
+  Set<List<int>> set61 = {for (int i = 0; oracle("foo"); i++) if (oracle()) ...[[]], null};
+  Map<String, List<int>> map61 = {for (int i = 0; oracle("foo"); i++) if (oracle()) ...{"bar": []}, "baz": null};
+  List<List<int>> list70 = [for (int i = 0; oracle("foo"); i++) []];
+  Set<List<int>> set70 = {for (int i = 0; oracle("foo"); i++) [], null};
+  Map<String, List<int>> map70 = {for (int i = 0; oracle("foo"); i++) "bar": [], "baz": null};
+  List<List<int>> list71 = [for (int i = 0; oracle("foo"); i++) if (oracle()) []];
+  Set<List<int>> set71 = {for (int i = 0; oracle("foo"); i++) if (oracle()) [], null};
+  Map<String, List<int>> map71 = {for (int i = 0; oracle("foo"); i++) if (oracle()) "bar": [], "baz": null};
+  var list80 = [for (int i = 0; oracle("foo"); i++) if (oracle()) 42 else 3.14];
+  var set80 = {for (int i = 0; oracle("foo"); i++) if (oracle()) 42 else 3.14, null};
+  var map80 = {for (int i = 0; oracle("foo"); i++) if (oracle()) "bar": 42 else "bar": 3.14, "baz": null};
+  var list81 = [for (int i = 0; oracle("foo"); i++) if (oracle()) ...listInt else ...listDouble];
+  var set81 = {for (int i = 0; oracle("foo"); i++) if (oracle()) ...listInt else ...listDouble, null};
+  var map81 = {for (int i = 0; oracle("foo"); i++) if (oracle()) ...mapStringInt else ...mapStringDouble, "baz": null};
+  var list82 = [for (int i = 0; oracle("foo"); i++) if (oracle()) ...listInt else ...dynVar];
+  var set82 = {for (int i = 0; oracle("foo"); i++) if (oracle()) ...listInt else ...dynVar, null};
+  var map82 = {for (int i = 0; oracle("foo"); i++) if (oracle()) ...mapStringInt else ...dynVar, "baz": null};
+  var list83 = [for (int i = 0; oracle("foo"); i++) if (oracle()) 42 else ...listDouble];
+  var set83 = {for (int i = 0; oracle("foo"); i++) if (oracle()) ...listInt else 3.14, null};
+  var map83 = {for (int i = 0; oracle("foo"); i++) if (oracle()) ...mapStringInt else "bar": 3.14, "baz": null};
+  List<int> list90 = [for (int i = 0; oracle("foo"); i++) dynVar];
+  Set<int> set90 = {for (int i = 0; oracle("foo"); i++) dynVar, null};
+  Map<String, int> map90 = {for (int i = 0; oracle("foo"); i++) "bar": dynVar, "baz": null};
+  List<int> list91 = [for (int i = 0; oracle("foo"); i++) ...dynVar];
+  Set<int> set91 = {for (int i = 0; oracle("foo"); i++) ...dynVar, null};
+  Map<String, int> map91 = {for (int i = 0; oracle("foo"); i++) ...dynVar, "baz": null};
+  List<int> list100 = <int>[for (index = 0; oracle("foo"); index++) 42];
+  Set<int> set100 = <int>{for (index = 0; oracle("foo"); index++) 42};
+  Map<String, int> map100 = <String, int>{for (index = 0; oracle("foo"); index++) "bar": 42};
+  var list110 = [for (var i in [1, 2, 3]) i];
+  var set110 = {for (var i in [1, 2, 3]) i, null};
+  var map110 = {for (var i in [1, 2, 3]) "bar": i, "baz": null};
+  List<int> list120 = [for (var i in dynVar) i];
+  Set<int> set120 = {for (var i in dynVar) i, null};
+  Map<String, int> map120 = {for (var i in dynVar) "bar": i, "baz": null};
+}
+
+testForElementErrors(Map<int, int> map, List<int> list) async {
+  <int>[for (int i = 0; oracle("foo"); i++) "bar"];
+  <int>{for (int i = 0; oracle("foo"); i++) "bar", null};
+  <int, int>{for (int i = 0; oracle("foo"); i++) "bar": "bar", "baz": null};
+  <int>[for (int i = 0; oracle("foo"); i++) ...["bar"]];
+  <int>{for (int i = 0; oracle("foo"); i++) ...["bar"], null};
+  <int, int>{for (int i = 0; oracle("foo"); i++) ...{"bar": "bar"}, "baz": null};
+  <int>[for (int i = 0; oracle("foo"); i++) ...map];
+  <int>{for (int i = 0; oracle("foo"); i++) ...map, null};
+  <int, int>{for (int i = 0; oracle("foo"); i++) ...list, 42: null};
+  <String>[for (int i = 0; oracle("foo"); i++) if (oracle()) 42 else 3.14];
+  <String>{for (int i = 0; oracle("foo"); i++) if (oracle()) 42 else 3.14, null};
+  <String, String>{for (int i = 0; oracle("foo"); i++) if (oracle()) "bar": 42 else "bar": 3.14, "baz": null};
+  <int>[for (int i = 0; oracle("foo"); i++) if (oracle()) ...map else 42];
+  <int>{for (int i = 0; oracle("foo"); i++) if (oracle()) ...map else 42, null};
+  <String, int>{for (int i = 0; oracle("foo"); i++) if (oracle()) ...list else "bar": 42, "baz": null};
+  <int>[for (int i = 0; oracle("foo"); i++) if (oracle()) 42 else ...map];
+  <int>{for (int i = 0; oracle("foo"); i++) if (oracle()) 42 else ...map, null};
+  <String, int>{for (int i = 0; oracle("foo"); i++) if (oracle()) "bar": 42 else ...list, "baz": null};
+
+  final i = 0;
+  <int>[for (i in <int>[1]) i];
+  <int>{for (i in <int>[1]) i, null};
+	<String, int>{for (i in <int>[1]) "bar": i, "baz": null};
+
+  var list10 = [for (var i in "not iterable") i];
+  var set10 = {for (var i in "not iterable") i, null};
+  var map10 = {for (var i in "not iterable") "bar": i, "baz": null};
+  var list20 = [for (int i in ["not", "int"]) i];
+  var set20 = {for (int i in ["not", "int"]) i, null};
+  var map20 = {for (int i in ["not", "int"]) "bar": i, "baz": null};
+  var list30 = [await for (var i in "not stream") i];
+  var set30 = {await for (var i in "not stream") i, null};
+  var map30 = {await for (var i in "not stream") "bar": i, "baz": null};
+  var list40 = [await for (int i in Stream.fromIterable(["not", "int"])) i];
+  var set40 = {await for (int i in Stream.fromIterable(["not", "int"])) i, null};
+  var map40 = {await for (int i in Stream.fromIterable(["not", "int"])) "bar": i, "baz": null};
+  var list50 = [await for (;;) 42];
+  var set50 = {await for (;;) 42, null};
+  var map50 = {await for (;;) "bar": 42, "baz": null};
+  var list60 = [for (; "not bool";) 42];
+  var set60 = {for (; "not bool";) 42, null};
+  var map60 = {for (; "not bool";) "bar": 42, "baz": null};
+}
+
+testForElementErrorsNotAsync(Stream<int> stream) {
+  <int>[await for (int i in stream) i];
+  <int>{await for (int i in stream) i};
+  <String, int>{await for (int i in stream) "bar": i};
+}
+
+main() {}
diff --git a/pkg/front_end/testcases/control_flow_collection_inference.dart.legacy.expect b/pkg/front_end/testcases/control_flow_collection_inference.dart.legacy.expect
new file mode 100644
index 0000000..b94b0a3
--- /dev/null
+++ b/pkg/front_end/testcases/control_flow_collection_inference.dart.legacy.expect
@@ -0,0 +1,1912 @@
+library;
+//
+// Problems in library:
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:10:17: Error: Unexpected token 'if'.
+//   var list10 = [if (oracle("foo")) 42];
+//                 ^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:11:16: Error: Unexpected token 'if'.
+//   var set10 = {if (oracle("foo")) 42, null};
+//                ^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:12:16: Error: Unexpected token 'if'.
+//   var map10 = {if (oracle("foo")) "bar": 42, "baz": null};
+//                ^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:13:17: Error: Unexpected token 'if'.
+//   var list11 = [if (oracle("foo")) dynVar];
+//                 ^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:14:16: Error: Unexpected token 'if'.
+//   var set11 = {if (oracle("foo")) dynVar, null};
+//                ^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:15:16: Error: Unexpected token 'if'.
+//   var map11 = {if (oracle("foo")) "bar": dynVar, "baz": null};
+//                ^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:16:17: Error: Unexpected token 'if'.
+//   var list12 = [if (oracle("foo")) [42]];
+//                 ^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:17:16: Error: Unexpected token 'if'.
+//   var set12 = {if (oracle("foo")) [42], null};
+//                ^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:18:16: Error: Unexpected token 'if'.
+//   var map12 = {if (oracle("foo")) "bar": [42], "baz": null};
+//                ^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:19:36: Error: Unexpected token '...'.
+//   var list20 = [if (oracle("foo")) ...[42]];
+//                                    ^^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:19:17: Error: Unexpected token 'if'.
+//   var list20 = [if (oracle("foo")) ...[42]];
+//                 ^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:20:35: Error: Unexpected token '...'.
+//   var set20 = {if (oracle("foo")) ...[42], null};
+//                                   ^^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:20:16: Error: Unexpected token 'if'.
+//   var set20 = {if (oracle("foo")) ...[42], null};
+//                ^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:21:35: Error: Unexpected token '...'.
+//   var map20 = {if (oracle("foo")) ...{"bar": 42}, "baz": null};
+//                                   ^^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:21:16: Error: Unexpected token 'if'.
+//   var map20 = {if (oracle("foo")) ...{"bar": 42}, "baz": null};
+//                ^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:22:36: Error: Unexpected token '...'.
+//   var list21 = [if (oracle("foo")) ...[dynVar]];
+//                                    ^^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:22:17: Error: Unexpected token 'if'.
+//   var list21 = [if (oracle("foo")) ...[dynVar]];
+//                 ^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:23:35: Error: Unexpected token '...'.
+//   var set21 = {if (oracle("foo")) ...[dynVar], null};
+//                                   ^^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:23:16: Error: Unexpected token 'if'.
+//   var set21 = {if (oracle("foo")) ...[dynVar], null};
+//                ^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:24:35: Error: Unexpected token '...'.
+//   var map21 = {if (oracle("foo")) ...{"bar": dynVar}, "baz": null};
+//                                   ^^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:24:16: Error: Unexpected token 'if'.
+//   var map21 = {if (oracle("foo")) ...{"bar": dynVar}, "baz": null};
+//                ^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:25:36: Error: Unexpected token '...'.
+//   var list22 = [if (oracle("foo")) ...[[42]]];
+//                                    ^^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:25:17: Error: Unexpected token 'if'.
+//   var list22 = [if (oracle("foo")) ...[[42]]];
+//                 ^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:26:35: Error: Unexpected token '...'.
+//   var set22 = {if (oracle("foo")) ...[[42]], null};
+//                                   ^^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:26:16: Error: Unexpected token 'if'.
+//   var set22 = {if (oracle("foo")) ...[[42]], null};
+//                ^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:27:35: Error: Unexpected token '...'.
+//   var map22 = {if (oracle("foo")) ...{"bar": [42]}, "baz": null};
+//                                   ^^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:27:16: Error: Unexpected token 'if'.
+//   var map22 = {if (oracle("foo")) ...{"bar": [42]}, "baz": null};
+//                ^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:28:50: Error: Unexpected token '...'.
+//   var list30 = [if (oracle("foo")) if (oracle()) ...[42]];
+//                                                  ^^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:28:36: Error: Unexpected token 'if'.
+//   var list30 = [if (oracle("foo")) if (oracle()) ...[42]];
+//                                    ^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:28:17: Error: Unexpected token 'if'.
+//   var list30 = [if (oracle("foo")) if (oracle()) ...[42]];
+//                 ^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:29:49: Error: Unexpected token '...'.
+//   var set30 = {if (oracle("foo")) if (oracle()) ...[42], null};
+//                                                 ^^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:29:35: Error: Unexpected token 'if'.
+//   var set30 = {if (oracle("foo")) if (oracle()) ...[42], null};
+//                                   ^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:29:16: Error: Unexpected token 'if'.
+//   var set30 = {if (oracle("foo")) if (oracle()) ...[42], null};
+//                ^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:30:49: Error: Unexpected token '...'.
+//   var map30 = {if (oracle("foo")) if (oracle()) ...{"bar": 42}, "baz": null};
+//                                                 ^^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:30:35: Error: Unexpected token 'if'.
+//   var map30 = {if (oracle("foo")) if (oracle()) ...{"bar": 42}, "baz": null};
+//                                   ^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:30:16: Error: Unexpected token 'if'.
+//   var map30 = {if (oracle("foo")) if (oracle()) ...{"bar": 42}, "baz": null};
+//                ^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:31:50: Error: Unexpected token '...'.
+//   var list31 = [if (oracle("foo")) if (oracle()) ...[dynVar]];
+//                                                  ^^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:31:36: Error: Unexpected token 'if'.
+//   var list31 = [if (oracle("foo")) if (oracle()) ...[dynVar]];
+//                                    ^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:31:17: Error: Unexpected token 'if'.
+//   var list31 = [if (oracle("foo")) if (oracle()) ...[dynVar]];
+//                 ^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:32:49: Error: Unexpected token '...'.
+//   var set31 = {if (oracle("foo")) if (oracle()) ...[dynVar], null};
+//                                                 ^^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:32:35: Error: Unexpected token 'if'.
+//   var set31 = {if (oracle("foo")) if (oracle()) ...[dynVar], null};
+//                                   ^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:32:16: Error: Unexpected token 'if'.
+//   var set31 = {if (oracle("foo")) if (oracle()) ...[dynVar], null};
+//                ^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:33:49: Error: Unexpected token '...'.
+//   var map31 = {if (oracle("foo")) if (oracle()) ...{"bar": dynVar}, "baz": null};
+//                                                 ^^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:33:35: Error: Unexpected token 'if'.
+//   var map31 = {if (oracle("foo")) if (oracle()) ...{"bar": dynVar}, "baz": null};
+//                                   ^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:33:16: Error: Unexpected token 'if'.
+//   var map31 = {if (oracle("foo")) if (oracle()) ...{"bar": dynVar}, "baz": null};
+//                ^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:34:50: Error: Unexpected token '...'.
+//   var list33 = [if (oracle("foo")) if (oracle()) ...[[42]]];
+//                                                  ^^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:34:36: Error: Unexpected token 'if'.
+//   var list33 = [if (oracle("foo")) if (oracle()) ...[[42]]];
+//                                    ^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:34:17: Error: Unexpected token 'if'.
+//   var list33 = [if (oracle("foo")) if (oracle()) ...[[42]]];
+//                 ^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:35:49: Error: Unexpected token '...'.
+//   var set33 = {if (oracle("foo")) if (oracle()) ...[[42]], null};
+//                                                 ^^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:35:35: Error: Unexpected token 'if'.
+//   var set33 = {if (oracle("foo")) if (oracle()) ...[[42]], null};
+//                                   ^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:35:16: Error: Unexpected token 'if'.
+//   var set33 = {if (oracle("foo")) if (oracle()) ...[[42]], null};
+//                ^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:36:49: Error: Unexpected token '...'.
+//   var map33 = {if (oracle("foo")) if (oracle()) ...{"bar": [42]}, "baz": null};
+//                                                 ^^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:36:35: Error: Unexpected token 'if'.
+//   var map33 = {if (oracle("foo")) if (oracle()) ...{"bar": [42]}, "baz": null};
+//                                   ^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:36:16: Error: Unexpected token 'if'.
+//   var map33 = {if (oracle("foo")) if (oracle()) ...{"bar": [42]}, "baz": null};
+//                ^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:37:48: Error: Unexpected token '...'.
+//   List<List<int>> list40 = [if (oracle("foo")) ...[[]]];
+//                                                ^^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:37:29: Error: Unexpected token 'if'.
+//   List<List<int>> list40 = [if (oracle("foo")) ...[[]]];
+//                             ^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:38:46: Error: Unexpected token '...'.
+//   Set<List<int>> set40 = {if (oracle("foo")) ...[[]], null};
+//                                              ^^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:38:27: Error: Unexpected token 'if'.
+//   Set<List<int>> set40 = {if (oracle("foo")) ...[[]], null};
+//                           ^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:39:54: Error: Unexpected token '...'.
+//   Map<String, List<int>> map40 = {if (oracle("foo")) ...{"bar", []}, "baz": null};
+//                                                      ^^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:39:35: Error: Unexpected token 'if'.
+//   Map<String, List<int>> map40 = {if (oracle("foo")) ...{"bar", []}, "baz": null};
+//                                   ^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:40:48: Error: Unexpected token '...'.
+//   List<List<int>> list41 = [if (oracle("foo")) ...{[]}];
+//                                                ^^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:40:29: Error: Unexpected token 'if'.
+//   List<List<int>> list41 = [if (oracle("foo")) ...{[]}];
+//                             ^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:41:46: Error: Unexpected token '...'.
+//   Set<List<int>> set41 = {if (oracle("foo")) ...{[]}, null};
+//                                              ^^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:41:27: Error: Unexpected token 'if'.
+//   Set<List<int>> set41 = {if (oracle("foo")) ...{[]}, null};
+//                           ^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:42:62: Error: Unexpected token '...'.
+//   List<List<int>> list42 = [if (oracle("foo")) if (oracle()) ...[[]]];
+//                                                              ^^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:42:48: Error: Unexpected token 'if'.
+//   List<List<int>> list42 = [if (oracle("foo")) if (oracle()) ...[[]]];
+//                                                ^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:42:29: Error: Unexpected token 'if'.
+//   List<List<int>> list42 = [if (oracle("foo")) if (oracle()) ...[[]]];
+//                             ^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:43:60: Error: Unexpected token '...'.
+//   Set<List<int>> set42 = {if (oracle("foo")) if (oracle()) ...[[]], null};
+//                                                            ^^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:43:46: Error: Unexpected token 'if'.
+//   Set<List<int>> set42 = {if (oracle("foo")) if (oracle()) ...[[]], null};
+//                                              ^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:43:27: Error: Unexpected token 'if'.
+//   Set<List<int>> set42 = {if (oracle("foo")) if (oracle()) ...[[]], null};
+//                           ^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:44:68: Error: Unexpected token '...'.
+//   Map<String, List<int>> map42 = {if (oracle("foo")) if (oracle()) ...{"bar": []}, "baz": null};
+//                                                                    ^^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:44:54: Error: Unexpected token 'if'.
+//   Map<String, List<int>> map42 = {if (oracle("foo")) if (oracle()) ...{"bar": []}, "baz": null};
+//                                                      ^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:44:35: Error: Unexpected token 'if'.
+//   Map<String, List<int>> map42 = {if (oracle("foo")) if (oracle()) ...{"bar": []}, "baz": null};
+//                                   ^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:45:42: Error: Unexpected token '...'.
+//   List<int> list50 = [if (oracle("foo")) ...[]];
+//                                          ^^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:45:23: Error: Unexpected token 'if'.
+//   List<int> list50 = [if (oracle("foo")) ...[]];
+//                       ^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:46:40: Error: Unexpected token '...'.
+//   Set<int> set50 = {if (oracle("foo")) ...[], null};
+//                                        ^^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:46:21: Error: Unexpected token 'if'.
+//   Set<int> set50 = {if (oracle("foo")) ...[], null};
+//                     ^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:47:48: Error: Unexpected token '...'.
+//   Map<String, int> map50 = {if (oracle("foo")) ...{}, "baz": null};
+//                                                ^^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:47:29: Error: Unexpected token 'if'.
+//   Map<String, int> map50 = {if (oracle("foo")) ...{}, "baz": null};
+//                             ^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:48:42: Error: Unexpected token '...'.
+//   List<int> list51 = [if (oracle("foo")) ...{}];
+//                                          ^^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:48:23: Error: Unexpected token 'if'.
+//   List<int> list51 = [if (oracle("foo")) ...{}];
+//                       ^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:49:40: Error: Unexpected token '...'.
+//   Set<int> set51 = {if (oracle("foo")) ...{}, null};
+//                                        ^^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:49:21: Error: Unexpected token 'if'.
+//   Set<int> set51 = {if (oracle("foo")) ...{}, null};
+//                     ^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:50:56: Error: Unexpected token '...'.
+//   List<int> list52 = [if (oracle("foo")) if (oracle()) ...[]];
+//                                                        ^^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:50:42: Error: Unexpected token 'if'.
+//   List<int> list52 = [if (oracle("foo")) if (oracle()) ...[]];
+//                                          ^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:50:23: Error: Unexpected token 'if'.
+//   List<int> list52 = [if (oracle("foo")) if (oracle()) ...[]];
+//                       ^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:51:54: Error: Unexpected token '...'.
+//   Set<int> set52 = {if (oracle("foo")) if (oracle()) ...[], null};
+//                                                      ^^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:51:40: Error: Unexpected token 'if'.
+//   Set<int> set52 = {if (oracle("foo")) if (oracle()) ...[], null};
+//                                        ^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:51:21: Error: Unexpected token 'if'.
+//   Set<int> set52 = {if (oracle("foo")) if (oracle()) ...[], null};
+//                     ^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:52:62: Error: Unexpected token '...'.
+//   Map<String, int> map52 = {if (oracle("foo")) if (oracle()) ...{}, "baz": null};
+//                                                              ^^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:52:48: Error: Unexpected token 'if'.
+//   Map<String, int> map52 = {if (oracle("foo")) if (oracle()) ...{}, "baz": null};
+//                                                ^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:52:29: Error: Unexpected token 'if'.
+//   Map<String, int> map52 = {if (oracle("foo")) if (oracle()) ...{}, "baz": null};
+//                             ^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:53:48: Error: Unexpected token '...'.
+//   List<List<int>> list60 = [if (oracle("foo")) ...[[]]];
+//                                                ^^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:53:29: Error: Unexpected token 'if'.
+//   List<List<int>> list60 = [if (oracle("foo")) ...[[]]];
+//                             ^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:54:46: Error: Unexpected token '...'.
+//   Set<List<int>> set60 = {if (oracle("foo")) ...[[]], null};
+//                                              ^^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:54:27: Error: Unexpected token 'if'.
+//   Set<List<int>> set60 = {if (oracle("foo")) ...[[]], null};
+//                           ^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:55:54: Error: Unexpected token '...'.
+//   Map<String, List<int>> map60 = {if (oracle("foo")) ...{"bar": []}, "baz": null};
+//                                                      ^^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:55:35: Error: Unexpected token 'if'.
+//   Map<String, List<int>> map60 = {if (oracle("foo")) ...{"bar": []}, "baz": null};
+//                                   ^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:56:62: Error: Unexpected token '...'.
+//   List<List<int>> list61 = [if (oracle("foo")) if (oracle()) ...[[]]];
+//                                                              ^^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:56:48: Error: Unexpected token 'if'.
+//   List<List<int>> list61 = [if (oracle("foo")) if (oracle()) ...[[]]];
+//                                                ^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:56:29: Error: Unexpected token 'if'.
+//   List<List<int>> list61 = [if (oracle("foo")) if (oracle()) ...[[]]];
+//                             ^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:57:60: Error: Unexpected token '...'.
+//   Set<List<int>> set61 = {if (oracle("foo")) if (oracle()) ...[[]], null};
+//                                                            ^^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:57:46: Error: Unexpected token 'if'.
+//   Set<List<int>> set61 = {if (oracle("foo")) if (oracle()) ...[[]], null};
+//                                              ^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:57:27: Error: Unexpected token 'if'.
+//   Set<List<int>> set61 = {if (oracle("foo")) if (oracle()) ...[[]], null};
+//                           ^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:58:68: Error: Unexpected token '...'.
+//   Map<String, List<int>> map61 = {if (oracle("foo")) if (oracle()) ...{"bar": []}, "baz": null};
+//                                                                    ^^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:58:54: Error: Unexpected token 'if'.
+//   Map<String, List<int>> map61 = {if (oracle("foo")) if (oracle()) ...{"bar": []}, "baz": null};
+//                                                      ^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:58:35: Error: Unexpected token 'if'.
+//   Map<String, List<int>> map61 = {if (oracle("foo")) if (oracle()) ...{"bar": []}, "baz": null};
+//                                   ^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:59:29: Error: Unexpected token 'if'.
+//   List<List<int>> list70 = [if (oracle("foo")) []];
+//                             ^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:60:27: Error: Unexpected token 'if'.
+//   Set<List<int>> set70 = {if (oracle("foo")) [], null};
+//                           ^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:61:48: Error: Unexpected token 'if'.
+//   List<List<int>> list71 = [if (oracle("foo")) if (oracle()) []];
+//                                                ^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:61:29: Error: Unexpected token 'if'.
+//   List<List<int>> list71 = [if (oracle("foo")) if (oracle()) []];
+//                             ^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:62:46: Error: Unexpected token 'if'.
+//   Set<List<int>> set71 = {if (oracle("foo")) if (oracle()) [], null};
+//                                              ^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:62:27: Error: Unexpected token 'if'.
+//   Set<List<int>> set71 = {if (oracle("foo")) if (oracle()) [], null};
+//                           ^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:63:17: Error: Unexpected token 'if'.
+//   var list80 = [if (oracle("foo")) 42 else 3.14];
+//                 ^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:64:16: Error: Unexpected token 'if'.
+//   var set80 = {if (oracle("foo")) 42 else 3.14, null};
+//                ^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:65:16: Error: Unexpected token 'if'.
+//   var map80 = {if (oracle("foo")) "bar": 42 else "bar": 3.14, "baz": null};
+//                ^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:66:36: Error: Unexpected token '...'.
+//   var list81 = [if (oracle("foo")) ...listInt else ...listDouble];
+//                                    ^^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:66:52: Error: Unexpected token '...'.
+//   var list81 = [if (oracle("foo")) ...listInt else ...listDouble];
+//                                                    ^^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:66:17: Error: Unexpected token 'if'.
+//   var list81 = [if (oracle("foo")) ...listInt else ...listDouble];
+//                 ^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:67:35: Error: Unexpected token '...'.
+//   var set81 = {if (oracle("foo")) ...listInt else ...listDouble, null};
+//                                   ^^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:67:51: Error: Unexpected token '...'.
+//   var set81 = {if (oracle("foo")) ...listInt else ...listDouble, null};
+//                                                   ^^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:67:16: Error: Unexpected token 'if'.
+//   var set81 = {if (oracle("foo")) ...listInt else ...listDouble, null};
+//                ^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:68:35: Error: Unexpected token '...'.
+//   var map81 = {if (oracle("foo")) ...mapToInt else ...mapToDouble, "baz": null};
+//                                   ^^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:68:52: Error: Unexpected token '...'.
+//   var map81 = {if (oracle("foo")) ...mapToInt else ...mapToDouble, "baz": null};
+//                                                    ^^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:68:16: Error: Unexpected token 'if'.
+//   var map81 = {if (oracle("foo")) ...mapToInt else ...mapToDouble, "baz": null};
+//                ^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:69:36: Error: Unexpected token '...'.
+//   var list82 = [if (oracle("foo")) ...listInt else ...dynVar];
+//                                    ^^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:69:52: Error: Unexpected token '...'.
+//   var list82 = [if (oracle("foo")) ...listInt else ...dynVar];
+//                                                    ^^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:69:17: Error: Unexpected token 'if'.
+//   var list82 = [if (oracle("foo")) ...listInt else ...dynVar];
+//                 ^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:70:35: Error: Unexpected token '...'.
+//   var set82 = {if (oracle("foo")) ...listInt else ...dynVar, null};
+//                                   ^^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:70:51: Error: Unexpected token '...'.
+//   var set82 = {if (oracle("foo")) ...listInt else ...dynVar, null};
+//                                                   ^^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:70:16: Error: Unexpected token 'if'.
+//   var set82 = {if (oracle("foo")) ...listInt else ...dynVar, null};
+//                ^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:71:35: Error: Unexpected token '...'.
+//   var map82 = {if (oracle("foo")) ...mapToInt else ...dynVar, null};
+//                                   ^^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:71:52: Error: Unexpected token '...'.
+//   var map82 = {if (oracle("foo")) ...mapToInt else ...dynVar, null};
+//                                                    ^^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:71:16: Error: Unexpected token 'if'.
+//   var map82 = {if (oracle("foo")) ...mapToInt else ...dynVar, null};
+//                ^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:72:44: Error: Unexpected token '...'.
+//   var list83 = [if (oracle("foo")) 42 else ...listDouble];
+//                                            ^^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:72:17: Error: Unexpected token 'if'.
+//   var list83 = [if (oracle("foo")) 42 else ...listDouble];
+//                 ^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:73:35: Error: Unexpected token '...'.
+//   var set83 = {if (oracle("foo")) ...listInt else 3.14, null};
+//                                   ^^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:73:16: Error: Unexpected token 'if'.
+//   var set83 = {if (oracle("foo")) ...listInt else 3.14, null};
+//                ^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:74:35: Error: Unexpected token '...'.
+//   var map83 = {if (oracle("foo")) ...mapToInt else "bar": 3.14, "baz": null};
+//                                   ^^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:74:16: Error: Unexpected token 'if'.
+//   var map83 = {if (oracle("foo")) ...mapToInt else "bar": 3.14, "baz": null};
+//                ^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:75:23: Error: Unexpected token 'if'.
+//   List<int> list90 = [if (oracle("foo")) dynVar];
+//                       ^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:76:21: Error: Unexpected token 'if'.
+//   Set<int> set90 = {if (oracle("foo")) dynVar, null};
+//                     ^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:77:29: Error: Unexpected token 'if'.
+//   Map<String, int> map90 = {if (oracle("foo")) "bar": dynVar, "baz": null};
+//                             ^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:78:42: Error: Unexpected token '...'.
+//   List<int> list91 = [if (oracle("foo")) ...dynVar];
+//                                          ^^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:78:23: Error: Unexpected token 'if'.
+//   List<int> list91 = [if (oracle("foo")) ...dynVar];
+//                       ^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:79:40: Error: Unexpected token '...'.
+//   Set<int> set91 = {if (oracle("foo")) ...dynVar, null};
+//                                        ^^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:79:21: Error: Unexpected token 'if'.
+//   Set<int> set91 = {if (oracle("foo")) ...dynVar, null};
+//                     ^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:80:48: Error: Unexpected token '...'.
+//   Map<String, int> map91 = {if (oracle("foo")) ...dynVar, "baz": null};
+//                                                ^^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:80:29: Error: Unexpected token 'if'.
+//   Map<String, int> map91 = {if (oracle("foo")) ...dynVar, "baz": null};
+//                             ^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:84:9: Error: Unexpected token 'if'.
+//   <int>[if (oracle("foo")) "bar"];
+//         ^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:85:9: Error: Unexpected token 'if'.
+//   <int>{if (oracle("foo")) "bar", null};
+//         ^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:86:17: Error: Unexpected token 'if'.
+//   <String, int>{if (oracle("foo")) "bar": "bar", "baz": null};
+//                 ^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:87:28: Error: Unexpected token '...'.
+//   <int>[if (oracle("foo")) ...["bar"]];
+//                            ^^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:87:9: Error: Unexpected token 'if'.
+//   <int>[if (oracle("foo")) ...["bar"]];
+//         ^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:88:28: Error: Unexpected token '...'.
+//   <int>{if (oracle("foo")) ...["bar"], null};
+//                            ^^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:88:9: Error: Unexpected token 'if'.
+//   <int>{if (oracle("foo")) ...["bar"], null};
+//         ^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:89:36: Error: Unexpected token '...'.
+//   <String, int>{if (oracle("foo")) ...{"bar": "bar"}, "baz": null};
+//                                    ^^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:89:17: Error: Unexpected token 'if'.
+//   <String, int>{if (oracle("foo")) ...{"bar": "bar"}, "baz": null};
+//                 ^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:90:28: Error: Unexpected token '...'.
+//   <int>[if (oracle("foo")) ...map];
+//                            ^^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:90:9: Error: Unexpected token 'if'.
+//   <int>[if (oracle("foo")) ...map];
+//         ^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:91:28: Error: Unexpected token '...'.
+//   <int>{if (oracle("foo")) ...map, null};
+//                            ^^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:91:9: Error: Unexpected token 'if'.
+//   <int>{if (oracle("foo")) ...map, null};
+//         ^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:92:36: Error: Unexpected token '...'.
+//   <String, int>{if (oracle("foo")) ...["bar"], "baz": null};
+//                                    ^^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:92:17: Error: Unexpected token 'if'.
+//   <String, int>{if (oracle("foo")) ...["bar"], "baz": null};
+//                 ^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:93:12: Error: Unexpected token 'if'.
+//   <String>[if (oracle("foo")) 42 else 3.14];
+//            ^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:94:12: Error: Unexpected token 'if'.
+//   <String>{if (oracle("foo")) 42 else 3.14, null};
+//            ^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:95:20: Error: Unexpected token 'if'.
+//   <String, String>{if (oracle("foo")) "bar": 42 else "baz": 3.14, "baz": null};
+//                    ^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:96:28: Error: Unexpected token '...'.
+//   <int>[if (oracle("foo")) ...map else 42];
+//                            ^^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:96:9: Error: Unexpected token 'if'.
+//   <int>[if (oracle("foo")) ...map else 42];
+//         ^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:97:28: Error: Unexpected token '...'.
+//   <int>{if (oracle("foo")) ...map else 42, null};
+//                            ^^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:97:9: Error: Unexpected token 'if'.
+//   <int>{if (oracle("foo")) ...map else 42, null};
+//         ^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:98:36: Error: Unexpected token '...'.
+//   <String, int>{if (oracle("foo")) ...[42] else "bar": 42, "baz": null};
+//                                    ^^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:98:17: Error: Unexpected token 'if'.
+//   <String, int>{if (oracle("foo")) ...[42] else "bar": 42, "baz": null};
+//                 ^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:99:36: Error: Unexpected token '...'.
+//   <int>[if (oracle("foo")) 42 else ...map];
+//                                    ^^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:99:9: Error: Unexpected token 'if'.
+//   <int>[if (oracle("foo")) 42 else ...map];
+//         ^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:100:28: Error: Unexpected token '...'.
+//   <int>{if (oracle("foo")) ...map else 42, null};
+//                            ^^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:100:9: Error: Unexpected token 'if'.
+//   <int>{if (oracle("foo")) ...map else 42, null};
+//         ^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:101:51: Error: Unexpected token '...'.
+//   <String, int>{if (oracle("foo")) "bar": 42 else ...[42], "baz": null};
+//                                                   ^^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:101:17: Error: Unexpected token 'if'.
+//   <String, int>{if (oracle("foo")) "bar": 42 else ...[42], "baz": null};
+//                 ^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:106:17: Error: Unexpected token 'for'.
+//   var list10 = [for (int i = 0; oracle("foo"); i++) 42];
+//                 ^^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:107:16: Error: Unexpected token 'for'.
+//   var set10 = {for (int i = 0; oracle("foo"); i++) 42, null};
+//                ^^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:108:16: Error: Unexpected token 'for'.
+//   var map10 = {for (int i = 0; oracle("foo"); i++) "bar": 42, "baz": null};
+//                ^^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:109:17: Error: Unexpected token 'for'.
+//   var list11 = [for (int i = 0; oracle("foo"); i++) dynVar];
+//                 ^^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:110:16: Error: Unexpected token 'for'.
+//   var set11 = {for (int i = 0; oracle("foo"); i++) dynVar, null};
+//                ^^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:111:16: Error: Unexpected token 'for'.
+//   var map11 = {for (int i = 0; oracle("foo"); i++) "bar": dynVar, "baz": null};
+//                ^^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:112:17: Error: Unexpected token 'for'.
+//   var list12 = [for (int i = 0; oracle("foo"); i++) [42]];
+//                 ^^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:113:16: Error: Unexpected token 'for'.
+//   var set12 = {for (int i = 0; oracle("foo"); i++) [42], null};
+//                ^^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:114:16: Error: Unexpected token 'for'.
+//   var map12 = {for (int i = 0; oracle("foo"); i++) "bar": [42], "baz": null};
+//                ^^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:115:53: Error: Unexpected token '...'.
+//   var list20 = [for (int i = 0; oracle("foo"); i++) ...[42]];
+//                                                     ^^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:115:17: Error: Unexpected token 'for'.
+//   var list20 = [for (int i = 0; oracle("foo"); i++) ...[42]];
+//                 ^^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:116:52: Error: Unexpected token '...'.
+//   var set20 = {for (int i = 0; oracle("foo"); i++) ...[42], null};
+//                                                    ^^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:116:16: Error: Unexpected token 'for'.
+//   var set20 = {for (int i = 0; oracle("foo"); i++) ...[42], null};
+//                ^^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:117:52: Error: Unexpected token '...'.
+//   var map20 = {for (int i = 0; oracle("foo"); i++) ...{"bar": 42}, "baz": null};
+//                                                    ^^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:117:16: Error: Unexpected token 'for'.
+//   var map20 = {for (int i = 0; oracle("foo"); i++) ...{"bar": 42}, "baz": null};
+//                ^^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:118:53: Error: Unexpected token '...'.
+//   var list21 = [for (int i = 0; oracle("foo"); i++) ...[dynVar]];
+//                                                     ^^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:118:17: Error: Unexpected token 'for'.
+//   var list21 = [for (int i = 0; oracle("foo"); i++) ...[dynVar]];
+//                 ^^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:119:52: Error: Unexpected token '...'.
+//   var set21 = {for (int i = 0; oracle("foo"); i++) ...[dynVar], null};
+//                                                    ^^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:119:16: Error: Unexpected token 'for'.
+//   var set21 = {for (int i = 0; oracle("foo"); i++) ...[dynVar], null};
+//                ^^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:120:52: Error: Unexpected token '...'.
+//   var map21 = {for (int i = 0; oracle("foo"); i++) ...{"bar": dynVar}, "baz": null};
+//                                                    ^^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:120:16: Error: Unexpected token 'for'.
+//   var map21 = {for (int i = 0; oracle("foo"); i++) ...{"bar": dynVar}, "baz": null};
+//                ^^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:121:53: Error: Unexpected token '...'.
+//   var list22 = [for (int i = 0; oracle("foo"); i++) ...[[42]]];
+//                                                     ^^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:121:17: Error: Unexpected token 'for'.
+//   var list22 = [for (int i = 0; oracle("foo"); i++) ...[[42]]];
+//                 ^^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:122:52: Error: Unexpected token '...'.
+//   var set22 = {for (int i = 0; oracle("foo"); i++) ...[[42]], null};
+//                                                    ^^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:122:16: Error: Unexpected token 'for'.
+//   var set22 = {for (int i = 0; oracle("foo"); i++) ...[[42]], null};
+//                ^^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:123:52: Error: Unexpected token '...'.
+//   var map22 = {for (int i = 0; oracle("foo"); i++) ...{"bar": [42]}, "baz": null};
+//                                                    ^^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:123:16: Error: Unexpected token 'for'.
+//   var map22 = {for (int i = 0; oracle("foo"); i++) ...{"bar": [42]}, "baz": null};
+//                ^^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:124:67: Error: Unexpected token '...'.
+//   var list30 = [for (int i = 0; oracle("foo"); i++) if (oracle()) ...[42]];
+//                                                                   ^^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:124:53: Error: Unexpected token 'if'.
+//   var list30 = [for (int i = 0; oracle("foo"); i++) if (oracle()) ...[42]];
+//                                                     ^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:124:17: Error: Unexpected token 'for'.
+//   var list30 = [for (int i = 0; oracle("foo"); i++) if (oracle()) ...[42]];
+//                 ^^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:125:66: Error: Unexpected token '...'.
+//   var set30 = {for (int i = 0; oracle("foo"); i++) if (oracle()) ...[42], null};
+//                                                                  ^^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:125:52: Error: Unexpected token 'if'.
+//   var set30 = {for (int i = 0; oracle("foo"); i++) if (oracle()) ...[42], null};
+//                                                    ^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:125:16: Error: Unexpected token 'for'.
+//   var set30 = {for (int i = 0; oracle("foo"); i++) if (oracle()) ...[42], null};
+//                ^^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:126:66: Error: Unexpected token '...'.
+//   var map30 = {for (int i = 0; oracle("foo"); i++) if (oracle()) ...{"bar": 42}, "baz": null};
+//                                                                  ^^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:126:52: Error: Unexpected token 'if'.
+//   var map30 = {for (int i = 0; oracle("foo"); i++) if (oracle()) ...{"bar": 42}, "baz": null};
+//                                                    ^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:126:16: Error: Unexpected token 'for'.
+//   var map30 = {for (int i = 0; oracle("foo"); i++) if (oracle()) ...{"bar": 42}, "baz": null};
+//                ^^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:127:67: Error: Unexpected token '...'.
+//   var list31 = [for (int i = 0; oracle("foo"); i++) if (oracle()) ...[dynVar]];
+//                                                                   ^^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:127:53: Error: Unexpected token 'if'.
+//   var list31 = [for (int i = 0; oracle("foo"); i++) if (oracle()) ...[dynVar]];
+//                                                     ^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:127:17: Error: Unexpected token 'for'.
+//   var list31 = [for (int i = 0; oracle("foo"); i++) if (oracle()) ...[dynVar]];
+//                 ^^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:128:66: Error: Unexpected token '...'.
+//   var set31 = {for (int i = 0; oracle("foo"); i++) if (oracle()) ...[dynVar], null};
+//                                                                  ^^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:128:52: Error: Unexpected token 'if'.
+//   var set31 = {for (int i = 0; oracle("foo"); i++) if (oracle()) ...[dynVar], null};
+//                                                    ^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:128:16: Error: Unexpected token 'for'.
+//   var set31 = {for (int i = 0; oracle("foo"); i++) if (oracle()) ...[dynVar], null};
+//                ^^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:129:66: Error: Unexpected token '...'.
+//   var map31 = {for (int i = 0; oracle("foo"); i++) if (oracle()) ...{"bar": dynVar}, "baz": null};
+//                                                                  ^^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:129:52: Error: Unexpected token 'if'.
+//   var map31 = {for (int i = 0; oracle("foo"); i++) if (oracle()) ...{"bar": dynVar}, "baz": null};
+//                                                    ^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:129:16: Error: Unexpected token 'for'.
+//   var map31 = {for (int i = 0; oracle("foo"); i++) if (oracle()) ...{"bar": dynVar}, "baz": null};
+//                ^^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:130:67: Error: Unexpected token '...'.
+//   var list33 = [for (int i = 0; oracle("foo"); i++) if (oracle()) ...[[42]]];
+//                                                                   ^^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:130:53: Error: Unexpected token 'if'.
+//   var list33 = [for (int i = 0; oracle("foo"); i++) if (oracle()) ...[[42]]];
+//                                                     ^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:130:17: Error: Unexpected token 'for'.
+//   var list33 = [for (int i = 0; oracle("foo"); i++) if (oracle()) ...[[42]]];
+//                 ^^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:131:66: Error: Unexpected token '...'.
+//   var set33 = {for (int i = 0; oracle("foo"); i++) if (oracle()) ...[[42]], null};
+//                                                                  ^^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:131:52: Error: Unexpected token 'if'.
+//   var set33 = {for (int i = 0; oracle("foo"); i++) if (oracle()) ...[[42]], null};
+//                                                    ^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:131:16: Error: Unexpected token 'for'.
+//   var set33 = {for (int i = 0; oracle("foo"); i++) if (oracle()) ...[[42]], null};
+//                ^^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:132:66: Error: Unexpected token '...'.
+//   var map33 = {for (int i = 0; oracle("foo"); i++) if (oracle()) ...{"bar": [42]}, "baz": null};
+//                                                                  ^^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:132:52: Error: Unexpected token 'if'.
+//   var map33 = {for (int i = 0; oracle("foo"); i++) if (oracle()) ...{"bar": [42]}, "baz": null};
+//                                                    ^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:132:16: Error: Unexpected token 'for'.
+//   var map33 = {for (int i = 0; oracle("foo"); i++) if (oracle()) ...{"bar": [42]}, "baz": null};
+//                ^^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:133:65: Error: Unexpected token '...'.
+//   List<List<int>> list40 = [for (int i = 0; oracle("foo"); i++) ...[[]]];
+//                                                                 ^^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:133:29: Error: Unexpected token 'for'.
+//   List<List<int>> list40 = [for (int i = 0; oracle("foo"); i++) ...[[]]];
+//                             ^^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:134:63: Error: Unexpected token '...'.
+//   Set<List<int>> set40 = {for (int i = 0; oracle("foo"); i++) ...[[]], null};
+//                                                               ^^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:134:27: Error: Unexpected token 'for'.
+//   Set<List<int>> set40 = {for (int i = 0; oracle("foo"); i++) ...[[]], null};
+//                           ^^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:135:71: Error: Unexpected token '...'.
+//   Map<String, List<int>> map40 = {for (int i = 0; oracle("foo"); i++) ...{"bar": []}, "baz": null};
+//                                                                       ^^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:135:35: Error: Unexpected token 'for'.
+//   Map<String, List<int>> map40 = {for (int i = 0; oracle("foo"); i++) ...{"bar": []}, "baz": null};
+//                                   ^^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:136:65: Error: Unexpected token '...'.
+//   List<List<int>> list41 = [for (int i = 0; oracle("foo"); i++) ...{[]}];
+//                                                                 ^^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:136:29: Error: Unexpected token 'for'.
+//   List<List<int>> list41 = [for (int i = 0; oracle("foo"); i++) ...{[]}];
+//                             ^^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:137:63: Error: Unexpected token '...'.
+//   Set<List<int>> set41 = {for (int i = 0; oracle("foo"); i++) ...{[]}, null};
+//                                                               ^^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:137:27: Error: Unexpected token 'for'.
+//   Set<List<int>> set41 = {for (int i = 0; oracle("foo"); i++) ...{[]}, null};
+//                           ^^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:138:79: Error: Unexpected token '...'.
+//   List<List<int>> list42 = [for (int i = 0; oracle("foo"); i++) if (oracle()) ...[[]]];
+//                                                                               ^^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:138:65: Error: Unexpected token 'if'.
+//   List<List<int>> list42 = [for (int i = 0; oracle("foo"); i++) if (oracle()) ...[[]]];
+//                                                                 ^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:138:29: Error: Unexpected token 'for'.
+//   List<List<int>> list42 = [for (int i = 0; oracle("foo"); i++) if (oracle()) ...[[]]];
+//                             ^^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:139:77: Error: Unexpected token '...'.
+//   Set<List<int>> set42 = {for (int i = 0; oracle("foo"); i++) if (oracle()) ...[[]], null};
+//                                                                             ^^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:139:63: Error: Unexpected token 'if'.
+//   Set<List<int>> set42 = {for (int i = 0; oracle("foo"); i++) if (oracle()) ...[[]], null};
+//                                                               ^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:139:27: Error: Unexpected token 'for'.
+//   Set<List<int>> set42 = {for (int i = 0; oracle("foo"); i++) if (oracle()) ...[[]], null};
+//                           ^^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:140:85: Error: Unexpected token '...'.
+//   Map<String, List<int>> map42 = {for (int i = 0; oracle("foo"); i++) if (oracle()) ...{"bar": []}, "baz": null};
+//                                                                                     ^^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:140:71: Error: Unexpected token 'if'.
+//   Map<String, List<int>> map42 = {for (int i = 0; oracle("foo"); i++) if (oracle()) ...{"bar": []}, "baz": null};
+//                                                                       ^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:140:35: Error: Unexpected token 'for'.
+//   Map<String, List<int>> map42 = {for (int i = 0; oracle("foo"); i++) if (oracle()) ...{"bar": []}, "baz": null};
+//                                   ^^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:141:59: Error: Unexpected token '...'.
+//   List<int> list50 = [for (int i = 0; oracle("foo"); i++) ...[]];
+//                                                           ^^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:141:23: Error: Unexpected token 'for'.
+//   List<int> list50 = [for (int i = 0; oracle("foo"); i++) ...[]];
+//                       ^^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:142:57: Error: Unexpected token '...'.
+//   Set<int> set50 = {for (int i = 0; oracle("foo"); i++) ...[], null};
+//                                                         ^^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:142:21: Error: Unexpected token 'for'.
+//   Set<int> set50 = {for (int i = 0; oracle("foo"); i++) ...[], null};
+//                     ^^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:143:65: Error: Unexpected token '...'.
+//   Map<String, int> map50 = {for (int i = 0; oracle("foo"); i++) ...{}, "baz": null};
+//                                                                 ^^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:143:29: Error: Unexpected token 'for'.
+//   Map<String, int> map50 = {for (int i = 0; oracle("foo"); i++) ...{}, "baz": null};
+//                             ^^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:144:59: Error: Unexpected token '...'.
+//   List<int> list51 = [for (int i = 0; oracle("foo"); i++) ...{}];
+//                                                           ^^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:144:23: Error: Unexpected token 'for'.
+//   List<int> list51 = [for (int i = 0; oracle("foo"); i++) ...{}];
+//                       ^^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:145:57: Error: Unexpected token '...'.
+//   Set<int> set51 = {for (int i = 0; oracle("foo"); i++) ...{}, null};
+//                                                         ^^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:145:21: Error: Unexpected token 'for'.
+//   Set<int> set51 = {for (int i = 0; oracle("foo"); i++) ...{}, null};
+//                     ^^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:146:73: Error: Unexpected token '...'.
+//   List<int> list52 = [for (int i = 0; oracle("foo"); i++) if (oracle()) ...[]];
+//                                                                         ^^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:146:59: Error: Unexpected token 'if'.
+//   List<int> list52 = [for (int i = 0; oracle("foo"); i++) if (oracle()) ...[]];
+//                                                           ^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:146:23: Error: Unexpected token 'for'.
+//   List<int> list52 = [for (int i = 0; oracle("foo"); i++) if (oracle()) ...[]];
+//                       ^^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:147:71: Error: Unexpected token '...'.
+//   Set<int> set52 = {for (int i = 0; oracle("foo"); i++) if (oracle()) ...[], null};
+//                                                                       ^^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:147:57: Error: Unexpected token 'if'.
+//   Set<int> set52 = {for (int i = 0; oracle("foo"); i++) if (oracle()) ...[], null};
+//                                                         ^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:147:21: Error: Unexpected token 'for'.
+//   Set<int> set52 = {for (int i = 0; oracle("foo"); i++) if (oracle()) ...[], null};
+//                     ^^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:148:65: Error: Unexpected token '...'.
+//   List<List<int>> list60 = [for (int i = 0; oracle("foo"); i++) ...[[]]];
+//                                                                 ^^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:148:29: Error: Unexpected token 'for'.
+//   List<List<int>> list60 = [for (int i = 0; oracle("foo"); i++) ...[[]]];
+//                             ^^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:149:63: Error: Unexpected token '...'.
+//   Set<List<int>> set60 = {for (int i = 0; oracle("foo"); i++) ...[[]], null};
+//                                                               ^^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:149:27: Error: Unexpected token 'for'.
+//   Set<List<int>> set60 = {for (int i = 0; oracle("foo"); i++) ...[[]], null};
+//                           ^^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:150:71: Error: Unexpected token '...'.
+//   Map<String, List<int>> map60 = {for (int i = 0; oracle("foo"); i++) ...{"bar": []}, "baz": null};
+//                                                                       ^^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:150:35: Error: Unexpected token 'for'.
+//   Map<String, List<int>> map60 = {for (int i = 0; oracle("foo"); i++) ...{"bar": []}, "baz": null};
+//                                   ^^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:151:79: Error: Unexpected token '...'.
+//   List<List<int>> list61 = [for (int i = 0; oracle("foo"); i++) if (oracle()) ...[[]]];
+//                                                                               ^^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:151:65: Error: Unexpected token 'if'.
+//   List<List<int>> list61 = [for (int i = 0; oracle("foo"); i++) if (oracle()) ...[[]]];
+//                                                                 ^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:151:29: Error: Unexpected token 'for'.
+//   List<List<int>> list61 = [for (int i = 0; oracle("foo"); i++) if (oracle()) ...[[]]];
+//                             ^^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:152:77: Error: Unexpected token '...'.
+//   Set<List<int>> set61 = {for (int i = 0; oracle("foo"); i++) if (oracle()) ...[[]], null};
+//                                                                             ^^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:152:63: Error: Unexpected token 'if'.
+//   Set<List<int>> set61 = {for (int i = 0; oracle("foo"); i++) if (oracle()) ...[[]], null};
+//                                                               ^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:152:27: Error: Unexpected token 'for'.
+//   Set<List<int>> set61 = {for (int i = 0; oracle("foo"); i++) if (oracle()) ...[[]], null};
+//                           ^^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:153:85: Error: Unexpected token '...'.
+//   Map<String, List<int>> map61 = {for (int i = 0; oracle("foo"); i++) if (oracle()) ...{"bar": []}, "baz": null};
+//                                                                                     ^^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:153:71: Error: Unexpected token 'if'.
+//   Map<String, List<int>> map61 = {for (int i = 0; oracle("foo"); i++) if (oracle()) ...{"bar": []}, "baz": null};
+//                                                                       ^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:153:35: Error: Unexpected token 'for'.
+//   Map<String, List<int>> map61 = {for (int i = 0; oracle("foo"); i++) if (oracle()) ...{"bar": []}, "baz": null};
+//                                   ^^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:154:29: Error: Unexpected token 'for'.
+//   List<List<int>> list70 = [for (int i = 0; oracle("foo"); i++) []];
+//                             ^^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:155:27: Error: Unexpected token 'for'.
+//   Set<List<int>> set70 = {for (int i = 0; oracle("foo"); i++) [], null};
+//                           ^^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:156:35: Error: Unexpected token 'for'.
+//   Map<String, List<int>> map70 = {for (int i = 0; oracle("foo"); i++) "bar": [], "baz": null};
+//                                   ^^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:157:65: Error: Unexpected token 'if'.
+//   List<List<int>> list71 = [for (int i = 0; oracle("foo"); i++) if (oracle()) []];
+//                                                                 ^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:157:29: Error: Unexpected token 'for'.
+//   List<List<int>> list71 = [for (int i = 0; oracle("foo"); i++) if (oracle()) []];
+//                             ^^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:158:63: Error: Unexpected token 'if'.
+//   Set<List<int>> set71 = {for (int i = 0; oracle("foo"); i++) if (oracle()) [], null};
+//                                                               ^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:158:27: Error: Unexpected token 'for'.
+//   Set<List<int>> set71 = {for (int i = 0; oracle("foo"); i++) if (oracle()) [], null};
+//                           ^^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:159:71: Error: Unexpected token 'if'.
+//   Map<String, List<int>> map71 = {for (int i = 0; oracle("foo"); i++) if (oracle()) "bar": [], "baz": null};
+//                                                                       ^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:159:35: Error: Unexpected token 'for'.
+//   Map<String, List<int>> map71 = {for (int i = 0; oracle("foo"); i++) if (oracle()) "bar": [], "baz": null};
+//                                   ^^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:160:53: Error: Unexpected token 'if'.
+//   var list80 = [for (int i = 0; oracle("foo"); i++) if (oracle()) 42 else 3.14];
+//                                                     ^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:160:17: Error: Unexpected token 'for'.
+//   var list80 = [for (int i = 0; oracle("foo"); i++) if (oracle()) 42 else 3.14];
+//                 ^^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:161:52: Error: Unexpected token 'if'.
+//   var set80 = {for (int i = 0; oracle("foo"); i++) if (oracle()) 42 else 3.14, null};
+//                                                    ^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:161:16: Error: Unexpected token 'for'.
+//   var set80 = {for (int i = 0; oracle("foo"); i++) if (oracle()) 42 else 3.14, null};
+//                ^^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:162:52: Error: Unexpected token 'if'.
+//   var map80 = {for (int i = 0; oracle("foo"); i++) if (oracle()) "bar": 42 else "bar": 3.14, "baz": null};
+//                                                    ^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:162:16: Error: Unexpected token 'for'.
+//   var map80 = {for (int i = 0; oracle("foo"); i++) if (oracle()) "bar": 42 else "bar": 3.14, "baz": null};
+//                ^^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:163:67: Error: Unexpected token '...'.
+//   var list81 = [for (int i = 0; oracle("foo"); i++) if (oracle()) ...listInt else ...listDouble];
+//                                                                   ^^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:163:83: Error: Unexpected token '...'.
+//   var list81 = [for (int i = 0; oracle("foo"); i++) if (oracle()) ...listInt else ...listDouble];
+//                                                                                   ^^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:163:53: Error: Unexpected token 'if'.
+//   var list81 = [for (int i = 0; oracle("foo"); i++) if (oracle()) ...listInt else ...listDouble];
+//                                                     ^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:163:17: Error: Unexpected token 'for'.
+//   var list81 = [for (int i = 0; oracle("foo"); i++) if (oracle()) ...listInt else ...listDouble];
+//                 ^^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:164:66: Error: Unexpected token '...'.
+//   var set81 = {for (int i = 0; oracle("foo"); i++) if (oracle()) ...listInt else ...listDouble, null};
+//                                                                  ^^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:164:82: Error: Unexpected token '...'.
+//   var set81 = {for (int i = 0; oracle("foo"); i++) if (oracle()) ...listInt else ...listDouble, null};
+//                                                                                  ^^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:164:52: Error: Unexpected token 'if'.
+//   var set81 = {for (int i = 0; oracle("foo"); i++) if (oracle()) ...listInt else ...listDouble, null};
+//                                                    ^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:164:16: Error: Unexpected token 'for'.
+//   var set81 = {for (int i = 0; oracle("foo"); i++) if (oracle()) ...listInt else ...listDouble, null};
+//                ^^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:165:66: Error: Unexpected token '...'.
+//   var map81 = {for (int i = 0; oracle("foo"); i++) if (oracle()) ...mapStringInt else ...mapStringDouble, "baz": null};
+//                                                                  ^^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:165:87: Error: Unexpected token '...'.
+//   var map81 = {for (int i = 0; oracle("foo"); i++) if (oracle()) ...mapStringInt else ...mapStringDouble, "baz": null};
+//                                                                                       ^^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:165:52: Error: Unexpected token 'if'.
+//   var map81 = {for (int i = 0; oracle("foo"); i++) if (oracle()) ...mapStringInt else ...mapStringDouble, "baz": null};
+//                                                    ^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:165:16: Error: Unexpected token 'for'.
+//   var map81 = {for (int i = 0; oracle("foo"); i++) if (oracle()) ...mapStringInt else ...mapStringDouble, "baz": null};
+//                ^^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:166:67: Error: Unexpected token '...'.
+//   var list82 = [for (int i = 0; oracle("foo"); i++) if (oracle()) ...listInt else ...dynVar];
+//                                                                   ^^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:166:83: Error: Unexpected token '...'.
+//   var list82 = [for (int i = 0; oracle("foo"); i++) if (oracle()) ...listInt else ...dynVar];
+//                                                                                   ^^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:166:53: Error: Unexpected token 'if'.
+//   var list82 = [for (int i = 0; oracle("foo"); i++) if (oracle()) ...listInt else ...dynVar];
+//                                                     ^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:166:17: Error: Unexpected token 'for'.
+//   var list82 = [for (int i = 0; oracle("foo"); i++) if (oracle()) ...listInt else ...dynVar];
+//                 ^^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:167:66: Error: Unexpected token '...'.
+//   var set82 = {for (int i = 0; oracle("foo"); i++) if (oracle()) ...listInt else ...dynVar, null};
+//                                                                  ^^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:167:82: Error: Unexpected token '...'.
+//   var set82 = {for (int i = 0; oracle("foo"); i++) if (oracle()) ...listInt else ...dynVar, null};
+//                                                                                  ^^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:167:52: Error: Unexpected token 'if'.
+//   var set82 = {for (int i = 0; oracle("foo"); i++) if (oracle()) ...listInt else ...dynVar, null};
+//                                                    ^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:167:16: Error: Unexpected token 'for'.
+//   var set82 = {for (int i = 0; oracle("foo"); i++) if (oracle()) ...listInt else ...dynVar, null};
+//                ^^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:168:66: Error: Unexpected token '...'.
+//   var map82 = {for (int i = 0; oracle("foo"); i++) if (oracle()) ...mapStringInt else ...dynVar, "baz": null};
+//                                                                  ^^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:168:87: Error: Unexpected token '...'.
+//   var map82 = {for (int i = 0; oracle("foo"); i++) if (oracle()) ...mapStringInt else ...dynVar, "baz": null};
+//                                                                                       ^^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:168:52: Error: Unexpected token 'if'.
+//   var map82 = {for (int i = 0; oracle("foo"); i++) if (oracle()) ...mapStringInt else ...dynVar, "baz": null};
+//                                                    ^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:168:16: Error: Unexpected token 'for'.
+//   var map82 = {for (int i = 0; oracle("foo"); i++) if (oracle()) ...mapStringInt else ...dynVar, "baz": null};
+//                ^^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:169:75: Error: Unexpected token '...'.
+//   var list83 = [for (int i = 0; oracle("foo"); i++) if (oracle()) 42 else ...listDouble];
+//                                                                           ^^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:169:53: Error: Unexpected token 'if'.
+//   var list83 = [for (int i = 0; oracle("foo"); i++) if (oracle()) 42 else ...listDouble];
+//                                                     ^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:169:17: Error: Unexpected token 'for'.
+//   var list83 = [for (int i = 0; oracle("foo"); i++) if (oracle()) 42 else ...listDouble];
+//                 ^^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:170:66: Error: Unexpected token '...'.
+//   var set83 = {for (int i = 0; oracle("foo"); i++) if (oracle()) ...listInt else 3.14, null};
+//                                                                  ^^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:170:52: Error: Unexpected token 'if'.
+//   var set83 = {for (int i = 0; oracle("foo"); i++) if (oracle()) ...listInt else 3.14, null};
+//                                                    ^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:170:16: Error: Unexpected token 'for'.
+//   var set83 = {for (int i = 0; oracle("foo"); i++) if (oracle()) ...listInt else 3.14, null};
+//                ^^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:171:66: Error: Unexpected token '...'.
+//   var map83 = {for (int i = 0; oracle("foo"); i++) if (oracle()) ...mapStringInt else "bar": 3.14, "baz": null};
+//                                                                  ^^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:171:52: Error: Unexpected token 'if'.
+//   var map83 = {for (int i = 0; oracle("foo"); i++) if (oracle()) ...mapStringInt else "bar": 3.14, "baz": null};
+//                                                    ^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:171:16: Error: Unexpected token 'for'.
+//   var map83 = {for (int i = 0; oracle("foo"); i++) if (oracle()) ...mapStringInt else "bar": 3.14, "baz": null};
+//                ^^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:172:23: Error: Unexpected token 'for'.
+//   List<int> list90 = [for (int i = 0; oracle("foo"); i++) dynVar];
+//                       ^^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:173:21: Error: Unexpected token 'for'.
+//   Set<int> set90 = {for (int i = 0; oracle("foo"); i++) dynVar, null};
+//                     ^^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:174:29: Error: Unexpected token 'for'.
+//   Map<String, int> map90 = {for (int i = 0; oracle("foo"); i++) "bar": dynVar, "baz": null};
+//                             ^^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:175:59: Error: Unexpected token '...'.
+//   List<int> list91 = [for (int i = 0; oracle("foo"); i++) ...dynVar];
+//                                                           ^^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:175:23: Error: Unexpected token 'for'.
+//   List<int> list91 = [for (int i = 0; oracle("foo"); i++) ...dynVar];
+//                       ^^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:176:57: Error: Unexpected token '...'.
+//   Set<int> set91 = {for (int i = 0; oracle("foo"); i++) ...dynVar, null};
+//                                                         ^^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:176:21: Error: Unexpected token 'for'.
+//   Set<int> set91 = {for (int i = 0; oracle("foo"); i++) ...dynVar, null};
+//                     ^^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:177:65: Error: Unexpected token '...'.
+//   Map<String, int> map91 = {for (int i = 0; oracle("foo"); i++) ...dynVar, "baz": null};
+//                                                                 ^^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:177:29: Error: Unexpected token 'for'.
+//   Map<String, int> map91 = {for (int i = 0; oracle("foo"); i++) ...dynVar, "baz": null};
+//                             ^^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:178:29: Error: Unexpected token 'for'.
+//   List<int> list100 = <int>[for (index = 0; oracle("foo"); index++) 42];
+//                             ^^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:179:27: Error: Unexpected token 'for'.
+//   Set<int> set100 = <int>{for (index = 0; oracle("foo"); index++) 42};
+//                           ^^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:180:43: Error: Unexpected token 'for'.
+//   Map<String, int> map100 = <String, int>{for (index = 0; oracle("foo"); index++) "bar": 42};
+//                                           ^^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:181:18: Error: Unexpected token 'for'.
+//   var list110 = [for (var i in [1, 2, 3]) i];
+//                  ^^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:182:17: Error: Unexpected token 'for'.
+//   var set110 = {for (var i in [1, 2, 3]) i, null};
+//                 ^^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:183:17: Error: Unexpected token 'for'.
+//   var map110 = {for (var i in [1, 2, 3]) "bar": i, "baz": null};
+//                 ^^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:184:24: Error: Unexpected token 'for'.
+//   List<int> list120 = [for (var i in dynVar) i];
+//                        ^^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:185:22: Error: Unexpected token 'for'.
+//   Set<int> set120 = {for (var i in dynVar) i, null};
+//                      ^^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:186:30: Error: Unexpected token 'for'.
+//   Map<String, int> map120 = {for (var i in dynVar) "bar": i, "baz": null};
+//                              ^^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:190:9: Error: Unexpected token 'for'.
+//   <int>[for (int i = 0; oracle("foo"); i++) "bar"];
+//         ^^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:191:9: Error: Unexpected token 'for'.
+//   <int>{for (int i = 0; oracle("foo"); i++) "bar", null};
+//         ^^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:192:14: Error: Unexpected token 'for'.
+//   <int, int>{for (int i = 0; oracle("foo"); i++) "bar": "bar", "baz": null};
+//              ^^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:193:45: Error: Unexpected token '...'.
+//   <int>[for (int i = 0; oracle("foo"); i++) ...["bar"]];
+//                                             ^^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:193:9: Error: Unexpected token 'for'.
+//   <int>[for (int i = 0; oracle("foo"); i++) ...["bar"]];
+//         ^^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:194:45: Error: Unexpected token '...'.
+//   <int>{for (int i = 0; oracle("foo"); i++) ...["bar"], null};
+//                                             ^^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:194:9: Error: Unexpected token 'for'.
+//   <int>{for (int i = 0; oracle("foo"); i++) ...["bar"], null};
+//         ^^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:195:50: Error: Unexpected token '...'.
+//   <int, int>{for (int i = 0; oracle("foo"); i++) ...{"bar": "bar"}, "baz": null};
+//                                                  ^^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:195:14: Error: Unexpected token 'for'.
+//   <int, int>{for (int i = 0; oracle("foo"); i++) ...{"bar": "bar"}, "baz": null};
+//              ^^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:196:45: Error: Unexpected token '...'.
+//   <int>[for (int i = 0; oracle("foo"); i++) ...map];
+//                                             ^^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:196:9: Error: Unexpected token 'for'.
+//   <int>[for (int i = 0; oracle("foo"); i++) ...map];
+//         ^^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:197:45: Error: Unexpected token '...'.
+//   <int>{for (int i = 0; oracle("foo"); i++) ...map, null};
+//                                             ^^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:197:9: Error: Unexpected token 'for'.
+//   <int>{for (int i = 0; oracle("foo"); i++) ...map, null};
+//         ^^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:198:50: Error: Unexpected token '...'.
+//   <int, int>{for (int i = 0; oracle("foo"); i++) ...list, 42: null};
+//                                                  ^^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:198:14: Error: Unexpected token 'for'.
+//   <int, int>{for (int i = 0; oracle("foo"); i++) ...list, 42: null};
+//              ^^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:199:48: Error: Unexpected token 'if'.
+//   <String>[for (int i = 0; oracle("foo"); i++) if (oracle()) 42 else 3.14];
+//                                                ^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:199:12: Error: Unexpected token 'for'.
+//   <String>[for (int i = 0; oracle("foo"); i++) if (oracle()) 42 else 3.14];
+//            ^^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:200:48: Error: Unexpected token 'if'.
+//   <String>{for (int i = 0; oracle("foo"); i++) if (oracle()) 42 else 3.14, null};
+//                                                ^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:200:12: Error: Unexpected token 'for'.
+//   <String>{for (int i = 0; oracle("foo"); i++) if (oracle()) 42 else 3.14, null};
+//            ^^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:201:56: Error: Unexpected token 'if'.
+//   <String, String>{for (int i = 0; oracle("foo"); i++) if (oracle()) "bar": 42 else "bar": 3.14, "baz": null};
+//                                                        ^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:201:20: Error: Unexpected token 'for'.
+//   <String, String>{for (int i = 0; oracle("foo"); i++) if (oracle()) "bar": 42 else "bar": 3.14, "baz": null};
+//                    ^^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:202:59: Error: Unexpected token '...'.
+//   <int>[for (int i = 0; oracle("foo"); i++) if (oracle()) ...map else 42];
+//                                                           ^^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:202:45: Error: Unexpected token 'if'.
+//   <int>[for (int i = 0; oracle("foo"); i++) if (oracle()) ...map else 42];
+//                                             ^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:202:9: Error: Unexpected token 'for'.
+//   <int>[for (int i = 0; oracle("foo"); i++) if (oracle()) ...map else 42];
+//         ^^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:203:59: Error: Unexpected token '...'.
+//   <int>{for (int i = 0; oracle("foo"); i++) if (oracle()) ...map else 42, null};
+//                                                           ^^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:203:45: Error: Unexpected token 'if'.
+//   <int>{for (int i = 0; oracle("foo"); i++) if (oracle()) ...map else 42, null};
+//                                             ^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:203:9: Error: Unexpected token 'for'.
+//   <int>{for (int i = 0; oracle("foo"); i++) if (oracle()) ...map else 42, null};
+//         ^^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:204:67: Error: Unexpected token '...'.
+//   <String, int>{for (int i = 0; oracle("foo"); i++) if (oracle()) ...list else "bar": 42, "baz": null};
+//                                                                   ^^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:204:53: Error: Unexpected token 'if'.
+//   <String, int>{for (int i = 0; oracle("foo"); i++) if (oracle()) ...list else "bar": 42, "baz": null};
+//                                                     ^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:204:17: Error: Unexpected token 'for'.
+//   <String, int>{for (int i = 0; oracle("foo"); i++) if (oracle()) ...list else "bar": 42, "baz": null};
+//                 ^^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:205:67: Error: Unexpected token '...'.
+//   <int>[for (int i = 0; oracle("foo"); i++) if (oracle()) 42 else ...map];
+//                                                                   ^^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:205:45: Error: Unexpected token 'if'.
+//   <int>[for (int i = 0; oracle("foo"); i++) if (oracle()) 42 else ...map];
+//                                             ^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:205:9: Error: Unexpected token 'for'.
+//   <int>[for (int i = 0; oracle("foo"); i++) if (oracle()) 42 else ...map];
+//         ^^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:206:67: Error: Unexpected token '...'.
+//   <int>{for (int i = 0; oracle("foo"); i++) if (oracle()) 42 else ...map, null};
+//                                                                   ^^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:206:45: Error: Unexpected token 'if'.
+//   <int>{for (int i = 0; oracle("foo"); i++) if (oracle()) 42 else ...map, null};
+//                                             ^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:206:9: Error: Unexpected token 'for'.
+//   <int>{for (int i = 0; oracle("foo"); i++) if (oracle()) 42 else ...map, null};
+//         ^^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:207:82: Error: Unexpected token '...'.
+//   <String, int>{for (int i = 0; oracle("foo"); i++) if (oracle()) "bar": 42 else ...list, "baz": null};
+//                                                                                  ^^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:207:53: Error: Unexpected token 'if'.
+//   <String, int>{for (int i = 0; oracle("foo"); i++) if (oracle()) "bar": 42 else ...list, "baz": null};
+//                                                     ^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:207:17: Error: Unexpected token 'for'.
+//   <String, int>{for (int i = 0; oracle("foo"); i++) if (oracle()) "bar": 42 else ...list, "baz": null};
+//                 ^^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:210:9: Error: Unexpected token 'for'.
+//   <int>[for (i in <int>[1]) i];
+//         ^^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:211:9: Error: Unexpected token 'for'.
+//   <int>{for (i in <int>[1]) i, null};
+//         ^^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:212:16: Error: Unexpected token 'for'.
+// 	<String, int>{for (i in <int>[1]) "bar": i, "baz": null};
+// 	              ^^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:214:17: Error: Unexpected token 'for'.
+//   var list10 = [for (var i in "not iterable") i];
+//                 ^^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:215:16: Error: Unexpected token 'for'.
+//   var set10 = {for (var i in "not iterable") i, null};
+//                ^^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:216:16: Error: Unexpected token 'for'.
+//   var map10 = {for (var i in "not iterable") "bar": i, "baz": null};
+//                ^^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:217:17: Error: Unexpected token 'for'.
+//   var list20 = [for (int i in ["not", "int"]) i];
+//                 ^^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:218:16: Error: Unexpected token 'for'.
+//   var set20 = {for (int i in ["not", "int"]) i, null};
+//                ^^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:219:16: Error: Unexpected token 'for'.
+//   var map20 = {for (int i in ["not", "int"]) "bar": i, "baz": null};
+//                ^^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:220:23: Error: Unexpected token 'for'.
+//   var list30 = [await for (var i in "not stream") i];
+//                       ^^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:221:22: Error: Unexpected token 'for'.
+//   var set30 = {await for (var i in "not stream") i, null};
+//                      ^^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:222:22: Error: Unexpected token 'for'.
+//   var map30 = {await for (var i in "not stream") "bar": i, "baz": null};
+//                      ^^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:223:23: Error: Unexpected token 'for'.
+//   var list40 = [await for (int i in Stream.fromIterable(["not", "int"])) i];
+//                       ^^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:224:22: Error: Unexpected token 'for'.
+//   var set40 = {await for (int i in Stream.fromIterable(["not", "int"])) i, null};
+//                      ^^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:225:22: Error: Unexpected token 'for'.
+//   var map40 = {await for (int i in Stream.fromIterable(["not", "int"])) "bar": i, "baz": null};
+//                      ^^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:226:17: Error: The keyword 'await' isn't allowed for a normal 'for' statement.
+// Try removing the keyword, or use a for-each statement.
+//   var list50 = [await for (;;) 42];
+//                 ^^^^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:226:23: Error: Unexpected token 'for'.
+//   var list50 = [await for (;;) 42];
+//                       ^^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:227:16: Error: The keyword 'await' isn't allowed for a normal 'for' statement.
+// Try removing the keyword, or use a for-each statement.
+//   var set50 = {await for (;;) 42, null};
+//                ^^^^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:227:22: Error: Unexpected token 'for'.
+//   var set50 = {await for (;;) 42, null};
+//                      ^^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:228:16: Error: The keyword 'await' isn't allowed for a normal 'for' statement.
+// Try removing the keyword, or use a for-each statement.
+//   var map50 = {await for (;;) "bar": 42, "baz": null};
+//                ^^^^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:228:22: Error: Unexpected token 'for'.
+//   var map50 = {await for (;;) "bar": 42, "baz": null};
+//                      ^^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:229:17: Error: Unexpected token 'for'.
+//   var list60 = [for (; "not bool";) 42];
+//                 ^^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:230:16: Error: Unexpected token 'for'.
+//   var set60 = {for (; "not bool";) 42, null};
+//                ^^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:231:16: Error: Unexpected token 'for'.
+//   var map60 = {for (; "not bool";) "bar": 42, "baz": null};
+//                ^^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:235:26: Error: The asynchronous for-in can only be used in functions marked with 'async' or 'async*'.
+// Try marking the function body with either 'async' or 'async*', or removing the 'await' before the for loop.
+//   <int>[await for (int i in stream) i];
+//                          ^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:235:15: Error: Unexpected token 'for'.
+//   <int>[await for (int i in stream) i];
+//               ^^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:236:26: Error: The asynchronous for-in can only be used in functions marked with 'async' or 'async*'.
+// Try marking the function body with either 'async' or 'async*', or removing the 'await' before the for loop.
+//   <int>{await for (int i in stream) i};
+//                          ^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:236:15: Error: Unexpected token 'for'.
+//   <int>{await for (int i in stream) i};
+//               ^^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:237:34: Error: The asynchronous for-in can only be used in functions marked with 'async' or 'async*'.
+// Try marking the function body with either 'async' or 'async*', or removing the 'await' before the for loop.
+//   <String, int>{await for (int i in stream) "bar": i};
+//                                  ^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:237:23: Error: Unexpected token 'for'.
+//   <String, int>{await for (int i in stream) "bar": i};
+//                       ^^^
+//
+import self as self;
+import "dart:core" as core;
+import "dart:async" as asy;
+
+static method oracle<T extends core::Object = dynamic>([self::oracle::T t = null]) → dynamic
+  return true;
+static method testIfElement(dynamic dynVar, core::List<core::int> listInt, core::List<core::double> listDouble, core::Map<core::String, core::int> mapToInt, core::Map<core::String, core::double> mapToDouble) → dynamic {
+  dynamic list10 = <dynamic>[];
+  dynamic set10 = <dynamic>{null};
+  dynamic map10 = <dynamic, dynamic>{"baz": null};
+  dynamic list11 = <dynamic>[];
+  dynamic set11 = <dynamic>{null};
+  dynamic map11 = <dynamic, dynamic>{"baz": null};
+  dynamic list12 = <dynamic>[];
+  dynamic set12 = <dynamic>{null};
+  dynamic map12 = <dynamic, dynamic>{"baz": null};
+  dynamic list20 = <dynamic>[];
+  dynamic set20 = <dynamic>{null};
+  dynamic map20 = <dynamic, dynamic>{"baz": null};
+  dynamic list21 = <dynamic>[];
+  dynamic set21 = <dynamic>{null};
+  dynamic map21 = <dynamic, dynamic>{"baz": null};
+  dynamic list22 = <dynamic>[];
+  dynamic set22 = <dynamic>{null};
+  dynamic map22 = <dynamic, dynamic>{"baz": null};
+  dynamic list30 = <dynamic>[];
+  dynamic set30 = <dynamic>{null};
+  dynamic map30 = <dynamic, dynamic>{"baz": null};
+  dynamic list31 = <dynamic>[];
+  dynamic set31 = <dynamic>{null};
+  dynamic map31 = <dynamic, dynamic>{"baz": null};
+  dynamic list33 = <dynamic>[];
+  dynamic set33 = <dynamic>{null};
+  dynamic map33 = <dynamic, dynamic>{"baz": null};
+  core::List<core::List<core::int>> list40 = <dynamic>[];
+  core::Set<core::List<core::int>> set40 = <dynamic>{null};
+  core::Map<core::String, core::List<core::int>> map40 = <dynamic, dynamic>{"baz": null};
+  core::List<core::List<core::int>> list41 = <dynamic>[];
+  core::Set<core::List<core::int>> set41 = <dynamic>{null};
+  core::List<core::List<core::int>> list42 = <dynamic>[];
+  core::Set<core::List<core::int>> set42 = <dynamic>{null};
+  core::Map<core::String, core::List<core::int>> map42 = <dynamic, dynamic>{"baz": null};
+  core::List<core::int> list50 = <dynamic>[];
+  core::Set<core::int> set50 = <dynamic>{null};
+  core::Map<core::String, core::int> map50 = <dynamic, dynamic>{"baz": null};
+  core::List<core::int> list51 = <dynamic>[];
+  core::Set<core::int> set51 = <dynamic>{null};
+  core::List<core::int> list52 = <dynamic>[];
+  core::Set<core::int> set52 = <dynamic>{null};
+  core::Map<core::String, core::int> map52 = <dynamic, dynamic>{"baz": null};
+  core::List<core::List<core::int>> list60 = <dynamic>[];
+  core::Set<core::List<core::int>> set60 = <dynamic>{null};
+  core::Map<core::String, core::List<core::int>> map60 = <dynamic, dynamic>{"baz": null};
+  core::List<core::List<core::int>> list61 = <dynamic>[];
+  core::Set<core::List<core::int>> set61 = <dynamic>{null};
+  core::Map<core::String, core::List<core::int>> map61 = <dynamic, dynamic>{"baz": null};
+  core::List<core::List<core::int>> list70 = <dynamic>[];
+  core::Set<core::List<core::int>> set70 = <dynamic>{null};
+  core::List<core::List<core::int>> list71 = <dynamic>[];
+  core::Set<core::List<core::int>> set71 = <dynamic>{null};
+  dynamic list80 = <dynamic>[];
+  dynamic set80 = <dynamic>{null};
+  dynamic map80 = <dynamic, dynamic>{"baz": null};
+  dynamic list81 = <dynamic>[];
+  dynamic set81 = <dynamic>{null};
+  dynamic map81 = <dynamic, dynamic>{"baz": null};
+  dynamic list82 = <dynamic>[];
+  dynamic set82 = <dynamic>{null};
+  dynamic map82 = <dynamic>{null};
+  dynamic list83 = <dynamic>[];
+  dynamic set83 = <dynamic>{null};
+  dynamic map83 = <dynamic, dynamic>{"baz": null};
+  core::List<core::int> list90 = <dynamic>[];
+  core::Set<core::int> set90 = <dynamic>{null};
+  core::Map<core::String, core::int> map90 = <dynamic, dynamic>{"baz": null};
+  core::List<core::int> list91 = <dynamic>[];
+  core::Set<core::int> set91 = <dynamic>{null};
+  core::Map<core::String, core::int> map91 = <dynamic, dynamic>{"baz": null};
+}
+static method testIfElementErrors(core::Map<core::int, core::int> map) → dynamic {
+  <core::int>[];
+  <core::int>{null};
+  <core::String, core::int>{"baz": null};
+  <core::int>[];
+  <core::int>{null};
+  <core::String, core::int>{"baz": null};
+  <core::int>[];
+  <core::int>{null};
+  <core::String, core::int>{"baz": null};
+  <core::String>[];
+  <core::String>{null};
+  <core::String, core::String>{"baz": null};
+  <core::int>[];
+  <core::int>{null};
+  <core::String, core::int>{"baz": null};
+  <core::int>[];
+  <core::int>{null};
+  <core::String, core::int>{"baz": null};
+}
+static method testForElement(dynamic dynVar, core::List<core::int> listInt, core::List<core::double> listDouble, core::int index, core::Map<core::String, core::int> mapStringInt, core::Map<core::String, core::double> mapStringDouble) → dynamic {
+  dynamic list10 = <dynamic>[];
+  dynamic set10 = <dynamic>{null};
+  dynamic map10 = <dynamic, dynamic>{"baz": null};
+  dynamic list11 = <dynamic>[];
+  dynamic set11 = <dynamic>{null};
+  dynamic map11 = <dynamic, dynamic>{"baz": null};
+  dynamic list12 = <dynamic>[];
+  dynamic set12 = <dynamic>{null};
+  dynamic map12 = <dynamic, dynamic>{"baz": null};
+  dynamic list20 = <dynamic>[];
+  dynamic set20 = <dynamic>{null};
+  dynamic map20 = <dynamic, dynamic>{"baz": null};
+  dynamic list21 = <dynamic>[];
+  dynamic set21 = <dynamic>{null};
+  dynamic map21 = <dynamic, dynamic>{"baz": null};
+  dynamic list22 = <dynamic>[];
+  dynamic set22 = <dynamic>{null};
+  dynamic map22 = <dynamic, dynamic>{"baz": null};
+  dynamic list30 = <dynamic>[];
+  dynamic set30 = <dynamic>{null};
+  dynamic map30 = <dynamic, dynamic>{"baz": null};
+  dynamic list31 = <dynamic>[];
+  dynamic set31 = <dynamic>{null};
+  dynamic map31 = <dynamic, dynamic>{"baz": null};
+  dynamic list33 = <dynamic>[];
+  dynamic set33 = <dynamic>{null};
+  dynamic map33 = <dynamic, dynamic>{"baz": null};
+  core::List<core::List<core::int>> list40 = <dynamic>[];
+  core::Set<core::List<core::int>> set40 = <dynamic>{null};
+  core::Map<core::String, core::List<core::int>> map40 = <dynamic, dynamic>{"baz": null};
+  core::List<core::List<core::int>> list41 = <dynamic>[];
+  core::Set<core::List<core::int>> set41 = <dynamic>{null};
+  core::List<core::List<core::int>> list42 = <dynamic>[];
+  core::Set<core::List<core::int>> set42 = <dynamic>{null};
+  core::Map<core::String, core::List<core::int>> map42 = <dynamic, dynamic>{"baz": null};
+  core::List<core::int> list50 = <dynamic>[];
+  core::Set<core::int> set50 = <dynamic>{null};
+  core::Map<core::String, core::int> map50 = <dynamic, dynamic>{"baz": null};
+  core::List<core::int> list51 = <dynamic>[];
+  core::Set<core::int> set51 = <dynamic>{null};
+  core::List<core::int> list52 = <dynamic>[];
+  core::Set<core::int> set52 = <dynamic>{null};
+  core::List<core::List<core::int>> list60 = <dynamic>[];
+  core::Set<core::List<core::int>> set60 = <dynamic>{null};
+  core::Map<core::String, core::List<core::int>> map60 = <dynamic, dynamic>{"baz": null};
+  core::List<core::List<core::int>> list61 = <dynamic>[];
+  core::Set<core::List<core::int>> set61 = <dynamic>{null};
+  core::Map<core::String, core::List<core::int>> map61 = <dynamic, dynamic>{"baz": null};
+  core::List<core::List<core::int>> list70 = <dynamic>[];
+  core::Set<core::List<core::int>> set70 = <dynamic>{null};
+  core::Map<core::String, core::List<core::int>> map70 = <dynamic, dynamic>{"baz": null};
+  core::List<core::List<core::int>> list71 = <dynamic>[];
+  core::Set<core::List<core::int>> set71 = <dynamic>{null};
+  core::Map<core::String, core::List<core::int>> map71 = <dynamic, dynamic>{"baz": null};
+  dynamic list80 = <dynamic>[];
+  dynamic set80 = <dynamic>{null};
+  dynamic map80 = <dynamic, dynamic>{"baz": null};
+  dynamic list81 = <dynamic>[];
+  dynamic set81 = <dynamic>{null};
+  dynamic map81 = <dynamic, dynamic>{"baz": null};
+  dynamic list82 = <dynamic>[];
+  dynamic set82 = <dynamic>{null};
+  dynamic map82 = <dynamic, dynamic>{"baz": null};
+  dynamic list83 = <dynamic>[];
+  dynamic set83 = <dynamic>{null};
+  dynamic map83 = <dynamic, dynamic>{"baz": null};
+  core::List<core::int> list90 = <dynamic>[];
+  core::Set<core::int> set90 = <dynamic>{null};
+  core::Map<core::String, core::int> map90 = <dynamic, dynamic>{"baz": null};
+  core::List<core::int> list91 = <dynamic>[];
+  core::Set<core::int> set91 = <dynamic>{null};
+  core::Map<core::String, core::int> map91 = <dynamic, dynamic>{"baz": null};
+  core::List<core::int> list100 = <core::int>[];
+  core::Set<core::int> set100 = <core::int>{};
+  core::Map<core::String, core::int> map100 = <core::String, core::int>{};
+  dynamic list110 = <dynamic>[];
+  dynamic set110 = <dynamic>{null};
+  dynamic map110 = <dynamic, dynamic>{"baz": null};
+  core::List<core::int> list120 = <dynamic>[];
+  core::Set<core::int> set120 = <dynamic>{null};
+  core::Map<core::String, core::int> map120 = <dynamic, dynamic>{"baz": null};
+}
+static method testForElementErrors(core::Map<core::int, core::int> map, core::List<core::int> list) → dynamic async {
+  <core::int>[];
+  <core::int>{null};
+  <core::int, core::int>{"baz": null};
+  <core::int>[];
+  <core::int>{null};
+  <core::int, core::int>{"baz": null};
+  <core::int>[];
+  <core::int>{null};
+  <core::int, core::int>{42: null};
+  <core::String>[];
+  <core::String>{null};
+  <core::String, core::String>{"baz": null};
+  <core::int>[];
+  <core::int>{null};
+  <core::String, core::int>{"baz": null};
+  <core::int>[];
+  <core::int>{null};
+  <core::String, core::int>{"baz": null};
+  final dynamic i = 0;
+  <core::int>[];
+  <core::int>{null};
+  <core::String, core::int>{"baz": null};
+  dynamic list10 = <dynamic>[];
+  dynamic set10 = <dynamic>{null};
+  dynamic map10 = <dynamic, dynamic>{"baz": null};
+  dynamic list20 = <dynamic>[];
+  dynamic set20 = <dynamic>{null};
+  dynamic map20 = <dynamic, dynamic>{"baz": null};
+  dynamic list30 = <dynamic>[];
+  dynamic set30 = <dynamic>{null};
+  dynamic map30 = <dynamic, dynamic>{"baz": null};
+  dynamic list40 = <dynamic>[];
+  dynamic set40 = <dynamic>{null};
+  dynamic map40 = <dynamic, dynamic>{"baz": null};
+  dynamic list50 = <dynamic>[];
+  dynamic set50 = <dynamic>{null};
+  dynamic map50 = <dynamic, dynamic>{"baz": null};
+  dynamic list60 = <dynamic>[];
+  dynamic set60 = <dynamic>{null};
+  dynamic map60 = <dynamic, dynamic>{"baz": null};
+}
+static method testForElementErrorsNotAsync(asy::Stream<core::int> stream) → dynamic {
+  <core::int>[];
+  <core::int>{};
+  <core::String, core::int>{};
+}
+static method main() → dynamic {}
diff --git a/pkg/front_end/testcases/control_flow_collection_inference.dart.legacy.transformed.expect b/pkg/front_end/testcases/control_flow_collection_inference.dart.legacy.transformed.expect
new file mode 100644
index 0000000..9fdaca1
--- /dev/null
+++ b/pkg/front_end/testcases/control_flow_collection_inference.dart.legacy.transformed.expect
@@ -0,0 +1,1935 @@
+library;
+//
+// Problems in library:
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:10:17: Error: Unexpected token 'if'.
+//   var list10 = [if (oracle("foo")) 42];
+//                 ^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:11:16: Error: Unexpected token 'if'.
+//   var set10 = {if (oracle("foo")) 42, null};
+//                ^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:12:16: Error: Unexpected token 'if'.
+//   var map10 = {if (oracle("foo")) "bar": 42, "baz": null};
+//                ^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:13:17: Error: Unexpected token 'if'.
+//   var list11 = [if (oracle("foo")) dynVar];
+//                 ^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:14:16: Error: Unexpected token 'if'.
+//   var set11 = {if (oracle("foo")) dynVar, null};
+//                ^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:15:16: Error: Unexpected token 'if'.
+//   var map11 = {if (oracle("foo")) "bar": dynVar, "baz": null};
+//                ^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:16:17: Error: Unexpected token 'if'.
+//   var list12 = [if (oracle("foo")) [42]];
+//                 ^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:17:16: Error: Unexpected token 'if'.
+//   var set12 = {if (oracle("foo")) [42], null};
+//                ^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:18:16: Error: Unexpected token 'if'.
+//   var map12 = {if (oracle("foo")) "bar": [42], "baz": null};
+//                ^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:19:36: Error: Unexpected token '...'.
+//   var list20 = [if (oracle("foo")) ...[42]];
+//                                    ^^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:19:17: Error: Unexpected token 'if'.
+//   var list20 = [if (oracle("foo")) ...[42]];
+//                 ^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:20:35: Error: Unexpected token '...'.
+//   var set20 = {if (oracle("foo")) ...[42], null};
+//                                   ^^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:20:16: Error: Unexpected token 'if'.
+//   var set20 = {if (oracle("foo")) ...[42], null};
+//                ^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:21:35: Error: Unexpected token '...'.
+//   var map20 = {if (oracle("foo")) ...{"bar": 42}, "baz": null};
+//                                   ^^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:21:16: Error: Unexpected token 'if'.
+//   var map20 = {if (oracle("foo")) ...{"bar": 42}, "baz": null};
+//                ^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:22:36: Error: Unexpected token '...'.
+//   var list21 = [if (oracle("foo")) ...[dynVar]];
+//                                    ^^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:22:17: Error: Unexpected token 'if'.
+//   var list21 = [if (oracle("foo")) ...[dynVar]];
+//                 ^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:23:35: Error: Unexpected token '...'.
+//   var set21 = {if (oracle("foo")) ...[dynVar], null};
+//                                   ^^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:23:16: Error: Unexpected token 'if'.
+//   var set21 = {if (oracle("foo")) ...[dynVar], null};
+//                ^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:24:35: Error: Unexpected token '...'.
+//   var map21 = {if (oracle("foo")) ...{"bar": dynVar}, "baz": null};
+//                                   ^^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:24:16: Error: Unexpected token 'if'.
+//   var map21 = {if (oracle("foo")) ...{"bar": dynVar}, "baz": null};
+//                ^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:25:36: Error: Unexpected token '...'.
+//   var list22 = [if (oracle("foo")) ...[[42]]];
+//                                    ^^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:25:17: Error: Unexpected token 'if'.
+//   var list22 = [if (oracle("foo")) ...[[42]]];
+//                 ^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:26:35: Error: Unexpected token '...'.
+//   var set22 = {if (oracle("foo")) ...[[42]], null};
+//                                   ^^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:26:16: Error: Unexpected token 'if'.
+//   var set22 = {if (oracle("foo")) ...[[42]], null};
+//                ^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:27:35: Error: Unexpected token '...'.
+//   var map22 = {if (oracle("foo")) ...{"bar": [42]}, "baz": null};
+//                                   ^^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:27:16: Error: Unexpected token 'if'.
+//   var map22 = {if (oracle("foo")) ...{"bar": [42]}, "baz": null};
+//                ^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:28:50: Error: Unexpected token '...'.
+//   var list30 = [if (oracle("foo")) if (oracle()) ...[42]];
+//                                                  ^^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:28:36: Error: Unexpected token 'if'.
+//   var list30 = [if (oracle("foo")) if (oracle()) ...[42]];
+//                                    ^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:28:17: Error: Unexpected token 'if'.
+//   var list30 = [if (oracle("foo")) if (oracle()) ...[42]];
+//                 ^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:29:49: Error: Unexpected token '...'.
+//   var set30 = {if (oracle("foo")) if (oracle()) ...[42], null};
+//                                                 ^^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:29:35: Error: Unexpected token 'if'.
+//   var set30 = {if (oracle("foo")) if (oracle()) ...[42], null};
+//                                   ^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:29:16: Error: Unexpected token 'if'.
+//   var set30 = {if (oracle("foo")) if (oracle()) ...[42], null};
+//                ^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:30:49: Error: Unexpected token '...'.
+//   var map30 = {if (oracle("foo")) if (oracle()) ...{"bar": 42}, "baz": null};
+//                                                 ^^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:30:35: Error: Unexpected token 'if'.
+//   var map30 = {if (oracle("foo")) if (oracle()) ...{"bar": 42}, "baz": null};
+//                                   ^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:30:16: Error: Unexpected token 'if'.
+//   var map30 = {if (oracle("foo")) if (oracle()) ...{"bar": 42}, "baz": null};
+//                ^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:31:50: Error: Unexpected token '...'.
+//   var list31 = [if (oracle("foo")) if (oracle()) ...[dynVar]];
+//                                                  ^^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:31:36: Error: Unexpected token 'if'.
+//   var list31 = [if (oracle("foo")) if (oracle()) ...[dynVar]];
+//                                    ^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:31:17: Error: Unexpected token 'if'.
+//   var list31 = [if (oracle("foo")) if (oracle()) ...[dynVar]];
+//                 ^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:32:49: Error: Unexpected token '...'.
+//   var set31 = {if (oracle("foo")) if (oracle()) ...[dynVar], null};
+//                                                 ^^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:32:35: Error: Unexpected token 'if'.
+//   var set31 = {if (oracle("foo")) if (oracle()) ...[dynVar], null};
+//                                   ^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:32:16: Error: Unexpected token 'if'.
+//   var set31 = {if (oracle("foo")) if (oracle()) ...[dynVar], null};
+//                ^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:33:49: Error: Unexpected token '...'.
+//   var map31 = {if (oracle("foo")) if (oracle()) ...{"bar": dynVar}, "baz": null};
+//                                                 ^^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:33:35: Error: Unexpected token 'if'.
+//   var map31 = {if (oracle("foo")) if (oracle()) ...{"bar": dynVar}, "baz": null};
+//                                   ^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:33:16: Error: Unexpected token 'if'.
+//   var map31 = {if (oracle("foo")) if (oracle()) ...{"bar": dynVar}, "baz": null};
+//                ^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:34:50: Error: Unexpected token '...'.
+//   var list33 = [if (oracle("foo")) if (oracle()) ...[[42]]];
+//                                                  ^^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:34:36: Error: Unexpected token 'if'.
+//   var list33 = [if (oracle("foo")) if (oracle()) ...[[42]]];
+//                                    ^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:34:17: Error: Unexpected token 'if'.
+//   var list33 = [if (oracle("foo")) if (oracle()) ...[[42]]];
+//                 ^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:35:49: Error: Unexpected token '...'.
+//   var set33 = {if (oracle("foo")) if (oracle()) ...[[42]], null};
+//                                                 ^^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:35:35: Error: Unexpected token 'if'.
+//   var set33 = {if (oracle("foo")) if (oracle()) ...[[42]], null};
+//                                   ^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:35:16: Error: Unexpected token 'if'.
+//   var set33 = {if (oracle("foo")) if (oracle()) ...[[42]], null};
+//                ^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:36:49: Error: Unexpected token '...'.
+//   var map33 = {if (oracle("foo")) if (oracle()) ...{"bar": [42]}, "baz": null};
+//                                                 ^^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:36:35: Error: Unexpected token 'if'.
+//   var map33 = {if (oracle("foo")) if (oracle()) ...{"bar": [42]}, "baz": null};
+//                                   ^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:36:16: Error: Unexpected token 'if'.
+//   var map33 = {if (oracle("foo")) if (oracle()) ...{"bar": [42]}, "baz": null};
+//                ^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:37:48: Error: Unexpected token '...'.
+//   List<List<int>> list40 = [if (oracle("foo")) ...[[]]];
+//                                                ^^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:37:29: Error: Unexpected token 'if'.
+//   List<List<int>> list40 = [if (oracle("foo")) ...[[]]];
+//                             ^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:38:46: Error: Unexpected token '...'.
+//   Set<List<int>> set40 = {if (oracle("foo")) ...[[]], null};
+//                                              ^^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:38:27: Error: Unexpected token 'if'.
+//   Set<List<int>> set40 = {if (oracle("foo")) ...[[]], null};
+//                           ^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:39:54: Error: Unexpected token '...'.
+//   Map<String, List<int>> map40 = {if (oracle("foo")) ...{"bar", []}, "baz": null};
+//                                                      ^^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:39:35: Error: Unexpected token 'if'.
+//   Map<String, List<int>> map40 = {if (oracle("foo")) ...{"bar", []}, "baz": null};
+//                                   ^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:40:48: Error: Unexpected token '...'.
+//   List<List<int>> list41 = [if (oracle("foo")) ...{[]}];
+//                                                ^^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:40:29: Error: Unexpected token 'if'.
+//   List<List<int>> list41 = [if (oracle("foo")) ...{[]}];
+//                             ^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:41:46: Error: Unexpected token '...'.
+//   Set<List<int>> set41 = {if (oracle("foo")) ...{[]}, null};
+//                                              ^^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:41:27: Error: Unexpected token 'if'.
+//   Set<List<int>> set41 = {if (oracle("foo")) ...{[]}, null};
+//                           ^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:42:62: Error: Unexpected token '...'.
+//   List<List<int>> list42 = [if (oracle("foo")) if (oracle()) ...[[]]];
+//                                                              ^^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:42:48: Error: Unexpected token 'if'.
+//   List<List<int>> list42 = [if (oracle("foo")) if (oracle()) ...[[]]];
+//                                                ^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:42:29: Error: Unexpected token 'if'.
+//   List<List<int>> list42 = [if (oracle("foo")) if (oracle()) ...[[]]];
+//                             ^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:43:60: Error: Unexpected token '...'.
+//   Set<List<int>> set42 = {if (oracle("foo")) if (oracle()) ...[[]], null};
+//                                                            ^^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:43:46: Error: Unexpected token 'if'.
+//   Set<List<int>> set42 = {if (oracle("foo")) if (oracle()) ...[[]], null};
+//                                              ^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:43:27: Error: Unexpected token 'if'.
+//   Set<List<int>> set42 = {if (oracle("foo")) if (oracle()) ...[[]], null};
+//                           ^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:44:68: Error: Unexpected token '...'.
+//   Map<String, List<int>> map42 = {if (oracle("foo")) if (oracle()) ...{"bar": []}, "baz": null};
+//                                                                    ^^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:44:54: Error: Unexpected token 'if'.
+//   Map<String, List<int>> map42 = {if (oracle("foo")) if (oracle()) ...{"bar": []}, "baz": null};
+//                                                      ^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:44:35: Error: Unexpected token 'if'.
+//   Map<String, List<int>> map42 = {if (oracle("foo")) if (oracle()) ...{"bar": []}, "baz": null};
+//                                   ^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:45:42: Error: Unexpected token '...'.
+//   List<int> list50 = [if (oracle("foo")) ...[]];
+//                                          ^^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:45:23: Error: Unexpected token 'if'.
+//   List<int> list50 = [if (oracle("foo")) ...[]];
+//                       ^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:46:40: Error: Unexpected token '...'.
+//   Set<int> set50 = {if (oracle("foo")) ...[], null};
+//                                        ^^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:46:21: Error: Unexpected token 'if'.
+//   Set<int> set50 = {if (oracle("foo")) ...[], null};
+//                     ^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:47:48: Error: Unexpected token '...'.
+//   Map<String, int> map50 = {if (oracle("foo")) ...{}, "baz": null};
+//                                                ^^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:47:29: Error: Unexpected token 'if'.
+//   Map<String, int> map50 = {if (oracle("foo")) ...{}, "baz": null};
+//                             ^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:48:42: Error: Unexpected token '...'.
+//   List<int> list51 = [if (oracle("foo")) ...{}];
+//                                          ^^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:48:23: Error: Unexpected token 'if'.
+//   List<int> list51 = [if (oracle("foo")) ...{}];
+//                       ^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:49:40: Error: Unexpected token '...'.
+//   Set<int> set51 = {if (oracle("foo")) ...{}, null};
+//                                        ^^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:49:21: Error: Unexpected token 'if'.
+//   Set<int> set51 = {if (oracle("foo")) ...{}, null};
+//                     ^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:50:56: Error: Unexpected token '...'.
+//   List<int> list52 = [if (oracle("foo")) if (oracle()) ...[]];
+//                                                        ^^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:50:42: Error: Unexpected token 'if'.
+//   List<int> list52 = [if (oracle("foo")) if (oracle()) ...[]];
+//                                          ^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:50:23: Error: Unexpected token 'if'.
+//   List<int> list52 = [if (oracle("foo")) if (oracle()) ...[]];
+//                       ^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:51:54: Error: Unexpected token '...'.
+//   Set<int> set52 = {if (oracle("foo")) if (oracle()) ...[], null};
+//                                                      ^^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:51:40: Error: Unexpected token 'if'.
+//   Set<int> set52 = {if (oracle("foo")) if (oracle()) ...[], null};
+//                                        ^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:51:21: Error: Unexpected token 'if'.
+//   Set<int> set52 = {if (oracle("foo")) if (oracle()) ...[], null};
+//                     ^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:52:62: Error: Unexpected token '...'.
+//   Map<String, int> map52 = {if (oracle("foo")) if (oracle()) ...{}, "baz": null};
+//                                                              ^^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:52:48: Error: Unexpected token 'if'.
+//   Map<String, int> map52 = {if (oracle("foo")) if (oracle()) ...{}, "baz": null};
+//                                                ^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:52:29: Error: Unexpected token 'if'.
+//   Map<String, int> map52 = {if (oracle("foo")) if (oracle()) ...{}, "baz": null};
+//                             ^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:53:48: Error: Unexpected token '...'.
+//   List<List<int>> list60 = [if (oracle("foo")) ...[[]]];
+//                                                ^^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:53:29: Error: Unexpected token 'if'.
+//   List<List<int>> list60 = [if (oracle("foo")) ...[[]]];
+//                             ^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:54:46: Error: Unexpected token '...'.
+//   Set<List<int>> set60 = {if (oracle("foo")) ...[[]], null};
+//                                              ^^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:54:27: Error: Unexpected token 'if'.
+//   Set<List<int>> set60 = {if (oracle("foo")) ...[[]], null};
+//                           ^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:55:54: Error: Unexpected token '...'.
+//   Map<String, List<int>> map60 = {if (oracle("foo")) ...{"bar": []}, "baz": null};
+//                                                      ^^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:55:35: Error: Unexpected token 'if'.
+//   Map<String, List<int>> map60 = {if (oracle("foo")) ...{"bar": []}, "baz": null};
+//                                   ^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:56:62: Error: Unexpected token '...'.
+//   List<List<int>> list61 = [if (oracle("foo")) if (oracle()) ...[[]]];
+//                                                              ^^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:56:48: Error: Unexpected token 'if'.
+//   List<List<int>> list61 = [if (oracle("foo")) if (oracle()) ...[[]]];
+//                                                ^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:56:29: Error: Unexpected token 'if'.
+//   List<List<int>> list61 = [if (oracle("foo")) if (oracle()) ...[[]]];
+//                             ^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:57:60: Error: Unexpected token '...'.
+//   Set<List<int>> set61 = {if (oracle("foo")) if (oracle()) ...[[]], null};
+//                                                            ^^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:57:46: Error: Unexpected token 'if'.
+//   Set<List<int>> set61 = {if (oracle("foo")) if (oracle()) ...[[]], null};
+//                                              ^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:57:27: Error: Unexpected token 'if'.
+//   Set<List<int>> set61 = {if (oracle("foo")) if (oracle()) ...[[]], null};
+//                           ^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:58:68: Error: Unexpected token '...'.
+//   Map<String, List<int>> map61 = {if (oracle("foo")) if (oracle()) ...{"bar": []}, "baz": null};
+//                                                                    ^^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:58:54: Error: Unexpected token 'if'.
+//   Map<String, List<int>> map61 = {if (oracle("foo")) if (oracle()) ...{"bar": []}, "baz": null};
+//                                                      ^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:58:35: Error: Unexpected token 'if'.
+//   Map<String, List<int>> map61 = {if (oracle("foo")) if (oracle()) ...{"bar": []}, "baz": null};
+//                                   ^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:59:29: Error: Unexpected token 'if'.
+//   List<List<int>> list70 = [if (oracle("foo")) []];
+//                             ^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:60:27: Error: Unexpected token 'if'.
+//   Set<List<int>> set70 = {if (oracle("foo")) [], null};
+//                           ^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:61:48: Error: Unexpected token 'if'.
+//   List<List<int>> list71 = [if (oracle("foo")) if (oracle()) []];
+//                                                ^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:61:29: Error: Unexpected token 'if'.
+//   List<List<int>> list71 = [if (oracle("foo")) if (oracle()) []];
+//                             ^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:62:46: Error: Unexpected token 'if'.
+//   Set<List<int>> set71 = {if (oracle("foo")) if (oracle()) [], null};
+//                                              ^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:62:27: Error: Unexpected token 'if'.
+//   Set<List<int>> set71 = {if (oracle("foo")) if (oracle()) [], null};
+//                           ^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:63:17: Error: Unexpected token 'if'.
+//   var list80 = [if (oracle("foo")) 42 else 3.14];
+//                 ^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:64:16: Error: Unexpected token 'if'.
+//   var set80 = {if (oracle("foo")) 42 else 3.14, null};
+//                ^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:65:16: Error: Unexpected token 'if'.
+//   var map80 = {if (oracle("foo")) "bar": 42 else "bar": 3.14, "baz": null};
+//                ^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:66:36: Error: Unexpected token '...'.
+//   var list81 = [if (oracle("foo")) ...listInt else ...listDouble];
+//                                    ^^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:66:52: Error: Unexpected token '...'.
+//   var list81 = [if (oracle("foo")) ...listInt else ...listDouble];
+//                                                    ^^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:66:17: Error: Unexpected token 'if'.
+//   var list81 = [if (oracle("foo")) ...listInt else ...listDouble];
+//                 ^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:67:35: Error: Unexpected token '...'.
+//   var set81 = {if (oracle("foo")) ...listInt else ...listDouble, null};
+//                                   ^^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:67:51: Error: Unexpected token '...'.
+//   var set81 = {if (oracle("foo")) ...listInt else ...listDouble, null};
+//                                                   ^^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:67:16: Error: Unexpected token 'if'.
+//   var set81 = {if (oracle("foo")) ...listInt else ...listDouble, null};
+//                ^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:68:35: Error: Unexpected token '...'.
+//   var map81 = {if (oracle("foo")) ...mapToInt else ...mapToDouble, "baz": null};
+//                                   ^^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:68:52: Error: Unexpected token '...'.
+//   var map81 = {if (oracle("foo")) ...mapToInt else ...mapToDouble, "baz": null};
+//                                                    ^^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:68:16: Error: Unexpected token 'if'.
+//   var map81 = {if (oracle("foo")) ...mapToInt else ...mapToDouble, "baz": null};
+//                ^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:69:36: Error: Unexpected token '...'.
+//   var list82 = [if (oracle("foo")) ...listInt else ...dynVar];
+//                                    ^^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:69:52: Error: Unexpected token '...'.
+//   var list82 = [if (oracle("foo")) ...listInt else ...dynVar];
+//                                                    ^^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:69:17: Error: Unexpected token 'if'.
+//   var list82 = [if (oracle("foo")) ...listInt else ...dynVar];
+//                 ^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:70:35: Error: Unexpected token '...'.
+//   var set82 = {if (oracle("foo")) ...listInt else ...dynVar, null};
+//                                   ^^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:70:51: Error: Unexpected token '...'.
+//   var set82 = {if (oracle("foo")) ...listInt else ...dynVar, null};
+//                                                   ^^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:70:16: Error: Unexpected token 'if'.
+//   var set82 = {if (oracle("foo")) ...listInt else ...dynVar, null};
+//                ^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:71:35: Error: Unexpected token '...'.
+//   var map82 = {if (oracle("foo")) ...mapToInt else ...dynVar, null};
+//                                   ^^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:71:52: Error: Unexpected token '...'.
+//   var map82 = {if (oracle("foo")) ...mapToInt else ...dynVar, null};
+//                                                    ^^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:71:16: Error: Unexpected token 'if'.
+//   var map82 = {if (oracle("foo")) ...mapToInt else ...dynVar, null};
+//                ^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:72:44: Error: Unexpected token '...'.
+//   var list83 = [if (oracle("foo")) 42 else ...listDouble];
+//                                            ^^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:72:17: Error: Unexpected token 'if'.
+//   var list83 = [if (oracle("foo")) 42 else ...listDouble];
+//                 ^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:73:35: Error: Unexpected token '...'.
+//   var set83 = {if (oracle("foo")) ...listInt else 3.14, null};
+//                                   ^^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:73:16: Error: Unexpected token 'if'.
+//   var set83 = {if (oracle("foo")) ...listInt else 3.14, null};
+//                ^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:74:35: Error: Unexpected token '...'.
+//   var map83 = {if (oracle("foo")) ...mapToInt else "bar": 3.14, "baz": null};
+//                                   ^^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:74:16: Error: Unexpected token 'if'.
+//   var map83 = {if (oracle("foo")) ...mapToInt else "bar": 3.14, "baz": null};
+//                ^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:75:23: Error: Unexpected token 'if'.
+//   List<int> list90 = [if (oracle("foo")) dynVar];
+//                       ^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:76:21: Error: Unexpected token 'if'.
+//   Set<int> set90 = {if (oracle("foo")) dynVar, null};
+//                     ^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:77:29: Error: Unexpected token 'if'.
+//   Map<String, int> map90 = {if (oracle("foo")) "bar": dynVar, "baz": null};
+//                             ^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:78:42: Error: Unexpected token '...'.
+//   List<int> list91 = [if (oracle("foo")) ...dynVar];
+//                                          ^^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:78:23: Error: Unexpected token 'if'.
+//   List<int> list91 = [if (oracle("foo")) ...dynVar];
+//                       ^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:79:40: Error: Unexpected token '...'.
+//   Set<int> set91 = {if (oracle("foo")) ...dynVar, null};
+//                                        ^^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:79:21: Error: Unexpected token 'if'.
+//   Set<int> set91 = {if (oracle("foo")) ...dynVar, null};
+//                     ^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:80:48: Error: Unexpected token '...'.
+//   Map<String, int> map91 = {if (oracle("foo")) ...dynVar, "baz": null};
+//                                                ^^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:80:29: Error: Unexpected token 'if'.
+//   Map<String, int> map91 = {if (oracle("foo")) ...dynVar, "baz": null};
+//                             ^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:84:9: Error: Unexpected token 'if'.
+//   <int>[if (oracle("foo")) "bar"];
+//         ^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:85:9: Error: Unexpected token 'if'.
+//   <int>{if (oracle("foo")) "bar", null};
+//         ^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:86:17: Error: Unexpected token 'if'.
+//   <String, int>{if (oracle("foo")) "bar": "bar", "baz": null};
+//                 ^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:87:28: Error: Unexpected token '...'.
+//   <int>[if (oracle("foo")) ...["bar"]];
+//                            ^^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:87:9: Error: Unexpected token 'if'.
+//   <int>[if (oracle("foo")) ...["bar"]];
+//         ^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:88:28: Error: Unexpected token '...'.
+//   <int>{if (oracle("foo")) ...["bar"], null};
+//                            ^^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:88:9: Error: Unexpected token 'if'.
+//   <int>{if (oracle("foo")) ...["bar"], null};
+//         ^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:89:36: Error: Unexpected token '...'.
+//   <String, int>{if (oracle("foo")) ...{"bar": "bar"}, "baz": null};
+//                                    ^^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:89:17: Error: Unexpected token 'if'.
+//   <String, int>{if (oracle("foo")) ...{"bar": "bar"}, "baz": null};
+//                 ^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:90:28: Error: Unexpected token '...'.
+//   <int>[if (oracle("foo")) ...map];
+//                            ^^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:90:9: Error: Unexpected token 'if'.
+//   <int>[if (oracle("foo")) ...map];
+//         ^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:91:28: Error: Unexpected token '...'.
+//   <int>{if (oracle("foo")) ...map, null};
+//                            ^^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:91:9: Error: Unexpected token 'if'.
+//   <int>{if (oracle("foo")) ...map, null};
+//         ^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:92:36: Error: Unexpected token '...'.
+//   <String, int>{if (oracle("foo")) ...["bar"], "baz": null};
+//                                    ^^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:92:17: Error: Unexpected token 'if'.
+//   <String, int>{if (oracle("foo")) ...["bar"], "baz": null};
+//                 ^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:93:12: Error: Unexpected token 'if'.
+//   <String>[if (oracle("foo")) 42 else 3.14];
+//            ^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:94:12: Error: Unexpected token 'if'.
+//   <String>{if (oracle("foo")) 42 else 3.14, null};
+//            ^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:95:20: Error: Unexpected token 'if'.
+//   <String, String>{if (oracle("foo")) "bar": 42 else "baz": 3.14, "baz": null};
+//                    ^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:96:28: Error: Unexpected token '...'.
+//   <int>[if (oracle("foo")) ...map else 42];
+//                            ^^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:96:9: Error: Unexpected token 'if'.
+//   <int>[if (oracle("foo")) ...map else 42];
+//         ^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:97:28: Error: Unexpected token '...'.
+//   <int>{if (oracle("foo")) ...map else 42, null};
+//                            ^^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:97:9: Error: Unexpected token 'if'.
+//   <int>{if (oracle("foo")) ...map else 42, null};
+//         ^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:98:36: Error: Unexpected token '...'.
+//   <String, int>{if (oracle("foo")) ...[42] else "bar": 42, "baz": null};
+//                                    ^^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:98:17: Error: Unexpected token 'if'.
+//   <String, int>{if (oracle("foo")) ...[42] else "bar": 42, "baz": null};
+//                 ^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:99:36: Error: Unexpected token '...'.
+//   <int>[if (oracle("foo")) 42 else ...map];
+//                                    ^^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:99:9: Error: Unexpected token 'if'.
+//   <int>[if (oracle("foo")) 42 else ...map];
+//         ^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:100:28: Error: Unexpected token '...'.
+//   <int>{if (oracle("foo")) ...map else 42, null};
+//                            ^^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:100:9: Error: Unexpected token 'if'.
+//   <int>{if (oracle("foo")) ...map else 42, null};
+//         ^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:101:51: Error: Unexpected token '...'.
+//   <String, int>{if (oracle("foo")) "bar": 42 else ...[42], "baz": null};
+//                                                   ^^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:101:17: Error: Unexpected token 'if'.
+//   <String, int>{if (oracle("foo")) "bar": 42 else ...[42], "baz": null};
+//                 ^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:106:17: Error: Unexpected token 'for'.
+//   var list10 = [for (int i = 0; oracle("foo"); i++) 42];
+//                 ^^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:107:16: Error: Unexpected token 'for'.
+//   var set10 = {for (int i = 0; oracle("foo"); i++) 42, null};
+//                ^^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:108:16: Error: Unexpected token 'for'.
+//   var map10 = {for (int i = 0; oracle("foo"); i++) "bar": 42, "baz": null};
+//                ^^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:109:17: Error: Unexpected token 'for'.
+//   var list11 = [for (int i = 0; oracle("foo"); i++) dynVar];
+//                 ^^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:110:16: Error: Unexpected token 'for'.
+//   var set11 = {for (int i = 0; oracle("foo"); i++) dynVar, null};
+//                ^^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:111:16: Error: Unexpected token 'for'.
+//   var map11 = {for (int i = 0; oracle("foo"); i++) "bar": dynVar, "baz": null};
+//                ^^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:112:17: Error: Unexpected token 'for'.
+//   var list12 = [for (int i = 0; oracle("foo"); i++) [42]];
+//                 ^^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:113:16: Error: Unexpected token 'for'.
+//   var set12 = {for (int i = 0; oracle("foo"); i++) [42], null};
+//                ^^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:114:16: Error: Unexpected token 'for'.
+//   var map12 = {for (int i = 0; oracle("foo"); i++) "bar": [42], "baz": null};
+//                ^^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:115:53: Error: Unexpected token '...'.
+//   var list20 = [for (int i = 0; oracle("foo"); i++) ...[42]];
+//                                                     ^^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:115:17: Error: Unexpected token 'for'.
+//   var list20 = [for (int i = 0; oracle("foo"); i++) ...[42]];
+//                 ^^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:116:52: Error: Unexpected token '...'.
+//   var set20 = {for (int i = 0; oracle("foo"); i++) ...[42], null};
+//                                                    ^^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:116:16: Error: Unexpected token 'for'.
+//   var set20 = {for (int i = 0; oracle("foo"); i++) ...[42], null};
+//                ^^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:117:52: Error: Unexpected token '...'.
+//   var map20 = {for (int i = 0; oracle("foo"); i++) ...{"bar": 42}, "baz": null};
+//                                                    ^^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:117:16: Error: Unexpected token 'for'.
+//   var map20 = {for (int i = 0; oracle("foo"); i++) ...{"bar": 42}, "baz": null};
+//                ^^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:118:53: Error: Unexpected token '...'.
+//   var list21 = [for (int i = 0; oracle("foo"); i++) ...[dynVar]];
+//                                                     ^^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:118:17: Error: Unexpected token 'for'.
+//   var list21 = [for (int i = 0; oracle("foo"); i++) ...[dynVar]];
+//                 ^^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:119:52: Error: Unexpected token '...'.
+//   var set21 = {for (int i = 0; oracle("foo"); i++) ...[dynVar], null};
+//                                                    ^^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:119:16: Error: Unexpected token 'for'.
+//   var set21 = {for (int i = 0; oracle("foo"); i++) ...[dynVar], null};
+//                ^^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:120:52: Error: Unexpected token '...'.
+//   var map21 = {for (int i = 0; oracle("foo"); i++) ...{"bar": dynVar}, "baz": null};
+//                                                    ^^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:120:16: Error: Unexpected token 'for'.
+//   var map21 = {for (int i = 0; oracle("foo"); i++) ...{"bar": dynVar}, "baz": null};
+//                ^^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:121:53: Error: Unexpected token '...'.
+//   var list22 = [for (int i = 0; oracle("foo"); i++) ...[[42]]];
+//                                                     ^^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:121:17: Error: Unexpected token 'for'.
+//   var list22 = [for (int i = 0; oracle("foo"); i++) ...[[42]]];
+//                 ^^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:122:52: Error: Unexpected token '...'.
+//   var set22 = {for (int i = 0; oracle("foo"); i++) ...[[42]], null};
+//                                                    ^^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:122:16: Error: Unexpected token 'for'.
+//   var set22 = {for (int i = 0; oracle("foo"); i++) ...[[42]], null};
+//                ^^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:123:52: Error: Unexpected token '...'.
+//   var map22 = {for (int i = 0; oracle("foo"); i++) ...{"bar": [42]}, "baz": null};
+//                                                    ^^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:123:16: Error: Unexpected token 'for'.
+//   var map22 = {for (int i = 0; oracle("foo"); i++) ...{"bar": [42]}, "baz": null};
+//                ^^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:124:67: Error: Unexpected token '...'.
+//   var list30 = [for (int i = 0; oracle("foo"); i++) if (oracle()) ...[42]];
+//                                                                   ^^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:124:53: Error: Unexpected token 'if'.
+//   var list30 = [for (int i = 0; oracle("foo"); i++) if (oracle()) ...[42]];
+//                                                     ^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:124:17: Error: Unexpected token 'for'.
+//   var list30 = [for (int i = 0; oracle("foo"); i++) if (oracle()) ...[42]];
+//                 ^^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:125:66: Error: Unexpected token '...'.
+//   var set30 = {for (int i = 0; oracle("foo"); i++) if (oracle()) ...[42], null};
+//                                                                  ^^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:125:52: Error: Unexpected token 'if'.
+//   var set30 = {for (int i = 0; oracle("foo"); i++) if (oracle()) ...[42], null};
+//                                                    ^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:125:16: Error: Unexpected token 'for'.
+//   var set30 = {for (int i = 0; oracle("foo"); i++) if (oracle()) ...[42], null};
+//                ^^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:126:66: Error: Unexpected token '...'.
+//   var map30 = {for (int i = 0; oracle("foo"); i++) if (oracle()) ...{"bar": 42}, "baz": null};
+//                                                                  ^^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:126:52: Error: Unexpected token 'if'.
+//   var map30 = {for (int i = 0; oracle("foo"); i++) if (oracle()) ...{"bar": 42}, "baz": null};
+//                                                    ^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:126:16: Error: Unexpected token 'for'.
+//   var map30 = {for (int i = 0; oracle("foo"); i++) if (oracle()) ...{"bar": 42}, "baz": null};
+//                ^^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:127:67: Error: Unexpected token '...'.
+//   var list31 = [for (int i = 0; oracle("foo"); i++) if (oracle()) ...[dynVar]];
+//                                                                   ^^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:127:53: Error: Unexpected token 'if'.
+//   var list31 = [for (int i = 0; oracle("foo"); i++) if (oracle()) ...[dynVar]];
+//                                                     ^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:127:17: Error: Unexpected token 'for'.
+//   var list31 = [for (int i = 0; oracle("foo"); i++) if (oracle()) ...[dynVar]];
+//                 ^^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:128:66: Error: Unexpected token '...'.
+//   var set31 = {for (int i = 0; oracle("foo"); i++) if (oracle()) ...[dynVar], null};
+//                                                                  ^^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:128:52: Error: Unexpected token 'if'.
+//   var set31 = {for (int i = 0; oracle("foo"); i++) if (oracle()) ...[dynVar], null};
+//                                                    ^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:128:16: Error: Unexpected token 'for'.
+//   var set31 = {for (int i = 0; oracle("foo"); i++) if (oracle()) ...[dynVar], null};
+//                ^^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:129:66: Error: Unexpected token '...'.
+//   var map31 = {for (int i = 0; oracle("foo"); i++) if (oracle()) ...{"bar": dynVar}, "baz": null};
+//                                                                  ^^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:129:52: Error: Unexpected token 'if'.
+//   var map31 = {for (int i = 0; oracle("foo"); i++) if (oracle()) ...{"bar": dynVar}, "baz": null};
+//                                                    ^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:129:16: Error: Unexpected token 'for'.
+//   var map31 = {for (int i = 0; oracle("foo"); i++) if (oracle()) ...{"bar": dynVar}, "baz": null};
+//                ^^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:130:67: Error: Unexpected token '...'.
+//   var list33 = [for (int i = 0; oracle("foo"); i++) if (oracle()) ...[[42]]];
+//                                                                   ^^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:130:53: Error: Unexpected token 'if'.
+//   var list33 = [for (int i = 0; oracle("foo"); i++) if (oracle()) ...[[42]]];
+//                                                     ^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:130:17: Error: Unexpected token 'for'.
+//   var list33 = [for (int i = 0; oracle("foo"); i++) if (oracle()) ...[[42]]];
+//                 ^^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:131:66: Error: Unexpected token '...'.
+//   var set33 = {for (int i = 0; oracle("foo"); i++) if (oracle()) ...[[42]], null};
+//                                                                  ^^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:131:52: Error: Unexpected token 'if'.
+//   var set33 = {for (int i = 0; oracle("foo"); i++) if (oracle()) ...[[42]], null};
+//                                                    ^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:131:16: Error: Unexpected token 'for'.
+//   var set33 = {for (int i = 0; oracle("foo"); i++) if (oracle()) ...[[42]], null};
+//                ^^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:132:66: Error: Unexpected token '...'.
+//   var map33 = {for (int i = 0; oracle("foo"); i++) if (oracle()) ...{"bar": [42]}, "baz": null};
+//                                                                  ^^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:132:52: Error: Unexpected token 'if'.
+//   var map33 = {for (int i = 0; oracle("foo"); i++) if (oracle()) ...{"bar": [42]}, "baz": null};
+//                                                    ^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:132:16: Error: Unexpected token 'for'.
+//   var map33 = {for (int i = 0; oracle("foo"); i++) if (oracle()) ...{"bar": [42]}, "baz": null};
+//                ^^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:133:65: Error: Unexpected token '...'.
+//   List<List<int>> list40 = [for (int i = 0; oracle("foo"); i++) ...[[]]];
+//                                                                 ^^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:133:29: Error: Unexpected token 'for'.
+//   List<List<int>> list40 = [for (int i = 0; oracle("foo"); i++) ...[[]]];
+//                             ^^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:134:63: Error: Unexpected token '...'.
+//   Set<List<int>> set40 = {for (int i = 0; oracle("foo"); i++) ...[[]], null};
+//                                                               ^^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:134:27: Error: Unexpected token 'for'.
+//   Set<List<int>> set40 = {for (int i = 0; oracle("foo"); i++) ...[[]], null};
+//                           ^^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:135:71: Error: Unexpected token '...'.
+//   Map<String, List<int>> map40 = {for (int i = 0; oracle("foo"); i++) ...{"bar": []}, "baz": null};
+//                                                                       ^^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:135:35: Error: Unexpected token 'for'.
+//   Map<String, List<int>> map40 = {for (int i = 0; oracle("foo"); i++) ...{"bar": []}, "baz": null};
+//                                   ^^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:136:65: Error: Unexpected token '...'.
+//   List<List<int>> list41 = [for (int i = 0; oracle("foo"); i++) ...{[]}];
+//                                                                 ^^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:136:29: Error: Unexpected token 'for'.
+//   List<List<int>> list41 = [for (int i = 0; oracle("foo"); i++) ...{[]}];
+//                             ^^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:137:63: Error: Unexpected token '...'.
+//   Set<List<int>> set41 = {for (int i = 0; oracle("foo"); i++) ...{[]}, null};
+//                                                               ^^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:137:27: Error: Unexpected token 'for'.
+//   Set<List<int>> set41 = {for (int i = 0; oracle("foo"); i++) ...{[]}, null};
+//                           ^^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:138:79: Error: Unexpected token '...'.
+//   List<List<int>> list42 = [for (int i = 0; oracle("foo"); i++) if (oracle()) ...[[]]];
+//                                                                               ^^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:138:65: Error: Unexpected token 'if'.
+//   List<List<int>> list42 = [for (int i = 0; oracle("foo"); i++) if (oracle()) ...[[]]];
+//                                                                 ^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:138:29: Error: Unexpected token 'for'.
+//   List<List<int>> list42 = [for (int i = 0; oracle("foo"); i++) if (oracle()) ...[[]]];
+//                             ^^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:139:77: Error: Unexpected token '...'.
+//   Set<List<int>> set42 = {for (int i = 0; oracle("foo"); i++) if (oracle()) ...[[]], null};
+//                                                                             ^^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:139:63: Error: Unexpected token 'if'.
+//   Set<List<int>> set42 = {for (int i = 0; oracle("foo"); i++) if (oracle()) ...[[]], null};
+//                                                               ^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:139:27: Error: Unexpected token 'for'.
+//   Set<List<int>> set42 = {for (int i = 0; oracle("foo"); i++) if (oracle()) ...[[]], null};
+//                           ^^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:140:85: Error: Unexpected token '...'.
+//   Map<String, List<int>> map42 = {for (int i = 0; oracle("foo"); i++) if (oracle()) ...{"bar": []}, "baz": null};
+//                                                                                     ^^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:140:71: Error: Unexpected token 'if'.
+//   Map<String, List<int>> map42 = {for (int i = 0; oracle("foo"); i++) if (oracle()) ...{"bar": []}, "baz": null};
+//                                                                       ^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:140:35: Error: Unexpected token 'for'.
+//   Map<String, List<int>> map42 = {for (int i = 0; oracle("foo"); i++) if (oracle()) ...{"bar": []}, "baz": null};
+//                                   ^^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:141:59: Error: Unexpected token '...'.
+//   List<int> list50 = [for (int i = 0; oracle("foo"); i++) ...[]];
+//                                                           ^^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:141:23: Error: Unexpected token 'for'.
+//   List<int> list50 = [for (int i = 0; oracle("foo"); i++) ...[]];
+//                       ^^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:142:57: Error: Unexpected token '...'.
+//   Set<int> set50 = {for (int i = 0; oracle("foo"); i++) ...[], null};
+//                                                         ^^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:142:21: Error: Unexpected token 'for'.
+//   Set<int> set50 = {for (int i = 0; oracle("foo"); i++) ...[], null};
+//                     ^^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:143:65: Error: Unexpected token '...'.
+//   Map<String, int> map50 = {for (int i = 0; oracle("foo"); i++) ...{}, "baz": null};
+//                                                                 ^^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:143:29: Error: Unexpected token 'for'.
+//   Map<String, int> map50 = {for (int i = 0; oracle("foo"); i++) ...{}, "baz": null};
+//                             ^^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:144:59: Error: Unexpected token '...'.
+//   List<int> list51 = [for (int i = 0; oracle("foo"); i++) ...{}];
+//                                                           ^^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:144:23: Error: Unexpected token 'for'.
+//   List<int> list51 = [for (int i = 0; oracle("foo"); i++) ...{}];
+//                       ^^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:145:57: Error: Unexpected token '...'.
+//   Set<int> set51 = {for (int i = 0; oracle("foo"); i++) ...{}, null};
+//                                                         ^^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:145:21: Error: Unexpected token 'for'.
+//   Set<int> set51 = {for (int i = 0; oracle("foo"); i++) ...{}, null};
+//                     ^^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:146:73: Error: Unexpected token '...'.
+//   List<int> list52 = [for (int i = 0; oracle("foo"); i++) if (oracle()) ...[]];
+//                                                                         ^^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:146:59: Error: Unexpected token 'if'.
+//   List<int> list52 = [for (int i = 0; oracle("foo"); i++) if (oracle()) ...[]];
+//                                                           ^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:146:23: Error: Unexpected token 'for'.
+//   List<int> list52 = [for (int i = 0; oracle("foo"); i++) if (oracle()) ...[]];
+//                       ^^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:147:71: Error: Unexpected token '...'.
+//   Set<int> set52 = {for (int i = 0; oracle("foo"); i++) if (oracle()) ...[], null};
+//                                                                       ^^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:147:57: Error: Unexpected token 'if'.
+//   Set<int> set52 = {for (int i = 0; oracle("foo"); i++) if (oracle()) ...[], null};
+//                                                         ^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:147:21: Error: Unexpected token 'for'.
+//   Set<int> set52 = {for (int i = 0; oracle("foo"); i++) if (oracle()) ...[], null};
+//                     ^^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:148:65: Error: Unexpected token '...'.
+//   List<List<int>> list60 = [for (int i = 0; oracle("foo"); i++) ...[[]]];
+//                                                                 ^^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:148:29: Error: Unexpected token 'for'.
+//   List<List<int>> list60 = [for (int i = 0; oracle("foo"); i++) ...[[]]];
+//                             ^^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:149:63: Error: Unexpected token '...'.
+//   Set<List<int>> set60 = {for (int i = 0; oracle("foo"); i++) ...[[]], null};
+//                                                               ^^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:149:27: Error: Unexpected token 'for'.
+//   Set<List<int>> set60 = {for (int i = 0; oracle("foo"); i++) ...[[]], null};
+//                           ^^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:150:71: Error: Unexpected token '...'.
+//   Map<String, List<int>> map60 = {for (int i = 0; oracle("foo"); i++) ...{"bar": []}, "baz": null};
+//                                                                       ^^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:150:35: Error: Unexpected token 'for'.
+//   Map<String, List<int>> map60 = {for (int i = 0; oracle("foo"); i++) ...{"bar": []}, "baz": null};
+//                                   ^^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:151:79: Error: Unexpected token '...'.
+//   List<List<int>> list61 = [for (int i = 0; oracle("foo"); i++) if (oracle()) ...[[]]];
+//                                                                               ^^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:151:65: Error: Unexpected token 'if'.
+//   List<List<int>> list61 = [for (int i = 0; oracle("foo"); i++) if (oracle()) ...[[]]];
+//                                                                 ^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:151:29: Error: Unexpected token 'for'.
+//   List<List<int>> list61 = [for (int i = 0; oracle("foo"); i++) if (oracle()) ...[[]]];
+//                             ^^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:152:77: Error: Unexpected token '...'.
+//   Set<List<int>> set61 = {for (int i = 0; oracle("foo"); i++) if (oracle()) ...[[]], null};
+//                                                                             ^^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:152:63: Error: Unexpected token 'if'.
+//   Set<List<int>> set61 = {for (int i = 0; oracle("foo"); i++) if (oracle()) ...[[]], null};
+//                                                               ^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:152:27: Error: Unexpected token 'for'.
+//   Set<List<int>> set61 = {for (int i = 0; oracle("foo"); i++) if (oracle()) ...[[]], null};
+//                           ^^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:153:85: Error: Unexpected token '...'.
+//   Map<String, List<int>> map61 = {for (int i = 0; oracle("foo"); i++) if (oracle()) ...{"bar": []}, "baz": null};
+//                                                                                     ^^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:153:71: Error: Unexpected token 'if'.
+//   Map<String, List<int>> map61 = {for (int i = 0; oracle("foo"); i++) if (oracle()) ...{"bar": []}, "baz": null};
+//                                                                       ^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:153:35: Error: Unexpected token 'for'.
+//   Map<String, List<int>> map61 = {for (int i = 0; oracle("foo"); i++) if (oracle()) ...{"bar": []}, "baz": null};
+//                                   ^^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:154:29: Error: Unexpected token 'for'.
+//   List<List<int>> list70 = [for (int i = 0; oracle("foo"); i++) []];
+//                             ^^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:155:27: Error: Unexpected token 'for'.
+//   Set<List<int>> set70 = {for (int i = 0; oracle("foo"); i++) [], null};
+//                           ^^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:156:35: Error: Unexpected token 'for'.
+//   Map<String, List<int>> map70 = {for (int i = 0; oracle("foo"); i++) "bar": [], "baz": null};
+//                                   ^^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:157:65: Error: Unexpected token 'if'.
+//   List<List<int>> list71 = [for (int i = 0; oracle("foo"); i++) if (oracle()) []];
+//                                                                 ^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:157:29: Error: Unexpected token 'for'.
+//   List<List<int>> list71 = [for (int i = 0; oracle("foo"); i++) if (oracle()) []];
+//                             ^^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:158:63: Error: Unexpected token 'if'.
+//   Set<List<int>> set71 = {for (int i = 0; oracle("foo"); i++) if (oracle()) [], null};
+//                                                               ^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:158:27: Error: Unexpected token 'for'.
+//   Set<List<int>> set71 = {for (int i = 0; oracle("foo"); i++) if (oracle()) [], null};
+//                           ^^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:159:71: Error: Unexpected token 'if'.
+//   Map<String, List<int>> map71 = {for (int i = 0; oracle("foo"); i++) if (oracle()) "bar": [], "baz": null};
+//                                                                       ^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:159:35: Error: Unexpected token 'for'.
+//   Map<String, List<int>> map71 = {for (int i = 0; oracle("foo"); i++) if (oracle()) "bar": [], "baz": null};
+//                                   ^^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:160:53: Error: Unexpected token 'if'.
+//   var list80 = [for (int i = 0; oracle("foo"); i++) if (oracle()) 42 else 3.14];
+//                                                     ^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:160:17: Error: Unexpected token 'for'.
+//   var list80 = [for (int i = 0; oracle("foo"); i++) if (oracle()) 42 else 3.14];
+//                 ^^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:161:52: Error: Unexpected token 'if'.
+//   var set80 = {for (int i = 0; oracle("foo"); i++) if (oracle()) 42 else 3.14, null};
+//                                                    ^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:161:16: Error: Unexpected token 'for'.
+//   var set80 = {for (int i = 0; oracle("foo"); i++) if (oracle()) 42 else 3.14, null};
+//                ^^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:162:52: Error: Unexpected token 'if'.
+//   var map80 = {for (int i = 0; oracle("foo"); i++) if (oracle()) "bar": 42 else "bar": 3.14, "baz": null};
+//                                                    ^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:162:16: Error: Unexpected token 'for'.
+//   var map80 = {for (int i = 0; oracle("foo"); i++) if (oracle()) "bar": 42 else "bar": 3.14, "baz": null};
+//                ^^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:163:67: Error: Unexpected token '...'.
+//   var list81 = [for (int i = 0; oracle("foo"); i++) if (oracle()) ...listInt else ...listDouble];
+//                                                                   ^^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:163:83: Error: Unexpected token '...'.
+//   var list81 = [for (int i = 0; oracle("foo"); i++) if (oracle()) ...listInt else ...listDouble];
+//                                                                                   ^^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:163:53: Error: Unexpected token 'if'.
+//   var list81 = [for (int i = 0; oracle("foo"); i++) if (oracle()) ...listInt else ...listDouble];
+//                                                     ^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:163:17: Error: Unexpected token 'for'.
+//   var list81 = [for (int i = 0; oracle("foo"); i++) if (oracle()) ...listInt else ...listDouble];
+//                 ^^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:164:66: Error: Unexpected token '...'.
+//   var set81 = {for (int i = 0; oracle("foo"); i++) if (oracle()) ...listInt else ...listDouble, null};
+//                                                                  ^^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:164:82: Error: Unexpected token '...'.
+//   var set81 = {for (int i = 0; oracle("foo"); i++) if (oracle()) ...listInt else ...listDouble, null};
+//                                                                                  ^^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:164:52: Error: Unexpected token 'if'.
+//   var set81 = {for (int i = 0; oracle("foo"); i++) if (oracle()) ...listInt else ...listDouble, null};
+//                                                    ^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:164:16: Error: Unexpected token 'for'.
+//   var set81 = {for (int i = 0; oracle("foo"); i++) if (oracle()) ...listInt else ...listDouble, null};
+//                ^^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:165:66: Error: Unexpected token '...'.
+//   var map81 = {for (int i = 0; oracle("foo"); i++) if (oracle()) ...mapStringInt else ...mapStringDouble, "baz": null};
+//                                                                  ^^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:165:87: Error: Unexpected token '...'.
+//   var map81 = {for (int i = 0; oracle("foo"); i++) if (oracle()) ...mapStringInt else ...mapStringDouble, "baz": null};
+//                                                                                       ^^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:165:52: Error: Unexpected token 'if'.
+//   var map81 = {for (int i = 0; oracle("foo"); i++) if (oracle()) ...mapStringInt else ...mapStringDouble, "baz": null};
+//                                                    ^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:165:16: Error: Unexpected token 'for'.
+//   var map81 = {for (int i = 0; oracle("foo"); i++) if (oracle()) ...mapStringInt else ...mapStringDouble, "baz": null};
+//                ^^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:166:67: Error: Unexpected token '...'.
+//   var list82 = [for (int i = 0; oracle("foo"); i++) if (oracle()) ...listInt else ...dynVar];
+//                                                                   ^^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:166:83: Error: Unexpected token '...'.
+//   var list82 = [for (int i = 0; oracle("foo"); i++) if (oracle()) ...listInt else ...dynVar];
+//                                                                                   ^^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:166:53: Error: Unexpected token 'if'.
+//   var list82 = [for (int i = 0; oracle("foo"); i++) if (oracle()) ...listInt else ...dynVar];
+//                                                     ^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:166:17: Error: Unexpected token 'for'.
+//   var list82 = [for (int i = 0; oracle("foo"); i++) if (oracle()) ...listInt else ...dynVar];
+//                 ^^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:167:66: Error: Unexpected token '...'.
+//   var set82 = {for (int i = 0; oracle("foo"); i++) if (oracle()) ...listInt else ...dynVar, null};
+//                                                                  ^^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:167:82: Error: Unexpected token '...'.
+//   var set82 = {for (int i = 0; oracle("foo"); i++) if (oracle()) ...listInt else ...dynVar, null};
+//                                                                                  ^^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:167:52: Error: Unexpected token 'if'.
+//   var set82 = {for (int i = 0; oracle("foo"); i++) if (oracle()) ...listInt else ...dynVar, null};
+//                                                    ^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:167:16: Error: Unexpected token 'for'.
+//   var set82 = {for (int i = 0; oracle("foo"); i++) if (oracle()) ...listInt else ...dynVar, null};
+//                ^^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:168:66: Error: Unexpected token '...'.
+//   var map82 = {for (int i = 0; oracle("foo"); i++) if (oracle()) ...mapStringInt else ...dynVar, "baz": null};
+//                                                                  ^^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:168:87: Error: Unexpected token '...'.
+//   var map82 = {for (int i = 0; oracle("foo"); i++) if (oracle()) ...mapStringInt else ...dynVar, "baz": null};
+//                                                                                       ^^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:168:52: Error: Unexpected token 'if'.
+//   var map82 = {for (int i = 0; oracle("foo"); i++) if (oracle()) ...mapStringInt else ...dynVar, "baz": null};
+//                                                    ^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:168:16: Error: Unexpected token 'for'.
+//   var map82 = {for (int i = 0; oracle("foo"); i++) if (oracle()) ...mapStringInt else ...dynVar, "baz": null};
+//                ^^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:169:75: Error: Unexpected token '...'.
+//   var list83 = [for (int i = 0; oracle("foo"); i++) if (oracle()) 42 else ...listDouble];
+//                                                                           ^^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:169:53: Error: Unexpected token 'if'.
+//   var list83 = [for (int i = 0; oracle("foo"); i++) if (oracle()) 42 else ...listDouble];
+//                                                     ^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:169:17: Error: Unexpected token 'for'.
+//   var list83 = [for (int i = 0; oracle("foo"); i++) if (oracle()) 42 else ...listDouble];
+//                 ^^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:170:66: Error: Unexpected token '...'.
+//   var set83 = {for (int i = 0; oracle("foo"); i++) if (oracle()) ...listInt else 3.14, null};
+//                                                                  ^^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:170:52: Error: Unexpected token 'if'.
+//   var set83 = {for (int i = 0; oracle("foo"); i++) if (oracle()) ...listInt else 3.14, null};
+//                                                    ^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:170:16: Error: Unexpected token 'for'.
+//   var set83 = {for (int i = 0; oracle("foo"); i++) if (oracle()) ...listInt else 3.14, null};
+//                ^^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:171:66: Error: Unexpected token '...'.
+//   var map83 = {for (int i = 0; oracle("foo"); i++) if (oracle()) ...mapStringInt else "bar": 3.14, "baz": null};
+//                                                                  ^^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:171:52: Error: Unexpected token 'if'.
+//   var map83 = {for (int i = 0; oracle("foo"); i++) if (oracle()) ...mapStringInt else "bar": 3.14, "baz": null};
+//                                                    ^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:171:16: Error: Unexpected token 'for'.
+//   var map83 = {for (int i = 0; oracle("foo"); i++) if (oracle()) ...mapStringInt else "bar": 3.14, "baz": null};
+//                ^^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:172:23: Error: Unexpected token 'for'.
+//   List<int> list90 = [for (int i = 0; oracle("foo"); i++) dynVar];
+//                       ^^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:173:21: Error: Unexpected token 'for'.
+//   Set<int> set90 = {for (int i = 0; oracle("foo"); i++) dynVar, null};
+//                     ^^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:174:29: Error: Unexpected token 'for'.
+//   Map<String, int> map90 = {for (int i = 0; oracle("foo"); i++) "bar": dynVar, "baz": null};
+//                             ^^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:175:59: Error: Unexpected token '...'.
+//   List<int> list91 = [for (int i = 0; oracle("foo"); i++) ...dynVar];
+//                                                           ^^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:175:23: Error: Unexpected token 'for'.
+//   List<int> list91 = [for (int i = 0; oracle("foo"); i++) ...dynVar];
+//                       ^^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:176:57: Error: Unexpected token '...'.
+//   Set<int> set91 = {for (int i = 0; oracle("foo"); i++) ...dynVar, null};
+//                                                         ^^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:176:21: Error: Unexpected token 'for'.
+//   Set<int> set91 = {for (int i = 0; oracle("foo"); i++) ...dynVar, null};
+//                     ^^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:177:65: Error: Unexpected token '...'.
+//   Map<String, int> map91 = {for (int i = 0; oracle("foo"); i++) ...dynVar, "baz": null};
+//                                                                 ^^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:177:29: Error: Unexpected token 'for'.
+//   Map<String, int> map91 = {for (int i = 0; oracle("foo"); i++) ...dynVar, "baz": null};
+//                             ^^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:178:29: Error: Unexpected token 'for'.
+//   List<int> list100 = <int>[for (index = 0; oracle("foo"); index++) 42];
+//                             ^^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:179:27: Error: Unexpected token 'for'.
+//   Set<int> set100 = <int>{for (index = 0; oracle("foo"); index++) 42};
+//                           ^^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:180:43: Error: Unexpected token 'for'.
+//   Map<String, int> map100 = <String, int>{for (index = 0; oracle("foo"); index++) "bar": 42};
+//                                           ^^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:181:18: Error: Unexpected token 'for'.
+//   var list110 = [for (var i in [1, 2, 3]) i];
+//                  ^^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:182:17: Error: Unexpected token 'for'.
+//   var set110 = {for (var i in [1, 2, 3]) i, null};
+//                 ^^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:183:17: Error: Unexpected token 'for'.
+//   var map110 = {for (var i in [1, 2, 3]) "bar": i, "baz": null};
+//                 ^^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:184:24: Error: Unexpected token 'for'.
+//   List<int> list120 = [for (var i in dynVar) i];
+//                        ^^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:185:22: Error: Unexpected token 'for'.
+//   Set<int> set120 = {for (var i in dynVar) i, null};
+//                      ^^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:186:30: Error: Unexpected token 'for'.
+//   Map<String, int> map120 = {for (var i in dynVar) "bar": i, "baz": null};
+//                              ^^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:190:9: Error: Unexpected token 'for'.
+//   <int>[for (int i = 0; oracle("foo"); i++) "bar"];
+//         ^^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:191:9: Error: Unexpected token 'for'.
+//   <int>{for (int i = 0; oracle("foo"); i++) "bar", null};
+//         ^^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:192:14: Error: Unexpected token 'for'.
+//   <int, int>{for (int i = 0; oracle("foo"); i++) "bar": "bar", "baz": null};
+//              ^^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:193:45: Error: Unexpected token '...'.
+//   <int>[for (int i = 0; oracle("foo"); i++) ...["bar"]];
+//                                             ^^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:193:9: Error: Unexpected token 'for'.
+//   <int>[for (int i = 0; oracle("foo"); i++) ...["bar"]];
+//         ^^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:194:45: Error: Unexpected token '...'.
+//   <int>{for (int i = 0; oracle("foo"); i++) ...["bar"], null};
+//                                             ^^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:194:9: Error: Unexpected token 'for'.
+//   <int>{for (int i = 0; oracle("foo"); i++) ...["bar"], null};
+//         ^^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:195:50: Error: Unexpected token '...'.
+//   <int, int>{for (int i = 0; oracle("foo"); i++) ...{"bar": "bar"}, "baz": null};
+//                                                  ^^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:195:14: Error: Unexpected token 'for'.
+//   <int, int>{for (int i = 0; oracle("foo"); i++) ...{"bar": "bar"}, "baz": null};
+//              ^^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:196:45: Error: Unexpected token '...'.
+//   <int>[for (int i = 0; oracle("foo"); i++) ...map];
+//                                             ^^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:196:9: Error: Unexpected token 'for'.
+//   <int>[for (int i = 0; oracle("foo"); i++) ...map];
+//         ^^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:197:45: Error: Unexpected token '...'.
+//   <int>{for (int i = 0; oracle("foo"); i++) ...map, null};
+//                                             ^^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:197:9: Error: Unexpected token 'for'.
+//   <int>{for (int i = 0; oracle("foo"); i++) ...map, null};
+//         ^^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:198:50: Error: Unexpected token '...'.
+//   <int, int>{for (int i = 0; oracle("foo"); i++) ...list, 42: null};
+//                                                  ^^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:198:14: Error: Unexpected token 'for'.
+//   <int, int>{for (int i = 0; oracle("foo"); i++) ...list, 42: null};
+//              ^^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:199:48: Error: Unexpected token 'if'.
+//   <String>[for (int i = 0; oracle("foo"); i++) if (oracle()) 42 else 3.14];
+//                                                ^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:199:12: Error: Unexpected token 'for'.
+//   <String>[for (int i = 0; oracle("foo"); i++) if (oracle()) 42 else 3.14];
+//            ^^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:200:48: Error: Unexpected token 'if'.
+//   <String>{for (int i = 0; oracle("foo"); i++) if (oracle()) 42 else 3.14, null};
+//                                                ^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:200:12: Error: Unexpected token 'for'.
+//   <String>{for (int i = 0; oracle("foo"); i++) if (oracle()) 42 else 3.14, null};
+//            ^^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:201:56: Error: Unexpected token 'if'.
+//   <String, String>{for (int i = 0; oracle("foo"); i++) if (oracle()) "bar": 42 else "bar": 3.14, "baz": null};
+//                                                        ^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:201:20: Error: Unexpected token 'for'.
+//   <String, String>{for (int i = 0; oracle("foo"); i++) if (oracle()) "bar": 42 else "bar": 3.14, "baz": null};
+//                    ^^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:202:59: Error: Unexpected token '...'.
+//   <int>[for (int i = 0; oracle("foo"); i++) if (oracle()) ...map else 42];
+//                                                           ^^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:202:45: Error: Unexpected token 'if'.
+//   <int>[for (int i = 0; oracle("foo"); i++) if (oracle()) ...map else 42];
+//                                             ^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:202:9: Error: Unexpected token 'for'.
+//   <int>[for (int i = 0; oracle("foo"); i++) if (oracle()) ...map else 42];
+//         ^^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:203:59: Error: Unexpected token '...'.
+//   <int>{for (int i = 0; oracle("foo"); i++) if (oracle()) ...map else 42, null};
+//                                                           ^^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:203:45: Error: Unexpected token 'if'.
+//   <int>{for (int i = 0; oracle("foo"); i++) if (oracle()) ...map else 42, null};
+//                                             ^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:203:9: Error: Unexpected token 'for'.
+//   <int>{for (int i = 0; oracle("foo"); i++) if (oracle()) ...map else 42, null};
+//         ^^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:204:67: Error: Unexpected token '...'.
+//   <String, int>{for (int i = 0; oracle("foo"); i++) if (oracle()) ...list else "bar": 42, "baz": null};
+//                                                                   ^^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:204:53: Error: Unexpected token 'if'.
+//   <String, int>{for (int i = 0; oracle("foo"); i++) if (oracle()) ...list else "bar": 42, "baz": null};
+//                                                     ^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:204:17: Error: Unexpected token 'for'.
+//   <String, int>{for (int i = 0; oracle("foo"); i++) if (oracle()) ...list else "bar": 42, "baz": null};
+//                 ^^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:205:67: Error: Unexpected token '...'.
+//   <int>[for (int i = 0; oracle("foo"); i++) if (oracle()) 42 else ...map];
+//                                                                   ^^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:205:45: Error: Unexpected token 'if'.
+//   <int>[for (int i = 0; oracle("foo"); i++) if (oracle()) 42 else ...map];
+//                                             ^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:205:9: Error: Unexpected token 'for'.
+//   <int>[for (int i = 0; oracle("foo"); i++) if (oracle()) 42 else ...map];
+//         ^^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:206:67: Error: Unexpected token '...'.
+//   <int>{for (int i = 0; oracle("foo"); i++) if (oracle()) 42 else ...map, null};
+//                                                                   ^^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:206:45: Error: Unexpected token 'if'.
+//   <int>{for (int i = 0; oracle("foo"); i++) if (oracle()) 42 else ...map, null};
+//                                             ^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:206:9: Error: Unexpected token 'for'.
+//   <int>{for (int i = 0; oracle("foo"); i++) if (oracle()) 42 else ...map, null};
+//         ^^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:207:82: Error: Unexpected token '...'.
+//   <String, int>{for (int i = 0; oracle("foo"); i++) if (oracle()) "bar": 42 else ...list, "baz": null};
+//                                                                                  ^^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:207:53: Error: Unexpected token 'if'.
+//   <String, int>{for (int i = 0; oracle("foo"); i++) if (oracle()) "bar": 42 else ...list, "baz": null};
+//                                                     ^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:207:17: Error: Unexpected token 'for'.
+//   <String, int>{for (int i = 0; oracle("foo"); i++) if (oracle()) "bar": 42 else ...list, "baz": null};
+//                 ^^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:210:9: Error: Unexpected token 'for'.
+//   <int>[for (i in <int>[1]) i];
+//         ^^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:211:9: Error: Unexpected token 'for'.
+//   <int>{for (i in <int>[1]) i, null};
+//         ^^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:212:16: Error: Unexpected token 'for'.
+// 	<String, int>{for (i in <int>[1]) "bar": i, "baz": null};
+// 	              ^^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:214:17: Error: Unexpected token 'for'.
+//   var list10 = [for (var i in "not iterable") i];
+//                 ^^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:215:16: Error: Unexpected token 'for'.
+//   var set10 = {for (var i in "not iterable") i, null};
+//                ^^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:216:16: Error: Unexpected token 'for'.
+//   var map10 = {for (var i in "not iterable") "bar": i, "baz": null};
+//                ^^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:217:17: Error: Unexpected token 'for'.
+//   var list20 = [for (int i in ["not", "int"]) i];
+//                 ^^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:218:16: Error: Unexpected token 'for'.
+//   var set20 = {for (int i in ["not", "int"]) i, null};
+//                ^^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:219:16: Error: Unexpected token 'for'.
+//   var map20 = {for (int i in ["not", "int"]) "bar": i, "baz": null};
+//                ^^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:220:23: Error: Unexpected token 'for'.
+//   var list30 = [await for (var i in "not stream") i];
+//                       ^^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:221:22: Error: Unexpected token 'for'.
+//   var set30 = {await for (var i in "not stream") i, null};
+//                      ^^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:222:22: Error: Unexpected token 'for'.
+//   var map30 = {await for (var i in "not stream") "bar": i, "baz": null};
+//                      ^^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:223:23: Error: Unexpected token 'for'.
+//   var list40 = [await for (int i in Stream.fromIterable(["not", "int"])) i];
+//                       ^^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:224:22: Error: Unexpected token 'for'.
+//   var set40 = {await for (int i in Stream.fromIterable(["not", "int"])) i, null};
+//                      ^^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:225:22: Error: Unexpected token 'for'.
+//   var map40 = {await for (int i in Stream.fromIterable(["not", "int"])) "bar": i, "baz": null};
+//                      ^^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:226:17: Error: The keyword 'await' isn't allowed for a normal 'for' statement.
+// Try removing the keyword, or use a for-each statement.
+//   var list50 = [await for (;;) 42];
+//                 ^^^^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:226:23: Error: Unexpected token 'for'.
+//   var list50 = [await for (;;) 42];
+//                       ^^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:227:16: Error: The keyword 'await' isn't allowed for a normal 'for' statement.
+// Try removing the keyword, or use a for-each statement.
+//   var set50 = {await for (;;) 42, null};
+//                ^^^^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:227:22: Error: Unexpected token 'for'.
+//   var set50 = {await for (;;) 42, null};
+//                      ^^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:228:16: Error: The keyword 'await' isn't allowed for a normal 'for' statement.
+// Try removing the keyword, or use a for-each statement.
+//   var map50 = {await for (;;) "bar": 42, "baz": null};
+//                ^^^^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:228:22: Error: Unexpected token 'for'.
+//   var map50 = {await for (;;) "bar": 42, "baz": null};
+//                      ^^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:229:17: Error: Unexpected token 'for'.
+//   var list60 = [for (; "not bool";) 42];
+//                 ^^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:230:16: Error: Unexpected token 'for'.
+//   var set60 = {for (; "not bool";) 42, null};
+//                ^^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:231:16: Error: Unexpected token 'for'.
+//   var map60 = {for (; "not bool";) "bar": 42, "baz": null};
+//                ^^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:235:26: Error: The asynchronous for-in can only be used in functions marked with 'async' or 'async*'.
+// Try marking the function body with either 'async' or 'async*', or removing the 'await' before the for loop.
+//   <int>[await for (int i in stream) i];
+//                          ^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:235:15: Error: Unexpected token 'for'.
+//   <int>[await for (int i in stream) i];
+//               ^^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:236:26: Error: The asynchronous for-in can only be used in functions marked with 'async' or 'async*'.
+// Try marking the function body with either 'async' or 'async*', or removing the 'await' before the for loop.
+//   <int>{await for (int i in stream) i};
+//                          ^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:236:15: Error: Unexpected token 'for'.
+//   <int>{await for (int i in stream) i};
+//               ^^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:237:34: Error: The asynchronous for-in can only be used in functions marked with 'async' or 'async*'.
+// Try marking the function body with either 'async' or 'async*', or removing the 'await' before the for loop.
+//   <String, int>{await for (int i in stream) "bar": i};
+//                                  ^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:237:23: Error: Unexpected token 'for'.
+//   <String, int>{await for (int i in stream) "bar": i};
+//                       ^^^
+//
+import self as self;
+import "dart:core" as core;
+import "dart:async" as asy;
+
+static method oracle<T extends core::Object = dynamic>([self::oracle::T t = null]) → dynamic
+  return true;
+static method testIfElement(dynamic dynVar, core::List<core::int> listInt, core::List<core::double> listDouble, core::Map<core::String, core::int> mapToInt, core::Map<core::String, core::double> mapToDouble) → dynamic {
+  dynamic list10 = <dynamic>[];
+  dynamic set10 = <dynamic>{null};
+  dynamic map10 = <dynamic, dynamic>{"baz": null};
+  dynamic list11 = <dynamic>[];
+  dynamic set11 = <dynamic>{null};
+  dynamic map11 = <dynamic, dynamic>{"baz": null};
+  dynamic list12 = <dynamic>[];
+  dynamic set12 = <dynamic>{null};
+  dynamic map12 = <dynamic, dynamic>{"baz": null};
+  dynamic list20 = <dynamic>[];
+  dynamic set20 = <dynamic>{null};
+  dynamic map20 = <dynamic, dynamic>{"baz": null};
+  dynamic list21 = <dynamic>[];
+  dynamic set21 = <dynamic>{null};
+  dynamic map21 = <dynamic, dynamic>{"baz": null};
+  dynamic list22 = <dynamic>[];
+  dynamic set22 = <dynamic>{null};
+  dynamic map22 = <dynamic, dynamic>{"baz": null};
+  dynamic list30 = <dynamic>[];
+  dynamic set30 = <dynamic>{null};
+  dynamic map30 = <dynamic, dynamic>{"baz": null};
+  dynamic list31 = <dynamic>[];
+  dynamic set31 = <dynamic>{null};
+  dynamic map31 = <dynamic, dynamic>{"baz": null};
+  dynamic list33 = <dynamic>[];
+  dynamic set33 = <dynamic>{null};
+  dynamic map33 = <dynamic, dynamic>{"baz": null};
+  core::List<core::List<core::int>> list40 = <dynamic>[];
+  core::Set<core::List<core::int>> set40 = <dynamic>{null};
+  core::Map<core::String, core::List<core::int>> map40 = <dynamic, dynamic>{"baz": null};
+  core::List<core::List<core::int>> list41 = <dynamic>[];
+  core::Set<core::List<core::int>> set41 = <dynamic>{null};
+  core::List<core::List<core::int>> list42 = <dynamic>[];
+  core::Set<core::List<core::int>> set42 = <dynamic>{null};
+  core::Map<core::String, core::List<core::int>> map42 = <dynamic, dynamic>{"baz": null};
+  core::List<core::int> list50 = <dynamic>[];
+  core::Set<core::int> set50 = <dynamic>{null};
+  core::Map<core::String, core::int> map50 = <dynamic, dynamic>{"baz": null};
+  core::List<core::int> list51 = <dynamic>[];
+  core::Set<core::int> set51 = <dynamic>{null};
+  core::List<core::int> list52 = <dynamic>[];
+  core::Set<core::int> set52 = <dynamic>{null};
+  core::Map<core::String, core::int> map52 = <dynamic, dynamic>{"baz": null};
+  core::List<core::List<core::int>> list60 = <dynamic>[];
+  core::Set<core::List<core::int>> set60 = <dynamic>{null};
+  core::Map<core::String, core::List<core::int>> map60 = <dynamic, dynamic>{"baz": null};
+  core::List<core::List<core::int>> list61 = <dynamic>[];
+  core::Set<core::List<core::int>> set61 = <dynamic>{null};
+  core::Map<core::String, core::List<core::int>> map61 = <dynamic, dynamic>{"baz": null};
+  core::List<core::List<core::int>> list70 = <dynamic>[];
+  core::Set<core::List<core::int>> set70 = <dynamic>{null};
+  core::List<core::List<core::int>> list71 = <dynamic>[];
+  core::Set<core::List<core::int>> set71 = <dynamic>{null};
+  dynamic list80 = <dynamic>[];
+  dynamic set80 = <dynamic>{null};
+  dynamic map80 = <dynamic, dynamic>{"baz": null};
+  dynamic list81 = <dynamic>[];
+  dynamic set81 = <dynamic>{null};
+  dynamic map81 = <dynamic, dynamic>{"baz": null};
+  dynamic list82 = <dynamic>[];
+  dynamic set82 = <dynamic>{null};
+  dynamic map82 = <dynamic>{null};
+  dynamic list83 = <dynamic>[];
+  dynamic set83 = <dynamic>{null};
+  dynamic map83 = <dynamic, dynamic>{"baz": null};
+  core::List<core::int> list90 = <dynamic>[];
+  core::Set<core::int> set90 = <dynamic>{null};
+  core::Map<core::String, core::int> map90 = <dynamic, dynamic>{"baz": null};
+  core::List<core::int> list91 = <dynamic>[];
+  core::Set<core::int> set91 = <dynamic>{null};
+  core::Map<core::String, core::int> map91 = <dynamic, dynamic>{"baz": null};
+}
+static method testIfElementErrors(core::Map<core::int, core::int> map) → dynamic {
+  <core::int>[];
+  <core::int>{null};
+  <core::String, core::int>{"baz": null};
+  <core::int>[];
+  <core::int>{null};
+  <core::String, core::int>{"baz": null};
+  <core::int>[];
+  <core::int>{null};
+  <core::String, core::int>{"baz": null};
+  <core::String>[];
+  <core::String>{null};
+  <core::String, core::String>{"baz": null};
+  <core::int>[];
+  <core::int>{null};
+  <core::String, core::int>{"baz": null};
+  <core::int>[];
+  <core::int>{null};
+  <core::String, core::int>{"baz": null};
+}
+static method testForElement(dynamic dynVar, core::List<core::int> listInt, core::List<core::double> listDouble, core::int index, core::Map<core::String, core::int> mapStringInt, core::Map<core::String, core::double> mapStringDouble) → dynamic {
+  dynamic list10 = <dynamic>[];
+  dynamic set10 = <dynamic>{null};
+  dynamic map10 = <dynamic, dynamic>{"baz": null};
+  dynamic list11 = <dynamic>[];
+  dynamic set11 = <dynamic>{null};
+  dynamic map11 = <dynamic, dynamic>{"baz": null};
+  dynamic list12 = <dynamic>[];
+  dynamic set12 = <dynamic>{null};
+  dynamic map12 = <dynamic, dynamic>{"baz": null};
+  dynamic list20 = <dynamic>[];
+  dynamic set20 = <dynamic>{null};
+  dynamic map20 = <dynamic, dynamic>{"baz": null};
+  dynamic list21 = <dynamic>[];
+  dynamic set21 = <dynamic>{null};
+  dynamic map21 = <dynamic, dynamic>{"baz": null};
+  dynamic list22 = <dynamic>[];
+  dynamic set22 = <dynamic>{null};
+  dynamic map22 = <dynamic, dynamic>{"baz": null};
+  dynamic list30 = <dynamic>[];
+  dynamic set30 = <dynamic>{null};
+  dynamic map30 = <dynamic, dynamic>{"baz": null};
+  dynamic list31 = <dynamic>[];
+  dynamic set31 = <dynamic>{null};
+  dynamic map31 = <dynamic, dynamic>{"baz": null};
+  dynamic list33 = <dynamic>[];
+  dynamic set33 = <dynamic>{null};
+  dynamic map33 = <dynamic, dynamic>{"baz": null};
+  core::List<core::List<core::int>> list40 = <dynamic>[];
+  core::Set<core::List<core::int>> set40 = <dynamic>{null};
+  core::Map<core::String, core::List<core::int>> map40 = <dynamic, dynamic>{"baz": null};
+  core::List<core::List<core::int>> list41 = <dynamic>[];
+  core::Set<core::List<core::int>> set41 = <dynamic>{null};
+  core::List<core::List<core::int>> list42 = <dynamic>[];
+  core::Set<core::List<core::int>> set42 = <dynamic>{null};
+  core::Map<core::String, core::List<core::int>> map42 = <dynamic, dynamic>{"baz": null};
+  core::List<core::int> list50 = <dynamic>[];
+  core::Set<core::int> set50 = <dynamic>{null};
+  core::Map<core::String, core::int> map50 = <dynamic, dynamic>{"baz": null};
+  core::List<core::int> list51 = <dynamic>[];
+  core::Set<core::int> set51 = <dynamic>{null};
+  core::List<core::int> list52 = <dynamic>[];
+  core::Set<core::int> set52 = <dynamic>{null};
+  core::List<core::List<core::int>> list60 = <dynamic>[];
+  core::Set<core::List<core::int>> set60 = <dynamic>{null};
+  core::Map<core::String, core::List<core::int>> map60 = <dynamic, dynamic>{"baz": null};
+  core::List<core::List<core::int>> list61 = <dynamic>[];
+  core::Set<core::List<core::int>> set61 = <dynamic>{null};
+  core::Map<core::String, core::List<core::int>> map61 = <dynamic, dynamic>{"baz": null};
+  core::List<core::List<core::int>> list70 = <dynamic>[];
+  core::Set<core::List<core::int>> set70 = <dynamic>{null};
+  core::Map<core::String, core::List<core::int>> map70 = <dynamic, dynamic>{"baz": null};
+  core::List<core::List<core::int>> list71 = <dynamic>[];
+  core::Set<core::List<core::int>> set71 = <dynamic>{null};
+  core::Map<core::String, core::List<core::int>> map71 = <dynamic, dynamic>{"baz": null};
+  dynamic list80 = <dynamic>[];
+  dynamic set80 = <dynamic>{null};
+  dynamic map80 = <dynamic, dynamic>{"baz": null};
+  dynamic list81 = <dynamic>[];
+  dynamic set81 = <dynamic>{null};
+  dynamic map81 = <dynamic, dynamic>{"baz": null};
+  dynamic list82 = <dynamic>[];
+  dynamic set82 = <dynamic>{null};
+  dynamic map82 = <dynamic, dynamic>{"baz": null};
+  dynamic list83 = <dynamic>[];
+  dynamic set83 = <dynamic>{null};
+  dynamic map83 = <dynamic, dynamic>{"baz": null};
+  core::List<core::int> list90 = <dynamic>[];
+  core::Set<core::int> set90 = <dynamic>{null};
+  core::Map<core::String, core::int> map90 = <dynamic, dynamic>{"baz": null};
+  core::List<core::int> list91 = <dynamic>[];
+  core::Set<core::int> set91 = <dynamic>{null};
+  core::Map<core::String, core::int> map91 = <dynamic, dynamic>{"baz": null};
+  core::List<core::int> list100 = <core::int>[];
+  core::Set<core::int> set100 = <core::int>{};
+  core::Map<core::String, core::int> map100 = <core::String, core::int>{};
+  dynamic list110 = <dynamic>[];
+  dynamic set110 = <dynamic>{null};
+  dynamic map110 = <dynamic, dynamic>{"baz": null};
+  core::List<core::int> list120 = <dynamic>[];
+  core::Set<core::int> set120 = <dynamic>{null};
+  core::Map<core::String, core::int> map120 = <dynamic, dynamic>{"baz": null};
+}
+static method testForElementErrors(core::Map<core::int, core::int> map, core::List<core::int> list) → dynamic /* originally async */ {
+  final asy::_AsyncAwaitCompleter<dynamic> :async_completer = new asy::_AsyncAwaitCompleter::•<dynamic>();
+  asy::FutureOr<dynamic> :return_value;
+  dynamic :async_stack_trace;
+  dynamic :async_op_then;
+  dynamic :async_op_error;
+  dynamic :await_jump_var = 0;
+  dynamic :await_ctx_var;
+  function :async_op([dynamic :result, dynamic :exception, dynamic :stack_trace]) → dynamic yielding 
+    try {
+      #L1:
+      {
+        <core::int>[];
+        <core::int>{null};
+        <core::int, core::int>{"baz": null};
+        <core::int>[];
+        <core::int>{null};
+        <core::int, core::int>{"baz": null};
+        <core::int>[];
+        <core::int>{null};
+        <core::int, core::int>{42: null};
+        <core::String>[];
+        <core::String>{null};
+        <core::String, core::String>{"baz": null};
+        <core::int>[];
+        <core::int>{null};
+        <core::String, core::int>{"baz": null};
+        <core::int>[];
+        <core::int>{null};
+        <core::String, core::int>{"baz": null};
+        final dynamic i = 0;
+        <core::int>[];
+        <core::int>{null};
+        <core::String, core::int>{"baz": null};
+        dynamic list10 = <dynamic>[];
+        dynamic set10 = <dynamic>{null};
+        dynamic map10 = <dynamic, dynamic>{"baz": null};
+        dynamic list20 = <dynamic>[];
+        dynamic set20 = <dynamic>{null};
+        dynamic map20 = <dynamic, dynamic>{"baz": null};
+        dynamic list30 = <dynamic>[];
+        dynamic set30 = <dynamic>{null};
+        dynamic map30 = <dynamic, dynamic>{"baz": null};
+        dynamic list40 = <dynamic>[];
+        dynamic set40 = <dynamic>{null};
+        dynamic map40 = <dynamic, dynamic>{"baz": null};
+        dynamic list50 = <dynamic>[];
+        dynamic set50 = <dynamic>{null};
+        dynamic map50 = <dynamic, dynamic>{"baz": null};
+        dynamic list60 = <dynamic>[];
+        dynamic set60 = <dynamic>{null};
+        dynamic map60 = <dynamic, dynamic>{"baz": null};
+      }
+      asy::_completeOnAsyncReturn(:async_completer, :return_value);
+      return;
+    }
+    on dynamic catch(dynamic :exception, dynamic :stack_trace) {
+      :async_completer.{asy::Completer::completeError}(:exception, :stack_trace);
+    }
+  :async_stack_trace = asy::_asyncStackTraceHelper(:async_op);
+  :async_op_then = asy::_asyncThenWrapperHelper(:async_op);
+  :async_op_error = asy::_asyncErrorWrapperHelper(:async_op);
+  :async_completer.start(:async_op);
+  return :async_completer.{asy::Completer::future};
+}
+static method testForElementErrorsNotAsync(asy::Stream<core::int> stream) → dynamic {
+  <core::int>[];
+  <core::int>{};
+  <core::String, core::int>{};
+}
+static method main() → dynamic {}
diff --git a/pkg/front_end/testcases/control_flow_collection_inference.dart.outline.expect b/pkg/front_end/testcases/control_flow_collection_inference.dart.outline.expect
new file mode 100644
index 0000000..ff425da
--- /dev/null
+++ b/pkg/front_end/testcases/control_flow_collection_inference.dart.outline.expect
@@ -0,0 +1,19 @@
+library;
+import self as self;
+import "dart:core" as core;
+import "dart:async" as asy;
+
+static method oracle<T extends core::Object = dynamic>([self::oracle::T t]) → dynamic
+  ;
+static method testIfElement(dynamic dynVar, core::List<core::int> listInt, core::List<core::double> listDouble, core::Map<core::String, core::int> mapToInt, core::Map<core::String, core::double> mapToDouble) → dynamic
+  ;
+static method testIfElementErrors(core::Map<core::int, core::int> map) → dynamic
+  ;
+static method testForElement(dynamic dynVar, core::List<core::int> listInt, core::List<core::double> listDouble, core::int index, core::Map<core::String, core::int> mapStringInt, core::Map<core::String, core::double> mapStringDouble) → dynamic
+  ;
+static method testForElementErrors(core::Map<core::int, core::int> map, core::List<core::int> list) → dynamic
+  ;
+static method testForElementErrorsNotAsync(asy::Stream<core::int> stream) → dynamic
+  ;
+static method main() → dynamic
+  ;
diff --git a/pkg/front_end/testcases/control_flow_collection_inference.dart.strong.expect b/pkg/front_end/testcases/control_flow_collection_inference.dart.strong.expect
new file mode 100644
index 0000000..5d1a4bb
--- /dev/null
+++ b/pkg/front_end/testcases/control_flow_collection_inference.dart.strong.expect
@@ -0,0 +1,1984 @@
+library;
+//
+// Problems in library:
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:39:34: Error: Both Iterable and Map spread elements encountered in ambiguous literal.
+//   Map<String, List<int>> map40 = {if (oracle("foo")) ...{"bar", []}, "baz": null};
+//                                  ^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:71:38: Error: Unexpected type 'Map<String, int>' of a spread.  Expected 'dynamic' or an Iterable.
+//  - 'Map' is from 'dart:core'.
+//   var map82 = {if (oracle("foo")) ...mapToInt else ...dynVar, null};
+//                                      ^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:84:28: Error: A value of type 'String' can't be assigned to a variable of type 'int'.
+// Try changing the type of the left hand side, or casting the right hand side to 'int'.
+//   <int>[if (oracle("foo")) "bar"];
+//                            ^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:85:28: Error: A value of type 'String' can't be assigned to a variable of type 'int'.
+// Try changing the type of the left hand side, or casting the right hand side to 'int'.
+//   <int>{if (oracle("foo")) "bar", null};
+//                            ^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:86:43: Error: A value of type 'String' can't be assigned to a variable of type 'int'.
+// Try changing the type of the left hand side, or casting the right hand side to 'int'.
+//   <String, int>{if (oracle("foo")) "bar": "bar", "baz": null};
+//                                           ^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:86:41: Error: A value of type 'String' can't be assigned to a variable of type 'int'.
+// Try changing the type of the left hand side, or casting the right hand side to 'int'.
+//   <String, int>{if (oracle("foo")) "bar": "bar", "baz": null};
+//                                         ^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:87:32: Error: A value of type 'String' can't be assigned to a variable of type 'int'.
+// Try changing the type of the left hand side, or casting the right hand side to 'int'.
+//   <int>[if (oracle("foo")) ...["bar"]];
+//                                ^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:88:32: Error: A value of type 'String' can't be assigned to a variable of type 'int'.
+// Try changing the type of the left hand side, or casting the right hand side to 'int'.
+//   <int>{if (oracle("foo")) ...["bar"], null};
+//                                ^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:89:47: Error: A value of type 'String' can't be assigned to a variable of type 'int'.
+// Try changing the type of the left hand side, or casting the right hand side to 'int'.
+//   <String, int>{if (oracle("foo")) ...{"bar": "bar"}, "baz": null};
+//                                               ^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:90:31: Error: Unexpected type 'Map<int, int>' of a spread.  Expected 'dynamic' or an Iterable.
+//  - 'Map' is from 'dart:core'.
+//   <int>[if (oracle("foo")) ...map];
+//                               ^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:91:31: Error: Unexpected type 'Map<int, int>' of a spread.  Expected 'dynamic' or an Iterable.
+//  - 'Map' is from 'dart:core'.
+//   <int>{if (oracle("foo")) ...map, null};
+//                               ^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:92:39: Error: Unexpected type 'List<String>' of a map spread entry.  Expected 'dynamic' or a Map.
+//  - 'List' is from 'dart:core'.
+//   <String, int>{if (oracle("foo")) ...["bar"], "baz": null};
+//                                       ^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:93:12: Error: A value of type 'num' can't be assigned to a variable of type 'String'.
+// Try changing the type of the left hand side, or casting the right hand side to 'String'.
+//   <String>[if (oracle("foo")) 42 else 3.14];
+//            ^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:94:12: Error: A value of type 'num' can't be assigned to a variable of type 'String'.
+// Try changing the type of the left hand side, or casting the right hand side to 'String'.
+//   <String>{if (oracle("foo")) 42 else 3.14, null};
+//            ^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:95:46: Error: A value of type 'int' can't be assigned to a variable of type 'String'.
+// Try changing the type of the left hand side, or casting the right hand side to 'String'.
+//   <String, String>{if (oracle("foo")) "bar": 42 else "baz": 3.14, "baz": null};
+//                                              ^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:95:61: Error: A value of type 'double' can't be assigned to a variable of type 'String'.
+// Try changing the type of the left hand side, or casting the right hand side to 'String'.
+//   <String, String>{if (oracle("foo")) "bar": 42 else "baz": 3.14, "baz": null};
+//                                                             ^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:95:20: Error: A value of type 'num' can't be assigned to a variable of type 'String'.
+// Try changing the type of the left hand side, or casting the right hand side to 'String'.
+//   <String, String>{if (oracle("foo")) "bar": 42 else "baz": 3.14, "baz": null};
+//                    ^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:96:31: Error: Unexpected type 'Map<int, int>' of a spread.  Expected 'dynamic' or an Iterable.
+//  - 'Map' is from 'dart:core'.
+//   <int>[if (oracle("foo")) ...map else 42];
+//                               ^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:97:31: Error: Unexpected type 'Map<int, int>' of a spread.  Expected 'dynamic' or an Iterable.
+//  - 'Map' is from 'dart:core'.
+//   <int>{if (oracle("foo")) ...map else 42, null};
+//                               ^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:98:39: Error: Unexpected type 'List<int>' of a map spread entry.  Expected 'dynamic' or a Map.
+//  - 'List' is from 'dart:core'.
+//   <String, int>{if (oracle("foo")) ...[42] else "bar": 42, "baz": null};
+//                                       ^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:99:39: Error: Unexpected type 'Map<int, int>' of a spread.  Expected 'dynamic' or an Iterable.
+//  - 'Map' is from 'dart:core'.
+//   <int>[if (oracle("foo")) 42 else ...map];
+//                                       ^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:100:31: Error: Unexpected type 'Map<int, int>' of a spread.  Expected 'dynamic' or an Iterable.
+//  - 'Map' is from 'dart:core'.
+//   <int>{if (oracle("foo")) ...map else 42, null};
+//                               ^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:101:54: Error: Unexpected type 'List<int>' of a map spread entry.  Expected 'dynamic' or a Map.
+//  - 'List' is from 'dart:core'.
+//   <String, int>{if (oracle("foo")) "bar": 42 else ...[42], "baz": null};
+//                                                      ^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:210:14: Error: Setter not found: 'i'.
+//   <int>[for (i in <int>[1]) i];
+//              ^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:211:14: Error: Setter not found: 'i'.
+//   <int>{for (i in <int>[1]) i, null};
+//              ^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:212:21: Error: Setter not found: 'i'.
+// 	<String, int>{for (i in <int>[1]) "bar": i, "baz": null};
+// 	                   ^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:226:17: Error: The keyword 'await' isn't allowed for a normal 'for' statement.
+// Try removing the keyword, or use a for-each statement.
+//   var list50 = [await for (;;) 42];
+//                 ^^^^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:227:16: Error: The keyword 'await' isn't allowed for a normal 'for' statement.
+// Try removing the keyword, or use a for-each statement.
+//   var set50 = {await for (;;) 42, null};
+//                ^^^^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:228:16: Error: The keyword 'await' isn't allowed for a normal 'for' statement.
+// Try removing the keyword, or use a for-each statement.
+//   var map50 = {await for (;;) "bar": 42, "baz": null};
+//                ^^^^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:190:45: Error: A value of type 'String' can't be assigned to a variable of type 'int'.
+// Try changing the type of the left hand side, or casting the right hand side to 'int'.
+//   <int>[for (int i = 0; oracle("foo"); i++) "bar"];
+//                                             ^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:191:45: Error: A value of type 'String' can't be assigned to a variable of type 'int'.
+// Try changing the type of the left hand side, or casting the right hand side to 'int'.
+//   <int>{for (int i = 0; oracle("foo"); i++) "bar", null};
+//                                             ^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:192:50: Error: A value of type 'String' can't be assigned to a variable of type 'int'.
+// Try changing the type of the left hand side, or casting the right hand side to 'int'.
+//   <int, int>{for (int i = 0; oracle("foo"); i++) "bar": "bar", "baz": null};
+//                                                  ^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:192:57: Error: A value of type 'String' can't be assigned to a variable of type 'int'.
+// Try changing the type of the left hand side, or casting the right hand side to 'int'.
+//   <int, int>{for (int i = 0; oracle("foo"); i++) "bar": "bar", "baz": null};
+//                                                         ^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:192:64: Error: A value of type 'String' can't be assigned to a variable of type 'int'.
+// Try changing the type of the left hand side, or casting the right hand side to 'int'.
+//   <int, int>{for (int i = 0; oracle("foo"); i++) "bar": "bar", "baz": null};
+//                                                                ^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:192:14: Error: A value of type 'String' can't be assigned to a variable of type 'int'.
+// Try changing the type of the left hand side, or casting the right hand side to 'int'.
+//   <int, int>{for (int i = 0; oracle("foo"); i++) "bar": "bar", "baz": null};
+//              ^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:193:49: Error: A value of type 'String' can't be assigned to a variable of type 'int'.
+// Try changing the type of the left hand side, or casting the right hand side to 'int'.
+//   <int>[for (int i = 0; oracle("foo"); i++) ...["bar"]];
+//                                                 ^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:194:49: Error: A value of type 'String' can't be assigned to a variable of type 'int'.
+// Try changing the type of the left hand side, or casting the right hand side to 'int'.
+//   <int>{for (int i = 0; oracle("foo"); i++) ...["bar"], null};
+//                                                 ^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:195:54: Error: A value of type 'String' can't be assigned to a variable of type 'int'.
+// Try changing the type of the left hand side, or casting the right hand side to 'int'.
+//   <int, int>{for (int i = 0; oracle("foo"); i++) ...{"bar": "bar"}, "baz": null};
+//                                                      ^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:195:61: Error: A value of type 'String' can't be assigned to a variable of type 'int'.
+// Try changing the type of the left hand side, or casting the right hand side to 'int'.
+//   <int, int>{for (int i = 0; oracle("foo"); i++) ...{"bar": "bar"}, "baz": null};
+//                                                             ^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:195:69: Error: A value of type 'String' can't be assigned to a variable of type 'int'.
+// Try changing the type of the left hand side, or casting the right hand side to 'int'.
+//   <int, int>{for (int i = 0; oracle("foo"); i++) ...{"bar": "bar"}, "baz": null};
+//                                                                     ^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:196:48: Error: Unexpected type 'Map<int, int>' of a spread.  Expected 'dynamic' or an Iterable.
+//  - 'Map' is from 'dart:core'.
+//   <int>[for (int i = 0; oracle("foo"); i++) ...map];
+//                                                ^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:197:48: Error: Unexpected type 'Map<int, int>' of a spread.  Expected 'dynamic' or an Iterable.
+//  - 'Map' is from 'dart:core'.
+//   <int>{for (int i = 0; oracle("foo"); i++) ...map, null};
+//                                                ^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:198:53: Error: Unexpected type 'List<int>' of a map spread entry.  Expected 'dynamic' or a Map.
+//  - 'List' is from 'dart:core'.
+//   <int, int>{for (int i = 0; oracle("foo"); i++) ...list, 42: null};
+//                                                     ^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:199:48: Error: A value of type 'num' can't be assigned to a variable of type 'String'.
+// Try changing the type of the left hand side, or casting the right hand side to 'String'.
+//   <String>[for (int i = 0; oracle("foo"); i++) if (oracle()) 42 else 3.14];
+//                                                ^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:200:48: Error: A value of type 'num' can't be assigned to a variable of type 'String'.
+// Try changing the type of the left hand side, or casting the right hand side to 'String'.
+//   <String>{for (int i = 0; oracle("foo"); i++) if (oracle()) 42 else 3.14, null};
+//                                                ^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:201:77: Error: A value of type 'int' can't be assigned to a variable of type 'String'.
+// Try changing the type of the left hand side, or casting the right hand side to 'String'.
+//   <String, String>{for (int i = 0; oracle("foo"); i++) if (oracle()) "bar": 42 else "bar": 3.14, "baz": null};
+//                                                                             ^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:201:92: Error: A value of type 'double' can't be assigned to a variable of type 'String'.
+// Try changing the type of the left hand side, or casting the right hand side to 'String'.
+//   <String, String>{for (int i = 0; oracle("foo"); i++) if (oracle()) "bar": 42 else "bar": 3.14, "baz": null};
+//                                                                                            ^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:201:20: Error: A value of type 'num' can't be assigned to a variable of type 'String'.
+// Try changing the type of the left hand side, or casting the right hand side to 'String'.
+//   <String, String>{for (int i = 0; oracle("foo"); i++) if (oracle()) "bar": 42 else "bar": 3.14, "baz": null};
+//                    ^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:202:62: Error: Unexpected type 'Map<int, int>' of a spread.  Expected 'dynamic' or an Iterable.
+//  - 'Map' is from 'dart:core'.
+//   <int>[for (int i = 0; oracle("foo"); i++) if (oracle()) ...map else 42];
+//                                                              ^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:203:62: Error: Unexpected type 'Map<int, int>' of a spread.  Expected 'dynamic' or an Iterable.
+//  - 'Map' is from 'dart:core'.
+//   <int>{for (int i = 0; oracle("foo"); i++) if (oracle()) ...map else 42, null};
+//                                                              ^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:204:70: Error: Unexpected type 'List<int>' of a map spread entry.  Expected 'dynamic' or a Map.
+//  - 'List' is from 'dart:core'.
+//   <String, int>{for (int i = 0; oracle("foo"); i++) if (oracle()) ...list else "bar": 42, "baz": null};
+//                                                                      ^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:205:70: Error: Unexpected type 'Map<int, int>' of a spread.  Expected 'dynamic' or an Iterable.
+//  - 'Map' is from 'dart:core'.
+//   <int>[for (int i = 0; oracle("foo"); i++) if (oracle()) 42 else ...map];
+//                                                                      ^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:206:70: Error: Unexpected type 'Map<int, int>' of a spread.  Expected 'dynamic' or an Iterable.
+//  - 'Map' is from 'dart:core'.
+//   <int>{for (int i = 0; oracle("foo"); i++) if (oracle()) 42 else ...map, null};
+//                                                                      ^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:207:85: Error: Unexpected type 'List<int>' of a map spread entry.  Expected 'dynamic' or a Map.
+//  - 'List' is from 'dart:core'.
+//   <String, int>{for (int i = 0; oracle("foo"); i++) if (oracle()) "bar": 42 else ...list, "baz": null};
+//                                                                                     ^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:214:31: Error: The type 'String' used in the 'for' loop must implement 'Iterable<dynamic>'.
+//  - 'Iterable' is from 'dart:core'.
+//   var list10 = [for (var i in "not iterable") i];
+//                               ^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:215:30: Error: The type 'String' used in the 'for' loop must implement 'Iterable<dynamic>'.
+//  - 'Iterable' is from 'dart:core'.
+//   var set10 = {for (var i in "not iterable") i, null};
+//                              ^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:216:30: Error: The type 'String' used in the 'for' loop must implement 'Iterable<dynamic>'.
+//  - 'Iterable' is from 'dart:core'.
+//   var map10 = {for (var i in "not iterable") "bar": i, "baz": null};
+//                              ^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:217:32: Error: A value of type 'String' can't be assigned to a variable of type 'int'.
+// Try changing the type of the left hand side, or casting the right hand side to 'int'.
+//   var list20 = [for (int i in ["not", "int"]) i];
+//                                ^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:217:39: Error: A value of type 'String' can't be assigned to a variable of type 'int'.
+// Try changing the type of the left hand side, or casting the right hand side to 'int'.
+//   var list20 = [for (int i in ["not", "int"]) i];
+//                                       ^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:218:31: Error: A value of type 'String' can't be assigned to a variable of type 'int'.
+// Try changing the type of the left hand side, or casting the right hand side to 'int'.
+//   var set20 = {for (int i in ["not", "int"]) i, null};
+//                               ^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:218:38: Error: A value of type 'String' can't be assigned to a variable of type 'int'.
+// Try changing the type of the left hand side, or casting the right hand side to 'int'.
+//   var set20 = {for (int i in ["not", "int"]) i, null};
+//                                      ^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:219:31: Error: A value of type 'String' can't be assigned to a variable of type 'int'.
+// Try changing the type of the left hand side, or casting the right hand side to 'int'.
+//   var map20 = {for (int i in ["not", "int"]) "bar": i, "baz": null};
+//                               ^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:219:38: Error: A value of type 'String' can't be assigned to a variable of type 'int'.
+// Try changing the type of the left hand side, or casting the right hand side to 'int'.
+//   var map20 = {for (int i in ["not", "int"]) "bar": i, "baz": null};
+//                                      ^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:220:37: Error: The type 'String' used in the 'for' loop must implement 'Stream<dynamic>'.
+//  - 'Stream' is from 'dart:async'.
+//   var list30 = [await for (var i in "not stream") i];
+//                                     ^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:221:36: Error: The type 'String' used in the 'for' loop must implement 'Stream<dynamic>'.
+//  - 'Stream' is from 'dart:async'.
+//   var set30 = {await for (var i in "not stream") i, null};
+//                                    ^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:222:36: Error: The type 'String' used in the 'for' loop must implement 'Stream<dynamic>'.
+//  - 'Stream' is from 'dart:async'.
+//   var map30 = {await for (var i in "not stream") "bar": i, "baz": null};
+//                                    ^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:223:58: Error: A value of type 'String' can't be assigned to a variable of type 'int'.
+// Try changing the type of the left hand side, or casting the right hand side to 'int'.
+//   var list40 = [await for (int i in Stream.fromIterable(["not", "int"])) i];
+//                                                          ^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:223:65: Error: A value of type 'String' can't be assigned to a variable of type 'int'.
+// Try changing the type of the left hand side, or casting the right hand side to 'int'.
+//   var list40 = [await for (int i in Stream.fromIterable(["not", "int"])) i];
+//                                                                 ^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:224:57: Error: A value of type 'String' can't be assigned to a variable of type 'int'.
+// Try changing the type of the left hand side, or casting the right hand side to 'int'.
+//   var set40 = {await for (int i in Stream.fromIterable(["not", "int"])) i, null};
+//                                                         ^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:224:64: Error: A value of type 'String' can't be assigned to a variable of type 'int'.
+// Try changing the type of the left hand side, or casting the right hand side to 'int'.
+//   var set40 = {await for (int i in Stream.fromIterable(["not", "int"])) i, null};
+//                                                                ^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:225:57: Error: A value of type 'String' can't be assigned to a variable of type 'int'.
+// Try changing the type of the left hand side, or casting the right hand side to 'int'.
+//   var map40 = {await for (int i in Stream.fromIterable(["not", "int"])) "bar": i, "baz": null};
+//                                                         ^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:225:64: Error: A value of type 'String' can't be assigned to a variable of type 'int'.
+// Try changing the type of the left hand side, or casting the right hand side to 'int'.
+//   var map40 = {await for (int i in Stream.fromIterable(["not", "int"])) "bar": i, "baz": null};
+//                                                                ^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:229:24: Error: A value of type 'String' can't be assigned to a variable of type 'bool'.
+// Try changing the type of the left hand side, or casting the right hand side to 'bool'.
+//   var list60 = [for (; "not bool";) 42];
+//                        ^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:230:23: Error: A value of type 'String' can't be assigned to a variable of type 'bool'.
+// Try changing the type of the left hand side, or casting the right hand side to 'bool'.
+//   var set60 = {for (; "not bool";) 42, null};
+//                       ^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:231:23: Error: A value of type 'String' can't be assigned to a variable of type 'bool'.
+// Try changing the type of the left hand side, or casting the right hand side to 'bool'.
+//   var map60 = {for (; "not bool";) "bar": 42, "baz": null};
+//                       ^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:235:26: Error: The asynchronous for-in can only be used in functions marked with 'async' or 'async*'.
+// Try marking the function body with either 'async' or 'async*', or removing the 'await' before the for loop.
+//   <int>[await for (int i in stream) i];
+//                          ^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:236:26: Error: The asynchronous for-in can only be used in functions marked with 'async' or 'async*'.
+// Try marking the function body with either 'async' or 'async*', or removing the 'await' before the for loop.
+//   <int>{await for (int i in stream) i};
+//                          ^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:237:34: Error: The asynchronous for-in can only be used in functions marked with 'async' or 'async*'.
+// Try marking the function body with either 'async' or 'async*', or removing the 'await' before the for loop.
+//   <String, int>{await for (int i in stream) "bar": i};
+//                                  ^^
+//
+import self as self;
+import "dart:core" as core;
+import "dart:collection" as col;
+import "dart:async" as asy;
+
+static method oracle<T extends core::Object = dynamic>([self::oracle::T t = null]) → dynamic
+  return true;
+static method testIfElement(dynamic dynVar, core::List<core::int> listInt, core::List<core::double> listDouble, core::Map<core::String, core::int> mapToInt, core::Map<core::String, core::double> mapToDouble) → dynamic {
+  core::List<core::int> list10 = block {
+    final core::List<core::int> #t1 = <core::int>[];
+    if(self::oracle<core::String>("foo"))
+      #t1.{core::List::add}(42);
+  } =>#t1;
+  core::Set<core::int> set10 = block {
+    final core::Set<core::int> #t2 = col::LinkedHashSet::•<core::int>();
+    if(self::oracle<core::String>("foo"))
+      #t2.{core::Set::add}(42);
+    #t2.{core::Set::add}(null);
+  } =>#t2;
+  core::Map<core::String, core::int> map10 = block {
+    final core::Map<core::String, core::int> #t3 = <core::String, core::int>{};
+    if(self::oracle<core::String>("foo"))
+      #t3.{core::Map::[]=}("bar", 42);
+    #t3.{core::Map::[]=}("baz", null);
+  } =>#t3;
+  core::List<dynamic> list11 = block {
+    final core::List<dynamic> #t4 = <dynamic>[];
+    if(self::oracle<core::String>("foo"))
+      #t4.{core::List::add}(dynVar);
+  } =>#t4;
+  core::Set<dynamic> set11 = block {
+    final core::Set<dynamic> #t5 = col::LinkedHashSet::•<dynamic>();
+    if(self::oracle<core::String>("foo"))
+      #t5.{core::Set::add}(dynVar);
+    #t5.{core::Set::add}(null);
+  } =>#t5;
+  core::Map<core::String, dynamic> map11 = block {
+    final core::Map<core::String, dynamic> #t6 = <core::String, dynamic>{};
+    if(self::oracle<core::String>("foo"))
+      #t6.{core::Map::[]=}("bar", dynVar);
+    #t6.{core::Map::[]=}("baz", null);
+  } =>#t6;
+  core::List<core::List<core::int>> list12 = block {
+    final core::List<core::List<core::int>> #t7 = <core::List<core::int>>[];
+    if(self::oracle<core::String>("foo"))
+      #t7.{core::List::add}(<core::int>[42]);
+  } =>#t7;
+  core::Set<core::List<core::int>> set12 = block {
+    final core::Set<core::List<core::int>> #t8 = col::LinkedHashSet::•<core::List<core::int>>();
+    if(self::oracle<core::String>("foo"))
+      #t8.{core::Set::add}(<core::int>[42]);
+    #t8.{core::Set::add}(null);
+  } =>#t8;
+  core::Map<core::String, core::List<core::int>> map12 = block {
+    final core::Map<core::String, core::List<core::int>> #t9 = <core::String, core::List<core::int>>{};
+    if(self::oracle<core::String>("foo"))
+      #t9.{core::Map::[]=}("bar", <core::int>[42]);
+    #t9.{core::Map::[]=}("baz", null);
+  } =>#t9;
+  core::List<core::int> list20 = block {
+    final core::List<core::int> #t10 = <core::int>[];
+    if(self::oracle<core::String>("foo"))
+      for (final core::int #t11 in <core::int>[42])
+        #t10.{core::List::add}(#t11);
+  } =>#t10;
+  core::Set<core::int> set20 = block {
+    final core::Set<core::int> #t12 = col::LinkedHashSet::•<core::int>();
+    if(self::oracle<core::String>("foo"))
+      for (final core::int #t13 in <core::int>[42])
+        #t12.{core::Set::add}(#t13);
+    #t12.{core::Set::add}(null);
+  } =>#t12;
+  core::Map<core::String, core::int> map20 = block {
+    final core::Map<core::String, core::int> #t14 = <core::String, core::int>{};
+    if(self::oracle<core::String>("foo"))
+      for (final core::MapEntry<core::String, core::int> #t15 in <core::String, core::int>{"bar": 42}.{core::Map::entries})
+        #t14.{core::Map::[]=}(#t15.{core::MapEntry::key}, #t15.{core::MapEntry::value});
+    #t14.{core::Map::[]=}("baz", null);
+  } =>#t14;
+  core::List<dynamic> list21 = block {
+    final core::List<dynamic> #t16 = <dynamic>[];
+    if(self::oracle<core::String>("foo"))
+      for (final dynamic #t17 in <dynamic>[dynVar])
+        #t16.{core::List::add}(#t17);
+  } =>#t16;
+  core::Set<dynamic> set21 = block {
+    final core::Set<dynamic> #t18 = col::LinkedHashSet::•<dynamic>();
+    if(self::oracle<core::String>("foo"))
+      for (final dynamic #t19 in <dynamic>[dynVar])
+        #t18.{core::Set::add}(#t19);
+    #t18.{core::Set::add}(null);
+  } =>#t18;
+  core::Map<core::String, dynamic> map21 = block {
+    final core::Map<core::String, dynamic> #t20 = <core::String, dynamic>{};
+    if(self::oracle<core::String>("foo"))
+      for (final core::MapEntry<core::String, dynamic> #t21 in <core::String, dynamic>{"bar": dynVar}.{core::Map::entries})
+        #t20.{core::Map::[]=}(#t21.{core::MapEntry::key}, #t21.{core::MapEntry::value});
+    #t20.{core::Map::[]=}("baz", null);
+  } =>#t20;
+  core::List<core::List<core::int>> list22 = block {
+    final core::List<core::List<core::int>> #t22 = <core::List<core::int>>[];
+    if(self::oracle<core::String>("foo"))
+      for (final core::List<core::int> #t23 in <core::List<core::int>>[<core::int>[42]])
+        #t22.{core::List::add}(#t23);
+  } =>#t22;
+  core::Set<core::List<core::int>> set22 = block {
+    final core::Set<core::List<core::int>> #t24 = col::LinkedHashSet::•<core::List<core::int>>();
+    if(self::oracle<core::String>("foo"))
+      for (final core::List<core::int> #t25 in <core::List<core::int>>[<core::int>[42]])
+        #t24.{core::Set::add}(#t25);
+    #t24.{core::Set::add}(null);
+  } =>#t24;
+  core::Map<core::String, core::List<core::int>> map22 = block {
+    final core::Map<core::String, core::List<core::int>> #t26 = <core::String, core::List<core::int>>{};
+    if(self::oracle<core::String>("foo"))
+      for (final core::MapEntry<core::String, core::List<core::int>> #t27 in <core::String, core::List<core::int>>{"bar": <core::int>[42]}.{core::Map::entries})
+        #t26.{core::Map::[]=}(#t27.{core::MapEntry::key}, #t27.{core::MapEntry::value});
+    #t26.{core::Map::[]=}("baz", null);
+  } =>#t26;
+  core::List<core::int> list30 = block {
+    final core::List<core::int> #t28 = <core::int>[];
+    if(self::oracle<core::String>("foo"))
+      if(self::oracle<dynamic>())
+        for (final core::int #t29 in <core::int>[42])
+          #t28.{core::List::add}(#t29);
+  } =>#t28;
+  core::Set<core::int> set30 = block {
+    final core::Set<core::int> #t30 = col::LinkedHashSet::•<core::int>();
+    if(self::oracle<core::String>("foo"))
+      if(self::oracle<dynamic>())
+        for (final core::int #t31 in <core::int>[42])
+          #t30.{core::Set::add}(#t31);
+    #t30.{core::Set::add}(null);
+  } =>#t30;
+  core::Map<core::String, core::int> map30 = block {
+    final core::Map<core::String, core::int> #t32 = <core::String, core::int>{};
+    if(self::oracle<core::String>("foo"))
+      if(self::oracle<dynamic>())
+        for (final core::MapEntry<core::String, core::int> #t33 in <core::String, core::int>{"bar": 42}.{core::Map::entries})
+          #t32.{core::Map::[]=}(#t33.{core::MapEntry::key}, #t33.{core::MapEntry::value});
+    #t32.{core::Map::[]=}("baz", null);
+  } =>#t32;
+  core::List<dynamic> list31 = block {
+    final core::List<dynamic> #t34 = <dynamic>[];
+    if(self::oracle<core::String>("foo"))
+      if(self::oracle<dynamic>())
+        for (final dynamic #t35 in <dynamic>[dynVar])
+          #t34.{core::List::add}(#t35);
+  } =>#t34;
+  core::Set<dynamic> set31 = block {
+    final core::Set<dynamic> #t36 = col::LinkedHashSet::•<dynamic>();
+    if(self::oracle<core::String>("foo"))
+      if(self::oracle<dynamic>())
+        for (final dynamic #t37 in <dynamic>[dynVar])
+          #t36.{core::Set::add}(#t37);
+    #t36.{core::Set::add}(null);
+  } =>#t36;
+  core::Map<core::String, dynamic> map31 = block {
+    final core::Map<core::String, dynamic> #t38 = <core::String, dynamic>{};
+    if(self::oracle<core::String>("foo"))
+      if(self::oracle<dynamic>())
+        for (final core::MapEntry<core::String, dynamic> #t39 in <core::String, dynamic>{"bar": dynVar}.{core::Map::entries})
+          #t38.{core::Map::[]=}(#t39.{core::MapEntry::key}, #t39.{core::MapEntry::value});
+    #t38.{core::Map::[]=}("baz", null);
+  } =>#t38;
+  core::List<core::List<core::int>> list33 = block {
+    final core::List<core::List<core::int>> #t40 = <core::List<core::int>>[];
+    if(self::oracle<core::String>("foo"))
+      if(self::oracle<dynamic>())
+        for (final core::List<core::int> #t41 in <core::List<core::int>>[<core::int>[42]])
+          #t40.{core::List::add}(#t41);
+  } =>#t40;
+  core::Set<core::List<core::int>> set33 = block {
+    final core::Set<core::List<core::int>> #t42 = col::LinkedHashSet::•<core::List<core::int>>();
+    if(self::oracle<core::String>("foo"))
+      if(self::oracle<dynamic>())
+        for (final core::List<core::int> #t43 in <core::List<core::int>>[<core::int>[42]])
+          #t42.{core::Set::add}(#t43);
+    #t42.{core::Set::add}(null);
+  } =>#t42;
+  core::Map<core::String, core::List<core::int>> map33 = block {
+    final core::Map<core::String, core::List<core::int>> #t44 = <core::String, core::List<core::int>>{};
+    if(self::oracle<core::String>("foo"))
+      if(self::oracle<dynamic>())
+        for (final core::MapEntry<core::String, core::List<core::int>> #t45 in <core::String, core::List<core::int>>{"bar": <core::int>[42]}.{core::Map::entries})
+          #t44.{core::Map::[]=}(#t45.{core::MapEntry::key}, #t45.{core::MapEntry::value});
+    #t44.{core::Map::[]=}("baz", null);
+  } =>#t44;
+  core::List<core::List<core::int>> list40 = block {
+    final core::List<core::List<core::int>> #t46 = <core::List<core::int>>[];
+    if(self::oracle<core::String>("foo"))
+      for (final core::List<core::int> #t47 in <core::List<core::int>>[<core::int>[]])
+        #t46.{core::List::add}(#t47);
+  } =>#t46;
+  core::Set<core::List<core::int>> set40 = block {
+    final core::Set<core::List<core::int>> #t48 = col::LinkedHashSet::•<core::List<core::int>>();
+    if(self::oracle<core::String>("foo"))
+      for (final core::List<core::int> #t49 in <core::List<core::int>>[<core::int>[]])
+        #t48.{core::Set::add}(#t49);
+    #t48.{core::Set::add}(null);
+  } =>#t48;
+  core::Map<core::String, core::List<core::int>> map40 = invalid-expression "pkg/front_end/testcases/control_flow_collection_inference.dart:39:34: Error: Both Iterable and Map spread elements encountered in ambiguous literal.
+  Map<String, List<int>> map40 = {if (oracle(\"foo\")) ...{\"bar\", []}, \"baz\": null};
+                                 ^";
+  core::List<core::List<core::int>> list41 = block {
+    final core::List<core::List<core::int>> #t50 = <core::List<core::int>>[];
+    if(self::oracle<core::String>("foo"))
+      for (final core::List<core::int> #t51 in let final core::Set<core::List<core::int>> #t52 = col::LinkedHashSet::•<core::List<core::int>>() in let final dynamic #t53 = #t52.{core::Set::add}(<core::int>[]) in #t52)
+        #t50.{core::List::add}(#t51);
+  } =>#t50;
+  core::Set<core::List<core::int>> set41 = block {
+    final core::Set<core::List<core::int>> #t54 = col::LinkedHashSet::•<core::List<core::int>>();
+    if(self::oracle<core::String>("foo"))
+      for (final core::List<core::int> #t55 in let final core::Set<core::List<core::int>> #t56 = col::LinkedHashSet::•<core::List<core::int>>() in let final dynamic #t57 = #t56.{core::Set::add}(<core::int>[]) in #t56)
+        #t54.{core::Set::add}(#t55);
+    #t54.{core::Set::add}(null);
+  } =>#t54;
+  core::List<core::List<core::int>> list42 = block {
+    final core::List<core::List<core::int>> #t58 = <core::List<core::int>>[];
+    if(self::oracle<core::String>("foo"))
+      if(self::oracle<dynamic>())
+        for (final core::List<core::int> #t59 in <core::List<core::int>>[<core::int>[]])
+          #t58.{core::List::add}(#t59);
+  } =>#t58;
+  core::Set<core::List<core::int>> set42 = block {
+    final core::Set<core::List<core::int>> #t60 = col::LinkedHashSet::•<core::List<core::int>>();
+    if(self::oracle<core::String>("foo"))
+      if(self::oracle<dynamic>())
+        for (final core::List<core::int> #t61 in <core::List<core::int>>[<core::int>[]])
+          #t60.{core::Set::add}(#t61);
+    #t60.{core::Set::add}(null);
+  } =>#t60;
+  core::Map<core::String, core::List<core::int>> map42 = block {
+    final core::Map<core::String, core::List<core::int>> #t62 = <core::String, core::List<core::int>>{};
+    if(self::oracle<core::String>("foo"))
+      if(self::oracle<dynamic>())
+        for (final core::MapEntry<core::String, core::List<core::int>> #t63 in <core::String, core::List<core::int>>{"bar": <core::int>[]}.{core::Map::entries})
+          #t62.{core::Map::[]=}(#t63.{core::MapEntry::key}, #t63.{core::MapEntry::value});
+    #t62.{core::Map::[]=}("baz", null);
+  } =>#t62;
+  core::List<core::int> list50 = block {
+    final core::List<core::int> #t64 = <core::int>[];
+    if(self::oracle<core::String>("foo"))
+      for (final core::int #t65 in <core::int>[])
+        #t64.{core::List::add}(#t65);
+  } =>#t64;
+  core::Set<core::int> set50 = block {
+    final core::Set<core::int> #t66 = col::LinkedHashSet::•<core::int>();
+    if(self::oracle<core::String>("foo"))
+      for (final core::int #t67 in <core::int>[])
+        #t66.{core::Set::add}(#t67);
+    #t66.{core::Set::add}(null);
+  } =>#t66;
+  core::Map<core::String, core::int> map50 = block {
+    final core::Map<core::String, core::int> #t68 = <core::String, core::int>{};
+    if(self::oracle<core::String>("foo"))
+      for (final core::MapEntry<core::String, core::int> #t69 in <core::String, core::int>{}.{core::Map::entries})
+        #t68.{core::Map::[]=}(#t69.{core::MapEntry::key}, #t69.{core::MapEntry::value});
+    #t68.{core::Map::[]=}("baz", null);
+  } =>#t68;
+  core::List<core::int> list51 = block {
+    final core::List<core::int> #t70 = <core::int>[];
+    if(self::oracle<core::String>("foo"))
+      for (final core::int #t71 in let final core::Set<core::int> #t72 = col::LinkedHashSet::•<core::int>() in #t72)
+        #t70.{core::List::add}(#t71);
+  } =>#t70;
+  core::Set<core::int> set51 = block {
+    final core::Set<core::int> #t73 = col::LinkedHashSet::•<core::int>();
+    if(self::oracle<core::String>("foo"))
+      for (final core::int #t74 in let final core::Set<core::int> #t75 = col::LinkedHashSet::•<core::int>() in #t75)
+        #t73.{core::Set::add}(#t74);
+    #t73.{core::Set::add}(null);
+  } =>#t73;
+  core::List<core::int> list52 = block {
+    final core::List<core::int> #t76 = <core::int>[];
+    if(self::oracle<core::String>("foo"))
+      if(self::oracle<dynamic>())
+        for (final core::int #t77 in <core::int>[])
+          #t76.{core::List::add}(#t77);
+  } =>#t76;
+  core::Set<core::int> set52 = block {
+    final core::Set<core::int> #t78 = col::LinkedHashSet::•<core::int>();
+    if(self::oracle<core::String>("foo"))
+      if(self::oracle<dynamic>())
+        for (final core::int #t79 in <core::int>[])
+          #t78.{core::Set::add}(#t79);
+    #t78.{core::Set::add}(null);
+  } =>#t78;
+  core::Map<core::String, core::int> map52 = block {
+    final core::Map<core::String, core::int> #t80 = <core::String, core::int>{};
+    if(self::oracle<core::String>("foo"))
+      if(self::oracle<dynamic>())
+        for (final core::MapEntry<core::String, core::int> #t81 in <core::String, core::int>{}.{core::Map::entries})
+          #t80.{core::Map::[]=}(#t81.{core::MapEntry::key}, #t81.{core::MapEntry::value});
+    #t80.{core::Map::[]=}("baz", null);
+  } =>#t80;
+  core::List<core::List<core::int>> list60 = block {
+    final core::List<core::List<core::int>> #t82 = <core::List<core::int>>[];
+    if(self::oracle<core::String>("foo"))
+      for (final core::List<core::int> #t83 in <core::List<core::int>>[<core::int>[]])
+        #t82.{core::List::add}(#t83);
+  } =>#t82;
+  core::Set<core::List<core::int>> set60 = block {
+    final core::Set<core::List<core::int>> #t84 = col::LinkedHashSet::•<core::List<core::int>>();
+    if(self::oracle<core::String>("foo"))
+      for (final core::List<core::int> #t85 in <core::List<core::int>>[<core::int>[]])
+        #t84.{core::Set::add}(#t85);
+    #t84.{core::Set::add}(null);
+  } =>#t84;
+  core::Map<core::String, core::List<core::int>> map60 = block {
+    final core::Map<core::String, core::List<core::int>> #t86 = <core::String, core::List<core::int>>{};
+    if(self::oracle<core::String>("foo"))
+      for (final core::MapEntry<core::String, core::List<core::int>> #t87 in <core::String, core::List<core::int>>{"bar": <core::int>[]}.{core::Map::entries})
+        #t86.{core::Map::[]=}(#t87.{core::MapEntry::key}, #t87.{core::MapEntry::value});
+    #t86.{core::Map::[]=}("baz", null);
+  } =>#t86;
+  core::List<core::List<core::int>> list61 = block {
+    final core::List<core::List<core::int>> #t88 = <core::List<core::int>>[];
+    if(self::oracle<core::String>("foo"))
+      if(self::oracle<dynamic>())
+        for (final core::List<core::int> #t89 in <core::List<core::int>>[<core::int>[]])
+          #t88.{core::List::add}(#t89);
+  } =>#t88;
+  core::Set<core::List<core::int>> set61 = block {
+    final core::Set<core::List<core::int>> #t90 = col::LinkedHashSet::•<core::List<core::int>>();
+    if(self::oracle<core::String>("foo"))
+      if(self::oracle<dynamic>())
+        for (final core::List<core::int> #t91 in <core::List<core::int>>[<core::int>[]])
+          #t90.{core::Set::add}(#t91);
+    #t90.{core::Set::add}(null);
+  } =>#t90;
+  core::Map<core::String, core::List<core::int>> map61 = block {
+    final core::Map<core::String, core::List<core::int>> #t92 = <core::String, core::List<core::int>>{};
+    if(self::oracle<core::String>("foo"))
+      if(self::oracle<dynamic>())
+        for (final core::MapEntry<core::String, core::List<core::int>> #t93 in <core::String, core::List<core::int>>{"bar": <core::int>[]}.{core::Map::entries})
+          #t92.{core::Map::[]=}(#t93.{core::MapEntry::key}, #t93.{core::MapEntry::value});
+    #t92.{core::Map::[]=}("baz", null);
+  } =>#t92;
+  core::List<core::List<core::int>> list70 = block {
+    final core::List<core::List<core::int>> #t94 = <core::List<core::int>>[];
+    if(self::oracle<core::String>("foo"))
+      #t94.{core::List::add}(<core::int>[]);
+  } =>#t94;
+  core::Set<core::List<core::int>> set70 = block {
+    final core::Set<core::List<core::int>> #t95 = col::LinkedHashSet::•<core::List<core::int>>();
+    if(self::oracle<core::String>("foo"))
+      #t95.{core::Set::add}(<core::int>[]);
+    #t95.{core::Set::add}(null);
+  } =>#t95;
+  core::List<core::List<core::int>> list71 = block {
+    final core::List<core::List<core::int>> #t96 = <core::List<core::int>>[];
+    if(self::oracle<core::String>("foo"))
+      if(self::oracle<dynamic>())
+        #t96.{core::List::add}(<core::int>[]);
+  } =>#t96;
+  core::Set<core::List<core::int>> set71 = block {
+    final core::Set<core::List<core::int>> #t97 = col::LinkedHashSet::•<core::List<core::int>>();
+    if(self::oracle<core::String>("foo"))
+      if(self::oracle<dynamic>())
+        #t97.{core::Set::add}(<core::int>[]);
+    #t97.{core::Set::add}(null);
+  } =>#t97;
+  core::List<core::num> list80 = block {
+    final core::List<core::num> #t98 = <core::num>[];
+    if(self::oracle<core::String>("foo"))
+      #t98.{core::List::add}(42);
+    else
+      #t98.{core::List::add}(3.14);
+  } =>#t98;
+  core::Set<core::num> set80 = block {
+    final core::Set<core::num> #t99 = col::LinkedHashSet::•<core::num>();
+    if(self::oracle<core::String>("foo"))
+      #t99.{core::Set::add}(42);
+    else
+      #t99.{core::Set::add}(3.14);
+    #t99.{core::Set::add}(null);
+  } =>#t99;
+  core::Map<core::String, core::num> map80 = block {
+    final core::Map<core::String, core::num> #t100 = <core::String, core::num>{};
+    if(self::oracle<core::String>("foo"))
+      #t100.{core::Map::[]=}("bar", 42);
+    else
+      #t100.{core::Map::[]=}("bar", 3.14);
+    #t100.{core::Map::[]=}("baz", null);
+  } =>#t100;
+  core::List<core::num> list81 = block {
+    final core::List<core::num> #t101 = <core::num>[];
+    if(self::oracle<core::String>("foo"))
+      for (final core::num #t102 in listInt)
+        #t101.{core::List::add}(#t102);
+    else
+      for (final core::num #t103 in listDouble)
+        #t101.{core::List::add}(#t103);
+  } =>#t101;
+  core::Set<core::num> set81 = block {
+    final core::Set<core::num> #t104 = col::LinkedHashSet::•<core::num>();
+    if(self::oracle<core::String>("foo"))
+      for (final core::num #t105 in listInt)
+        #t104.{core::Set::add}(#t105);
+    else
+      for (final core::num #t106 in listDouble)
+        #t104.{core::Set::add}(#t106);
+    #t104.{core::Set::add}(null);
+  } =>#t104;
+  core::Map<core::String, core::num> map81 = block {
+    final core::Map<core::String, core::num> #t107 = <core::String, core::num>{};
+    if(self::oracle<core::String>("foo"))
+      for (final core::MapEntry<core::String, core::num> #t108 in mapToInt.{core::Map::entries})
+        #t107.{core::Map::[]=}(#t108.{core::MapEntry::key}, #t108.{core::MapEntry::value});
+    else
+      for (final core::MapEntry<core::String, core::num> #t109 in mapToDouble.{core::Map::entries})
+        #t107.{core::Map::[]=}(#t109.{core::MapEntry::key}, #t109.{core::MapEntry::value});
+    #t107.{core::Map::[]=}("baz", null);
+  } =>#t107;
+  core::List<dynamic> list82 = block {
+    final core::List<dynamic> #t110 = <dynamic>[];
+    if(self::oracle<core::String>("foo"))
+      for (final dynamic #t111 in listInt)
+        #t110.{core::List::add}(#t111);
+    else
+      for (final dynamic #t112 in dynVar as{TypeError} core::Iterable<dynamic>)
+        #t110.{core::List::add}(#t112);
+  } =>#t110;
+  core::Set<dynamic> set82 = block {
+    final core::Set<dynamic> #t113 = col::LinkedHashSet::•<dynamic>();
+    if(self::oracle<core::String>("foo"))
+      for (final dynamic #t114 in listInt)
+        #t113.{core::Set::add}(#t114);
+    else
+      for (final dynamic #t115 in dynVar as{TypeError} core::Iterable<dynamic>)
+        #t113.{core::Set::add}(#t115);
+    #t113.{core::Set::add}(null);
+  } =>#t113;
+  core::Set<dynamic> map82 = block {
+    final core::Set<dynamic> #t116 = col::LinkedHashSet::•<dynamic>();
+    if(self::oracle<core::String>("foo"))
+      #t116.{core::Set::add}(invalid-expression "pkg/front_end/testcases/control_flow_collection_inference.dart:71:38: Error: Unexpected type 'Map<String, int>' of a spread.  Expected 'dynamic' or an Iterable.
+ - 'Map' is from 'dart:core'.
+  var map82 = {if (oracle(\"foo\")) ...mapToInt else ...dynVar, null};
+                                     ^");
+    else
+      for (final dynamic #t117 in dynVar as{TypeError} core::Iterable<dynamic>)
+        #t116.{core::Set::add}(#t117);
+    #t116.{core::Set::add}(null);
+  } =>#t116;
+  core::List<core::num> list83 = block {
+    final core::List<core::num> #t118 = <core::num>[];
+    if(self::oracle<core::String>("foo"))
+      #t118.{core::List::add}(42);
+    else
+      for (final core::num #t119 in listDouble)
+        #t118.{core::List::add}(#t119);
+  } =>#t118;
+  core::Set<core::num> set83 = block {
+    final core::Set<core::num> #t120 = col::LinkedHashSet::•<core::num>();
+    if(self::oracle<core::String>("foo"))
+      for (final core::num #t121 in listInt)
+        #t120.{core::Set::add}(#t121);
+    else
+      #t120.{core::Set::add}(3.14);
+    #t120.{core::Set::add}(null);
+  } =>#t120;
+  core::Map<core::String, core::num> map83 = block {
+    final core::Map<core::String, core::num> #t122 = <core::String, core::num>{};
+    if(self::oracle<core::String>("foo"))
+      for (final core::MapEntry<core::String, core::num> #t123 in mapToInt.{core::Map::entries})
+        #t122.{core::Map::[]=}(#t123.{core::MapEntry::key}, #t123.{core::MapEntry::value});
+    else
+      #t122.{core::Map::[]=}("bar", 3.14);
+    #t122.{core::Map::[]=}("baz", null);
+  } =>#t122;
+  core::List<core::int> list90 = block {
+    final core::List<core::int> #t124 = <core::int>[];
+    if(self::oracle<core::String>("foo"))
+      #t124.{core::List::add}(dynVar as{TypeError} core::int);
+  } =>#t124;
+  core::Set<core::int> set90 = block {
+    final core::Set<core::int> #t125 = col::LinkedHashSet::•<core::int>();
+    if(self::oracle<core::String>("foo"))
+      #t125.{core::Set::add}(dynVar as{TypeError} core::int);
+    #t125.{core::Set::add}(null);
+  } =>#t125;
+  core::Map<core::String, core::int> map90 = block {
+    final core::Map<core::String, core::int> #t126 = <core::String, core::int>{};
+    if(self::oracle<core::String>("foo"))
+      #t126.{core::Map::[]=}("bar", dynVar as{TypeError} core::int);
+    #t126.{core::Map::[]=}("baz", null);
+  } =>#t126;
+  core::List<core::int> list91 = block {
+    final core::List<core::int> #t127 = <core::int>[];
+    if(self::oracle<core::String>("foo"))
+      for (final dynamic #t128 in dynVar as{TypeError} core::Iterable<dynamic>) {
+        final core::int #t129 = #t128 as{TypeError} core::int;
+        #t127.{core::List::add}(#t129);
+      }
+  } =>#t127;
+  core::Set<core::int> set91 = block {
+    final core::Set<core::int> #t130 = col::LinkedHashSet::•<core::int>();
+    if(self::oracle<core::String>("foo"))
+      for (final dynamic #t131 in dynVar as{TypeError} core::Iterable<dynamic>) {
+        final core::int #t132 = #t131 as{TypeError} core::int;
+        #t130.{core::Set::add}(#t132);
+      }
+    #t130.{core::Set::add}(null);
+  } =>#t130;
+  core::Map<core::String, core::int> map91 = block {
+    final core::Map<core::String, core::int> #t133 = <core::String, core::int>{};
+    if(self::oracle<core::String>("foo"))
+      for (final core::MapEntry<dynamic, dynamic> #t134 in (dynVar as{TypeError} core::Map<dynamic, dynamic>).{core::Map::entries}) {
+        final core::String #t135 = #t134.{core::MapEntry::key} as{TypeError} core::String;
+        final core::int #t136 = #t134.{core::MapEntry::value} as{TypeError} core::int;
+        #t133.{core::Map::[]=}(#t135, #t136);
+      }
+    #t133.{core::Map::[]=}("baz", null);
+  } =>#t133;
+}
+static method testIfElementErrors(core::Map<core::int, core::int> map) → dynamic {
+  <core::int>[invalid-expression "pkg/front_end/testcases/control_flow_collection_inference.dart:84:28: Error: A value of type 'String' can't be assigned to a variable of type 'int'.
+Try changing the type of the left hand side, or casting the right hand side to 'int'.
+  <int>[if (oracle(\"foo\")) \"bar\"];
+                           ^"];
+  let final core::Set<core::int> #t137 = col::LinkedHashSet::•<core::int>() in let final dynamic #t138 = #t137.{core::Set::add}(invalid-expression "pkg/front_end/testcases/control_flow_collection_inference.dart:85:28: Error: A value of type 'String' can't be assigned to a variable of type 'int'.
+Try changing the type of the left hand side, or casting the right hand side to 'int'.
+  <int>{if (oracle(\"foo\")) \"bar\", null};
+                           ^") in let final dynamic #t139 = #t137.{core::Set::add}(null) in #t137;
+  <core::String, core::int>{null: invalid-expression "pkg/front_end/testcases/control_flow_collection_inference.dart:86:41: Error: A value of type 'String' can't be assigned to a variable of type 'int'.
+Try changing the type of the left hand side, or casting the right hand side to 'int'.
+  <String, int>{if (oracle(\"foo\")) \"bar\": \"bar\", \"baz\": null};
+                                        ^", "baz": null};
+  block {
+    final core::List<core::int> #t140 = <core::int>[];
+    if(self::oracle<core::String>("foo"))
+      for (final core::int #t141 in <core::int>[let final<BottomType> #t142 = invalid-expression "pkg/front_end/testcases/control_flow_collection_inference.dart:87:32: Error: A value of type 'String' can't be assigned to a variable of type 'int'.
+Try changing the type of the left hand side, or casting the right hand side to 'int'.
+  <int>[if (oracle(\"foo\")) ...[\"bar\"]];
+                               ^" in "bar" as{TypeError} core::int])
+        #t140.{core::List::add}(#t141);
+  } =>#t140;
+  block {
+    final core::Set<core::int> #t143 = col::LinkedHashSet::•<core::int>();
+    if(self::oracle<core::String>("foo"))
+      for (final core::int #t144 in <core::int>[let final<BottomType> #t145 = invalid-expression "pkg/front_end/testcases/control_flow_collection_inference.dart:88:32: Error: A value of type 'String' can't be assigned to a variable of type 'int'.
+Try changing the type of the left hand side, or casting the right hand side to 'int'.
+  <int>{if (oracle(\"foo\")) ...[\"bar\"], null};
+                               ^" in "bar" as{TypeError} core::int])
+        #t143.{core::Set::add}(#t144);
+    #t143.{core::Set::add}(null);
+  } =>#t143;
+  block {
+    final core::Map<core::String, core::int> #t146 = <core::String, core::int>{};
+    if(self::oracle<core::String>("foo"))
+      for (final core::MapEntry<core::String, core::int> #t147 in <core::String, core::int>{"bar": let final<BottomType> #t148 = invalid-expression "pkg/front_end/testcases/control_flow_collection_inference.dart:89:47: Error: A value of type 'String' can't be assigned to a variable of type 'int'.
+Try changing the type of the left hand side, or casting the right hand side to 'int'.
+  <String, int>{if (oracle(\"foo\")) ...{\"bar\": \"bar\"}, \"baz\": null};
+                                              ^" in "bar" as{TypeError} core::int}.{core::Map::entries})
+        #t146.{core::Map::[]=}(#t147.{core::MapEntry::key}, #t147.{core::MapEntry::value});
+    #t146.{core::Map::[]=}("baz", null);
+  } =>#t146;
+  block {
+    final core::List<core::int> #t149 = <core::int>[];
+    if(self::oracle<core::String>("foo"))
+      #t149.{core::List::add}(invalid-expression "pkg/front_end/testcases/control_flow_collection_inference.dart:90:31: Error: Unexpected type 'Map<int, int>' of a spread.  Expected 'dynamic' or an Iterable.
+ - 'Map' is from 'dart:core'.
+  <int>[if (oracle(\"foo\")) ...map];
+                              ^" as{TypeError} core::int);
+  } =>#t149;
+  block {
+    final core::Set<core::int> #t150 = col::LinkedHashSet::•<core::int>();
+    if(self::oracle<core::String>("foo"))
+      #t150.{core::Set::add}(invalid-expression "pkg/front_end/testcases/control_flow_collection_inference.dart:91:31: Error: Unexpected type 'Map<int, int>' of a spread.  Expected 'dynamic' or an Iterable.
+ - 'Map' is from 'dart:core'.
+  <int>{if (oracle(\"foo\")) ...map, null};
+                              ^" as{TypeError} core::int);
+    #t150.{core::Set::add}(null);
+  } =>#t150;
+  <core::String, core::int>{invalid-expression "pkg/front_end/testcases/control_flow_collection_inference.dart:92:39: Error: Unexpected type 'List<String>' of a map spread entry.  Expected 'dynamic' or a Map.
+ - 'List' is from 'dart:core'.
+  <String, int>{if (oracle(\"foo\")) ...[\"bar\"], \"baz\": null};
+                                      ^": null, invalid-expression "pkg/front_end/testcases/control_flow_collection_inference.dart:92:39: Error: Unexpected type 'List<String>' of a map spread entry.  Expected 'dynamic' or a Map.
+ - 'List' is from 'dart:core'.
+  <String, int>{if (oracle(\"foo\")) ...[\"bar\"], \"baz\": null};
+                                      ^": null};
+  <core::String>[invalid-expression "pkg/front_end/testcases/control_flow_collection_inference.dart:93:12: Error: A value of type 'num' can't be assigned to a variable of type 'String'.
+Try changing the type of the left hand side, or casting the right hand side to 'String'.
+  <String>[if (oracle(\"foo\")) 42 else 3.14];
+           ^"];
+  let final core::Set<core::String> #t151 = col::LinkedHashSet::•<core::String>() in let final dynamic #t152 = #t151.{core::Set::add}(invalid-expression "pkg/front_end/testcases/control_flow_collection_inference.dart:94:12: Error: A value of type 'num' can't be assigned to a variable of type 'String'.
+Try changing the type of the left hand side, or casting the right hand side to 'String'.
+  <String>{if (oracle(\"foo\")) 42 else 3.14, null};
+           ^") in let final dynamic #t153 = #t151.{core::Set::add}(null) in #t151;
+  <core::String, core::String>{null: invalid-expression "pkg/front_end/testcases/control_flow_collection_inference.dart:95:20: Error: A value of type 'num' can't be assigned to a variable of type 'String'.
+Try changing the type of the left hand side, or casting the right hand side to 'String'.
+  <String, String>{if (oracle(\"foo\")) \"bar\": 42 else \"baz\": 3.14, \"baz\": null};
+                   ^", "baz": null};
+  block {
+    final core::List<core::int> #t154 = <core::int>[];
+    if(self::oracle<core::String>("foo"))
+      #t154.{core::List::add}(invalid-expression "pkg/front_end/testcases/control_flow_collection_inference.dart:96:31: Error: Unexpected type 'Map<int, int>' of a spread.  Expected 'dynamic' or an Iterable.
+ - 'Map' is from 'dart:core'.
+  <int>[if (oracle(\"foo\")) ...map else 42];
+                              ^" as{TypeError} core::int);
+    else
+      #t154.{core::List::add}(42 as{TypeError} core::int);
+  } =>#t154;
+  block {
+    final core::Set<core::int> #t155 = col::LinkedHashSet::•<core::int>();
+    if(self::oracle<core::String>("foo"))
+      #t155.{core::Set::add}(invalid-expression "pkg/front_end/testcases/control_flow_collection_inference.dart:97:31: Error: Unexpected type 'Map<int, int>' of a spread.  Expected 'dynamic' or an Iterable.
+ - 'Map' is from 'dart:core'.
+  <int>{if (oracle(\"foo\")) ...map else 42, null};
+                              ^" as{TypeError} core::int);
+    else
+      #t155.{core::Set::add}(42 as{TypeError} core::int);
+    #t155.{core::Set::add}(null);
+  } =>#t155;
+  <core::String, core::int>{invalid-expression "pkg/front_end/testcases/control_flow_collection_inference.dart:98:39: Error: Unexpected type 'List<int>' of a map spread entry.  Expected 'dynamic' or a Map.
+ - 'List' is from 'dart:core'.
+  <String, int>{if (oracle(\"foo\")) ...[42] else \"bar\": 42, \"baz\": null};
+                                      ^": null, invalid-expression "pkg/front_end/testcases/control_flow_collection_inference.dart:98:39: Error: Unexpected type 'List<int>' of a map spread entry.  Expected 'dynamic' or a Map.
+ - 'List' is from 'dart:core'.
+  <String, int>{if (oracle(\"foo\")) ...[42] else \"bar\": 42, \"baz\": null};
+                                      ^": null};
+  block {
+    final core::List<core::int> #t156 = <core::int>[];
+    if(self::oracle<core::String>("foo"))
+      #t156.{core::List::add}(42 as{TypeError} core::int);
+    else
+      #t156.{core::List::add}(invalid-expression "pkg/front_end/testcases/control_flow_collection_inference.dart:99:39: Error: Unexpected type 'Map<int, int>' of a spread.  Expected 'dynamic' or an Iterable.
+ - 'Map' is from 'dart:core'.
+  <int>[if (oracle(\"foo\")) 42 else ...map];
+                                      ^" as{TypeError} core::int);
+  } =>#t156;
+  block {
+    final core::Set<core::int> #t157 = col::LinkedHashSet::•<core::int>();
+    if(self::oracle<core::String>("foo"))
+      #t157.{core::Set::add}(invalid-expression "pkg/front_end/testcases/control_flow_collection_inference.dart:100:31: Error: Unexpected type 'Map<int, int>' of a spread.  Expected 'dynamic' or an Iterable.
+ - 'Map' is from 'dart:core'.
+  <int>{if (oracle(\"foo\")) ...map else 42, null};
+                              ^" as{TypeError} core::int);
+    else
+      #t157.{core::Set::add}(42 as{TypeError} core::int);
+    #t157.{core::Set::add}(null);
+  } =>#t157;
+  <core::String, core::int>{invalid-expression "pkg/front_end/testcases/control_flow_collection_inference.dart:101:54: Error: Unexpected type 'List<int>' of a map spread entry.  Expected 'dynamic' or a Map.
+ - 'List' is from 'dart:core'.
+  <String, int>{if (oracle(\"foo\")) \"bar\": 42 else ...[42], \"baz\": null};
+                                                     ^": null, invalid-expression "pkg/front_end/testcases/control_flow_collection_inference.dart:101:54: Error: Unexpected type 'List<int>' of a map spread entry.  Expected 'dynamic' or a Map.
+ - 'List' is from 'dart:core'.
+  <String, int>{if (oracle(\"foo\")) \"bar\": 42 else ...[42], \"baz\": null};
+                                                     ^": null};
+}
+static method testForElement(dynamic dynVar, core::List<core::int> listInt, core::List<core::double> listDouble, core::int index, core::Map<core::String, core::int> mapStringInt, core::Map<core::String, core::double> mapStringDouble) → dynamic {
+  core::List<core::int> list10 = block {
+    final core::List<core::int> #t158 = <core::int>[];
+    for (core::int i = 0; self::oracle<core::String>("foo") as{TypeError} core::bool; i = i.{core::num::+}(1))
+      #t158.{core::List::add}(42);
+  } =>#t158;
+  core::Set<core::int> set10 = block {
+    final core::Set<core::int> #t159 = col::LinkedHashSet::•<core::int>();
+    for (core::int i = 0; self::oracle<core::String>("foo") as{TypeError} core::bool; i = i.{core::num::+}(1))
+      #t159.{core::Set::add}(42);
+    #t159.{core::Set::add}(null);
+  } =>#t159;
+  core::Map<core::String, core::int> map10 = block {
+    final core::Map<core::String, core::int> #t160 = <core::String, core::int>{};
+    for (core::int i = 0; self::oracle<core::String>("foo") as{TypeError} core::bool; i = i.{core::num::+}(1))
+      #t160.{core::Map::[]=}("bar", 42);
+    #t160.{core::Map::[]=}("baz", null);
+  } =>#t160;
+  core::List<dynamic> list11 = block {
+    final core::List<dynamic> #t161 = <dynamic>[];
+    for (core::int i = 0; self::oracle<core::String>("foo") as{TypeError} core::bool; i = i.{core::num::+}(1))
+      #t161.{core::List::add}(dynVar);
+  } =>#t161;
+  core::Set<dynamic> set11 = block {
+    final core::Set<dynamic> #t162 = col::LinkedHashSet::•<dynamic>();
+    for (core::int i = 0; self::oracle<core::String>("foo") as{TypeError} core::bool; i = i.{core::num::+}(1))
+      #t162.{core::Set::add}(dynVar);
+    #t162.{core::Set::add}(null);
+  } =>#t162;
+  core::Map<core::String, dynamic> map11 = block {
+    final core::Map<core::String, dynamic> #t163 = <core::String, dynamic>{};
+    for (core::int i = 0; self::oracle<core::String>("foo") as{TypeError} core::bool; i = i.{core::num::+}(1))
+      #t163.{core::Map::[]=}("bar", dynVar);
+    #t163.{core::Map::[]=}("baz", null);
+  } =>#t163;
+  core::List<core::List<core::int>> list12 = block {
+    final core::List<core::List<core::int>> #t164 = <core::List<core::int>>[];
+    for (core::int i = 0; self::oracle<core::String>("foo") as{TypeError} core::bool; i = i.{core::num::+}(1))
+      #t164.{core::List::add}(<core::int>[42]);
+  } =>#t164;
+  core::Set<core::List<core::int>> set12 = block {
+    final core::Set<core::List<core::int>> #t165 = col::LinkedHashSet::•<core::List<core::int>>();
+    for (core::int i = 0; self::oracle<core::String>("foo") as{TypeError} core::bool; i = i.{core::num::+}(1))
+      #t165.{core::Set::add}(<core::int>[42]);
+    #t165.{core::Set::add}(null);
+  } =>#t165;
+  core::Map<core::String, core::List<core::int>> map12 = block {
+    final core::Map<core::String, core::List<core::int>> #t166 = <core::String, core::List<core::int>>{};
+    for (core::int i = 0; self::oracle<core::String>("foo") as{TypeError} core::bool; i = i.{core::num::+}(1))
+      #t166.{core::Map::[]=}("bar", <core::int>[42]);
+    #t166.{core::Map::[]=}("baz", null);
+  } =>#t166;
+  core::List<core::int> list20 = block {
+    final core::List<core::int> #t167 = <core::int>[];
+    for (core::int i = 0; self::oracle<core::String>("foo") as{TypeError} core::bool; i = i.{core::num::+}(1))
+      for (final core::int #t168 in <core::int>[42])
+        #t167.{core::List::add}(#t168);
+  } =>#t167;
+  core::Set<core::int> set20 = block {
+    final core::Set<core::int> #t169 = col::LinkedHashSet::•<core::int>();
+    for (core::int i = 0; self::oracle<core::String>("foo") as{TypeError} core::bool; i = i.{core::num::+}(1))
+      for (final core::int #t170 in <core::int>[42])
+        #t169.{core::Set::add}(#t170);
+    #t169.{core::Set::add}(null);
+  } =>#t169;
+  core::Map<core::String, core::int> map20 = block {
+    final core::Map<core::String, core::int> #t171 = <core::String, core::int>{};
+    for (core::int i = 0; self::oracle<core::String>("foo") as{TypeError} core::bool; i = i.{core::num::+}(1))
+      for (final core::MapEntry<core::String, core::int> #t172 in <core::String, core::int>{"bar": 42}.{core::Map::entries})
+        #t171.{core::Map::[]=}(#t172.{core::MapEntry::key}, #t172.{core::MapEntry::value});
+    #t171.{core::Map::[]=}("baz", null);
+  } =>#t171;
+  core::List<dynamic> list21 = block {
+    final core::List<dynamic> #t173 = <dynamic>[];
+    for (core::int i = 0; self::oracle<core::String>("foo") as{TypeError} core::bool; i = i.{core::num::+}(1))
+      for (final dynamic #t174 in <dynamic>[dynVar])
+        #t173.{core::List::add}(#t174);
+  } =>#t173;
+  core::Set<dynamic> set21 = block {
+    final core::Set<dynamic> #t175 = col::LinkedHashSet::•<dynamic>();
+    for (core::int i = 0; self::oracle<core::String>("foo") as{TypeError} core::bool; i = i.{core::num::+}(1))
+      for (final dynamic #t176 in <dynamic>[dynVar])
+        #t175.{core::Set::add}(#t176);
+    #t175.{core::Set::add}(null);
+  } =>#t175;
+  core::Map<core::String, dynamic> map21 = block {
+    final core::Map<core::String, dynamic> #t177 = <core::String, dynamic>{};
+    for (core::int i = 0; self::oracle<core::String>("foo") as{TypeError} core::bool; i = i.{core::num::+}(1))
+      for (final core::MapEntry<core::String, dynamic> #t178 in <core::String, dynamic>{"bar": dynVar}.{core::Map::entries})
+        #t177.{core::Map::[]=}(#t178.{core::MapEntry::key}, #t178.{core::MapEntry::value});
+    #t177.{core::Map::[]=}("baz", null);
+  } =>#t177;
+  core::List<core::List<core::int>> list22 = block {
+    final core::List<core::List<core::int>> #t179 = <core::List<core::int>>[];
+    for (core::int i = 0; self::oracle<core::String>("foo") as{TypeError} core::bool; i = i.{core::num::+}(1))
+      for (final core::List<core::int> #t180 in <core::List<core::int>>[<core::int>[42]])
+        #t179.{core::List::add}(#t180);
+  } =>#t179;
+  core::Set<core::List<core::int>> set22 = block {
+    final core::Set<core::List<core::int>> #t181 = col::LinkedHashSet::•<core::List<core::int>>();
+    for (core::int i = 0; self::oracle<core::String>("foo") as{TypeError} core::bool; i = i.{core::num::+}(1))
+      for (final core::List<core::int> #t182 in <core::List<core::int>>[<core::int>[42]])
+        #t181.{core::Set::add}(#t182);
+    #t181.{core::Set::add}(null);
+  } =>#t181;
+  core::Map<core::String, core::List<core::int>> map22 = block {
+    final core::Map<core::String, core::List<core::int>> #t183 = <core::String, core::List<core::int>>{};
+    for (core::int i = 0; self::oracle<core::String>("foo") as{TypeError} core::bool; i = i.{core::num::+}(1))
+      for (final core::MapEntry<core::String, core::List<core::int>> #t184 in <core::String, core::List<core::int>>{"bar": <core::int>[42]}.{core::Map::entries})
+        #t183.{core::Map::[]=}(#t184.{core::MapEntry::key}, #t184.{core::MapEntry::value});
+    #t183.{core::Map::[]=}("baz", null);
+  } =>#t183;
+  core::List<core::int> list30 = block {
+    final core::List<core::int> #t185 = <core::int>[];
+    for (core::int i = 0; self::oracle<core::String>("foo") as{TypeError} core::bool; i = i.{core::num::+}(1))
+      if(self::oracle<dynamic>())
+        for (final core::int #t186 in <core::int>[42])
+          #t185.{core::List::add}(#t186);
+  } =>#t185;
+  core::Set<core::int> set30 = block {
+    final core::Set<core::int> #t187 = col::LinkedHashSet::•<core::int>();
+    for (core::int i = 0; self::oracle<core::String>("foo") as{TypeError} core::bool; i = i.{core::num::+}(1))
+      if(self::oracle<dynamic>())
+        for (final core::int #t188 in <core::int>[42])
+          #t187.{core::Set::add}(#t188);
+    #t187.{core::Set::add}(null);
+  } =>#t187;
+  core::Map<core::String, core::int> map30 = block {
+    final core::Map<core::String, core::int> #t189 = <core::String, core::int>{};
+    for (core::int i = 0; self::oracle<core::String>("foo") as{TypeError} core::bool; i = i.{core::num::+}(1))
+      if(self::oracle<dynamic>())
+        for (final core::MapEntry<core::String, core::int> #t190 in <core::String, core::int>{"bar": 42}.{core::Map::entries})
+          #t189.{core::Map::[]=}(#t190.{core::MapEntry::key}, #t190.{core::MapEntry::value});
+    #t189.{core::Map::[]=}("baz", null);
+  } =>#t189;
+  core::List<dynamic> list31 = block {
+    final core::List<dynamic> #t191 = <dynamic>[];
+    for (core::int i = 0; self::oracle<core::String>("foo") as{TypeError} core::bool; i = i.{core::num::+}(1))
+      if(self::oracle<dynamic>())
+        for (final dynamic #t192 in <dynamic>[dynVar])
+          #t191.{core::List::add}(#t192);
+  } =>#t191;
+  core::Set<dynamic> set31 = block {
+    final core::Set<dynamic> #t193 = col::LinkedHashSet::•<dynamic>();
+    for (core::int i = 0; self::oracle<core::String>("foo") as{TypeError} core::bool; i = i.{core::num::+}(1))
+      if(self::oracle<dynamic>())
+        for (final dynamic #t194 in <dynamic>[dynVar])
+          #t193.{core::Set::add}(#t194);
+    #t193.{core::Set::add}(null);
+  } =>#t193;
+  core::Map<core::String, dynamic> map31 = block {
+    final core::Map<core::String, dynamic> #t195 = <core::String, dynamic>{};
+    for (core::int i = 0; self::oracle<core::String>("foo") as{TypeError} core::bool; i = i.{core::num::+}(1))
+      if(self::oracle<dynamic>())
+        for (final core::MapEntry<core::String, dynamic> #t196 in <core::String, dynamic>{"bar": dynVar}.{core::Map::entries})
+          #t195.{core::Map::[]=}(#t196.{core::MapEntry::key}, #t196.{core::MapEntry::value});
+    #t195.{core::Map::[]=}("baz", null);
+  } =>#t195;
+  core::List<core::List<core::int>> list33 = block {
+    final core::List<core::List<core::int>> #t197 = <core::List<core::int>>[];
+    for (core::int i = 0; self::oracle<core::String>("foo") as{TypeError} core::bool; i = i.{core::num::+}(1))
+      if(self::oracle<dynamic>())
+        for (final core::List<core::int> #t198 in <core::List<core::int>>[<core::int>[42]])
+          #t197.{core::List::add}(#t198);
+  } =>#t197;
+  core::Set<core::List<core::int>> set33 = block {
+    final core::Set<core::List<core::int>> #t199 = col::LinkedHashSet::•<core::List<core::int>>();
+    for (core::int i = 0; self::oracle<core::String>("foo") as{TypeError} core::bool; i = i.{core::num::+}(1))
+      if(self::oracle<dynamic>())
+        for (final core::List<core::int> #t200 in <core::List<core::int>>[<core::int>[42]])
+          #t199.{core::Set::add}(#t200);
+    #t199.{core::Set::add}(null);
+  } =>#t199;
+  core::Map<core::String, core::List<core::int>> map33 = block {
+    final core::Map<core::String, core::List<core::int>> #t201 = <core::String, core::List<core::int>>{};
+    for (core::int i = 0; self::oracle<core::String>("foo") as{TypeError} core::bool; i = i.{core::num::+}(1))
+      if(self::oracle<dynamic>())
+        for (final core::MapEntry<core::String, core::List<core::int>> #t202 in <core::String, core::List<core::int>>{"bar": <core::int>[42]}.{core::Map::entries})
+          #t201.{core::Map::[]=}(#t202.{core::MapEntry::key}, #t202.{core::MapEntry::value});
+    #t201.{core::Map::[]=}("baz", null);
+  } =>#t201;
+  core::List<core::List<core::int>> list40 = block {
+    final core::List<core::List<core::int>> #t203 = <core::List<core::int>>[];
+    for (core::int i = 0; self::oracle<core::String>("foo") as{TypeError} core::bool; i = i.{core::num::+}(1))
+      for (final core::List<core::int> #t204 in <core::List<core::int>>[<core::int>[]])
+        #t203.{core::List::add}(#t204);
+  } =>#t203;
+  core::Set<core::List<core::int>> set40 = block {
+    final core::Set<core::List<core::int>> #t205 = col::LinkedHashSet::•<core::List<core::int>>();
+    for (core::int i = 0; self::oracle<core::String>("foo") as{TypeError} core::bool; i = i.{core::num::+}(1))
+      for (final core::List<core::int> #t206 in <core::List<core::int>>[<core::int>[]])
+        #t205.{core::Set::add}(#t206);
+    #t205.{core::Set::add}(null);
+  } =>#t205;
+  core::Map<core::String, core::List<core::int>> map40 = block {
+    final core::Map<core::String, core::List<core::int>> #t207 = <core::String, core::List<core::int>>{};
+    for (core::int i = 0; self::oracle<core::String>("foo") as{TypeError} core::bool; i = i.{core::num::+}(1))
+      for (final core::MapEntry<core::String, core::List<core::int>> #t208 in <core::String, core::List<core::int>>{"bar": <core::int>[]}.{core::Map::entries})
+        #t207.{core::Map::[]=}(#t208.{core::MapEntry::key}, #t208.{core::MapEntry::value});
+    #t207.{core::Map::[]=}("baz", null);
+  } =>#t207;
+  core::List<core::List<core::int>> list41 = block {
+    final core::List<core::List<core::int>> #t209 = <core::List<core::int>>[];
+    for (core::int i = 0; self::oracle<core::String>("foo") as{TypeError} core::bool; i = i.{core::num::+}(1))
+      for (final core::List<core::int> #t210 in let final core::Set<core::List<core::int>> #t211 = col::LinkedHashSet::•<core::List<core::int>>() in let final dynamic #t212 = #t211.{core::Set::add}(<core::int>[]) in #t211)
+        #t209.{core::List::add}(#t210);
+  } =>#t209;
+  core::Set<core::List<core::int>> set41 = block {
+    final core::Set<core::List<core::int>> #t213 = col::LinkedHashSet::•<core::List<core::int>>();
+    for (core::int i = 0; self::oracle<core::String>("foo") as{TypeError} core::bool; i = i.{core::num::+}(1))
+      for (final core::List<core::int> #t214 in let final core::Set<core::List<core::int>> #t215 = col::LinkedHashSet::•<core::List<core::int>>() in let final dynamic #t216 = #t215.{core::Set::add}(<core::int>[]) in #t215)
+        #t213.{core::Set::add}(#t214);
+    #t213.{core::Set::add}(null);
+  } =>#t213;
+  core::List<core::List<core::int>> list42 = block {
+    final core::List<core::List<core::int>> #t217 = <core::List<core::int>>[];
+    for (core::int i = 0; self::oracle<core::String>("foo") as{TypeError} core::bool; i = i.{core::num::+}(1))
+      if(self::oracle<dynamic>())
+        for (final core::List<core::int> #t218 in <core::List<core::int>>[<core::int>[]])
+          #t217.{core::List::add}(#t218);
+  } =>#t217;
+  core::Set<core::List<core::int>> set42 = block {
+    final core::Set<core::List<core::int>> #t219 = col::LinkedHashSet::•<core::List<core::int>>();
+    for (core::int i = 0; self::oracle<core::String>("foo") as{TypeError} core::bool; i = i.{core::num::+}(1))
+      if(self::oracle<dynamic>())
+        for (final core::List<core::int> #t220 in <core::List<core::int>>[<core::int>[]])
+          #t219.{core::Set::add}(#t220);
+    #t219.{core::Set::add}(null);
+  } =>#t219;
+  core::Map<core::String, core::List<core::int>> map42 = block {
+    final core::Map<core::String, core::List<core::int>> #t221 = <core::String, core::List<core::int>>{};
+    for (core::int i = 0; self::oracle<core::String>("foo") as{TypeError} core::bool; i = i.{core::num::+}(1))
+      if(self::oracle<dynamic>())
+        for (final core::MapEntry<core::String, core::List<core::int>> #t222 in <core::String, core::List<core::int>>{"bar": <core::int>[]}.{core::Map::entries})
+          #t221.{core::Map::[]=}(#t222.{core::MapEntry::key}, #t222.{core::MapEntry::value});
+    #t221.{core::Map::[]=}("baz", null);
+  } =>#t221;
+  core::List<core::int> list50 = block {
+    final core::List<core::int> #t223 = <core::int>[];
+    for (core::int i = 0; self::oracle<core::String>("foo") as{TypeError} core::bool; i = i.{core::num::+}(1))
+      for (final core::int #t224 in <core::int>[])
+        #t223.{core::List::add}(#t224);
+  } =>#t223;
+  core::Set<core::int> set50 = block {
+    final core::Set<core::int> #t225 = col::LinkedHashSet::•<core::int>();
+    for (core::int i = 0; self::oracle<core::String>("foo") as{TypeError} core::bool; i = i.{core::num::+}(1))
+      for (final core::int #t226 in <core::int>[])
+        #t225.{core::Set::add}(#t226);
+    #t225.{core::Set::add}(null);
+  } =>#t225;
+  core::Map<core::String, core::int> map50 = block {
+    final core::Map<core::String, core::int> #t227 = <core::String, core::int>{};
+    for (core::int i = 0; self::oracle<core::String>("foo") as{TypeError} core::bool; i = i.{core::num::+}(1))
+      for (final core::MapEntry<core::String, core::int> #t228 in <core::String, core::int>{}.{core::Map::entries})
+        #t227.{core::Map::[]=}(#t228.{core::MapEntry::key}, #t228.{core::MapEntry::value});
+    #t227.{core::Map::[]=}("baz", null);
+  } =>#t227;
+  core::List<core::int> list51 = block {
+    final core::List<core::int> #t229 = <core::int>[];
+    for (core::int i = 0; self::oracle<core::String>("foo") as{TypeError} core::bool; i = i.{core::num::+}(1))
+      for (final core::int #t230 in let final core::Set<core::int> #t231 = col::LinkedHashSet::•<core::int>() in #t231)
+        #t229.{core::List::add}(#t230);
+  } =>#t229;
+  core::Set<core::int> set51 = block {
+    final core::Set<core::int> #t232 = col::LinkedHashSet::•<core::int>();
+    for (core::int i = 0; self::oracle<core::String>("foo") as{TypeError} core::bool; i = i.{core::num::+}(1))
+      for (final core::int #t233 in let final core::Set<core::int> #t234 = col::LinkedHashSet::•<core::int>() in #t234)
+        #t232.{core::Set::add}(#t233);
+    #t232.{core::Set::add}(null);
+  } =>#t232;
+  core::List<core::int> list52 = block {
+    final core::List<core::int> #t235 = <core::int>[];
+    for (core::int i = 0; self::oracle<core::String>("foo") as{TypeError} core::bool; i = i.{core::num::+}(1))
+      if(self::oracle<dynamic>())
+        for (final core::int #t236 in <core::int>[])
+          #t235.{core::List::add}(#t236);
+  } =>#t235;
+  core::Set<core::int> set52 = block {
+    final core::Set<core::int> #t237 = col::LinkedHashSet::•<core::int>();
+    for (core::int i = 0; self::oracle<core::String>("foo") as{TypeError} core::bool; i = i.{core::num::+}(1))
+      if(self::oracle<dynamic>())
+        for (final core::int #t238 in <core::int>[])
+          #t237.{core::Set::add}(#t238);
+    #t237.{core::Set::add}(null);
+  } =>#t237;
+  core::List<core::List<core::int>> list60 = block {
+    final core::List<core::List<core::int>> #t239 = <core::List<core::int>>[];
+    for (core::int i = 0; self::oracle<core::String>("foo") as{TypeError} core::bool; i = i.{core::num::+}(1))
+      for (final core::List<core::int> #t240 in <core::List<core::int>>[<core::int>[]])
+        #t239.{core::List::add}(#t240);
+  } =>#t239;
+  core::Set<core::List<core::int>> set60 = block {
+    final core::Set<core::List<core::int>> #t241 = col::LinkedHashSet::•<core::List<core::int>>();
+    for (core::int i = 0; self::oracle<core::String>("foo") as{TypeError} core::bool; i = i.{core::num::+}(1))
+      for (final core::List<core::int> #t242 in <core::List<core::int>>[<core::int>[]])
+        #t241.{core::Set::add}(#t242);
+    #t241.{core::Set::add}(null);
+  } =>#t241;
+  core::Map<core::String, core::List<core::int>> map60 = block {
+    final core::Map<core::String, core::List<core::int>> #t243 = <core::String, core::List<core::int>>{};
+    for (core::int i = 0; self::oracle<core::String>("foo") as{TypeError} core::bool; i = i.{core::num::+}(1))
+      for (final core::MapEntry<core::String, core::List<core::int>> #t244 in <core::String, core::List<core::int>>{"bar": <core::int>[]}.{core::Map::entries})
+        #t243.{core::Map::[]=}(#t244.{core::MapEntry::key}, #t244.{core::MapEntry::value});
+    #t243.{core::Map::[]=}("baz", null);
+  } =>#t243;
+  core::List<core::List<core::int>> list61 = block {
+    final core::List<core::List<core::int>> #t245 = <core::List<core::int>>[];
+    for (core::int i = 0; self::oracle<core::String>("foo") as{TypeError} core::bool; i = i.{core::num::+}(1))
+      if(self::oracle<dynamic>())
+        for (final core::List<core::int> #t246 in <core::List<core::int>>[<core::int>[]])
+          #t245.{core::List::add}(#t246);
+  } =>#t245;
+  core::Set<core::List<core::int>> set61 = block {
+    final core::Set<core::List<core::int>> #t247 = col::LinkedHashSet::•<core::List<core::int>>();
+    for (core::int i = 0; self::oracle<core::String>("foo") as{TypeError} core::bool; i = i.{core::num::+}(1))
+      if(self::oracle<dynamic>())
+        for (final core::List<core::int> #t248 in <core::List<core::int>>[<core::int>[]])
+          #t247.{core::Set::add}(#t248);
+    #t247.{core::Set::add}(null);
+  } =>#t247;
+  core::Map<core::String, core::List<core::int>> map61 = block {
+    final core::Map<core::String, core::List<core::int>> #t249 = <core::String, core::List<core::int>>{};
+    for (core::int i = 0; self::oracle<core::String>("foo") as{TypeError} core::bool; i = i.{core::num::+}(1))
+      if(self::oracle<dynamic>())
+        for (final core::MapEntry<core::String, core::List<core::int>> #t250 in <core::String, core::List<core::int>>{"bar": <core::int>[]}.{core::Map::entries})
+          #t249.{core::Map::[]=}(#t250.{core::MapEntry::key}, #t250.{core::MapEntry::value});
+    #t249.{core::Map::[]=}("baz", null);
+  } =>#t249;
+  core::List<core::List<core::int>> list70 = block {
+    final core::List<core::List<core::int>> #t251 = <core::List<core::int>>[];
+    for (core::int i = 0; self::oracle<core::String>("foo") as{TypeError} core::bool; i = i.{core::num::+}(1))
+      #t251.{core::List::add}(<core::int>[]);
+  } =>#t251;
+  core::Set<core::List<core::int>> set70 = block {
+    final core::Set<core::List<core::int>> #t252 = col::LinkedHashSet::•<core::List<core::int>>();
+    for (core::int i = 0; self::oracle<core::String>("foo") as{TypeError} core::bool; i = i.{core::num::+}(1))
+      #t252.{core::Set::add}(<core::int>[]);
+    #t252.{core::Set::add}(null);
+  } =>#t252;
+  core::Map<core::String, core::List<core::int>> map70 = block {
+    final core::Map<core::String, core::List<core::int>> #t253 = <core::String, core::List<core::int>>{};
+    for (core::int i = 0; self::oracle<core::String>("foo") as{TypeError} core::bool; i = i.{core::num::+}(1))
+      #t253.{core::Map::[]=}("bar", <core::int>[]);
+    #t253.{core::Map::[]=}("baz", null);
+  } =>#t253;
+  core::List<core::List<core::int>> list71 = block {
+    final core::List<core::List<core::int>> #t254 = <core::List<core::int>>[];
+    for (core::int i = 0; self::oracle<core::String>("foo") as{TypeError} core::bool; i = i.{core::num::+}(1))
+      if(self::oracle<dynamic>())
+        #t254.{core::List::add}(<core::int>[]);
+  } =>#t254;
+  core::Set<core::List<core::int>> set71 = block {
+    final core::Set<core::List<core::int>> #t255 = col::LinkedHashSet::•<core::List<core::int>>();
+    for (core::int i = 0; self::oracle<core::String>("foo") as{TypeError} core::bool; i = i.{core::num::+}(1))
+      if(self::oracle<dynamic>())
+        #t255.{core::Set::add}(<core::int>[]);
+    #t255.{core::Set::add}(null);
+  } =>#t255;
+  core::Map<core::String, core::List<core::int>> map71 = block {
+    final core::Map<core::String, core::List<core::int>> #t256 = <core::String, core::List<core::int>>{};
+    for (core::int i = 0; self::oracle<core::String>("foo") as{TypeError} core::bool; i = i.{core::num::+}(1))
+      if(self::oracle<dynamic>())
+        #t256.{core::Map::[]=}("bar", <core::int>[]);
+    #t256.{core::Map::[]=}("baz", null);
+  } =>#t256;
+  core::List<core::num> list80 = block {
+    final core::List<core::num> #t257 = <core::num>[];
+    for (core::int i = 0; self::oracle<core::String>("foo") as{TypeError} core::bool; i = i.{core::num::+}(1))
+      if(self::oracle<dynamic>())
+        #t257.{core::List::add}(42);
+      else
+        #t257.{core::List::add}(3.14);
+  } =>#t257;
+  core::Set<core::num> set80 = block {
+    final core::Set<core::num> #t258 = col::LinkedHashSet::•<core::num>();
+    for (core::int i = 0; self::oracle<core::String>("foo") as{TypeError} core::bool; i = i.{core::num::+}(1))
+      if(self::oracle<dynamic>())
+        #t258.{core::Set::add}(42);
+      else
+        #t258.{core::Set::add}(3.14);
+    #t258.{core::Set::add}(null);
+  } =>#t258;
+  core::Map<core::String, core::num> map80 = block {
+    final core::Map<core::String, core::num> #t259 = <core::String, core::num>{};
+    for (core::int i = 0; self::oracle<core::String>("foo") as{TypeError} core::bool; i = i.{core::num::+}(1))
+      if(self::oracle<dynamic>())
+        #t259.{core::Map::[]=}("bar", 42);
+      else
+        #t259.{core::Map::[]=}("bar", 3.14);
+    #t259.{core::Map::[]=}("baz", null);
+  } =>#t259;
+  core::List<core::num> list81 = block {
+    final core::List<core::num> #t260 = <core::num>[];
+    for (core::int i = 0; self::oracle<core::String>("foo") as{TypeError} core::bool; i = i.{core::num::+}(1))
+      if(self::oracle<dynamic>())
+        for (final core::num #t261 in listInt)
+          #t260.{core::List::add}(#t261);
+      else
+        for (final core::num #t262 in listDouble)
+          #t260.{core::List::add}(#t262);
+  } =>#t260;
+  core::Set<core::num> set81 = block {
+    final core::Set<core::num> #t263 = col::LinkedHashSet::•<core::num>();
+    for (core::int i = 0; self::oracle<core::String>("foo") as{TypeError} core::bool; i = i.{core::num::+}(1))
+      if(self::oracle<dynamic>())
+        for (final core::num #t264 in listInt)
+          #t263.{core::Set::add}(#t264);
+      else
+        for (final core::num #t265 in listDouble)
+          #t263.{core::Set::add}(#t265);
+    #t263.{core::Set::add}(null);
+  } =>#t263;
+  core::Map<core::String, core::num> map81 = block {
+    final core::Map<core::String, core::num> #t266 = <core::String, core::num>{};
+    for (core::int i = 0; self::oracle<core::String>("foo") as{TypeError} core::bool; i = i.{core::num::+}(1))
+      if(self::oracle<dynamic>())
+        for (final core::MapEntry<core::String, core::num> #t267 in mapStringInt.{core::Map::entries})
+          #t266.{core::Map::[]=}(#t267.{core::MapEntry::key}, #t267.{core::MapEntry::value});
+      else
+        for (final core::MapEntry<core::String, core::num> #t268 in mapStringDouble.{core::Map::entries})
+          #t266.{core::Map::[]=}(#t268.{core::MapEntry::key}, #t268.{core::MapEntry::value});
+    #t266.{core::Map::[]=}("baz", null);
+  } =>#t266;
+  core::List<dynamic> list82 = block {
+    final core::List<dynamic> #t269 = <dynamic>[];
+    for (core::int i = 0; self::oracle<core::String>("foo") as{TypeError} core::bool; i = i.{core::num::+}(1))
+      if(self::oracle<dynamic>())
+        for (final dynamic #t270 in listInt)
+          #t269.{core::List::add}(#t270);
+      else
+        for (final dynamic #t271 in dynVar as{TypeError} core::Iterable<dynamic>)
+          #t269.{core::List::add}(#t271);
+  } =>#t269;
+  core::Set<dynamic> set82 = block {
+    final core::Set<dynamic> #t272 = col::LinkedHashSet::•<dynamic>();
+    for (core::int i = 0; self::oracle<core::String>("foo") as{TypeError} core::bool; i = i.{core::num::+}(1))
+      if(self::oracle<dynamic>())
+        for (final dynamic #t273 in listInt)
+          #t272.{core::Set::add}(#t273);
+      else
+        for (final dynamic #t274 in dynVar as{TypeError} core::Iterable<dynamic>)
+          #t272.{core::Set::add}(#t274);
+    #t272.{core::Set::add}(null);
+  } =>#t272;
+  core::Map<dynamic, dynamic> map82 = block {
+    final core::Map<dynamic, dynamic> #t275 = <dynamic, dynamic>{};
+    for (core::int i = 0; self::oracle<core::String>("foo") as{TypeError} core::bool; i = i.{core::num::+}(1))
+      if(self::oracle<dynamic>())
+        for (final core::MapEntry<dynamic, dynamic> #t276 in mapStringInt.{core::Map::entries})
+          #t275.{core::Map::[]=}(#t276.{core::MapEntry::key}, #t276.{core::MapEntry::value});
+      else
+        for (final core::MapEntry<dynamic, dynamic> #t277 in (dynVar as{TypeError} core::Map<dynamic, dynamic>).{core::Map::entries})
+          #t275.{core::Map::[]=}(#t277.{core::MapEntry::key}, #t277.{core::MapEntry::value});
+    #t275.{core::Map::[]=}("baz", null);
+  } =>#t275;
+  core::List<core::num> list83 = block {
+    final core::List<core::num> #t278 = <core::num>[];
+    for (core::int i = 0; self::oracle<core::String>("foo") as{TypeError} core::bool; i = i.{core::num::+}(1))
+      if(self::oracle<dynamic>())
+        #t278.{core::List::add}(42);
+      else
+        for (final core::num #t279 in listDouble)
+          #t278.{core::List::add}(#t279);
+  } =>#t278;
+  core::Set<core::num> set83 = block {
+    final core::Set<core::num> #t280 = col::LinkedHashSet::•<core::num>();
+    for (core::int i = 0; self::oracle<core::String>("foo") as{TypeError} core::bool; i = i.{core::num::+}(1))
+      if(self::oracle<dynamic>())
+        for (final core::num #t281 in listInt)
+          #t280.{core::Set::add}(#t281);
+      else
+        #t280.{core::Set::add}(3.14);
+    #t280.{core::Set::add}(null);
+  } =>#t280;
+  core::Map<core::String, core::num> map83 = block {
+    final core::Map<core::String, core::num> #t282 = <core::String, core::num>{};
+    for (core::int i = 0; self::oracle<core::String>("foo") as{TypeError} core::bool; i = i.{core::num::+}(1))
+      if(self::oracle<dynamic>())
+        for (final core::MapEntry<core::String, core::num> #t283 in mapStringInt.{core::Map::entries})
+          #t282.{core::Map::[]=}(#t283.{core::MapEntry::key}, #t283.{core::MapEntry::value});
+      else
+        #t282.{core::Map::[]=}("bar", 3.14);
+    #t282.{core::Map::[]=}("baz", null);
+  } =>#t282;
+  core::List<core::int> list90 = block {
+    final core::List<core::int> #t284 = <core::int>[];
+    for (core::int i = 0; self::oracle<core::String>("foo") as{TypeError} core::bool; i = i.{core::num::+}(1))
+      #t284.{core::List::add}(dynVar as{TypeError} core::int);
+  } =>#t284;
+  core::Set<core::int> set90 = block {
+    final core::Set<core::int> #t285 = col::LinkedHashSet::•<core::int>();
+    for (core::int i = 0; self::oracle<core::String>("foo") as{TypeError} core::bool; i = i.{core::num::+}(1))
+      #t285.{core::Set::add}(dynVar as{TypeError} core::int);
+    #t285.{core::Set::add}(null);
+  } =>#t285;
+  core::Map<core::String, core::int> map90 = block {
+    final core::Map<core::String, core::int> #t286 = <core::String, core::int>{};
+    for (core::int i = 0; self::oracle<core::String>("foo") as{TypeError} core::bool; i = i.{core::num::+}(1))
+      #t286.{core::Map::[]=}("bar", dynVar as{TypeError} core::int);
+    #t286.{core::Map::[]=}("baz", null);
+  } =>#t286;
+  core::List<core::int> list91 = block {
+    final core::List<core::int> #t287 = <core::int>[];
+    for (core::int i = 0; self::oracle<core::String>("foo") as{TypeError} core::bool; i = i.{core::num::+}(1))
+      for (final dynamic #t288 in dynVar as{TypeError} core::Iterable<dynamic>) {
+        final core::int #t289 = #t288 as{TypeError} core::int;
+        #t287.{core::List::add}(#t289);
+      }
+  } =>#t287;
+  core::Set<core::int> set91 = block {
+    final core::Set<core::int> #t290 = col::LinkedHashSet::•<core::int>();
+    for (core::int i = 0; self::oracle<core::String>("foo") as{TypeError} core::bool; i = i.{core::num::+}(1))
+      for (final dynamic #t291 in dynVar as{TypeError} core::Iterable<dynamic>) {
+        final core::int #t292 = #t291 as{TypeError} core::int;
+        #t290.{core::Set::add}(#t292);
+      }
+    #t290.{core::Set::add}(null);
+  } =>#t290;
+  core::Map<core::String, core::int> map91 = block {
+    final core::Map<core::String, core::int> #t293 = <core::String, core::int>{};
+    for (core::int i = 0; self::oracle<core::String>("foo") as{TypeError} core::bool; i = i.{core::num::+}(1))
+      for (final core::MapEntry<dynamic, dynamic> #t294 in (dynVar as{TypeError} core::Map<dynamic, dynamic>).{core::Map::entries}) {
+        final core::String #t295 = #t294.{core::MapEntry::key} as{TypeError} core::String;
+        final core::int #t296 = #t294.{core::MapEntry::value} as{TypeError} core::int;
+        #t293.{core::Map::[]=}(#t295, #t296);
+      }
+    #t293.{core::Map::[]=}("baz", null);
+  } =>#t293;
+  core::List<core::int> list100 = block {
+    final core::List<core::int> #t297 = <core::int>[];
+    for (final dynamic #t298 = index = 0; self::oracle<core::String>("foo") as{TypeError} core::bool; index = index.{core::num::+}(1))
+      #t297.{core::List::add}(42);
+  } =>#t297;
+  core::Set<core::int> set100 = block {
+    final core::Set<core::int> #t299 = col::LinkedHashSet::•<core::int>();
+    for (final dynamic #t300 = index = 0; self::oracle<core::String>("foo") as{TypeError} core::bool; index = index.{core::num::+}(1))
+      #t299.{core::Set::add}(42);
+  } =>#t299;
+  core::Map<core::String, core::int> map100 = block {
+    final core::Map<core::String, core::int> #t301 = <core::String, core::int>{};
+    for (final dynamic #t302 = index = 0; self::oracle<core::String>("foo") as{TypeError} core::bool; index = index.{core::num::+}(1))
+      #t301.{core::Map::[]=}("bar", 42);
+  } =>#t301;
+  core::List<core::int> list110 = block {
+    final core::List<core::int> #t303 = <core::int>[];
+    for (core::int i in <core::int>[1, 2, 3])
+      #t303.{core::List::add}(i);
+  } =>#t303;
+  core::Set<core::int> set110 = block {
+    final core::Set<core::int> #t304 = col::LinkedHashSet::•<core::int>();
+    for (core::int i in <core::int>[1, 2, 3])
+      #t304.{core::Set::add}(i);
+    #t304.{core::Set::add}(null);
+  } =>#t304;
+  core::Map<core::String, core::int> map110 = block {
+    final core::Map<core::String, core::int> #t305 = <core::String, core::int>{};
+    for (core::int i in <core::int>[1, 2, 3])
+      #t305.{core::Map::[]=}("bar", i);
+    #t305.{core::Map::[]=}("baz", null);
+  } =>#t305;
+  core::List<core::int> list120 = block {
+    final core::List<core::int> #t306 = <core::int>[];
+    for (dynamic i in dynVar as{TypeError} core::Iterable<dynamic>)
+      #t306.{core::List::add}(i as{TypeError} core::int);
+  } =>#t306;
+  core::Set<core::int> set120 = block {
+    final core::Set<core::int> #t307 = col::LinkedHashSet::•<core::int>();
+    for (dynamic i in dynVar as{TypeError} core::Iterable<dynamic>)
+      #t307.{core::Set::add}(i as{TypeError} core::int);
+    #t307.{core::Set::add}(null);
+  } =>#t307;
+  core::Map<core::String, core::int> map120 = block {
+    final core::Map<core::String, core::int> #t308 = <core::String, core::int>{};
+    for (dynamic i in dynVar as{TypeError} core::Iterable<dynamic>)
+      #t308.{core::Map::[]=}("bar", i as{TypeError} core::int);
+    #t308.{core::Map::[]=}("baz", null);
+  } =>#t308;
+}
+static method testForElementErrors(core::Map<core::int, core::int> map, core::List<core::int> list) → dynamic async {
+  <core::int>[invalid-expression "pkg/front_end/testcases/control_flow_collection_inference.dart:190:45: Error: A value of type 'String' can't be assigned to a variable of type 'int'.
+Try changing the type of the left hand side, or casting the right hand side to 'int'.
+  <int>[for (int i = 0; oracle(\"foo\"); i++) \"bar\"];
+                                            ^"];
+  let final core::Set<core::int> #t309 = col::LinkedHashSet::•<core::int>() in let final dynamic #t310 = #t309.{core::Set::add}(invalid-expression "pkg/front_end/testcases/control_flow_collection_inference.dart:191:45: Error: A value of type 'String' can't be assigned to a variable of type 'int'.
+Try changing the type of the left hand side, or casting the right hand side to 'int'.
+  <int>{for (int i = 0; oracle(\"foo\"); i++) \"bar\", null};
+                                            ^") in let final dynamic #t311 = #t309.{core::Set::add}(null) in #t309;
+  <core::int, core::int>{invalid-expression "pkg/front_end/testcases/control_flow_collection_inference.dart:192:14: Error: A value of type 'String' can't be assigned to a variable of type 'int'.
+Try changing the type of the left hand side, or casting the right hand side to 'int'.
+  <int, int>{for (int i = 0; oracle(\"foo\"); i++) \"bar\": \"bar\", \"baz\": null};
+             ^": invalid-expression "pkg/front_end/testcases/control_flow_collection_inference.dart:192:14: Error: A value of type 'String' can't be assigned to a variable of type 'int'.
+Try changing the type of the left hand side, or casting the right hand side to 'int'.
+  <int, int>{for (int i = 0; oracle(\"foo\"); i++) \"bar\": \"bar\", \"baz\": null};
+             ^", let final<BottomType> #t312 = invalid-expression "pkg/front_end/testcases/control_flow_collection_inference.dart:192:64: Error: A value of type 'String' can't be assigned to a variable of type 'int'.
+Try changing the type of the left hand side, or casting the right hand side to 'int'.
+  <int, int>{for (int i = 0; oracle(\"foo\"); i++) \"bar\": \"bar\", \"baz\": null};
+                                                               ^" in "baz" as{TypeError} core::int: null};
+  block {
+    final core::List<core::int> #t313 = <core::int>[];
+    for (core::int i = 0; self::oracle<core::String>("foo") as{TypeError} core::bool; i = i.{core::num::+}(1))
+      for (final core::int #t314 in <core::int>[let final<BottomType> #t315 = invalid-expression "pkg/front_end/testcases/control_flow_collection_inference.dart:193:49: Error: A value of type 'String' can't be assigned to a variable of type 'int'.
+Try changing the type of the left hand side, or casting the right hand side to 'int'.
+  <int>[for (int i = 0; oracle(\"foo\"); i++) ...[\"bar\"]];
+                                                ^" in "bar" as{TypeError} core::int])
+        #t313.{core::List::add}(#t314);
+  } =>#t313;
+  block {
+    final core::Set<core::int> #t316 = col::LinkedHashSet::•<core::int>();
+    for (core::int i = 0; self::oracle<core::String>("foo") as{TypeError} core::bool; i = i.{core::num::+}(1))
+      for (final core::int #t317 in <core::int>[let final<BottomType> #t318 = invalid-expression "pkg/front_end/testcases/control_flow_collection_inference.dart:194:49: Error: A value of type 'String' can't be assigned to a variable of type 'int'.
+Try changing the type of the left hand side, or casting the right hand side to 'int'.
+  <int>{for (int i = 0; oracle(\"foo\"); i++) ...[\"bar\"], null};
+                                                ^" in "bar" as{TypeError} core::int])
+        #t316.{core::Set::add}(#t317);
+    #t316.{core::Set::add}(null);
+  } =>#t316;
+  block {
+    final core::Map<core::int, core::int> #t319 = <core::int, core::int>{};
+    for (core::int i = 0; self::oracle<core::String>("foo") as{TypeError} core::bool; i = i.{core::num::+}(1))
+      for (final core::MapEntry<core::int, core::int> #t320 in <core::int, core::int>{let final<BottomType> #t321 = invalid-expression "pkg/front_end/testcases/control_flow_collection_inference.dart:195:54: Error: A value of type 'String' can't be assigned to a variable of type 'int'.
+Try changing the type of the left hand side, or casting the right hand side to 'int'.
+  <int, int>{for (int i = 0; oracle(\"foo\"); i++) ...{\"bar\": \"bar\"}, \"baz\": null};
+                                                     ^" in "bar" as{TypeError} core::int: let final<BottomType> #t322 = invalid-expression "pkg/front_end/testcases/control_flow_collection_inference.dart:195:61: Error: A value of type 'String' can't be assigned to a variable of type 'int'.
+Try changing the type of the left hand side, or casting the right hand side to 'int'.
+  <int, int>{for (int i = 0; oracle(\"foo\"); i++) ...{\"bar\": \"bar\"}, \"baz\": null};
+                                                            ^" in "bar" as{TypeError} core::int}.{core::Map::entries})
+        #t319.{core::Map::[]=}(#t320.{core::MapEntry::key}, #t320.{core::MapEntry::value});
+    #t319.{core::Map::[]=}(let final<BottomType> #t323 = invalid-expression "pkg/front_end/testcases/control_flow_collection_inference.dart:195:69: Error: A value of type 'String' can't be assigned to a variable of type 'int'.
+Try changing the type of the left hand side, or casting the right hand side to 'int'.
+  <int, int>{for (int i = 0; oracle(\"foo\"); i++) ...{\"bar\": \"bar\"}, \"baz\": null};
+                                                                    ^" in "baz" as{TypeError} core::int, null);
+  } =>#t319;
+  block {
+    final core::List<core::int> #t324 = <core::int>[];
+    for (core::int i = 0; self::oracle<core::String>("foo") as{TypeError} core::bool; i = i.{core::num::+}(1))
+      #t324.{core::List::add}(invalid-expression "pkg/front_end/testcases/control_flow_collection_inference.dart:196:48: Error: Unexpected type 'Map<int, int>' of a spread.  Expected 'dynamic' or an Iterable.
+ - 'Map' is from 'dart:core'.
+  <int>[for (int i = 0; oracle(\"foo\"); i++) ...map];
+                                               ^" as{TypeError} core::int);
+  } =>#t324;
+  block {
+    final core::Set<core::int> #t325 = col::LinkedHashSet::•<core::int>();
+    for (core::int i = 0; self::oracle<core::String>("foo") as{TypeError} core::bool; i = i.{core::num::+}(1))
+      #t325.{core::Set::add}(invalid-expression "pkg/front_end/testcases/control_flow_collection_inference.dart:197:48: Error: Unexpected type 'Map<int, int>' of a spread.  Expected 'dynamic' or an Iterable.
+ - 'Map' is from 'dart:core'.
+  <int>{for (int i = 0; oracle(\"foo\"); i++) ...map, null};
+                                               ^" as{TypeError} core::int);
+    #t325.{core::Set::add}(null);
+  } =>#t325;
+  <core::int, core::int>{invalid-expression "pkg/front_end/testcases/control_flow_collection_inference.dart:198:53: Error: Unexpected type 'List<int>' of a map spread entry.  Expected 'dynamic' or a Map.
+ - 'List' is from 'dart:core'.
+  <int, int>{for (int i = 0; oracle(\"foo\"); i++) ...list, 42: null};
+                                                    ^": null, invalid-expression "pkg/front_end/testcases/control_flow_collection_inference.dart:198:53: Error: Unexpected type 'List<int>' of a map spread entry.  Expected 'dynamic' or a Map.
+ - 'List' is from 'dart:core'.
+  <int, int>{for (int i = 0; oracle(\"foo\"); i++) ...list, 42: null};
+                                                    ^": null};
+  <core::String>[invalid-expression "pkg/front_end/testcases/control_flow_collection_inference.dart:199:48: Error: A value of type 'num' can't be assigned to a variable of type 'String'.
+Try changing the type of the left hand side, or casting the right hand side to 'String'.
+  <String>[for (int i = 0; oracle(\"foo\"); i++) if (oracle()) 42 else 3.14];
+                                               ^"];
+  let final core::Set<core::String> #t326 = col::LinkedHashSet::•<core::String>() in let final dynamic #t327 = #t326.{core::Set::add}(invalid-expression "pkg/front_end/testcases/control_flow_collection_inference.dart:200:48: Error: A value of type 'num' can't be assigned to a variable of type 'String'.
+Try changing the type of the left hand side, or casting the right hand side to 'String'.
+  <String>{for (int i = 0; oracle(\"foo\"); i++) if (oracle()) 42 else 3.14, null};
+                                               ^") in let final dynamic #t328 = #t326.{core::Set::add}(null) in #t326;
+  <core::String, core::String>{null: invalid-expression "pkg/front_end/testcases/control_flow_collection_inference.dart:201:20: Error: A value of type 'num' can't be assigned to a variable of type 'String'.
+Try changing the type of the left hand side, or casting the right hand side to 'String'.
+  <String, String>{for (int i = 0; oracle(\"foo\"); i++) if (oracle()) \"bar\": 42 else \"bar\": 3.14, \"baz\": null};
+                   ^", "baz": null};
+  block {
+    final core::List<core::int> #t329 = <core::int>[];
+    for (core::int i = 0; self::oracle<core::String>("foo") as{TypeError} core::bool; i = i.{core::num::+}(1))
+      if(self::oracle<dynamic>())
+        #t329.{core::List::add}(invalid-expression "pkg/front_end/testcases/control_flow_collection_inference.dart:202:62: Error: Unexpected type 'Map<int, int>' of a spread.  Expected 'dynamic' or an Iterable.
+ - 'Map' is from 'dart:core'.
+  <int>[for (int i = 0; oracle(\"foo\"); i++) if (oracle()) ...map else 42];
+                                                             ^" as{TypeError} core::int);
+      else
+        #t329.{core::List::add}(42 as{TypeError} core::int);
+  } =>#t329;
+  block {
+    final core::Set<core::int> #t330 = col::LinkedHashSet::•<core::int>();
+    for (core::int i = 0; self::oracle<core::String>("foo") as{TypeError} core::bool; i = i.{core::num::+}(1))
+      if(self::oracle<dynamic>())
+        #t330.{core::Set::add}(invalid-expression "pkg/front_end/testcases/control_flow_collection_inference.dart:203:62: Error: Unexpected type 'Map<int, int>' of a spread.  Expected 'dynamic' or an Iterable.
+ - 'Map' is from 'dart:core'.
+  <int>{for (int i = 0; oracle(\"foo\"); i++) if (oracle()) ...map else 42, null};
+                                                             ^" as{TypeError} core::int);
+      else
+        #t330.{core::Set::add}(42 as{TypeError} core::int);
+    #t330.{core::Set::add}(null);
+  } =>#t330;
+  <core::String, core::int>{invalid-expression "pkg/front_end/testcases/control_flow_collection_inference.dart:204:70: Error: Unexpected type 'List<int>' of a map spread entry.  Expected 'dynamic' or a Map.
+ - 'List' is from 'dart:core'.
+  <String, int>{for (int i = 0; oracle(\"foo\"); i++) if (oracle()) ...list else \"bar\": 42, \"baz\": null};
+                                                                     ^": null, invalid-expression "pkg/front_end/testcases/control_flow_collection_inference.dart:204:70: Error: Unexpected type 'List<int>' of a map spread entry.  Expected 'dynamic' or a Map.
+ - 'List' is from 'dart:core'.
+  <String, int>{for (int i = 0; oracle(\"foo\"); i++) if (oracle()) ...list else \"bar\": 42, \"baz\": null};
+                                                                     ^": null};
+  block {
+    final core::List<core::int> #t331 = <core::int>[];
+    for (core::int i = 0; self::oracle<core::String>("foo") as{TypeError} core::bool; i = i.{core::num::+}(1))
+      if(self::oracle<dynamic>())
+        #t331.{core::List::add}(42 as{TypeError} core::int);
+      else
+        #t331.{core::List::add}(invalid-expression "pkg/front_end/testcases/control_flow_collection_inference.dart:205:70: Error: Unexpected type 'Map<int, int>' of a spread.  Expected 'dynamic' or an Iterable.
+ - 'Map' is from 'dart:core'.
+  <int>[for (int i = 0; oracle(\"foo\"); i++) if (oracle()) 42 else ...map];
+                                                                     ^" as{TypeError} core::int);
+  } =>#t331;
+  block {
+    final core::Set<core::int> #t332 = col::LinkedHashSet::•<core::int>();
+    for (core::int i = 0; self::oracle<core::String>("foo") as{TypeError} core::bool; i = i.{core::num::+}(1))
+      if(self::oracle<dynamic>())
+        #t332.{core::Set::add}(42 as{TypeError} core::int);
+      else
+        #t332.{core::Set::add}(invalid-expression "pkg/front_end/testcases/control_flow_collection_inference.dart:206:70: Error: Unexpected type 'Map<int, int>' of a spread.  Expected 'dynamic' or an Iterable.
+ - 'Map' is from 'dart:core'.
+  <int>{for (int i = 0; oracle(\"foo\"); i++) if (oracle()) 42 else ...map, null};
+                                                                     ^" as{TypeError} core::int);
+    #t332.{core::Set::add}(null);
+  } =>#t332;
+  <core::String, core::int>{invalid-expression "pkg/front_end/testcases/control_flow_collection_inference.dart:207:85: Error: Unexpected type 'List<int>' of a map spread entry.  Expected 'dynamic' or a Map.
+ - 'List' is from 'dart:core'.
+  <String, int>{for (int i = 0; oracle(\"foo\"); i++) if (oracle()) \"bar\": 42 else ...list, \"baz\": null};
+                                                                                    ^": null, invalid-expression "pkg/front_end/testcases/control_flow_collection_inference.dart:207:85: Error: Unexpected type 'List<int>' of a map spread entry.  Expected 'dynamic' or a Map.
+ - 'List' is from 'dart:core'.
+  <String, int>{for (int i = 0; oracle(\"foo\"); i++) if (oracle()) \"bar\": 42 else ...list, \"baz\": null};
+                                                                                    ^": null};
+  final core::int i = 0;
+  block {
+    final core::List<core::int> #t333 = <core::int>[];
+    for (final core::int #t334 in <core::int>[1]) {
+      invalid-expression "pkg/front_end/testcases/control_flow_collection_inference.dart:210:14: Error: Setter not found: 'i'.
+  <int>[for (i in <int>[1]) i];
+             ^";
+      #t333.{core::List::add}(i);
+    }
+  } =>#t333;
+  block {
+    final core::Set<core::int> #t335 = col::LinkedHashSet::•<core::int>();
+    for (final core::int #t336 in <core::int>[1]) {
+      invalid-expression "pkg/front_end/testcases/control_flow_collection_inference.dart:211:14: Error: Setter not found: 'i'.
+  <int>{for (i in <int>[1]) i, null};
+             ^";
+      #t335.{core::Set::add}(i);
+    }
+    #t335.{core::Set::add}(null);
+  } =>#t335;
+  block {
+    final core::Map<core::String, core::int> #t337 = <core::String, core::int>{};
+    for (final core::int #t338 in <core::int>[1]) {
+      invalid-expression "pkg/front_end/testcases/control_flow_collection_inference.dart:212:21: Error: Setter not found: 'i'.
+\t<String, int>{for (i in <int>[1]) \"bar\": i, \"baz\": null};
+\t                   ^";
+      #t337.{core::Map::[]=}("bar", i);
+    }
+    #t337.{core::Map::[]=}("baz", null);
+  } =>#t337;
+  core::List<dynamic> list10 = block {
+    final core::List<dynamic> #t339 = <dynamic>[];
+    for (dynamic i in let final<BottomType> #t340 = invalid-expression "pkg/front_end/testcases/control_flow_collection_inference.dart:214:31: Error: The type 'String' used in the 'for' loop must implement 'Iterable<dynamic>'.
+ - 'Iterable' is from 'dart:core'.
+  var list10 = [for (var i in \"not iterable\") i];
+                              ^" in "not iterable" as{TypeError} core::Iterable<dynamic>)
+      #t339.{core::List::add}(i);
+  } =>#t339;
+  core::Set<dynamic> set10 = block {
+    final core::Set<dynamic> #t341 = col::LinkedHashSet::•<dynamic>();
+    for (dynamic i in let final<BottomType> #t342 = invalid-expression "pkg/front_end/testcases/control_flow_collection_inference.dart:215:30: Error: The type 'String' used in the 'for' loop must implement 'Iterable<dynamic>'.
+ - 'Iterable' is from 'dart:core'.
+  var set10 = {for (var i in \"not iterable\") i, null};
+                             ^" in "not iterable" as{TypeError} core::Iterable<dynamic>)
+      #t341.{core::Set::add}(i);
+    #t341.{core::Set::add}(null);
+  } =>#t341;
+  core::Map<core::String, dynamic> map10 = block {
+    final core::Map<core::String, dynamic> #t343 = <core::String, dynamic>{};
+    for (dynamic i in let final<BottomType> #t344 = invalid-expression "pkg/front_end/testcases/control_flow_collection_inference.dart:216:30: Error: The type 'String' used in the 'for' loop must implement 'Iterable<dynamic>'.
+ - 'Iterable' is from 'dart:core'.
+  var map10 = {for (var i in \"not iterable\") \"bar\": i, \"baz\": null};
+                             ^" in "not iterable" as{TypeError} core::Iterable<dynamic>)
+      #t343.{core::Map::[]=}("bar", i);
+    #t343.{core::Map::[]=}("baz", null);
+  } =>#t343;
+  core::List<core::int> list20 = block {
+    final core::List<core::int> #t345 = <core::int>[];
+    for (core::int i in <core::int>[let final<BottomType> #t346 = invalid-expression "pkg/front_end/testcases/control_flow_collection_inference.dart:217:32: Error: A value of type 'String' can't be assigned to a variable of type 'int'.
+Try changing the type of the left hand side, or casting the right hand side to 'int'.
+  var list20 = [for (int i in [\"not\", \"int\"]) i];
+                               ^" in "not" as{TypeError} core::int, let final<BottomType> #t347 = invalid-expression "pkg/front_end/testcases/control_flow_collection_inference.dart:217:39: Error: A value of type 'String' can't be assigned to a variable of type 'int'.
+Try changing the type of the left hand side, or casting the right hand side to 'int'.
+  var list20 = [for (int i in [\"not\", \"int\"]) i];
+                                      ^" in "int" as{TypeError} core::int])
+      #t345.{core::List::add}(i);
+  } =>#t345;
+  core::Set<core::int> set20 = block {
+    final core::Set<core::int> #t348 = col::LinkedHashSet::•<core::int>();
+    for (core::int i in <core::int>[let final<BottomType> #t349 = invalid-expression "pkg/front_end/testcases/control_flow_collection_inference.dart:218:31: Error: A value of type 'String' can't be assigned to a variable of type 'int'.
+Try changing the type of the left hand side, or casting the right hand side to 'int'.
+  var set20 = {for (int i in [\"not\", \"int\"]) i, null};
+                              ^" in "not" as{TypeError} core::int, let final<BottomType> #t350 = invalid-expression "pkg/front_end/testcases/control_flow_collection_inference.dart:218:38: Error: A value of type 'String' can't be assigned to a variable of type 'int'.
+Try changing the type of the left hand side, or casting the right hand side to 'int'.
+  var set20 = {for (int i in [\"not\", \"int\"]) i, null};
+                                     ^" in "int" as{TypeError} core::int])
+      #t348.{core::Set::add}(i);
+    #t348.{core::Set::add}(null);
+  } =>#t348;
+  core::Map<core::String, core::int> map20 = block {
+    final core::Map<core::String, core::int> #t351 = <core::String, core::int>{};
+    for (core::int i in <core::int>[let final<BottomType> #t352 = invalid-expression "pkg/front_end/testcases/control_flow_collection_inference.dart:219:31: Error: A value of type 'String' can't be assigned to a variable of type 'int'.
+Try changing the type of the left hand side, or casting the right hand side to 'int'.
+  var map20 = {for (int i in [\"not\", \"int\"]) \"bar\": i, \"baz\": null};
+                              ^" in "not" as{TypeError} core::int, let final<BottomType> #t353 = invalid-expression "pkg/front_end/testcases/control_flow_collection_inference.dart:219:38: Error: A value of type 'String' can't be assigned to a variable of type 'int'.
+Try changing the type of the left hand side, or casting the right hand side to 'int'.
+  var map20 = {for (int i in [\"not\", \"int\"]) \"bar\": i, \"baz\": null};
+                                     ^" in "int" as{TypeError} core::int])
+      #t351.{core::Map::[]=}("bar", i);
+    #t351.{core::Map::[]=}("baz", null);
+  } =>#t351;
+  core::List<dynamic> list30 = block {
+    final core::List<dynamic> #t354 = <dynamic>[];
+    await for (dynamic i in let final<BottomType> #t355 = invalid-expression "pkg/front_end/testcases/control_flow_collection_inference.dart:220:37: Error: The type 'String' used in the 'for' loop must implement 'Stream<dynamic>'.
+ - 'Stream' is from 'dart:async'.
+  var list30 = [await for (var i in \"not stream\") i];
+                                    ^" in "not stream" as{TypeError} asy::Stream<dynamic>)
+      #t354.{core::List::add}(i);
+  } =>#t354;
+  core::Set<dynamic> set30 = block {
+    final core::Set<dynamic> #t356 = col::LinkedHashSet::•<dynamic>();
+    await for (dynamic i in let final<BottomType> #t357 = invalid-expression "pkg/front_end/testcases/control_flow_collection_inference.dart:221:36: Error: The type 'String' used in the 'for' loop must implement 'Stream<dynamic>'.
+ - 'Stream' is from 'dart:async'.
+  var set30 = {await for (var i in \"not stream\") i, null};
+                                   ^" in "not stream" as{TypeError} asy::Stream<dynamic>)
+      #t356.{core::Set::add}(i);
+    #t356.{core::Set::add}(null);
+  } =>#t356;
+  core::Map<core::String, dynamic> map30 = block {
+    final core::Map<core::String, dynamic> #t358 = <core::String, dynamic>{};
+    await for (dynamic i in let final<BottomType> #t359 = invalid-expression "pkg/front_end/testcases/control_flow_collection_inference.dart:222:36: Error: The type 'String' used in the 'for' loop must implement 'Stream<dynamic>'.
+ - 'Stream' is from 'dart:async'.
+  var map30 = {await for (var i in \"not stream\") \"bar\": i, \"baz\": null};
+                                   ^" in "not stream" as{TypeError} asy::Stream<dynamic>)
+      #t358.{core::Map::[]=}("bar", i);
+    #t358.{core::Map::[]=}("baz", null);
+  } =>#t358;
+  core::List<core::int> list40 = block {
+    final core::List<core::int> #t360 = <core::int>[];
+    await for (core::int i in asy::Stream::fromIterable<core::int>(<core::int>[let final<BottomType> #t361 = invalid-expression "pkg/front_end/testcases/control_flow_collection_inference.dart:223:58: Error: A value of type 'String' can't be assigned to a variable of type 'int'.
+Try changing the type of the left hand side, or casting the right hand side to 'int'.
+  var list40 = [await for (int i in Stream.fromIterable([\"not\", \"int\"])) i];
+                                                         ^" in "not" as{TypeError} core::int, let final<BottomType> #t362 = invalid-expression "pkg/front_end/testcases/control_flow_collection_inference.dart:223:65: Error: A value of type 'String' can't be assigned to a variable of type 'int'.
+Try changing the type of the left hand side, or casting the right hand side to 'int'.
+  var list40 = [await for (int i in Stream.fromIterable([\"not\", \"int\"])) i];
+                                                                ^" in "int" as{TypeError} core::int]))
+      #t360.{core::List::add}(i);
+  } =>#t360;
+  core::Set<core::int> set40 = block {
+    final core::Set<core::int> #t363 = col::LinkedHashSet::•<core::int>();
+    await for (core::int i in asy::Stream::fromIterable<core::int>(<core::int>[let final<BottomType> #t364 = invalid-expression "pkg/front_end/testcases/control_flow_collection_inference.dart:224:57: Error: A value of type 'String' can't be assigned to a variable of type 'int'.
+Try changing the type of the left hand side, or casting the right hand side to 'int'.
+  var set40 = {await for (int i in Stream.fromIterable([\"not\", \"int\"])) i, null};
+                                                        ^" in "not" as{TypeError} core::int, let final<BottomType> #t365 = invalid-expression "pkg/front_end/testcases/control_flow_collection_inference.dart:224:64: Error: A value of type 'String' can't be assigned to a variable of type 'int'.
+Try changing the type of the left hand side, or casting the right hand side to 'int'.
+  var set40 = {await for (int i in Stream.fromIterable([\"not\", \"int\"])) i, null};
+                                                               ^" in "int" as{TypeError} core::int]))
+      #t363.{core::Set::add}(i);
+    #t363.{core::Set::add}(null);
+  } =>#t363;
+  core::Map<core::String, core::int> map40 = block {
+    final core::Map<core::String, core::int> #t366 = <core::String, core::int>{};
+    await for (core::int i in asy::Stream::fromIterable<core::int>(<core::int>[let final<BottomType> #t367 = invalid-expression "pkg/front_end/testcases/control_flow_collection_inference.dart:225:57: Error: A value of type 'String' can't be assigned to a variable of type 'int'.
+Try changing the type of the left hand side, or casting the right hand side to 'int'.
+  var map40 = {await for (int i in Stream.fromIterable([\"not\", \"int\"])) \"bar\": i, \"baz\": null};
+                                                        ^" in "not" as{TypeError} core::int, let final<BottomType> #t368 = invalid-expression "pkg/front_end/testcases/control_flow_collection_inference.dart:225:64: Error: A value of type 'String' can't be assigned to a variable of type 'int'.
+Try changing the type of the left hand side, or casting the right hand side to 'int'.
+  var map40 = {await for (int i in Stream.fromIterable([\"not\", \"int\"])) \"bar\": i, \"baz\": null};
+                                                               ^" in "int" as{TypeError} core::int]))
+      #t366.{core::Map::[]=}("bar", i);
+    #t366.{core::Map::[]=}("baz", null);
+  } =>#t366;
+  core::List<core::int> list50 = block {
+    final core::List<core::int> #t369 = <core::int>[];
+    for (; ; )
+      #t369.{core::List::add}(42);
+  } =>#t369;
+  core::Set<core::int> set50 = block {
+    final core::Set<core::int> #t370 = col::LinkedHashSet::•<core::int>();
+    for (; ; )
+      #t370.{core::Set::add}(42);
+    #t370.{core::Set::add}(null);
+  } =>#t370;
+  core::Map<core::String, core::int> map50 = block {
+    final core::Map<core::String, core::int> #t371 = <core::String, core::int>{};
+    for (; ; )
+      #t371.{core::Map::[]=}("bar", 42);
+    #t371.{core::Map::[]=}("baz", null);
+  } =>#t371;
+  core::List<core::int> list60 = block {
+    final core::List<core::int> #t372 = <core::int>[];
+    for (; let final<BottomType> #t373 = invalid-expression "pkg/front_end/testcases/control_flow_collection_inference.dart:229:24: Error: A value of type 'String' can't be assigned to a variable of type 'bool'.
+Try changing the type of the left hand side, or casting the right hand side to 'bool'.
+  var list60 = [for (; \"not bool\";) 42];
+                       ^" in "not bool" as{TypeError} core::bool; )
+      #t372.{core::List::add}(42);
+  } =>#t372;
+  core::Set<core::int> set60 = block {
+    final core::Set<core::int> #t374 = col::LinkedHashSet::•<core::int>();
+    for (; let final<BottomType> #t375 = invalid-expression "pkg/front_end/testcases/control_flow_collection_inference.dart:230:23: Error: A value of type 'String' can't be assigned to a variable of type 'bool'.
+Try changing the type of the left hand side, or casting the right hand side to 'bool'.
+  var set60 = {for (; \"not bool\";) 42, null};
+                      ^" in "not bool" as{TypeError} core::bool; )
+      #t374.{core::Set::add}(42);
+    #t374.{core::Set::add}(null);
+  } =>#t374;
+  core::Map<core::String, core::int> map60 = block {
+    final core::Map<core::String, core::int> #t376 = <core::String, core::int>{};
+    for (; let final<BottomType> #t377 = invalid-expression "pkg/front_end/testcases/control_flow_collection_inference.dart:231:23: Error: A value of type 'String' can't be assigned to a variable of type 'bool'.
+Try changing the type of the left hand side, or casting the right hand side to 'bool'.
+  var map60 = {for (; \"not bool\";) \"bar\": 42, \"baz\": null};
+                      ^" in "not bool" as{TypeError} core::bool; )
+      #t376.{core::Map::[]=}("bar", 42);
+    #t376.{core::Map::[]=}("baz", null);
+  } =>#t376;
+}
+static method testForElementErrorsNotAsync(asy::Stream<core::int> stream) → dynamic {
+  block {
+    final core::List<core::int> #t378 = <core::int>[];
+    await for (core::int i in stream)
+      #t378.{core::List::add}(i);
+  } =>#t378;
+  block {
+    final core::Set<core::int> #t379 = col::LinkedHashSet::•<core::int>();
+    await for (core::int i in stream)
+      #t379.{core::Set::add}(i);
+  } =>#t379;
+  block {
+    final core::Map<core::String, core::int> #t380 = <core::String, core::int>{};
+    await for (core::int i in stream)
+      #t380.{core::Map::[]=}("bar", i);
+  } =>#t380;
+}
+static method main() → dynamic {}
diff --git a/pkg/front_end/testcases/control_flow_collection_inference.dart.strong.transformed.expect b/pkg/front_end/testcases/control_flow_collection_inference.dart.strong.transformed.expect
new file mode 100644
index 0000000..14b2064
--- /dev/null
+++ b/pkg/front_end/testcases/control_flow_collection_inference.dart.strong.transformed.expect
@@ -0,0 +1,2135 @@
+library;
+//
+// Problems in library:
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:39:34: Error: Both Iterable and Map spread elements encountered in ambiguous literal.
+//   Map<String, List<int>> map40 = {if (oracle("foo")) ...{"bar", []}, "baz": null};
+//                                  ^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:71:38: Error: Unexpected type 'Map<String, int>' of a spread.  Expected 'dynamic' or an Iterable.
+//  - 'Map' is from 'dart:core'.
+//   var map82 = {if (oracle("foo")) ...mapToInt else ...dynVar, null};
+//                                      ^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:84:28: Error: A value of type 'String' can't be assigned to a variable of type 'int'.
+// Try changing the type of the left hand side, or casting the right hand side to 'int'.
+//   <int>[if (oracle("foo")) "bar"];
+//                            ^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:85:28: Error: A value of type 'String' can't be assigned to a variable of type 'int'.
+// Try changing the type of the left hand side, or casting the right hand side to 'int'.
+//   <int>{if (oracle("foo")) "bar", null};
+//                            ^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:86:43: Error: A value of type 'String' can't be assigned to a variable of type 'int'.
+// Try changing the type of the left hand side, or casting the right hand side to 'int'.
+//   <String, int>{if (oracle("foo")) "bar": "bar", "baz": null};
+//                                           ^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:86:41: Error: A value of type 'String' can't be assigned to a variable of type 'int'.
+// Try changing the type of the left hand side, or casting the right hand side to 'int'.
+//   <String, int>{if (oracle("foo")) "bar": "bar", "baz": null};
+//                                         ^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:87:32: Error: A value of type 'String' can't be assigned to a variable of type 'int'.
+// Try changing the type of the left hand side, or casting the right hand side to 'int'.
+//   <int>[if (oracle("foo")) ...["bar"]];
+//                                ^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:88:32: Error: A value of type 'String' can't be assigned to a variable of type 'int'.
+// Try changing the type of the left hand side, or casting the right hand side to 'int'.
+//   <int>{if (oracle("foo")) ...["bar"], null};
+//                                ^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:89:47: Error: A value of type 'String' can't be assigned to a variable of type 'int'.
+// Try changing the type of the left hand side, or casting the right hand side to 'int'.
+//   <String, int>{if (oracle("foo")) ...{"bar": "bar"}, "baz": null};
+//                                               ^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:90:31: Error: Unexpected type 'Map<int, int>' of a spread.  Expected 'dynamic' or an Iterable.
+//  - 'Map' is from 'dart:core'.
+//   <int>[if (oracle("foo")) ...map];
+//                               ^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:91:31: Error: Unexpected type 'Map<int, int>' of a spread.  Expected 'dynamic' or an Iterable.
+//  - 'Map' is from 'dart:core'.
+//   <int>{if (oracle("foo")) ...map, null};
+//                               ^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:92:39: Error: Unexpected type 'List<String>' of a map spread entry.  Expected 'dynamic' or a Map.
+//  - 'List' is from 'dart:core'.
+//   <String, int>{if (oracle("foo")) ...["bar"], "baz": null};
+//                                       ^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:93:12: Error: A value of type 'num' can't be assigned to a variable of type 'String'.
+// Try changing the type of the left hand side, or casting the right hand side to 'String'.
+//   <String>[if (oracle("foo")) 42 else 3.14];
+//            ^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:94:12: Error: A value of type 'num' can't be assigned to a variable of type 'String'.
+// Try changing the type of the left hand side, or casting the right hand side to 'String'.
+//   <String>{if (oracle("foo")) 42 else 3.14, null};
+//            ^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:95:46: Error: A value of type 'int' can't be assigned to a variable of type 'String'.
+// Try changing the type of the left hand side, or casting the right hand side to 'String'.
+//   <String, String>{if (oracle("foo")) "bar": 42 else "baz": 3.14, "baz": null};
+//                                              ^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:95:61: Error: A value of type 'double' can't be assigned to a variable of type 'String'.
+// Try changing the type of the left hand side, or casting the right hand side to 'String'.
+//   <String, String>{if (oracle("foo")) "bar": 42 else "baz": 3.14, "baz": null};
+//                                                             ^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:95:20: Error: A value of type 'num' can't be assigned to a variable of type 'String'.
+// Try changing the type of the left hand side, or casting the right hand side to 'String'.
+//   <String, String>{if (oracle("foo")) "bar": 42 else "baz": 3.14, "baz": null};
+//                    ^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:96:31: Error: Unexpected type 'Map<int, int>' of a spread.  Expected 'dynamic' or an Iterable.
+//  - 'Map' is from 'dart:core'.
+//   <int>[if (oracle("foo")) ...map else 42];
+//                               ^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:97:31: Error: Unexpected type 'Map<int, int>' of a spread.  Expected 'dynamic' or an Iterable.
+//  - 'Map' is from 'dart:core'.
+//   <int>{if (oracle("foo")) ...map else 42, null};
+//                               ^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:98:39: Error: Unexpected type 'List<int>' of a map spread entry.  Expected 'dynamic' or a Map.
+//  - 'List' is from 'dart:core'.
+//   <String, int>{if (oracle("foo")) ...[42] else "bar": 42, "baz": null};
+//                                       ^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:99:39: Error: Unexpected type 'Map<int, int>' of a spread.  Expected 'dynamic' or an Iterable.
+//  - 'Map' is from 'dart:core'.
+//   <int>[if (oracle("foo")) 42 else ...map];
+//                                       ^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:100:31: Error: Unexpected type 'Map<int, int>' of a spread.  Expected 'dynamic' or an Iterable.
+//  - 'Map' is from 'dart:core'.
+//   <int>{if (oracle("foo")) ...map else 42, null};
+//                               ^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:101:54: Error: Unexpected type 'List<int>' of a map spread entry.  Expected 'dynamic' or a Map.
+//  - 'List' is from 'dart:core'.
+//   <String, int>{if (oracle("foo")) "bar": 42 else ...[42], "baz": null};
+//                                                      ^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:210:14: Error: Setter not found: 'i'.
+//   <int>[for (i in <int>[1]) i];
+//              ^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:211:14: Error: Setter not found: 'i'.
+//   <int>{for (i in <int>[1]) i, null};
+//              ^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:212:21: Error: Setter not found: 'i'.
+// 	<String, int>{for (i in <int>[1]) "bar": i, "baz": null};
+// 	                   ^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:226:17: Error: The keyword 'await' isn't allowed for a normal 'for' statement.
+// Try removing the keyword, or use a for-each statement.
+//   var list50 = [await for (;;) 42];
+//                 ^^^^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:227:16: Error: The keyword 'await' isn't allowed for a normal 'for' statement.
+// Try removing the keyword, or use a for-each statement.
+//   var set50 = {await for (;;) 42, null};
+//                ^^^^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:228:16: Error: The keyword 'await' isn't allowed for a normal 'for' statement.
+// Try removing the keyword, or use a for-each statement.
+//   var map50 = {await for (;;) "bar": 42, "baz": null};
+//                ^^^^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:190:45: Error: A value of type 'String' can't be assigned to a variable of type 'int'.
+// Try changing the type of the left hand side, or casting the right hand side to 'int'.
+//   <int>[for (int i = 0; oracle("foo"); i++) "bar"];
+//                                             ^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:191:45: Error: A value of type 'String' can't be assigned to a variable of type 'int'.
+// Try changing the type of the left hand side, or casting the right hand side to 'int'.
+//   <int>{for (int i = 0; oracle("foo"); i++) "bar", null};
+//                                             ^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:192:50: Error: A value of type 'String' can't be assigned to a variable of type 'int'.
+// Try changing the type of the left hand side, or casting the right hand side to 'int'.
+//   <int, int>{for (int i = 0; oracle("foo"); i++) "bar": "bar", "baz": null};
+//                                                  ^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:192:57: Error: A value of type 'String' can't be assigned to a variable of type 'int'.
+// Try changing the type of the left hand side, or casting the right hand side to 'int'.
+//   <int, int>{for (int i = 0; oracle("foo"); i++) "bar": "bar", "baz": null};
+//                                                         ^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:192:64: Error: A value of type 'String' can't be assigned to a variable of type 'int'.
+// Try changing the type of the left hand side, or casting the right hand side to 'int'.
+//   <int, int>{for (int i = 0; oracle("foo"); i++) "bar": "bar", "baz": null};
+//                                                                ^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:192:14: Error: A value of type 'String' can't be assigned to a variable of type 'int'.
+// Try changing the type of the left hand side, or casting the right hand side to 'int'.
+//   <int, int>{for (int i = 0; oracle("foo"); i++) "bar": "bar", "baz": null};
+//              ^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:193:49: Error: A value of type 'String' can't be assigned to a variable of type 'int'.
+// Try changing the type of the left hand side, or casting the right hand side to 'int'.
+//   <int>[for (int i = 0; oracle("foo"); i++) ...["bar"]];
+//                                                 ^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:194:49: Error: A value of type 'String' can't be assigned to a variable of type 'int'.
+// Try changing the type of the left hand side, or casting the right hand side to 'int'.
+//   <int>{for (int i = 0; oracle("foo"); i++) ...["bar"], null};
+//                                                 ^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:195:54: Error: A value of type 'String' can't be assigned to a variable of type 'int'.
+// Try changing the type of the left hand side, or casting the right hand side to 'int'.
+//   <int, int>{for (int i = 0; oracle("foo"); i++) ...{"bar": "bar"}, "baz": null};
+//                                                      ^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:195:61: Error: A value of type 'String' can't be assigned to a variable of type 'int'.
+// Try changing the type of the left hand side, or casting the right hand side to 'int'.
+//   <int, int>{for (int i = 0; oracle("foo"); i++) ...{"bar": "bar"}, "baz": null};
+//                                                             ^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:195:69: Error: A value of type 'String' can't be assigned to a variable of type 'int'.
+// Try changing the type of the left hand side, or casting the right hand side to 'int'.
+//   <int, int>{for (int i = 0; oracle("foo"); i++) ...{"bar": "bar"}, "baz": null};
+//                                                                     ^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:196:48: Error: Unexpected type 'Map<int, int>' of a spread.  Expected 'dynamic' or an Iterable.
+//  - 'Map' is from 'dart:core'.
+//   <int>[for (int i = 0; oracle("foo"); i++) ...map];
+//                                                ^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:197:48: Error: Unexpected type 'Map<int, int>' of a spread.  Expected 'dynamic' or an Iterable.
+//  - 'Map' is from 'dart:core'.
+//   <int>{for (int i = 0; oracle("foo"); i++) ...map, null};
+//                                                ^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:198:53: Error: Unexpected type 'List<int>' of a map spread entry.  Expected 'dynamic' or a Map.
+//  - 'List' is from 'dart:core'.
+//   <int, int>{for (int i = 0; oracle("foo"); i++) ...list, 42: null};
+//                                                     ^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:199:48: Error: A value of type 'num' can't be assigned to a variable of type 'String'.
+// Try changing the type of the left hand side, or casting the right hand side to 'String'.
+//   <String>[for (int i = 0; oracle("foo"); i++) if (oracle()) 42 else 3.14];
+//                                                ^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:200:48: Error: A value of type 'num' can't be assigned to a variable of type 'String'.
+// Try changing the type of the left hand side, or casting the right hand side to 'String'.
+//   <String>{for (int i = 0; oracle("foo"); i++) if (oracle()) 42 else 3.14, null};
+//                                                ^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:201:77: Error: A value of type 'int' can't be assigned to a variable of type 'String'.
+// Try changing the type of the left hand side, or casting the right hand side to 'String'.
+//   <String, String>{for (int i = 0; oracle("foo"); i++) if (oracle()) "bar": 42 else "bar": 3.14, "baz": null};
+//                                                                             ^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:201:92: Error: A value of type 'double' can't be assigned to a variable of type 'String'.
+// Try changing the type of the left hand side, or casting the right hand side to 'String'.
+//   <String, String>{for (int i = 0; oracle("foo"); i++) if (oracle()) "bar": 42 else "bar": 3.14, "baz": null};
+//                                                                                            ^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:201:20: Error: A value of type 'num' can't be assigned to a variable of type 'String'.
+// Try changing the type of the left hand side, or casting the right hand side to 'String'.
+//   <String, String>{for (int i = 0; oracle("foo"); i++) if (oracle()) "bar": 42 else "bar": 3.14, "baz": null};
+//                    ^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:202:62: Error: Unexpected type 'Map<int, int>' of a spread.  Expected 'dynamic' or an Iterable.
+//  - 'Map' is from 'dart:core'.
+//   <int>[for (int i = 0; oracle("foo"); i++) if (oracle()) ...map else 42];
+//                                                              ^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:203:62: Error: Unexpected type 'Map<int, int>' of a spread.  Expected 'dynamic' or an Iterable.
+//  - 'Map' is from 'dart:core'.
+//   <int>{for (int i = 0; oracle("foo"); i++) if (oracle()) ...map else 42, null};
+//                                                              ^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:204:70: Error: Unexpected type 'List<int>' of a map spread entry.  Expected 'dynamic' or a Map.
+//  - 'List' is from 'dart:core'.
+//   <String, int>{for (int i = 0; oracle("foo"); i++) if (oracle()) ...list else "bar": 42, "baz": null};
+//                                                                      ^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:205:70: Error: Unexpected type 'Map<int, int>' of a spread.  Expected 'dynamic' or an Iterable.
+//  - 'Map' is from 'dart:core'.
+//   <int>[for (int i = 0; oracle("foo"); i++) if (oracle()) 42 else ...map];
+//                                                                      ^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:206:70: Error: Unexpected type 'Map<int, int>' of a spread.  Expected 'dynamic' or an Iterable.
+//  - 'Map' is from 'dart:core'.
+//   <int>{for (int i = 0; oracle("foo"); i++) if (oracle()) 42 else ...map, null};
+//                                                                      ^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:207:85: Error: Unexpected type 'List<int>' of a map spread entry.  Expected 'dynamic' or a Map.
+//  - 'List' is from 'dart:core'.
+//   <String, int>{for (int i = 0; oracle("foo"); i++) if (oracle()) "bar": 42 else ...list, "baz": null};
+//                                                                                     ^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:214:31: Error: The type 'String' used in the 'for' loop must implement 'Iterable<dynamic>'.
+//  - 'Iterable' is from 'dart:core'.
+//   var list10 = [for (var i in "not iterable") i];
+//                               ^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:215:30: Error: The type 'String' used in the 'for' loop must implement 'Iterable<dynamic>'.
+//  - 'Iterable' is from 'dart:core'.
+//   var set10 = {for (var i in "not iterable") i, null};
+//                              ^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:216:30: Error: The type 'String' used in the 'for' loop must implement 'Iterable<dynamic>'.
+//  - 'Iterable' is from 'dart:core'.
+//   var map10 = {for (var i in "not iterable") "bar": i, "baz": null};
+//                              ^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:217:32: Error: A value of type 'String' can't be assigned to a variable of type 'int'.
+// Try changing the type of the left hand side, or casting the right hand side to 'int'.
+//   var list20 = [for (int i in ["not", "int"]) i];
+//                                ^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:217:39: Error: A value of type 'String' can't be assigned to a variable of type 'int'.
+// Try changing the type of the left hand side, or casting the right hand side to 'int'.
+//   var list20 = [for (int i in ["not", "int"]) i];
+//                                       ^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:218:31: Error: A value of type 'String' can't be assigned to a variable of type 'int'.
+// Try changing the type of the left hand side, or casting the right hand side to 'int'.
+//   var set20 = {for (int i in ["not", "int"]) i, null};
+//                               ^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:218:38: Error: A value of type 'String' can't be assigned to a variable of type 'int'.
+// Try changing the type of the left hand side, or casting the right hand side to 'int'.
+//   var set20 = {for (int i in ["not", "int"]) i, null};
+//                                      ^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:219:31: Error: A value of type 'String' can't be assigned to a variable of type 'int'.
+// Try changing the type of the left hand side, or casting the right hand side to 'int'.
+//   var map20 = {for (int i in ["not", "int"]) "bar": i, "baz": null};
+//                               ^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:219:38: Error: A value of type 'String' can't be assigned to a variable of type 'int'.
+// Try changing the type of the left hand side, or casting the right hand side to 'int'.
+//   var map20 = {for (int i in ["not", "int"]) "bar": i, "baz": null};
+//                                      ^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:220:37: Error: The type 'String' used in the 'for' loop must implement 'Stream<dynamic>'.
+//  - 'Stream' is from 'dart:async'.
+//   var list30 = [await for (var i in "not stream") i];
+//                                     ^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:221:36: Error: The type 'String' used in the 'for' loop must implement 'Stream<dynamic>'.
+//  - 'Stream' is from 'dart:async'.
+//   var set30 = {await for (var i in "not stream") i, null};
+//                                    ^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:222:36: Error: The type 'String' used in the 'for' loop must implement 'Stream<dynamic>'.
+//  - 'Stream' is from 'dart:async'.
+//   var map30 = {await for (var i in "not stream") "bar": i, "baz": null};
+//                                    ^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:223:58: Error: A value of type 'String' can't be assigned to a variable of type 'int'.
+// Try changing the type of the left hand side, or casting the right hand side to 'int'.
+//   var list40 = [await for (int i in Stream.fromIterable(["not", "int"])) i];
+//                                                          ^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:223:65: Error: A value of type 'String' can't be assigned to a variable of type 'int'.
+// Try changing the type of the left hand side, or casting the right hand side to 'int'.
+//   var list40 = [await for (int i in Stream.fromIterable(["not", "int"])) i];
+//                                                                 ^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:224:57: Error: A value of type 'String' can't be assigned to a variable of type 'int'.
+// Try changing the type of the left hand side, or casting the right hand side to 'int'.
+//   var set40 = {await for (int i in Stream.fromIterable(["not", "int"])) i, null};
+//                                                         ^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:224:64: Error: A value of type 'String' can't be assigned to a variable of type 'int'.
+// Try changing the type of the left hand side, or casting the right hand side to 'int'.
+//   var set40 = {await for (int i in Stream.fromIterable(["not", "int"])) i, null};
+//                                                                ^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:225:57: Error: A value of type 'String' can't be assigned to a variable of type 'int'.
+// Try changing the type of the left hand side, or casting the right hand side to 'int'.
+//   var map40 = {await for (int i in Stream.fromIterable(["not", "int"])) "bar": i, "baz": null};
+//                                                         ^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:225:64: Error: A value of type 'String' can't be assigned to a variable of type 'int'.
+// Try changing the type of the left hand side, or casting the right hand side to 'int'.
+//   var map40 = {await for (int i in Stream.fromIterable(["not", "int"])) "bar": i, "baz": null};
+//                                                                ^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:229:24: Error: A value of type 'String' can't be assigned to a variable of type 'bool'.
+// Try changing the type of the left hand side, or casting the right hand side to 'bool'.
+//   var list60 = [for (; "not bool";) 42];
+//                        ^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:230:23: Error: A value of type 'String' can't be assigned to a variable of type 'bool'.
+// Try changing the type of the left hand side, or casting the right hand side to 'bool'.
+//   var set60 = {for (; "not bool";) 42, null};
+//                       ^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:231:23: Error: A value of type 'String' can't be assigned to a variable of type 'bool'.
+// Try changing the type of the left hand side, or casting the right hand side to 'bool'.
+//   var map60 = {for (; "not bool";) "bar": 42, "baz": null};
+//                       ^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:235:26: Error: The asynchronous for-in can only be used in functions marked with 'async' or 'async*'.
+// Try marking the function body with either 'async' or 'async*', or removing the 'await' before the for loop.
+//   <int>[await for (int i in stream) i];
+//                          ^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:236:26: Error: The asynchronous for-in can only be used in functions marked with 'async' or 'async*'.
+// Try marking the function body with either 'async' or 'async*', or removing the 'await' before the for loop.
+//   <int>{await for (int i in stream) i};
+//                          ^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:237:34: Error: The asynchronous for-in can only be used in functions marked with 'async' or 'async*'.
+// Try marking the function body with either 'async' or 'async*', or removing the 'await' before the for loop.
+//   <String, int>{await for (int i in stream) "bar": i};
+//                                  ^^
+//
+import self as self;
+import "dart:core" as core;
+import "dart:collection" as col;
+import "dart:async" as asy;
+
+static method oracle<T extends core::Object = dynamic>([self::oracle::T t = null]) → dynamic
+  return true;
+static method testIfElement(dynamic dynVar, core::List<core::int> listInt, core::List<core::double> listDouble, core::Map<core::String, core::int> mapToInt, core::Map<core::String, core::double> mapToDouble) → dynamic {
+  core::List<core::int> list10 = block {
+    final core::List<core::int> #t1 = <core::int>[];
+    if(self::oracle<core::String>("foo"))
+      #t1.{core::List::add}(42);
+  } =>#t1;
+  core::Set<core::int> set10 = block {
+    final core::Set<core::int> #t2 = col::LinkedHashSet::•<core::int>();
+    if(self::oracle<core::String>("foo"))
+      #t2.{core::Set::add}(42);
+    #t2.{core::Set::add}(null);
+  } =>#t2;
+  core::Map<core::String, core::int> map10 = block {
+    final core::Map<core::String, core::int> #t3 = <core::String, core::int>{};
+    if(self::oracle<core::String>("foo"))
+      #t3.{core::Map::[]=}("bar", 42);
+    #t3.{core::Map::[]=}("baz", null);
+  } =>#t3;
+  core::List<dynamic> list11 = block {
+    final core::List<dynamic> #t4 = <dynamic>[];
+    if(self::oracle<core::String>("foo"))
+      #t4.{core::List::add}(dynVar);
+  } =>#t4;
+  core::Set<dynamic> set11 = block {
+    final core::Set<dynamic> #t5 = col::LinkedHashSet::•<dynamic>();
+    if(self::oracle<core::String>("foo"))
+      #t5.{core::Set::add}(dynVar);
+    #t5.{core::Set::add}(null);
+  } =>#t5;
+  core::Map<core::String, dynamic> map11 = block {
+    final core::Map<core::String, dynamic> #t6 = <core::String, dynamic>{};
+    if(self::oracle<core::String>("foo"))
+      #t6.{core::Map::[]=}("bar", dynVar);
+    #t6.{core::Map::[]=}("baz", null);
+  } =>#t6;
+  core::List<core::List<core::int>> list12 = block {
+    final core::List<core::List<core::int>> #t7 = <core::List<core::int>>[];
+    if(self::oracle<core::String>("foo"))
+      #t7.{core::List::add}(<core::int>[42]);
+  } =>#t7;
+  core::Set<core::List<core::int>> set12 = block {
+    final core::Set<core::List<core::int>> #t8 = col::LinkedHashSet::•<core::List<core::int>>();
+    if(self::oracle<core::String>("foo"))
+      #t8.{core::Set::add}(<core::int>[42]);
+    #t8.{core::Set::add}(null);
+  } =>#t8;
+  core::Map<core::String, core::List<core::int>> map12 = block {
+    final core::Map<core::String, core::List<core::int>> #t9 = <core::String, core::List<core::int>>{};
+    if(self::oracle<core::String>("foo"))
+      #t9.{core::Map::[]=}("bar", <core::int>[42]);
+    #t9.{core::Map::[]=}("baz", null);
+  } =>#t9;
+  core::List<core::int> list20 = block {
+    final core::List<core::int> #t10 = <core::int>[];
+    if(self::oracle<core::String>("foo"))
+      for (final core::int #t11 in <core::int>[42])
+        #t10.{core::List::add}(#t11);
+  } =>#t10;
+  core::Set<core::int> set20 = block {
+    final core::Set<core::int> #t12 = col::LinkedHashSet::•<core::int>();
+    if(self::oracle<core::String>("foo"))
+      for (final core::int #t13 in <core::int>[42])
+        #t12.{core::Set::add}(#t13);
+    #t12.{core::Set::add}(null);
+  } =>#t12;
+  core::Map<core::String, core::int> map20 = block {
+    final core::Map<core::String, core::int> #t14 = <core::String, core::int>{};
+    if(self::oracle<core::String>("foo"))
+      for (final core::MapEntry<core::String, core::int> #t15 in <core::String, core::int>{"bar": 42}.{core::Map::entries})
+        #t14.{core::Map::[]=}(#t15.{core::MapEntry::key}, #t15.{core::MapEntry::value});
+    #t14.{core::Map::[]=}("baz", null);
+  } =>#t14;
+  core::List<dynamic> list21 = block {
+    final core::List<dynamic> #t16 = <dynamic>[];
+    if(self::oracle<core::String>("foo"))
+      for (final dynamic #t17 in <dynamic>[dynVar])
+        #t16.{core::List::add}(#t17);
+  } =>#t16;
+  core::Set<dynamic> set21 = block {
+    final core::Set<dynamic> #t18 = col::LinkedHashSet::•<dynamic>();
+    if(self::oracle<core::String>("foo"))
+      for (final dynamic #t19 in <dynamic>[dynVar])
+        #t18.{core::Set::add}(#t19);
+    #t18.{core::Set::add}(null);
+  } =>#t18;
+  core::Map<core::String, dynamic> map21 = block {
+    final core::Map<core::String, dynamic> #t20 = <core::String, dynamic>{};
+    if(self::oracle<core::String>("foo"))
+      for (final core::MapEntry<core::String, dynamic> #t21 in <core::String, dynamic>{"bar": dynVar}.{core::Map::entries})
+        #t20.{core::Map::[]=}(#t21.{core::MapEntry::key}, #t21.{core::MapEntry::value});
+    #t20.{core::Map::[]=}("baz", null);
+  } =>#t20;
+  core::List<core::List<core::int>> list22 = block {
+    final core::List<core::List<core::int>> #t22 = <core::List<core::int>>[];
+    if(self::oracle<core::String>("foo"))
+      for (final core::List<core::int> #t23 in <core::List<core::int>>[<core::int>[42]])
+        #t22.{core::List::add}(#t23);
+  } =>#t22;
+  core::Set<core::List<core::int>> set22 = block {
+    final core::Set<core::List<core::int>> #t24 = col::LinkedHashSet::•<core::List<core::int>>();
+    if(self::oracle<core::String>("foo"))
+      for (final core::List<core::int> #t25 in <core::List<core::int>>[<core::int>[42]])
+        #t24.{core::Set::add}(#t25);
+    #t24.{core::Set::add}(null);
+  } =>#t24;
+  core::Map<core::String, core::List<core::int>> map22 = block {
+    final core::Map<core::String, core::List<core::int>> #t26 = <core::String, core::List<core::int>>{};
+    if(self::oracle<core::String>("foo"))
+      for (final core::MapEntry<core::String, core::List<core::int>> #t27 in <core::String, core::List<core::int>>{"bar": <core::int>[42]}.{core::Map::entries})
+        #t26.{core::Map::[]=}(#t27.{core::MapEntry::key}, #t27.{core::MapEntry::value});
+    #t26.{core::Map::[]=}("baz", null);
+  } =>#t26;
+  core::List<core::int> list30 = block {
+    final core::List<core::int> #t28 = <core::int>[];
+    if(self::oracle<core::String>("foo"))
+      if(self::oracle<dynamic>())
+        for (final core::int #t29 in <core::int>[42])
+          #t28.{core::List::add}(#t29);
+  } =>#t28;
+  core::Set<core::int> set30 = block {
+    final core::Set<core::int> #t30 = col::LinkedHashSet::•<core::int>();
+    if(self::oracle<core::String>("foo"))
+      if(self::oracle<dynamic>())
+        for (final core::int #t31 in <core::int>[42])
+          #t30.{core::Set::add}(#t31);
+    #t30.{core::Set::add}(null);
+  } =>#t30;
+  core::Map<core::String, core::int> map30 = block {
+    final core::Map<core::String, core::int> #t32 = <core::String, core::int>{};
+    if(self::oracle<core::String>("foo"))
+      if(self::oracle<dynamic>())
+        for (final core::MapEntry<core::String, core::int> #t33 in <core::String, core::int>{"bar": 42}.{core::Map::entries})
+          #t32.{core::Map::[]=}(#t33.{core::MapEntry::key}, #t33.{core::MapEntry::value});
+    #t32.{core::Map::[]=}("baz", null);
+  } =>#t32;
+  core::List<dynamic> list31 = block {
+    final core::List<dynamic> #t34 = <dynamic>[];
+    if(self::oracle<core::String>("foo"))
+      if(self::oracle<dynamic>())
+        for (final dynamic #t35 in <dynamic>[dynVar])
+          #t34.{core::List::add}(#t35);
+  } =>#t34;
+  core::Set<dynamic> set31 = block {
+    final core::Set<dynamic> #t36 = col::LinkedHashSet::•<dynamic>();
+    if(self::oracle<core::String>("foo"))
+      if(self::oracle<dynamic>())
+        for (final dynamic #t37 in <dynamic>[dynVar])
+          #t36.{core::Set::add}(#t37);
+    #t36.{core::Set::add}(null);
+  } =>#t36;
+  core::Map<core::String, dynamic> map31 = block {
+    final core::Map<core::String, dynamic> #t38 = <core::String, dynamic>{};
+    if(self::oracle<core::String>("foo"))
+      if(self::oracle<dynamic>())
+        for (final core::MapEntry<core::String, dynamic> #t39 in <core::String, dynamic>{"bar": dynVar}.{core::Map::entries})
+          #t38.{core::Map::[]=}(#t39.{core::MapEntry::key}, #t39.{core::MapEntry::value});
+    #t38.{core::Map::[]=}("baz", null);
+  } =>#t38;
+  core::List<core::List<core::int>> list33 = block {
+    final core::List<core::List<core::int>> #t40 = <core::List<core::int>>[];
+    if(self::oracle<core::String>("foo"))
+      if(self::oracle<dynamic>())
+        for (final core::List<core::int> #t41 in <core::List<core::int>>[<core::int>[42]])
+          #t40.{core::List::add}(#t41);
+  } =>#t40;
+  core::Set<core::List<core::int>> set33 = block {
+    final core::Set<core::List<core::int>> #t42 = col::LinkedHashSet::•<core::List<core::int>>();
+    if(self::oracle<core::String>("foo"))
+      if(self::oracle<dynamic>())
+        for (final core::List<core::int> #t43 in <core::List<core::int>>[<core::int>[42]])
+          #t42.{core::Set::add}(#t43);
+    #t42.{core::Set::add}(null);
+  } =>#t42;
+  core::Map<core::String, core::List<core::int>> map33 = block {
+    final core::Map<core::String, core::List<core::int>> #t44 = <core::String, core::List<core::int>>{};
+    if(self::oracle<core::String>("foo"))
+      if(self::oracle<dynamic>())
+        for (final core::MapEntry<core::String, core::List<core::int>> #t45 in <core::String, core::List<core::int>>{"bar": <core::int>[42]}.{core::Map::entries})
+          #t44.{core::Map::[]=}(#t45.{core::MapEntry::key}, #t45.{core::MapEntry::value});
+    #t44.{core::Map::[]=}("baz", null);
+  } =>#t44;
+  core::List<core::List<core::int>> list40 = block {
+    final core::List<core::List<core::int>> #t46 = <core::List<core::int>>[];
+    if(self::oracle<core::String>("foo"))
+      for (final core::List<core::int> #t47 in <core::List<core::int>>[<core::int>[]])
+        #t46.{core::List::add}(#t47);
+  } =>#t46;
+  core::Set<core::List<core::int>> set40 = block {
+    final core::Set<core::List<core::int>> #t48 = col::LinkedHashSet::•<core::List<core::int>>();
+    if(self::oracle<core::String>("foo"))
+      for (final core::List<core::int> #t49 in <core::List<core::int>>[<core::int>[]])
+        #t48.{core::Set::add}(#t49);
+    #t48.{core::Set::add}(null);
+  } =>#t48;
+  core::Map<core::String, core::List<core::int>> map40 = invalid-expression "pkg/front_end/testcases/control_flow_collection_inference.dart:39:34: Error: Both Iterable and Map spread elements encountered in ambiguous literal.
+  Map<String, List<int>> map40 = {if (oracle(\"foo\")) ...{\"bar\", []}, \"baz\": null};
+                                 ^";
+  core::List<core::List<core::int>> list41 = block {
+    final core::List<core::List<core::int>> #t50 = <core::List<core::int>>[];
+    if(self::oracle<core::String>("foo"))
+      for (final core::List<core::int> #t51 in let final core::Set<core::List<core::int>> #t52 = col::LinkedHashSet::•<core::List<core::int>>() in let final core::bool #t53 = #t52.{core::Set::add}(<core::int>[]) in #t52)
+        #t50.{core::List::add}(#t51);
+  } =>#t50;
+  core::Set<core::List<core::int>> set41 = block {
+    final core::Set<core::List<core::int>> #t54 = col::LinkedHashSet::•<core::List<core::int>>();
+    if(self::oracle<core::String>("foo"))
+      for (final core::List<core::int> #t55 in let final core::Set<core::List<core::int>> #t56 = col::LinkedHashSet::•<core::List<core::int>>() in let final core::bool #t57 = #t56.{core::Set::add}(<core::int>[]) in #t56)
+        #t54.{core::Set::add}(#t55);
+    #t54.{core::Set::add}(null);
+  } =>#t54;
+  core::List<core::List<core::int>> list42 = block {
+    final core::List<core::List<core::int>> #t58 = <core::List<core::int>>[];
+    if(self::oracle<core::String>("foo"))
+      if(self::oracle<dynamic>())
+        for (final core::List<core::int> #t59 in <core::List<core::int>>[<core::int>[]])
+          #t58.{core::List::add}(#t59);
+  } =>#t58;
+  core::Set<core::List<core::int>> set42 = block {
+    final core::Set<core::List<core::int>> #t60 = col::LinkedHashSet::•<core::List<core::int>>();
+    if(self::oracle<core::String>("foo"))
+      if(self::oracle<dynamic>())
+        for (final core::List<core::int> #t61 in <core::List<core::int>>[<core::int>[]])
+          #t60.{core::Set::add}(#t61);
+    #t60.{core::Set::add}(null);
+  } =>#t60;
+  core::Map<core::String, core::List<core::int>> map42 = block {
+    final core::Map<core::String, core::List<core::int>> #t62 = <core::String, core::List<core::int>>{};
+    if(self::oracle<core::String>("foo"))
+      if(self::oracle<dynamic>())
+        for (final core::MapEntry<core::String, core::List<core::int>> #t63 in <core::String, core::List<core::int>>{"bar": <core::int>[]}.{core::Map::entries})
+          #t62.{core::Map::[]=}(#t63.{core::MapEntry::key}, #t63.{core::MapEntry::value});
+    #t62.{core::Map::[]=}("baz", null);
+  } =>#t62;
+  core::List<core::int> list50 = block {
+    final core::List<core::int> #t64 = <core::int>[];
+    if(self::oracle<core::String>("foo"))
+      for (final core::int #t65 in <core::int>[])
+        #t64.{core::List::add}(#t65);
+  } =>#t64;
+  core::Set<core::int> set50 = block {
+    final core::Set<core::int> #t66 = col::LinkedHashSet::•<core::int>();
+    if(self::oracle<core::String>("foo"))
+      for (final core::int #t67 in <core::int>[])
+        #t66.{core::Set::add}(#t67);
+    #t66.{core::Set::add}(null);
+  } =>#t66;
+  core::Map<core::String, core::int> map50 = block {
+    final core::Map<core::String, core::int> #t68 = <core::String, core::int>{};
+    if(self::oracle<core::String>("foo"))
+      for (final core::MapEntry<core::String, core::int> #t69 in <core::String, core::int>{}.{core::Map::entries})
+        #t68.{core::Map::[]=}(#t69.{core::MapEntry::key}, #t69.{core::MapEntry::value});
+    #t68.{core::Map::[]=}("baz", null);
+  } =>#t68;
+  core::List<core::int> list51 = block {
+    final core::List<core::int> #t70 = <core::int>[];
+    if(self::oracle<core::String>("foo"))
+      for (final core::int #t71 in let final core::Set<core::int> #t72 = col::LinkedHashSet::•<core::int>() in #t72)
+        #t70.{core::List::add}(#t71);
+  } =>#t70;
+  core::Set<core::int> set51 = block {
+    final core::Set<core::int> #t73 = col::LinkedHashSet::•<core::int>();
+    if(self::oracle<core::String>("foo"))
+      for (final core::int #t74 in let final core::Set<core::int> #t75 = col::LinkedHashSet::•<core::int>() in #t75)
+        #t73.{core::Set::add}(#t74);
+    #t73.{core::Set::add}(null);
+  } =>#t73;
+  core::List<core::int> list52 = block {
+    final core::List<core::int> #t76 = <core::int>[];
+    if(self::oracle<core::String>("foo"))
+      if(self::oracle<dynamic>())
+        for (final core::int #t77 in <core::int>[])
+          #t76.{core::List::add}(#t77);
+  } =>#t76;
+  core::Set<core::int> set52 = block {
+    final core::Set<core::int> #t78 = col::LinkedHashSet::•<core::int>();
+    if(self::oracle<core::String>("foo"))
+      if(self::oracle<dynamic>())
+        for (final core::int #t79 in <core::int>[])
+          #t78.{core::Set::add}(#t79);
+    #t78.{core::Set::add}(null);
+  } =>#t78;
+  core::Map<core::String, core::int> map52 = block {
+    final core::Map<core::String, core::int> #t80 = <core::String, core::int>{};
+    if(self::oracle<core::String>("foo"))
+      if(self::oracle<dynamic>())
+        for (final core::MapEntry<core::String, core::int> #t81 in <core::String, core::int>{}.{core::Map::entries})
+          #t80.{core::Map::[]=}(#t81.{core::MapEntry::key}, #t81.{core::MapEntry::value});
+    #t80.{core::Map::[]=}("baz", null);
+  } =>#t80;
+  core::List<core::List<core::int>> list60 = block {
+    final core::List<core::List<core::int>> #t82 = <core::List<core::int>>[];
+    if(self::oracle<core::String>("foo"))
+      for (final core::List<core::int> #t83 in <core::List<core::int>>[<core::int>[]])
+        #t82.{core::List::add}(#t83);
+  } =>#t82;
+  core::Set<core::List<core::int>> set60 = block {
+    final core::Set<core::List<core::int>> #t84 = col::LinkedHashSet::•<core::List<core::int>>();
+    if(self::oracle<core::String>("foo"))
+      for (final core::List<core::int> #t85 in <core::List<core::int>>[<core::int>[]])
+        #t84.{core::Set::add}(#t85);
+    #t84.{core::Set::add}(null);
+  } =>#t84;
+  core::Map<core::String, core::List<core::int>> map60 = block {
+    final core::Map<core::String, core::List<core::int>> #t86 = <core::String, core::List<core::int>>{};
+    if(self::oracle<core::String>("foo"))
+      for (final core::MapEntry<core::String, core::List<core::int>> #t87 in <core::String, core::List<core::int>>{"bar": <core::int>[]}.{core::Map::entries})
+        #t86.{core::Map::[]=}(#t87.{core::MapEntry::key}, #t87.{core::MapEntry::value});
+    #t86.{core::Map::[]=}("baz", null);
+  } =>#t86;
+  core::List<core::List<core::int>> list61 = block {
+    final core::List<core::List<core::int>> #t88 = <core::List<core::int>>[];
+    if(self::oracle<core::String>("foo"))
+      if(self::oracle<dynamic>())
+        for (final core::List<core::int> #t89 in <core::List<core::int>>[<core::int>[]])
+          #t88.{core::List::add}(#t89);
+  } =>#t88;
+  core::Set<core::List<core::int>> set61 = block {
+    final core::Set<core::List<core::int>> #t90 = col::LinkedHashSet::•<core::List<core::int>>();
+    if(self::oracle<core::String>("foo"))
+      if(self::oracle<dynamic>())
+        for (final core::List<core::int> #t91 in <core::List<core::int>>[<core::int>[]])
+          #t90.{core::Set::add}(#t91);
+    #t90.{core::Set::add}(null);
+  } =>#t90;
+  core::Map<core::String, core::List<core::int>> map61 = block {
+    final core::Map<core::String, core::List<core::int>> #t92 = <core::String, core::List<core::int>>{};
+    if(self::oracle<core::String>("foo"))
+      if(self::oracle<dynamic>())
+        for (final core::MapEntry<core::String, core::List<core::int>> #t93 in <core::String, core::List<core::int>>{"bar": <core::int>[]}.{core::Map::entries})
+          #t92.{core::Map::[]=}(#t93.{core::MapEntry::key}, #t93.{core::MapEntry::value});
+    #t92.{core::Map::[]=}("baz", null);
+  } =>#t92;
+  core::List<core::List<core::int>> list70 = block {
+    final core::List<core::List<core::int>> #t94 = <core::List<core::int>>[];
+    if(self::oracle<core::String>("foo"))
+      #t94.{core::List::add}(<core::int>[]);
+  } =>#t94;
+  core::Set<core::List<core::int>> set70 = block {
+    final core::Set<core::List<core::int>> #t95 = col::LinkedHashSet::•<core::List<core::int>>();
+    if(self::oracle<core::String>("foo"))
+      #t95.{core::Set::add}(<core::int>[]);
+    #t95.{core::Set::add}(null);
+  } =>#t95;
+  core::List<core::List<core::int>> list71 = block {
+    final core::List<core::List<core::int>> #t96 = <core::List<core::int>>[];
+    if(self::oracle<core::String>("foo"))
+      if(self::oracle<dynamic>())
+        #t96.{core::List::add}(<core::int>[]);
+  } =>#t96;
+  core::Set<core::List<core::int>> set71 = block {
+    final core::Set<core::List<core::int>> #t97 = col::LinkedHashSet::•<core::List<core::int>>();
+    if(self::oracle<core::String>("foo"))
+      if(self::oracle<dynamic>())
+        #t97.{core::Set::add}(<core::int>[]);
+    #t97.{core::Set::add}(null);
+  } =>#t97;
+  core::List<core::num> list80 = block {
+    final core::List<core::num> #t98 = <core::num>[];
+    if(self::oracle<core::String>("foo"))
+      #t98.{core::List::add}(42);
+    else
+      #t98.{core::List::add}(3.14);
+  } =>#t98;
+  core::Set<core::num> set80 = block {
+    final core::Set<core::num> #t99 = col::LinkedHashSet::•<core::num>();
+    if(self::oracle<core::String>("foo"))
+      #t99.{core::Set::add}(42);
+    else
+      #t99.{core::Set::add}(3.14);
+    #t99.{core::Set::add}(null);
+  } =>#t99;
+  core::Map<core::String, core::num> map80 = block {
+    final core::Map<core::String, core::num> #t100 = <core::String, core::num>{};
+    if(self::oracle<core::String>("foo"))
+      #t100.{core::Map::[]=}("bar", 42);
+    else
+      #t100.{core::Map::[]=}("bar", 3.14);
+    #t100.{core::Map::[]=}("baz", null);
+  } =>#t100;
+  core::List<core::num> list81 = block {
+    final core::List<core::num> #t101 = <core::num>[];
+    if(self::oracle<core::String>("foo"))
+      for (final core::num #t102 in listInt)
+        #t101.{core::List::add}(#t102);
+    else
+      for (final core::num #t103 in listDouble)
+        #t101.{core::List::add}(#t103);
+  } =>#t101;
+  core::Set<core::num> set81 = block {
+    final core::Set<core::num> #t104 = col::LinkedHashSet::•<core::num>();
+    if(self::oracle<core::String>("foo"))
+      for (final core::num #t105 in listInt)
+        #t104.{core::Set::add}(#t105);
+    else
+      for (final core::num #t106 in listDouble)
+        #t104.{core::Set::add}(#t106);
+    #t104.{core::Set::add}(null);
+  } =>#t104;
+  core::Map<core::String, core::num> map81 = block {
+    final core::Map<core::String, core::num> #t107 = <core::String, core::num>{};
+    if(self::oracle<core::String>("foo"))
+      for (final core::MapEntry<core::String, core::num> #t108 in mapToInt.{core::Map::entries})
+        #t107.{core::Map::[]=}(#t108.{core::MapEntry::key}, #t108.{core::MapEntry::value});
+    else
+      for (final core::MapEntry<core::String, core::num> #t109 in mapToDouble.{core::Map::entries})
+        #t107.{core::Map::[]=}(#t109.{core::MapEntry::key}, #t109.{core::MapEntry::value});
+    #t107.{core::Map::[]=}("baz", null);
+  } =>#t107;
+  core::List<dynamic> list82 = block {
+    final core::List<dynamic> #t110 = <dynamic>[];
+    if(self::oracle<core::String>("foo"))
+      for (final dynamic #t111 in listInt)
+        #t110.{core::List::add}(#t111);
+    else
+      for (final dynamic #t112 in dynVar as{TypeError} core::Iterable<dynamic>)
+        #t110.{core::List::add}(#t112);
+  } =>#t110;
+  core::Set<dynamic> set82 = block {
+    final core::Set<dynamic> #t113 = col::LinkedHashSet::•<dynamic>();
+    if(self::oracle<core::String>("foo"))
+      for (final dynamic #t114 in listInt)
+        #t113.{core::Set::add}(#t114);
+    else
+      for (final dynamic #t115 in dynVar as{TypeError} core::Iterable<dynamic>)
+        #t113.{core::Set::add}(#t115);
+    #t113.{core::Set::add}(null);
+  } =>#t113;
+  core::Set<dynamic> map82 = block {
+    final core::Set<dynamic> #t116 = col::LinkedHashSet::•<dynamic>();
+    if(self::oracle<core::String>("foo"))
+      #t116.{core::Set::add}(invalid-expression "pkg/front_end/testcases/control_flow_collection_inference.dart:71:38: Error: Unexpected type 'Map<String, int>' of a spread.  Expected 'dynamic' or an Iterable.
+ - 'Map' is from 'dart:core'.
+  var map82 = {if (oracle(\"foo\")) ...mapToInt else ...dynVar, null};
+                                     ^");
+    else
+      for (final dynamic #t117 in dynVar as{TypeError} core::Iterable<dynamic>)
+        #t116.{core::Set::add}(#t117);
+    #t116.{core::Set::add}(null);
+  } =>#t116;
+  core::List<core::num> list83 = block {
+    final core::List<core::num> #t118 = <core::num>[];
+    if(self::oracle<core::String>("foo"))
+      #t118.{core::List::add}(42);
+    else
+      for (final core::num #t119 in listDouble)
+        #t118.{core::List::add}(#t119);
+  } =>#t118;
+  core::Set<core::num> set83 = block {
+    final core::Set<core::num> #t120 = col::LinkedHashSet::•<core::num>();
+    if(self::oracle<core::String>("foo"))
+      for (final core::num #t121 in listInt)
+        #t120.{core::Set::add}(#t121);
+    else
+      #t120.{core::Set::add}(3.14);
+    #t120.{core::Set::add}(null);
+  } =>#t120;
+  core::Map<core::String, core::num> map83 = block {
+    final core::Map<core::String, core::num> #t122 = <core::String, core::num>{};
+    if(self::oracle<core::String>("foo"))
+      for (final core::MapEntry<core::String, core::num> #t123 in mapToInt.{core::Map::entries})
+        #t122.{core::Map::[]=}(#t123.{core::MapEntry::key}, #t123.{core::MapEntry::value});
+    else
+      #t122.{core::Map::[]=}("bar", 3.14);
+    #t122.{core::Map::[]=}("baz", null);
+  } =>#t122;
+  core::List<core::int> list90 = block {
+    final core::List<core::int> #t124 = <core::int>[];
+    if(self::oracle<core::String>("foo"))
+      #t124.{core::List::add}(dynVar as{TypeError} core::int);
+  } =>#t124;
+  core::Set<core::int> set90 = block {
+    final core::Set<core::int> #t125 = col::LinkedHashSet::•<core::int>();
+    if(self::oracle<core::String>("foo"))
+      #t125.{core::Set::add}(dynVar as{TypeError} core::int);
+    #t125.{core::Set::add}(null);
+  } =>#t125;
+  core::Map<core::String, core::int> map90 = block {
+    final core::Map<core::String, core::int> #t126 = <core::String, core::int>{};
+    if(self::oracle<core::String>("foo"))
+      #t126.{core::Map::[]=}("bar", dynVar as{TypeError} core::int);
+    #t126.{core::Map::[]=}("baz", null);
+  } =>#t126;
+  core::List<core::int> list91 = block {
+    final core::List<core::int> #t127 = <core::int>[];
+    if(self::oracle<core::String>("foo"))
+      for (final dynamic #t128 in dynVar as{TypeError} core::Iterable<dynamic>) {
+        final core::int #t129 = #t128 as{TypeError} core::int;
+        #t127.{core::List::add}(#t129);
+      }
+  } =>#t127;
+  core::Set<core::int> set91 = block {
+    final core::Set<core::int> #t130 = col::LinkedHashSet::•<core::int>();
+    if(self::oracle<core::String>("foo"))
+      for (final dynamic #t131 in dynVar as{TypeError} core::Iterable<dynamic>) {
+        final core::int #t132 = #t131 as{TypeError} core::int;
+        #t130.{core::Set::add}(#t132);
+      }
+    #t130.{core::Set::add}(null);
+  } =>#t130;
+  core::Map<core::String, core::int> map91 = block {
+    final core::Map<core::String, core::int> #t133 = <core::String, core::int>{};
+    if(self::oracle<core::String>("foo"))
+      for (final core::MapEntry<dynamic, dynamic> #t134 in (dynVar as{TypeError} core::Map<dynamic, dynamic>).{core::Map::entries}) {
+        final core::String #t135 = #t134.{core::MapEntry::key} as{TypeError} core::String;
+        final core::int #t136 = #t134.{core::MapEntry::value} as{TypeError} core::int;
+        #t133.{core::Map::[]=}(#t135, #t136);
+      }
+    #t133.{core::Map::[]=}("baz", null);
+  } =>#t133;
+}
+static method testIfElementErrors(core::Map<core::int, core::int> map) → dynamic {
+  <core::int>[invalid-expression "pkg/front_end/testcases/control_flow_collection_inference.dart:84:28: Error: A value of type 'String' can't be assigned to a variable of type 'int'.
+Try changing the type of the left hand side, or casting the right hand side to 'int'.
+  <int>[if (oracle(\"foo\")) \"bar\"];
+                           ^"];
+  let final core::Set<core::int> #t137 = col::LinkedHashSet::•<core::int>() in let final core::bool #t138 = #t137.{core::Set::add}(invalid-expression "pkg/front_end/testcases/control_flow_collection_inference.dart:85:28: Error: A value of type 'String' can't be assigned to a variable of type 'int'.
+Try changing the type of the left hand side, or casting the right hand side to 'int'.
+  <int>{if (oracle(\"foo\")) \"bar\", null};
+                           ^") in let final core::bool #t139 = #t137.{core::Set::add}(null) in #t137;
+  <core::String, core::int>{null: invalid-expression "pkg/front_end/testcases/control_flow_collection_inference.dart:86:41: Error: A value of type 'String' can't be assigned to a variable of type 'int'.
+Try changing the type of the left hand side, or casting the right hand side to 'int'.
+  <String, int>{if (oracle(\"foo\")) \"bar\": \"bar\", \"baz\": null};
+                                        ^", "baz": null};
+  block {
+    final core::List<core::int> #t140 = <core::int>[];
+    if(self::oracle<core::String>("foo"))
+      for (final core::int #t141 in <core::int>[let final<BottomType> #t142 = invalid-expression "pkg/front_end/testcases/control_flow_collection_inference.dart:87:32: Error: A value of type 'String' can't be assigned to a variable of type 'int'.
+Try changing the type of the left hand side, or casting the right hand side to 'int'.
+  <int>[if (oracle(\"foo\")) ...[\"bar\"]];
+                               ^" in "bar" as{TypeError} core::int])
+        #t140.{core::List::add}(#t141);
+  } =>#t140;
+  block {
+    final core::Set<core::int> #t143 = col::LinkedHashSet::•<core::int>();
+    if(self::oracle<core::String>("foo"))
+      for (final core::int #t144 in <core::int>[let final<BottomType> #t145 = invalid-expression "pkg/front_end/testcases/control_flow_collection_inference.dart:88:32: Error: A value of type 'String' can't be assigned to a variable of type 'int'.
+Try changing the type of the left hand side, or casting the right hand side to 'int'.
+  <int>{if (oracle(\"foo\")) ...[\"bar\"], null};
+                               ^" in "bar" as{TypeError} core::int])
+        #t143.{core::Set::add}(#t144);
+    #t143.{core::Set::add}(null);
+  } =>#t143;
+  block {
+    final core::Map<core::String, core::int> #t146 = <core::String, core::int>{};
+    if(self::oracle<core::String>("foo"))
+      for (final core::MapEntry<core::String, core::int> #t147 in <core::String, core::int>{"bar": let final<BottomType> #t148 = invalid-expression "pkg/front_end/testcases/control_flow_collection_inference.dart:89:47: Error: A value of type 'String' can't be assigned to a variable of type 'int'.
+Try changing the type of the left hand side, or casting the right hand side to 'int'.
+  <String, int>{if (oracle(\"foo\")) ...{\"bar\": \"bar\"}, \"baz\": null};
+                                              ^" in "bar" as{TypeError} core::int}.{core::Map::entries})
+        #t146.{core::Map::[]=}(#t147.{core::MapEntry::key}, #t147.{core::MapEntry::value});
+    #t146.{core::Map::[]=}("baz", null);
+  } =>#t146;
+  block {
+    final core::List<core::int> #t149 = <core::int>[];
+    if(self::oracle<core::String>("foo"))
+      #t149.{core::List::add}(invalid-expression "pkg/front_end/testcases/control_flow_collection_inference.dart:90:31: Error: Unexpected type 'Map<int, int>' of a spread.  Expected 'dynamic' or an Iterable.
+ - 'Map' is from 'dart:core'.
+  <int>[if (oracle(\"foo\")) ...map];
+                              ^" as{TypeError} core::int);
+  } =>#t149;
+  block {
+    final core::Set<core::int> #t150 = col::LinkedHashSet::•<core::int>();
+    if(self::oracle<core::String>("foo"))
+      #t150.{core::Set::add}(invalid-expression "pkg/front_end/testcases/control_flow_collection_inference.dart:91:31: Error: Unexpected type 'Map<int, int>' of a spread.  Expected 'dynamic' or an Iterable.
+ - 'Map' is from 'dart:core'.
+  <int>{if (oracle(\"foo\")) ...map, null};
+                              ^" as{TypeError} core::int);
+    #t150.{core::Set::add}(null);
+  } =>#t150;
+  <core::String, core::int>{invalid-expression "pkg/front_end/testcases/control_flow_collection_inference.dart:92:39: Error: Unexpected type 'List<String>' of a map spread entry.  Expected 'dynamic' or a Map.
+ - 'List' is from 'dart:core'.
+  <String, int>{if (oracle(\"foo\")) ...[\"bar\"], \"baz\": null};
+                                      ^": null, invalid-expression "pkg/front_end/testcases/control_flow_collection_inference.dart:92:39: Error: Unexpected type 'List<String>' of a map spread entry.  Expected 'dynamic' or a Map.
+ - 'List' is from 'dart:core'.
+  <String, int>{if (oracle(\"foo\")) ...[\"bar\"], \"baz\": null};
+                                      ^": null};
+  <core::String>[invalid-expression "pkg/front_end/testcases/control_flow_collection_inference.dart:93:12: Error: A value of type 'num' can't be assigned to a variable of type 'String'.
+Try changing the type of the left hand side, or casting the right hand side to 'String'.
+  <String>[if (oracle(\"foo\")) 42 else 3.14];
+           ^"];
+  let final core::Set<core::String> #t151 = col::LinkedHashSet::•<core::String>() in let final core::bool #t152 = #t151.{core::Set::add}(invalid-expression "pkg/front_end/testcases/control_flow_collection_inference.dart:94:12: Error: A value of type 'num' can't be assigned to a variable of type 'String'.
+Try changing the type of the left hand side, or casting the right hand side to 'String'.
+  <String>{if (oracle(\"foo\")) 42 else 3.14, null};
+           ^") in let final core::bool #t153 = #t151.{core::Set::add}(null) in #t151;
+  <core::String, core::String>{null: invalid-expression "pkg/front_end/testcases/control_flow_collection_inference.dart:95:20: Error: A value of type 'num' can't be assigned to a variable of type 'String'.
+Try changing the type of the left hand side, or casting the right hand side to 'String'.
+  <String, String>{if (oracle(\"foo\")) \"bar\": 42 else \"baz\": 3.14, \"baz\": null};
+                   ^", "baz": null};
+  block {
+    final core::List<core::int> #t154 = <core::int>[];
+    if(self::oracle<core::String>("foo"))
+      #t154.{core::List::add}(invalid-expression "pkg/front_end/testcases/control_flow_collection_inference.dart:96:31: Error: Unexpected type 'Map<int, int>' of a spread.  Expected 'dynamic' or an Iterable.
+ - 'Map' is from 'dart:core'.
+  <int>[if (oracle(\"foo\")) ...map else 42];
+                              ^" as{TypeError} core::int);
+    else
+      #t154.{core::List::add}(42 as{TypeError} core::int);
+  } =>#t154;
+  block {
+    final core::Set<core::int> #t155 = col::LinkedHashSet::•<core::int>();
+    if(self::oracle<core::String>("foo"))
+      #t155.{core::Set::add}(invalid-expression "pkg/front_end/testcases/control_flow_collection_inference.dart:97:31: Error: Unexpected type 'Map<int, int>' of a spread.  Expected 'dynamic' or an Iterable.
+ - 'Map' is from 'dart:core'.
+  <int>{if (oracle(\"foo\")) ...map else 42, null};
+                              ^" as{TypeError} core::int);
+    else
+      #t155.{core::Set::add}(42 as{TypeError} core::int);
+    #t155.{core::Set::add}(null);
+  } =>#t155;
+  <core::String, core::int>{invalid-expression "pkg/front_end/testcases/control_flow_collection_inference.dart:98:39: Error: Unexpected type 'List<int>' of a map spread entry.  Expected 'dynamic' or a Map.
+ - 'List' is from 'dart:core'.
+  <String, int>{if (oracle(\"foo\")) ...[42] else \"bar\": 42, \"baz\": null};
+                                      ^": null, invalid-expression "pkg/front_end/testcases/control_flow_collection_inference.dart:98:39: Error: Unexpected type 'List<int>' of a map spread entry.  Expected 'dynamic' or a Map.
+ - 'List' is from 'dart:core'.
+  <String, int>{if (oracle(\"foo\")) ...[42] else \"bar\": 42, \"baz\": null};
+                                      ^": null};
+  block {
+    final core::List<core::int> #t156 = <core::int>[];
+    if(self::oracle<core::String>("foo"))
+      #t156.{core::List::add}(42 as{TypeError} core::int);
+    else
+      #t156.{core::List::add}(invalid-expression "pkg/front_end/testcases/control_flow_collection_inference.dart:99:39: Error: Unexpected type 'Map<int, int>' of a spread.  Expected 'dynamic' or an Iterable.
+ - 'Map' is from 'dart:core'.
+  <int>[if (oracle(\"foo\")) 42 else ...map];
+                                      ^" as{TypeError} core::int);
+  } =>#t156;
+  block {
+    final core::Set<core::int> #t157 = col::LinkedHashSet::•<core::int>();
+    if(self::oracle<core::String>("foo"))
+      #t157.{core::Set::add}(invalid-expression "pkg/front_end/testcases/control_flow_collection_inference.dart:100:31: Error: Unexpected type 'Map<int, int>' of a spread.  Expected 'dynamic' or an Iterable.
+ - 'Map' is from 'dart:core'.
+  <int>{if (oracle(\"foo\")) ...map else 42, null};
+                              ^" as{TypeError} core::int);
+    else
+      #t157.{core::Set::add}(42 as{TypeError} core::int);
+    #t157.{core::Set::add}(null);
+  } =>#t157;
+  <core::String, core::int>{invalid-expression "pkg/front_end/testcases/control_flow_collection_inference.dart:101:54: Error: Unexpected type 'List<int>' of a map spread entry.  Expected 'dynamic' or a Map.
+ - 'List' is from 'dart:core'.
+  <String, int>{if (oracle(\"foo\")) \"bar\": 42 else ...[42], \"baz\": null};
+                                                     ^": null, invalid-expression "pkg/front_end/testcases/control_flow_collection_inference.dart:101:54: Error: Unexpected type 'List<int>' of a map spread entry.  Expected 'dynamic' or a Map.
+ - 'List' is from 'dart:core'.
+  <String, int>{if (oracle(\"foo\")) \"bar\": 42 else ...[42], \"baz\": null};
+                                                     ^": null};
+}
+static method testForElement(dynamic dynVar, core::List<core::int> listInt, core::List<core::double> listDouble, core::int index, core::Map<core::String, core::int> mapStringInt, core::Map<core::String, core::double> mapStringDouble) → dynamic {
+  core::List<core::int> list10 = block {
+    final core::List<core::int> #t158 = <core::int>[];
+    for (core::int i = 0; self::oracle<core::String>("foo") as{TypeError} core::bool; i = i.{core::num::+}(1))
+      #t158.{core::List::add}(42);
+  } =>#t158;
+  core::Set<core::int> set10 = block {
+    final core::Set<core::int> #t159 = col::LinkedHashSet::•<core::int>();
+    for (core::int i = 0; self::oracle<core::String>("foo") as{TypeError} core::bool; i = i.{core::num::+}(1))
+      #t159.{core::Set::add}(42);
+    #t159.{core::Set::add}(null);
+  } =>#t159;
+  core::Map<core::String, core::int> map10 = block {
+    final core::Map<core::String, core::int> #t160 = <core::String, core::int>{};
+    for (core::int i = 0; self::oracle<core::String>("foo") as{TypeError} core::bool; i = i.{core::num::+}(1))
+      #t160.{core::Map::[]=}("bar", 42);
+    #t160.{core::Map::[]=}("baz", null);
+  } =>#t160;
+  core::List<dynamic> list11 = block {
+    final core::List<dynamic> #t161 = <dynamic>[];
+    for (core::int i = 0; self::oracle<core::String>("foo") as{TypeError} core::bool; i = i.{core::num::+}(1))
+      #t161.{core::List::add}(dynVar);
+  } =>#t161;
+  core::Set<dynamic> set11 = block {
+    final core::Set<dynamic> #t162 = col::LinkedHashSet::•<dynamic>();
+    for (core::int i = 0; self::oracle<core::String>("foo") as{TypeError} core::bool; i = i.{core::num::+}(1))
+      #t162.{core::Set::add}(dynVar);
+    #t162.{core::Set::add}(null);
+  } =>#t162;
+  core::Map<core::String, dynamic> map11 = block {
+    final core::Map<core::String, dynamic> #t163 = <core::String, dynamic>{};
+    for (core::int i = 0; self::oracle<core::String>("foo") as{TypeError} core::bool; i = i.{core::num::+}(1))
+      #t163.{core::Map::[]=}("bar", dynVar);
+    #t163.{core::Map::[]=}("baz", null);
+  } =>#t163;
+  core::List<core::List<core::int>> list12 = block {
+    final core::List<core::List<core::int>> #t164 = <core::List<core::int>>[];
+    for (core::int i = 0; self::oracle<core::String>("foo") as{TypeError} core::bool; i = i.{core::num::+}(1))
+      #t164.{core::List::add}(<core::int>[42]);
+  } =>#t164;
+  core::Set<core::List<core::int>> set12 = block {
+    final core::Set<core::List<core::int>> #t165 = col::LinkedHashSet::•<core::List<core::int>>();
+    for (core::int i = 0; self::oracle<core::String>("foo") as{TypeError} core::bool; i = i.{core::num::+}(1))
+      #t165.{core::Set::add}(<core::int>[42]);
+    #t165.{core::Set::add}(null);
+  } =>#t165;
+  core::Map<core::String, core::List<core::int>> map12 = block {
+    final core::Map<core::String, core::List<core::int>> #t166 = <core::String, core::List<core::int>>{};
+    for (core::int i = 0; self::oracle<core::String>("foo") as{TypeError} core::bool; i = i.{core::num::+}(1))
+      #t166.{core::Map::[]=}("bar", <core::int>[42]);
+    #t166.{core::Map::[]=}("baz", null);
+  } =>#t166;
+  core::List<core::int> list20 = block {
+    final core::List<core::int> #t167 = <core::int>[];
+    for (core::int i = 0; self::oracle<core::String>("foo") as{TypeError} core::bool; i = i.{core::num::+}(1))
+      for (final core::int #t168 in <core::int>[42])
+        #t167.{core::List::add}(#t168);
+  } =>#t167;
+  core::Set<core::int> set20 = block {
+    final core::Set<core::int> #t169 = col::LinkedHashSet::•<core::int>();
+    for (core::int i = 0; self::oracle<core::String>("foo") as{TypeError} core::bool; i = i.{core::num::+}(1))
+      for (final core::int #t170 in <core::int>[42])
+        #t169.{core::Set::add}(#t170);
+    #t169.{core::Set::add}(null);
+  } =>#t169;
+  core::Map<core::String, core::int> map20 = block {
+    final core::Map<core::String, core::int> #t171 = <core::String, core::int>{};
+    for (core::int i = 0; self::oracle<core::String>("foo") as{TypeError} core::bool; i = i.{core::num::+}(1))
+      for (final core::MapEntry<core::String, core::int> #t172 in <core::String, core::int>{"bar": 42}.{core::Map::entries})
+        #t171.{core::Map::[]=}(#t172.{core::MapEntry::key}, #t172.{core::MapEntry::value});
+    #t171.{core::Map::[]=}("baz", null);
+  } =>#t171;
+  core::List<dynamic> list21 = block {
+    final core::List<dynamic> #t173 = <dynamic>[];
+    for (core::int i = 0; self::oracle<core::String>("foo") as{TypeError} core::bool; i = i.{core::num::+}(1))
+      for (final dynamic #t174 in <dynamic>[dynVar])
+        #t173.{core::List::add}(#t174);
+  } =>#t173;
+  core::Set<dynamic> set21 = block {
+    final core::Set<dynamic> #t175 = col::LinkedHashSet::•<dynamic>();
+    for (core::int i = 0; self::oracle<core::String>("foo") as{TypeError} core::bool; i = i.{core::num::+}(1))
+      for (final dynamic #t176 in <dynamic>[dynVar])
+        #t175.{core::Set::add}(#t176);
+    #t175.{core::Set::add}(null);
+  } =>#t175;
+  core::Map<core::String, dynamic> map21 = block {
+    final core::Map<core::String, dynamic> #t177 = <core::String, dynamic>{};
+    for (core::int i = 0; self::oracle<core::String>("foo") as{TypeError} core::bool; i = i.{core::num::+}(1))
+      for (final core::MapEntry<core::String, dynamic> #t178 in <core::String, dynamic>{"bar": dynVar}.{core::Map::entries})
+        #t177.{core::Map::[]=}(#t178.{core::MapEntry::key}, #t178.{core::MapEntry::value});
+    #t177.{core::Map::[]=}("baz", null);
+  } =>#t177;
+  core::List<core::List<core::int>> list22 = block {
+    final core::List<core::List<core::int>> #t179 = <core::List<core::int>>[];
+    for (core::int i = 0; self::oracle<core::String>("foo") as{TypeError} core::bool; i = i.{core::num::+}(1))
+      for (final core::List<core::int> #t180 in <core::List<core::int>>[<core::int>[42]])
+        #t179.{core::List::add}(#t180);
+  } =>#t179;
+  core::Set<core::List<core::int>> set22 = block {
+    final core::Set<core::List<core::int>> #t181 = col::LinkedHashSet::•<core::List<core::int>>();
+    for (core::int i = 0; self::oracle<core::String>("foo") as{TypeError} core::bool; i = i.{core::num::+}(1))
+      for (final core::List<core::int> #t182 in <core::List<core::int>>[<core::int>[42]])
+        #t181.{core::Set::add}(#t182);
+    #t181.{core::Set::add}(null);
+  } =>#t181;
+  core::Map<core::String, core::List<core::int>> map22 = block {
+    final core::Map<core::String, core::List<core::int>> #t183 = <core::String, core::List<core::int>>{};
+    for (core::int i = 0; self::oracle<core::String>("foo") as{TypeError} core::bool; i = i.{core::num::+}(1))
+      for (final core::MapEntry<core::String, core::List<core::int>> #t184 in <core::String, core::List<core::int>>{"bar": <core::int>[42]}.{core::Map::entries})
+        #t183.{core::Map::[]=}(#t184.{core::MapEntry::key}, #t184.{core::MapEntry::value});
+    #t183.{core::Map::[]=}("baz", null);
+  } =>#t183;
+  core::List<core::int> list30 = block {
+    final core::List<core::int> #t185 = <core::int>[];
+    for (core::int i = 0; self::oracle<core::String>("foo") as{TypeError} core::bool; i = i.{core::num::+}(1))
+      if(self::oracle<dynamic>())
+        for (final core::int #t186 in <core::int>[42])
+          #t185.{core::List::add}(#t186);
+  } =>#t185;
+  core::Set<core::int> set30 = block {
+    final core::Set<core::int> #t187 = col::LinkedHashSet::•<core::int>();
+    for (core::int i = 0; self::oracle<core::String>("foo") as{TypeError} core::bool; i = i.{core::num::+}(1))
+      if(self::oracle<dynamic>())
+        for (final core::int #t188 in <core::int>[42])
+          #t187.{core::Set::add}(#t188);
+    #t187.{core::Set::add}(null);
+  } =>#t187;
+  core::Map<core::String, core::int> map30 = block {
+    final core::Map<core::String, core::int> #t189 = <core::String, core::int>{};
+    for (core::int i = 0; self::oracle<core::String>("foo") as{TypeError} core::bool; i = i.{core::num::+}(1))
+      if(self::oracle<dynamic>())
+        for (final core::MapEntry<core::String, core::int> #t190 in <core::String, core::int>{"bar": 42}.{core::Map::entries})
+          #t189.{core::Map::[]=}(#t190.{core::MapEntry::key}, #t190.{core::MapEntry::value});
+    #t189.{core::Map::[]=}("baz", null);
+  } =>#t189;
+  core::List<dynamic> list31 = block {
+    final core::List<dynamic> #t191 = <dynamic>[];
+    for (core::int i = 0; self::oracle<core::String>("foo") as{TypeError} core::bool; i = i.{core::num::+}(1))
+      if(self::oracle<dynamic>())
+        for (final dynamic #t192 in <dynamic>[dynVar])
+          #t191.{core::List::add}(#t192);
+  } =>#t191;
+  core::Set<dynamic> set31 = block {
+    final core::Set<dynamic> #t193 = col::LinkedHashSet::•<dynamic>();
+    for (core::int i = 0; self::oracle<core::String>("foo") as{TypeError} core::bool; i = i.{core::num::+}(1))
+      if(self::oracle<dynamic>())
+        for (final dynamic #t194 in <dynamic>[dynVar])
+          #t193.{core::Set::add}(#t194);
+    #t193.{core::Set::add}(null);
+  } =>#t193;
+  core::Map<core::String, dynamic> map31 = block {
+    final core::Map<core::String, dynamic> #t195 = <core::String, dynamic>{};
+    for (core::int i = 0; self::oracle<core::String>("foo") as{TypeError} core::bool; i = i.{core::num::+}(1))
+      if(self::oracle<dynamic>())
+        for (final core::MapEntry<core::String, dynamic> #t196 in <core::String, dynamic>{"bar": dynVar}.{core::Map::entries})
+          #t195.{core::Map::[]=}(#t196.{core::MapEntry::key}, #t196.{core::MapEntry::value});
+    #t195.{core::Map::[]=}("baz", null);
+  } =>#t195;
+  core::List<core::List<core::int>> list33 = block {
+    final core::List<core::List<core::int>> #t197 = <core::List<core::int>>[];
+    for (core::int i = 0; self::oracle<core::String>("foo") as{TypeError} core::bool; i = i.{core::num::+}(1))
+      if(self::oracle<dynamic>())
+        for (final core::List<core::int> #t198 in <core::List<core::int>>[<core::int>[42]])
+          #t197.{core::List::add}(#t198);
+  } =>#t197;
+  core::Set<core::List<core::int>> set33 = block {
+    final core::Set<core::List<core::int>> #t199 = col::LinkedHashSet::•<core::List<core::int>>();
+    for (core::int i = 0; self::oracle<core::String>("foo") as{TypeError} core::bool; i = i.{core::num::+}(1))
+      if(self::oracle<dynamic>())
+        for (final core::List<core::int> #t200 in <core::List<core::int>>[<core::int>[42]])
+          #t199.{core::Set::add}(#t200);
+    #t199.{core::Set::add}(null);
+  } =>#t199;
+  core::Map<core::String, core::List<core::int>> map33 = block {
+    final core::Map<core::String, core::List<core::int>> #t201 = <core::String, core::List<core::int>>{};
+    for (core::int i = 0; self::oracle<core::String>("foo") as{TypeError} core::bool; i = i.{core::num::+}(1))
+      if(self::oracle<dynamic>())
+        for (final core::MapEntry<core::String, core::List<core::int>> #t202 in <core::String, core::List<core::int>>{"bar": <core::int>[42]}.{core::Map::entries})
+          #t201.{core::Map::[]=}(#t202.{core::MapEntry::key}, #t202.{core::MapEntry::value});
+    #t201.{core::Map::[]=}("baz", null);
+  } =>#t201;
+  core::List<core::List<core::int>> list40 = block {
+    final core::List<core::List<core::int>> #t203 = <core::List<core::int>>[];
+    for (core::int i = 0; self::oracle<core::String>("foo") as{TypeError} core::bool; i = i.{core::num::+}(1))
+      for (final core::List<core::int> #t204 in <core::List<core::int>>[<core::int>[]])
+        #t203.{core::List::add}(#t204);
+  } =>#t203;
+  core::Set<core::List<core::int>> set40 = block {
+    final core::Set<core::List<core::int>> #t205 = col::LinkedHashSet::•<core::List<core::int>>();
+    for (core::int i = 0; self::oracle<core::String>("foo") as{TypeError} core::bool; i = i.{core::num::+}(1))
+      for (final core::List<core::int> #t206 in <core::List<core::int>>[<core::int>[]])
+        #t205.{core::Set::add}(#t206);
+    #t205.{core::Set::add}(null);
+  } =>#t205;
+  core::Map<core::String, core::List<core::int>> map40 = block {
+    final core::Map<core::String, core::List<core::int>> #t207 = <core::String, core::List<core::int>>{};
+    for (core::int i = 0; self::oracle<core::String>("foo") as{TypeError} core::bool; i = i.{core::num::+}(1))
+      for (final core::MapEntry<core::String, core::List<core::int>> #t208 in <core::String, core::List<core::int>>{"bar": <core::int>[]}.{core::Map::entries})
+        #t207.{core::Map::[]=}(#t208.{core::MapEntry::key}, #t208.{core::MapEntry::value});
+    #t207.{core::Map::[]=}("baz", null);
+  } =>#t207;
+  core::List<core::List<core::int>> list41 = block {
+    final core::List<core::List<core::int>> #t209 = <core::List<core::int>>[];
+    for (core::int i = 0; self::oracle<core::String>("foo") as{TypeError} core::bool; i = i.{core::num::+}(1))
+      for (final core::List<core::int> #t210 in let final core::Set<core::List<core::int>> #t211 = col::LinkedHashSet::•<core::List<core::int>>() in let final core::bool #t212 = #t211.{core::Set::add}(<core::int>[]) in #t211)
+        #t209.{core::List::add}(#t210);
+  } =>#t209;
+  core::Set<core::List<core::int>> set41 = block {
+    final core::Set<core::List<core::int>> #t213 = col::LinkedHashSet::•<core::List<core::int>>();
+    for (core::int i = 0; self::oracle<core::String>("foo") as{TypeError} core::bool; i = i.{core::num::+}(1))
+      for (final core::List<core::int> #t214 in let final core::Set<core::List<core::int>> #t215 = col::LinkedHashSet::•<core::List<core::int>>() in let final core::bool #t216 = #t215.{core::Set::add}(<core::int>[]) in #t215)
+        #t213.{core::Set::add}(#t214);
+    #t213.{core::Set::add}(null);
+  } =>#t213;
+  core::List<core::List<core::int>> list42 = block {
+    final core::List<core::List<core::int>> #t217 = <core::List<core::int>>[];
+    for (core::int i = 0; self::oracle<core::String>("foo") as{TypeError} core::bool; i = i.{core::num::+}(1))
+      if(self::oracle<dynamic>())
+        for (final core::List<core::int> #t218 in <core::List<core::int>>[<core::int>[]])
+          #t217.{core::List::add}(#t218);
+  } =>#t217;
+  core::Set<core::List<core::int>> set42 = block {
+    final core::Set<core::List<core::int>> #t219 = col::LinkedHashSet::•<core::List<core::int>>();
+    for (core::int i = 0; self::oracle<core::String>("foo") as{TypeError} core::bool; i = i.{core::num::+}(1))
+      if(self::oracle<dynamic>())
+        for (final core::List<core::int> #t220 in <core::List<core::int>>[<core::int>[]])
+          #t219.{core::Set::add}(#t220);
+    #t219.{core::Set::add}(null);
+  } =>#t219;
+  core::Map<core::String, core::List<core::int>> map42 = block {
+    final core::Map<core::String, core::List<core::int>> #t221 = <core::String, core::List<core::int>>{};
+    for (core::int i = 0; self::oracle<core::String>("foo") as{TypeError} core::bool; i = i.{core::num::+}(1))
+      if(self::oracle<dynamic>())
+        for (final core::MapEntry<core::String, core::List<core::int>> #t222 in <core::String, core::List<core::int>>{"bar": <core::int>[]}.{core::Map::entries})
+          #t221.{core::Map::[]=}(#t222.{core::MapEntry::key}, #t222.{core::MapEntry::value});
+    #t221.{core::Map::[]=}("baz", null);
+  } =>#t221;
+  core::List<core::int> list50 = block {
+    final core::List<core::int> #t223 = <core::int>[];
+    for (core::int i = 0; self::oracle<core::String>("foo") as{TypeError} core::bool; i = i.{core::num::+}(1))
+      for (final core::int #t224 in <core::int>[])
+        #t223.{core::List::add}(#t224);
+  } =>#t223;
+  core::Set<core::int> set50 = block {
+    final core::Set<core::int> #t225 = col::LinkedHashSet::•<core::int>();
+    for (core::int i = 0; self::oracle<core::String>("foo") as{TypeError} core::bool; i = i.{core::num::+}(1))
+      for (final core::int #t226 in <core::int>[])
+        #t225.{core::Set::add}(#t226);
+    #t225.{core::Set::add}(null);
+  } =>#t225;
+  core::Map<core::String, core::int> map50 = block {
+    final core::Map<core::String, core::int> #t227 = <core::String, core::int>{};
+    for (core::int i = 0; self::oracle<core::String>("foo") as{TypeError} core::bool; i = i.{core::num::+}(1))
+      for (final core::MapEntry<core::String, core::int> #t228 in <core::String, core::int>{}.{core::Map::entries})
+        #t227.{core::Map::[]=}(#t228.{core::MapEntry::key}, #t228.{core::MapEntry::value});
+    #t227.{core::Map::[]=}("baz", null);
+  } =>#t227;
+  core::List<core::int> list51 = block {
+    final core::List<core::int> #t229 = <core::int>[];
+    for (core::int i = 0; self::oracle<core::String>("foo") as{TypeError} core::bool; i = i.{core::num::+}(1))
+      for (final core::int #t230 in let final core::Set<core::int> #t231 = col::LinkedHashSet::•<core::int>() in #t231)
+        #t229.{core::List::add}(#t230);
+  } =>#t229;
+  core::Set<core::int> set51 = block {
+    final core::Set<core::int> #t232 = col::LinkedHashSet::•<core::int>();
+    for (core::int i = 0; self::oracle<core::String>("foo") as{TypeError} core::bool; i = i.{core::num::+}(1))
+      for (final core::int #t233 in let final core::Set<core::int> #t234 = col::LinkedHashSet::•<core::int>() in #t234)
+        #t232.{core::Set::add}(#t233);
+    #t232.{core::Set::add}(null);
+  } =>#t232;
+  core::List<core::int> list52 = block {
+    final core::List<core::int> #t235 = <core::int>[];
+    for (core::int i = 0; self::oracle<core::String>("foo") as{TypeError} core::bool; i = i.{core::num::+}(1))
+      if(self::oracle<dynamic>())
+        for (final core::int #t236 in <core::int>[])
+          #t235.{core::List::add}(#t236);
+  } =>#t235;
+  core::Set<core::int> set52 = block {
+    final core::Set<core::int> #t237 = col::LinkedHashSet::•<core::int>();
+    for (core::int i = 0; self::oracle<core::String>("foo") as{TypeError} core::bool; i = i.{core::num::+}(1))
+      if(self::oracle<dynamic>())
+        for (final core::int #t238 in <core::int>[])
+          #t237.{core::Set::add}(#t238);
+    #t237.{core::Set::add}(null);
+  } =>#t237;
+  core::List<core::List<core::int>> list60 = block {
+    final core::List<core::List<core::int>> #t239 = <core::List<core::int>>[];
+    for (core::int i = 0; self::oracle<core::String>("foo") as{TypeError} core::bool; i = i.{core::num::+}(1))
+      for (final core::List<core::int> #t240 in <core::List<core::int>>[<core::int>[]])
+        #t239.{core::List::add}(#t240);
+  } =>#t239;
+  core::Set<core::List<core::int>> set60 = block {
+    final core::Set<core::List<core::int>> #t241 = col::LinkedHashSet::•<core::List<core::int>>();
+    for (core::int i = 0; self::oracle<core::String>("foo") as{TypeError} core::bool; i = i.{core::num::+}(1))
+      for (final core::List<core::int> #t242 in <core::List<core::int>>[<core::int>[]])
+        #t241.{core::Set::add}(#t242);
+    #t241.{core::Set::add}(null);
+  } =>#t241;
+  core::Map<core::String, core::List<core::int>> map60 = block {
+    final core::Map<core::String, core::List<core::int>> #t243 = <core::String, core::List<core::int>>{};
+    for (core::int i = 0; self::oracle<core::String>("foo") as{TypeError} core::bool; i = i.{core::num::+}(1))
+      for (final core::MapEntry<core::String, core::List<core::int>> #t244 in <core::String, core::List<core::int>>{"bar": <core::int>[]}.{core::Map::entries})
+        #t243.{core::Map::[]=}(#t244.{core::MapEntry::key}, #t244.{core::MapEntry::value});
+    #t243.{core::Map::[]=}("baz", null);
+  } =>#t243;
+  core::List<core::List<core::int>> list61 = block {
+    final core::List<core::List<core::int>> #t245 = <core::List<core::int>>[];
+    for (core::int i = 0; self::oracle<core::String>("foo") as{TypeError} core::bool; i = i.{core::num::+}(1))
+      if(self::oracle<dynamic>())
+        for (final core::List<core::int> #t246 in <core::List<core::int>>[<core::int>[]])
+          #t245.{core::List::add}(#t246);
+  } =>#t245;
+  core::Set<core::List<core::int>> set61 = block {
+    final core::Set<core::List<core::int>> #t247 = col::LinkedHashSet::•<core::List<core::int>>();
+    for (core::int i = 0; self::oracle<core::String>("foo") as{TypeError} core::bool; i = i.{core::num::+}(1))
+      if(self::oracle<dynamic>())
+        for (final core::List<core::int> #t248 in <core::List<core::int>>[<core::int>[]])
+          #t247.{core::Set::add}(#t248);
+    #t247.{core::Set::add}(null);
+  } =>#t247;
+  core::Map<core::String, core::List<core::int>> map61 = block {
+    final core::Map<core::String, core::List<core::int>> #t249 = <core::String, core::List<core::int>>{};
+    for (core::int i = 0; self::oracle<core::String>("foo") as{TypeError} core::bool; i = i.{core::num::+}(1))
+      if(self::oracle<dynamic>())
+        for (final core::MapEntry<core::String, core::List<core::int>> #t250 in <core::String, core::List<core::int>>{"bar": <core::int>[]}.{core::Map::entries})
+          #t249.{core::Map::[]=}(#t250.{core::MapEntry::key}, #t250.{core::MapEntry::value});
+    #t249.{core::Map::[]=}("baz", null);
+  } =>#t249;
+  core::List<core::List<core::int>> list70 = block {
+    final core::List<core::List<core::int>> #t251 = <core::List<core::int>>[];
+    for (core::int i = 0; self::oracle<core::String>("foo") as{TypeError} core::bool; i = i.{core::num::+}(1))
+      #t251.{core::List::add}(<core::int>[]);
+  } =>#t251;
+  core::Set<core::List<core::int>> set70 = block {
+    final core::Set<core::List<core::int>> #t252 = col::LinkedHashSet::•<core::List<core::int>>();
+    for (core::int i = 0; self::oracle<core::String>("foo") as{TypeError} core::bool; i = i.{core::num::+}(1))
+      #t252.{core::Set::add}(<core::int>[]);
+    #t252.{core::Set::add}(null);
+  } =>#t252;
+  core::Map<core::String, core::List<core::int>> map70 = block {
+    final core::Map<core::String, core::List<core::int>> #t253 = <core::String, core::List<core::int>>{};
+    for (core::int i = 0; self::oracle<core::String>("foo") as{TypeError} core::bool; i = i.{core::num::+}(1))
+      #t253.{core::Map::[]=}("bar", <core::int>[]);
+    #t253.{core::Map::[]=}("baz", null);
+  } =>#t253;
+  core::List<core::List<core::int>> list71 = block {
+    final core::List<core::List<core::int>> #t254 = <core::List<core::int>>[];
+    for (core::int i = 0; self::oracle<core::String>("foo") as{TypeError} core::bool; i = i.{core::num::+}(1))
+      if(self::oracle<dynamic>())
+        #t254.{core::List::add}(<core::int>[]);
+  } =>#t254;
+  core::Set<core::List<core::int>> set71 = block {
+    final core::Set<core::List<core::int>> #t255 = col::LinkedHashSet::•<core::List<core::int>>();
+    for (core::int i = 0; self::oracle<core::String>("foo") as{TypeError} core::bool; i = i.{core::num::+}(1))
+      if(self::oracle<dynamic>())
+        #t255.{core::Set::add}(<core::int>[]);
+    #t255.{core::Set::add}(null);
+  } =>#t255;
+  core::Map<core::String, core::List<core::int>> map71 = block {
+    final core::Map<core::String, core::List<core::int>> #t256 = <core::String, core::List<core::int>>{};
+    for (core::int i = 0; self::oracle<core::String>("foo") as{TypeError} core::bool; i = i.{core::num::+}(1))
+      if(self::oracle<dynamic>())
+        #t256.{core::Map::[]=}("bar", <core::int>[]);
+    #t256.{core::Map::[]=}("baz", null);
+  } =>#t256;
+  core::List<core::num> list80 = block {
+    final core::List<core::num> #t257 = <core::num>[];
+    for (core::int i = 0; self::oracle<core::String>("foo") as{TypeError} core::bool; i = i.{core::num::+}(1))
+      if(self::oracle<dynamic>())
+        #t257.{core::List::add}(42);
+      else
+        #t257.{core::List::add}(3.14);
+  } =>#t257;
+  core::Set<core::num> set80 = block {
+    final core::Set<core::num> #t258 = col::LinkedHashSet::•<core::num>();
+    for (core::int i = 0; self::oracle<core::String>("foo") as{TypeError} core::bool; i = i.{core::num::+}(1))
+      if(self::oracle<dynamic>())
+        #t258.{core::Set::add}(42);
+      else
+        #t258.{core::Set::add}(3.14);
+    #t258.{core::Set::add}(null);
+  } =>#t258;
+  core::Map<core::String, core::num> map80 = block {
+    final core::Map<core::String, core::num> #t259 = <core::String, core::num>{};
+    for (core::int i = 0; self::oracle<core::String>("foo") as{TypeError} core::bool; i = i.{core::num::+}(1))
+      if(self::oracle<dynamic>())
+        #t259.{core::Map::[]=}("bar", 42);
+      else
+        #t259.{core::Map::[]=}("bar", 3.14);
+    #t259.{core::Map::[]=}("baz", null);
+  } =>#t259;
+  core::List<core::num> list81 = block {
+    final core::List<core::num> #t260 = <core::num>[];
+    for (core::int i = 0; self::oracle<core::String>("foo") as{TypeError} core::bool; i = i.{core::num::+}(1))
+      if(self::oracle<dynamic>())
+        for (final core::num #t261 in listInt)
+          #t260.{core::List::add}(#t261);
+      else
+        for (final core::num #t262 in listDouble)
+          #t260.{core::List::add}(#t262);
+  } =>#t260;
+  core::Set<core::num> set81 = block {
+    final core::Set<core::num> #t263 = col::LinkedHashSet::•<core::num>();
+    for (core::int i = 0; self::oracle<core::String>("foo") as{TypeError} core::bool; i = i.{core::num::+}(1))
+      if(self::oracle<dynamic>())
+        for (final core::num #t264 in listInt)
+          #t263.{core::Set::add}(#t264);
+      else
+        for (final core::num #t265 in listDouble)
+          #t263.{core::Set::add}(#t265);
+    #t263.{core::Set::add}(null);
+  } =>#t263;
+  core::Map<core::String, core::num> map81 = block {
+    final core::Map<core::String, core::num> #t266 = <core::String, core::num>{};
+    for (core::int i = 0; self::oracle<core::String>("foo") as{TypeError} core::bool; i = i.{core::num::+}(1))
+      if(self::oracle<dynamic>())
+        for (final core::MapEntry<core::String, core::num> #t267 in mapStringInt.{core::Map::entries})
+          #t266.{core::Map::[]=}(#t267.{core::MapEntry::key}, #t267.{core::MapEntry::value});
+      else
+        for (final core::MapEntry<core::String, core::num> #t268 in mapStringDouble.{core::Map::entries})
+          #t266.{core::Map::[]=}(#t268.{core::MapEntry::key}, #t268.{core::MapEntry::value});
+    #t266.{core::Map::[]=}("baz", null);
+  } =>#t266;
+  core::List<dynamic> list82 = block {
+    final core::List<dynamic> #t269 = <dynamic>[];
+    for (core::int i = 0; self::oracle<core::String>("foo") as{TypeError} core::bool; i = i.{core::num::+}(1))
+      if(self::oracle<dynamic>())
+        for (final dynamic #t270 in listInt)
+          #t269.{core::List::add}(#t270);
+      else
+        for (final dynamic #t271 in dynVar as{TypeError} core::Iterable<dynamic>)
+          #t269.{core::List::add}(#t271);
+  } =>#t269;
+  core::Set<dynamic> set82 = block {
+    final core::Set<dynamic> #t272 = col::LinkedHashSet::•<dynamic>();
+    for (core::int i = 0; self::oracle<core::String>("foo") as{TypeError} core::bool; i = i.{core::num::+}(1))
+      if(self::oracle<dynamic>())
+        for (final dynamic #t273 in listInt)
+          #t272.{core::Set::add}(#t273);
+      else
+        for (final dynamic #t274 in dynVar as{TypeError} core::Iterable<dynamic>)
+          #t272.{core::Set::add}(#t274);
+    #t272.{core::Set::add}(null);
+  } =>#t272;
+  core::Map<dynamic, dynamic> map82 = block {
+    final core::Map<dynamic, dynamic> #t275 = <dynamic, dynamic>{};
+    for (core::int i = 0; self::oracle<core::String>("foo") as{TypeError} core::bool; i = i.{core::num::+}(1))
+      if(self::oracle<dynamic>())
+        for (final core::MapEntry<dynamic, dynamic> #t276 in mapStringInt.{core::Map::entries})
+          #t275.{core::Map::[]=}(#t276.{core::MapEntry::key}, #t276.{core::MapEntry::value});
+      else
+        for (final core::MapEntry<dynamic, dynamic> #t277 in (dynVar as{TypeError} core::Map<dynamic, dynamic>).{core::Map::entries})
+          #t275.{core::Map::[]=}(#t277.{core::MapEntry::key}, #t277.{core::MapEntry::value});
+    #t275.{core::Map::[]=}("baz", null);
+  } =>#t275;
+  core::List<core::num> list83 = block {
+    final core::List<core::num> #t278 = <core::num>[];
+    for (core::int i = 0; self::oracle<core::String>("foo") as{TypeError} core::bool; i = i.{core::num::+}(1))
+      if(self::oracle<dynamic>())
+        #t278.{core::List::add}(42);
+      else
+        for (final core::num #t279 in listDouble)
+          #t278.{core::List::add}(#t279);
+  } =>#t278;
+  core::Set<core::num> set83 = block {
+    final core::Set<core::num> #t280 = col::LinkedHashSet::•<core::num>();
+    for (core::int i = 0; self::oracle<core::String>("foo") as{TypeError} core::bool; i = i.{core::num::+}(1))
+      if(self::oracle<dynamic>())
+        for (final core::num #t281 in listInt)
+          #t280.{core::Set::add}(#t281);
+      else
+        #t280.{core::Set::add}(3.14);
+    #t280.{core::Set::add}(null);
+  } =>#t280;
+  core::Map<core::String, core::num> map83 = block {
+    final core::Map<core::String, core::num> #t282 = <core::String, core::num>{};
+    for (core::int i = 0; self::oracle<core::String>("foo") as{TypeError} core::bool; i = i.{core::num::+}(1))
+      if(self::oracle<dynamic>())
+        for (final core::MapEntry<core::String, core::num> #t283 in mapStringInt.{core::Map::entries})
+          #t282.{core::Map::[]=}(#t283.{core::MapEntry::key}, #t283.{core::MapEntry::value});
+      else
+        #t282.{core::Map::[]=}("bar", 3.14);
+    #t282.{core::Map::[]=}("baz", null);
+  } =>#t282;
+  core::List<core::int> list90 = block {
+    final core::List<core::int> #t284 = <core::int>[];
+    for (core::int i = 0; self::oracle<core::String>("foo") as{TypeError} core::bool; i = i.{core::num::+}(1))
+      #t284.{core::List::add}(dynVar as{TypeError} core::int);
+  } =>#t284;
+  core::Set<core::int> set90 = block {
+    final core::Set<core::int> #t285 = col::LinkedHashSet::•<core::int>();
+    for (core::int i = 0; self::oracle<core::String>("foo") as{TypeError} core::bool; i = i.{core::num::+}(1))
+      #t285.{core::Set::add}(dynVar as{TypeError} core::int);
+    #t285.{core::Set::add}(null);
+  } =>#t285;
+  core::Map<core::String, core::int> map90 = block {
+    final core::Map<core::String, core::int> #t286 = <core::String, core::int>{};
+    for (core::int i = 0; self::oracle<core::String>("foo") as{TypeError} core::bool; i = i.{core::num::+}(1))
+      #t286.{core::Map::[]=}("bar", dynVar as{TypeError} core::int);
+    #t286.{core::Map::[]=}("baz", null);
+  } =>#t286;
+  core::List<core::int> list91 = block {
+    final core::List<core::int> #t287 = <core::int>[];
+    for (core::int i = 0; self::oracle<core::String>("foo") as{TypeError} core::bool; i = i.{core::num::+}(1))
+      for (final dynamic #t288 in dynVar as{TypeError} core::Iterable<dynamic>) {
+        final core::int #t289 = #t288 as{TypeError} core::int;
+        #t287.{core::List::add}(#t289);
+      }
+  } =>#t287;
+  core::Set<core::int> set91 = block {
+    final core::Set<core::int> #t290 = col::LinkedHashSet::•<core::int>();
+    for (core::int i = 0; self::oracle<core::String>("foo") as{TypeError} core::bool; i = i.{core::num::+}(1))
+      for (final dynamic #t291 in dynVar as{TypeError} core::Iterable<dynamic>) {
+        final core::int #t292 = #t291 as{TypeError} core::int;
+        #t290.{core::Set::add}(#t292);
+      }
+    #t290.{core::Set::add}(null);
+  } =>#t290;
+  core::Map<core::String, core::int> map91 = block {
+    final core::Map<core::String, core::int> #t293 = <core::String, core::int>{};
+    for (core::int i = 0; self::oracle<core::String>("foo") as{TypeError} core::bool; i = i.{core::num::+}(1))
+      for (final core::MapEntry<dynamic, dynamic> #t294 in (dynVar as{TypeError} core::Map<dynamic, dynamic>).{core::Map::entries}) {
+        final core::String #t295 = #t294.{core::MapEntry::key} as{TypeError} core::String;
+        final core::int #t296 = #t294.{core::MapEntry::value} as{TypeError} core::int;
+        #t293.{core::Map::[]=}(#t295, #t296);
+      }
+    #t293.{core::Map::[]=}("baz", null);
+  } =>#t293;
+  core::List<core::int> list100 = block {
+    final core::List<core::int> #t297 = <core::int>[];
+    for (final dynamic #t298 = index = 0; self::oracle<core::String>("foo") as{TypeError} core::bool; index = index.{core::num::+}(1))
+      #t297.{core::List::add}(42);
+  } =>#t297;
+  core::Set<core::int> set100 = block {
+    final core::Set<core::int> #t299 = col::LinkedHashSet::•<core::int>();
+    for (final dynamic #t300 = index = 0; self::oracle<core::String>("foo") as{TypeError} core::bool; index = index.{core::num::+}(1))
+      #t299.{core::Set::add}(42);
+  } =>#t299;
+  core::Map<core::String, core::int> map100 = block {
+    final core::Map<core::String, core::int> #t301 = <core::String, core::int>{};
+    for (final dynamic #t302 = index = 0; self::oracle<core::String>("foo") as{TypeError} core::bool; index = index.{core::num::+}(1))
+      #t301.{core::Map::[]=}("bar", 42);
+  } =>#t301;
+  core::List<core::int> list110 = block {
+    final core::List<core::int> #t303 = <core::int>[];
+    for (core::int i in <core::int>[1, 2, 3])
+      #t303.{core::List::add}(i);
+  } =>#t303;
+  core::Set<core::int> set110 = block {
+    final core::Set<core::int> #t304 = col::LinkedHashSet::•<core::int>();
+    for (core::int i in <core::int>[1, 2, 3])
+      #t304.{core::Set::add}(i);
+    #t304.{core::Set::add}(null);
+  } =>#t304;
+  core::Map<core::String, core::int> map110 = block {
+    final core::Map<core::String, core::int> #t305 = <core::String, core::int>{};
+    for (core::int i in <core::int>[1, 2, 3])
+      #t305.{core::Map::[]=}("bar", i);
+    #t305.{core::Map::[]=}("baz", null);
+  } =>#t305;
+  core::List<core::int> list120 = block {
+    final core::List<core::int> #t306 = <core::int>[];
+    for (dynamic i in dynVar as{TypeError} core::Iterable<dynamic>)
+      #t306.{core::List::add}(i as{TypeError} core::int);
+  } =>#t306;
+  core::Set<core::int> set120 = block {
+    final core::Set<core::int> #t307 = col::LinkedHashSet::•<core::int>();
+    for (dynamic i in dynVar as{TypeError} core::Iterable<dynamic>)
+      #t307.{core::Set::add}(i as{TypeError} core::int);
+    #t307.{core::Set::add}(null);
+  } =>#t307;
+  core::Map<core::String, core::int> map120 = block {
+    final core::Map<core::String, core::int> #t308 = <core::String, core::int>{};
+    for (dynamic i in dynVar as{TypeError} core::Iterable<dynamic>)
+      #t308.{core::Map::[]=}("bar", i as{TypeError} core::int);
+    #t308.{core::Map::[]=}("baz", null);
+  } =>#t308;
+}
+static method testForElementErrors(core::Map<core::int, core::int> map, core::List<core::int> list) → dynamic /* originally async */ {
+  final asy::_AsyncAwaitCompleter<dynamic> :async_completer = new asy::_AsyncAwaitCompleter::•<dynamic>();
+  asy::FutureOr<dynamic> :return_value;
+  dynamic :async_stack_trace;
+  dynamic :async_op_then;
+  dynamic :async_op_error;
+  dynamic :await_jump_var = 0;
+  dynamic :await_ctx_var;
+  dynamic :saved_try_context_var0;
+  dynamic :saved_try_context_var1;
+  dynamic :exception0;
+  dynamic :stack_trace0;
+  function :async_op([dynamic :result, dynamic :exception, dynamic :stack_trace]) → dynamic yielding 
+    try {
+      #L1:
+      {
+        <core::int>[invalid-expression "pkg/front_end/testcases/control_flow_collection_inference.dart:190:45: Error: A value of type 'String' can't be assigned to a variable of type 'int'.
+Try changing the type of the left hand side, or casting the right hand side to 'int'.
+  <int>[for (int i = 0; oracle(\"foo\"); i++) \"bar\"];
+                                            ^"];
+        let final core::Set<core::int> #t309 = col::LinkedHashSet::•<core::int>() in let final core::bool #t310 = #t309.{core::Set::add}(invalid-expression "pkg/front_end/testcases/control_flow_collection_inference.dart:191:45: Error: A value of type 'String' can't be assigned to a variable of type 'int'.
+Try changing the type of the left hand side, or casting the right hand side to 'int'.
+  <int>{for (int i = 0; oracle(\"foo\"); i++) \"bar\", null};
+                                            ^") in let final core::bool #t311 = #t309.{core::Set::add}(null) in #t309;
+        <core::int, core::int>{invalid-expression "pkg/front_end/testcases/control_flow_collection_inference.dart:192:14: Error: A value of type 'String' can't be assigned to a variable of type 'int'.
+Try changing the type of the left hand side, or casting the right hand side to 'int'.
+  <int, int>{for (int i = 0; oracle(\"foo\"); i++) \"bar\": \"bar\", \"baz\": null};
+             ^": invalid-expression "pkg/front_end/testcases/control_flow_collection_inference.dart:192:14: Error: A value of type 'String' can't be assigned to a variable of type 'int'.
+Try changing the type of the left hand side, or casting the right hand side to 'int'.
+  <int, int>{for (int i = 0; oracle(\"foo\"); i++) \"bar\": \"bar\", \"baz\": null};
+             ^", let final<BottomType> #t312 = invalid-expression "pkg/front_end/testcases/control_flow_collection_inference.dart:192:64: Error: A value of type 'String' can't be assigned to a variable of type 'int'.
+Try changing the type of the left hand side, or casting the right hand side to 'int'.
+  <int, int>{for (int i = 0; oracle(\"foo\"); i++) \"bar\": \"bar\", \"baz\": null};
+                                                               ^" in "baz" as{TypeError} core::int: null};
+        block {
+          final core::List<core::int> #t313 = <core::int>[];
+          for (core::int i = 0; self::oracle<core::String>("foo") as{TypeError} core::bool; i = i.{core::num::+}(1))
+            for (final core::int #t314 in <core::int>[let final<BottomType> #t315 = invalid-expression "pkg/front_end/testcases/control_flow_collection_inference.dart:193:49: Error: A value of type 'String' can't be assigned to a variable of type 'int'.
+Try changing the type of the left hand side, or casting the right hand side to 'int'.
+  <int>[for (int i = 0; oracle(\"foo\"); i++) ...[\"bar\"]];
+                                                ^" in "bar" as{TypeError} core::int])
+              #t313.{core::List::add}(#t314);
+        } =>#t313;
+        block {
+          final core::Set<core::int> #t316 = col::LinkedHashSet::•<core::int>();
+          for (core::int i = 0; self::oracle<core::String>("foo") as{TypeError} core::bool; i = i.{core::num::+}(1))
+            for (final core::int #t317 in <core::int>[let final<BottomType> #t318 = invalid-expression "pkg/front_end/testcases/control_flow_collection_inference.dart:194:49: Error: A value of type 'String' can't be assigned to a variable of type 'int'.
+Try changing the type of the left hand side, or casting the right hand side to 'int'.
+  <int>{for (int i = 0; oracle(\"foo\"); i++) ...[\"bar\"], null};
+                                                ^" in "bar" as{TypeError} core::int])
+              #t316.{core::Set::add}(#t317);
+          #t316.{core::Set::add}(null);
+        } =>#t316;
+        block {
+          final core::Map<core::int, core::int> #t319 = <core::int, core::int>{};
+          for (core::int i = 0; self::oracle<core::String>("foo") as{TypeError} core::bool; i = i.{core::num::+}(1))
+            for (final core::MapEntry<core::int, core::int> #t320 in <core::int, core::int>{let final<BottomType> #t321 = invalid-expression "pkg/front_end/testcases/control_flow_collection_inference.dart:195:54: Error: A value of type 'String' can't be assigned to a variable of type 'int'.
+Try changing the type of the left hand side, or casting the right hand side to 'int'.
+  <int, int>{for (int i = 0; oracle(\"foo\"); i++) ...{\"bar\": \"bar\"}, \"baz\": null};
+                                                     ^" in "bar" as{TypeError} core::int: let final<BottomType> #t322 = invalid-expression "pkg/front_end/testcases/control_flow_collection_inference.dart:195:61: Error: A value of type 'String' can't be assigned to a variable of type 'int'.
+Try changing the type of the left hand side, or casting the right hand side to 'int'.
+  <int, int>{for (int i = 0; oracle(\"foo\"); i++) ...{\"bar\": \"bar\"}, \"baz\": null};
+                                                            ^" in "bar" as{TypeError} core::int}.{core::Map::entries})
+              #t319.{core::Map::[]=}(#t320.{core::MapEntry::key}, #t320.{core::MapEntry::value});
+          #t319.{core::Map::[]=}(let final<BottomType> #t323 = invalid-expression "pkg/front_end/testcases/control_flow_collection_inference.dart:195:69: Error: A value of type 'String' can't be assigned to a variable of type 'int'.
+Try changing the type of the left hand side, or casting the right hand side to 'int'.
+  <int, int>{for (int i = 0; oracle(\"foo\"); i++) ...{\"bar\": \"bar\"}, \"baz\": null};
+                                                                    ^" in "baz" as{TypeError} core::int, null);
+        } =>#t319;
+        block {
+          final core::List<core::int> #t324 = <core::int>[];
+          for (core::int i = 0; self::oracle<core::String>("foo") as{TypeError} core::bool; i = i.{core::num::+}(1))
+            #t324.{core::List::add}(invalid-expression "pkg/front_end/testcases/control_flow_collection_inference.dart:196:48: Error: Unexpected type 'Map<int, int>' of a spread.  Expected 'dynamic' or an Iterable.
+ - 'Map' is from 'dart:core'.
+  <int>[for (int i = 0; oracle(\"foo\"); i++) ...map];
+                                               ^" as{TypeError} core::int);
+        } =>#t324;
+        block {
+          final core::Set<core::int> #t325 = col::LinkedHashSet::•<core::int>();
+          for (core::int i = 0; self::oracle<core::String>("foo") as{TypeError} core::bool; i = i.{core::num::+}(1))
+            #t325.{core::Set::add}(invalid-expression "pkg/front_end/testcases/control_flow_collection_inference.dart:197:48: Error: Unexpected type 'Map<int, int>' of a spread.  Expected 'dynamic' or an Iterable.
+ - 'Map' is from 'dart:core'.
+  <int>{for (int i = 0; oracle(\"foo\"); i++) ...map, null};
+                                               ^" as{TypeError} core::int);
+          #t325.{core::Set::add}(null);
+        } =>#t325;
+        <core::int, core::int>{invalid-expression "pkg/front_end/testcases/control_flow_collection_inference.dart:198:53: Error: Unexpected type 'List<int>' of a map spread entry.  Expected 'dynamic' or a Map.
+ - 'List' is from 'dart:core'.
+  <int, int>{for (int i = 0; oracle(\"foo\"); i++) ...list, 42: null};
+                                                    ^": null, invalid-expression "pkg/front_end/testcases/control_flow_collection_inference.dart:198:53: Error: Unexpected type 'List<int>' of a map spread entry.  Expected 'dynamic' or a Map.
+ - 'List' is from 'dart:core'.
+  <int, int>{for (int i = 0; oracle(\"foo\"); i++) ...list, 42: null};
+                                                    ^": null};
+        <core::String>[invalid-expression "pkg/front_end/testcases/control_flow_collection_inference.dart:199:48: Error: A value of type 'num' can't be assigned to a variable of type 'String'.
+Try changing the type of the left hand side, or casting the right hand side to 'String'.
+  <String>[for (int i = 0; oracle(\"foo\"); i++) if (oracle()) 42 else 3.14];
+                                               ^"];
+        let final core::Set<core::String> #t326 = col::LinkedHashSet::•<core::String>() in let final core::bool #t327 = #t326.{core::Set::add}(invalid-expression "pkg/front_end/testcases/control_flow_collection_inference.dart:200:48: Error: A value of type 'num' can't be assigned to a variable of type 'String'.
+Try changing the type of the left hand side, or casting the right hand side to 'String'.
+  <String>{for (int i = 0; oracle(\"foo\"); i++) if (oracle()) 42 else 3.14, null};
+                                               ^") in let final core::bool #t328 = #t326.{core::Set::add}(null) in #t326;
+        <core::String, core::String>{null: invalid-expression "pkg/front_end/testcases/control_flow_collection_inference.dart:201:20: Error: A value of type 'num' can't be assigned to a variable of type 'String'.
+Try changing the type of the left hand side, or casting the right hand side to 'String'.
+  <String, String>{for (int i = 0; oracle(\"foo\"); i++) if (oracle()) \"bar\": 42 else \"bar\": 3.14, \"baz\": null};
+                   ^", "baz": null};
+        block {
+          final core::List<core::int> #t329 = <core::int>[];
+          for (core::int i = 0; self::oracle<core::String>("foo") as{TypeError} core::bool; i = i.{core::num::+}(1))
+            if(self::oracle<dynamic>())
+              #t329.{core::List::add}(invalid-expression "pkg/front_end/testcases/control_flow_collection_inference.dart:202:62: Error: Unexpected type 'Map<int, int>' of a spread.  Expected 'dynamic' or an Iterable.
+ - 'Map' is from 'dart:core'.
+  <int>[for (int i = 0; oracle(\"foo\"); i++) if (oracle()) ...map else 42];
+                                                             ^" as{TypeError} core::int);
+            else
+              #t329.{core::List::add}(42 as{TypeError} core::int);
+        } =>#t329;
+        block {
+          final core::Set<core::int> #t330 = col::LinkedHashSet::•<core::int>();
+          for (core::int i = 0; self::oracle<core::String>("foo") as{TypeError} core::bool; i = i.{core::num::+}(1))
+            if(self::oracle<dynamic>())
+              #t330.{core::Set::add}(invalid-expression "pkg/front_end/testcases/control_flow_collection_inference.dart:203:62: Error: Unexpected type 'Map<int, int>' of a spread.  Expected 'dynamic' or an Iterable.
+ - 'Map' is from 'dart:core'.
+  <int>{for (int i = 0; oracle(\"foo\"); i++) if (oracle()) ...map else 42, null};
+                                                             ^" as{TypeError} core::int);
+            else
+              #t330.{core::Set::add}(42 as{TypeError} core::int);
+          #t330.{core::Set::add}(null);
+        } =>#t330;
+        <core::String, core::int>{invalid-expression "pkg/front_end/testcases/control_flow_collection_inference.dart:204:70: Error: Unexpected type 'List<int>' of a map spread entry.  Expected 'dynamic' or a Map.
+ - 'List' is from 'dart:core'.
+  <String, int>{for (int i = 0; oracle(\"foo\"); i++) if (oracle()) ...list else \"bar\": 42, \"baz\": null};
+                                                                     ^": null, invalid-expression "pkg/front_end/testcases/control_flow_collection_inference.dart:204:70: Error: Unexpected type 'List<int>' of a map spread entry.  Expected 'dynamic' or a Map.
+ - 'List' is from 'dart:core'.
+  <String, int>{for (int i = 0; oracle(\"foo\"); i++) if (oracle()) ...list else \"bar\": 42, \"baz\": null};
+                                                                     ^": null};
+        block {
+          final core::List<core::int> #t331 = <core::int>[];
+          for (core::int i = 0; self::oracle<core::String>("foo") as{TypeError} core::bool; i = i.{core::num::+}(1))
+            if(self::oracle<dynamic>())
+              #t331.{core::List::add}(42 as{TypeError} core::int);
+            else
+              #t331.{core::List::add}(invalid-expression "pkg/front_end/testcases/control_flow_collection_inference.dart:205:70: Error: Unexpected type 'Map<int, int>' of a spread.  Expected 'dynamic' or an Iterable.
+ - 'Map' is from 'dart:core'.
+  <int>[for (int i = 0; oracle(\"foo\"); i++) if (oracle()) 42 else ...map];
+                                                                     ^" as{TypeError} core::int);
+        } =>#t331;
+        block {
+          final core::Set<core::int> #t332 = col::LinkedHashSet::•<core::int>();
+          for (core::int i = 0; self::oracle<core::String>("foo") as{TypeError} core::bool; i = i.{core::num::+}(1))
+            if(self::oracle<dynamic>())
+              #t332.{core::Set::add}(42 as{TypeError} core::int);
+            else
+              #t332.{core::Set::add}(invalid-expression "pkg/front_end/testcases/control_flow_collection_inference.dart:206:70: Error: Unexpected type 'Map<int, int>' of a spread.  Expected 'dynamic' or an Iterable.
+ - 'Map' is from 'dart:core'.
+  <int>{for (int i = 0; oracle(\"foo\"); i++) if (oracle()) 42 else ...map, null};
+                                                                     ^" as{TypeError} core::int);
+          #t332.{core::Set::add}(null);
+        } =>#t332;
+        <core::String, core::int>{invalid-expression "pkg/front_end/testcases/control_flow_collection_inference.dart:207:85: Error: Unexpected type 'List<int>' of a map spread entry.  Expected 'dynamic' or a Map.
+ - 'List' is from 'dart:core'.
+  <String, int>{for (int i = 0; oracle(\"foo\"); i++) if (oracle()) \"bar\": 42 else ...list, \"baz\": null};
+                                                                                    ^": null, invalid-expression "pkg/front_end/testcases/control_flow_collection_inference.dart:207:85: Error: Unexpected type 'List<int>' of a map spread entry.  Expected 'dynamic' or a Map.
+ - 'List' is from 'dart:core'.
+  <String, int>{for (int i = 0; oracle(\"foo\"); i++) if (oracle()) \"bar\": 42 else ...list, \"baz\": null};
+                                                                                    ^": null};
+        final core::int i = 0;
+        block {
+          final core::List<core::int> #t333 = <core::int>[];
+          for (final core::int #t334 in <core::int>[1]) {
+            invalid-expression "pkg/front_end/testcases/control_flow_collection_inference.dart:210:14: Error: Setter not found: 'i'.
+  <int>[for (i in <int>[1]) i];
+             ^";
+            #t333.{core::List::add}(i);
+          }
+        } =>#t333;
+        block {
+          final core::Set<core::int> #t335 = col::LinkedHashSet::•<core::int>();
+          for (final core::int #t336 in <core::int>[1]) {
+            invalid-expression "pkg/front_end/testcases/control_flow_collection_inference.dart:211:14: Error: Setter not found: 'i'.
+  <int>{for (i in <int>[1]) i, null};
+             ^";
+            #t335.{core::Set::add}(i);
+          }
+          #t335.{core::Set::add}(null);
+        } =>#t335;
+        block {
+          final core::Map<core::String, core::int> #t337 = <core::String, core::int>{};
+          for (final core::int #t338 in <core::int>[1]) {
+            invalid-expression "pkg/front_end/testcases/control_flow_collection_inference.dart:212:21: Error: Setter not found: 'i'.
+\t<String, int>{for (i in <int>[1]) \"bar\": i, \"baz\": null};
+\t                   ^";
+            #t337.{core::Map::[]=}("bar", i);
+          }
+          #t337.{core::Map::[]=}("baz", null);
+        } =>#t337;
+        core::List<dynamic> list10 = block {
+          final core::List<dynamic> #t339 = <dynamic>[];
+          for (dynamic i in let final<BottomType> #t340 = invalid-expression "pkg/front_end/testcases/control_flow_collection_inference.dart:214:31: Error: The type 'String' used in the 'for' loop must implement 'Iterable<dynamic>'.
+ - 'Iterable' is from 'dart:core'.
+  var list10 = [for (var i in \"not iterable\") i];
+                              ^" in "not iterable" as{TypeError} core::Iterable<dynamic>)
+            #t339.{core::List::add}(i);
+        } =>#t339;
+        core::Set<dynamic> set10 = block {
+          final core::Set<dynamic> #t341 = col::LinkedHashSet::•<dynamic>();
+          for (dynamic i in let final<BottomType> #t342 = invalid-expression "pkg/front_end/testcases/control_flow_collection_inference.dart:215:30: Error: The type 'String' used in the 'for' loop must implement 'Iterable<dynamic>'.
+ - 'Iterable' is from 'dart:core'.
+  var set10 = {for (var i in \"not iterable\") i, null};
+                             ^" in "not iterable" as{TypeError} core::Iterable<dynamic>)
+            #t341.{core::Set::add}(i);
+          #t341.{core::Set::add}(null);
+        } =>#t341;
+        core::Map<core::String, dynamic> map10 = block {
+          final core::Map<core::String, dynamic> #t343 = <core::String, dynamic>{};
+          for (dynamic i in let final<BottomType> #t344 = invalid-expression "pkg/front_end/testcases/control_flow_collection_inference.dart:216:30: Error: The type 'String' used in the 'for' loop must implement 'Iterable<dynamic>'.
+ - 'Iterable' is from 'dart:core'.
+  var map10 = {for (var i in \"not iterable\") \"bar\": i, \"baz\": null};
+                             ^" in "not iterable" as{TypeError} core::Iterable<dynamic>)
+            #t343.{core::Map::[]=}("bar", i);
+          #t343.{core::Map::[]=}("baz", null);
+        } =>#t343;
+        core::List<core::int> list20 = block {
+          final core::List<core::int> #t345 = <core::int>[];
+          for (core::int i in <core::int>[let final<BottomType> #t346 = invalid-expression "pkg/front_end/testcases/control_flow_collection_inference.dart:217:32: Error: A value of type 'String' can't be assigned to a variable of type 'int'.
+Try changing the type of the left hand side, or casting the right hand side to 'int'.
+  var list20 = [for (int i in [\"not\", \"int\"]) i];
+                               ^" in "not" as{TypeError} core::int, let final<BottomType> #t347 = invalid-expression "pkg/front_end/testcases/control_flow_collection_inference.dart:217:39: Error: A value of type 'String' can't be assigned to a variable of type 'int'.
+Try changing the type of the left hand side, or casting the right hand side to 'int'.
+  var list20 = [for (int i in [\"not\", \"int\"]) i];
+                                      ^" in "int" as{TypeError} core::int])
+            #t345.{core::List::add}(i);
+        } =>#t345;
+        core::Set<core::int> set20 = block {
+          final core::Set<core::int> #t348 = col::LinkedHashSet::•<core::int>();
+          for (core::int i in <core::int>[let final<BottomType> #t349 = invalid-expression "pkg/front_end/testcases/control_flow_collection_inference.dart:218:31: Error: A value of type 'String' can't be assigned to a variable of type 'int'.
+Try changing the type of the left hand side, or casting the right hand side to 'int'.
+  var set20 = {for (int i in [\"not\", \"int\"]) i, null};
+                              ^" in "not" as{TypeError} core::int, let final<BottomType> #t350 = invalid-expression "pkg/front_end/testcases/control_flow_collection_inference.dart:218:38: Error: A value of type 'String' can't be assigned to a variable of type 'int'.
+Try changing the type of the left hand side, or casting the right hand side to 'int'.
+  var set20 = {for (int i in [\"not\", \"int\"]) i, null};
+                                     ^" in "int" as{TypeError} core::int])
+            #t348.{core::Set::add}(i);
+          #t348.{core::Set::add}(null);
+        } =>#t348;
+        core::Map<core::String, core::int> map20 = block {
+          final core::Map<core::String, core::int> #t351 = <core::String, core::int>{};
+          for (core::int i in <core::int>[let final<BottomType> #t352 = invalid-expression "pkg/front_end/testcases/control_flow_collection_inference.dart:219:31: Error: A value of type 'String' can't be assigned to a variable of type 'int'.
+Try changing the type of the left hand side, or casting the right hand side to 'int'.
+  var map20 = {for (int i in [\"not\", \"int\"]) \"bar\": i, \"baz\": null};
+                              ^" in "not" as{TypeError} core::int, let final<BottomType> #t353 = invalid-expression "pkg/front_end/testcases/control_flow_collection_inference.dart:219:38: Error: A value of type 'String' can't be assigned to a variable of type 'int'.
+Try changing the type of the left hand side, or casting the right hand side to 'int'.
+  var map20 = {for (int i in [\"not\", \"int\"]) \"bar\": i, \"baz\": null};
+                                     ^" in "int" as{TypeError} core::int])
+            #t351.{core::Map::[]=}("bar", i);
+          #t351.{core::Map::[]=}("baz", null);
+        } =>#t351;
+        final core::List<dynamic> #t354 = <dynamic>[];
+        {
+          dynamic :stream = let final<BottomType> #t355 = invalid-expression "pkg/front_end/testcases/control_flow_collection_inference.dart:220:37: Error: The type 'String' used in the 'for' loop must implement 'Stream<dynamic>'.
+ - 'Stream' is from 'dart:async'.
+  var list30 = [await for (var i in \"not stream\") i];
+                                    ^" in "not stream" as{TypeError} asy::Stream<dynamic>;
+          asy::_asyncStarListenHelper(:stream, :async_op);
+          asy::_StreamIterator<dynamic> :for-iterator = new asy::_StreamIterator::•<dynamic>(:stream);
+          const core::bool :product-mode = const core::bool::fromEnvironment("dart.vm.product");
+          try
+            #L2:
+            while (true) {
+              dynamic #t356 = :product-mode ?{dynamic} null : asy::_asyncStarMoveNextHelper(:stream);
+              [yield] let dynamic #t357 = asy::_awaitHelper(:for-iterator.{asy::_StreamIterator::moveNext}(), :async_op_then, :async_op_error, :async_op) in null;
+              if(:result) {
+                dynamic i = :for-iterator.{asy::_StreamIterator::current};
+                #t354.{core::List::add}(i);
+              }
+              else
+                break #L2;
+            }
+          finally
+            if(!:for-iterator.{asy::_StreamIterator::_subscription}.{core::Object::==}(null)) {
+              [yield] let dynamic #t358 = asy::_awaitHelper(:for-iterator.{asy::_StreamIterator::cancel}(), :async_op_then, :async_op_error, :async_op) in null;
+              :result;
+            }
+        }
+        core::List<dynamic> list30 = block {} =>#t354;
+        final core::Set<dynamic> #t359 = col::LinkedHashSet::•<dynamic>();
+        {
+          dynamic :stream = let final<BottomType> #t360 = invalid-expression "pkg/front_end/testcases/control_flow_collection_inference.dart:221:36: Error: The type 'String' used in the 'for' loop must implement 'Stream<dynamic>'.
+ - 'Stream' is from 'dart:async'.
+  var set30 = {await for (var i in \"not stream\") i, null};
+                                   ^" in "not stream" as{TypeError} asy::Stream<dynamic>;
+          asy::_asyncStarListenHelper(:stream, :async_op);
+          asy::_StreamIterator<dynamic> :for-iterator = new asy::_StreamIterator::•<dynamic>(:stream);
+          const core::bool :product-mode = const core::bool::fromEnvironment("dart.vm.product");
+          try
+            #L3:
+            while (true) {
+              dynamic #t361 = :product-mode ?{dynamic} null : asy::_asyncStarMoveNextHelper(:stream);
+              [yield] let dynamic #t362 = asy::_awaitHelper(:for-iterator.{asy::_StreamIterator::moveNext}(), :async_op_then, :async_op_error, :async_op) in null;
+              if(:result) {
+                dynamic i = :for-iterator.{asy::_StreamIterator::current};
+                #t359.{core::Set::add}(i);
+              }
+              else
+                break #L3;
+            }
+          finally
+            if(!:for-iterator.{asy::_StreamIterator::_subscription}.{core::Object::==}(null)) {
+              [yield] let dynamic #t363 = asy::_awaitHelper(:for-iterator.{asy::_StreamIterator::cancel}(), :async_op_then, :async_op_error, :async_op) in null;
+              :result;
+            }
+        }
+        core::Set<dynamic> set30 = block {
+          #t359.{core::Set::add}(null);
+        } =>#t359;
+        final core::Map<core::String, dynamic> #t364 = <core::String, dynamic>{};
+        {
+          dynamic :stream = let final<BottomType> #t365 = invalid-expression "pkg/front_end/testcases/control_flow_collection_inference.dart:222:36: Error: The type 'String' used in the 'for' loop must implement 'Stream<dynamic>'.
+ - 'Stream' is from 'dart:async'.
+  var map30 = {await for (var i in \"not stream\") \"bar\": i, \"baz\": null};
+                                   ^" in "not stream" as{TypeError} asy::Stream<dynamic>;
+          asy::_asyncStarListenHelper(:stream, :async_op);
+          asy::_StreamIterator<dynamic> :for-iterator = new asy::_StreamIterator::•<dynamic>(:stream);
+          const core::bool :product-mode = const core::bool::fromEnvironment("dart.vm.product");
+          try
+            #L4:
+            while (true) {
+              dynamic #t366 = :product-mode ?{dynamic} null : asy::_asyncStarMoveNextHelper(:stream);
+              [yield] let dynamic #t367 = asy::_awaitHelper(:for-iterator.{asy::_StreamIterator::moveNext}(), :async_op_then, :async_op_error, :async_op) in null;
+              if(:result) {
+                dynamic i = :for-iterator.{asy::_StreamIterator::current};
+                #t364.{core::Map::[]=}("bar", i);
+              }
+              else
+                break #L4;
+            }
+          finally
+            if(!:for-iterator.{asy::_StreamIterator::_subscription}.{core::Object::==}(null)) {
+              [yield] let dynamic #t368 = asy::_awaitHelper(:for-iterator.{asy::_StreamIterator::cancel}(), :async_op_then, :async_op_error, :async_op) in null;
+              :result;
+            }
+        }
+        core::Map<core::String, dynamic> map30 = block {
+          #t364.{core::Map::[]=}("baz", null);
+        } =>#t364;
+        final core::List<core::int> #t369 = <core::int>[];
+        {
+          dynamic :stream = asy::Stream::fromIterable<core::int>(<core::int>[let final<BottomType> #t370 = invalid-expression "pkg/front_end/testcases/control_flow_collection_inference.dart:223:58: Error: A value of type 'String' can't be assigned to a variable of type 'int'.
+Try changing the type of the left hand side, or casting the right hand side to 'int'.
+  var list40 = [await for (int i in Stream.fromIterable([\"not\", \"int\"])) i];
+                                                         ^" in "not" as{TypeError} core::int, let final<BottomType> #t371 = invalid-expression "pkg/front_end/testcases/control_flow_collection_inference.dart:223:65: Error: A value of type 'String' can't be assigned to a variable of type 'int'.
+Try changing the type of the left hand side, or casting the right hand side to 'int'.
+  var list40 = [await for (int i in Stream.fromIterable([\"not\", \"int\"])) i];
+                                                                ^" in "int" as{TypeError} core::int]);
+          asy::_asyncStarListenHelper(:stream, :async_op);
+          asy::_StreamIterator<core::int> :for-iterator = new asy::_StreamIterator::•<core::int>(:stream);
+          const core::bool :product-mode = const core::bool::fromEnvironment("dart.vm.product");
+          try
+            #L5:
+            while (true) {
+              dynamic #t372 = :product-mode ?{dynamic} null : asy::_asyncStarMoveNextHelper(:stream);
+              [yield] let dynamic #t373 = asy::_awaitHelper(:for-iterator.{asy::_StreamIterator::moveNext}(), :async_op_then, :async_op_error, :async_op) in null;
+              if(:result) {
+                core::int i = :for-iterator.{asy::_StreamIterator::current};
+                #t369.{core::List::add}(i);
+              }
+              else
+                break #L5;
+            }
+          finally
+            if(!:for-iterator.{asy::_StreamIterator::_subscription}.{core::Object::==}(null)) {
+              [yield] let dynamic #t374 = asy::_awaitHelper(:for-iterator.{asy::_StreamIterator::cancel}(), :async_op_then, :async_op_error, :async_op) in null;
+              :result;
+            }
+        }
+        core::List<core::int> list40 = block {} =>#t369;
+        final core::Set<core::int> #t375 = col::LinkedHashSet::•<core::int>();
+        {
+          dynamic :stream = asy::Stream::fromIterable<core::int>(<core::int>[let final<BottomType> #t376 = invalid-expression "pkg/front_end/testcases/control_flow_collection_inference.dart:224:57: Error: A value of type 'String' can't be assigned to a variable of type 'int'.
+Try changing the type of the left hand side, or casting the right hand side to 'int'.
+  var set40 = {await for (int i in Stream.fromIterable([\"not\", \"int\"])) i, null};
+                                                        ^" in "not" as{TypeError} core::int, let final<BottomType> #t377 = invalid-expression "pkg/front_end/testcases/control_flow_collection_inference.dart:224:64: Error: A value of type 'String' can't be assigned to a variable of type 'int'.
+Try changing the type of the left hand side, or casting the right hand side to 'int'.
+  var set40 = {await for (int i in Stream.fromIterable([\"not\", \"int\"])) i, null};
+                                                               ^" in "int" as{TypeError} core::int]);
+          asy::_asyncStarListenHelper(:stream, :async_op);
+          asy::_StreamIterator<core::int> :for-iterator = new asy::_StreamIterator::•<core::int>(:stream);
+          const core::bool :product-mode = const core::bool::fromEnvironment("dart.vm.product");
+          try
+            #L6:
+            while (true) {
+              dynamic #t378 = :product-mode ?{dynamic} null : asy::_asyncStarMoveNextHelper(:stream);
+              [yield] let dynamic #t379 = asy::_awaitHelper(:for-iterator.{asy::_StreamIterator::moveNext}(), :async_op_then, :async_op_error, :async_op) in null;
+              if(:result) {
+                core::int i = :for-iterator.{asy::_StreamIterator::current};
+                #t375.{core::Set::add}(i);
+              }
+              else
+                break #L6;
+            }
+          finally
+            if(!:for-iterator.{asy::_StreamIterator::_subscription}.{core::Object::==}(null)) {
+              [yield] let dynamic #t380 = asy::_awaitHelper(:for-iterator.{asy::_StreamIterator::cancel}(), :async_op_then, :async_op_error, :async_op) in null;
+              :result;
+            }
+        }
+        core::Set<core::int> set40 = block {
+          #t375.{core::Set::add}(null);
+        } =>#t375;
+        final core::Map<core::String, core::int> #t381 = <core::String, core::int>{};
+        {
+          dynamic :stream = asy::Stream::fromIterable<core::int>(<core::int>[let final<BottomType> #t382 = invalid-expression "pkg/front_end/testcases/control_flow_collection_inference.dart:225:57: Error: A value of type 'String' can't be assigned to a variable of type 'int'.
+Try changing the type of the left hand side, or casting the right hand side to 'int'.
+  var map40 = {await for (int i in Stream.fromIterable([\"not\", \"int\"])) \"bar\": i, \"baz\": null};
+                                                        ^" in "not" as{TypeError} core::int, let final<BottomType> #t383 = invalid-expression "pkg/front_end/testcases/control_flow_collection_inference.dart:225:64: Error: A value of type 'String' can't be assigned to a variable of type 'int'.
+Try changing the type of the left hand side, or casting the right hand side to 'int'.
+  var map40 = {await for (int i in Stream.fromIterable([\"not\", \"int\"])) \"bar\": i, \"baz\": null};
+                                                               ^" in "int" as{TypeError} core::int]);
+          asy::_asyncStarListenHelper(:stream, :async_op);
+          asy::_StreamIterator<core::int> :for-iterator = new asy::_StreamIterator::•<core::int>(:stream);
+          const core::bool :product-mode = const core::bool::fromEnvironment("dart.vm.product");
+          try
+            #L7:
+            while (true) {
+              dynamic #t384 = :product-mode ?{dynamic} null : asy::_asyncStarMoveNextHelper(:stream);
+              [yield] let dynamic #t385 = asy::_awaitHelper(:for-iterator.{asy::_StreamIterator::moveNext}(), :async_op_then, :async_op_error, :async_op) in null;
+              if(:result) {
+                core::int i = :for-iterator.{asy::_StreamIterator::current};
+                #t381.{core::Map::[]=}("bar", i);
+              }
+              else
+                break #L7;
+            }
+          finally
+            if(!:for-iterator.{asy::_StreamIterator::_subscription}.{core::Object::==}(null)) {
+              [yield] let dynamic #t386 = asy::_awaitHelper(:for-iterator.{asy::_StreamIterator::cancel}(), :async_op_then, :async_op_error, :async_op) in null;
+              :result;
+            }
+        }
+        core::Map<core::String, core::int> map40 = block {
+          #t381.{core::Map::[]=}("baz", null);
+        } =>#t381;
+        core::List<core::int> list50 = block {
+          final core::List<core::int> #t387 = <core::int>[];
+          for (; ; )
+            #t387.{core::List::add}(42);
+        } =>#t387;
+        core::Set<core::int> set50 = block {
+          final core::Set<core::int> #t388 = col::LinkedHashSet::•<core::int>();
+          for (; ; )
+            #t388.{core::Set::add}(42);
+          #t388.{core::Set::add}(null);
+        } =>#t388;
+        core::Map<core::String, core::int> map50 = block {
+          final core::Map<core::String, core::int> #t389 = <core::String, core::int>{};
+          for (; ; )
+            #t389.{core::Map::[]=}("bar", 42);
+          #t389.{core::Map::[]=}("baz", null);
+        } =>#t389;
+        core::List<core::int> list60 = block {
+          final core::List<core::int> #t390 = <core::int>[];
+          for (; let final<BottomType> #t391 = invalid-expression "pkg/front_end/testcases/control_flow_collection_inference.dart:229:24: Error: A value of type 'String' can't be assigned to a variable of type 'bool'.
+Try changing the type of the left hand side, or casting the right hand side to 'bool'.
+  var list60 = [for (; \"not bool\";) 42];
+                       ^" in "not bool" as{TypeError} core::bool; )
+            #t390.{core::List::add}(42);
+        } =>#t390;
+        core::Set<core::int> set60 = block {
+          final core::Set<core::int> #t392 = col::LinkedHashSet::•<core::int>();
+          for (; let final<BottomType> #t393 = invalid-expression "pkg/front_end/testcases/control_flow_collection_inference.dart:230:23: Error: A value of type 'String' can't be assigned to a variable of type 'bool'.
+Try changing the type of the left hand side, or casting the right hand side to 'bool'.
+  var set60 = {for (; \"not bool\";) 42, null};
+                      ^" in "not bool" as{TypeError} core::bool; )
+            #t392.{core::Set::add}(42);
+          #t392.{core::Set::add}(null);
+        } =>#t392;
+        core::Map<core::String, core::int> map60 = block {
+          final core::Map<core::String, core::int> #t394 = <core::String, core::int>{};
+          for (; let final<BottomType> #t395 = invalid-expression "pkg/front_end/testcases/control_flow_collection_inference.dart:231:23: Error: A value of type 'String' can't be assigned to a variable of type 'bool'.
+Try changing the type of the left hand side, or casting the right hand side to 'bool'.
+  var map60 = {for (; \"not bool\";) \"bar\": 42, \"baz\": null};
+                      ^" in "not bool" as{TypeError} core::bool; )
+            #t394.{core::Map::[]=}("bar", 42);
+          #t394.{core::Map::[]=}("baz", null);
+        } =>#t394;
+      }
+      asy::_completeOnAsyncReturn(:async_completer, :return_value);
+      return;
+    }
+    on dynamic catch(dynamic :exception, dynamic :stack_trace) {
+      :async_completer.{asy::Completer::completeError}(:exception, :stack_trace);
+    }
+  :async_stack_trace = asy::_asyncStackTraceHelper(:async_op);
+  :async_op_then = asy::_asyncThenWrapperHelper(:async_op);
+  :async_op_error = asy::_asyncErrorWrapperHelper(:async_op);
+  :async_completer.start(:async_op);
+  return :async_completer.{asy::Completer::future};
+}
+static method testForElementErrorsNotAsync(asy::Stream<core::int> stream) → dynamic {
+  block {
+    final core::List<core::int> #t396 = <core::int>[];
+    await for (core::int i in stream)
+      #t396.{core::List::add}(i);
+  } =>#t396;
+  block {
+    final core::Set<core::int> #t397 = col::LinkedHashSet::•<core::int>();
+    await for (core::int i in stream)
+      #t397.{core::Set::add}(i);
+  } =>#t397;
+  block {
+    final core::Map<core::String, core::int> #t398 = <core::String, core::int>{};
+    await for (core::int i in stream)
+      #t398.{core::Map::[]=}("bar", i);
+  } =>#t398;
+}
+static method main() → dynamic {}
diff --git a/pkg/front_end/testcases/control_flow_collection_inference.dart.type_promotion.expect b/pkg/front_end/testcases/control_flow_collection_inference.dart.type_promotion.expect
new file mode 100644
index 0000000..1ac72fb
--- /dev/null
+++ b/pkg/front_end/testcases/control_flow_collection_inference.dart.type_promotion.expect
@@ -0,0 +1,288 @@
+pkg/front_end/testcases/control_flow_collection_inference.dart:106:49: Context: Write to i@6094
+  var list10 = [for (int i = 0; oracle("foo"); i++) 42];
+                                                ^^
+pkg/front_end/testcases/control_flow_collection_inference.dart:107:48: Context: Write to i@6094
+  var set10 = {for (int i = 0; oracle("foo"); i++) 42, null};
+                                               ^^
+pkg/front_end/testcases/control_flow_collection_inference.dart:108:48: Context: Write to i@6094
+  var map10 = {for (int i = 0; oracle("foo"); i++) "bar": 42, "baz": null};
+                                               ^^
+pkg/front_end/testcases/control_flow_collection_inference.dart:109:49: Context: Write to i@6094
+  var list11 = [for (int i = 0; oracle("foo"); i++) dynVar];
+                                                ^^
+pkg/front_end/testcases/control_flow_collection_inference.dart:110:48: Context: Write to i@6094
+  var set11 = {for (int i = 0; oracle("foo"); i++) dynVar, null};
+                                               ^^
+pkg/front_end/testcases/control_flow_collection_inference.dart:111:48: Context: Write to i@6094
+  var map11 = {for (int i = 0; oracle("foo"); i++) "bar": dynVar, "baz": null};
+                                               ^^
+pkg/front_end/testcases/control_flow_collection_inference.dart:112:49: Context: Write to i@6094
+  var list12 = [for (int i = 0; oracle("foo"); i++) [42]];
+                                                ^^
+pkg/front_end/testcases/control_flow_collection_inference.dart:113:48: Context: Write to i@6094
+  var set12 = {for (int i = 0; oracle("foo"); i++) [42], null};
+                                               ^^
+pkg/front_end/testcases/control_flow_collection_inference.dart:114:48: Context: Write to i@6094
+  var map12 = {for (int i = 0; oracle("foo"); i++) "bar": [42], "baz": null};
+                                               ^^
+pkg/front_end/testcases/control_flow_collection_inference.dart:115:49: Context: Write to i@6094
+  var list20 = [for (int i = 0; oracle("foo"); i++) ...[42]];
+                                                ^^
+pkg/front_end/testcases/control_flow_collection_inference.dart:116:48: Context: Write to i@6094
+  var set20 = {for (int i = 0; oracle("foo"); i++) ...[42], null};
+                                               ^^
+pkg/front_end/testcases/control_flow_collection_inference.dart:117:48: Context: Write to i@6094
+  var map20 = {for (int i = 0; oracle("foo"); i++) ...{"bar": 42}, "baz": null};
+                                               ^^
+pkg/front_end/testcases/control_flow_collection_inference.dart:118:49: Context: Write to i@6094
+  var list21 = [for (int i = 0; oracle("foo"); i++) ...[dynVar]];
+                                                ^^
+pkg/front_end/testcases/control_flow_collection_inference.dart:119:48: Context: Write to i@6094
+  var set21 = {for (int i = 0; oracle("foo"); i++) ...[dynVar], null};
+                                               ^^
+pkg/front_end/testcases/control_flow_collection_inference.dart:120:48: Context: Write to i@6094
+  var map21 = {for (int i = 0; oracle("foo"); i++) ...{"bar": dynVar}, "baz": null};
+                                               ^^
+pkg/front_end/testcases/control_flow_collection_inference.dart:121:49: Context: Write to i@6094
+  var list22 = [for (int i = 0; oracle("foo"); i++) ...[[42]]];
+                                                ^^
+pkg/front_end/testcases/control_flow_collection_inference.dart:122:48: Context: Write to i@6094
+  var set22 = {for (int i = 0; oracle("foo"); i++) ...[[42]], null};
+                                               ^^
+pkg/front_end/testcases/control_flow_collection_inference.dart:123:48: Context: Write to i@6094
+  var map22 = {for (int i = 0; oracle("foo"); i++) ...{"bar": [42]}, "baz": null};
+                                               ^^
+pkg/front_end/testcases/control_flow_collection_inference.dart:124:49: Context: Write to i@6094
+  var list30 = [for (int i = 0; oracle("foo"); i++) if (oracle()) ...[42]];
+                                                ^^
+pkg/front_end/testcases/control_flow_collection_inference.dart:125:48: Context: Write to i@6094
+  var set30 = {for (int i = 0; oracle("foo"); i++) if (oracle()) ...[42], null};
+                                               ^^
+pkg/front_end/testcases/control_flow_collection_inference.dart:126:48: Context: Write to i@6094
+  var map30 = {for (int i = 0; oracle("foo"); i++) if (oracle()) ...{"bar": 42}, "baz": null};
+                                               ^^
+pkg/front_end/testcases/control_flow_collection_inference.dart:127:49: Context: Write to i@6094
+  var list31 = [for (int i = 0; oracle("foo"); i++) if (oracle()) ...[dynVar]];
+                                                ^^
+pkg/front_end/testcases/control_flow_collection_inference.dart:128:48: Context: Write to i@6094
+  var set31 = {for (int i = 0; oracle("foo"); i++) if (oracle()) ...[dynVar], null};
+                                               ^^
+pkg/front_end/testcases/control_flow_collection_inference.dart:129:48: Context: Write to i@6094
+  var map31 = {for (int i = 0; oracle("foo"); i++) if (oracle()) ...{"bar": dynVar}, "baz": null};
+                                               ^^
+pkg/front_end/testcases/control_flow_collection_inference.dart:130:49: Context: Write to i@6094
+  var list33 = [for (int i = 0; oracle("foo"); i++) if (oracle()) ...[[42]]];
+                                                ^^
+pkg/front_end/testcases/control_flow_collection_inference.dart:131:48: Context: Write to i@6094
+  var set33 = {for (int i = 0; oracle("foo"); i++) if (oracle()) ...[[42]], null};
+                                               ^^
+pkg/front_end/testcases/control_flow_collection_inference.dart:132:48: Context: Write to i@6094
+  var map33 = {for (int i = 0; oracle("foo"); i++) if (oracle()) ...{"bar": [42]}, "baz": null};
+                                               ^^
+pkg/front_end/testcases/control_flow_collection_inference.dart:133:61: Context: Write to i@6094
+  List<List<int>> list40 = [for (int i = 0; oracle("foo"); i++) ...[[]]];
+                                                            ^^
+pkg/front_end/testcases/control_flow_collection_inference.dart:134:59: Context: Write to i@6094
+  Set<List<int>> set40 = {for (int i = 0; oracle("foo"); i++) ...[[]], null};
+                                                          ^^
+pkg/front_end/testcases/control_flow_collection_inference.dart:135:67: Context: Write to i@6094
+  Map<String, List<int>> map40 = {for (int i = 0; oracle("foo"); i++) ...{"bar": []}, "baz": null};
+                                                                  ^^
+pkg/front_end/testcases/control_flow_collection_inference.dart:136:61: Context: Write to i@6094
+  List<List<int>> list41 = [for (int i = 0; oracle("foo"); i++) ...{[]}];
+                                                            ^^
+pkg/front_end/testcases/control_flow_collection_inference.dart:137:59: Context: Write to i@6094
+  Set<List<int>> set41 = {for (int i = 0; oracle("foo"); i++) ...{[]}, null};
+                                                          ^^
+pkg/front_end/testcases/control_flow_collection_inference.dart:138:61: Context: Write to i@6094
+  List<List<int>> list42 = [for (int i = 0; oracle("foo"); i++) if (oracle()) ...[[]]];
+                                                            ^^
+pkg/front_end/testcases/control_flow_collection_inference.dart:139:59: Context: Write to i@6094
+  Set<List<int>> set42 = {for (int i = 0; oracle("foo"); i++) if (oracle()) ...[[]], null};
+                                                          ^^
+pkg/front_end/testcases/control_flow_collection_inference.dart:140:67: Context: Write to i@6094
+  Map<String, List<int>> map42 = {for (int i = 0; oracle("foo"); i++) if (oracle()) ...{"bar": []}, "baz": null};
+                                                                  ^^
+pkg/front_end/testcases/control_flow_collection_inference.dart:141:55: Context: Write to i@6094
+  List<int> list50 = [for (int i = 0; oracle("foo"); i++) ...[]];
+                                                      ^^
+pkg/front_end/testcases/control_flow_collection_inference.dart:142:53: Context: Write to i@6094
+  Set<int> set50 = {for (int i = 0; oracle("foo"); i++) ...[], null};
+                                                    ^^
+pkg/front_end/testcases/control_flow_collection_inference.dart:143:61: Context: Write to i@6094
+  Map<String, int> map50 = {for (int i = 0; oracle("foo"); i++) ...{}, "baz": null};
+                                                            ^^
+pkg/front_end/testcases/control_flow_collection_inference.dart:144:55: Context: Write to i@6094
+  List<int> list51 = [for (int i = 0; oracle("foo"); i++) ...{}];
+                                                      ^^
+pkg/front_end/testcases/control_flow_collection_inference.dart:145:53: Context: Write to i@6094
+  Set<int> set51 = {for (int i = 0; oracle("foo"); i++) ...{}, null};
+                                                    ^^
+pkg/front_end/testcases/control_flow_collection_inference.dart:146:55: Context: Write to i@6094
+  List<int> list52 = [for (int i = 0; oracle("foo"); i++) if (oracle()) ...[]];
+                                                      ^^
+pkg/front_end/testcases/control_flow_collection_inference.dart:147:53: Context: Write to i@6094
+  Set<int> set52 = {for (int i = 0; oracle("foo"); i++) if (oracle()) ...[], null};
+                                                    ^^
+pkg/front_end/testcases/control_flow_collection_inference.dart:148:61: Context: Write to i@6094
+  List<List<int>> list60 = [for (int i = 0; oracle("foo"); i++) ...[[]]];
+                                                            ^^
+pkg/front_end/testcases/control_flow_collection_inference.dart:149:59: Context: Write to i@6094
+  Set<List<int>> set60 = {for (int i = 0; oracle("foo"); i++) ...[[]], null};
+                                                          ^^
+pkg/front_end/testcases/control_flow_collection_inference.dart:150:67: Context: Write to i@6094
+  Map<String, List<int>> map60 = {for (int i = 0; oracle("foo"); i++) ...{"bar": []}, "baz": null};
+                                                                  ^^
+pkg/front_end/testcases/control_flow_collection_inference.dart:151:61: Context: Write to i@6094
+  List<List<int>> list61 = [for (int i = 0; oracle("foo"); i++) if (oracle()) ...[[]]];
+                                                            ^^
+pkg/front_end/testcases/control_flow_collection_inference.dart:152:59: Context: Write to i@6094
+  Set<List<int>> set61 = {for (int i = 0; oracle("foo"); i++) if (oracle()) ...[[]], null};
+                                                          ^^
+pkg/front_end/testcases/control_flow_collection_inference.dart:153:67: Context: Write to i@6094
+  Map<String, List<int>> map61 = {for (int i = 0; oracle("foo"); i++) if (oracle()) ...{"bar": []}, "baz": null};
+                                                                  ^^
+pkg/front_end/testcases/control_flow_collection_inference.dart:154:61: Context: Write to i@6094
+  List<List<int>> list70 = [for (int i = 0; oracle("foo"); i++) []];
+                                                            ^^
+pkg/front_end/testcases/control_flow_collection_inference.dart:155:59: Context: Write to i@6094
+  Set<List<int>> set70 = {for (int i = 0; oracle("foo"); i++) [], null};
+                                                          ^^
+pkg/front_end/testcases/control_flow_collection_inference.dart:156:67: Context: Write to i@6094
+  Map<String, List<int>> map70 = {for (int i = 0; oracle("foo"); i++) "bar": [], "baz": null};
+                                                                  ^^
+pkg/front_end/testcases/control_flow_collection_inference.dart:157:61: Context: Write to i@6094
+  List<List<int>> list71 = [for (int i = 0; oracle("foo"); i++) if (oracle()) []];
+                                                            ^^
+pkg/front_end/testcases/control_flow_collection_inference.dart:158:59: Context: Write to i@6094
+  Set<List<int>> set71 = {for (int i = 0; oracle("foo"); i++) if (oracle()) [], null};
+                                                          ^^
+pkg/front_end/testcases/control_flow_collection_inference.dart:159:67: Context: Write to i@6094
+  Map<String, List<int>> map71 = {for (int i = 0; oracle("foo"); i++) if (oracle()) "bar": [], "baz": null};
+                                                                  ^^
+pkg/front_end/testcases/control_flow_collection_inference.dart:160:49: Context: Write to i@6094
+  var list80 = [for (int i = 0; oracle("foo"); i++) if (oracle()) 42 else 3.14];
+                                                ^^
+pkg/front_end/testcases/control_flow_collection_inference.dart:161:48: Context: Write to i@6094
+  var set80 = {for (int i = 0; oracle("foo"); i++) if (oracle()) 42 else 3.14, null};
+                                               ^^
+pkg/front_end/testcases/control_flow_collection_inference.dart:162:48: Context: Write to i@6094
+  var map80 = {for (int i = 0; oracle("foo"); i++) if (oracle()) "bar": 42 else "bar": 3.14, "baz": null};
+                                               ^^
+pkg/front_end/testcases/control_flow_collection_inference.dart:163:49: Context: Write to i@6094
+  var list81 = [for (int i = 0; oracle("foo"); i++) if (oracle()) ...listInt else ...listDouble];
+                                                ^^
+pkg/front_end/testcases/control_flow_collection_inference.dart:164:48: Context: Write to i@6094
+  var set81 = {for (int i = 0; oracle("foo"); i++) if (oracle()) ...listInt else ...listDouble, null};
+                                               ^^
+pkg/front_end/testcases/control_flow_collection_inference.dart:165:48: Context: Write to i@6094
+  var map81 = {for (int i = 0; oracle("foo"); i++) if (oracle()) ...mapStringInt else ...mapStringDouble, "baz": null};
+                                               ^^
+pkg/front_end/testcases/control_flow_collection_inference.dart:166:49: Context: Write to i@6094
+  var list82 = [for (int i = 0; oracle("foo"); i++) if (oracle()) ...listInt else ...dynVar];
+                                                ^^
+pkg/front_end/testcases/control_flow_collection_inference.dart:167:48: Context: Write to i@6094
+  var set82 = {for (int i = 0; oracle("foo"); i++) if (oracle()) ...listInt else ...dynVar, null};
+                                               ^^
+pkg/front_end/testcases/control_flow_collection_inference.dart:168:48: Context: Write to i@6094
+  var map82 = {for (int i = 0; oracle("foo"); i++) if (oracle()) ...mapStringInt else ...dynVar, "baz": null};
+                                               ^^
+pkg/front_end/testcases/control_flow_collection_inference.dart:169:49: Context: Write to i@6094
+  var list83 = [for (int i = 0; oracle("foo"); i++) if (oracle()) 42 else ...listDouble];
+                                                ^^
+pkg/front_end/testcases/control_flow_collection_inference.dart:170:48: Context: Write to i@6094
+  var set83 = {for (int i = 0; oracle("foo"); i++) if (oracle()) ...listInt else 3.14, null};
+                                               ^^
+pkg/front_end/testcases/control_flow_collection_inference.dart:171:48: Context: Write to i@6094
+  var map83 = {for (int i = 0; oracle("foo"); i++) if (oracle()) ...mapStringInt else "bar": 3.14, "baz": null};
+                                               ^^
+pkg/front_end/testcases/control_flow_collection_inference.dart:172:55: Context: Write to i@6094
+  List<int> list90 = [for (int i = 0; oracle("foo"); i++) dynVar];
+                                                      ^^
+pkg/front_end/testcases/control_flow_collection_inference.dart:173:53: Context: Write to i@6094
+  Set<int> set90 = {for (int i = 0; oracle("foo"); i++) dynVar, null};
+                                                    ^^
+pkg/front_end/testcases/control_flow_collection_inference.dart:174:61: Context: Write to i@6094
+  Map<String, int> map90 = {for (int i = 0; oracle("foo"); i++) "bar": dynVar, "baz": null};
+                                                            ^^
+pkg/front_end/testcases/control_flow_collection_inference.dart:175:55: Context: Write to i@6094
+  List<int> list91 = [for (int i = 0; oracle("foo"); i++) ...dynVar];
+                                                      ^^
+pkg/front_end/testcases/control_flow_collection_inference.dart:176:53: Context: Write to i@6094
+  Set<int> set91 = {for (int i = 0; oracle("foo"); i++) ...dynVar, null};
+                                                    ^^
+pkg/front_end/testcases/control_flow_collection_inference.dart:177:61: Context: Write to i@6094
+  Map<String, int> map91 = {for (int i = 0; oracle("foo"); i++) ...dynVar, "baz": null};
+                                                            ^^
+pkg/front_end/testcases/control_flow_collection_inference.dart:178:40: Context: Write to index@5992
+  List<int> list100 = <int>[for (index = 0; oracle("foo"); index++) 42];
+                                       ^
+pkg/front_end/testcases/control_flow_collection_inference.dart:178:65: Context: Write to index@5992
+  List<int> list100 = <int>[for (index = 0; oracle("foo"); index++) 42];
+                                                                ^^
+pkg/front_end/testcases/control_flow_collection_inference.dart:179:38: Context: Write to index@5992
+  Set<int> set100 = <int>{for (index = 0; oracle("foo"); index++) 42};
+                                     ^
+pkg/front_end/testcases/control_flow_collection_inference.dart:179:63: Context: Write to index@5992
+  Set<int> set100 = <int>{for (index = 0; oracle("foo"); index++) 42};
+                                                              ^^
+pkg/front_end/testcases/control_flow_collection_inference.dart:180:54: Context: Write to index@5992
+  Map<String, int> map100 = <String, int>{for (index = 0; oracle("foo"); index++) "bar": 42};
+                                                     ^
+pkg/front_end/testcases/control_flow_collection_inference.dart:180:79: Context: Write to index@5992
+  Map<String, int> map100 = <String, int>{for (index = 0; oracle("foo"); index++) "bar": 42};
+                                                                              ^^
+pkg/front_end/testcases/control_flow_collection_inference.dart:190:41: Context: Write to i@12696
+  <int>[for (int i = 0; oracle("foo"); i++) "bar"];
+                                        ^^
+pkg/front_end/testcases/control_flow_collection_inference.dart:191:41: Context: Write to i@12696
+  <int>{for (int i = 0; oracle("foo"); i++) "bar", null};
+                                        ^^
+pkg/front_end/testcases/control_flow_collection_inference.dart:192:46: Context: Write to i@12696
+  <int, int>{for (int i = 0; oracle("foo"); i++) "bar": "bar", "baz": null};
+                                             ^^
+pkg/front_end/testcases/control_flow_collection_inference.dart:193:41: Context: Write to i@12696
+  <int>[for (int i = 0; oracle("foo"); i++) ...["bar"]];
+                                        ^^
+pkg/front_end/testcases/control_flow_collection_inference.dart:194:41: Context: Write to i@12696
+  <int>{for (int i = 0; oracle("foo"); i++) ...["bar"], null};
+                                        ^^
+pkg/front_end/testcases/control_flow_collection_inference.dart:195:46: Context: Write to i@12696
+  <int, int>{for (int i = 0; oracle("foo"); i++) ...{"bar": "bar"}, "baz": null};
+                                             ^^
+pkg/front_end/testcases/control_flow_collection_inference.dart:196:41: Context: Write to i@12696
+  <int>[for (int i = 0; oracle("foo"); i++) ...map];
+                                        ^^
+pkg/front_end/testcases/control_flow_collection_inference.dart:197:41: Context: Write to i@12696
+  <int>{for (int i = 0; oracle("foo"); i++) ...map, null};
+                                        ^^
+pkg/front_end/testcases/control_flow_collection_inference.dart:198:46: Context: Write to i@12696
+  <int, int>{for (int i = 0; oracle("foo"); i++) ...list, 42: null};
+                                             ^^
+pkg/front_end/testcases/control_flow_collection_inference.dart:199:44: Context: Write to i@12696
+  <String>[for (int i = 0; oracle("foo"); i++) if (oracle()) 42 else 3.14];
+                                           ^^
+pkg/front_end/testcases/control_flow_collection_inference.dart:200:44: Context: Write to i@12696
+  <String>{for (int i = 0; oracle("foo"); i++) if (oracle()) 42 else 3.14, null};
+                                           ^^
+pkg/front_end/testcases/control_flow_collection_inference.dart:201:52: Context: Write to i@12696
+  <String, String>{for (int i = 0; oracle("foo"); i++) if (oracle()) "bar": 42 else "bar": 3.14, "baz": null};
+                                                   ^^
+pkg/front_end/testcases/control_flow_collection_inference.dart:202:41: Context: Write to i@12696
+  <int>[for (int i = 0; oracle("foo"); i++) if (oracle()) ...map else 42];
+                                        ^^
+pkg/front_end/testcases/control_flow_collection_inference.dart:203:41: Context: Write to i@12696
+  <int>{for (int i = 0; oracle("foo"); i++) if (oracle()) ...map else 42, null};
+                                        ^^
+pkg/front_end/testcases/control_flow_collection_inference.dart:204:49: Context: Write to i@12696
+  <String, int>{for (int i = 0; oracle("foo"); i++) if (oracle()) ...list else "bar": 42, "baz": null};
+                                                ^^
+pkg/front_end/testcases/control_flow_collection_inference.dart:205:41: Context: Write to i@12696
+  <int>[for (int i = 0; oracle("foo"); i++) if (oracle()) 42 else ...map];
+                                        ^^
+pkg/front_end/testcases/control_flow_collection_inference.dart:206:41: Context: Write to i@12696
+  <int>{for (int i = 0; oracle("foo"); i++) if (oracle()) 42 else ...map, null};
+                                        ^^
+pkg/front_end/testcases/control_flow_collection_inference.dart:207:49: Context: Write to i@12696
+  <String, int>{for (int i = 0; oracle("foo"); i++) if (oracle()) "bar": 42 else ...list, "baz": null};
+                                                ^^
diff --git a/pkg/front_end/testcases/covariant_generic.dart.outline.expect b/pkg/front_end/testcases/covariant_generic.dart.outline.expect
index 0014cd5..4b44219 100644
--- a/pkg/front_end/testcases/covariant_generic.dart.outline.expect
+++ b/pkg/front_end/testcases/covariant_generic.dart.outline.expect
@@ -6,13 +6,13 @@
 class Foo<T extends core::Object = dynamic> extends core::Object {
   final field self::Foo::T finalField;
   final field (self::Foo::T) → void callbackField;
-  field self::Foo::T mutableField;
+  generic-covariant-impl field self::Foo::T mutableField;
   field (self::Foo::T) → void mutableCallbackField;
   constructor •(self::Foo::T finalField, (self::Foo::T) → void callbackField) → self::Foo<self::Foo::T>
     ;
-  method method(self::Foo::T x) → void
+  method method(generic-covariant-impl self::Foo::T x) → void
     ;
-  set setter(self::Foo::T x) → dynamic
+  set setter(generic-covariant-impl self::Foo::T x) → dynamic
     ;
   method withCallback((self::Foo::T) → void callback) → void
     ;
diff --git a/pkg/front_end/testcases/dynamic_and_void.dart b/pkg/front_end/testcases/dynamic_and_void.dart
index 21800bd..f6b345c 100644
--- a/pkg/front_end/testcases/dynamic_and_void.dart
+++ b/pkg/front_end/testcases/dynamic_and_void.dart
@@ -2,8 +2,6 @@
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
 
-/*@testedFeatures=warning*/
-
 // dynamic is treated as a name exported by dart:core.  void is not treated as a
 // name exported by dart:core.
 
diff --git a/pkg/front_end/testcases/dynamic_and_void.dart.legacy.expect b/pkg/front_end/testcases/dynamic_and_void.dart.legacy.expect
index 3760ddb..5606157 100644
--- a/pkg/front_end/testcases/dynamic_and_void.dart.legacy.expect
+++ b/pkg/front_end/testcases/dynamic_and_void.dart.legacy.expect
@@ -2,7 +2,7 @@
 //
 // Problems in library:
 //
-// pkg/front_end/testcases/dynamic_and_void.dart:12:27: Warning: Type 'dynamic' not found.
+// pkg/front_end/testcases/dynamic_and_void.dart:10:27: Warning: Type 'dynamic' not found.
 // /*@warning=TypeNotFound*/ dynamic testDynamic() => 0;
 //                           ^^^^^^^
 //
diff --git a/pkg/front_end/testcases/dynamic_and_void.dart.legacy.transformed.expect b/pkg/front_end/testcases/dynamic_and_void.dart.legacy.transformed.expect
index 3760ddb..5606157 100644
--- a/pkg/front_end/testcases/dynamic_and_void.dart.legacy.transformed.expect
+++ b/pkg/front_end/testcases/dynamic_and_void.dart.legacy.transformed.expect
@@ -2,7 +2,7 @@
 //
 // Problems in library:
 //
-// pkg/front_end/testcases/dynamic_and_void.dart:12:27: Warning: Type 'dynamic' not found.
+// pkg/front_end/testcases/dynamic_and_void.dart:10:27: Warning: Type 'dynamic' not found.
 // /*@warning=TypeNotFound*/ dynamic testDynamic() => 0;
 //                           ^^^^^^^
 //
diff --git a/pkg/front_end/testcases/dynamic_and_void.dart.outline.expect b/pkg/front_end/testcases/dynamic_and_void.dart.outline.expect
index f080c68..b659017 100644
--- a/pkg/front_end/testcases/dynamic_and_void.dart.outline.expect
+++ b/pkg/front_end/testcases/dynamic_and_void.dart.outline.expect
@@ -2,7 +2,7 @@
 //
 // Problems in library:
 //
-// pkg/front_end/testcases/dynamic_and_void.dart:12:27: Warning: Type 'dynamic' not found.
+// pkg/front_end/testcases/dynamic_and_void.dart:10:27: Warning: Type 'dynamic' not found.
 // /*@warning=TypeNotFound*/ dynamic testDynamic() => 0;
 //                           ^^^^^^^
 //
diff --git a/pkg/front_end/testcases/for_in_without_declaration.dart.legacy.expect b/pkg/front_end/testcases/for_in_without_declaration.dart.legacy.expect
index 8e5c9f4..9cc7892 100644
--- a/pkg/front_end/testcases/for_in_without_declaration.dart.legacy.expect
+++ b/pkg/front_end/testcases/for_in_without_declaration.dart.legacy.expect
@@ -142,10 +142,8 @@
          ^^^";
         dynamic x;
         dynamic y;
-        {
-          core::print(x);
-          core::print(y);
-        }
+        core::print(x);
+        core::print(y);
       }
     }
     const core::int constant = 0;
diff --git a/pkg/front_end/testcases/for_in_without_declaration.dart.legacy.transformed.expect b/pkg/front_end/testcases/for_in_without_declaration.dart.legacy.transformed.expect
index 8e5c9f4..9cc7892 100644
--- a/pkg/front_end/testcases/for_in_without_declaration.dart.legacy.transformed.expect
+++ b/pkg/front_end/testcases/for_in_without_declaration.dart.legacy.transformed.expect
@@ -142,10 +142,8 @@
          ^^^";
         dynamic x;
         dynamic y;
-        {
-          core::print(x);
-          core::print(y);
-        }
+        core::print(x);
+        core::print(y);
       }
     }
     const core::int constant = 0;
diff --git a/pkg/front_end/testcases/for_in_without_declaration.dart.strong.expect b/pkg/front_end/testcases/for_in_without_declaration.dart.strong.expect
index cc7b291..9e758ec 100644
--- a/pkg/front_end/testcases/for_in_without_declaration.dart.strong.expect
+++ b/pkg/front_end/testcases/for_in_without_declaration.dart.strong.expect
@@ -172,10 +172,8 @@
          ^^^";
         dynamic x;
         dynamic y;
-        {
-          core::print(x);
-          core::print(y);
-        }
+        core::print(x);
+        core::print(y);
       }
     }
     const core::int constant = 0;
diff --git a/pkg/front_end/testcases/for_in_without_declaration.dart.strong.transformed.expect b/pkg/front_end/testcases/for_in_without_declaration.dart.strong.transformed.expect
index cc7b291..9e758ec 100644
--- a/pkg/front_end/testcases/for_in_without_declaration.dart.strong.transformed.expect
+++ b/pkg/front_end/testcases/for_in_without_declaration.dart.strong.transformed.expect
@@ -172,10 +172,8 @@
          ^^^";
         dynamic x;
         dynamic y;
-        {
-          core::print(x);
-          core::print(y);
-        }
+        core::print(x);
+        core::print(y);
       }
     }
     const core::int constant = 0;
diff --git a/pkg/front_end/testcases/incremental_initialize_from_dill/changing_modules.yaml b/pkg/front_end/testcases/incremental_initialize_from_dill/changing_modules.yaml
new file mode 100644
index 0000000..ba6a85f
--- /dev/null
+++ b/pkg/front_end/testcases/incremental_initialize_from_dill/changing_modules.yaml
@@ -0,0 +1,147 @@
+# Copyright (c) 2019, the Dart project authors. Please see the AUTHORS file
+# for details. All rights reserved. Use of this source code is governed by a
+# BSD-style license that can be found in the LICENSE.md file.
+
+# Compile an application with a number of modules.
+# Compile again with changing modules.
+
+type: newworld
+strong: true
+modules:
+  example_0.1.0:
+    example_0.1.0/a.dart: |
+      a() {
+        la1();
+      }
+      la1() {
+        print("Hello from v0.1.0");
+      }
+    example_0.1.0/b.dart: |
+      import "a.dart";
+      b() {
+        a();
+      }
+    example_0.1.0/.packages: |
+      example:.
+  example_0.1.1:
+    example_0.1.1/b.dart: |
+      b() {
+        print("Hello from v0.1.1");
+      }
+      bool example011 = true;
+    example_0.1.1/.packages: |
+      example:.
+  foo_1:
+    foo_1/foo.dart: |
+      import "package:example/b.dart";
+      foo() {
+        print("Hello from foo");
+        b();
+      }
+      bool foo1 = true;
+    foo_1/.packages: |
+      foo:.
+      example:../example_0.1.0
+  foo_2:
+    foo_2/foo.dart: |
+      import "package:example/b.dart";
+      import "bar.dart";
+      import "baz.dart";
+      foo() {
+        print("Hello from foo 2");
+        bar();
+        baz();
+        b();
+      }
+      bool foo2 = true;
+    foo_2/bar.dart: |
+      bar() {
+        print("hello from bar");
+      }
+    foo_2/baz.dart: |
+      baz() {
+        print("hello from baz");
+      }
+    foo_2/.packages: |
+      foo:.
+      example:../example_0.1.1
+worlds:
+  - entry: main.dart
+    fromComponent: true
+    sources:
+      main.dart: |
+        import "package:example/b.dart";
+        main() {
+          print("hello");
+          b();
+        }
+      .packages: example:example_0.1.0
+    modules:
+      - example_0.1.0
+    expectedLibraryCount: 3
+    expectedContent:
+      org-dartlang-test:///main.dart:
+        - Procedure main
+      package:example/b.dart:
+        - Procedure b
+      package:example/a.dart:
+        - Procedure a
+        - Procedure la1
+  - entry: main.dart
+    worldType: updated
+    expectInitializeFromDill: false
+    sources:
+      main.dart: |
+        import "package:foo/foo.dart";
+        main() {
+          print("hello");
+          foo();
+        }
+      .packages: |
+        example:example_0.1.0
+        foo:foo_1
+    modules:
+      - example_0.1.0
+      - foo_1
+    expectedLibraryCount: 4
+    expectedContent:
+      org-dartlang-test:///main.dart:
+        - Procedure main
+      package:example/b.dart:
+        - Procedure b
+      package:example/a.dart:
+        - Procedure a
+        - Procedure la1
+      package:foo/foo.dart:
+        - Procedure foo
+        - Field foo1
+  - entry: main.dart
+    worldType: updated
+    expectInitializeFromDill: false
+    sources:
+      main.dart: |
+        import "package:foo/foo.dart";
+        main() {
+          print("hello");
+          foo();
+        }
+      .packages: |
+        example:example_0.1.1
+        foo:foo_2
+    modules:
+      - example_0.1.1
+      - foo_2
+    expectedLibraryCount: 5
+    expectedContent:
+      org-dartlang-test:///main.dart:
+        - Procedure main
+      package:example/b.dart:
+        - Procedure b
+        - Field example011
+      package:foo/foo.dart:
+        - Procedure foo
+        - Field foo2
+      package:foo/bar.dart:
+        - Procedure bar
+      package:foo/baz.dart:
+        - Procedure baz
diff --git a/pkg/front_end/testcases/incremental_initialize_from_dill/cleans_up_uritosource_non_package_unreferenced_libraries.yaml b/pkg/front_end/testcases/incremental_initialize_from_dill/cleans_up_uritosource_non_package_unreferenced_libraries.yaml
new file mode 100644
index 0000000..08f0a4c
--- /dev/null
+++ b/pkg/front_end/testcases/incremental_initialize_from_dill/cleans_up_uritosource_non_package_unreferenced_libraries.yaml
@@ -0,0 +1,41 @@
+# Copyright (c) 2019, the Dart project authors. Please see the AUTHORS file
+# for details. All rights reserved. Use of this source code is governed by a
+# BSD-style license that can be found in the LICENSE.md file.
+
+# Compile an application with no packages and two libraries. Update the world
+# to now only include one library. The now no longer referenced library should
+# also have been removed from the uri to sources.
+
+type: newworld
+strong: true
+worlds:
+  - entry: main.dart
+    sources:
+      main.dart: |
+        import "b.dart";
+        main() { b(); }
+      b.dart: |
+        b() {}
+    expectedLibraryCount: 2
+  - entry: main.dart
+    worldType: updated
+    invalidate:
+      - main.dart
+    expectInitializeFromDill: false
+    sources:
+      main.dart: |
+        main() {}
+    expectedLibraryCount: 1
+    uriToSourcesDoesntInclude:
+      - b.dart
+  - entry: main.dart
+    worldType: updated
+    invalidate:
+      - main.dart
+    expectInitializeFromDill: false
+    sources:
+      main.dart: |
+        main() {}
+    expectedLibraryCount: 1
+    uriToSourcesDoesntInclude:
+      - b.dart
diff --git a/pkg/front_end/testcases/incremental_initialize_from_dill/cleans_up_uritosource_unreferenced_package_library.yaml b/pkg/front_end/testcases/incremental_initialize_from_dill/cleans_up_uritosource_unreferenced_package_library.yaml
new file mode 100644
index 0000000..ef7857f
--- /dev/null
+++ b/pkg/front_end/testcases/incremental_initialize_from_dill/cleans_up_uritosource_unreferenced_package_library.yaml
@@ -0,0 +1,34 @@
+# Copyright (c) 2019, the Dart project authors. Please see the AUTHORS file
+# for details. All rights reserved. Use of this source code is governed by a
+# BSD-style license that can be found in the LICENSE.md file.
+
+# Compile an application with a package. Update the world so that the .packages
+# no longer reference the package (and the source no longe ruse it) and
+# recompile. The now no longer referenced package library should also have been
+# removed from the uri to sources.
+
+type: newworld
+strong: true
+worlds:
+  - entry: main.dart
+    sources:
+      .packages: example:pkg/example
+      main.dart: |
+        import "package:example/b.dart";
+        main() { b(); }
+      pkg/example/b.dart: |
+        b() {}
+    expectedLibraryCount: 2
+  - entry: main.dart
+    worldType: updated
+    invalidate:
+      - main.dart
+      - .packages
+    expectInitializeFromDill: false
+    sources:
+      .packages: 
+      main.dart: |
+        main() {}
+    expectedLibraryCount: 1
+    uriToSourcesDoesntInclude:
+      - pkg/example/b.dart
diff --git a/pkg/front_end/testcases/incremental_initialize_from_dill/constant_set_literal.yaml b/pkg/front_end/testcases/incremental_initialize_from_dill/constant_set_literal.yaml
new file mode 100644
index 0000000..4b1c653
--- /dev/null
+++ b/pkg/front_end/testcases/incremental_initialize_from_dill/constant_set_literal.yaml
@@ -0,0 +1,31 @@
+# Copyright (c) 2019, the Dart project authors. Please see the AUTHORS file
+# for details. All rights reserved. Use of this source code is governed by a
+# BSD-style license that can be found in the LICENSE.md file.
+
+# Test that constant set literals works as expected.
+
+type: newworld
+strong: true
+worlds:
+  - entry: "main.dart"
+    sources:
+      main.dart: |
+        import 'lib.dart';
+
+        const Set<String> foo = {};
+        main() {
+          print(foo);
+          print(bar);
+        }
+      lib.dart: |
+        const Set<String> bar = {"hello", "world"};
+    expectedLibraryCount: 2
+  - entry: "main.dart"
+    worldType: updated
+    expectInitializeFromDill: false
+    invalidate:
+      - lib.dart
+    sources:
+      lib.dart: |
+        const Set<int> bar = {42};
+    expectedLibraryCount: 2
diff --git a/pkg/front_end/testcases/incremental_initialize_from_dill/flutter_mixin_failure_1.yaml b/pkg/front_end/testcases/incremental_initialize_from_dill/flutter_mixin_failure_1.yaml
new file mode 100644
index 0000000..1a79746
--- /dev/null
+++ b/pkg/front_end/testcases/incremental_initialize_from_dill/flutter_mixin_failure_1.yaml
@@ -0,0 +1,63 @@
+# Copyright (c) 2019, the Dart project authors. Please see the AUTHORS file
+# for details. All rights reserved. Use of this source code is governed by a
+# BSD-style license that can be found in the LICENSE.md file.
+
+# Regression test from flutter.
+
+type: newworld
+strong: true
+worlds:
+  - entry: main.dart
+    sources:
+      main.dart: |
+        import 'lib.dart';
+
+        class Test extends Test2 {
+          Quux world() => null;
+        }
+
+        abstract class Test2 {
+          Baz world();
+        }
+      lib.dart: |
+        class FooEntry {}
+
+        class BarEntry extends FooEntry {}
+
+        abstract class FooTarget {
+          void hello(FooEntry entry);
+        }
+
+        abstract class Baz implements FooTarget {
+          void hello(covariant FooEntry entry) {}
+        }
+
+        mixin MyMixin on Baz {}
+
+        abstract class Qux extends Baz {
+          void hello(BarEntry entry) {}
+        }
+
+        class Quux extends Qux with MyMixin {}
+    expectedLibraryCount: 2
+  - entry: main.dart
+    worldType: updated
+    invalidate:
+      - main.dart
+    expectInitializeFromDill: false
+    sources:
+      main.dart: |
+        import 'lib.dart';
+
+        class Test extends Test2 {
+          Quux world() => null;
+        }
+
+        abstract class Test2 {
+          Baz world();
+        }
+
+        main() {
+          print(new Test());
+        }
+    expectedLibraryCount: 2
diff --git a/pkg/front_end/testcases/incremental_initialize_from_dill/outline_only.yaml b/pkg/front_end/testcases/incremental_initialize_from_dill/outline_only.yaml
new file mode 100644
index 0000000..5bfb458
--- /dev/null
+++ b/pkg/front_end/testcases/incremental_initialize_from_dill/outline_only.yaml
@@ -0,0 +1,17 @@
+# Copyright (c) 2019, the Dart project authors. Please see the AUTHORS file
+# for details. All rights reserved. Use of this source code is governed by a
+# BSD-style license that can be found in the LICENSE.md file.
+
+# Compile an application with the option of only getting an outline.
+
+type: newworld
+strong: true
+worlds:
+  - entry: main.dart
+    sources:
+      main.dart: |
+        main() {
+          print("hello");
+          b();
+        }
+    outlineOnly: true
\ No newline at end of file
diff --git a/pkg/front_end/testcases/inference/async_closure_return_type_flatten.dart b/pkg/front_end/testcases/inference/async_closure_return_type_flatten.dart
index deab006..2f2fe1b 100644
--- a/pkg/front_end/testcases/inference/async_closure_return_type_flatten.dart
+++ b/pkg/front_end/testcases/inference/async_closure_return_type_flatten.dart
@@ -8,10 +8,8 @@
 import 'dart:async';
 
 Future<int> futureInt = null;
-var /*@topType=() -> Future<int>*/ f = /*@returnType=Future<int>*/ () =>
-    futureInt;
-var /*@topType=() -> Future<int>*/ g = /*@returnType=Future<int>*/ () async =>
-    futureInt;
+var f = /*@returnType=Future<int>*/ () => futureInt;
+var g = /*@returnType=Future<int>*/ () async => futureInt;
 
 main() {
   f;
diff --git a/pkg/front_end/testcases/inference/async_closure_return_type_future.dart b/pkg/front_end/testcases/inference/async_closure_return_type_future.dart
index 5fbc5aa..0abd1b3 100644
--- a/pkg/front_end/testcases/inference/async_closure_return_type_future.dart
+++ b/pkg/front_end/testcases/inference/async_closure_return_type_future.dart
@@ -5,8 +5,7 @@
 /*@testedFeatures=inference*/
 library test;
 
-var /*@topType=() -> Future<int>*/ f = /*@returnType=Future<int>*/ () async =>
-    0;
+var f = /*@returnType=Future<int>*/ () async => 0;
 
 main() {
   f;
diff --git a/pkg/front_end/testcases/inference/async_closure_return_type_future_or.dart b/pkg/front_end/testcases/inference/async_closure_return_type_future_or.dart
index 3404437..086bedf 100644
--- a/pkg/front_end/testcases/inference/async_closure_return_type_future_or.dart
+++ b/pkg/front_end/testcases/inference/async_closure_return_type_future_or.dart
@@ -8,10 +8,8 @@
 import 'dart:async';
 
 FutureOr<int> futureOrInt = null;
-var /*@topType=() -> FutureOr<int>*/ f = /*@returnType=FutureOr<int>*/ () =>
-    futureOrInt;
-var /*@topType=() -> Future<int>*/ g = /*@returnType=Future<int>*/ () async =>
-    futureOrInt;
+var f = /*@returnType=FutureOr<int>*/ () => futureOrInt;
+var g = /*@returnType=Future<int>*/ () async => futureOrInt;
 
 main() {
   f;
diff --git a/pkg/front_end/testcases/inference/block_bodied_lambdas_downwards_incompatible_with_upwards_inference_top_level.dart b/pkg/front_end/testcases/inference/block_bodied_lambdas_downwards_incompatible_with_upwards_inference_top_level.dart
index 94e4661..9e190d1 100644
--- a/pkg/front_end/testcases/inference/block_bodied_lambdas_downwards_incompatible_with_upwards_inference_top_level.dart
+++ b/pkg/front_end/testcases/inference/block_bodied_lambdas_downwards_incompatible_with_upwards_inference_top_level.dart
@@ -6,7 +6,7 @@
 library test;
 
 String f() => null;
-var /*@topType=() -> String*/ g = f;
+var g = f;
 
 main() {
   f;
diff --git a/pkg/front_end/testcases/inference/block_bodied_lambdas_infer_bottom_sync.dart b/pkg/front_end/testcases/inference/block_bodied_lambdas_infer_bottom_sync.dart
index f640d14..3901551 100644
--- a/pkg/front_end/testcases/inference/block_bodied_lambdas_infer_bottom_sync.dart
+++ b/pkg/front_end/testcases/inference/block_bodied_lambdas_infer_bottom_sync.dart
@@ -5,7 +5,7 @@
 /*@testedFeatures=inference*/
 library test;
 
-var /*@topType=dynamic*/ h = null;
+var h = null;
 void foo(int f(Object _)) {}
 
 test() {
diff --git a/pkg/front_end/testcases/inference/block_bodied_lambdas_infer_bottom_sync.dart.type_promotion.expect b/pkg/front_end/testcases/inference/block_bodied_lambdas_infer_bottom_sync.dart.type_promotion.expect
index 2c4de0d..14d415b 100644
--- a/pkg/front_end/testcases/inference/block_bodied_lambdas_infer_bottom_sync.dart.type_promotion.expect
+++ b/pkg/front_end/testcases/inference/block_bodied_lambdas_infer_bottom_sync.dart.type_promotion.expect
@@ -1,3 +1,3 @@
-pkg/front_end/testcases/inference/block_bodied_lambdas_infer_bottom_sync.dart:17:5: Context: Write to f@369
+pkg/front_end/testcases/inference/block_bodied_lambdas_infer_bottom_sync.dart:17:5: Context: Write to f@348
   f = /*error:INVALID_CAST_FUNCTION_EXPR*/ /*@returnType=Null*/ (/*@type=Object*/ x) =>
     ^
diff --git a/pkg/front_end/testcases/inference/block_bodied_lambdas_returns.dart b/pkg/front_end/testcases/inference/block_bodied_lambdas_returns.dart
index e385138..852fb3f 100644
--- a/pkg/front_end/testcases/inference/block_bodied_lambdas_returns.dart
+++ b/pkg/front_end/testcases/inference/block_bodied_lambdas_returns.dart
@@ -2,7 +2,7 @@
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
 
-/*@testedFeatures=warning,inference*/
+/*@testedFeatures=inference*/
 library test;
 
 main() {
@@ -32,7 +32,7 @@
   };
   var /*@type=(bool) -> int*/ g = /*@returnType=int*/ (bool b) {
     if (b) {
-      /*@warning=ReturnWithoutExpression*/ return;
+      return;
     } else {
       return 0;
     }
@@ -62,7 +62,7 @@
     if (b) {
       return 0;
     } else {
-      /*@warning=ReturnWithoutExpression*/ return;
+      return;
     }
   };
   var /*@type=(bool) -> int*/ l = /*@returnType=int*/ (bool b) {
diff --git a/pkg/front_end/testcases/inference/block_bodied_lambdas_returns.dart.strong.expect b/pkg/front_end/testcases/inference/block_bodied_lambdas_returns.dart.strong.expect
index a4231bb..6d433ff 100644
--- a/pkg/front_end/testcases/inference/block_bodied_lambdas_returns.dart.strong.expect
+++ b/pkg/front_end/testcases/inference/block_bodied_lambdas_returns.dart.strong.expect
@@ -2,13 +2,13 @@
 //
 // Problems in library:
 //
-// pkg/front_end/testcases/inference/block_bodied_lambdas_returns.dart:35:44: Warning: Must explicitly return a value from a non-void function.
-//       /*@warning=ReturnWithoutExpression*/ return;
-//                                            ^
+// pkg/front_end/testcases/inference/block_bodied_lambdas_returns.dart:35:7: Warning: Must explicitly return a value from a non-void function.
+//       return;
+//       ^
 //
-// pkg/front_end/testcases/inference/block_bodied_lambdas_returns.dart:65:44: Warning: Must explicitly return a value from a non-void function.
-//       /*@warning=ReturnWithoutExpression*/ return;
-//                                            ^
+// pkg/front_end/testcases/inference/block_bodied_lambdas_returns.dart:65:7: Warning: Must explicitly return a value from a non-void function.
+//       return;
+//       ^
 //
 import self as self;
 import "dart:core" as core;
diff --git a/pkg/front_end/testcases/inference/block_bodied_lambdas_returns.dart.strong.transformed.expect b/pkg/front_end/testcases/inference/block_bodied_lambdas_returns.dart.strong.transformed.expect
index a4231bb..6d433ff 100644
--- a/pkg/front_end/testcases/inference/block_bodied_lambdas_returns.dart.strong.transformed.expect
+++ b/pkg/front_end/testcases/inference/block_bodied_lambdas_returns.dart.strong.transformed.expect
@@ -2,13 +2,13 @@
 //
 // Problems in library:
 //
-// pkg/front_end/testcases/inference/block_bodied_lambdas_returns.dart:35:44: Warning: Must explicitly return a value from a non-void function.
-//       /*@warning=ReturnWithoutExpression*/ return;
-//                                            ^
+// pkg/front_end/testcases/inference/block_bodied_lambdas_returns.dart:35:7: Warning: Must explicitly return a value from a non-void function.
+//       return;
+//       ^
 //
-// pkg/front_end/testcases/inference/block_bodied_lambdas_returns.dart:65:44: Warning: Must explicitly return a value from a non-void function.
-//       /*@warning=ReturnWithoutExpression*/ return;
-//                                            ^
+// pkg/front_end/testcases/inference/block_bodied_lambdas_returns.dart:65:7: Warning: Must explicitly return a value from a non-void function.
+//       return;
+//       ^
 //
 import self as self;
 import "dart:core" as core;
diff --git a/pkg/front_end/testcases/inference/bottom.dart b/pkg/front_end/testcases/inference/bottom.dart
index 567246e..99a196f 100644
--- a/pkg/front_end/testcases/inference/bottom.dart
+++ b/pkg/front_end/testcases/inference/bottom.dart
@@ -5,7 +5,7 @@
 /*@testedFeatures=inference*/
 library test;
 
-var /*@topType=dynamic*/ v = null;
+var v = null;
 
 main() {
   v;
diff --git a/pkg/front_end/testcases/inference/bottom_in_closure.dart b/pkg/front_end/testcases/inference/bottom_in_closure.dart
index a1be850..d375da9 100644
--- a/pkg/front_end/testcases/inference/bottom_in_closure.dart
+++ b/pkg/front_end/testcases/inference/bottom_in_closure.dart
@@ -5,7 +5,7 @@
 /*@testedFeatures=inference*/
 library test;
 
-var /*@topType=() -> Null*/ v = /*@returnType=Null*/ () => null;
+var v = /*@returnType=Null*/ () => null;
 
 main() {
   v;
diff --git a/pkg/front_end/testcases/inference/bug30251.dart b/pkg/front_end/testcases/inference/bug30251.dart
index 63e0ffa..98c6b1e 100644
--- a/pkg/front_end/testcases/inference/bug30251.dart
+++ b/pkg/front_end/testcases/inference/bug30251.dart
@@ -8,7 +8,7 @@
 T f<T>(T t) => t;
 
 class C {
-  final /*@topType=dynamic*/ x;
+  final x;
   C(int p) : x = /*@typeArgs=int*/ f(1 /*@target=num::+*/ + p);
 }
 
diff --git a/pkg/front_end/testcases/inference/bug31132.dart b/pkg/front_end/testcases/inference/bug31132.dart
index 9e69bff..234be9a 100644
--- a/pkg/front_end/testcases/inference/bug31132.dart
+++ b/pkg/front_end/testcases/inference/bug31132.dart
@@ -8,7 +8,7 @@
 class B {}
 
 class C extends B {
-  var /*@topType=dynamic*/ z;
+  var z;
 }
 
 void test(B x) {
diff --git a/pkg/front_end/testcases/inference/bug31132.dart.type_promotion.expect b/pkg/front_end/testcases/inference/bug31132.dart.type_promotion.expect
index 101f24d..8387b10 100644
--- a/pkg/front_end/testcases/inference/bug31132.dart.type_promotion.expect
+++ b/pkg/front_end/testcases/inference/bug31132.dart.type_promotion.expect
@@ -1,3 +1,3 @@
-pkg/front_end/testcases/inference/bug31132.dart:15:25: Context: Possible promotion of x@339
+pkg/front_end/testcases/inference/bug31132.dart:15:25: Context: Possible promotion of x@318
   var /*@type=C*/ y = x is C ? /*@promotedType=C*/ x : new C();
                         ^^
diff --git a/pkg/front_end/testcases/inference/callable_generic_class.dart.legacy.expect b/pkg/front_end/testcases/inference/callable_generic_class.dart.legacy.expect
index 19abeae..0423f11 100644
--- a/pkg/front_end/testcases/inference/callable_generic_class.dart.legacy.expect
+++ b/pkg/front_end/testcases/inference/callable_generic_class.dart.legacy.expect
@@ -6,7 +6,7 @@
   synthetic constructor •() → self::ActionDispatcher<self::ActionDispatcher::P>
     : super core::Object::•()
     ;
-  method call([self::ActionDispatcher::P value = null]) → void {}
+  method call([generic-covariant-impl self::ActionDispatcher::P value = null]) → void {}
 }
 class Bar extends core::Object {
   synthetic constructor •() → self::Bar
diff --git a/pkg/front_end/testcases/inference/callable_generic_class.dart.legacy.transformed.expect b/pkg/front_end/testcases/inference/callable_generic_class.dart.legacy.transformed.expect
index 19abeae..0423f11 100644
--- a/pkg/front_end/testcases/inference/callable_generic_class.dart.legacy.transformed.expect
+++ b/pkg/front_end/testcases/inference/callable_generic_class.dart.legacy.transformed.expect
@@ -6,7 +6,7 @@
   synthetic constructor •() → self::ActionDispatcher<self::ActionDispatcher::P>
     : super core::Object::•()
     ;
-  method call([self::ActionDispatcher::P value = null]) → void {}
+  method call([generic-covariant-impl self::ActionDispatcher::P value = null]) → void {}
 }
 class Bar extends core::Object {
   synthetic constructor •() → self::Bar
diff --git a/pkg/front_end/testcases/inference/callable_generic_class.dart.outline.expect b/pkg/front_end/testcases/inference/callable_generic_class.dart.outline.expect
index 186f5b0..013bfca 100644
--- a/pkg/front_end/testcases/inference/callable_generic_class.dart.outline.expect
+++ b/pkg/front_end/testcases/inference/callable_generic_class.dart.outline.expect
@@ -5,7 +5,7 @@
 class ActionDispatcher<P extends core::Object = dynamic> extends core::Object {
   synthetic constructor •() → self::ActionDispatcher<self::ActionDispatcher::P>
     ;
-  method call([self::ActionDispatcher::P value]) → void
+  method call([generic-covariant-impl self::ActionDispatcher::P value]) → void
     ;
 }
 class Bar extends core::Object {
diff --git a/pkg/front_end/testcases/inference/circular_method_inference.dart b/pkg/front_end/testcases/inference/circular_method_inference.dart
index a5492c9..73ac166 100644
--- a/pkg/front_end/testcases/inference/circular_method_inference.dart
+++ b/pkg/front_end/testcases/inference/circular_method_inference.dart
@@ -10,11 +10,11 @@
 // that causes type inference for the method `f` to go into an infinite loop.
 
 abstract class A extends B {
-  /*@topType=dynamic*/ f(/*@topType=dynamic*/ x);
+  f(x);
 }
 
 abstract class B extends A {
-  /*@topType=dynamic*/ f(/*@topType=dynamic*/ x);
+  f(x);
 }
 
 main() {}
diff --git a/pkg/front_end/testcases/inference/circular_reference_via_closures.dart b/pkg/front_end/testcases/inference/circular_reference_via_closures.dart
index 2e499a1..b63fb9a 100644
--- a/pkg/front_end/testcases/inference/circular_reference_via_closures.dart
+++ b/pkg/front_end/testcases/inference/circular_reference_via_closures.dart
@@ -2,12 +2,10 @@
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
 
-/*@testedFeatures=inference,error*/
+/*@testedFeatures=inference*/
 library test;
 
-var /*@topType=dynamic*/ /*@error=CantInferTypeDueToCircularity*/ x = /*@returnType=dynamic*/ () =>
-    y;
-var /*@topType=dynamic*/ /*@error=CantInferTypeDueToCircularity*/ y = /*@returnType=dynamic*/ () =>
-    x;
+var x = /*@returnType=invalid-type*/ () => y;
+var y = /*@returnType=invalid-type*/ () => x;
 
 main() {}
diff --git a/pkg/front_end/testcases/inference/circular_reference_via_closures.dart.strong.expect b/pkg/front_end/testcases/inference/circular_reference_via_closures.dart.strong.expect
index 5b3b71c..73adfd1 100644
--- a/pkg/front_end/testcases/inference/circular_reference_via_closures.dart.strong.expect
+++ b/pkg/front_end/testcases/inference/circular_reference_via_closures.dart.strong.expect
@@ -2,18 +2,18 @@
 //
 // Problems in library:
 //
-// pkg/front_end/testcases/inference/circular_reference_via_closures.dart:10:67: Error: Can't infer the type of 'y': circularity found during type inference.
+// pkg/front_end/testcases/inference/circular_reference_via_closures.dart:9:5: Error: Can't infer the type of 'y': circularity found during type inference.
 // Specify the type explicitly.
-// var /*@topType=dynamic*/ /*@error=CantInferTypeDueToCircularity*/ y = /*@returnType=dynamic*/ () =>
-//                                                                   ^
+// var y = /*@returnType=invalid-type*/ () => x;
+//     ^
 //
-// pkg/front_end/testcases/inference/circular_reference_via_closures.dart:8:67: Error: Can't infer the type of 'x': circularity found during type inference.
+// pkg/front_end/testcases/inference/circular_reference_via_closures.dart:8:5: Error: Can't infer the type of 'x': circularity found during type inference.
 // Specify the type explicitly.
-// var /*@topType=dynamic*/ /*@error=CantInferTypeDueToCircularity*/ x = /*@returnType=dynamic*/ () =>
-//                                                                   ^
+// var x = /*@returnType=invalid-type*/ () => y;
+//     ^
 //
 import self as self;
 
-static field dynamic x = () → dynamic => self::y;
-static field dynamic y = () → dynamic => self::x;
+static field invalid-type x = (() → invalid-type => self::y) as{TypeError} invalid-type;
+static field invalid-type y = (() → invalid-type => self::x) as{TypeError} invalid-type;
 static method main() → dynamic {}
diff --git a/pkg/front_end/testcases/inference/circular_reference_via_closures.dart.strong.transformed.expect b/pkg/front_end/testcases/inference/circular_reference_via_closures.dart.strong.transformed.expect
index 5b3b71c..73adfd1 100644
--- a/pkg/front_end/testcases/inference/circular_reference_via_closures.dart.strong.transformed.expect
+++ b/pkg/front_end/testcases/inference/circular_reference_via_closures.dart.strong.transformed.expect
@@ -2,18 +2,18 @@
 //
 // Problems in library:
 //
-// pkg/front_end/testcases/inference/circular_reference_via_closures.dart:10:67: Error: Can't infer the type of 'y': circularity found during type inference.
+// pkg/front_end/testcases/inference/circular_reference_via_closures.dart:9:5: Error: Can't infer the type of 'y': circularity found during type inference.
 // Specify the type explicitly.
-// var /*@topType=dynamic*/ /*@error=CantInferTypeDueToCircularity*/ y = /*@returnType=dynamic*/ () =>
-//                                                                   ^
+// var y = /*@returnType=invalid-type*/ () => x;
+//     ^
 //
-// pkg/front_end/testcases/inference/circular_reference_via_closures.dart:8:67: Error: Can't infer the type of 'x': circularity found during type inference.
+// pkg/front_end/testcases/inference/circular_reference_via_closures.dart:8:5: Error: Can't infer the type of 'x': circularity found during type inference.
 // Specify the type explicitly.
-// var /*@topType=dynamic*/ /*@error=CantInferTypeDueToCircularity*/ x = /*@returnType=dynamic*/ () =>
-//                                                                   ^
+// var x = /*@returnType=invalid-type*/ () => y;
+//     ^
 //
 import self as self;
 
-static field dynamic x = () → dynamic => self::y;
-static field dynamic y = () → dynamic => self::x;
+static field invalid-type x = (() → invalid-type => self::y) as{TypeError} invalid-type;
+static field invalid-type y = (() → invalid-type => self::x) as{TypeError} invalid-type;
 static method main() → dynamic {}
diff --git a/pkg/front_end/testcases/inference/circular_reference_via_closures_initializer_types.dart b/pkg/front_end/testcases/inference/circular_reference_via_closures_initializer_types.dart
index 2e499a1..b63fb9a 100644
--- a/pkg/front_end/testcases/inference/circular_reference_via_closures_initializer_types.dart
+++ b/pkg/front_end/testcases/inference/circular_reference_via_closures_initializer_types.dart
@@ -2,12 +2,10 @@
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
 
-/*@testedFeatures=inference,error*/
+/*@testedFeatures=inference*/
 library test;
 
-var /*@topType=dynamic*/ /*@error=CantInferTypeDueToCircularity*/ x = /*@returnType=dynamic*/ () =>
-    y;
-var /*@topType=dynamic*/ /*@error=CantInferTypeDueToCircularity*/ y = /*@returnType=dynamic*/ () =>
-    x;
+var x = /*@returnType=invalid-type*/ () => y;
+var y = /*@returnType=invalid-type*/ () => x;
 
 main() {}
diff --git a/pkg/front_end/testcases/inference/circular_reference_via_closures_initializer_types.dart.strong.expect b/pkg/front_end/testcases/inference/circular_reference_via_closures_initializer_types.dart.strong.expect
index a4e4a26..4f81f83 100644
--- a/pkg/front_end/testcases/inference/circular_reference_via_closures_initializer_types.dart.strong.expect
+++ b/pkg/front_end/testcases/inference/circular_reference_via_closures_initializer_types.dart.strong.expect
@@ -2,18 +2,18 @@
 //
 // Problems in library:
 //
-// pkg/front_end/testcases/inference/circular_reference_via_closures_initializer_types.dart:10:67: Error: Can't infer the type of 'y': circularity found during type inference.
+// pkg/front_end/testcases/inference/circular_reference_via_closures_initializer_types.dart:9:5: Error: Can't infer the type of 'y': circularity found during type inference.
 // Specify the type explicitly.
-// var /*@topType=dynamic*/ /*@error=CantInferTypeDueToCircularity*/ y = /*@returnType=dynamic*/ () =>
-//                                                                   ^
+// var y = /*@returnType=invalid-type*/ () => x;
+//     ^
 //
-// pkg/front_end/testcases/inference/circular_reference_via_closures_initializer_types.dart:8:67: Error: Can't infer the type of 'x': circularity found during type inference.
+// pkg/front_end/testcases/inference/circular_reference_via_closures_initializer_types.dart:8:5: Error: Can't infer the type of 'x': circularity found during type inference.
 // Specify the type explicitly.
-// var /*@topType=dynamic*/ /*@error=CantInferTypeDueToCircularity*/ x = /*@returnType=dynamic*/ () =>
-//                                                                   ^
+// var x = /*@returnType=invalid-type*/ () => y;
+//     ^
 //
 import self as self;
 
-static field dynamic x = () → dynamic => self::y;
-static field dynamic y = () → dynamic => self::x;
+static field invalid-type x = (() → invalid-type => self::y) as{TypeError} invalid-type;
+static field invalid-type y = (() → invalid-type => self::x) as{TypeError} invalid-type;
 static method main() → dynamic {}
diff --git a/pkg/front_end/testcases/inference/circular_reference_via_closures_initializer_types.dart.strong.transformed.expect b/pkg/front_end/testcases/inference/circular_reference_via_closures_initializer_types.dart.strong.transformed.expect
index a4e4a26..4f81f83 100644
--- a/pkg/front_end/testcases/inference/circular_reference_via_closures_initializer_types.dart.strong.transformed.expect
+++ b/pkg/front_end/testcases/inference/circular_reference_via_closures_initializer_types.dart.strong.transformed.expect
@@ -2,18 +2,18 @@
 //
 // Problems in library:
 //
-// pkg/front_end/testcases/inference/circular_reference_via_closures_initializer_types.dart:10:67: Error: Can't infer the type of 'y': circularity found during type inference.
+// pkg/front_end/testcases/inference/circular_reference_via_closures_initializer_types.dart:9:5: Error: Can't infer the type of 'y': circularity found during type inference.
 // Specify the type explicitly.
-// var /*@topType=dynamic*/ /*@error=CantInferTypeDueToCircularity*/ y = /*@returnType=dynamic*/ () =>
-//                                                                   ^
+// var y = /*@returnType=invalid-type*/ () => x;
+//     ^
 //
-// pkg/front_end/testcases/inference/circular_reference_via_closures_initializer_types.dart:8:67: Error: Can't infer the type of 'x': circularity found during type inference.
+// pkg/front_end/testcases/inference/circular_reference_via_closures_initializer_types.dart:8:5: Error: Can't infer the type of 'x': circularity found during type inference.
 // Specify the type explicitly.
-// var /*@topType=dynamic*/ /*@error=CantInferTypeDueToCircularity*/ x = /*@returnType=dynamic*/ () =>
-//                                                                   ^
+// var x = /*@returnType=invalid-type*/ () => y;
+//     ^
 //
 import self as self;
 
-static field dynamic x = () → dynamic => self::y;
-static field dynamic y = () → dynamic => self::x;
+static field invalid-type x = (() → invalid-type => self::y) as{TypeError} invalid-type;
+static field invalid-type y = (() → invalid-type => self::x) as{TypeError} invalid-type;
 static method main() → dynamic {}
diff --git a/pkg/front_end/testcases/inference/conditional_lub.dart b/pkg/front_end/testcases/inference/conditional_lub.dart
index cab1316..a6b43a6 100644
--- a/pkg/front_end/testcases/inference/conditional_lub.dart
+++ b/pkg/front_end/testcases/inference/conditional_lub.dart
@@ -8,7 +8,7 @@
 bool b = true;
 int x = 0;
 double y = 0.0;
-var /*@topType=num*/ z = b ? x : y;
+var z = b ? x : y;
 
 main() {
   var /*@type=num*/ z = b ? x : y;
diff --git a/pkg/front_end/testcases/inference/conflicting_fields.dart b/pkg/front_end/testcases/inference/conflicting_fields.dart
index 0c53592..72edc67 100644
--- a/pkg/front_end/testcases/inference/conflicting_fields.dart
+++ b/pkg/front_end/testcases/inference/conflicting_fields.dart
@@ -15,8 +15,8 @@
 }
 
 class B extends A implements I {
-  get /*@topType=dynamic*/field1 => null;
-  get /*@topType=dynamic*/field2 => null;
+  get field1 => null;
+  get field2 => null;
 }
 
 main() {}
diff --git a/pkg/front_end/testcases/inference/conflicting_fields.dart.strong.expect b/pkg/front_end/testcases/inference/conflicting_fields.dart.strong.expect
index be7339f..3f45ef6 100644
--- a/pkg/front_end/testcases/inference/conflicting_fields.dart.strong.expect
+++ b/pkg/front_end/testcases/inference/conflicting_fields.dart.strong.expect
@@ -2,28 +2,28 @@
 //
 // Problems in library:
 //
-// pkg/front_end/testcases/inference/conflicting_fields.dart:18:27: Error: Can't infer a type for 'field1' as some of the inherited members have different types.
+// pkg/front_end/testcases/inference/conflicting_fields.dart:18:7: Error: Can't infer a type for 'field1' as some of the inherited members have different types.
 // Try adding an explicit type.
-//   get /*@topType=dynamic*/field1 => null;
-//                           ^
+//   get field1 => null;
+//       ^
 //
-// pkg/front_end/testcases/inference/conflicting_fields.dart:19:27: Error: Can't infer a type for 'field2' as some of the inherited members have different types.
+// pkg/front_end/testcases/inference/conflicting_fields.dart:19:7: Error: Can't infer a type for 'field2' as some of the inherited members have different types.
 // Try adding an explicit type.
-//   get /*@topType=dynamic*/field2 => null;
-//                           ^
+//   get field2 => null;
+//       ^
 //
-// pkg/front_end/testcases/inference/conflicting_fields.dart:19:27: Error: The return type of the method 'B.field2' is 'dynamic', which does not match the return type, 'int', of the overridden method, 'A.field2'.
+// pkg/front_end/testcases/inference/conflicting_fields.dart:19:7: Error: The return type of the method 'B.field2' is 'dynamic', which does not match the return type, 'int', of the overridden method, 'A.field2'.
 // Change to a subtype of 'int'.
-//   get /*@topType=dynamic*/field2 => null;
-//                           ^
+//   get field2 => null;
+//       ^
 // pkg/front_end/testcases/inference/conflicting_fields.dart:9:7: Context: This is the overridden method ('field2').
 //   int field2;
 //       ^
 //
-// pkg/front_end/testcases/inference/conflicting_fields.dart:18:27: Error: The return type of the method 'B.field1' is 'dynamic', which does not match the return type, 'int', of the overridden method, 'I.field1'.
+// pkg/front_end/testcases/inference/conflicting_fields.dart:18:7: Error: The return type of the method 'B.field1' is 'dynamic', which does not match the return type, 'int', of the overridden method, 'I.field1'.
 // Change to a subtype of 'int'.
-//   get /*@topType=dynamic*/field1 => null;
-//                           ^
+//   get field1 => null;
+//       ^
 // pkg/front_end/testcases/inference/conflicting_fields.dart:13:7: Context: This is the overridden method ('field1').
 //   int field1;
 //       ^
diff --git a/pkg/front_end/testcases/inference/conflicts_can_happen.dart b/pkg/front_end/testcases/inference/conflicts_can_happen.dart
index ce73f69..6679d6e 100644
--- a/pkg/front_end/testcases/inference/conflicts_can_happen.dart
+++ b/pkg/front_end/testcases/inference/conflicts_can_happen.dart
@@ -2,7 +2,7 @@
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
 
-/*@testedFeatures=inference,error*/
+/*@testedFeatures=inference*/
 library test;
 
 class I1 {
@@ -22,14 +22,12 @@
 }
 
 class C1 implements A, B {
-  get /*@topType=dynamic*/ /*@error=CantInferTypeDueToInconsistentOverrides*/ /*@error=OverrideTypeMismatchReturnType*/ /*@error=OverrideTypeMismatchReturnType*/ a =>
-      null;
+  get a => null;
 }
 
 // Still ambiguous
 class C2 implements B, A {
-  get /*@topType=dynamic*/ /*@error=CantInferTypeDueToInconsistentOverrides*/ /*@error=OverrideTypeMismatchReturnType*/ /*@error=OverrideTypeMismatchReturnType*/ a =>
-      null;
+  get a => null;
 }
 
 main() {}
diff --git a/pkg/front_end/testcases/inference/conflicts_can_happen.dart.strong.expect b/pkg/front_end/testcases/inference/conflicts_can_happen.dart.strong.expect
index fd0caa9..6e8c47d 100644
--- a/pkg/front_end/testcases/inference/conflicts_can_happen.dart.strong.expect
+++ b/pkg/front_end/testcases/inference/conflicts_can_happen.dart.strong.expect
@@ -2,48 +2,48 @@
 //
 // Problems in library:
 //
-// pkg/front_end/testcases/inference/conflicts_can_happen.dart:25:163: Error: Can't infer a type for 'a' as some of the inherited members have different types.
+// pkg/front_end/testcases/inference/conflicts_can_happen.dart:25:7: Error: Can't infer a type for 'a' as some of the inherited members have different types.
 // Try adding an explicit type.
-//   get /*@topType=dynamic*/ /*@error=CantInferTypeDueToInconsistentOverrides*/ /*@error=OverrideTypeMismatchReturnType*/ /*@error=OverrideTypeMismatchReturnType*/ a =>
-//                                                                                                                                                                   ^
+//   get a => null;
+//       ^
 //
-// pkg/front_end/testcases/inference/conflicts_can_happen.dart:31:163: Error: Can't infer a type for 'a' as some of the inherited members have different types.
+// pkg/front_end/testcases/inference/conflicts_can_happen.dart:30:7: Error: Can't infer a type for 'a' as some of the inherited members have different types.
 // Try adding an explicit type.
-//   get /*@topType=dynamic*/ /*@error=CantInferTypeDueToInconsistentOverrides*/ /*@error=OverrideTypeMismatchReturnType*/ /*@error=OverrideTypeMismatchReturnType*/ a =>
-//                                                                                                                                                                   ^
+//   get a => null;
+//       ^
 //
-// pkg/front_end/testcases/inference/conflicts_can_happen.dart:25:163: Error: The return type of the method 'C1.a' is 'dynamic', which does not match the return type, 'I1', of the overridden method, 'A.a'.
+// pkg/front_end/testcases/inference/conflicts_can_happen.dart:25:7: Error: The return type of the method 'C1.a' is 'dynamic', which does not match the return type, 'I1', of the overridden method, 'A.a'.
 //  - 'I1' is from 'pkg/front_end/testcases/inference/conflicts_can_happen.dart'.
 // Change to a subtype of 'I1'.
-//   get /*@topType=dynamic*/ /*@error=CantInferTypeDueToInconsistentOverrides*/ /*@error=OverrideTypeMismatchReturnType*/ /*@error=OverrideTypeMismatchReturnType*/ a =>
-//                                                                                                                                                                   ^
+//   get a => null;
+//       ^
 // pkg/front_end/testcases/inference/conflicts_can_happen.dart:17:12: Context: This is the overridden method ('a').
 //   final I1 a = null;
 //            ^
 //
-// pkg/front_end/testcases/inference/conflicts_can_happen.dart:25:163: Error: The return type of the method 'C1.a' is 'dynamic', which does not match the return type, 'I2', of the overridden method, 'B.a'.
+// pkg/front_end/testcases/inference/conflicts_can_happen.dart:25:7: Error: The return type of the method 'C1.a' is 'dynamic', which does not match the return type, 'I2', of the overridden method, 'B.a'.
 //  - 'I2' is from 'pkg/front_end/testcases/inference/conflicts_can_happen.dart'.
 // Change to a subtype of 'I2'.
-//   get /*@topType=dynamic*/ /*@error=CantInferTypeDueToInconsistentOverrides*/ /*@error=OverrideTypeMismatchReturnType*/ /*@error=OverrideTypeMismatchReturnType*/ a =>
-//                                                                                                                                                                   ^
+//   get a => null;
+//       ^
 // pkg/front_end/testcases/inference/conflicts_can_happen.dart:21:12: Context: This is the overridden method ('a').
 //   final I2 a = null;
 //            ^
 //
-// pkg/front_end/testcases/inference/conflicts_can_happen.dart:31:163: Error: The return type of the method 'C2.a' is 'dynamic', which does not match the return type, 'I2', of the overridden method, 'B.a'.
+// pkg/front_end/testcases/inference/conflicts_can_happen.dart:30:7: Error: The return type of the method 'C2.a' is 'dynamic', which does not match the return type, 'I2', of the overridden method, 'B.a'.
 //  - 'I2' is from 'pkg/front_end/testcases/inference/conflicts_can_happen.dart'.
 // Change to a subtype of 'I2'.
-//   get /*@topType=dynamic*/ /*@error=CantInferTypeDueToInconsistentOverrides*/ /*@error=OverrideTypeMismatchReturnType*/ /*@error=OverrideTypeMismatchReturnType*/ a =>
-//                                                                                                                                                                   ^
+//   get a => null;
+//       ^
 // pkg/front_end/testcases/inference/conflicts_can_happen.dart:21:12: Context: This is the overridden method ('a').
 //   final I2 a = null;
 //            ^
 //
-// pkg/front_end/testcases/inference/conflicts_can_happen.dart:31:163: Error: The return type of the method 'C2.a' is 'dynamic', which does not match the return type, 'I1', of the overridden method, 'A.a'.
+// pkg/front_end/testcases/inference/conflicts_can_happen.dart:30:7: Error: The return type of the method 'C2.a' is 'dynamic', which does not match the return type, 'I1', of the overridden method, 'A.a'.
 //  - 'I1' is from 'pkg/front_end/testcases/inference/conflicts_can_happen.dart'.
 // Change to a subtype of 'I1'.
-//   get /*@topType=dynamic*/ /*@error=CantInferTypeDueToInconsistentOverrides*/ /*@error=OverrideTypeMismatchReturnType*/ /*@error=OverrideTypeMismatchReturnType*/ a =>
-//                                                                                                                                                                   ^
+//   get a => null;
+//       ^
 // pkg/front_end/testcases/inference/conflicts_can_happen.dart:17:12: Context: This is the overridden method ('a').
 //   final I1 a = null;
 //            ^
diff --git a/pkg/front_end/testcases/inference/conflicts_can_happen2.dart b/pkg/front_end/testcases/inference/conflicts_can_happen2.dart
index 150baa5..65a929e 100644
--- a/pkg/front_end/testcases/inference/conflicts_can_happen2.dart
+++ b/pkg/front_end/testcases/inference/conflicts_can_happen2.dart
@@ -2,7 +2,7 @@
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
 
-/*@testedFeatures=inference,error*/
+/*@testedFeatures=inference*/
 library test;
 
 class I1 {
@@ -31,8 +31,7 @@
 }
 
 class C2 implements A, B {
-  get /*@topType=dynamic*/ /*@error=CantInferTypeDueToInconsistentOverrides*/ /*@error=OverrideTypeMismatchReturnType*/ /*@error=OverrideTypeMismatchReturnType*/ a =>
-      null;
+  get a => null;
 }
 
 main() {}
diff --git a/pkg/front_end/testcases/inference/conflicts_can_happen2.dart.strong.expect b/pkg/front_end/testcases/inference/conflicts_can_happen2.dart.strong.expect
index 292f0b7..411506a 100644
--- a/pkg/front_end/testcases/inference/conflicts_can_happen2.dart.strong.expect
+++ b/pkg/front_end/testcases/inference/conflicts_can_happen2.dart.strong.expect
@@ -2,25 +2,25 @@
 //
 // Problems in library:
 //
-// pkg/front_end/testcases/inference/conflicts_can_happen2.dart:34:163: Error: Can't infer a type for 'a' as some of the inherited members have different types.
+// pkg/front_end/testcases/inference/conflicts_can_happen2.dart:34:7: Error: Can't infer a type for 'a' as some of the inherited members have different types.
 // Try adding an explicit type.
-//   get /*@topType=dynamic*/ /*@error=CantInferTypeDueToInconsistentOverrides*/ /*@error=OverrideTypeMismatchReturnType*/ /*@error=OverrideTypeMismatchReturnType*/ a =>
-//                                                                                                                                                                   ^
+//   get a => null;
+//       ^
 //
-// pkg/front_end/testcases/inference/conflicts_can_happen2.dart:34:163: Error: The return type of the method 'C2.a' is 'dynamic', which does not match the return type, 'I1', of the overridden method, 'A.a'.
+// pkg/front_end/testcases/inference/conflicts_can_happen2.dart:34:7: Error: The return type of the method 'C2.a' is 'dynamic', which does not match the return type, 'I1', of the overridden method, 'A.a'.
 //  - 'I1' is from 'pkg/front_end/testcases/inference/conflicts_can_happen2.dart'.
 // Change to a subtype of 'I1'.
-//   get /*@topType=dynamic*/ /*@error=CantInferTypeDueToInconsistentOverrides*/ /*@error=OverrideTypeMismatchReturnType*/ /*@error=OverrideTypeMismatchReturnType*/ a =>
-//                                                                                                                                                                   ^
+//   get a => null;
+//       ^
 // pkg/front_end/testcases/inference/conflicts_can_happen2.dart:22:12: Context: This is the overridden method ('a').
 //   final I1 a = null;
 //            ^
 //
-// pkg/front_end/testcases/inference/conflicts_can_happen2.dart:34:163: Error: The return type of the method 'C2.a' is 'dynamic', which does not match the return type, 'I2', of the overridden method, 'B.a'.
+// pkg/front_end/testcases/inference/conflicts_can_happen2.dart:34:7: Error: The return type of the method 'C2.a' is 'dynamic', which does not match the return type, 'I2', of the overridden method, 'B.a'.
 //  - 'I2' is from 'pkg/front_end/testcases/inference/conflicts_can_happen2.dart'.
 // Change to a subtype of 'I2'.
-//   get /*@topType=dynamic*/ /*@error=CantInferTypeDueToInconsistentOverrides*/ /*@error=OverrideTypeMismatchReturnType*/ /*@error=OverrideTypeMismatchReturnType*/ a =>
-//                                                                                                                                                                   ^
+//   get a => null;
+//       ^
 // pkg/front_end/testcases/inference/conflicts_can_happen2.dart:26:12: Context: This is the overridden method ('a').
 //   final I2 a = null;
 //            ^
diff --git a/pkg/front_end/testcases/inference/constructors_infer_from_arguments.dart.legacy.expect b/pkg/front_end/testcases/inference/constructors_infer_from_arguments.dart.legacy.expect
index 67e376b..afd777c 100644
--- a/pkg/front_end/testcases/inference/constructors_infer_from_arguments.dart.legacy.expect
+++ b/pkg/front_end/testcases/inference/constructors_infer_from_arguments.dart.legacy.expect
@@ -3,7 +3,7 @@
 import "dart:core" as core;
 
 class C<T extends core::Object = dynamic> extends core::Object {
-  field self::C::T t;
+  generic-covariant-impl field self::C::T t;
   constructor •(self::C::T t) → self::C<self::C::T>
     : self::C::t = t, super core::Object::•()
     ;
diff --git a/pkg/front_end/testcases/inference/constructors_infer_from_arguments.dart.legacy.transformed.expect b/pkg/front_end/testcases/inference/constructors_infer_from_arguments.dart.legacy.transformed.expect
index 67e376b..afd777c 100644
--- a/pkg/front_end/testcases/inference/constructors_infer_from_arguments.dart.legacy.transformed.expect
+++ b/pkg/front_end/testcases/inference/constructors_infer_from_arguments.dart.legacy.transformed.expect
@@ -3,7 +3,7 @@
 import "dart:core" as core;
 
 class C<T extends core::Object = dynamic> extends core::Object {
-  field self::C::T t;
+  generic-covariant-impl field self::C::T t;
   constructor •(self::C::T t) → self::C<self::C::T>
     : self::C::t = t, super core::Object::•()
     ;
diff --git a/pkg/front_end/testcases/inference/constructors_infer_from_arguments_factory.dart.legacy.expect b/pkg/front_end/testcases/inference/constructors_infer_from_arguments_factory.dart.legacy.expect
index e84c59d..3a5a56b 100644
--- a/pkg/front_end/testcases/inference/constructors_infer_from_arguments_factory.dart.legacy.expect
+++ b/pkg/front_end/testcases/inference/constructors_infer_from_arguments_factory.dart.legacy.expect
@@ -3,7 +3,7 @@
 import "dart:core" as core;
 
 class C<T extends core::Object = dynamic> extends core::Object {
-  field self::C::T t = null;
+  generic-covariant-impl field self::C::T t = null;
   constructor _() → self::C<self::C::T>
     : super core::Object::•()
     ;
diff --git a/pkg/front_end/testcases/inference/constructors_infer_from_arguments_factory.dart.legacy.transformed.expect b/pkg/front_end/testcases/inference/constructors_infer_from_arguments_factory.dart.legacy.transformed.expect
index e84c59d..3a5a56b 100644
--- a/pkg/front_end/testcases/inference/constructors_infer_from_arguments_factory.dart.legacy.transformed.expect
+++ b/pkg/front_end/testcases/inference/constructors_infer_from_arguments_factory.dart.legacy.transformed.expect
@@ -3,7 +3,7 @@
 import "dart:core" as core;
 
 class C<T extends core::Object = dynamic> extends core::Object {
-  field self::C::T t = null;
+  generic-covariant-impl field self::C::T t = null;
   constructor _() → self::C<self::C::T>
     : super core::Object::•()
     ;
diff --git a/pkg/front_end/testcases/inference/constructors_infer_from_arguments_factory_calls_constructor.dart.legacy.expect b/pkg/front_end/testcases/inference/constructors_infer_from_arguments_factory_calls_constructor.dart.legacy.expect
index 0e2824f0..523f87e 100644
--- a/pkg/front_end/testcases/inference/constructors_infer_from_arguments_factory_calls_constructor.dart.legacy.expect
+++ b/pkg/front_end/testcases/inference/constructors_infer_from_arguments_factory_calls_constructor.dart.legacy.expect
@@ -3,7 +3,7 @@
 import "dart:core" as core;
 
 class A<T extends core::Object = dynamic> extends core::Object {
-  field self::A<self::A::T> f = new self::A::•<dynamic>();
+  generic-covariant-impl field self::A<self::A::T> f = new self::A::•<dynamic>();
   constructor •() → self::A<self::A::T>
     : super core::Object::•()
     ;
diff --git a/pkg/front_end/testcases/inference/constructors_infer_from_arguments_factory_calls_constructor.dart.legacy.transformed.expect b/pkg/front_end/testcases/inference/constructors_infer_from_arguments_factory_calls_constructor.dart.legacy.transformed.expect
index 0e2824f0..523f87e 100644
--- a/pkg/front_end/testcases/inference/constructors_infer_from_arguments_factory_calls_constructor.dart.legacy.transformed.expect
+++ b/pkg/front_end/testcases/inference/constructors_infer_from_arguments_factory_calls_constructor.dart.legacy.transformed.expect
@@ -3,7 +3,7 @@
 import "dart:core" as core;
 
 class A<T extends core::Object = dynamic> extends core::Object {
-  field self::A<self::A::T> f = new self::A::•<dynamic>();
+  generic-covariant-impl field self::A<self::A::T> f = new self::A::•<dynamic>();
   constructor •() → self::A<self::A::T>
     : super core::Object::•()
     ;
diff --git a/pkg/front_end/testcases/inference/constructors_infer_from_arguments_named.dart.legacy.expect b/pkg/front_end/testcases/inference/constructors_infer_from_arguments_named.dart.legacy.expect
index 3aaa8b1..12938f7 100644
--- a/pkg/front_end/testcases/inference/constructors_infer_from_arguments_named.dart.legacy.expect
+++ b/pkg/front_end/testcases/inference/constructors_infer_from_arguments_named.dart.legacy.expect
@@ -3,7 +3,7 @@
 import "dart:core" as core;
 
 class C<T extends core::Object = dynamic> extends core::Object {
-  field self::C::T t = null;
+  generic-covariant-impl field self::C::T t = null;
   constructor named(core::List<self::C::T> t) → self::C<self::C::T>
     : super core::Object::•()
     ;
diff --git a/pkg/front_end/testcases/inference/constructors_infer_from_arguments_named.dart.legacy.transformed.expect b/pkg/front_end/testcases/inference/constructors_infer_from_arguments_named.dart.legacy.transformed.expect
index 3aaa8b1..12938f7 100644
--- a/pkg/front_end/testcases/inference/constructors_infer_from_arguments_named.dart.legacy.transformed.expect
+++ b/pkg/front_end/testcases/inference/constructors_infer_from_arguments_named.dart.legacy.transformed.expect
@@ -3,7 +3,7 @@
 import "dart:core" as core;
 
 class C<T extends core::Object = dynamic> extends core::Object {
-  field self::C::T t = null;
+  generic-covariant-impl field self::C::T t = null;
   constructor named(core::List<self::C::T> t) → self::C<self::C::T>
     : super core::Object::•()
     ;
diff --git a/pkg/front_end/testcases/inference/constructors_infer_from_arguments_named_factory.dart.legacy.expect b/pkg/front_end/testcases/inference/constructors_infer_from_arguments_named_factory.dart.legacy.expect
index 4761f0f..d35dcf3 100644
--- a/pkg/front_end/testcases/inference/constructors_infer_from_arguments_named_factory.dart.legacy.expect
+++ b/pkg/front_end/testcases/inference/constructors_infer_from_arguments_named_factory.dart.legacy.expect
@@ -3,7 +3,7 @@
 import "dart:core" as core;
 
 class C<T extends core::Object = dynamic> extends core::Object {
-  field self::C::T t = null;
+  generic-covariant-impl field self::C::T t = null;
   constructor •() → self::C<self::C::T>
     : super core::Object::•()
     ;
diff --git a/pkg/front_end/testcases/inference/constructors_infer_from_arguments_named_factory.dart.legacy.transformed.expect b/pkg/front_end/testcases/inference/constructors_infer_from_arguments_named_factory.dart.legacy.transformed.expect
index 4761f0f..d35dcf3 100644
--- a/pkg/front_end/testcases/inference/constructors_infer_from_arguments_named_factory.dart.legacy.transformed.expect
+++ b/pkg/front_end/testcases/inference/constructors_infer_from_arguments_named_factory.dart.legacy.transformed.expect
@@ -3,7 +3,7 @@
 import "dart:core" as core;
 
 class C<T extends core::Object = dynamic> extends core::Object {
-  field self::C::T t = null;
+  generic-covariant-impl field self::C::T t = null;
   constructor •() → self::C<self::C::T>
     : super core::Object::•()
     ;
diff --git a/pkg/front_end/testcases/inference/constructors_infer_from_arguments_redirecting.dart.legacy.expect b/pkg/front_end/testcases/inference/constructors_infer_from_arguments_redirecting.dart.legacy.expect
index 0dd3c05..6ad8fb3 100644
--- a/pkg/front_end/testcases/inference/constructors_infer_from_arguments_redirecting.dart.legacy.expect
+++ b/pkg/front_end/testcases/inference/constructors_infer_from_arguments_redirecting.dart.legacy.expect
@@ -3,7 +3,7 @@
 import "dart:core" as core;
 
 class C<T extends core::Object = dynamic> extends core::Object {
-  field self::C::T t;
+  generic-covariant-impl field self::C::T t;
   constructor •(self::C::T t) → self::C<self::C::T>
     : self::C::t = t, super core::Object::•()
     ;
diff --git a/pkg/front_end/testcases/inference/constructors_infer_from_arguments_redirecting.dart.legacy.transformed.expect b/pkg/front_end/testcases/inference/constructors_infer_from_arguments_redirecting.dart.legacy.transformed.expect
index 0dd3c05..6ad8fb3 100644
--- a/pkg/front_end/testcases/inference/constructors_infer_from_arguments_redirecting.dart.legacy.transformed.expect
+++ b/pkg/front_end/testcases/inference/constructors_infer_from_arguments_redirecting.dart.legacy.transformed.expect
@@ -3,7 +3,7 @@
 import "dart:core" as core;
 
 class C<T extends core::Object = dynamic> extends core::Object {
-  field self::C::T t;
+  generic-covariant-impl field self::C::T t;
   constructor •(self::C::T t) → self::C<self::C::T>
     : self::C::t = t, super core::Object::•()
     ;
diff --git a/pkg/front_end/testcases/inference/constructors_infer_from_arguments_redirecting_factory.dart.legacy.expect b/pkg/front_end/testcases/inference/constructors_infer_from_arguments_redirecting_factory.dart.legacy.expect
index 8b7170d..a9f6850 100644
--- a/pkg/front_end/testcases/inference/constructors_infer_from_arguments_redirecting_factory.dart.legacy.expect
+++ b/pkg/front_end/testcases/inference/constructors_infer_from_arguments_redirecting_factory.dart.legacy.expect
@@ -5,12 +5,12 @@
 abstract class C<T extends core::Object = dynamic> extends core::Object {
   static field dynamic _redirecting# = <dynamic>[self::C::•];
   abstract get t() → self::C::T;
-  abstract set t(self::C::T x) → void;
+  abstract set t(generic-covariant-impl self::C::T x) → void;
   static factory •<T extends core::Object = dynamic>(self::C::•::T t) → self::C<self::C::•::T>
     let dynamic #redirecting_factory = self::CImpl::• in let self::C::•::T #typeArg0 = null in invalid-expression;
 }
 class CImpl<T extends core::Object = dynamic> extends core::Object implements self::C<self::CImpl::T> {
-  field self::CImpl::T t;
+  generic-covariant-impl field self::CImpl::T t;
   constructor •(self::CImpl::T t) → self::CImpl<self::CImpl::T>
     : self::CImpl::t = t, super core::Object::•()
     ;
diff --git a/pkg/front_end/testcases/inference/constructors_infer_from_arguments_redirecting_factory.dart.legacy.transformed.expect b/pkg/front_end/testcases/inference/constructors_infer_from_arguments_redirecting_factory.dart.legacy.transformed.expect
index 8b7170d..a9f6850 100644
--- a/pkg/front_end/testcases/inference/constructors_infer_from_arguments_redirecting_factory.dart.legacy.transformed.expect
+++ b/pkg/front_end/testcases/inference/constructors_infer_from_arguments_redirecting_factory.dart.legacy.transformed.expect
@@ -5,12 +5,12 @@
 abstract class C<T extends core::Object = dynamic> extends core::Object {
   static field dynamic _redirecting# = <dynamic>[self::C::•];
   abstract get t() → self::C::T;
-  abstract set t(self::C::T x) → void;
+  abstract set t(generic-covariant-impl self::C::T x) → void;
   static factory •<T extends core::Object = dynamic>(self::C::•::T t) → self::C<self::C::•::T>
     let dynamic #redirecting_factory = self::CImpl::• in let self::C::•::T #typeArg0 = null in invalid-expression;
 }
 class CImpl<T extends core::Object = dynamic> extends core::Object implements self::C<self::CImpl::T> {
-  field self::CImpl::T t;
+  generic-covariant-impl field self::CImpl::T t;
   constructor •(self::CImpl::T t) → self::CImpl<self::CImpl::T>
     : self::CImpl::t = t, super core::Object::•()
     ;
diff --git a/pkg/front_end/testcases/inference/constructors_infer_from_arguments_redirecting_factory_to_factory.dart.legacy.expect b/pkg/front_end/testcases/inference/constructors_infer_from_arguments_redirecting_factory_to_factory.dart.legacy.expect
index 2efa6f7..c8c111e 100644
--- a/pkg/front_end/testcases/inference/constructors_infer_from_arguments_redirecting_factory_to_factory.dart.legacy.expect
+++ b/pkg/front_end/testcases/inference/constructors_infer_from_arguments_redirecting_factory_to_factory.dart.legacy.expect
@@ -5,12 +5,12 @@
 abstract class C<T extends core::Object = dynamic> extends core::Object {
   static field dynamic _redirecting# = <dynamic>[self::C::•];
   abstract get t() → self::C::T;
-  abstract set t(self::C::T x) → void;
+  abstract set t(generic-covariant-impl self::C::T x) → void;
   static factory •<T extends core::Object = dynamic>(self::C::•::T t) → self::C<self::C::•::T>
     let dynamic #redirecting_factory = self::CImpl::• in let self::C::•::T #typeArg0 = null in invalid-expression;
 }
 class CImpl<T extends core::Object = dynamic> extends core::Object implements self::C<self::CImpl::T> {
-  field self::CImpl::T t;
+  generic-covariant-impl field self::CImpl::T t;
   constructor _(self::CImpl::T t) → self::CImpl<self::CImpl::T>
     : self::CImpl::t = t, super core::Object::•()
     ;
diff --git a/pkg/front_end/testcases/inference/constructors_infer_from_arguments_redirecting_factory_to_factory.dart.legacy.transformed.expect b/pkg/front_end/testcases/inference/constructors_infer_from_arguments_redirecting_factory_to_factory.dart.legacy.transformed.expect
index 2efa6f7..c8c111e 100644
--- a/pkg/front_end/testcases/inference/constructors_infer_from_arguments_redirecting_factory_to_factory.dart.legacy.transformed.expect
+++ b/pkg/front_end/testcases/inference/constructors_infer_from_arguments_redirecting_factory_to_factory.dart.legacy.transformed.expect
@@ -5,12 +5,12 @@
 abstract class C<T extends core::Object = dynamic> extends core::Object {
   static field dynamic _redirecting# = <dynamic>[self::C::•];
   abstract get t() → self::C::T;
-  abstract set t(self::C::T x) → void;
+  abstract set t(generic-covariant-impl self::C::T x) → void;
   static factory •<T extends core::Object = dynamic>(self::C::•::T t) → self::C<self::C::•::T>
     let dynamic #redirecting_factory = self::CImpl::• in let self::C::•::T #typeArg0 = null in invalid-expression;
 }
 class CImpl<T extends core::Object = dynamic> extends core::Object implements self::C<self::CImpl::T> {
-  field self::CImpl::T t;
+  generic-covariant-impl field self::CImpl::T t;
   constructor _(self::CImpl::T t) → self::CImpl<self::CImpl::T>
     : self::CImpl::t = t, super core::Object::•()
     ;
diff --git a/pkg/front_end/testcases/inference/constructors_infer_from_arguments_redirecting_factory_to_factory.dart.outline.expect b/pkg/front_end/testcases/inference/constructors_infer_from_arguments_redirecting_factory_to_factory.dart.outline.expect
index 579d4cf..2385460 100644
--- a/pkg/front_end/testcases/inference/constructors_infer_from_arguments_redirecting_factory_to_factory.dart.outline.expect
+++ b/pkg/front_end/testcases/inference/constructors_infer_from_arguments_redirecting_factory_to_factory.dart.outline.expect
@@ -5,12 +5,12 @@
 abstract class C<T extends core::Object = dynamic> extends core::Object {
   static field dynamic _redirecting# = <dynamic>[self::C::•];
   abstract get t() → self::C::T;
-  abstract set t(self::C::T x) → void;
+  abstract set t(generic-covariant-impl self::C::T x) → void;
   static factory •<T extends core::Object = dynamic>(self::C::•::T t) → self::C<self::C::•::T>
     let dynamic #redirecting_factory = self::CImpl::• in let self::C::•::T #typeArg0 = null in invalid-expression;
 }
 class CImpl<T extends core::Object = dynamic> extends core::Object implements self::C<self::CImpl::T> {
-  field self::CImpl::T t;
+  generic-covariant-impl field self::CImpl::T t;
   constructor _(self::CImpl::T t) → self::CImpl<self::CImpl::T>
     ;
   static factory •<T extends core::Object = dynamic>(self::CImpl::•::T t) → self::CImpl<self::CImpl::•::T>
diff --git a/pkg/front_end/testcases/inference/constructors_inference_f_bounded.dart.legacy.expect b/pkg/front_end/testcases/inference/constructors_inference_f_bounded.dart.legacy.expect
index c5caad7..e3c5f4a 100644
--- a/pkg/front_end/testcases/inference/constructors_inference_f_bounded.dart.legacy.expect
+++ b/pkg/front_end/testcases/inference/constructors_inference_f_bounded.dart.legacy.expect
@@ -8,8 +8,8 @@
     ;
 }
 class Pair<T extends self::Clonable<self::Pair::T> = dynamic, U extends self::Clonable<self::Pair::U> = dynamic> extends core::Object {
-  field self::Pair::T t;
-  field self::Pair::U u;
+  generic-covariant-impl field self::Pair::T t;
+  generic-covariant-impl field self::Pair::U u;
   constructor •(self::Pair::T t, self::Pair::U u) → self::Pair<self::Pair::T, self::Pair::U>
     : self::Pair::t = t, self::Pair::u = u, super core::Object::•()
     ;
diff --git a/pkg/front_end/testcases/inference/constructors_inference_f_bounded.dart.legacy.transformed.expect b/pkg/front_end/testcases/inference/constructors_inference_f_bounded.dart.legacy.transformed.expect
index c5caad7..e3c5f4a 100644
--- a/pkg/front_end/testcases/inference/constructors_inference_f_bounded.dart.legacy.transformed.expect
+++ b/pkg/front_end/testcases/inference/constructors_inference_f_bounded.dart.legacy.transformed.expect
@@ -8,8 +8,8 @@
     ;
 }
 class Pair<T extends self::Clonable<self::Pair::T> = dynamic, U extends self::Clonable<self::Pair::U> = dynamic> extends core::Object {
-  field self::Pair::T t;
-  field self::Pair::U u;
+  generic-covariant-impl field self::Pair::T t;
+  generic-covariant-impl field self::Pair::U u;
   constructor •(self::Pair::T t, self::Pair::U u) → self::Pair<self::Pair::T, self::Pair::U>
     : self::Pair::t = t, self::Pair::u = u, super core::Object::•()
     ;
diff --git a/pkg/front_end/testcases/inference/constructors_inference_f_bounded.dart.outline.expect b/pkg/front_end/testcases/inference/constructors_inference_f_bounded.dart.outline.expect
index 006b8a2..8337c9e 100644
--- a/pkg/front_end/testcases/inference/constructors_inference_f_bounded.dart.outline.expect
+++ b/pkg/front_end/testcases/inference/constructors_inference_f_bounded.dart.outline.expect
@@ -7,8 +7,8 @@
     ;
 }
 class Pair<T extends self::Clonable<self::Pair::T> = dynamic, U extends self::Clonable<self::Pair::U> = dynamic> extends core::Object {
-  field self::Pair::T t;
-  field self::Pair::U u;
+  generic-covariant-impl field self::Pair::T t;
+  generic-covariant-impl field self::Pair::U u;
   constructor •(self::Pair::T t, self::Pair::U u) → self::Pair<self::Pair::T, self::Pair::U>
     ;
   constructor _() → self::Pair<self::Pair::T, self::Pair::U>
diff --git a/pkg/front_end/testcases/inference/constructors_reverse_type_parameters.dart.legacy.expect b/pkg/front_end/testcases/inference/constructors_reverse_type_parameters.dart.legacy.expect
index 65cb4b4..0a86feb 100644
--- a/pkg/front_end/testcases/inference/constructors_reverse_type_parameters.dart.legacy.expect
+++ b/pkg/front_end/testcases/inference/constructors_reverse_type_parameters.dart.legacy.expect
@@ -3,8 +3,8 @@
 import "dart:core" as core;
 
 class Pair<T extends core::Object = dynamic, U extends core::Object = dynamic> extends core::Object {
-  field self::Pair::T t;
-  field self::Pair::U u;
+  generic-covariant-impl field self::Pair::T t;
+  generic-covariant-impl field self::Pair::U u;
   constructor •(self::Pair::T t, self::Pair::U u) → self::Pair<self::Pair::T, self::Pair::U>
     : self::Pair::t = t, self::Pair::u = u, super core::Object::•()
     ;
diff --git a/pkg/front_end/testcases/inference/constructors_reverse_type_parameters.dart.legacy.transformed.expect b/pkg/front_end/testcases/inference/constructors_reverse_type_parameters.dart.legacy.transformed.expect
index 65cb4b4..0a86feb 100644
--- a/pkg/front_end/testcases/inference/constructors_reverse_type_parameters.dart.legacy.transformed.expect
+++ b/pkg/front_end/testcases/inference/constructors_reverse_type_parameters.dart.legacy.transformed.expect
@@ -3,8 +3,8 @@
 import "dart:core" as core;
 
 class Pair<T extends core::Object = dynamic, U extends core::Object = dynamic> extends core::Object {
-  field self::Pair::T t;
-  field self::Pair::U u;
+  generic-covariant-impl field self::Pair::T t;
+  generic-covariant-impl field self::Pair::U u;
   constructor •(self::Pair::T t, self::Pair::U u) → self::Pair<self::Pair::T, self::Pair::U>
     : self::Pair::t = t, self::Pair::u = u, super core::Object::•()
     ;
diff --git a/pkg/front_end/testcases/inference/dont_infer_field_type_when_initializer_is_null.dart b/pkg/front_end/testcases/inference/dont_infer_field_type_when_initializer_is_null.dart
index ee8b2d1..3eacb18 100644
--- a/pkg/front_end/testcases/inference/dont_infer_field_type_when_initializer_is_null.dart
+++ b/pkg/front_end/testcases/inference/dont_infer_field_type_when_initializer_is_null.dart
@@ -5,15 +5,15 @@
 /*@testedFeatures=inference*/
 library test;
 
-var /*@topType=dynamic*/ x = null;
-var /*@topType=int*/ y = 3;
+var x = null;
+var y = 3;
 
 class A {
-  static var /*@topType=dynamic*/ x = null;
-  static var /*@topType=int*/ y = 3;
+  static var x = null;
+  static var y = 3;
 
-  var /*@topType=dynamic*/ x2 = null;
-  var /*@topType=int*/ y2 = 3;
+  var x2 = null;
+  var y2 = 3;
 }
 
 main() {
diff --git a/pkg/front_end/testcases/inference/downwards_context_from_inferred_field_type.dart b/pkg/front_end/testcases/inference/downwards_context_from_inferred_field_type.dart
index 3d735e5..a2a520c 100644
--- a/pkg/front_end/testcases/inference/downwards_context_from_inferred_field_type.dart
+++ b/pkg/front_end/testcases/inference/downwards_context_from_inferred_field_type.dart
@@ -10,7 +10,7 @@
 }
 
 class B implements A {
-  final /*@topType=Iterable<String>*/ foo = /*@typeArgs=String*/ const [];
+  final foo = /*@typeArgs=String*/ const [];
 }
 
 void main() {}
diff --git a/pkg/front_end/testcases/inference/downwards_inference_annotations_class_members.dart b/pkg/front_end/testcases/inference/downwards_inference_annotations_class_members.dart
index 37db38e..239edeb 100644
--- a/pkg/front_end/testcases/inference/downwards_inference_annotations_class_members.dart
+++ b/pkg/front_end/testcases/inference/downwards_inference_annotations_class_members.dart
@@ -14,7 +14,7 @@
   Bar();
 
   @Foo(/*@typeArgs=String*/ const [])
-  var /*@topType=dynamic*/ x;
+  var x;
 
   @Foo(/*@typeArgs=String*/ const [])
   void f();
diff --git a/pkg/front_end/testcases/inference/downwards_inference_annotations_parameter.dart b/pkg/front_end/testcases/inference/downwards_inference_annotations_parameter.dart
index e4a9dea..7b0ab28 100644
--- a/pkg/front_end/testcases/inference/downwards_inference_annotations_parameter.dart
+++ b/pkg/front_end/testcases/inference/downwards_inference_annotations_parameter.dart
@@ -12,7 +12,7 @@
 void f(@Foo(/*@typeArgs=String*/ const []) x) {}
 
 class C {
-  void m(@Foo(/*@typeArgs=String*/ const []) /*@topType=dynamic*/ x) {}
+  void m(@Foo(/*@typeArgs=String*/ const []) x) {}
 }
 
 main() {}
diff --git a/pkg/front_end/testcases/inference/downwards_inference_inside_top_level.dart b/pkg/front_end/testcases/inference/downwards_inference_inside_top_level.dart
index a3abe27..c50d687 100644
--- a/pkg/front_end/testcases/inference/downwards_inference_inside_top_level.dart
+++ b/pkg/front_end/testcases/inference/downwards_inference_inside_top_level.dart
@@ -13,8 +13,7 @@
   B(T x);
 }
 
-var /*@topType=A*/ t1 = new A()
-  .. /*@target=A::b*/ b = new /*@typeArgs=int*/ B(1);
-var /*@topType=List<B<int>>*/ t2 = <B<int>>[new /*@typeArgs=int*/ B(2)];
+var t1 = new A().. /*@target=A::b*/ b = new /*@typeArgs=int*/ B(1);
+var t2 = <B<int>>[new /*@typeArgs=int*/ B(2)];
 
 main() {}
diff --git a/pkg/front_end/testcases/inference/downwards_inference_inside_top_level_2.dart b/pkg/front_end/testcases/inference/downwards_inference_inside_top_level_2.dart
index 6d4662c..aec027f 100644
--- a/pkg/front_end/testcases/inference/downwards_inference_inside_top_level_2.dart
+++ b/pkg/front_end/testcases/inference/downwards_inference_inside_top_level_2.dart
@@ -9,6 +9,6 @@
   A(T x);
 }
 
-var /*@topType=List<A<int>>*/ t1 = <A<int>>[new /*@typeArgs=int*/ A(1)];
+var t1 = <A<int>>[new /*@typeArgs=int*/ A(1)];
 
 main() {}
diff --git a/pkg/front_end/testcases/inference/downwards_inference_on_instance_creations_infer_downwards.dart.legacy.expect b/pkg/front_end/testcases/inference/downwards_inference_on_instance_creations_infer_downwards.dart.legacy.expect
index c462d74..c641be2 100644
--- a/pkg/front_end/testcases/inference/downwards_inference_on_instance_creations_infer_downwards.dart.legacy.expect
+++ b/pkg/front_end/testcases/inference/downwards_inference_on_instance_creations_infer_downwards.dart.legacy.expect
@@ -3,8 +3,8 @@
 import "dart:core" as core;
 
 class A<S extends core::Object = dynamic, T extends core::Object = dynamic> extends core::Object {
-  field self::A::S x;
-  field self::A::T y;
+  generic-covariant-impl field self::A::S x;
+  generic-covariant-impl field self::A::T y;
   constructor •(self::A::S x, self::A::T y) → self::A<self::A::S, self::A::T>
     : self::A::x = x, self::A::y = y, super core::Object::•()
     ;
diff --git a/pkg/front_end/testcases/inference/downwards_inference_on_instance_creations_infer_downwards.dart.legacy.transformed.expect b/pkg/front_end/testcases/inference/downwards_inference_on_instance_creations_infer_downwards.dart.legacy.transformed.expect
index c462d74..c641be2 100644
--- a/pkg/front_end/testcases/inference/downwards_inference_on_instance_creations_infer_downwards.dart.legacy.transformed.expect
+++ b/pkg/front_end/testcases/inference/downwards_inference_on_instance_creations_infer_downwards.dart.legacy.transformed.expect
@@ -3,8 +3,8 @@
 import "dart:core" as core;
 
 class A<S extends core::Object = dynamic, T extends core::Object = dynamic> extends core::Object {
-  field self::A::S x;
-  field self::A::T y;
+  generic-covariant-impl field self::A::S x;
+  generic-covariant-impl field self::A::T y;
   constructor •(self::A::S x, self::A::T y) → self::A<self::A::S, self::A::T>
     : self::A::x = x, self::A::y = y, super core::Object::•()
     ;
diff --git a/pkg/front_end/testcases/inference/downwards_inference_on_list_literals_infer_if_value_types_match_context.dart b/pkg/front_end/testcases/inference/downwards_inference_on_list_literals_infer_if_value_types_match_context.dart
index ba11a16..3e0ba76 100644
--- a/pkg/front_end/testcases/inference/downwards_inference_on_list_literals_infer_if_value_types_match_context.dart
+++ b/pkg/front_end/testcases/inference/downwards_inference_on_list_literals_infer_if_value_types_match_context.dart
@@ -21,8 +21,7 @@
   AsserterBuilder<List<Asserter<DartType>>, DartType> assertAOf;
   AsserterBuilder<List<Asserter<DartType>>, DartType> get assertDOf;
 
-  /*@topType=dynamic*/ method(
-      AsserterBuilder<List<Asserter<DartType>>, DartType> assertEOf) {
+  method(AsserterBuilder<List<Asserter<DartType>>, DartType> assertEOf) {
     /*@target=C::assertAOf*/ assertAOf(
         /*@typeArgs=(DartType) -> void*/ [_isInt, _isString]);
     assertBOf(
@@ -40,8 +39,7 @@
   AsserterBuilder<List<Asserter<DartType>>, DartType> assertAOf;
   AsserterBuilder<List<Asserter<DartType>>, DartType> get assertDOf;
 
-  /*@topType=dynamic*/ method(
-      AsserterBuilder<List<Asserter<DartType>>, DartType> assertEOf) {
+  method(AsserterBuilder<List<Asserter<DartType>>, DartType> assertEOf) {
     /*@target=G::assertAOf*/ assertAOf(
         /*@typeArgs=(DartType) -> void*/ [_isInt, _isString]);
     this. /*@target=G::assertAOf*/ assertAOf(
diff --git a/pkg/front_end/testcases/inference/field_initializer_context_implicit.dart b/pkg/front_end/testcases/inference/field_initializer_context_implicit.dart
index e2e94bf..328482d 100644
--- a/pkg/front_end/testcases/inference/field_initializer_context_implicit.dart
+++ b/pkg/front_end/testcases/inference/field_initializer_context_implicit.dart
@@ -8,7 +8,7 @@
 T f<T>() => null;
 
 class C implements B {
-  final /*@topType=int*/ x;
+  final x;
   C() : x = /*@typeArgs=int*/ f();
 }
 
diff --git a/pkg/front_end/testcases/inference/field_initializer_parameter.dart b/pkg/front_end/testcases/inference/field_initializer_parameter.dart
index fc2a1fa..f8779f9 100644
--- a/pkg/front_end/testcases/inference/field_initializer_parameter.dart
+++ b/pkg/front_end/testcases/inference/field_initializer_parameter.dart
@@ -8,7 +8,7 @@
 T f<T>(T t) => t;
 
 class C {
-  final /*@topType=dynamic*/ x;
+  final x;
   C(int p) : x = /*@typeArgs=int*/ f(p);
 }
 
diff --git a/pkg/front_end/testcases/inference/field_refers_to_static_getter.dart b/pkg/front_end/testcases/inference/field_refers_to_static_getter.dart
index de4f471..9fa9e35 100644
--- a/pkg/front_end/testcases/inference/field_refers_to_static_getter.dart
+++ b/pkg/front_end/testcases/inference/field_refers_to_static_getter.dart
@@ -6,7 +6,7 @@
 library test;
 
 class C {
-  final /*@topType=int*/ x = _x;
+  final x = _x;
   static int get _x => null;
 }
 
diff --git a/pkg/front_end/testcases/inference/field_refers_to_top_level_getter.dart b/pkg/front_end/testcases/inference/field_refers_to_top_level_getter.dart
index 5bcd783..1a2e6a6 100644
--- a/pkg/front_end/testcases/inference/field_refers_to_top_level_getter.dart
+++ b/pkg/front_end/testcases/inference/field_refers_to_top_level_getter.dart
@@ -6,7 +6,7 @@
 library test;
 
 class C {
-  final /*@topType=int*/ x = y;
+  final x = y;
 }
 
 int get y => null;
diff --git a/pkg/front_end/testcases/inference/future_then.dart b/pkg/front_end/testcases/inference/future_then.dart
index 75782a4..ec52859 100644
--- a/pkg/front_end/testcases/inference/future_then.dart
+++ b/pkg/front_end/testcases/inference/future_then.dart
@@ -10,7 +10,7 @@
 class MyFuture<T> implements Future<T> {
   MyFuture() {}
   MyFuture.value(T x) {}
-  dynamic noSuchMethod(/*@topType=Invocation*/ invocation) => null;
+  dynamic noSuchMethod(invocation) => null;
   MyFuture<S> then<S>(FutureOr<S> f(T x), {Function onError}) => null;
 }
 
diff --git a/pkg/front_end/testcases/inference/future_then.dart.legacy.expect b/pkg/front_end/testcases/inference/future_then.dart.legacy.expect
index 1d88ee8..88b6639 100644
--- a/pkg/front_end/testcases/inference/future_then.dart.legacy.expect
+++ b/pkg/front_end/testcases/inference/future_then.dart.legacy.expect
@@ -18,7 +18,7 @@
     return this.{self::MyFuture::noSuchMethod}(new core::_InvocationMirror::_withType(#catchError, 0, const <core::Type>[], core::List::unmodifiable<dynamic>(<dynamic>[onError]), core::Map::unmodifiable<core::Symbol, dynamic>(<core::Symbol, dynamic>{#test: test}))) as{TypeError} asy::Future<self::MyFuture::T>;
   no-such-method-forwarder method /* from org-dartlang-sdk:///sdk/lib/async/future.dart */ whenComplete(() → asy::FutureOr<dynamic> action) → asy::Future<self::MyFuture::T>
     return this.{self::MyFuture::noSuchMethod}(new core::_InvocationMirror::_withType(#whenComplete, 0, const <core::Type>[], core::List::unmodifiable<dynamic>(<dynamic>[action]), core::Map::unmodifiable<core::Symbol, dynamic>(const <core::Symbol, dynamic>{}))) as{TypeError} asy::Future<self::MyFuture::T>;
-  no-such-method-forwarder method /* from org-dartlang-sdk:///sdk/lib/async/future.dart */ timeout(core::Duration timeLimit, {() → asy::FutureOr<self::MyFuture::T> onTimeout = null}) → asy::Future<self::MyFuture::T>
+  no-such-method-forwarder method /* from org-dartlang-sdk:///sdk/lib/async/future.dart */ timeout(core::Duration timeLimit, {generic-covariant-impl () → asy::FutureOr<self::MyFuture::T> onTimeout = null}) → asy::Future<self::MyFuture::T>
     return this.{self::MyFuture::noSuchMethod}(new core::_InvocationMirror::_withType(#timeout, 0, const <core::Type>[], core::List::unmodifiable<dynamic>(<dynamic>[timeLimit]), core::Map::unmodifiable<core::Symbol, dynamic>(<core::Symbol, dynamic>{#onTimeout: onTimeout}))) as{TypeError} asy::Future<self::MyFuture::T>;
   no-such-method-forwarder method /* from org-dartlang-sdk:///sdk/lib/async/future.dart */ asStream() → asy::Stream<self::MyFuture::T>
     return this.{self::MyFuture::noSuchMethod}(new core::_InvocationMirror::_withType(#asStream, 0, const <core::Type>[], const <dynamic>[], core::Map::unmodifiable<core::Symbol, dynamic>(const <core::Symbol, dynamic>{}))) as{TypeError} asy::Stream<self::MyFuture::T>;
diff --git a/pkg/front_end/testcases/inference/future_then.dart.legacy.transformed.expect b/pkg/front_end/testcases/inference/future_then.dart.legacy.transformed.expect
index 4f27ec5..4f440e2 100644
--- a/pkg/front_end/testcases/inference/future_then.dart.legacy.transformed.expect
+++ b/pkg/front_end/testcases/inference/future_then.dart.legacy.transformed.expect
@@ -18,7 +18,7 @@
     return this.{self::MyFuture::noSuchMethod}(new core::_InvocationMirror::_withType(#catchError, 0, const <core::Type>[], core::List::unmodifiable<dynamic>(<dynamic>[onError]), core::Map::unmodifiable<core::Symbol, dynamic>(<core::Symbol, dynamic>{#test: test}))) as{TypeError} asy::Future<self::MyFuture::T>;
   no-such-method-forwarder method /* from org-dartlang-sdk:///sdk/lib/async/future.dart */ whenComplete(() → asy::FutureOr<dynamic> action) → asy::Future<self::MyFuture::T>
     return this.{self::MyFuture::noSuchMethod}(new core::_InvocationMirror::_withType(#whenComplete, 0, const <core::Type>[], core::List::unmodifiable<dynamic>(<dynamic>[action]), core::Map::unmodifiable<core::Symbol, dynamic>(const <core::Symbol, dynamic>{}))) as{TypeError} asy::Future<self::MyFuture::T>;
-  no-such-method-forwarder method /* from org-dartlang-sdk:///sdk/lib/async/future.dart */ timeout(core::Duration timeLimit, {() → asy::FutureOr<self::MyFuture::T> onTimeout = null}) → asy::Future<self::MyFuture::T>
+  no-such-method-forwarder method /* from org-dartlang-sdk:///sdk/lib/async/future.dart */ timeout(core::Duration timeLimit, {generic-covariant-impl () → asy::FutureOr<self::MyFuture::T> onTimeout = null}) → asy::Future<self::MyFuture::T>
     return this.{self::MyFuture::noSuchMethod}(new core::_InvocationMirror::_withType(#timeout, 0, const <core::Type>[], core::List::unmodifiable<dynamic>(<dynamic>[timeLimit]), core::Map::unmodifiable<core::Symbol, dynamic>(<core::Symbol, dynamic>{#onTimeout: onTimeout}))) as{TypeError} asy::Future<self::MyFuture::T>;
   no-such-method-forwarder method /* from org-dartlang-sdk:///sdk/lib/async/future.dart */ asStream() → asy::Stream<self::MyFuture::T>
     return this.{self::MyFuture::noSuchMethod}(new core::_InvocationMirror::_withType(#asStream, 0, const <core::Type>[], const <dynamic>[], core::Map::unmodifiable<core::Symbol, dynamic>(const <core::Symbol, dynamic>{}))) as{TypeError} asy::Stream<self::MyFuture::T>;
diff --git a/pkg/front_end/testcases/inference/future_then.dart.outline.expect b/pkg/front_end/testcases/inference/future_then.dart.outline.expect
index 5e26f10..18f6651 100644
--- a/pkg/front_end/testcases/inference/future_then.dart.outline.expect
+++ b/pkg/front_end/testcases/inference/future_then.dart.outline.expect
@@ -18,7 +18,7 @@
     return this.{self::MyFuture::noSuchMethod}(new core::_InvocationMirror::_withType(#catchError, 0, const <core::Type>[], core::List::unmodifiable<dynamic>(<dynamic>[onError]), core::Map::unmodifiable<core::Symbol, dynamic>(<core::Symbol, dynamic>{#test: test}))) as{TypeError} asy::Future<self::MyFuture::T>;
   no-such-method-forwarder method /* from org-dartlang-sdk:///sdk/lib/async/future.dart */ whenComplete(() → asy::FutureOr<dynamic> action) → asy::Future<self::MyFuture::T>
     return this.{self::MyFuture::noSuchMethod}(new core::_InvocationMirror::_withType(#whenComplete, 0, const <core::Type>[], core::List::unmodifiable<dynamic>(<dynamic>[action]), core::Map::unmodifiable<core::Symbol, dynamic>(const <core::Symbol, dynamic>{}))) as{TypeError} asy::Future<self::MyFuture::T>;
-  no-such-method-forwarder method /* from org-dartlang-sdk:///sdk/lib/async/future.dart */ timeout(core::Duration timeLimit, {() → asy::FutureOr<self::MyFuture::T> onTimeout = null}) → asy::Future<self::MyFuture::T>
+  no-such-method-forwarder method /* from org-dartlang-sdk:///sdk/lib/async/future.dart */ timeout(core::Duration timeLimit, {generic-covariant-impl () → asy::FutureOr<self::MyFuture::T> onTimeout = null}) → asy::Future<self::MyFuture::T>
     return this.{self::MyFuture::noSuchMethod}(new core::_InvocationMirror::_withType(#timeout, 0, const <core::Type>[], core::List::unmodifiable<dynamic>(<dynamic>[timeLimit]), core::Map::unmodifiable<core::Symbol, dynamic>(<core::Symbol, dynamic>{#onTimeout: onTimeout}))) as{TypeError} asy::Future<self::MyFuture::T>;
   no-such-method-forwarder method /* from org-dartlang-sdk:///sdk/lib/async/future.dart */ asStream() → asy::Stream<self::MyFuture::T>
     return this.{self::MyFuture::noSuchMethod}(new core::_InvocationMirror::_withType(#asStream, 0, const <core::Type>[], const <dynamic>[], core::Map::unmodifiable<core::Symbol, dynamic>(const <core::Symbol, dynamic>{}))) as{TypeError} asy::Stream<self::MyFuture::T>;
diff --git a/pkg/front_end/testcases/inference/future_then_2.dart b/pkg/front_end/testcases/inference/future_then_2.dart
index f5f9def..7dd9d8f 100644
--- a/pkg/front_end/testcases/inference/future_then_2.dart
+++ b/pkg/front_end/testcases/inference/future_then_2.dart
@@ -10,7 +10,7 @@
 class MyFuture<T> implements Future<T> {
   MyFuture() {}
   MyFuture.value(T x) {}
-  dynamic noSuchMethod(/*@topType=Invocation*/ invocation) => null;
+  dynamic noSuchMethod(invocation) => null;
   MyFuture<S> then<S>(FutureOr<S> f(T x), {Function onError}) => null;
 }
 
diff --git a/pkg/front_end/testcases/inference/future_then_2.dart.legacy.expect b/pkg/front_end/testcases/inference/future_then_2.dart.legacy.expect
index 67aa4fb..a91d75e 100644
--- a/pkg/front_end/testcases/inference/future_then_2.dart.legacy.expect
+++ b/pkg/front_end/testcases/inference/future_then_2.dart.legacy.expect
@@ -18,7 +18,7 @@
     return this.{self::MyFuture::noSuchMethod}(new core::_InvocationMirror::_withType(#catchError, 0, const <core::Type>[], core::List::unmodifiable<dynamic>(<dynamic>[onError]), core::Map::unmodifiable<core::Symbol, dynamic>(<core::Symbol, dynamic>{#test: test}))) as{TypeError} asy::Future<self::MyFuture::T>;
   no-such-method-forwarder method /* from org-dartlang-sdk:///sdk/lib/async/future.dart */ whenComplete(() → asy::FutureOr<dynamic> action) → asy::Future<self::MyFuture::T>
     return this.{self::MyFuture::noSuchMethod}(new core::_InvocationMirror::_withType(#whenComplete, 0, const <core::Type>[], core::List::unmodifiable<dynamic>(<dynamic>[action]), core::Map::unmodifiable<core::Symbol, dynamic>(const <core::Symbol, dynamic>{}))) as{TypeError} asy::Future<self::MyFuture::T>;
-  no-such-method-forwarder method /* from org-dartlang-sdk:///sdk/lib/async/future.dart */ timeout(core::Duration timeLimit, {() → asy::FutureOr<self::MyFuture::T> onTimeout = null}) → asy::Future<self::MyFuture::T>
+  no-such-method-forwarder method /* from org-dartlang-sdk:///sdk/lib/async/future.dart */ timeout(core::Duration timeLimit, {generic-covariant-impl () → asy::FutureOr<self::MyFuture::T> onTimeout = null}) → asy::Future<self::MyFuture::T>
     return this.{self::MyFuture::noSuchMethod}(new core::_InvocationMirror::_withType(#timeout, 0, const <core::Type>[], core::List::unmodifiable<dynamic>(<dynamic>[timeLimit]), core::Map::unmodifiable<core::Symbol, dynamic>(<core::Symbol, dynamic>{#onTimeout: onTimeout}))) as{TypeError} asy::Future<self::MyFuture::T>;
   no-such-method-forwarder method /* from org-dartlang-sdk:///sdk/lib/async/future.dart */ asStream() → asy::Stream<self::MyFuture::T>
     return this.{self::MyFuture::noSuchMethod}(new core::_InvocationMirror::_withType(#asStream, 0, const <core::Type>[], const <dynamic>[], core::Map::unmodifiable<core::Symbol, dynamic>(const <core::Symbol, dynamic>{}))) as{TypeError} asy::Stream<self::MyFuture::T>;
diff --git a/pkg/front_end/testcases/inference/future_then_2.dart.legacy.transformed.expect b/pkg/front_end/testcases/inference/future_then_2.dart.legacy.transformed.expect
index a9f33b6..6538f9e 100644
--- a/pkg/front_end/testcases/inference/future_then_2.dart.legacy.transformed.expect
+++ b/pkg/front_end/testcases/inference/future_then_2.dart.legacy.transformed.expect
@@ -18,7 +18,7 @@
     return this.{self::MyFuture::noSuchMethod}(new core::_InvocationMirror::_withType(#catchError, 0, const <core::Type>[], core::List::unmodifiable<dynamic>(<dynamic>[onError]), core::Map::unmodifiable<core::Symbol, dynamic>(<core::Symbol, dynamic>{#test: test}))) as{TypeError} asy::Future<self::MyFuture::T>;
   no-such-method-forwarder method /* from org-dartlang-sdk:///sdk/lib/async/future.dart */ whenComplete(() → asy::FutureOr<dynamic> action) → asy::Future<self::MyFuture::T>
     return this.{self::MyFuture::noSuchMethod}(new core::_InvocationMirror::_withType(#whenComplete, 0, const <core::Type>[], core::List::unmodifiable<dynamic>(<dynamic>[action]), core::Map::unmodifiable<core::Symbol, dynamic>(const <core::Symbol, dynamic>{}))) as{TypeError} asy::Future<self::MyFuture::T>;
-  no-such-method-forwarder method /* from org-dartlang-sdk:///sdk/lib/async/future.dart */ timeout(core::Duration timeLimit, {() → asy::FutureOr<self::MyFuture::T> onTimeout = null}) → asy::Future<self::MyFuture::T>
+  no-such-method-forwarder method /* from org-dartlang-sdk:///sdk/lib/async/future.dart */ timeout(core::Duration timeLimit, {generic-covariant-impl () → asy::FutureOr<self::MyFuture::T> onTimeout = null}) → asy::Future<self::MyFuture::T>
     return this.{self::MyFuture::noSuchMethod}(new core::_InvocationMirror::_withType(#timeout, 0, const <core::Type>[], core::List::unmodifiable<dynamic>(<dynamic>[timeLimit]), core::Map::unmodifiable<core::Symbol, dynamic>(<core::Symbol, dynamic>{#onTimeout: onTimeout}))) as{TypeError} asy::Future<self::MyFuture::T>;
   no-such-method-forwarder method /* from org-dartlang-sdk:///sdk/lib/async/future.dart */ asStream() → asy::Stream<self::MyFuture::T>
     return this.{self::MyFuture::noSuchMethod}(new core::_InvocationMirror::_withType(#asStream, 0, const <core::Type>[], const <dynamic>[], core::Map::unmodifiable<core::Symbol, dynamic>(const <core::Symbol, dynamic>{}))) as{TypeError} asy::Stream<self::MyFuture::T>;
diff --git a/pkg/front_end/testcases/inference/future_then_2.dart.outline.expect b/pkg/front_end/testcases/inference/future_then_2.dart.outline.expect
index 5e26f10..18f6651 100644
--- a/pkg/front_end/testcases/inference/future_then_2.dart.outline.expect
+++ b/pkg/front_end/testcases/inference/future_then_2.dart.outline.expect
@@ -18,7 +18,7 @@
     return this.{self::MyFuture::noSuchMethod}(new core::_InvocationMirror::_withType(#catchError, 0, const <core::Type>[], core::List::unmodifiable<dynamic>(<dynamic>[onError]), core::Map::unmodifiable<core::Symbol, dynamic>(<core::Symbol, dynamic>{#test: test}))) as{TypeError} asy::Future<self::MyFuture::T>;
   no-such-method-forwarder method /* from org-dartlang-sdk:///sdk/lib/async/future.dart */ whenComplete(() → asy::FutureOr<dynamic> action) → asy::Future<self::MyFuture::T>
     return this.{self::MyFuture::noSuchMethod}(new core::_InvocationMirror::_withType(#whenComplete, 0, const <core::Type>[], core::List::unmodifiable<dynamic>(<dynamic>[action]), core::Map::unmodifiable<core::Symbol, dynamic>(const <core::Symbol, dynamic>{}))) as{TypeError} asy::Future<self::MyFuture::T>;
-  no-such-method-forwarder method /* from org-dartlang-sdk:///sdk/lib/async/future.dart */ timeout(core::Duration timeLimit, {() → asy::FutureOr<self::MyFuture::T> onTimeout = null}) → asy::Future<self::MyFuture::T>
+  no-such-method-forwarder method /* from org-dartlang-sdk:///sdk/lib/async/future.dart */ timeout(core::Duration timeLimit, {generic-covariant-impl () → asy::FutureOr<self::MyFuture::T> onTimeout = null}) → asy::Future<self::MyFuture::T>
     return this.{self::MyFuture::noSuchMethod}(new core::_InvocationMirror::_withType(#timeout, 0, const <core::Type>[], core::List::unmodifiable<dynamic>(<dynamic>[timeLimit]), core::Map::unmodifiable<core::Symbol, dynamic>(<core::Symbol, dynamic>{#onTimeout: onTimeout}))) as{TypeError} asy::Future<self::MyFuture::T>;
   no-such-method-forwarder method /* from org-dartlang-sdk:///sdk/lib/async/future.dart */ asStream() → asy::Stream<self::MyFuture::T>
     return this.{self::MyFuture::noSuchMethod}(new core::_InvocationMirror::_withType(#asStream, 0, const <core::Type>[], const <dynamic>[], core::Map::unmodifiable<core::Symbol, dynamic>(const <core::Symbol, dynamic>{}))) as{TypeError} asy::Stream<self::MyFuture::T>;
diff --git a/pkg/front_end/testcases/inference/future_then_3.dart b/pkg/front_end/testcases/inference/future_then_3.dart
index 1b4bfac..59ef995 100644
--- a/pkg/front_end/testcases/inference/future_then_3.dart
+++ b/pkg/front_end/testcases/inference/future_then_3.dart
@@ -10,7 +10,7 @@
 class MyFuture<T> implements Future<T> {
   MyFuture() {}
   MyFuture.value(T x) {}
-  dynamic noSuchMethod(/*@topType=Invocation*/ invocation) => null;
+  dynamic noSuchMethod(invocation) => null;
   MyFuture<S> then<S>(FutureOr<S> f(T x), {Function onError}) => null;
 }
 
diff --git a/pkg/front_end/testcases/inference/future_then_3.dart.legacy.expect b/pkg/front_end/testcases/inference/future_then_3.dart.legacy.expect
index 0f44112..2a3484c 100644
--- a/pkg/front_end/testcases/inference/future_then_3.dart.legacy.expect
+++ b/pkg/front_end/testcases/inference/future_then_3.dart.legacy.expect
@@ -18,7 +18,7 @@
     return this.{self::MyFuture::noSuchMethod}(new core::_InvocationMirror::_withType(#catchError, 0, const <core::Type>[], core::List::unmodifiable<dynamic>(<dynamic>[onError]), core::Map::unmodifiable<core::Symbol, dynamic>(<core::Symbol, dynamic>{#test: test}))) as{TypeError} asy::Future<self::MyFuture::T>;
   no-such-method-forwarder method /* from org-dartlang-sdk:///sdk/lib/async/future.dart */ whenComplete(() → asy::FutureOr<dynamic> action) → asy::Future<self::MyFuture::T>
     return this.{self::MyFuture::noSuchMethod}(new core::_InvocationMirror::_withType(#whenComplete, 0, const <core::Type>[], core::List::unmodifiable<dynamic>(<dynamic>[action]), core::Map::unmodifiable<core::Symbol, dynamic>(const <core::Symbol, dynamic>{}))) as{TypeError} asy::Future<self::MyFuture::T>;
-  no-such-method-forwarder method /* from org-dartlang-sdk:///sdk/lib/async/future.dart */ timeout(core::Duration timeLimit, {() → asy::FutureOr<self::MyFuture::T> onTimeout = null}) → asy::Future<self::MyFuture::T>
+  no-such-method-forwarder method /* from org-dartlang-sdk:///sdk/lib/async/future.dart */ timeout(core::Duration timeLimit, {generic-covariant-impl () → asy::FutureOr<self::MyFuture::T> onTimeout = null}) → asy::Future<self::MyFuture::T>
     return this.{self::MyFuture::noSuchMethod}(new core::_InvocationMirror::_withType(#timeout, 0, const <core::Type>[], core::List::unmodifiable<dynamic>(<dynamic>[timeLimit]), core::Map::unmodifiable<core::Symbol, dynamic>(<core::Symbol, dynamic>{#onTimeout: onTimeout}))) as{TypeError} asy::Future<self::MyFuture::T>;
   no-such-method-forwarder method /* from org-dartlang-sdk:///sdk/lib/async/future.dart */ asStream() → asy::Stream<self::MyFuture::T>
     return this.{self::MyFuture::noSuchMethod}(new core::_InvocationMirror::_withType(#asStream, 0, const <core::Type>[], const <dynamic>[], core::Map::unmodifiable<core::Symbol, dynamic>(const <core::Symbol, dynamic>{}))) as{TypeError} asy::Stream<self::MyFuture::T>;
diff --git a/pkg/front_end/testcases/inference/future_then_3.dart.legacy.transformed.expect b/pkg/front_end/testcases/inference/future_then_3.dart.legacy.transformed.expect
index 8bca318..346e77b8 100644
--- a/pkg/front_end/testcases/inference/future_then_3.dart.legacy.transformed.expect
+++ b/pkg/front_end/testcases/inference/future_then_3.dart.legacy.transformed.expect
@@ -18,7 +18,7 @@
     return this.{self::MyFuture::noSuchMethod}(new core::_InvocationMirror::_withType(#catchError, 0, const <core::Type>[], core::List::unmodifiable<dynamic>(<dynamic>[onError]), core::Map::unmodifiable<core::Symbol, dynamic>(<core::Symbol, dynamic>{#test: test}))) as{TypeError} asy::Future<self::MyFuture::T>;
   no-such-method-forwarder method /* from org-dartlang-sdk:///sdk/lib/async/future.dart */ whenComplete(() → asy::FutureOr<dynamic> action) → asy::Future<self::MyFuture::T>
     return this.{self::MyFuture::noSuchMethod}(new core::_InvocationMirror::_withType(#whenComplete, 0, const <core::Type>[], core::List::unmodifiable<dynamic>(<dynamic>[action]), core::Map::unmodifiable<core::Symbol, dynamic>(const <core::Symbol, dynamic>{}))) as{TypeError} asy::Future<self::MyFuture::T>;
-  no-such-method-forwarder method /* from org-dartlang-sdk:///sdk/lib/async/future.dart */ timeout(core::Duration timeLimit, {() → asy::FutureOr<self::MyFuture::T> onTimeout = null}) → asy::Future<self::MyFuture::T>
+  no-such-method-forwarder method /* from org-dartlang-sdk:///sdk/lib/async/future.dart */ timeout(core::Duration timeLimit, {generic-covariant-impl () → asy::FutureOr<self::MyFuture::T> onTimeout = null}) → asy::Future<self::MyFuture::T>
     return this.{self::MyFuture::noSuchMethod}(new core::_InvocationMirror::_withType(#timeout, 0, const <core::Type>[], core::List::unmodifiable<dynamic>(<dynamic>[timeLimit]), core::Map::unmodifiable<core::Symbol, dynamic>(<core::Symbol, dynamic>{#onTimeout: onTimeout}))) as{TypeError} asy::Future<self::MyFuture::T>;
   no-such-method-forwarder method /* from org-dartlang-sdk:///sdk/lib/async/future.dart */ asStream() → asy::Stream<self::MyFuture::T>
     return this.{self::MyFuture::noSuchMethod}(new core::_InvocationMirror::_withType(#asStream, 0, const <core::Type>[], const <dynamic>[], core::Map::unmodifiable<core::Symbol, dynamic>(const <core::Symbol, dynamic>{}))) as{TypeError} asy::Stream<self::MyFuture::T>;
diff --git a/pkg/front_end/testcases/inference/future_then_3.dart.outline.expect b/pkg/front_end/testcases/inference/future_then_3.dart.outline.expect
index 5e26f10..18f6651 100644
--- a/pkg/front_end/testcases/inference/future_then_3.dart.outline.expect
+++ b/pkg/front_end/testcases/inference/future_then_3.dart.outline.expect
@@ -18,7 +18,7 @@
     return this.{self::MyFuture::noSuchMethod}(new core::_InvocationMirror::_withType(#catchError, 0, const <core::Type>[], core::List::unmodifiable<dynamic>(<dynamic>[onError]), core::Map::unmodifiable<core::Symbol, dynamic>(<core::Symbol, dynamic>{#test: test}))) as{TypeError} asy::Future<self::MyFuture::T>;
   no-such-method-forwarder method /* from org-dartlang-sdk:///sdk/lib/async/future.dart */ whenComplete(() → asy::FutureOr<dynamic> action) → asy::Future<self::MyFuture::T>
     return this.{self::MyFuture::noSuchMethod}(new core::_InvocationMirror::_withType(#whenComplete, 0, const <core::Type>[], core::List::unmodifiable<dynamic>(<dynamic>[action]), core::Map::unmodifiable<core::Symbol, dynamic>(const <core::Symbol, dynamic>{}))) as{TypeError} asy::Future<self::MyFuture::T>;
-  no-such-method-forwarder method /* from org-dartlang-sdk:///sdk/lib/async/future.dart */ timeout(core::Duration timeLimit, {() → asy::FutureOr<self::MyFuture::T> onTimeout = null}) → asy::Future<self::MyFuture::T>
+  no-such-method-forwarder method /* from org-dartlang-sdk:///sdk/lib/async/future.dart */ timeout(core::Duration timeLimit, {generic-covariant-impl () → asy::FutureOr<self::MyFuture::T> onTimeout = null}) → asy::Future<self::MyFuture::T>
     return this.{self::MyFuture::noSuchMethod}(new core::_InvocationMirror::_withType(#timeout, 0, const <core::Type>[], core::List::unmodifiable<dynamic>(<dynamic>[timeLimit]), core::Map::unmodifiable<core::Symbol, dynamic>(<core::Symbol, dynamic>{#onTimeout: onTimeout}))) as{TypeError} asy::Future<self::MyFuture::T>;
   no-such-method-forwarder method /* from org-dartlang-sdk:///sdk/lib/async/future.dart */ asStream() → asy::Stream<self::MyFuture::T>
     return this.{self::MyFuture::noSuchMethod}(new core::_InvocationMirror::_withType(#asStream, 0, const <core::Type>[], const <dynamic>[], core::Map::unmodifiable<core::Symbol, dynamic>(const <core::Symbol, dynamic>{}))) as{TypeError} asy::Stream<self::MyFuture::T>;
diff --git a/pkg/front_end/testcases/inference/future_then_4.dart b/pkg/front_end/testcases/inference/future_then_4.dart
index afc672d..81923b7 100644
--- a/pkg/front_end/testcases/inference/future_then_4.dart
+++ b/pkg/front_end/testcases/inference/future_then_4.dart
@@ -10,7 +10,7 @@
 class MyFuture<T> implements Future<T> {
   MyFuture() {}
   MyFuture.value(T x) {}
-  dynamic noSuchMethod(/*@topType=Invocation*/ invocation) => null;
+  dynamic noSuchMethod(invocation) => null;
   MyFuture<S> then<S>(FutureOr<S> f(T x), {Function onError}) => null;
 }
 
diff --git a/pkg/front_end/testcases/inference/future_then_4.dart.legacy.expect b/pkg/front_end/testcases/inference/future_then_4.dart.legacy.expect
index f659f1f..c7d577e 100644
--- a/pkg/front_end/testcases/inference/future_then_4.dart.legacy.expect
+++ b/pkg/front_end/testcases/inference/future_then_4.dart.legacy.expect
@@ -18,7 +18,7 @@
     return this.{self::MyFuture::noSuchMethod}(new core::_InvocationMirror::_withType(#catchError, 0, const <core::Type>[], core::List::unmodifiable<dynamic>(<dynamic>[onError]), core::Map::unmodifiable<core::Symbol, dynamic>(<core::Symbol, dynamic>{#test: test}))) as{TypeError} asy::Future<self::MyFuture::T>;
   no-such-method-forwarder method /* from org-dartlang-sdk:///sdk/lib/async/future.dart */ whenComplete(() → asy::FutureOr<dynamic> action) → asy::Future<self::MyFuture::T>
     return this.{self::MyFuture::noSuchMethod}(new core::_InvocationMirror::_withType(#whenComplete, 0, const <core::Type>[], core::List::unmodifiable<dynamic>(<dynamic>[action]), core::Map::unmodifiable<core::Symbol, dynamic>(const <core::Symbol, dynamic>{}))) as{TypeError} asy::Future<self::MyFuture::T>;
-  no-such-method-forwarder method /* from org-dartlang-sdk:///sdk/lib/async/future.dart */ timeout(core::Duration timeLimit, {() → asy::FutureOr<self::MyFuture::T> onTimeout = null}) → asy::Future<self::MyFuture::T>
+  no-such-method-forwarder method /* from org-dartlang-sdk:///sdk/lib/async/future.dart */ timeout(core::Duration timeLimit, {generic-covariant-impl () → asy::FutureOr<self::MyFuture::T> onTimeout = null}) → asy::Future<self::MyFuture::T>
     return this.{self::MyFuture::noSuchMethod}(new core::_InvocationMirror::_withType(#timeout, 0, const <core::Type>[], core::List::unmodifiable<dynamic>(<dynamic>[timeLimit]), core::Map::unmodifiable<core::Symbol, dynamic>(<core::Symbol, dynamic>{#onTimeout: onTimeout}))) as{TypeError} asy::Future<self::MyFuture::T>;
   no-such-method-forwarder method /* from org-dartlang-sdk:///sdk/lib/async/future.dart */ asStream() → asy::Stream<self::MyFuture::T>
     return this.{self::MyFuture::noSuchMethod}(new core::_InvocationMirror::_withType(#asStream, 0, const <core::Type>[], const <dynamic>[], core::Map::unmodifiable<core::Symbol, dynamic>(const <core::Symbol, dynamic>{}))) as{TypeError} asy::Stream<self::MyFuture::T>;
diff --git a/pkg/front_end/testcases/inference/future_then_4.dart.legacy.transformed.expect b/pkg/front_end/testcases/inference/future_then_4.dart.legacy.transformed.expect
index 56334ca..c90b143 100644
--- a/pkg/front_end/testcases/inference/future_then_4.dart.legacy.transformed.expect
+++ b/pkg/front_end/testcases/inference/future_then_4.dart.legacy.transformed.expect
@@ -18,7 +18,7 @@
     return this.{self::MyFuture::noSuchMethod}(new core::_InvocationMirror::_withType(#catchError, 0, const <core::Type>[], core::List::unmodifiable<dynamic>(<dynamic>[onError]), core::Map::unmodifiable<core::Symbol, dynamic>(<core::Symbol, dynamic>{#test: test}))) as{TypeError} asy::Future<self::MyFuture::T>;
   no-such-method-forwarder method /* from org-dartlang-sdk:///sdk/lib/async/future.dart */ whenComplete(() → asy::FutureOr<dynamic> action) → asy::Future<self::MyFuture::T>
     return this.{self::MyFuture::noSuchMethod}(new core::_InvocationMirror::_withType(#whenComplete, 0, const <core::Type>[], core::List::unmodifiable<dynamic>(<dynamic>[action]), core::Map::unmodifiable<core::Symbol, dynamic>(const <core::Symbol, dynamic>{}))) as{TypeError} asy::Future<self::MyFuture::T>;
-  no-such-method-forwarder method /* from org-dartlang-sdk:///sdk/lib/async/future.dart */ timeout(core::Duration timeLimit, {() → asy::FutureOr<self::MyFuture::T> onTimeout = null}) → asy::Future<self::MyFuture::T>
+  no-such-method-forwarder method /* from org-dartlang-sdk:///sdk/lib/async/future.dart */ timeout(core::Duration timeLimit, {generic-covariant-impl () → asy::FutureOr<self::MyFuture::T> onTimeout = null}) → asy::Future<self::MyFuture::T>
     return this.{self::MyFuture::noSuchMethod}(new core::_InvocationMirror::_withType(#timeout, 0, const <core::Type>[], core::List::unmodifiable<dynamic>(<dynamic>[timeLimit]), core::Map::unmodifiable<core::Symbol, dynamic>(<core::Symbol, dynamic>{#onTimeout: onTimeout}))) as{TypeError} asy::Future<self::MyFuture::T>;
   no-such-method-forwarder method /* from org-dartlang-sdk:///sdk/lib/async/future.dart */ asStream() → asy::Stream<self::MyFuture::T>
     return this.{self::MyFuture::noSuchMethod}(new core::_InvocationMirror::_withType(#asStream, 0, const <core::Type>[], const <dynamic>[], core::Map::unmodifiable<core::Symbol, dynamic>(const <core::Symbol, dynamic>{}))) as{TypeError} asy::Stream<self::MyFuture::T>;
diff --git a/pkg/front_end/testcases/inference/future_then_4.dart.outline.expect b/pkg/front_end/testcases/inference/future_then_4.dart.outline.expect
index 5e26f10..18f6651 100644
--- a/pkg/front_end/testcases/inference/future_then_4.dart.outline.expect
+++ b/pkg/front_end/testcases/inference/future_then_4.dart.outline.expect
@@ -18,7 +18,7 @@
     return this.{self::MyFuture::noSuchMethod}(new core::_InvocationMirror::_withType(#catchError, 0, const <core::Type>[], core::List::unmodifiable<dynamic>(<dynamic>[onError]), core::Map::unmodifiable<core::Symbol, dynamic>(<core::Symbol, dynamic>{#test: test}))) as{TypeError} asy::Future<self::MyFuture::T>;
   no-such-method-forwarder method /* from org-dartlang-sdk:///sdk/lib/async/future.dart */ whenComplete(() → asy::FutureOr<dynamic> action) → asy::Future<self::MyFuture::T>
     return this.{self::MyFuture::noSuchMethod}(new core::_InvocationMirror::_withType(#whenComplete, 0, const <core::Type>[], core::List::unmodifiable<dynamic>(<dynamic>[action]), core::Map::unmodifiable<core::Symbol, dynamic>(const <core::Symbol, dynamic>{}))) as{TypeError} asy::Future<self::MyFuture::T>;
-  no-such-method-forwarder method /* from org-dartlang-sdk:///sdk/lib/async/future.dart */ timeout(core::Duration timeLimit, {() → asy::FutureOr<self::MyFuture::T> onTimeout = null}) → asy::Future<self::MyFuture::T>
+  no-such-method-forwarder method /* from org-dartlang-sdk:///sdk/lib/async/future.dart */ timeout(core::Duration timeLimit, {generic-covariant-impl () → asy::FutureOr<self::MyFuture::T> onTimeout = null}) → asy::Future<self::MyFuture::T>
     return this.{self::MyFuture::noSuchMethod}(new core::_InvocationMirror::_withType(#timeout, 0, const <core::Type>[], core::List::unmodifiable<dynamic>(<dynamic>[timeLimit]), core::Map::unmodifiable<core::Symbol, dynamic>(<core::Symbol, dynamic>{#onTimeout: onTimeout}))) as{TypeError} asy::Future<self::MyFuture::T>;
   no-such-method-forwarder method /* from org-dartlang-sdk:///sdk/lib/async/future.dart */ asStream() → asy::Stream<self::MyFuture::T>
     return this.{self::MyFuture::noSuchMethod}(new core::_InvocationMirror::_withType(#asStream, 0, const <core::Type>[], const <dynamic>[], core::Map::unmodifiable<core::Symbol, dynamic>(const <core::Symbol, dynamic>{}))) as{TypeError} asy::Stream<self::MyFuture::T>;
diff --git a/pkg/front_end/testcases/inference/future_then_5.dart b/pkg/front_end/testcases/inference/future_then_5.dart
index 2fa4ef8..fbbcd00 100644
--- a/pkg/front_end/testcases/inference/future_then_5.dart
+++ b/pkg/front_end/testcases/inference/future_then_5.dart
@@ -10,7 +10,7 @@
 class MyFuture<T> implements Future<T> {
   MyFuture() {}
   MyFuture.value(T x) {}
-  dynamic noSuchMethod(/*@topType=Invocation*/ invocation) => null;
+  dynamic noSuchMethod(invocation) => null;
   MyFuture<S> then<S>(FutureOr<S> f(T x), {Function onError}) => null;
 }
 
diff --git a/pkg/front_end/testcases/inference/future_then_5.dart.legacy.expect b/pkg/front_end/testcases/inference/future_then_5.dart.legacy.expect
index e9987cb..141e3e7 100644
--- a/pkg/front_end/testcases/inference/future_then_5.dart.legacy.expect
+++ b/pkg/front_end/testcases/inference/future_then_5.dart.legacy.expect
@@ -18,7 +18,7 @@
     return this.{self::MyFuture::noSuchMethod}(new core::_InvocationMirror::_withType(#catchError, 0, const <core::Type>[], core::List::unmodifiable<dynamic>(<dynamic>[onError]), core::Map::unmodifiable<core::Symbol, dynamic>(<core::Symbol, dynamic>{#test: test}))) as{TypeError} asy::Future<self::MyFuture::T>;
   no-such-method-forwarder method /* from org-dartlang-sdk:///sdk/lib/async/future.dart */ whenComplete(() → asy::FutureOr<dynamic> action) → asy::Future<self::MyFuture::T>
     return this.{self::MyFuture::noSuchMethod}(new core::_InvocationMirror::_withType(#whenComplete, 0, const <core::Type>[], core::List::unmodifiable<dynamic>(<dynamic>[action]), core::Map::unmodifiable<core::Symbol, dynamic>(const <core::Symbol, dynamic>{}))) as{TypeError} asy::Future<self::MyFuture::T>;
-  no-such-method-forwarder method /* from org-dartlang-sdk:///sdk/lib/async/future.dart */ timeout(core::Duration timeLimit, {() → asy::FutureOr<self::MyFuture::T> onTimeout = null}) → asy::Future<self::MyFuture::T>
+  no-such-method-forwarder method /* from org-dartlang-sdk:///sdk/lib/async/future.dart */ timeout(core::Duration timeLimit, {generic-covariant-impl () → asy::FutureOr<self::MyFuture::T> onTimeout = null}) → asy::Future<self::MyFuture::T>
     return this.{self::MyFuture::noSuchMethod}(new core::_InvocationMirror::_withType(#timeout, 0, const <core::Type>[], core::List::unmodifiable<dynamic>(<dynamic>[timeLimit]), core::Map::unmodifiable<core::Symbol, dynamic>(<core::Symbol, dynamic>{#onTimeout: onTimeout}))) as{TypeError} asy::Future<self::MyFuture::T>;
   no-such-method-forwarder method /* from org-dartlang-sdk:///sdk/lib/async/future.dart */ asStream() → asy::Stream<self::MyFuture::T>
     return this.{self::MyFuture::noSuchMethod}(new core::_InvocationMirror::_withType(#asStream, 0, const <core::Type>[], const <dynamic>[], core::Map::unmodifiable<core::Symbol, dynamic>(const <core::Symbol, dynamic>{}))) as{TypeError} asy::Stream<self::MyFuture::T>;
diff --git a/pkg/front_end/testcases/inference/future_then_5.dart.legacy.transformed.expect b/pkg/front_end/testcases/inference/future_then_5.dart.legacy.transformed.expect
index 25dacbf..33b2911 100644
--- a/pkg/front_end/testcases/inference/future_then_5.dart.legacy.transformed.expect
+++ b/pkg/front_end/testcases/inference/future_then_5.dart.legacy.transformed.expect
@@ -18,7 +18,7 @@
     return this.{self::MyFuture::noSuchMethod}(new core::_InvocationMirror::_withType(#catchError, 0, const <core::Type>[], core::List::unmodifiable<dynamic>(<dynamic>[onError]), core::Map::unmodifiable<core::Symbol, dynamic>(<core::Symbol, dynamic>{#test: test}))) as{TypeError} asy::Future<self::MyFuture::T>;
   no-such-method-forwarder method /* from org-dartlang-sdk:///sdk/lib/async/future.dart */ whenComplete(() → asy::FutureOr<dynamic> action) → asy::Future<self::MyFuture::T>
     return this.{self::MyFuture::noSuchMethod}(new core::_InvocationMirror::_withType(#whenComplete, 0, const <core::Type>[], core::List::unmodifiable<dynamic>(<dynamic>[action]), core::Map::unmodifiable<core::Symbol, dynamic>(const <core::Symbol, dynamic>{}))) as{TypeError} asy::Future<self::MyFuture::T>;
-  no-such-method-forwarder method /* from org-dartlang-sdk:///sdk/lib/async/future.dart */ timeout(core::Duration timeLimit, {() → asy::FutureOr<self::MyFuture::T> onTimeout = null}) → asy::Future<self::MyFuture::T>
+  no-such-method-forwarder method /* from org-dartlang-sdk:///sdk/lib/async/future.dart */ timeout(core::Duration timeLimit, {generic-covariant-impl () → asy::FutureOr<self::MyFuture::T> onTimeout = null}) → asy::Future<self::MyFuture::T>
     return this.{self::MyFuture::noSuchMethod}(new core::_InvocationMirror::_withType(#timeout, 0, const <core::Type>[], core::List::unmodifiable<dynamic>(<dynamic>[timeLimit]), core::Map::unmodifiable<core::Symbol, dynamic>(<core::Symbol, dynamic>{#onTimeout: onTimeout}))) as{TypeError} asy::Future<self::MyFuture::T>;
   no-such-method-forwarder method /* from org-dartlang-sdk:///sdk/lib/async/future.dart */ asStream() → asy::Stream<self::MyFuture::T>
     return this.{self::MyFuture::noSuchMethod}(new core::_InvocationMirror::_withType(#asStream, 0, const <core::Type>[], const <dynamic>[], core::Map::unmodifiable<core::Symbol, dynamic>(const <core::Symbol, dynamic>{}))) as{TypeError} asy::Stream<self::MyFuture::T>;
diff --git a/pkg/front_end/testcases/inference/future_then_5.dart.outline.expect b/pkg/front_end/testcases/inference/future_then_5.dart.outline.expect
index 5e26f10..18f6651 100644
--- a/pkg/front_end/testcases/inference/future_then_5.dart.outline.expect
+++ b/pkg/front_end/testcases/inference/future_then_5.dart.outline.expect
@@ -18,7 +18,7 @@
     return this.{self::MyFuture::noSuchMethod}(new core::_InvocationMirror::_withType(#catchError, 0, const <core::Type>[], core::List::unmodifiable<dynamic>(<dynamic>[onError]), core::Map::unmodifiable<core::Symbol, dynamic>(<core::Symbol, dynamic>{#test: test}))) as{TypeError} asy::Future<self::MyFuture::T>;
   no-such-method-forwarder method /* from org-dartlang-sdk:///sdk/lib/async/future.dart */ whenComplete(() → asy::FutureOr<dynamic> action) → asy::Future<self::MyFuture::T>
     return this.{self::MyFuture::noSuchMethod}(new core::_InvocationMirror::_withType(#whenComplete, 0, const <core::Type>[], core::List::unmodifiable<dynamic>(<dynamic>[action]), core::Map::unmodifiable<core::Symbol, dynamic>(const <core::Symbol, dynamic>{}))) as{TypeError} asy::Future<self::MyFuture::T>;
-  no-such-method-forwarder method /* from org-dartlang-sdk:///sdk/lib/async/future.dart */ timeout(core::Duration timeLimit, {() → asy::FutureOr<self::MyFuture::T> onTimeout = null}) → asy::Future<self::MyFuture::T>
+  no-such-method-forwarder method /* from org-dartlang-sdk:///sdk/lib/async/future.dart */ timeout(core::Duration timeLimit, {generic-covariant-impl () → asy::FutureOr<self::MyFuture::T> onTimeout = null}) → asy::Future<self::MyFuture::T>
     return this.{self::MyFuture::noSuchMethod}(new core::_InvocationMirror::_withType(#timeout, 0, const <core::Type>[], core::List::unmodifiable<dynamic>(<dynamic>[timeLimit]), core::Map::unmodifiable<core::Symbol, dynamic>(<core::Symbol, dynamic>{#onTimeout: onTimeout}))) as{TypeError} asy::Future<self::MyFuture::T>;
   no-such-method-forwarder method /* from org-dartlang-sdk:///sdk/lib/async/future.dart */ asStream() → asy::Stream<self::MyFuture::T>
     return this.{self::MyFuture::noSuchMethod}(new core::_InvocationMirror::_withType(#asStream, 0, const <core::Type>[], const <dynamic>[], core::Map::unmodifiable<core::Symbol, dynamic>(const <core::Symbol, dynamic>{}))) as{TypeError} asy::Stream<self::MyFuture::T>;
diff --git a/pkg/front_end/testcases/inference/future_then_6.dart b/pkg/front_end/testcases/inference/future_then_6.dart
index 25cb27f..6731ae3 100644
--- a/pkg/front_end/testcases/inference/future_then_6.dart
+++ b/pkg/front_end/testcases/inference/future_then_6.dart
@@ -10,7 +10,7 @@
 class MyFuture<T> implements Future<T> {
   MyFuture() {}
   MyFuture.value(T x) {}
-  dynamic noSuchMethod(/*@topType=Invocation*/ invocation) => null;
+  dynamic noSuchMethod(invocation) => null;
   MyFuture<S> then<S>(FutureOr<S> f(T x), {Function onError}) => null;
 }
 
diff --git a/pkg/front_end/testcases/inference/future_then_6.dart.legacy.expect b/pkg/front_end/testcases/inference/future_then_6.dart.legacy.expect
index 44e0272..cc6a439 100644
--- a/pkg/front_end/testcases/inference/future_then_6.dart.legacy.expect
+++ b/pkg/front_end/testcases/inference/future_then_6.dart.legacy.expect
@@ -18,7 +18,7 @@
     return this.{self::MyFuture::noSuchMethod}(new core::_InvocationMirror::_withType(#catchError, 0, const <core::Type>[], core::List::unmodifiable<dynamic>(<dynamic>[onError]), core::Map::unmodifiable<core::Symbol, dynamic>(<core::Symbol, dynamic>{#test: test}))) as{TypeError} asy::Future<self::MyFuture::T>;
   no-such-method-forwarder method /* from org-dartlang-sdk:///sdk/lib/async/future.dart */ whenComplete(() → asy::FutureOr<dynamic> action) → asy::Future<self::MyFuture::T>
     return this.{self::MyFuture::noSuchMethod}(new core::_InvocationMirror::_withType(#whenComplete, 0, const <core::Type>[], core::List::unmodifiable<dynamic>(<dynamic>[action]), core::Map::unmodifiable<core::Symbol, dynamic>(const <core::Symbol, dynamic>{}))) as{TypeError} asy::Future<self::MyFuture::T>;
-  no-such-method-forwarder method /* from org-dartlang-sdk:///sdk/lib/async/future.dart */ timeout(core::Duration timeLimit, {() → asy::FutureOr<self::MyFuture::T> onTimeout = null}) → asy::Future<self::MyFuture::T>
+  no-such-method-forwarder method /* from org-dartlang-sdk:///sdk/lib/async/future.dart */ timeout(core::Duration timeLimit, {generic-covariant-impl () → asy::FutureOr<self::MyFuture::T> onTimeout = null}) → asy::Future<self::MyFuture::T>
     return this.{self::MyFuture::noSuchMethod}(new core::_InvocationMirror::_withType(#timeout, 0, const <core::Type>[], core::List::unmodifiable<dynamic>(<dynamic>[timeLimit]), core::Map::unmodifiable<core::Symbol, dynamic>(<core::Symbol, dynamic>{#onTimeout: onTimeout}))) as{TypeError} asy::Future<self::MyFuture::T>;
   no-such-method-forwarder method /* from org-dartlang-sdk:///sdk/lib/async/future.dart */ asStream() → asy::Stream<self::MyFuture::T>
     return this.{self::MyFuture::noSuchMethod}(new core::_InvocationMirror::_withType(#asStream, 0, const <core::Type>[], const <dynamic>[], core::Map::unmodifiable<core::Symbol, dynamic>(const <core::Symbol, dynamic>{}))) as{TypeError} asy::Stream<self::MyFuture::T>;
diff --git a/pkg/front_end/testcases/inference/future_then_6.dart.legacy.transformed.expect b/pkg/front_end/testcases/inference/future_then_6.dart.legacy.transformed.expect
index bde8fe5..9ad93e8 100644
--- a/pkg/front_end/testcases/inference/future_then_6.dart.legacy.transformed.expect
+++ b/pkg/front_end/testcases/inference/future_then_6.dart.legacy.transformed.expect
@@ -18,7 +18,7 @@
     return this.{self::MyFuture::noSuchMethod}(new core::_InvocationMirror::_withType(#catchError, 0, const <core::Type>[], core::List::unmodifiable<dynamic>(<dynamic>[onError]), core::Map::unmodifiable<core::Symbol, dynamic>(<core::Symbol, dynamic>{#test: test}))) as{TypeError} asy::Future<self::MyFuture::T>;
   no-such-method-forwarder method /* from org-dartlang-sdk:///sdk/lib/async/future.dart */ whenComplete(() → asy::FutureOr<dynamic> action) → asy::Future<self::MyFuture::T>
     return this.{self::MyFuture::noSuchMethod}(new core::_InvocationMirror::_withType(#whenComplete, 0, const <core::Type>[], core::List::unmodifiable<dynamic>(<dynamic>[action]), core::Map::unmodifiable<core::Symbol, dynamic>(const <core::Symbol, dynamic>{}))) as{TypeError} asy::Future<self::MyFuture::T>;
-  no-such-method-forwarder method /* from org-dartlang-sdk:///sdk/lib/async/future.dart */ timeout(core::Duration timeLimit, {() → asy::FutureOr<self::MyFuture::T> onTimeout = null}) → asy::Future<self::MyFuture::T>
+  no-such-method-forwarder method /* from org-dartlang-sdk:///sdk/lib/async/future.dart */ timeout(core::Duration timeLimit, {generic-covariant-impl () → asy::FutureOr<self::MyFuture::T> onTimeout = null}) → asy::Future<self::MyFuture::T>
     return this.{self::MyFuture::noSuchMethod}(new core::_InvocationMirror::_withType(#timeout, 0, const <core::Type>[], core::List::unmodifiable<dynamic>(<dynamic>[timeLimit]), core::Map::unmodifiable<core::Symbol, dynamic>(<core::Symbol, dynamic>{#onTimeout: onTimeout}))) as{TypeError} asy::Future<self::MyFuture::T>;
   no-such-method-forwarder method /* from org-dartlang-sdk:///sdk/lib/async/future.dart */ asStream() → asy::Stream<self::MyFuture::T>
     return this.{self::MyFuture::noSuchMethod}(new core::_InvocationMirror::_withType(#asStream, 0, const <core::Type>[], const <dynamic>[], core::Map::unmodifiable<core::Symbol, dynamic>(const <core::Symbol, dynamic>{}))) as{TypeError} asy::Stream<self::MyFuture::T>;
diff --git a/pkg/front_end/testcases/inference/future_then_6.dart.outline.expect b/pkg/front_end/testcases/inference/future_then_6.dart.outline.expect
index 5e26f10..18f6651 100644
--- a/pkg/front_end/testcases/inference/future_then_6.dart.outline.expect
+++ b/pkg/front_end/testcases/inference/future_then_6.dart.outline.expect
@@ -18,7 +18,7 @@
     return this.{self::MyFuture::noSuchMethod}(new core::_InvocationMirror::_withType(#catchError, 0, const <core::Type>[], core::List::unmodifiable<dynamic>(<dynamic>[onError]), core::Map::unmodifiable<core::Symbol, dynamic>(<core::Symbol, dynamic>{#test: test}))) as{TypeError} asy::Future<self::MyFuture::T>;
   no-such-method-forwarder method /* from org-dartlang-sdk:///sdk/lib/async/future.dart */ whenComplete(() → asy::FutureOr<dynamic> action) → asy::Future<self::MyFuture::T>
     return this.{self::MyFuture::noSuchMethod}(new core::_InvocationMirror::_withType(#whenComplete, 0, const <core::Type>[], core::List::unmodifiable<dynamic>(<dynamic>[action]), core::Map::unmodifiable<core::Symbol, dynamic>(const <core::Symbol, dynamic>{}))) as{TypeError} asy::Future<self::MyFuture::T>;
-  no-such-method-forwarder method /* from org-dartlang-sdk:///sdk/lib/async/future.dart */ timeout(core::Duration timeLimit, {() → asy::FutureOr<self::MyFuture::T> onTimeout = null}) → asy::Future<self::MyFuture::T>
+  no-such-method-forwarder method /* from org-dartlang-sdk:///sdk/lib/async/future.dart */ timeout(core::Duration timeLimit, {generic-covariant-impl () → asy::FutureOr<self::MyFuture::T> onTimeout = null}) → asy::Future<self::MyFuture::T>
     return this.{self::MyFuture::noSuchMethod}(new core::_InvocationMirror::_withType(#timeout, 0, const <core::Type>[], core::List::unmodifiable<dynamic>(<dynamic>[timeLimit]), core::Map::unmodifiable<core::Symbol, dynamic>(<core::Symbol, dynamic>{#onTimeout: onTimeout}))) as{TypeError} asy::Future<self::MyFuture::T>;
   no-such-method-forwarder method /* from org-dartlang-sdk:///sdk/lib/async/future.dart */ asStream() → asy::Stream<self::MyFuture::T>
     return this.{self::MyFuture::noSuchMethod}(new core::_InvocationMirror::_withType(#asStream, 0, const <core::Type>[], const <dynamic>[], core::Map::unmodifiable<core::Symbol, dynamic>(const <core::Symbol, dynamic>{}))) as{TypeError} asy::Stream<self::MyFuture::T>;
diff --git a/pkg/front_end/testcases/inference/future_then_conditional.dart b/pkg/front_end/testcases/inference/future_then_conditional.dart
index 32f7cf2..2554216 100644
--- a/pkg/front_end/testcases/inference/future_then_conditional.dart
+++ b/pkg/front_end/testcases/inference/future_then_conditional.dart
@@ -10,7 +10,7 @@
 class MyFuture<T> implements Future<T> {
   MyFuture() {}
   MyFuture.value(T x) {}
-  dynamic noSuchMethod(/*@topType=Invocation*/ invocation) => null;
+  dynamic noSuchMethod(invocation) => null;
   MyFuture<S> then<S>(FutureOr<S> f(T x), {Function onError}) => null;
 }
 
diff --git a/pkg/front_end/testcases/inference/future_then_conditional.dart.legacy.expect b/pkg/front_end/testcases/inference/future_then_conditional.dart.legacy.expect
index 4ddf6a7..579d81d 100644
--- a/pkg/front_end/testcases/inference/future_then_conditional.dart.legacy.expect
+++ b/pkg/front_end/testcases/inference/future_then_conditional.dart.legacy.expect
@@ -18,7 +18,7 @@
     return this.{self::MyFuture::noSuchMethod}(new core::_InvocationMirror::_withType(#catchError, 0, const <core::Type>[], core::List::unmodifiable<dynamic>(<dynamic>[onError]), core::Map::unmodifiable<core::Symbol, dynamic>(<core::Symbol, dynamic>{#test: test}))) as{TypeError} asy::Future<self::MyFuture::T>;
   no-such-method-forwarder method /* from org-dartlang-sdk:///sdk/lib/async/future.dart */ whenComplete(() → asy::FutureOr<dynamic> action) → asy::Future<self::MyFuture::T>
     return this.{self::MyFuture::noSuchMethod}(new core::_InvocationMirror::_withType(#whenComplete, 0, const <core::Type>[], core::List::unmodifiable<dynamic>(<dynamic>[action]), core::Map::unmodifiable<core::Symbol, dynamic>(const <core::Symbol, dynamic>{}))) as{TypeError} asy::Future<self::MyFuture::T>;
-  no-such-method-forwarder method /* from org-dartlang-sdk:///sdk/lib/async/future.dart */ timeout(core::Duration timeLimit, {() → asy::FutureOr<self::MyFuture::T> onTimeout = null}) → asy::Future<self::MyFuture::T>
+  no-such-method-forwarder method /* from org-dartlang-sdk:///sdk/lib/async/future.dart */ timeout(core::Duration timeLimit, {generic-covariant-impl () → asy::FutureOr<self::MyFuture::T> onTimeout = null}) → asy::Future<self::MyFuture::T>
     return this.{self::MyFuture::noSuchMethod}(new core::_InvocationMirror::_withType(#timeout, 0, const <core::Type>[], core::List::unmodifiable<dynamic>(<dynamic>[timeLimit]), core::Map::unmodifiable<core::Symbol, dynamic>(<core::Symbol, dynamic>{#onTimeout: onTimeout}))) as{TypeError} asy::Future<self::MyFuture::T>;
   no-such-method-forwarder method /* from org-dartlang-sdk:///sdk/lib/async/future.dart */ asStream() → asy::Stream<self::MyFuture::T>
     return this.{self::MyFuture::noSuchMethod}(new core::_InvocationMirror::_withType(#asStream, 0, const <core::Type>[], const <dynamic>[], core::Map::unmodifiable<core::Symbol, dynamic>(const <core::Symbol, dynamic>{}))) as{TypeError} asy::Stream<self::MyFuture::T>;
diff --git a/pkg/front_end/testcases/inference/future_then_conditional.dart.legacy.transformed.expect b/pkg/front_end/testcases/inference/future_then_conditional.dart.legacy.transformed.expect
index 0fc63fc..1ae82f7 100644
--- a/pkg/front_end/testcases/inference/future_then_conditional.dart.legacy.transformed.expect
+++ b/pkg/front_end/testcases/inference/future_then_conditional.dart.legacy.transformed.expect
@@ -18,7 +18,7 @@
     return this.{self::MyFuture::noSuchMethod}(new core::_InvocationMirror::_withType(#catchError, 0, const <core::Type>[], core::List::unmodifiable<dynamic>(<dynamic>[onError]), core::Map::unmodifiable<core::Symbol, dynamic>(<core::Symbol, dynamic>{#test: test}))) as{TypeError} asy::Future<self::MyFuture::T>;
   no-such-method-forwarder method /* from org-dartlang-sdk:///sdk/lib/async/future.dart */ whenComplete(() → asy::FutureOr<dynamic> action) → asy::Future<self::MyFuture::T>
     return this.{self::MyFuture::noSuchMethod}(new core::_InvocationMirror::_withType(#whenComplete, 0, const <core::Type>[], core::List::unmodifiable<dynamic>(<dynamic>[action]), core::Map::unmodifiable<core::Symbol, dynamic>(const <core::Symbol, dynamic>{}))) as{TypeError} asy::Future<self::MyFuture::T>;
-  no-such-method-forwarder method /* from org-dartlang-sdk:///sdk/lib/async/future.dart */ timeout(core::Duration timeLimit, {() → asy::FutureOr<self::MyFuture::T> onTimeout = null}) → asy::Future<self::MyFuture::T>
+  no-such-method-forwarder method /* from org-dartlang-sdk:///sdk/lib/async/future.dart */ timeout(core::Duration timeLimit, {generic-covariant-impl () → asy::FutureOr<self::MyFuture::T> onTimeout = null}) → asy::Future<self::MyFuture::T>
     return this.{self::MyFuture::noSuchMethod}(new core::_InvocationMirror::_withType(#timeout, 0, const <core::Type>[], core::List::unmodifiable<dynamic>(<dynamic>[timeLimit]), core::Map::unmodifiable<core::Symbol, dynamic>(<core::Symbol, dynamic>{#onTimeout: onTimeout}))) as{TypeError} asy::Future<self::MyFuture::T>;
   no-such-method-forwarder method /* from org-dartlang-sdk:///sdk/lib/async/future.dart */ asStream() → asy::Stream<self::MyFuture::T>
     return this.{self::MyFuture::noSuchMethod}(new core::_InvocationMirror::_withType(#asStream, 0, const <core::Type>[], const <dynamic>[], core::Map::unmodifiable<core::Symbol, dynamic>(const <core::Symbol, dynamic>{}))) as{TypeError} asy::Stream<self::MyFuture::T>;
diff --git a/pkg/front_end/testcases/inference/future_then_conditional.dart.outline.expect b/pkg/front_end/testcases/inference/future_then_conditional.dart.outline.expect
index 5e26f10..18f6651 100644
--- a/pkg/front_end/testcases/inference/future_then_conditional.dart.outline.expect
+++ b/pkg/front_end/testcases/inference/future_then_conditional.dart.outline.expect
@@ -18,7 +18,7 @@
     return this.{self::MyFuture::noSuchMethod}(new core::_InvocationMirror::_withType(#catchError, 0, const <core::Type>[], core::List::unmodifiable<dynamic>(<dynamic>[onError]), core::Map::unmodifiable<core::Symbol, dynamic>(<core::Symbol, dynamic>{#test: test}))) as{TypeError} asy::Future<self::MyFuture::T>;
   no-such-method-forwarder method /* from org-dartlang-sdk:///sdk/lib/async/future.dart */ whenComplete(() → asy::FutureOr<dynamic> action) → asy::Future<self::MyFuture::T>
     return this.{self::MyFuture::noSuchMethod}(new core::_InvocationMirror::_withType(#whenComplete, 0, const <core::Type>[], core::List::unmodifiable<dynamic>(<dynamic>[action]), core::Map::unmodifiable<core::Symbol, dynamic>(const <core::Symbol, dynamic>{}))) as{TypeError} asy::Future<self::MyFuture::T>;
-  no-such-method-forwarder method /* from org-dartlang-sdk:///sdk/lib/async/future.dart */ timeout(core::Duration timeLimit, {() → asy::FutureOr<self::MyFuture::T> onTimeout = null}) → asy::Future<self::MyFuture::T>
+  no-such-method-forwarder method /* from org-dartlang-sdk:///sdk/lib/async/future.dart */ timeout(core::Duration timeLimit, {generic-covariant-impl () → asy::FutureOr<self::MyFuture::T> onTimeout = null}) → asy::Future<self::MyFuture::T>
     return this.{self::MyFuture::noSuchMethod}(new core::_InvocationMirror::_withType(#timeout, 0, const <core::Type>[], core::List::unmodifiable<dynamic>(<dynamic>[timeLimit]), core::Map::unmodifiable<core::Symbol, dynamic>(<core::Symbol, dynamic>{#onTimeout: onTimeout}))) as{TypeError} asy::Future<self::MyFuture::T>;
   no-such-method-forwarder method /* from org-dartlang-sdk:///sdk/lib/async/future.dart */ asStream() → asy::Stream<self::MyFuture::T>
     return this.{self::MyFuture::noSuchMethod}(new core::_InvocationMirror::_withType(#asStream, 0, const <core::Type>[], const <dynamic>[], core::Map::unmodifiable<core::Symbol, dynamic>(const <core::Symbol, dynamic>{}))) as{TypeError} asy::Stream<self::MyFuture::T>;
diff --git a/pkg/front_end/testcases/inference/future_then_conditional_2.dart b/pkg/front_end/testcases/inference/future_then_conditional_2.dart
index 9fb812d..ea5c226 100644
--- a/pkg/front_end/testcases/inference/future_then_conditional_2.dart
+++ b/pkg/front_end/testcases/inference/future_then_conditional_2.dart
@@ -10,7 +10,7 @@
 class MyFuture<T> implements Future<T> {
   MyFuture() {}
   MyFuture.value(T x) {}
-  dynamic noSuchMethod(/*@topType=Invocation*/ invocation) => null;
+  dynamic noSuchMethod(invocation) => null;
   MyFuture<S> then<S>(FutureOr<S> f(T x), {Function onError}) => null;
 }
 
diff --git a/pkg/front_end/testcases/inference/future_then_conditional_2.dart.legacy.expect b/pkg/front_end/testcases/inference/future_then_conditional_2.dart.legacy.expect
index df550a5..3fbb4f7 100644
--- a/pkg/front_end/testcases/inference/future_then_conditional_2.dart.legacy.expect
+++ b/pkg/front_end/testcases/inference/future_then_conditional_2.dart.legacy.expect
@@ -18,7 +18,7 @@
     return this.{self::MyFuture::noSuchMethod}(new core::_InvocationMirror::_withType(#catchError, 0, const <core::Type>[], core::List::unmodifiable<dynamic>(<dynamic>[onError]), core::Map::unmodifiable<core::Symbol, dynamic>(<core::Symbol, dynamic>{#test: test}))) as{TypeError} asy::Future<self::MyFuture::T>;
   no-such-method-forwarder method /* from org-dartlang-sdk:///sdk/lib/async/future.dart */ whenComplete(() → asy::FutureOr<dynamic> action) → asy::Future<self::MyFuture::T>
     return this.{self::MyFuture::noSuchMethod}(new core::_InvocationMirror::_withType(#whenComplete, 0, const <core::Type>[], core::List::unmodifiable<dynamic>(<dynamic>[action]), core::Map::unmodifiable<core::Symbol, dynamic>(const <core::Symbol, dynamic>{}))) as{TypeError} asy::Future<self::MyFuture::T>;
-  no-such-method-forwarder method /* from org-dartlang-sdk:///sdk/lib/async/future.dart */ timeout(core::Duration timeLimit, {() → asy::FutureOr<self::MyFuture::T> onTimeout = null}) → asy::Future<self::MyFuture::T>
+  no-such-method-forwarder method /* from org-dartlang-sdk:///sdk/lib/async/future.dart */ timeout(core::Duration timeLimit, {generic-covariant-impl () → asy::FutureOr<self::MyFuture::T> onTimeout = null}) → asy::Future<self::MyFuture::T>
     return this.{self::MyFuture::noSuchMethod}(new core::_InvocationMirror::_withType(#timeout, 0, const <core::Type>[], core::List::unmodifiable<dynamic>(<dynamic>[timeLimit]), core::Map::unmodifiable<core::Symbol, dynamic>(<core::Symbol, dynamic>{#onTimeout: onTimeout}))) as{TypeError} asy::Future<self::MyFuture::T>;
   no-such-method-forwarder method /* from org-dartlang-sdk:///sdk/lib/async/future.dart */ asStream() → asy::Stream<self::MyFuture::T>
     return this.{self::MyFuture::noSuchMethod}(new core::_InvocationMirror::_withType(#asStream, 0, const <core::Type>[], const <dynamic>[], core::Map::unmodifiable<core::Symbol, dynamic>(const <core::Symbol, dynamic>{}))) as{TypeError} asy::Stream<self::MyFuture::T>;
diff --git a/pkg/front_end/testcases/inference/future_then_conditional_2.dart.legacy.transformed.expect b/pkg/front_end/testcases/inference/future_then_conditional_2.dart.legacy.transformed.expect
index 6885ac4..9b1db02 100644
--- a/pkg/front_end/testcases/inference/future_then_conditional_2.dart.legacy.transformed.expect
+++ b/pkg/front_end/testcases/inference/future_then_conditional_2.dart.legacy.transformed.expect
@@ -18,7 +18,7 @@
     return this.{self::MyFuture::noSuchMethod}(new core::_InvocationMirror::_withType(#catchError, 0, const <core::Type>[], core::List::unmodifiable<dynamic>(<dynamic>[onError]), core::Map::unmodifiable<core::Symbol, dynamic>(<core::Symbol, dynamic>{#test: test}))) as{TypeError} asy::Future<self::MyFuture::T>;
   no-such-method-forwarder method /* from org-dartlang-sdk:///sdk/lib/async/future.dart */ whenComplete(() → asy::FutureOr<dynamic> action) → asy::Future<self::MyFuture::T>
     return this.{self::MyFuture::noSuchMethod}(new core::_InvocationMirror::_withType(#whenComplete, 0, const <core::Type>[], core::List::unmodifiable<dynamic>(<dynamic>[action]), core::Map::unmodifiable<core::Symbol, dynamic>(const <core::Symbol, dynamic>{}))) as{TypeError} asy::Future<self::MyFuture::T>;
-  no-such-method-forwarder method /* from org-dartlang-sdk:///sdk/lib/async/future.dart */ timeout(core::Duration timeLimit, {() → asy::FutureOr<self::MyFuture::T> onTimeout = null}) → asy::Future<self::MyFuture::T>
+  no-such-method-forwarder method /* from org-dartlang-sdk:///sdk/lib/async/future.dart */ timeout(core::Duration timeLimit, {generic-covariant-impl () → asy::FutureOr<self::MyFuture::T> onTimeout = null}) → asy::Future<self::MyFuture::T>
     return this.{self::MyFuture::noSuchMethod}(new core::_InvocationMirror::_withType(#timeout, 0, const <core::Type>[], core::List::unmodifiable<dynamic>(<dynamic>[timeLimit]), core::Map::unmodifiable<core::Symbol, dynamic>(<core::Symbol, dynamic>{#onTimeout: onTimeout}))) as{TypeError} asy::Future<self::MyFuture::T>;
   no-such-method-forwarder method /* from org-dartlang-sdk:///sdk/lib/async/future.dart */ asStream() → asy::Stream<self::MyFuture::T>
     return this.{self::MyFuture::noSuchMethod}(new core::_InvocationMirror::_withType(#asStream, 0, const <core::Type>[], const <dynamic>[], core::Map::unmodifiable<core::Symbol, dynamic>(const <core::Symbol, dynamic>{}))) as{TypeError} asy::Stream<self::MyFuture::T>;
diff --git a/pkg/front_end/testcases/inference/future_then_conditional_2.dart.outline.expect b/pkg/front_end/testcases/inference/future_then_conditional_2.dart.outline.expect
index 5e26f10..18f6651 100644
--- a/pkg/front_end/testcases/inference/future_then_conditional_2.dart.outline.expect
+++ b/pkg/front_end/testcases/inference/future_then_conditional_2.dart.outline.expect
@@ -18,7 +18,7 @@
     return this.{self::MyFuture::noSuchMethod}(new core::_InvocationMirror::_withType(#catchError, 0, const <core::Type>[], core::List::unmodifiable<dynamic>(<dynamic>[onError]), core::Map::unmodifiable<core::Symbol, dynamic>(<core::Symbol, dynamic>{#test: test}))) as{TypeError} asy::Future<self::MyFuture::T>;
   no-such-method-forwarder method /* from org-dartlang-sdk:///sdk/lib/async/future.dart */ whenComplete(() → asy::FutureOr<dynamic> action) → asy::Future<self::MyFuture::T>
     return this.{self::MyFuture::noSuchMethod}(new core::_InvocationMirror::_withType(#whenComplete, 0, const <core::Type>[], core::List::unmodifiable<dynamic>(<dynamic>[action]), core::Map::unmodifiable<core::Symbol, dynamic>(const <core::Symbol, dynamic>{}))) as{TypeError} asy::Future<self::MyFuture::T>;
-  no-such-method-forwarder method /* from org-dartlang-sdk:///sdk/lib/async/future.dart */ timeout(core::Duration timeLimit, {() → asy::FutureOr<self::MyFuture::T> onTimeout = null}) → asy::Future<self::MyFuture::T>
+  no-such-method-forwarder method /* from org-dartlang-sdk:///sdk/lib/async/future.dart */ timeout(core::Duration timeLimit, {generic-covariant-impl () → asy::FutureOr<self::MyFuture::T> onTimeout = null}) → asy::Future<self::MyFuture::T>
     return this.{self::MyFuture::noSuchMethod}(new core::_InvocationMirror::_withType(#timeout, 0, const <core::Type>[], core::List::unmodifiable<dynamic>(<dynamic>[timeLimit]), core::Map::unmodifiable<core::Symbol, dynamic>(<core::Symbol, dynamic>{#onTimeout: onTimeout}))) as{TypeError} asy::Future<self::MyFuture::T>;
   no-such-method-forwarder method /* from org-dartlang-sdk:///sdk/lib/async/future.dart */ asStream() → asy::Stream<self::MyFuture::T>
     return this.{self::MyFuture::noSuchMethod}(new core::_InvocationMirror::_withType(#asStream, 0, const <core::Type>[], const <dynamic>[], core::Map::unmodifiable<core::Symbol, dynamic>(const <core::Symbol, dynamic>{}))) as{TypeError} asy::Stream<self::MyFuture::T>;
diff --git a/pkg/front_end/testcases/inference/future_then_conditional_3.dart b/pkg/front_end/testcases/inference/future_then_conditional_3.dart
index 6a68194..3505a6d 100644
--- a/pkg/front_end/testcases/inference/future_then_conditional_3.dart
+++ b/pkg/front_end/testcases/inference/future_then_conditional_3.dart
@@ -10,7 +10,7 @@
 class MyFuture<T> implements Future<T> {
   MyFuture() {}
   MyFuture.value(T x) {}
-  dynamic noSuchMethod(/*@topType=Invocation*/ invocation) => null;
+  dynamic noSuchMethod(invocation) => null;
   MyFuture<S> then<S>(FutureOr<S> f(T x), {Function onError}) => null;
 }
 
diff --git a/pkg/front_end/testcases/inference/future_then_conditional_3.dart.legacy.expect b/pkg/front_end/testcases/inference/future_then_conditional_3.dart.legacy.expect
index 9932aa3..a38c5ae 100644
--- a/pkg/front_end/testcases/inference/future_then_conditional_3.dart.legacy.expect
+++ b/pkg/front_end/testcases/inference/future_then_conditional_3.dart.legacy.expect
@@ -18,7 +18,7 @@
     return this.{self::MyFuture::noSuchMethod}(new core::_InvocationMirror::_withType(#catchError, 0, const <core::Type>[], core::List::unmodifiable<dynamic>(<dynamic>[onError]), core::Map::unmodifiable<core::Symbol, dynamic>(<core::Symbol, dynamic>{#test: test}))) as{TypeError} asy::Future<self::MyFuture::T>;
   no-such-method-forwarder method /* from org-dartlang-sdk:///sdk/lib/async/future.dart */ whenComplete(() → asy::FutureOr<dynamic> action) → asy::Future<self::MyFuture::T>
     return this.{self::MyFuture::noSuchMethod}(new core::_InvocationMirror::_withType(#whenComplete, 0, const <core::Type>[], core::List::unmodifiable<dynamic>(<dynamic>[action]), core::Map::unmodifiable<core::Symbol, dynamic>(const <core::Symbol, dynamic>{}))) as{TypeError} asy::Future<self::MyFuture::T>;
-  no-such-method-forwarder method /* from org-dartlang-sdk:///sdk/lib/async/future.dart */ timeout(core::Duration timeLimit, {() → asy::FutureOr<self::MyFuture::T> onTimeout = null}) → asy::Future<self::MyFuture::T>
+  no-such-method-forwarder method /* from org-dartlang-sdk:///sdk/lib/async/future.dart */ timeout(core::Duration timeLimit, {generic-covariant-impl () → asy::FutureOr<self::MyFuture::T> onTimeout = null}) → asy::Future<self::MyFuture::T>
     return this.{self::MyFuture::noSuchMethod}(new core::_InvocationMirror::_withType(#timeout, 0, const <core::Type>[], core::List::unmodifiable<dynamic>(<dynamic>[timeLimit]), core::Map::unmodifiable<core::Symbol, dynamic>(<core::Symbol, dynamic>{#onTimeout: onTimeout}))) as{TypeError} asy::Future<self::MyFuture::T>;
   no-such-method-forwarder method /* from org-dartlang-sdk:///sdk/lib/async/future.dart */ asStream() → asy::Stream<self::MyFuture::T>
     return this.{self::MyFuture::noSuchMethod}(new core::_InvocationMirror::_withType(#asStream, 0, const <core::Type>[], const <dynamic>[], core::Map::unmodifiable<core::Symbol, dynamic>(const <core::Symbol, dynamic>{}))) as{TypeError} asy::Stream<self::MyFuture::T>;
diff --git a/pkg/front_end/testcases/inference/future_then_conditional_3.dart.legacy.transformed.expect b/pkg/front_end/testcases/inference/future_then_conditional_3.dart.legacy.transformed.expect
index c7618fd..364a78a 100644
--- a/pkg/front_end/testcases/inference/future_then_conditional_3.dart.legacy.transformed.expect
+++ b/pkg/front_end/testcases/inference/future_then_conditional_3.dart.legacy.transformed.expect
@@ -18,7 +18,7 @@
     return this.{self::MyFuture::noSuchMethod}(new core::_InvocationMirror::_withType(#catchError, 0, const <core::Type>[], core::List::unmodifiable<dynamic>(<dynamic>[onError]), core::Map::unmodifiable<core::Symbol, dynamic>(<core::Symbol, dynamic>{#test: test}))) as{TypeError} asy::Future<self::MyFuture::T>;
   no-such-method-forwarder method /* from org-dartlang-sdk:///sdk/lib/async/future.dart */ whenComplete(() → asy::FutureOr<dynamic> action) → asy::Future<self::MyFuture::T>
     return this.{self::MyFuture::noSuchMethod}(new core::_InvocationMirror::_withType(#whenComplete, 0, const <core::Type>[], core::List::unmodifiable<dynamic>(<dynamic>[action]), core::Map::unmodifiable<core::Symbol, dynamic>(const <core::Symbol, dynamic>{}))) as{TypeError} asy::Future<self::MyFuture::T>;
-  no-such-method-forwarder method /* from org-dartlang-sdk:///sdk/lib/async/future.dart */ timeout(core::Duration timeLimit, {() → asy::FutureOr<self::MyFuture::T> onTimeout = null}) → asy::Future<self::MyFuture::T>
+  no-such-method-forwarder method /* from org-dartlang-sdk:///sdk/lib/async/future.dart */ timeout(core::Duration timeLimit, {generic-covariant-impl () → asy::FutureOr<self::MyFuture::T> onTimeout = null}) → asy::Future<self::MyFuture::T>
     return this.{self::MyFuture::noSuchMethod}(new core::_InvocationMirror::_withType(#timeout, 0, const <core::Type>[], core::List::unmodifiable<dynamic>(<dynamic>[timeLimit]), core::Map::unmodifiable<core::Symbol, dynamic>(<core::Symbol, dynamic>{#onTimeout: onTimeout}))) as{TypeError} asy::Future<self::MyFuture::T>;
   no-such-method-forwarder method /* from org-dartlang-sdk:///sdk/lib/async/future.dart */ asStream() → asy::Stream<self::MyFuture::T>
     return this.{self::MyFuture::noSuchMethod}(new core::_InvocationMirror::_withType(#asStream, 0, const <core::Type>[], const <dynamic>[], core::Map::unmodifiable<core::Symbol, dynamic>(const <core::Symbol, dynamic>{}))) as{TypeError} asy::Stream<self::MyFuture::T>;
diff --git a/pkg/front_end/testcases/inference/future_then_conditional_3.dart.outline.expect b/pkg/front_end/testcases/inference/future_then_conditional_3.dart.outline.expect
index 5e26f10..18f6651 100644
--- a/pkg/front_end/testcases/inference/future_then_conditional_3.dart.outline.expect
+++ b/pkg/front_end/testcases/inference/future_then_conditional_3.dart.outline.expect
@@ -18,7 +18,7 @@
     return this.{self::MyFuture::noSuchMethod}(new core::_InvocationMirror::_withType(#catchError, 0, const <core::Type>[], core::List::unmodifiable<dynamic>(<dynamic>[onError]), core::Map::unmodifiable<core::Symbol, dynamic>(<core::Symbol, dynamic>{#test: test}))) as{TypeError} asy::Future<self::MyFuture::T>;
   no-such-method-forwarder method /* from org-dartlang-sdk:///sdk/lib/async/future.dart */ whenComplete(() → asy::FutureOr<dynamic> action) → asy::Future<self::MyFuture::T>
     return this.{self::MyFuture::noSuchMethod}(new core::_InvocationMirror::_withType(#whenComplete, 0, const <core::Type>[], core::List::unmodifiable<dynamic>(<dynamic>[action]), core::Map::unmodifiable<core::Symbol, dynamic>(const <core::Symbol, dynamic>{}))) as{TypeError} asy::Future<self::MyFuture::T>;
-  no-such-method-forwarder method /* from org-dartlang-sdk:///sdk/lib/async/future.dart */ timeout(core::Duration timeLimit, {() → asy::FutureOr<self::MyFuture::T> onTimeout = null}) → asy::Future<self::MyFuture::T>
+  no-such-method-forwarder method /* from org-dartlang-sdk:///sdk/lib/async/future.dart */ timeout(core::Duration timeLimit, {generic-covariant-impl () → asy::FutureOr<self::MyFuture::T> onTimeout = null}) → asy::Future<self::MyFuture::T>
     return this.{self::MyFuture::noSuchMethod}(new core::_InvocationMirror::_withType(#timeout, 0, const <core::Type>[], core::List::unmodifiable<dynamic>(<dynamic>[timeLimit]), core::Map::unmodifiable<core::Symbol, dynamic>(<core::Symbol, dynamic>{#onTimeout: onTimeout}))) as{TypeError} asy::Future<self::MyFuture::T>;
   no-such-method-forwarder method /* from org-dartlang-sdk:///sdk/lib/async/future.dart */ asStream() → asy::Stream<self::MyFuture::T>
     return this.{self::MyFuture::noSuchMethod}(new core::_InvocationMirror::_withType(#asStream, 0, const <core::Type>[], const <dynamic>[], core::Map::unmodifiable<core::Symbol, dynamic>(const <core::Symbol, dynamic>{}))) as{TypeError} asy::Stream<self::MyFuture::T>;
diff --git a/pkg/front_end/testcases/inference/future_then_conditional_4.dart b/pkg/front_end/testcases/inference/future_then_conditional_4.dart
index f99855b..36ffafd 100644
--- a/pkg/front_end/testcases/inference/future_then_conditional_4.dart
+++ b/pkg/front_end/testcases/inference/future_then_conditional_4.dart
@@ -10,7 +10,7 @@
 class MyFuture<T> implements Future<T> {
   MyFuture() {}
   MyFuture.value(T x) {}
-  dynamic noSuchMethod(/*@topType=Invocation*/ invocation) => null;
+  dynamic noSuchMethod(invocation) => null;
   MyFuture<S> then<S>(FutureOr<S> f(T x), {Function onError}) => null;
 }
 
diff --git a/pkg/front_end/testcases/inference/future_then_conditional_4.dart.legacy.expect b/pkg/front_end/testcases/inference/future_then_conditional_4.dart.legacy.expect
index 7658f20..189b93e 100644
--- a/pkg/front_end/testcases/inference/future_then_conditional_4.dart.legacy.expect
+++ b/pkg/front_end/testcases/inference/future_then_conditional_4.dart.legacy.expect
@@ -18,7 +18,7 @@
     return this.{self::MyFuture::noSuchMethod}(new core::_InvocationMirror::_withType(#catchError, 0, const <core::Type>[], core::List::unmodifiable<dynamic>(<dynamic>[onError]), core::Map::unmodifiable<core::Symbol, dynamic>(<core::Symbol, dynamic>{#test: test}))) as{TypeError} asy::Future<self::MyFuture::T>;
   no-such-method-forwarder method /* from org-dartlang-sdk:///sdk/lib/async/future.dart */ whenComplete(() → asy::FutureOr<dynamic> action) → asy::Future<self::MyFuture::T>
     return this.{self::MyFuture::noSuchMethod}(new core::_InvocationMirror::_withType(#whenComplete, 0, const <core::Type>[], core::List::unmodifiable<dynamic>(<dynamic>[action]), core::Map::unmodifiable<core::Symbol, dynamic>(const <core::Symbol, dynamic>{}))) as{TypeError} asy::Future<self::MyFuture::T>;
-  no-such-method-forwarder method /* from org-dartlang-sdk:///sdk/lib/async/future.dart */ timeout(core::Duration timeLimit, {() → asy::FutureOr<self::MyFuture::T> onTimeout = null}) → asy::Future<self::MyFuture::T>
+  no-such-method-forwarder method /* from org-dartlang-sdk:///sdk/lib/async/future.dart */ timeout(core::Duration timeLimit, {generic-covariant-impl () → asy::FutureOr<self::MyFuture::T> onTimeout = null}) → asy::Future<self::MyFuture::T>
     return this.{self::MyFuture::noSuchMethod}(new core::_InvocationMirror::_withType(#timeout, 0, const <core::Type>[], core::List::unmodifiable<dynamic>(<dynamic>[timeLimit]), core::Map::unmodifiable<core::Symbol, dynamic>(<core::Symbol, dynamic>{#onTimeout: onTimeout}))) as{TypeError} asy::Future<self::MyFuture::T>;
   no-such-method-forwarder method /* from org-dartlang-sdk:///sdk/lib/async/future.dart */ asStream() → asy::Stream<self::MyFuture::T>
     return this.{self::MyFuture::noSuchMethod}(new core::_InvocationMirror::_withType(#asStream, 0, const <core::Type>[], const <dynamic>[], core::Map::unmodifiable<core::Symbol, dynamic>(const <core::Symbol, dynamic>{}))) as{TypeError} asy::Stream<self::MyFuture::T>;
diff --git a/pkg/front_end/testcases/inference/future_then_conditional_4.dart.legacy.transformed.expect b/pkg/front_end/testcases/inference/future_then_conditional_4.dart.legacy.transformed.expect
index 9abcfd0..4a5e294 100644
--- a/pkg/front_end/testcases/inference/future_then_conditional_4.dart.legacy.transformed.expect
+++ b/pkg/front_end/testcases/inference/future_then_conditional_4.dart.legacy.transformed.expect
@@ -18,7 +18,7 @@
     return this.{self::MyFuture::noSuchMethod}(new core::_InvocationMirror::_withType(#catchError, 0, const <core::Type>[], core::List::unmodifiable<dynamic>(<dynamic>[onError]), core::Map::unmodifiable<core::Symbol, dynamic>(<core::Symbol, dynamic>{#test: test}))) as{TypeError} asy::Future<self::MyFuture::T>;
   no-such-method-forwarder method /* from org-dartlang-sdk:///sdk/lib/async/future.dart */ whenComplete(() → asy::FutureOr<dynamic> action) → asy::Future<self::MyFuture::T>
     return this.{self::MyFuture::noSuchMethod}(new core::_InvocationMirror::_withType(#whenComplete, 0, const <core::Type>[], core::List::unmodifiable<dynamic>(<dynamic>[action]), core::Map::unmodifiable<core::Symbol, dynamic>(const <core::Symbol, dynamic>{}))) as{TypeError} asy::Future<self::MyFuture::T>;
-  no-such-method-forwarder method /* from org-dartlang-sdk:///sdk/lib/async/future.dart */ timeout(core::Duration timeLimit, {() → asy::FutureOr<self::MyFuture::T> onTimeout = null}) → asy::Future<self::MyFuture::T>
+  no-such-method-forwarder method /* from org-dartlang-sdk:///sdk/lib/async/future.dart */ timeout(core::Duration timeLimit, {generic-covariant-impl () → asy::FutureOr<self::MyFuture::T> onTimeout = null}) → asy::Future<self::MyFuture::T>
     return this.{self::MyFuture::noSuchMethod}(new core::_InvocationMirror::_withType(#timeout, 0, const <core::Type>[], core::List::unmodifiable<dynamic>(<dynamic>[timeLimit]), core::Map::unmodifiable<core::Symbol, dynamic>(<core::Symbol, dynamic>{#onTimeout: onTimeout}))) as{TypeError} asy::Future<self::MyFuture::T>;
   no-such-method-forwarder method /* from org-dartlang-sdk:///sdk/lib/async/future.dart */ asStream() → asy::Stream<self::MyFuture::T>
     return this.{self::MyFuture::noSuchMethod}(new core::_InvocationMirror::_withType(#asStream, 0, const <core::Type>[], const <dynamic>[], core::Map::unmodifiable<core::Symbol, dynamic>(const <core::Symbol, dynamic>{}))) as{TypeError} asy::Stream<self::MyFuture::T>;
diff --git a/pkg/front_end/testcases/inference/future_then_conditional_4.dart.outline.expect b/pkg/front_end/testcases/inference/future_then_conditional_4.dart.outline.expect
index 5e26f10..18f6651 100644
--- a/pkg/front_end/testcases/inference/future_then_conditional_4.dart.outline.expect
+++ b/pkg/front_end/testcases/inference/future_then_conditional_4.dart.outline.expect
@@ -18,7 +18,7 @@
     return this.{self::MyFuture::noSuchMethod}(new core::_InvocationMirror::_withType(#catchError, 0, const <core::Type>[], core::List::unmodifiable<dynamic>(<dynamic>[onError]), core::Map::unmodifiable<core::Symbol, dynamic>(<core::Symbol, dynamic>{#test: test}))) as{TypeError} asy::Future<self::MyFuture::T>;
   no-such-method-forwarder method /* from org-dartlang-sdk:///sdk/lib/async/future.dart */ whenComplete(() → asy::FutureOr<dynamic> action) → asy::Future<self::MyFuture::T>
     return this.{self::MyFuture::noSuchMethod}(new core::_InvocationMirror::_withType(#whenComplete, 0, const <core::Type>[], core::List::unmodifiable<dynamic>(<dynamic>[action]), core::Map::unmodifiable<core::Symbol, dynamic>(const <core::Symbol, dynamic>{}))) as{TypeError} asy::Future<self::MyFuture::T>;
-  no-such-method-forwarder method /* from org-dartlang-sdk:///sdk/lib/async/future.dart */ timeout(core::Duration timeLimit, {() → asy::FutureOr<self::MyFuture::T> onTimeout = null}) → asy::Future<self::MyFuture::T>
+  no-such-method-forwarder method /* from org-dartlang-sdk:///sdk/lib/async/future.dart */ timeout(core::Duration timeLimit, {generic-covariant-impl () → asy::FutureOr<self::MyFuture::T> onTimeout = null}) → asy::Future<self::MyFuture::T>
     return this.{self::MyFuture::noSuchMethod}(new core::_InvocationMirror::_withType(#timeout, 0, const <core::Type>[], core::List::unmodifiable<dynamic>(<dynamic>[timeLimit]), core::Map::unmodifiable<core::Symbol, dynamic>(<core::Symbol, dynamic>{#onTimeout: onTimeout}))) as{TypeError} asy::Future<self::MyFuture::T>;
   no-such-method-forwarder method /* from org-dartlang-sdk:///sdk/lib/async/future.dart */ asStream() → asy::Stream<self::MyFuture::T>
     return this.{self::MyFuture::noSuchMethod}(new core::_InvocationMirror::_withType(#asStream, 0, const <core::Type>[], const <dynamic>[], core::Map::unmodifiable<core::Symbol, dynamic>(const <core::Symbol, dynamic>{}))) as{TypeError} asy::Stream<self::MyFuture::T>;
diff --git a/pkg/front_end/testcases/inference/future_then_conditional_5.dart b/pkg/front_end/testcases/inference/future_then_conditional_5.dart
index 7520121..52dc987 100644
--- a/pkg/front_end/testcases/inference/future_then_conditional_5.dart
+++ b/pkg/front_end/testcases/inference/future_then_conditional_5.dart
@@ -10,7 +10,7 @@
 class MyFuture<T> implements Future<T> {
   MyFuture() {}
   MyFuture.value(T x) {}
-  dynamic noSuchMethod(/*@topType=Invocation*/ invocation) => null;
+  dynamic noSuchMethod(invocation) => null;
   MyFuture<S> then<S>(FutureOr<S> f(T x), {Function onError}) => null;
 }
 
diff --git a/pkg/front_end/testcases/inference/future_then_conditional_5.dart.legacy.expect b/pkg/front_end/testcases/inference/future_then_conditional_5.dart.legacy.expect
index 09a4b7b..8b21e2e 100644
--- a/pkg/front_end/testcases/inference/future_then_conditional_5.dart.legacy.expect
+++ b/pkg/front_end/testcases/inference/future_then_conditional_5.dart.legacy.expect
@@ -18,7 +18,7 @@
     return this.{self::MyFuture::noSuchMethod}(new core::_InvocationMirror::_withType(#catchError, 0, const <core::Type>[], core::List::unmodifiable<dynamic>(<dynamic>[onError]), core::Map::unmodifiable<core::Symbol, dynamic>(<core::Symbol, dynamic>{#test: test}))) as{TypeError} asy::Future<self::MyFuture::T>;
   no-such-method-forwarder method /* from org-dartlang-sdk:///sdk/lib/async/future.dart */ whenComplete(() → asy::FutureOr<dynamic> action) → asy::Future<self::MyFuture::T>
     return this.{self::MyFuture::noSuchMethod}(new core::_InvocationMirror::_withType(#whenComplete, 0, const <core::Type>[], core::List::unmodifiable<dynamic>(<dynamic>[action]), core::Map::unmodifiable<core::Symbol, dynamic>(const <core::Symbol, dynamic>{}))) as{TypeError} asy::Future<self::MyFuture::T>;
-  no-such-method-forwarder method /* from org-dartlang-sdk:///sdk/lib/async/future.dart */ timeout(core::Duration timeLimit, {() → asy::FutureOr<self::MyFuture::T> onTimeout = null}) → asy::Future<self::MyFuture::T>
+  no-such-method-forwarder method /* from org-dartlang-sdk:///sdk/lib/async/future.dart */ timeout(core::Duration timeLimit, {generic-covariant-impl () → asy::FutureOr<self::MyFuture::T> onTimeout = null}) → asy::Future<self::MyFuture::T>
     return this.{self::MyFuture::noSuchMethod}(new core::_InvocationMirror::_withType(#timeout, 0, const <core::Type>[], core::List::unmodifiable<dynamic>(<dynamic>[timeLimit]), core::Map::unmodifiable<core::Symbol, dynamic>(<core::Symbol, dynamic>{#onTimeout: onTimeout}))) as{TypeError} asy::Future<self::MyFuture::T>;
   no-such-method-forwarder method /* from org-dartlang-sdk:///sdk/lib/async/future.dart */ asStream() → asy::Stream<self::MyFuture::T>
     return this.{self::MyFuture::noSuchMethod}(new core::_InvocationMirror::_withType(#asStream, 0, const <core::Type>[], const <dynamic>[], core::Map::unmodifiable<core::Symbol, dynamic>(const <core::Symbol, dynamic>{}))) as{TypeError} asy::Stream<self::MyFuture::T>;
diff --git a/pkg/front_end/testcases/inference/future_then_conditional_5.dart.legacy.transformed.expect b/pkg/front_end/testcases/inference/future_then_conditional_5.dart.legacy.transformed.expect
index 2f416f7..e5e7c73 100644
--- a/pkg/front_end/testcases/inference/future_then_conditional_5.dart.legacy.transformed.expect
+++ b/pkg/front_end/testcases/inference/future_then_conditional_5.dart.legacy.transformed.expect
@@ -18,7 +18,7 @@
     return this.{self::MyFuture::noSuchMethod}(new core::_InvocationMirror::_withType(#catchError, 0, const <core::Type>[], core::List::unmodifiable<dynamic>(<dynamic>[onError]), core::Map::unmodifiable<core::Symbol, dynamic>(<core::Symbol, dynamic>{#test: test}))) as{TypeError} asy::Future<self::MyFuture::T>;
   no-such-method-forwarder method /* from org-dartlang-sdk:///sdk/lib/async/future.dart */ whenComplete(() → asy::FutureOr<dynamic> action) → asy::Future<self::MyFuture::T>
     return this.{self::MyFuture::noSuchMethod}(new core::_InvocationMirror::_withType(#whenComplete, 0, const <core::Type>[], core::List::unmodifiable<dynamic>(<dynamic>[action]), core::Map::unmodifiable<core::Symbol, dynamic>(const <core::Symbol, dynamic>{}))) as{TypeError} asy::Future<self::MyFuture::T>;
-  no-such-method-forwarder method /* from org-dartlang-sdk:///sdk/lib/async/future.dart */ timeout(core::Duration timeLimit, {() → asy::FutureOr<self::MyFuture::T> onTimeout = null}) → asy::Future<self::MyFuture::T>
+  no-such-method-forwarder method /* from org-dartlang-sdk:///sdk/lib/async/future.dart */ timeout(core::Duration timeLimit, {generic-covariant-impl () → asy::FutureOr<self::MyFuture::T> onTimeout = null}) → asy::Future<self::MyFuture::T>
     return this.{self::MyFuture::noSuchMethod}(new core::_InvocationMirror::_withType(#timeout, 0, const <core::Type>[], core::List::unmodifiable<dynamic>(<dynamic>[timeLimit]), core::Map::unmodifiable<core::Symbol, dynamic>(<core::Symbol, dynamic>{#onTimeout: onTimeout}))) as{TypeError} asy::Future<self::MyFuture::T>;
   no-such-method-forwarder method /* from org-dartlang-sdk:///sdk/lib/async/future.dart */ asStream() → asy::Stream<self::MyFuture::T>
     return this.{self::MyFuture::noSuchMethod}(new core::_InvocationMirror::_withType(#asStream, 0, const <core::Type>[], const <dynamic>[], core::Map::unmodifiable<core::Symbol, dynamic>(const <core::Symbol, dynamic>{}))) as{TypeError} asy::Stream<self::MyFuture::T>;
diff --git a/pkg/front_end/testcases/inference/future_then_conditional_5.dart.outline.expect b/pkg/front_end/testcases/inference/future_then_conditional_5.dart.outline.expect
index 5e26f10..18f6651 100644
--- a/pkg/front_end/testcases/inference/future_then_conditional_5.dart.outline.expect
+++ b/pkg/front_end/testcases/inference/future_then_conditional_5.dart.outline.expect
@@ -18,7 +18,7 @@
     return this.{self::MyFuture::noSuchMethod}(new core::_InvocationMirror::_withType(#catchError, 0, const <core::Type>[], core::List::unmodifiable<dynamic>(<dynamic>[onError]), core::Map::unmodifiable<core::Symbol, dynamic>(<core::Symbol, dynamic>{#test: test}))) as{TypeError} asy::Future<self::MyFuture::T>;
   no-such-method-forwarder method /* from org-dartlang-sdk:///sdk/lib/async/future.dart */ whenComplete(() → asy::FutureOr<dynamic> action) → asy::Future<self::MyFuture::T>
     return this.{self::MyFuture::noSuchMethod}(new core::_InvocationMirror::_withType(#whenComplete, 0, const <core::Type>[], core::List::unmodifiable<dynamic>(<dynamic>[action]), core::Map::unmodifiable<core::Symbol, dynamic>(const <core::Symbol, dynamic>{}))) as{TypeError} asy::Future<self::MyFuture::T>;
-  no-such-method-forwarder method /* from org-dartlang-sdk:///sdk/lib/async/future.dart */ timeout(core::Duration timeLimit, {() → asy::FutureOr<self::MyFuture::T> onTimeout = null}) → asy::Future<self::MyFuture::T>
+  no-such-method-forwarder method /* from org-dartlang-sdk:///sdk/lib/async/future.dart */ timeout(core::Duration timeLimit, {generic-covariant-impl () → asy::FutureOr<self::MyFuture::T> onTimeout = null}) → asy::Future<self::MyFuture::T>
     return this.{self::MyFuture::noSuchMethod}(new core::_InvocationMirror::_withType(#timeout, 0, const <core::Type>[], core::List::unmodifiable<dynamic>(<dynamic>[timeLimit]), core::Map::unmodifiable<core::Symbol, dynamic>(<core::Symbol, dynamic>{#onTimeout: onTimeout}))) as{TypeError} asy::Future<self::MyFuture::T>;
   no-such-method-forwarder method /* from org-dartlang-sdk:///sdk/lib/async/future.dart */ asStream() → asy::Stream<self::MyFuture::T>
     return this.{self::MyFuture::noSuchMethod}(new core::_InvocationMirror::_withType(#asStream, 0, const <core::Type>[], const <dynamic>[], core::Map::unmodifiable<core::Symbol, dynamic>(const <core::Symbol, dynamic>{}))) as{TypeError} asy::Stream<self::MyFuture::T>;
diff --git a/pkg/front_end/testcases/inference/future_then_conditional_6.dart b/pkg/front_end/testcases/inference/future_then_conditional_6.dart
index b5d6508..b89a28b 100644
--- a/pkg/front_end/testcases/inference/future_then_conditional_6.dart
+++ b/pkg/front_end/testcases/inference/future_then_conditional_6.dart
@@ -10,7 +10,7 @@
 class MyFuture<T> implements Future<T> {
   MyFuture() {}
   MyFuture.value(T x) {}
-  dynamic noSuchMethod(/*@topType=Invocation*/ invocation) => null;
+  dynamic noSuchMethod(invocation) => null;
   MyFuture<S> then<S>(FutureOr<S> f(T x), {Function onError}) => null;
 }
 
diff --git a/pkg/front_end/testcases/inference/future_then_conditional_6.dart.legacy.expect b/pkg/front_end/testcases/inference/future_then_conditional_6.dart.legacy.expect
index 24ff832..d4392fe 100644
--- a/pkg/front_end/testcases/inference/future_then_conditional_6.dart.legacy.expect
+++ b/pkg/front_end/testcases/inference/future_then_conditional_6.dart.legacy.expect
@@ -18,7 +18,7 @@
     return this.{self::MyFuture::noSuchMethod}(new core::_InvocationMirror::_withType(#catchError, 0, const <core::Type>[], core::List::unmodifiable<dynamic>(<dynamic>[onError]), core::Map::unmodifiable<core::Symbol, dynamic>(<core::Symbol, dynamic>{#test: test}))) as{TypeError} asy::Future<self::MyFuture::T>;
   no-such-method-forwarder method /* from org-dartlang-sdk:///sdk/lib/async/future.dart */ whenComplete(() → asy::FutureOr<dynamic> action) → asy::Future<self::MyFuture::T>
     return this.{self::MyFuture::noSuchMethod}(new core::_InvocationMirror::_withType(#whenComplete, 0, const <core::Type>[], core::List::unmodifiable<dynamic>(<dynamic>[action]), core::Map::unmodifiable<core::Symbol, dynamic>(const <core::Symbol, dynamic>{}))) as{TypeError} asy::Future<self::MyFuture::T>;
-  no-such-method-forwarder method /* from org-dartlang-sdk:///sdk/lib/async/future.dart */ timeout(core::Duration timeLimit, {() → asy::FutureOr<self::MyFuture::T> onTimeout = null}) → asy::Future<self::MyFuture::T>
+  no-such-method-forwarder method /* from org-dartlang-sdk:///sdk/lib/async/future.dart */ timeout(core::Duration timeLimit, {generic-covariant-impl () → asy::FutureOr<self::MyFuture::T> onTimeout = null}) → asy::Future<self::MyFuture::T>
     return this.{self::MyFuture::noSuchMethod}(new core::_InvocationMirror::_withType(#timeout, 0, const <core::Type>[], core::List::unmodifiable<dynamic>(<dynamic>[timeLimit]), core::Map::unmodifiable<core::Symbol, dynamic>(<core::Symbol, dynamic>{#onTimeout: onTimeout}))) as{TypeError} asy::Future<self::MyFuture::T>;
   no-such-method-forwarder method /* from org-dartlang-sdk:///sdk/lib/async/future.dart */ asStream() → asy::Stream<self::MyFuture::T>
     return this.{self::MyFuture::noSuchMethod}(new core::_InvocationMirror::_withType(#asStream, 0, const <core::Type>[], const <dynamic>[], core::Map::unmodifiable<core::Symbol, dynamic>(const <core::Symbol, dynamic>{}))) as{TypeError} asy::Stream<self::MyFuture::T>;
diff --git a/pkg/front_end/testcases/inference/future_then_conditional_6.dart.legacy.transformed.expect b/pkg/front_end/testcases/inference/future_then_conditional_6.dart.legacy.transformed.expect
index 65684a7..fecb72e 100644
--- a/pkg/front_end/testcases/inference/future_then_conditional_6.dart.legacy.transformed.expect
+++ b/pkg/front_end/testcases/inference/future_then_conditional_6.dart.legacy.transformed.expect
@@ -18,7 +18,7 @@
     return this.{self::MyFuture::noSuchMethod}(new core::_InvocationMirror::_withType(#catchError, 0, const <core::Type>[], core::List::unmodifiable<dynamic>(<dynamic>[onError]), core::Map::unmodifiable<core::Symbol, dynamic>(<core::Symbol, dynamic>{#test: test}))) as{TypeError} asy::Future<self::MyFuture::T>;
   no-such-method-forwarder method /* from org-dartlang-sdk:///sdk/lib/async/future.dart */ whenComplete(() → asy::FutureOr<dynamic> action) → asy::Future<self::MyFuture::T>
     return this.{self::MyFuture::noSuchMethod}(new core::_InvocationMirror::_withType(#whenComplete, 0, const <core::Type>[], core::List::unmodifiable<dynamic>(<dynamic>[action]), core::Map::unmodifiable<core::Symbol, dynamic>(const <core::Symbol, dynamic>{}))) as{TypeError} asy::Future<self::MyFuture::T>;
-  no-such-method-forwarder method /* from org-dartlang-sdk:///sdk/lib/async/future.dart */ timeout(core::Duration timeLimit, {() → asy::FutureOr<self::MyFuture::T> onTimeout = null}) → asy::Future<self::MyFuture::T>
+  no-such-method-forwarder method /* from org-dartlang-sdk:///sdk/lib/async/future.dart */ timeout(core::Duration timeLimit, {generic-covariant-impl () → asy::FutureOr<self::MyFuture::T> onTimeout = null}) → asy::Future<self::MyFuture::T>
     return this.{self::MyFuture::noSuchMethod}(new core::_InvocationMirror::_withType(#timeout, 0, const <core::Type>[], core::List::unmodifiable<dynamic>(<dynamic>[timeLimit]), core::Map::unmodifiable<core::Symbol, dynamic>(<core::Symbol, dynamic>{#onTimeout: onTimeout}))) as{TypeError} asy::Future<self::MyFuture::T>;
   no-such-method-forwarder method /* from org-dartlang-sdk:///sdk/lib/async/future.dart */ asStream() → asy::Stream<self::MyFuture::T>
     return this.{self::MyFuture::noSuchMethod}(new core::_InvocationMirror::_withType(#asStream, 0, const <core::Type>[], const <dynamic>[], core::Map::unmodifiable<core::Symbol, dynamic>(const <core::Symbol, dynamic>{}))) as{TypeError} asy::Stream<self::MyFuture::T>;
diff --git a/pkg/front_end/testcases/inference/future_then_conditional_6.dart.outline.expect b/pkg/front_end/testcases/inference/future_then_conditional_6.dart.outline.expect
index 5e26f10..18f6651 100644
--- a/pkg/front_end/testcases/inference/future_then_conditional_6.dart.outline.expect
+++ b/pkg/front_end/testcases/inference/future_then_conditional_6.dart.outline.expect
@@ -18,7 +18,7 @@
     return this.{self::MyFuture::noSuchMethod}(new core::_InvocationMirror::_withType(#catchError, 0, const <core::Type>[], core::List::unmodifiable<dynamic>(<dynamic>[onError]), core::Map::unmodifiable<core::Symbol, dynamic>(<core::Symbol, dynamic>{#test: test}))) as{TypeError} asy::Future<self::MyFuture::T>;
   no-such-method-forwarder method /* from org-dartlang-sdk:///sdk/lib/async/future.dart */ whenComplete(() → asy::FutureOr<dynamic> action) → asy::Future<self::MyFuture::T>
     return this.{self::MyFuture::noSuchMethod}(new core::_InvocationMirror::_withType(#whenComplete, 0, const <core::Type>[], core::List::unmodifiable<dynamic>(<dynamic>[action]), core::Map::unmodifiable<core::Symbol, dynamic>(const <core::Symbol, dynamic>{}))) as{TypeError} asy::Future<self::MyFuture::T>;
-  no-such-method-forwarder method /* from org-dartlang-sdk:///sdk/lib/async/future.dart */ timeout(core::Duration timeLimit, {() → asy::FutureOr<self::MyFuture::T> onTimeout = null}) → asy::Future<self::MyFuture::T>
+  no-such-method-forwarder method /* from org-dartlang-sdk:///sdk/lib/async/future.dart */ timeout(core::Duration timeLimit, {generic-covariant-impl () → asy::FutureOr<self::MyFuture::T> onTimeout = null}) → asy::Future<self::MyFuture::T>
     return this.{self::MyFuture::noSuchMethod}(new core::_InvocationMirror::_withType(#timeout, 0, const <core::Type>[], core::List::unmodifiable<dynamic>(<dynamic>[timeLimit]), core::Map::unmodifiable<core::Symbol, dynamic>(<core::Symbol, dynamic>{#onTimeout: onTimeout}))) as{TypeError} asy::Future<self::MyFuture::T>;
   no-such-method-forwarder method /* from org-dartlang-sdk:///sdk/lib/async/future.dart */ asStream() → asy::Stream<self::MyFuture::T>
     return this.{self::MyFuture::noSuchMethod}(new core::_InvocationMirror::_withType(#asStream, 0, const <core::Type>[], const <dynamic>[], core::Map::unmodifiable<core::Symbol, dynamic>(const <core::Symbol, dynamic>{}))) as{TypeError} asy::Stream<self::MyFuture::T>;
diff --git a/pkg/front_end/testcases/inference/future_then_ifNull.dart b/pkg/front_end/testcases/inference/future_then_ifNull.dart
index 96695d4..c399f90 100644
--- a/pkg/front_end/testcases/inference/future_then_ifNull.dart
+++ b/pkg/front_end/testcases/inference/future_then_ifNull.dart
@@ -10,7 +10,7 @@
 class MyFuture<T> implements Future<T> {
   MyFuture() {}
   MyFuture.value(T x) {}
-  dynamic noSuchMethod(/*@topType=Invocation*/ invocation) => null;
+  dynamic noSuchMethod(invocation) => null;
   MyFuture<S> then<S>(FutureOr<S> f(T x), {Function onError}) => null;
 }
 
diff --git a/pkg/front_end/testcases/inference/future_then_ifNull.dart.legacy.expect b/pkg/front_end/testcases/inference/future_then_ifNull.dart.legacy.expect
index 57222ab..985e5ba 100644
--- a/pkg/front_end/testcases/inference/future_then_ifNull.dart.legacy.expect
+++ b/pkg/front_end/testcases/inference/future_then_ifNull.dart.legacy.expect
@@ -18,7 +18,7 @@
     return this.{self::MyFuture::noSuchMethod}(new core::_InvocationMirror::_withType(#catchError, 0, const <core::Type>[], core::List::unmodifiable<dynamic>(<dynamic>[onError]), core::Map::unmodifiable<core::Symbol, dynamic>(<core::Symbol, dynamic>{#test: test}))) as{TypeError} asy::Future<self::MyFuture::T>;
   no-such-method-forwarder method /* from org-dartlang-sdk:///sdk/lib/async/future.dart */ whenComplete(() → asy::FutureOr<dynamic> action) → asy::Future<self::MyFuture::T>
     return this.{self::MyFuture::noSuchMethod}(new core::_InvocationMirror::_withType(#whenComplete, 0, const <core::Type>[], core::List::unmodifiable<dynamic>(<dynamic>[action]), core::Map::unmodifiable<core::Symbol, dynamic>(const <core::Symbol, dynamic>{}))) as{TypeError} asy::Future<self::MyFuture::T>;
-  no-such-method-forwarder method /* from org-dartlang-sdk:///sdk/lib/async/future.dart */ timeout(core::Duration timeLimit, {() → asy::FutureOr<self::MyFuture::T> onTimeout = null}) → asy::Future<self::MyFuture::T>
+  no-such-method-forwarder method /* from org-dartlang-sdk:///sdk/lib/async/future.dart */ timeout(core::Duration timeLimit, {generic-covariant-impl () → asy::FutureOr<self::MyFuture::T> onTimeout = null}) → asy::Future<self::MyFuture::T>
     return this.{self::MyFuture::noSuchMethod}(new core::_InvocationMirror::_withType(#timeout, 0, const <core::Type>[], core::List::unmodifiable<dynamic>(<dynamic>[timeLimit]), core::Map::unmodifiable<core::Symbol, dynamic>(<core::Symbol, dynamic>{#onTimeout: onTimeout}))) as{TypeError} asy::Future<self::MyFuture::T>;
   no-such-method-forwarder method /* from org-dartlang-sdk:///sdk/lib/async/future.dart */ asStream() → asy::Stream<self::MyFuture::T>
     return this.{self::MyFuture::noSuchMethod}(new core::_InvocationMirror::_withType(#asStream, 0, const <core::Type>[], const <dynamic>[], core::Map::unmodifiable<core::Symbol, dynamic>(const <core::Symbol, dynamic>{}))) as{TypeError} asy::Stream<self::MyFuture::T>;
diff --git a/pkg/front_end/testcases/inference/future_then_ifNull.dart.legacy.transformed.expect b/pkg/front_end/testcases/inference/future_then_ifNull.dart.legacy.transformed.expect
index 557fab9..f3c12bb 100644
--- a/pkg/front_end/testcases/inference/future_then_ifNull.dart.legacy.transformed.expect
+++ b/pkg/front_end/testcases/inference/future_then_ifNull.dart.legacy.transformed.expect
@@ -18,7 +18,7 @@
     return this.{self::MyFuture::noSuchMethod}(new core::_InvocationMirror::_withType(#catchError, 0, const <core::Type>[], core::List::unmodifiable<dynamic>(<dynamic>[onError]), core::Map::unmodifiable<core::Symbol, dynamic>(<core::Symbol, dynamic>{#test: test}))) as{TypeError} asy::Future<self::MyFuture::T>;
   no-such-method-forwarder method /* from org-dartlang-sdk:///sdk/lib/async/future.dart */ whenComplete(() → asy::FutureOr<dynamic> action) → asy::Future<self::MyFuture::T>
     return this.{self::MyFuture::noSuchMethod}(new core::_InvocationMirror::_withType(#whenComplete, 0, const <core::Type>[], core::List::unmodifiable<dynamic>(<dynamic>[action]), core::Map::unmodifiable<core::Symbol, dynamic>(const <core::Symbol, dynamic>{}))) as{TypeError} asy::Future<self::MyFuture::T>;
-  no-such-method-forwarder method /* from org-dartlang-sdk:///sdk/lib/async/future.dart */ timeout(core::Duration timeLimit, {() → asy::FutureOr<self::MyFuture::T> onTimeout = null}) → asy::Future<self::MyFuture::T>
+  no-such-method-forwarder method /* from org-dartlang-sdk:///sdk/lib/async/future.dart */ timeout(core::Duration timeLimit, {generic-covariant-impl () → asy::FutureOr<self::MyFuture::T> onTimeout = null}) → asy::Future<self::MyFuture::T>
     return this.{self::MyFuture::noSuchMethod}(new core::_InvocationMirror::_withType(#timeout, 0, const <core::Type>[], core::List::unmodifiable<dynamic>(<dynamic>[timeLimit]), core::Map::unmodifiable<core::Symbol, dynamic>(<core::Symbol, dynamic>{#onTimeout: onTimeout}))) as{TypeError} asy::Future<self::MyFuture::T>;
   no-such-method-forwarder method /* from org-dartlang-sdk:///sdk/lib/async/future.dart */ asStream() → asy::Stream<self::MyFuture::T>
     return this.{self::MyFuture::noSuchMethod}(new core::_InvocationMirror::_withType(#asStream, 0, const <core::Type>[], const <dynamic>[], core::Map::unmodifiable<core::Symbol, dynamic>(const <core::Symbol, dynamic>{}))) as{TypeError} asy::Stream<self::MyFuture::T>;
diff --git a/pkg/front_end/testcases/inference/future_then_ifNull.dart.outline.expect b/pkg/front_end/testcases/inference/future_then_ifNull.dart.outline.expect
index 5e26f10..18f6651 100644
--- a/pkg/front_end/testcases/inference/future_then_ifNull.dart.outline.expect
+++ b/pkg/front_end/testcases/inference/future_then_ifNull.dart.outline.expect
@@ -18,7 +18,7 @@
     return this.{self::MyFuture::noSuchMethod}(new core::_InvocationMirror::_withType(#catchError, 0, const <core::Type>[], core::List::unmodifiable<dynamic>(<dynamic>[onError]), core::Map::unmodifiable<core::Symbol, dynamic>(<core::Symbol, dynamic>{#test: test}))) as{TypeError} asy::Future<self::MyFuture::T>;
   no-such-method-forwarder method /* from org-dartlang-sdk:///sdk/lib/async/future.dart */ whenComplete(() → asy::FutureOr<dynamic> action) → asy::Future<self::MyFuture::T>
     return this.{self::MyFuture::noSuchMethod}(new core::_InvocationMirror::_withType(#whenComplete, 0, const <core::Type>[], core::List::unmodifiable<dynamic>(<dynamic>[action]), core::Map::unmodifiable<core::Symbol, dynamic>(const <core::Symbol, dynamic>{}))) as{TypeError} asy::Future<self::MyFuture::T>;
-  no-such-method-forwarder method /* from org-dartlang-sdk:///sdk/lib/async/future.dart */ timeout(core::Duration timeLimit, {() → asy::FutureOr<self::MyFuture::T> onTimeout = null}) → asy::Future<self::MyFuture::T>
+  no-such-method-forwarder method /* from org-dartlang-sdk:///sdk/lib/async/future.dart */ timeout(core::Duration timeLimit, {generic-covariant-impl () → asy::FutureOr<self::MyFuture::T> onTimeout = null}) → asy::Future<self::MyFuture::T>
     return this.{self::MyFuture::noSuchMethod}(new core::_InvocationMirror::_withType(#timeout, 0, const <core::Type>[], core::List::unmodifiable<dynamic>(<dynamic>[timeLimit]), core::Map::unmodifiable<core::Symbol, dynamic>(<core::Symbol, dynamic>{#onTimeout: onTimeout}))) as{TypeError} asy::Future<self::MyFuture::T>;
   no-such-method-forwarder method /* from org-dartlang-sdk:///sdk/lib/async/future.dart */ asStream() → asy::Stream<self::MyFuture::T>
     return this.{self::MyFuture::noSuchMethod}(new core::_InvocationMirror::_withType(#asStream, 0, const <core::Type>[], const <dynamic>[], core::Map::unmodifiable<core::Symbol, dynamic>(const <core::Symbol, dynamic>{}))) as{TypeError} asy::Stream<self::MyFuture::T>;
diff --git a/pkg/front_end/testcases/inference/future_then_upwards.dart b/pkg/front_end/testcases/inference/future_then_upwards.dart
index 1a770e9..9c33569 100644
--- a/pkg/front_end/testcases/inference/future_then_upwards.dart
+++ b/pkg/front_end/testcases/inference/future_then_upwards.dart
@@ -10,7 +10,7 @@
 class MyFuture<T> implements Future<T> {
   MyFuture() {}
   MyFuture.value(T x) {}
-  dynamic noSuchMethod(/*@topType=Invocation*/ invocation) => null;
+  dynamic noSuchMethod(invocation) => null;
   MyFuture<S> then<S>(FutureOr<S> f(T x), {Function onError}) => null;
 }
 
diff --git a/pkg/front_end/testcases/inference/future_then_upwards.dart.legacy.expect b/pkg/front_end/testcases/inference/future_then_upwards.dart.legacy.expect
index 3b3f456..c454264 100644
--- a/pkg/front_end/testcases/inference/future_then_upwards.dart.legacy.expect
+++ b/pkg/front_end/testcases/inference/future_then_upwards.dart.legacy.expect
@@ -18,7 +18,7 @@
     return this.{self::MyFuture::noSuchMethod}(new core::_InvocationMirror::_withType(#catchError, 0, const <core::Type>[], core::List::unmodifiable<dynamic>(<dynamic>[onError]), core::Map::unmodifiable<core::Symbol, dynamic>(<core::Symbol, dynamic>{#test: test}))) as{TypeError} asy::Future<self::MyFuture::T>;
   no-such-method-forwarder method /* from org-dartlang-sdk:///sdk/lib/async/future.dart */ whenComplete(() → asy::FutureOr<dynamic> action) → asy::Future<self::MyFuture::T>
     return this.{self::MyFuture::noSuchMethod}(new core::_InvocationMirror::_withType(#whenComplete, 0, const <core::Type>[], core::List::unmodifiable<dynamic>(<dynamic>[action]), core::Map::unmodifiable<core::Symbol, dynamic>(const <core::Symbol, dynamic>{}))) as{TypeError} asy::Future<self::MyFuture::T>;
-  no-such-method-forwarder method /* from org-dartlang-sdk:///sdk/lib/async/future.dart */ timeout(core::Duration timeLimit, {() → asy::FutureOr<self::MyFuture::T> onTimeout = null}) → asy::Future<self::MyFuture::T>
+  no-such-method-forwarder method /* from org-dartlang-sdk:///sdk/lib/async/future.dart */ timeout(core::Duration timeLimit, {generic-covariant-impl () → asy::FutureOr<self::MyFuture::T> onTimeout = null}) → asy::Future<self::MyFuture::T>
     return this.{self::MyFuture::noSuchMethod}(new core::_InvocationMirror::_withType(#timeout, 0, const <core::Type>[], core::List::unmodifiable<dynamic>(<dynamic>[timeLimit]), core::Map::unmodifiable<core::Symbol, dynamic>(<core::Symbol, dynamic>{#onTimeout: onTimeout}))) as{TypeError} asy::Future<self::MyFuture::T>;
   no-such-method-forwarder method /* from org-dartlang-sdk:///sdk/lib/async/future.dart */ asStream() → asy::Stream<self::MyFuture::T>
     return this.{self::MyFuture::noSuchMethod}(new core::_InvocationMirror::_withType(#asStream, 0, const <core::Type>[], const <dynamic>[], core::Map::unmodifiable<core::Symbol, dynamic>(const <core::Symbol, dynamic>{}))) as{TypeError} asy::Stream<self::MyFuture::T>;
diff --git a/pkg/front_end/testcases/inference/future_then_upwards.dart.legacy.transformed.expect b/pkg/front_end/testcases/inference/future_then_upwards.dart.legacy.transformed.expect
index 3b3f456..c454264 100644
--- a/pkg/front_end/testcases/inference/future_then_upwards.dart.legacy.transformed.expect
+++ b/pkg/front_end/testcases/inference/future_then_upwards.dart.legacy.transformed.expect
@@ -18,7 +18,7 @@
     return this.{self::MyFuture::noSuchMethod}(new core::_InvocationMirror::_withType(#catchError, 0, const <core::Type>[], core::List::unmodifiable<dynamic>(<dynamic>[onError]), core::Map::unmodifiable<core::Symbol, dynamic>(<core::Symbol, dynamic>{#test: test}))) as{TypeError} asy::Future<self::MyFuture::T>;
   no-such-method-forwarder method /* from org-dartlang-sdk:///sdk/lib/async/future.dart */ whenComplete(() → asy::FutureOr<dynamic> action) → asy::Future<self::MyFuture::T>
     return this.{self::MyFuture::noSuchMethod}(new core::_InvocationMirror::_withType(#whenComplete, 0, const <core::Type>[], core::List::unmodifiable<dynamic>(<dynamic>[action]), core::Map::unmodifiable<core::Symbol, dynamic>(const <core::Symbol, dynamic>{}))) as{TypeError} asy::Future<self::MyFuture::T>;
-  no-such-method-forwarder method /* from org-dartlang-sdk:///sdk/lib/async/future.dart */ timeout(core::Duration timeLimit, {() → asy::FutureOr<self::MyFuture::T> onTimeout = null}) → asy::Future<self::MyFuture::T>
+  no-such-method-forwarder method /* from org-dartlang-sdk:///sdk/lib/async/future.dart */ timeout(core::Duration timeLimit, {generic-covariant-impl () → asy::FutureOr<self::MyFuture::T> onTimeout = null}) → asy::Future<self::MyFuture::T>
     return this.{self::MyFuture::noSuchMethod}(new core::_InvocationMirror::_withType(#timeout, 0, const <core::Type>[], core::List::unmodifiable<dynamic>(<dynamic>[timeLimit]), core::Map::unmodifiable<core::Symbol, dynamic>(<core::Symbol, dynamic>{#onTimeout: onTimeout}))) as{TypeError} asy::Future<self::MyFuture::T>;
   no-such-method-forwarder method /* from org-dartlang-sdk:///sdk/lib/async/future.dart */ asStream() → asy::Stream<self::MyFuture::T>
     return this.{self::MyFuture::noSuchMethod}(new core::_InvocationMirror::_withType(#asStream, 0, const <core::Type>[], const <dynamic>[], core::Map::unmodifiable<core::Symbol, dynamic>(const <core::Symbol, dynamic>{}))) as{TypeError} asy::Stream<self::MyFuture::T>;
diff --git a/pkg/front_end/testcases/inference/future_then_upwards.dart.outline.expect b/pkg/front_end/testcases/inference/future_then_upwards.dart.outline.expect
index e9cb911..e5a534c 100644
--- a/pkg/front_end/testcases/inference/future_then_upwards.dart.outline.expect
+++ b/pkg/front_end/testcases/inference/future_then_upwards.dart.outline.expect
@@ -18,7 +18,7 @@
     return this.{self::MyFuture::noSuchMethod}(new core::_InvocationMirror::_withType(#catchError, 0, const <core::Type>[], core::List::unmodifiable<dynamic>(<dynamic>[onError]), core::Map::unmodifiable<core::Symbol, dynamic>(<core::Symbol, dynamic>{#test: test}))) as{TypeError} asy::Future<self::MyFuture::T>;
   no-such-method-forwarder method /* from org-dartlang-sdk:///sdk/lib/async/future.dart */ whenComplete(() → asy::FutureOr<dynamic> action) → asy::Future<self::MyFuture::T>
     return this.{self::MyFuture::noSuchMethod}(new core::_InvocationMirror::_withType(#whenComplete, 0, const <core::Type>[], core::List::unmodifiable<dynamic>(<dynamic>[action]), core::Map::unmodifiable<core::Symbol, dynamic>(const <core::Symbol, dynamic>{}))) as{TypeError} asy::Future<self::MyFuture::T>;
-  no-such-method-forwarder method /* from org-dartlang-sdk:///sdk/lib/async/future.dart */ timeout(core::Duration timeLimit, {() → asy::FutureOr<self::MyFuture::T> onTimeout = null}) → asy::Future<self::MyFuture::T>
+  no-such-method-forwarder method /* from org-dartlang-sdk:///sdk/lib/async/future.dart */ timeout(core::Duration timeLimit, {generic-covariant-impl () → asy::FutureOr<self::MyFuture::T> onTimeout = null}) → asy::Future<self::MyFuture::T>
     return this.{self::MyFuture::noSuchMethod}(new core::_InvocationMirror::_withType(#timeout, 0, const <core::Type>[], core::List::unmodifiable<dynamic>(<dynamic>[timeLimit]), core::Map::unmodifiable<core::Symbol, dynamic>(<core::Symbol, dynamic>{#onTimeout: onTimeout}))) as{TypeError} asy::Future<self::MyFuture::T>;
   no-such-method-forwarder method /* from org-dartlang-sdk:///sdk/lib/async/future.dart */ asStream() → asy::Stream<self::MyFuture::T>
     return this.{self::MyFuture::noSuchMethod}(new core::_InvocationMirror::_withType(#asStream, 0, const <core::Type>[], const <dynamic>[], core::Map::unmodifiable<core::Symbol, dynamic>(const <core::Symbol, dynamic>{}))) as{TypeError} asy::Stream<self::MyFuture::T>;
diff --git a/pkg/front_end/testcases/inference/future_then_upwards_2.dart b/pkg/front_end/testcases/inference/future_then_upwards_2.dart
index b9d340e..ffc3c35b 100644
--- a/pkg/front_end/testcases/inference/future_then_upwards_2.dart
+++ b/pkg/front_end/testcases/inference/future_then_upwards_2.dart
@@ -10,7 +10,7 @@
 class MyFuture<T> implements Future<T> {
   MyFuture() {}
   MyFuture.value(T x) {}
-  dynamic noSuchMethod(/*@topType=Invocation*/ invocation) => null;
+  dynamic noSuchMethod(invocation) => null;
   MyFuture<S> then<S>(FutureOr<S> f(T x), {Function onError}) => null;
 }
 
diff --git a/pkg/front_end/testcases/inference/future_then_upwards_2.dart.legacy.expect b/pkg/front_end/testcases/inference/future_then_upwards_2.dart.legacy.expect
index f0dc55f..4c532cc 100644
--- a/pkg/front_end/testcases/inference/future_then_upwards_2.dart.legacy.expect
+++ b/pkg/front_end/testcases/inference/future_then_upwards_2.dart.legacy.expect
@@ -18,7 +18,7 @@
     return this.{self::MyFuture::noSuchMethod}(new core::_InvocationMirror::_withType(#catchError, 0, const <core::Type>[], core::List::unmodifiable<dynamic>(<dynamic>[onError]), core::Map::unmodifiable<core::Symbol, dynamic>(<core::Symbol, dynamic>{#test: test}))) as{TypeError} asy::Future<self::MyFuture::T>;
   no-such-method-forwarder method /* from org-dartlang-sdk:///sdk/lib/async/future.dart */ whenComplete(() → asy::FutureOr<dynamic> action) → asy::Future<self::MyFuture::T>
     return this.{self::MyFuture::noSuchMethod}(new core::_InvocationMirror::_withType(#whenComplete, 0, const <core::Type>[], core::List::unmodifiable<dynamic>(<dynamic>[action]), core::Map::unmodifiable<core::Symbol, dynamic>(const <core::Symbol, dynamic>{}))) as{TypeError} asy::Future<self::MyFuture::T>;
-  no-such-method-forwarder method /* from org-dartlang-sdk:///sdk/lib/async/future.dart */ timeout(core::Duration timeLimit, {() → asy::FutureOr<self::MyFuture::T> onTimeout = null}) → asy::Future<self::MyFuture::T>
+  no-such-method-forwarder method /* from org-dartlang-sdk:///sdk/lib/async/future.dart */ timeout(core::Duration timeLimit, {generic-covariant-impl () → asy::FutureOr<self::MyFuture::T> onTimeout = null}) → asy::Future<self::MyFuture::T>
     return this.{self::MyFuture::noSuchMethod}(new core::_InvocationMirror::_withType(#timeout, 0, const <core::Type>[], core::List::unmodifiable<dynamic>(<dynamic>[timeLimit]), core::Map::unmodifiable<core::Symbol, dynamic>(<core::Symbol, dynamic>{#onTimeout: onTimeout}))) as{TypeError} asy::Future<self::MyFuture::T>;
   no-such-method-forwarder method /* from org-dartlang-sdk:///sdk/lib/async/future.dart */ asStream() → asy::Stream<self::MyFuture::T>
     return this.{self::MyFuture::noSuchMethod}(new core::_InvocationMirror::_withType(#asStream, 0, const <core::Type>[], const <dynamic>[], core::Map::unmodifiable<core::Symbol, dynamic>(const <core::Symbol, dynamic>{}))) as{TypeError} asy::Stream<self::MyFuture::T>;
diff --git a/pkg/front_end/testcases/inference/future_then_upwards_2.dart.legacy.transformed.expect b/pkg/front_end/testcases/inference/future_then_upwards_2.dart.legacy.transformed.expect
index f0dc55f..4c532cc 100644
--- a/pkg/front_end/testcases/inference/future_then_upwards_2.dart.legacy.transformed.expect
+++ b/pkg/front_end/testcases/inference/future_then_upwards_2.dart.legacy.transformed.expect
@@ -18,7 +18,7 @@
     return this.{self::MyFuture::noSuchMethod}(new core::_InvocationMirror::_withType(#catchError, 0, const <core::Type>[], core::List::unmodifiable<dynamic>(<dynamic>[onError]), core::Map::unmodifiable<core::Symbol, dynamic>(<core::Symbol, dynamic>{#test: test}))) as{TypeError} asy::Future<self::MyFuture::T>;
   no-such-method-forwarder method /* from org-dartlang-sdk:///sdk/lib/async/future.dart */ whenComplete(() → asy::FutureOr<dynamic> action) → asy::Future<self::MyFuture::T>
     return this.{self::MyFuture::noSuchMethod}(new core::_InvocationMirror::_withType(#whenComplete, 0, const <core::Type>[], core::List::unmodifiable<dynamic>(<dynamic>[action]), core::Map::unmodifiable<core::Symbol, dynamic>(const <core::Symbol, dynamic>{}))) as{TypeError} asy::Future<self::MyFuture::T>;
-  no-such-method-forwarder method /* from org-dartlang-sdk:///sdk/lib/async/future.dart */ timeout(core::Duration timeLimit, {() → asy::FutureOr<self::MyFuture::T> onTimeout = null}) → asy::Future<self::MyFuture::T>
+  no-such-method-forwarder method /* from org-dartlang-sdk:///sdk/lib/async/future.dart */ timeout(core::Duration timeLimit, {generic-covariant-impl () → asy::FutureOr<self::MyFuture::T> onTimeout = null}) → asy::Future<self::MyFuture::T>
     return this.{self::MyFuture::noSuchMethod}(new core::_InvocationMirror::_withType(#timeout, 0, const <core::Type>[], core::List::unmodifiable<dynamic>(<dynamic>[timeLimit]), core::Map::unmodifiable<core::Symbol, dynamic>(<core::Symbol, dynamic>{#onTimeout: onTimeout}))) as{TypeError} asy::Future<self::MyFuture::T>;
   no-such-method-forwarder method /* from org-dartlang-sdk:///sdk/lib/async/future.dart */ asStream() → asy::Stream<self::MyFuture::T>
     return this.{self::MyFuture::noSuchMethod}(new core::_InvocationMirror::_withType(#asStream, 0, const <core::Type>[], const <dynamic>[], core::Map::unmodifiable<core::Symbol, dynamic>(const <core::Symbol, dynamic>{}))) as{TypeError} asy::Stream<self::MyFuture::T>;
diff --git a/pkg/front_end/testcases/inference/future_then_upwards_2.dart.outline.expect b/pkg/front_end/testcases/inference/future_then_upwards_2.dart.outline.expect
index e9cb911..e5a534c 100644
--- a/pkg/front_end/testcases/inference/future_then_upwards_2.dart.outline.expect
+++ b/pkg/front_end/testcases/inference/future_then_upwards_2.dart.outline.expect
@@ -18,7 +18,7 @@
     return this.{self::MyFuture::noSuchMethod}(new core::_InvocationMirror::_withType(#catchError, 0, const <core::Type>[], core::List::unmodifiable<dynamic>(<dynamic>[onError]), core::Map::unmodifiable<core::Symbol, dynamic>(<core::Symbol, dynamic>{#test: test}))) as{TypeError} asy::Future<self::MyFuture::T>;
   no-such-method-forwarder method /* from org-dartlang-sdk:///sdk/lib/async/future.dart */ whenComplete(() → asy::FutureOr<dynamic> action) → asy::Future<self::MyFuture::T>
     return this.{self::MyFuture::noSuchMethod}(new core::_InvocationMirror::_withType(#whenComplete, 0, const <core::Type>[], core::List::unmodifiable<dynamic>(<dynamic>[action]), core::Map::unmodifiable<core::Symbol, dynamic>(const <core::Symbol, dynamic>{}))) as{TypeError} asy::Future<self::MyFuture::T>;
-  no-such-method-forwarder method /* from org-dartlang-sdk:///sdk/lib/async/future.dart */ timeout(core::Duration timeLimit, {() → asy::FutureOr<self::MyFuture::T> onTimeout = null}) → asy::Future<self::MyFuture::T>
+  no-such-method-forwarder method /* from org-dartlang-sdk:///sdk/lib/async/future.dart */ timeout(core::Duration timeLimit, {generic-covariant-impl () → asy::FutureOr<self::MyFuture::T> onTimeout = null}) → asy::Future<self::MyFuture::T>
     return this.{self::MyFuture::noSuchMethod}(new core::_InvocationMirror::_withType(#timeout, 0, const <core::Type>[], core::List::unmodifiable<dynamic>(<dynamic>[timeLimit]), core::Map::unmodifiable<core::Symbol, dynamic>(<core::Symbol, dynamic>{#onTimeout: onTimeout}))) as{TypeError} asy::Future<self::MyFuture::T>;
   no-such-method-forwarder method /* from org-dartlang-sdk:///sdk/lib/async/future.dart */ asStream() → asy::Stream<self::MyFuture::T>
     return this.{self::MyFuture::noSuchMethod}(new core::_InvocationMirror::_withType(#asStream, 0, const <core::Type>[], const <dynamic>[], core::Map::unmodifiable<core::Symbol, dynamic>(const <core::Symbol, dynamic>{}))) as{TypeError} asy::Stream<self::MyFuture::T>;
diff --git a/pkg/front_end/testcases/inference/future_then_upwards_3.dart b/pkg/front_end/testcases/inference/future_then_upwards_3.dart
index f57ee71..8351c02 100644
--- a/pkg/front_end/testcases/inference/future_then_upwards_3.dart
+++ b/pkg/front_end/testcases/inference/future_then_upwards_3.dart
@@ -10,7 +10,7 @@
 class MyFuture<T> implements Future<T> {
   MyFuture() {}
   MyFuture.value(T x) {}
-  dynamic noSuchMethod(/*@topType=Invocation*/ invocation) => null;
+  dynamic noSuchMethod(invocation) => null;
   MyFuture<S> then<S>(FutureOr<S> f(T x), {Function onError}) => null;
 }
 
diff --git a/pkg/front_end/testcases/inference/future_then_upwards_3.dart.legacy.expect b/pkg/front_end/testcases/inference/future_then_upwards_3.dart.legacy.expect
index e868c2d..86abe95 100644
--- a/pkg/front_end/testcases/inference/future_then_upwards_3.dart.legacy.expect
+++ b/pkg/front_end/testcases/inference/future_then_upwards_3.dart.legacy.expect
@@ -18,7 +18,7 @@
     return this.{self::MyFuture::noSuchMethod}(new core::_InvocationMirror::_withType(#catchError, 0, const <core::Type>[], core::List::unmodifiable<dynamic>(<dynamic>[onError]), core::Map::unmodifiable<core::Symbol, dynamic>(<core::Symbol, dynamic>{#test: test}))) as{TypeError} asy::Future<self::MyFuture::T>;
   no-such-method-forwarder method /* from org-dartlang-sdk:///sdk/lib/async/future.dart */ whenComplete(() → asy::FutureOr<dynamic> action) → asy::Future<self::MyFuture::T>
     return this.{self::MyFuture::noSuchMethod}(new core::_InvocationMirror::_withType(#whenComplete, 0, const <core::Type>[], core::List::unmodifiable<dynamic>(<dynamic>[action]), core::Map::unmodifiable<core::Symbol, dynamic>(const <core::Symbol, dynamic>{}))) as{TypeError} asy::Future<self::MyFuture::T>;
-  no-such-method-forwarder method /* from org-dartlang-sdk:///sdk/lib/async/future.dart */ timeout(core::Duration timeLimit, {() → asy::FutureOr<self::MyFuture::T> onTimeout = null}) → asy::Future<self::MyFuture::T>
+  no-such-method-forwarder method /* from org-dartlang-sdk:///sdk/lib/async/future.dart */ timeout(core::Duration timeLimit, {generic-covariant-impl () → asy::FutureOr<self::MyFuture::T> onTimeout = null}) → asy::Future<self::MyFuture::T>
     return this.{self::MyFuture::noSuchMethod}(new core::_InvocationMirror::_withType(#timeout, 0, const <core::Type>[], core::List::unmodifiable<dynamic>(<dynamic>[timeLimit]), core::Map::unmodifiable<core::Symbol, dynamic>(<core::Symbol, dynamic>{#onTimeout: onTimeout}))) as{TypeError} asy::Future<self::MyFuture::T>;
   no-such-method-forwarder method /* from org-dartlang-sdk:///sdk/lib/async/future.dart */ asStream() → asy::Stream<self::MyFuture::T>
     return this.{self::MyFuture::noSuchMethod}(new core::_InvocationMirror::_withType(#asStream, 0, const <core::Type>[], const <dynamic>[], core::Map::unmodifiable<core::Symbol, dynamic>(const <core::Symbol, dynamic>{}))) as{TypeError} asy::Stream<self::MyFuture::T>;
diff --git a/pkg/front_end/testcases/inference/future_then_upwards_3.dart.legacy.transformed.expect b/pkg/front_end/testcases/inference/future_then_upwards_3.dart.legacy.transformed.expect
index e868c2d..86abe95 100644
--- a/pkg/front_end/testcases/inference/future_then_upwards_3.dart.legacy.transformed.expect
+++ b/pkg/front_end/testcases/inference/future_then_upwards_3.dart.legacy.transformed.expect
@@ -18,7 +18,7 @@
     return this.{self::MyFuture::noSuchMethod}(new core::_InvocationMirror::_withType(#catchError, 0, const <core::Type>[], core::List::unmodifiable<dynamic>(<dynamic>[onError]), core::Map::unmodifiable<core::Symbol, dynamic>(<core::Symbol, dynamic>{#test: test}))) as{TypeError} asy::Future<self::MyFuture::T>;
   no-such-method-forwarder method /* from org-dartlang-sdk:///sdk/lib/async/future.dart */ whenComplete(() → asy::FutureOr<dynamic> action) → asy::Future<self::MyFuture::T>
     return this.{self::MyFuture::noSuchMethod}(new core::_InvocationMirror::_withType(#whenComplete, 0, const <core::Type>[], core::List::unmodifiable<dynamic>(<dynamic>[action]), core::Map::unmodifiable<core::Symbol, dynamic>(const <core::Symbol, dynamic>{}))) as{TypeError} asy::Future<self::MyFuture::T>;
-  no-such-method-forwarder method /* from org-dartlang-sdk:///sdk/lib/async/future.dart */ timeout(core::Duration timeLimit, {() → asy::FutureOr<self::MyFuture::T> onTimeout = null}) → asy::Future<self::MyFuture::T>
+  no-such-method-forwarder method /* from org-dartlang-sdk:///sdk/lib/async/future.dart */ timeout(core::Duration timeLimit, {generic-covariant-impl () → asy::FutureOr<self::MyFuture::T> onTimeout = null}) → asy::Future<self::MyFuture::T>
     return this.{self::MyFuture::noSuchMethod}(new core::_InvocationMirror::_withType(#timeout, 0, const <core::Type>[], core::List::unmodifiable<dynamic>(<dynamic>[timeLimit]), core::Map::unmodifiable<core::Symbol, dynamic>(<core::Symbol, dynamic>{#onTimeout: onTimeout}))) as{TypeError} asy::Future<self::MyFuture::T>;
   no-such-method-forwarder method /* from org-dartlang-sdk:///sdk/lib/async/future.dart */ asStream() → asy::Stream<self::MyFuture::T>
     return this.{self::MyFuture::noSuchMethod}(new core::_InvocationMirror::_withType(#asStream, 0, const <core::Type>[], const <dynamic>[], core::Map::unmodifiable<core::Symbol, dynamic>(const <core::Symbol, dynamic>{}))) as{TypeError} asy::Stream<self::MyFuture::T>;
diff --git a/pkg/front_end/testcases/inference/future_then_upwards_3.dart.outline.expect b/pkg/front_end/testcases/inference/future_then_upwards_3.dart.outline.expect
index cdfda19..9162c9b 100644
--- a/pkg/front_end/testcases/inference/future_then_upwards_3.dart.outline.expect
+++ b/pkg/front_end/testcases/inference/future_then_upwards_3.dart.outline.expect
@@ -18,7 +18,7 @@
     return this.{self::MyFuture::noSuchMethod}(new core::_InvocationMirror::_withType(#catchError, 0, const <core::Type>[], core::List::unmodifiable<dynamic>(<dynamic>[onError]), core::Map::unmodifiable<core::Symbol, dynamic>(<core::Symbol, dynamic>{#test: test}))) as{TypeError} asy::Future<self::MyFuture::T>;
   no-such-method-forwarder method /* from org-dartlang-sdk:///sdk/lib/async/future.dart */ whenComplete(() → asy::FutureOr<dynamic> action) → asy::Future<self::MyFuture::T>
     return this.{self::MyFuture::noSuchMethod}(new core::_InvocationMirror::_withType(#whenComplete, 0, const <core::Type>[], core::List::unmodifiable<dynamic>(<dynamic>[action]), core::Map::unmodifiable<core::Symbol, dynamic>(const <core::Symbol, dynamic>{}))) as{TypeError} asy::Future<self::MyFuture::T>;
-  no-such-method-forwarder method /* from org-dartlang-sdk:///sdk/lib/async/future.dart */ timeout(core::Duration timeLimit, {() → asy::FutureOr<self::MyFuture::T> onTimeout = null}) → asy::Future<self::MyFuture::T>
+  no-such-method-forwarder method /* from org-dartlang-sdk:///sdk/lib/async/future.dart */ timeout(core::Duration timeLimit, {generic-covariant-impl () → asy::FutureOr<self::MyFuture::T> onTimeout = null}) → asy::Future<self::MyFuture::T>
     return this.{self::MyFuture::noSuchMethod}(new core::_InvocationMirror::_withType(#timeout, 0, const <core::Type>[], core::List::unmodifiable<dynamic>(<dynamic>[timeLimit]), core::Map::unmodifiable<core::Symbol, dynamic>(<core::Symbol, dynamic>{#onTimeout: onTimeout}))) as{TypeError} asy::Future<self::MyFuture::T>;
   no-such-method-forwarder method /* from org-dartlang-sdk:///sdk/lib/async/future.dart */ asStream() → asy::Stream<self::MyFuture::T>
     return this.{self::MyFuture::noSuchMethod}(new core::_InvocationMirror::_withType(#asStream, 0, const <core::Type>[], const <dynamic>[], core::Map::unmodifiable<core::Symbol, dynamic>(const <core::Symbol, dynamic>{}))) as{TypeError} asy::Stream<self::MyFuture::T>;
diff --git a/pkg/front_end/testcases/inference/future_union_async_conditional.dart b/pkg/front_end/testcases/inference/future_union_async_conditional.dart
index e1f0f8c..455dab2 100644
--- a/pkg/front_end/testcases/inference/future_union_async_conditional.dart
+++ b/pkg/front_end/testcases/inference/future_union_async_conditional.dart
@@ -10,7 +10,7 @@
 class MyFuture<T> implements Future<T> {
   MyFuture() {}
   MyFuture.value(x) {}
-  dynamic noSuchMethod(/*@topType=Invocation*/ invocation) => null;
+  dynamic noSuchMethod(invocation) => null;
   MyFuture<S> then<S>(FutureOr<S> f(T x), {Function onError}) => null;
 }
 
diff --git a/pkg/front_end/testcases/inference/future_union_async_conditional.dart.legacy.expect b/pkg/front_end/testcases/inference/future_union_async_conditional.dart.legacy.expect
index 42ac544..aed7501 100644
--- a/pkg/front_end/testcases/inference/future_union_async_conditional.dart.legacy.expect
+++ b/pkg/front_end/testcases/inference/future_union_async_conditional.dart.legacy.expect
@@ -18,7 +18,7 @@
     return this.{self::MyFuture::noSuchMethod}(new core::_InvocationMirror::_withType(#catchError, 0, const <core::Type>[], core::List::unmodifiable<dynamic>(<dynamic>[onError]), core::Map::unmodifiable<core::Symbol, dynamic>(<core::Symbol, dynamic>{#test: test}))) as{TypeError} asy::Future<self::MyFuture::T>;
   no-such-method-forwarder method /* from org-dartlang-sdk:///sdk/lib/async/future.dart */ whenComplete(() → asy::FutureOr<dynamic> action) → asy::Future<self::MyFuture::T>
     return this.{self::MyFuture::noSuchMethod}(new core::_InvocationMirror::_withType(#whenComplete, 0, const <core::Type>[], core::List::unmodifiable<dynamic>(<dynamic>[action]), core::Map::unmodifiable<core::Symbol, dynamic>(const <core::Symbol, dynamic>{}))) as{TypeError} asy::Future<self::MyFuture::T>;
-  no-such-method-forwarder method /* from org-dartlang-sdk:///sdk/lib/async/future.dart */ timeout(core::Duration timeLimit, {() → asy::FutureOr<self::MyFuture::T> onTimeout = null}) → asy::Future<self::MyFuture::T>
+  no-such-method-forwarder method /* from org-dartlang-sdk:///sdk/lib/async/future.dart */ timeout(core::Duration timeLimit, {generic-covariant-impl () → asy::FutureOr<self::MyFuture::T> onTimeout = null}) → asy::Future<self::MyFuture::T>
     return this.{self::MyFuture::noSuchMethod}(new core::_InvocationMirror::_withType(#timeout, 0, const <core::Type>[], core::List::unmodifiable<dynamic>(<dynamic>[timeLimit]), core::Map::unmodifiable<core::Symbol, dynamic>(<core::Symbol, dynamic>{#onTimeout: onTimeout}))) as{TypeError} asy::Future<self::MyFuture::T>;
   no-such-method-forwarder method /* from org-dartlang-sdk:///sdk/lib/async/future.dart */ asStream() → asy::Stream<self::MyFuture::T>
     return this.{self::MyFuture::noSuchMethod}(new core::_InvocationMirror::_withType(#asStream, 0, const <core::Type>[], const <dynamic>[], core::Map::unmodifiable<core::Symbol, dynamic>(const <core::Symbol, dynamic>{}))) as{TypeError} asy::Stream<self::MyFuture::T>;
diff --git a/pkg/front_end/testcases/inference/future_union_async_conditional.dart.legacy.transformed.expect b/pkg/front_end/testcases/inference/future_union_async_conditional.dart.legacy.transformed.expect
index 7cb03fb..7697712 100644
--- a/pkg/front_end/testcases/inference/future_union_async_conditional.dart.legacy.transformed.expect
+++ b/pkg/front_end/testcases/inference/future_union_async_conditional.dart.legacy.transformed.expect
@@ -18,7 +18,7 @@
     return this.{self::MyFuture::noSuchMethod}(new core::_InvocationMirror::_withType(#catchError, 0, const <core::Type>[], core::List::unmodifiable<dynamic>(<dynamic>[onError]), core::Map::unmodifiable<core::Symbol, dynamic>(<core::Symbol, dynamic>{#test: test}))) as{TypeError} asy::Future<self::MyFuture::T>;
   no-such-method-forwarder method /* from org-dartlang-sdk:///sdk/lib/async/future.dart */ whenComplete(() → asy::FutureOr<dynamic> action) → asy::Future<self::MyFuture::T>
     return this.{self::MyFuture::noSuchMethod}(new core::_InvocationMirror::_withType(#whenComplete, 0, const <core::Type>[], core::List::unmodifiable<dynamic>(<dynamic>[action]), core::Map::unmodifiable<core::Symbol, dynamic>(const <core::Symbol, dynamic>{}))) as{TypeError} asy::Future<self::MyFuture::T>;
-  no-such-method-forwarder method /* from org-dartlang-sdk:///sdk/lib/async/future.dart */ timeout(core::Duration timeLimit, {() → asy::FutureOr<self::MyFuture::T> onTimeout = null}) → asy::Future<self::MyFuture::T>
+  no-such-method-forwarder method /* from org-dartlang-sdk:///sdk/lib/async/future.dart */ timeout(core::Duration timeLimit, {generic-covariant-impl () → asy::FutureOr<self::MyFuture::T> onTimeout = null}) → asy::Future<self::MyFuture::T>
     return this.{self::MyFuture::noSuchMethod}(new core::_InvocationMirror::_withType(#timeout, 0, const <core::Type>[], core::List::unmodifiable<dynamic>(<dynamic>[timeLimit]), core::Map::unmodifiable<core::Symbol, dynamic>(<core::Symbol, dynamic>{#onTimeout: onTimeout}))) as{TypeError} asy::Future<self::MyFuture::T>;
   no-such-method-forwarder method /* from org-dartlang-sdk:///sdk/lib/async/future.dart */ asStream() → asy::Stream<self::MyFuture::T>
     return this.{self::MyFuture::noSuchMethod}(new core::_InvocationMirror::_withType(#asStream, 0, const <core::Type>[], const <dynamic>[], core::Map::unmodifiable<core::Symbol, dynamic>(const <core::Symbol, dynamic>{}))) as{TypeError} asy::Stream<self::MyFuture::T>;
diff --git a/pkg/front_end/testcases/inference/future_union_async_conditional.dart.outline.expect b/pkg/front_end/testcases/inference/future_union_async_conditional.dart.outline.expect
index 0e45bdd..e80eb43 100644
--- a/pkg/front_end/testcases/inference/future_union_async_conditional.dart.outline.expect
+++ b/pkg/front_end/testcases/inference/future_union_async_conditional.dart.outline.expect
@@ -18,7 +18,7 @@
     return this.{self::MyFuture::noSuchMethod}(new core::_InvocationMirror::_withType(#catchError, 0, const <core::Type>[], core::List::unmodifiable<dynamic>(<dynamic>[onError]), core::Map::unmodifiable<core::Symbol, dynamic>(<core::Symbol, dynamic>{#test: test}))) as{TypeError} asy::Future<self::MyFuture::T>;
   no-such-method-forwarder method /* from org-dartlang-sdk:///sdk/lib/async/future.dart */ whenComplete(() → asy::FutureOr<dynamic> action) → asy::Future<self::MyFuture::T>
     return this.{self::MyFuture::noSuchMethod}(new core::_InvocationMirror::_withType(#whenComplete, 0, const <core::Type>[], core::List::unmodifiable<dynamic>(<dynamic>[action]), core::Map::unmodifiable<core::Symbol, dynamic>(const <core::Symbol, dynamic>{}))) as{TypeError} asy::Future<self::MyFuture::T>;
-  no-such-method-forwarder method /* from org-dartlang-sdk:///sdk/lib/async/future.dart */ timeout(core::Duration timeLimit, {() → asy::FutureOr<self::MyFuture::T> onTimeout = null}) → asy::Future<self::MyFuture::T>
+  no-such-method-forwarder method /* from org-dartlang-sdk:///sdk/lib/async/future.dart */ timeout(core::Duration timeLimit, {generic-covariant-impl () → asy::FutureOr<self::MyFuture::T> onTimeout = null}) → asy::Future<self::MyFuture::T>
     return this.{self::MyFuture::noSuchMethod}(new core::_InvocationMirror::_withType(#timeout, 0, const <core::Type>[], core::List::unmodifiable<dynamic>(<dynamic>[timeLimit]), core::Map::unmodifiable<core::Symbol, dynamic>(<core::Symbol, dynamic>{#onTimeout: onTimeout}))) as{TypeError} asy::Future<self::MyFuture::T>;
   no-such-method-forwarder method /* from org-dartlang-sdk:///sdk/lib/async/future.dart */ asStream() → asy::Stream<self::MyFuture::T>
     return this.{self::MyFuture::noSuchMethod}(new core::_InvocationMirror::_withType(#asStream, 0, const <core::Type>[], const <dynamic>[], core::Map::unmodifiable<core::Symbol, dynamic>(const <core::Symbol, dynamic>{}))) as{TypeError} asy::Stream<self::MyFuture::T>;
diff --git a/pkg/front_end/testcases/inference/future_union_async_conditional_2.dart b/pkg/front_end/testcases/inference/future_union_async_conditional_2.dart
index 41e7cb0..5188287 100644
--- a/pkg/front_end/testcases/inference/future_union_async_conditional_2.dart
+++ b/pkg/front_end/testcases/inference/future_union_async_conditional_2.dart
@@ -10,7 +10,7 @@
 class MyFuture<T> implements Future<T> {
   MyFuture() {}
   MyFuture.value(x) {}
-  dynamic noSuchMethod(/*@topType=Invocation*/ invocation) => null;
+  dynamic noSuchMethod(invocation) => null;
   MyFuture<S> then<S>(FutureOr<S> f(T x), {Function onError}) => null;
 }
 
diff --git a/pkg/front_end/testcases/inference/future_union_async_conditional_2.dart.legacy.expect b/pkg/front_end/testcases/inference/future_union_async_conditional_2.dart.legacy.expect
index 0985390..b3989b2 100644
--- a/pkg/front_end/testcases/inference/future_union_async_conditional_2.dart.legacy.expect
+++ b/pkg/front_end/testcases/inference/future_union_async_conditional_2.dart.legacy.expect
@@ -18,7 +18,7 @@
     return this.{self::MyFuture::noSuchMethod}(new core::_InvocationMirror::_withType(#catchError, 0, const <core::Type>[], core::List::unmodifiable<dynamic>(<dynamic>[onError]), core::Map::unmodifiable<core::Symbol, dynamic>(<core::Symbol, dynamic>{#test: test}))) as{TypeError} asy::Future<self::MyFuture::T>;
   no-such-method-forwarder method /* from org-dartlang-sdk:///sdk/lib/async/future.dart */ whenComplete(() → asy::FutureOr<dynamic> action) → asy::Future<self::MyFuture::T>
     return this.{self::MyFuture::noSuchMethod}(new core::_InvocationMirror::_withType(#whenComplete, 0, const <core::Type>[], core::List::unmodifiable<dynamic>(<dynamic>[action]), core::Map::unmodifiable<core::Symbol, dynamic>(const <core::Symbol, dynamic>{}))) as{TypeError} asy::Future<self::MyFuture::T>;
-  no-such-method-forwarder method /* from org-dartlang-sdk:///sdk/lib/async/future.dart */ timeout(core::Duration timeLimit, {() → asy::FutureOr<self::MyFuture::T> onTimeout = null}) → asy::Future<self::MyFuture::T>
+  no-such-method-forwarder method /* from org-dartlang-sdk:///sdk/lib/async/future.dart */ timeout(core::Duration timeLimit, {generic-covariant-impl () → asy::FutureOr<self::MyFuture::T> onTimeout = null}) → asy::Future<self::MyFuture::T>
     return this.{self::MyFuture::noSuchMethod}(new core::_InvocationMirror::_withType(#timeout, 0, const <core::Type>[], core::List::unmodifiable<dynamic>(<dynamic>[timeLimit]), core::Map::unmodifiable<core::Symbol, dynamic>(<core::Symbol, dynamic>{#onTimeout: onTimeout}))) as{TypeError} asy::Future<self::MyFuture::T>;
   no-such-method-forwarder method /* from org-dartlang-sdk:///sdk/lib/async/future.dart */ asStream() → asy::Stream<self::MyFuture::T>
     return this.{self::MyFuture::noSuchMethod}(new core::_InvocationMirror::_withType(#asStream, 0, const <core::Type>[], const <dynamic>[], core::Map::unmodifiable<core::Symbol, dynamic>(const <core::Symbol, dynamic>{}))) as{TypeError} asy::Stream<self::MyFuture::T>;
diff --git a/pkg/front_end/testcases/inference/future_union_async_conditional_2.dart.legacy.transformed.expect b/pkg/front_end/testcases/inference/future_union_async_conditional_2.dart.legacy.transformed.expect
index 6eb70db..8c463d9 100644
--- a/pkg/front_end/testcases/inference/future_union_async_conditional_2.dart.legacy.transformed.expect
+++ b/pkg/front_end/testcases/inference/future_union_async_conditional_2.dart.legacy.transformed.expect
@@ -18,7 +18,7 @@
     return this.{self::MyFuture::noSuchMethod}(new core::_InvocationMirror::_withType(#catchError, 0, const <core::Type>[], core::List::unmodifiable<dynamic>(<dynamic>[onError]), core::Map::unmodifiable<core::Symbol, dynamic>(<core::Symbol, dynamic>{#test: test}))) as{TypeError} asy::Future<self::MyFuture::T>;
   no-such-method-forwarder method /* from org-dartlang-sdk:///sdk/lib/async/future.dart */ whenComplete(() → asy::FutureOr<dynamic> action) → asy::Future<self::MyFuture::T>
     return this.{self::MyFuture::noSuchMethod}(new core::_InvocationMirror::_withType(#whenComplete, 0, const <core::Type>[], core::List::unmodifiable<dynamic>(<dynamic>[action]), core::Map::unmodifiable<core::Symbol, dynamic>(const <core::Symbol, dynamic>{}))) as{TypeError} asy::Future<self::MyFuture::T>;
-  no-such-method-forwarder method /* from org-dartlang-sdk:///sdk/lib/async/future.dart */ timeout(core::Duration timeLimit, {() → asy::FutureOr<self::MyFuture::T> onTimeout = null}) → asy::Future<self::MyFuture::T>
+  no-such-method-forwarder method /* from org-dartlang-sdk:///sdk/lib/async/future.dart */ timeout(core::Duration timeLimit, {generic-covariant-impl () → asy::FutureOr<self::MyFuture::T> onTimeout = null}) → asy::Future<self::MyFuture::T>
     return this.{self::MyFuture::noSuchMethod}(new core::_InvocationMirror::_withType(#timeout, 0, const <core::Type>[], core::List::unmodifiable<dynamic>(<dynamic>[timeLimit]), core::Map::unmodifiable<core::Symbol, dynamic>(<core::Symbol, dynamic>{#onTimeout: onTimeout}))) as{TypeError} asy::Future<self::MyFuture::T>;
   no-such-method-forwarder method /* from org-dartlang-sdk:///sdk/lib/async/future.dart */ asStream() → asy::Stream<self::MyFuture::T>
     return this.{self::MyFuture::noSuchMethod}(new core::_InvocationMirror::_withType(#asStream, 0, const <core::Type>[], const <dynamic>[], core::Map::unmodifiable<core::Symbol, dynamic>(const <core::Symbol, dynamic>{}))) as{TypeError} asy::Stream<self::MyFuture::T>;
diff --git a/pkg/front_end/testcases/inference/future_union_async_conditional_2.dart.outline.expect b/pkg/front_end/testcases/inference/future_union_async_conditional_2.dart.outline.expect
index 0e45bdd..e80eb43 100644
--- a/pkg/front_end/testcases/inference/future_union_async_conditional_2.dart.outline.expect
+++ b/pkg/front_end/testcases/inference/future_union_async_conditional_2.dart.outline.expect
@@ -18,7 +18,7 @@
     return this.{self::MyFuture::noSuchMethod}(new core::_InvocationMirror::_withType(#catchError, 0, const <core::Type>[], core::List::unmodifiable<dynamic>(<dynamic>[onError]), core::Map::unmodifiable<core::Symbol, dynamic>(<core::Symbol, dynamic>{#test: test}))) as{TypeError} asy::Future<self::MyFuture::T>;
   no-such-method-forwarder method /* from org-dartlang-sdk:///sdk/lib/async/future.dart */ whenComplete(() → asy::FutureOr<dynamic> action) → asy::Future<self::MyFuture::T>
     return this.{self::MyFuture::noSuchMethod}(new core::_InvocationMirror::_withType(#whenComplete, 0, const <core::Type>[], core::List::unmodifiable<dynamic>(<dynamic>[action]), core::Map::unmodifiable<core::Symbol, dynamic>(const <core::Symbol, dynamic>{}))) as{TypeError} asy::Future<self::MyFuture::T>;
-  no-such-method-forwarder method /* from org-dartlang-sdk:///sdk/lib/async/future.dart */ timeout(core::Duration timeLimit, {() → asy::FutureOr<self::MyFuture::T> onTimeout = null}) → asy::Future<self::MyFuture::T>
+  no-such-method-forwarder method /* from org-dartlang-sdk:///sdk/lib/async/future.dart */ timeout(core::Duration timeLimit, {generic-covariant-impl () → asy::FutureOr<self::MyFuture::T> onTimeout = null}) → asy::Future<self::MyFuture::T>
     return this.{self::MyFuture::noSuchMethod}(new core::_InvocationMirror::_withType(#timeout, 0, const <core::Type>[], core::List::unmodifiable<dynamic>(<dynamic>[timeLimit]), core::Map::unmodifiable<core::Symbol, dynamic>(<core::Symbol, dynamic>{#onTimeout: onTimeout}))) as{TypeError} asy::Future<self::MyFuture::T>;
   no-such-method-forwarder method /* from org-dartlang-sdk:///sdk/lib/async/future.dart */ asStream() → asy::Stream<self::MyFuture::T>
     return this.{self::MyFuture::noSuchMethod}(new core::_InvocationMirror::_withType(#asStream, 0, const <core::Type>[], const <dynamic>[], core::Map::unmodifiable<core::Symbol, dynamic>(const <core::Symbol, dynamic>{}))) as{TypeError} asy::Stream<self::MyFuture::T>;
diff --git a/pkg/front_end/testcases/inference/future_union_downwards.dart b/pkg/front_end/testcases/inference/future_union_downwards.dart
index 5622782..2882aa8 100644
--- a/pkg/front_end/testcases/inference/future_union_downwards.dart
+++ b/pkg/front_end/testcases/inference/future_union_downwards.dart
@@ -10,7 +10,7 @@
 class MyFuture<T> implements Future<T> {
   MyFuture() {}
   MyFuture.value([x]) {}
-  dynamic noSuchMethod(/*@topType=Invocation*/ invocation) => null;
+  dynamic noSuchMethod(invocation) => null;
   MyFuture<S> then<S>(FutureOr<S> f(T x), {Function onError}) => null;
 }
 
diff --git a/pkg/front_end/testcases/inference/future_union_downwards.dart.legacy.expect b/pkg/front_end/testcases/inference/future_union_downwards.dart.legacy.expect
index 5ca32db..c309ae6 100644
--- a/pkg/front_end/testcases/inference/future_union_downwards.dart.legacy.expect
+++ b/pkg/front_end/testcases/inference/future_union_downwards.dart.legacy.expect
@@ -18,7 +18,7 @@
     return this.{self::MyFuture::noSuchMethod}(new core::_InvocationMirror::_withType(#catchError, 0, const <core::Type>[], core::List::unmodifiable<dynamic>(<dynamic>[onError]), core::Map::unmodifiable<core::Symbol, dynamic>(<core::Symbol, dynamic>{#test: test}))) as{TypeError} asy::Future<self::MyFuture::T>;
   no-such-method-forwarder method /* from org-dartlang-sdk:///sdk/lib/async/future.dart */ whenComplete(() → asy::FutureOr<dynamic> action) → asy::Future<self::MyFuture::T>
     return this.{self::MyFuture::noSuchMethod}(new core::_InvocationMirror::_withType(#whenComplete, 0, const <core::Type>[], core::List::unmodifiable<dynamic>(<dynamic>[action]), core::Map::unmodifiable<core::Symbol, dynamic>(const <core::Symbol, dynamic>{}))) as{TypeError} asy::Future<self::MyFuture::T>;
-  no-such-method-forwarder method /* from org-dartlang-sdk:///sdk/lib/async/future.dart */ timeout(core::Duration timeLimit, {() → asy::FutureOr<self::MyFuture::T> onTimeout = null}) → asy::Future<self::MyFuture::T>
+  no-such-method-forwarder method /* from org-dartlang-sdk:///sdk/lib/async/future.dart */ timeout(core::Duration timeLimit, {generic-covariant-impl () → asy::FutureOr<self::MyFuture::T> onTimeout = null}) → asy::Future<self::MyFuture::T>
     return this.{self::MyFuture::noSuchMethod}(new core::_InvocationMirror::_withType(#timeout, 0, const <core::Type>[], core::List::unmodifiable<dynamic>(<dynamic>[timeLimit]), core::Map::unmodifiable<core::Symbol, dynamic>(<core::Symbol, dynamic>{#onTimeout: onTimeout}))) as{TypeError} asy::Future<self::MyFuture::T>;
   no-such-method-forwarder method /* from org-dartlang-sdk:///sdk/lib/async/future.dart */ asStream() → asy::Stream<self::MyFuture::T>
     return this.{self::MyFuture::noSuchMethod}(new core::_InvocationMirror::_withType(#asStream, 0, const <core::Type>[], const <dynamic>[], core::Map::unmodifiable<core::Symbol, dynamic>(const <core::Symbol, dynamic>{}))) as{TypeError} asy::Stream<self::MyFuture::T>;
diff --git a/pkg/front_end/testcases/inference/future_union_downwards.dart.legacy.transformed.expect b/pkg/front_end/testcases/inference/future_union_downwards.dart.legacy.transformed.expect
index 9c918a1..5fb66a8 100644
--- a/pkg/front_end/testcases/inference/future_union_downwards.dart.legacy.transformed.expect
+++ b/pkg/front_end/testcases/inference/future_union_downwards.dart.legacy.transformed.expect
@@ -18,7 +18,7 @@
     return this.{self::MyFuture::noSuchMethod}(new core::_InvocationMirror::_withType(#catchError, 0, const <core::Type>[], core::List::unmodifiable<dynamic>(<dynamic>[onError]), core::Map::unmodifiable<core::Symbol, dynamic>(<core::Symbol, dynamic>{#test: test}))) as{TypeError} asy::Future<self::MyFuture::T>;
   no-such-method-forwarder method /* from org-dartlang-sdk:///sdk/lib/async/future.dart */ whenComplete(() → asy::FutureOr<dynamic> action) → asy::Future<self::MyFuture::T>
     return this.{self::MyFuture::noSuchMethod}(new core::_InvocationMirror::_withType(#whenComplete, 0, const <core::Type>[], core::List::unmodifiable<dynamic>(<dynamic>[action]), core::Map::unmodifiable<core::Symbol, dynamic>(const <core::Symbol, dynamic>{}))) as{TypeError} asy::Future<self::MyFuture::T>;
-  no-such-method-forwarder method /* from org-dartlang-sdk:///sdk/lib/async/future.dart */ timeout(core::Duration timeLimit, {() → asy::FutureOr<self::MyFuture::T> onTimeout = null}) → asy::Future<self::MyFuture::T>
+  no-such-method-forwarder method /* from org-dartlang-sdk:///sdk/lib/async/future.dart */ timeout(core::Duration timeLimit, {generic-covariant-impl () → asy::FutureOr<self::MyFuture::T> onTimeout = null}) → asy::Future<self::MyFuture::T>
     return this.{self::MyFuture::noSuchMethod}(new core::_InvocationMirror::_withType(#timeout, 0, const <core::Type>[], core::List::unmodifiable<dynamic>(<dynamic>[timeLimit]), core::Map::unmodifiable<core::Symbol, dynamic>(<core::Symbol, dynamic>{#onTimeout: onTimeout}))) as{TypeError} asy::Future<self::MyFuture::T>;
   no-such-method-forwarder method /* from org-dartlang-sdk:///sdk/lib/async/future.dart */ asStream() → asy::Stream<self::MyFuture::T>
     return this.{self::MyFuture::noSuchMethod}(new core::_InvocationMirror::_withType(#asStream, 0, const <core::Type>[], const <dynamic>[], core::Map::unmodifiable<core::Symbol, dynamic>(const <core::Symbol, dynamic>{}))) as{TypeError} asy::Stream<self::MyFuture::T>;
diff --git a/pkg/front_end/testcases/inference/future_union_downwards.dart.outline.expect b/pkg/front_end/testcases/inference/future_union_downwards.dart.outline.expect
index 10cd1f0..263a94f 100644
--- a/pkg/front_end/testcases/inference/future_union_downwards.dart.outline.expect
+++ b/pkg/front_end/testcases/inference/future_union_downwards.dart.outline.expect
@@ -18,7 +18,7 @@
     return this.{self::MyFuture::noSuchMethod}(new core::_InvocationMirror::_withType(#catchError, 0, const <core::Type>[], core::List::unmodifiable<dynamic>(<dynamic>[onError]), core::Map::unmodifiable<core::Symbol, dynamic>(<core::Symbol, dynamic>{#test: test}))) as{TypeError} asy::Future<self::MyFuture::T>;
   no-such-method-forwarder method /* from org-dartlang-sdk:///sdk/lib/async/future.dart */ whenComplete(() → asy::FutureOr<dynamic> action) → asy::Future<self::MyFuture::T>
     return this.{self::MyFuture::noSuchMethod}(new core::_InvocationMirror::_withType(#whenComplete, 0, const <core::Type>[], core::List::unmodifiable<dynamic>(<dynamic>[action]), core::Map::unmodifiable<core::Symbol, dynamic>(const <core::Symbol, dynamic>{}))) as{TypeError} asy::Future<self::MyFuture::T>;
-  no-such-method-forwarder method /* from org-dartlang-sdk:///sdk/lib/async/future.dart */ timeout(core::Duration timeLimit, {() → asy::FutureOr<self::MyFuture::T> onTimeout = null}) → asy::Future<self::MyFuture::T>
+  no-such-method-forwarder method /* from org-dartlang-sdk:///sdk/lib/async/future.dart */ timeout(core::Duration timeLimit, {generic-covariant-impl () → asy::FutureOr<self::MyFuture::T> onTimeout = null}) → asy::Future<self::MyFuture::T>
     return this.{self::MyFuture::noSuchMethod}(new core::_InvocationMirror::_withType(#timeout, 0, const <core::Type>[], core::List::unmodifiable<dynamic>(<dynamic>[timeLimit]), core::Map::unmodifiable<core::Symbol, dynamic>(<core::Symbol, dynamic>{#onTimeout: onTimeout}))) as{TypeError} asy::Future<self::MyFuture::T>;
   no-such-method-forwarder method /* from org-dartlang-sdk:///sdk/lib/async/future.dart */ asStream() → asy::Stream<self::MyFuture::T>
     return this.{self::MyFuture::noSuchMethod}(new core::_InvocationMirror::_withType(#asStream, 0, const <core::Type>[], const <dynamic>[], core::Map::unmodifiable<core::Symbol, dynamic>(const <core::Symbol, dynamic>{}))) as{TypeError} asy::Stream<self::MyFuture::T>;
diff --git a/pkg/front_end/testcases/inference/future_union_downwards_2.dart b/pkg/front_end/testcases/inference/future_union_downwards_2.dart
index 7ff20a9..9c32e85 100644
--- a/pkg/front_end/testcases/inference/future_union_downwards_2.dart
+++ b/pkg/front_end/testcases/inference/future_union_downwards_2.dart
@@ -10,7 +10,7 @@
 class MyFuture<T> implements Future<T> {
   MyFuture() {}
   MyFuture.value([x]) {}
-  dynamic noSuchMethod(/*@topType=Invocation*/ invocation) => null;
+  dynamic noSuchMethod(invocation) => null;
   MyFuture<S> then<S>(FutureOr<S> f(T x), {Function onError}) => null;
 }
 
diff --git a/pkg/front_end/testcases/inference/future_union_downwards_2.dart.legacy.expect b/pkg/front_end/testcases/inference/future_union_downwards_2.dart.legacy.expect
index 8471190..a89b874 100644
--- a/pkg/front_end/testcases/inference/future_union_downwards_2.dart.legacy.expect
+++ b/pkg/front_end/testcases/inference/future_union_downwards_2.dart.legacy.expect
@@ -18,7 +18,7 @@
     return this.{self::MyFuture::noSuchMethod}(new core::_InvocationMirror::_withType(#catchError, 0, const <core::Type>[], core::List::unmodifiable<dynamic>(<dynamic>[onError]), core::Map::unmodifiable<core::Symbol, dynamic>(<core::Symbol, dynamic>{#test: test}))) as{TypeError} asy::Future<self::MyFuture::T>;
   no-such-method-forwarder method /* from org-dartlang-sdk:///sdk/lib/async/future.dart */ whenComplete(() → asy::FutureOr<dynamic> action) → asy::Future<self::MyFuture::T>
     return this.{self::MyFuture::noSuchMethod}(new core::_InvocationMirror::_withType(#whenComplete, 0, const <core::Type>[], core::List::unmodifiable<dynamic>(<dynamic>[action]), core::Map::unmodifiable<core::Symbol, dynamic>(const <core::Symbol, dynamic>{}))) as{TypeError} asy::Future<self::MyFuture::T>;
-  no-such-method-forwarder method /* from org-dartlang-sdk:///sdk/lib/async/future.dart */ timeout(core::Duration timeLimit, {() → asy::FutureOr<self::MyFuture::T> onTimeout = null}) → asy::Future<self::MyFuture::T>
+  no-such-method-forwarder method /* from org-dartlang-sdk:///sdk/lib/async/future.dart */ timeout(core::Duration timeLimit, {generic-covariant-impl () → asy::FutureOr<self::MyFuture::T> onTimeout = null}) → asy::Future<self::MyFuture::T>
     return this.{self::MyFuture::noSuchMethod}(new core::_InvocationMirror::_withType(#timeout, 0, const <core::Type>[], core::List::unmodifiable<dynamic>(<dynamic>[timeLimit]), core::Map::unmodifiable<core::Symbol, dynamic>(<core::Symbol, dynamic>{#onTimeout: onTimeout}))) as{TypeError} asy::Future<self::MyFuture::T>;
   no-such-method-forwarder method /* from org-dartlang-sdk:///sdk/lib/async/future.dart */ asStream() → asy::Stream<self::MyFuture::T>
     return this.{self::MyFuture::noSuchMethod}(new core::_InvocationMirror::_withType(#asStream, 0, const <core::Type>[], const <dynamic>[], core::Map::unmodifiable<core::Symbol, dynamic>(const <core::Symbol, dynamic>{}))) as{TypeError} asy::Stream<self::MyFuture::T>;
diff --git a/pkg/front_end/testcases/inference/future_union_downwards_2.dart.legacy.transformed.expect b/pkg/front_end/testcases/inference/future_union_downwards_2.dart.legacy.transformed.expect
index a165015..ec5724d 100644
--- a/pkg/front_end/testcases/inference/future_union_downwards_2.dart.legacy.transformed.expect
+++ b/pkg/front_end/testcases/inference/future_union_downwards_2.dart.legacy.transformed.expect
@@ -18,7 +18,7 @@
     return this.{self::MyFuture::noSuchMethod}(new core::_InvocationMirror::_withType(#catchError, 0, const <core::Type>[], core::List::unmodifiable<dynamic>(<dynamic>[onError]), core::Map::unmodifiable<core::Symbol, dynamic>(<core::Symbol, dynamic>{#test: test}))) as{TypeError} asy::Future<self::MyFuture::T>;
   no-such-method-forwarder method /* from org-dartlang-sdk:///sdk/lib/async/future.dart */ whenComplete(() → asy::FutureOr<dynamic> action) → asy::Future<self::MyFuture::T>
     return this.{self::MyFuture::noSuchMethod}(new core::_InvocationMirror::_withType(#whenComplete, 0, const <core::Type>[], core::List::unmodifiable<dynamic>(<dynamic>[action]), core::Map::unmodifiable<core::Symbol, dynamic>(const <core::Symbol, dynamic>{}))) as{TypeError} asy::Future<self::MyFuture::T>;
-  no-such-method-forwarder method /* from org-dartlang-sdk:///sdk/lib/async/future.dart */ timeout(core::Duration timeLimit, {() → asy::FutureOr<self::MyFuture::T> onTimeout = null}) → asy::Future<self::MyFuture::T>
+  no-such-method-forwarder method /* from org-dartlang-sdk:///sdk/lib/async/future.dart */ timeout(core::Duration timeLimit, {generic-covariant-impl () → asy::FutureOr<self::MyFuture::T> onTimeout = null}) → asy::Future<self::MyFuture::T>
     return this.{self::MyFuture::noSuchMethod}(new core::_InvocationMirror::_withType(#timeout, 0, const <core::Type>[], core::List::unmodifiable<dynamic>(<dynamic>[timeLimit]), core::Map::unmodifiable<core::Symbol, dynamic>(<core::Symbol, dynamic>{#onTimeout: onTimeout}))) as{TypeError} asy::Future<self::MyFuture::T>;
   no-such-method-forwarder method /* from org-dartlang-sdk:///sdk/lib/async/future.dart */ asStream() → asy::Stream<self::MyFuture::T>
     return this.{self::MyFuture::noSuchMethod}(new core::_InvocationMirror::_withType(#asStream, 0, const <core::Type>[], const <dynamic>[], core::Map::unmodifiable<core::Symbol, dynamic>(const <core::Symbol, dynamic>{}))) as{TypeError} asy::Stream<self::MyFuture::T>;
diff --git a/pkg/front_end/testcases/inference/future_union_downwards_2.dart.outline.expect b/pkg/front_end/testcases/inference/future_union_downwards_2.dart.outline.expect
index 10cd1f0..263a94f 100644
--- a/pkg/front_end/testcases/inference/future_union_downwards_2.dart.outline.expect
+++ b/pkg/front_end/testcases/inference/future_union_downwards_2.dart.outline.expect
@@ -18,7 +18,7 @@
     return this.{self::MyFuture::noSuchMethod}(new core::_InvocationMirror::_withType(#catchError, 0, const <core::Type>[], core::List::unmodifiable<dynamic>(<dynamic>[onError]), core::Map::unmodifiable<core::Symbol, dynamic>(<core::Symbol, dynamic>{#test: test}))) as{TypeError} asy::Future<self::MyFuture::T>;
   no-such-method-forwarder method /* from org-dartlang-sdk:///sdk/lib/async/future.dart */ whenComplete(() → asy::FutureOr<dynamic> action) → asy::Future<self::MyFuture::T>
     return this.{self::MyFuture::noSuchMethod}(new core::_InvocationMirror::_withType(#whenComplete, 0, const <core::Type>[], core::List::unmodifiable<dynamic>(<dynamic>[action]), core::Map::unmodifiable<core::Symbol, dynamic>(const <core::Symbol, dynamic>{}))) as{TypeError} asy::Future<self::MyFuture::T>;
-  no-such-method-forwarder method /* from org-dartlang-sdk:///sdk/lib/async/future.dart */ timeout(core::Duration timeLimit, {() → asy::FutureOr<self::MyFuture::T> onTimeout = null}) → asy::Future<self::MyFuture::T>
+  no-such-method-forwarder method /* from org-dartlang-sdk:///sdk/lib/async/future.dart */ timeout(core::Duration timeLimit, {generic-covariant-impl () → asy::FutureOr<self::MyFuture::T> onTimeout = null}) → asy::Future<self::MyFuture::T>
     return this.{self::MyFuture::noSuchMethod}(new core::_InvocationMirror::_withType(#timeout, 0, const <core::Type>[], core::List::unmodifiable<dynamic>(<dynamic>[timeLimit]), core::Map::unmodifiable<core::Symbol, dynamic>(<core::Symbol, dynamic>{#onTimeout: onTimeout}))) as{TypeError} asy::Future<self::MyFuture::T>;
   no-such-method-forwarder method /* from org-dartlang-sdk:///sdk/lib/async/future.dart */ asStream() → asy::Stream<self::MyFuture::T>
     return this.{self::MyFuture::noSuchMethod}(new core::_InvocationMirror::_withType(#asStream, 0, const <core::Type>[], const <dynamic>[], core::Map::unmodifiable<core::Symbol, dynamic>(const <core::Symbol, dynamic>{}))) as{TypeError} asy::Stream<self::MyFuture::T>;
diff --git a/pkg/front_end/testcases/inference/future_union_downwards_3.dart b/pkg/front_end/testcases/inference/future_union_downwards_3.dart
index 3cd6687..6d421db 100644
--- a/pkg/front_end/testcases/inference/future_union_downwards_3.dart
+++ b/pkg/front_end/testcases/inference/future_union_downwards_3.dart
@@ -10,7 +10,7 @@
 class MyFuture<T> implements Future<T> {
   MyFuture() {}
   MyFuture.value([x]) {}
-  dynamic noSuchMethod(/*@topType=Invocation*/ invocation) => null;
+  dynamic noSuchMethod(invocation) => null;
   MyFuture<S> then<S>(FutureOr<S> f(T x), {Function onError}) => null;
 }
 
diff --git a/pkg/front_end/testcases/inference/future_union_downwards_3.dart.legacy.expect b/pkg/front_end/testcases/inference/future_union_downwards_3.dart.legacy.expect
index a2acf08..9b07131 100644
--- a/pkg/front_end/testcases/inference/future_union_downwards_3.dart.legacy.expect
+++ b/pkg/front_end/testcases/inference/future_union_downwards_3.dart.legacy.expect
@@ -18,7 +18,7 @@
     return this.{self::MyFuture::noSuchMethod}(new core::_InvocationMirror::_withType(#catchError, 0, const <core::Type>[], core::List::unmodifiable<dynamic>(<dynamic>[onError]), core::Map::unmodifiable<core::Symbol, dynamic>(<core::Symbol, dynamic>{#test: test}))) as{TypeError} asy::Future<self::MyFuture::T>;
   no-such-method-forwarder method /* from org-dartlang-sdk:///sdk/lib/async/future.dart */ whenComplete(() → asy::FutureOr<dynamic> action) → asy::Future<self::MyFuture::T>
     return this.{self::MyFuture::noSuchMethod}(new core::_InvocationMirror::_withType(#whenComplete, 0, const <core::Type>[], core::List::unmodifiable<dynamic>(<dynamic>[action]), core::Map::unmodifiable<core::Symbol, dynamic>(const <core::Symbol, dynamic>{}))) as{TypeError} asy::Future<self::MyFuture::T>;
-  no-such-method-forwarder method /* from org-dartlang-sdk:///sdk/lib/async/future.dart */ timeout(core::Duration timeLimit, {() → asy::FutureOr<self::MyFuture::T> onTimeout = null}) → asy::Future<self::MyFuture::T>
+  no-such-method-forwarder method /* from org-dartlang-sdk:///sdk/lib/async/future.dart */ timeout(core::Duration timeLimit, {generic-covariant-impl () → asy::FutureOr<self::MyFuture::T> onTimeout = null}) → asy::Future<self::MyFuture::T>
     return this.{self::MyFuture::noSuchMethod}(new core::_InvocationMirror::_withType(#timeout, 0, const <core::Type>[], core::List::unmodifiable<dynamic>(<dynamic>[timeLimit]), core::Map::unmodifiable<core::Symbol, dynamic>(<core::Symbol, dynamic>{#onTimeout: onTimeout}))) as{TypeError} asy::Future<self::MyFuture::T>;
   no-such-method-forwarder method /* from org-dartlang-sdk:///sdk/lib/async/future.dart */ asStream() → asy::Stream<self::MyFuture::T>
     return this.{self::MyFuture::noSuchMethod}(new core::_InvocationMirror::_withType(#asStream, 0, const <core::Type>[], const <dynamic>[], core::Map::unmodifiable<core::Symbol, dynamic>(const <core::Symbol, dynamic>{}))) as{TypeError} asy::Stream<self::MyFuture::T>;
diff --git a/pkg/front_end/testcases/inference/future_union_downwards_3.dart.legacy.transformed.expect b/pkg/front_end/testcases/inference/future_union_downwards_3.dart.legacy.transformed.expect
index f4d6505..a3884a8 100644
--- a/pkg/front_end/testcases/inference/future_union_downwards_3.dart.legacy.transformed.expect
+++ b/pkg/front_end/testcases/inference/future_union_downwards_3.dart.legacy.transformed.expect
@@ -18,7 +18,7 @@
     return this.{self::MyFuture::noSuchMethod}(new core::_InvocationMirror::_withType(#catchError, 0, const <core::Type>[], core::List::unmodifiable<dynamic>(<dynamic>[onError]), core::Map::unmodifiable<core::Symbol, dynamic>(<core::Symbol, dynamic>{#test: test}))) as{TypeError} asy::Future<self::MyFuture::T>;
   no-such-method-forwarder method /* from org-dartlang-sdk:///sdk/lib/async/future.dart */ whenComplete(() → asy::FutureOr<dynamic> action) → asy::Future<self::MyFuture::T>
     return this.{self::MyFuture::noSuchMethod}(new core::_InvocationMirror::_withType(#whenComplete, 0, const <core::Type>[], core::List::unmodifiable<dynamic>(<dynamic>[action]), core::Map::unmodifiable<core::Symbol, dynamic>(const <core::Symbol, dynamic>{}))) as{TypeError} asy::Future<self::MyFuture::T>;
-  no-such-method-forwarder method /* from org-dartlang-sdk:///sdk/lib/async/future.dart */ timeout(core::Duration timeLimit, {() → asy::FutureOr<self::MyFuture::T> onTimeout = null}) → asy::Future<self::MyFuture::T>
+  no-such-method-forwarder method /* from org-dartlang-sdk:///sdk/lib/async/future.dart */ timeout(core::Duration timeLimit, {generic-covariant-impl () → asy::FutureOr<self::MyFuture::T> onTimeout = null}) → asy::Future<self::MyFuture::T>
     return this.{self::MyFuture::noSuchMethod}(new core::_InvocationMirror::_withType(#timeout, 0, const <core::Type>[], core::List::unmodifiable<dynamic>(<dynamic>[timeLimit]), core::Map::unmodifiable<core::Symbol, dynamic>(<core::Symbol, dynamic>{#onTimeout: onTimeout}))) as{TypeError} asy::Future<self::MyFuture::T>;
   no-such-method-forwarder method /* from org-dartlang-sdk:///sdk/lib/async/future.dart */ asStream() → asy::Stream<self::MyFuture::T>
     return this.{self::MyFuture::noSuchMethod}(new core::_InvocationMirror::_withType(#asStream, 0, const <core::Type>[], const <dynamic>[], core::Map::unmodifiable<core::Symbol, dynamic>(const <core::Symbol, dynamic>{}))) as{TypeError} asy::Stream<self::MyFuture::T>;
diff --git a/pkg/front_end/testcases/inference/future_union_downwards_3.dart.outline.expect b/pkg/front_end/testcases/inference/future_union_downwards_3.dart.outline.expect
index 58b3b85..da18d4d 100644
--- a/pkg/front_end/testcases/inference/future_union_downwards_3.dart.outline.expect
+++ b/pkg/front_end/testcases/inference/future_union_downwards_3.dart.outline.expect
@@ -18,7 +18,7 @@
     return this.{self::MyFuture::noSuchMethod}(new core::_InvocationMirror::_withType(#catchError, 0, const <core::Type>[], core::List::unmodifiable<dynamic>(<dynamic>[onError]), core::Map::unmodifiable<core::Symbol, dynamic>(<core::Symbol, dynamic>{#test: test}))) as{TypeError} asy::Future<self::MyFuture::T>;
   no-such-method-forwarder method /* from org-dartlang-sdk:///sdk/lib/async/future.dart */ whenComplete(() → asy::FutureOr<dynamic> action) → asy::Future<self::MyFuture::T>
     return this.{self::MyFuture::noSuchMethod}(new core::_InvocationMirror::_withType(#whenComplete, 0, const <core::Type>[], core::List::unmodifiable<dynamic>(<dynamic>[action]), core::Map::unmodifiable<core::Symbol, dynamic>(const <core::Symbol, dynamic>{}))) as{TypeError} asy::Future<self::MyFuture::T>;
-  no-such-method-forwarder method /* from org-dartlang-sdk:///sdk/lib/async/future.dart */ timeout(core::Duration timeLimit, {() → asy::FutureOr<self::MyFuture::T> onTimeout = null}) → asy::Future<self::MyFuture::T>
+  no-such-method-forwarder method /* from org-dartlang-sdk:///sdk/lib/async/future.dart */ timeout(core::Duration timeLimit, {generic-covariant-impl () → asy::FutureOr<self::MyFuture::T> onTimeout = null}) → asy::Future<self::MyFuture::T>
     return this.{self::MyFuture::noSuchMethod}(new core::_InvocationMirror::_withType(#timeout, 0, const <core::Type>[], core::List::unmodifiable<dynamic>(<dynamic>[timeLimit]), core::Map::unmodifiable<core::Symbol, dynamic>(<core::Symbol, dynamic>{#onTimeout: onTimeout}))) as{TypeError} asy::Future<self::MyFuture::T>;
   no-such-method-forwarder method /* from org-dartlang-sdk:///sdk/lib/async/future.dart */ asStream() → asy::Stream<self::MyFuture::T>
     return this.{self::MyFuture::noSuchMethod}(new core::_InvocationMirror::_withType(#asStream, 0, const <core::Type>[], const <dynamic>[], core::Map::unmodifiable<core::Symbol, dynamic>(const <core::Symbol, dynamic>{}))) as{TypeError} asy::Stream<self::MyFuture::T>;
diff --git a/pkg/front_end/testcases/inference/future_union_downwards_4.dart b/pkg/front_end/testcases/inference/future_union_downwards_4.dart
index 0bf7b5c..e9a48fc 100644
--- a/pkg/front_end/testcases/inference/future_union_downwards_4.dart
+++ b/pkg/front_end/testcases/inference/future_union_downwards_4.dart
@@ -10,7 +10,7 @@
 class MyFuture<T> implements Future<T> {
   MyFuture() {}
   MyFuture.value([x]) {}
-  dynamic noSuchMethod(/*@topType=Invocation*/ invocation) => null;
+  dynamic noSuchMethod(invocation) => null;
   MyFuture<S> then<S>(FutureOr<S> f(T x), {Function onError}) => null;
 }
 
diff --git a/pkg/front_end/testcases/inference/future_union_downwards_4.dart.legacy.expect b/pkg/front_end/testcases/inference/future_union_downwards_4.dart.legacy.expect
index 4efea1b..b27e6d9 100644
--- a/pkg/front_end/testcases/inference/future_union_downwards_4.dart.legacy.expect
+++ b/pkg/front_end/testcases/inference/future_union_downwards_4.dart.legacy.expect
@@ -18,7 +18,7 @@
     return this.{self::MyFuture::noSuchMethod}(new core::_InvocationMirror::_withType(#catchError, 0, const <core::Type>[], core::List::unmodifiable<dynamic>(<dynamic>[onError]), core::Map::unmodifiable<core::Symbol, dynamic>(<core::Symbol, dynamic>{#test: test}))) as{TypeError} asy::Future<self::MyFuture::T>;
   no-such-method-forwarder method /* from org-dartlang-sdk:///sdk/lib/async/future.dart */ whenComplete(() → asy::FutureOr<dynamic> action) → asy::Future<self::MyFuture::T>
     return this.{self::MyFuture::noSuchMethod}(new core::_InvocationMirror::_withType(#whenComplete, 0, const <core::Type>[], core::List::unmodifiable<dynamic>(<dynamic>[action]), core::Map::unmodifiable<core::Symbol, dynamic>(const <core::Symbol, dynamic>{}))) as{TypeError} asy::Future<self::MyFuture::T>;
-  no-such-method-forwarder method /* from org-dartlang-sdk:///sdk/lib/async/future.dart */ timeout(core::Duration timeLimit, {() → asy::FutureOr<self::MyFuture::T> onTimeout = null}) → asy::Future<self::MyFuture::T>
+  no-such-method-forwarder method /* from org-dartlang-sdk:///sdk/lib/async/future.dart */ timeout(core::Duration timeLimit, {generic-covariant-impl () → asy::FutureOr<self::MyFuture::T> onTimeout = null}) → asy::Future<self::MyFuture::T>
     return this.{self::MyFuture::noSuchMethod}(new core::_InvocationMirror::_withType(#timeout, 0, const <core::Type>[], core::List::unmodifiable<dynamic>(<dynamic>[timeLimit]), core::Map::unmodifiable<core::Symbol, dynamic>(<core::Symbol, dynamic>{#onTimeout: onTimeout}))) as{TypeError} asy::Future<self::MyFuture::T>;
   no-such-method-forwarder method /* from org-dartlang-sdk:///sdk/lib/async/future.dart */ asStream() → asy::Stream<self::MyFuture::T>
     return this.{self::MyFuture::noSuchMethod}(new core::_InvocationMirror::_withType(#asStream, 0, const <core::Type>[], const <dynamic>[], core::Map::unmodifiable<core::Symbol, dynamic>(const <core::Symbol, dynamic>{}))) as{TypeError} asy::Stream<self::MyFuture::T>;
diff --git a/pkg/front_end/testcases/inference/future_union_downwards_4.dart.legacy.transformed.expect b/pkg/front_end/testcases/inference/future_union_downwards_4.dart.legacy.transformed.expect
index b6eba1b..ca29563 100644
--- a/pkg/front_end/testcases/inference/future_union_downwards_4.dart.legacy.transformed.expect
+++ b/pkg/front_end/testcases/inference/future_union_downwards_4.dart.legacy.transformed.expect
@@ -18,7 +18,7 @@
     return this.{self::MyFuture::noSuchMethod}(new core::_InvocationMirror::_withType(#catchError, 0, const <core::Type>[], core::List::unmodifiable<dynamic>(<dynamic>[onError]), core::Map::unmodifiable<core::Symbol, dynamic>(<core::Symbol, dynamic>{#test: test}))) as{TypeError} asy::Future<self::MyFuture::T>;
   no-such-method-forwarder method /* from org-dartlang-sdk:///sdk/lib/async/future.dart */ whenComplete(() → asy::FutureOr<dynamic> action) → asy::Future<self::MyFuture::T>
     return this.{self::MyFuture::noSuchMethod}(new core::_InvocationMirror::_withType(#whenComplete, 0, const <core::Type>[], core::List::unmodifiable<dynamic>(<dynamic>[action]), core::Map::unmodifiable<core::Symbol, dynamic>(const <core::Symbol, dynamic>{}))) as{TypeError} asy::Future<self::MyFuture::T>;
-  no-such-method-forwarder method /* from org-dartlang-sdk:///sdk/lib/async/future.dart */ timeout(core::Duration timeLimit, {() → asy::FutureOr<self::MyFuture::T> onTimeout = null}) → asy::Future<self::MyFuture::T>
+  no-such-method-forwarder method /* from org-dartlang-sdk:///sdk/lib/async/future.dart */ timeout(core::Duration timeLimit, {generic-covariant-impl () → asy::FutureOr<self::MyFuture::T> onTimeout = null}) → asy::Future<self::MyFuture::T>
     return this.{self::MyFuture::noSuchMethod}(new core::_InvocationMirror::_withType(#timeout, 0, const <core::Type>[], core::List::unmodifiable<dynamic>(<dynamic>[timeLimit]), core::Map::unmodifiable<core::Symbol, dynamic>(<core::Symbol, dynamic>{#onTimeout: onTimeout}))) as{TypeError} asy::Future<self::MyFuture::T>;
   no-such-method-forwarder method /* from org-dartlang-sdk:///sdk/lib/async/future.dart */ asStream() → asy::Stream<self::MyFuture::T>
     return this.{self::MyFuture::noSuchMethod}(new core::_InvocationMirror::_withType(#asStream, 0, const <core::Type>[], const <dynamic>[], core::Map::unmodifiable<core::Symbol, dynamic>(const <core::Symbol, dynamic>{}))) as{TypeError} asy::Stream<self::MyFuture::T>;
diff --git a/pkg/front_end/testcases/inference/future_union_downwards_4.dart.outline.expect b/pkg/front_end/testcases/inference/future_union_downwards_4.dart.outline.expect
index 58b3b85..da18d4d 100644
--- a/pkg/front_end/testcases/inference/future_union_downwards_4.dart.outline.expect
+++ b/pkg/front_end/testcases/inference/future_union_downwards_4.dart.outline.expect
@@ -18,7 +18,7 @@
     return this.{self::MyFuture::noSuchMethod}(new core::_InvocationMirror::_withType(#catchError, 0, const <core::Type>[], core::List::unmodifiable<dynamic>(<dynamic>[onError]), core::Map::unmodifiable<core::Symbol, dynamic>(<core::Symbol, dynamic>{#test: test}))) as{TypeError} asy::Future<self::MyFuture::T>;
   no-such-method-forwarder method /* from org-dartlang-sdk:///sdk/lib/async/future.dart */ whenComplete(() → asy::FutureOr<dynamic> action) → asy::Future<self::MyFuture::T>
     return this.{self::MyFuture::noSuchMethod}(new core::_InvocationMirror::_withType(#whenComplete, 0, const <core::Type>[], core::List::unmodifiable<dynamic>(<dynamic>[action]), core::Map::unmodifiable<core::Symbol, dynamic>(const <core::Symbol, dynamic>{}))) as{TypeError} asy::Future<self::MyFuture::T>;
-  no-such-method-forwarder method /* from org-dartlang-sdk:///sdk/lib/async/future.dart */ timeout(core::Duration timeLimit, {() → asy::FutureOr<self::MyFuture::T> onTimeout = null}) → asy::Future<self::MyFuture::T>
+  no-such-method-forwarder method /* from org-dartlang-sdk:///sdk/lib/async/future.dart */ timeout(core::Duration timeLimit, {generic-covariant-impl () → asy::FutureOr<self::MyFuture::T> onTimeout = null}) → asy::Future<self::MyFuture::T>
     return this.{self::MyFuture::noSuchMethod}(new core::_InvocationMirror::_withType(#timeout, 0, const <core::Type>[], core::List::unmodifiable<dynamic>(<dynamic>[timeLimit]), core::Map::unmodifiable<core::Symbol, dynamic>(<core::Symbol, dynamic>{#onTimeout: onTimeout}))) as{TypeError} asy::Future<self::MyFuture::T>;
   no-such-method-forwarder method /* from org-dartlang-sdk:///sdk/lib/async/future.dart */ asStream() → asy::Stream<self::MyFuture::T>
     return this.{self::MyFuture::noSuchMethod}(new core::_InvocationMirror::_withType(#asStream, 0, const <core::Type>[], const <dynamic>[], core::Map::unmodifiable<core::Symbol, dynamic>(const <core::Symbol, dynamic>{}))) as{TypeError} asy::Stream<self::MyFuture::T>;
diff --git a/pkg/front_end/testcases/inference/generic_methods_correctly_recognize_generic_upper_bound.dart.outline.expect b/pkg/front_end/testcases/inference/generic_methods_correctly_recognize_generic_upper_bound.dart.outline.expect
index 93dfbdf..39a3325 100644
--- a/pkg/front_end/testcases/inference/generic_methods_correctly_recognize_generic_upper_bound.dart.outline.expect
+++ b/pkg/front_end/testcases/inference/generic_methods_correctly_recognize_generic_upper_bound.dart.outline.expect
@@ -5,7 +5,7 @@
 class Foo<T extends core::Pattern = dynamic> extends core::Object {
   synthetic constructor •() → self::Foo<self::Foo::T>
     ;
-  method method<U extends self::Foo::T = dynamic>(self::Foo::method::U u) → self::Foo::method::U
+  method method<generic-covariant-impl U extends self::Foo::T = dynamic>(self::Foo::method::U u) → self::Foo::method::U
     ;
 }
 static method main() → dynamic
diff --git a/pkg/front_end/testcases/inference/generic_methods_dart_math_min_max.dart b/pkg/front_end/testcases/inference/generic_methods_dart_math_min_max.dart
index 5ce58e8..c5494ef 100644
--- a/pkg/front_end/testcases/inference/generic_methods_dart_math_min_max.dart
+++ b/pkg/front_end/testcases/inference/generic_methods_dart_math_min_max.dart
@@ -2,7 +2,7 @@
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
 
-/*@testedFeatures=inference,error*/
+/*@testedFeatures=inference*/
 library test;
 
 import 'dart:math';
@@ -25,18 +25,16 @@
   printInt(myMax(1, 2) as int);
 
   printInt(
-      /*@typeArgs=int*/ max(1, /*@error=ArgumentTypeNotAssignable*/ 2.0));
+      /*@typeArgs=int*/ max(1, 2.0));
   printInt(
-      /*@typeArgs=int*/ min(1, /*@error=ArgumentTypeNotAssignable*/ 2.0));
+      /*@typeArgs=int*/ min(1, 2.0));
   printDouble(
       /*@typeArgs=double*/ max(1, 2.0));
   printDouble(
       /*@typeArgs=double*/ min(1, 2.0));
 
   // Types other than int and double are not accepted.
-  printInt(/*@typeArgs=int*/ min(
-      /*@error=ArgumentTypeNotAssignable*/ "hi",
-      /*@error=ArgumentTypeNotAssignable*/ "there"));
+  printInt(/*@typeArgs=int*/ min("hi", "there"));
 }
 
 main() {}
diff --git a/pkg/front_end/testcases/inference/generic_methods_dart_math_min_max.dart.strong.expect b/pkg/front_end/testcases/inference/generic_methods_dart_math_min_max.dart.strong.expect
index 13f3e92..14e6aae 100644
--- a/pkg/front_end/testcases/inference/generic_methods_dart_math_min_max.dart.strong.expect
+++ b/pkg/front_end/testcases/inference/generic_methods_dart_math_min_max.dart.strong.expect
@@ -2,25 +2,25 @@
 //
 // Problems in library:
 //
-// pkg/front_end/testcases/inference/generic_methods_dart_math_min_max.dart:28:69: Error: The argument type 'double' can't be assigned to the parameter type 'int'.
+// pkg/front_end/testcases/inference/generic_methods_dart_math_min_max.dart:28:32: Error: The argument type 'double' can't be assigned to the parameter type 'int'.
 // Try changing the type of the parameter, or casting the argument to 'int'.
-//       /*@typeArgs=int*/ max(1, /*@error=ArgumentTypeNotAssignable*/ 2.0));
-//                                                                     ^
+//       /*@typeArgs=int*/ max(1, 2.0));
+//                                ^
 //
-// pkg/front_end/testcases/inference/generic_methods_dart_math_min_max.dart:30:69: Error: The argument type 'double' can't be assigned to the parameter type 'int'.
+// pkg/front_end/testcases/inference/generic_methods_dart_math_min_max.dart:30:32: Error: The argument type 'double' can't be assigned to the parameter type 'int'.
 // Try changing the type of the parameter, or casting the argument to 'int'.
-//       /*@typeArgs=int*/ min(1, /*@error=ArgumentTypeNotAssignable*/ 2.0));
-//                                                                     ^
+//       /*@typeArgs=int*/ min(1, 2.0));
+//                                ^
 //
-// pkg/front_end/testcases/inference/generic_methods_dart_math_min_max.dart:38:44: Error: The argument type 'String' can't be assigned to the parameter type 'int'.
+// pkg/front_end/testcases/inference/generic_methods_dart_math_min_max.dart:37:34: Error: The argument type 'String' can't be assigned to the parameter type 'int'.
 // Try changing the type of the parameter, or casting the argument to 'int'.
-//       /*@error=ArgumentTypeNotAssignable*/ "hi",
-//                                            ^
+//   printInt(/*@typeArgs=int*/ min("hi", "there"));
+//                                  ^
 //
-// pkg/front_end/testcases/inference/generic_methods_dart_math_min_max.dart:39:44: Error: The argument type 'String' can't be assigned to the parameter type 'int'.
+// pkg/front_end/testcases/inference/generic_methods_dart_math_min_max.dart:37:40: Error: The argument type 'String' can't be assigned to the parameter type 'int'.
 // Try changing the type of the parameter, or casting the argument to 'int'.
-//       /*@error=ArgumentTypeNotAssignable*/ "there"));
-//                                            ^
+//   printInt(/*@typeArgs=int*/ min("hi", "there"));
+//                                        ^
 //
 import self as self;
 import "dart:core" as core;
@@ -41,22 +41,22 @@
   self::printDouble(math::min<core::double>(1.0, 2.0));
   self::printInt(self::myMax(1, 2) as{TypeError} core::int);
   self::printInt(self::myMax(1, 2) as core::int);
-  self::printInt(math::max<core::int>(1, let final<BottomType> #t1 = invalid-expression "pkg/front_end/testcases/inference/generic_methods_dart_math_min_max.dart:28:69: Error: The argument type 'double' can't be assigned to the parameter type 'int'.
+  self::printInt(math::max<core::int>(1, let final<BottomType> #t1 = invalid-expression "pkg/front_end/testcases/inference/generic_methods_dart_math_min_max.dart:28:32: Error: The argument type 'double' can't be assigned to the parameter type 'int'.
 Try changing the type of the parameter, or casting the argument to 'int'.
-      /*@typeArgs=int*/ max(1, /*@error=ArgumentTypeNotAssignable*/ 2.0));
-                                                                    ^" in 2.0 as{TypeError} core::int));
-  self::printInt(math::min<core::int>(1, let final<BottomType> #t2 = invalid-expression "pkg/front_end/testcases/inference/generic_methods_dart_math_min_max.dart:30:69: Error: The argument type 'double' can't be assigned to the parameter type 'int'.
+      /*@typeArgs=int*/ max(1, 2.0));
+                               ^" in 2.0 as{TypeError} core::int));
+  self::printInt(math::min<core::int>(1, let final<BottomType> #t2 = invalid-expression "pkg/front_end/testcases/inference/generic_methods_dart_math_min_max.dart:30:32: Error: The argument type 'double' can't be assigned to the parameter type 'int'.
 Try changing the type of the parameter, or casting the argument to 'int'.
-      /*@typeArgs=int*/ min(1, /*@error=ArgumentTypeNotAssignable*/ 2.0));
-                                                                    ^" in 2.0 as{TypeError} core::int));
+      /*@typeArgs=int*/ min(1, 2.0));
+                               ^" in 2.0 as{TypeError} core::int));
   self::printDouble(math::max<core::double>(1.0, 2.0));
   self::printDouble(math::min<core::double>(1.0, 2.0));
-  self::printInt(math::min<core::int>(let final<BottomType> #t3 = invalid-expression "pkg/front_end/testcases/inference/generic_methods_dart_math_min_max.dart:38:44: Error: The argument type 'String' can't be assigned to the parameter type 'int'.
+  self::printInt(math::min<core::int>(let final<BottomType> #t3 = invalid-expression "pkg/front_end/testcases/inference/generic_methods_dart_math_min_max.dart:37:34: Error: The argument type 'String' can't be assigned to the parameter type 'int'.
 Try changing the type of the parameter, or casting the argument to 'int'.
-      /*@error=ArgumentTypeNotAssignable*/ \"hi\",
-                                           ^" in "hi" as{TypeError} core::int, let final<BottomType> #t4 = invalid-expression "pkg/front_end/testcases/inference/generic_methods_dart_math_min_max.dart:39:44: Error: The argument type 'String' can't be assigned to the parameter type 'int'.
+  printInt(/*@typeArgs=int*/ min(\"hi\", \"there\"));
+                                 ^" in "hi" as{TypeError} core::int, let final<BottomType> #t4 = invalid-expression "pkg/front_end/testcases/inference/generic_methods_dart_math_min_max.dart:37:40: Error: The argument type 'String' can't be assigned to the parameter type 'int'.
 Try changing the type of the parameter, or casting the argument to 'int'.
-      /*@error=ArgumentTypeNotAssignable*/ \"there\"));
-                                           ^" in "there" as{TypeError} core::int));
+  printInt(/*@typeArgs=int*/ min(\"hi\", \"there\"));
+                                       ^" in "there" as{TypeError} core::int));
 }
 static method main() → dynamic {}
diff --git a/pkg/front_end/testcases/inference/generic_methods_dart_math_min_max.dart.strong.transformed.expect b/pkg/front_end/testcases/inference/generic_methods_dart_math_min_max.dart.strong.transformed.expect
index 13f3e92..14e6aae 100644
--- a/pkg/front_end/testcases/inference/generic_methods_dart_math_min_max.dart.strong.transformed.expect
+++ b/pkg/front_end/testcases/inference/generic_methods_dart_math_min_max.dart.strong.transformed.expect
@@ -2,25 +2,25 @@
 //
 // Problems in library:
 //
-// pkg/front_end/testcases/inference/generic_methods_dart_math_min_max.dart:28:69: Error: The argument type 'double' can't be assigned to the parameter type 'int'.
+// pkg/front_end/testcases/inference/generic_methods_dart_math_min_max.dart:28:32: Error: The argument type 'double' can't be assigned to the parameter type 'int'.
 // Try changing the type of the parameter, or casting the argument to 'int'.
-//       /*@typeArgs=int*/ max(1, /*@error=ArgumentTypeNotAssignable*/ 2.0));
-//                                                                     ^
+//       /*@typeArgs=int*/ max(1, 2.0));
+//                                ^
 //
-// pkg/front_end/testcases/inference/generic_methods_dart_math_min_max.dart:30:69: Error: The argument type 'double' can't be assigned to the parameter type 'int'.
+// pkg/front_end/testcases/inference/generic_methods_dart_math_min_max.dart:30:32: Error: The argument type 'double' can't be assigned to the parameter type 'int'.
 // Try changing the type of the parameter, or casting the argument to 'int'.
-//       /*@typeArgs=int*/ min(1, /*@error=ArgumentTypeNotAssignable*/ 2.0));
-//                                                                     ^
+//       /*@typeArgs=int*/ min(1, 2.0));
+//                                ^
 //
-// pkg/front_end/testcases/inference/generic_methods_dart_math_min_max.dart:38:44: Error: The argument type 'String' can't be assigned to the parameter type 'int'.
+// pkg/front_end/testcases/inference/generic_methods_dart_math_min_max.dart:37:34: Error: The argument type 'String' can't be assigned to the parameter type 'int'.
 // Try changing the type of the parameter, or casting the argument to 'int'.
-//       /*@error=ArgumentTypeNotAssignable*/ "hi",
-//                                            ^
+//   printInt(/*@typeArgs=int*/ min("hi", "there"));
+//                                  ^
 //
-// pkg/front_end/testcases/inference/generic_methods_dart_math_min_max.dart:39:44: Error: The argument type 'String' can't be assigned to the parameter type 'int'.
+// pkg/front_end/testcases/inference/generic_methods_dart_math_min_max.dart:37:40: Error: The argument type 'String' can't be assigned to the parameter type 'int'.
 // Try changing the type of the parameter, or casting the argument to 'int'.
-//       /*@error=ArgumentTypeNotAssignable*/ "there"));
-//                                            ^
+//   printInt(/*@typeArgs=int*/ min("hi", "there"));
+//                                        ^
 //
 import self as self;
 import "dart:core" as core;
@@ -41,22 +41,22 @@
   self::printDouble(math::min<core::double>(1.0, 2.0));
   self::printInt(self::myMax(1, 2) as{TypeError} core::int);
   self::printInt(self::myMax(1, 2) as core::int);
-  self::printInt(math::max<core::int>(1, let final<BottomType> #t1 = invalid-expression "pkg/front_end/testcases/inference/generic_methods_dart_math_min_max.dart:28:69: Error: The argument type 'double' can't be assigned to the parameter type 'int'.
+  self::printInt(math::max<core::int>(1, let final<BottomType> #t1 = invalid-expression "pkg/front_end/testcases/inference/generic_methods_dart_math_min_max.dart:28:32: Error: The argument type 'double' can't be assigned to the parameter type 'int'.
 Try changing the type of the parameter, or casting the argument to 'int'.
-      /*@typeArgs=int*/ max(1, /*@error=ArgumentTypeNotAssignable*/ 2.0));
-                                                                    ^" in 2.0 as{TypeError} core::int));
-  self::printInt(math::min<core::int>(1, let final<BottomType> #t2 = invalid-expression "pkg/front_end/testcases/inference/generic_methods_dart_math_min_max.dart:30:69: Error: The argument type 'double' can't be assigned to the parameter type 'int'.
+      /*@typeArgs=int*/ max(1, 2.0));
+                               ^" in 2.0 as{TypeError} core::int));
+  self::printInt(math::min<core::int>(1, let final<BottomType> #t2 = invalid-expression "pkg/front_end/testcases/inference/generic_methods_dart_math_min_max.dart:30:32: Error: The argument type 'double' can't be assigned to the parameter type 'int'.
 Try changing the type of the parameter, or casting the argument to 'int'.
-      /*@typeArgs=int*/ min(1, /*@error=ArgumentTypeNotAssignable*/ 2.0));
-                                                                    ^" in 2.0 as{TypeError} core::int));
+      /*@typeArgs=int*/ min(1, 2.0));
+                               ^" in 2.0 as{TypeError} core::int));
   self::printDouble(math::max<core::double>(1.0, 2.0));
   self::printDouble(math::min<core::double>(1.0, 2.0));
-  self::printInt(math::min<core::int>(let final<BottomType> #t3 = invalid-expression "pkg/front_end/testcases/inference/generic_methods_dart_math_min_max.dart:38:44: Error: The argument type 'String' can't be assigned to the parameter type 'int'.
+  self::printInt(math::min<core::int>(let final<BottomType> #t3 = invalid-expression "pkg/front_end/testcases/inference/generic_methods_dart_math_min_max.dart:37:34: Error: The argument type 'String' can't be assigned to the parameter type 'int'.
 Try changing the type of the parameter, or casting the argument to 'int'.
-      /*@error=ArgumentTypeNotAssignable*/ \"hi\",
-                                           ^" in "hi" as{TypeError} core::int, let final<BottomType> #t4 = invalid-expression "pkg/front_end/testcases/inference/generic_methods_dart_math_min_max.dart:39:44: Error: The argument type 'String' can't be assigned to the parameter type 'int'.
+  printInt(/*@typeArgs=int*/ min(\"hi\", \"there\"));
+                                 ^" in "hi" as{TypeError} core::int, let final<BottomType> #t4 = invalid-expression "pkg/front_end/testcases/inference/generic_methods_dart_math_min_max.dart:37:40: Error: The argument type 'String' can't be assigned to the parameter type 'int'.
 Try changing the type of the parameter, or casting the argument to 'int'.
-      /*@error=ArgumentTypeNotAssignable*/ \"there\"));
-                                           ^" in "there" as{TypeError} core::int));
+  printInt(/*@typeArgs=int*/ min(\"hi\", \"there\"));
+                                       ^" in "there" as{TypeError} core::int));
 }
 static method main() → dynamic {}
diff --git a/pkg/front_end/testcases/inference/generic_methods_do_not_infer_invalid_override_of_generic_method.dart b/pkg/front_end/testcases/inference/generic_methods_do_not_infer_invalid_override_of_generic_method.dart
index c72713a..fc87629 100644
--- a/pkg/front_end/testcases/inference/generic_methods_do_not_infer_invalid_override_of_generic_method.dart
+++ b/pkg/front_end/testcases/inference/generic_methods_do_not_infer_invalid_override_of_generic_method.dart
@@ -2,7 +2,7 @@
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
 
-/*@testedFeatures=inference,error*/
+/*@testedFeatures=inference*/
 library test;
 
 class C {
@@ -10,15 +10,12 @@
 }
 
 class D extends C {
-/*@error=OverrideTypeVariablesMismatch*/
-/*@error=OverrideTypeMismatchReturnType*/ /*@topType=dynamic*/ m(
-          /*@topType=dynamic*/ x) =>
-      x;
+  m(x) => x;
 }
 
 main() {
   int y = /*info:DYNAMIC_CAST*/ new D()
-      . /*error:WRONG_NUMBER_OF_TYPE_ARGUMENTS_METHOD*/ /*@target=D::m*/ /*@error=TypeArgumentMismatch*/ m<
-          int>(42);
+      . /*error:WRONG_NUMBER_OF_TYPE_ARGUMENTS_METHOD*/ /*@target=D::m*/ m<int>(
+          42);
   print(y);
 }
diff --git a/pkg/front_end/testcases/inference/generic_methods_do_not_infer_invalid_override_of_generic_method.dart.strong.expect b/pkg/front_end/testcases/inference/generic_methods_do_not_infer_invalid_override_of_generic_method.dart.strong.expect
index 6e70f39..d79aa89 100644
--- a/pkg/front_end/testcases/inference/generic_methods_do_not_infer_invalid_override_of_generic_method.dart.strong.expect
+++ b/pkg/front_end/testcases/inference/generic_methods_do_not_infer_invalid_override_of_generic_method.dart.strong.expect
@@ -2,24 +2,24 @@
 //
 // Problems in library:
 //
-// pkg/front_end/testcases/inference/generic_methods_do_not_infer_invalid_override_of_generic_method.dart:14:64: Error: Declared type variables of 'D.m' doesn't match those on overridden method 'C.m'.
-// /*@error=OverrideTypeMismatchReturnType*/ /*@topType=dynamic*/ m(
-//                                                                ^
+// pkg/front_end/testcases/inference/generic_methods_do_not_infer_invalid_override_of_generic_method.dart:13:3: Error: Declared type variables of 'D.m' doesn't match those on overridden method 'C.m'.
+//   m(x) => x;
+//   ^
 // pkg/front_end/testcases/inference/generic_methods_do_not_infer_invalid_override_of_generic_method.dart:9:5: Context: This is the overridden method ('m').
 //   T m<T>(T x) => x;
 //     ^
 //
-// pkg/front_end/testcases/inference/generic_methods_do_not_infer_invalid_override_of_generic_method.dart:14:64: Error: The return type of the method 'D.m' is 'dynamic', which does not match the return type, 'T', of the overridden method, 'C.m'.
+// pkg/front_end/testcases/inference/generic_methods_do_not_infer_invalid_override_of_generic_method.dart:13:3: Error: The return type of the method 'D.m' is 'dynamic', which does not match the return type, 'T', of the overridden method, 'C.m'.
 // Change to a subtype of 'T'.
-// /*@error=OverrideTypeMismatchReturnType*/ /*@topType=dynamic*/ m(
-//                                                                ^
+//   m(x) => x;
+//   ^
 // pkg/front_end/testcases/inference/generic_methods_do_not_infer_invalid_override_of_generic_method.dart:9:5: Context: This is the overridden method ('m').
 //   T m<T>(T x) => x;
 //     ^
 //
-// pkg/front_end/testcases/inference/generic_methods_do_not_infer_invalid_override_of_generic_method.dart:21:106: Error: Expected 0 type arguments.
-//       . /*error:WRONG_NUMBER_OF_TYPE_ARGUMENTS_METHOD*/ /*@target=D::m*/ /*@error=TypeArgumentMismatch*/ m<
-//                                                                                                          ^
+// pkg/front_end/testcases/inference/generic_methods_do_not_infer_invalid_override_of_generic_method.dart:18:74: Error: Expected 0 type arguments.
+//       . /*error:WRONG_NUMBER_OF_TYPE_ARGUMENTS_METHOD*/ /*@target=D::m*/ m<int>(
+//                                                                          ^
 //
 import self as self;
 import "dart:core" as core;
diff --git a/pkg/front_end/testcases/inference/generic_methods_handle_override_of_non_generic_with_generic.dart b/pkg/front_end/testcases/inference/generic_methods_handle_override_of_non_generic_with_generic.dart
index b1f78be..5d9fa15 100644
--- a/pkg/front_end/testcases/inference/generic_methods_handle_override_of_non_generic_with_generic.dart
+++ b/pkg/front_end/testcases/inference/generic_methods_handle_override_of_non_generic_with_generic.dart
@@ -2,21 +2,17 @@
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
 
-/*@testedFeatures=inference,error*/
+/*@testedFeatures=inference*/
 library test;
 
 class C {
-  /*@topType=dynamic*/ m(/*@topType=dynamic*/ x) => x;
+  m(x) => x;
   dynamic g(int x) => x;
 }
 
 class D extends C {
-  T /*@error=OverrideTypeVariablesMismatch*/ m<T>(
-          T /*@error=OverrideTypeMismatchParameter*/ x) =>
-      x;
-  T /*@error=OverrideTypeVariablesMismatch*/ g<T>(
-          T /*@error=OverrideTypeMismatchParameter*/ x) =>
-      x;
+  T m<T>(T x) => x;
+  T g<T>(T x) => x;
 }
 
 main() {
diff --git a/pkg/front_end/testcases/inference/generic_methods_handle_override_of_non_generic_with_generic.dart.legacy.expect b/pkg/front_end/testcases/inference/generic_methods_handle_override_of_non_generic_with_generic.dart.legacy.expect
index 2b9e694..ecbdb07 100644
--- a/pkg/front_end/testcases/inference/generic_methods_handle_override_of_non_generic_with_generic.dart.legacy.expect
+++ b/pkg/front_end/testcases/inference/generic_methods_handle_override_of_non_generic_with_generic.dart.legacy.expect
@@ -2,16 +2,16 @@
 //
 // Problems in library:
 //
-// pkg/front_end/testcases/inference/generic_methods_handle_override_of_non_generic_with_generic.dart:14:46: Warning: Declared type variables of 'D.m' doesn't match those on overridden method 'C.m'.
-//   T /*@error=OverrideTypeVariablesMismatch*/ m<T>(
-//                                              ^
-// pkg/front_end/testcases/inference/generic_methods_handle_override_of_non_generic_with_generic.dart:9:24: Context: This is the overridden method ('m').
-//   /*@topType=dynamic*/ m(/*@topType=dynamic*/ x) => x;
-//                        ^
+// pkg/front_end/testcases/inference/generic_methods_handle_override_of_non_generic_with_generic.dart:14:5: Warning: Declared type variables of 'D.m' doesn't match those on overridden method 'C.m'.
+//   T m<T>(T x) => x;
+//     ^
+// pkg/front_end/testcases/inference/generic_methods_handle_override_of_non_generic_with_generic.dart:9:3: Context: This is the overridden method ('m').
+//   m(x) => x;
+//   ^
 //
-// pkg/front_end/testcases/inference/generic_methods_handle_override_of_non_generic_with_generic.dart:17:46: Warning: Declared type variables of 'D.g' doesn't match those on overridden method 'C.g'.
-//   T /*@error=OverrideTypeVariablesMismatch*/ g<T>(
-//                                              ^
+// pkg/front_end/testcases/inference/generic_methods_handle_override_of_non_generic_with_generic.dart:15:5: Warning: Declared type variables of 'D.g' doesn't match those on overridden method 'C.g'.
+//   T g<T>(T x) => x;
+//     ^
 // pkg/front_end/testcases/inference/generic_methods_handle_override_of_non_generic_with_generic.dart:10:11: Context: This is the overridden method ('g').
 //   dynamic g(int x) => x;
 //           ^
diff --git a/pkg/front_end/testcases/inference/generic_methods_handle_override_of_non_generic_with_generic.dart.legacy.transformed.expect b/pkg/front_end/testcases/inference/generic_methods_handle_override_of_non_generic_with_generic.dart.legacy.transformed.expect
index 2b9e694..ecbdb07 100644
--- a/pkg/front_end/testcases/inference/generic_methods_handle_override_of_non_generic_with_generic.dart.legacy.transformed.expect
+++ b/pkg/front_end/testcases/inference/generic_methods_handle_override_of_non_generic_with_generic.dart.legacy.transformed.expect
@@ -2,16 +2,16 @@
 //
 // Problems in library:
 //
-// pkg/front_end/testcases/inference/generic_methods_handle_override_of_non_generic_with_generic.dart:14:46: Warning: Declared type variables of 'D.m' doesn't match those on overridden method 'C.m'.
-//   T /*@error=OverrideTypeVariablesMismatch*/ m<T>(
-//                                              ^
-// pkg/front_end/testcases/inference/generic_methods_handle_override_of_non_generic_with_generic.dart:9:24: Context: This is the overridden method ('m').
-//   /*@topType=dynamic*/ m(/*@topType=dynamic*/ x) => x;
-//                        ^
+// pkg/front_end/testcases/inference/generic_methods_handle_override_of_non_generic_with_generic.dart:14:5: Warning: Declared type variables of 'D.m' doesn't match those on overridden method 'C.m'.
+//   T m<T>(T x) => x;
+//     ^
+// pkg/front_end/testcases/inference/generic_methods_handle_override_of_non_generic_with_generic.dart:9:3: Context: This is the overridden method ('m').
+//   m(x) => x;
+//   ^
 //
-// pkg/front_end/testcases/inference/generic_methods_handle_override_of_non_generic_with_generic.dart:17:46: Warning: Declared type variables of 'D.g' doesn't match those on overridden method 'C.g'.
-//   T /*@error=OverrideTypeVariablesMismatch*/ g<T>(
-//                                              ^
+// pkg/front_end/testcases/inference/generic_methods_handle_override_of_non_generic_with_generic.dart:15:5: Warning: Declared type variables of 'D.g' doesn't match those on overridden method 'C.g'.
+//   T g<T>(T x) => x;
+//     ^
 // pkg/front_end/testcases/inference/generic_methods_handle_override_of_non_generic_with_generic.dart:10:11: Context: This is the overridden method ('g').
 //   dynamic g(int x) => x;
 //           ^
diff --git a/pkg/front_end/testcases/inference/generic_methods_handle_override_of_non_generic_with_generic.dart.strong.expect b/pkg/front_end/testcases/inference/generic_methods_handle_override_of_non_generic_with_generic.dart.strong.expect
index 04d3c2c..9d1f921 100644
--- a/pkg/front_end/testcases/inference/generic_methods_handle_override_of_non_generic_with_generic.dart.strong.expect
+++ b/pkg/front_end/testcases/inference/generic_methods_handle_override_of_non_generic_with_generic.dart.strong.expect
@@ -2,32 +2,32 @@
 //
 // Problems in library:
 //
-// pkg/front_end/testcases/inference/generic_methods_handle_override_of_non_generic_with_generic.dart:14:46: Error: Declared type variables of 'D.m' doesn't match those on overridden method 'C.m'.
-//   T /*@error=OverrideTypeVariablesMismatch*/ m<T>(
-//                                              ^
-// pkg/front_end/testcases/inference/generic_methods_handle_override_of_non_generic_with_generic.dart:9:24: Context: This is the overridden method ('m').
-//   /*@topType=dynamic*/ m(/*@topType=dynamic*/ x) => x;
-//                        ^
+// pkg/front_end/testcases/inference/generic_methods_handle_override_of_non_generic_with_generic.dart:14:5: Error: Declared type variables of 'D.m' doesn't match those on overridden method 'C.m'.
+//   T m<T>(T x) => x;
+//     ^
+// pkg/front_end/testcases/inference/generic_methods_handle_override_of_non_generic_with_generic.dart:9:3: Context: This is the overridden method ('m').
+//   m(x) => x;
+//   ^
 //
-// pkg/front_end/testcases/inference/generic_methods_handle_override_of_non_generic_with_generic.dart:15:54: Error: The parameter 'x' of the method 'D.m' has type 'T', which does not match the corresponding type, 'dynamic', in the overridden method, 'C.m'.
+// pkg/front_end/testcases/inference/generic_methods_handle_override_of_non_generic_with_generic.dart:14:12: Error: The parameter 'x' of the method 'D.m' has type 'T', which does not match the corresponding type, 'dynamic', in the overridden method, 'C.m'.
 // Change to a supertype of 'dynamic', or, for a covariant parameter, a subtype.
-//           T /*@error=OverrideTypeMismatchParameter*/ x) =>
-//                                                      ^
-// pkg/front_end/testcases/inference/generic_methods_handle_override_of_non_generic_with_generic.dart:9:24: Context: This is the overridden method ('m').
-//   /*@topType=dynamic*/ m(/*@topType=dynamic*/ x) => x;
-//                        ^
+//   T m<T>(T x) => x;
+//            ^
+// pkg/front_end/testcases/inference/generic_methods_handle_override_of_non_generic_with_generic.dart:9:3: Context: This is the overridden method ('m').
+//   m(x) => x;
+//   ^
 //
-// pkg/front_end/testcases/inference/generic_methods_handle_override_of_non_generic_with_generic.dart:17:46: Error: Declared type variables of 'D.g' doesn't match those on overridden method 'C.g'.
-//   T /*@error=OverrideTypeVariablesMismatch*/ g<T>(
-//                                              ^
+// pkg/front_end/testcases/inference/generic_methods_handle_override_of_non_generic_with_generic.dart:15:5: Error: Declared type variables of 'D.g' doesn't match those on overridden method 'C.g'.
+//   T g<T>(T x) => x;
+//     ^
 // pkg/front_end/testcases/inference/generic_methods_handle_override_of_non_generic_with_generic.dart:10:11: Context: This is the overridden method ('g').
 //   dynamic g(int x) => x;
 //           ^
 //
-// pkg/front_end/testcases/inference/generic_methods_handle_override_of_non_generic_with_generic.dart:18:54: Error: The parameter 'x' of the method 'D.g' has type 'T', which does not match the corresponding type, 'int', in the overridden method, 'C.g'.
+// pkg/front_end/testcases/inference/generic_methods_handle_override_of_non_generic_with_generic.dart:15:12: Error: The parameter 'x' of the method 'D.g' has type 'T', which does not match the corresponding type, 'int', in the overridden method, 'C.g'.
 // Change to a supertype of 'int', or, for a covariant parameter, a subtype.
-//           T /*@error=OverrideTypeMismatchParameter*/ x) =>
-//                                                      ^
+//   T g<T>(T x) => x;
+//            ^
 // pkg/front_end/testcases/inference/generic_methods_handle_override_of_non_generic_with_generic.dart:10:11: Context: This is the overridden method ('g').
 //   dynamic g(int x) => x;
 //           ^
diff --git a/pkg/front_end/testcases/inference/generic_methods_infer_generic_function_parameter_type.dart b/pkg/front_end/testcases/inference/generic_methods_infer_generic_function_parameter_type.dart
index 8fc6aa4..c980fb7 100644
--- a/pkg/front_end/testcases/inference/generic_methods_infer_generic_function_parameter_type.dart
+++ b/pkg/front_end/testcases/inference/generic_methods_infer_generic_function_parameter_type.dart
@@ -6,7 +6,7 @@
 library test;
 
 class C<T> extends D<T> {
-  /*@topType=(C::f::U) -> void*/ f<U>(/*@topType=C::f::U*/ x) {}
+  f<U>(x) {}
 }
 
 class D<T> {
diff --git a/pkg/front_end/testcases/inference/generic_methods_infer_generic_function_parameter_type2.dart b/pkg/front_end/testcases/inference/generic_methods_infer_generic_function_parameter_type2.dart
index ca323a2..8ca88c6 100644
--- a/pkg/front_end/testcases/inference/generic_methods_infer_generic_function_parameter_type2.dart
+++ b/pkg/front_end/testcases/inference/generic_methods_infer_generic_function_parameter_type2.dart
@@ -6,7 +6,7 @@
 library test;
 
 class C<T> extends D<T> {
-  /*@topType=void*/ f<U>(/*@topType=() -> List<C::f::U>*/ g) => null;
+  f<U>(g) => null;
 }
 
 abstract class D<T> {
diff --git a/pkg/front_end/testcases/inference/generic_methods_infer_generic_function_return_type.dart b/pkg/front_end/testcases/inference/generic_methods_infer_generic_function_return_type.dart
index 16f1fcf..e46904d 100644
--- a/pkg/front_end/testcases/inference/generic_methods_infer_generic_function_return_type.dart
+++ b/pkg/front_end/testcases/inference/generic_methods_infer_generic_function_return_type.dart
@@ -6,7 +6,7 @@
 library test;
 
 class C<T> extends D<T> {
-  /*@topType=() -> C::f::U*/ f<U>(/*@topType=C::f::U*/ x) {}
+  f<U>(x) {}
 }
 
 class D<T> {
diff --git a/pkg/front_end/testcases/inference/generic_methods_infer_generic_method_type.dart b/pkg/front_end/testcases/inference/generic_methods_infer_generic_method_type.dart
index db7ae17..db2f883 100644
--- a/pkg/front_end/testcases/inference/generic_methods_infer_generic_method_type.dart
+++ b/pkg/front_end/testcases/inference/generic_methods_infer_generic_method_type.dart
@@ -10,7 +10,7 @@
 }
 
 class D extends C {
-  /*@topType=D::m::S*/ m<S>(/*@topType=D::m::S*/ x) => x;
+  m<S>(x) => x;
 }
 
 main() {
diff --git a/pkg/front_end/testcases/inference/index_assign_operator_return_type.dart b/pkg/front_end/testcases/inference/index_assign_operator_return_type.dart
index 6f16f85..47099c8 100644
--- a/pkg/front_end/testcases/inference/index_assign_operator_return_type.dart
+++ b/pkg/front_end/testcases/inference/index_assign_operator_return_type.dart
@@ -2,7 +2,7 @@
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
 
-/*@testedFeatures=inference,error*/
+/*@testedFeatures=inference*/
 library test;
 
 class C {
@@ -14,7 +14,7 @@
 }
 
 class D extends C implements I {
-  operator /*@topType=void*/ []=(dynamic index, dynamic value) {}
+  operator []=(dynamic index, dynamic value) {}
 }
 
 main() {}
diff --git a/pkg/front_end/testcases/inference/index_assign_operator_return_type_2.dart b/pkg/front_end/testcases/inference/index_assign_operator_return_type_2.dart
index b7ddcd0..84362ad 100644
--- a/pkg/front_end/testcases/inference/index_assign_operator_return_type_2.dart
+++ b/pkg/front_end/testcases/inference/index_assign_operator_return_type_2.dart
@@ -2,7 +2,7 @@
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
 
-/*@testedFeatures=inference,error*/
+/*@testedFeatures=inference*/
 library test;
 
 class C {
@@ -14,7 +14,7 @@
 }
 
 class D extends C implements I {
-  operator /*@topType=void*/ []=(int index, /*@topType=dynamic*/ value) {}
+  operator []=(int index, value) {}
 }
 
 main() {}
diff --git a/pkg/front_end/testcases/inference/infer_accessor_from_later_inferred_field.dart b/pkg/front_end/testcases/inference/infer_accessor_from_later_inferred_field.dart
index 0d751d9..bd7233a 100644
--- a/pkg/front_end/testcases/inference/infer_accessor_from_later_inferred_field.dart
+++ b/pkg/front_end/testcases/inference/infer_accessor_from_later_inferred_field.dart
@@ -6,12 +6,12 @@
 library test;
 
 class A implements B {
-  get /*@topType=int*/ x => f();
-  void set x(/*@topType=int*/ value) {}
+  get x => f();
+  void set x(value) {}
 }
 
 class B {
-  var /*@topType=int*/ x = 0;
+  var x = 0;
 }
 
 dynamic f() => null;
diff --git a/pkg/front_end/testcases/inference/infer_assign_to_ref.dart b/pkg/front_end/testcases/inference/infer_assign_to_ref.dart
index ac6e633..c4b8bcc 100644
--- a/pkg/front_end/testcases/inference/infer_assign_to_ref.dart
+++ b/pkg/front_end/testcases/inference/infer_assign_to_ref.dart
@@ -10,7 +10,7 @@
 }
 
 A a = new A();
-var /*@topType=int*/ c = 0;
+var c = 0;
 
 main() {
   a;
diff --git a/pkg/front_end/testcases/inference/infer_binary_custom.dart b/pkg/front_end/testcases/inference/infer_binary_custom.dart
index ceb40bb..d25eef7 100644
--- a/pkg/front_end/testcases/inference/infer_binary_custom.dart
+++ b/pkg/front_end/testcases/inference/infer_binary_custom.dart
@@ -6,12 +6,12 @@
 library test;
 
 class A {
-  int operator +(/*@topType=dynamic*/ other) => 1;
-  double operator -(/*@topType=dynamic*/ other) => 2.0;
+  int operator +(other) => 1;
+  double operator -(other) => 2.0;
 }
 
-var /*@topType=int*/ v_add = new A() /*@target=A::+*/ + 'foo';
-var /*@topType=double*/ v_minus = new A() /*@target=A::-*/ - 'bar';
+var v_add = new A() /*@target=A::+*/ + 'foo';
+var v_minus = new A() /*@target=A::-*/ - 'bar';
 
 main() {
   v_add;
diff --git a/pkg/front_end/testcases/inference/infer_binary_double_double.dart b/pkg/front_end/testcases/inference/infer_binary_double_double.dart
index 4a70a38..ad180e6 100644
--- a/pkg/front_end/testcases/inference/infer_binary_double_double.dart
+++ b/pkg/front_end/testcases/inference/infer_binary_double_double.dart
@@ -5,18 +5,18 @@
 /*@testedFeatures=inference*/
 library test;
 
-var /*@topType=bool*/ a_equal = 1.0 /*@target=num::==*/ == 2.0;
-var /*@topType=bool*/ a_notEqual = 1.0 /*@target=num::==*/ != 2.0;
-var /*@topType=double*/ a_add = 1.0 /*@target=double::+*/ + 2.0;
-var /*@topType=double*/ a_subtract = 1.0 /*@target=double::-*/ - 2.0;
-var /*@topType=double*/ a_multiply = 1.0 /*@target=double::**/ * 2.0;
-var /*@topType=double*/ a_divide = 1.0 /*@target=double::/ */ / 2.0;
-var /*@topType=int*/ a_floorDivide = 1.0 /*@target=double::~/ */ ~/ 2.0;
-var /*@topType=bool*/ a_greater = 1.0 /*@target=num::>*/ > 2.0;
-var /*@topType=bool*/ a_less = 1.0 /*@target=num::<*/ < 2.0;
-var /*@topType=bool*/ a_greaterEqual = 1.0 /*@target=num::>=*/ >= 2.0;
-var /*@topType=bool*/ a_lessEqual = 1.0 /*@target=num::<=*/ <= 2.0;
-var /*@topType=double*/ a_modulo = 1.0 /*@target=double::%*/ % 2.0;
+var a_equal = 1.0 /*@target=num::==*/ == 2.0;
+var a_notEqual = 1.0 /*@target=num::==*/ != 2.0;
+var a_add = 1.0 /*@target=double::+*/ + 2.0;
+var a_subtract = 1.0 /*@target=double::-*/ - 2.0;
+var a_multiply = 1.0 /*@target=double::**/ * 2.0;
+var a_divide = 1.0 /*@target=double::/ */ / 2.0;
+var a_floorDivide = 1.0 /*@target=double::~/ */ ~/ 2.0;
+var a_greater = 1.0 /*@target=num::>*/ > 2.0;
+var a_less = 1.0 /*@target=num::<*/ < 2.0;
+var a_greaterEqual = 1.0 /*@target=num::>=*/ >= 2.0;
+var a_lessEqual = 1.0 /*@target=num::<=*/ <= 2.0;
+var a_modulo = 1.0 /*@target=double::%*/ % 2.0;
 
 main() {
   a_equal;
diff --git a/pkg/front_end/testcases/inference/infer_binary_double_int.dart b/pkg/front_end/testcases/inference/infer_binary_double_int.dart
index 00d3420..7794c6d 100644
--- a/pkg/front_end/testcases/inference/infer_binary_double_int.dart
+++ b/pkg/front_end/testcases/inference/infer_binary_double_int.dart
@@ -5,18 +5,18 @@
 /*@testedFeatures=inference*/
 library test;
 
-var /*@topType=bool*/ a_equal = 1.0 /*@target=num::==*/ == 2;
-var /*@topType=bool*/ a_notEqual = 1.0 /*@target=num::==*/ != 2;
-var /*@topType=double*/ a_add = 1.0 /*@target=double::+*/ + 2;
-var /*@topType=double*/ a_subtract = 1.0 /*@target=double::-*/ - 2;
-var /*@topType=double*/ a_multiply = 1.0 /*@target=double::**/ * 2;
-var /*@topType=double*/ a_divide = 1.0 /*@target=double::/ */ / 2;
-var /*@topType=int*/ a_floorDivide = 1.0 /*@target=double::~/ */ ~/ 2;
-var /*@topType=bool*/ a_greater = 1.0 /*@target=num::>*/ > 2;
-var /*@topType=bool*/ a_less = 1.0 /*@target=num::<*/ < 2;
-var /*@topType=bool*/ a_greaterEqual = 1.0 /*@target=num::>=*/ >= 2;
-var /*@topType=bool*/ a_lessEqual = 1.0 /*@target=num::<=*/ <= 2;
-var /*@topType=double*/ a_modulo = 1.0 /*@target=double::%*/ % 2;
+var a_equal = 1.0 /*@target=num::==*/ == 2;
+var a_notEqual = 1.0 /*@target=num::==*/ != 2;
+var a_add = 1.0 /*@target=double::+*/ + 2;
+var a_subtract = 1.0 /*@target=double::-*/ - 2;
+var a_multiply = 1.0 /*@target=double::**/ * 2;
+var a_divide = 1.0 /*@target=double::/ */ / 2;
+var a_floorDivide = 1.0 /*@target=double::~/ */ ~/ 2;
+var a_greater = 1.0 /*@target=num::>*/ > 2;
+var a_less = 1.0 /*@target=num::<*/ < 2;
+var a_greaterEqual = 1.0 /*@target=num::>=*/ >= 2;
+var a_lessEqual = 1.0 /*@target=num::<=*/ <= 2;
+var a_modulo = 1.0 /*@target=double::%*/ % 2;
 
 main() {
   a_equal;
diff --git a/pkg/front_end/testcases/inference/infer_binary_int_double.dart b/pkg/front_end/testcases/inference/infer_binary_int_double.dart
index 7d85e62..64d270f 100644
--- a/pkg/front_end/testcases/inference/infer_binary_int_double.dart
+++ b/pkg/front_end/testcases/inference/infer_binary_int_double.dart
@@ -5,18 +5,18 @@
 /*@testedFeatures=inference*/
 library test;
 
-var /*@topType=bool*/ a_equal = 1 /*@target=num::==*/ == 2.0;
-var /*@topType=bool*/ a_notEqual = 1 /*@target=num::==*/ != 2.0;
-var /*@topType=double*/ a_add = 1 /*@target=num::+*/ + 2.0;
-var /*@topType=double*/ a_subtract = 1 /*@target=num::-*/ - 2.0;
-var /*@topType=double*/ a_multiply = 1 /*@target=num::**/ * 2.0;
-var /*@topType=double*/ a_divide = 1 /*@target=num::/ */ / 2.0;
-var /*@topType=int*/ a_floorDivide = 1 /*@target=num::~/ */ ~/ 2.0;
-var /*@topType=bool*/ a_greater = 1 /*@target=num::>*/ > 2.0;
-var /*@topType=bool*/ a_less = 1 /*@target=num::<*/ < 2.0;
-var /*@topType=bool*/ a_greaterEqual = 1 /*@target=num::>=*/ >= 2.0;
-var /*@topType=bool*/ a_lessEqual = 1 /*@target=num::<=*/ <= 2.0;
-var /*@topType=double*/ a_modulo = 1 /*@target=num::%*/ % 2.0;
+var a_equal = 1 /*@target=num::==*/ == 2.0;
+var a_notEqual = 1 /*@target=num::==*/ != 2.0;
+var a_add = 1 /*@target=num::+*/ + 2.0;
+var a_subtract = 1 /*@target=num::-*/ - 2.0;
+var a_multiply = 1 /*@target=num::**/ * 2.0;
+var a_divide = 1 /*@target=num::/ */ / 2.0;
+var a_floorDivide = 1 /*@target=num::~/ */ ~/ 2.0;
+var a_greater = 1 /*@target=num::>*/ > 2.0;
+var a_less = 1 /*@target=num::<*/ < 2.0;
+var a_greaterEqual = 1 /*@target=num::>=*/ >= 2.0;
+var a_lessEqual = 1 /*@target=num::<=*/ <= 2.0;
+var a_modulo = 1 /*@target=num::%*/ % 2.0;
 
 main() {
   a_equal;
diff --git a/pkg/front_end/testcases/inference/infer_binary_int_int.dart b/pkg/front_end/testcases/inference/infer_binary_int_int.dart
index 1f22bd7..7283155 100644
--- a/pkg/front_end/testcases/inference/infer_binary_int_int.dart
+++ b/pkg/front_end/testcases/inference/infer_binary_int_int.dart
@@ -5,23 +5,23 @@
 /*@testedFeatures=inference*/
 library test;
 
-var /*@topType=bool*/ a_equal = 1 /*@target=num::==*/ == 2;
-var /*@topType=bool*/ a_notEqual = 1 /*@target=num::==*/ != 2;
-var /*@topType=int*/ a_bitXor = 1 /*@target=int::^*/ ^ 2;
-var /*@topType=int*/ a_bitAnd = 1 /*@target=int::&*/ & 2;
-var /*@topType=int*/ a_bitOr = 1 /*@target=int::|*/ | 2;
-var /*@topType=int*/ a_bitShiftRight = 1 /*@target=int::>>*/ >> 2;
-var /*@topType=int*/ a_bitShiftLeft = 1 /*@target=int::<<*/ << 2;
-var /*@topType=int*/ a_add = 1 /*@target=num::+*/ + 2;
-var /*@topType=int*/ a_subtract = 1 /*@target=num::-*/ - 2;
-var /*@topType=int*/ a_multiply = 1 /*@target=num::**/ * 2;
-var /*@topType=double*/ a_divide = 1 /*@target=num::/ */ / 2;
-var /*@topType=int*/ a_floorDivide = 1 /*@target=num::~/ */ ~/ 2;
-var /*@topType=bool*/ a_greater = 1 /*@target=num::>*/ > 2;
-var /*@topType=bool*/ a_less = 1 /*@target=num::<*/ < 2;
-var /*@topType=bool*/ a_greaterEqual = 1 /*@target=num::>=*/ >= 2;
-var /*@topType=bool*/ a_lessEqual = 1 /*@target=num::<=*/ <= 2;
-var /*@topType=int*/ a_modulo = 1 /*@target=num::%*/ % 2;
+var a_equal = 1 /*@target=num::==*/ == 2;
+var a_notEqual = 1 /*@target=num::==*/ != 2;
+var a_bitXor = 1 /*@target=int::^*/ ^ 2;
+var a_bitAnd = 1 /*@target=int::&*/ & 2;
+var a_bitOr = 1 /*@target=int::|*/ | 2;
+var a_bitShiftRight = 1 /*@target=int::>>*/ >> 2;
+var a_bitShiftLeft = 1 /*@target=int::<<*/ << 2;
+var a_add = 1 /*@target=num::+*/ + 2;
+var a_subtract = 1 /*@target=num::-*/ - 2;
+var a_multiply = 1 /*@target=num::**/ * 2;
+var a_divide = 1 /*@target=num::/ */ / 2;
+var a_floorDivide = 1 /*@target=num::~/ */ ~/ 2;
+var a_greater = 1 /*@target=num::>*/ > 2;
+var a_less = 1 /*@target=num::<*/ < 2;
+var a_greaterEqual = 1 /*@target=num::>=*/ >= 2;
+var a_lessEqual = 1 /*@target=num::<=*/ <= 2;
+var a_modulo = 1 /*@target=num::%*/ % 2;
 
 main() {
   a_equal;
diff --git a/pkg/front_end/testcases/inference/infer_conditional.dart b/pkg/front_end/testcases/inference/infer_conditional.dart
index 042a3a1..26bc6ea 100644
--- a/pkg/front_end/testcases/inference/infer_conditional.dart
+++ b/pkg/front_end/testcases/inference/infer_conditional.dart
@@ -5,8 +5,8 @@
 /*@testedFeatures=inference*/
 library test;
 
-var /*@topType=num*/ a = 1 /*@target=num::==*/ == 2 ? 1 : 2.0;
-var /*@topType=num*/ b = 1 /*@target=num::==*/ == 2 ? 1.0 : 2;
+var a = 1 /*@target=num::==*/ == 2 ? 1 : 2.0;
+var b = 1 /*@target=num::==*/ == 2 ? 1.0 : 2;
 
 main() {
   a;
diff --git a/pkg/front_end/testcases/inference/infer_consts_transitively_2.dart b/pkg/front_end/testcases/inference/infer_consts_transitively_2.dart
index 1159b22..a86c249 100644
--- a/pkg/front_end/testcases/inference/infer_consts_transitively_2.dart
+++ b/pkg/front_end/testcases/inference/infer_consts_transitively_2.dart
@@ -7,8 +7,8 @@
 
 import 'infer_consts_transitively_2_a.dart';
 
-const /*@topType=int*/ m1 = a1;
-const /*@topType=int*/ m2 = a2;
+const m1 = a1;
+const m2 = a2;
 
 foo() {
   int i;
diff --git a/pkg/front_end/testcases/inference/infer_consts_transitively_2.dart.type_promotion.expect b/pkg/front_end/testcases/inference/infer_consts_transitively_2.dart.type_promotion.expect
index 3628855..d118f42 100644
--- a/pkg/front_end/testcases/inference/infer_consts_transitively_2.dart.type_promotion.expect
+++ b/pkg/front_end/testcases/inference/infer_consts_transitively_2.dart.type_promotion.expect
@@ -1,3 +1,3 @@
-pkg/front_end/testcases/inference/infer_consts_transitively_2.dart:15:5: Context: Write to i@387
+pkg/front_end/testcases/inference/infer_consts_transitively_2.dart:15:5: Context: Write to i@353
   i = m1;
     ^
diff --git a/pkg/front_end/testcases/inference/infer_consts_transitively_2_a.dart b/pkg/front_end/testcases/inference/infer_consts_transitively_2_a.dart
index 05643fe..25fcf76 100644
--- a/pkg/front_end/testcases/inference/infer_consts_transitively_2_a.dart
+++ b/pkg/front_end/testcases/inference/infer_consts_transitively_2_a.dart
@@ -7,7 +7,7 @@
 import 'infer_consts_transitively_2.dart';
 import 'infer_consts_transitively_2_b.dart';
 
-const /*@topType=int*/ a1 = m2;
-const /*@topType=int*/ a2 = b1;
+const a1 = m2;
+const a2 = b1;
 
 main() {}
diff --git a/pkg/front_end/testcases/inference/infer_consts_transitively_2_b.dart b/pkg/front_end/testcases/inference/infer_consts_transitively_2_b.dart
index 6210f30..99d0034 100644
--- a/pkg/front_end/testcases/inference/infer_consts_transitively_2_b.dart
+++ b/pkg/front_end/testcases/inference/infer_consts_transitively_2_b.dart
@@ -3,7 +3,7 @@
 // BSD-style license that can be found in the LICENSE file.
 
 /*@testedFeatures=inference*/
-const /*@topType=int*/ b1 = 2;
+const b1 = 2;
 
 main() {
   b1;
diff --git a/pkg/front_end/testcases/inference/infer_correctly_on_multiple_variables_declared_together.dart b/pkg/front_end/testcases/inference/infer_correctly_on_multiple_variables_declared_together.dart
index 690be00..4acae34 100644
--- a/pkg/front_end/testcases/inference/infer_correctly_on_multiple_variables_declared_together.dart
+++ b/pkg/front_end/testcases/inference/infer_correctly_on_multiple_variables_declared_together.dart
@@ -6,16 +6,11 @@
 library test;
 
 class A {
-  var /*@topType=dynamic*/ x,
-      /*@topType=int*/ y = 2,
-      /*@topType=String*/ z = "hi";
+  var x, y = 2, z = "hi";
 }
 
 class B implements A {
-  var /*@topType=dynamic*/ x = 2,
-      /*@topType=int*/ y = 3,
-      /*@topType=String*/ z,
-      /*@topType=int*/ w = 2;
+  var x = 2, y = 3, z, w = 2;
 }
 
 foo() {
diff --git a/pkg/front_end/testcases/inference/infer_correctly_on_multiple_variables_declared_together.dart.strong.expect b/pkg/front_end/testcases/inference/infer_correctly_on_multiple_variables_declared_together.dart.strong.expect
index 5c42083..06929ac 100644
--- a/pkg/front_end/testcases/inference/infer_correctly_on_multiple_variables_declared_together.dart.strong.expect
+++ b/pkg/front_end/testcases/inference/infer_correctly_on_multiple_variables_declared_together.dart.strong.expect
@@ -2,17 +2,17 @@
 //
 // Problems in library:
 //
-// pkg/front_end/testcases/inference/infer_correctly_on_multiple_variables_declared_together.dart:26:62: Error: A value of type 'int' can't be assigned to a variable of type 'String'.
+// pkg/front_end/testcases/inference/infer_correctly_on_multiple_variables_declared_together.dart:21:62: Error: A value of type 'int' can't be assigned to a variable of type 'String'.
 // Try changing the type of the left hand side, or casting the right hand side to 'String'.
 //   s = /*error:INVALID_ASSIGNMENT*/ new B(). /*@target=B::y*/ y;
 //                                                              ^
 //
-// pkg/front_end/testcases/inference/infer_correctly_on_multiple_variables_declared_together.dart:28:62: Error: A value of type 'int' can't be assigned to a variable of type 'String'.
+// pkg/front_end/testcases/inference/infer_correctly_on_multiple_variables_declared_together.dart:23:62: Error: A value of type 'int' can't be assigned to a variable of type 'String'.
 // Try changing the type of the left hand side, or casting the right hand side to 'String'.
 //   s = /*error:INVALID_ASSIGNMENT*/ new B(). /*@target=B::w*/ w;
 //                                                              ^
 //
-// pkg/front_end/testcases/inference/infer_correctly_on_multiple_variables_declared_together.dart:32:62: Error: A value of type 'String' can't be assigned to a variable of type 'int'.
+// pkg/front_end/testcases/inference/infer_correctly_on_multiple_variables_declared_together.dart:27:62: Error: A value of type 'String' can't be assigned to a variable of type 'int'.
 // Try changing the type of the left hand side, or casting the right hand side to 'int'.
 //   i = /*error:INVALID_ASSIGNMENT*/ new B(). /*@target=B::z*/ z;
 //                                                              ^
@@ -41,18 +41,18 @@
   core::String s;
   core::int i;
   s = new self::B::•().{self::B::x} as{TypeError} core::String;
-  s = let final<BottomType> #t1 = invalid-expression "pkg/front_end/testcases/inference/infer_correctly_on_multiple_variables_declared_together.dart:26:62: Error: A value of type 'int' can't be assigned to a variable of type 'String'.
+  s = let final<BottomType> #t1 = invalid-expression "pkg/front_end/testcases/inference/infer_correctly_on_multiple_variables_declared_together.dart:21:62: Error: A value of type 'int' can't be assigned to a variable of type 'String'.
 Try changing the type of the left hand side, or casting the right hand side to 'String'.
   s = /*error:INVALID_ASSIGNMENT*/ new B(). /*@target=B::y*/ y;
                                                              ^" in new self::B::•().{self::B::y} as{TypeError} core::String;
   s = new self::B::•().{self::B::z};
-  s = let final<BottomType> #t2 = invalid-expression "pkg/front_end/testcases/inference/infer_correctly_on_multiple_variables_declared_together.dart:28:62: Error: A value of type 'int' can't be assigned to a variable of type 'String'.
+  s = let final<BottomType> #t2 = invalid-expression "pkg/front_end/testcases/inference/infer_correctly_on_multiple_variables_declared_together.dart:23:62: Error: A value of type 'int' can't be assigned to a variable of type 'String'.
 Try changing the type of the left hand side, or casting the right hand side to 'String'.
   s = /*error:INVALID_ASSIGNMENT*/ new B(). /*@target=B::w*/ w;
                                                              ^" in new self::B::•().{self::B::w} as{TypeError} core::String;
   i = new self::B::•().{self::B::x} as{TypeError} core::int;
   i = new self::B::•().{self::B::y};
-  i = let final<BottomType> #t3 = invalid-expression "pkg/front_end/testcases/inference/infer_correctly_on_multiple_variables_declared_together.dart:32:62: Error: A value of type 'String' can't be assigned to a variable of type 'int'.
+  i = let final<BottomType> #t3 = invalid-expression "pkg/front_end/testcases/inference/infer_correctly_on_multiple_variables_declared_together.dart:27:62: Error: A value of type 'String' can't be assigned to a variable of type 'int'.
 Try changing the type of the left hand side, or casting the right hand side to 'int'.
   i = /*error:INVALID_ASSIGNMENT*/ new B(). /*@target=B::z*/ z;
                                                              ^" in new self::B::•().{self::B::z} as{TypeError} core::int;
diff --git a/pkg/front_end/testcases/inference/infer_correctly_on_multiple_variables_declared_together.dart.strong.transformed.expect b/pkg/front_end/testcases/inference/infer_correctly_on_multiple_variables_declared_together.dart.strong.transformed.expect
index 5c42083..06929ac 100644
--- a/pkg/front_end/testcases/inference/infer_correctly_on_multiple_variables_declared_together.dart.strong.transformed.expect
+++ b/pkg/front_end/testcases/inference/infer_correctly_on_multiple_variables_declared_together.dart.strong.transformed.expect
@@ -2,17 +2,17 @@
 //
 // Problems in library:
 //
-// pkg/front_end/testcases/inference/infer_correctly_on_multiple_variables_declared_together.dart:26:62: Error: A value of type 'int' can't be assigned to a variable of type 'String'.
+// pkg/front_end/testcases/inference/infer_correctly_on_multiple_variables_declared_together.dart:21:62: Error: A value of type 'int' can't be assigned to a variable of type 'String'.
 // Try changing the type of the left hand side, or casting the right hand side to 'String'.
 //   s = /*error:INVALID_ASSIGNMENT*/ new B(). /*@target=B::y*/ y;
 //                                                              ^
 //
-// pkg/front_end/testcases/inference/infer_correctly_on_multiple_variables_declared_together.dart:28:62: Error: A value of type 'int' can't be assigned to a variable of type 'String'.
+// pkg/front_end/testcases/inference/infer_correctly_on_multiple_variables_declared_together.dart:23:62: Error: A value of type 'int' can't be assigned to a variable of type 'String'.
 // Try changing the type of the left hand side, or casting the right hand side to 'String'.
 //   s = /*error:INVALID_ASSIGNMENT*/ new B(). /*@target=B::w*/ w;
 //                                                              ^
 //
-// pkg/front_end/testcases/inference/infer_correctly_on_multiple_variables_declared_together.dart:32:62: Error: A value of type 'String' can't be assigned to a variable of type 'int'.
+// pkg/front_end/testcases/inference/infer_correctly_on_multiple_variables_declared_together.dart:27:62: Error: A value of type 'String' can't be assigned to a variable of type 'int'.
 // Try changing the type of the left hand side, or casting the right hand side to 'int'.
 //   i = /*error:INVALID_ASSIGNMENT*/ new B(). /*@target=B::z*/ z;
 //                                                              ^
@@ -41,18 +41,18 @@
   core::String s;
   core::int i;
   s = new self::B::•().{self::B::x} as{TypeError} core::String;
-  s = let final<BottomType> #t1 = invalid-expression "pkg/front_end/testcases/inference/infer_correctly_on_multiple_variables_declared_together.dart:26:62: Error: A value of type 'int' can't be assigned to a variable of type 'String'.
+  s = let final<BottomType> #t1 = invalid-expression "pkg/front_end/testcases/inference/infer_correctly_on_multiple_variables_declared_together.dart:21:62: Error: A value of type 'int' can't be assigned to a variable of type 'String'.
 Try changing the type of the left hand side, or casting the right hand side to 'String'.
   s = /*error:INVALID_ASSIGNMENT*/ new B(). /*@target=B::y*/ y;
                                                              ^" in new self::B::•().{self::B::y} as{TypeError} core::String;
   s = new self::B::•().{self::B::z};
-  s = let final<BottomType> #t2 = invalid-expression "pkg/front_end/testcases/inference/infer_correctly_on_multiple_variables_declared_together.dart:28:62: Error: A value of type 'int' can't be assigned to a variable of type 'String'.
+  s = let final<BottomType> #t2 = invalid-expression "pkg/front_end/testcases/inference/infer_correctly_on_multiple_variables_declared_together.dart:23:62: Error: A value of type 'int' can't be assigned to a variable of type 'String'.
 Try changing the type of the left hand side, or casting the right hand side to 'String'.
   s = /*error:INVALID_ASSIGNMENT*/ new B(). /*@target=B::w*/ w;
                                                              ^" in new self::B::•().{self::B::w} as{TypeError} core::String;
   i = new self::B::•().{self::B::x} as{TypeError} core::int;
   i = new self::B::•().{self::B::y};
-  i = let final<BottomType> #t3 = invalid-expression "pkg/front_end/testcases/inference/infer_correctly_on_multiple_variables_declared_together.dart:32:62: Error: A value of type 'String' can't be assigned to a variable of type 'int'.
+  i = let final<BottomType> #t3 = invalid-expression "pkg/front_end/testcases/inference/infer_correctly_on_multiple_variables_declared_together.dart:27:62: Error: A value of type 'String' can't be assigned to a variable of type 'int'.
 Try changing the type of the left hand side, or casting the right hand side to 'int'.
   i = /*error:INVALID_ASSIGNMENT*/ new B(). /*@target=B::z*/ z;
                                                              ^" in new self::B::•().{self::B::z} as{TypeError} core::int;
diff --git a/pkg/front_end/testcases/inference/infer_correctly_on_multiple_variables_declared_together.dart.type_promotion.expect b/pkg/front_end/testcases/inference/infer_correctly_on_multiple_variables_declared_together.dart.type_promotion.expect
index 7c9fd70..eeb9f3c 100644
--- a/pkg/front_end/testcases/inference/infer_correctly_on_multiple_variables_declared_together.dart.type_promotion.expect
+++ b/pkg/front_end/testcases/inference/infer_correctly_on_multiple_variables_declared_together.dart.type_promotion.expect
@@ -1,24 +1,24 @@
-pkg/front_end/testcases/inference/infer_correctly_on_multiple_variables_declared_together.dart:25:5: Context: Write to s@537
+pkg/front_end/testcases/inference/infer_correctly_on_multiple_variables_declared_together.dart:20:5: Context: Write to s@374
   s = /*info:DYNAMIC_CAST*/ new B(). /*@target=B::x*/ x;
     ^
-pkg/front_end/testcases/inference/infer_correctly_on_multiple_variables_declared_together.dart:26:5: Context: Write to s@537
+pkg/front_end/testcases/inference/infer_correctly_on_multiple_variables_declared_together.dart:21:5: Context: Write to s@374
   s = /*error:INVALID_ASSIGNMENT*/ new B(). /*@target=B::y*/ y;
     ^
-pkg/front_end/testcases/inference/infer_correctly_on_multiple_variables_declared_together.dart:27:5: Context: Write to s@537
+pkg/front_end/testcases/inference/infer_correctly_on_multiple_variables_declared_together.dart:22:5: Context: Write to s@374
   s = new B(). /*@target=B::z*/ z;
     ^
-pkg/front_end/testcases/inference/infer_correctly_on_multiple_variables_declared_together.dart:28:5: Context: Write to s@537
+pkg/front_end/testcases/inference/infer_correctly_on_multiple_variables_declared_together.dart:23:5: Context: Write to s@374
   s = /*error:INVALID_ASSIGNMENT*/ new B(). /*@target=B::w*/ w;
     ^
-pkg/front_end/testcases/inference/infer_correctly_on_multiple_variables_declared_together.dart:30:5: Context: Write to i@546
+pkg/front_end/testcases/inference/infer_correctly_on_multiple_variables_declared_together.dart:25:5: Context: Write to i@383
   i = /*info:DYNAMIC_CAST*/ new B(). /*@target=B::x*/ x;
     ^
-pkg/front_end/testcases/inference/infer_correctly_on_multiple_variables_declared_together.dart:31:5: Context: Write to i@546
+pkg/front_end/testcases/inference/infer_correctly_on_multiple_variables_declared_together.dart:26:5: Context: Write to i@383
   i = new B(). /*@target=B::y*/ y;
     ^
-pkg/front_end/testcases/inference/infer_correctly_on_multiple_variables_declared_together.dart:32:5: Context: Write to i@546
+pkg/front_end/testcases/inference/infer_correctly_on_multiple_variables_declared_together.dart:27:5: Context: Write to i@383
   i = /*error:INVALID_ASSIGNMENT*/ new B(). /*@target=B::z*/ z;
     ^
-pkg/front_end/testcases/inference/infer_correctly_on_multiple_variables_declared_together.dart:33:5: Context: Write to i@546
+pkg/front_end/testcases/inference/infer_correctly_on_multiple_variables_declared_together.dart:28:5: Context: Write to i@383
   i = new B(). /*@target=B::w*/ w;
     ^
diff --git a/pkg/front_end/testcases/inference/infer_field_from_later_inferred_field.dart b/pkg/front_end/testcases/inference/infer_field_from_later_inferred_field.dart
index b2c29f6..ed04bda 100644
--- a/pkg/front_end/testcases/inference/infer_field_from_later_inferred_field.dart
+++ b/pkg/front_end/testcases/inference/infer_field_from_later_inferred_field.dart
@@ -6,11 +6,11 @@
 library test;
 
 class A implements B {
-  var /*@topType=int*/ x;
+  var x;
 }
 
 class B {
-  var /*@topType=int*/ x = 0;
+  var x = 0;
 }
 
 main() {}
diff --git a/pkg/front_end/testcases/inference/infer_field_from_later_inferred_getter.dart b/pkg/front_end/testcases/inference/infer_field_from_later_inferred_getter.dart
index 680a38b..bed6351 100644
--- a/pkg/front_end/testcases/inference/infer_field_from_later_inferred_getter.dart
+++ b/pkg/front_end/testcases/inference/infer_field_from_later_inferred_getter.dart
@@ -6,11 +6,11 @@
 library test;
 
 class A implements B {
-  var /*@topType=int*/ x;
+  var x;
 }
 
 abstract class B implements C {
-  get /*@topType=int*/ x;
+  get x;
 }
 
 abstract class C {
diff --git a/pkg/front_end/testcases/inference/infer_field_from_later_inferred_setter.dart b/pkg/front_end/testcases/inference/infer_field_from_later_inferred_setter.dart
index 25960b5..5d758a8 100644
--- a/pkg/front_end/testcases/inference/infer_field_from_later_inferred_setter.dart
+++ b/pkg/front_end/testcases/inference/infer_field_from_later_inferred_setter.dart
@@ -6,11 +6,11 @@
 library test;
 
 class A implements B {
-  var /*@topType=int*/ x;
+  var x;
 }
 
 abstract class B implements C {
-  void set x(/*@topType=int*/ value);
+  void set x(value);
 }
 
 abstract class C {
diff --git a/pkg/front_end/testcases/inference/infer_field_override_multiple.dart b/pkg/front_end/testcases/inference/infer_field_override_multiple.dart
index 8b6336a..7ba15bc 100644
--- a/pkg/front_end/testcases/inference/infer_field_override_multiple.dart
+++ b/pkg/front_end/testcases/inference/infer_field_override_multiple.dart
@@ -2,7 +2,7 @@
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
 
-/*@testedFeatures=inference,error*/
+/*@testedFeatures=inference*/
 library test;
 
 abstract class A {
@@ -23,21 +23,21 @@
 
 // Superclasses have a consistent type for `x` so inferrence succeeds.
 class E extends A implements B {
-  var /*@topType=int*/ x;
+  var x;
 }
 
 // Superclasses don't have a consistent type for `x` so inference fails, even if
 // the types are related.
 class F extends A implements C {
-  var /*@topType=dynamic*/ /*@error=CantInferTypeDueToInconsistentOverrides*/ /*@error=OverrideTypeMismatchReturnType*/ /*@error=OverrideTypeMismatchReturnType*/ x;
+  var x;
 }
 
 class G extends A implements D {
-  var /*@topType=dynamic*/ /*@error=CantInferTypeDueToInconsistentOverrides*/ /*@error=OverrideTypeMismatchReturnType*/ /*@error=OverrideTypeMismatchReturnType*/ x;
+  var x;
 }
 
 class H extends C implements D {
-  var /*@topType=dynamic*/ /*@error=CantInferTypeDueToInconsistentOverrides*/ /*@error=OverrideTypeMismatchReturnType*/ /*@error=OverrideTypeMismatchReturnType*/ x;
+  var x;
 }
 
 main() {}
diff --git a/pkg/front_end/testcases/inference/infer_field_override_multiple.dart.strong.expect b/pkg/front_end/testcases/inference/infer_field_override_multiple.dart.strong.expect
index 01203f7..c24c0bb 100644
--- a/pkg/front_end/testcases/inference/infer_field_override_multiple.dart.strong.expect
+++ b/pkg/front_end/testcases/inference/infer_field_override_multiple.dart.strong.expect
@@ -2,65 +2,65 @@
 //
 // Problems in library:
 //
-// pkg/front_end/testcases/inference/infer_field_override_multiple.dart:32:163: Error: Can't infer a type for 'x' as some of the inherited members have different types.
+// pkg/front_end/testcases/inference/infer_field_override_multiple.dart:32:7: Error: Can't infer a type for 'x' as some of the inherited members have different types.
 // Try adding an explicit type.
-//   var /*@topType=dynamic*/ /*@error=CantInferTypeDueToInconsistentOverrides*/ /*@error=OverrideTypeMismatchReturnType*/ /*@error=OverrideTypeMismatchReturnType*/ x;
-//                                                                                                                                                                   ^
+//   var x;
+//       ^
 //
-// pkg/front_end/testcases/inference/infer_field_override_multiple.dart:36:163: Error: Can't infer a type for 'x' as some of the inherited members have different types.
+// pkg/front_end/testcases/inference/infer_field_override_multiple.dart:36:7: Error: Can't infer a type for 'x' as some of the inherited members have different types.
 // Try adding an explicit type.
-//   var /*@topType=dynamic*/ /*@error=CantInferTypeDueToInconsistentOverrides*/ /*@error=OverrideTypeMismatchReturnType*/ /*@error=OverrideTypeMismatchReturnType*/ x;
-//                                                                                                                                                                   ^
+//   var x;
+//       ^
 //
-// pkg/front_end/testcases/inference/infer_field_override_multiple.dart:40:163: Error: Can't infer a type for 'x' as some of the inherited members have different types.
+// pkg/front_end/testcases/inference/infer_field_override_multiple.dart:40:7: Error: Can't infer a type for 'x' as some of the inherited members have different types.
 // Try adding an explicit type.
-//   var /*@topType=dynamic*/ /*@error=CantInferTypeDueToInconsistentOverrides*/ /*@error=OverrideTypeMismatchReturnType*/ /*@error=OverrideTypeMismatchReturnType*/ x;
-//                                                                                                                                                                   ^
+//   var x;
+//       ^
 //
-// pkg/front_end/testcases/inference/infer_field_override_multiple.dart:32:163: Error: The return type of the method 'F.x' is 'dynamic', which does not match the return type, 'int', of the overridden method, 'A.x'.
+// pkg/front_end/testcases/inference/infer_field_override_multiple.dart:32:7: Error: The return type of the method 'F.x' is 'dynamic', which does not match the return type, 'int', of the overridden method, 'A.x'.
 // Change to a subtype of 'int'.
-//   var /*@topType=dynamic*/ /*@error=CantInferTypeDueToInconsistentOverrides*/ /*@error=OverrideTypeMismatchReturnType*/ /*@error=OverrideTypeMismatchReturnType*/ x;
-//                                                                                                                                                                   ^
+//   var x;
+//       ^
 // pkg/front_end/testcases/inference/infer_field_override_multiple.dart:9:11: Context: This is the overridden method ('x').
 //   int get x;
 //           ^
 //
-// pkg/front_end/testcases/inference/infer_field_override_multiple.dart:32:163: Error: The return type of the method 'F.x' is 'dynamic', which does not match the return type, 'num', of the overridden method, 'C.x'.
+// pkg/front_end/testcases/inference/infer_field_override_multiple.dart:32:7: Error: The return type of the method 'F.x' is 'dynamic', which does not match the return type, 'num', of the overridden method, 'C.x'.
 // Change to a subtype of 'num'.
-//   var /*@topType=dynamic*/ /*@error=CantInferTypeDueToInconsistentOverrides*/ /*@error=OverrideTypeMismatchReturnType*/ /*@error=OverrideTypeMismatchReturnType*/ x;
-//                                                                                                                                                                   ^
+//   var x;
+//       ^
 // pkg/front_end/testcases/inference/infer_field_override_multiple.dart:17:11: Context: This is the overridden method ('x').
 //   num get x;
 //           ^
 //
-// pkg/front_end/testcases/inference/infer_field_override_multiple.dart:36:163: Error: The return type of the method 'G.x' is 'dynamic', which does not match the return type, 'int', of the overridden method, 'A.x'.
+// pkg/front_end/testcases/inference/infer_field_override_multiple.dart:36:7: Error: The return type of the method 'G.x' is 'dynamic', which does not match the return type, 'int', of the overridden method, 'A.x'.
 // Change to a subtype of 'int'.
-//   var /*@topType=dynamic*/ /*@error=CantInferTypeDueToInconsistentOverrides*/ /*@error=OverrideTypeMismatchReturnType*/ /*@error=OverrideTypeMismatchReturnType*/ x;
-//                                                                                                                                                                   ^
+//   var x;
+//       ^
 // pkg/front_end/testcases/inference/infer_field_override_multiple.dart:9:11: Context: This is the overridden method ('x').
 //   int get x;
 //           ^
 //
-// pkg/front_end/testcases/inference/infer_field_override_multiple.dart:36:163: Error: The return type of the method 'G.x' is 'dynamic', which does not match the return type, 'double', of the overridden method, 'D.x'.
+// pkg/front_end/testcases/inference/infer_field_override_multiple.dart:36:7: Error: The return type of the method 'G.x' is 'dynamic', which does not match the return type, 'double', of the overridden method, 'D.x'.
 // Change to a subtype of 'double'.
-//   var /*@topType=dynamic*/ /*@error=CantInferTypeDueToInconsistentOverrides*/ /*@error=OverrideTypeMismatchReturnType*/ /*@error=OverrideTypeMismatchReturnType*/ x;
-//                                                                                                                                                                   ^
+//   var x;
+//       ^
 // pkg/front_end/testcases/inference/infer_field_override_multiple.dart:21:14: Context: This is the overridden method ('x').
 //   double get x;
 //              ^
 //
-// pkg/front_end/testcases/inference/infer_field_override_multiple.dart:40:163: Error: The return type of the method 'H.x' is 'dynamic', which does not match the return type, 'num', of the overridden method, 'C.x'.
+// pkg/front_end/testcases/inference/infer_field_override_multiple.dart:40:7: Error: The return type of the method 'H.x' is 'dynamic', which does not match the return type, 'num', of the overridden method, 'C.x'.
 // Change to a subtype of 'num'.
-//   var /*@topType=dynamic*/ /*@error=CantInferTypeDueToInconsistentOverrides*/ /*@error=OverrideTypeMismatchReturnType*/ /*@error=OverrideTypeMismatchReturnType*/ x;
-//                                                                                                                                                                   ^
+//   var x;
+//       ^
 // pkg/front_end/testcases/inference/infer_field_override_multiple.dart:17:11: Context: This is the overridden method ('x').
 //   num get x;
 //           ^
 //
-// pkg/front_end/testcases/inference/infer_field_override_multiple.dart:40:163: Error: The return type of the method 'H.x' is 'dynamic', which does not match the return type, 'double', of the overridden method, 'D.x'.
+// pkg/front_end/testcases/inference/infer_field_override_multiple.dart:40:7: Error: The return type of the method 'H.x' is 'dynamic', which does not match the return type, 'double', of the overridden method, 'D.x'.
 // Change to a subtype of 'double'.
-//   var /*@topType=dynamic*/ /*@error=CantInferTypeDueToInconsistentOverrides*/ /*@error=OverrideTypeMismatchReturnType*/ /*@error=OverrideTypeMismatchReturnType*/ x;
-//                                                                                                                                                                   ^
+//   var x;
+//       ^
 // pkg/front_end/testcases/inference/infer_field_override_multiple.dart:21:14: Context: This is the overridden method ('x').
 //   double get x;
 //              ^
diff --git a/pkg/front_end/testcases/inference/infer_field_override_of_override.dart b/pkg/front_end/testcases/inference/infer_field_override_of_override.dart
index c1438e7..fe84499 100644
--- a/pkg/front_end/testcases/inference/infer_field_override_of_override.dart
+++ b/pkg/front_end/testcases/inference/infer_field_override_of_override.dart
@@ -14,7 +14,7 @@
 }
 
 class C extends B {
-  var /*@topType=int*/ x;
+  var x;
 }
 
 main() {}
diff --git a/pkg/front_end/testcases/inference/infer_field_override_with_substitution.dart b/pkg/front_end/testcases/inference/infer_field_override_with_substitution.dart
index 966ead8..eaa800f 100644
--- a/pkg/front_end/testcases/inference/infer_field_override_with_substitution.dart
+++ b/pkg/front_end/testcases/inference/infer_field_override_with_substitution.dart
@@ -12,9 +12,9 @@
 }
 
 class B extends A<int> {
-  var /*@topType=List<int>*/ x;
-  var /*@topType=List<int>*/ y;
-  var /*@topType=List<int>*/ z;
+  var x;
+  var y;
+  var z;
 }
 
 main() {}
diff --git a/pkg/front_end/testcases/inference/infer_field_override_with_substitution.dart.legacy.expect b/pkg/front_end/testcases/inference/infer_field_override_with_substitution.dart.legacy.expect
index 0ca493c..6e31b6d 100644
--- a/pkg/front_end/testcases/inference/infer_field_override_with_substitution.dart.legacy.expect
+++ b/pkg/front_end/testcases/inference/infer_field_override_with_substitution.dart.legacy.expect
@@ -3,12 +3,12 @@
 import "dart:core" as core;
 
 abstract class A<T extends core::Object = dynamic> extends core::Object {
-  field core::List<self::A::T> z = null;
+  generic-covariant-impl field core::List<self::A::T> z = null;
   synthetic constructor •() → self::A<self::A::T>
     : super core::Object::•()
     ;
   abstract get x() → core::List<self::A::T>;
-  abstract set y(core::List<self::A::T> value) → void;
+  abstract set y(generic-covariant-impl core::List<self::A::T> value) → void;
 }
 class B extends self::A<core::int> {
   field dynamic x = null;
diff --git a/pkg/front_end/testcases/inference/infer_field_override_with_substitution.dart.legacy.transformed.expect b/pkg/front_end/testcases/inference/infer_field_override_with_substitution.dart.legacy.transformed.expect
index 0ca493c..6e31b6d 100644
--- a/pkg/front_end/testcases/inference/infer_field_override_with_substitution.dart.legacy.transformed.expect
+++ b/pkg/front_end/testcases/inference/infer_field_override_with_substitution.dart.legacy.transformed.expect
@@ -3,12 +3,12 @@
 import "dart:core" as core;
 
 abstract class A<T extends core::Object = dynamic> extends core::Object {
-  field core::List<self::A::T> z = null;
+  generic-covariant-impl field core::List<self::A::T> z = null;
   synthetic constructor •() → self::A<self::A::T>
     : super core::Object::•()
     ;
   abstract get x() → core::List<self::A::T>;
-  abstract set y(core::List<self::A::T> value) → void;
+  abstract set y(generic-covariant-impl core::List<self::A::T> value) → void;
 }
 class B extends self::A<core::int> {
   field dynamic x = null;
diff --git a/pkg/front_end/testcases/inference/infer_field_override_with_substitution.dart.outline.expect b/pkg/front_end/testcases/inference/infer_field_override_with_substitution.dart.outline.expect
index 71b6a0a..2fc6225 100644
--- a/pkg/front_end/testcases/inference/infer_field_override_with_substitution.dart.outline.expect
+++ b/pkg/front_end/testcases/inference/infer_field_override_with_substitution.dart.outline.expect
@@ -3,11 +3,11 @@
 import "dart:core" as core;
 
 abstract class A<T extends core::Object = dynamic> extends core::Object {
-  field core::List<self::A::T> z;
+  generic-covariant-impl field core::List<self::A::T> z;
   synthetic constructor •() → self::A<self::A::T>
     ;
   abstract get x() → core::List<self::A::T>;
-  abstract set y(core::List<self::A::T> value) → void;
+  abstract set y(generic-covariant-impl core::List<self::A::T> value) → void;
 }
 class B extends self::A<core::int> {
   field dynamic x;
diff --git a/pkg/front_end/testcases/inference/infer_field_overrides_getter.dart b/pkg/front_end/testcases/inference/infer_field_overrides_getter.dart
index 753c60d..04bc378 100644
--- a/pkg/front_end/testcases/inference/infer_field_overrides_getter.dart
+++ b/pkg/front_end/testcases/inference/infer_field_overrides_getter.dart
@@ -14,23 +14,23 @@
 }
 
 class C extends A {
-  var /*@topType=int*/ x;
+  var x;
 }
 
 class D extends B {
-  var /*@topType=int*/ x;
+  var x;
 }
 
 class E implements A {
-  var /*@topType=int*/ x;
+  var x;
 }
 
 class F implements B {
-  var /*@topType=int*/ x;
+  var x;
 }
 
 class G extends Object with B {
-  var /*@topType=int*/ x;
+  var x;
 }
 
 main() {}
diff --git a/pkg/front_end/testcases/inference/infer_field_overrides_setter.dart b/pkg/front_end/testcases/inference/infer_field_overrides_setter.dart
index 6b58152..2bbf71a 100644
--- a/pkg/front_end/testcases/inference/infer_field_overrides_setter.dart
+++ b/pkg/front_end/testcases/inference/infer_field_overrides_setter.dart
@@ -14,23 +14,23 @@
 }
 
 class C extends A {
-  var /*@topType=int*/ x;
+  var x;
 }
 
 class D extends B {
-  var /*@topType=int*/ x;
+  var x;
 }
 
 class E implements A {
-  var /*@topType=int*/ x;
+  var x;
 }
 
 class F implements B {
-  var /*@topType=int*/ x;
+  var x;
 }
 
 class G extends Object with B {
-  var /*@topType=int*/ x;
+  var x;
 }
 
 main() {}
diff --git a/pkg/front_end/testcases/inference/infer_field_static.dart b/pkg/front_end/testcases/inference/infer_field_static.dart
index d5ddfbc..619762f 100644
--- a/pkg/front_end/testcases/inference/infer_field_static.dart
+++ b/pkg/front_end/testcases/inference/infer_field_static.dart
@@ -15,7 +15,7 @@
 // So B.x doesn't inherit A.x's type.
 
 class B extends A {
-  static var /*@topType=dynamic*/ x = f();
+  static var x = f();
 }
 
 // Similar with C.x.  It is not even eligible for inference since it's static
diff --git a/pkg/front_end/testcases/inference/infer_final_field_getter_and_setter.dart b/pkg/front_end/testcases/inference/infer_final_field_getter_and_setter.dart
index 185cb96..64260b8 100644
--- a/pkg/front_end/testcases/inference/infer_final_field_getter_and_setter.dart
+++ b/pkg/front_end/testcases/inference/infer_final_field_getter_and_setter.dart
@@ -11,7 +11,7 @@
 }
 
 class B extends A {
-  final /*@topType=int*/ x;
+  final x;
 
   B(this.x);
 }
diff --git a/pkg/front_end/testcases/inference/infer_final_field_getter_only.dart b/pkg/front_end/testcases/inference/infer_final_field_getter_only.dart
index fc4531b3..7f0c3b0 100644
--- a/pkg/front_end/testcases/inference/infer_final_field_getter_only.dart
+++ b/pkg/front_end/testcases/inference/infer_final_field_getter_only.dart
@@ -10,7 +10,7 @@
 }
 
 class B extends A {
-  final /*@topType=int*/ x;
+  final x;
 
   B(this.x);
 }
diff --git a/pkg/front_end/testcases/inference/infer_final_field_setter_only.dart b/pkg/front_end/testcases/inference/infer_final_field_setter_only.dart
index 39ed20b..15aaf46 100644
--- a/pkg/front_end/testcases/inference/infer_final_field_setter_only.dart
+++ b/pkg/front_end/testcases/inference/infer_final_field_setter_only.dart
@@ -10,7 +10,7 @@
 }
 
 class B extends A {
-  final /*@topType=double*/ x;
+  final x;
 
   B(this.x);
 }
diff --git a/pkg/front_end/testcases/inference/infer_from_complex_expressions_if_outer_most_value_is_precise.dart b/pkg/front_end/testcases/inference/infer_from_complex_expressions_if_outer_most_value_is_precise.dart
index 3b9b207..ec28367 100644
--- a/pkg/front_end/testcases/inference/infer_from_complex_expressions_if_outer_most_value_is_precise.dart
+++ b/pkg/front_end/testcases/inference/infer_from_complex_expressions_if_outer_most_value_is_precise.dart
@@ -7,32 +7,30 @@
 
 class A {
   int x;
-  B operator +(/*@topType=dynamic*/ other) => null;
+  B operator +(other) => null;
 }
 
 class B extends A {
   B(ignore);
 }
 
-var /*@topType=A*/ a = new A();
+var a = new A();
 // Note: it doesn't matter that some of these refer to 'x'.
-var /*@topType=B*/ b = new B(/*error:UNDEFINED_IDENTIFIER*/ x); // allocations
-var /*@topType=List<dynamic>*/ c1 = /*@typeArgs=dynamic*/ [
+var b = new B(/*error:UNDEFINED_IDENTIFIER*/ x); // allocations
+var c1 = /*@typeArgs=dynamic*/ [
   /*error:UNDEFINED_IDENTIFIER*/ x
 ]; // list literals
-var /*@topType=List<dynamic>*/ c2 = /*@typeArgs=dynamic*/ const [];
-var /*@topType=Map<dynamic, dynamic>*/ d = <dynamic, dynamic>{
-  'a': 'b'
-}; // map literals
-var /*@topType=A*/ e = new A().. /*@target=A::x*/ x = 3; // cascades
-var /*@topType=int*/ f =
+var c2 = /*@typeArgs=dynamic*/ const [];
+var d = <dynamic, dynamic>{'a': 'b'}; // map literals
+var e = new A().. /*@target=A::x*/ x = 3; // cascades
+var f =
     2 /*@target=num::+*/ + 3; // binary expressions are OK if the left operand
 // is from a library in a different strongest
 // conected component.
-var /*@topType=int*/ g = /*@target=int::unary-*/ -3;
-var /*@topType=B*/ h = new A() /*@target=A::+*/ + 3;
-var /*@topType=dynamic*/ i = /*error:UNDEFINED_OPERATOR,info:DYNAMIC_INVOKE*/ -new A();
-var /*@topType=B*/ j = /*info:UNNECESSARY_CAST*/ null as B;
+var g = /*@target=int::unary-*/ -3;
+var h = new A() /*@target=A::+*/ + 3;
+var i = /*error:UNDEFINED_OPERATOR,info:DYNAMIC_INVOKE*/ -new A();
+var j = /*info:UNNECESSARY_CAST*/ null as B;
 
 test1() {
   a = /*error:INVALID_ASSIGNMENT*/ "hi";
diff --git a/pkg/front_end/testcases/inference/infer_from_complex_expressions_if_outer_most_value_is_precise.dart.legacy.expect b/pkg/front_end/testcases/inference/infer_from_complex_expressions_if_outer_most_value_is_precise.dart.legacy.expect
index 7ccc813..7004d74 100644
--- a/pkg/front_end/testcases/inference/infer_from_complex_expressions_if_outer_most_value_is_precise.dart.legacy.expect
+++ b/pkg/front_end/testcases/inference/infer_from_complex_expressions_if_outer_most_value_is_precise.dart.legacy.expect
@@ -2,9 +2,9 @@
 //
 // Problems in library:
 //
-// pkg/front_end/testcases/inference/infer_from_complex_expressions_if_outer_most_value_is_precise.dart:19:61: Warning: Getter not found: 'x'.
-// var /*@topType=B*/ b = new B(/*error:UNDEFINED_IDENTIFIER*/ x); // allocations
-//                                                             ^
+// pkg/front_end/testcases/inference/infer_from_complex_expressions_if_outer_most_value_is_precise.dart:19:46: Warning: Getter not found: 'x'.
+// var b = new B(/*error:UNDEFINED_IDENTIFIER*/ x); // allocations
+//                                              ^
 //
 // pkg/front_end/testcases/inference/infer_from_complex_expressions_if_outer_most_value_is_precise.dart:21:34: Warning: Getter not found: 'x'.
 //   /*error:UNDEFINED_IDENTIFIER*/ x
diff --git a/pkg/front_end/testcases/inference/infer_from_complex_expressions_if_outer_most_value_is_precise.dart.legacy.transformed.expect b/pkg/front_end/testcases/inference/infer_from_complex_expressions_if_outer_most_value_is_precise.dart.legacy.transformed.expect
index 7ccc813..7004d74 100644
--- a/pkg/front_end/testcases/inference/infer_from_complex_expressions_if_outer_most_value_is_precise.dart.legacy.transformed.expect
+++ b/pkg/front_end/testcases/inference/infer_from_complex_expressions_if_outer_most_value_is_precise.dart.legacy.transformed.expect
@@ -2,9 +2,9 @@
 //
 // Problems in library:
 //
-// pkg/front_end/testcases/inference/infer_from_complex_expressions_if_outer_most_value_is_precise.dart:19:61: Warning: Getter not found: 'x'.
-// var /*@topType=B*/ b = new B(/*error:UNDEFINED_IDENTIFIER*/ x); // allocations
-//                                                             ^
+// pkg/front_end/testcases/inference/infer_from_complex_expressions_if_outer_most_value_is_precise.dart:19:46: Warning: Getter not found: 'x'.
+// var b = new B(/*error:UNDEFINED_IDENTIFIER*/ x); // allocations
+//                                              ^
 //
 // pkg/front_end/testcases/inference/infer_from_complex_expressions_if_outer_most_value_is_precise.dart:21:34: Warning: Getter not found: 'x'.
 //   /*error:UNDEFINED_IDENTIFIER*/ x
diff --git a/pkg/front_end/testcases/inference/infer_from_complex_expressions_if_outer_most_value_is_precise.dart.strong.expect b/pkg/front_end/testcases/inference/infer_from_complex_expressions_if_outer_most_value_is_precise.dart.strong.expect
index 0b2998b..4002d85 100644
--- a/pkg/front_end/testcases/inference/infer_from_complex_expressions_if_outer_most_value_is_precise.dart.strong.expect
+++ b/pkg/front_end/testcases/inference/infer_from_complex_expressions_if_outer_most_value_is_precise.dart.strong.expect
@@ -2,82 +2,82 @@
 //
 // Problems in library:
 //
-// pkg/front_end/testcases/inference/infer_from_complex_expressions_if_outer_most_value_is_precise.dart:19:61: Error: Getter not found: 'x'.
-// var /*@topType=B*/ b = new B(/*error:UNDEFINED_IDENTIFIER*/ x); // allocations
-//                                                             ^
+// pkg/front_end/testcases/inference/infer_from_complex_expressions_if_outer_most_value_is_precise.dart:19:46: Error: Getter not found: 'x'.
+// var b = new B(/*error:UNDEFINED_IDENTIFIER*/ x); // allocations
+//                                              ^
 //
 // pkg/front_end/testcases/inference/infer_from_complex_expressions_if_outer_most_value_is_precise.dart:21:34: Error: Getter not found: 'x'.
 //   /*error:UNDEFINED_IDENTIFIER*/ x
 //                                  ^
 //
-// pkg/front_end/testcases/inference/infer_from_complex_expressions_if_outer_most_value_is_precise.dart:34:79: Error: The method 'unary-' isn't defined for the class 'A'.
+// pkg/front_end/testcases/inference/infer_from_complex_expressions_if_outer_most_value_is_precise.dart:32:58: Error: The method 'unary-' isn't defined for the class 'A'.
 //  - 'A' is from 'pkg/front_end/testcases/inference/infer_from_complex_expressions_if_outer_most_value_is_precise.dart'.
 // Try correcting the name to the name of an existing method, or defining a method named 'unary-'.
-// var /*@topType=dynamic*/ i = /*error:UNDEFINED_OPERATOR,info:DYNAMIC_INVOKE*/ -new A();
-//                                                                               ^
+// var i = /*error:UNDEFINED_OPERATOR,info:DYNAMIC_INVOKE*/ -new A();
+//                                                          ^
 //
-// pkg/front_end/testcases/inference/infer_from_complex_expressions_if_outer_most_value_is_precise.dart:38:36: Error: A value of type 'String' can't be assigned to a variable of type 'A'.
+// pkg/front_end/testcases/inference/infer_from_complex_expressions_if_outer_most_value_is_precise.dart:36:36: Error: A value of type 'String' can't be assigned to a variable of type 'A'.
 //  - 'A' is from 'pkg/front_end/testcases/inference/infer_from_complex_expressions_if_outer_most_value_is_precise.dart'.
 // Try changing the type of the left hand side, or casting the right hand side to 'A'.
 //   a = /*error:INVALID_ASSIGNMENT*/ "hi";
 //                                    ^
 //
-// pkg/front_end/testcases/inference/infer_from_complex_expressions_if_outer_most_value_is_precise.dart:40:36: Error: A value of type 'String' can't be assigned to a variable of type 'B'.
+// pkg/front_end/testcases/inference/infer_from_complex_expressions_if_outer_most_value_is_precise.dart:38:36: Error: A value of type 'String' can't be assigned to a variable of type 'B'.
 //  - 'B' is from 'pkg/front_end/testcases/inference/infer_from_complex_expressions_if_outer_most_value_is_precise.dart'.
 // Try changing the type of the left hand side, or casting the right hand side to 'B'.
 //   b = /*error:INVALID_ASSIGNMENT*/ "hi";
 //                                    ^
 //
-// pkg/front_end/testcases/inference/infer_from_complex_expressions_if_outer_most_value_is_precise.dart:43:59: Error: A value of type 'Set<dynamic>' can't be assigned to a variable of type 'List<dynamic>'.
+// pkg/front_end/testcases/inference/infer_from_complex_expressions_if_outer_most_value_is_precise.dart:41:59: Error: A value of type 'Set<dynamic>' can't be assigned to a variable of type 'List<dynamic>'.
 //  - 'Set' is from 'dart:core'.
 //  - 'List' is from 'dart:core'.
 // Try changing the type of the left hand side, or casting the right hand side to 'List<dynamic>'.
 //   c1 = /*error:INVALID_ASSIGNMENT*/ /*@typeArgs=dynamic*/ {};
 //                                                           ^
 //
-// pkg/front_end/testcases/inference/infer_from_complex_expressions_if_outer_most_value_is_precise.dart:45:59: Error: A value of type 'Set<dynamic>' can't be assigned to a variable of type 'List<dynamic>'.
+// pkg/front_end/testcases/inference/infer_from_complex_expressions_if_outer_most_value_is_precise.dart:43:59: Error: A value of type 'Set<dynamic>' can't be assigned to a variable of type 'List<dynamic>'.
 //  - 'Set' is from 'dart:core'.
 //  - 'List' is from 'dart:core'.
 // Try changing the type of the left hand side, or casting the right hand side to 'List<dynamic>'.
 //   c2 = /*error:INVALID_ASSIGNMENT*/ /*@typeArgs=dynamic*/ {};
 //                                                           ^
 //
-// pkg/front_end/testcases/inference/infer_from_complex_expressions_if_outer_most_value_is_precise.dart:47:36: Error: A value of type 'int' can't be assigned to a variable of type 'Map<dynamic, dynamic>'.
+// pkg/front_end/testcases/inference/infer_from_complex_expressions_if_outer_most_value_is_precise.dart:45:36: Error: A value of type 'int' can't be assigned to a variable of type 'Map<dynamic, dynamic>'.
 //  - 'Map' is from 'dart:core'.
 // Try changing the type of the left hand side, or casting the right hand side to 'Map<dynamic, dynamic>'.
 //   d = /*error:INVALID_ASSIGNMENT*/ 3;
 //                                    ^
 //
-// pkg/front_end/testcases/inference/infer_from_complex_expressions_if_outer_most_value_is_precise.dart:49:67: Error: A value of type 'Map<dynamic, dynamic>' can't be assigned to a variable of type 'A'.
+// pkg/front_end/testcases/inference/infer_from_complex_expressions_if_outer_most_value_is_precise.dart:47:67: Error: A value of type 'Map<dynamic, dynamic>' can't be assigned to a variable of type 'A'.
 //  - 'Map' is from 'dart:core'.
 //  - 'A' is from 'pkg/front_end/testcases/inference/infer_from_complex_expressions_if_outer_most_value_is_precise.dart'.
 // Try changing the type of the left hand side, or casting the right hand side to 'A'.
 //   e = /*error:INVALID_ASSIGNMENT*/ /*@typeArgs=dynamic, dynamic*/ {};
 //                                                                   ^
 //
-// pkg/front_end/testcases/inference/infer_from_complex_expressions_if_outer_most_value_is_precise.dart:51:36: Error: A value of type 'bool' can't be assigned to a variable of type 'int'.
+// pkg/front_end/testcases/inference/infer_from_complex_expressions_if_outer_most_value_is_precise.dart:49:36: Error: A value of type 'bool' can't be assigned to a variable of type 'int'.
 // Try changing the type of the left hand side, or casting the right hand side to 'int'.
 //   f = /*error:INVALID_ASSIGNMENT*/ false;
 //                                    ^
 //
-// pkg/front_end/testcases/inference/infer_from_complex_expressions_if_outer_most_value_is_precise.dart:53:36: Error: A value of type 'bool' can't be assigned to a variable of type 'int'.
+// pkg/front_end/testcases/inference/infer_from_complex_expressions_if_outer_most_value_is_precise.dart:51:36: Error: A value of type 'bool' can't be assigned to a variable of type 'int'.
 // Try changing the type of the left hand side, or casting the right hand side to 'int'.
 //   g = /*error:INVALID_ASSIGNMENT*/ false;
 //                                    ^
 //
-// pkg/front_end/testcases/inference/infer_from_complex_expressions_if_outer_most_value_is_precise.dart:54:36: Error: A value of type 'bool' can't be assigned to a variable of type 'B'.
+// pkg/front_end/testcases/inference/infer_from_complex_expressions_if_outer_most_value_is_precise.dart:52:36: Error: A value of type 'bool' can't be assigned to a variable of type 'B'.
 //  - 'B' is from 'pkg/front_end/testcases/inference/infer_from_complex_expressions_if_outer_most_value_is_precise.dart'.
 // Try changing the type of the left hand side, or casting the right hand side to 'B'.
 //   h = /*error:INVALID_ASSIGNMENT*/ false;
 //                                    ^
 //
-// pkg/front_end/testcases/inference/infer_from_complex_expressions_if_outer_most_value_is_precise.dart:58:36: Error: A value of type 'bool' can't be assigned to a variable of type 'B'.
+// pkg/front_end/testcases/inference/infer_from_complex_expressions_if_outer_most_value_is_precise.dart:56:36: Error: A value of type 'bool' can't be assigned to a variable of type 'B'.
 //  - 'B' is from 'pkg/front_end/testcases/inference/infer_from_complex_expressions_if_outer_most_value_is_precise.dart'.
 // Try changing the type of the left hand side, or casting the right hand side to 'B'.
 //   j = /*error:INVALID_ASSIGNMENT*/ false;
 //                                    ^
 //
-// pkg/front_end/testcases/inference/infer_from_complex_expressions_if_outer_most_value_is_precise.dart:59:58: Error: A value of type 'List<dynamic>' can't be assigned to a variable of type 'B'.
+// pkg/front_end/testcases/inference/infer_from_complex_expressions_if_outer_most_value_is_precise.dart:57:58: Error: A value of type 'List<dynamic>' can't be assigned to a variable of type 'B'.
 //  - 'List' is from 'dart:core'.
 //  - 'B' is from 'pkg/front_end/testcases/inference/infer_from_complex_expressions_if_outer_most_value_is_precise.dart'.
 // Try changing the type of the left hand side, or casting the right hand side to 'B'.
@@ -102,9 +102,9 @@
     ;
 }
 static field self::A a = new self::A::•();
-static field self::B b = new self::B::•(invalid-expression "pkg/front_end/testcases/inference/infer_from_complex_expressions_if_outer_most_value_is_precise.dart:19:61: Error: Getter not found: 'x'.
-var /*@topType=B*/ b = new B(/*error:UNDEFINED_IDENTIFIER*/ x); // allocations
-                                                            ^");
+static field self::B b = new self::B::•(invalid-expression "pkg/front_end/testcases/inference/infer_from_complex_expressions_if_outer_most_value_is_precise.dart:19:46: Error: Getter not found: 'x'.
+var b = new B(/*error:UNDEFINED_IDENTIFIER*/ x); // allocations
+                                             ^");
 static field core::List<dynamic> c1 = <dynamic>[invalid-expression "pkg/front_end/testcases/inference/infer_from_complex_expressions_if_outer_most_value_is_precise.dart:21:34: Error: Getter not found: 'x'.
   /*error:UNDEFINED_IDENTIFIER*/ x
                                  ^"];
@@ -114,20 +114,20 @@
 static field core::int f = 2.{core::num::+}(3);
 static field core::int g = 3.{core::int::unary-}();
 static field self::B h = new self::A::•().{self::A::+}(3);
-static field dynamic i = invalid-expression "pkg/front_end/testcases/inference/infer_from_complex_expressions_if_outer_most_value_is_precise.dart:34:79: Error: The method 'unary-' isn't defined for the class 'A'.
+static field dynamic i = invalid-expression "pkg/front_end/testcases/inference/infer_from_complex_expressions_if_outer_most_value_is_precise.dart:32:58: Error: The method 'unary-' isn't defined for the class 'A'.
  - 'A' is from 'pkg/front_end/testcases/inference/infer_from_complex_expressions_if_outer_most_value_is_precise.dart'.
 Try correcting the name to the name of an existing method, or defining a method named 'unary-'.
-var /*@topType=dynamic*/ i = /*error:UNDEFINED_OPERATOR,info:DYNAMIC_INVOKE*/ -new A();
-                                                                              ^";
+var i = /*error:UNDEFINED_OPERATOR,info:DYNAMIC_INVOKE*/ -new A();
+                                                         ^";
 static field self::B j = null as self::B;
 static method test1() → dynamic {
-  self::a = let final<BottomType> #t3 = invalid-expression "pkg/front_end/testcases/inference/infer_from_complex_expressions_if_outer_most_value_is_precise.dart:38:36: Error: A value of type 'String' can't be assigned to a variable of type 'A'.
+  self::a = let final<BottomType> #t3 = invalid-expression "pkg/front_end/testcases/inference/infer_from_complex_expressions_if_outer_most_value_is_precise.dart:36:36: Error: A value of type 'String' can't be assigned to a variable of type 'A'.
  - 'A' is from 'pkg/front_end/testcases/inference/infer_from_complex_expressions_if_outer_most_value_is_precise.dart'.
 Try changing the type of the left hand side, or casting the right hand side to 'A'.
   a = /*error:INVALID_ASSIGNMENT*/ \"hi\";
                                    ^" in "hi" as{TypeError} self::A;
   self::a = new self::B::•(3);
-  self::b = let final<BottomType> #t4 = invalid-expression "pkg/front_end/testcases/inference/infer_from_complex_expressions_if_outer_most_value_is_precise.dart:40:36: Error: A value of type 'String' can't be assigned to a variable of type 'B'.
+  self::b = let final<BottomType> #t4 = invalid-expression "pkg/front_end/testcases/inference/infer_from_complex_expressions_if_outer_most_value_is_precise.dart:38:36: Error: A value of type 'String' can't be assigned to a variable of type 'B'.
  - 'B' is from 'pkg/front_end/testcases/inference/infer_from_complex_expressions_if_outer_most_value_is_precise.dart'.
 Try changing the type of the left hand side, or casting the right hand side to 'B'.
   b = /*error:INVALID_ASSIGNMENT*/ \"hi\";
@@ -138,29 +138,29 @@
   self::c2 = <dynamic>[];
   self::c2 = let final core::Set<dynamic> #t6 = col::LinkedHashSet::•<dynamic>() in #t6;
   self::d = <dynamic, dynamic>{};
-  self::d = let final<BottomType> #t7 = invalid-expression "pkg/front_end/testcases/inference/infer_from_complex_expressions_if_outer_most_value_is_precise.dart:47:36: Error: A value of type 'int' can't be assigned to a variable of type 'Map<dynamic, dynamic>'.
+  self::d = let final<BottomType> #t7 = invalid-expression "pkg/front_end/testcases/inference/infer_from_complex_expressions_if_outer_most_value_is_precise.dart:45:36: Error: A value of type 'int' can't be assigned to a variable of type 'Map<dynamic, dynamic>'.
  - 'Map' is from 'dart:core'.
 Try changing the type of the left hand side, or casting the right hand side to 'Map<dynamic, dynamic>'.
   d = /*error:INVALID_ASSIGNMENT*/ 3;
                                    ^" in 3 as{TypeError} core::Map<dynamic, dynamic>;
   self::e = new self::A::•();
-  self::e = let final<BottomType> #t8 = invalid-expression "pkg/front_end/testcases/inference/infer_from_complex_expressions_if_outer_most_value_is_precise.dart:49:67: Error: A value of type 'Map<dynamic, dynamic>' can't be assigned to a variable of type 'A'.
+  self::e = let final<BottomType> #t8 = invalid-expression "pkg/front_end/testcases/inference/infer_from_complex_expressions_if_outer_most_value_is_precise.dart:47:67: Error: A value of type 'Map<dynamic, dynamic>' can't be assigned to a variable of type 'A'.
  - 'Map' is from 'dart:core'.
  - 'A' is from 'pkg/front_end/testcases/inference/infer_from_complex_expressions_if_outer_most_value_is_precise.dart'.
 Try changing the type of the left hand side, or casting the right hand side to 'A'.
   e = /*error:INVALID_ASSIGNMENT*/ /*@typeArgs=dynamic, dynamic*/ {};
                                                                   ^" in <dynamic, dynamic>{} as{TypeError} self::A;
   self::f = 3;
-  self::f = let final<BottomType> #t9 = invalid-expression "pkg/front_end/testcases/inference/infer_from_complex_expressions_if_outer_most_value_is_precise.dart:51:36: Error: A value of type 'bool' can't be assigned to a variable of type 'int'.
+  self::f = let final<BottomType> #t9 = invalid-expression "pkg/front_end/testcases/inference/infer_from_complex_expressions_if_outer_most_value_is_precise.dart:49:36: Error: A value of type 'bool' can't be assigned to a variable of type 'int'.
 Try changing the type of the left hand side, or casting the right hand side to 'int'.
   f = /*error:INVALID_ASSIGNMENT*/ false;
                                    ^" in false as{TypeError} core::int;
   self::g = 1;
-  self::g = let final<BottomType> #t10 = invalid-expression "pkg/front_end/testcases/inference/infer_from_complex_expressions_if_outer_most_value_is_precise.dart:53:36: Error: A value of type 'bool' can't be assigned to a variable of type 'int'.
+  self::g = let final<BottomType> #t10 = invalid-expression "pkg/front_end/testcases/inference/infer_from_complex_expressions_if_outer_most_value_is_precise.dart:51:36: Error: A value of type 'bool' can't be assigned to a variable of type 'int'.
 Try changing the type of the left hand side, or casting the right hand side to 'int'.
   g = /*error:INVALID_ASSIGNMENT*/ false;
                                    ^" in false as{TypeError} core::int;
-  self::h = let final<BottomType> #t11 = invalid-expression "pkg/front_end/testcases/inference/infer_from_complex_expressions_if_outer_most_value_is_precise.dart:54:36: Error: A value of type 'bool' can't be assigned to a variable of type 'B'.
+  self::h = let final<BottomType> #t11 = invalid-expression "pkg/front_end/testcases/inference/infer_from_complex_expressions_if_outer_most_value_is_precise.dart:52:36: Error: A value of type 'bool' can't be assigned to a variable of type 'B'.
  - 'B' is from 'pkg/front_end/testcases/inference/infer_from_complex_expressions_if_outer_most_value_is_precise.dart'.
 Try changing the type of the left hand side, or casting the right hand side to 'B'.
   h = /*error:INVALID_ASSIGNMENT*/ false;
@@ -168,12 +168,12 @@
   self::h = new self::B::•("b");
   self::i = false;
   self::j = new self::B::•("b");
-  self::j = let final<BottomType> #t12 = invalid-expression "pkg/front_end/testcases/inference/infer_from_complex_expressions_if_outer_most_value_is_precise.dart:58:36: Error: A value of type 'bool' can't be assigned to a variable of type 'B'.
+  self::j = let final<BottomType> #t12 = invalid-expression "pkg/front_end/testcases/inference/infer_from_complex_expressions_if_outer_most_value_is_precise.dart:56:36: Error: A value of type 'bool' can't be assigned to a variable of type 'B'.
  - 'B' is from 'pkg/front_end/testcases/inference/infer_from_complex_expressions_if_outer_most_value_is_precise.dart'.
 Try changing the type of the left hand side, or casting the right hand side to 'B'.
   j = /*error:INVALID_ASSIGNMENT*/ false;
                                    ^" in false as{TypeError} self::B;
-  self::j = let final<BottomType> #t13 = invalid-expression "pkg/front_end/testcases/inference/infer_from_complex_expressions_if_outer_most_value_is_precise.dart:59:58: Error: A value of type 'List<dynamic>' can't be assigned to a variable of type 'B'.
+  self::j = let final<BottomType> #t13 = invalid-expression "pkg/front_end/testcases/inference/infer_from_complex_expressions_if_outer_most_value_is_precise.dart:57:58: Error: A value of type 'List<dynamic>' can't be assigned to a variable of type 'B'.
  - 'List' is from 'dart:core'.
  - 'B' is from 'pkg/front_end/testcases/inference/infer_from_complex_expressions_if_outer_most_value_is_precise.dart'.
 Try changing the type of the left hand side, or casting the right hand side to 'B'.
diff --git a/pkg/front_end/testcases/inference/infer_from_complex_expressions_if_outer_most_value_is_precise.dart.strong.transformed.expect b/pkg/front_end/testcases/inference/infer_from_complex_expressions_if_outer_most_value_is_precise.dart.strong.transformed.expect
index f0a746a..93049fd1 100644
--- a/pkg/front_end/testcases/inference/infer_from_complex_expressions_if_outer_most_value_is_precise.dart.strong.transformed.expect
+++ b/pkg/front_end/testcases/inference/infer_from_complex_expressions_if_outer_most_value_is_precise.dart.strong.transformed.expect
@@ -17,7 +17,7 @@
 }
 static field self::A a = new self::A::•();
 static field self::B b = new self::B::•(invalid-expression "pkg/front_end/testcases/inference/infer_from_complex_expressions_if_outer_most_value_is_precise.dart:19:61: Error: Getter not found: 'x'.
-var /*@topType=B*/ b = new B(/*error:UNDEFINED_IDENTIFIER*/ x); // allocations
+var  b = new B(/*error:UNDEFINED_IDENTIFIER*/ x); // allocations
                                                             ^");
 static field core::List<dynamic> c1 = <dynamic>[invalid-expression "pkg/front_end/testcases/inference/infer_from_complex_expressions_if_outer_most_value_is_precise.dart:21:34: Error: Getter not found: 'x'.
   /*error:UNDEFINED_IDENTIFIER*/ x
@@ -31,7 +31,7 @@
 static field dynamic i = let final self::A #t3 = new self::A::•() in invalid-expression "pkg/front_end/testcases/inference/infer_from_complex_expressions_if_outer_most_value_is_precise.dart:34:79: Error: The method 'unary-' isn't defined for the class 'A'.
  - 'A' is from 'pkg/front_end/testcases/inference/infer_from_complex_expressions_if_outer_most_value_is_precise.dart'.
 Try correcting the name to the name of an existing method, or defining a method named 'unary-'.
-var /*@topType=dynamic*/ i = /*error:UNDEFINED_OPERATOR,info:DYNAMIC_INVOKE*/ -new A();
+var  i = /*error:UNDEFINED_OPERATOR,info:DYNAMIC_INVOKE*/ -new A();
                                                                               ^";
 static field self::B j = null as self::B;
 static method test1() → dynamic {
diff --git a/pkg/front_end/testcases/inference/infer_from_rhs_only_if_it_wont_conflict_with_overridden_fields.dart b/pkg/front_end/testcases/inference/infer_from_rhs_only_if_it_wont_conflict_with_overridden_fields.dart
index 3c9c3ef..6226e35 100644
--- a/pkg/front_end/testcases/inference/infer_from_rhs_only_if_it_wont_conflict_with_overridden_fields.dart
+++ b/pkg/front_end/testcases/inference/infer_from_rhs_only_if_it_wont_conflict_with_overridden_fields.dart
@@ -6,11 +6,11 @@
 library test;
 
 class A {
-  var /*@topType=dynamic*/ x;
+  var x;
 }
 
 class B implements A {
-  var /*@topType=dynamic*/ x = 2;
+  var x = 2;
 }
 
 foo() {
diff --git a/pkg/front_end/testcases/inference/infer_from_rhs_only_if_it_wont_conflict_with_overridden_fields2.dart b/pkg/front_end/testcases/inference/infer_from_rhs_only_if_it_wont_conflict_with_overridden_fields2.dart
index fd0a94b..178c14a 100644
--- a/pkg/front_end/testcases/inference/infer_from_rhs_only_if_it_wont_conflict_with_overridden_fields2.dart
+++ b/pkg/front_end/testcases/inference/infer_from_rhs_only_if_it_wont_conflict_with_overridden_fields2.dart
@@ -6,11 +6,11 @@
 library test;
 
 class A {
-  final /*@topType=dynamic*/ x = null;
+  final x = null;
 }
 
 class B implements A {
-  final /*@topType=dynamic*/ x = 2;
+  final x = 2;
 }
 
 foo() {
diff --git a/pkg/front_end/testcases/inference/infer_from_variables_in_cycle_libs_when_flag_is_on.dart b/pkg/front_end/testcases/inference/infer_from_variables_in_cycle_libs_when_flag_is_on.dart
index f2357b3..9943823 100644
--- a/pkg/front_end/testcases/inference/infer_from_variables_in_cycle_libs_when_flag_is_on.dart
+++ b/pkg/front_end/testcases/inference/infer_from_variables_in_cycle_libs_when_flag_is_on.dart
@@ -7,7 +7,7 @@
 
 import 'infer_from_variables_in_cycle_libs_when_flag_is_on_a.dart';
 
-var /*@topType=int*/ y = x; // now ok :)
+var y = x; // now ok :)
 
 test1() {
   int t = 3;
diff --git a/pkg/front_end/testcases/inference/infer_from_variables_in_cycle_libs_when_flag_is_on.dart.type_promotion.expect b/pkg/front_end/testcases/inference/infer_from_variables_in_cycle_libs_when_flag_is_on.dart.type_promotion.expect
index f71d77a..ca48ff3 100644
--- a/pkg/front_end/testcases/inference/infer_from_variables_in_cycle_libs_when_flag_is_on.dart.type_promotion.expect
+++ b/pkg/front_end/testcases/inference/infer_from_variables_in_cycle_libs_when_flag_is_on.dart.type_promotion.expect
@@ -1,6 +1,6 @@
-pkg/front_end/testcases/inference/infer_from_variables_in_cycle_libs_when_flag_is_on.dart:14:5: Context: Write to t@389
+pkg/front_end/testcases/inference/infer_from_variables_in_cycle_libs_when_flag_is_on.dart:14:5: Context: Write to t@372
   t = x;
     ^
-pkg/front_end/testcases/inference/infer_from_variables_in_cycle_libs_when_flag_is_on.dart:15:5: Context: Write to t@389
+pkg/front_end/testcases/inference/infer_from_variables_in_cycle_libs_when_flag_is_on.dart:15:5: Context: Write to t@372
   t = y;
     ^
diff --git a/pkg/front_end/testcases/inference/infer_from_variables_in_cycle_libs_when_flag_is_on2.dart b/pkg/front_end/testcases/inference/infer_from_variables_in_cycle_libs_when_flag_is_on2.dart
index 6b746f5..59b8aa8 100644
--- a/pkg/front_end/testcases/inference/infer_from_variables_in_cycle_libs_when_flag_is_on2.dart
+++ b/pkg/front_end/testcases/inference/infer_from_variables_in_cycle_libs_when_flag_is_on2.dart
@@ -8,7 +8,7 @@
 import 'infer_from_variables_in_cycle_libs_when_flag_is_on2_a.dart';
 
 class B {
-  static var /*@topType=int*/ y = A.x;
+  static var y = A.x;
 }
 
 test1() {
diff --git a/pkg/front_end/testcases/inference/infer_from_variables_in_cycle_libs_when_flag_is_on2.dart.type_promotion.expect b/pkg/front_end/testcases/inference/infer_from_variables_in_cycle_libs_when_flag_is_on2.dart.type_promotion.expect
index 5b8cb3d..298131f 100644
--- a/pkg/front_end/testcases/inference/infer_from_variables_in_cycle_libs_when_flag_is_on2.dart.type_promotion.expect
+++ b/pkg/front_end/testcases/inference/infer_from_variables_in_cycle_libs_when_flag_is_on2.dart.type_promotion.expect
@@ -1,6 +1,6 @@
-pkg/front_end/testcases/inference/infer_from_variables_in_cycle_libs_when_flag_is_on2.dart:16:5: Context: Write to t@400
+pkg/front_end/testcases/inference/infer_from_variables_in_cycle_libs_when_flag_is_on2.dart:16:5: Context: Write to t@383
   t = A.x;
     ^
-pkg/front_end/testcases/inference/infer_from_variables_in_cycle_libs_when_flag_is_on2.dart:17:5: Context: Write to t@400
+pkg/front_end/testcases/inference/infer_from_variables_in_cycle_libs_when_flag_is_on2.dart:17:5: Context: Write to t@383
   t = B.y;
     ^
diff --git a/pkg/front_end/testcases/inference/infer_from_variables_in_cycle_libs_when_flag_is_on2_a.dart b/pkg/front_end/testcases/inference/infer_from_variables_in_cycle_libs_when_flag_is_on2_a.dart
index dd2ad8c..cc5d086 100644
--- a/pkg/front_end/testcases/inference/infer_from_variables_in_cycle_libs_when_flag_is_on2_a.dart
+++ b/pkg/front_end/testcases/inference/infer_from_variables_in_cycle_libs_when_flag_is_on2_a.dart
@@ -6,7 +6,7 @@
 import 'infer_from_variables_in_cycle_libs_when_flag_is_on2.dart';
 
 class A {
-  static var /*@topType=int*/ x = 2;
+  static var x = 2;
 }
 
 main() {}
diff --git a/pkg/front_end/testcases/inference/infer_from_variables_in_cycle_libs_when_flag_is_on_a.dart b/pkg/front_end/testcases/inference/infer_from_variables_in_cycle_libs_when_flag_is_on_a.dart
index ccc5157..e0f359b 100644
--- a/pkg/front_end/testcases/inference/infer_from_variables_in_cycle_libs_when_flag_is_on_a.dart
+++ b/pkg/front_end/testcases/inference/infer_from_variables_in_cycle_libs_when_flag_is_on_a.dart
@@ -5,6 +5,6 @@
 /*@testedFeatures=inference*/
 import 'infer_from_variables_in_cycle_libs_when_flag_is_on2.dart';
 
-var /*@topType=int*/ x = 2; // ok to infer
+var x = 2; // ok to infer
 
 main() {}
diff --git a/pkg/front_end/testcases/inference/infer_from_variables_in_non_cycle_imports_with_flag.dart b/pkg/front_end/testcases/inference/infer_from_variables_in_non_cycle_imports_with_flag.dart
index a270099..4b54811 100644
--- a/pkg/front_end/testcases/inference/infer_from_variables_in_non_cycle_imports_with_flag.dart
+++ b/pkg/front_end/testcases/inference/infer_from_variables_in_non_cycle_imports_with_flag.dart
@@ -7,7 +7,7 @@
 
 import 'infer_from_variables_in_non_cycle_imports_with_flag_a.dart';
 
-var /*@topType=int*/ y = x;
+var y = x;
 
 test1() {
   x = /*error:INVALID_ASSIGNMENT*/ "hi";
diff --git a/pkg/front_end/testcases/inference/infer_from_variables_in_non_cycle_imports_with_flag2.dart b/pkg/front_end/testcases/inference/infer_from_variables_in_non_cycle_imports_with_flag2.dart
index bdf047f..f7bb1b1 100644
--- a/pkg/front_end/testcases/inference/infer_from_variables_in_non_cycle_imports_with_flag2.dart
+++ b/pkg/front_end/testcases/inference/infer_from_variables_in_non_cycle_imports_with_flag2.dart
@@ -8,7 +8,7 @@
 import 'infer_from_variables_in_non_cycle_imports_with_flag2_a.dart';
 
 class B {
-  static var /*@topType=int*/ y = A.x;
+  static var y = A.x;
 }
 
 test1() {
diff --git a/pkg/front_end/testcases/inference/infer_from_variables_in_non_cycle_imports_with_flag2_a.dart b/pkg/front_end/testcases/inference/infer_from_variables_in_non_cycle_imports_with_flag2_a.dart
index 7ab5fda..906f8d8 100644
--- a/pkg/front_end/testcases/inference/infer_from_variables_in_non_cycle_imports_with_flag2_a.dart
+++ b/pkg/front_end/testcases/inference/infer_from_variables_in_non_cycle_imports_with_flag2_a.dart
@@ -4,7 +4,7 @@
 
 /*@testedFeatures=inference*/
 class A {
-  static var /*@topType=int*/ x = 2;
+  static var x = 2;
 }
 
 main() {}
diff --git a/pkg/front_end/testcases/inference/infer_from_variables_in_non_cycle_imports_with_flag_a.dart b/pkg/front_end/testcases/inference/infer_from_variables_in_non_cycle_imports_with_flag_a.dart
index 3195c4c..1aa8c0a 100644
--- a/pkg/front_end/testcases/inference/infer_from_variables_in_non_cycle_imports_with_flag_a.dart
+++ b/pkg/front_end/testcases/inference/infer_from_variables_in_non_cycle_imports_with_flag_a.dart
@@ -3,7 +3,7 @@
 // BSD-style license that can be found in the LICENSE file.
 
 /*@testedFeatures=inference*/
-var /*@topType=int*/ x = 2;
+var x = 2;
 
 main() {
   x;
diff --git a/pkg/front_end/testcases/inference/infer_getter_cross_to_setter.dart b/pkg/front_end/testcases/inference/infer_getter_cross_to_setter.dart
index 91cd19f..203adfa 100644
--- a/pkg/front_end/testcases/inference/infer_getter_cross_to_setter.dart
+++ b/pkg/front_end/testcases/inference/infer_getter_cross_to_setter.dart
@@ -10,7 +10,7 @@
 }
 
 abstract class B extends A {
-  get /*@topType=double*/ x;
+  get x;
 }
 
 main() {}
diff --git a/pkg/front_end/testcases/inference/infer_getter_from_later_inferred_getter.dart b/pkg/front_end/testcases/inference/infer_getter_from_later_inferred_getter.dart
index ff91432..7469d08 100644
--- a/pkg/front_end/testcases/inference/infer_getter_from_later_inferred_getter.dart
+++ b/pkg/front_end/testcases/inference/infer_getter_from_later_inferred_getter.dart
@@ -6,11 +6,11 @@
 library test;
 
 class A implements B {
-  get /*@topType=int*/ x => f();
+  get x => f();
 }
 
 abstract class B implements C {
-  get /*@topType=int*/ x;
+  get x;
 }
 
 abstract class C {
diff --git a/pkg/front_end/testcases/inference/infer_method_missing_params.dart b/pkg/front_end/testcases/inference/infer_method_missing_params.dart
index 18bc5e3..a9f6d88 100644
--- a/pkg/front_end/testcases/inference/infer_method_missing_params.dart
+++ b/pkg/front_end/testcases/inference/infer_method_missing_params.dart
@@ -2,7 +2,7 @@
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
 
-/*@testedFeatures=inference,error*/
+/*@testedFeatures=inference*/
 library test;
 
 // All of these cases are error conditions; this test checks how we recover.
@@ -20,13 +20,9 @@
 }
 
 abstract class C implements A, B {
-  /*@topType=int*/ /*@error=OverrideMoreRequiredArguments*/ f(
-      /*@topType=int*/ x,
-      /*@topType=dynamic*/ /*@error=CantInferTypeDueToInconsistentOverrides*/ y);
-  /*@topType=int*/ g(/*@topType=int*/ x,
-      [/*@topType=dynamic*/ /*@error=CantInferTypeDueToInconsistentOverrides*/ y]);
-  /*@topType=int*/ h(/*@topType=int*/ x,
-      {/*@topType=dynamic*/ /*@error=CantInferTypeDueToInconsistentOverrides*/ y});
+  f(x, y);
+  g(x, [y]);
+  h(x, {y});
 }
 
 main() {}
diff --git a/pkg/front_end/testcases/inference/infer_method_missing_params.dart.legacy.expect b/pkg/front_end/testcases/inference/infer_method_missing_params.dart.legacy.expect
index 1738d37..5337a40 100644
--- a/pkg/front_end/testcases/inference/infer_method_missing_params.dart.legacy.expect
+++ b/pkg/front_end/testcases/inference/infer_method_missing_params.dart.legacy.expect
@@ -2,9 +2,9 @@
 //
 // Problems in library:
 //
-// pkg/front_end/testcases/inference/infer_method_missing_params.dart:23:61: Warning: The method 'C.f' has more required arguments than those of overridden method 'B.f'.
-//   /*@topType=int*/ /*@error=OverrideMoreRequiredArguments*/ f(
-//                                                             ^
+// pkg/front_end/testcases/inference/infer_method_missing_params.dart:23:3: Warning: The method 'C.f' has more required arguments than those of overridden method 'B.f'.
+//   f(x, y);
+//   ^
 // pkg/front_end/testcases/inference/infer_method_missing_params.dart:17:7: Context: This is the overridden method ('f').
 //   int f(int x);
 //       ^
diff --git a/pkg/front_end/testcases/inference/infer_method_missing_params.dart.legacy.transformed.expect b/pkg/front_end/testcases/inference/infer_method_missing_params.dart.legacy.transformed.expect
index 1738d37..5337a40 100644
--- a/pkg/front_end/testcases/inference/infer_method_missing_params.dart.legacy.transformed.expect
+++ b/pkg/front_end/testcases/inference/infer_method_missing_params.dart.legacy.transformed.expect
@@ -2,9 +2,9 @@
 //
 // Problems in library:
 //
-// pkg/front_end/testcases/inference/infer_method_missing_params.dart:23:61: Warning: The method 'C.f' has more required arguments than those of overridden method 'B.f'.
-//   /*@topType=int*/ /*@error=OverrideMoreRequiredArguments*/ f(
-//                                                             ^
+// pkg/front_end/testcases/inference/infer_method_missing_params.dart:23:3: Warning: The method 'C.f' has more required arguments than those of overridden method 'B.f'.
+//   f(x, y);
+//   ^
 // pkg/front_end/testcases/inference/infer_method_missing_params.dart:17:7: Context: This is the overridden method ('f').
 //   int f(int x);
 //       ^
diff --git a/pkg/front_end/testcases/inference/infer_method_missing_params.dart.outline.expect b/pkg/front_end/testcases/inference/infer_method_missing_params.dart.outline.expect
index 5e0625d..0ae3513 100644
--- a/pkg/front_end/testcases/inference/infer_method_missing_params.dart.outline.expect
+++ b/pkg/front_end/testcases/inference/infer_method_missing_params.dart.outline.expect
@@ -2,9 +2,9 @@
 //
 // Problems in library:
 //
-// pkg/front_end/testcases/inference/infer_method_missing_params.dart:23:61: Warning: The method 'C.f' has more required arguments than those of overridden method 'B.f'.
-//   /*@topType=int*/ /*@error=OverrideMoreRequiredArguments*/ f(
-//                                                             ^
+// pkg/front_end/testcases/inference/infer_method_missing_params.dart:23:3: Warning: The method 'C.f' has more required arguments than those of overridden method 'B.f'.
+//   f(x, y);
+//   ^
 // pkg/front_end/testcases/inference/infer_method_missing_params.dart:17:7: Context: This is the overridden method ('f').
 //   int f(int x);
 //       ^
diff --git a/pkg/front_end/testcases/inference/infer_method_missing_params.dart.strong.expect b/pkg/front_end/testcases/inference/infer_method_missing_params.dart.strong.expect
index e47b23c..f4717a8 100644
--- a/pkg/front_end/testcases/inference/infer_method_missing_params.dart.strong.expect
+++ b/pkg/front_end/testcases/inference/infer_method_missing_params.dart.strong.expect
@@ -2,24 +2,24 @@
 //
 // Problems in library:
 //
-// pkg/front_end/testcases/inference/infer_method_missing_params.dart:25:79: Error: Can't infer a type for 'y' as some of the inherited members have different types.
+// pkg/front_end/testcases/inference/infer_method_missing_params.dart:23:8: Error: Can't infer a type for 'y' as some of the inherited members have different types.
 // Try adding an explicit type.
-//       /*@topType=dynamic*/ /*@error=CantInferTypeDueToInconsistentOverrides*/ y);
-//                                                                               ^
+//   f(x, y);
+//        ^
 //
-// pkg/front_end/testcases/inference/infer_method_missing_params.dart:29:80: Error: Can't infer a type for 'y' as some of the inherited members have different types.
+// pkg/front_end/testcases/inference/infer_method_missing_params.dart:25:9: Error: Can't infer a type for 'y' as some of the inherited members have different types.
 // Try adding an explicit type.
-//       {/*@topType=dynamic*/ /*@error=CantInferTypeDueToInconsistentOverrides*/ y});
-//                                                                                ^
+//   h(x, {y});
+//         ^
 //
-// pkg/front_end/testcases/inference/infer_method_missing_params.dart:27:80: Error: Can't infer a type for 'y' as some of the inherited members have different types.
+// pkg/front_end/testcases/inference/infer_method_missing_params.dart:24:9: Error: Can't infer a type for 'y' as some of the inherited members have different types.
 // Try adding an explicit type.
-//       [/*@topType=dynamic*/ /*@error=CantInferTypeDueToInconsistentOverrides*/ y]);
-//                                                                                ^
+//   g(x, [y]);
+//         ^
 //
-// pkg/front_end/testcases/inference/infer_method_missing_params.dart:23:61: Error: The method 'C.f' has more required arguments than those of overridden method 'B.f'.
-//   /*@topType=int*/ /*@error=OverrideMoreRequiredArguments*/ f(
-//                                                             ^
+// pkg/front_end/testcases/inference/infer_method_missing_params.dart:23:3: Error: The method 'C.f' has more required arguments than those of overridden method 'B.f'.
+//   f(x, y);
+//   ^
 // pkg/front_end/testcases/inference/infer_method_missing_params.dart:17:7: Context: This is the overridden method ('f').
 //   int f(int x);
 //       ^
diff --git a/pkg/front_end/testcases/inference/infer_parameter_type_setter_from_field.dart b/pkg/front_end/testcases/inference/infer_parameter_type_setter_from_field.dart
index d7e8119..2374e76 100644
--- a/pkg/front_end/testcases/inference/infer_parameter_type_setter_from_field.dart
+++ b/pkg/front_end/testcases/inference/infer_parameter_type_setter_from_field.dart
@@ -6,7 +6,7 @@
 library test;
 
 class C extends D {
-  set /*@topType=void*/ foo(/*@topType=int*/ x) {}
+  set foo(x) {}
 }
 
 class D {
diff --git a/pkg/front_end/testcases/inference/infer_parameter_type_setter_from_setter.dart b/pkg/front_end/testcases/inference/infer_parameter_type_setter_from_setter.dart
index 9e5cad7..bee5d20 100644
--- a/pkg/front_end/testcases/inference/infer_parameter_type_setter_from_setter.dart
+++ b/pkg/front_end/testcases/inference/infer_parameter_type_setter_from_setter.dart
@@ -6,11 +6,11 @@
 library test;
 
 class C extends D {
-  set /*@topType=void*/ foo(/*@topType=int*/ x) {}
+  set foo(x) {}
 }
 
 class D {
-  set /*@topType=void*/ foo(int x) {}
+  set foo(int x) {}
 }
 
 main() {}
diff --git a/pkg/front_end/testcases/inference/infer_prefix_expression.dart b/pkg/front_end/testcases/inference/infer_prefix_expression.dart
index ea88fe0..0561e23 100644
--- a/pkg/front_end/testcases/inference/infer_prefix_expression.dart
+++ b/pkg/front_end/testcases/inference/infer_prefix_expression.dart
@@ -5,9 +5,9 @@
 /*@testedFeatures=inference*/
 library test;
 
-var /*@topType=bool*/ a_not = !true;
-var /*@topType=int*/ a_complement = /*@target=int::~*/ ~1;
-var /*@topType=int*/ a_negate = /*@target=int::unary-*/ -1;
+var a_not = !true;
+var a_complement = /*@target=int::~*/ ~1;
+var a_negate = /*@target=int::unary-*/ -1;
 
 main() {
   a_not;
diff --git a/pkg/front_end/testcases/inference/infer_prefix_expression_custom.dart b/pkg/front_end/testcases/inference/infer_prefix_expression_custom.dart
index 46cfedc..fe447a9 100644
--- a/pkg/front_end/testcases/inference/infer_prefix_expression_custom.dart
+++ b/pkg/front_end/testcases/inference/infer_prefix_expression_custom.dart
@@ -11,9 +11,9 @@
   double operator -() => 2.0;
 }
 
-var /*@topType=A*/ a = new A();
-var /*@topType=int*/ v_complement = /*@target=A::~*/ ~a;
-var /*@topType=double*/ v_negate = /*@target=A::unary-*/ -a;
+var a = new A();
+var v_complement = /*@target=A::~*/ ~a;
+var v_negate = /*@target=A::unary-*/ -a;
 
 main() {
   a;
diff --git a/pkg/front_end/testcases/inference/infer_return_type_for_static_setter.dart b/pkg/front_end/testcases/inference/infer_return_type_for_static_setter.dart
index e3bf142..972b299 100644
--- a/pkg/front_end/testcases/inference/infer_return_type_for_static_setter.dart
+++ b/pkg/front_end/testcases/inference/infer_return_type_for_static_setter.dart
@@ -6,9 +6,9 @@
 library test;
 
 class C {
-  static set /*@topType=void*/ foo(int x) {}
+  static set foo(int x) {}
 }
 
-set /*@topType=void*/ bar(int x) {}
+set bar(int x) {}
 
 main() {}
diff --git a/pkg/front_end/testcases/inference/infer_setter_cross_to_getter.dart b/pkg/front_end/testcases/inference/infer_setter_cross_to_getter.dart
index 47f35d5..219dca0 100644
--- a/pkg/front_end/testcases/inference/infer_setter_cross_to_getter.dart
+++ b/pkg/front_end/testcases/inference/infer_setter_cross_to_getter.dart
@@ -10,7 +10,7 @@
 }
 
 abstract class B extends A {
-  void set x(/*@topType=double*/ value);
+  void set x(value);
 }
 
 main() {}
diff --git a/pkg/front_end/testcases/inference/infer_setter_from_later_inferred_setter.dart b/pkg/front_end/testcases/inference/infer_setter_from_later_inferred_setter.dart
index 2a4141b..c0ae645 100644
--- a/pkg/front_end/testcases/inference/infer_setter_from_later_inferred_setter.dart
+++ b/pkg/front_end/testcases/inference/infer_setter_from_later_inferred_setter.dart
@@ -6,11 +6,11 @@
 library test;
 
 class A implements B {
-  void set x(/*@topType=int*/ value) {}
+  void set x(value) {}
 }
 
 abstract class B implements C {
-  void set x(/*@topType=int*/ value);
+  void set x(value);
 }
 
 abstract class C {
diff --git a/pkg/front_end/testcases/inference/infer_setter_return_type_only.dart b/pkg/front_end/testcases/inference/infer_setter_return_type_only.dart
index 57583aa..8e536dc 100644
--- a/pkg/front_end/testcases/inference/infer_setter_return_type_only.dart
+++ b/pkg/front_end/testcases/inference/infer_setter_return_type_only.dart
@@ -12,7 +12,7 @@
 class B extends A {
   // The setter return type should be inferred, but the setter parameter type
   // should not.
-  set /*@topType=void*/ x(Object o) {}
+  set x(Object o) {}
 }
 
 main() {
diff --git a/pkg/front_end/testcases/inference/infer_statics_transitively.dart b/pkg/front_end/testcases/inference/infer_statics_transitively.dart
index aa06cbb..8c3c5d0 100644
--- a/pkg/front_end/testcases/inference/infer_statics_transitively.dart
+++ b/pkg/front_end/testcases/inference/infer_statics_transitively.dart
@@ -7,8 +7,8 @@
 
 import 'infer_statics_transitively_a.dart';
 
-final /*@topType=int*/ m1 = a1;
-final /*@topType=int*/ m2 = A.a2;
+final m1 = a1;
+final m2 = A.a2;
 
 foo() {
   int i;
diff --git a/pkg/front_end/testcases/inference/infer_statics_transitively.dart.type_promotion.expect b/pkg/front_end/testcases/inference/infer_statics_transitively.dart.type_promotion.expect
index 2bf9cee..f5e0605 100644
--- a/pkg/front_end/testcases/inference/infer_statics_transitively.dart.type_promotion.expect
+++ b/pkg/front_end/testcases/inference/infer_statics_transitively.dart.type_promotion.expect
@@ -1,3 +1,3 @@
-pkg/front_end/testcases/inference/infer_statics_transitively.dart:15:5: Context: Write to i@388
+pkg/front_end/testcases/inference/infer_statics_transitively.dart:15:5: Context: Write to i@354
   i = m1;
     ^
diff --git a/pkg/front_end/testcases/inference/infer_statics_transitively2.dart b/pkg/front_end/testcases/inference/infer_statics_transitively2.dart
index 148c6f1..40dbc28 100644
--- a/pkg/front_end/testcases/inference/infer_statics_transitively2.dart
+++ b/pkg/front_end/testcases/inference/infer_statics_transitively2.dart
@@ -5,10 +5,10 @@
 /*@testedFeatures=inference*/
 library test;
 
-const /*@topType=int*/ x1 = 1;
-final /*@topType=int*/ x2 = 1;
-final /*@topType=int*/ y1 = x1;
-final /*@topType=int*/ y2 = x2;
+const x1 = 1;
+final x2 = 1;
+final y1 = x1;
+final y2 = x2;
 
 foo() {
   int i;
diff --git a/pkg/front_end/testcases/inference/infer_statics_transitively2.dart.type_promotion.expect b/pkg/front_end/testcases/inference/infer_statics_transitively2.dart.type_promotion.expect
index bd3b23fe..bd4a813 100644
--- a/pkg/front_end/testcases/inference/infer_statics_transitively2.dart.type_promotion.expect
+++ b/pkg/front_end/testcases/inference/infer_statics_transitively2.dart.type_promotion.expect
@@ -1,6 +1,6 @@
-pkg/front_end/testcases/inference/infer_statics_transitively2.dart:15:5: Context: Write to i@403
+pkg/front_end/testcases/inference/infer_statics_transitively2.dart:15:5: Context: Write to i@335
   i = y1;
     ^
-pkg/front_end/testcases/inference/infer_statics_transitively2.dart:16:5: Context: Write to i@403
+pkg/front_end/testcases/inference/infer_statics_transitively2.dart:16:5: Context: Write to i@335
   i = y2;
     ^
diff --git a/pkg/front_end/testcases/inference/infer_statics_transitively3.dart b/pkg/front_end/testcases/inference/infer_statics_transitively3.dart
index 6bd303b..16e92d1 100644
--- a/pkg/front_end/testcases/inference/infer_statics_transitively3.dart
+++ b/pkg/front_end/testcases/inference/infer_statics_transitively3.dart
@@ -8,12 +8,12 @@
 import 'infer_statics_transitively3_a.dart' show a1, A;
 import 'infer_statics_transitively3_a.dart' as p show a2, A;
 
-const /*@topType=int*/ t1 = 1;
-const /*@topType=int*/ t2 = t1;
-const /*@topType=int*/ t3 = a1;
-const /*@topType=int*/ t4 = p.a2;
-const /*@topType=dynamic*/ t5 = A.a3;
-const /*@topType=dynamic*/ t6 = p.A.a3;
+const t1 = 1;
+const t2 = t1;
+const t3 = a1;
+const t4 = p.a2;
+const t5 = A.a3;
+const t6 = p.A.a3;
 
 foo() {
   int i;
diff --git a/pkg/front_end/testcases/inference/infer_statics_transitively3.dart.type_promotion.expect b/pkg/front_end/testcases/inference/infer_statics_transitively3.dart.type_promotion.expect
index 2d28253..3a64db3 100644
--- a/pkg/front_end/testcases/inference/infer_statics_transitively3.dart.type_promotion.expect
+++ b/pkg/front_end/testcases/inference/infer_statics_transitively3.dart.type_promotion.expect
@@ -1,12 +1,12 @@
-pkg/front_end/testcases/inference/infer_statics_transitively3.dart:20:5: Context: Write to i@602
+pkg/front_end/testcases/inference/infer_statics_transitively3.dart:20:5: Context: Write to i@492
   i = t1;
     ^
-pkg/front_end/testcases/inference/infer_statics_transitively3.dart:21:5: Context: Write to i@602
+pkg/front_end/testcases/inference/infer_statics_transitively3.dart:21:5: Context: Write to i@492
   i = t2;
     ^
-pkg/front_end/testcases/inference/infer_statics_transitively3.dart:22:5: Context: Write to i@602
+pkg/front_end/testcases/inference/infer_statics_transitively3.dart:22:5: Context: Write to i@492
   i = t3;
     ^
-pkg/front_end/testcases/inference/infer_statics_transitively3.dart:23:5: Context: Write to i@602
+pkg/front_end/testcases/inference/infer_statics_transitively3.dart:23:5: Context: Write to i@492
   i = t4;
     ^
diff --git a/pkg/front_end/testcases/inference/infer_statics_transitively_a.dart b/pkg/front_end/testcases/inference/infer_statics_transitively_a.dart
index 3d09a81..a7b6d9e 100644
--- a/pkg/front_end/testcases/inference/infer_statics_transitively_a.dart
+++ b/pkg/front_end/testcases/inference/infer_statics_transitively_a.dart
@@ -7,10 +7,10 @@
 import 'infer_statics_transitively.dart';
 import 'infer_statics_transitively_b.dart';
 
-final /*@topType=int*/ a1 = m2;
+final a1 = m2;
 
 class A {
-  static final /*@topType=int*/ a2 = b1;
+  static final a2 = b1;
 }
 
 main() {}
diff --git a/pkg/front_end/testcases/inference/infer_throw.dart b/pkg/front_end/testcases/inference/infer_throw.dart
index 0bd74f4..53940dc 100644
--- a/pkg/front_end/testcases/inference/infer_throw.dart
+++ b/pkg/front_end/testcases/inference/infer_throw.dart
@@ -5,10 +5,10 @@
 /*@testedFeatures=inference*/
 library test;
 
-var /*@topType=bool*/ t = true;
-var /*@topType=dynamic*/ a = (throw 0);
-var /*@topType=int*/ b = (throw 0) ? 1 : 2;
-var /*@topType=int*/ c = t ? (throw 1) : 2;
-var /*@topType=int*/ d = t ? 1 : (throw 2);
+var t = true;
+var a = (throw 0);
+var b = (throw 0) ? 1 : 2;
+var c = t ? (throw 1) : 2;
+var d = t ? 1 : (throw 2);
 
 main() {}
diff --git a/pkg/front_end/testcases/inference/infer_throw_downwards.dart b/pkg/front_end/testcases/inference/infer_throw_downwards.dart
index c733531..d542a11 100644
--- a/pkg/front_end/testcases/inference/infer_throw_downwards.dart
+++ b/pkg/front_end/testcases/inference/infer_throw_downwards.dart
@@ -7,7 +7,7 @@
 
 T f<T>() => null;
 
-var /*@topType=dynamic*/ x = throw /*@typeArgs=dynamic*/ f();
+var x = throw /*@typeArgs=dynamic*/ f();
 
 void g() {
   var /*@type=dynamic*/ x = throw /*@typeArgs=dynamic*/ f();
diff --git a/pkg/front_end/testcases/inference/infer_type_on_overridden_fields2.dart b/pkg/front_end/testcases/inference/infer_type_on_overridden_fields2.dart
index 356477b..e203004 100644
--- a/pkg/front_end/testcases/inference/infer_type_on_overridden_fields2.dart
+++ b/pkg/front_end/testcases/inference/infer_type_on_overridden_fields2.dart
@@ -10,7 +10,7 @@
 }
 
 class B extends A {
-  get /*@topType=int*/ x => 3;
+  get x => 3;
 }
 
 foo() {
diff --git a/pkg/front_end/testcases/inference/infer_type_on_overridden_fields4.dart b/pkg/front_end/testcases/inference/infer_type_on_overridden_fields4.dart
index 130f045..5dd2297 100644
--- a/pkg/front_end/testcases/inference/infer_type_on_overridden_fields4.dart
+++ b/pkg/front_end/testcases/inference/infer_type_on_overridden_fields4.dart
@@ -10,7 +10,7 @@
 }
 
 class B implements A {
-  get /*@topType=int*/ x => 3;
+  get x => 3;
 }
 
 foo() {
diff --git a/pkg/front_end/testcases/inference/infer_type_on_var_from_field.dart b/pkg/front_end/testcases/inference/infer_type_on_var_from_field.dart
index 8c53b40..8301e0d 100644
--- a/pkg/front_end/testcases/inference/infer_type_on_var_from_field.dart
+++ b/pkg/front_end/testcases/inference/infer_type_on_var_from_field.dart
@@ -8,7 +8,7 @@
 class A {
   int x = 0;
 
-  /*@topType=dynamic*/ test1() {
+  test1() {
     var /*@type=int*/ a = /*@target=A::x*/ x;
     a = /*error:INVALID_ASSIGNMENT*/ "hi";
     a = 3;
@@ -21,7 +21,7 @@
   }
 
   int y; // field def after use
-  final /*@topType=int*/ z = 42; // should infer `int`
+  final z = 42; // should infer `int`
 }
 
 main() {}
diff --git a/pkg/front_end/testcases/inference/infer_type_on_var_from_field.dart.type_promotion.expect b/pkg/front_end/testcases/inference/infer_type_on_var_from_field.dart.type_promotion.expect
index e745ffe..426e83a 100644
--- a/pkg/front_end/testcases/inference/infer_type_on_var_from_field.dart.type_promotion.expect
+++ b/pkg/front_end/testcases/inference/infer_type_on_var_from_field.dart.type_promotion.expect
@@ -1,18 +1,18 @@
-pkg/front_end/testcases/inference/infer_type_on_var_from_field.dart:13:7: Context: Write to a@341
+pkg/front_end/testcases/inference/infer_type_on_var_from_field.dart:13:7: Context: Write to a@320
     a = /*error:INVALID_ASSIGNMENT*/ "hi";
       ^
-pkg/front_end/testcases/inference/infer_type_on_var_from_field.dart:14:7: Context: Write to a@341
+pkg/front_end/testcases/inference/infer_type_on_var_from_field.dart:14:7: Context: Write to a@320
     a = 3;
       ^
-pkg/front_end/testcases/inference/infer_type_on_var_from_field.dart:16:7: Context: Write to b@441
+pkg/front_end/testcases/inference/infer_type_on_var_from_field.dart:16:7: Context: Write to b@420
     b = /*error:INVALID_ASSIGNMENT*/ "hi";
       ^
-pkg/front_end/testcases/inference/infer_type_on_var_from_field.dart:17:7: Context: Write to b@441
+pkg/front_end/testcases/inference/infer_type_on_var_from_field.dart:17:7: Context: Write to b@420
     b = 4;
       ^
-pkg/front_end/testcases/inference/infer_type_on_var_from_field.dart:19:7: Context: Write to c@541
+pkg/front_end/testcases/inference/infer_type_on_var_from_field.dart:19:7: Context: Write to c@520
     c = /*error:INVALID_ASSIGNMENT*/ "hi";
       ^
-pkg/front_end/testcases/inference/infer_type_on_var_from_field.dart:20:7: Context: Write to c@541
+pkg/front_end/testcases/inference/infer_type_on_var_from_field.dart:20:7: Context: Write to c@520
     c = 4;
       ^
diff --git a/pkg/front_end/testcases/inference/infer_type_on_var_from_top_level.dart b/pkg/front_end/testcases/inference/infer_type_on_var_from_top_level.dart
index 402a884..6b971b5 100644
--- a/pkg/front_end/testcases/inference/infer_type_on_var_from_top_level.dart
+++ b/pkg/front_end/testcases/inference/infer_type_on_var_from_top_level.dart
@@ -20,6 +20,6 @@
 }
 
 int y = 0; // field def after use
-final /*@topType=int*/ z = 42; // should infer `int`
+final z = 42; // should infer `int`
 
 main() {}
diff --git a/pkg/front_end/testcases/inference/infer_type_regardless_of_declaration_order_or_cycles.dart b/pkg/front_end/testcases/inference/infer_type_regardless_of_declaration_order_or_cycles.dart
index 8f61c86..6a235ad 100644
--- a/pkg/front_end/testcases/inference/infer_type_regardless_of_declaration_order_or_cycles.dart
+++ b/pkg/front_end/testcases/inference/infer_type_regardless_of_declaration_order_or_cycles.dart
@@ -8,7 +8,7 @@
 import 'infer_type_regardless_of_declaration_order_or_cycles_b.dart';
 
 class C extends B {
-  get /*@topType=int*/ x => null;
+  get x => null;
 }
 
 class A {
diff --git a/pkg/front_end/testcases/inference/infer_typed_map_literal.dart b/pkg/front_end/testcases/inference/infer_typed_map_literal.dart
index 0b78431..03bad8b 100644
--- a/pkg/front_end/testcases/inference/infer_typed_map_literal.dart
+++ b/pkg/front_end/testcases/inference/infer_typed_map_literal.dart
@@ -5,13 +5,12 @@
 /*@testedFeatures=inference*/
 library test;
 
-var /*@topType=Map<int, String>*/ a = <int, String>{0: 'aaa', 1: 'bbb'};
-var /*@topType=Map<double, int>*/ b = <double, int>{1.1: 1, 2.2: 2};
-var /*@topType=Map<List<int>, Map<String, double>>*/ c =
-    <List<int>, Map<String, double>>{};
-var /*@topType=Map<int, dynamic>*/ d = <int, dynamic>{};
-var /*@topType=Map<dynamic, int>*/ e = <dynamic, int>{};
-var /*@topType=Map<dynamic, dynamic>*/ f = <dynamic, dynamic>{};
+var a = <int, String>{0: 'aaa', 1: 'bbb'};
+var b = <double, int>{1.1: 1, 2.2: 2};
+var c = <List<int>, Map<String, double>>{};
+var d = <int, dynamic>{};
+var e = <dynamic, int>{};
+var f = <dynamic, dynamic>{};
 
 main() {
   a;
diff --git a/pkg/front_end/testcases/inference/infer_types_on_generic_instantiations_3.dart b/pkg/front_end/testcases/inference/infer_types_on_generic_instantiations_3.dart
index b86463c..c1be80c 100644
--- a/pkg/front_end/testcases/inference/infer_types_on_generic_instantiations_3.dart
+++ b/pkg/front_end/testcases/inference/infer_types_on_generic_instantiations_3.dart
@@ -11,8 +11,8 @@
 }
 
 class B implements A<int> {
-  get /*@topType=int*/ x => 3;
-  get /*@topType=int*/ w => /*error:RETURN_OF_INVALID_TYPE*/ "hello";
+  get x => 3;
+  get w => /*error:RETURN_OF_INVALID_TYPE*/ "hello";
 }
 
 foo() {
diff --git a/pkg/front_end/testcases/inference/infer_types_on_generic_instantiations_3.dart.strong.expect b/pkg/front_end/testcases/inference/infer_types_on_generic_instantiations_3.dart.strong.expect
index 2ac925a..e8cded4 100644
--- a/pkg/front_end/testcases/inference/infer_types_on_generic_instantiations_3.dart.strong.expect
+++ b/pkg/front_end/testcases/inference/infer_types_on_generic_instantiations_3.dart.strong.expect
@@ -2,10 +2,10 @@
 //
 // Problems in library:
 //
-// pkg/front_end/testcases/inference/infer_types_on_generic_instantiations_3.dart:15:62: Error: A value of type 'String' can't be assigned to a variable of type 'int'.
+// pkg/front_end/testcases/inference/infer_types_on_generic_instantiations_3.dart:15:45: Error: A value of type 'String' can't be assigned to a variable of type 'int'.
 // Try changing the type of the left hand side, or casting the right hand side to 'int'.
-//   get /*@topType=int*/ w => /*error:RETURN_OF_INVALID_TYPE*/ "hello";
-//                                                              ^
+//   get w => /*error:RETURN_OF_INVALID_TYPE*/ "hello";
+//                                             ^
 //
 // pkg/front_end/testcases/inference/infer_types_on_generic_instantiations_3.dart:19:69: Error: A value of type 'int' can't be assigned to a variable of type 'String'.
 // Try changing the type of the left hand side, or casting the right hand side to 'String'.
@@ -29,10 +29,10 @@
   get x() → core::int
     return 3;
   get w() → core::int
-    return let final<BottomType> #t1 = invalid-expression "pkg/front_end/testcases/inference/infer_types_on_generic_instantiations_3.dart:15:62: Error: A value of type 'String' can't be assigned to a variable of type 'int'.
+    return let final<BottomType> #t1 = invalid-expression "pkg/front_end/testcases/inference/infer_types_on_generic_instantiations_3.dart:15:45: Error: A value of type 'String' can't be assigned to a variable of type 'int'.
 Try changing the type of the left hand side, or casting the right hand side to 'int'.
-  get /*@topType=int*/ w => /*error:RETURN_OF_INVALID_TYPE*/ \"hello\";
-                                                             ^" in "hello" as{TypeError} core::int;
+  get w => /*error:RETURN_OF_INVALID_TYPE*/ \"hello\";
+                                            ^" in "hello" as{TypeError} core::int;
 }
 static method foo() → dynamic {
   core::String y = let final<BottomType> #t2 = invalid-expression "pkg/front_end/testcases/inference/infer_types_on_generic_instantiations_3.dart:19:69: Error: A value of type 'int' can't be assigned to a variable of type 'String'.
diff --git a/pkg/front_end/testcases/inference/infer_types_on_generic_instantiations_3.dart.strong.transformed.expect b/pkg/front_end/testcases/inference/infer_types_on_generic_instantiations_3.dart.strong.transformed.expect
index 2ac925a..e8cded4 100644
--- a/pkg/front_end/testcases/inference/infer_types_on_generic_instantiations_3.dart.strong.transformed.expect
+++ b/pkg/front_end/testcases/inference/infer_types_on_generic_instantiations_3.dart.strong.transformed.expect
@@ -2,10 +2,10 @@
 //
 // Problems in library:
 //
-// pkg/front_end/testcases/inference/infer_types_on_generic_instantiations_3.dart:15:62: Error: A value of type 'String' can't be assigned to a variable of type 'int'.
+// pkg/front_end/testcases/inference/infer_types_on_generic_instantiations_3.dart:15:45: Error: A value of type 'String' can't be assigned to a variable of type 'int'.
 // Try changing the type of the left hand side, or casting the right hand side to 'int'.
-//   get /*@topType=int*/ w => /*error:RETURN_OF_INVALID_TYPE*/ "hello";
-//                                                              ^
+//   get w => /*error:RETURN_OF_INVALID_TYPE*/ "hello";
+//                                             ^
 //
 // pkg/front_end/testcases/inference/infer_types_on_generic_instantiations_3.dart:19:69: Error: A value of type 'int' can't be assigned to a variable of type 'String'.
 // Try changing the type of the left hand side, or casting the right hand side to 'String'.
@@ -29,10 +29,10 @@
   get x() → core::int
     return 3;
   get w() → core::int
-    return let final<BottomType> #t1 = invalid-expression "pkg/front_end/testcases/inference/infer_types_on_generic_instantiations_3.dart:15:62: Error: A value of type 'String' can't be assigned to a variable of type 'int'.
+    return let final<BottomType> #t1 = invalid-expression "pkg/front_end/testcases/inference/infer_types_on_generic_instantiations_3.dart:15:45: Error: A value of type 'String' can't be assigned to a variable of type 'int'.
 Try changing the type of the left hand side, or casting the right hand side to 'int'.
-  get /*@topType=int*/ w => /*error:RETURN_OF_INVALID_TYPE*/ \"hello\";
-                                                             ^" in "hello" as{TypeError} core::int;
+  get w => /*error:RETURN_OF_INVALID_TYPE*/ \"hello\";
+                                            ^" in "hello" as{TypeError} core::int;
 }
 static method foo() → dynamic {
   core::String y = let final<BottomType> #t2 = invalid-expression "pkg/front_end/testcases/inference/infer_types_on_generic_instantiations_3.dart:19:69: Error: A value of type 'int' can't be assigned to a variable of type 'String'.
diff --git a/pkg/front_end/testcases/inference/infer_types_on_generic_instantiations_4.dart b/pkg/front_end/testcases/inference/infer_types_on_generic_instantiations_4.dart
index d3bf9ef..957177a 100644
--- a/pkg/front_end/testcases/inference/infer_types_on_generic_instantiations_4.dart
+++ b/pkg/front_end/testcases/inference/infer_types_on_generic_instantiations_4.dart
@@ -11,7 +11,7 @@
 
 class B<E> extends A<E> {
   E y;
-  get /*@topType=B::E*/ x => /*@target=B::y*/ y;
+  get x => /*@target=B::y*/ y;
 }
 
 foo() {
diff --git a/pkg/front_end/testcases/inference/infer_types_on_generic_instantiations_4.dart.legacy.expect b/pkg/front_end/testcases/inference/infer_types_on_generic_instantiations_4.dart.legacy.expect
index ef150d9..3c624e6 100644
--- a/pkg/front_end/testcases/inference/infer_types_on_generic_instantiations_4.dart.legacy.expect
+++ b/pkg/front_end/testcases/inference/infer_types_on_generic_instantiations_4.dart.legacy.expect
@@ -3,13 +3,13 @@
 import "dart:core" as core;
 
 class A<T extends core::Object = dynamic> extends core::Object {
-  field self::A::T x = null;
+  generic-covariant-impl field self::A::T x = null;
   synthetic constructor •() → self::A<self::A::T>
     : super core::Object::•()
     ;
 }
 class B<E extends core::Object = dynamic> extends self::A<self::B::E> {
-  field self::B::E y = null;
+  generic-covariant-impl field self::B::E y = null;
   synthetic constructor •() → self::B<self::B::E>
     : super self::A::•()
     ;
diff --git a/pkg/front_end/testcases/inference/infer_types_on_generic_instantiations_4.dart.legacy.transformed.expect b/pkg/front_end/testcases/inference/infer_types_on_generic_instantiations_4.dart.legacy.transformed.expect
index ef150d9..3c624e6 100644
--- a/pkg/front_end/testcases/inference/infer_types_on_generic_instantiations_4.dart.legacy.transformed.expect
+++ b/pkg/front_end/testcases/inference/infer_types_on_generic_instantiations_4.dart.legacy.transformed.expect
@@ -3,13 +3,13 @@
 import "dart:core" as core;
 
 class A<T extends core::Object = dynamic> extends core::Object {
-  field self::A::T x = null;
+  generic-covariant-impl field self::A::T x = null;
   synthetic constructor •() → self::A<self::A::T>
     : super core::Object::•()
     ;
 }
 class B<E extends core::Object = dynamic> extends self::A<self::B::E> {
-  field self::B::E y = null;
+  generic-covariant-impl field self::B::E y = null;
   synthetic constructor •() → self::B<self::B::E>
     : super self::A::•()
     ;
diff --git a/pkg/front_end/testcases/inference/infer_types_on_generic_instantiations_5.dart b/pkg/front_end/testcases/inference/infer_types_on_generic_instantiations_5.dart
index 473e129..5025679 100644
--- a/pkg/front_end/testcases/inference/infer_types_on_generic_instantiations_5.dart
+++ b/pkg/front_end/testcases/inference/infer_types_on_generic_instantiations_5.dart
@@ -6,12 +6,12 @@
 library test;
 
 abstract class I<E> {
-  String m(/*@topType=dynamic*/ a, String f(v, E e));
+  String m(a, String f(v, E e));
 }
 
 abstract class A<E> implements I<E> {
   const A();
-  String m(/*@topType=dynamic*/ a, String f(v, E e));
+  String m(a, String f(v, E e));
 }
 
 abstract class M {
@@ -22,7 +22,7 @@
   const B();
   int get y => 0;
 
-  /*@topType=String*/ m(/*@topType=dynamic*/ a, f(v, E e)) {}
+  m(a, f(v, E e)) {}
 }
 
 foo() {
diff --git a/pkg/front_end/testcases/inference/infer_types_on_generic_instantiations_in_library_cycle.dart b/pkg/front_end/testcases/inference/infer_types_on_generic_instantiations_in_library_cycle.dart
index c3b7d7d..49235aa 100644
--- a/pkg/front_end/testcases/inference/infer_types_on_generic_instantiations_in_library_cycle.dart
+++ b/pkg/front_end/testcases/inference/infer_types_on_generic_instantiations_in_library_cycle.dart
@@ -21,7 +21,7 @@
   const B();
   int get y => 0;
 
-  /*@topType=A<B::E>*/ m(/*@topType=dynamic*/ a, f(v, int e)) {}
+  m(a, f(v, int e)) {}
 }
 
 foo() {
diff --git a/pkg/front_end/testcases/inference/infer_types_on_generic_instantiations_in_library_cycle_a.dart b/pkg/front_end/testcases/inference/infer_types_on_generic_instantiations_in_library_cycle_a.dart
index aac0b74..0d4db22 100644
--- a/pkg/front_end/testcases/inference/infer_types_on_generic_instantiations_in_library_cycle_a.dart
+++ b/pkg/front_end/testcases/inference/infer_types_on_generic_instantiations_in_library_cycle_a.dart
@@ -6,7 +6,7 @@
 import 'infer_types_on_generic_instantiations_in_library_cycle.dart';
 
 abstract class I<E> {
-  A<E> m(/*@topType=dynamic*/ a, String f(v, int e));
+  A<E> m(a, String f(v, int e));
 }
 
 main() {}
diff --git a/pkg/front_end/testcases/inference/infer_types_on_loop_indices_for_each_loop.dart.legacy.expect b/pkg/front_end/testcases/inference/infer_types_on_loop_indices_for_each_loop.dart.legacy.expect
index 4cb8f64..5afe30e 100644
--- a/pkg/front_end/testcases/inference/infer_types_on_loop_indices_for_each_loop.dart.legacy.expect
+++ b/pkg/front_end/testcases/inference/infer_types_on_loop_indices_for_each_loop.dart.legacy.expect
@@ -12,7 +12,7 @@
   synthetic constructor •() → self::Bar<self::Bar::T>
     : super core::Object::•()
     ;
-  method foo(self::Bar::T t) → void {
+  method foo(generic-covariant-impl self::Bar::T t) → void {
     for (dynamic i in t) {
       core::int x = i;
     }
@@ -22,7 +22,7 @@
   synthetic constructor •() → self::Baz<self::Baz::T, self::Baz::E, self::Baz::S>
     : super core::Object::•()
     ;
-  method foo(self::Baz::S t) → void {
+  method foo(generic-covariant-impl self::Baz::S t) → void {
     for (dynamic i in t) {
       core::int x = i;
       self::Baz::T y = i;
diff --git a/pkg/front_end/testcases/inference/infer_types_on_loop_indices_for_each_loop.dart.legacy.transformed.expect b/pkg/front_end/testcases/inference/infer_types_on_loop_indices_for_each_loop.dart.legacy.transformed.expect
index 4cb8f64..5afe30e 100644
--- a/pkg/front_end/testcases/inference/infer_types_on_loop_indices_for_each_loop.dart.legacy.transformed.expect
+++ b/pkg/front_end/testcases/inference/infer_types_on_loop_indices_for_each_loop.dart.legacy.transformed.expect
@@ -12,7 +12,7 @@
   synthetic constructor •() → self::Bar<self::Bar::T>
     : super core::Object::•()
     ;
-  method foo(self::Bar::T t) → void {
+  method foo(generic-covariant-impl self::Bar::T t) → void {
     for (dynamic i in t) {
       core::int x = i;
     }
@@ -22,7 +22,7 @@
   synthetic constructor •() → self::Baz<self::Baz::T, self::Baz::E, self::Baz::S>
     : super core::Object::•()
     ;
-  method foo(self::Baz::S t) → void {
+  method foo(generic-covariant-impl self::Baz::S t) → void {
     for (dynamic i in t) {
       core::int x = i;
       self::Baz::T y = i;
diff --git a/pkg/front_end/testcases/inference/infer_types_on_loop_indices_for_each_loop_async.dart b/pkg/front_end/testcases/inference/infer_types_on_loop_indices_for_each_loop_async.dart
index f2fc604..9b410ed 100644
--- a/pkg/front_end/testcases/inference/infer_types_on_loop_indices_for_each_loop_async.dart
+++ b/pkg/front_end/testcases/inference/infer_types_on_loop_indices_for_each_loop_async.dart
@@ -12,7 +12,7 @@
 }
 
 class Bar<T extends Stream<String>> {
-  /*@topType=dynamic*/ foo(T t) async {
+  foo(T t) async {
     await for (var /*@type=String*/ i in t) {
       int x = /*error:INVALID_ASSIGNMENT*/ i;
     }
@@ -20,7 +20,7 @@
 }
 
 class Baz<T, E extends Stream<T>, S extends E> {
-  /*@topType=dynamic*/ foo(S t) async {
+  foo(S t) async {
     await for (var /*@type=Baz::T*/ i in t) {
       int x = /*error:INVALID_ASSIGNMENT*/ i;
       T y = i;
diff --git a/pkg/front_end/testcases/inference/infer_types_on_loop_indices_for_each_loop_async.dart.legacy.expect b/pkg/front_end/testcases/inference/infer_types_on_loop_indices_for_each_loop_async.dart.legacy.expect
index 0d7e2c9..e4a880ef 100644
--- a/pkg/front_end/testcases/inference/infer_types_on_loop_indices_for_each_loop_async.dart.legacy.expect
+++ b/pkg/front_end/testcases/inference/infer_types_on_loop_indices_for_each_loop_async.dart.legacy.expect
@@ -15,7 +15,7 @@
   synthetic constructor •() → self::Bar<self::Bar::T>
     : super core::Object::•()
     ;
-  method foo(self::Bar::T t) → dynamic async {
+  method foo(generic-covariant-impl self::Bar::T t) → dynamic async {
     await for (dynamic i in t) {
       core::int x = i;
     }
@@ -25,7 +25,7 @@
   synthetic constructor •() → self::Baz<self::Baz::T, self::Baz::E, self::Baz::S>
     : super core::Object::•()
     ;
-  method foo(self::Baz::S t) → dynamic async {
+  method foo(generic-covariant-impl self::Baz::S t) → dynamic async {
     await for (dynamic i in t) {
       core::int x = i;
       self::Baz::T y = i;
diff --git a/pkg/front_end/testcases/inference/infer_types_on_loop_indices_for_each_loop_async.dart.legacy.transformed.expect b/pkg/front_end/testcases/inference/infer_types_on_loop_indices_for_each_loop_async.dart.legacy.transformed.expect
index 2cc1d41..a26de4c 100644
--- a/pkg/front_end/testcases/inference/infer_types_on_loop_indices_for_each_loop_async.dart.legacy.transformed.expect
+++ b/pkg/front_end/testcases/inference/infer_types_on_loop_indices_for_each_loop_async.dart.legacy.transformed.expect
@@ -15,7 +15,7 @@
   synthetic constructor •() → self::Bar<self::Bar::T>
     : super core::Object::•()
     ;
-  method foo(self::Bar::T t) → dynamic /* originally async */ {
+  method foo(generic-covariant-impl self::Bar::T t) → dynamic /* originally async */ {
     final asy::_AsyncAwaitCompleter<dynamic> :async_completer = new asy::_AsyncAwaitCompleter::•<dynamic>();
     asy::FutureOr<dynamic> :return_value;
     dynamic :async_stack_trace;
@@ -74,7 +74,7 @@
   synthetic constructor •() → self::Baz<self::Baz::T, self::Baz::E, self::Baz::S>
     : super core::Object::•()
     ;
-  method foo(self::Baz::S t) → dynamic /* originally async */ {
+  method foo(generic-covariant-impl self::Baz::S t) → dynamic /* originally async */ {
     final asy::_AsyncAwaitCompleter<dynamic> :async_completer = new asy::_AsyncAwaitCompleter::•<dynamic>();
     asy::FutureOr<dynamic> :return_value;
     dynamic :async_stack_trace;
diff --git a/pkg/front_end/testcases/inference/infer_types_on_loop_indices_for_each_loop_async.dart.outline.expect b/pkg/front_end/testcases/inference/infer_types_on_loop_indices_for_each_loop_async.dart.outline.expect
index 70778c8..c157ca9 100644
--- a/pkg/front_end/testcases/inference/infer_types_on_loop_indices_for_each_loop_async.dart.outline.expect
+++ b/pkg/front_end/testcases/inference/infer_types_on_loop_indices_for_each_loop_async.dart.outline.expect
@@ -13,13 +13,13 @@
 class Bar<T extends asy::Stream<core::String> = dynamic> extends core::Object {
   synthetic constructor •() → self::Bar<self::Bar::T>
     ;
-  method foo(self::Bar::T t) → dynamic
+  method foo(generic-covariant-impl self::Bar::T t) → dynamic
     ;
 }
 class Baz<T extends core::Object = dynamic, E extends asy::Stream<self::Baz::T> = dynamic, S extends self::Baz::E = dynamic> extends core::Object {
   synthetic constructor •() → self::Baz<self::Baz::T, self::Baz::E, self::Baz::S>
     ;
-  method foo(self::Baz::S t) → dynamic
+  method foo(generic-covariant-impl self::Baz::S t) → dynamic
     ;
 }
 abstract class MyStream<T extends core::Object = dynamic> extends asy::Stream<self::MyStream::T> {
diff --git a/pkg/front_end/testcases/inference/infer_variable_void.dart b/pkg/front_end/testcases/inference/infer_variable_void.dart
index 3e54630..65fdfb3 100644
--- a/pkg/front_end/testcases/inference/infer_variable_void.dart
+++ b/pkg/front_end/testcases/inference/infer_variable_void.dart
@@ -6,7 +6,7 @@
 library test;
 
 void f() {}
-var /*@topType=void*/ x = /*info:USE_OF_VOID_RESULT*/ f();
+var x = /*info:USE_OF_VOID_RESULT*/ f();
 
 main() {
   x;
diff --git a/pkg/front_end/testcases/inference/inferred_initializing_formal_checks_default_value.dart b/pkg/front_end/testcases/inference/inferred_initializing_formal_checks_default_value.dart
index d383d76..5ecd7db 100644
--- a/pkg/front_end/testcases/inference/inferred_initializing_formal_checks_default_value.dart
+++ b/pkg/front_end/testcases/inference/inferred_initializing_formal_checks_default_value.dart
@@ -6,7 +6,7 @@
 library test;
 
 class Foo {
-  var /*@topType=int*/ x = 1;
+  var x = 1;
   Foo([this.x = /*error:INVALID_ASSIGNMENT*/ "1"]);
 }
 
diff --git a/pkg/front_end/testcases/inference/inferred_nonstatic_field_depends_on_static_field_complex.dart b/pkg/front_end/testcases/inference/inferred_nonstatic_field_depends_on_static_field_complex.dart
index 281d549..760375f 100644
--- a/pkg/front_end/testcases/inference/inferred_nonstatic_field_depends_on_static_field_complex.dart
+++ b/pkg/front_end/testcases/inference/inferred_nonstatic_field_depends_on_static_field_complex.dart
@@ -6,8 +6,8 @@
 library test;
 
 class C {
-  static var /*@topType=String*/ x = 'x';
-  var /*@topType=Map<String, Map<String, String>>*/ y = /*@typeArgs=String, Map<String, String>*/ {
+  static var x = 'x';
+  var y = /*@typeArgs=String, Map<String, String>*/ {
     'a': /*@typeArgs=String, String*/ {'b': 'c'},
     'd': /*@typeArgs=String, String*/ {'e': x}
   };
diff --git a/pkg/front_end/testcases/inference/inferred_nonstatic_field_depends_on_top_level_var_simple.dart b/pkg/front_end/testcases/inference/inferred_nonstatic_field_depends_on_top_level_var_simple.dart
index 39d8091..8e9c16b 100644
--- a/pkg/front_end/testcases/inference/inferred_nonstatic_field_depends_on_top_level_var_simple.dart
+++ b/pkg/front_end/testcases/inference/inferred_nonstatic_field_depends_on_top_level_var_simple.dart
@@ -5,10 +5,10 @@
 /*@testedFeatures=inference*/
 library test;
 
-var /*@topType=String*/ x = 'x';
+var x = 'x';
 
 class C {
-  var /*@topType=String*/ y = x;
+  var y = x;
 }
 
 main() {
diff --git a/pkg/front_end/testcases/inference/inferred_type_cascade.dart b/pkg/front_end/testcases/inference/inferred_type_cascade.dart
index a6308da..c7f21af 100644
--- a/pkg/front_end/testcases/inference/inferred_type_cascade.dart
+++ b/pkg/front_end/testcases/inference/inferred_type_cascade.dart
@@ -11,7 +11,7 @@
   void m() {}
 }
 
-var /*@topType=A*/ v = new A()
+var v = new A()
   .. /*@target=A::a*/ a = 1
   .. /*@target=A::b*/ b. /*@target=List::add*/ add(2)
   .. /*@target=A::m*/ m();
diff --git a/pkg/front_end/testcases/inference/inferred_type_custom_binary_op.dart b/pkg/front_end/testcases/inference/inferred_type_custom_binary_op.dart
index bc3ee5c..776efe5 100644
--- a/pkg/front_end/testcases/inference/inferred_type_custom_binary_op.dart
+++ b/pkg/front_end/testcases/inference/inferred_type_custom_binary_op.dart
@@ -10,7 +10,7 @@
 }
 
 C c = new C();
-var /*@topType=bool*/ x = c /*@target=C::**/ * c;
+var x = c /*@target=C::**/ * c;
 
 main() {
   c;
diff --git a/pkg/front_end/testcases/inference/inferred_type_custom_binary_op_via_interface.dart b/pkg/front_end/testcases/inference/inferred_type_custom_binary_op_via_interface.dart
index 02e1dfb..72a8365 100644
--- a/pkg/front_end/testcases/inference/inferred_type_custom_binary_op_via_interface.dart
+++ b/pkg/front_end/testcases/inference/inferred_type_custom_binary_op_via_interface.dart
@@ -12,7 +12,7 @@
 abstract class C implements I {}
 
 C c;
-var /*@topType=bool*/ x = c /*@target=I::**/ * c;
+var x = c /*@target=I::**/ * c;
 
 main() {
   c;
diff --git a/pkg/front_end/testcases/inference/inferred_type_custom_unary_op.dart b/pkg/front_end/testcases/inference/inferred_type_custom_unary_op.dart
index d54e302..26e560c 100644
--- a/pkg/front_end/testcases/inference/inferred_type_custom_unary_op.dart
+++ b/pkg/front_end/testcases/inference/inferred_type_custom_unary_op.dart
@@ -10,7 +10,7 @@
 }
 
 C c = new C();
-var /*@topType=bool*/ x = /*@target=C::unary-*/ -c;
+var x = /*@target=C::unary-*/ -c;
 
 main() {
   c;
diff --git a/pkg/front_end/testcases/inference/inferred_type_custom_unary_op_via_interface.dart b/pkg/front_end/testcases/inference/inferred_type_custom_unary_op_via_interface.dart
index 1289475..db149d1 100644
--- a/pkg/front_end/testcases/inference/inferred_type_custom_unary_op_via_interface.dart
+++ b/pkg/front_end/testcases/inference/inferred_type_custom_unary_op_via_interface.dart
@@ -12,7 +12,7 @@
 abstract class C implements I {}
 
 C c;
-var /*@topType=bool*/ x = /*@target=I::unary-*/ -c;
+var x = /*@target=I::unary-*/ -c;
 
 main() {
   c;
diff --git a/pkg/front_end/testcases/inference/inferred_type_extract_method_tear_off.dart b/pkg/front_end/testcases/inference/inferred_type_extract_method_tear_off.dart
index e9e21a5..813e3cd 100644
--- a/pkg/front_end/testcases/inference/inferred_type_extract_method_tear_off.dart
+++ b/pkg/front_end/testcases/inference/inferred_type_extract_method_tear_off.dart
@@ -10,6 +10,6 @@
 }
 
 C f() => null;
-var /*@topType=() -> bool*/ x = f(). /*@target=C::g*/ g;
+var x = f(). /*@target=C::g*/ g;
 
 main() {}
diff --git a/pkg/front_end/testcases/inference/inferred_type_extract_method_tear_off_via_interface.dart b/pkg/front_end/testcases/inference/inferred_type_extract_method_tear_off_via_interface.dart
index 28313ff..b4874c6 100644
--- a/pkg/front_end/testcases/inference/inferred_type_extract_method_tear_off_via_interface.dart
+++ b/pkg/front_end/testcases/inference/inferred_type_extract_method_tear_off_via_interface.dart
@@ -12,6 +12,6 @@
 abstract class C implements I {}
 
 C f() => null;
-var /*@topType=() -> bool*/ x = f(). /*@target=I::g*/ g;
+var x = f(). /*@target=I::g*/ g;
 
 main() {}
diff --git a/pkg/front_end/testcases/inference/inferred_type_from_top_level_executable_tear_off.dart b/pkg/front_end/testcases/inference/inferred_type_from_top_level_executable_tear_off.dart
index 4ccdbce..38ccc97 100644
--- a/pkg/front_end/testcases/inference/inferred_type_from_top_level_executable_tear_off.dart
+++ b/pkg/front_end/testcases/inference/inferred_type_from_top_level_executable_tear_off.dart
@@ -5,7 +5,7 @@
 /*@testedFeatures=inference*/
 library test;
 
-var /*@topType=(Object) -> void*/ v = print;
+var v = print;
 
 main() {
   v;
diff --git a/pkg/front_end/testcases/inference/inferred_type_invoke_method.dart b/pkg/front_end/testcases/inference/inferred_type_invoke_method.dart
index ec5825a..387aeff 100644
--- a/pkg/front_end/testcases/inference/inferred_type_invoke_method.dart
+++ b/pkg/front_end/testcases/inference/inferred_type_invoke_method.dart
@@ -10,6 +10,6 @@
 }
 
 C f() => null;
-var /*@topType=bool*/ x = f(). /*@target=C::g*/ g();
+var x = f(). /*@target=C::g*/ g();
 
 main() {}
diff --git a/pkg/front_end/testcases/inference/inferred_type_invoke_method_via_interface.dart b/pkg/front_end/testcases/inference/inferred_type_invoke_method_via_interface.dart
index f28fb58..e31a0d3 100644
--- a/pkg/front_end/testcases/inference/inferred_type_invoke_method_via_interface.dart
+++ b/pkg/front_end/testcases/inference/inferred_type_invoke_method_via_interface.dart
@@ -12,6 +12,6 @@
 abstract class C implements I {}
 
 C f() => null;
-var /*@topType=bool*/ x = f(). /*@target=I::g*/ g();
+var x = f(). /*@target=I::g*/ g();
 
 main() {}
diff --git a/pkg/front_end/testcases/inference/inferred_type_is_enum.dart b/pkg/front_end/testcases/inference/inferred_type_is_enum.dart
index 46c1099..1262709 100644
--- a/pkg/front_end/testcases/inference/inferred_type_is_enum.dart
+++ b/pkg/front_end/testcases/inference/inferred_type_is_enum.dart
@@ -6,7 +6,7 @@
 library test;
 
 enum E { v1 }
-final /*@topType=E*/ x = E.v1;
+final x = E.v1;
 
 main() {
   x;
diff --git a/pkg/front_end/testcases/inference/inferred_type_is_enum_values.dart b/pkg/front_end/testcases/inference/inferred_type_is_enum_values.dart
index abc84d5..2463b13 100644
--- a/pkg/front_end/testcases/inference/inferred_type_is_enum_values.dart
+++ b/pkg/front_end/testcases/inference/inferred_type_is_enum_values.dart
@@ -6,7 +6,7 @@
 library test;
 
 enum E { v1 }
-final /*@topType=List<E>*/ x = E.values;
+final x = E.values;
 
 main() {
   x;
diff --git a/pkg/front_end/testcases/inference/inferred_type_is_typedef.dart b/pkg/front_end/testcases/inference/inferred_type_is_typedef.dart
index fa8c890..faf400f 100644
--- a/pkg/front_end/testcases/inference/inferred_type_is_typedef.dart
+++ b/pkg/front_end/testcases/inference/inferred_type_is_typedef.dart
@@ -6,7 +6,7 @@
 library test;
 
 typedef void F();
-final /*@topType=Map<String, () -> void>*/ x = <String, F>{};
+final x = <String, F>{};
 
 main() {
   x;
diff --git a/pkg/front_end/testcases/inference/inferred_type_is_typedef_parameterized.dart b/pkg/front_end/testcases/inference/inferred_type_is_typedef_parameterized.dart
index 26b4cc8..09ae0af 100644
--- a/pkg/front_end/testcases/inference/inferred_type_is_typedef_parameterized.dart
+++ b/pkg/front_end/testcases/inference/inferred_type_is_typedef_parameterized.dart
@@ -6,6 +6,6 @@
 library test;
 
 typedef T F<T>();
-final /*@topType=Map<String, () -> int>*/ x = <String, F<int>>{};
+final x = <String, F<int>>{};
 
 main() {}
diff --git a/pkg/front_end/testcases/inference/inferred_type_uses_synthetic_function_type.dart b/pkg/front_end/testcases/inference/inferred_type_uses_synthetic_function_type.dart
index 9ea230b..2cc5ff7 100644
--- a/pkg/front_end/testcases/inference/inferred_type_uses_synthetic_function_type.dart
+++ b/pkg/front_end/testcases/inference/inferred_type_uses_synthetic_function_type.dart
@@ -7,7 +7,7 @@
 
 int f() => null;
 String g() => null;
-var /*@topType=List<() -> Object>*/ v = /*@typeArgs=() -> Object*/ [f, g];
+var v = /*@typeArgs=() -> Object*/ [f, g];
 
 main() {
   v;
diff --git a/pkg/front_end/testcases/inference/inferred_type_uses_synthetic_function_type_function_typed_param.dart b/pkg/front_end/testcases/inference/inferred_type_uses_synthetic_function_type_function_typed_param.dart
index 17056f9..dadf60b 100644
--- a/pkg/front_end/testcases/inference/inferred_type_uses_synthetic_function_type_function_typed_param.dart
+++ b/pkg/front_end/testcases/inference/inferred_type_uses_synthetic_function_type_function_typed_param.dart
@@ -7,10 +7,7 @@
 
 int f(int x(String y)) => null;
 String g(int x(String y)) => null;
-var /*@topType=List<((String) -> int) -> Object>*/ v = /*@typeArgs=((String) -> int) -> Object*/ [
-  f,
-  g
-];
+var v = /*@typeArgs=((String) -> int) -> Object*/ [f, g];
 
 main() {
   v;
diff --git a/pkg/front_end/testcases/inference/inferred_type_uses_synthetic_function_type_named_param.dart b/pkg/front_end/testcases/inference/inferred_type_uses_synthetic_function_type_named_param.dart
index 4a1212c..d922665 100644
--- a/pkg/front_end/testcases/inference/inferred_type_uses_synthetic_function_type_named_param.dart
+++ b/pkg/front_end/testcases/inference/inferred_type_uses_synthetic_function_type_named_param.dart
@@ -7,10 +7,7 @@
 
 int f({int x}) => null;
 String g({int x}) => null;
-var /*@topType=List<({x: int}) -> Object>*/ v = /*@typeArgs=({x: int}) -> Object*/ [
-  f,
-  g
-];
+var v = /*@typeArgs=({x: int}) -> Object*/ [f, g];
 
 main() {
   v;
diff --git a/pkg/front_end/testcases/inference/inferred_type_uses_synthetic_function_type_positional_param.dart b/pkg/front_end/testcases/inference/inferred_type_uses_synthetic_function_type_positional_param.dart
index 192c43f..1307233 100644
--- a/pkg/front_end/testcases/inference/inferred_type_uses_synthetic_function_type_positional_param.dart
+++ b/pkg/front_end/testcases/inference/inferred_type_uses_synthetic_function_type_positional_param.dart
@@ -7,10 +7,7 @@
 
 int f([int x]) => null;
 String g([int x]) => null;
-var /*@topType=List<([int]) -> Object>*/ v = /*@typeArgs=([int]) -> Object*/ [
-  f,
-  g
-];
+var v = /*@typeArgs=([int]) -> Object*/ [f, g];
 
 main() {
   v;
diff --git a/pkg/front_end/testcases/inference/inferred_type_uses_synthetic_function_type_required_param.dart b/pkg/front_end/testcases/inference/inferred_type_uses_synthetic_function_type_required_param.dart
index 4d1cef2..926a0d3 100644
--- a/pkg/front_end/testcases/inference/inferred_type_uses_synthetic_function_type_required_param.dart
+++ b/pkg/front_end/testcases/inference/inferred_type_uses_synthetic_function_type_required_param.dart
@@ -7,7 +7,7 @@
 
 int f(int x) => null;
 String g(int x) => null;
-var /*@topType=List<(int) -> Object>*/ v = /*@typeArgs=(int) -> Object*/ [f, g];
+var v = /*@typeArgs=(int) -> Object*/ [f, g];
 
 main() {
   v;
diff --git a/pkg/front_end/testcases/inference/inferred_type_via_closure_multiple_levels_of_nesting.dart b/pkg/front_end/testcases/inference/inferred_type_via_closure_multiple_levels_of_nesting.dart
index 1408cdd..11972a9 100644
--- a/pkg/front_end/testcases/inference/inferred_type_via_closure_multiple_levels_of_nesting.dart
+++ b/pkg/front_end/testcases/inference/inferred_type_via_closure_multiple_levels_of_nesting.dart
@@ -6,7 +6,7 @@
 library test;
 
 class C {
-  static final /*@topType=(bool) -> (int) -> Map<int, bool>*/ f = /*@returnType=(int) -> Map<int, bool>*/ (bool
+  static final f = /*@returnType=(int) -> Map<int, bool>*/ (bool
       b) => /*@returnType=Map<int, bool>*/ (int i) => /*@typeArgs=int, bool*/ {i: b};
 }
 
diff --git a/pkg/front_end/testcases/inference/inferred_type_via_closure_type_depends_on_args.dart b/pkg/front_end/testcases/inference/inferred_type_via_closure_type_depends_on_args.dart
index 3de4209..76efa44 100644
--- a/pkg/front_end/testcases/inference/inferred_type_via_closure_type_depends_on_args.dart
+++ b/pkg/front_end/testcases/inference/inferred_type_via_closure_type_depends_on_args.dart
@@ -6,8 +6,7 @@
 library test;
 
 class C {
-  static final /*@topType=(bool) -> bool*/ f = /*@returnType=bool*/ (bool b) =>
-      b;
+  static final f = /*@returnType=bool*/ (bool b) => b;
 }
 
 main() {}
diff --git a/pkg/front_end/testcases/inference/inferred_type_via_closure_type_independent_of_args_field.dart b/pkg/front_end/testcases/inference/inferred_type_via_closure_type_independent_of_args_field.dart
index 8d3291f..08e3315 100644
--- a/pkg/front_end/testcases/inference/inferred_type_via_closure_type_independent_of_args_field.dart
+++ b/pkg/front_end/testcases/inference/inferred_type_via_closure_type_independent_of_args_field.dart
@@ -6,7 +6,7 @@
 library test;
 
 class C {
-  static final /*@topType=(bool) -> int*/ f = /*@returnType=int*/ (bool b) => 1;
+  static final f = /*@returnType=int*/ (bool b) => 1;
 }
 
 main() {}
diff --git a/pkg/front_end/testcases/inference/inferred_type_via_closure_type_independent_of_args_top_level.dart b/pkg/front_end/testcases/inference/inferred_type_via_closure_type_independent_of_args_top_level.dart
index 5a23706..1030f5b 100644
--- a/pkg/front_end/testcases/inference/inferred_type_via_closure_type_independent_of_args_top_level.dart
+++ b/pkg/front_end/testcases/inference/inferred_type_via_closure_type_independent_of_args_top_level.dart
@@ -5,7 +5,7 @@
 /*@testedFeatures=inference*/
 library test;
 
-final /*@topType=(bool) -> int*/ f = /*@returnType=int*/ (bool b) => 1;
+final f = /*@returnType=int*/ (bool b) => 1;
 
 main() {
   f;
diff --git a/pkg/front_end/testcases/inference/inheritance_does_not_imply_circularity.dart b/pkg/front_end/testcases/inference/inheritance_does_not_imply_circularity.dart
index fb72d4d..4c3240d 100644
--- a/pkg/front_end/testcases/inference/inheritance_does_not_imply_circularity.dart
+++ b/pkg/front_end/testcases/inference/inheritance_does_not_imply_circularity.dart
@@ -10,7 +10,7 @@
 // circularity.
 
 class I1 {
-  final /*@topType=int*/ x = y;
+  final x = y;
 }
 
 abstract class I2 {
@@ -21,6 +21,6 @@
   int get x => 0;
 }
 
-var /*@topType=int*/ y = new C(). /*@target=C::x*/ x;
+var y = new C(). /*@target=C::x*/ x;
 
 main() {}
diff --git a/pkg/front_end/testcases/inference/instantiate_to_bounds_invoke_constructor_type_args_exact.dart b/pkg/front_end/testcases/inference/instantiate_to_bounds_invoke_constructor_type_args_exact.dart
index cca99f8..a1c62d3 100644
--- a/pkg/front_end/testcases/inference/instantiate_to_bounds_invoke_constructor_type_args_exact.dart
+++ b/pkg/front_end/testcases/inference/instantiate_to_bounds_invoke_constructor_type_args_exact.dart
@@ -7,7 +7,7 @@
 
 class C<T extends num> {}
 
-var /*@topType=C<int>*/ x = new C<int>();
+var x = new C<int>();
 
 main() {
   x;
diff --git a/pkg/front_end/testcases/inference/list_literal_typed.dart b/pkg/front_end/testcases/inference/list_literal_typed.dart
index d923333..5182f1a 100644
--- a/pkg/front_end/testcases/inference/list_literal_typed.dart
+++ b/pkg/front_end/testcases/inference/list_literal_typed.dart
@@ -5,10 +5,10 @@
 /*@testedFeatures=inference*/
 library test;
 
-var /*@topType=List<int>*/ a = <int>[];
-var /*@topType=List<double>*/ b = <double>[1.0, 2.0, 3.0];
-var /*@topType=List<List<int>>*/ c = <List<int>>[];
-var /*@topType=List<dynamic>*/ d = <dynamic>[1, 2.0, false];
+var a = <int>[];
+var b = <double>[1.0, 2.0, 3.0];
+var c = <List<int>>[];
+var d = <dynamic>[1, 2.0, false];
 
 main() {
   var /*@type=List<int>*/ a = <int>[];
diff --git a/pkg/front_end/testcases/inference/list_literals_top_level.dart b/pkg/front_end/testcases/inference/list_literals_top_level.dart
index 1f6736b..84b51a0 100644
--- a/pkg/front_end/testcases/inference/list_literals_top_level.dart
+++ b/pkg/front_end/testcases/inference/list_literals_top_level.dart
@@ -5,7 +5,7 @@
 /*@testedFeatures=inference*/
 library test;
 
-var /*@topType=List<int>*/ x1 = /*@typeArgs=int*/ [1, 2, 3];
+var x1 = /*@typeArgs=int*/ [1, 2, 3];
 test1() {
   x1. /*@target=List::add*/ add(/*error:ARGUMENT_TYPE_NOT_ASSIGNABLE*/ 'hi');
   x1. /*@target=List::add*/ add(/*error:ARGUMENT_TYPE_NOT_ASSIGNABLE*/ 4.0);
@@ -13,7 +13,7 @@
   List<num> y = x1;
 }
 
-var /*@topType=List<num>*/ x2 = /*@typeArgs=num*/ [1, 2.0, 3];
+var x2 = /*@typeArgs=num*/ [1, 2.0, 3];
 test2() {
   x2. /*@target=List::add*/ add(/*error:ARGUMENT_TYPE_NOT_ASSIGNABLE*/ 'hi');
   x2. /*@target=List::add*/ add(4.0);
diff --git a/pkg/front_end/testcases/inference/local_constructor_from_arguments.dart.legacy.expect b/pkg/front_end/testcases/inference/local_constructor_from_arguments.dart.legacy.expect
index e89d29c..f31c88e 100644
--- a/pkg/front_end/testcases/inference/local_constructor_from_arguments.dart.legacy.expect
+++ b/pkg/front_end/testcases/inference/local_constructor_from_arguments.dart.legacy.expect
@@ -3,7 +3,7 @@
 import "dart:core" as core;
 
 class C<T extends core::Object = dynamic> extends core::Object {
-  field self::C::T t;
+  generic-covariant-impl field self::C::T t;
   constructor •(self::C::T t) → self::C<self::C::T>
     : self::C::t = t, super core::Object::•()
     ;
diff --git a/pkg/front_end/testcases/inference/local_constructor_from_arguments.dart.legacy.transformed.expect b/pkg/front_end/testcases/inference/local_constructor_from_arguments.dart.legacy.transformed.expect
index e89d29c..f31c88e 100644
--- a/pkg/front_end/testcases/inference/local_constructor_from_arguments.dart.legacy.transformed.expect
+++ b/pkg/front_end/testcases/inference/local_constructor_from_arguments.dart.legacy.transformed.expect
@@ -3,7 +3,7 @@
 import "dart:core" as core;
 
 class C<T extends core::Object = dynamic> extends core::Object {
-  field self::C::T t;
+  generic-covariant-impl field self::C::T t;
   constructor •(self::C::T t) → self::C<self::C::T>
     : self::C::t = t, super core::Object::•()
     ;
diff --git a/pkg/front_end/testcases/inference/local_constructor_from_arguments.dart.outline.expect b/pkg/front_end/testcases/inference/local_constructor_from_arguments.dart.outline.expect
index 9c807e8..cdfac01 100644
--- a/pkg/front_end/testcases/inference/local_constructor_from_arguments.dart.outline.expect
+++ b/pkg/front_end/testcases/inference/local_constructor_from_arguments.dart.outline.expect
@@ -3,7 +3,7 @@
 import "dart:core" as core;
 
 class C<T extends core::Object = dynamic> extends core::Object {
-  field self::C::T t;
+  generic-covariant-impl field self::C::T t;
   constructor •(self::C::T t) → self::C<self::C::T>
     ;
 }
diff --git a/pkg/front_end/testcases/inference/map_literals_top_level.dart b/pkg/front_end/testcases/inference/map_literals_top_level.dart
index 7ce98e6..362aef1 100644
--- a/pkg/front_end/testcases/inference/map_literals_top_level.dart
+++ b/pkg/front_end/testcases/inference/map_literals_top_level.dart
@@ -5,10 +5,7 @@
 /*@testedFeatures=inference*/
 library test;
 
-var /*@topType=Map<int, String>*/ x1 = /*@typeArgs=int, String*/ {
-  1: 'x',
-  2: 'y'
-};
+var x1 = /*@typeArgs=int, String*/ {1: 'x', 2: 'y'};
 test1() {
   x1 /*@target=Map::[]=*/ [3] = 'z';
   x1 /*@target=Map::[]=*/ [/*error:ARGUMENT_TYPE_NOT_ASSIGNABLE*/ 'hi'] = 'w';
@@ -17,11 +14,7 @@
   Map<num, String> y = x1;
 }
 
-var /*@topType=Map<num, Pattern>*/ x2 = /*@typeArgs=num, Pattern*/ {
-  1: 'x',
-  2: 'y',
-  3.0: new RegExp('.')
-};
+var x2 = /*@typeArgs=num, Pattern*/ {1: 'x', 2: 'y', 3.0: new RegExp('.')};
 test2() {
   x2 /*@target=Map::[]=*/ [3] = 'z';
   x2 /*@target=Map::[]=*/ [/*error:ARGUMENT_TYPE_NOT_ASSIGNABLE*/ 'hi'] = 'w';
diff --git a/pkg/front_end/testcases/inference/map_literals_top_level.dart.strong.expect b/pkg/front_end/testcases/inference/map_literals_top_level.dart.strong.expect
index 29bcc2c..9049589 100644
--- a/pkg/front_end/testcases/inference/map_literals_top_level.dart.strong.expect
+++ b/pkg/front_end/testcases/inference/map_literals_top_level.dart.strong.expect
@@ -2,27 +2,27 @@
 //
 // Problems in library:
 //
-// pkg/front_end/testcases/inference/map_literals_top_level.dart:14:67: Error: A value of type 'String' can't be assigned to a variable of type 'int'.
+// pkg/front_end/testcases/inference/map_literals_top_level.dart:11:67: Error: A value of type 'String' can't be assigned to a variable of type 'int'.
 // Try changing the type of the left hand side, or casting the right hand side to 'int'.
 //   x1 /*@target=Map::[]=*/ [/*error:ARGUMENT_TYPE_NOT_ASSIGNABLE*/ 'hi'] = 'w';
 //                                                                   ^
 //
-// pkg/front_end/testcases/inference/map_literals_top_level.dart:15:67: Error: A value of type 'double' can't be assigned to a variable of type 'int'.
+// pkg/front_end/testcases/inference/map_literals_top_level.dart:12:67: Error: A value of type 'double' can't be assigned to a variable of type 'int'.
 // Try changing the type of the left hand side, or casting the right hand side to 'int'.
 //   x1 /*@target=Map::[]=*/ [/*error:ARGUMENT_TYPE_NOT_ASSIGNABLE*/ 4.0] = 'u';
 //                                                                   ^
 //
-// pkg/front_end/testcases/inference/map_literals_top_level.dart:16:62: Error: A value of type 'int' can't be assigned to a variable of type 'String'.
+// pkg/front_end/testcases/inference/map_literals_top_level.dart:13:62: Error: A value of type 'int' can't be assigned to a variable of type 'String'.
 // Try changing the type of the left hand side, or casting the right hand side to 'String'.
 //   x1 /*@target=Map::[]=*/ [3] = /*error:INVALID_ASSIGNMENT*/ 42;
 //                                                              ^
 //
-// pkg/front_end/testcases/inference/map_literals_top_level.dart:27:67: Error: A value of type 'String' can't be assigned to a variable of type 'num'.
+// pkg/front_end/testcases/inference/map_literals_top_level.dart:20:67: Error: A value of type 'String' can't be assigned to a variable of type 'num'.
 // Try changing the type of the left hand side, or casting the right hand side to 'num'.
 //   x2 /*@target=Map::[]=*/ [/*error:ARGUMENT_TYPE_NOT_ASSIGNABLE*/ 'hi'] = 'w';
 //                                                                   ^
 //
-// pkg/front_end/testcases/inference/map_literals_top_level.dart:29:62: Error: A value of type 'int' can't be assigned to a variable of type 'Pattern'.
+// pkg/front_end/testcases/inference/map_literals_top_level.dart:22:62: Error: A value of type 'int' can't be assigned to a variable of type 'Pattern'.
 //  - 'Pattern' is from 'dart:core'.
 // Try changing the type of the left hand side, or casting the right hand side to 'Pattern'.
 //   x2 /*@target=Map::[]=*/ [3] = /*error:INVALID_ASSIGNMENT*/ 42;
@@ -35,15 +35,15 @@
 static field core::Map<core::num, core::Pattern> x2 = <core::num, core::Pattern>{1: "x", 2: "y", 3.0: core::RegExp::•(".")};
 static method test1() → dynamic {
   self::x1.{core::Map::[]=}(3, "z");
-  self::x1.{core::Map::[]=}(let final<BottomType> #t1 = invalid-expression "pkg/front_end/testcases/inference/map_literals_top_level.dart:14:67: Error: A value of type 'String' can't be assigned to a variable of type 'int'.
+  self::x1.{core::Map::[]=}(let final<BottomType> #t1 = invalid-expression "pkg/front_end/testcases/inference/map_literals_top_level.dart:11:67: Error: A value of type 'String' can't be assigned to a variable of type 'int'.
 Try changing the type of the left hand side, or casting the right hand side to 'int'.
   x1 /*@target=Map::[]=*/ [/*error:ARGUMENT_TYPE_NOT_ASSIGNABLE*/ 'hi'] = 'w';
                                                                   ^" in "hi" as{TypeError} core::int, "w");
-  self::x1.{core::Map::[]=}(let final<BottomType> #t2 = invalid-expression "pkg/front_end/testcases/inference/map_literals_top_level.dart:15:67: Error: A value of type 'double' can't be assigned to a variable of type 'int'.
+  self::x1.{core::Map::[]=}(let final<BottomType> #t2 = invalid-expression "pkg/front_end/testcases/inference/map_literals_top_level.dart:12:67: Error: A value of type 'double' can't be assigned to a variable of type 'int'.
 Try changing the type of the left hand side, or casting the right hand side to 'int'.
   x1 /*@target=Map::[]=*/ [/*error:ARGUMENT_TYPE_NOT_ASSIGNABLE*/ 4.0] = 'u';
                                                                   ^" in 4.0 as{TypeError} core::int, "u");
-  self::x1.{core::Map::[]=}(3, let final<BottomType> #t3 = invalid-expression "pkg/front_end/testcases/inference/map_literals_top_level.dart:16:62: Error: A value of type 'int' can't be assigned to a variable of type 'String'.
+  self::x1.{core::Map::[]=}(3, let final<BottomType> #t3 = invalid-expression "pkg/front_end/testcases/inference/map_literals_top_level.dart:13:62: Error: A value of type 'int' can't be assigned to a variable of type 'String'.
 Try changing the type of the left hand side, or casting the right hand side to 'String'.
   x1 /*@target=Map::[]=*/ [3] = /*error:INVALID_ASSIGNMENT*/ 42;
                                                              ^" in 42 as{TypeError} core::String);
@@ -51,12 +51,12 @@
 }
 static method test2() → dynamic {
   self::x2.{core::Map::[]=}(3, "z");
-  self::x2.{core::Map::[]=}(let final<BottomType> #t4 = invalid-expression "pkg/front_end/testcases/inference/map_literals_top_level.dart:27:67: Error: A value of type 'String' can't be assigned to a variable of type 'num'.
+  self::x2.{core::Map::[]=}(let final<BottomType> #t4 = invalid-expression "pkg/front_end/testcases/inference/map_literals_top_level.dart:20:67: Error: A value of type 'String' can't be assigned to a variable of type 'num'.
 Try changing the type of the left hand side, or casting the right hand side to 'num'.
   x2 /*@target=Map::[]=*/ [/*error:ARGUMENT_TYPE_NOT_ASSIGNABLE*/ 'hi'] = 'w';
                                                                   ^" in "hi" as{TypeError} core::num, "w");
   self::x2.{core::Map::[]=}(4.0, "u");
-  self::x2.{core::Map::[]=}(3, let final<BottomType> #t5 = invalid-expression "pkg/front_end/testcases/inference/map_literals_top_level.dart:29:62: Error: A value of type 'int' can't be assigned to a variable of type 'Pattern'.
+  self::x2.{core::Map::[]=}(3, let final<BottomType> #t5 = invalid-expression "pkg/front_end/testcases/inference/map_literals_top_level.dart:22:62: Error: A value of type 'int' can't be assigned to a variable of type 'Pattern'.
  - 'Pattern' is from 'dart:core'.
 Try changing the type of the left hand side, or casting the right hand side to 'Pattern'.
   x2 /*@target=Map::[]=*/ [3] = /*error:INVALID_ASSIGNMENT*/ 42;
diff --git a/pkg/front_end/testcases/inference/map_literals_top_level.dart.strong.transformed.expect b/pkg/front_end/testcases/inference/map_literals_top_level.dart.strong.transformed.expect
index 29bcc2c..9049589 100644
--- a/pkg/front_end/testcases/inference/map_literals_top_level.dart.strong.transformed.expect
+++ b/pkg/front_end/testcases/inference/map_literals_top_level.dart.strong.transformed.expect
@@ -2,27 +2,27 @@
 //
 // Problems in library:
 //
-// pkg/front_end/testcases/inference/map_literals_top_level.dart:14:67: Error: A value of type 'String' can't be assigned to a variable of type 'int'.
+// pkg/front_end/testcases/inference/map_literals_top_level.dart:11:67: Error: A value of type 'String' can't be assigned to a variable of type 'int'.
 // Try changing the type of the left hand side, or casting the right hand side to 'int'.
 //   x1 /*@target=Map::[]=*/ [/*error:ARGUMENT_TYPE_NOT_ASSIGNABLE*/ 'hi'] = 'w';
 //                                                                   ^
 //
-// pkg/front_end/testcases/inference/map_literals_top_level.dart:15:67: Error: A value of type 'double' can't be assigned to a variable of type 'int'.
+// pkg/front_end/testcases/inference/map_literals_top_level.dart:12:67: Error: A value of type 'double' can't be assigned to a variable of type 'int'.
 // Try changing the type of the left hand side, or casting the right hand side to 'int'.
 //   x1 /*@target=Map::[]=*/ [/*error:ARGUMENT_TYPE_NOT_ASSIGNABLE*/ 4.0] = 'u';
 //                                                                   ^
 //
-// pkg/front_end/testcases/inference/map_literals_top_level.dart:16:62: Error: A value of type 'int' can't be assigned to a variable of type 'String'.
+// pkg/front_end/testcases/inference/map_literals_top_level.dart:13:62: Error: A value of type 'int' can't be assigned to a variable of type 'String'.
 // Try changing the type of the left hand side, or casting the right hand side to 'String'.
 //   x1 /*@target=Map::[]=*/ [3] = /*error:INVALID_ASSIGNMENT*/ 42;
 //                                                              ^
 //
-// pkg/front_end/testcases/inference/map_literals_top_level.dart:27:67: Error: A value of type 'String' can't be assigned to a variable of type 'num'.
+// pkg/front_end/testcases/inference/map_literals_top_level.dart:20:67: Error: A value of type 'String' can't be assigned to a variable of type 'num'.
 // Try changing the type of the left hand side, or casting the right hand side to 'num'.
 //   x2 /*@target=Map::[]=*/ [/*error:ARGUMENT_TYPE_NOT_ASSIGNABLE*/ 'hi'] = 'w';
 //                                                                   ^
 //
-// pkg/front_end/testcases/inference/map_literals_top_level.dart:29:62: Error: A value of type 'int' can't be assigned to a variable of type 'Pattern'.
+// pkg/front_end/testcases/inference/map_literals_top_level.dart:22:62: Error: A value of type 'int' can't be assigned to a variable of type 'Pattern'.
 //  - 'Pattern' is from 'dart:core'.
 // Try changing the type of the left hand side, or casting the right hand side to 'Pattern'.
 //   x2 /*@target=Map::[]=*/ [3] = /*error:INVALID_ASSIGNMENT*/ 42;
@@ -35,15 +35,15 @@
 static field core::Map<core::num, core::Pattern> x2 = <core::num, core::Pattern>{1: "x", 2: "y", 3.0: core::RegExp::•(".")};
 static method test1() → dynamic {
   self::x1.{core::Map::[]=}(3, "z");
-  self::x1.{core::Map::[]=}(let final<BottomType> #t1 = invalid-expression "pkg/front_end/testcases/inference/map_literals_top_level.dart:14:67: Error: A value of type 'String' can't be assigned to a variable of type 'int'.
+  self::x1.{core::Map::[]=}(let final<BottomType> #t1 = invalid-expression "pkg/front_end/testcases/inference/map_literals_top_level.dart:11:67: Error: A value of type 'String' can't be assigned to a variable of type 'int'.
 Try changing the type of the left hand side, or casting the right hand side to 'int'.
   x1 /*@target=Map::[]=*/ [/*error:ARGUMENT_TYPE_NOT_ASSIGNABLE*/ 'hi'] = 'w';
                                                                   ^" in "hi" as{TypeError} core::int, "w");
-  self::x1.{core::Map::[]=}(let final<BottomType> #t2 = invalid-expression "pkg/front_end/testcases/inference/map_literals_top_level.dart:15:67: Error: A value of type 'double' can't be assigned to a variable of type 'int'.
+  self::x1.{core::Map::[]=}(let final<BottomType> #t2 = invalid-expression "pkg/front_end/testcases/inference/map_literals_top_level.dart:12:67: Error: A value of type 'double' can't be assigned to a variable of type 'int'.
 Try changing the type of the left hand side, or casting the right hand side to 'int'.
   x1 /*@target=Map::[]=*/ [/*error:ARGUMENT_TYPE_NOT_ASSIGNABLE*/ 4.0] = 'u';
                                                                   ^" in 4.0 as{TypeError} core::int, "u");
-  self::x1.{core::Map::[]=}(3, let final<BottomType> #t3 = invalid-expression "pkg/front_end/testcases/inference/map_literals_top_level.dart:16:62: Error: A value of type 'int' can't be assigned to a variable of type 'String'.
+  self::x1.{core::Map::[]=}(3, let final<BottomType> #t3 = invalid-expression "pkg/front_end/testcases/inference/map_literals_top_level.dart:13:62: Error: A value of type 'int' can't be assigned to a variable of type 'String'.
 Try changing the type of the left hand side, or casting the right hand side to 'String'.
   x1 /*@target=Map::[]=*/ [3] = /*error:INVALID_ASSIGNMENT*/ 42;
                                                              ^" in 42 as{TypeError} core::String);
@@ -51,12 +51,12 @@
 }
 static method test2() → dynamic {
   self::x2.{core::Map::[]=}(3, "z");
-  self::x2.{core::Map::[]=}(let final<BottomType> #t4 = invalid-expression "pkg/front_end/testcases/inference/map_literals_top_level.dart:27:67: Error: A value of type 'String' can't be assigned to a variable of type 'num'.
+  self::x2.{core::Map::[]=}(let final<BottomType> #t4 = invalid-expression "pkg/front_end/testcases/inference/map_literals_top_level.dart:20:67: Error: A value of type 'String' can't be assigned to a variable of type 'num'.
 Try changing the type of the left hand side, or casting the right hand side to 'num'.
   x2 /*@target=Map::[]=*/ [/*error:ARGUMENT_TYPE_NOT_ASSIGNABLE*/ 'hi'] = 'w';
                                                                   ^" in "hi" as{TypeError} core::num, "w");
   self::x2.{core::Map::[]=}(4.0, "u");
-  self::x2.{core::Map::[]=}(3, let final<BottomType> #t5 = invalid-expression "pkg/front_end/testcases/inference/map_literals_top_level.dart:29:62: Error: A value of type 'int' can't be assigned to a variable of type 'Pattern'.
+  self::x2.{core::Map::[]=}(3, let final<BottomType> #t5 = invalid-expression "pkg/front_end/testcases/inference/map_literals_top_level.dart:22:62: Error: A value of type 'int' can't be assigned to a variable of type 'Pattern'.
  - 'Pattern' is from 'dart:core'.
 Try changing the type of the left hand side, or casting the right hand side to 'Pattern'.
   x2 /*@target=Map::[]=*/ [3] = /*error:INVALID_ASSIGNMENT*/ 42;
diff --git a/pkg/front_end/testcases/inference/method_call_with_type_arguments_instance_method.dart b/pkg/front_end/testcases/inference/method_call_with_type_arguments_instance_method.dart
index 3198118..a1490d6 100644
--- a/pkg/front_end/testcases/inference/method_call_with_type_arguments_instance_method.dart
+++ b/pkg/front_end/testcases/inference/method_call_with_type_arguments_instance_method.dart
@@ -11,6 +11,6 @@
 
 class D<T> {}
 
-var /*@topType=D<int>*/ f = new C(). /*@target=C::f*/ f<int>();
+var f = new C(). /*@target=C::f*/ f<int>();
 
 main() {}
diff --git a/pkg/front_end/testcases/inference/method_call_with_type_arguments_instance_method_identifier_sequence.dart b/pkg/front_end/testcases/inference/method_call_with_type_arguments_instance_method_identifier_sequence.dart
index e7fe40a..3b57d56 100644
--- a/pkg/front_end/testcases/inference/method_call_with_type_arguments_instance_method_identifier_sequence.dart
+++ b/pkg/front_end/testcases/inference/method_call_with_type_arguments_instance_method_identifier_sequence.dart
@@ -12,6 +12,6 @@
 class D<T> {}
 
 C c;
-var /*@topType=D<int>*/ f = c. /*@target=C::f*/ f<int>();
+var f = c. /*@target=C::f*/ f<int>();
 
 main() {}
diff --git a/pkg/front_end/testcases/inference/method_call_with_type_arguments_static_method.dart b/pkg/front_end/testcases/inference/method_call_with_type_arguments_static_method.dart
index 1ba94e3..5ca8020 100644
--- a/pkg/front_end/testcases/inference/method_call_with_type_arguments_static_method.dart
+++ b/pkg/front_end/testcases/inference/method_call_with_type_arguments_static_method.dart
@@ -11,6 +11,6 @@
 
 class D<T> {}
 
-var /*@topType=D<int>*/ f = C.f<int>();
+var f = C.f<int>();
 
 main() {}
diff --git a/pkg/front_end/testcases/inference/method_call_with_type_arguments_top_level_function.dart b/pkg/front_end/testcases/inference/method_call_with_type_arguments_top_level_function.dart
index afc9811..4574e77 100644
--- a/pkg/front_end/testcases/inference/method_call_with_type_arguments_top_level_function.dart
+++ b/pkg/front_end/testcases/inference/method_call_with_type_arguments_top_level_function.dart
@@ -9,7 +9,7 @@
 
 class D<T> {}
 
-var /*@topType=D<int>*/ g = f<int>();
+var g = f<int>();
 
 main() {
   g;
diff --git a/pkg/front_end/testcases/inference/mixin_inference_outwards_3.dart b/pkg/front_end/testcases/inference/mixin_inference_outwards_3.dart
index 001083d..1d03f48 100644
--- a/pkg/front_end/testcases/inference/mixin_inference_outwards_3.dart
+++ b/pkg/front_end/testcases/inference/mixin_inference_outwards_3.dart
@@ -2,8 +2,6 @@
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
 
-/*@testedFeatures=error*/
-
 class I<X> {}
 
 class M0<T> extends Object implements I<T> {}
@@ -12,7 +10,6 @@
 
 // M0 is inferred as M0<dynamic>
 // Error since class hierarchy is inconsistent
-class /*@error=AmbiguousSupertypes*/ /*@error=AmbiguousSupertypes*/ A
-    extends Object with M0, M1<int> {}
+class A extends Object with M0, M1<int> {}
 
 main() {}
diff --git a/pkg/front_end/testcases/inference/mixin_inference_outwards_3.dart.legacy.expect b/pkg/front_end/testcases/inference/mixin_inference_outwards_3.dart.legacy.expect
index 890adf5..0c7e099 100644
--- a/pkg/front_end/testcases/inference/mixin_inference_outwards_3.dart.legacy.expect
+++ b/pkg/front_end/testcases/inference/mixin_inference_outwards_3.dart.legacy.expect
@@ -1,15 +1,15 @@
 //
 // Problems in component:
 //
-// pkg/front_end/testcases/inference/mixin_inference_outwards_3.dart:15:69: Error: 'Object with M0, M1' can't implement both 'I<dynamic>' and 'I<int>'
+// pkg/front_end/testcases/inference/mixin_inference_outwards_3.dart:13:7: Error: 'Object with M0, M1' can't implement both 'I<dynamic>' and 'I<int>'
 //  - 'I' is from 'pkg/front_end/testcases/inference/mixin_inference_outwards_3.dart'.
-// class /*@error=AmbiguousSupertypes*/ /*@error=AmbiguousSupertypes*/ A
-//                                                                     ^
+// class A extends Object with M0, M1<int> {}
+//       ^
 //
-// pkg/front_end/testcases/inference/mixin_inference_outwards_3.dart:15:69: Error: 'A' can't implement both 'I<dynamic>' and 'I<int>'
+// pkg/front_end/testcases/inference/mixin_inference_outwards_3.dart:13:7: Error: 'A' can't implement both 'I<dynamic>' and 'I<int>'
 //  - 'I' is from 'pkg/front_end/testcases/inference/mixin_inference_outwards_3.dart'.
-// class /*@error=AmbiguousSupertypes*/ /*@error=AmbiguousSupertypes*/ A
-//                                                                     ^
+// class A extends Object with M0, M1<int> {}
+//       ^
 //
 library;
 import self as self;
diff --git a/pkg/front_end/testcases/inference/mixin_inference_outwards_3.dart.legacy.transformed.expect b/pkg/front_end/testcases/inference/mixin_inference_outwards_3.dart.legacy.transformed.expect
index 2b7b8f2..4a8d005 100644
--- a/pkg/front_end/testcases/inference/mixin_inference_outwards_3.dart.legacy.transformed.expect
+++ b/pkg/front_end/testcases/inference/mixin_inference_outwards_3.dart.legacy.transformed.expect
@@ -1,15 +1,15 @@
 //
 // Problems in component:
 //
-// pkg/front_end/testcases/inference/mixin_inference_outwards_3.dart:15:69: Error: 'Object with M0, M1' can't implement both 'I<dynamic>' and 'I<int>'
+// pkg/front_end/testcases/inference/mixin_inference_outwards_3.dart:13:7: Error: 'Object with M0, M1' can't implement both 'I<dynamic>' and 'I<int>'
 //  - 'I' is from 'pkg/front_end/testcases/inference/mixin_inference_outwards_3.dart'.
-// class /*@error=AmbiguousSupertypes*/ /*@error=AmbiguousSupertypes*/ A
-//                                                                     ^
+// class A extends Object with M0, M1<int> {}
+//       ^
 //
-// pkg/front_end/testcases/inference/mixin_inference_outwards_3.dart:15:69: Error: 'A' can't implement both 'I<dynamic>' and 'I<int>'
+// pkg/front_end/testcases/inference/mixin_inference_outwards_3.dart:13:7: Error: 'A' can't implement both 'I<dynamic>' and 'I<int>'
 //  - 'I' is from 'pkg/front_end/testcases/inference/mixin_inference_outwards_3.dart'.
-// class /*@error=AmbiguousSupertypes*/ /*@error=AmbiguousSupertypes*/ A
-//                                                                     ^
+// class A extends Object with M0, M1<int> {}
+//       ^
 //
 library;
 import self as self;
diff --git a/pkg/front_end/testcases/inference/mixin_inference_outwards_3.dart.outline.expect b/pkg/front_end/testcases/inference/mixin_inference_outwards_3.dart.outline.expect
index 6452cea..f4273b4 100644
--- a/pkg/front_end/testcases/inference/mixin_inference_outwards_3.dart.outline.expect
+++ b/pkg/front_end/testcases/inference/mixin_inference_outwards_3.dart.outline.expect
@@ -1,15 +1,15 @@
 //
 // Problems in component:
 //
-// pkg/front_end/testcases/inference/mixin_inference_outwards_3.dart:15:69: Error: 'Object with M0, M1' can't implement both 'I<dynamic>' and 'I<int>'
+// pkg/front_end/testcases/inference/mixin_inference_outwards_3.dart:13:7: Error: 'Object with M0, M1' can't implement both 'I<dynamic>' and 'I<int>'
 //  - 'I' is from 'pkg/front_end/testcases/inference/mixin_inference_outwards_3.dart'.
-// class /*@error=AmbiguousSupertypes*/ /*@error=AmbiguousSupertypes*/ A
-//                                                                     ^
+// class A extends Object with M0, M1<int> {}
+//       ^
 //
-// pkg/front_end/testcases/inference/mixin_inference_outwards_3.dart:15:69: Error: 'A' can't implement both 'I<dynamic>' and 'I<int>'
+// pkg/front_end/testcases/inference/mixin_inference_outwards_3.dart:13:7: Error: 'A' can't implement both 'I<dynamic>' and 'I<int>'
 //  - 'I' is from 'pkg/front_end/testcases/inference/mixin_inference_outwards_3.dart'.
-// class /*@error=AmbiguousSupertypes*/ /*@error=AmbiguousSupertypes*/ A
-//                                                                     ^
+// class A extends Object with M0, M1<int> {}
+//       ^
 //
 library;
 import self as self;
diff --git a/pkg/front_end/testcases/inference/mixin_inference_outwards_3.dart.strong.expect b/pkg/front_end/testcases/inference/mixin_inference_outwards_3.dart.strong.expect
index 890adf5..0c7e099 100644
--- a/pkg/front_end/testcases/inference/mixin_inference_outwards_3.dart.strong.expect
+++ b/pkg/front_end/testcases/inference/mixin_inference_outwards_3.dart.strong.expect
@@ -1,15 +1,15 @@
 //
 // Problems in component:
 //
-// pkg/front_end/testcases/inference/mixin_inference_outwards_3.dart:15:69: Error: 'Object with M0, M1' can't implement both 'I<dynamic>' and 'I<int>'
+// pkg/front_end/testcases/inference/mixin_inference_outwards_3.dart:13:7: Error: 'Object with M0, M1' can't implement both 'I<dynamic>' and 'I<int>'
 //  - 'I' is from 'pkg/front_end/testcases/inference/mixin_inference_outwards_3.dart'.
-// class /*@error=AmbiguousSupertypes*/ /*@error=AmbiguousSupertypes*/ A
-//                                                                     ^
+// class A extends Object with M0, M1<int> {}
+//       ^
 //
-// pkg/front_end/testcases/inference/mixin_inference_outwards_3.dart:15:69: Error: 'A' can't implement both 'I<dynamic>' and 'I<int>'
+// pkg/front_end/testcases/inference/mixin_inference_outwards_3.dart:13:7: Error: 'A' can't implement both 'I<dynamic>' and 'I<int>'
 //  - 'I' is from 'pkg/front_end/testcases/inference/mixin_inference_outwards_3.dart'.
-// class /*@error=AmbiguousSupertypes*/ /*@error=AmbiguousSupertypes*/ A
-//                                                                     ^
+// class A extends Object with M0, M1<int> {}
+//       ^
 //
 library;
 import self as self;
diff --git a/pkg/front_end/testcases/inference/mixin_inference_outwards_4.dart b/pkg/front_end/testcases/inference/mixin_inference_outwards_4.dart
index 73f13f6..4f88178 100644
--- a/pkg/front_end/testcases/inference/mixin_inference_outwards_4.dart
+++ b/pkg/front_end/testcases/inference/mixin_inference_outwards_4.dart
@@ -2,8 +2,6 @@
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
 
-/*@testedFeatures=error*/
-
 class I<X> {}
 
 class M0<T> extends Object implements I<T> {}
@@ -13,8 +11,6 @@
 // M0 is inferred as M0<dynamic> (unconstrained)
 // M1 is inferred as M1<dynamic> (constrained by inferred argument to M0)
 // Error since class hierarchy is inconsistent
-class /*@error=AmbiguousSupertypes*/ A extends Object
-    with M0, M1
-    implements I<int> {}
+class A extends Object with M0, M1 implements I<int> {}
 
 main() {}
diff --git a/pkg/front_end/testcases/inference/mixin_inference_outwards_4.dart.legacy.expect b/pkg/front_end/testcases/inference/mixin_inference_outwards_4.dart.legacy.expect
index fb172cf..969931b 100644
--- a/pkg/front_end/testcases/inference/mixin_inference_outwards_4.dart.legacy.expect
+++ b/pkg/front_end/testcases/inference/mixin_inference_outwards_4.dart.legacy.expect
@@ -1,10 +1,10 @@
 //
 // Problems in component:
 //
-// pkg/front_end/testcases/inference/mixin_inference_outwards_4.dart:16:38: Error: 'A' can't implement both 'I<dynamic>' and 'I<int>'
+// pkg/front_end/testcases/inference/mixin_inference_outwards_4.dart:14:7: Error: 'A' can't implement both 'I<dynamic>' and 'I<int>'
 //  - 'I' is from 'pkg/front_end/testcases/inference/mixin_inference_outwards_4.dart'.
-// class /*@error=AmbiguousSupertypes*/ A extends Object
-//                                      ^
+// class A extends Object with M0, M1 implements I<int> {}
+//       ^
 //
 library;
 import self as self;
diff --git a/pkg/front_end/testcases/inference/mixin_inference_outwards_4.dart.legacy.transformed.expect b/pkg/front_end/testcases/inference/mixin_inference_outwards_4.dart.legacy.transformed.expect
index 17ece57..b25c51d 100644
--- a/pkg/front_end/testcases/inference/mixin_inference_outwards_4.dart.legacy.transformed.expect
+++ b/pkg/front_end/testcases/inference/mixin_inference_outwards_4.dart.legacy.transformed.expect
@@ -1,10 +1,10 @@
 //
 // Problems in component:
 //
-// pkg/front_end/testcases/inference/mixin_inference_outwards_4.dart:16:38: Error: 'A' can't implement both 'I<dynamic>' and 'I<int>'
+// pkg/front_end/testcases/inference/mixin_inference_outwards_4.dart:14:7: Error: 'A' can't implement both 'I<dynamic>' and 'I<int>'
 //  - 'I' is from 'pkg/front_end/testcases/inference/mixin_inference_outwards_4.dart'.
-// class /*@error=AmbiguousSupertypes*/ A extends Object
-//                                      ^
+// class A extends Object with M0, M1 implements I<int> {}
+//       ^
 //
 library;
 import self as self;
diff --git a/pkg/front_end/testcases/inference/mixin_inference_outwards_4.dart.outline.expect b/pkg/front_end/testcases/inference/mixin_inference_outwards_4.dart.outline.expect
index bae1a11..96a22ac 100644
--- a/pkg/front_end/testcases/inference/mixin_inference_outwards_4.dart.outline.expect
+++ b/pkg/front_end/testcases/inference/mixin_inference_outwards_4.dart.outline.expect
@@ -1,10 +1,10 @@
 //
 // Problems in component:
 //
-// pkg/front_end/testcases/inference/mixin_inference_outwards_4.dart:16:38: Error: 'A' can't implement both 'I<dynamic>' and 'I<int>'
+// pkg/front_end/testcases/inference/mixin_inference_outwards_4.dart:14:7: Error: 'A' can't implement both 'I<dynamic>' and 'I<int>'
 //  - 'I' is from 'pkg/front_end/testcases/inference/mixin_inference_outwards_4.dart'.
-// class /*@error=AmbiguousSupertypes*/ A extends Object
-//                                      ^
+// class A extends Object with M0, M1 implements I<int> {}
+//       ^
 //
 library;
 import self as self;
diff --git a/pkg/front_end/testcases/inference/mixin_inference_outwards_4.dart.strong.expect b/pkg/front_end/testcases/inference/mixin_inference_outwards_4.dart.strong.expect
index fb172cf..969931b 100644
--- a/pkg/front_end/testcases/inference/mixin_inference_outwards_4.dart.strong.expect
+++ b/pkg/front_end/testcases/inference/mixin_inference_outwards_4.dart.strong.expect
@@ -1,10 +1,10 @@
 //
 // Problems in component:
 //
-// pkg/front_end/testcases/inference/mixin_inference_outwards_4.dart:16:38: Error: 'A' can't implement both 'I<dynamic>' and 'I<int>'
+// pkg/front_end/testcases/inference/mixin_inference_outwards_4.dart:14:7: Error: 'A' can't implement both 'I<dynamic>' and 'I<int>'
 //  - 'I' is from 'pkg/front_end/testcases/inference/mixin_inference_outwards_4.dart'.
-// class /*@error=AmbiguousSupertypes*/ A extends Object
-//                                      ^
+// class A extends Object with M0, M1 implements I<int> {}
+//       ^
 //
 library;
 import self as self;
diff --git a/pkg/front_end/testcases/inference/mixin_inference_unification_1.dart b/pkg/front_end/testcases/inference/mixin_inference_unification_1.dart
index 002c659..ed6e1be 100644
--- a/pkg/front_end/testcases/inference/mixin_inference_unification_1.dart
+++ b/pkg/front_end/testcases/inference/mixin_inference_unification_1.dart
@@ -2,8 +2,6 @@
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
 
-/*@testedFeatures=error*/
-
 class I<X, Y> {}
 
 class M0<T> implements I<T, int> {}
@@ -12,7 +10,6 @@
 
 // M0 inferred as M0<String>
 // M1 inferred as M1<int>
-class /*@error=AmbiguousSupertypes*/ /*@error=AmbiguousSupertypes*/ A
-    extends Object with M0, M1 {}
+class A extends Object with M0, M1 {}
 
 main() {}
diff --git a/pkg/front_end/testcases/inference/mixin_inference_unification_1.dart.legacy.expect b/pkg/front_end/testcases/inference/mixin_inference_unification_1.dart.legacy.expect
index a776b09..59abdc5 100644
--- a/pkg/front_end/testcases/inference/mixin_inference_unification_1.dart.legacy.expect
+++ b/pkg/front_end/testcases/inference/mixin_inference_unification_1.dart.legacy.expect
@@ -1,15 +1,15 @@
 //
 // Problems in component:
 //
-// pkg/front_end/testcases/inference/mixin_inference_unification_1.dart:15:69: Error: 'Object with M0, M1' can't implement both 'I<dynamic, int>' and 'I<String, dynamic>'
+// pkg/front_end/testcases/inference/mixin_inference_unification_1.dart:13:7: Error: 'Object with M0, M1' can't implement both 'I<dynamic, int>' and 'I<String, dynamic>'
 //  - 'I' is from 'pkg/front_end/testcases/inference/mixin_inference_unification_1.dart'.
-// class /*@error=AmbiguousSupertypes*/ /*@error=AmbiguousSupertypes*/ A
-//                                                                     ^
+// class A extends Object with M0, M1 {}
+//       ^
 //
-// pkg/front_end/testcases/inference/mixin_inference_unification_1.dart:15:69: Error: 'A' can't implement both 'I<dynamic, int>' and 'I<String, dynamic>'
+// pkg/front_end/testcases/inference/mixin_inference_unification_1.dart:13:7: Error: 'A' can't implement both 'I<dynamic, int>' and 'I<String, dynamic>'
 //  - 'I' is from 'pkg/front_end/testcases/inference/mixin_inference_unification_1.dart'.
-// class /*@error=AmbiguousSupertypes*/ /*@error=AmbiguousSupertypes*/ A
-//                                                                     ^
+// class A extends Object with M0, M1 {}
+//       ^
 //
 library;
 import self as self;
diff --git a/pkg/front_end/testcases/inference/mixin_inference_unification_1.dart.legacy.transformed.expect b/pkg/front_end/testcases/inference/mixin_inference_unification_1.dart.legacy.transformed.expect
index 06aab2c..6a20389 100644
--- a/pkg/front_end/testcases/inference/mixin_inference_unification_1.dart.legacy.transformed.expect
+++ b/pkg/front_end/testcases/inference/mixin_inference_unification_1.dart.legacy.transformed.expect
@@ -1,15 +1,15 @@
 //
 // Problems in component:
 //
-// pkg/front_end/testcases/inference/mixin_inference_unification_1.dart:15:69: Error: 'Object with M0, M1' can't implement both 'I<dynamic, int>' and 'I<String, dynamic>'
+// pkg/front_end/testcases/inference/mixin_inference_unification_1.dart:13:7: Error: 'Object with M0, M1' can't implement both 'I<dynamic, int>' and 'I<String, dynamic>'
 //  - 'I' is from 'pkg/front_end/testcases/inference/mixin_inference_unification_1.dart'.
-// class /*@error=AmbiguousSupertypes*/ /*@error=AmbiguousSupertypes*/ A
-//                                                                     ^
+// class A extends Object with M0, M1 {}
+//       ^
 //
-// pkg/front_end/testcases/inference/mixin_inference_unification_1.dart:15:69: Error: 'A' can't implement both 'I<dynamic, int>' and 'I<String, dynamic>'
+// pkg/front_end/testcases/inference/mixin_inference_unification_1.dart:13:7: Error: 'A' can't implement both 'I<dynamic, int>' and 'I<String, dynamic>'
 //  - 'I' is from 'pkg/front_end/testcases/inference/mixin_inference_unification_1.dart'.
-// class /*@error=AmbiguousSupertypes*/ /*@error=AmbiguousSupertypes*/ A
-//                                                                     ^
+// class A extends Object with M0, M1 {}
+//       ^
 //
 library;
 import self as self;
diff --git a/pkg/front_end/testcases/inference/mixin_inference_unification_1.dart.outline.expect b/pkg/front_end/testcases/inference/mixin_inference_unification_1.dart.outline.expect
index ab6dd91..1858f05 100644
--- a/pkg/front_end/testcases/inference/mixin_inference_unification_1.dart.outline.expect
+++ b/pkg/front_end/testcases/inference/mixin_inference_unification_1.dart.outline.expect
@@ -1,15 +1,15 @@
 //
 // Problems in component:
 //
-// pkg/front_end/testcases/inference/mixin_inference_unification_1.dart:15:69: Error: 'Object with M0, M1' can't implement both 'I<dynamic, int>' and 'I<String, dynamic>'
+// pkg/front_end/testcases/inference/mixin_inference_unification_1.dart:13:7: Error: 'Object with M0, M1' can't implement both 'I<dynamic, int>' and 'I<String, dynamic>'
 //  - 'I' is from 'pkg/front_end/testcases/inference/mixin_inference_unification_1.dart'.
-// class /*@error=AmbiguousSupertypes*/ /*@error=AmbiguousSupertypes*/ A
-//                                                                     ^
+// class A extends Object with M0, M1 {}
+//       ^
 //
-// pkg/front_end/testcases/inference/mixin_inference_unification_1.dart:15:69: Error: 'A' can't implement both 'I<dynamic, int>' and 'I<String, dynamic>'
+// pkg/front_end/testcases/inference/mixin_inference_unification_1.dart:13:7: Error: 'A' can't implement both 'I<dynamic, int>' and 'I<String, dynamic>'
 //  - 'I' is from 'pkg/front_end/testcases/inference/mixin_inference_unification_1.dart'.
-// class /*@error=AmbiguousSupertypes*/ /*@error=AmbiguousSupertypes*/ A
-//                                                                     ^
+// class A extends Object with M0, M1 {}
+//       ^
 //
 library;
 import self as self;
diff --git a/pkg/front_end/testcases/inference/mixin_inference_unification_1.dart.strong.expect b/pkg/front_end/testcases/inference/mixin_inference_unification_1.dart.strong.expect
index a776b09..59abdc5 100644
--- a/pkg/front_end/testcases/inference/mixin_inference_unification_1.dart.strong.expect
+++ b/pkg/front_end/testcases/inference/mixin_inference_unification_1.dart.strong.expect
@@ -1,15 +1,15 @@
 //
 // Problems in component:
 //
-// pkg/front_end/testcases/inference/mixin_inference_unification_1.dart:15:69: Error: 'Object with M0, M1' can't implement both 'I<dynamic, int>' and 'I<String, dynamic>'
+// pkg/front_end/testcases/inference/mixin_inference_unification_1.dart:13:7: Error: 'Object with M0, M1' can't implement both 'I<dynamic, int>' and 'I<String, dynamic>'
 //  - 'I' is from 'pkg/front_end/testcases/inference/mixin_inference_unification_1.dart'.
-// class /*@error=AmbiguousSupertypes*/ /*@error=AmbiguousSupertypes*/ A
-//                                                                     ^
+// class A extends Object with M0, M1 {}
+//       ^
 //
-// pkg/front_end/testcases/inference/mixin_inference_unification_1.dart:15:69: Error: 'A' can't implement both 'I<dynamic, int>' and 'I<String, dynamic>'
+// pkg/front_end/testcases/inference/mixin_inference_unification_1.dart:13:7: Error: 'A' can't implement both 'I<dynamic, int>' and 'I<String, dynamic>'
 //  - 'I' is from 'pkg/front_end/testcases/inference/mixin_inference_unification_1.dart'.
-// class /*@error=AmbiguousSupertypes*/ /*@error=AmbiguousSupertypes*/ A
-//                                                                     ^
+// class A extends Object with M0, M1 {}
+//       ^
 //
 library;
 import self as self;
diff --git a/pkg/front_end/testcases/inference/mixin_inference_unification_2.dart b/pkg/front_end/testcases/inference/mixin_inference_unification_2.dart
index ecff4ec..64d4550 100644
--- a/pkg/front_end/testcases/inference/mixin_inference_unification_2.dart
+++ b/pkg/front_end/testcases/inference/mixin_inference_unification_2.dart
@@ -2,8 +2,6 @@
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
 
-/*@testedFeatures=error*/
-
 class I<X, Y> {}
 
 class M0<T> implements I<T, List<T>> {}
@@ -16,7 +14,6 @@
 // U0 = List<U1>
 // U1 = List<U0>
 // which has no finite solution
-class /*@error=AmbiguousSupertypes*/ /*@error=AmbiguousSupertypes*/ A
-    extends Object with M0, M1 {}
+class A extends Object with M0, M1 {}
 
 main() {}
diff --git a/pkg/front_end/testcases/inference/mixin_inference_unification_2.dart.legacy.expect b/pkg/front_end/testcases/inference/mixin_inference_unification_2.dart.legacy.expect
index 6e2e1ab7..1ed537d 100644
--- a/pkg/front_end/testcases/inference/mixin_inference_unification_2.dart.legacy.expect
+++ b/pkg/front_end/testcases/inference/mixin_inference_unification_2.dart.legacy.expect
@@ -1,17 +1,17 @@
 //
 // Problems in component:
 //
-// pkg/front_end/testcases/inference/mixin_inference_unification_2.dart:19:69: Error: 'Object with M0, M1' can't implement both 'I<dynamic, List<dynamic>>' and 'I<List<dynamic>, dynamic>'
+// pkg/front_end/testcases/inference/mixin_inference_unification_2.dart:17:7: Error: 'Object with M0, M1' can't implement both 'I<dynamic, List<dynamic>>' and 'I<List<dynamic>, dynamic>'
 //  - 'I' is from 'pkg/front_end/testcases/inference/mixin_inference_unification_2.dart'.
 //  - 'List' is from 'dart:core'.
-// class /*@error=AmbiguousSupertypes*/ /*@error=AmbiguousSupertypes*/ A
-//                                                                     ^
+// class A extends Object with M0, M1 {}
+//       ^
 //
-// pkg/front_end/testcases/inference/mixin_inference_unification_2.dart:19:69: Error: 'A' can't implement both 'I<dynamic, List<dynamic>>' and 'I<List<dynamic>, dynamic>'
+// pkg/front_end/testcases/inference/mixin_inference_unification_2.dart:17:7: Error: 'A' can't implement both 'I<dynamic, List<dynamic>>' and 'I<List<dynamic>, dynamic>'
 //  - 'I' is from 'pkg/front_end/testcases/inference/mixin_inference_unification_2.dart'.
 //  - 'List' is from 'dart:core'.
-// class /*@error=AmbiguousSupertypes*/ /*@error=AmbiguousSupertypes*/ A
-//                                                                     ^
+// class A extends Object with M0, M1 {}
+//       ^
 //
 library;
 import self as self;
diff --git a/pkg/front_end/testcases/inference/mixin_inference_unification_2.dart.legacy.transformed.expect b/pkg/front_end/testcases/inference/mixin_inference_unification_2.dart.legacy.transformed.expect
index da13f1a..8b678a5 100644
--- a/pkg/front_end/testcases/inference/mixin_inference_unification_2.dart.legacy.transformed.expect
+++ b/pkg/front_end/testcases/inference/mixin_inference_unification_2.dart.legacy.transformed.expect
@@ -1,17 +1,17 @@
 //
 // Problems in component:
 //
-// pkg/front_end/testcases/inference/mixin_inference_unification_2.dart:19:69: Error: 'Object with M0, M1' can't implement both 'I<dynamic, List<dynamic>>' and 'I<List<dynamic>, dynamic>'
+// pkg/front_end/testcases/inference/mixin_inference_unification_2.dart:17:7: Error: 'Object with M0, M1' can't implement both 'I<dynamic, List<dynamic>>' and 'I<List<dynamic>, dynamic>'
 //  - 'I' is from 'pkg/front_end/testcases/inference/mixin_inference_unification_2.dart'.
 //  - 'List' is from 'dart:core'.
-// class /*@error=AmbiguousSupertypes*/ /*@error=AmbiguousSupertypes*/ A
-//                                                                     ^
+// class A extends Object with M0, M1 {}
+//       ^
 //
-// pkg/front_end/testcases/inference/mixin_inference_unification_2.dart:19:69: Error: 'A' can't implement both 'I<dynamic, List<dynamic>>' and 'I<List<dynamic>, dynamic>'
+// pkg/front_end/testcases/inference/mixin_inference_unification_2.dart:17:7: Error: 'A' can't implement both 'I<dynamic, List<dynamic>>' and 'I<List<dynamic>, dynamic>'
 //  - 'I' is from 'pkg/front_end/testcases/inference/mixin_inference_unification_2.dart'.
 //  - 'List' is from 'dart:core'.
-// class /*@error=AmbiguousSupertypes*/ /*@error=AmbiguousSupertypes*/ A
-//                                                                     ^
+// class A extends Object with M0, M1 {}
+//       ^
 //
 library;
 import self as self;
diff --git a/pkg/front_end/testcases/inference/mixin_inference_unification_2.dart.outline.expect b/pkg/front_end/testcases/inference/mixin_inference_unification_2.dart.outline.expect
index 1e1142a..aa39cba 100644
--- a/pkg/front_end/testcases/inference/mixin_inference_unification_2.dart.outline.expect
+++ b/pkg/front_end/testcases/inference/mixin_inference_unification_2.dart.outline.expect
@@ -1,17 +1,17 @@
 //
 // Problems in component:
 //
-// pkg/front_end/testcases/inference/mixin_inference_unification_2.dart:19:69: Error: 'Object with M0, M1' can't implement both 'I<dynamic, List<dynamic>>' and 'I<List<dynamic>, dynamic>'
+// pkg/front_end/testcases/inference/mixin_inference_unification_2.dart:17:7: Error: 'Object with M0, M1' can't implement both 'I<dynamic, List<dynamic>>' and 'I<List<dynamic>, dynamic>'
 //  - 'I' is from 'pkg/front_end/testcases/inference/mixin_inference_unification_2.dart'.
 //  - 'List' is from 'dart:core'.
-// class /*@error=AmbiguousSupertypes*/ /*@error=AmbiguousSupertypes*/ A
-//                                                                     ^
+// class A extends Object with M0, M1 {}
+//       ^
 //
-// pkg/front_end/testcases/inference/mixin_inference_unification_2.dart:19:69: Error: 'A' can't implement both 'I<dynamic, List<dynamic>>' and 'I<List<dynamic>, dynamic>'
+// pkg/front_end/testcases/inference/mixin_inference_unification_2.dart:17:7: Error: 'A' can't implement both 'I<dynamic, List<dynamic>>' and 'I<List<dynamic>, dynamic>'
 //  - 'I' is from 'pkg/front_end/testcases/inference/mixin_inference_unification_2.dart'.
 //  - 'List' is from 'dart:core'.
-// class /*@error=AmbiguousSupertypes*/ /*@error=AmbiguousSupertypes*/ A
-//                                                                     ^
+// class A extends Object with M0, M1 {}
+//       ^
 //
 library;
 import self as self;
diff --git a/pkg/front_end/testcases/inference/mixin_inference_unification_2.dart.strong.expect b/pkg/front_end/testcases/inference/mixin_inference_unification_2.dart.strong.expect
index 6e2e1ab7..1ed537d 100644
--- a/pkg/front_end/testcases/inference/mixin_inference_unification_2.dart.strong.expect
+++ b/pkg/front_end/testcases/inference/mixin_inference_unification_2.dart.strong.expect
@@ -1,17 +1,17 @@
 //
 // Problems in component:
 //
-// pkg/front_end/testcases/inference/mixin_inference_unification_2.dart:19:69: Error: 'Object with M0, M1' can't implement both 'I<dynamic, List<dynamic>>' and 'I<List<dynamic>, dynamic>'
+// pkg/front_end/testcases/inference/mixin_inference_unification_2.dart:17:7: Error: 'Object with M0, M1' can't implement both 'I<dynamic, List<dynamic>>' and 'I<List<dynamic>, dynamic>'
 //  - 'I' is from 'pkg/front_end/testcases/inference/mixin_inference_unification_2.dart'.
 //  - 'List' is from 'dart:core'.
-// class /*@error=AmbiguousSupertypes*/ /*@error=AmbiguousSupertypes*/ A
-//                                                                     ^
+// class A extends Object with M0, M1 {}
+//       ^
 //
-// pkg/front_end/testcases/inference/mixin_inference_unification_2.dart:19:69: Error: 'A' can't implement both 'I<dynamic, List<dynamic>>' and 'I<List<dynamic>, dynamic>'
+// pkg/front_end/testcases/inference/mixin_inference_unification_2.dart:17:7: Error: 'A' can't implement both 'I<dynamic, List<dynamic>>' and 'I<List<dynamic>, dynamic>'
 //  - 'I' is from 'pkg/front_end/testcases/inference/mixin_inference_unification_2.dart'.
 //  - 'List' is from 'dart:core'.
-// class /*@error=AmbiguousSupertypes*/ /*@error=AmbiguousSupertypes*/ A
-//                                                                     ^
+// class A extends Object with M0, M1 {}
+//       ^
 //
 library;
 import self as self;
diff --git a/pkg/front_end/testcases/inference/non_inferrable_getter_setter.dart b/pkg/front_end/testcases/inference/non_inferrable_getter_setter.dart
index 919883c..f8ac0dc 100644
--- a/pkg/front_end/testcases/inference/non_inferrable_getter_setter.dart
+++ b/pkg/front_end/testcases/inference/non_inferrable_getter_setter.dart
@@ -6,8 +6,8 @@
 library test;
 
 class C {
-  get /*@topType=dynamic*/ x => null;
-  void set x(/*@topType=dynamic*/ value) {}
+  get x => null;
+  void set x(value) {}
 }
 
 main() {}
diff --git a/pkg/front_end/testcases/inference/null_literal_should_not_infer_as_bottom.dart b/pkg/front_end/testcases/inference/null_literal_should_not_infer_as_bottom.dart
index 65e1bda..2eb6926 100644
--- a/pkg/front_end/testcases/inference/null_literal_should_not_infer_as_bottom.dart
+++ b/pkg/front_end/testcases/inference/null_literal_should_not_infer_as_bottom.dart
@@ -5,7 +5,7 @@
 /*@testedFeatures=inference*/
 library test;
 
-var /*@topType=dynamic*/ h = null;
+var h = null;
 void foo(int f(Object _)) {}
 
 test() {
diff --git a/pkg/front_end/testcases/inference/null_literal_should_not_infer_as_bottom.dart.type_promotion.expect b/pkg/front_end/testcases/inference/null_literal_should_not_infer_as_bottom.dart.type_promotion.expect
index 1eed720..8eb4001 100644
--- a/pkg/front_end/testcases/inference/null_literal_should_not_infer_as_bottom.dart.type_promotion.expect
+++ b/pkg/front_end/testcases/inference/null_literal_should_not_infer_as_bottom.dart.type_promotion.expect
@@ -1,6 +1,6 @@
-pkg/front_end/testcases/inference/null_literal_should_not_infer_as_bottom.dart:15:5: Context: Write to f@369
+pkg/front_end/testcases/inference/null_literal_should_not_infer_as_bottom.dart:15:5: Context: Write to f@348
   f = /*@returnType=Null*/ (/*@type=Object*/ x) => 'hello';
     ^
-pkg/front_end/testcases/inference/null_literal_should_not_infer_as_bottom.dart:18:5: Context: Write to g@542
+pkg/front_end/testcases/inference/null_literal_should_not_infer_as_bottom.dart:18:5: Context: Write to g@521
   g = 'hello';
     ^
diff --git a/pkg/front_end/testcases/inference/property_get_toplevel.dart b/pkg/front_end/testcases/inference/property_get_toplevel.dart
index 745394e..15b76a6 100644
--- a/pkg/front_end/testcases/inference/property_get_toplevel.dart
+++ b/pkg/front_end/testcases/inference/property_get_toplevel.dart
@@ -12,8 +12,8 @@
 }
 
 C c = new C();
-var /*@topType=() -> int*/ function_ref = c. /*@target=C::function*/ function;
-var /*@topType=List<() -> int>*/ function_ref_list = /*@typeArgs=() -> int*/ [
+var function_ref = c. /*@target=C::function*/ function;
+var function_ref_list = /*@typeArgs=() -> int*/ [
   c. /*@target=C::function*/ function
 ];
 
diff --git a/pkg/front_end/testcases/inference/property_set.dart.legacy.expect b/pkg/front_end/testcases/inference/property_set.dart.legacy.expect
index 27f48700..dc17adc 100644
--- a/pkg/front_end/testcases/inference/property_set.dart.legacy.expect
+++ b/pkg/front_end/testcases/inference/property_set.dart.legacy.expect
@@ -3,11 +3,11 @@
 import "dart:core" as core;
 
 class A<T extends core::Object = dynamic> extends core::Object {
-  field core::List<self::A::T> x = null;
+  generic-covariant-impl field core::List<self::A::T> x = null;
   synthetic constructor •() → self::A<self::A::T>
     : super core::Object::•()
     ;
-  set y(core::List<self::A::T> value) → void {}
+  set y(generic-covariant-impl core::List<self::A::T> value) → void {}
 }
 static method test() → dynamic {
   self::A<core::int> a_int = new self::A::•<core::int>();
diff --git a/pkg/front_end/testcases/inference/property_set.dart.legacy.transformed.expect b/pkg/front_end/testcases/inference/property_set.dart.legacy.transformed.expect
index 27f48700..dc17adc 100644
--- a/pkg/front_end/testcases/inference/property_set.dart.legacy.transformed.expect
+++ b/pkg/front_end/testcases/inference/property_set.dart.legacy.transformed.expect
@@ -3,11 +3,11 @@
 import "dart:core" as core;
 
 class A<T extends core::Object = dynamic> extends core::Object {
-  field core::List<self::A::T> x = null;
+  generic-covariant-impl field core::List<self::A::T> x = null;
   synthetic constructor •() → self::A<self::A::T>
     : super core::Object::•()
     ;
-  set y(core::List<self::A::T> value) → void {}
+  set y(generic-covariant-impl core::List<self::A::T> value) → void {}
 }
 static method test() → dynamic {
   self::A<core::int> a_int = new self::A::•<core::int>();
diff --git a/pkg/front_end/testcases/inference/property_set.dart.outline.expect b/pkg/front_end/testcases/inference/property_set.dart.outline.expect
index f8ea57e..e1a87aa 100644
--- a/pkg/front_end/testcases/inference/property_set.dart.outline.expect
+++ b/pkg/front_end/testcases/inference/property_set.dart.outline.expect
@@ -3,10 +3,10 @@
 import "dart:core" as core;
 
 class A<T extends core::Object = dynamic> extends core::Object {
-  field core::List<self::A::T> x;
+  generic-covariant-impl field core::List<self::A::T> x;
   synthetic constructor •() → self::A<self::A::T>
     ;
-  set y(core::List<self::A::T> value) → void
+  set y(generic-covariant-impl core::List<self::A::T> value) → void
     ;
 }
 static method test() → dynamic
diff --git a/pkg/front_end/testcases/inference/reference_to_typedef.dart b/pkg/front_end/testcases/inference/reference_to_typedef.dart
index 20bd461..59ec3b8 100644
--- a/pkg/front_end/testcases/inference/reference_to_typedef.dart
+++ b/pkg/front_end/testcases/inference/reference_to_typedef.dart
@@ -6,6 +6,6 @@
 library test;
 
 typedef void F();
-final /*@topType=Type*/ x = F;
+final x = F;
 
 main() {}
diff --git a/pkg/front_end/testcases/inference/refine_binary_expression_type_type_parameter_t_double.dart.legacy.expect b/pkg/front_end/testcases/inference/refine_binary_expression_type_type_parameter_t_double.dart.legacy.expect
index 1a2885a..19bc37f 100644
--- a/pkg/front_end/testcases/inference/refine_binary_expression_type_type_parameter_t_double.dart.legacy.expect
+++ b/pkg/front_end/testcases/inference/refine_binary_expression_type_type_parameter_t_double.dart.legacy.expect
@@ -3,7 +3,7 @@
 import "dart:core" as core;
 
 class C<T extends core::num = dynamic> extends core::Object {
-  field self::C::T a = null;
+  generic-covariant-impl field self::C::T a = null;
   synthetic constructor •() → self::C<self::C::T>
     : super core::Object::•()
     ;
diff --git a/pkg/front_end/testcases/inference/refine_binary_expression_type_type_parameter_t_double.dart.legacy.transformed.expect b/pkg/front_end/testcases/inference/refine_binary_expression_type_type_parameter_t_double.dart.legacy.transformed.expect
index 1a2885a..19bc37f 100644
--- a/pkg/front_end/testcases/inference/refine_binary_expression_type_type_parameter_t_double.dart.legacy.transformed.expect
+++ b/pkg/front_end/testcases/inference/refine_binary_expression_type_type_parameter_t_double.dart.legacy.transformed.expect
@@ -3,7 +3,7 @@
 import "dart:core" as core;
 
 class C<T extends core::num = dynamic> extends core::Object {
-  field self::C::T a = null;
+  generic-covariant-impl field self::C::T a = null;
   synthetic constructor •() → self::C<self::C::T>
     : super core::Object::•()
     ;
diff --git a/pkg/front_end/testcases/inference/refine_binary_expression_type_type_parameter_t_int.dart.legacy.expect b/pkg/front_end/testcases/inference/refine_binary_expression_type_type_parameter_t_int.dart.legacy.expect
index 2582978..9c77221 100644
--- a/pkg/front_end/testcases/inference/refine_binary_expression_type_type_parameter_t_int.dart.legacy.expect
+++ b/pkg/front_end/testcases/inference/refine_binary_expression_type_type_parameter_t_int.dart.legacy.expect
@@ -3,7 +3,7 @@
 import "dart:core" as core;
 
 class C<T extends core::num = dynamic> extends core::Object {
-  field self::C::T a = null;
+  generic-covariant-impl field self::C::T a = null;
   synthetic constructor •() → self::C<self::C::T>
     : super core::Object::•()
     ;
diff --git a/pkg/front_end/testcases/inference/refine_binary_expression_type_type_parameter_t_int.dart.legacy.transformed.expect b/pkg/front_end/testcases/inference/refine_binary_expression_type_type_parameter_t_int.dart.legacy.transformed.expect
index 2582978..9c77221 100644
--- a/pkg/front_end/testcases/inference/refine_binary_expression_type_type_parameter_t_int.dart.legacy.transformed.expect
+++ b/pkg/front_end/testcases/inference/refine_binary_expression_type_type_parameter_t_int.dart.legacy.transformed.expect
@@ -3,7 +3,7 @@
 import "dart:core" as core;
 
 class C<T extends core::num = dynamic> extends core::Object {
-  field self::C::T a = null;
+  generic-covariant-impl field self::C::T a = null;
   synthetic constructor •() → self::C<self::C::T>
     : super core::Object::•()
     ;
diff --git a/pkg/front_end/testcases/inference/refine_binary_expression_type_type_parameter_t_t.dart.legacy.expect b/pkg/front_end/testcases/inference/refine_binary_expression_type_type_parameter_t_t.dart.legacy.expect
index 41053f4..b4e4156 100644
--- a/pkg/front_end/testcases/inference/refine_binary_expression_type_type_parameter_t_t.dart.legacy.expect
+++ b/pkg/front_end/testcases/inference/refine_binary_expression_type_type_parameter_t_t.dart.legacy.expect
@@ -3,16 +3,16 @@
 import "dart:core" as core;
 
 class C<T extends core::num = dynamic> extends core::Object {
-  field self::C::T a = null;
+  generic-covariant-impl field self::C::T a = null;
   synthetic constructor •() → self::C<self::C::T>
     : super core::Object::•()
     ;
-  method op(self::C::T b) → void {
+  method op(generic-covariant-impl self::C::T b) → void {
     self::C::T r1 = this.{self::C::a}.+(b);
     self::C::T r2 = this.{self::C::a}.-(b);
     self::C::T r3 = this.{self::C::a}.*(b);
   }
-  method opEq(self::C::T b) → void {
+  method opEq(generic-covariant-impl self::C::T b) → void {
     this.{self::C::a} = this.{self::C::a}.+(b);
     this.{self::C::a} = this.{self::C::a}.-(b);
     this.{self::C::a} = this.{self::C::a}.*(b);
diff --git a/pkg/front_end/testcases/inference/refine_binary_expression_type_type_parameter_t_t.dart.legacy.transformed.expect b/pkg/front_end/testcases/inference/refine_binary_expression_type_type_parameter_t_t.dart.legacy.transformed.expect
index 41053f4..b4e4156 100644
--- a/pkg/front_end/testcases/inference/refine_binary_expression_type_type_parameter_t_t.dart.legacy.transformed.expect
+++ b/pkg/front_end/testcases/inference/refine_binary_expression_type_type_parameter_t_t.dart.legacy.transformed.expect
@@ -3,16 +3,16 @@
 import "dart:core" as core;
 
 class C<T extends core::num = dynamic> extends core::Object {
-  field self::C::T a = null;
+  generic-covariant-impl field self::C::T a = null;
   synthetic constructor •() → self::C<self::C::T>
     : super core::Object::•()
     ;
-  method op(self::C::T b) → void {
+  method op(generic-covariant-impl self::C::T b) → void {
     self::C::T r1 = this.{self::C::a}.+(b);
     self::C::T r2 = this.{self::C::a}.-(b);
     self::C::T r3 = this.{self::C::a}.*(b);
   }
-  method opEq(self::C::T b) → void {
+  method opEq(generic-covariant-impl self::C::T b) → void {
     this.{self::C::a} = this.{self::C::a}.+(b);
     this.{self::C::a} = this.{self::C::a}.-(b);
     this.{self::C::a} = this.{self::C::a}.*(b);
diff --git a/pkg/front_end/testcases/inference/setter_return_type.dart b/pkg/front_end/testcases/inference/setter_return_type.dart
index 864265c..7ea8bea 100644
--- a/pkg/front_end/testcases/inference/setter_return_type.dart
+++ b/pkg/front_end/testcases/inference/setter_return_type.dart
@@ -2,7 +2,7 @@
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
 
-/*@testedFeatures=inference,error*/
+/*@testedFeatures=inference*/
 library test;
 
 class C {
@@ -14,7 +14,7 @@
 }
 
 class D extends C implements I {
-  set /*@topType=void*/ x(/*@topType=int*/ value) {}
+  set x(value) {}
 }
 
 main() {}
diff --git a/pkg/front_end/testcases/inference/simple_literal_bool.dart b/pkg/front_end/testcases/inference/simple_literal_bool.dart
index 265b08b..d1f1a07 100644
--- a/pkg/front_end/testcases/inference/simple_literal_bool.dart
+++ b/pkg/front_end/testcases/inference/simple_literal_bool.dart
@@ -5,7 +5,7 @@
 /*@testedFeatures=inference*/
 library test;
 
-var /*@topType=bool*/ a = true;
+var a = true;
 
 main() {
   var /*@type=bool*/ b = false;
diff --git a/pkg/front_end/testcases/inference/simple_literal_double.dart b/pkg/front_end/testcases/inference/simple_literal_double.dart
index ca78922..c595708 100644
--- a/pkg/front_end/testcases/inference/simple_literal_double.dart
+++ b/pkg/front_end/testcases/inference/simple_literal_double.dart
@@ -5,7 +5,7 @@
 /*@testedFeatures=inference*/
 library test;
 
-var /*@topType=double*/ a = 1.2;
+var a = 1.2;
 
 main() {
   var /*@type=double*/ b = 3.4;
diff --git a/pkg/front_end/testcases/inference/simple_literal_int.dart b/pkg/front_end/testcases/inference/simple_literal_int.dart
index c3ae42f..c01ba89 100644
--- a/pkg/front_end/testcases/inference/simple_literal_int.dart
+++ b/pkg/front_end/testcases/inference/simple_literal_int.dart
@@ -5,7 +5,7 @@
 /*@testedFeatures=inference*/
 library test;
 
-var /*@topType=int*/ a = 1;
+var a = 1;
 
 main() {
   var /*@type=int*/ b = 2;
diff --git a/pkg/front_end/testcases/inference/simple_literal_null.dart b/pkg/front_end/testcases/inference/simple_literal_null.dart
index d1652f5..6ca0f65 100644
--- a/pkg/front_end/testcases/inference/simple_literal_null.dart
+++ b/pkg/front_end/testcases/inference/simple_literal_null.dart
@@ -5,7 +5,7 @@
 /*@testedFeatures=inference*/
 library test;
 
-var /*@topType=dynamic*/ a = null;
+var a = null;
 
 main() {
   var /*@type=dynamic*/ b = null;
diff --git a/pkg/front_end/testcases/inference/static_method_tear_off.dart b/pkg/front_end/testcases/inference/static_method_tear_off.dart
index 7a8dfd9..ecd7504 100644
--- a/pkg/front_end/testcases/inference/static_method_tear_off.dart
+++ b/pkg/front_end/testcases/inference/static_method_tear_off.dart
@@ -5,7 +5,7 @@
 /*@testedFeatures=inference*/
 library test;
 
-const /*@topType=(String) -> int*/ v = C.f;
+const v = C.f;
 
 class C {
   static int f(String s) => null;
diff --git a/pkg/front_end/testcases/inference/string_literal.dart b/pkg/front_end/testcases/inference/string_literal.dart
index 8261e2b..6eb5292 100644
--- a/pkg/front_end/testcases/inference/string_literal.dart
+++ b/pkg/front_end/testcases/inference/string_literal.dart
@@ -5,10 +5,10 @@
 /*@testedFeatures=inference*/
 library test;
 
-var /*@topType=int*/ x = 1;
-var /*@topType=String*/ a = 'aaa';
-var /*@topType=String*/ b = 'b ${x} bb';
-var /*@topType=String*/ c = 'c ${x} cc' 'ccc';
+var x = 1;
+var a = 'aaa';
+var b = 'b ${x} bb';
+var c = 'c ${x} cc' 'ccc';
 
 main() {
   var /*@type=int*/ x = 1;
diff --git a/pkg/front_end/testcases/inference/super_index_set_substitution.dart.legacy.expect b/pkg/front_end/testcases/inference/super_index_set_substitution.dart.legacy.expect
index 5bbe4de..b1c6c5f 100644
--- a/pkg/front_end/testcases/inference/super_index_set_substitution.dart.legacy.expect
+++ b/pkg/front_end/testcases/inference/super_index_set_substitution.dart.legacy.expect
@@ -9,7 +9,7 @@
   synthetic constructor •() → self::B<self::B::T>
     : super core::Object::•()
     ;
-  operator []=(core::Map<core::int, self::B::T> x, core::List<self::B::T> y) → void {}
+  operator []=(generic-covariant-impl core::Map<core::int, self::B::T> x, generic-covariant-impl core::List<self::B::T> y) → void {}
 }
 class C<U extends core::Object = dynamic> extends self::B<asy::Future<self::C::U>> {
   synthetic constructor •() → self::C<self::C::U>
diff --git a/pkg/front_end/testcases/inference/super_index_set_substitution.dart.legacy.transformed.expect b/pkg/front_end/testcases/inference/super_index_set_substitution.dart.legacy.transformed.expect
index 5bbe4de..b1c6c5f 100644
--- a/pkg/front_end/testcases/inference/super_index_set_substitution.dart.legacy.transformed.expect
+++ b/pkg/front_end/testcases/inference/super_index_set_substitution.dart.legacy.transformed.expect
@@ -9,7 +9,7 @@
   synthetic constructor •() → self::B<self::B::T>
     : super core::Object::•()
     ;
-  operator []=(core::Map<core::int, self::B::T> x, core::List<self::B::T> y) → void {}
+  operator []=(generic-covariant-impl core::Map<core::int, self::B::T> x, generic-covariant-impl core::List<self::B::T> y) → void {}
 }
 class C<U extends core::Object = dynamic> extends self::B<asy::Future<self::C::U>> {
   synthetic constructor •() → self::C<self::C::U>
diff --git a/pkg/front_end/testcases/inference/super_index_set_substitution.dart.outline.expect b/pkg/front_end/testcases/inference/super_index_set_substitution.dart.outline.expect
index a7cf483..80fd653 100644
--- a/pkg/front_end/testcases/inference/super_index_set_substitution.dart.outline.expect
+++ b/pkg/front_end/testcases/inference/super_index_set_substitution.dart.outline.expect
@@ -8,7 +8,7 @@
 class B<T extends core::Object = dynamic> extends core::Object {
   synthetic constructor •() → self::B<self::B::T>
     ;
-  operator []=(core::Map<core::int, self::B::T> x, core::List<self::B::T> y) → void
+  operator []=(generic-covariant-impl core::Map<core::int, self::B::T> x, generic-covariant-impl core::List<self::B::T> y) → void
     ;
 }
 class C<U extends core::Object = dynamic> extends self::B<asy::Future<self::C::U>> {
diff --git a/pkg/front_end/testcases/inference/super_method_invocation_substitution.dart.legacy.expect b/pkg/front_end/testcases/inference/super_method_invocation_substitution.dart.legacy.expect
index b0a8223..20df3bc 100644
--- a/pkg/front_end/testcases/inference/super_method_invocation_substitution.dart.legacy.expect
+++ b/pkg/front_end/testcases/inference/super_method_invocation_substitution.dart.legacy.expect
@@ -19,7 +19,7 @@
   synthetic constructor •() → self::B<self::B::T>
     : super core::Object::•()
     ;
-  method g(self::E<self::B::T> x) → self::D<self::B::T>
+  method g(generic-covariant-impl self::E<self::B::T> x) → self::D<self::B::T>
     return null;
 }
 class C<U extends core::Object = dynamic> extends self::B<asy::Future<self::C::U>> {
diff --git a/pkg/front_end/testcases/inference/super_method_invocation_substitution.dart.legacy.transformed.expect b/pkg/front_end/testcases/inference/super_method_invocation_substitution.dart.legacy.transformed.expect
index b0a8223..20df3bc 100644
--- a/pkg/front_end/testcases/inference/super_method_invocation_substitution.dart.legacy.transformed.expect
+++ b/pkg/front_end/testcases/inference/super_method_invocation_substitution.dart.legacy.transformed.expect
@@ -19,7 +19,7 @@
   synthetic constructor •() → self::B<self::B::T>
     : super core::Object::•()
     ;
-  method g(self::E<self::B::T> x) → self::D<self::B::T>
+  method g(generic-covariant-impl self::E<self::B::T> x) → self::D<self::B::T>
     return null;
 }
 class C<U extends core::Object = dynamic> extends self::B<asy::Future<self::C::U>> {
diff --git a/pkg/front_end/testcases/inference/super_method_invocation_substitution.dart.outline.expect b/pkg/front_end/testcases/inference/super_method_invocation_substitution.dart.outline.expect
index 27eacb9..f2b99a5 100644
--- a/pkg/front_end/testcases/inference/super_method_invocation_substitution.dart.outline.expect
+++ b/pkg/front_end/testcases/inference/super_method_invocation_substitution.dart.outline.expect
@@ -16,7 +16,7 @@
 class B<T extends core::Object = dynamic> extends core::Object {
   synthetic constructor •() → self::B<self::B::T>
     ;
-  method g(self::E<self::B::T> x) → self::D<self::B::T>
+  method g(generic-covariant-impl self::E<self::B::T> x) → self::D<self::B::T>
     ;
 }
 class C<U extends core::Object = dynamic> extends self::B<asy::Future<self::C::U>> {
diff --git a/pkg/front_end/testcases/inference/super_property_get.dart b/pkg/front_end/testcases/inference/super_property_get.dart
index 75b3499..d778047 100644
--- a/pkg/front_end/testcases/inference/super_property_get.dart
+++ b/pkg/front_end/testcases/inference/super_property_get.dart
@@ -6,7 +6,7 @@
 library test;
 
 class C {
-  var /*@topType=int*/ x = 0;
+  var x = 0;
 }
 
 class D extends C {
diff --git a/pkg/front_end/testcases/inference/super_property_get_invoke_function_typed.dart b/pkg/front_end/testcases/inference/super_property_get_invoke_function_typed.dart
index 1a9fb6d..75a68da 100644
--- a/pkg/front_end/testcases/inference/super_property_get_invoke_function_typed.dart
+++ b/pkg/front_end/testcases/inference/super_property_get_invoke_function_typed.dart
@@ -6,7 +6,7 @@
 library test;
 
 class C {
-  var /*@topType=() -> int*/ f = /*@returnType=int*/ () => 0;
+  var f = /*@returnType=int*/ () => 0;
 }
 
 class D extends C {
diff --git a/pkg/front_end/testcases/inference/super_property_get_invoke_implicit_call.dart b/pkg/front_end/testcases/inference/super_property_get_invoke_implicit_call.dart
index 3de2bf8..e7d11f2 100644
--- a/pkg/front_end/testcases/inference/super_property_get_invoke_implicit_call.dart
+++ b/pkg/front_end/testcases/inference/super_property_get_invoke_implicit_call.dart
@@ -10,7 +10,7 @@
 }
 
 class C {
-  var /*@topType=CallableClass*/ f = new CallableClass();
+  var f = new CallableClass();
 }
 
 class D extends C {
diff --git a/pkg/front_end/testcases/inference/super_property_get_substitution.dart.legacy.expect b/pkg/front_end/testcases/inference/super_property_get_substitution.dart.legacy.expect
index 23680d0..fd035f1 100644
--- a/pkg/front_end/testcases/inference/super_property_get_substitution.dart.legacy.expect
+++ b/pkg/front_end/testcases/inference/super_property_get_substitution.dart.legacy.expect
@@ -16,7 +16,7 @@
     ;
 }
 class B<T extends core::Object = dynamic> extends core::Object {
-  field self::D<self::B::T> x = null;
+  generic-covariant-impl field self::D<self::B::T> x = null;
   synthetic constructor •() → self::B<self::B::T>
     : super core::Object::•()
     ;
diff --git a/pkg/front_end/testcases/inference/super_property_get_substitution.dart.legacy.transformed.expect b/pkg/front_end/testcases/inference/super_property_get_substitution.dart.legacy.transformed.expect
index 23680d0..fd035f1 100644
--- a/pkg/front_end/testcases/inference/super_property_get_substitution.dart.legacy.transformed.expect
+++ b/pkg/front_end/testcases/inference/super_property_get_substitution.dart.legacy.transformed.expect
@@ -16,7 +16,7 @@
     ;
 }
 class B<T extends core::Object = dynamic> extends core::Object {
-  field self::D<self::B::T> x = null;
+  generic-covariant-impl field self::D<self::B::T> x = null;
   synthetic constructor •() → self::B<self::B::T>
     : super core::Object::•()
     ;
diff --git a/pkg/front_end/testcases/inference/super_property_get_substitution.dart.outline.expect b/pkg/front_end/testcases/inference/super_property_get_substitution.dart.outline.expect
index bc7d92d..caa88dc 100644
--- a/pkg/front_end/testcases/inference/super_property_get_substitution.dart.outline.expect
+++ b/pkg/front_end/testcases/inference/super_property_get_substitution.dart.outline.expect
@@ -14,7 +14,7 @@
     ;
 }
 class B<T extends core::Object = dynamic> extends core::Object {
-  field self::D<self::B::T> x;
+  generic-covariant-impl field self::D<self::B::T> x;
   synthetic constructor •() → self::B<self::B::T>
     ;
 }
diff --git a/pkg/front_end/testcases/inference/super_property_set_substitution.dart.legacy.expect b/pkg/front_end/testcases/inference/super_property_set_substitution.dart.legacy.expect
index 696b98f..ae129dc 100644
--- a/pkg/front_end/testcases/inference/super_property_set_substitution.dart.legacy.expect
+++ b/pkg/front_end/testcases/inference/super_property_set_substitution.dart.legacy.expect
@@ -16,7 +16,7 @@
     ;
 }
 class B<T extends core::Object = dynamic> extends core::Object {
-  field self::D<self::B::T> x = null;
+  generic-covariant-impl field self::D<self::B::T> x = null;
   synthetic constructor •() → self::B<self::B::T>
     : super core::Object::•()
     ;
diff --git a/pkg/front_end/testcases/inference/super_property_set_substitution.dart.legacy.transformed.expect b/pkg/front_end/testcases/inference/super_property_set_substitution.dart.legacy.transformed.expect
index 696b98f..ae129dc 100644
--- a/pkg/front_end/testcases/inference/super_property_set_substitution.dart.legacy.transformed.expect
+++ b/pkg/front_end/testcases/inference/super_property_set_substitution.dart.legacy.transformed.expect
@@ -16,7 +16,7 @@
     ;
 }
 class B<T extends core::Object = dynamic> extends core::Object {
-  field self::D<self::B::T> x = null;
+  generic-covariant-impl field self::D<self::B::T> x = null;
   synthetic constructor •() → self::B<self::B::T>
     : super core::Object::•()
     ;
diff --git a/pkg/front_end/testcases/inference/super_property_set_substitution.dart.outline.expect b/pkg/front_end/testcases/inference/super_property_set_substitution.dart.outline.expect
index 886a4fd..1fa178c 100644
--- a/pkg/front_end/testcases/inference/super_property_set_substitution.dart.outline.expect
+++ b/pkg/front_end/testcases/inference/super_property_set_substitution.dart.outline.expect
@@ -14,7 +14,7 @@
     ;
 }
 class B<T extends core::Object = dynamic> extends core::Object {
-  field self::D<self::B::T> x;
+  generic-covariant-impl field self::D<self::B::T> x;
   synthetic constructor •() → self::B<self::B::T>
     ;
 }
diff --git a/pkg/front_end/testcases/inference/toplevel_inference_toplevel_var.dart b/pkg/front_end/testcases/inference/toplevel_inference_toplevel_var.dart
index 86a6ea3..80477d3 100644
--- a/pkg/front_end/testcases/inference/toplevel_inference_toplevel_var.dart
+++ b/pkg/front_end/testcases/inference/toplevel_inference_toplevel_var.dart
@@ -5,7 +5,7 @@
 /*@testedFeatures=inference*/
 library test;
 
-var /*@topType=int*/ i = 0;
+var i = 0;
 
 main() {
   var /*@type=int*/ j = i;
diff --git a/pkg/front_end/testcases/inference/type_cast.dart b/pkg/front_end/testcases/inference/type_cast.dart
index 2dd2b01..d55a1cc 100644
--- a/pkg/front_end/testcases/inference/type_cast.dart
+++ b/pkg/front_end/testcases/inference/type_cast.dart
@@ -8,11 +8,11 @@
 class A<T> {}
 
 class B<T> extends A<T> {
-  /*@topType=dynamic*/ foo() {}
+  foo() {}
 }
 
 A<num> a = new B<int>();
-var /*@topType=B<int>*/ b = (a as B<int>);
+var b = (a as B<int>);
 
 main() {
   A<num> a = new B<int>();
diff --git a/pkg/front_end/testcases/inference/unsafe_block_closure_inference_constructor_call_explicit_dynamic_param.dart b/pkg/front_end/testcases/inference/unsafe_block_closure_inference_constructor_call_explicit_dynamic_param.dart
index b8ba0e2..208b13d 100644
--- a/pkg/front_end/testcases/inference/unsafe_block_closure_inference_constructor_call_explicit_dynamic_param.dart
+++ b/pkg/front_end/testcases/inference/unsafe_block_closure_inference_constructor_call_explicit_dynamic_param.dart
@@ -9,7 +9,7 @@
   C(T x());
 }
 
-var /*@topType=C<dynamic>*/ v = new C<dynamic>(/*@returnType=int*/ () {
+var v = new C<dynamic>(/*@returnType=int*/ () {
   return 1;
 });
 
diff --git a/pkg/front_end/testcases/inference/unsafe_block_closure_inference_constructor_call_explicit_type_param.dart b/pkg/front_end/testcases/inference/unsafe_block_closure_inference_constructor_call_explicit_type_param.dart
index 6313ca1..e59070e 100644
--- a/pkg/front_end/testcases/inference/unsafe_block_closure_inference_constructor_call_explicit_type_param.dart
+++ b/pkg/front_end/testcases/inference/unsafe_block_closure_inference_constructor_call_explicit_type_param.dart
@@ -9,7 +9,7 @@
   C(T x());
 }
 
-var /*@topType=C<int>*/ v = new C<int>(/*@returnType=int*/ () {
+var v = new C<int>(/*@returnType=int*/ () {
   return 1;
 });
 
diff --git a/pkg/front_end/testcases/inference/unsafe_block_closure_inference_constructor_call_no_type_param.dart b/pkg/front_end/testcases/inference/unsafe_block_closure_inference_constructor_call_no_type_param.dart
index 6ed1ab4..0c85e2f 100644
--- a/pkg/front_end/testcases/inference/unsafe_block_closure_inference_constructor_call_no_type_param.dart
+++ b/pkg/front_end/testcases/inference/unsafe_block_closure_inference_constructor_call_no_type_param.dart
@@ -9,7 +9,7 @@
   C(x());
 }
 
-var /*@topType=C*/ v = new C(/*@returnType=int*/ () {
+var v = new C(/*@returnType=int*/ () {
   return 1;
 });
 
diff --git a/pkg/front_end/testcases/inference/unsafe_block_closure_inference_function_call_explicit_dynamic_param.dart b/pkg/front_end/testcases/inference/unsafe_block_closure_inference_function_call_explicit_dynamic_param.dart
index 27638af..72be85e 100644
--- a/pkg/front_end/testcases/inference/unsafe_block_closure_inference_function_call_explicit_dynamic_param.dart
+++ b/pkg/front_end/testcases/inference/unsafe_block_closure_inference_function_call_explicit_dynamic_param.dart
@@ -6,7 +6,7 @@
 library test;
 
 List<T> f<T>(T g()) => <T>[g()];
-var /*@topType=List<dynamic>*/ v = f<dynamic>(
+var v = f<dynamic>(
     /*@returnType=int*/ () {
   return 1;
 });
diff --git a/pkg/front_end/testcases/inference/unsafe_block_closure_inference_function_call_explicit_dynamic_param_via_expr1.dart b/pkg/front_end/testcases/inference/unsafe_block_closure_inference_function_call_explicit_dynamic_param_via_expr1.dart
index fcb3945..59c1da41 100644
--- a/pkg/front_end/testcases/inference/unsafe_block_closure_inference_function_call_explicit_dynamic_param_via_expr1.dart
+++ b/pkg/front_end/testcases/inference/unsafe_block_closure_inference_function_call_explicit_dynamic_param_via_expr1.dart
@@ -6,6 +6,8 @@
 library test;
 
 List<T> f<T>(T g()) => <T>[g()];
-var /*@topType=dynamic*/v = (f<dynamic>)(() { return 1; });
+var v = (f<dynamic>)(() {
+  return 1;
+});
 
 main() {}
diff --git a/pkg/front_end/testcases/inference/unsafe_block_closure_inference_function_call_explicit_dynamic_param_via_expr1.dart.legacy.expect b/pkg/front_end/testcases/inference/unsafe_block_closure_inference_function_call_explicit_dynamic_param_via_expr1.dart.legacy.expect
index 361c9d3..ba6541a 100644
--- a/pkg/front_end/testcases/inference/unsafe_block_closure_inference_function_call_explicit_dynamic_param_via_expr1.dart.legacy.expect
+++ b/pkg/front_end/testcases/inference/unsafe_block_closure_inference_function_call_explicit_dynamic_param_via_expr1.dart.legacy.expect
@@ -2,21 +2,21 @@
 //
 // Problems in library:
 //
-// pkg/front_end/testcases/inference/unsafe_block_closure_inference_function_call_explicit_dynamic_param_via_expr1.dart:9:39: Error: An equality expression can't be an operand of another equality expression.
+// pkg/front_end/testcases/inference/unsafe_block_closure_inference_function_call_explicit_dynamic_param_via_expr1.dart:9:19: Error: An equality expression can't be an operand of another equality expression.
 // Try re-writing the expression.
-// var /*@topType=dynamic*/v = (f<dynamic>)(() { return 1; });
-//                                       ^
+// var v = (f<dynamic>)(() {
+//                   ^
 //
-// pkg/front_end/testcases/inference/unsafe_block_closure_inference_function_call_explicit_dynamic_param_via_expr1.dart:9:40: Error: Expected an identifier, but got ')'.
-// var /*@topType=dynamic*/v = (f<dynamic>)(() { return 1; });
-//                                        ^
+// pkg/front_end/testcases/inference/unsafe_block_closure_inference_function_call_explicit_dynamic_param_via_expr1.dart:9:20: Error: Expected an identifier, but got ')'.
+// var v = (f<dynamic>)(() {
+//                    ^
 //
 import self as self;
 import "dart:core" as core;
 
-static field dynamic v = self::f.<(dynamic).>(invalid-expression "pkg/front_end/testcases/inference/unsafe_block_closure_inference_function_call_explicit_dynamic_param_via_expr1.dart:9:40: Error: This couldn't be parsed.
-var /*@topType=dynamic*/v = (f<dynamic>)(() { return 1; });
-                                       ^").call(() → dynamic {
+static field dynamic v = self::f.<(dynamic).>(invalid-expression "pkg/front_end/testcases/inference/unsafe_block_closure_inference_function_call_explicit_dynamic_param_via_expr1.dart:9:20: Error: This couldn't be parsed.
+var v = (f<dynamic>)(() {
+                   ^").call(() → dynamic {
   return 1;
 });
 static method f<T extends core::Object = dynamic>(() → self::f::T g) → core::List<self::f::T>
diff --git a/pkg/front_end/testcases/inference/unsafe_block_closure_inference_function_call_explicit_dynamic_param_via_expr1.dart.legacy.transformed.expect b/pkg/front_end/testcases/inference/unsafe_block_closure_inference_function_call_explicit_dynamic_param_via_expr1.dart.legacy.transformed.expect
index 361c9d3..ba6541a 100644
--- a/pkg/front_end/testcases/inference/unsafe_block_closure_inference_function_call_explicit_dynamic_param_via_expr1.dart.legacy.transformed.expect
+++ b/pkg/front_end/testcases/inference/unsafe_block_closure_inference_function_call_explicit_dynamic_param_via_expr1.dart.legacy.transformed.expect
@@ -2,21 +2,21 @@
 //
 // Problems in library:
 //
-// pkg/front_end/testcases/inference/unsafe_block_closure_inference_function_call_explicit_dynamic_param_via_expr1.dart:9:39: Error: An equality expression can't be an operand of another equality expression.
+// pkg/front_end/testcases/inference/unsafe_block_closure_inference_function_call_explicit_dynamic_param_via_expr1.dart:9:19: Error: An equality expression can't be an operand of another equality expression.
 // Try re-writing the expression.
-// var /*@topType=dynamic*/v = (f<dynamic>)(() { return 1; });
-//                                       ^
+// var v = (f<dynamic>)(() {
+//                   ^
 //
-// pkg/front_end/testcases/inference/unsafe_block_closure_inference_function_call_explicit_dynamic_param_via_expr1.dart:9:40: Error: Expected an identifier, but got ')'.
-// var /*@topType=dynamic*/v = (f<dynamic>)(() { return 1; });
-//                                        ^
+// pkg/front_end/testcases/inference/unsafe_block_closure_inference_function_call_explicit_dynamic_param_via_expr1.dart:9:20: Error: Expected an identifier, but got ')'.
+// var v = (f<dynamic>)(() {
+//                    ^
 //
 import self as self;
 import "dart:core" as core;
 
-static field dynamic v = self::f.<(dynamic).>(invalid-expression "pkg/front_end/testcases/inference/unsafe_block_closure_inference_function_call_explicit_dynamic_param_via_expr1.dart:9:40: Error: This couldn't be parsed.
-var /*@topType=dynamic*/v = (f<dynamic>)(() { return 1; });
-                                       ^").call(() → dynamic {
+static field dynamic v = self::f.<(dynamic).>(invalid-expression "pkg/front_end/testcases/inference/unsafe_block_closure_inference_function_call_explicit_dynamic_param_via_expr1.dart:9:20: Error: This couldn't be parsed.
+var v = (f<dynamic>)(() {
+                   ^").call(() → dynamic {
   return 1;
 });
 static method f<T extends core::Object = dynamic>(() → self::f::T g) → core::List<self::f::T>
diff --git a/pkg/front_end/testcases/inference/unsafe_block_closure_inference_function_call_explicit_dynamic_param_via_expr1.dart.outline.expect b/pkg/front_end/testcases/inference/unsafe_block_closure_inference_function_call_explicit_dynamic_param_via_expr1.dart.outline.expect
index 58e5d4b..48a0717 100644
--- a/pkg/front_end/testcases/inference/unsafe_block_closure_inference_function_call_explicit_dynamic_param_via_expr1.dart.outline.expect
+++ b/pkg/front_end/testcases/inference/unsafe_block_closure_inference_function_call_explicit_dynamic_param_via_expr1.dart.outline.expect
@@ -2,14 +2,14 @@
 //
 // Problems in library:
 //
-// pkg/front_end/testcases/inference/unsafe_block_closure_inference_function_call_explicit_dynamic_param_via_expr1.dart:9:39: Error: An equality expression can't be an operand of another equality expression.
+// pkg/front_end/testcases/inference/unsafe_block_closure_inference_function_call_explicit_dynamic_param_via_expr1.dart:9:19: Error: An equality expression can't be an operand of another equality expression.
 // Try re-writing the expression.
-// var /*@topType=dynamic*/v = (f<dynamic>)(() { return 1; });
-//                                       ^
+// var v = (f<dynamic>)(() {
+//                   ^
 //
-// pkg/front_end/testcases/inference/unsafe_block_closure_inference_function_call_explicit_dynamic_param_via_expr1.dart:9:40: Error: Expected an identifier, but got ')'.
-// var /*@topType=dynamic*/v = (f<dynamic>)(() { return 1; });
-//                                        ^
+// pkg/front_end/testcases/inference/unsafe_block_closure_inference_function_call_explicit_dynamic_param_via_expr1.dart:9:20: Error: Expected an identifier, but got ')'.
+// var v = (f<dynamic>)(() {
+//                    ^
 //
 import self as self;
 import "dart:core" as core;
diff --git a/pkg/front_end/testcases/inference/unsafe_block_closure_inference_function_call_explicit_dynamic_param_via_expr2.dart b/pkg/front_end/testcases/inference/unsafe_block_closure_inference_function_call_explicit_dynamic_param_via_expr2.dart
index 90d0037..0a3a0e2 100644
--- a/pkg/front_end/testcases/inference/unsafe_block_closure_inference_function_call_explicit_dynamic_param_via_expr2.dart
+++ b/pkg/front_end/testcases/inference/unsafe_block_closure_inference_function_call_explicit_dynamic_param_via_expr2.dart
@@ -6,8 +6,7 @@
 library test;
 
 List<T> f<T>(T g()) => <T>[g()];
-var /*@topType=dynamic*/ v =
-    (f)<dynamic>(/*info:INFERRED_TYPE_CLOSURE*/ /*@returnType=int*/ () {
+var v = (f)<dynamic>(/*info:INFERRED_TYPE_CLOSURE*/ /*@returnType=int*/ () {
   return 1;
 });
 
diff --git a/pkg/front_end/testcases/inference/unsafe_block_closure_inference_function_call_explicit_dynamic_param_via_expr2.dart.strong.expect b/pkg/front_end/testcases/inference/unsafe_block_closure_inference_function_call_explicit_dynamic_param_via_expr2.dart.strong.expect
new file mode 100644
index 0000000..a43bff6
--- /dev/null
+++ b/pkg/front_end/testcases/inference/unsafe_block_closure_inference_function_call_explicit_dynamic_param_via_expr2.dart.strong.expect
@@ -0,0 +1,12 @@
+library test;
+import self as self;
+import "dart:core" as core;
+
+static field core::List<dynamic> v = self::f.call<dynamic>(() → core::int {
+  return 1;
+});
+static method f<T extends core::Object = dynamic>(() → self::f::T g) → core::List<self::f::T>
+  return <self::f::T>[g.call()];
+static method main() → dynamic {
+  self::v;
+}
diff --git a/pkg/front_end/testcases/inference/unsafe_block_closure_inference_function_call_explicit_dynamic_param_via_expr2.dart.strong.transformed.expect b/pkg/front_end/testcases/inference/unsafe_block_closure_inference_function_call_explicit_dynamic_param_via_expr2.dart.strong.transformed.expect
new file mode 100644
index 0000000..a43bff6
--- /dev/null
+++ b/pkg/front_end/testcases/inference/unsafe_block_closure_inference_function_call_explicit_dynamic_param_via_expr2.dart.strong.transformed.expect
@@ -0,0 +1,12 @@
+library test;
+import self as self;
+import "dart:core" as core;
+
+static field core::List<dynamic> v = self::f.call<dynamic>(() → core::int {
+  return 1;
+});
+static method f<T extends core::Object = dynamic>(() → self::f::T g) → core::List<self::f::T>
+  return <self::f::T>[g.call()];
+static method main() → dynamic {
+  self::v;
+}
diff --git a/pkg/front_end/testcases/inference/unsafe_block_closure_inference_function_call_explicit_type_param.dart b/pkg/front_end/testcases/inference/unsafe_block_closure_inference_function_call_explicit_type_param.dart
index cd0d3ba..d332d12 100644
--- a/pkg/front_end/testcases/inference/unsafe_block_closure_inference_function_call_explicit_type_param.dart
+++ b/pkg/front_end/testcases/inference/unsafe_block_closure_inference_function_call_explicit_type_param.dart
@@ -6,7 +6,7 @@
 library test;
 
 List<T> f<T>(T g()) => <T>[g()];
-var /*@topType=List<int>*/ v = f<int>(/*@returnType=int*/ () {
+var v = f<int>(/*@returnType=int*/ () {
   return 1;
 });
 
diff --git a/pkg/front_end/testcases/inference/unsafe_block_closure_inference_function_call_explicit_type_param_via_expr1.dart b/pkg/front_end/testcases/inference/unsafe_block_closure_inference_function_call_explicit_type_param_via_expr1.dart
index 761fe2a..b24960b 100644
--- a/pkg/front_end/testcases/inference/unsafe_block_closure_inference_function_call_explicit_type_param_via_expr1.dart
+++ b/pkg/front_end/testcases/inference/unsafe_block_closure_inference_function_call_explicit_type_param_via_expr1.dart
@@ -6,6 +6,8 @@
 library test;
 
 List<T> f<T>(T g()) => <T>[g()];
-var /*@topType=dynamic*/v = (f<int>)(() { return 1; });
+var v = (f<int>)(() {
+  return 1;
+});
 
 main() {}
diff --git a/pkg/front_end/testcases/inference/unsafe_block_closure_inference_function_call_explicit_type_param_via_expr1.dart.legacy.expect b/pkg/front_end/testcases/inference/unsafe_block_closure_inference_function_call_explicit_type_param_via_expr1.dart.legacy.expect
index 4492f7c..27f915d 100644
--- a/pkg/front_end/testcases/inference/unsafe_block_closure_inference_function_call_explicit_type_param_via_expr1.dart.legacy.expect
+++ b/pkg/front_end/testcases/inference/unsafe_block_closure_inference_function_call_explicit_type_param_via_expr1.dart.legacy.expect
@@ -2,21 +2,21 @@
 //
 // Problems in library:
 //
-// pkg/front_end/testcases/inference/unsafe_block_closure_inference_function_call_explicit_type_param_via_expr1.dart:9:35: Error: An equality expression can't be an operand of another equality expression.
+// pkg/front_end/testcases/inference/unsafe_block_closure_inference_function_call_explicit_type_param_via_expr1.dart:9:15: Error: An equality expression can't be an operand of another equality expression.
 // Try re-writing the expression.
-// var /*@topType=dynamic*/v = (f<int>)(() { return 1; });
-//                                   ^
+// var v = (f<int>)(() {
+//               ^
 //
-// pkg/front_end/testcases/inference/unsafe_block_closure_inference_function_call_explicit_type_param_via_expr1.dart:9:36: Error: Expected an identifier, but got ')'.
-// var /*@topType=dynamic*/v = (f<int>)(() { return 1; });
-//                                    ^
+// pkg/front_end/testcases/inference/unsafe_block_closure_inference_function_call_explicit_type_param_via_expr1.dart:9:16: Error: Expected an identifier, but got ')'.
+// var v = (f<int>)(() {
+//                ^
 //
 import self as self;
 import "dart:core" as core;
 
-static field dynamic v = self::f.<(core::int).>(invalid-expression "pkg/front_end/testcases/inference/unsafe_block_closure_inference_function_call_explicit_type_param_via_expr1.dart:9:36: Error: This couldn't be parsed.
-var /*@topType=dynamic*/v = (f<int>)(() { return 1; });
-                                   ^").call(() → dynamic {
+static field dynamic v = self::f.<(core::int).>(invalid-expression "pkg/front_end/testcases/inference/unsafe_block_closure_inference_function_call_explicit_type_param_via_expr1.dart:9:16: Error: This couldn't be parsed.
+var v = (f<int>)(() {
+               ^").call(() → dynamic {
   return 1;
 });
 static method f<T extends core::Object = dynamic>(() → self::f::T g) → core::List<self::f::T>
diff --git a/pkg/front_end/testcases/inference/unsafe_block_closure_inference_function_call_explicit_type_param_via_expr1.dart.legacy.transformed.expect b/pkg/front_end/testcases/inference/unsafe_block_closure_inference_function_call_explicit_type_param_via_expr1.dart.legacy.transformed.expect
index 4492f7c..27f915d 100644
--- a/pkg/front_end/testcases/inference/unsafe_block_closure_inference_function_call_explicit_type_param_via_expr1.dart.legacy.transformed.expect
+++ b/pkg/front_end/testcases/inference/unsafe_block_closure_inference_function_call_explicit_type_param_via_expr1.dart.legacy.transformed.expect
@@ -2,21 +2,21 @@
 //
 // Problems in library:
 //
-// pkg/front_end/testcases/inference/unsafe_block_closure_inference_function_call_explicit_type_param_via_expr1.dart:9:35: Error: An equality expression can't be an operand of another equality expression.
+// pkg/front_end/testcases/inference/unsafe_block_closure_inference_function_call_explicit_type_param_via_expr1.dart:9:15: Error: An equality expression can't be an operand of another equality expression.
 // Try re-writing the expression.
-// var /*@topType=dynamic*/v = (f<int>)(() { return 1; });
-//                                   ^
+// var v = (f<int>)(() {
+//               ^
 //
-// pkg/front_end/testcases/inference/unsafe_block_closure_inference_function_call_explicit_type_param_via_expr1.dart:9:36: Error: Expected an identifier, but got ')'.
-// var /*@topType=dynamic*/v = (f<int>)(() { return 1; });
-//                                    ^
+// pkg/front_end/testcases/inference/unsafe_block_closure_inference_function_call_explicit_type_param_via_expr1.dart:9:16: Error: Expected an identifier, but got ')'.
+// var v = (f<int>)(() {
+//                ^
 //
 import self as self;
 import "dart:core" as core;
 
-static field dynamic v = self::f.<(core::int).>(invalid-expression "pkg/front_end/testcases/inference/unsafe_block_closure_inference_function_call_explicit_type_param_via_expr1.dart:9:36: Error: This couldn't be parsed.
-var /*@topType=dynamic*/v = (f<int>)(() { return 1; });
-                                   ^").call(() → dynamic {
+static field dynamic v = self::f.<(core::int).>(invalid-expression "pkg/front_end/testcases/inference/unsafe_block_closure_inference_function_call_explicit_type_param_via_expr1.dart:9:16: Error: This couldn't be parsed.
+var v = (f<int>)(() {
+               ^").call(() → dynamic {
   return 1;
 });
 static method f<T extends core::Object = dynamic>(() → self::f::T g) → core::List<self::f::T>
diff --git a/pkg/front_end/testcases/inference/unsafe_block_closure_inference_function_call_explicit_type_param_via_expr1.dart.outline.expect b/pkg/front_end/testcases/inference/unsafe_block_closure_inference_function_call_explicit_type_param_via_expr1.dart.outline.expect
index 6f5ce50..babb86c 100644
--- a/pkg/front_end/testcases/inference/unsafe_block_closure_inference_function_call_explicit_type_param_via_expr1.dart.outline.expect
+++ b/pkg/front_end/testcases/inference/unsafe_block_closure_inference_function_call_explicit_type_param_via_expr1.dart.outline.expect
@@ -2,14 +2,14 @@
 //
 // Problems in library:
 //
-// pkg/front_end/testcases/inference/unsafe_block_closure_inference_function_call_explicit_type_param_via_expr1.dart:9:35: Error: An equality expression can't be an operand of another equality expression.
+// pkg/front_end/testcases/inference/unsafe_block_closure_inference_function_call_explicit_type_param_via_expr1.dart:9:15: Error: An equality expression can't be an operand of another equality expression.
 // Try re-writing the expression.
-// var /*@topType=dynamic*/v = (f<int>)(() { return 1; });
-//                                   ^
+// var v = (f<int>)(() {
+//               ^
 //
-// pkg/front_end/testcases/inference/unsafe_block_closure_inference_function_call_explicit_type_param_via_expr1.dart:9:36: Error: Expected an identifier, but got ')'.
-// var /*@topType=dynamic*/v = (f<int>)(() { return 1; });
-//                                    ^
+// pkg/front_end/testcases/inference/unsafe_block_closure_inference_function_call_explicit_type_param_via_expr1.dart:9:16: Error: Expected an identifier, but got ')'.
+// var v = (f<int>)(() {
+//                ^
 //
 import self as self;
 import "dart:core" as core;
diff --git a/pkg/front_end/testcases/inference/unsafe_block_closure_inference_function_call_explicit_type_param_via_expr2.dart b/pkg/front_end/testcases/inference/unsafe_block_closure_inference_function_call_explicit_type_param_via_expr2.dart
index d9bf6c6..f8ab111 100644
--- a/pkg/front_end/testcases/inference/unsafe_block_closure_inference_function_call_explicit_type_param_via_expr2.dart
+++ b/pkg/front_end/testcases/inference/unsafe_block_closure_inference_function_call_explicit_type_param_via_expr2.dart
@@ -6,8 +6,7 @@
 library test;
 
 List<T> f<T>(T g()) => <T>[g()];
-var /*@topType=dynamic*/ v =
-    (f)<int>(/*info:INFERRED_TYPE_CLOSURE*/ /*@returnType=int*/ () {
+var v = (f)<int>(/*info:INFERRED_TYPE_CLOSURE*/ /*@returnType=int*/ () {
   return 1;
 });
 
diff --git a/pkg/front_end/testcases/inference/unsafe_block_closure_inference_function_call_explicit_type_param_via_expr2.dart.strong.expect b/pkg/front_end/testcases/inference/unsafe_block_closure_inference_function_call_explicit_type_param_via_expr2.dart.strong.expect
new file mode 100644
index 0000000..cd480b4
--- /dev/null
+++ b/pkg/front_end/testcases/inference/unsafe_block_closure_inference_function_call_explicit_type_param_via_expr2.dart.strong.expect
@@ -0,0 +1,12 @@
+library test;
+import self as self;
+import "dart:core" as core;
+
+static field core::List<core::int> v = self::f.call<core::int>(() → core::int {
+  return 1;
+});
+static method f<T extends core::Object = dynamic>(() → self::f::T g) → core::List<self::f::T>
+  return <self::f::T>[g.call()];
+static method main() → dynamic {
+  self::v;
+}
diff --git a/pkg/front_end/testcases/inference/unsafe_block_closure_inference_function_call_explicit_type_param_via_expr2.dart.strong.transformed.expect b/pkg/front_end/testcases/inference/unsafe_block_closure_inference_function_call_explicit_type_param_via_expr2.dart.strong.transformed.expect
new file mode 100644
index 0000000..cd480b4
--- /dev/null
+++ b/pkg/front_end/testcases/inference/unsafe_block_closure_inference_function_call_explicit_type_param_via_expr2.dart.strong.transformed.expect
@@ -0,0 +1,12 @@
+library test;
+import self as self;
+import "dart:core" as core;
+
+static field core::List<core::int> v = self::f.call<core::int>(() → core::int {
+  return 1;
+});
+static method f<T extends core::Object = dynamic>(() → self::f::T g) → core::List<self::f::T>
+  return <self::f::T>[g.call()];
+static method main() → dynamic {
+  self::v;
+}
diff --git a/pkg/front_end/testcases/inference/unsafe_block_closure_inference_method_call_no_type_param.dart b/pkg/front_end/testcases/inference/unsafe_block_closure_inference_method_call_no_type_param.dart
index 366bc8c..45e2995 100644
--- a/pkg/front_end/testcases/inference/unsafe_block_closure_inference_method_call_no_type_param.dart
+++ b/pkg/front_end/testcases/inference/unsafe_block_closure_inference_method_call_no_type_param.dart
@@ -6,10 +6,10 @@
 library test;
 
 class C {
-  double f(/*@topType=dynamic*/ x) => 1.0;
+  double f(x) => 1.0;
 }
 
-var /*@topType=double*/ v = new C(). /*@target=C::f*/ f(/*@returnType=int*/ () {
+var v = new C(). /*@target=C::f*/ f(/*@returnType=int*/ () {
   return 1;
 });
 
diff --git a/pkg/front_end/testcases/inference/void_return_type_subtypes_dynamic.dart b/pkg/front_end/testcases/inference/void_return_type_subtypes_dynamic.dart
index bc4dbaf..6e49f44 100644
--- a/pkg/front_end/testcases/inference/void_return_type_subtypes_dynamic.dart
+++ b/pkg/front_end/testcases/inference/void_return_type_subtypes_dynamic.dart
@@ -16,7 +16,7 @@
   print("running");
 }
 
-var /*@topType=dynamic*/ x = run<dynamic>(printRunning);
+var x = run<dynamic>(printRunning);
 
 main() {
   void printRunning() {
diff --git a/pkg/front_end/testcases/inference/void_return_type_subtypes_dynamic.dart.type_promotion.expect b/pkg/front_end/testcases/inference/void_return_type_subtypes_dynamic.dart.type_promotion.expect
index 96232fc..0c4ff5c 100644
--- a/pkg/front_end/testcases/inference/void_return_type_subtypes_dynamic.dart.type_promotion.expect
+++ b/pkg/front_end/testcases/inference/void_return_type_subtypes_dynamic.dart.type_promotion.expect
@@ -1,12 +1,12 @@
-pkg/front_end/testcases/inference/void_return_type_subtypes_dynamic.dart:29:5: Context: Write to x@559
+pkg/front_end/testcases/inference/void_return_type_subtypes_dynamic.dart:29:5: Context: Write to x@538
   x = 123;
     ^
-pkg/front_end/testcases/inference/void_return_type_subtypes_dynamic.dart:30:5: Context: Write to x@559
+pkg/front_end/testcases/inference/void_return_type_subtypes_dynamic.dart:30:5: Context: Write to x@538
   x = 'hi';
     ^
-pkg/front_end/testcases/inference/void_return_type_subtypes_dynamic.dart:31:5: Context: Write to y@612
+pkg/front_end/testcases/inference/void_return_type_subtypes_dynamic.dart:31:5: Context: Write to y@591
   y = /*error:INVALID_ASSIGNMENT*/ 123;
     ^
-pkg/front_end/testcases/inference/void_return_type_subtypes_dynamic.dart:32:5: Context: Write to y@612
+pkg/front_end/testcases/inference/void_return_type_subtypes_dynamic.dart:32:5: Context: Write to y@591
   y = /*error:INVALID_ASSIGNMENT*/ 'hi';
     ^
diff --git a/pkg/front_end/testcases/inference_new/dependency_only_if_generic_method.dart b/pkg/front_end/testcases/inference_new/dependency_only_if_generic_method.dart
index 68d91d1..5d9af14 100644
--- a/pkg/front_end/testcases/inference_new/dependency_only_if_generic_method.dart
+++ b/pkg/front_end/testcases/inference_new/dependency_only_if_generic_method.dart
@@ -2,7 +2,7 @@
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
 
-/*@testedFeatures=inference,error*/
+/*@testedFeatures=inference*/
 library test;
 
 class A {
@@ -10,22 +10,21 @@
   int g(dynamic i) => 0;
 }
 
-var /*@topType=A*/ a = new A();
+var a = new A();
 
 // There's a circularity between b and c because a.f is generic, so the type of
 // c is required to infer b, and vice versa.
 
-var /*@topType=dynamic*/ /*@error=CantInferTypeDueToCircularity*/ b = /*@returnType=dynamic*/ () =>
-    a. /*@typeArgs=dynamic*/ /*@target=A::f*/ f(c);
-var /*@topType=dynamic*/ /*@error=CantInferTypeDueToCircularity*/ c = /*@returnType=dynamic*/ () =>
-    a. /*@typeArgs=dynamic*/ /*@target=A::f*/ f(b);
+var b = /*@returnType=invalid-type*/ () =>
+    a. /*@typeArgs=invalid-type*/ /*@target=A::f*/ f(c);
+var c = /*@returnType=invalid-type*/ () =>
+    a. /*@typeArgs=invalid-type*/ /*@target=A::f*/ f(b);
 
 // e's use of a.g breaks the circularity, because a.g is not generic, therefore
 // the type of e does not depend on the type of d.
 
-var /*@topType=() -> () -> int*/ d = /*@returnType=() -> int*/ () =>
+var d = /*@returnType=() -> int*/ () =>
     a. /*@typeArgs=() -> int*/ /*@target=A::f*/ f(e);
-var /*@topType=() -> int*/ e = /*@returnType=int*/ () =>
-    a. /*@target=A::g*/ g(d);
+var e = /*@returnType=int*/ () => a. /*@target=A::g*/ g(d);
 
 main() {}
diff --git a/pkg/front_end/testcases/inference_new/dependency_only_if_generic_method.dart.strong.expect b/pkg/front_end/testcases/inference_new/dependency_only_if_generic_method.dart.strong.expect
index 637a638..1681eb9 100644
--- a/pkg/front_end/testcases/inference_new/dependency_only_if_generic_method.dart.strong.expect
+++ b/pkg/front_end/testcases/inference_new/dependency_only_if_generic_method.dart.strong.expect
@@ -2,15 +2,15 @@
 //
 // Problems in library:
 //
-// pkg/front_end/testcases/inference_new/dependency_only_if_generic_method.dart:20:67: Error: Can't infer the type of 'c': circularity found during type inference.
+// pkg/front_end/testcases/inference_new/dependency_only_if_generic_method.dart:20:5: Error: Can't infer the type of 'c': circularity found during type inference.
 // Specify the type explicitly.
-// var /*@topType=dynamic*/ /*@error=CantInferTypeDueToCircularity*/ c = /*@returnType=dynamic*/ () =>
-//                                                                   ^
+// var c = /*@returnType=invalid-type*/ () =>
+//     ^
 //
-// pkg/front_end/testcases/inference_new/dependency_only_if_generic_method.dart:18:67: Error: Can't infer the type of 'b': circularity found during type inference.
+// pkg/front_end/testcases/inference_new/dependency_only_if_generic_method.dart:18:5: Error: Can't infer the type of 'b': circularity found during type inference.
 // Specify the type explicitly.
-// var /*@topType=dynamic*/ /*@error=CantInferTypeDueToCircularity*/ b = /*@returnType=dynamic*/ () =>
-//                                                                   ^
+// var b = /*@returnType=invalid-type*/ () =>
+//     ^
 //
 import self as self;
 import "dart:core" as core;
@@ -25,8 +25,8 @@
     return 0;
 }
 static field self::A a = new self::A::•();
-static field dynamic b = () → dynamic => self::a.{self::A::f}<dynamic>(self::c);
-static field dynamic c = () → dynamic => self::a.{self::A::f}<dynamic>(self::b);
+static field invalid-type b = (() → invalid-type => self::a.{self::A::f}<invalid-type>(self::c)) as{TypeError} invalid-type;
+static field invalid-type c = (() → invalid-type => self::a.{self::A::f}<invalid-type>(self::b)) as{TypeError} invalid-type;
 static field () → () → core::int d = () → () → core::int => self::a.{self::A::f}<() → core::int>(self::e);
 static field () → core::int e = () → core::int => self::a.{self::A::g}(self::d);
 static method main() → dynamic {}
diff --git a/pkg/front_end/testcases/inference_new/dependency_only_if_generic_method.dart.strong.transformed.expect b/pkg/front_end/testcases/inference_new/dependency_only_if_generic_method.dart.strong.transformed.expect
index 637a638..1681eb9 100644
--- a/pkg/front_end/testcases/inference_new/dependency_only_if_generic_method.dart.strong.transformed.expect
+++ b/pkg/front_end/testcases/inference_new/dependency_only_if_generic_method.dart.strong.transformed.expect
@@ -2,15 +2,15 @@
 //
 // Problems in library:
 //
-// pkg/front_end/testcases/inference_new/dependency_only_if_generic_method.dart:20:67: Error: Can't infer the type of 'c': circularity found during type inference.
+// pkg/front_end/testcases/inference_new/dependency_only_if_generic_method.dart:20:5: Error: Can't infer the type of 'c': circularity found during type inference.
 // Specify the type explicitly.
-// var /*@topType=dynamic*/ /*@error=CantInferTypeDueToCircularity*/ c = /*@returnType=dynamic*/ () =>
-//                                                                   ^
+// var c = /*@returnType=invalid-type*/ () =>
+//     ^
 //
-// pkg/front_end/testcases/inference_new/dependency_only_if_generic_method.dart:18:67: Error: Can't infer the type of 'b': circularity found during type inference.
+// pkg/front_end/testcases/inference_new/dependency_only_if_generic_method.dart:18:5: Error: Can't infer the type of 'b': circularity found during type inference.
 // Specify the type explicitly.
-// var /*@topType=dynamic*/ /*@error=CantInferTypeDueToCircularity*/ b = /*@returnType=dynamic*/ () =>
-//                                                                   ^
+// var b = /*@returnType=invalid-type*/ () =>
+//     ^
 //
 import self as self;
 import "dart:core" as core;
@@ -25,8 +25,8 @@
     return 0;
 }
 static field self::A a = new self::A::•();
-static field dynamic b = () → dynamic => self::a.{self::A::f}<dynamic>(self::c);
-static field dynamic c = () → dynamic => self::a.{self::A::f}<dynamic>(self::b);
+static field invalid-type b = (() → invalid-type => self::a.{self::A::f}<invalid-type>(self::c)) as{TypeError} invalid-type;
+static field invalid-type c = (() → invalid-type => self::a.{self::A::f}<invalid-type>(self::b)) as{TypeError} invalid-type;
 static field () → () → core::int d = () → () → core::int => self::a.{self::A::f}<() → core::int>(self::e);
 static field () → core::int e = () → core::int => self::a.{self::A::g}(self::d);
 static method main() → dynamic {}
diff --git a/pkg/front_end/testcases/inference_new/dependency_only_if_overloaded.dart b/pkg/front_end/testcases/inference_new/dependency_only_if_overloaded.dart
index 0c3cd9b..1880cfe 100644
--- a/pkg/front_end/testcases/inference_new/dependency_only_if_overloaded.dart
+++ b/pkg/front_end/testcases/inference_new/dependency_only_if_overloaded.dart
@@ -2,7 +2,7 @@
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
 
-/*@testedFeatures=inference,error*/
+/*@testedFeatures=inference*/
 library test;
 
 int intValue = 0;
@@ -12,21 +12,18 @@
 // There's a circularity between a and b because the type of `int + x` depends
 // on the type of x.
 
-var /*@topType=dynamic*/ /*@error=CantInferTypeDueToCircularity*/ a = /*@returnType=num*/ () =>
-    intValue /*@target=num::+*/ + b;
-var /*@topType=dynamic*/ /*@error=CantInferTypeDueToCircularity*/ b = a();
+var a = /*@returnType=num*/ () => intValue /*@target=num::+*/ + b;
+var b = a();
 
 // But there's no circularity between c and d because the type of `num + x` is
 // always num.
 
-var /*@topType=() -> num*/ c = /*@returnType=num*/ () =>
-    numValue /*@target=num::+*/ + d;
-var /*@topType=num*/ d = c();
+var c = /*@returnType=num*/ () => numValue /*@target=num::+*/ + d;
+var d = c();
 
 // Similar for double.
 
-var /*@topType=() -> double*/ e = /*@returnType=double*/ () =>
-    doubleValue /*@target=double::+*/ + f;
-var /*@topType=double*/ f = e();
+var e = /*@returnType=double*/ () => doubleValue /*@target=double::+*/ + f;
+var f = e();
 
 main() {}
diff --git a/pkg/front_end/testcases/inference_new/dependency_only_if_overloaded.dart.strong.expect b/pkg/front_end/testcases/inference_new/dependency_only_if_overloaded.dart.strong.expect
index d2d6d0d..f2657ee 100644
--- a/pkg/front_end/testcases/inference_new/dependency_only_if_overloaded.dart.strong.expect
+++ b/pkg/front_end/testcases/inference_new/dependency_only_if_overloaded.dart.strong.expect
@@ -2,15 +2,15 @@
 //
 // Problems in library:
 //
-// pkg/front_end/testcases/inference_new/dependency_only_if_overloaded.dart:17:67: Error: Can't infer the type of 'b': circularity found during type inference.
+// pkg/front_end/testcases/inference_new/dependency_only_if_overloaded.dart:16:5: Error: Can't infer the type of 'b': circularity found during type inference.
 // Specify the type explicitly.
-// var /*@topType=dynamic*/ /*@error=CantInferTypeDueToCircularity*/ b = a();
-//                                                                   ^
+// var b = a();
+//     ^
 //
-// pkg/front_end/testcases/inference_new/dependency_only_if_overloaded.dart:15:67: Error: Can't infer the type of 'a': circularity found during type inference.
+// pkg/front_end/testcases/inference_new/dependency_only_if_overloaded.dart:15:5: Error: Can't infer the type of 'a': circularity found during type inference.
 // Specify the type explicitly.
-// var /*@topType=dynamic*/ /*@error=CantInferTypeDueToCircularity*/ a = /*@returnType=num*/ () =>
-//                                                                   ^
+// var a = /*@returnType=num*/ () => intValue /*@target=num::+*/ + b;
+//     ^
 //
 import self as self;
 import "dart:core" as core;
@@ -18,8 +18,8 @@
 static field core::int intValue = 0;
 static field core::num numValue = 0;
 static field core::double doubleValue = 0.0;
-static field dynamic a = () → core::num => self::intValue.{core::num::+}(self::b as{TypeError} core::num);
-static field dynamic b = self::a.call();
+static field invalid-type a = (() → core::num => self::intValue.{core::num::+}(self::b as{TypeError} core::num)) as{TypeError} invalid-type;
+static field invalid-type b = self::a.call() as{TypeError} invalid-type;
 static field () → core::num c = () → core::num => self::numValue.{core::num::+}(self::d);
 static field core::num d = self::c.call();
 static field () → core::double e = () → core::double => self::doubleValue.{core::double::+}(self::f);
diff --git a/pkg/front_end/testcases/inference_new/dependency_only_if_overloaded.dart.strong.transformed.expect b/pkg/front_end/testcases/inference_new/dependency_only_if_overloaded.dart.strong.transformed.expect
index d2d6d0d..6d183c0c 100644
--- a/pkg/front_end/testcases/inference_new/dependency_only_if_overloaded.dart.strong.transformed.expect
+++ b/pkg/front_end/testcases/inference_new/dependency_only_if_overloaded.dart.strong.transformed.expect
@@ -2,15 +2,20 @@
 //
 // Problems in library:
 //
-// pkg/front_end/testcases/inference_new/dependency_only_if_overloaded.dart:17:67: Error: Can't infer the type of 'b': circularity found during type inference.
+// pkg/front_end/testcases/inference_new/dependency_only_if_overloaded.dart:17:72: Error: Can't infer the type of 'b': circularity found during type inference.
 // Specify the type explicitly.
-// var /*@topType=dynamic*/ /*@error=CantInferTypeDueToCircularity*/ b = a();
-//                                                                   ^
+// var  /*@error=CantInferTypeDueToCircularity*/ b = a/*@error=UndefinedMethod*/();
+//                                                                        ^
 //
-// pkg/front_end/testcases/inference_new/dependency_only_if_overloaded.dart:15:67: Error: Can't infer the type of 'a': circularity found during type inference.
+// pkg/front_end/testcases/inference_new/dependency_only_if_overloaded.dart:15:72: Error: Can't infer the type of 'a': circularity found during type inference.
 // Specify the type explicitly.
-// var /*@topType=dynamic*/ /*@error=CantInferTypeDueToCircularity*/ a = /*@returnType=num*/ () =>
-//                                                                   ^
+// var  /*@error=CantInferTypeDueToCircularity*/ a = /*@returnType=num*/ () =>
+//                                                                        ^
+//
+// pkg/front_end/testcases/inference_new/dependency_only_if_overloaded.dart:17:77: Error: The method 'call' isn't defined for the class 'invalid-type'.
+// Try correcting the name to the name of an existing method, or defining a method named 'call'.
+// var  /*@error=CantInferTypeDueToCircularity*/ b = a/*@error=UndefinedMethod*/();
+//                                                                             ^
 //
 import self as self;
 import "dart:core" as core;
@@ -18,8 +23,11 @@
 static field core::int intValue = 0;
 static field core::num numValue = 0;
 static field core::double doubleValue = 0.0;
-static field dynamic a = () → core::num => self::intValue.{core::num::+}(self::b as{TypeError} core::num);
-static field dynamic b = self::a.call();
+static field invalid-type a = (() → core::num => self::intValue.{core::num::+}(self::b as{TypeError} core::num)) as{TypeError} invalid-type;
+static field invalid-type b = invalid-expression "pkg/front_end/testcases/inference_new/dependency_only_if_overloaded.dart:17:77: Error: The method 'call' isn't defined for the class 'invalid-type'.
+Try correcting the name to the name of an existing method, or defining a method named 'call'.
+var  /*@error=CantInferTypeDueToCircularity*/ b = a/*@error=UndefinedMethod*/();
+                                                                            ^";
 static field () → core::num c = () → core::num => self::numValue.{core::num::+}(self::d);
 static field core::num d = self::c.call();
 static field () → core::double e = () → core::double => self::doubleValue.{core::double::+}(self::f);
diff --git a/pkg/front_end/testcases/inference_new/downwards_inference_inside_top_level.dart b/pkg/front_end/testcases/inference_new/downwards_inference_inside_top_level.dart
index 3a5760c..e296a6a 100644
--- a/pkg/front_end/testcases/inference_new/downwards_inference_inside_top_level.dart
+++ b/pkg/front_end/testcases/inference_new/downwards_inference_inside_top_level.dart
@@ -13,8 +13,6 @@
   B(T x);
 }
 
-var /*@topType=List<B<int>>*/ t3 = /*@typeArgs=B<int>*/ [
-  new /*@typeArgs=int*/ B(3)
-];
+var t3 = /*@typeArgs=B<int>*/ [new /*@typeArgs=int*/ B(3)];
 
 main() {}
diff --git a/pkg/front_end/testcases/inference_new/downwards_inference_inside_top_level_2.dart b/pkg/front_end/testcases/inference_new/downwards_inference_inside_top_level_2.dart
index 4c8edf2..5f75350 100644
--- a/pkg/front_end/testcases/inference_new/downwards_inference_inside_top_level_2.dart
+++ b/pkg/front_end/testcases/inference_new/downwards_inference_inside_top_level_2.dart
@@ -9,8 +9,6 @@
   A(T x);
 }
 
-var /*@topType=List<A<int>>*/ t2 = /*@typeArgs=A<int>*/ [
-  new /*@typeArgs=int*/ A(2)
-];
+var t2 = /*@typeArgs=A<int>*/ [new /*@typeArgs=int*/ A(2)];
 
 main() {}
diff --git a/pkg/front_end/testcases/inference_new/field_inference_circularity.dart b/pkg/front_end/testcases/inference_new/field_inference_circularity.dart
index d8b81a7..a609915 100644
--- a/pkg/front_end/testcases/inference_new/field_inference_circularity.dart
+++ b/pkg/front_end/testcases/inference_new/field_inference_circularity.dart
@@ -2,22 +2,20 @@
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
 
-/*@testedFeatures=inference,error*/
+/*@testedFeatures=inference*/
 library test;
 
 // A.x depends on B.x which depends on A.x, so no type is inferred.  But types
 // can be inferred for A.y and B.y.
 
 class A {
-  var /*@topType=dynamic*/ /*@error=CantInferTypeDueToCircularity*/ x = /*@returnType=dynamic*/ () =>
-      new B(). /*@target=B::x*/ x;
-  var /*@topType=() -> dynamic*/ y = /*@returnType=dynamic*/ () =>
-      new B(). /*@target=B::x*/ x;
+  var x = /*@returnType=invalid-type*/ () => new B(). /*@target=B::x*/ x;
+  var y = /*@returnType=invalid-type*/ () => new B(). /*@target=B::x*/ x;
 }
 
 class B extends A {
-  var /*@topType=dynamic*/ /*@error=CantInferTypeDueToCircularity*/ x;
-  var /*@topType=() -> dynamic*/ y;
+  var x;
+  var y;
 }
 
 main() {}
diff --git a/pkg/front_end/testcases/inference_new/field_inference_circularity.dart.strong.expect b/pkg/front_end/testcases/inference_new/field_inference_circularity.dart.strong.expect
index 0d47f0c..e436c4f 100644
--- a/pkg/front_end/testcases/inference_new/field_inference_circularity.dart.strong.expect
+++ b/pkg/front_end/testcases/inference_new/field_inference_circularity.dart.strong.expect
@@ -2,29 +2,29 @@
 //
 // Problems in library:
 //
-// pkg/front_end/testcases/inference_new/field_inference_circularity.dart:12:69: Error: Can't infer the type of 'x': circularity found during type inference.
+// pkg/front_end/testcases/inference_new/field_inference_circularity.dart:12:7: Error: Can't infer the type of 'x': circularity found during type inference.
 // Specify the type explicitly.
-//   var /*@topType=dynamic*/ /*@error=CantInferTypeDueToCircularity*/ x = /*@returnType=dynamic*/ () =>
-//                                                                     ^
+//   var x = /*@returnType=invalid-type*/ () => new B(). /*@target=B::x*/ x;
+//       ^
 //
-// pkg/front_end/testcases/inference_new/field_inference_circularity.dart:19:69: Error: Can't infer the type of 'x': circularity found during type inference.
+// pkg/front_end/testcases/inference_new/field_inference_circularity.dart:17:7: Error: Can't infer the type of 'x': circularity found during type inference.
 // Specify the type explicitly.
-//   var /*@topType=dynamic*/ /*@error=CantInferTypeDueToCircularity*/ x;
-//                                                                     ^
+//   var x;
+//       ^
 //
 import self as self;
 import "dart:core" as core;
 
 class A extends core::Object {
-  field dynamic x = () → dynamic => new self::B::•().{self::B::x};
-  field () → dynamic y = () → dynamic => new self::B::•().{self::B::x};
+  field invalid-type x = (() → invalid-type => new self::B::•().{self::B::x}) as{TypeError} invalid-type;
+  field () → invalid-type y = () → invalid-type => new self::B::•().{self::B::x};
   synthetic constructor •() → self::A
     : super core::Object::•()
     ;
 }
 class B extends self::A {
-  field dynamic x = null;
-  field () → dynamic y = null;
+  field invalid-type x = null;
+  field () → invalid-type y = null;
   synthetic constructor •() → self::B
     : super self::A::•()
     ;
diff --git a/pkg/front_end/testcases/inference_new/field_inference_circularity.dart.strong.transformed.expect b/pkg/front_end/testcases/inference_new/field_inference_circularity.dart.strong.transformed.expect
index 0d47f0c..e436c4f 100644
--- a/pkg/front_end/testcases/inference_new/field_inference_circularity.dart.strong.transformed.expect
+++ b/pkg/front_end/testcases/inference_new/field_inference_circularity.dart.strong.transformed.expect
@@ -2,29 +2,29 @@
 //
 // Problems in library:
 //
-// pkg/front_end/testcases/inference_new/field_inference_circularity.dart:12:69: Error: Can't infer the type of 'x': circularity found during type inference.
+// pkg/front_end/testcases/inference_new/field_inference_circularity.dart:12:7: Error: Can't infer the type of 'x': circularity found during type inference.
 // Specify the type explicitly.
-//   var /*@topType=dynamic*/ /*@error=CantInferTypeDueToCircularity*/ x = /*@returnType=dynamic*/ () =>
-//                                                                     ^
+//   var x = /*@returnType=invalid-type*/ () => new B(). /*@target=B::x*/ x;
+//       ^
 //
-// pkg/front_end/testcases/inference_new/field_inference_circularity.dart:19:69: Error: Can't infer the type of 'x': circularity found during type inference.
+// pkg/front_end/testcases/inference_new/field_inference_circularity.dart:17:7: Error: Can't infer the type of 'x': circularity found during type inference.
 // Specify the type explicitly.
-//   var /*@topType=dynamic*/ /*@error=CantInferTypeDueToCircularity*/ x;
-//                                                                     ^
+//   var x;
+//       ^
 //
 import self as self;
 import "dart:core" as core;
 
 class A extends core::Object {
-  field dynamic x = () → dynamic => new self::B::•().{self::B::x};
-  field () → dynamic y = () → dynamic => new self::B::•().{self::B::x};
+  field invalid-type x = (() → invalid-type => new self::B::•().{self::B::x}) as{TypeError} invalid-type;
+  field () → invalid-type y = () → invalid-type => new self::B::•().{self::B::x};
   synthetic constructor •() → self::A
     : super core::Object::•()
     ;
 }
 class B extends self::A {
-  field dynamic x = null;
-  field () → dynamic y = null;
+  field invalid-type x = null;
+  field () → invalid-type y = null;
   synthetic constructor •() → self::B
     : super self::A::•()
     ;
diff --git a/pkg/front_end/testcases/inference_new/for_each_identifier_downwards.dart b/pkg/front_end/testcases/inference_new/for_each_identifier_downwards.dart
index 4e96e3e..0977a74 100644
--- a/pkg/front_end/testcases/inference_new/for_each_identifier_downwards.dart
+++ b/pkg/front_end/testcases/inference_new/for_each_identifier_downwards.dart
@@ -2,7 +2,7 @@
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
 
-/*@testedFeatures=inference,error*/
+/*@testedFeatures=inference*/
 library test;
 
 T f<T>() => null;
diff --git a/pkg/front_end/testcases/inference_new/for_each_invalid_iterable.dart b/pkg/front_end/testcases/inference_new/for_each_invalid_iterable.dart
index da9ed77..29a09fd 100644
--- a/pkg/front_end/testcases/inference_new/for_each_invalid_iterable.dart
+++ b/pkg/front_end/testcases/inference_new/for_each_invalid_iterable.dart
@@ -2,16 +2,16 @@
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
 
-/*@testedFeatures=inference,error*/
+/*@testedFeatures=inference*/
 library test;
 
 test() async {
   String s;
-  for (int x in /*@error=ForInLoopTypeNotIterable*/ s) {}
-  await for (int x in /*@error=ForInLoopTypeNotIterable*/ s) {}
+  for (int x in s) {}
+  await for (int x in s) {}
   int y;
-  for (y in /*@error=ForInLoopTypeNotIterable*/ s) {}
-  await for (y in /*@error=ForInLoopTypeNotIterable*/ s) {}
+  for (y in s) {}
+  await for (y in s) {}
 }
 
 main() {}
diff --git a/pkg/front_end/testcases/inference_new/for_each_invalid_iterable.dart.strong.expect b/pkg/front_end/testcases/inference_new/for_each_invalid_iterable.dart.strong.expect
index a921371..d0463b8 100644
--- a/pkg/front_end/testcases/inference_new/for_each_invalid_iterable.dart.strong.expect
+++ b/pkg/front_end/testcases/inference_new/for_each_invalid_iterable.dart.strong.expect
@@ -2,25 +2,25 @@
 //
 // Problems in library:
 //
-// pkg/front_end/testcases/inference_new/for_each_invalid_iterable.dart:10:53: Error: The type 'String' used in the 'for' loop must implement 'Iterable<dynamic>'.
+// pkg/front_end/testcases/inference_new/for_each_invalid_iterable.dart:10:17: Error: The type 'String' used in the 'for' loop must implement 'Iterable<dynamic>'.
 //  - 'Iterable' is from 'dart:core'.
-//   for (int x in /*@error=ForInLoopTypeNotIterable*/ s) {}
-//                                                     ^
+//   for (int x in s) {}
+//                 ^
 //
-// pkg/front_end/testcases/inference_new/for_each_invalid_iterable.dart:11:59: Error: The type 'String' used in the 'for' loop must implement 'Stream<dynamic>'.
+// pkg/front_end/testcases/inference_new/for_each_invalid_iterable.dart:11:23: Error: The type 'String' used in the 'for' loop must implement 'Stream<dynamic>'.
 //  - 'Stream' is from 'dart:async'.
-//   await for (int x in /*@error=ForInLoopTypeNotIterable*/ s) {}
-//                                                           ^
+//   await for (int x in s) {}
+//                       ^
 //
-// pkg/front_end/testcases/inference_new/for_each_invalid_iterable.dart:13:49: Error: The type 'String' used in the 'for' loop must implement 'Iterable<dynamic>'.
+// pkg/front_end/testcases/inference_new/for_each_invalid_iterable.dart:13:13: Error: The type 'String' used in the 'for' loop must implement 'Iterable<dynamic>'.
 //  - 'Iterable' is from 'dart:core'.
-//   for (y in /*@error=ForInLoopTypeNotIterable*/ s) {}
-//                                                 ^
+//   for (y in s) {}
+//             ^
 //
-// pkg/front_end/testcases/inference_new/for_each_invalid_iterable.dart:14:55: Error: The type 'String' used in the 'for' loop must implement 'Stream<dynamic>'.
+// pkg/front_end/testcases/inference_new/for_each_invalid_iterable.dart:14:19: Error: The type 'String' used in the 'for' loop must implement 'Stream<dynamic>'.
 //  - 'Stream' is from 'dart:async'.
-//   await for (y in /*@error=ForInLoopTypeNotIterable*/ s) {}
-//                                                       ^
+//   await for (y in s) {}
+//                   ^
 //
 import self as self;
 import "dart:core" as core;
@@ -28,29 +28,29 @@
 
 static method test() → dynamic async {
   core::String s;
-  for (final dynamic #t1 in let final<BottomType> #t2 = invalid-expression "pkg/front_end/testcases/inference_new/for_each_invalid_iterable.dart:10:53: Error: The type 'String' used in the 'for' loop must implement 'Iterable<dynamic>'.
+  for (final dynamic #t1 in let final<BottomType> #t2 = invalid-expression "pkg/front_end/testcases/inference_new/for_each_invalid_iterable.dart:10:17: Error: The type 'String' used in the 'for' loop must implement 'Iterable<dynamic>'.
  - 'Iterable' is from 'dart:core'.
-  for (int x in /*@error=ForInLoopTypeNotIterable*/ s) {}
-                                                    ^" in s as{TypeError} core::Iterable<dynamic>) {
+  for (int x in s) {}
+                ^" in s as{TypeError} core::Iterable<dynamic>) {
     core::int x = #t1 as{TypeError} core::int;
   }
-  await for (final dynamic #t3 in let final<BottomType> #t4 = invalid-expression "pkg/front_end/testcases/inference_new/for_each_invalid_iterable.dart:11:59: Error: The type 'String' used in the 'for' loop must implement 'Stream<dynamic>'.
+  await for (final dynamic #t3 in let final<BottomType> #t4 = invalid-expression "pkg/front_end/testcases/inference_new/for_each_invalid_iterable.dart:11:23: Error: The type 'String' used in the 'for' loop must implement 'Stream<dynamic>'.
  - 'Stream' is from 'dart:async'.
-  await for (int x in /*@error=ForInLoopTypeNotIterable*/ s) {}
-                                                          ^" in s as{TypeError} asy::Stream<dynamic>) {
+  await for (int x in s) {}
+                      ^" in s as{TypeError} asy::Stream<dynamic>) {
     core::int x = #t3 as{TypeError} core::int;
   }
   core::int y;
-  for (final dynamic #t5 in let final<BottomType> #t6 = invalid-expression "pkg/front_end/testcases/inference_new/for_each_invalid_iterable.dart:13:49: Error: The type 'String' used in the 'for' loop must implement 'Iterable<dynamic>'.
+  for (final dynamic #t5 in let final<BottomType> #t6 = invalid-expression "pkg/front_end/testcases/inference_new/for_each_invalid_iterable.dart:13:13: Error: The type 'String' used in the 'for' loop must implement 'Iterable<dynamic>'.
  - 'Iterable' is from 'dart:core'.
-  for (y in /*@error=ForInLoopTypeNotIterable*/ s) {}
-                                                ^" in s as{TypeError} core::Iterable<dynamic>) {
+  for (y in s) {}
+            ^" in s as{TypeError} core::Iterable<dynamic>) {
     y = #t5 as{TypeError} core::int;
   }
-  await for (final dynamic #t7 in let final<BottomType> #t8 = invalid-expression "pkg/front_end/testcases/inference_new/for_each_invalid_iterable.dart:14:55: Error: The type 'String' used in the 'for' loop must implement 'Stream<dynamic>'.
+  await for (final dynamic #t7 in let final<BottomType> #t8 = invalid-expression "pkg/front_end/testcases/inference_new/for_each_invalid_iterable.dart:14:19: Error: The type 'String' used in the 'for' loop must implement 'Stream<dynamic>'.
  - 'Stream' is from 'dart:async'.
-  await for (y in /*@error=ForInLoopTypeNotIterable*/ s) {}
-                                                      ^" in s as{TypeError} asy::Stream<dynamic>) {
+  await for (y in s) {}
+                  ^" in s as{TypeError} asy::Stream<dynamic>) {
     y = #t7 as{TypeError} core::int;
   }
 }
diff --git a/pkg/front_end/testcases/inference_new/for_each_invalid_iterable.dart.strong.transformed.expect b/pkg/front_end/testcases/inference_new/for_each_invalid_iterable.dart.strong.transformed.expect
index e1b9af6..7376685 100644
--- a/pkg/front_end/testcases/inference_new/for_each_invalid_iterable.dart.strong.transformed.expect
+++ b/pkg/front_end/testcases/inference_new/for_each_invalid_iterable.dart.strong.transformed.expect
@@ -2,25 +2,25 @@
 //
 // Problems in library:
 //
-// pkg/front_end/testcases/inference_new/for_each_invalid_iterable.dart:10:53: Error: The type 'String' used in the 'for' loop must implement 'Iterable<dynamic>'.
+// pkg/front_end/testcases/inference_new/for_each_invalid_iterable.dart:10:17: Error: The type 'String' used in the 'for' loop must implement 'Iterable<dynamic>'.
 //  - 'Iterable' is from 'dart:core'.
-//   for (int x in /*@error=ForInLoopTypeNotIterable*/ s) {}
-//                                                     ^
+//   for (int x in s) {}
+//                 ^
 //
-// pkg/front_end/testcases/inference_new/for_each_invalid_iterable.dart:11:59: Error: The type 'String' used in the 'for' loop must implement 'Stream<dynamic>'.
+// pkg/front_end/testcases/inference_new/for_each_invalid_iterable.dart:11:23: Error: The type 'String' used in the 'for' loop must implement 'Stream<dynamic>'.
 //  - 'Stream' is from 'dart:async'.
-//   await for (int x in /*@error=ForInLoopTypeNotIterable*/ s) {}
-//                                                           ^
+//   await for (int x in s) {}
+//                       ^
 //
-// pkg/front_end/testcases/inference_new/for_each_invalid_iterable.dart:13:49: Error: The type 'String' used in the 'for' loop must implement 'Iterable<dynamic>'.
+// pkg/front_end/testcases/inference_new/for_each_invalid_iterable.dart:13:13: Error: The type 'String' used in the 'for' loop must implement 'Iterable<dynamic>'.
 //  - 'Iterable' is from 'dart:core'.
-//   for (y in /*@error=ForInLoopTypeNotIterable*/ s) {}
-//                                                 ^
+//   for (y in s) {}
+//             ^
 //
-// pkg/front_end/testcases/inference_new/for_each_invalid_iterable.dart:14:55: Error: The type 'String' used in the 'for' loop must implement 'Stream<dynamic>'.
+// pkg/front_end/testcases/inference_new/for_each_invalid_iterable.dart:14:19: Error: The type 'String' used in the 'for' loop must implement 'Stream<dynamic>'.
 //  - 'Stream' is from 'dart:async'.
-//   await for (y in /*@error=ForInLoopTypeNotIterable*/ s) {}
-//                                                       ^
+//   await for (y in s) {}
+//                   ^
 //
 import self as self;
 import "dart:async" as asy;
@@ -43,17 +43,17 @@
       #L1:
       {
         core::String s;
-        for (final dynamic #t1 in let final<BottomType> #t2 = invalid-expression "pkg/front_end/testcases/inference_new/for_each_invalid_iterable.dart:10:53: Error: The type 'String' used in the 'for' loop must implement 'Iterable<dynamic>'.
+        for (final dynamic #t1 in let final<BottomType> #t2 = invalid-expression "pkg/front_end/testcases/inference_new/for_each_invalid_iterable.dart:10:17: Error: The type 'String' used in the 'for' loop must implement 'Iterable<dynamic>'.
  - 'Iterable' is from 'dart:core'.
-  for (int x in /*@error=ForInLoopTypeNotIterable*/ s) {}
-                                                    ^" in s as{TypeError} core::Iterable<dynamic>) {
+  for (int x in s) {}
+                ^" in s as{TypeError} core::Iterable<dynamic>) {
           core::int x = #t1 as{TypeError} core::int;
         }
         {
-          dynamic :stream = let final<BottomType> #t3 = invalid-expression "pkg/front_end/testcases/inference_new/for_each_invalid_iterable.dart:11:59: Error: The type 'String' used in the 'for' loop must implement 'Stream<dynamic>'.
+          dynamic :stream = let final<BottomType> #t3 = invalid-expression "pkg/front_end/testcases/inference_new/for_each_invalid_iterable.dart:11:23: Error: The type 'String' used in the 'for' loop must implement 'Stream<dynamic>'.
  - 'Stream' is from 'dart:async'.
-  await for (int x in /*@error=ForInLoopTypeNotIterable*/ s) {}
-                                                          ^" in s as{TypeError} asy::Stream<dynamic>;
+  await for (int x in s) {}
+                      ^" in s as{TypeError} asy::Stream<dynamic>;
           asy::_asyncStarListenHelper(:stream, :async_op);
           asy::_StreamIterator<dynamic> :for-iterator = new asy::_StreamIterator::•<dynamic>(:stream);
           const core::bool :product-mode = const core::bool::fromEnvironment("dart.vm.product");
@@ -78,17 +78,17 @@
             }
         }
         core::int y;
-        for (final dynamic #t8 in let final<BottomType> #t9 = invalid-expression "pkg/front_end/testcases/inference_new/for_each_invalid_iterable.dart:13:49: Error: The type 'String' used in the 'for' loop must implement 'Iterable<dynamic>'.
+        for (final dynamic #t8 in let final<BottomType> #t9 = invalid-expression "pkg/front_end/testcases/inference_new/for_each_invalid_iterable.dart:13:13: Error: The type 'String' used in the 'for' loop must implement 'Iterable<dynamic>'.
  - 'Iterable' is from 'dart:core'.
-  for (y in /*@error=ForInLoopTypeNotIterable*/ s) {}
-                                                ^" in s as{TypeError} core::Iterable<dynamic>) {
+  for (y in s) {}
+            ^" in s as{TypeError} core::Iterable<dynamic>) {
           y = #t8 as{TypeError} core::int;
         }
         {
-          dynamic :stream = let final<BottomType> #t10 = invalid-expression "pkg/front_end/testcases/inference_new/for_each_invalid_iterable.dart:14:55: Error: The type 'String' used in the 'for' loop must implement 'Stream<dynamic>'.
+          dynamic :stream = let final<BottomType> #t10 = invalid-expression "pkg/front_end/testcases/inference_new/for_each_invalid_iterable.dart:14:19: Error: The type 'String' used in the 'for' loop must implement 'Stream<dynamic>'.
  - 'Stream' is from 'dart:async'.
-  await for (y in /*@error=ForInLoopTypeNotIterable*/ s) {}
-                                                      ^" in s as{TypeError} asy::Stream<dynamic>;
+  await for (y in s) {}
+                  ^" in s as{TypeError} asy::Stream<dynamic>;
           asy::_asyncStarListenHelper(:stream, :async_op);
           asy::_StreamIterator<dynamic> :for-iterator = new asy::_StreamIterator::•<dynamic>(:stream);
           const core::bool :product-mode = const core::bool::fromEnvironment("dart.vm.product");
diff --git a/pkg/front_end/testcases/inference_new/for_each_outer_var_type.dart b/pkg/front_end/testcases/inference_new/for_each_outer_var_type.dart
index 9ffdfe8..e98bf31 100644
--- a/pkg/front_end/testcases/inference_new/for_each_outer_var_type.dart
+++ b/pkg/front_end/testcases/inference_new/for_each_outer_var_type.dart
@@ -2,7 +2,7 @@
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
 
-/*@testedFeatures=inference,error*/
+/*@testedFeatures=inference*/
 library test;
 
 import 'dart:async';
@@ -23,8 +23,8 @@
   await for (a in stream) {}
   for (b in iterable) {}
   await for (b in stream) {}
-  for (i /*@error=ForInLoopElementTypeNotAssignable*/ in iterable) {}
-  await for (i /*@error=ForInLoopElementTypeNotAssignable*/ in stream) {}
+  for (i in iterable) {}
+  await for (i in stream) {}
   for (a in /*@typeArgs=Iterable<A>*/ f()) {}
   await for (a in /*@typeArgs=Stream<A>*/ f()) {}
 }
diff --git a/pkg/front_end/testcases/inference_new/for_each_outer_var_type.dart.strong.expect b/pkg/front_end/testcases/inference_new/for_each_outer_var_type.dart.strong.expect
index eed185f..01186e9 100644
--- a/pkg/front_end/testcases/inference_new/for_each_outer_var_type.dart.strong.expect
+++ b/pkg/front_end/testcases/inference_new/for_each_outer_var_type.dart.strong.expect
@@ -2,17 +2,17 @@
 //
 // Problems in library:
 //
-// pkg/front_end/testcases/inference_new/for_each_outer_var_type.dart:26:55: Error: A value of type 'A' can't be assigned to a variable of type 'int'.
+// pkg/front_end/testcases/inference_new/for_each_outer_var_type.dart:26:10: Error: A value of type 'A' can't be assigned to a variable of type 'int'.
 //  - 'A' is from 'pkg/front_end/testcases/inference_new/for_each_outer_var_type.dart'.
 // Try changing the type of the variable.
-//   for (i /*@error=ForInLoopElementTypeNotAssignable*/ in iterable) {}
-//                                                       ^
+//   for (i in iterable) {}
+//          ^
 //
-// pkg/front_end/testcases/inference_new/for_each_outer_var_type.dart:27:61: Error: A value of type 'A' can't be assigned to a variable of type 'int'.
+// pkg/front_end/testcases/inference_new/for_each_outer_var_type.dart:27:16: Error: A value of type 'A' can't be assigned to a variable of type 'int'.
 //  - 'A' is from 'pkg/front_end/testcases/inference_new/for_each_outer_var_type.dart'.
 // Try changing the type of the variable.
-//   await for (i /*@error=ForInLoopElementTypeNotAssignable*/ in stream) {}
-//                                                             ^
+//   await for (i in stream) {}
+//                ^
 //
 import self as self;
 import "dart:core" as core;
@@ -51,18 +51,18 @@
     b = #t4 as{TypeError} self::B;
   }
   for (final self::A #t5 in iterable) {
-    i = let final<BottomType> #t6 = invalid-expression "pkg/front_end/testcases/inference_new/for_each_outer_var_type.dart:26:55: Error: A value of type 'A' can't be assigned to a variable of type 'int'.
+    i = let final<BottomType> #t6 = invalid-expression "pkg/front_end/testcases/inference_new/for_each_outer_var_type.dart:26:10: Error: A value of type 'A' can't be assigned to a variable of type 'int'.
  - 'A' is from 'pkg/front_end/testcases/inference_new/for_each_outer_var_type.dart'.
 Try changing the type of the variable.
-  for (i /*@error=ForInLoopElementTypeNotAssignable*/ in iterable) {}
-                                                      ^" in #t5 as{TypeError} core::int;
+  for (i in iterable) {}
+         ^" in #t5 as{TypeError} core::int;
   }
   await for (final self::A #t7 in stream) {
-    i = let final<BottomType> #t8 = invalid-expression "pkg/front_end/testcases/inference_new/for_each_outer_var_type.dart:27:61: Error: A value of type 'A' can't be assigned to a variable of type 'int'.
+    i = let final<BottomType> #t8 = invalid-expression "pkg/front_end/testcases/inference_new/for_each_outer_var_type.dart:27:16: Error: A value of type 'A' can't be assigned to a variable of type 'int'.
  - 'A' is from 'pkg/front_end/testcases/inference_new/for_each_outer_var_type.dart'.
 Try changing the type of the variable.
-  await for (i /*@error=ForInLoopElementTypeNotAssignable*/ in stream) {}
-                                                            ^" in #t7 as{TypeError} core::int;
+  await for (i in stream) {}
+               ^" in #t7 as{TypeError} core::int;
   }
   for (final self::A #t9 in self::f<core::Iterable<self::A>>()) {
     a = #t9;
diff --git a/pkg/front_end/testcases/inference_new/for_each_outer_var_type.dart.strong.transformed.expect b/pkg/front_end/testcases/inference_new/for_each_outer_var_type.dart.strong.transformed.expect
index d924c02..4a60fd2 100644
--- a/pkg/front_end/testcases/inference_new/for_each_outer_var_type.dart.strong.transformed.expect
+++ b/pkg/front_end/testcases/inference_new/for_each_outer_var_type.dart.strong.transformed.expect
@@ -2,17 +2,17 @@
 //
 // Problems in library:
 //
-// pkg/front_end/testcases/inference_new/for_each_outer_var_type.dart:26:55: Error: A value of type 'A' can't be assigned to a variable of type 'int'.
+// pkg/front_end/testcases/inference_new/for_each_outer_var_type.dart:26:10: Error: A value of type 'A' can't be assigned to a variable of type 'int'.
 //  - 'A' is from 'pkg/front_end/testcases/inference_new/for_each_outer_var_type.dart'.
 // Try changing the type of the variable.
-//   for (i /*@error=ForInLoopElementTypeNotAssignable*/ in iterable) {}
-//                                                       ^
+//   for (i in iterable) {}
+//          ^
 //
-// pkg/front_end/testcases/inference_new/for_each_outer_var_type.dart:27:61: Error: A value of type 'A' can't be assigned to a variable of type 'int'.
+// pkg/front_end/testcases/inference_new/for_each_outer_var_type.dart:27:16: Error: A value of type 'A' can't be assigned to a variable of type 'int'.
 //  - 'A' is from 'pkg/front_end/testcases/inference_new/for_each_outer_var_type.dart'.
 // Try changing the type of the variable.
-//   await for (i /*@error=ForInLoopElementTypeNotAssignable*/ in stream) {}
-//                                                             ^
+//   await for (i in stream) {}
+//                ^
 //
 import self as self;
 import "dart:core" as core;
@@ -110,11 +110,11 @@
             }
         }
         for (final self::A #t11 in iterable) {
-          i = let final<BottomType> #t12 = invalid-expression "pkg/front_end/testcases/inference_new/for_each_outer_var_type.dart:26:55: Error: A value of type 'A' can't be assigned to a variable of type 'int'.
+          i = let final<BottomType> #t12 = invalid-expression "pkg/front_end/testcases/inference_new/for_each_outer_var_type.dart:26:10: Error: A value of type 'A' can't be assigned to a variable of type 'int'.
  - 'A' is from 'pkg/front_end/testcases/inference_new/for_each_outer_var_type.dart'.
 Try changing the type of the variable.
-  for (i /*@error=ForInLoopElementTypeNotAssignable*/ in iterable) {}
-                                                      ^" in #t11 as{TypeError} core::int;
+  for (i in iterable) {}
+         ^" in #t11 as{TypeError} core::int;
         }
         {
           dynamic :stream = stream;
@@ -129,11 +129,11 @@
               if(:result) {
                 final self::A #t15 = :for-iterator.{asy::_StreamIterator::current};
                 {
-                  i = let final<BottomType> #t16 = invalid-expression "pkg/front_end/testcases/inference_new/for_each_outer_var_type.dart:27:61: Error: A value of type 'A' can't be assigned to a variable of type 'int'.
+                  i = let final<BottomType> #t16 = invalid-expression "pkg/front_end/testcases/inference_new/for_each_outer_var_type.dart:27:16: Error: A value of type 'A' can't be assigned to a variable of type 'int'.
  - 'A' is from 'pkg/front_end/testcases/inference_new/for_each_outer_var_type.dart'.
 Try changing the type of the variable.
-  await for (i /*@error=ForInLoopElementTypeNotAssignable*/ in stream) {}
-                                                            ^" in #t15 as{TypeError} core::int;
+  await for (i in stream) {}
+               ^" in #t15 as{TypeError} core::int;
                 }
               }
               else
diff --git a/pkg/front_end/testcases/inference_new/infer_assign_to_index.dart b/pkg/front_end/testcases/inference_new/infer_assign_to_index.dart
index f08da41..8eb3740 100644
--- a/pkg/front_end/testcases/inference_new/infer_assign_to_index.dart
+++ b/pkg/front_end/testcases/inference_new/infer_assign_to_index.dart
@@ -6,6 +6,6 @@
 library test;
 
 List<double> a = <double>[];
-var /*@topType=double*/ b = (a /*@target=List::[]=*/ [0] = 1.0);
+var b = (a /*@target=List::[]=*/ [0] = 1.0);
 
 main() {}
diff --git a/pkg/front_end/testcases/inference_new/infer_assign_to_index_super_upwards.dart.legacy.expect b/pkg/front_end/testcases/inference_new/infer_assign_to_index_super_upwards.dart.legacy.expect
index c6fb73b..9619672 100644
--- a/pkg/front_end/testcases/inference_new/infer_assign_to_index_super_upwards.dart.legacy.expect
+++ b/pkg/front_end/testcases/inference_new/infer_assign_to_index_super_upwards.dart.legacy.expect
@@ -8,10 +8,10 @@
     ;
   operator [](core::String s) → self::Base::T
     return this.{self::Base::getValue}(s);
-  operator []=(core::String s, self::Base::U v) → void
+  operator []=(core::String s, generic-covariant-impl self::Base::U v) → void
     return this.{self::Base::setValue}(s, v);
   abstract method getValue(core::String s) → self::Base::T;
-  abstract method setValue(core::String s, self::Base::U v) → void;
+  abstract method setValue(core::String s, generic-covariant-impl self::Base::U v) → void;
 }
 abstract class Test1 extends self::Base<core::int, core::int> {
   synthetic constructor •() → self::Test1
diff --git a/pkg/front_end/testcases/inference_new/infer_assign_to_index_super_upwards.dart.legacy.transformed.expect b/pkg/front_end/testcases/inference_new/infer_assign_to_index_super_upwards.dart.legacy.transformed.expect
index c6fb73b..9619672 100644
--- a/pkg/front_end/testcases/inference_new/infer_assign_to_index_super_upwards.dart.legacy.transformed.expect
+++ b/pkg/front_end/testcases/inference_new/infer_assign_to_index_super_upwards.dart.legacy.transformed.expect
@@ -8,10 +8,10 @@
     ;
   operator [](core::String s) → self::Base::T
     return this.{self::Base::getValue}(s);
-  operator []=(core::String s, self::Base::U v) → void
+  operator []=(core::String s, generic-covariant-impl self::Base::U v) → void
     return this.{self::Base::setValue}(s, v);
   abstract method getValue(core::String s) → self::Base::T;
-  abstract method setValue(core::String s, self::Base::U v) → void;
+  abstract method setValue(core::String s, generic-covariant-impl self::Base::U v) → void;
 }
 abstract class Test1 extends self::Base<core::int, core::int> {
   synthetic constructor •() → self::Test1
diff --git a/pkg/front_end/testcases/inference_new/infer_assign_to_index_super_upwards.dart.outline.expect b/pkg/front_end/testcases/inference_new/infer_assign_to_index_super_upwards.dart.outline.expect
index 43e0d64..98949ae 100644
--- a/pkg/front_end/testcases/inference_new/infer_assign_to_index_super_upwards.dart.outline.expect
+++ b/pkg/front_end/testcases/inference_new/infer_assign_to_index_super_upwards.dart.outline.expect
@@ -7,10 +7,10 @@
     ;
   operator [](core::String s) → self::Base::T
     ;
-  operator []=(core::String s, self::Base::U v) → void
+  operator []=(core::String s, generic-covariant-impl self::Base::U v) → void
     ;
   abstract method getValue(core::String s) → self::Base::T;
-  abstract method setValue(core::String s, self::Base::U v) → void;
+  abstract method setValue(core::String s, generic-covariant-impl self::Base::U v) → void;
 }
 abstract class Test1 extends self::Base<core::int, core::int> {
   synthetic constructor •() → self::Test1
diff --git a/pkg/front_end/testcases/inference_new/infer_assign_to_index_upwards.dart.legacy.expect b/pkg/front_end/testcases/inference_new/infer_assign_to_index_upwards.dart.legacy.expect
index 8d92bc9..bab4ea5 100644
--- a/pkg/front_end/testcases/inference_new/infer_assign_to_index_upwards.dart.legacy.expect
+++ b/pkg/front_end/testcases/inference_new/infer_assign_to_index_upwards.dart.legacy.expect
@@ -7,7 +7,7 @@
     : super core::Object::•()
     ;
   abstract operator [](core::String s) → self::Test::T;
-  abstract operator []=(core::String s, self::Test::U v) → void;
+  abstract operator []=(core::String s, generic-covariant-impl self::Test::U v) → void;
 }
 static method getInt() → core::int
   return 0;
diff --git a/pkg/front_end/testcases/inference_new/infer_assign_to_index_upwards.dart.legacy.transformed.expect b/pkg/front_end/testcases/inference_new/infer_assign_to_index_upwards.dart.legacy.transformed.expect
index 8d92bc9..bab4ea5 100644
--- a/pkg/front_end/testcases/inference_new/infer_assign_to_index_upwards.dart.legacy.transformed.expect
+++ b/pkg/front_end/testcases/inference_new/infer_assign_to_index_upwards.dart.legacy.transformed.expect
@@ -7,7 +7,7 @@
     : super core::Object::•()
     ;
   abstract operator [](core::String s) → self::Test::T;
-  abstract operator []=(core::String s, self::Test::U v) → void;
+  abstract operator []=(core::String s, generic-covariant-impl self::Test::U v) → void;
 }
 static method getInt() → core::int
   return 0;
diff --git a/pkg/front_end/testcases/inference_new/infer_assign_to_index_upwards.dart.outline.expect b/pkg/front_end/testcases/inference_new/infer_assign_to_index_upwards.dart.outline.expect
index f14f72a..2be1f6f 100644
--- a/pkg/front_end/testcases/inference_new/infer_assign_to_index_upwards.dart.outline.expect
+++ b/pkg/front_end/testcases/inference_new/infer_assign_to_index_upwards.dart.outline.expect
@@ -6,7 +6,7 @@
   synthetic constructor •() → self::Test<self::Test::T, self::Test::U>
     ;
   abstract operator [](core::String s) → self::Test::T;
-  abstract operator []=(core::String s, self::Test::U v) → void;
+  abstract operator []=(core::String s, generic-covariant-impl self::Test::U v) → void;
 }
 static method getInt() → core::int
   ;
diff --git a/pkg/front_end/testcases/inference_new/infer_assign_to_property.dart b/pkg/front_end/testcases/inference_new/infer_assign_to_property.dart
index eb39317..7b7d80f 100644
--- a/pkg/front_end/testcases/inference_new/infer_assign_to_property.dart
+++ b/pkg/front_end/testcases/inference_new/infer_assign_to_property.dart
@@ -9,13 +9,13 @@
   int f;
 }
 
-var /*@topType=int*/ v_assign = (new A(). /*@target=A::f*/ f = 1);
-var /*@topType=int*/ v_plus = (new A(). /*@target=A::f*/ f += 1);
-var /*@topType=int*/ v_minus = (new A(). /*@target=A::f*/ f -= 1);
-var /*@topType=int*/ v_multiply = (new A(). /*@target=A::f*/ f *= 1);
-var /*@topType=int*/ v_prefix_pp = (++new A(). /*@target=A::f*/ f);
-var /*@topType=int*/ v_prefix_mm = (--new A(). /*@target=A::f*/ f);
-var /*@topType=int*/ v_postfix_pp = (new A(). /*@target=A::f*/ f++);
-var /*@topType=int*/ v_postfix_mm = (new A(). /*@target=A::f*/ f--);
+var v_assign = (new A(). /*@target=A::f*/ f = 1);
+var v_plus = (new A(). /*@target=A::f*/ f += 1);
+var v_minus = (new A(). /*@target=A::f*/ f -= 1);
+var v_multiply = (new A(). /*@target=A::f*/ f *= 1);
+var v_prefix_pp = (++new A(). /*@target=A::f*/ f);
+var v_prefix_mm = (--new A(). /*@target=A::f*/ f);
+var v_postfix_pp = (new A(). /*@target=A::f*/ f++);
+var v_postfix_mm = (new A(). /*@target=A::f*/ f--);
 
 main() {}
diff --git a/pkg/front_end/testcases/inference_new/infer_assign_to_property_custom.dart b/pkg/front_end/testcases/inference_new/infer_assign_to_property_custom.dart
index af534a0..0a7493d 100644
--- a/pkg/front_end/testcases/inference_new/infer_assign_to_property_custom.dart
+++ b/pkg/front_end/testcases/inference_new/infer_assign_to_property_custom.dart
@@ -6,17 +6,17 @@
 library test;
 
 class A {
-  int operator +(/*@topType=dynamic*/ other) => 1;
-  double operator -(/*@topType=dynamic*/ other) => 2.0;
+  int operator +(other) => 1;
+  double operator -(other) => 2.0;
 }
 
 class B {
   A a;
 }
 
-var /*@topType=int*/ v_prefix_pp = (++new B(). /*@target=B::a*/ a);
-var /*@topType=double*/ v_prefix_mm = (--new B(). /*@target=B::a*/ a);
-var /*@topType=A*/ v_postfix_pp = (new B(). /*@target=B::a*/ a++);
-var /*@topType=A*/ v_postfix_mm = (new B(). /*@target=B::a*/ a--);
+var v_prefix_pp = (++new B(). /*@target=B::a*/ a);
+var v_prefix_mm = (--new B(). /*@target=B::a*/ a);
+var v_postfix_pp = (new B(). /*@target=B::a*/ a++);
+var v_postfix_mm = (new B(). /*@target=B::a*/ a--);
 
 main() {}
diff --git a/pkg/front_end/testcases/inference_new/infer_assign_to_property_custom.dart.strong.expect b/pkg/front_end/testcases/inference_new/infer_assign_to_property_custom.dart.strong.expect
index 0299145..a3ccc64 100644
--- a/pkg/front_end/testcases/inference_new/infer_assign_to_property_custom.dart.strong.expect
+++ b/pkg/front_end/testcases/inference_new/infer_assign_to_property_custom.dart.strong.expect
@@ -2,29 +2,29 @@
 //
 // Problems in library:
 //
-// pkg/front_end/testcases/inference_new/infer_assign_to_property_custom.dart:17:37: Error: A value of type 'int' can't be assigned to a variable of type 'A'.
+// pkg/front_end/testcases/inference_new/infer_assign_to_property_custom.dart:17:20: Error: A value of type 'int' can't be assigned to a variable of type 'A'.
 //  - 'A' is from 'pkg/front_end/testcases/inference_new/infer_assign_to_property_custom.dart'.
 // Try changing the type of the left hand side, or casting the right hand side to 'A'.
-// var /*@topType=int*/ v_prefix_pp = (++new B(). /*@target=B::a*/ a);
-//                                     ^
+// var v_prefix_pp = (++new B(). /*@target=B::a*/ a);
+//                    ^
 //
-// pkg/front_end/testcases/inference_new/infer_assign_to_property_custom.dart:18:40: Error: A value of type 'double' can't be assigned to a variable of type 'A'.
+// pkg/front_end/testcases/inference_new/infer_assign_to_property_custom.dart:18:20: Error: A value of type 'double' can't be assigned to a variable of type 'A'.
 //  - 'A' is from 'pkg/front_end/testcases/inference_new/infer_assign_to_property_custom.dart'.
 // Try changing the type of the left hand side, or casting the right hand side to 'A'.
-// var /*@topType=double*/ v_prefix_mm = (--new B(). /*@target=B::a*/ a);
-//                                        ^
+// var v_prefix_mm = (--new B(). /*@target=B::a*/ a);
+//                    ^
 //
-// pkg/front_end/testcases/inference_new/infer_assign_to_property_custom.dart:19:63: Error: A value of type 'int' can't be assigned to a variable of type 'A'.
+// pkg/front_end/testcases/inference_new/infer_assign_to_property_custom.dart:19:48: Error: A value of type 'int' can't be assigned to a variable of type 'A'.
 //  - 'A' is from 'pkg/front_end/testcases/inference_new/infer_assign_to_property_custom.dart'.
 // Try changing the type of the left hand side, or casting the right hand side to 'A'.
-// var /*@topType=A*/ v_postfix_pp = (new B(). /*@target=B::a*/ a++);
-//                                                               ^
+// var v_postfix_pp = (new B(). /*@target=B::a*/ a++);
+//                                                ^
 //
-// pkg/front_end/testcases/inference_new/infer_assign_to_property_custom.dart:20:63: Error: A value of type 'double' can't be assigned to a variable of type 'A'.
+// pkg/front_end/testcases/inference_new/infer_assign_to_property_custom.dart:20:48: Error: A value of type 'double' can't be assigned to a variable of type 'A'.
 //  - 'A' is from 'pkg/front_end/testcases/inference_new/infer_assign_to_property_custom.dart'.
 // Try changing the type of the left hand side, or casting the right hand side to 'A'.
-// var /*@topType=A*/ v_postfix_mm = (new B(). /*@target=B::a*/ a--);
-//                                                               ^
+// var v_postfix_mm = (new B(). /*@target=B::a*/ a--);
+//                                                ^
 //
 import self as self;
 import "dart:core" as core;
@@ -44,24 +44,24 @@
     : super core::Object::•()
     ;
 }
-static field core::int v_prefix_pp = let final self::B #t1 = new self::B::•() in #t1.{self::B::a} = let final<BottomType> #t2 = invalid-expression "pkg/front_end/testcases/inference_new/infer_assign_to_property_custom.dart:17:37: Error: A value of type 'int' can't be assigned to a variable of type 'A'.
+static field core::int v_prefix_pp = let final self::B #t1 = new self::B::•() in #t1.{self::B::a} = let final<BottomType> #t2 = invalid-expression "pkg/front_end/testcases/inference_new/infer_assign_to_property_custom.dart:17:20: Error: A value of type 'int' can't be assigned to a variable of type 'A'.
  - 'A' is from 'pkg/front_end/testcases/inference_new/infer_assign_to_property_custom.dart'.
 Try changing the type of the left hand side, or casting the right hand side to 'A'.
-var /*@topType=int*/ v_prefix_pp = (++new B(). /*@target=B::a*/ a);
-                                    ^" in #t1.{self::B::a}.{self::A::+}(1) as{TypeError} self::A;
-static field core::double v_prefix_mm = let final self::B #t3 = new self::B::•() in #t3.{self::B::a} = let final<BottomType> #t4 = invalid-expression "pkg/front_end/testcases/inference_new/infer_assign_to_property_custom.dart:18:40: Error: A value of type 'double' can't be assigned to a variable of type 'A'.
+var v_prefix_pp = (++new B(). /*@target=B::a*/ a);
+                   ^" in #t1.{self::B::a}.{self::A::+}(1) as{TypeError} self::A;
+static field core::double v_prefix_mm = let final self::B #t3 = new self::B::•() in #t3.{self::B::a} = let final<BottomType> #t4 = invalid-expression "pkg/front_end/testcases/inference_new/infer_assign_to_property_custom.dart:18:20: Error: A value of type 'double' can't be assigned to a variable of type 'A'.
  - 'A' is from 'pkg/front_end/testcases/inference_new/infer_assign_to_property_custom.dart'.
 Try changing the type of the left hand side, or casting the right hand side to 'A'.
-var /*@topType=double*/ v_prefix_mm = (--new B(). /*@target=B::a*/ a);
-                                       ^" in #t3.{self::B::a}.{self::A::-}(1) as{TypeError} self::A;
-static field self::A v_postfix_pp = let final self::B #t5 = new self::B::•() in let final self::A #t6 = #t5.{self::B::a} in let final core::int #t7 = #t5.{self::B::a} = let final<BottomType> #t8 = invalid-expression "pkg/front_end/testcases/inference_new/infer_assign_to_property_custom.dart:19:63: Error: A value of type 'int' can't be assigned to a variable of type 'A'.
+var v_prefix_mm = (--new B(). /*@target=B::a*/ a);
+                   ^" in #t3.{self::B::a}.{self::A::-}(1) as{TypeError} self::A;
+static field self::A v_postfix_pp = let final self::B #t5 = new self::B::•() in let final self::A #t6 = #t5.{self::B::a} in let final core::int #t7 = #t5.{self::B::a} = let final<BottomType> #t8 = invalid-expression "pkg/front_end/testcases/inference_new/infer_assign_to_property_custom.dart:19:48: Error: A value of type 'int' can't be assigned to a variable of type 'A'.
  - 'A' is from 'pkg/front_end/testcases/inference_new/infer_assign_to_property_custom.dart'.
 Try changing the type of the left hand side, or casting the right hand side to 'A'.
-var /*@topType=A*/ v_postfix_pp = (new B(). /*@target=B::a*/ a++);
-                                                              ^" in #t6.{self::A::+}(1) as{TypeError} self::A in #t6;
-static field self::A v_postfix_mm = let final self::B #t9 = new self::B::•() in let final self::A #t10 = #t9.{self::B::a} in let final core::double #t11 = #t9.{self::B::a} = let final<BottomType> #t12 = invalid-expression "pkg/front_end/testcases/inference_new/infer_assign_to_property_custom.dart:20:63: Error: A value of type 'double' can't be assigned to a variable of type 'A'.
+var v_postfix_pp = (new B(). /*@target=B::a*/ a++);
+                                               ^" in #t6.{self::A::+}(1) as{TypeError} self::A in #t6;
+static field self::A v_postfix_mm = let final self::B #t9 = new self::B::•() in let final self::A #t10 = #t9.{self::B::a} in let final core::double #t11 = #t9.{self::B::a} = let final<BottomType> #t12 = invalid-expression "pkg/front_end/testcases/inference_new/infer_assign_to_property_custom.dart:20:48: Error: A value of type 'double' can't be assigned to a variable of type 'A'.
  - 'A' is from 'pkg/front_end/testcases/inference_new/infer_assign_to_property_custom.dart'.
 Try changing the type of the left hand side, or casting the right hand side to 'A'.
-var /*@topType=A*/ v_postfix_mm = (new B(). /*@target=B::a*/ a--);
-                                                              ^" in #t10.{self::A::-}(1) as{TypeError} self::A in #t10;
+var v_postfix_mm = (new B(). /*@target=B::a*/ a--);
+                                               ^" in #t10.{self::A::-}(1) as{TypeError} self::A in #t10;
 static method main() → dynamic {}
diff --git a/pkg/front_end/testcases/inference_new/infer_assign_to_property_custom.dart.strong.transformed.expect b/pkg/front_end/testcases/inference_new/infer_assign_to_property_custom.dart.strong.transformed.expect
index 7a44f95..2d70eeb 100644
--- a/pkg/front_end/testcases/inference_new/infer_assign_to_property_custom.dart.strong.transformed.expect
+++ b/pkg/front_end/testcases/inference_new/infer_assign_to_property_custom.dart.strong.transformed.expect
@@ -19,18 +19,18 @@
 }
 static field core::int v_prefix_pp = let final self::B #t1 = new self::B::•() in #t1.{self::B::a} = let final<BottomType> #t2 = invalid-expression "pkg/front_end/testcases/inference_new/infer_assign_to_property_custom.dart:17:37: Error: A value of type 'dart.core::int' can't be assigned to a variable of type 'test::A'.
 Try changing the type of the left hand side, or casting the right hand side to 'test::A'.
-var /*@topType=int*/ v_prefix_pp = (++new B(). /*@target=B::a*/ a);
+var  v_prefix_pp = (++new B(). /*@target=B::a*/ a);
                                     ^" in #t1.{self::B::a}.{self::A::+}(1) as{TypeError} <BottomType>;
 static field core::double v_prefix_mm = let final self::B #t3 = new self::B::•() in #t3.{self::B::a} = let final<BottomType> #t4 = invalid-expression "pkg/front_end/testcases/inference_new/infer_assign_to_property_custom.dart:18:40: Error: A value of type 'dart.core::double' can't be assigned to a variable of type 'test::A'.
 Try changing the type of the left hand side, or casting the right hand side to 'test::A'.
-var /*@topType=double*/ v_prefix_mm = (--new B(). /*@target=B::a*/ a);
+var  v_prefix_mm = (--new B(). /*@target=B::a*/ a);
                                        ^" in #t3.{self::B::a}.{self::A::-}(1) as{TypeError} <BottomType>;
 static field self::A v_postfix_pp = let final self::B #t5 = new self::B::•() in let final self::A #t6 = #t5.{self::B::a} in let final core::int #t7 = #t5.{self::B::a} = let final<BottomType> #t8 = invalid-expression "pkg/front_end/testcases/inference_new/infer_assign_to_property_custom.dart:19:63: Error: A value of type 'dart.core::int' can't be assigned to a variable of type 'test::A'.
 Try changing the type of the left hand side, or casting the right hand side to 'test::A'.
-var /*@topType=A*/ v_postfix_pp = (new B(). /*@target=B::a*/ a++);
+var  v_postfix_pp = (new B(). /*@target=B::a*/ a++);
                                                               ^" in #t6.{self::A::+}(1) as{TypeError} <BottomType>in #t6;
 static field self::A v_postfix_mm = let final self::B #t9 = new self::B::•() in let final self::A #t10 = #t9.{self::B::a} in let final core::double #t11 = #t9.{self::B::a} = let final<BottomType> #t12 = invalid-expression "pkg/front_end/testcases/inference_new/infer_assign_to_property_custom.dart:20:63: Error: A value of type 'dart.core::double' can't be assigned to a variable of type 'test::A'.
 Try changing the type of the left hand side, or casting the right hand side to 'test::A'.
-var /*@topType=A*/ v_postfix_mm = (new B(). /*@target=B::a*/ a--);
+var  v_postfix_mm = (new B(). /*@target=B::a*/ a--);
                                                               ^" in #t10.{self::A::-}(1) as{TypeError} <BottomType>in #t10;
 static method main() → dynamic {}
diff --git a/pkg/front_end/testcases/inference_new/infer_assign_to_ref.dart b/pkg/front_end/testcases/inference_new/infer_assign_to_ref.dart
index 4ddb4ed..3416a62 100644
--- a/pkg/front_end/testcases/inference_new/infer_assign_to_ref.dart
+++ b/pkg/front_end/testcases/inference_new/infer_assign_to_ref.dart
@@ -10,9 +10,9 @@
 }
 
 A a = new A();
-var /*@topType=int*/ b = (a. /*@target=A::f*/ f = 1);
-var /*@topType=int*/ c = 0;
-var /*@topType=int*/ d = (c = 1);
+var b = (a. /*@target=A::f*/ f = 1);
+var c = 0;
+var d = (c = 1);
 
 main() {
   a;
diff --git a/pkg/front_end/testcases/inference_new/infer_field_getter_setter_mismatch.dart b/pkg/front_end/testcases/inference_new/infer_field_getter_setter_mismatch.dart
index bec35e1..33c324d 100644
--- a/pkg/front_end/testcases/inference_new/infer_field_getter_setter_mismatch.dart
+++ b/pkg/front_end/testcases/inference_new/infer_field_getter_setter_mismatch.dart
@@ -13,7 +13,7 @@
 // Type inference should fail here since the getter and setter for x don't
 // match.
 class B extends A {
-  var /*@topType=int*/ x;
+  var x;
 }
 
 main() {}
diff --git a/pkg/front_end/testcases/inference_new/infer_field_getter_setter_mismatch.dart.strong.expect b/pkg/front_end/testcases/inference_new/infer_field_getter_setter_mismatch.dart.strong.expect
index d33cc4c..9a78098 100644
--- a/pkg/front_end/testcases/inference_new/infer_field_getter_setter_mismatch.dart.strong.expect
+++ b/pkg/front_end/testcases/inference_new/infer_field_getter_setter_mismatch.dart.strong.expect
@@ -2,10 +2,10 @@
 //
 // Problems in library:
 //
-// pkg/front_end/testcases/inference_new/infer_field_getter_setter_mismatch.dart:16:24: Error: The return type of the method 'B.x' is 'int', which does not match the return type, 'double', of the overridden method, 'A.x'.
+// pkg/front_end/testcases/inference_new/infer_field_getter_setter_mismatch.dart:16:7: Error: The return type of the method 'B.x' is 'int', which does not match the return type, 'double', of the overridden method, 'A.x'.
 // Change to a subtype of 'double'.
-//   var /*@topType=int*/ x;
-//                        ^
+//   var x;
+//       ^
 // pkg/front_end/testcases/inference_new/infer_field_getter_setter_mismatch.dart:10:12: Context: This is the overridden method ('x').
 //   void set x(double value);
 //            ^
diff --git a/pkg/front_end/testcases/inference_new/infer_field_override_getter_overrides_setter.dart b/pkg/front_end/testcases/inference_new/infer_field_override_getter_overrides_setter.dart
index 4b47931..7ebfa01 100644
--- a/pkg/front_end/testcases/inference_new/infer_field_override_getter_overrides_setter.dart
+++ b/pkg/front_end/testcases/inference_new/infer_field_override_getter_overrides_setter.dart
@@ -16,7 +16,7 @@
 // The getter in B doesn't screen the setter in A, so inference sees two
 // different types and gives an error.
 class C extends B {
-  var /*@topType=int*/ x;
+  var x;
 }
 
 main() {}
diff --git a/pkg/front_end/testcases/inference_new/infer_field_override_getter_overrides_setter.dart.strong.expect b/pkg/front_end/testcases/inference_new/infer_field_override_getter_overrides_setter.dart.strong.expect
index 9e226c5..83026ec 100644
--- a/pkg/front_end/testcases/inference_new/infer_field_override_getter_overrides_setter.dart.strong.expect
+++ b/pkg/front_end/testcases/inference_new/infer_field_override_getter_overrides_setter.dart.strong.expect
@@ -2,10 +2,10 @@
 //
 // Problems in library:
 //
-// pkg/front_end/testcases/inference_new/infer_field_override_getter_overrides_setter.dart:19:24: Error: The return type of the method 'C.x' is 'int', which does not match the return type, 'num', of the overridden method, 'A.x'.
+// pkg/front_end/testcases/inference_new/infer_field_override_getter_overrides_setter.dart:19:7: Error: The return type of the method 'C.x' is 'int', which does not match the return type, 'num', of the overridden method, 'A.x'.
 // Change to a subtype of 'num'.
-//   var /*@topType=int*/ x;
-//                        ^
+//   var x;
+//       ^
 // pkg/front_end/testcases/inference_new/infer_field_override_getter_overrides_setter.dart:9:12: Context: This is the overridden method ('x').
 //   void set x(num value);
 //            ^
diff --git a/pkg/front_end/testcases/inference_new/infer_field_override_setter_overrides_getter.dart b/pkg/front_end/testcases/inference_new/infer_field_override_setter_overrides_getter.dart
index 182b452..8e774ec 100644
--- a/pkg/front_end/testcases/inference_new/infer_field_override_setter_overrides_getter.dart
+++ b/pkg/front_end/testcases/inference_new/infer_field_override_setter_overrides_getter.dart
@@ -16,7 +16,7 @@
 // The getter in B doesn't screen the setter in A, so inference sees two
 // different types and gives an error.
 class C extends B {
-  var /*@topType=num*/ x;
+  var x;
 }
 
 main() {}
diff --git a/pkg/front_end/testcases/inference_new/infer_instance_accessor_ref.dart b/pkg/front_end/testcases/inference_new/infer_instance_accessor_ref.dart
index 9abb415..fd98fc2 100644
--- a/pkg/front_end/testcases/inference_new/infer_instance_accessor_ref.dart
+++ b/pkg/front_end/testcases/inference_new/infer_instance_accessor_ref.dart
@@ -18,8 +18,8 @@
 
 class D extends C {}
 
-var /*@topType=A*/ a = new A();
-var /*@topType=C*/ x = a. /*@target=A::b*/ b. /*@target=B::c*/ c;
-var /*@topType=C*/ y = a. /*@target=A::b*/ b. /*@target=B::c*/ c ??= new D();
+var a = new A();
+var x = a. /*@target=A::b*/ b. /*@target=B::c*/ c;
+var y = a. /*@target=A::b*/ b. /*@target=B::c*/ c ??= new D();
 
 main() {}
diff --git a/pkg/front_end/testcases/inference_new/infer_instance_field_ref.dart b/pkg/front_end/testcases/inference_new/infer_instance_field_ref.dart
index 192a93b..e649aab 100644
--- a/pkg/front_end/testcases/inference_new/infer_instance_field_ref.dart
+++ b/pkg/front_end/testcases/inference_new/infer_instance_field_ref.dart
@@ -17,8 +17,8 @@
 
 class D extends C {}
 
-var /*@topType=A*/ a = new A();
-var /*@topType=C*/ x = a. /*@target=A::b*/ b. /*@target=B::c*/ c;
-var /*@topType=C*/ y = a. /*@target=A::b*/ b. /*@target=B::c*/ c ??= new D();
+var a = new A();
+var x = a. /*@target=A::b*/ b. /*@target=B::c*/ c;
+var y = a. /*@target=A::b*/ b. /*@target=B::c*/ c ??= new D();
 
 main() {}
diff --git a/pkg/front_end/testcases/inference_new/infer_instance_field_ref_circular.dart b/pkg/front_end/testcases/inference_new/infer_instance_field_ref_circular.dart
index 888321e..9ffd8ea 100644
--- a/pkg/front_end/testcases/inference_new/infer_instance_field_ref_circular.dart
+++ b/pkg/front_end/testcases/inference_new/infer_instance_field_ref_circular.dart
@@ -2,21 +2,18 @@
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
 
-/*@testedFeatures=inference,error*/
+/*@testedFeatures=inference*/
 library test;
 
 // In the code below, there is a circularity between A.b and x.
 
 class A {
-  var /*@topType=dynamic*/ /*@error=CantInferTypeDueToCircularity*/ b = /*@returnType=dynamic*/ () =>
-      x;
-  var /*@topType=() -> dynamic*/ c = /*@returnType=dynamic*/ () => x;
+  var b = /*@returnType=invalid-type*/ () => x;
+  var c = /*@returnType=invalid-type*/ () => x;
 }
 
-var /*@topType=A*/ a = new A();
-var /*@topType=dynamic*/ /*@error=CantInferTypeDueToCircularity*/ x = /*@returnType=dynamic*/ () =>
-    a. /*@target=A::b*/ b;
-var /*@topType=() -> () -> dynamic*/ y = /*@returnType=() -> dynamic*/ () =>
-    a. /*@target=A::c*/ c;
+var a = new A();
+var x = /*@returnType=invalid-type*/ () => a. /*@target=A::b*/ b;
+var y = /*@returnType=() -> invalid-type*/ () => a. /*@target=A::c*/ c;
 
 main() {}
diff --git a/pkg/front_end/testcases/inference_new/infer_instance_field_ref_circular.dart.strong.expect b/pkg/front_end/testcases/inference_new/infer_instance_field_ref_circular.dart.strong.expect
index c125a14..46baf2b 100644
--- a/pkg/front_end/testcases/inference_new/infer_instance_field_ref_circular.dart.strong.expect
+++ b/pkg/front_end/testcases/inference_new/infer_instance_field_ref_circular.dart.strong.expect
@@ -2,27 +2,27 @@
 //
 // Problems in library:
 //
-// pkg/front_end/testcases/inference_new/infer_instance_field_ref_circular.dart:11:69: Error: Can't infer the type of 'b': circularity found during type inference.
+// pkg/front_end/testcases/inference_new/infer_instance_field_ref_circular.dart:11:7: Error: Can't infer the type of 'b': circularity found during type inference.
 // Specify the type explicitly.
-//   var /*@topType=dynamic*/ /*@error=CantInferTypeDueToCircularity*/ b = /*@returnType=dynamic*/ () =>
-//                                                                     ^
+//   var b = /*@returnType=invalid-type*/ () => x;
+//       ^
 //
-// pkg/front_end/testcases/inference_new/infer_instance_field_ref_circular.dart:17:67: Error: Can't infer the type of 'x': circularity found during type inference.
+// pkg/front_end/testcases/inference_new/infer_instance_field_ref_circular.dart:16:5: Error: Can't infer the type of 'x': circularity found during type inference.
 // Specify the type explicitly.
-// var /*@topType=dynamic*/ /*@error=CantInferTypeDueToCircularity*/ x = /*@returnType=dynamic*/ () =>
-//                                                                   ^
+// var x = /*@returnType=invalid-type*/ () => a. /*@target=A::b*/ b;
+//     ^
 //
 import self as self;
 import "dart:core" as core;
 
 class A extends core::Object {
-  field dynamic b = () → dynamic => self::x;
-  field () → dynamic c = () → dynamic => self::x;
+  field invalid-type b = (() → invalid-type => self::x) as{TypeError} invalid-type;
+  field () → invalid-type c = () → invalid-type => self::x;
   synthetic constructor •() → self::A
     : super core::Object::•()
     ;
 }
 static field self::A a = new self::A::•();
-static field dynamic x = () → dynamic => self::a.{self::A::b};
-static field () → () → dynamic y = () → () → dynamic => self::a.{self::A::c};
+static field invalid-type x = (() → invalid-type => self::a.{self::A::b}) as{TypeError} invalid-type;
+static field () → () → invalid-type y = () → () → invalid-type => self::a.{self::A::c};
 static method main() → dynamic {}
diff --git a/pkg/front_end/testcases/inference_new/infer_instance_field_ref_circular.dart.strong.transformed.expect b/pkg/front_end/testcases/inference_new/infer_instance_field_ref_circular.dart.strong.transformed.expect
index c125a14..46baf2b 100644
--- a/pkg/front_end/testcases/inference_new/infer_instance_field_ref_circular.dart.strong.transformed.expect
+++ b/pkg/front_end/testcases/inference_new/infer_instance_field_ref_circular.dart.strong.transformed.expect
@@ -2,27 +2,27 @@
 //
 // Problems in library:
 //
-// pkg/front_end/testcases/inference_new/infer_instance_field_ref_circular.dart:11:69: Error: Can't infer the type of 'b': circularity found during type inference.
+// pkg/front_end/testcases/inference_new/infer_instance_field_ref_circular.dart:11:7: Error: Can't infer the type of 'b': circularity found during type inference.
 // Specify the type explicitly.
-//   var /*@topType=dynamic*/ /*@error=CantInferTypeDueToCircularity*/ b = /*@returnType=dynamic*/ () =>
-//                                                                     ^
+//   var b = /*@returnType=invalid-type*/ () => x;
+//       ^
 //
-// pkg/front_end/testcases/inference_new/infer_instance_field_ref_circular.dart:17:67: Error: Can't infer the type of 'x': circularity found during type inference.
+// pkg/front_end/testcases/inference_new/infer_instance_field_ref_circular.dart:16:5: Error: Can't infer the type of 'x': circularity found during type inference.
 // Specify the type explicitly.
-// var /*@topType=dynamic*/ /*@error=CantInferTypeDueToCircularity*/ x = /*@returnType=dynamic*/ () =>
-//                                                                   ^
+// var x = /*@returnType=invalid-type*/ () => a. /*@target=A::b*/ b;
+//     ^
 //
 import self as self;
 import "dart:core" as core;
 
 class A extends core::Object {
-  field dynamic b = () → dynamic => self::x;
-  field () → dynamic c = () → dynamic => self::x;
+  field invalid-type b = (() → invalid-type => self::x) as{TypeError} invalid-type;
+  field () → invalid-type c = () → invalid-type => self::x;
   synthetic constructor •() → self::A
     : super core::Object::•()
     ;
 }
 static field self::A a = new self::A::•();
-static field dynamic x = () → dynamic => self::a.{self::A::b};
-static field () → () → dynamic y = () → () → dynamic => self::a.{self::A::c};
+static field invalid-type x = (() → invalid-type => self::a.{self::A::b}) as{TypeError} invalid-type;
+static field () → () → invalid-type y = () → () → invalid-type => self::a.{self::A::c};
 static method main() → dynamic {}
diff --git a/pkg/front_end/testcases/inference_new/infer_logical.dart b/pkg/front_end/testcases/inference_new/infer_logical.dart
index 4989c2a..5cf7f8a 100644
--- a/pkg/front_end/testcases/inference_new/infer_logical.dart
+++ b/pkg/front_end/testcases/inference_new/infer_logical.dart
@@ -7,8 +7,8 @@
 
 T f<T>() => null;
 
-var /*@topType=bool*/ x = /*@typeArgs=bool*/ f() || /*@typeArgs=bool*/ f();
-var /*@topType=bool*/ y = /*@typeArgs=bool*/ f() && /*@typeArgs=bool*/ f();
+var x = /*@typeArgs=bool*/ f() || /*@typeArgs=bool*/ f();
+var y = /*@typeArgs=bool*/ f() && /*@typeArgs=bool*/ f();
 
 void test() {
   var /*@type=bool*/ x = /*@typeArgs=bool*/ f() || /*@typeArgs=bool*/ f();
diff --git a/pkg/front_end/testcases/inference_new/infer_use_of_void.dart b/pkg/front_end/testcases/inference_new/infer_use_of_void.dart
index a713ece..a90fa93 100644
--- a/pkg/front_end/testcases/inference_new/infer_use_of_void.dart
+++ b/pkg/front_end/testcases/inference_new/infer_use_of_void.dart
@@ -10,11 +10,10 @@
 }
 
 class C extends B {
-  /*@topType=void*/ f() {}
+  f() {}
 }
 
-var /*@topType=void*/ x =
-    new C(). /*info:USE_OF_VOID_RESULT*/ /*@target=C::f*/ f();
+var x = new C(). /*info:USE_OF_VOID_RESULT*/ /*@target=C::f*/ f();
 
 main() {
   x;
diff --git a/pkg/front_end/testcases/inference_new/invalid_assignment_during_toplevel_inference.dart b/pkg/front_end/testcases/inference_new/invalid_assignment_during_toplevel_inference.dart
index 07bb7f4..6b14c21 100644
--- a/pkg/front_end/testcases/inference_new/invalid_assignment_during_toplevel_inference.dart
+++ b/pkg/front_end/testcases/inference_new/invalid_assignment_during_toplevel_inference.dart
@@ -2,10 +2,10 @@
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
 
-/*@testedFeatures=error,inference*/
+/*@testedFeatures=inference*/
 
 int i;
 String s;
-var /*@topType=String*/ x = i = /*@error=InvalidAssignment*/ s;
+var x = i = s;
 
 main() {}
diff --git a/pkg/front_end/testcases/inference_new/invalid_assignment_during_toplevel_inference.dart.strong.expect b/pkg/front_end/testcases/inference_new/invalid_assignment_during_toplevel_inference.dart.strong.expect
index 28a9284..5768908 100644
--- a/pkg/front_end/testcases/inference_new/invalid_assignment_during_toplevel_inference.dart.strong.expect
+++ b/pkg/front_end/testcases/inference_new/invalid_assignment_during_toplevel_inference.dart.strong.expect
@@ -2,18 +2,18 @@
 //
 // Problems in library:
 //
-// pkg/front_end/testcases/inference_new/invalid_assignment_during_toplevel_inference.dart:9:62: Error: A value of type 'String' can't be assigned to a variable of type 'int'.
+// pkg/front_end/testcases/inference_new/invalid_assignment_during_toplevel_inference.dart:9:13: Error: A value of type 'String' can't be assigned to a variable of type 'int'.
 // Try changing the type of the left hand side, or casting the right hand side to 'int'.
-// var /*@topType=String*/ x = i = /*@error=InvalidAssignment*/ s;
-//                                                              ^
+// var x = i = s;
+//             ^
 //
 import self as self;
 import "dart:core" as core;
 
 static field core::int i;
 static field core::String s;
-static field core::String x = self::i = let final<BottomType> #t1 = invalid-expression "pkg/front_end/testcases/inference_new/invalid_assignment_during_toplevel_inference.dart:9:62: Error: A value of type 'String' can't be assigned to a variable of type 'int'.
+static field core::String x = self::i = let final<BottomType> #t1 = invalid-expression "pkg/front_end/testcases/inference_new/invalid_assignment_during_toplevel_inference.dart:9:13: Error: A value of type 'String' can't be assigned to a variable of type 'int'.
 Try changing the type of the left hand side, or casting the right hand side to 'int'.
-var /*@topType=String*/ x = i = /*@error=InvalidAssignment*/ s;
-                                                             ^" in self::s as{TypeError} core::int;
+var x = i = s;
+            ^" in self::s as{TypeError} core::int;
 static method main() → dynamic {}
diff --git a/pkg/front_end/testcases/inference_new/invalid_assignment_during_toplevel_inference.dart.strong.transformed.expect b/pkg/front_end/testcases/inference_new/invalid_assignment_during_toplevel_inference.dart.strong.transformed.expect
index 90592a6..4b4d6da 100644
--- a/pkg/front_end/testcases/inference_new/invalid_assignment_during_toplevel_inference.dart.strong.transformed.expect
+++ b/pkg/front_end/testcases/inference_new/invalid_assignment_during_toplevel_inference.dart.strong.transformed.expect
@@ -6,6 +6,6 @@
 static field core::String s;
 static field core::String x = self::i = let final<BottomType> #t1 = invalid-expression "pkg/front_end/testcases/inference_new/invalid_assignment_during_toplevel_inference.dart:9:62: Error: A value of type 'dart.core::String' can't be assigned to a variable of type 'dart.core::int'.
 Try changing the type of the left hand side, or casting the right hand side to 'dart.core::int'.
-var /*@topType=String*/ x = i = /*@error=InvalidAssignment*/ s;
+var  x = i = /*@error=InvalidAssignment*/ s;
                                                              ^" in self::s as{TypeError} <BottomType>;
 static method main() → dynamic {}
diff --git a/pkg/front_end/testcases/inference_new/list_literals_can_infer_null_top_level.dart b/pkg/front_end/testcases/inference_new/list_literals_can_infer_null_top_level.dart
index 3a9a4bb..1045584 100644
--- a/pkg/front_end/testcases/inference_new/list_literals_can_infer_null_top_level.dart
+++ b/pkg/front_end/testcases/inference_new/list_literals_can_infer_null_top_level.dart
@@ -5,7 +5,7 @@
 /*@testedFeatures=inference*/
 library test;
 
-var /*@topType=List<Null>*/ x = /*@typeArgs=Null*/ [null];
+var x = /*@typeArgs=Null*/ [null];
 
 main() {
   x;
diff --git a/pkg/front_end/testcases/inference_new/map_literals_can_infer_null_top_level.dart b/pkg/front_end/testcases/inference_new/map_literals_can_infer_null_top_level.dart
index 6b5dccd..04c633b 100644
--- a/pkg/front_end/testcases/inference_new/map_literals_can_infer_null_top_level.dart
+++ b/pkg/front_end/testcases/inference_new/map_literals_can_infer_null_top_level.dart
@@ -5,7 +5,7 @@
 /*@testedFeatures=inference*/
 library test;
 
-var /*@topType=Map<Null, Null>*/ x = /*@typeArgs=Null, Null*/ {null: null};
+var x = /*@typeArgs=Null, Null*/ {null: null};
 
 main() {
   x;
diff --git a/pkg/front_end/testcases/inference_new/property_get_toplevel.dart b/pkg/front_end/testcases/inference_new/property_get_toplevel.dart
index 449ec76..e0201da 100644
--- a/pkg/front_end/testcases/inference_new/property_get_toplevel.dart
+++ b/pkg/front_end/testcases/inference_new/property_get_toplevel.dart
@@ -12,16 +12,12 @@
 }
 
 C c = new C();
-var /*@topType=int*/ field_ref = c. /*@target=C::field*/ field;
-var /*@topType=int*/ getter_ref = c. /*@target=C::getter*/ getter;
-var /*@topType=() -> int*/ function_ref = c. /*@target=C::function*/ function;
-var /*@topType=List<int>*/ field_ref_list = /*@typeArgs=int*/ [
-  c. /*@target=C::field*/ field
-];
-var /*@topType=List<int>*/ getter_ref_list = /*@typeArgs=int*/ [
-  c. /*@target=C::getter*/ getter
-];
-var /*@topType=List<() -> int>*/ function_ref_list = /*@typeArgs=() -> int*/ [
+var field_ref = c. /*@target=C::field*/ field;
+var getter_ref = c. /*@target=C::getter*/ getter;
+var function_ref = c. /*@target=C::function*/ function;
+var field_ref_list = /*@typeArgs=int*/ [c. /*@target=C::field*/ field];
+var getter_ref_list = /*@typeArgs=int*/ [c. /*@target=C::getter*/ getter];
+var function_ref_list = /*@typeArgs=() -> int*/ [
   c. /*@target=C::function*/ function
 ];
 
diff --git a/pkg/front_end/testcases/inference_new/strongly_connected_component.dart b/pkg/front_end/testcases/inference_new/strongly_connected_component.dart
index 0589e0a..788e92f 100644
--- a/pkg/front_end/testcases/inference_new/strongly_connected_component.dart
+++ b/pkg/front_end/testcases/inference_new/strongly_connected_component.dart
@@ -2,7 +2,7 @@
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
 
-/*@testedFeatures=inference,error*/
+/*@testedFeatures=inference*/
 library test;
 
 bool f() => null;
@@ -14,10 +14,8 @@
 // circularity, and for error recovery their type is set to `dynamic`.
 // Thereafter, z infers without problems.
 
-var /*@topType=dynamic*/ /*@error=CantInferTypeDueToCircularity*/ x = /*@returnType=dynamic*/ () =>
-    f() ? y : z;
-var /*@topType=dynamic*/ /*@error=CantInferTypeDueToCircularity*/ y = /*@returnType=dynamic*/ () =>
-    x;
-var /*@topType=() -> dynamic*/ z = /*@returnType=dynamic*/ () => x;
+var x = /*@returnType=invalid-type*/ () => f() ? y : z;
+var y = /*@returnType=invalid-type*/ () => x;
+var z = /*@returnType=invalid-type*/ () => x;
 
 main() {}
diff --git a/pkg/front_end/testcases/inference_new/strongly_connected_component.dart.strong.expect b/pkg/front_end/testcases/inference_new/strongly_connected_component.dart.strong.expect
index 6f86a2f..88bfdb0 100644
--- a/pkg/front_end/testcases/inference_new/strongly_connected_component.dart.strong.expect
+++ b/pkg/front_end/testcases/inference_new/strongly_connected_component.dart.strong.expect
@@ -2,22 +2,22 @@
 //
 // Problems in library:
 //
-// pkg/front_end/testcases/inference_new/strongly_connected_component.dart:19:67: Error: Can't infer the type of 'y': circularity found during type inference.
+// pkg/front_end/testcases/inference_new/strongly_connected_component.dart:18:5: Error: Can't infer the type of 'y': circularity found during type inference.
 // Specify the type explicitly.
-// var /*@topType=dynamic*/ /*@error=CantInferTypeDueToCircularity*/ y = /*@returnType=dynamic*/ () =>
-//                                                                   ^
+// var y = /*@returnType=invalid-type*/ () => x;
+//     ^
 //
-// pkg/front_end/testcases/inference_new/strongly_connected_component.dart:17:67: Error: Can't infer the type of 'x': circularity found during type inference.
+// pkg/front_end/testcases/inference_new/strongly_connected_component.dart:17:5: Error: Can't infer the type of 'x': circularity found during type inference.
 // Specify the type explicitly.
-// var /*@topType=dynamic*/ /*@error=CantInferTypeDueToCircularity*/ x = /*@returnType=dynamic*/ () =>
-//                                                                   ^
+// var x = /*@returnType=invalid-type*/ () => f() ? y : z;
+//     ^
 //
 import self as self;
 import "dart:core" as core;
 
-static field dynamic x = () → dynamic => self::f() ?{dynamic} self::y : self::z;
-static field dynamic y = () → dynamic => self::x;
-static field () → dynamic z = () → dynamic => self::x;
+static field invalid-type x = (() → invalid-type => self::f() ?{invalid-type} self::y : self::z) as{TypeError} invalid-type;
+static field invalid-type y = (() → invalid-type => self::x) as{TypeError} invalid-type;
+static field () → dynamic z = () → invalid-type => self::x;
 static method f() → core::bool
   return null;
 static method main() → dynamic {}
diff --git a/pkg/front_end/testcases/inference_new/strongly_connected_component.dart.strong.transformed.expect b/pkg/front_end/testcases/inference_new/strongly_connected_component.dart.strong.transformed.expect
index 6f86a2f..9a54331 100644
--- a/pkg/front_end/testcases/inference_new/strongly_connected_component.dart.strong.transformed.expect
+++ b/pkg/front_end/testcases/inference_new/strongly_connected_component.dart.strong.transformed.expect
@@ -4,12 +4,12 @@
 //
 // pkg/front_end/testcases/inference_new/strongly_connected_component.dart:19:67: Error: Can't infer the type of 'y': circularity found during type inference.
 // Specify the type explicitly.
-// var /*@topType=dynamic*/ /*@error=CantInferTypeDueToCircularity*/ y = /*@returnType=dynamic*/ () =>
+// var  /*@error=CantInferTypeDueToCircularity*/ y = /*@returnType=dynamic*/ () =>
 //                                                                   ^
 //
 // pkg/front_end/testcases/inference_new/strongly_connected_component.dart:17:67: Error: Can't infer the type of 'x': circularity found during type inference.
 // Specify the type explicitly.
-// var /*@topType=dynamic*/ /*@error=CantInferTypeDueToCircularity*/ x = /*@returnType=dynamic*/ () =>
+// var  /*@error=CantInferTypeDueToCircularity*/ x = /*@returnType=dynamic*/ () =>
 //                                                                   ^
 //
 import self as self;
diff --git a/pkg/front_end/testcases/inference_new/super_index_get_substitution.dart.legacy.expect b/pkg/front_end/testcases/inference_new/super_index_get_substitution.dart.legacy.expect
index b5345da..0f54c8d 100644
--- a/pkg/front_end/testcases/inference_new/super_index_get_substitution.dart.legacy.expect
+++ b/pkg/front_end/testcases/inference_new/super_index_get_substitution.dart.legacy.expect
@@ -19,7 +19,7 @@
   synthetic constructor •() → self::B<self::B::T>
     : super core::Object::•()
     ;
-  operator [](self::E<self::B::T> x) → self::D<self::B::T>
+  operator [](generic-covariant-impl self::E<self::B::T> x) → self::D<self::B::T>
     return null;
 }
 class C<U extends core::Object = dynamic> extends self::B<asy::Future<self::C::U>> {
diff --git a/pkg/front_end/testcases/inference_new/super_index_get_substitution.dart.legacy.transformed.expect b/pkg/front_end/testcases/inference_new/super_index_get_substitution.dart.legacy.transformed.expect
index b5345da..0f54c8d 100644
--- a/pkg/front_end/testcases/inference_new/super_index_get_substitution.dart.legacy.transformed.expect
+++ b/pkg/front_end/testcases/inference_new/super_index_get_substitution.dart.legacy.transformed.expect
@@ -19,7 +19,7 @@
   synthetic constructor •() → self::B<self::B::T>
     : super core::Object::•()
     ;
-  operator [](self::E<self::B::T> x) → self::D<self::B::T>
+  operator [](generic-covariant-impl self::E<self::B::T> x) → self::D<self::B::T>
     return null;
 }
 class C<U extends core::Object = dynamic> extends self::B<asy::Future<self::C::U>> {
diff --git a/pkg/front_end/testcases/inference_new/super_index_get_substitution.dart.outline.expect b/pkg/front_end/testcases/inference_new/super_index_get_substitution.dart.outline.expect
index 44d6487..12ca495 100644
--- a/pkg/front_end/testcases/inference_new/super_index_get_substitution.dart.outline.expect
+++ b/pkg/front_end/testcases/inference_new/super_index_get_substitution.dart.outline.expect
@@ -16,7 +16,7 @@
 class B<T extends core::Object = dynamic> extends core::Object {
   synthetic constructor •() → self::B<self::B::T>
     ;
-  operator [](self::E<self::B::T> x) → self::D<self::B::T>
+  operator [](generic-covariant-impl self::E<self::B::T> x) → self::D<self::B::T>
     ;
 }
 class C<U extends core::Object = dynamic> extends self::B<asy::Future<self::C::U>> {
diff --git a/pkg/front_end/testcases/inference_new/top_level_field_depends_on_multiple_inheritance.dart b/pkg/front_end/testcases/inference_new/top_level_field_depends_on_multiple_inheritance.dart
index b0382f2..d687e58 100644
--- a/pkg/front_end/testcases/inference_new/top_level_field_depends_on_multiple_inheritance.dart
+++ b/pkg/front_end/testcases/inference_new/top_level_field_depends_on_multiple_inheritance.dart
@@ -37,6 +37,6 @@
 // bar().foo resolves to G::foo, which is inherited from E::foo, so its return
 // type is B.  Note that the target is annotated as G::foo, since that is the
 // forwarding stub.
-var /*@topType=B*/ x = bar(). /*@target=G::foo*/ foo();
+var x = bar(). /*@target=G::foo*/ foo();
 
 main() {}
diff --git a/pkg/front_end/testcases/inference_new/unsafe_block_closure_inference_function_call_explicit_dynamic_param_via_expr2.dart b/pkg/front_end/testcases/inference_new/unsafe_block_closure_inference_function_call_explicit_dynamic_param_via_expr2.dart
index 54b5f61..937495a5 100644
--- a/pkg/front_end/testcases/inference_new/unsafe_block_closure_inference_function_call_explicit_dynamic_param_via_expr2.dart
+++ b/pkg/front_end/testcases/inference_new/unsafe_block_closure_inference_function_call_explicit_dynamic_param_via_expr2.dart
@@ -6,7 +6,7 @@
 library test;
 
 List<T> f<T>(T g()) => <T>[g()];
-var /*@topType=List<int>*/ v = (f) /*@typeArgs=int*/ (/*@returnType=int*/ () {
+var v = (f) /*@typeArgs=int*/ (/*@returnType=int*/ () {
   return 1;
 });
 
diff --git a/pkg/front_end/testcases/inference_new/unsafe_block_closure_inference_function_call_explicit_type_param_via_expr2.dart b/pkg/front_end/testcases/inference_new/unsafe_block_closure_inference_function_call_explicit_type_param_via_expr2.dart
index 54b5f61..937495a5 100644
--- a/pkg/front_end/testcases/inference_new/unsafe_block_closure_inference_function_call_explicit_type_param_via_expr2.dart
+++ b/pkg/front_end/testcases/inference_new/unsafe_block_closure_inference_function_call_explicit_type_param_via_expr2.dart
@@ -6,7 +6,7 @@
 library test;
 
 List<T> f<T>(T g()) => <T>[g()];
-var /*@topType=List<int>*/ v = (f) /*@typeArgs=int*/ (/*@returnType=int*/ () {
+var v = (f) /*@typeArgs=int*/ (/*@returnType=int*/ () {
   return 1;
 });
 
diff --git a/pkg/front_end/testcases/inference_new/void_return_type_subtypes_dynamic.dart b/pkg/front_end/testcases/inference_new/void_return_type_subtypes_dynamic.dart
index 0567c06..69ae7ee 100644
--- a/pkg/front_end/testcases/inference_new/void_return_type_subtypes_dynamic.dart
+++ b/pkg/front_end/testcases/inference_new/void_return_type_subtypes_dynamic.dart
@@ -16,7 +16,6 @@
   print("running");
 }
 
-var /*@topType=void*/ y = /*info:USE_OF_VOID_RESULT*/ /*@typeArgs=void*/ run(
-    printRunning);
+var y = /*info:USE_OF_VOID_RESULT*/ /*@typeArgs=void*/ run(printRunning);
 
 main() {}
diff --git a/pkg/front_end/testcases/invalid_assignment.dart b/pkg/front_end/testcases/invalid_assignment.dart
index 346a87a..0c76ccc 100644
--- a/pkg/front_end/testcases/invalid_assignment.dart
+++ b/pkg/front_end/testcases/invalid_assignment.dart
@@ -2,19 +2,17 @@
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
 
-/*@testedFeatures=error*/
-
 class A {
   String operator +(int i) => '';
 }
 
 test(int i, String s, A a) {
   i = 1;
-  i = /*@error=InvalidAssignment*/ s;
+  i = s;
   i ??= 1;
-  i ??= /*@error=InvalidAssignment*/ s;
+  i ??= s;
   a = new A();
-  a /*@error=InvalidAssignment*/ += 1;
+  a += 1;
 }
 
 main() {}
diff --git a/pkg/front_end/testcases/invalid_assignment.dart.strong.expect b/pkg/front_end/testcases/invalid_assignment.dart.strong.expect
index c15f6aa..32d40adc 100644
--- a/pkg/front_end/testcases/invalid_assignment.dart.strong.expect
+++ b/pkg/front_end/testcases/invalid_assignment.dart.strong.expect
@@ -2,21 +2,21 @@
 //
 // Problems in library:
 //
-// pkg/front_end/testcases/invalid_assignment.dart:13:36: Error: A value of type 'String' can't be assigned to a variable of type 'int'.
+// pkg/front_end/testcases/invalid_assignment.dart:11:7: Error: A value of type 'String' can't be assigned to a variable of type 'int'.
 // Try changing the type of the left hand side, or casting the right hand side to 'int'.
-//   i = /*@error=InvalidAssignment*/ s;
-//                                    ^
+//   i = s;
+//       ^
 //
-// pkg/front_end/testcases/invalid_assignment.dart:15:38: Error: A value of type 'String' can't be assigned to a variable of type 'int'.
+// pkg/front_end/testcases/invalid_assignment.dart:13:9: Error: A value of type 'String' can't be assigned to a variable of type 'int'.
 // Try changing the type of the left hand side, or casting the right hand side to 'int'.
-//   i ??= /*@error=InvalidAssignment*/ s;
-//                                      ^
+//   i ??= s;
+//         ^
 //
-// pkg/front_end/testcases/invalid_assignment.dart:17:34: Error: A value of type 'String' can't be assigned to a variable of type 'A'.
+// pkg/front_end/testcases/invalid_assignment.dart:15:5: Error: A value of type 'String' can't be assigned to a variable of type 'A'.
 //  - 'A' is from 'pkg/front_end/testcases/invalid_assignment.dart'.
 // Try changing the type of the left hand side, or casting the right hand side to 'A'.
-//   a /*@error=InvalidAssignment*/ += 1;
-//                                  ^
+//   a += 1;
+//     ^
 //
 import self as self;
 import "dart:core" as core;
@@ -30,20 +30,20 @@
 }
 static method test(core::int i, core::String s, self::A a) → dynamic {
   i = 1;
-  i = let final<BottomType> #t1 = invalid-expression "pkg/front_end/testcases/invalid_assignment.dart:13:36: Error: A value of type 'String' can't be assigned to a variable of type 'int'.
+  i = let final<BottomType> #t1 = invalid-expression "pkg/front_end/testcases/invalid_assignment.dart:11:7: Error: A value of type 'String' can't be assigned to a variable of type 'int'.
 Try changing the type of the left hand side, or casting the right hand side to 'int'.
-  i = /*@error=InvalidAssignment*/ s;
-                                   ^" in s as{TypeError} core::int;
+  i = s;
+      ^" in s as{TypeError} core::int;
   i.{core::num::==}(null) ?{core::int} i = 1 : null;
-  i.{core::num::==}(null) ?{core::Object} i = let final<BottomType> #t2 = invalid-expression "pkg/front_end/testcases/invalid_assignment.dart:15:38: Error: A value of type 'String' can't be assigned to a variable of type 'int'.
+  i.{core::num::==}(null) ?{core::Object} i = let final<BottomType> #t2 = invalid-expression "pkg/front_end/testcases/invalid_assignment.dart:13:9: Error: A value of type 'String' can't be assigned to a variable of type 'int'.
 Try changing the type of the left hand side, or casting the right hand side to 'int'.
-  i ??= /*@error=InvalidAssignment*/ s;
-                                     ^" in s as{TypeError} core::int : null;
+  i ??= s;
+        ^" in s as{TypeError} core::int : null;
   a = new self::A::•();
-  a = let final<BottomType> #t3 = invalid-expression "pkg/front_end/testcases/invalid_assignment.dart:17:34: Error: A value of type 'String' can't be assigned to a variable of type 'A'.
+  a = let final<BottomType> #t3 = invalid-expression "pkg/front_end/testcases/invalid_assignment.dart:15:5: Error: A value of type 'String' can't be assigned to a variable of type 'A'.
  - 'A' is from 'pkg/front_end/testcases/invalid_assignment.dart'.
 Try changing the type of the left hand side, or casting the right hand side to 'A'.
-  a /*@error=InvalidAssignment*/ += 1;
-                                 ^" in a.{self::A::+}(1) as{TypeError} self::A;
+  a += 1;
+    ^" in a.{self::A::+}(1) as{TypeError} self::A;
 }
 static method main() → dynamic {}
diff --git a/pkg/front_end/testcases/invalid_assignment.dart.strong.transformed.expect b/pkg/front_end/testcases/invalid_assignment.dart.strong.transformed.expect
index c15f6aa..32d40adc 100644
--- a/pkg/front_end/testcases/invalid_assignment.dart.strong.transformed.expect
+++ b/pkg/front_end/testcases/invalid_assignment.dart.strong.transformed.expect
@@ -2,21 +2,21 @@
 //
 // Problems in library:
 //
-// pkg/front_end/testcases/invalid_assignment.dart:13:36: Error: A value of type 'String' can't be assigned to a variable of type 'int'.
+// pkg/front_end/testcases/invalid_assignment.dart:11:7: Error: A value of type 'String' can't be assigned to a variable of type 'int'.
 // Try changing the type of the left hand side, or casting the right hand side to 'int'.
-//   i = /*@error=InvalidAssignment*/ s;
-//                                    ^
+//   i = s;
+//       ^
 //
-// pkg/front_end/testcases/invalid_assignment.dart:15:38: Error: A value of type 'String' can't be assigned to a variable of type 'int'.
+// pkg/front_end/testcases/invalid_assignment.dart:13:9: Error: A value of type 'String' can't be assigned to a variable of type 'int'.
 // Try changing the type of the left hand side, or casting the right hand side to 'int'.
-//   i ??= /*@error=InvalidAssignment*/ s;
-//                                      ^
+//   i ??= s;
+//         ^
 //
-// pkg/front_end/testcases/invalid_assignment.dart:17:34: Error: A value of type 'String' can't be assigned to a variable of type 'A'.
+// pkg/front_end/testcases/invalid_assignment.dart:15:5: Error: A value of type 'String' can't be assigned to a variable of type 'A'.
 //  - 'A' is from 'pkg/front_end/testcases/invalid_assignment.dart'.
 // Try changing the type of the left hand side, or casting the right hand side to 'A'.
-//   a /*@error=InvalidAssignment*/ += 1;
-//                                  ^
+//   a += 1;
+//     ^
 //
 import self as self;
 import "dart:core" as core;
@@ -30,20 +30,20 @@
 }
 static method test(core::int i, core::String s, self::A a) → dynamic {
   i = 1;
-  i = let final<BottomType> #t1 = invalid-expression "pkg/front_end/testcases/invalid_assignment.dart:13:36: Error: A value of type 'String' can't be assigned to a variable of type 'int'.
+  i = let final<BottomType> #t1 = invalid-expression "pkg/front_end/testcases/invalid_assignment.dart:11:7: Error: A value of type 'String' can't be assigned to a variable of type 'int'.
 Try changing the type of the left hand side, or casting the right hand side to 'int'.
-  i = /*@error=InvalidAssignment*/ s;
-                                   ^" in s as{TypeError} core::int;
+  i = s;
+      ^" in s as{TypeError} core::int;
   i.{core::num::==}(null) ?{core::int} i = 1 : null;
-  i.{core::num::==}(null) ?{core::Object} i = let final<BottomType> #t2 = invalid-expression "pkg/front_end/testcases/invalid_assignment.dart:15:38: Error: A value of type 'String' can't be assigned to a variable of type 'int'.
+  i.{core::num::==}(null) ?{core::Object} i = let final<BottomType> #t2 = invalid-expression "pkg/front_end/testcases/invalid_assignment.dart:13:9: Error: A value of type 'String' can't be assigned to a variable of type 'int'.
 Try changing the type of the left hand side, or casting the right hand side to 'int'.
-  i ??= /*@error=InvalidAssignment*/ s;
-                                     ^" in s as{TypeError} core::int : null;
+  i ??= s;
+        ^" in s as{TypeError} core::int : null;
   a = new self::A::•();
-  a = let final<BottomType> #t3 = invalid-expression "pkg/front_end/testcases/invalid_assignment.dart:17:34: Error: A value of type 'String' can't be assigned to a variable of type 'A'.
+  a = let final<BottomType> #t3 = invalid-expression "pkg/front_end/testcases/invalid_assignment.dart:15:5: Error: A value of type 'String' can't be assigned to a variable of type 'A'.
  - 'A' is from 'pkg/front_end/testcases/invalid_assignment.dart'.
 Try changing the type of the left hand side, or casting the right hand side to 'A'.
-  a /*@error=InvalidAssignment*/ += 1;
-                                 ^" in a.{self::A::+}(1) as{TypeError} self::A;
+  a += 1;
+    ^" in a.{self::A::+}(1) as{TypeError} self::A;
 }
 static method main() → dynamic {}
diff --git a/pkg/front_end/testcases/invalid_assignment.dart.type_promotion.expect b/pkg/front_end/testcases/invalid_assignment.dart.type_promotion.expect
index abff5c0e..a7b9f5a 100644
--- a/pkg/front_end/testcases/invalid_assignment.dart.type_promotion.expect
+++ b/pkg/front_end/testcases/invalid_assignment.dart.type_promotion.expect
@@ -1,18 +1,18 @@
-pkg/front_end/testcases/invalid_assignment.dart:12:5: Context: Write to i@300
+pkg/front_end/testcases/invalid_assignment.dart:10:5: Context: Write to i@273
   i = 1;
     ^
-pkg/front_end/testcases/invalid_assignment.dart:13:5: Context: Write to i@300
-  i = /*@error=InvalidAssignment*/ s;
+pkg/front_end/testcases/invalid_assignment.dart:11:5: Context: Write to i@273
+  i = s;
     ^
-pkg/front_end/testcases/invalid_assignment.dart:14:5: Context: Write to i@300
+pkg/front_end/testcases/invalid_assignment.dart:12:5: Context: Write to i@273
   i ??= 1;
     ^^^
-pkg/front_end/testcases/invalid_assignment.dart:15:5: Context: Write to i@300
-  i ??= /*@error=InvalidAssignment*/ s;
+pkg/front_end/testcases/invalid_assignment.dart:13:5: Context: Write to i@273
+  i ??= s;
     ^^^
-pkg/front_end/testcases/invalid_assignment.dart:16:5: Context: Write to a@315
+pkg/front_end/testcases/invalid_assignment.dart:14:5: Context: Write to a@288
   a = new A();
     ^
-pkg/front_end/testcases/invalid_assignment.dart:17:34: Context: Write to a@315
-  a /*@error=InvalidAssignment*/ += 1;
-                                 ^^
+pkg/front_end/testcases/invalid_assignment.dart:15:5: Context: Write to a@288
+  a += 1;
+    ^^
diff --git a/pkg/front_end/testcases/invalid_cast.dart b/pkg/front_end/testcases/invalid_cast.dart
index 9baaf86..105b26b 100644
--- a/pkg/front_end/testcases/invalid_cast.dart
+++ b/pkg/front_end/testcases/invalid_cast.dart
@@ -2,8 +2,6 @@
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
 
-/*@testedFeatures=error*/
-
 class C {
   C();
   factory C.fact() => null;
@@ -19,19 +17,17 @@
 
 bad() {
   void localFunction(int i) {}
-  List<int> a = <Object> /*@error=InvalidCastLiteralList*/ [];
-  Map<int, String> b = <Object, String> /*@error=InvalidCastLiteralMap*/ {};
-  Map<int, String> c = <int, Object> /*@error=InvalidCastLiteralMap*/ {};
-  int Function(Object) d = /*@error=InvalidCastFunctionExpr*/ (int i) => i;
+  List<int> a = <Object>[];
+  Map<int, String> b = <Object, String>{};
+  Map<int, String> c = <int, Object>{};
+  int Function(Object) d = (int i) => i;
   D e = new C.fact();
   D f = new C.fact2();
-  D g = new /*@error=InvalidCastNewExpr*/ C.nonFact();
-  D h = new /*@error=InvalidCastNewExpr*/ C.nonFact2();
-  void Function(Object) i =
-      C. /*@error=InvalidCastStaticMethod*/ staticFunction;
-  void Function(Object)
-      j = /*@error=InvalidCastTopLevelFunction*/ topLevelFunction;
-  void Function(Object) k = /*@error=InvalidCastLocalFunction*/ localFunction;
+  D g = new C.nonFact();
+  D h = new C.nonFact2();
+  void Function(Object) i = C.staticFunction;
+  void Function(Object) j = topLevelFunction;
+  void Function(Object) k = localFunction;
 }
 
 ok() {
diff --git a/pkg/front_end/testcases/invalid_cast.dart.strong.expect b/pkg/front_end/testcases/invalid_cast.dart.strong.expect
index 254485f..f9329e5 100644
--- a/pkg/front_end/testcases/invalid_cast.dart.strong.expect
+++ b/pkg/front_end/testcases/invalid_cast.dart.strong.expect
@@ -2,64 +2,64 @@
 //
 // Problems in library:
 //
-// pkg/front_end/testcases/invalid_cast.dart:22:60: Error: The list literal type 'List<Object>' isn't of expected type 'List<int>'.
+// pkg/front_end/testcases/invalid_cast.dart:20:25: Error: The list literal type 'List<Object>' isn't of expected type 'List<int>'.
 //  - 'List' is from 'dart:core'.
 //  - 'Object' is from 'dart:core'.
 // Change the type of the list literal or the context in which it is used.
-//   List<int> a = <Object> /*@error=InvalidCastLiteralList*/ [];
-//                                                            ^
+//   List<int> a = <Object>[];
+//                         ^
 //
-// pkg/front_end/testcases/invalid_cast.dart:23:74: Error: The map literal type 'Map<Object, String>' isn't of expected type 'Map<int, String>'.
+// pkg/front_end/testcases/invalid_cast.dart:21:40: Error: The map literal type 'Map<Object, String>' isn't of expected type 'Map<int, String>'.
 //  - 'Map' is from 'dart:core'.
 //  - 'Object' is from 'dart:core'.
 // Change the type of the map literal or the context in which it is used.
-//   Map<int, String> b = <Object, String> /*@error=InvalidCastLiteralMap*/ {};
-//                                                                          ^
+//   Map<int, String> b = <Object, String>{};
+//                                        ^
 //
-// pkg/front_end/testcases/invalid_cast.dart:24:71: Error: The map literal type 'Map<int, Object>' isn't of expected type 'Map<int, String>'.
+// pkg/front_end/testcases/invalid_cast.dart:22:37: Error: The map literal type 'Map<int, Object>' isn't of expected type 'Map<int, String>'.
 //  - 'Map' is from 'dart:core'.
 //  - 'Object' is from 'dart:core'.
 // Change the type of the map literal or the context in which it is used.
-//   Map<int, String> c = <int, Object> /*@error=InvalidCastLiteralMap*/ {};
-//                                                                       ^
+//   Map<int, String> c = <int, Object>{};
+//                                     ^
 //
-// pkg/front_end/testcases/invalid_cast.dart:25:63: Error: The function expression type 'int Function(int)' isn't of expected type 'int Function(Object)'.
+// pkg/front_end/testcases/invalid_cast.dart:23:28: Error: The function expression type 'int Function(int)' isn't of expected type 'int Function(Object)'.
 //  - 'Object' is from 'dart:core'.
 // Change the type of the function expression or the context in which it is used.
-//   int Function(Object) d = /*@error=InvalidCastFunctionExpr*/ (int i) => i;
-//                                                               ^
+//   int Function(Object) d = (int i) => i;
+//                            ^
 //
-// pkg/front_end/testcases/invalid_cast.dart:28:43: Error: The constructor returns type 'C' that isn't of expected type 'D'.
+// pkg/front_end/testcases/invalid_cast.dart:26:13: Error: The constructor returns type 'C' that isn't of expected type 'D'.
 //  - 'C' is from 'pkg/front_end/testcases/invalid_cast.dart'.
 //  - 'D' is from 'pkg/front_end/testcases/invalid_cast.dart'.
 // Change the type of the object being constructed or the context in which it is used.
-//   D g = new /*@error=InvalidCastNewExpr*/ C.nonFact();
-//                                           ^
+//   D g = new C.nonFact();
+//             ^
 //
-// pkg/front_end/testcases/invalid_cast.dart:29:43: Error: The constructor returns type 'C' that isn't of expected type 'D'.
+// pkg/front_end/testcases/invalid_cast.dart:27:13: Error: The constructor returns type 'C' that isn't of expected type 'D'.
 //  - 'C' is from 'pkg/front_end/testcases/invalid_cast.dart'.
 //  - 'D' is from 'pkg/front_end/testcases/invalid_cast.dart'.
 // Change the type of the object being constructed or the context in which it is used.
-//   D h = new /*@error=InvalidCastNewExpr*/ C.nonFact2();
-//                                           ^
+//   D h = new C.nonFact2();
+//             ^
 //
-// pkg/front_end/testcases/invalid_cast.dart:31:45: Error: The static method has type 'void Function(int)' that isn't of expected type 'void Function(Object)'.
+// pkg/front_end/testcases/invalid_cast.dart:28:31: Error: The static method has type 'void Function(int)' that isn't of expected type 'void Function(Object)'.
 //  - 'Object' is from 'dart:core'.
 // Change the type of the method or the context in which it is used.
-//       C. /*@error=InvalidCastStaticMethod*/ staticFunction;
-//                                             ^
+//   void Function(Object) i = C.staticFunction;
+//                               ^
 //
-// pkg/front_end/testcases/invalid_cast.dart:33:50: Error: The top level function has type 'void Function(int)' that isn't of expected type 'void Function(Object)'.
+// pkg/front_end/testcases/invalid_cast.dart:29:29: Error: The top level function has type 'void Function(int)' that isn't of expected type 'void Function(Object)'.
 //  - 'Object' is from 'dart:core'.
 // Change the type of the function or the context in which it is used.
-//       j = /*@error=InvalidCastTopLevelFunction*/ topLevelFunction;
-//                                                  ^
+//   void Function(Object) j = topLevelFunction;
+//                             ^
 //
-// pkg/front_end/testcases/invalid_cast.dart:34:65: Error: The local function has type 'void Function(int)' that isn't of expected type 'void Function(Object)'.
+// pkg/front_end/testcases/invalid_cast.dart:30:29: Error: The local function has type 'void Function(int)' that isn't of expected type 'void Function(Object)'.
 //  - 'Object' is from 'dart:core'.
 // Change the type of the function or the context in which it is used.
-//   void Function(Object) k = /*@error=InvalidCastLocalFunction*/ localFunction;
-//                                                                 ^
+//   void Function(Object) k = localFunction;
+//                             ^
 //
 import self as self;
 import "dart:core" as core;
@@ -89,58 +89,58 @@
 static method topLevelFunction(core::int i) → void {}
 static method bad() → dynamic {
   function localFunction(core::int i) → void {}
-  core::List<core::int> a = let final<BottomType> #t1 = invalid-expression "pkg/front_end/testcases/invalid_cast.dart:22:60: Error: The list literal type 'List<Object>' isn't of expected type 'List<int>'.
+  core::List<core::int> a = let final<BottomType> #t1 = invalid-expression "pkg/front_end/testcases/invalid_cast.dart:20:25: Error: The list literal type 'List<Object>' isn't of expected type 'List<int>'.
  - 'List' is from 'dart:core'.
  - 'Object' is from 'dart:core'.
 Change the type of the list literal or the context in which it is used.
-  List<int> a = <Object> /*@error=InvalidCastLiteralList*/ [];
-                                                           ^" in <core::Object>[];
-  core::Map<core::int, core::String> b = let final<BottomType> #t2 = invalid-expression "pkg/front_end/testcases/invalid_cast.dart:23:74: Error: The map literal type 'Map<Object, String>' isn't of expected type 'Map<int, String>'.
+  List<int> a = <Object>[];
+                        ^" in <core::Object>[];
+  core::Map<core::int, core::String> b = let final<BottomType> #t2 = invalid-expression "pkg/front_end/testcases/invalid_cast.dart:21:40: Error: The map literal type 'Map<Object, String>' isn't of expected type 'Map<int, String>'.
  - 'Map' is from 'dart:core'.
  - 'Object' is from 'dart:core'.
 Change the type of the map literal or the context in which it is used.
-  Map<int, String> b = <Object, String> /*@error=InvalidCastLiteralMap*/ {};
-                                                                         ^" in <core::Object, core::String>{};
-  core::Map<core::int, core::String> c = let final<BottomType> #t3 = invalid-expression "pkg/front_end/testcases/invalid_cast.dart:24:71: Error: The map literal type 'Map<int, Object>' isn't of expected type 'Map<int, String>'.
+  Map<int, String> b = <Object, String>{};
+                                       ^" in <core::Object, core::String>{};
+  core::Map<core::int, core::String> c = let final<BottomType> #t3 = invalid-expression "pkg/front_end/testcases/invalid_cast.dart:22:37: Error: The map literal type 'Map<int, Object>' isn't of expected type 'Map<int, String>'.
  - 'Map' is from 'dart:core'.
  - 'Object' is from 'dart:core'.
 Change the type of the map literal or the context in which it is used.
-  Map<int, String> c = <int, Object> /*@error=InvalidCastLiteralMap*/ {};
-                                                                      ^" in <core::int, core::Object>{};
-  (core::Object) → core::int d = let final<BottomType> #t4 = invalid-expression "pkg/front_end/testcases/invalid_cast.dart:25:63: Error: The function expression type 'int Function(int)' isn't of expected type 'int Function(Object)'.
+  Map<int, String> c = <int, Object>{};
+                                    ^" in <core::int, core::Object>{};
+  (core::Object) → core::int d = let final<BottomType> #t4 = invalid-expression "pkg/front_end/testcases/invalid_cast.dart:23:28: Error: The function expression type 'int Function(int)' isn't of expected type 'int Function(Object)'.
  - 'Object' is from 'dart:core'.
 Change the type of the function expression or the context in which it is used.
-  int Function(Object) d = /*@error=InvalidCastFunctionExpr*/ (int i) => i;
-                                                              ^" in (core::int i) → core::int => i;
+  int Function(Object) d = (int i) => i;
+                           ^" in (core::int i) → core::int => i;
   self::D e = self::C::fact() as{TypeError} self::D;
   self::D f = new self::D::•() as{TypeError} self::D;
-  self::D g = let final<BottomType> #t5 = invalid-expression "pkg/front_end/testcases/invalid_cast.dart:28:43: Error: The constructor returns type 'C' that isn't of expected type 'D'.
+  self::D g = let final<BottomType> #t5 = invalid-expression "pkg/front_end/testcases/invalid_cast.dart:26:13: Error: The constructor returns type 'C' that isn't of expected type 'D'.
  - 'C' is from 'pkg/front_end/testcases/invalid_cast.dart'.
  - 'D' is from 'pkg/front_end/testcases/invalid_cast.dart'.
 Change the type of the object being constructed or the context in which it is used.
-  D g = new /*@error=InvalidCastNewExpr*/ C.nonFact();
-                                          ^" in new self::C::nonFact();
-  self::D h = let final<BottomType> #t6 = invalid-expression "pkg/front_end/testcases/invalid_cast.dart:29:43: Error: The constructor returns type 'C' that isn't of expected type 'D'.
+  D g = new C.nonFact();
+            ^" in new self::C::nonFact();
+  self::D h = let final<BottomType> #t6 = invalid-expression "pkg/front_end/testcases/invalid_cast.dart:27:13: Error: The constructor returns type 'C' that isn't of expected type 'D'.
  - 'C' is from 'pkg/front_end/testcases/invalid_cast.dart'.
  - 'D' is from 'pkg/front_end/testcases/invalid_cast.dart'.
 Change the type of the object being constructed or the context in which it is used.
-  D h = new /*@error=InvalidCastNewExpr*/ C.nonFact2();
-                                          ^" in new self::C::nonFact2();
-  (core::Object) → void i = let final<BottomType> #t7 = invalid-expression "pkg/front_end/testcases/invalid_cast.dart:31:45: Error: The static method has type 'void Function(int)' that isn't of expected type 'void Function(Object)'.
+  D h = new C.nonFact2();
+            ^" in new self::C::nonFact2();
+  (core::Object) → void i = let final<BottomType> #t7 = invalid-expression "pkg/front_end/testcases/invalid_cast.dart:28:31: Error: The static method has type 'void Function(int)' that isn't of expected type 'void Function(Object)'.
  - 'Object' is from 'dart:core'.
 Change the type of the method or the context in which it is used.
-      C. /*@error=InvalidCastStaticMethod*/ staticFunction;
-                                            ^" in self::C::staticFunction;
-  (core::Object) → void j = let final<BottomType> #t8 = invalid-expression "pkg/front_end/testcases/invalid_cast.dart:33:50: Error: The top level function has type 'void Function(int)' that isn't of expected type 'void Function(Object)'.
+  void Function(Object) i = C.staticFunction;
+                              ^" in self::C::staticFunction;
+  (core::Object) → void j = let final<BottomType> #t8 = invalid-expression "pkg/front_end/testcases/invalid_cast.dart:29:29: Error: The top level function has type 'void Function(int)' that isn't of expected type 'void Function(Object)'.
  - 'Object' is from 'dart:core'.
 Change the type of the function or the context in which it is used.
-      j = /*@error=InvalidCastTopLevelFunction*/ topLevelFunction;
-                                                 ^" in self::topLevelFunction;
-  (core::Object) → void k = let final<BottomType> #t9 = invalid-expression "pkg/front_end/testcases/invalid_cast.dart:34:65: Error: The local function has type 'void Function(int)' that isn't of expected type 'void Function(Object)'.
+  void Function(Object) j = topLevelFunction;
+                            ^" in self::topLevelFunction;
+  (core::Object) → void k = let final<BottomType> #t9 = invalid-expression "pkg/front_end/testcases/invalid_cast.dart:30:29: Error: The local function has type 'void Function(int)' that isn't of expected type 'void Function(Object)'.
  - 'Object' is from 'dart:core'.
 Change the type of the function or the context in which it is used.
-  void Function(Object) k = /*@error=InvalidCastLocalFunction*/ localFunction;
-                                                                ^" in localFunction;
+  void Function(Object) k = localFunction;
+                            ^" in localFunction;
 }
 static method ok() → dynamic {
   function localFunction(core::int i) → void {}
diff --git a/pkg/front_end/testcases/invalid_cast.dart.strong.transformed.expect b/pkg/front_end/testcases/invalid_cast.dart.strong.transformed.expect
index a04133c..6e9e1eb 100644
--- a/pkg/front_end/testcases/invalid_cast.dart.strong.transformed.expect
+++ b/pkg/front_end/testcases/invalid_cast.dart.strong.transformed.expect
@@ -2,64 +2,64 @@
 //
 // Problems in library:
 //
-// pkg/front_end/testcases/invalid_cast.dart:22:60: Error: The list literal type 'List<Object>' isn't of expected type 'List<int>'.
+// pkg/front_end/testcases/invalid_cast.dart:20:25: Error: The list literal type 'List<Object>' isn't of expected type 'List<int>'.
 //  - 'List' is from 'dart:core'.
 //  - 'Object' is from 'dart:core'.
 // Change the type of the list literal or the context in which it is used.
-//   List<int> a = <Object> /*@error=InvalidCastLiteralList*/ [];
-//                                                            ^
+//   List<int> a = <Object>[];
+//                         ^
 //
-// pkg/front_end/testcases/invalid_cast.dart:23:74: Error: The map literal type 'Map<Object, String>' isn't of expected type 'Map<int, String>'.
+// pkg/front_end/testcases/invalid_cast.dart:21:40: Error: The map literal type 'Map<Object, String>' isn't of expected type 'Map<int, String>'.
 //  - 'Map' is from 'dart:core'.
 //  - 'Object' is from 'dart:core'.
 // Change the type of the map literal or the context in which it is used.
-//   Map<int, String> b = <Object, String> /*@error=InvalidCastLiteralMap*/ {};
-//                                                                          ^
+//   Map<int, String> b = <Object, String>{};
+//                                        ^
 //
-// pkg/front_end/testcases/invalid_cast.dart:24:71: Error: The map literal type 'Map<int, Object>' isn't of expected type 'Map<int, String>'.
+// pkg/front_end/testcases/invalid_cast.dart:22:37: Error: The map literal type 'Map<int, Object>' isn't of expected type 'Map<int, String>'.
 //  - 'Map' is from 'dart:core'.
 //  - 'Object' is from 'dart:core'.
 // Change the type of the map literal or the context in which it is used.
-//   Map<int, String> c = <int, Object> /*@error=InvalidCastLiteralMap*/ {};
-//                                                                       ^
+//   Map<int, String> c = <int, Object>{};
+//                                     ^
 //
-// pkg/front_end/testcases/invalid_cast.dart:25:63: Error: The function expression type 'int Function(int)' isn't of expected type 'int Function(Object)'.
+// pkg/front_end/testcases/invalid_cast.dart:23:28: Error: The function expression type 'int Function(int)' isn't of expected type 'int Function(Object)'.
 //  - 'Object' is from 'dart:core'.
 // Change the type of the function expression or the context in which it is used.
-//   int Function(Object) d = /*@error=InvalidCastFunctionExpr*/ (int i) => i;
-//                                                               ^
+//   int Function(Object) d = (int i) => i;
+//                            ^
 //
-// pkg/front_end/testcases/invalid_cast.dart:28:43: Error: The constructor returns type 'C' that isn't of expected type 'D'.
+// pkg/front_end/testcases/invalid_cast.dart:26:13: Error: The constructor returns type 'C' that isn't of expected type 'D'.
 //  - 'C' is from 'pkg/front_end/testcases/invalid_cast.dart'.
 //  - 'D' is from 'pkg/front_end/testcases/invalid_cast.dart'.
 // Change the type of the object being constructed or the context in which it is used.
-//   D g = new /*@error=InvalidCastNewExpr*/ C.nonFact();
-//                                           ^
+//   D g = new C.nonFact();
+//             ^
 //
-// pkg/front_end/testcases/invalid_cast.dart:29:43: Error: The constructor returns type 'C' that isn't of expected type 'D'.
+// pkg/front_end/testcases/invalid_cast.dart:27:13: Error: The constructor returns type 'C' that isn't of expected type 'D'.
 //  - 'C' is from 'pkg/front_end/testcases/invalid_cast.dart'.
 //  - 'D' is from 'pkg/front_end/testcases/invalid_cast.dart'.
 // Change the type of the object being constructed or the context in which it is used.
-//   D h = new /*@error=InvalidCastNewExpr*/ C.nonFact2();
-//                                           ^
+//   D h = new C.nonFact2();
+//             ^
 //
-// pkg/front_end/testcases/invalid_cast.dart:31:45: Error: The static method has type 'void Function(int)' that isn't of expected type 'void Function(Object)'.
+// pkg/front_end/testcases/invalid_cast.dart:28:31: Error: The static method has type 'void Function(int)' that isn't of expected type 'void Function(Object)'.
 //  - 'Object' is from 'dart:core'.
 // Change the type of the method or the context in which it is used.
-//       C. /*@error=InvalidCastStaticMethod*/ staticFunction;
-//                                             ^
+//   void Function(Object) i = C.staticFunction;
+//                               ^
 //
-// pkg/front_end/testcases/invalid_cast.dart:33:50: Error: The top level function has type 'void Function(int)' that isn't of expected type 'void Function(Object)'.
+// pkg/front_end/testcases/invalid_cast.dart:29:29: Error: The top level function has type 'void Function(int)' that isn't of expected type 'void Function(Object)'.
 //  - 'Object' is from 'dart:core'.
 // Change the type of the function or the context in which it is used.
-//       j = /*@error=InvalidCastTopLevelFunction*/ topLevelFunction;
-//                                                  ^
+//   void Function(Object) j = topLevelFunction;
+//                             ^
 //
-// pkg/front_end/testcases/invalid_cast.dart:34:65: Error: The local function has type 'void Function(int)' that isn't of expected type 'void Function(Object)'.
+// pkg/front_end/testcases/invalid_cast.dart:30:29: Error: The local function has type 'void Function(int)' that isn't of expected type 'void Function(Object)'.
 //  - 'Object' is from 'dart:core'.
 // Change the type of the function or the context in which it is used.
-//   void Function(Object) k = /*@error=InvalidCastLocalFunction*/ localFunction;
-//                                                                 ^
+//   void Function(Object) k = localFunction;
+//                             ^
 //
 import self as self;
 import "dart:core" as core;
@@ -89,58 +89,58 @@
 static method topLevelFunction(core::int i) → void {}
 static method bad() → dynamic {
   function localFunction(core::int i) → void {}
-  core::List<core::int> a = let final<BottomType> #t1 = invalid-expression "pkg/front_end/testcases/invalid_cast.dart:22:60: Error: The list literal type 'List<Object>' isn't of expected type 'List<int>'.
+  core::List<core::int> a = let final<BottomType> #t1 = invalid-expression "pkg/front_end/testcases/invalid_cast.dart:20:25: Error: The list literal type 'List<Object>' isn't of expected type 'List<int>'.
  - 'List' is from 'dart:core'.
  - 'Object' is from 'dart:core'.
 Change the type of the list literal or the context in which it is used.
-  List<int> a = <Object> /*@error=InvalidCastLiteralList*/ [];
-                                                           ^" in <core::Object>[];
-  core::Map<core::int, core::String> b = let final<BottomType> #t2 = invalid-expression "pkg/front_end/testcases/invalid_cast.dart:23:74: Error: The map literal type 'Map<Object, String>' isn't of expected type 'Map<int, String>'.
+  List<int> a = <Object>[];
+                        ^" in <core::Object>[];
+  core::Map<core::int, core::String> b = let final<BottomType> #t2 = invalid-expression "pkg/front_end/testcases/invalid_cast.dart:21:40: Error: The map literal type 'Map<Object, String>' isn't of expected type 'Map<int, String>'.
  - 'Map' is from 'dart:core'.
  - 'Object' is from 'dart:core'.
 Change the type of the map literal or the context in which it is used.
-  Map<int, String> b = <Object, String> /*@error=InvalidCastLiteralMap*/ {};
-                                                                         ^" in <core::Object, core::String>{};
-  core::Map<core::int, core::String> c = let final<BottomType> #t3 = invalid-expression "pkg/front_end/testcases/invalid_cast.dart:24:71: Error: The map literal type 'Map<int, Object>' isn't of expected type 'Map<int, String>'.
+  Map<int, String> b = <Object, String>{};
+                                       ^" in <core::Object, core::String>{};
+  core::Map<core::int, core::String> c = let final<BottomType> #t3 = invalid-expression "pkg/front_end/testcases/invalid_cast.dart:22:37: Error: The map literal type 'Map<int, Object>' isn't of expected type 'Map<int, String>'.
  - 'Map' is from 'dart:core'.
  - 'Object' is from 'dart:core'.
 Change the type of the map literal or the context in which it is used.
-  Map<int, String> c = <int, Object> /*@error=InvalidCastLiteralMap*/ {};
-                                                                      ^" in <core::int, core::Object>{};
-  (core::Object) → core::int d = let final<BottomType> #t4 = invalid-expression "pkg/front_end/testcases/invalid_cast.dart:25:63: Error: The function expression type 'int Function(int)' isn't of expected type 'int Function(Object)'.
+  Map<int, String> c = <int, Object>{};
+                                    ^" in <core::int, core::Object>{};
+  (core::Object) → core::int d = let final<BottomType> #t4 = invalid-expression "pkg/front_end/testcases/invalid_cast.dart:23:28: Error: The function expression type 'int Function(int)' isn't of expected type 'int Function(Object)'.
  - 'Object' is from 'dart:core'.
 Change the type of the function expression or the context in which it is used.
-  int Function(Object) d = /*@error=InvalidCastFunctionExpr*/ (int i) => i;
-                                                              ^" in (core::int i) → core::int => i;
+  int Function(Object) d = (int i) => i;
+                           ^" in (core::int i) → core::int => i;
   self::D e = self::C::fact() as{TypeError} self::D;
   self::D f = new self::D::•() as{TypeError} self::D;
-  self::D g = let final<BottomType> #t5 = invalid-expression "pkg/front_end/testcases/invalid_cast.dart:28:43: Error: The constructor returns type 'C' that isn't of expected type 'D'.
+  self::D g = let final<BottomType> #t5 = invalid-expression "pkg/front_end/testcases/invalid_cast.dart:26:13: Error: The constructor returns type 'C' that isn't of expected type 'D'.
  - 'C' is from 'pkg/front_end/testcases/invalid_cast.dart'.
  - 'D' is from 'pkg/front_end/testcases/invalid_cast.dart'.
 Change the type of the object being constructed or the context in which it is used.
-  D g = new /*@error=InvalidCastNewExpr*/ C.nonFact();
-                                          ^" in new self::C::nonFact();
-  self::D h = let final<BottomType> #t6 = invalid-expression "pkg/front_end/testcases/invalid_cast.dart:29:43: Error: The constructor returns type 'C' that isn't of expected type 'D'.
+  D g = new C.nonFact();
+            ^" in new self::C::nonFact();
+  self::D h = let final<BottomType> #t6 = invalid-expression "pkg/front_end/testcases/invalid_cast.dart:27:13: Error: The constructor returns type 'C' that isn't of expected type 'D'.
  - 'C' is from 'pkg/front_end/testcases/invalid_cast.dart'.
  - 'D' is from 'pkg/front_end/testcases/invalid_cast.dart'.
 Change the type of the object being constructed or the context in which it is used.
-  D h = new /*@error=InvalidCastNewExpr*/ C.nonFact2();
-                                          ^" in new self::C::nonFact2();
-  (core::Object) → void i = let final<BottomType> #t7 = invalid-expression "pkg/front_end/testcases/invalid_cast.dart:31:45: Error: The static method has type 'void Function(int)' that isn't of expected type 'void Function(Object)'.
+  D h = new C.nonFact2();
+            ^" in new self::C::nonFact2();
+  (core::Object) → void i = let final<BottomType> #t7 = invalid-expression "pkg/front_end/testcases/invalid_cast.dart:28:31: Error: The static method has type 'void Function(int)' that isn't of expected type 'void Function(Object)'.
  - 'Object' is from 'dart:core'.
 Change the type of the method or the context in which it is used.
-      C. /*@error=InvalidCastStaticMethod*/ staticFunction;
-                                            ^" in self::C::staticFunction;
-  (core::Object) → void j = let final<BottomType> #t8 = invalid-expression "pkg/front_end/testcases/invalid_cast.dart:33:50: Error: The top level function has type 'void Function(int)' that isn't of expected type 'void Function(Object)'.
+  void Function(Object) i = C.staticFunction;
+                              ^" in self::C::staticFunction;
+  (core::Object) → void j = let final<BottomType> #t8 = invalid-expression "pkg/front_end/testcases/invalid_cast.dart:29:29: Error: The top level function has type 'void Function(int)' that isn't of expected type 'void Function(Object)'.
  - 'Object' is from 'dart:core'.
 Change the type of the function or the context in which it is used.
-      j = /*@error=InvalidCastTopLevelFunction*/ topLevelFunction;
-                                                 ^" in self::topLevelFunction;
-  (core::Object) → void k = let final<BottomType> #t9 = invalid-expression "pkg/front_end/testcases/invalid_cast.dart:34:65: Error: The local function has type 'void Function(int)' that isn't of expected type 'void Function(Object)'.
+  void Function(Object) j = topLevelFunction;
+                            ^" in self::topLevelFunction;
+  (core::Object) → void k = let final<BottomType> #t9 = invalid-expression "pkg/front_end/testcases/invalid_cast.dart:30:29: Error: The local function has type 'void Function(int)' that isn't of expected type 'void Function(Object)'.
  - 'Object' is from 'dart:core'.
 Change the type of the function or the context in which it is used.
-  void Function(Object) k = /*@error=InvalidCastLocalFunction*/ localFunction;
-                                                                ^" in localFunction;
+  void Function(Object) k = localFunction;
+                            ^" in localFunction;
 }
 static method ok() → dynamic {
   function localFunction(core::int i) → void {}
diff --git a/pkg/front_end/testcases/issue34899.dart.legacy.expect b/pkg/front_end/testcases/issue34899.dart.legacy.expect
index 41128df..e7b5b76 100644
--- a/pkg/front_end/testcases/issue34899.dart.legacy.expect
+++ b/pkg/front_end/testcases/issue34899.dart.legacy.expect
@@ -5,7 +5,7 @@
 
 class Foo<T extends core::Object = dynamic> extends core::Object {
   final field () → asy::Future<dynamic> quux;
-  field self::Foo::T t;
+  generic-covariant-impl field self::Foo::T t;
   constructor •(() → asy::Future<dynamic> quux, self::Foo::T t) → self::Foo<self::Foo::T>
     : self::Foo::quux = quux, self::Foo::t = t, super core::Object::•()
     ;
diff --git a/pkg/front_end/testcases/issue34899.dart.legacy.transformed.expect b/pkg/front_end/testcases/issue34899.dart.legacy.transformed.expect
index 41128df..e7b5b76 100644
--- a/pkg/front_end/testcases/issue34899.dart.legacy.transformed.expect
+++ b/pkg/front_end/testcases/issue34899.dart.legacy.transformed.expect
@@ -5,7 +5,7 @@
 
 class Foo<T extends core::Object = dynamic> extends core::Object {
   final field () → asy::Future<dynamic> quux;
-  field self::Foo::T t;
+  generic-covariant-impl field self::Foo::T t;
   constructor •(() → asy::Future<dynamic> quux, self::Foo::T t) → self::Foo<self::Foo::T>
     : self::Foo::quux = quux, self::Foo::t = t, super core::Object::•()
     ;
diff --git a/pkg/front_end/testcases/issue34899.dart.outline.expect b/pkg/front_end/testcases/issue34899.dart.outline.expect
index 1d77be0..48da0fa 100644
--- a/pkg/front_end/testcases/issue34899.dart.outline.expect
+++ b/pkg/front_end/testcases/issue34899.dart.outline.expect
@@ -5,7 +5,7 @@
 
 class Foo<T extends core::Object = dynamic> extends core::Object {
   final field () → asy::Future<dynamic> quux;
-  field self::Foo::T t;
+  generic-covariant-impl field self::Foo::T t;
   constructor •(() → asy::Future<dynamic> quux, self::Foo::T t) → self::Foo<self::Foo::T>
     ;
   method call() → asy::Future<self::Foo::T>
diff --git a/pkg/front_end/testcases/legacy.status b/pkg/front_end/testcases/legacy.status
index 947de8b..2489f9f 100644
--- a/pkg/front_end/testcases/legacy.status
+++ b/pkg/front_end/testcases/legacy.status
@@ -11,6 +11,7 @@
 call: Fail # Test can't run.
 constructor_const_inference: RuntimeError # Test exercises strong mode semantics.  See also Issue #33813.
 constructor_initializer_invalid: RuntimeError # Fails execution after recovery
+control_flow_collection: RuntimeError
 duplicated_field_initializer: RuntimeError
 external_import: RuntimeError # Expected -- test uses import which doesn't exist.
 fallthrough: Fail # Missing FallThroughError.
@@ -35,6 +36,7 @@
 micro: Fail # External method marked abstract.
 minimum_int: Crash # Min int literal not supported in non-strong mode.
 named_parameters: Fail # Missing types and unnecessary default values.
+operator_method_not_found: RuntimeError # Expected
 optional: Fail # Unnecessary default values.
 rasta/abstract_constructor: Fail
 rasta/bad_constructor_redirection: Fail
diff --git a/pkg/front_end/testcases/mixin_inherited_setter_for_mixed_in_field.dart.legacy.expect b/pkg/front_end/testcases/mixin_inherited_setter_for_mixed_in_field.dart.legacy.expect
index fb518e4..c22e364 100644
--- a/pkg/front_end/testcases/mixin_inherited_setter_for_mixed_in_field.dart.legacy.expect
+++ b/pkg/front_end/testcases/mixin_inherited_setter_for_mixed_in_field.dart.legacy.expect
@@ -8,11 +8,11 @@
     ;
 }
 class C<T extends self::A = dynamic> extends core::Object {
-  field self::C::T _field = null;
+  generic-covariant-impl field self::C::T _field = null;
   synthetic constructor •() → self::C<self::C::T>
     : super core::Object::•()
     ;
-  method foo(self::C::T x) → dynamic {
+  method foo(generic-covariant-impl self::C::T x) → dynamic {
     this.{self::C::_field} = x;
   }
 }
diff --git a/pkg/front_end/testcases/mixin_inherited_setter_for_mixed_in_field.dart.legacy.transformed.expect b/pkg/front_end/testcases/mixin_inherited_setter_for_mixed_in_field.dart.legacy.transformed.expect
index 9db2af2..b5de22c 100644
--- a/pkg/front_end/testcases/mixin_inherited_setter_for_mixed_in_field.dart.legacy.transformed.expect
+++ b/pkg/front_end/testcases/mixin_inherited_setter_for_mixed_in_field.dart.legacy.transformed.expect
@@ -8,11 +8,11 @@
     ;
 }
 class C<T extends self::A = dynamic> extends core::Object {
-  field self::C::T _field = null;
+  generic-covariant-impl field self::C::T _field = null;
   synthetic constructor •() → self::C<self::C::T>
     : super core::Object::•()
     ;
-  method foo(self::C::T x) → dynamic {
+  method foo(generic-covariant-impl self::C::T x) → dynamic {
     this.{self::C::_field} = x;
   }
 }
@@ -22,11 +22,11 @@
     ;
 }
 abstract class _Foo&Object&C extends core::Object implements self::C<self::B> {
-  field self::B _field = null;
+  generic-covariant-impl field self::B _field = null;
   synthetic constructor •() → self::_Foo&Object&C
     : super core::Object::•()
     ;
-  method foo(self::B x) → dynamic {
+  method foo(generic-covariant-impl self::B x) → dynamic {
     this.{self::C::_field} = x;
   }
 }
diff --git a/pkg/front_end/testcases/mixin_inherited_setter_for_mixed_in_field.dart.outline.expect b/pkg/front_end/testcases/mixin_inherited_setter_for_mixed_in_field.dart.outline.expect
index 1d0284c..340756e 100644
--- a/pkg/front_end/testcases/mixin_inherited_setter_for_mixed_in_field.dart.outline.expect
+++ b/pkg/front_end/testcases/mixin_inherited_setter_for_mixed_in_field.dart.outline.expect
@@ -7,10 +7,10 @@
     ;
 }
 class C<T extends self::A = dynamic> extends core::Object {
-  field self::C::T _field;
+  generic-covariant-impl field self::C::T _field;
   synthetic constructor •() → self::C<self::C::T>
     ;
-  method foo(self::C::T x) → dynamic
+  method foo(generic-covariant-impl self::C::T x) → dynamic
     ;
 }
 class D extends self::C<self::B> {
diff --git a/pkg/front_end/testcases/named_function_scope.dart b/pkg/front_end/testcases/named_function_scope.dart
index 97888e3..25c77b1 100644
--- a/pkg/front_end/testcases/named_function_scope.dart
+++ b/pkg/front_end/testcases/named_function_scope.dart
@@ -2,8 +2,6 @@
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
 
-/*@testedFeatures=error,warning,context*/
-
 class T {}
 
 class V {}
@@ -25,64 +23,51 @@
     T t;
     // This doesn't cause a scope error as the named function expression has
     // its own scope.
-    var x = /*@error=NamedFunctionExpression*/ T() {};
+    var x = T() {};
   }
   {
-    /*@context=DuplicatedNamePreviouslyUsedCause*/ V  v;
+    V v;
     // This causes an error, V is already used in this scope.
-    var /*@error=DuplicatedNamePreviouslyUsed*/ V;
+    var V;
   }
   {
-    /*@context=DuplicatedNamePreviouslyUsedCause*/ V  v;
+    V v;
     // This causes an error, V is already used in this scope.
-    var /*@error=DuplicatedNamePreviouslyUsed*/ V = null;
+    var V = null;
   }
   {
     // This causes a scope error as T is already used in the function-type
     // scope (the return type).
-    var x =
-        /*@context=DuplicatedNamePreviouslyUsedCause*/
-        T
-        /*@error=NamedFunctionExpression*/
-        /*@error=DuplicatedNamePreviouslyUsed*/
-        T() {};
+    var x = T T() {};
   }
   {
     // This causes a scope error: using the outer definition of `V` as a type
     // when defining `V`.
-    /*@context=DuplicatedNamePreviouslyUsedCause*/
-    V /*@error=DuplicatedNamePreviouslyUsed*/ V;
+
+    V V;
   }
   {
     // This causes a scope error as T is already defined as a type variable in
     // the function-type scope.
-    var x =
-        /*@error=NamedFunctionExpression*/
-        /*@error=DuplicatedDeclaration*/
-        T< /*@context=DuplicatedDeclarationCause*/ T>() {};
+    var x = T<T>() {};
   }
   {
-    /*@context=DuplicatedNamePreviouslyUsedCause*/
     T t;
-    T /*@error=DuplicatedNamePreviouslyUsed*/ T() {}
+    T T() {}
   }
   {
-    /*@context=DuplicatedNamePreviouslyUsedCause*/
-    T /*@error=DuplicatedNamePreviouslyUsed*/ T() {}
+    T T() {}
   }
   {
-    /*@context=DuplicatedNamePreviouslyUsedCause*/
     T t;
-    T /*@error=DuplicatedNamePreviouslyUsed*/ T(T t) {}
+    T T(T t) {}
   }
   {
-    /*@context=DuplicatedNamePreviouslyUsedCause*/
-    T /*@error=DuplicatedNamePreviouslyUsed*/ T(T t) {}
+    T T(T t) {}
   }
   {
-    void T(/*@error=NotAType*/ T t) {}
+    void T(T t) {}
   }
 }
 
-void main() {
-}
+void main() {}
diff --git a/pkg/front_end/testcases/named_function_scope.dart.legacy.expect b/pkg/front_end/testcases/named_function_scope.dart.legacy.expect
index 5bc6572..69b1086 100644
--- a/pkg/front_end/testcases/named_function_scope.dart.legacy.expect
+++ b/pkg/front_end/testcases/named_function_scope.dart.legacy.expect
@@ -2,84 +2,84 @@
 //
 // Problems in library:
 //
-// pkg/front_end/testcases/named_function_scope.dart:28:48: Error: A function expression can't have a name.
-//     var x = /*@error=NamedFunctionExpression*/ T() {};
-//                                                ^
+// pkg/front_end/testcases/named_function_scope.dart:26:13: Error: A function expression can't have a name.
+//     var x = T() {};
+//             ^
 //
-// pkg/front_end/testcases/named_function_scope.dart:33:49: Error: Can't declare 'V' because it was already used in this scope.
-//     var /*@error=DuplicatedNamePreviouslyUsed*/ V;
-//                                                 ^
-// pkg/front_end/testcases/named_function_scope.dart:31:52: Context: Previous use of 'V'.
-//     /*@context=DuplicatedNamePreviouslyUsedCause*/ V  v;
-//                                                    ^
-//
-// pkg/front_end/testcases/named_function_scope.dart:38:49: Error: Can't declare 'V' because it was already used in this scope.
-//     var /*@error=DuplicatedNamePreviouslyUsed*/ V = null;
-//                                                 ^
-// pkg/front_end/testcases/named_function_scope.dart:36:52: Context: Previous use of 'V'.
-//     /*@context=DuplicatedNamePreviouslyUsedCause*/ V  v;
-//                                                    ^
-//
-// pkg/front_end/testcases/named_function_scope.dart:48:9: Error: A function expression can't have a name.
-//         T() {};
+// pkg/front_end/testcases/named_function_scope.dart:31:9: Error: Can't declare 'V' because it was already used in this scope.
+//     var V;
 //         ^
-//
-// pkg/front_end/testcases/named_function_scope.dart:48:9: Error: Can't declare 'T' because it was already used in this scope.
-//         T() {};
-//         ^
-// pkg/front_end/testcases/named_function_scope.dart:45:9: Context: Previous use of 'T'.
-//         T
-//         ^
-//
-// pkg/front_end/testcases/named_function_scope.dart:54:47: Error: Can't declare 'V' because it was already used in this scope.
-//     V /*@error=DuplicatedNamePreviouslyUsed*/ V;
-//                                               ^
-// pkg/front_end/testcases/named_function_scope.dart:54:5: Context: Previous use of 'V'.
-//     V /*@error=DuplicatedNamePreviouslyUsed*/ V;
+// pkg/front_end/testcases/named_function_scope.dart:29:5: Context: Previous use of 'V'.
+//     V v;
 //     ^
 //
-// pkg/front_end/testcases/named_function_scope.dart:62:9: Error: A function expression can't have a name.
-//         T< /*@context=DuplicatedDeclarationCause*/ T>() {};
+// pkg/front_end/testcases/named_function_scope.dart:36:9: Error: Can't declare 'V' because it was already used in this scope.
+//     var V = null;
 //         ^
+// pkg/front_end/testcases/named_function_scope.dart:34:5: Context: Previous use of 'V'.
+//     V v;
+//     ^
 //
-// pkg/front_end/testcases/named_function_scope.dart:62:9: Error: 'T' is already declared in this scope.
-//         T< /*@context=DuplicatedDeclarationCause*/ T>() {};
-//         ^
-// pkg/front_end/testcases/named_function_scope.dart:62:52: Context: Previous declaration of 'T'.
-//         T< /*@context=DuplicatedDeclarationCause*/ T>() {};
-//                                                    ^
+// pkg/front_end/testcases/named_function_scope.dart:41:15: Error: A function expression can't have a name.
+//     var x = T T() {};
+//               ^
 //
-// pkg/front_end/testcases/named_function_scope.dart:67:47: Error: Can't declare 'T' because it was already used in this scope.
-//     T /*@error=DuplicatedNamePreviouslyUsed*/ T() {}
-//                                               ^
+// pkg/front_end/testcases/named_function_scope.dart:41:15: Error: Can't declare 'T' because it was already used in this scope.
+//     var x = T T() {};
+//               ^
+// pkg/front_end/testcases/named_function_scope.dart:41:13: Context: Previous use of 'T'.
+//     var x = T T() {};
+//             ^
+//
+// pkg/front_end/testcases/named_function_scope.dart:47:7: Error: Can't declare 'V' because it was already used in this scope.
+//     V V;
+//       ^
+// pkg/front_end/testcases/named_function_scope.dart:47:5: Context: Previous use of 'V'.
+//     V V;
+//     ^
+//
+// pkg/front_end/testcases/named_function_scope.dart:52:13: Error: A function expression can't have a name.
+//     var x = T<T>() {};
+//             ^
+//
+// pkg/front_end/testcases/named_function_scope.dart:52:13: Error: 'T' is already declared in this scope.
+//     var x = T<T>() {};
+//             ^
+// pkg/front_end/testcases/named_function_scope.dart:52:15: Context: Previous declaration of 'T'.
+//     var x = T<T>() {};
+//               ^
+//
+// pkg/front_end/testcases/named_function_scope.dart:56:7: Error: Can't declare 'T' because it was already used in this scope.
+//     T T() {}
+//       ^
+// pkg/front_end/testcases/named_function_scope.dart:55:5: Context: Previous use of 'T'.
+//     T t;
+//     ^
+//
+// pkg/front_end/testcases/named_function_scope.dart:59:7: Error: Can't declare 'T' because it was already used in this scope.
+//     T T() {}
+//       ^
+// pkg/front_end/testcases/named_function_scope.dart:59:5: Context: Previous use of 'T'.
+//     T T() {}
+//     ^
+//
+// pkg/front_end/testcases/named_function_scope.dart:63:7: Error: Can't declare 'T' because it was already used in this scope.
+//     T T(T t) {}
+//       ^
+// pkg/front_end/testcases/named_function_scope.dart:62:5: Context: Previous use of 'T'.
+//     T t;
+//     ^
+//
+// pkg/front_end/testcases/named_function_scope.dart:66:7: Error: Can't declare 'T' because it was already used in this scope.
+//     T T(T t) {}
+//       ^
 // pkg/front_end/testcases/named_function_scope.dart:66:5: Context: Previous use of 'T'.
-//     T t;
+//     T T(T t) {}
 //     ^
 //
-// pkg/front_end/testcases/named_function_scope.dart:71:47: Error: Can't declare 'T' because it was already used in this scope.
-//     T /*@error=DuplicatedNamePreviouslyUsed*/ T() {}
-//                                               ^
-// pkg/front_end/testcases/named_function_scope.dart:71:5: Context: Previous use of 'T'.
-//     T /*@error=DuplicatedNamePreviouslyUsed*/ T() {}
-//     ^
-//
-// pkg/front_end/testcases/named_function_scope.dart:76:47: Error: Can't declare 'T' because it was already used in this scope.
-//     T /*@error=DuplicatedNamePreviouslyUsed*/ T(T t) {}
-//                                               ^
-// pkg/front_end/testcases/named_function_scope.dart:75:5: Context: Previous use of 'T'.
-//     T t;
-//     ^
-//
-// pkg/front_end/testcases/named_function_scope.dart:80:47: Error: Can't declare 'T' because it was already used in this scope.
-//     T /*@error=DuplicatedNamePreviouslyUsed*/ T(T t) {}
-//                                               ^
-// pkg/front_end/testcases/named_function_scope.dart:80:5: Context: Previous use of 'T'.
-//     T /*@error=DuplicatedNamePreviouslyUsed*/ T(T t) {}
-//     ^
-//
-// pkg/front_end/testcases/named_function_scope.dart:83:32: Warning: 'T' isn't a type.
-//     void T(/*@error=NotAType*/ T t) {}
-//                                ^
+// pkg/front_end/testcases/named_function_scope.dart:69:12: Warning: 'T' isn't a type.
+//     void T(T t) {}
+//            ^
 //
 import self as self;
 import "dart:core" as core;
@@ -109,62 +109,62 @@
   }
   {
     self::V v;
-    dynamic V = invalid-expression "pkg/front_end/testcases/named_function_scope.dart:33:49: Error: Can't declare 'V' because it was already used in this scope.
-    var /*@error=DuplicatedNamePreviouslyUsed*/ V;
-                                                ^";
+    dynamic V = invalid-expression "pkg/front_end/testcases/named_function_scope.dart:31:9: Error: Can't declare 'V' because it was already used in this scope.
+    var V;
+        ^";
   }
   {
     self::V v;
-    dynamic V = let final<BottomType> #t1 = invalid-expression "pkg/front_end/testcases/named_function_scope.dart:38:49: Error: Can't declare 'V' because it was already used in this scope.
-    var /*@error=DuplicatedNamePreviouslyUsed*/ V = null;
-                                                ^" in null;
+    dynamic V = let final<BottomType> #t1 = invalid-expression "pkg/front_end/testcases/named_function_scope.dart:36:9: Error: Can't declare 'V' because it was already used in this scope.
+    var V = null;
+        ^" in null;
   }
   {
-    dynamic x = let final dynamic #t2 = invalid-expression "pkg/front_end/testcases/named_function_scope.dart:48:9: Error: Can't declare 'T' because it was already used in this scope.
-        T() {};
-        ^" in let final () → self::T T = () → self::T {} in T;
+    dynamic x = let final dynamic #t2 = invalid-expression "pkg/front_end/testcases/named_function_scope.dart:41:15: Error: Can't declare 'T' because it was already used in this scope.
+    var x = T T() {};
+              ^" in let final () → self::T T = () → self::T {} in T;
   }
   {
-    self::V V = invalid-expression "pkg/front_end/testcases/named_function_scope.dart:54:47: Error: Can't declare 'V' because it was already used in this scope.
-    V /*@error=DuplicatedNamePreviouslyUsed*/ V;
-                                              ^";
+    self::V V = invalid-expression "pkg/front_end/testcases/named_function_scope.dart:47:7: Error: Can't declare 'V' because it was already used in this scope.
+    V V;
+      ^";
   }
   {
-    dynamic x = let final dynamic #t3 = invalid-expression "pkg/front_end/testcases/named_function_scope.dart:62:9: Error: 'T' is already declared in this scope.
-        T< /*@context=DuplicatedDeclarationCause*/ T>() {};
-        ^" in let final <T extends core::Object = dynamic>() → dynamic T = <T extends core::Object = dynamic>() → dynamic {} in T;
+    dynamic x = let final dynamic #t3 = invalid-expression "pkg/front_end/testcases/named_function_scope.dart:52:13: Error: 'T' is already declared in this scope.
+    var x = T<T>() {};
+            ^" in let final <T extends core::Object = dynamic>() → dynamic T = <T extends core::Object = dynamic>() → dynamic {} in T;
   }
   {
     self::T t;
     {
-      invalid-expression "pkg/front_end/testcases/named_function_scope.dart:67:47: Error: Can't declare 'T' because it was already used in this scope.
-    T /*@error=DuplicatedNamePreviouslyUsed*/ T() {}
-                                              ^";
+      invalid-expression "pkg/front_end/testcases/named_function_scope.dart:56:7: Error: Can't declare 'T' because it was already used in this scope.
+    T T() {}
+      ^";
       function T() → self::T {}
     }
   }
   {
     {
-      invalid-expression "pkg/front_end/testcases/named_function_scope.dart:71:47: Error: Can't declare 'T' because it was already used in this scope.
-    T /*@error=DuplicatedNamePreviouslyUsed*/ T() {}
-                                              ^";
+      invalid-expression "pkg/front_end/testcases/named_function_scope.dart:59:7: Error: Can't declare 'T' because it was already used in this scope.
+    T T() {}
+      ^";
       function T() → self::T {}
     }
   }
   {
     self::T t;
     {
-      invalid-expression "pkg/front_end/testcases/named_function_scope.dart:76:47: Error: Can't declare 'T' because it was already used in this scope.
-    T /*@error=DuplicatedNamePreviouslyUsed*/ T(T t) {}
-                                              ^";
+      invalid-expression "pkg/front_end/testcases/named_function_scope.dart:63:7: Error: Can't declare 'T' because it was already used in this scope.
+    T T(T t) {}
+      ^";
       function T(self::T t) → self::T {}
     }
   }
   {
     {
-      invalid-expression "pkg/front_end/testcases/named_function_scope.dart:80:47: Error: Can't declare 'T' because it was already used in this scope.
-    T /*@error=DuplicatedNamePreviouslyUsed*/ T(T t) {}
-                                              ^";
+      invalid-expression "pkg/front_end/testcases/named_function_scope.dart:66:7: Error: Can't declare 'T' because it was already used in this scope.
+    T T(T t) {}
+      ^";
       function T(self::T t) → self::T {}
     }
   }
diff --git a/pkg/front_end/testcases/named_function_scope.dart.legacy.transformed.expect b/pkg/front_end/testcases/named_function_scope.dart.legacy.transformed.expect
index 5bc6572..69b1086 100644
--- a/pkg/front_end/testcases/named_function_scope.dart.legacy.transformed.expect
+++ b/pkg/front_end/testcases/named_function_scope.dart.legacy.transformed.expect
@@ -2,84 +2,84 @@
 //
 // Problems in library:
 //
-// pkg/front_end/testcases/named_function_scope.dart:28:48: Error: A function expression can't have a name.
-//     var x = /*@error=NamedFunctionExpression*/ T() {};
-//                                                ^
+// pkg/front_end/testcases/named_function_scope.dart:26:13: Error: A function expression can't have a name.
+//     var x = T() {};
+//             ^
 //
-// pkg/front_end/testcases/named_function_scope.dart:33:49: Error: Can't declare 'V' because it was already used in this scope.
-//     var /*@error=DuplicatedNamePreviouslyUsed*/ V;
-//                                                 ^
-// pkg/front_end/testcases/named_function_scope.dart:31:52: Context: Previous use of 'V'.
-//     /*@context=DuplicatedNamePreviouslyUsedCause*/ V  v;
-//                                                    ^
-//
-// pkg/front_end/testcases/named_function_scope.dart:38:49: Error: Can't declare 'V' because it was already used in this scope.
-//     var /*@error=DuplicatedNamePreviouslyUsed*/ V = null;
-//                                                 ^
-// pkg/front_end/testcases/named_function_scope.dart:36:52: Context: Previous use of 'V'.
-//     /*@context=DuplicatedNamePreviouslyUsedCause*/ V  v;
-//                                                    ^
-//
-// pkg/front_end/testcases/named_function_scope.dart:48:9: Error: A function expression can't have a name.
-//         T() {};
+// pkg/front_end/testcases/named_function_scope.dart:31:9: Error: Can't declare 'V' because it was already used in this scope.
+//     var V;
 //         ^
-//
-// pkg/front_end/testcases/named_function_scope.dart:48:9: Error: Can't declare 'T' because it was already used in this scope.
-//         T() {};
-//         ^
-// pkg/front_end/testcases/named_function_scope.dart:45:9: Context: Previous use of 'T'.
-//         T
-//         ^
-//
-// pkg/front_end/testcases/named_function_scope.dart:54:47: Error: Can't declare 'V' because it was already used in this scope.
-//     V /*@error=DuplicatedNamePreviouslyUsed*/ V;
-//                                               ^
-// pkg/front_end/testcases/named_function_scope.dart:54:5: Context: Previous use of 'V'.
-//     V /*@error=DuplicatedNamePreviouslyUsed*/ V;
+// pkg/front_end/testcases/named_function_scope.dart:29:5: Context: Previous use of 'V'.
+//     V v;
 //     ^
 //
-// pkg/front_end/testcases/named_function_scope.dart:62:9: Error: A function expression can't have a name.
-//         T< /*@context=DuplicatedDeclarationCause*/ T>() {};
+// pkg/front_end/testcases/named_function_scope.dart:36:9: Error: Can't declare 'V' because it was already used in this scope.
+//     var V = null;
 //         ^
+// pkg/front_end/testcases/named_function_scope.dart:34:5: Context: Previous use of 'V'.
+//     V v;
+//     ^
 //
-// pkg/front_end/testcases/named_function_scope.dart:62:9: Error: 'T' is already declared in this scope.
-//         T< /*@context=DuplicatedDeclarationCause*/ T>() {};
-//         ^
-// pkg/front_end/testcases/named_function_scope.dart:62:52: Context: Previous declaration of 'T'.
-//         T< /*@context=DuplicatedDeclarationCause*/ T>() {};
-//                                                    ^
+// pkg/front_end/testcases/named_function_scope.dart:41:15: Error: A function expression can't have a name.
+//     var x = T T() {};
+//               ^
 //
-// pkg/front_end/testcases/named_function_scope.dart:67:47: Error: Can't declare 'T' because it was already used in this scope.
-//     T /*@error=DuplicatedNamePreviouslyUsed*/ T() {}
-//                                               ^
+// pkg/front_end/testcases/named_function_scope.dart:41:15: Error: Can't declare 'T' because it was already used in this scope.
+//     var x = T T() {};
+//               ^
+// pkg/front_end/testcases/named_function_scope.dart:41:13: Context: Previous use of 'T'.
+//     var x = T T() {};
+//             ^
+//
+// pkg/front_end/testcases/named_function_scope.dart:47:7: Error: Can't declare 'V' because it was already used in this scope.
+//     V V;
+//       ^
+// pkg/front_end/testcases/named_function_scope.dart:47:5: Context: Previous use of 'V'.
+//     V V;
+//     ^
+//
+// pkg/front_end/testcases/named_function_scope.dart:52:13: Error: A function expression can't have a name.
+//     var x = T<T>() {};
+//             ^
+//
+// pkg/front_end/testcases/named_function_scope.dart:52:13: Error: 'T' is already declared in this scope.
+//     var x = T<T>() {};
+//             ^
+// pkg/front_end/testcases/named_function_scope.dart:52:15: Context: Previous declaration of 'T'.
+//     var x = T<T>() {};
+//               ^
+//
+// pkg/front_end/testcases/named_function_scope.dart:56:7: Error: Can't declare 'T' because it was already used in this scope.
+//     T T() {}
+//       ^
+// pkg/front_end/testcases/named_function_scope.dart:55:5: Context: Previous use of 'T'.
+//     T t;
+//     ^
+//
+// pkg/front_end/testcases/named_function_scope.dart:59:7: Error: Can't declare 'T' because it was already used in this scope.
+//     T T() {}
+//       ^
+// pkg/front_end/testcases/named_function_scope.dart:59:5: Context: Previous use of 'T'.
+//     T T() {}
+//     ^
+//
+// pkg/front_end/testcases/named_function_scope.dart:63:7: Error: Can't declare 'T' because it was already used in this scope.
+//     T T(T t) {}
+//       ^
+// pkg/front_end/testcases/named_function_scope.dart:62:5: Context: Previous use of 'T'.
+//     T t;
+//     ^
+//
+// pkg/front_end/testcases/named_function_scope.dart:66:7: Error: Can't declare 'T' because it was already used in this scope.
+//     T T(T t) {}
+//       ^
 // pkg/front_end/testcases/named_function_scope.dart:66:5: Context: Previous use of 'T'.
-//     T t;
+//     T T(T t) {}
 //     ^
 //
-// pkg/front_end/testcases/named_function_scope.dart:71:47: Error: Can't declare 'T' because it was already used in this scope.
-//     T /*@error=DuplicatedNamePreviouslyUsed*/ T() {}
-//                                               ^
-// pkg/front_end/testcases/named_function_scope.dart:71:5: Context: Previous use of 'T'.
-//     T /*@error=DuplicatedNamePreviouslyUsed*/ T() {}
-//     ^
-//
-// pkg/front_end/testcases/named_function_scope.dart:76:47: Error: Can't declare 'T' because it was already used in this scope.
-//     T /*@error=DuplicatedNamePreviouslyUsed*/ T(T t) {}
-//                                               ^
-// pkg/front_end/testcases/named_function_scope.dart:75:5: Context: Previous use of 'T'.
-//     T t;
-//     ^
-//
-// pkg/front_end/testcases/named_function_scope.dart:80:47: Error: Can't declare 'T' because it was already used in this scope.
-//     T /*@error=DuplicatedNamePreviouslyUsed*/ T(T t) {}
-//                                               ^
-// pkg/front_end/testcases/named_function_scope.dart:80:5: Context: Previous use of 'T'.
-//     T /*@error=DuplicatedNamePreviouslyUsed*/ T(T t) {}
-//     ^
-//
-// pkg/front_end/testcases/named_function_scope.dart:83:32: Warning: 'T' isn't a type.
-//     void T(/*@error=NotAType*/ T t) {}
-//                                ^
+// pkg/front_end/testcases/named_function_scope.dart:69:12: Warning: 'T' isn't a type.
+//     void T(T t) {}
+//            ^
 //
 import self as self;
 import "dart:core" as core;
@@ -109,62 +109,62 @@
   }
   {
     self::V v;
-    dynamic V = invalid-expression "pkg/front_end/testcases/named_function_scope.dart:33:49: Error: Can't declare 'V' because it was already used in this scope.
-    var /*@error=DuplicatedNamePreviouslyUsed*/ V;
-                                                ^";
+    dynamic V = invalid-expression "pkg/front_end/testcases/named_function_scope.dart:31:9: Error: Can't declare 'V' because it was already used in this scope.
+    var V;
+        ^";
   }
   {
     self::V v;
-    dynamic V = let final<BottomType> #t1 = invalid-expression "pkg/front_end/testcases/named_function_scope.dart:38:49: Error: Can't declare 'V' because it was already used in this scope.
-    var /*@error=DuplicatedNamePreviouslyUsed*/ V = null;
-                                                ^" in null;
+    dynamic V = let final<BottomType> #t1 = invalid-expression "pkg/front_end/testcases/named_function_scope.dart:36:9: Error: Can't declare 'V' because it was already used in this scope.
+    var V = null;
+        ^" in null;
   }
   {
-    dynamic x = let final dynamic #t2 = invalid-expression "pkg/front_end/testcases/named_function_scope.dart:48:9: Error: Can't declare 'T' because it was already used in this scope.
-        T() {};
-        ^" in let final () → self::T T = () → self::T {} in T;
+    dynamic x = let final dynamic #t2 = invalid-expression "pkg/front_end/testcases/named_function_scope.dart:41:15: Error: Can't declare 'T' because it was already used in this scope.
+    var x = T T() {};
+              ^" in let final () → self::T T = () → self::T {} in T;
   }
   {
-    self::V V = invalid-expression "pkg/front_end/testcases/named_function_scope.dart:54:47: Error: Can't declare 'V' because it was already used in this scope.
-    V /*@error=DuplicatedNamePreviouslyUsed*/ V;
-                                              ^";
+    self::V V = invalid-expression "pkg/front_end/testcases/named_function_scope.dart:47:7: Error: Can't declare 'V' because it was already used in this scope.
+    V V;
+      ^";
   }
   {
-    dynamic x = let final dynamic #t3 = invalid-expression "pkg/front_end/testcases/named_function_scope.dart:62:9: Error: 'T' is already declared in this scope.
-        T< /*@context=DuplicatedDeclarationCause*/ T>() {};
-        ^" in let final <T extends core::Object = dynamic>() → dynamic T = <T extends core::Object = dynamic>() → dynamic {} in T;
+    dynamic x = let final dynamic #t3 = invalid-expression "pkg/front_end/testcases/named_function_scope.dart:52:13: Error: 'T' is already declared in this scope.
+    var x = T<T>() {};
+            ^" in let final <T extends core::Object = dynamic>() → dynamic T = <T extends core::Object = dynamic>() → dynamic {} in T;
   }
   {
     self::T t;
     {
-      invalid-expression "pkg/front_end/testcases/named_function_scope.dart:67:47: Error: Can't declare 'T' because it was already used in this scope.
-    T /*@error=DuplicatedNamePreviouslyUsed*/ T() {}
-                                              ^";
+      invalid-expression "pkg/front_end/testcases/named_function_scope.dart:56:7: Error: Can't declare 'T' because it was already used in this scope.
+    T T() {}
+      ^";
       function T() → self::T {}
     }
   }
   {
     {
-      invalid-expression "pkg/front_end/testcases/named_function_scope.dart:71:47: Error: Can't declare 'T' because it was already used in this scope.
-    T /*@error=DuplicatedNamePreviouslyUsed*/ T() {}
-                                              ^";
+      invalid-expression "pkg/front_end/testcases/named_function_scope.dart:59:7: Error: Can't declare 'T' because it was already used in this scope.
+    T T() {}
+      ^";
       function T() → self::T {}
     }
   }
   {
     self::T t;
     {
-      invalid-expression "pkg/front_end/testcases/named_function_scope.dart:76:47: Error: Can't declare 'T' because it was already used in this scope.
-    T /*@error=DuplicatedNamePreviouslyUsed*/ T(T t) {}
-                                              ^";
+      invalid-expression "pkg/front_end/testcases/named_function_scope.dart:63:7: Error: Can't declare 'T' because it was already used in this scope.
+    T T(T t) {}
+      ^";
       function T(self::T t) → self::T {}
     }
   }
   {
     {
-      invalid-expression "pkg/front_end/testcases/named_function_scope.dart:80:47: Error: Can't declare 'T' because it was already used in this scope.
-    T /*@error=DuplicatedNamePreviouslyUsed*/ T(T t) {}
-                                              ^";
+      invalid-expression "pkg/front_end/testcases/named_function_scope.dart:66:7: Error: Can't declare 'T' because it was already used in this scope.
+    T T(T t) {}
+      ^";
       function T(self::T t) → self::T {}
     }
   }
diff --git a/pkg/front_end/testcases/named_function_scope.dart.strong.expect b/pkg/front_end/testcases/named_function_scope.dart.strong.expect
index d898d98..ec10637 100644
--- a/pkg/front_end/testcases/named_function_scope.dart.strong.expect
+++ b/pkg/front_end/testcases/named_function_scope.dart.strong.expect
@@ -2,84 +2,84 @@
 //
 // Problems in library:
 //
-// pkg/front_end/testcases/named_function_scope.dart:28:48: Error: A function expression can't have a name.
-//     var x = /*@error=NamedFunctionExpression*/ T() {};
-//                                                ^
+// pkg/front_end/testcases/named_function_scope.dart:26:13: Error: A function expression can't have a name.
+//     var x = T() {};
+//             ^
 //
-// pkg/front_end/testcases/named_function_scope.dart:33:49: Error: Can't declare 'V' because it was already used in this scope.
-//     var /*@error=DuplicatedNamePreviouslyUsed*/ V;
-//                                                 ^
-// pkg/front_end/testcases/named_function_scope.dart:31:52: Context: Previous use of 'V'.
-//     /*@context=DuplicatedNamePreviouslyUsedCause*/ V  v;
-//                                                    ^
-//
-// pkg/front_end/testcases/named_function_scope.dart:38:49: Error: Can't declare 'V' because it was already used in this scope.
-//     var /*@error=DuplicatedNamePreviouslyUsed*/ V = null;
-//                                                 ^
-// pkg/front_end/testcases/named_function_scope.dart:36:52: Context: Previous use of 'V'.
-//     /*@context=DuplicatedNamePreviouslyUsedCause*/ V  v;
-//                                                    ^
-//
-// pkg/front_end/testcases/named_function_scope.dart:48:9: Error: A function expression can't have a name.
-//         T() {};
+// pkg/front_end/testcases/named_function_scope.dart:31:9: Error: Can't declare 'V' because it was already used in this scope.
+//     var V;
 //         ^
-//
-// pkg/front_end/testcases/named_function_scope.dart:48:9: Error: Can't declare 'T' because it was already used in this scope.
-//         T() {};
-//         ^
-// pkg/front_end/testcases/named_function_scope.dart:45:9: Context: Previous use of 'T'.
-//         T
-//         ^
-//
-// pkg/front_end/testcases/named_function_scope.dart:54:47: Error: Can't declare 'V' because it was already used in this scope.
-//     V /*@error=DuplicatedNamePreviouslyUsed*/ V;
-//                                               ^
-// pkg/front_end/testcases/named_function_scope.dart:54:5: Context: Previous use of 'V'.
-//     V /*@error=DuplicatedNamePreviouslyUsed*/ V;
+// pkg/front_end/testcases/named_function_scope.dart:29:5: Context: Previous use of 'V'.
+//     V v;
 //     ^
 //
-// pkg/front_end/testcases/named_function_scope.dart:62:9: Error: A function expression can't have a name.
-//         T< /*@context=DuplicatedDeclarationCause*/ T>() {};
+// pkg/front_end/testcases/named_function_scope.dart:36:9: Error: Can't declare 'V' because it was already used in this scope.
+//     var V = null;
 //         ^
+// pkg/front_end/testcases/named_function_scope.dart:34:5: Context: Previous use of 'V'.
+//     V v;
+//     ^
 //
-// pkg/front_end/testcases/named_function_scope.dart:62:9: Error: 'T' is already declared in this scope.
-//         T< /*@context=DuplicatedDeclarationCause*/ T>() {};
-//         ^
-// pkg/front_end/testcases/named_function_scope.dart:62:52: Context: Previous declaration of 'T'.
-//         T< /*@context=DuplicatedDeclarationCause*/ T>() {};
-//                                                    ^
+// pkg/front_end/testcases/named_function_scope.dart:41:15: Error: A function expression can't have a name.
+//     var x = T T() {};
+//               ^
 //
-// pkg/front_end/testcases/named_function_scope.dart:67:47: Error: Can't declare 'T' because it was already used in this scope.
-//     T /*@error=DuplicatedNamePreviouslyUsed*/ T() {}
-//                                               ^
+// pkg/front_end/testcases/named_function_scope.dart:41:15: Error: Can't declare 'T' because it was already used in this scope.
+//     var x = T T() {};
+//               ^
+// pkg/front_end/testcases/named_function_scope.dart:41:13: Context: Previous use of 'T'.
+//     var x = T T() {};
+//             ^
+//
+// pkg/front_end/testcases/named_function_scope.dart:47:7: Error: Can't declare 'V' because it was already used in this scope.
+//     V V;
+//       ^
+// pkg/front_end/testcases/named_function_scope.dart:47:5: Context: Previous use of 'V'.
+//     V V;
+//     ^
+//
+// pkg/front_end/testcases/named_function_scope.dart:52:13: Error: A function expression can't have a name.
+//     var x = T<T>() {};
+//             ^
+//
+// pkg/front_end/testcases/named_function_scope.dart:52:13: Error: 'T' is already declared in this scope.
+//     var x = T<T>() {};
+//             ^
+// pkg/front_end/testcases/named_function_scope.dart:52:15: Context: Previous declaration of 'T'.
+//     var x = T<T>() {};
+//               ^
+//
+// pkg/front_end/testcases/named_function_scope.dart:56:7: Error: Can't declare 'T' because it was already used in this scope.
+//     T T() {}
+//       ^
+// pkg/front_end/testcases/named_function_scope.dart:55:5: Context: Previous use of 'T'.
+//     T t;
+//     ^
+//
+// pkg/front_end/testcases/named_function_scope.dart:59:7: Error: Can't declare 'T' because it was already used in this scope.
+//     T T() {}
+//       ^
+// pkg/front_end/testcases/named_function_scope.dart:59:5: Context: Previous use of 'T'.
+//     T T() {}
+//     ^
+//
+// pkg/front_end/testcases/named_function_scope.dart:63:7: Error: Can't declare 'T' because it was already used in this scope.
+//     T T(T t) {}
+//       ^
+// pkg/front_end/testcases/named_function_scope.dart:62:5: Context: Previous use of 'T'.
+//     T t;
+//     ^
+//
+// pkg/front_end/testcases/named_function_scope.dart:66:7: Error: Can't declare 'T' because it was already used in this scope.
+//     T T(T t) {}
+//       ^
 // pkg/front_end/testcases/named_function_scope.dart:66:5: Context: Previous use of 'T'.
-//     T t;
+//     T T(T t) {}
 //     ^
 //
-// pkg/front_end/testcases/named_function_scope.dart:71:47: Error: Can't declare 'T' because it was already used in this scope.
-//     T /*@error=DuplicatedNamePreviouslyUsed*/ T() {}
-//                                               ^
-// pkg/front_end/testcases/named_function_scope.dart:71:5: Context: Previous use of 'T'.
-//     T /*@error=DuplicatedNamePreviouslyUsed*/ T() {}
-//     ^
-//
-// pkg/front_end/testcases/named_function_scope.dart:76:47: Error: Can't declare 'T' because it was already used in this scope.
-//     T /*@error=DuplicatedNamePreviouslyUsed*/ T(T t) {}
-//                                               ^
-// pkg/front_end/testcases/named_function_scope.dart:75:5: Context: Previous use of 'T'.
-//     T t;
-//     ^
-//
-// pkg/front_end/testcases/named_function_scope.dart:80:47: Error: Can't declare 'T' because it was already used in this scope.
-//     T /*@error=DuplicatedNamePreviouslyUsed*/ T(T t) {}
-//                                               ^
-// pkg/front_end/testcases/named_function_scope.dart:80:5: Context: Previous use of 'T'.
-//     T /*@error=DuplicatedNamePreviouslyUsed*/ T(T t) {}
-//     ^
-//
-// pkg/front_end/testcases/named_function_scope.dart:83:32: Error: 'T' isn't a type.
-//     void T(/*@error=NotAType*/ T t) {}
-//                                ^
+// pkg/front_end/testcases/named_function_scope.dart:69:12: Error: 'T' isn't a type.
+//     void T(T t) {}
+//            ^
 //
 import self as self;
 import "dart:core" as core;
@@ -109,62 +109,62 @@
   }
   {
     self::V v;
-    dynamic V = invalid-expression "pkg/front_end/testcases/named_function_scope.dart:33:49: Error: Can't declare 'V' because it was already used in this scope.
-    var /*@error=DuplicatedNamePreviouslyUsed*/ V;
-                                                ^";
+    dynamic V = invalid-expression "pkg/front_end/testcases/named_function_scope.dart:31:9: Error: Can't declare 'V' because it was already used in this scope.
+    var V;
+        ^";
   }
   {
     self::V v;
-    dynamic V = let final<BottomType> #t1 = invalid-expression "pkg/front_end/testcases/named_function_scope.dart:38:49: Error: Can't declare 'V' because it was already used in this scope.
-    var /*@error=DuplicatedNamePreviouslyUsed*/ V = null;
-                                                ^" in null;
+    dynamic V = let final<BottomType> #t1 = invalid-expression "pkg/front_end/testcases/named_function_scope.dart:36:9: Error: Can't declare 'V' because it was already used in this scope.
+    var V = null;
+        ^" in null;
   }
   {
-    dynamic x = let final dynamic #t2 = invalid-expression "pkg/front_end/testcases/named_function_scope.dart:48:9: Error: Can't declare 'T' because it was already used in this scope.
-        T() {};
-        ^" in let final () → self::T T = () → self::T {} in T;
+    dynamic x = let final dynamic #t2 = invalid-expression "pkg/front_end/testcases/named_function_scope.dart:41:15: Error: Can't declare 'T' because it was already used in this scope.
+    var x = T T() {};
+              ^" in let final () → self::T T = () → self::T {} in T;
   }
   {
-    self::V V = invalid-expression "pkg/front_end/testcases/named_function_scope.dart:54:47: Error: Can't declare 'V' because it was already used in this scope.
-    V /*@error=DuplicatedNamePreviouslyUsed*/ V;
-                                              ^" as{TypeError} self::V;
+    self::V V = invalid-expression "pkg/front_end/testcases/named_function_scope.dart:47:7: Error: Can't declare 'V' because it was already used in this scope.
+    V V;
+      ^" as{TypeError} self::V;
   }
   {
-    dynamic x = let final dynamic #t3 = invalid-expression "pkg/front_end/testcases/named_function_scope.dart:62:9: Error: 'T' is already declared in this scope.
-        T< /*@context=DuplicatedDeclarationCause*/ T>() {};
-        ^" in let final <T extends core::Object = dynamic>() → dynamic T = <T extends core::Object = dynamic>() → dynamic {} in T;
+    dynamic x = let final dynamic #t3 = invalid-expression "pkg/front_end/testcases/named_function_scope.dart:52:13: Error: 'T' is already declared in this scope.
+    var x = T<T>() {};
+            ^" in let final <T extends core::Object = dynamic>() → dynamic T = <T extends core::Object = dynamic>() → dynamic {} in T;
   }
   {
     self::T t;
     {
-      invalid-expression "pkg/front_end/testcases/named_function_scope.dart:67:47: Error: Can't declare 'T' because it was already used in this scope.
-    T /*@error=DuplicatedNamePreviouslyUsed*/ T() {}
-                                              ^";
+      invalid-expression "pkg/front_end/testcases/named_function_scope.dart:56:7: Error: Can't declare 'T' because it was already used in this scope.
+    T T() {}
+      ^";
       function T() → self::T {}
     }
   }
   {
     {
-      invalid-expression "pkg/front_end/testcases/named_function_scope.dart:71:47: Error: Can't declare 'T' because it was already used in this scope.
-    T /*@error=DuplicatedNamePreviouslyUsed*/ T() {}
-                                              ^";
+      invalid-expression "pkg/front_end/testcases/named_function_scope.dart:59:7: Error: Can't declare 'T' because it was already used in this scope.
+    T T() {}
+      ^";
       function T() → self::T {}
     }
   }
   {
     self::T t;
     {
-      invalid-expression "pkg/front_end/testcases/named_function_scope.dart:76:47: Error: Can't declare 'T' because it was already used in this scope.
-    T /*@error=DuplicatedNamePreviouslyUsed*/ T(T t) {}
-                                              ^";
+      invalid-expression "pkg/front_end/testcases/named_function_scope.dart:63:7: Error: Can't declare 'T' because it was already used in this scope.
+    T T(T t) {}
+      ^";
       function T(self::T t) → self::T {}
     }
   }
   {
     {
-      invalid-expression "pkg/front_end/testcases/named_function_scope.dart:80:47: Error: Can't declare 'T' because it was already used in this scope.
-    T /*@error=DuplicatedNamePreviouslyUsed*/ T(T t) {}
-                                              ^";
+      invalid-expression "pkg/front_end/testcases/named_function_scope.dart:66:7: Error: Can't declare 'T' because it was already used in this scope.
+    T T(T t) {}
+      ^";
       function T(self::T t) → self::T {}
     }
   }
diff --git a/pkg/front_end/testcases/named_function_scope.dart.strong.transformed.expect b/pkg/front_end/testcases/named_function_scope.dart.strong.transformed.expect
index d898d98..ec10637 100644
--- a/pkg/front_end/testcases/named_function_scope.dart.strong.transformed.expect
+++ b/pkg/front_end/testcases/named_function_scope.dart.strong.transformed.expect
@@ -2,84 +2,84 @@
 //
 // Problems in library:
 //
-// pkg/front_end/testcases/named_function_scope.dart:28:48: Error: A function expression can't have a name.
-//     var x = /*@error=NamedFunctionExpression*/ T() {};
-//                                                ^
+// pkg/front_end/testcases/named_function_scope.dart:26:13: Error: A function expression can't have a name.
+//     var x = T() {};
+//             ^
 //
-// pkg/front_end/testcases/named_function_scope.dart:33:49: Error: Can't declare 'V' because it was already used in this scope.
-//     var /*@error=DuplicatedNamePreviouslyUsed*/ V;
-//                                                 ^
-// pkg/front_end/testcases/named_function_scope.dart:31:52: Context: Previous use of 'V'.
-//     /*@context=DuplicatedNamePreviouslyUsedCause*/ V  v;
-//                                                    ^
-//
-// pkg/front_end/testcases/named_function_scope.dart:38:49: Error: Can't declare 'V' because it was already used in this scope.
-//     var /*@error=DuplicatedNamePreviouslyUsed*/ V = null;
-//                                                 ^
-// pkg/front_end/testcases/named_function_scope.dart:36:52: Context: Previous use of 'V'.
-//     /*@context=DuplicatedNamePreviouslyUsedCause*/ V  v;
-//                                                    ^
-//
-// pkg/front_end/testcases/named_function_scope.dart:48:9: Error: A function expression can't have a name.
-//         T() {};
+// pkg/front_end/testcases/named_function_scope.dart:31:9: Error: Can't declare 'V' because it was already used in this scope.
+//     var V;
 //         ^
-//
-// pkg/front_end/testcases/named_function_scope.dart:48:9: Error: Can't declare 'T' because it was already used in this scope.
-//         T() {};
-//         ^
-// pkg/front_end/testcases/named_function_scope.dart:45:9: Context: Previous use of 'T'.
-//         T
-//         ^
-//
-// pkg/front_end/testcases/named_function_scope.dart:54:47: Error: Can't declare 'V' because it was already used in this scope.
-//     V /*@error=DuplicatedNamePreviouslyUsed*/ V;
-//                                               ^
-// pkg/front_end/testcases/named_function_scope.dart:54:5: Context: Previous use of 'V'.
-//     V /*@error=DuplicatedNamePreviouslyUsed*/ V;
+// pkg/front_end/testcases/named_function_scope.dart:29:5: Context: Previous use of 'V'.
+//     V v;
 //     ^
 //
-// pkg/front_end/testcases/named_function_scope.dart:62:9: Error: A function expression can't have a name.
-//         T< /*@context=DuplicatedDeclarationCause*/ T>() {};
+// pkg/front_end/testcases/named_function_scope.dart:36:9: Error: Can't declare 'V' because it was already used in this scope.
+//     var V = null;
 //         ^
+// pkg/front_end/testcases/named_function_scope.dart:34:5: Context: Previous use of 'V'.
+//     V v;
+//     ^
 //
-// pkg/front_end/testcases/named_function_scope.dart:62:9: Error: 'T' is already declared in this scope.
-//         T< /*@context=DuplicatedDeclarationCause*/ T>() {};
-//         ^
-// pkg/front_end/testcases/named_function_scope.dart:62:52: Context: Previous declaration of 'T'.
-//         T< /*@context=DuplicatedDeclarationCause*/ T>() {};
-//                                                    ^
+// pkg/front_end/testcases/named_function_scope.dart:41:15: Error: A function expression can't have a name.
+//     var x = T T() {};
+//               ^
 //
-// pkg/front_end/testcases/named_function_scope.dart:67:47: Error: Can't declare 'T' because it was already used in this scope.
-//     T /*@error=DuplicatedNamePreviouslyUsed*/ T() {}
-//                                               ^
+// pkg/front_end/testcases/named_function_scope.dart:41:15: Error: Can't declare 'T' because it was already used in this scope.
+//     var x = T T() {};
+//               ^
+// pkg/front_end/testcases/named_function_scope.dart:41:13: Context: Previous use of 'T'.
+//     var x = T T() {};
+//             ^
+//
+// pkg/front_end/testcases/named_function_scope.dart:47:7: Error: Can't declare 'V' because it was already used in this scope.
+//     V V;
+//       ^
+// pkg/front_end/testcases/named_function_scope.dart:47:5: Context: Previous use of 'V'.
+//     V V;
+//     ^
+//
+// pkg/front_end/testcases/named_function_scope.dart:52:13: Error: A function expression can't have a name.
+//     var x = T<T>() {};
+//             ^
+//
+// pkg/front_end/testcases/named_function_scope.dart:52:13: Error: 'T' is already declared in this scope.
+//     var x = T<T>() {};
+//             ^
+// pkg/front_end/testcases/named_function_scope.dart:52:15: Context: Previous declaration of 'T'.
+//     var x = T<T>() {};
+//               ^
+//
+// pkg/front_end/testcases/named_function_scope.dart:56:7: Error: Can't declare 'T' because it was already used in this scope.
+//     T T() {}
+//       ^
+// pkg/front_end/testcases/named_function_scope.dart:55:5: Context: Previous use of 'T'.
+//     T t;
+//     ^
+//
+// pkg/front_end/testcases/named_function_scope.dart:59:7: Error: Can't declare 'T' because it was already used in this scope.
+//     T T() {}
+//       ^
+// pkg/front_end/testcases/named_function_scope.dart:59:5: Context: Previous use of 'T'.
+//     T T() {}
+//     ^
+//
+// pkg/front_end/testcases/named_function_scope.dart:63:7: Error: Can't declare 'T' because it was already used in this scope.
+//     T T(T t) {}
+//       ^
+// pkg/front_end/testcases/named_function_scope.dart:62:5: Context: Previous use of 'T'.
+//     T t;
+//     ^
+//
+// pkg/front_end/testcases/named_function_scope.dart:66:7: Error: Can't declare 'T' because it was already used in this scope.
+//     T T(T t) {}
+//       ^
 // pkg/front_end/testcases/named_function_scope.dart:66:5: Context: Previous use of 'T'.
-//     T t;
+//     T T(T t) {}
 //     ^
 //
-// pkg/front_end/testcases/named_function_scope.dart:71:47: Error: Can't declare 'T' because it was already used in this scope.
-//     T /*@error=DuplicatedNamePreviouslyUsed*/ T() {}
-//                                               ^
-// pkg/front_end/testcases/named_function_scope.dart:71:5: Context: Previous use of 'T'.
-//     T /*@error=DuplicatedNamePreviouslyUsed*/ T() {}
-//     ^
-//
-// pkg/front_end/testcases/named_function_scope.dart:76:47: Error: Can't declare 'T' because it was already used in this scope.
-//     T /*@error=DuplicatedNamePreviouslyUsed*/ T(T t) {}
-//                                               ^
-// pkg/front_end/testcases/named_function_scope.dart:75:5: Context: Previous use of 'T'.
-//     T t;
-//     ^
-//
-// pkg/front_end/testcases/named_function_scope.dart:80:47: Error: Can't declare 'T' because it was already used in this scope.
-//     T /*@error=DuplicatedNamePreviouslyUsed*/ T(T t) {}
-//                                               ^
-// pkg/front_end/testcases/named_function_scope.dart:80:5: Context: Previous use of 'T'.
-//     T /*@error=DuplicatedNamePreviouslyUsed*/ T(T t) {}
-//     ^
-//
-// pkg/front_end/testcases/named_function_scope.dart:83:32: Error: 'T' isn't a type.
-//     void T(/*@error=NotAType*/ T t) {}
-//                                ^
+// pkg/front_end/testcases/named_function_scope.dart:69:12: Error: 'T' isn't a type.
+//     void T(T t) {}
+//            ^
 //
 import self as self;
 import "dart:core" as core;
@@ -109,62 +109,62 @@
   }
   {
     self::V v;
-    dynamic V = invalid-expression "pkg/front_end/testcases/named_function_scope.dart:33:49: Error: Can't declare 'V' because it was already used in this scope.
-    var /*@error=DuplicatedNamePreviouslyUsed*/ V;
-                                                ^";
+    dynamic V = invalid-expression "pkg/front_end/testcases/named_function_scope.dart:31:9: Error: Can't declare 'V' because it was already used in this scope.
+    var V;
+        ^";
   }
   {
     self::V v;
-    dynamic V = let final<BottomType> #t1 = invalid-expression "pkg/front_end/testcases/named_function_scope.dart:38:49: Error: Can't declare 'V' because it was already used in this scope.
-    var /*@error=DuplicatedNamePreviouslyUsed*/ V = null;
-                                                ^" in null;
+    dynamic V = let final<BottomType> #t1 = invalid-expression "pkg/front_end/testcases/named_function_scope.dart:36:9: Error: Can't declare 'V' because it was already used in this scope.
+    var V = null;
+        ^" in null;
   }
   {
-    dynamic x = let final dynamic #t2 = invalid-expression "pkg/front_end/testcases/named_function_scope.dart:48:9: Error: Can't declare 'T' because it was already used in this scope.
-        T() {};
-        ^" in let final () → self::T T = () → self::T {} in T;
+    dynamic x = let final dynamic #t2 = invalid-expression "pkg/front_end/testcases/named_function_scope.dart:41:15: Error: Can't declare 'T' because it was already used in this scope.
+    var x = T T() {};
+              ^" in let final () → self::T T = () → self::T {} in T;
   }
   {
-    self::V V = invalid-expression "pkg/front_end/testcases/named_function_scope.dart:54:47: Error: Can't declare 'V' because it was already used in this scope.
-    V /*@error=DuplicatedNamePreviouslyUsed*/ V;
-                                              ^" as{TypeError} self::V;
+    self::V V = invalid-expression "pkg/front_end/testcases/named_function_scope.dart:47:7: Error: Can't declare 'V' because it was already used in this scope.
+    V V;
+      ^" as{TypeError} self::V;
   }
   {
-    dynamic x = let final dynamic #t3 = invalid-expression "pkg/front_end/testcases/named_function_scope.dart:62:9: Error: 'T' is already declared in this scope.
-        T< /*@context=DuplicatedDeclarationCause*/ T>() {};
-        ^" in let final <T extends core::Object = dynamic>() → dynamic T = <T extends core::Object = dynamic>() → dynamic {} in T;
+    dynamic x = let final dynamic #t3 = invalid-expression "pkg/front_end/testcases/named_function_scope.dart:52:13: Error: 'T' is already declared in this scope.
+    var x = T<T>() {};
+            ^" in let final <T extends core::Object = dynamic>() → dynamic T = <T extends core::Object = dynamic>() → dynamic {} in T;
   }
   {
     self::T t;
     {
-      invalid-expression "pkg/front_end/testcases/named_function_scope.dart:67:47: Error: Can't declare 'T' because it was already used in this scope.
-    T /*@error=DuplicatedNamePreviouslyUsed*/ T() {}
-                                              ^";
+      invalid-expression "pkg/front_end/testcases/named_function_scope.dart:56:7: Error: Can't declare 'T' because it was already used in this scope.
+    T T() {}
+      ^";
       function T() → self::T {}
     }
   }
   {
     {
-      invalid-expression "pkg/front_end/testcases/named_function_scope.dart:71:47: Error: Can't declare 'T' because it was already used in this scope.
-    T /*@error=DuplicatedNamePreviouslyUsed*/ T() {}
-                                              ^";
+      invalid-expression "pkg/front_end/testcases/named_function_scope.dart:59:7: Error: Can't declare 'T' because it was already used in this scope.
+    T T() {}
+      ^";
       function T() → self::T {}
     }
   }
   {
     self::T t;
     {
-      invalid-expression "pkg/front_end/testcases/named_function_scope.dart:76:47: Error: Can't declare 'T' because it was already used in this scope.
-    T /*@error=DuplicatedNamePreviouslyUsed*/ T(T t) {}
-                                              ^";
+      invalid-expression "pkg/front_end/testcases/named_function_scope.dart:63:7: Error: Can't declare 'T' because it was already used in this scope.
+    T T(T t) {}
+      ^";
       function T(self::T t) → self::T {}
     }
   }
   {
     {
-      invalid-expression "pkg/front_end/testcases/named_function_scope.dart:80:47: Error: Can't declare 'T' because it was already used in this scope.
-    T /*@error=DuplicatedNamePreviouslyUsed*/ T(T t) {}
-                                              ^";
+      invalid-expression "pkg/front_end/testcases/named_function_scope.dart:66:7: Error: Can't declare 'T' because it was already used in this scope.
+    T T(T t) {}
+      ^";
       function T(self::T t) → self::T {}
     }
   }
diff --git a/pkg/front_end/testcases/no_such_method_forwarders/abstract_accessors_from_field_with_substitution.dart.legacy.expect b/pkg/front_end/testcases/no_such_method_forwarders/abstract_accessors_from_field_with_substitution.dart.legacy.expect
index 828a1c2..ed949f6 100644
--- a/pkg/front_end/testcases/no_such_method_forwarders/abstract_accessors_from_field_with_substitution.dart.legacy.expect
+++ b/pkg/front_end/testcases/no_such_method_forwarders/abstract_accessors_from_field_with_substitution.dart.legacy.expect
@@ -3,7 +3,7 @@
 import "dart:core" as core;
 
 abstract class A<X extends core::Object = dynamic> extends core::Object {
-  field core::List<self::A::X> foo = null;
+  generic-covariant-impl field core::List<self::A::X> foo = null;
   synthetic constructor •() → self::A<self::A::X>
     : super core::Object::•()
     ;
diff --git a/pkg/front_end/testcases/no_such_method_forwarders/abstract_accessors_from_field_with_substitution.dart.legacy.transformed.expect b/pkg/front_end/testcases/no_such_method_forwarders/abstract_accessors_from_field_with_substitution.dart.legacy.transformed.expect
index 828a1c2..ed949f6 100644
--- a/pkg/front_end/testcases/no_such_method_forwarders/abstract_accessors_from_field_with_substitution.dart.legacy.transformed.expect
+++ b/pkg/front_end/testcases/no_such_method_forwarders/abstract_accessors_from_field_with_substitution.dart.legacy.transformed.expect
@@ -3,7 +3,7 @@
 import "dart:core" as core;
 
 abstract class A<X extends core::Object = dynamic> extends core::Object {
-  field core::List<self::A::X> foo = null;
+  generic-covariant-impl field core::List<self::A::X> foo = null;
   synthetic constructor •() → self::A<self::A::X>
     : super core::Object::•()
     ;
diff --git a/pkg/front_end/testcases/no_such_method_forwarders/abstract_accessors_from_field_with_substitution.dart.outline.expect b/pkg/front_end/testcases/no_such_method_forwarders/abstract_accessors_from_field_with_substitution.dart.outline.expect
index c6492de..9679fbf 100644
--- a/pkg/front_end/testcases/no_such_method_forwarders/abstract_accessors_from_field_with_substitution.dart.outline.expect
+++ b/pkg/front_end/testcases/no_such_method_forwarders/abstract_accessors_from_field_with_substitution.dart.outline.expect
@@ -3,7 +3,7 @@
 import "dart:core" as core;
 
 abstract class A<X extends core::Object = dynamic> extends core::Object {
-  field core::List<self::A::X> foo;
+  generic-covariant-impl field core::List<self::A::X> foo;
   synthetic constructor •() → self::A<self::A::X>
     ;
 }
diff --git a/pkg/front_end/testcases/operator_method_not_found.dart b/pkg/front_end/testcases/operator_method_not_found.dart
new file mode 100644
index 0000000..c54c358
--- /dev/null
+++ b/pkg/front_end/testcases/operator_method_not_found.dart
@@ -0,0 +1,55 @@
+// Copyright (c) 2019, the Dart project authors.  Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+class Foo {
+}
+
+main() {
+  Foo foo = new Foo();
+
+  // Not defined, but given right arity.
+  print(foo < 2);
+  print(foo > 2);
+  print(foo <= 2);
+  print(foo >= 2);
+  print(foo == 2);
+  print(foo - 2);
+  print(foo + 2);
+  print(foo / 2);
+  print(foo ~/ 2);
+  print(foo * 2);
+  print(foo % 2);
+  print(foo | 2);
+  print(foo ^ 2);
+  print(foo & 2);
+  print(foo << 2);
+  print(foo >> 2);
+  // print(foo >>> 2); // triple shift not enabled by default at the moment.
+  print(foo[2] = 2);
+  print(foo[2]);
+  print(~foo);
+  print(-foo);
+
+  // Not defined, and given wrong arity.
+  // Should be binary.
+  print(<foo);
+  print(>foo);
+  print(<=foo);
+  print(>=foo);
+  print(==foo);
+  print(+foo);
+  print(/foo);
+  print(~/foo);
+  print(*foo);
+  print(%foo);
+  print(|foo);
+  print(^foo);
+  print(&foo);
+  print(<<foo);
+  print(>>foo);
+  // print(>>>foo); // triple shift not enabled by default at the moment.
+
+  // Should be unary.
+  print(foo ~ 2);
+}
\ No newline at end of file
diff --git a/pkg/front_end/testcases/operator_method_not_found.dart.hierarchy.expect b/pkg/front_end/testcases/operator_method_not_found.dart.hierarchy.expect
new file mode 100644
index 0000000..6dc6110
--- /dev/null
+++ b/pkg/front_end/testcases/operator_method_not_found.dart.hierarchy.expect
@@ -0,0 +1,36 @@
+Object:
+  superclasses:
+  interfaces:
+  classMembers:
+    Object._haveSameRuntimeType
+    Object.toString
+    Object.runtimeType
+    Object._toString
+    Object._simpleInstanceOf
+    Object._hashCodeRnd
+    Object._instanceOf
+    Object.noSuchMethod
+    Object._objectHashCode
+    Object._identityHashCode
+    Object.hashCode
+    Object._simpleInstanceOfFalse
+    Object._simpleInstanceOfTrue
+    Object.==
+  classSetters:
+
+Foo:
+  superclasses:
+    Object
+  interfaces:
+  classMembers:
+    Object.toString
+    Object.runtimeType
+    Object._simpleInstanceOf
+    Object._instanceOf
+    Object.noSuchMethod
+    Object._identityHashCode
+    Object.hashCode
+    Object._simpleInstanceOfFalse
+    Object._simpleInstanceOfTrue
+    Object.==
+  classSetters:
diff --git a/pkg/front_end/testcases/operator_method_not_found.dart.legacy.expect b/pkg/front_end/testcases/operator_method_not_found.dart.legacy.expect
new file mode 100644
index 0000000..0abf9ef
--- /dev/null
+++ b/pkg/front_end/testcases/operator_method_not_found.dart.legacy.expect
@@ -0,0 +1,154 @@
+library;
+//
+// Problems in library:
+//
+// pkg/front_end/testcases/operator_method_not_found.dart:36:10: Error: Expected '>' after this.
+//   print(<foo);
+//          ^^^
+//
+// pkg/front_end/testcases/operator_method_not_found.dart:36:13: Error: Expected '[' before this.
+//   print(<foo);
+//             ^
+//
+// pkg/front_end/testcases/operator_method_not_found.dart:36:10: Warning: 'foo' isn't a type.
+//   print(<foo);
+//          ^^^
+//
+// pkg/front_end/testcases/operator_method_not_found.dart:37:9: Error: Expected an identifier, but got '>'.
+//   print(>foo);
+//         ^
+//
+// pkg/front_end/testcases/operator_method_not_found.dart:38:9: Error: Expected an identifier, but got '<='.
+//   print(<=foo);
+//         ^^
+//
+// pkg/front_end/testcases/operator_method_not_found.dart:39:9: Error: Expected an identifier, but got '>='.
+//   print(>=foo);
+//         ^^
+//
+// pkg/front_end/testcases/operator_method_not_found.dart:40:9: Error: Expected an identifier, but got '=='.
+//   print(==foo);
+//         ^^
+//
+// pkg/front_end/testcases/operator_method_not_found.dart:41:9: Error: '+' is not a prefix operator.
+// Try removing '+'.
+//   print(+foo);
+//         ^
+//
+// pkg/front_end/testcases/operator_method_not_found.dart:42:9: Error: Expected an identifier, but got '/'.
+//   print(/foo);
+//         ^
+//
+// pkg/front_end/testcases/operator_method_not_found.dart:43:9: Error: Expected an identifier, but got '~/'.
+//   print(~/foo);
+//         ^^
+//
+// pkg/front_end/testcases/operator_method_not_found.dart:44:9: Error: Expected an identifier, but got '*'.
+//   print(*foo);
+//         ^
+//
+// pkg/front_end/testcases/operator_method_not_found.dart:45:9: Error: Expected an identifier, but got '%'.
+//   print(%foo);
+//         ^
+//
+// pkg/front_end/testcases/operator_method_not_found.dart:46:9: Error: Expected an identifier, but got '|'.
+//   print(|foo);
+//         ^
+//
+// pkg/front_end/testcases/operator_method_not_found.dart:47:9: Error: Expected an identifier, but got '^'.
+//   print(^foo);
+//         ^
+//
+// pkg/front_end/testcases/operator_method_not_found.dart:48:9: Error: Expected an identifier, but got '&'.
+//   print(&foo);
+//         ^
+//
+// pkg/front_end/testcases/operator_method_not_found.dart:49:9: Error: Expected an identifier, but got '<<'.
+//   print(<<foo);
+//         ^^
+//
+// pkg/front_end/testcases/operator_method_not_found.dart:50:9: Error: Expected an identifier, but got '>>'.
+//   print(>>foo);
+//         ^^
+//
+// pkg/front_end/testcases/operator_method_not_found.dart:54:13: Error: '~' isn't a binary operator.
+//   print(foo ~ 2);
+//             ^
+//
+import self as self;
+import "dart:core" as core;
+
+class Foo extends core::Object {
+  synthetic constructor •() → self::Foo
+    : super core::Object::•()
+    ;
+}
+static method main() → dynamic {
+  self::Foo foo = new self::Foo::•();
+  core::print(foo.<(2));
+  core::print(foo.>(2));
+  core::print(foo.<=(2));
+  core::print(foo.>=(2));
+  core::print(foo.==(2));
+  core::print(foo.-(2));
+  core::print(foo.+(2));
+  core::print(foo./(2));
+  core::print(foo.~/(2));
+  core::print(foo.*(2));
+  core::print(foo.%(2));
+  core::print(foo.|(2));
+  core::print(foo.^(2));
+  core::print(foo.&(2));
+  core::print(foo.<<(2));
+  core::print(foo.>>(2));
+  core::print(let final dynamic #t1 = foo in let final dynamic #t2 = 2 in let final dynamic #t3 = 2 in let final dynamic #t4 = #t1.[]=(#t2, #t3) in #t3);
+  core::print(foo.[](2));
+  core::print(foo.~());
+  core::print(foo.unary-());
+  core::print(<invalid-type>[]);
+  core::print(invalid-expression "pkg/front_end/testcases/operator_method_not_found.dart:37:9: Error: This couldn't be parsed.
+  print(>foo);
+        ^".>(foo));
+  core::print(invalid-expression "pkg/front_end/testcases/operator_method_not_found.dart:38:9: Error: This couldn't be parsed.
+  print(<=foo);
+        ^".<=(foo));
+  core::print(invalid-expression "pkg/front_end/testcases/operator_method_not_found.dart:39:9: Error: This couldn't be parsed.
+  print(>=foo);
+        ^".>=(foo));
+  core::print(invalid-expression "pkg/front_end/testcases/operator_method_not_found.dart:40:9: Error: This couldn't be parsed.
+  print(==foo);
+        ^".==(foo));
+  core::print(invalid-expression "pkg/front_end/testcases/operator_method_not_found.dart:41:9: Error: This couldn't be parsed.
+  print(+foo);
+        ^".+(foo));
+  core::print(invalid-expression "pkg/front_end/testcases/operator_method_not_found.dart:42:9: Error: This couldn't be parsed.
+  print(/foo);
+        ^"./(foo));
+  core::print(invalid-expression "pkg/front_end/testcases/operator_method_not_found.dart:43:9: Error: This couldn't be parsed.
+  print(~/foo);
+        ^".~/(foo));
+  core::print(invalid-expression "pkg/front_end/testcases/operator_method_not_found.dart:44:9: Error: This couldn't be parsed.
+  print(*foo);
+        ^".*(foo));
+  core::print(invalid-expression "pkg/front_end/testcases/operator_method_not_found.dart:45:9: Error: This couldn't be parsed.
+  print(%foo);
+        ^".%(foo));
+  core::print(invalid-expression "pkg/front_end/testcases/operator_method_not_found.dart:46:9: Error: This couldn't be parsed.
+  print(|foo);
+        ^".|(foo));
+  core::print(invalid-expression "pkg/front_end/testcases/operator_method_not_found.dart:47:9: Error: This couldn't be parsed.
+  print(^foo);
+        ^".^(foo));
+  core::print(invalid-expression "pkg/front_end/testcases/operator_method_not_found.dart:48:9: Error: This couldn't be parsed.
+  print(&foo);
+        ^".&(foo));
+  core::print(invalid-expression "pkg/front_end/testcases/operator_method_not_found.dart:49:9: Error: This couldn't be parsed.
+  print(<<foo);
+        ^".<<(foo));
+  core::print(invalid-expression "pkg/front_end/testcases/operator_method_not_found.dart:50:9: Error: This couldn't be parsed.
+  print(>>foo);
+        ^".>>(foo));
+  core::print(invalid-expression "pkg/front_end/testcases/operator_method_not_found.dart:54:13: Error: '~' isn't a binary operator.
+  print(foo ~ 2);
+            ^");
+}
diff --git a/pkg/front_end/testcases/operator_method_not_found.dart.legacy.transformed.expect b/pkg/front_end/testcases/operator_method_not_found.dart.legacy.transformed.expect
new file mode 100644
index 0000000..0abf9ef
--- /dev/null
+++ b/pkg/front_end/testcases/operator_method_not_found.dart.legacy.transformed.expect
@@ -0,0 +1,154 @@
+library;
+//
+// Problems in library:
+//
+// pkg/front_end/testcases/operator_method_not_found.dart:36:10: Error: Expected '>' after this.
+//   print(<foo);
+//          ^^^
+//
+// pkg/front_end/testcases/operator_method_not_found.dart:36:13: Error: Expected '[' before this.
+//   print(<foo);
+//             ^
+//
+// pkg/front_end/testcases/operator_method_not_found.dart:36:10: Warning: 'foo' isn't a type.
+//   print(<foo);
+//          ^^^
+//
+// pkg/front_end/testcases/operator_method_not_found.dart:37:9: Error: Expected an identifier, but got '>'.
+//   print(>foo);
+//         ^
+//
+// pkg/front_end/testcases/operator_method_not_found.dart:38:9: Error: Expected an identifier, but got '<='.
+//   print(<=foo);
+//         ^^
+//
+// pkg/front_end/testcases/operator_method_not_found.dart:39:9: Error: Expected an identifier, but got '>='.
+//   print(>=foo);
+//         ^^
+//
+// pkg/front_end/testcases/operator_method_not_found.dart:40:9: Error: Expected an identifier, but got '=='.
+//   print(==foo);
+//         ^^
+//
+// pkg/front_end/testcases/operator_method_not_found.dart:41:9: Error: '+' is not a prefix operator.
+// Try removing '+'.
+//   print(+foo);
+//         ^
+//
+// pkg/front_end/testcases/operator_method_not_found.dart:42:9: Error: Expected an identifier, but got '/'.
+//   print(/foo);
+//         ^
+//
+// pkg/front_end/testcases/operator_method_not_found.dart:43:9: Error: Expected an identifier, but got '~/'.
+//   print(~/foo);
+//         ^^
+//
+// pkg/front_end/testcases/operator_method_not_found.dart:44:9: Error: Expected an identifier, but got '*'.
+//   print(*foo);
+//         ^
+//
+// pkg/front_end/testcases/operator_method_not_found.dart:45:9: Error: Expected an identifier, but got '%'.
+//   print(%foo);
+//         ^
+//
+// pkg/front_end/testcases/operator_method_not_found.dart:46:9: Error: Expected an identifier, but got '|'.
+//   print(|foo);
+//         ^
+//
+// pkg/front_end/testcases/operator_method_not_found.dart:47:9: Error: Expected an identifier, but got '^'.
+//   print(^foo);
+//         ^
+//
+// pkg/front_end/testcases/operator_method_not_found.dart:48:9: Error: Expected an identifier, but got '&'.
+//   print(&foo);
+//         ^
+//
+// pkg/front_end/testcases/operator_method_not_found.dart:49:9: Error: Expected an identifier, but got '<<'.
+//   print(<<foo);
+//         ^^
+//
+// pkg/front_end/testcases/operator_method_not_found.dart:50:9: Error: Expected an identifier, but got '>>'.
+//   print(>>foo);
+//         ^^
+//
+// pkg/front_end/testcases/operator_method_not_found.dart:54:13: Error: '~' isn't a binary operator.
+//   print(foo ~ 2);
+//             ^
+//
+import self as self;
+import "dart:core" as core;
+
+class Foo extends core::Object {
+  synthetic constructor •() → self::Foo
+    : super core::Object::•()
+    ;
+}
+static method main() → dynamic {
+  self::Foo foo = new self::Foo::•();
+  core::print(foo.<(2));
+  core::print(foo.>(2));
+  core::print(foo.<=(2));
+  core::print(foo.>=(2));
+  core::print(foo.==(2));
+  core::print(foo.-(2));
+  core::print(foo.+(2));
+  core::print(foo./(2));
+  core::print(foo.~/(2));
+  core::print(foo.*(2));
+  core::print(foo.%(2));
+  core::print(foo.|(2));
+  core::print(foo.^(2));
+  core::print(foo.&(2));
+  core::print(foo.<<(2));
+  core::print(foo.>>(2));
+  core::print(let final dynamic #t1 = foo in let final dynamic #t2 = 2 in let final dynamic #t3 = 2 in let final dynamic #t4 = #t1.[]=(#t2, #t3) in #t3);
+  core::print(foo.[](2));
+  core::print(foo.~());
+  core::print(foo.unary-());
+  core::print(<invalid-type>[]);
+  core::print(invalid-expression "pkg/front_end/testcases/operator_method_not_found.dart:37:9: Error: This couldn't be parsed.
+  print(>foo);
+        ^".>(foo));
+  core::print(invalid-expression "pkg/front_end/testcases/operator_method_not_found.dart:38:9: Error: This couldn't be parsed.
+  print(<=foo);
+        ^".<=(foo));
+  core::print(invalid-expression "pkg/front_end/testcases/operator_method_not_found.dart:39:9: Error: This couldn't be parsed.
+  print(>=foo);
+        ^".>=(foo));
+  core::print(invalid-expression "pkg/front_end/testcases/operator_method_not_found.dart:40:9: Error: This couldn't be parsed.
+  print(==foo);
+        ^".==(foo));
+  core::print(invalid-expression "pkg/front_end/testcases/operator_method_not_found.dart:41:9: Error: This couldn't be parsed.
+  print(+foo);
+        ^".+(foo));
+  core::print(invalid-expression "pkg/front_end/testcases/operator_method_not_found.dart:42:9: Error: This couldn't be parsed.
+  print(/foo);
+        ^"./(foo));
+  core::print(invalid-expression "pkg/front_end/testcases/operator_method_not_found.dart:43:9: Error: This couldn't be parsed.
+  print(~/foo);
+        ^".~/(foo));
+  core::print(invalid-expression "pkg/front_end/testcases/operator_method_not_found.dart:44:9: Error: This couldn't be parsed.
+  print(*foo);
+        ^".*(foo));
+  core::print(invalid-expression "pkg/front_end/testcases/operator_method_not_found.dart:45:9: Error: This couldn't be parsed.
+  print(%foo);
+        ^".%(foo));
+  core::print(invalid-expression "pkg/front_end/testcases/operator_method_not_found.dart:46:9: Error: This couldn't be parsed.
+  print(|foo);
+        ^".|(foo));
+  core::print(invalid-expression "pkg/front_end/testcases/operator_method_not_found.dart:47:9: Error: This couldn't be parsed.
+  print(^foo);
+        ^".^(foo));
+  core::print(invalid-expression "pkg/front_end/testcases/operator_method_not_found.dart:48:9: Error: This couldn't be parsed.
+  print(&foo);
+        ^".&(foo));
+  core::print(invalid-expression "pkg/front_end/testcases/operator_method_not_found.dart:49:9: Error: This couldn't be parsed.
+  print(<<foo);
+        ^".<<(foo));
+  core::print(invalid-expression "pkg/front_end/testcases/operator_method_not_found.dart:50:9: Error: This couldn't be parsed.
+  print(>>foo);
+        ^".>>(foo));
+  core::print(invalid-expression "pkg/front_end/testcases/operator_method_not_found.dart:54:13: Error: '~' isn't a binary operator.
+  print(foo ~ 2);
+            ^");
+}
diff --git a/pkg/front_end/testcases/operator_method_not_found.dart.outline.expect b/pkg/front_end/testcases/operator_method_not_found.dart.outline.expect
new file mode 100644
index 0000000..7835c54
--- /dev/null
+++ b/pkg/front_end/testcases/operator_method_not_found.dart.outline.expect
@@ -0,0 +1,10 @@
+library;
+import self as self;
+import "dart:core" as core;
+
+class Foo extends core::Object {
+  synthetic constructor •() → self::Foo
+    ;
+}
+static method main() → dynamic
+  ;
diff --git a/pkg/front_end/testcases/operator_method_not_found.dart.strong.expect b/pkg/front_end/testcases/operator_method_not_found.dart.strong.expect
new file mode 100644
index 0000000..ec89d36
--- /dev/null
+++ b/pkg/front_end/testcases/operator_method_not_found.dart.strong.expect
@@ -0,0 +1,344 @@
+library;
+//
+// Problems in library:
+//
+// pkg/front_end/testcases/operator_method_not_found.dart:36:10: Error: Expected '>' after this.
+//   print(<foo);
+//          ^^^
+//
+// pkg/front_end/testcases/operator_method_not_found.dart:36:13: Error: Expected '[' before this.
+//   print(<foo);
+//             ^
+//
+// pkg/front_end/testcases/operator_method_not_found.dart:36:10: Error: 'foo' isn't a type.
+//   print(<foo);
+//          ^^^
+//
+// pkg/front_end/testcases/operator_method_not_found.dart:37:9: Error: Expected an identifier, but got '>'.
+//   print(>foo);
+//         ^
+//
+// pkg/front_end/testcases/operator_method_not_found.dart:38:9: Error: Expected an identifier, but got '<='.
+//   print(<=foo);
+//         ^^
+//
+// pkg/front_end/testcases/operator_method_not_found.dart:39:9: Error: Expected an identifier, but got '>='.
+//   print(>=foo);
+//         ^^
+//
+// pkg/front_end/testcases/operator_method_not_found.dart:40:9: Error: Expected an identifier, but got '=='.
+//   print(==foo);
+//         ^^
+//
+// pkg/front_end/testcases/operator_method_not_found.dart:41:9: Error: '+' is not a prefix operator.
+// Try removing '+'.
+//   print(+foo);
+//         ^
+//
+// pkg/front_end/testcases/operator_method_not_found.dart:42:9: Error: Expected an identifier, but got '/'.
+//   print(/foo);
+//         ^
+//
+// pkg/front_end/testcases/operator_method_not_found.dart:43:9: Error: Expected an identifier, but got '~/'.
+//   print(~/foo);
+//         ^^
+//
+// pkg/front_end/testcases/operator_method_not_found.dart:44:9: Error: Expected an identifier, but got '*'.
+//   print(*foo);
+//         ^
+//
+// pkg/front_end/testcases/operator_method_not_found.dart:45:9: Error: Expected an identifier, but got '%'.
+//   print(%foo);
+//         ^
+//
+// pkg/front_end/testcases/operator_method_not_found.dart:46:9: Error: Expected an identifier, but got '|'.
+//   print(|foo);
+//         ^
+//
+// pkg/front_end/testcases/operator_method_not_found.dart:47:9: Error: Expected an identifier, but got '^'.
+//   print(^foo);
+//         ^
+//
+// pkg/front_end/testcases/operator_method_not_found.dart:48:9: Error: Expected an identifier, but got '&'.
+//   print(&foo);
+//         ^
+//
+// pkg/front_end/testcases/operator_method_not_found.dart:49:9: Error: Expected an identifier, but got '<<'.
+//   print(<<foo);
+//         ^^
+//
+// pkg/front_end/testcases/operator_method_not_found.dart:50:9: Error: Expected an identifier, but got '>>'.
+//   print(>>foo);
+//         ^^
+//
+// pkg/front_end/testcases/operator_method_not_found.dart:54:13: Error: '~' isn't a binary operator.
+//   print(foo ~ 2);
+//             ^
+//
+// pkg/front_end/testcases/operator_method_not_found.dart:12:13: Error: The method '<' isn't defined for the class 'Foo'.
+//  - 'Foo' is from 'pkg/front_end/testcases/operator_method_not_found.dart'.
+// Try correcting the name to the name of an existing method, or defining a method named '<'.
+//   print(foo < 2);
+//             ^
+//
+// pkg/front_end/testcases/operator_method_not_found.dart:13:13: Error: The method '>' isn't defined for the class 'Foo'.
+//  - 'Foo' is from 'pkg/front_end/testcases/operator_method_not_found.dart'.
+// Try correcting the name to the name of an existing method, or defining a method named '>'.
+//   print(foo > 2);
+//             ^
+//
+// pkg/front_end/testcases/operator_method_not_found.dart:14:13: Error: The method '<=' isn't defined for the class 'Foo'.
+//  - 'Foo' is from 'pkg/front_end/testcases/operator_method_not_found.dart'.
+// Try correcting the name to the name of an existing method, or defining a method named '<='.
+//   print(foo <= 2);
+//             ^^
+//
+// pkg/front_end/testcases/operator_method_not_found.dart:15:13: Error: The method '>=' isn't defined for the class 'Foo'.
+//  - 'Foo' is from 'pkg/front_end/testcases/operator_method_not_found.dart'.
+// Try correcting the name to the name of an existing method, or defining a method named '>='.
+//   print(foo >= 2);
+//             ^^
+//
+// pkg/front_end/testcases/operator_method_not_found.dart:17:13: Error: The method '-' isn't defined for the class 'Foo'.
+//  - 'Foo' is from 'pkg/front_end/testcases/operator_method_not_found.dart'.
+// Try correcting the name to the name of an existing method, or defining a method named '-'.
+//   print(foo - 2);
+//             ^
+//
+// pkg/front_end/testcases/operator_method_not_found.dart:18:13: Error: The method '+' isn't defined for the class 'Foo'.
+//  - 'Foo' is from 'pkg/front_end/testcases/operator_method_not_found.dart'.
+// Try correcting the name to the name of an existing method, or defining a method named '+'.
+//   print(foo + 2);
+//             ^
+//
+// pkg/front_end/testcases/operator_method_not_found.dart:19:13: Error: The method '/' isn't defined for the class 'Foo'.
+//  - 'Foo' is from 'pkg/front_end/testcases/operator_method_not_found.dart'.
+// Try correcting the name to the name of an existing method, or defining a method named '/'.
+//   print(foo / 2);
+//             ^
+//
+// pkg/front_end/testcases/operator_method_not_found.dart:20:13: Error: The method '~/' isn't defined for the class 'Foo'.
+//  - 'Foo' is from 'pkg/front_end/testcases/operator_method_not_found.dart'.
+// Try correcting the name to the name of an existing method, or defining a method named '~/'.
+//   print(foo ~/ 2);
+//             ^^
+//
+// pkg/front_end/testcases/operator_method_not_found.dart:21:13: Error: The method '*' isn't defined for the class 'Foo'.
+//  - 'Foo' is from 'pkg/front_end/testcases/operator_method_not_found.dart'.
+// Try correcting the name to the name of an existing method, or defining a method named '*'.
+//   print(foo * 2);
+//             ^
+//
+// pkg/front_end/testcases/operator_method_not_found.dart:22:13: Error: The method '%' isn't defined for the class 'Foo'.
+//  - 'Foo' is from 'pkg/front_end/testcases/operator_method_not_found.dart'.
+// Try correcting the name to the name of an existing method, or defining a method named '%'.
+//   print(foo % 2);
+//             ^
+//
+// pkg/front_end/testcases/operator_method_not_found.dart:23:13: Error: The method '|' isn't defined for the class 'Foo'.
+//  - 'Foo' is from 'pkg/front_end/testcases/operator_method_not_found.dart'.
+// Try correcting the name to the name of an existing method, or defining a method named '|'.
+//   print(foo | 2);
+//             ^
+//
+// pkg/front_end/testcases/operator_method_not_found.dart:24:13: Error: The method '^' isn't defined for the class 'Foo'.
+//  - 'Foo' is from 'pkg/front_end/testcases/operator_method_not_found.dart'.
+// Try correcting the name to the name of an existing method, or defining a method named '^'.
+//   print(foo ^ 2);
+//             ^
+//
+// pkg/front_end/testcases/operator_method_not_found.dart:25:13: Error: The method '&' isn't defined for the class 'Foo'.
+//  - 'Foo' is from 'pkg/front_end/testcases/operator_method_not_found.dart'.
+// Try correcting the name to the name of an existing method, or defining a method named '&'.
+//   print(foo & 2);
+//             ^
+//
+// pkg/front_end/testcases/operator_method_not_found.dart:26:13: Error: The method '<<' isn't defined for the class 'Foo'.
+//  - 'Foo' is from 'pkg/front_end/testcases/operator_method_not_found.dart'.
+// Try correcting the name to the name of an existing method, or defining a method named '<<'.
+//   print(foo << 2);
+//             ^^
+//
+// pkg/front_end/testcases/operator_method_not_found.dart:27:13: Error: The method '>>' isn't defined for the class 'Foo'.
+//  - 'Foo' is from 'pkg/front_end/testcases/operator_method_not_found.dart'.
+// Try correcting the name to the name of an existing method, or defining a method named '>>'.
+//   print(foo >> 2);
+//             ^^
+//
+// pkg/front_end/testcases/operator_method_not_found.dart:29:12: Error: The method '[]=' isn't defined for the class 'Foo'.
+//  - 'Foo' is from 'pkg/front_end/testcases/operator_method_not_found.dart'.
+// Try correcting the name to the name of an existing method, or defining a method named '[]='.
+//   print(foo[2] = 2);
+//            ^^^
+//
+// pkg/front_end/testcases/operator_method_not_found.dart:30:12: Error: The method '[]' isn't defined for the class 'Foo'.
+//  - 'Foo' is from 'pkg/front_end/testcases/operator_method_not_found.dart'.
+// Try correcting the name to the name of an existing method, or defining a method named '[]'.
+//   print(foo[2]);
+//            ^^
+//
+// pkg/front_end/testcases/operator_method_not_found.dart:31:9: Error: The method '~' isn't defined for the class 'Foo'.
+//  - 'Foo' is from 'pkg/front_end/testcases/operator_method_not_found.dart'.
+// Try correcting the name to the name of an existing method, or defining a method named '~'.
+//   print(~foo);
+//         ^
+//
+// pkg/front_end/testcases/operator_method_not_found.dart:32:9: Error: The method 'unary-' isn't defined for the class 'Foo'.
+//  - 'Foo' is from 'pkg/front_end/testcases/operator_method_not_found.dart'.
+// Try correcting the name to the name of an existing method, or defining a method named 'unary-'.
+//   print(-foo);
+//         ^
+//
+import self as self;
+import "dart:core" as core;
+
+class Foo extends core::Object {
+  synthetic constructor •() → self::Foo
+    : super core::Object::•()
+    ;
+}
+static method main() → dynamic {
+  self::Foo foo = new self::Foo::•();
+  core::print(invalid-expression "pkg/front_end/testcases/operator_method_not_found.dart:12:13: Error: The method '<' isn't defined for the class 'Foo'.
+ - 'Foo' is from 'pkg/front_end/testcases/operator_method_not_found.dart'.
+Try correcting the name to the name of an existing method, or defining a method named '<'.
+  print(foo < 2);
+            ^");
+  core::print(invalid-expression "pkg/front_end/testcases/operator_method_not_found.dart:13:13: Error: The method '>' isn't defined for the class 'Foo'.
+ - 'Foo' is from 'pkg/front_end/testcases/operator_method_not_found.dart'.
+Try correcting the name to the name of an existing method, or defining a method named '>'.
+  print(foo > 2);
+            ^");
+  core::print(invalid-expression "pkg/front_end/testcases/operator_method_not_found.dart:14:13: Error: The method '<=' isn't defined for the class 'Foo'.
+ - 'Foo' is from 'pkg/front_end/testcases/operator_method_not_found.dart'.
+Try correcting the name to the name of an existing method, or defining a method named '<='.
+  print(foo <= 2);
+            ^^");
+  core::print(invalid-expression "pkg/front_end/testcases/operator_method_not_found.dart:15:13: Error: The method '>=' isn't defined for the class 'Foo'.
+ - 'Foo' is from 'pkg/front_end/testcases/operator_method_not_found.dart'.
+Try correcting the name to the name of an existing method, or defining a method named '>='.
+  print(foo >= 2);
+            ^^");
+  core::print(foo.{core::Object::==}(2));
+  core::print(invalid-expression "pkg/front_end/testcases/operator_method_not_found.dart:17:13: Error: The method '-' isn't defined for the class 'Foo'.
+ - 'Foo' is from 'pkg/front_end/testcases/operator_method_not_found.dart'.
+Try correcting the name to the name of an existing method, or defining a method named '-'.
+  print(foo - 2);
+            ^");
+  core::print(invalid-expression "pkg/front_end/testcases/operator_method_not_found.dart:18:13: Error: The method '+' isn't defined for the class 'Foo'.
+ - 'Foo' is from 'pkg/front_end/testcases/operator_method_not_found.dart'.
+Try correcting the name to the name of an existing method, or defining a method named '+'.
+  print(foo + 2);
+            ^");
+  core::print(invalid-expression "pkg/front_end/testcases/operator_method_not_found.dart:19:13: Error: The method '/' isn't defined for the class 'Foo'.
+ - 'Foo' is from 'pkg/front_end/testcases/operator_method_not_found.dart'.
+Try correcting the name to the name of an existing method, or defining a method named '/'.
+  print(foo / 2);
+            ^");
+  core::print(invalid-expression "pkg/front_end/testcases/operator_method_not_found.dart:20:13: Error: The method '~/' isn't defined for the class 'Foo'.
+ - 'Foo' is from 'pkg/front_end/testcases/operator_method_not_found.dart'.
+Try correcting the name to the name of an existing method, or defining a method named '~/'.
+  print(foo ~/ 2);
+            ^^");
+  core::print(invalid-expression "pkg/front_end/testcases/operator_method_not_found.dart:21:13: Error: The method '*' isn't defined for the class 'Foo'.
+ - 'Foo' is from 'pkg/front_end/testcases/operator_method_not_found.dart'.
+Try correcting the name to the name of an existing method, or defining a method named '*'.
+  print(foo * 2);
+            ^");
+  core::print(invalid-expression "pkg/front_end/testcases/operator_method_not_found.dart:22:13: Error: The method '%' isn't defined for the class 'Foo'.
+ - 'Foo' is from 'pkg/front_end/testcases/operator_method_not_found.dart'.
+Try correcting the name to the name of an existing method, or defining a method named '%'.
+  print(foo % 2);
+            ^");
+  core::print(invalid-expression "pkg/front_end/testcases/operator_method_not_found.dart:23:13: Error: The method '|' isn't defined for the class 'Foo'.
+ - 'Foo' is from 'pkg/front_end/testcases/operator_method_not_found.dart'.
+Try correcting the name to the name of an existing method, or defining a method named '|'.
+  print(foo | 2);
+            ^");
+  core::print(invalid-expression "pkg/front_end/testcases/operator_method_not_found.dart:24:13: Error: The method '^' isn't defined for the class 'Foo'.
+ - 'Foo' is from 'pkg/front_end/testcases/operator_method_not_found.dart'.
+Try correcting the name to the name of an existing method, or defining a method named '^'.
+  print(foo ^ 2);
+            ^");
+  core::print(invalid-expression "pkg/front_end/testcases/operator_method_not_found.dart:25:13: Error: The method '&' isn't defined for the class 'Foo'.
+ - 'Foo' is from 'pkg/front_end/testcases/operator_method_not_found.dart'.
+Try correcting the name to the name of an existing method, or defining a method named '&'.
+  print(foo & 2);
+            ^");
+  core::print(invalid-expression "pkg/front_end/testcases/operator_method_not_found.dart:26:13: Error: The method '<<' isn't defined for the class 'Foo'.
+ - 'Foo' is from 'pkg/front_end/testcases/operator_method_not_found.dart'.
+Try correcting the name to the name of an existing method, or defining a method named '<<'.
+  print(foo << 2);
+            ^^");
+  core::print(invalid-expression "pkg/front_end/testcases/operator_method_not_found.dart:27:13: Error: The method '>>' isn't defined for the class 'Foo'.
+ - 'Foo' is from 'pkg/front_end/testcases/operator_method_not_found.dart'.
+Try correcting the name to the name of an existing method, or defining a method named '>>'.
+  print(foo >> 2);
+            ^^");
+  core::print(let final self::Foo #t1 = foo in let final core::int #t2 = 2 in let final core::int #t3 = 2 in let final dynamic #t4 = invalid-expression "pkg/front_end/testcases/operator_method_not_found.dart:29:12: Error: The method '[]=' isn't defined for the class 'Foo'.
+ - 'Foo' is from 'pkg/front_end/testcases/operator_method_not_found.dart'.
+Try correcting the name to the name of an existing method, or defining a method named '[]='.
+  print(foo[2] = 2);
+           ^^^" in #t3);
+  core::print(invalid-expression "pkg/front_end/testcases/operator_method_not_found.dart:30:12: Error: The method '[]' isn't defined for the class 'Foo'.
+ - 'Foo' is from 'pkg/front_end/testcases/operator_method_not_found.dart'.
+Try correcting the name to the name of an existing method, or defining a method named '[]'.
+  print(foo[2]);
+           ^^");
+  core::print(invalid-expression "pkg/front_end/testcases/operator_method_not_found.dart:31:9: Error: The method '~' isn't defined for the class 'Foo'.
+ - 'Foo' is from 'pkg/front_end/testcases/operator_method_not_found.dart'.
+Try correcting the name to the name of an existing method, or defining a method named '~'.
+  print(~foo);
+        ^");
+  core::print(invalid-expression "pkg/front_end/testcases/operator_method_not_found.dart:32:9: Error: The method 'unary-' isn't defined for the class 'Foo'.
+ - 'Foo' is from 'pkg/front_end/testcases/operator_method_not_found.dart'.
+Try correcting the name to the name of an existing method, or defining a method named 'unary-'.
+  print(-foo);
+        ^");
+  core::print(<invalid-type>[]);
+  core::print(invalid-expression "pkg/front_end/testcases/operator_method_not_found.dart:37:9: Error: This couldn't be parsed.
+  print(>foo);
+        ^".>(foo));
+  core::print(invalid-expression "pkg/front_end/testcases/operator_method_not_found.dart:38:9: Error: This couldn't be parsed.
+  print(<=foo);
+        ^".<=(foo));
+  core::print(invalid-expression "pkg/front_end/testcases/operator_method_not_found.dart:39:9: Error: This couldn't be parsed.
+  print(>=foo);
+        ^".>=(foo));
+  core::print(invalid-expression "pkg/front_end/testcases/operator_method_not_found.dart:40:9: Error: This couldn't be parsed.
+  print(==foo);
+        ^".{core::Object::==}(foo));
+  core::print(invalid-expression "pkg/front_end/testcases/operator_method_not_found.dart:41:9: Error: This couldn't be parsed.
+  print(+foo);
+        ^".+(foo));
+  core::print(invalid-expression "pkg/front_end/testcases/operator_method_not_found.dart:42:9: Error: This couldn't be parsed.
+  print(/foo);
+        ^"./(foo));
+  core::print(invalid-expression "pkg/front_end/testcases/operator_method_not_found.dart:43:9: Error: This couldn't be parsed.
+  print(~/foo);
+        ^".~/(foo));
+  core::print(invalid-expression "pkg/front_end/testcases/operator_method_not_found.dart:44:9: Error: This couldn't be parsed.
+  print(*foo);
+        ^".*(foo));
+  core::print(invalid-expression "pkg/front_end/testcases/operator_method_not_found.dart:45:9: Error: This couldn't be parsed.
+  print(%foo);
+        ^".%(foo));
+  core::print(invalid-expression "pkg/front_end/testcases/operator_method_not_found.dart:46:9: Error: This couldn't be parsed.
+  print(|foo);
+        ^".|(foo));
+  core::print(invalid-expression "pkg/front_end/testcases/operator_method_not_found.dart:47:9: Error: This couldn't be parsed.
+  print(^foo);
+        ^".^(foo));
+  core::print(invalid-expression "pkg/front_end/testcases/operator_method_not_found.dart:48:9: Error: This couldn't be parsed.
+  print(&foo);
+        ^".&(foo));
+  core::print(invalid-expression "pkg/front_end/testcases/operator_method_not_found.dart:49:9: Error: This couldn't be parsed.
+  print(<<foo);
+        ^".<<(foo));
+  core::print(invalid-expression "pkg/front_end/testcases/operator_method_not_found.dart:50:9: Error: This couldn't be parsed.
+  print(>>foo);
+        ^".>>(foo));
+  core::print(invalid-expression "pkg/front_end/testcases/operator_method_not_found.dart:54:13: Error: '~' isn't a binary operator.
+  print(foo ~ 2);
+            ^");
+}
diff --git a/pkg/front_end/testcases/operator_method_not_found.dart.strong.transformed.expect b/pkg/front_end/testcases/operator_method_not_found.dart.strong.transformed.expect
new file mode 100644
index 0000000..ec89d36
--- /dev/null
+++ b/pkg/front_end/testcases/operator_method_not_found.dart.strong.transformed.expect
@@ -0,0 +1,344 @@
+library;
+//
+// Problems in library:
+//
+// pkg/front_end/testcases/operator_method_not_found.dart:36:10: Error: Expected '>' after this.
+//   print(<foo);
+//          ^^^
+//
+// pkg/front_end/testcases/operator_method_not_found.dart:36:13: Error: Expected '[' before this.
+//   print(<foo);
+//             ^
+//
+// pkg/front_end/testcases/operator_method_not_found.dart:36:10: Error: 'foo' isn't a type.
+//   print(<foo);
+//          ^^^
+//
+// pkg/front_end/testcases/operator_method_not_found.dart:37:9: Error: Expected an identifier, but got '>'.
+//   print(>foo);
+//         ^
+//
+// pkg/front_end/testcases/operator_method_not_found.dart:38:9: Error: Expected an identifier, but got '<='.
+//   print(<=foo);
+//         ^^
+//
+// pkg/front_end/testcases/operator_method_not_found.dart:39:9: Error: Expected an identifier, but got '>='.
+//   print(>=foo);
+//         ^^
+//
+// pkg/front_end/testcases/operator_method_not_found.dart:40:9: Error: Expected an identifier, but got '=='.
+//   print(==foo);
+//         ^^
+//
+// pkg/front_end/testcases/operator_method_not_found.dart:41:9: Error: '+' is not a prefix operator.
+// Try removing '+'.
+//   print(+foo);
+//         ^
+//
+// pkg/front_end/testcases/operator_method_not_found.dart:42:9: Error: Expected an identifier, but got '/'.
+//   print(/foo);
+//         ^
+//
+// pkg/front_end/testcases/operator_method_not_found.dart:43:9: Error: Expected an identifier, but got '~/'.
+//   print(~/foo);
+//         ^^
+//
+// pkg/front_end/testcases/operator_method_not_found.dart:44:9: Error: Expected an identifier, but got '*'.
+//   print(*foo);
+//         ^
+//
+// pkg/front_end/testcases/operator_method_not_found.dart:45:9: Error: Expected an identifier, but got '%'.
+//   print(%foo);
+//         ^
+//
+// pkg/front_end/testcases/operator_method_not_found.dart:46:9: Error: Expected an identifier, but got '|'.
+//   print(|foo);
+//         ^
+//
+// pkg/front_end/testcases/operator_method_not_found.dart:47:9: Error: Expected an identifier, but got '^'.
+//   print(^foo);
+//         ^
+//
+// pkg/front_end/testcases/operator_method_not_found.dart:48:9: Error: Expected an identifier, but got '&'.
+//   print(&foo);
+//         ^
+//
+// pkg/front_end/testcases/operator_method_not_found.dart:49:9: Error: Expected an identifier, but got '<<'.
+//   print(<<foo);
+//         ^^
+//
+// pkg/front_end/testcases/operator_method_not_found.dart:50:9: Error: Expected an identifier, but got '>>'.
+//   print(>>foo);
+//         ^^
+//
+// pkg/front_end/testcases/operator_method_not_found.dart:54:13: Error: '~' isn't a binary operator.
+//   print(foo ~ 2);
+//             ^
+//
+// pkg/front_end/testcases/operator_method_not_found.dart:12:13: Error: The method '<' isn't defined for the class 'Foo'.
+//  - 'Foo' is from 'pkg/front_end/testcases/operator_method_not_found.dart'.
+// Try correcting the name to the name of an existing method, or defining a method named '<'.
+//   print(foo < 2);
+//             ^
+//
+// pkg/front_end/testcases/operator_method_not_found.dart:13:13: Error: The method '>' isn't defined for the class 'Foo'.
+//  - 'Foo' is from 'pkg/front_end/testcases/operator_method_not_found.dart'.
+// Try correcting the name to the name of an existing method, or defining a method named '>'.
+//   print(foo > 2);
+//             ^
+//
+// pkg/front_end/testcases/operator_method_not_found.dart:14:13: Error: The method '<=' isn't defined for the class 'Foo'.
+//  - 'Foo' is from 'pkg/front_end/testcases/operator_method_not_found.dart'.
+// Try correcting the name to the name of an existing method, or defining a method named '<='.
+//   print(foo <= 2);
+//             ^^
+//
+// pkg/front_end/testcases/operator_method_not_found.dart:15:13: Error: The method '>=' isn't defined for the class 'Foo'.
+//  - 'Foo' is from 'pkg/front_end/testcases/operator_method_not_found.dart'.
+// Try correcting the name to the name of an existing method, or defining a method named '>='.
+//   print(foo >= 2);
+//             ^^
+//
+// pkg/front_end/testcases/operator_method_not_found.dart:17:13: Error: The method '-' isn't defined for the class 'Foo'.
+//  - 'Foo' is from 'pkg/front_end/testcases/operator_method_not_found.dart'.
+// Try correcting the name to the name of an existing method, or defining a method named '-'.
+//   print(foo - 2);
+//             ^
+//
+// pkg/front_end/testcases/operator_method_not_found.dart:18:13: Error: The method '+' isn't defined for the class 'Foo'.
+//  - 'Foo' is from 'pkg/front_end/testcases/operator_method_not_found.dart'.
+// Try correcting the name to the name of an existing method, or defining a method named '+'.
+//   print(foo + 2);
+//             ^
+//
+// pkg/front_end/testcases/operator_method_not_found.dart:19:13: Error: The method '/' isn't defined for the class 'Foo'.
+//  - 'Foo' is from 'pkg/front_end/testcases/operator_method_not_found.dart'.
+// Try correcting the name to the name of an existing method, or defining a method named '/'.
+//   print(foo / 2);
+//             ^
+//
+// pkg/front_end/testcases/operator_method_not_found.dart:20:13: Error: The method '~/' isn't defined for the class 'Foo'.
+//  - 'Foo' is from 'pkg/front_end/testcases/operator_method_not_found.dart'.
+// Try correcting the name to the name of an existing method, or defining a method named '~/'.
+//   print(foo ~/ 2);
+//             ^^
+//
+// pkg/front_end/testcases/operator_method_not_found.dart:21:13: Error: The method '*' isn't defined for the class 'Foo'.
+//  - 'Foo' is from 'pkg/front_end/testcases/operator_method_not_found.dart'.
+// Try correcting the name to the name of an existing method, or defining a method named '*'.
+//   print(foo * 2);
+//             ^
+//
+// pkg/front_end/testcases/operator_method_not_found.dart:22:13: Error: The method '%' isn't defined for the class 'Foo'.
+//  - 'Foo' is from 'pkg/front_end/testcases/operator_method_not_found.dart'.
+// Try correcting the name to the name of an existing method, or defining a method named '%'.
+//   print(foo % 2);
+//             ^
+//
+// pkg/front_end/testcases/operator_method_not_found.dart:23:13: Error: The method '|' isn't defined for the class 'Foo'.
+//  - 'Foo' is from 'pkg/front_end/testcases/operator_method_not_found.dart'.
+// Try correcting the name to the name of an existing method, or defining a method named '|'.
+//   print(foo | 2);
+//             ^
+//
+// pkg/front_end/testcases/operator_method_not_found.dart:24:13: Error: The method '^' isn't defined for the class 'Foo'.
+//  - 'Foo' is from 'pkg/front_end/testcases/operator_method_not_found.dart'.
+// Try correcting the name to the name of an existing method, or defining a method named '^'.
+//   print(foo ^ 2);
+//             ^
+//
+// pkg/front_end/testcases/operator_method_not_found.dart:25:13: Error: The method '&' isn't defined for the class 'Foo'.
+//  - 'Foo' is from 'pkg/front_end/testcases/operator_method_not_found.dart'.
+// Try correcting the name to the name of an existing method, or defining a method named '&'.
+//   print(foo & 2);
+//             ^
+//
+// pkg/front_end/testcases/operator_method_not_found.dart:26:13: Error: The method '<<' isn't defined for the class 'Foo'.
+//  - 'Foo' is from 'pkg/front_end/testcases/operator_method_not_found.dart'.
+// Try correcting the name to the name of an existing method, or defining a method named '<<'.
+//   print(foo << 2);
+//             ^^
+//
+// pkg/front_end/testcases/operator_method_not_found.dart:27:13: Error: The method '>>' isn't defined for the class 'Foo'.
+//  - 'Foo' is from 'pkg/front_end/testcases/operator_method_not_found.dart'.
+// Try correcting the name to the name of an existing method, or defining a method named '>>'.
+//   print(foo >> 2);
+//             ^^
+//
+// pkg/front_end/testcases/operator_method_not_found.dart:29:12: Error: The method '[]=' isn't defined for the class 'Foo'.
+//  - 'Foo' is from 'pkg/front_end/testcases/operator_method_not_found.dart'.
+// Try correcting the name to the name of an existing method, or defining a method named '[]='.
+//   print(foo[2] = 2);
+//            ^^^
+//
+// pkg/front_end/testcases/operator_method_not_found.dart:30:12: Error: The method '[]' isn't defined for the class 'Foo'.
+//  - 'Foo' is from 'pkg/front_end/testcases/operator_method_not_found.dart'.
+// Try correcting the name to the name of an existing method, or defining a method named '[]'.
+//   print(foo[2]);
+//            ^^
+//
+// pkg/front_end/testcases/operator_method_not_found.dart:31:9: Error: The method '~' isn't defined for the class 'Foo'.
+//  - 'Foo' is from 'pkg/front_end/testcases/operator_method_not_found.dart'.
+// Try correcting the name to the name of an existing method, or defining a method named '~'.
+//   print(~foo);
+//         ^
+//
+// pkg/front_end/testcases/operator_method_not_found.dart:32:9: Error: The method 'unary-' isn't defined for the class 'Foo'.
+//  - 'Foo' is from 'pkg/front_end/testcases/operator_method_not_found.dart'.
+// Try correcting the name to the name of an existing method, or defining a method named 'unary-'.
+//   print(-foo);
+//         ^
+//
+import self as self;
+import "dart:core" as core;
+
+class Foo extends core::Object {
+  synthetic constructor •() → self::Foo
+    : super core::Object::•()
+    ;
+}
+static method main() → dynamic {
+  self::Foo foo = new self::Foo::•();
+  core::print(invalid-expression "pkg/front_end/testcases/operator_method_not_found.dart:12:13: Error: The method '<' isn't defined for the class 'Foo'.
+ - 'Foo' is from 'pkg/front_end/testcases/operator_method_not_found.dart'.
+Try correcting the name to the name of an existing method, or defining a method named '<'.
+  print(foo < 2);
+            ^");
+  core::print(invalid-expression "pkg/front_end/testcases/operator_method_not_found.dart:13:13: Error: The method '>' isn't defined for the class 'Foo'.
+ - 'Foo' is from 'pkg/front_end/testcases/operator_method_not_found.dart'.
+Try correcting the name to the name of an existing method, or defining a method named '>'.
+  print(foo > 2);
+            ^");
+  core::print(invalid-expression "pkg/front_end/testcases/operator_method_not_found.dart:14:13: Error: The method '<=' isn't defined for the class 'Foo'.
+ - 'Foo' is from 'pkg/front_end/testcases/operator_method_not_found.dart'.
+Try correcting the name to the name of an existing method, or defining a method named '<='.
+  print(foo <= 2);
+            ^^");
+  core::print(invalid-expression "pkg/front_end/testcases/operator_method_not_found.dart:15:13: Error: The method '>=' isn't defined for the class 'Foo'.
+ - 'Foo' is from 'pkg/front_end/testcases/operator_method_not_found.dart'.
+Try correcting the name to the name of an existing method, or defining a method named '>='.
+  print(foo >= 2);
+            ^^");
+  core::print(foo.{core::Object::==}(2));
+  core::print(invalid-expression "pkg/front_end/testcases/operator_method_not_found.dart:17:13: Error: The method '-' isn't defined for the class 'Foo'.
+ - 'Foo' is from 'pkg/front_end/testcases/operator_method_not_found.dart'.
+Try correcting the name to the name of an existing method, or defining a method named '-'.
+  print(foo - 2);
+            ^");
+  core::print(invalid-expression "pkg/front_end/testcases/operator_method_not_found.dart:18:13: Error: The method '+' isn't defined for the class 'Foo'.
+ - 'Foo' is from 'pkg/front_end/testcases/operator_method_not_found.dart'.
+Try correcting the name to the name of an existing method, or defining a method named '+'.
+  print(foo + 2);
+            ^");
+  core::print(invalid-expression "pkg/front_end/testcases/operator_method_not_found.dart:19:13: Error: The method '/' isn't defined for the class 'Foo'.
+ - 'Foo' is from 'pkg/front_end/testcases/operator_method_not_found.dart'.
+Try correcting the name to the name of an existing method, or defining a method named '/'.
+  print(foo / 2);
+            ^");
+  core::print(invalid-expression "pkg/front_end/testcases/operator_method_not_found.dart:20:13: Error: The method '~/' isn't defined for the class 'Foo'.
+ - 'Foo' is from 'pkg/front_end/testcases/operator_method_not_found.dart'.
+Try correcting the name to the name of an existing method, or defining a method named '~/'.
+  print(foo ~/ 2);
+            ^^");
+  core::print(invalid-expression "pkg/front_end/testcases/operator_method_not_found.dart:21:13: Error: The method '*' isn't defined for the class 'Foo'.
+ - 'Foo' is from 'pkg/front_end/testcases/operator_method_not_found.dart'.
+Try correcting the name to the name of an existing method, or defining a method named '*'.
+  print(foo * 2);
+            ^");
+  core::print(invalid-expression "pkg/front_end/testcases/operator_method_not_found.dart:22:13: Error: The method '%' isn't defined for the class 'Foo'.
+ - 'Foo' is from 'pkg/front_end/testcases/operator_method_not_found.dart'.
+Try correcting the name to the name of an existing method, or defining a method named '%'.
+  print(foo % 2);
+            ^");
+  core::print(invalid-expression "pkg/front_end/testcases/operator_method_not_found.dart:23:13: Error: The method '|' isn't defined for the class 'Foo'.
+ - 'Foo' is from 'pkg/front_end/testcases/operator_method_not_found.dart'.
+Try correcting the name to the name of an existing method, or defining a method named '|'.
+  print(foo | 2);
+            ^");
+  core::print(invalid-expression "pkg/front_end/testcases/operator_method_not_found.dart:24:13: Error: The method '^' isn't defined for the class 'Foo'.
+ - 'Foo' is from 'pkg/front_end/testcases/operator_method_not_found.dart'.
+Try correcting the name to the name of an existing method, or defining a method named '^'.
+  print(foo ^ 2);
+            ^");
+  core::print(invalid-expression "pkg/front_end/testcases/operator_method_not_found.dart:25:13: Error: The method '&' isn't defined for the class 'Foo'.
+ - 'Foo' is from 'pkg/front_end/testcases/operator_method_not_found.dart'.
+Try correcting the name to the name of an existing method, or defining a method named '&'.
+  print(foo & 2);
+            ^");
+  core::print(invalid-expression "pkg/front_end/testcases/operator_method_not_found.dart:26:13: Error: The method '<<' isn't defined for the class 'Foo'.
+ - 'Foo' is from 'pkg/front_end/testcases/operator_method_not_found.dart'.
+Try correcting the name to the name of an existing method, or defining a method named '<<'.
+  print(foo << 2);
+            ^^");
+  core::print(invalid-expression "pkg/front_end/testcases/operator_method_not_found.dart:27:13: Error: The method '>>' isn't defined for the class 'Foo'.
+ - 'Foo' is from 'pkg/front_end/testcases/operator_method_not_found.dart'.
+Try correcting the name to the name of an existing method, or defining a method named '>>'.
+  print(foo >> 2);
+            ^^");
+  core::print(let final self::Foo #t1 = foo in let final core::int #t2 = 2 in let final core::int #t3 = 2 in let final dynamic #t4 = invalid-expression "pkg/front_end/testcases/operator_method_not_found.dart:29:12: Error: The method '[]=' isn't defined for the class 'Foo'.
+ - 'Foo' is from 'pkg/front_end/testcases/operator_method_not_found.dart'.
+Try correcting the name to the name of an existing method, or defining a method named '[]='.
+  print(foo[2] = 2);
+           ^^^" in #t3);
+  core::print(invalid-expression "pkg/front_end/testcases/operator_method_not_found.dart:30:12: Error: The method '[]' isn't defined for the class 'Foo'.
+ - 'Foo' is from 'pkg/front_end/testcases/operator_method_not_found.dart'.
+Try correcting the name to the name of an existing method, or defining a method named '[]'.
+  print(foo[2]);
+           ^^");
+  core::print(invalid-expression "pkg/front_end/testcases/operator_method_not_found.dart:31:9: Error: The method '~' isn't defined for the class 'Foo'.
+ - 'Foo' is from 'pkg/front_end/testcases/operator_method_not_found.dart'.
+Try correcting the name to the name of an existing method, or defining a method named '~'.
+  print(~foo);
+        ^");
+  core::print(invalid-expression "pkg/front_end/testcases/operator_method_not_found.dart:32:9: Error: The method 'unary-' isn't defined for the class 'Foo'.
+ - 'Foo' is from 'pkg/front_end/testcases/operator_method_not_found.dart'.
+Try correcting the name to the name of an existing method, or defining a method named 'unary-'.
+  print(-foo);
+        ^");
+  core::print(<invalid-type>[]);
+  core::print(invalid-expression "pkg/front_end/testcases/operator_method_not_found.dart:37:9: Error: This couldn't be parsed.
+  print(>foo);
+        ^".>(foo));
+  core::print(invalid-expression "pkg/front_end/testcases/operator_method_not_found.dart:38:9: Error: This couldn't be parsed.
+  print(<=foo);
+        ^".<=(foo));
+  core::print(invalid-expression "pkg/front_end/testcases/operator_method_not_found.dart:39:9: Error: This couldn't be parsed.
+  print(>=foo);
+        ^".>=(foo));
+  core::print(invalid-expression "pkg/front_end/testcases/operator_method_not_found.dart:40:9: Error: This couldn't be parsed.
+  print(==foo);
+        ^".{core::Object::==}(foo));
+  core::print(invalid-expression "pkg/front_end/testcases/operator_method_not_found.dart:41:9: Error: This couldn't be parsed.
+  print(+foo);
+        ^".+(foo));
+  core::print(invalid-expression "pkg/front_end/testcases/operator_method_not_found.dart:42:9: Error: This couldn't be parsed.
+  print(/foo);
+        ^"./(foo));
+  core::print(invalid-expression "pkg/front_end/testcases/operator_method_not_found.dart:43:9: Error: This couldn't be parsed.
+  print(~/foo);
+        ^".~/(foo));
+  core::print(invalid-expression "pkg/front_end/testcases/operator_method_not_found.dart:44:9: Error: This couldn't be parsed.
+  print(*foo);
+        ^".*(foo));
+  core::print(invalid-expression "pkg/front_end/testcases/operator_method_not_found.dart:45:9: Error: This couldn't be parsed.
+  print(%foo);
+        ^".%(foo));
+  core::print(invalid-expression "pkg/front_end/testcases/operator_method_not_found.dart:46:9: Error: This couldn't be parsed.
+  print(|foo);
+        ^".|(foo));
+  core::print(invalid-expression "pkg/front_end/testcases/operator_method_not_found.dart:47:9: Error: This couldn't be parsed.
+  print(^foo);
+        ^".^(foo));
+  core::print(invalid-expression "pkg/front_end/testcases/operator_method_not_found.dart:48:9: Error: This couldn't be parsed.
+  print(&foo);
+        ^".&(foo));
+  core::print(invalid-expression "pkg/front_end/testcases/operator_method_not_found.dart:49:9: Error: This couldn't be parsed.
+  print(<<foo);
+        ^".<<(foo));
+  core::print(invalid-expression "pkg/front_end/testcases/operator_method_not_found.dart:50:9: Error: This couldn't be parsed.
+  print(>>foo);
+        ^".>>(foo));
+  core::print(invalid-expression "pkg/front_end/testcases/operator_method_not_found.dart:54:13: Error: '~' isn't a binary operator.
+  print(foo ~ 2);
+            ^");
+}
diff --git a/pkg/front_end/testcases/override_check_accessor_after_inference.dart b/pkg/front_end/testcases/override_check_accessor_after_inference.dart
index 94bf861..7d43fe9 100644
--- a/pkg/front_end/testcases/override_check_accessor_after_inference.dart
+++ b/pkg/front_end/testcases/override_check_accessor_after_inference.dart
@@ -2,8 +2,6 @@
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
 
-/*@testedFeatures=error*/
-
 class A {}
 
 class B extends A {}
@@ -24,8 +22,8 @@
 }
 
 class F extends D {
-  void set x(B /*@error=OverrideTypeMismatchParameter*/ value) {}
-  A get /*@error=OverrideTypeMismatchReturnType*/ y => null;
+  void set x(B value) {}
+  A get y => null;
 }
 
 main() {}
diff --git a/pkg/front_end/testcases/override_check_accessor_after_inference.dart.strong.expect b/pkg/front_end/testcases/override_check_accessor_after_inference.dart.strong.expect
index 1f70d42..b932a13 100644
--- a/pkg/front_end/testcases/override_check_accessor_after_inference.dart.strong.expect
+++ b/pkg/front_end/testcases/override_check_accessor_after_inference.dart.strong.expect
@@ -2,23 +2,23 @@
 //
 // Problems in library:
 //
-// pkg/front_end/testcases/override_check_accessor_after_inference.dart:28:51: Error: The return type of the method 'F.y' is 'A', which does not match the return type, 'B', of the overridden method, 'D.y'.
+// pkg/front_end/testcases/override_check_accessor_after_inference.dart:26:9: Error: The return type of the method 'F.y' is 'A', which does not match the return type, 'B', of the overridden method, 'D.y'.
 //  - 'A' is from 'pkg/front_end/testcases/override_check_accessor_after_inference.dart'.
 //  - 'B' is from 'pkg/front_end/testcases/override_check_accessor_after_inference.dart'.
 // Change to a subtype of 'B'.
-//   A get /*@error=OverrideTypeMismatchReturnType*/ y => null;
-//                                                   ^
-// pkg/front_end/testcases/override_check_accessor_after_inference.dart:18:7: Context: This is the overridden method ('y').
+//   A get y => null;
+//         ^
+// pkg/front_end/testcases/override_check_accessor_after_inference.dart:16:7: Context: This is the overridden method ('y').
 //   get y => null; // Inferred type: B
 //       ^
 //
-// pkg/front_end/testcases/override_check_accessor_after_inference.dart:27:57: Error: The parameter 'value' of the method 'F.x' has type 'B', which does not match the corresponding type, 'A', in the overridden method, 'D.x'.
+// pkg/front_end/testcases/override_check_accessor_after_inference.dart:25:16: Error: The parameter 'value' of the method 'F.x' has type 'B', which does not match the corresponding type, 'A', in the overridden method, 'D.x'.
 //  - 'B' is from 'pkg/front_end/testcases/override_check_accessor_after_inference.dart'.
 //  - 'A' is from 'pkg/front_end/testcases/override_check_accessor_after_inference.dart'.
 // Change to a supertype of 'A', or, for a covariant parameter, a subtype.
-//   void set x(B /*@error=OverrideTypeMismatchParameter*/ value) {}
-//                                                         ^
-// pkg/front_end/testcases/override_check_accessor_after_inference.dart:17:12: Context: This is the overridden method ('x').
+//   void set x(B value) {}
+//                ^
+// pkg/front_end/testcases/override_check_accessor_after_inference.dart:15:12: Context: This is the overridden method ('x').
 //   void set x(value) {} // Inferred type: A
 //            ^
 //
diff --git a/pkg/front_end/testcases/override_check_accessor_basic.dart b/pkg/front_end/testcases/override_check_accessor_basic.dart
index a5391b2..a61e5c5 100644
--- a/pkg/front_end/testcases/override_check_accessor_basic.dart
+++ b/pkg/front_end/testcases/override_check_accessor_basic.dart
@@ -2,8 +2,6 @@
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
 
-/*@testedFeatures=error*/
-
 class A {}
 
 class B extends A {}
@@ -19,8 +17,8 @@
 }
 
 class E extends C {
-  void set x(B /*@error=OverrideTypeMismatchParameter*/ value) {}
-  Object get /*@error=OverrideTypeMismatchReturnType*/ y => null;
+  void set x(B value) {}
+  Object get y => null;
 }
 
 main() {}
diff --git a/pkg/front_end/testcases/override_check_accessor_basic.dart.strong.expect b/pkg/front_end/testcases/override_check_accessor_basic.dart.strong.expect
index 3407e98..5fc117f 100644
--- a/pkg/front_end/testcases/override_check_accessor_basic.dart.strong.expect
+++ b/pkg/front_end/testcases/override_check_accessor_basic.dart.strong.expect
@@ -2,23 +2,23 @@
 //
 // Problems in library:
 //
-// pkg/front_end/testcases/override_check_accessor_basic.dart:23:56: Error: The return type of the method 'E.y' is 'Object', which does not match the return type, 'A', of the overridden method, 'C.y'.
+// pkg/front_end/testcases/override_check_accessor_basic.dart:21:14: Error: The return type of the method 'E.y' is 'Object', which does not match the return type, 'A', of the overridden method, 'C.y'.
 //  - 'Object' is from 'dart:core'.
 //  - 'A' is from 'pkg/front_end/testcases/override_check_accessor_basic.dart'.
 // Change to a subtype of 'A'.
-//   Object get /*@error=OverrideTypeMismatchReturnType*/ y => null;
-//                                                        ^
-// pkg/front_end/testcases/override_check_accessor_basic.dart:13:9: Context: This is the overridden method ('y').
+//   Object get y => null;
+//              ^
+// pkg/front_end/testcases/override_check_accessor_basic.dart:11:9: Context: This is the overridden method ('y').
 //   A get y => null;
 //         ^
 //
-// pkg/front_end/testcases/override_check_accessor_basic.dart:22:57: Error: The parameter 'value' of the method 'E.x' has type 'B', which does not match the corresponding type, 'A', in the overridden method, 'C.x'.
+// pkg/front_end/testcases/override_check_accessor_basic.dart:20:16: Error: The parameter 'value' of the method 'E.x' has type 'B', which does not match the corresponding type, 'A', in the overridden method, 'C.x'.
 //  - 'B' is from 'pkg/front_end/testcases/override_check_accessor_basic.dart'.
 //  - 'A' is from 'pkg/front_end/testcases/override_check_accessor_basic.dart'.
 // Change to a supertype of 'A', or, for a covariant parameter, a subtype.
-//   void set x(B /*@error=OverrideTypeMismatchParameter*/ value) {}
-//                                                         ^
-// pkg/front_end/testcases/override_check_accessor_basic.dart:12:12: Context: This is the overridden method ('x').
+//   void set x(B value) {}
+//                ^
+// pkg/front_end/testcases/override_check_accessor_basic.dart:10:12: Context: This is the overridden method ('x').
 //   void set x(A value) {}
 //            ^
 //
diff --git a/pkg/front_end/testcases/override_check_accessor_with_covariant_modifier.dart b/pkg/front_end/testcases/override_check_accessor_with_covariant_modifier.dart
index a679cb1..69ca3c0 100644
--- a/pkg/front_end/testcases/override_check_accessor_with_covariant_modifier.dart
+++ b/pkg/front_end/testcases/override_check_accessor_with_covariant_modifier.dart
@@ -2,8 +2,6 @@
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
 
-/*@testedFeatures=error*/
-
 class A {}
 
 class B extends A {}
@@ -21,10 +19,8 @@
   void set x1(B value) {} // Ok because covariant is inherited
   void set x2(covariant B value) {} // Ok because covariant
   void set x3(covariant B value) {} // Ok because covariant
-  void set x4(
-      B /*@error=OverrideTypeMismatchParameter*/ value) {} // Not covariant
-  void set x5(
-      covariant String /*@error=OverrideTypeMismatchParameter*/ value) {}
+  void set x4(B value) {} // Not covariant
+  void set x5(covariant String value) {}
   void set x6(covariant A value) {} // Always ok
 }
 
diff --git a/pkg/front_end/testcases/override_check_accessor_with_covariant_modifier.dart.strong.expect b/pkg/front_end/testcases/override_check_accessor_with_covariant_modifier.dart.strong.expect
index 2b08b5a..765bd58 100644
--- a/pkg/front_end/testcases/override_check_accessor_with_covariant_modifier.dart.strong.expect
+++ b/pkg/front_end/testcases/override_check_accessor_with_covariant_modifier.dart.strong.expect
@@ -2,22 +2,22 @@
 //
 // Problems in library:
 //
-// pkg/front_end/testcases/override_check_accessor_with_covariant_modifier.dart:25:50: Error: The parameter 'value' of the method 'D.x4' has type 'B', which does not match the corresponding type, 'A', in the overridden method, 'C.x4'.
+// pkg/front_end/testcases/override_check_accessor_with_covariant_modifier.dart:22:17: Error: The parameter 'value' of the method 'D.x4' has type 'B', which does not match the corresponding type, 'A', in the overridden method, 'C.x4'.
 //  - 'B' is from 'pkg/front_end/testcases/override_check_accessor_with_covariant_modifier.dart'.
 //  - 'A' is from 'pkg/front_end/testcases/override_check_accessor_with_covariant_modifier.dart'.
 // Change to a supertype of 'A', or, for a covariant parameter, a subtype.
-//       B /*@error=OverrideTypeMismatchParameter*/ value) {} // Not covariant
-//                                                  ^
-// pkg/front_end/testcases/override_check_accessor_with_covariant_modifier.dart:15:12: Context: This is the overridden method ('x4').
+//   void set x4(B value) {} // Not covariant
+//                 ^
+// pkg/front_end/testcases/override_check_accessor_with_covariant_modifier.dart:13:12: Context: This is the overridden method ('x4').
 //   void set x4(A value) {}
 //            ^
 //
-// pkg/front_end/testcases/override_check_accessor_with_covariant_modifier.dart:27:65: Error: The parameter 'value' of the method 'D.x5' has type 'String', which does not match the corresponding type, 'A', in the overridden method, 'C.x5'.
+// pkg/front_end/testcases/override_check_accessor_with_covariant_modifier.dart:23:32: Error: The parameter 'value' of the method 'D.x5' has type 'String', which does not match the corresponding type, 'A', in the overridden method, 'C.x5'.
 //  - 'A' is from 'pkg/front_end/testcases/override_check_accessor_with_covariant_modifier.dart'.
 // Change to a supertype of 'A', or, for a covariant parameter, a subtype.
-//       covariant String /*@error=OverrideTypeMismatchParameter*/ value) {}
-//                                                                 ^
-// pkg/front_end/testcases/override_check_accessor_with_covariant_modifier.dart:16:12: Context: This is the overridden method ('x5').
+//   void set x5(covariant String value) {}
+//                                ^
+// pkg/front_end/testcases/override_check_accessor_with_covariant_modifier.dart:14:12: Context: This is the overridden method ('x5').
 //   void set x5(covariant A value) {}
 //            ^
 //
diff --git a/pkg/front_end/testcases/override_check_after_inference.dart b/pkg/front_end/testcases/override_check_after_inference.dart
index 9777a7e..e818940 100644
--- a/pkg/front_end/testcases/override_check_after_inference.dart
+++ b/pkg/front_end/testcases/override_check_after_inference.dart
@@ -2,8 +2,6 @@
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
 
-/*@testedFeatures=error*/
-
 class A {}
 
 class B extends A {}
@@ -21,7 +19,7 @@
 }
 
 class F extends D {
-  void f(B /*@error=OverrideTypeMismatchParameter*/ x) {}
+  void f(B x) {}
 }
 
 main() {}
diff --git a/pkg/front_end/testcases/override_check_after_inference.dart.strong.expect b/pkg/front_end/testcases/override_check_after_inference.dart.strong.expect
index 0cfd406..c6fbf23 100644
--- a/pkg/front_end/testcases/override_check_after_inference.dart.strong.expect
+++ b/pkg/front_end/testcases/override_check_after_inference.dart.strong.expect
@@ -2,13 +2,13 @@
 //
 // Problems in library:
 //
-// pkg/front_end/testcases/override_check_after_inference.dart:24:53: Error: The parameter 'x' of the method 'F.f' has type 'B', which does not match the corresponding type, 'A', in the overridden method, 'D.f'.
+// pkg/front_end/testcases/override_check_after_inference.dart:22:12: Error: The parameter 'x' of the method 'F.f' has type 'B', which does not match the corresponding type, 'A', in the overridden method, 'D.f'.
 //  - 'B' is from 'pkg/front_end/testcases/override_check_after_inference.dart'.
 //  - 'A' is from 'pkg/front_end/testcases/override_check_after_inference.dart'.
 // Change to a supertype of 'A', or, for a covariant parameter, a subtype.
-//   void f(B /*@error=OverrideTypeMismatchParameter*/ x) {}
-//                                                     ^
-// pkg/front_end/testcases/override_check_after_inference.dart:16:8: Context: This is the overridden method ('f').
+//   void f(B x) {}
+//            ^
+// pkg/front_end/testcases/override_check_after_inference.dart:14:8: Context: This is the overridden method ('f').
 //   void f(x) {} // Inferred type: (A) -> void
 //        ^
 //
diff --git a/pkg/front_end/testcases/override_check_basic.dart b/pkg/front_end/testcases/override_check_basic.dart
index 70134a6..69c1593 100644
--- a/pkg/front_end/testcases/override_check_basic.dart
+++ b/pkg/front_end/testcases/override_check_basic.dart
@@ -2,8 +2,6 @@
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
 
-/*@testedFeatures=error*/
-
 class A {}
 
 class B extends A {}
@@ -23,10 +21,10 @@
 }
 
 class E extends C {
-  void f1(B /*@error=OverrideTypeMismatchParameter*/ x) {}
-  void f2([B /*@error=OverrideTypeMismatchParameter*/ x]) {}
-  void f3({B /*@error=OverrideTypeMismatchParameter*/ x}) {}
-  Object /*@error=OverrideTypeMismatchReturnType*/ f4() {}
+  void f1(B x) {}
+  void f2([B x]) {}
+  void f3({B x}) {}
+  Object f4() {}
 }
 
 main() {}
diff --git a/pkg/front_end/testcases/override_check_basic.dart.strong.expect b/pkg/front_end/testcases/override_check_basic.dart.strong.expect
index b7a5ddb..e767515 100644
--- a/pkg/front_end/testcases/override_check_basic.dart.strong.expect
+++ b/pkg/front_end/testcases/override_check_basic.dart.strong.expect
@@ -2,43 +2,43 @@
 //
 // Problems in library:
 //
-// pkg/front_end/testcases/override_check_basic.dart:29:52: Error: The return type of the method 'E.f4' is 'Object', which does not match the return type, 'A', of the overridden method, 'C.f4'.
+// pkg/front_end/testcases/override_check_basic.dart:27:10: Error: The return type of the method 'E.f4' is 'Object', which does not match the return type, 'A', of the overridden method, 'C.f4'.
 //  - 'Object' is from 'dart:core'.
 //  - 'A' is from 'pkg/front_end/testcases/override_check_basic.dart'.
 // Change to a subtype of 'A'.
-//   Object /*@error=OverrideTypeMismatchReturnType*/ f4() {}
-//                                                    ^
-// pkg/front_end/testcases/override_check_basic.dart:15:5: Context: This is the overridden method ('f4').
+//   Object f4() {}
+//          ^
+// pkg/front_end/testcases/override_check_basic.dart:13:5: Context: This is the overridden method ('f4').
 //   A f4() {}
 //     ^
 //
-// pkg/front_end/testcases/override_check_basic.dart:28:55: Error: The parameter 'x' of the method 'E.f3' has type 'B', which does not match the corresponding type, 'A', in the overridden method, 'C.f3'.
+// pkg/front_end/testcases/override_check_basic.dart:26:14: Error: The parameter 'x' of the method 'E.f3' has type 'B', which does not match the corresponding type, 'A', in the overridden method, 'C.f3'.
 //  - 'B' is from 'pkg/front_end/testcases/override_check_basic.dart'.
 //  - 'A' is from 'pkg/front_end/testcases/override_check_basic.dart'.
 // Change to a supertype of 'A', or, for a covariant parameter, a subtype.
-//   void f3({B /*@error=OverrideTypeMismatchParameter*/ x}) {}
-//                                                       ^
-// pkg/front_end/testcases/override_check_basic.dart:14:8: Context: This is the overridden method ('f3').
+//   void f3({B x}) {}
+//              ^
+// pkg/front_end/testcases/override_check_basic.dart:12:8: Context: This is the overridden method ('f3').
 //   void f3({A x}) {}
 //        ^
 //
-// pkg/front_end/testcases/override_check_basic.dart:26:54: Error: The parameter 'x' of the method 'E.f1' has type 'B', which does not match the corresponding type, 'A', in the overridden method, 'C.f1'.
+// pkg/front_end/testcases/override_check_basic.dart:24:13: Error: The parameter 'x' of the method 'E.f1' has type 'B', which does not match the corresponding type, 'A', in the overridden method, 'C.f1'.
 //  - 'B' is from 'pkg/front_end/testcases/override_check_basic.dart'.
 //  - 'A' is from 'pkg/front_end/testcases/override_check_basic.dart'.
 // Change to a supertype of 'A', or, for a covariant parameter, a subtype.
-//   void f1(B /*@error=OverrideTypeMismatchParameter*/ x) {}
-//                                                      ^
-// pkg/front_end/testcases/override_check_basic.dart:12:8: Context: This is the overridden method ('f1').
+//   void f1(B x) {}
+//             ^
+// pkg/front_end/testcases/override_check_basic.dart:10:8: Context: This is the overridden method ('f1').
 //   void f1(A x) {}
 //        ^
 //
-// pkg/front_end/testcases/override_check_basic.dart:27:55: Error: The parameter 'x' of the method 'E.f2' has type 'B', which does not match the corresponding type, 'A', in the overridden method, 'C.f2'.
+// pkg/front_end/testcases/override_check_basic.dart:25:14: Error: The parameter 'x' of the method 'E.f2' has type 'B', which does not match the corresponding type, 'A', in the overridden method, 'C.f2'.
 //  - 'B' is from 'pkg/front_end/testcases/override_check_basic.dart'.
 //  - 'A' is from 'pkg/front_end/testcases/override_check_basic.dart'.
 // Change to a supertype of 'A', or, for a covariant parameter, a subtype.
-//   void f2([B /*@error=OverrideTypeMismatchParameter*/ x]) {}
-//                                                       ^
-// pkg/front_end/testcases/override_check_basic.dart:13:8: Context: This is the overridden method ('f2').
+//   void f2([B x]) {}
+//              ^
+// pkg/front_end/testcases/override_check_basic.dart:11:8: Context: This is the overridden method ('f2').
 //   void f2([A x]) {}
 //        ^
 //
diff --git a/pkg/front_end/testcases/override_check_two_substitutions.dart b/pkg/front_end/testcases/override_check_two_substitutions.dart
index 98ab523..5f5ea0f 100644
--- a/pkg/front_end/testcases/override_check_two_substitutions.dart
+++ b/pkg/front_end/testcases/override_check_two_substitutions.dart
@@ -2,8 +2,6 @@
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
 
-/*@testedFeatures=error*/
-
 class A<T> {
   void f<U>(Map<T, U> m) {}
 }
diff --git a/pkg/front_end/testcases/override_check_two_substitutions.dart.legacy.expect b/pkg/front_end/testcases/override_check_two_substitutions.dart.legacy.expect
index dfd8d78..dd0c4d5 100644
--- a/pkg/front_end/testcases/override_check_two_substitutions.dart.legacy.expect
+++ b/pkg/front_end/testcases/override_check_two_substitutions.dart.legacy.expect
@@ -6,7 +6,7 @@
   synthetic constructor •() → self::A<self::A::T>
     : super core::Object::•()
     ;
-  method f<U extends core::Object = dynamic>(core::Map<self::A::T, self::A::f::U> m) → void {}
+  method f<U extends core::Object = dynamic>(generic-covariant-impl core::Map<self::A::T, self::A::f::U> m) → void {}
 }
 class B extends self::A<core::String> {
   synthetic constructor •() → self::B
diff --git a/pkg/front_end/testcases/override_check_two_substitutions.dart.legacy.transformed.expect b/pkg/front_end/testcases/override_check_two_substitutions.dart.legacy.transformed.expect
index dfd8d78..dd0c4d5 100644
--- a/pkg/front_end/testcases/override_check_two_substitutions.dart.legacy.transformed.expect
+++ b/pkg/front_end/testcases/override_check_two_substitutions.dart.legacy.transformed.expect
@@ -6,7 +6,7 @@
   synthetic constructor •() → self::A<self::A::T>
     : super core::Object::•()
     ;
-  method f<U extends core::Object = dynamic>(core::Map<self::A::T, self::A::f::U> m) → void {}
+  method f<U extends core::Object = dynamic>(generic-covariant-impl core::Map<self::A::T, self::A::f::U> m) → void {}
 }
 class B extends self::A<core::String> {
   synthetic constructor •() → self::B
diff --git a/pkg/front_end/testcases/override_check_two_substitutions.dart.outline.expect b/pkg/front_end/testcases/override_check_two_substitutions.dart.outline.expect
index 2f0107f..e836ac4 100644
--- a/pkg/front_end/testcases/override_check_two_substitutions.dart.outline.expect
+++ b/pkg/front_end/testcases/override_check_two_substitutions.dart.outline.expect
@@ -5,7 +5,7 @@
 class A<T extends core::Object = dynamic> extends core::Object {
   synthetic constructor •() → self::A<self::A::T>
     ;
-  method f<U extends core::Object = dynamic>(core::Map<self::A::T, self::A::f::U> m) → void
+  method f<U extends core::Object = dynamic>(generic-covariant-impl core::Map<self::A::T, self::A::f::U> m) → void
     ;
 }
 class B extends self::A<core::String> {
diff --git a/pkg/front_end/testcases/override_check_with_covariant_modifier.dart b/pkg/front_end/testcases/override_check_with_covariant_modifier.dart
index 715a685..09df2e39 100644
--- a/pkg/front_end/testcases/override_check_with_covariant_modifier.dart
+++ b/pkg/front_end/testcases/override_check_with_covariant_modifier.dart
@@ -2,8 +2,6 @@
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
 
-/*@testedFeatures=error*/
-
 class A {}
 
 class B extends A {}
@@ -21,8 +19,8 @@
   void f1(B x) {} // Ok because covariant is inherited
   void f2(covariant B x) {} // Ok because covariant
   void f3(covariant B x) {} // Ok because covariant
-  void f4(B /*@error=OverrideTypeMismatchParameter*/ x) {} // Not covariant
-  void f5(covariant String /*@error=OverrideTypeMismatchParameter*/ x) {}
+  void f4(B x) {} // Not covariant
+  void f5(covariant String x) {}
   void f6(covariant A x) {} // Always ok
 }
 
diff --git a/pkg/front_end/testcases/override_check_with_covariant_modifier.dart.strong.expect b/pkg/front_end/testcases/override_check_with_covariant_modifier.dart.strong.expect
index d008fb9..25f16c4 100644
--- a/pkg/front_end/testcases/override_check_with_covariant_modifier.dart.strong.expect
+++ b/pkg/front_end/testcases/override_check_with_covariant_modifier.dart.strong.expect
@@ -2,22 +2,22 @@
 //
 // Problems in library:
 //
-// pkg/front_end/testcases/override_check_with_covariant_modifier.dart:25:69: Error: The parameter 'x' of the method 'D.f5' has type 'String', which does not match the corresponding type, 'A', in the overridden method, 'C.f5'.
+// pkg/front_end/testcases/override_check_with_covariant_modifier.dart:23:28: Error: The parameter 'x' of the method 'D.f5' has type 'String', which does not match the corresponding type, 'A', in the overridden method, 'C.f5'.
 //  - 'A' is from 'pkg/front_end/testcases/override_check_with_covariant_modifier.dart'.
 // Change to a supertype of 'A', or, for a covariant parameter, a subtype.
-//   void f5(covariant String /*@error=OverrideTypeMismatchParameter*/ x) {}
-//                                                                     ^
-// pkg/front_end/testcases/override_check_with_covariant_modifier.dart:16:8: Context: This is the overridden method ('f5').
+//   void f5(covariant String x) {}
+//                            ^
+// pkg/front_end/testcases/override_check_with_covariant_modifier.dart:14:8: Context: This is the overridden method ('f5').
 //   void f5(covariant A x) {}
 //        ^
 //
-// pkg/front_end/testcases/override_check_with_covariant_modifier.dart:24:54: Error: The parameter 'x' of the method 'D.f4' has type 'B', which does not match the corresponding type, 'A', in the overridden method, 'C.f4'.
+// pkg/front_end/testcases/override_check_with_covariant_modifier.dart:22:13: Error: The parameter 'x' of the method 'D.f4' has type 'B', which does not match the corresponding type, 'A', in the overridden method, 'C.f4'.
 //  - 'B' is from 'pkg/front_end/testcases/override_check_with_covariant_modifier.dart'.
 //  - 'A' is from 'pkg/front_end/testcases/override_check_with_covariant_modifier.dart'.
 // Change to a supertype of 'A', or, for a covariant parameter, a subtype.
-//   void f4(B /*@error=OverrideTypeMismatchParameter*/ x) {} // Not covariant
-//                                                      ^
-// pkg/front_end/testcases/override_check_with_covariant_modifier.dart:15:8: Context: This is the overridden method ('f4').
+//   void f4(B x) {} // Not covariant
+//             ^
+// pkg/front_end/testcases/override_check_with_covariant_modifier.dart:13:8: Context: This is the overridden method ('f4').
 //   void f4(A x) {}
 //        ^
 //
diff --git a/pkg/front_end/testcases/rasta/issue_000042.dart.strong.expect b/pkg/front_end/testcases/rasta/issue_000042.dart.strong.expect
index 356e6a0..da8f0c6 100644
--- a/pkg/front_end/testcases/rasta/issue_000042.dart.strong.expect
+++ b/pkg/front_end/testcases/rasta/issue_000042.dart.strong.expect
@@ -34,7 +34,6 @@
        ^^^";
       dynamic x;
       dynamic y;
-      {}
     }
   }
   #L1:
diff --git a/pkg/front_end/testcases/rasta/issue_000042.dart.strong.transformed.expect b/pkg/front_end/testcases/rasta/issue_000042.dart.strong.transformed.expect
index 356e6a0..da8f0c6 100644
--- a/pkg/front_end/testcases/rasta/issue_000042.dart.strong.transformed.expect
+++ b/pkg/front_end/testcases/rasta/issue_000042.dart.strong.transformed.expect
@@ -34,7 +34,6 @@
        ^^^";
       dynamic x;
       dynamic y;
-      {}
     }
   }
   #L1:
diff --git a/pkg/front_end/testcases/rasta/issue_000070.dart.legacy.expect b/pkg/front_end/testcases/rasta/issue_000070.dart.legacy.expect
index cb5054f..1deecbc 100644
--- a/pkg/front_end/testcases/rasta/issue_000070.dart.legacy.expect
+++ b/pkg/front_end/testcases/rasta/issue_000070.dart.legacy.expect
@@ -24,7 +24,7 @@
   get getter() → core::List<self::A::U> {
     return this.{self::A::field};
   }
-  set setter(self::A::S s) → void {}
+  set setter(generic-covariant-impl self::A::S s) → void {}
 }
 abstract class J<Aa extends core::Object = dynamic, B extends core::Object = dynamic> extends core::Object {
   synthetic constructor •() → self::J<self::J::Aa, self::J::B>
diff --git a/pkg/front_end/testcases/rasta/issue_000070.dart.legacy.transformed.expect b/pkg/front_end/testcases/rasta/issue_000070.dart.legacy.transformed.expect
index 24788b5..6f8f772 100644
--- a/pkg/front_end/testcases/rasta/issue_000070.dart.legacy.transformed.expect
+++ b/pkg/front_end/testcases/rasta/issue_000070.dart.legacy.transformed.expect
@@ -24,7 +24,7 @@
   get getter() → core::List<self::A::U> {
     return this.{self::A::field};
   }
-  set setter(self::A::S s) → void {}
+  set setter(generic-covariant-impl self::A::S s) → void {}
 }
 abstract class J<Aa extends core::Object = dynamic, B extends core::Object = dynamic> extends core::Object {
   synthetic constructor •() → self::J<self::J::Aa, self::J::B>
diff --git a/pkg/front_end/testcases/rasta/issue_000070.dart.outline.expect b/pkg/front_end/testcases/rasta/issue_000070.dart.outline.expect
index 3f08fac..89051be 100644
--- a/pkg/front_end/testcases/rasta/issue_000070.dart.outline.expect
+++ b/pkg/front_end/testcases/rasta/issue_000070.dart.outline.expect
@@ -16,7 +16,7 @@
     ;
   get getter() → core::List<self::A::U>
     ;
-  set setter(self::A::S s) → void
+  set setter(generic-covariant-impl self::A::S s) → void
     ;
 }
 abstract class J<Aa extends core::Object = dynamic, B extends core::Object = dynamic> extends core::Object {
diff --git a/pkg/front_end/testcases/rasta/mixin_library.dart.outline.expect b/pkg/front_end/testcases/rasta/mixin_library.dart.outline.expect
index 62d6389..47e7cdf 100644
--- a/pkg/front_end/testcases/rasta/mixin_library.dart.outline.expect
+++ b/pkg/front_end/testcases/rasta/mixin_library.dart.outline.expect
@@ -6,12 +6,12 @@
   field dynamic x;
   field dynamic y;
   field dynamic z;
-  field self::Mixin::T t;
+  generic-covariant-impl field self::Mixin::T t;
   synthetic constructor •() → self::Mixin<self::Mixin::T>
     ;
   method foo() → dynamic
     ;
-  method g(self::Mixin::T a) → self::Mixin::T
+  method g(generic-covariant-impl self::Mixin::T a) → self::Mixin::T
     ;
   method h() → dynamic
     ;
diff --git a/pkg/front_end/testcases/rasta/super_mixin.dart.legacy.expect b/pkg/front_end/testcases/rasta/super_mixin.dart.legacy.expect
index bf05d13..be09171 100644
--- a/pkg/front_end/testcases/rasta/super_mixin.dart.legacy.expect
+++ b/pkg/front_end/testcases/rasta/super_mixin.dart.legacy.expect
@@ -64,13 +64,13 @@
   field dynamic x = mix::f();
   field dynamic y = null;
   field dynamic z = null;
-  field mix::Mixin::T t = null;
+  generic-covariant-impl field mix::Mixin::T t = null;
   synthetic constructor •() → mix::Mixin<mix::Mixin::T>
     : super core::Object::•()
     ;
   method foo() → dynamic
     return super.foo().+(mix::f());
-  method g(mix::Mixin::T a) → mix::Mixin::T
+  method g(generic-covariant-impl mix::Mixin::T a) → mix::Mixin::T
     return null;
   method h() → dynamic
     return mix::V();
diff --git a/pkg/front_end/testcases/rasta/super_mixin.dart.legacy.transformed.expect b/pkg/front_end/testcases/rasta/super_mixin.dart.legacy.transformed.expect
index f68ab12..3c31738 100644
--- a/pkg/front_end/testcases/rasta/super_mixin.dart.legacy.transformed.expect
+++ b/pkg/front_end/testcases/rasta/super_mixin.dart.legacy.transformed.expect
@@ -18,13 +18,13 @@
   field dynamic x = mix::f()/* from org-dartlang-testcase:///mixin_library.dart */;
   field dynamic y = null /* from org-dartlang-testcase:///mixin_library.dart */;
   field dynamic z = null /* from org-dartlang-testcase:///mixin_library.dart */;
-  field self::_C&Super&Mixin::V t = null /* from org-dartlang-testcase:///mixin_library.dart */;
+  generic-covariant-impl field self::_C&Super&Mixin::V t = null /* from org-dartlang-testcase:///mixin_library.dart */;
   synthetic constructor •() → self::_C&Super&Mixin<self::_C&Super&Mixin::V>
     : super self::Super::•()
     ;
   method /* from org-dartlang-testcase:///mixin_library.dart */ foo() → dynamic
     return super.foo().+(mix::f());
-  method /* from org-dartlang-testcase:///mixin_library.dart */ g(self::_C&Super&Mixin::V a) → self::_C&Super&Mixin::V
+  method /* from org-dartlang-testcase:///mixin_library.dart */ g(generic-covariant-impl self::_C&Super&Mixin::V a) → self::_C&Super&Mixin::V
     return null;
   method /* from org-dartlang-testcase:///mixin_library.dart */ h() → dynamic
     return mix::V();
@@ -44,13 +44,13 @@
   field dynamic x = mix::f()/* from org-dartlang-testcase:///mixin_library.dart */;
   field dynamic y = null /* from org-dartlang-testcase:///mixin_library.dart */;
   field dynamic z = null /* from org-dartlang-testcase:///mixin_library.dart */;
-  field dynamic t = null /* from org-dartlang-testcase:///mixin_library.dart */;
+  generic-covariant-impl field dynamic t = null /* from org-dartlang-testcase:///mixin_library.dart */;
   synthetic constructor •() → self::_D&Super&Mixin
     : super self::Super::•()
     ;
   method /* from org-dartlang-testcase:///mixin_library.dart */ foo() → dynamic
     return super.foo().+(mix::f());
-  method /* from org-dartlang-testcase:///mixin_library.dart */ g(dynamic a) → dynamic
+  method /* from org-dartlang-testcase:///mixin_library.dart */ g(generic-covariant-impl dynamic a) → dynamic
     return null;
   method /* from org-dartlang-testcase:///mixin_library.dart */ h() → dynamic
     return mix::V();
@@ -70,13 +70,13 @@
   field dynamic x = mix::f()/* from org-dartlang-testcase:///mixin_library.dart */;
   field dynamic y = null /* from org-dartlang-testcase:///mixin_library.dart */;
   field dynamic z = null /* from org-dartlang-testcase:///mixin_library.dart */;
-  field self::C2::V t = null /* from org-dartlang-testcase:///mixin_library.dart */;
+  generic-covariant-impl field self::C2::V t = null /* from org-dartlang-testcase:///mixin_library.dart */;
   synthetic constructor •() → self::C2<self::C2::V>
     : super self::Super::•()
     ;
   method /* from org-dartlang-testcase:///mixin_library.dart */ foo() → dynamic
     return super.foo().+(mix::f());
-  method /* from org-dartlang-testcase:///mixin_library.dart */ g(self::C2::V a) → self::C2::V
+  method /* from org-dartlang-testcase:///mixin_library.dart */ g(generic-covariant-impl self::C2::V a) → self::C2::V
     return null;
   method /* from org-dartlang-testcase:///mixin_library.dart */ h() → dynamic
     return mix::V();
@@ -91,13 +91,13 @@
   field dynamic x = mix::f()/* from org-dartlang-testcase:///mixin_library.dart */;
   field dynamic y = null /* from org-dartlang-testcase:///mixin_library.dart */;
   field dynamic z = null /* from org-dartlang-testcase:///mixin_library.dart */;
-  field dynamic t = null /* from org-dartlang-testcase:///mixin_library.dart */;
+  generic-covariant-impl field dynamic t = null /* from org-dartlang-testcase:///mixin_library.dart */;
   synthetic constructor •() → self::D2
     : super self::Super::•()
     ;
   method /* from org-dartlang-testcase:///mixin_library.dart */ foo() → dynamic
     return super.foo().+(mix::f());
-  method /* from org-dartlang-testcase:///mixin_library.dart */ g(dynamic a) → dynamic
+  method /* from org-dartlang-testcase:///mixin_library.dart */ g(generic-covariant-impl dynamic a) → dynamic
     return null;
   method /* from org-dartlang-testcase:///mixin_library.dart */ h() → dynamic
     return mix::V();
@@ -128,13 +128,13 @@
   field dynamic x = mix::f();
   field dynamic y = null;
   field dynamic z = null;
-  field mix::Mixin::T t = null;
+  generic-covariant-impl field mix::Mixin::T t = null;
   synthetic constructor •() → mix::Mixin<mix::Mixin::T>
     : super core::Object::•()
     ;
   method foo() → dynamic
     return super.foo().+(mix::f());
-  method g(mix::Mixin::T a) → mix::Mixin::T
+  method g(generic-covariant-impl mix::Mixin::T a) → mix::Mixin::T
     return null;
   method h() → dynamic
     return mix::V();
diff --git a/pkg/front_end/testcases/rasta/super_mixin.dart.outline.expect b/pkg/front_end/testcases/rasta/super_mixin.dart.outline.expect
index 3463b57..64b6bb0 100644
--- a/pkg/front_end/testcases/rasta/super_mixin.dart.outline.expect
+++ b/pkg/front_end/testcases/rasta/super_mixin.dart.outline.expect
@@ -52,12 +52,12 @@
   field dynamic x;
   field dynamic y;
   field dynamic z;
-  field mix::Mixin::T t;
+  generic-covariant-impl field mix::Mixin::T t;
   synthetic constructor •() → mix::Mixin<mix::Mixin::T>
     ;
   method foo() → dynamic
     ;
-  method g(mix::Mixin::T a) → mix::Mixin::T
+  method g(generic-covariant-impl mix::Mixin::T a) → mix::Mixin::T
     ;
   method h() → dynamic
     ;
diff --git a/pkg/front_end/testcases/redirecting_factory_const_inference.dart.legacy.expect b/pkg/front_end/testcases/redirecting_factory_const_inference.dart.legacy.expect
index afbcf0c..97f89e1 100644
--- a/pkg/front_end/testcases/redirecting_factory_const_inference.dart.legacy.expect
+++ b/pkg/front_end/testcases/redirecting_factory_const_inference.dart.legacy.expect
@@ -13,7 +13,7 @@
     ;
 }
 class A<T extends core::Object = dynamic> extends core::Object {
-  field self::_X<self::A::T> x;
+  generic-covariant-impl field self::_X<self::A::T> x;
   constructor •(self::_X<self::A::T> x) → self::A<self::A::T>
     : self::A::x = x, super core::Object::•()
     ;
diff --git a/pkg/front_end/testcases/redirecting_factory_const_inference.dart.legacy.transformed.expect b/pkg/front_end/testcases/redirecting_factory_const_inference.dart.legacy.transformed.expect
index afbcf0c..97f89e1 100644
--- a/pkg/front_end/testcases/redirecting_factory_const_inference.dart.legacy.transformed.expect
+++ b/pkg/front_end/testcases/redirecting_factory_const_inference.dart.legacy.transformed.expect
@@ -13,7 +13,7 @@
     ;
 }
 class A<T extends core::Object = dynamic> extends core::Object {
-  field self::_X<self::A::T> x;
+  generic-covariant-impl field self::_X<self::A::T> x;
   constructor •(self::_X<self::A::T> x) → self::A<self::A::T>
     : self::A::x = x, super core::Object::•()
     ;
diff --git a/pkg/front_end/testcases/redirecting_factory_const_inference.dart.outline.expect b/pkg/front_end/testcases/redirecting_factory_const_inference.dart.outline.expect
index a111baf..25ec287 100644
--- a/pkg/front_end/testcases/redirecting_factory_const_inference.dart.outline.expect
+++ b/pkg/front_end/testcases/redirecting_factory_const_inference.dart.outline.expect
@@ -12,7 +12,7 @@
     ;
 }
 class A<T extends core::Object = dynamic> extends core::Object {
-  field self::_X<self::A::T> x;
+  generic-covariant-impl field self::_X<self::A::T> x;
   constructor •(self::_X<self::A::T> x) → self::A<self::A::T>
     ;
 }
diff --git a/pkg/front_end/testcases/redirecting_initializer_arguments_assignable_test.dart.legacy.expect b/pkg/front_end/testcases/redirecting_initializer_arguments_assignable_test.dart.legacy.expect
index dd1e103..f3bfb14 100644
--- a/pkg/front_end/testcases/redirecting_initializer_arguments_assignable_test.dart.legacy.expect
+++ b/pkg/front_end/testcases/redirecting_initializer_arguments_assignable_test.dart.legacy.expect
@@ -8,7 +8,7 @@
     ;
 }
 class Foo<T extends self::X = dynamic> extends core::Object {
-  field self::Foo::T x;
+  generic-covariant-impl field self::Foo::T x;
   constructor fromX(self::X _init) → self::Foo<self::Foo::T>
     : this self::Foo::_internal(x: _init)
     ;
diff --git a/pkg/front_end/testcases/redirecting_initializer_arguments_assignable_test.dart.legacy.transformed.expect b/pkg/front_end/testcases/redirecting_initializer_arguments_assignable_test.dart.legacy.transformed.expect
index dd1e103..f3bfb14 100644
--- a/pkg/front_end/testcases/redirecting_initializer_arguments_assignable_test.dart.legacy.transformed.expect
+++ b/pkg/front_end/testcases/redirecting_initializer_arguments_assignable_test.dart.legacy.transformed.expect
@@ -8,7 +8,7 @@
     ;
 }
 class Foo<T extends self::X = dynamic> extends core::Object {
-  field self::Foo::T x;
+  generic-covariant-impl field self::Foo::T x;
   constructor fromX(self::X _init) → self::Foo<self::Foo::T>
     : this self::Foo::_internal(x: _init)
     ;
diff --git a/pkg/front_end/testcases/redirecting_initializer_arguments_assignable_test.dart.outline.expect b/pkg/front_end/testcases/redirecting_initializer_arguments_assignable_test.dart.outline.expect
index fdfee1c..ba06dee 100644
--- a/pkg/front_end/testcases/redirecting_initializer_arguments_assignable_test.dart.outline.expect
+++ b/pkg/front_end/testcases/redirecting_initializer_arguments_assignable_test.dart.outline.expect
@@ -7,7 +7,7 @@
     ;
 }
 class Foo<T extends self::X = dynamic> extends core::Object {
-  field self::Foo::T x;
+  generic-covariant-impl field self::Foo::T x;
   constructor fromX(self::X _init) → self::Foo<self::Foo::T>
     ;
   constructor fromT(self::Foo::T _init) → self::Foo<self::Foo::T>
diff --git a/pkg/front_end/testcases/redirecting_initializer_arguments_test.dart.legacy.expect b/pkg/front_end/testcases/redirecting_initializer_arguments_test.dart.legacy.expect
index c18e8e1..b36d718 100644
--- a/pkg/front_end/testcases/redirecting_initializer_arguments_test.dart.legacy.expect
+++ b/pkg/front_end/testcases/redirecting_initializer_arguments_test.dart.legacy.expect
@@ -3,7 +3,7 @@
 import "dart:core" as core;
 
 class Foo<T extends core::Object = dynamic> extends core::Object {
-  field self::Foo::T x;
+  generic-covariant-impl field self::Foo::T x;
   constructor from(core::String _init) → self::Foo<self::Foo::T>
     : this self::Foo::_internal(x: _init)
     ;
diff --git a/pkg/front_end/testcases/redirecting_initializer_arguments_test.dart.legacy.transformed.expect b/pkg/front_end/testcases/redirecting_initializer_arguments_test.dart.legacy.transformed.expect
index c18e8e1..b36d718 100644
--- a/pkg/front_end/testcases/redirecting_initializer_arguments_test.dart.legacy.transformed.expect
+++ b/pkg/front_end/testcases/redirecting_initializer_arguments_test.dart.legacy.transformed.expect
@@ -3,7 +3,7 @@
 import "dart:core" as core;
 
 class Foo<T extends core::Object = dynamic> extends core::Object {
-  field self::Foo::T x;
+  generic-covariant-impl field self::Foo::T x;
   constructor from(core::String _init) → self::Foo<self::Foo::T>
     : this self::Foo::_internal(x: _init)
     ;
diff --git a/pkg/front_end/testcases/redirecting_initializer_arguments_test.dart.outline.expect b/pkg/front_end/testcases/redirecting_initializer_arguments_test.dart.outline.expect
index 1655fc6..36894d5 100644
--- a/pkg/front_end/testcases/redirecting_initializer_arguments_test.dart.outline.expect
+++ b/pkg/front_end/testcases/redirecting_initializer_arguments_test.dart.outline.expect
@@ -3,7 +3,7 @@
 import "dart:core" as core;
 
 class Foo<T extends core::Object = dynamic> extends core::Object {
-  field self::Foo::T x;
+  generic-covariant-impl field self::Foo::T x;
   constructor from(core::String _init) → self::Foo<self::Foo::T>
     ;
   constructor _internal({self::Foo::T x}) → self::Foo<self::Foo::T>
diff --git a/pkg/front_end/testcases/regress/issue_32200.dart.strong.expect b/pkg/front_end/testcases/regress/issue_32200.dart.strong.expect
index 3316d53..667cb8d 100644
--- a/pkg/front_end/testcases/regress/issue_32200.dart.strong.expect
+++ b/pkg/front_end/testcases/regress/issue_32200.dart.strong.expect
@@ -6,12 +6,6 @@
 //   self.Foo self;
 //   ^^^^^^^^
 //
-// pkg/front_end/testcases/regress/issue_32200.dart:13:19: Error: A value of type 'Foo' can't be assigned to a variable of type 'invalid-type'.
-//  - 'Foo' is from 'pkg/front_end/testcases/regress/issue_32200.dart'.
-// Try changing the type of the left hand side, or casting the right hand side to 'invalid-type'.
-//   instance.self = instance;
-//                   ^
-//
 import self as self;
 import "dart:core" as core;
 
@@ -25,9 +19,5 @@
 }
 static method main() → dynamic {
   self::Foo instance = new self::Foo::•();
-  instance.{self::Foo::self} = let final<BottomType> #t1 = invalid-expression "pkg/front_end/testcases/regress/issue_32200.dart:13:19: Error: A value of type 'Foo' can't be assigned to a variable of type 'invalid-type'.
- - 'Foo' is from 'pkg/front_end/testcases/regress/issue_32200.dart'.
-Try changing the type of the left hand side, or casting the right hand side to 'invalid-type'.
-  instance.self = instance;
-                  ^" in instance as{TypeError} invalid-type;
+  instance.{self::Foo::self} = instance as{TypeError} invalid-type;
 }
diff --git a/pkg/front_end/testcases/regress/issue_32200.dart.strong.transformed.expect b/pkg/front_end/testcases/regress/issue_32200.dart.strong.transformed.expect
index 3316d53..667cb8d 100644
--- a/pkg/front_end/testcases/regress/issue_32200.dart.strong.transformed.expect
+++ b/pkg/front_end/testcases/regress/issue_32200.dart.strong.transformed.expect
@@ -6,12 +6,6 @@
 //   self.Foo self;
 //   ^^^^^^^^
 //
-// pkg/front_end/testcases/regress/issue_32200.dart:13:19: Error: A value of type 'Foo' can't be assigned to a variable of type 'invalid-type'.
-//  - 'Foo' is from 'pkg/front_end/testcases/regress/issue_32200.dart'.
-// Try changing the type of the left hand side, or casting the right hand side to 'invalid-type'.
-//   instance.self = instance;
-//                   ^
-//
 import self as self;
 import "dart:core" as core;
 
@@ -25,9 +19,5 @@
 }
 static method main() → dynamic {
   self::Foo instance = new self::Foo::•();
-  instance.{self::Foo::self} = let final<BottomType> #t1 = invalid-expression "pkg/front_end/testcases/regress/issue_32200.dart:13:19: Error: A value of type 'Foo' can't be assigned to a variable of type 'invalid-type'.
- - 'Foo' is from 'pkg/front_end/testcases/regress/issue_32200.dart'.
-Try changing the type of the left hand side, or casting the right hand side to 'invalid-type'.
-  instance.self = instance;
-                  ^" in instance as{TypeError} invalid-type;
+  instance.{self::Foo::self} = instance as{TypeError} invalid-type;
 }
diff --git a/pkg/front_end/testcases/runtime_checks/contravariant_getter.dart b/pkg/front_end/testcases/runtime_checks/contravariant_getter.dart
index 4cb62d5..b8ff15c 100644
--- a/pkg/front_end/testcases/runtime_checks/contravariant_getter.dart
+++ b/pkg/front_end/testcases/runtime_checks/contravariant_getter.dart
@@ -9,7 +9,7 @@
 
 class C<T> {
   F<T> y;
-  void f(T /*@covariance=genericImpl*/ value) {
+  void f(T value) {
     this.y(value);
   }
 }
diff --git a/pkg/front_end/testcases/runtime_checks/contravariant_getter.dart.legacy.expect b/pkg/front_end/testcases/runtime_checks/contravariant_getter.dart.legacy.expect
index d75022d..79b167b 100644
--- a/pkg/front_end/testcases/runtime_checks/contravariant_getter.dart.legacy.expect
+++ b/pkg/front_end/testcases/runtime_checks/contravariant_getter.dart.legacy.expect
@@ -8,7 +8,7 @@
   synthetic constructor •() → self::C<self::C::T>
     : super core::Object::•()
     ;
-  method f(self::C::T value) → void {
+  method f(generic-covariant-impl self::C::T value) → void {
     this.{self::C::y}(value);
   }
 }
diff --git a/pkg/front_end/testcases/runtime_checks/contravariant_getter.dart.legacy.transformed.expect b/pkg/front_end/testcases/runtime_checks/contravariant_getter.dart.legacy.transformed.expect
index d75022d..79b167b 100644
--- a/pkg/front_end/testcases/runtime_checks/contravariant_getter.dart.legacy.transformed.expect
+++ b/pkg/front_end/testcases/runtime_checks/contravariant_getter.dart.legacy.transformed.expect
@@ -8,7 +8,7 @@
   synthetic constructor •() → self::C<self::C::T>
     : super core::Object::•()
     ;
-  method f(self::C::T value) → void {
+  method f(generic-covariant-impl self::C::T value) → void {
     this.{self::C::y}(value);
   }
 }
diff --git a/pkg/front_end/testcases/runtime_checks/contravariant_getter.dart.outline.expect b/pkg/front_end/testcases/runtime_checks/contravariant_getter.dart.outline.expect
index 5cb4a3a..7657ab7 100644
--- a/pkg/front_end/testcases/runtime_checks/contravariant_getter.dart.outline.expect
+++ b/pkg/front_end/testcases/runtime_checks/contravariant_getter.dart.outline.expect
@@ -7,7 +7,7 @@
   field (self::C::T) → void y;
   synthetic constructor •() → self::C<self::C::T>
     ;
-  method f(self::C::T value) → void
+  method f(generic-covariant-impl self::C::T value) → void
     ;
 }
 static method g(self::C<core::num> c) → void
diff --git a/pkg/front_end/testcases/runtime_checks/covariant_generic_method_type_parameter.dart b/pkg/front_end/testcases/runtime_checks/covariant_generic_method_type_parameter.dart
index bbe2c24..ec30f9e 100644
--- a/pkg/front_end/testcases/runtime_checks/covariant_generic_method_type_parameter.dart
+++ b/pkg/front_end/testcases/runtime_checks/covariant_generic_method_type_parameter.dart
@@ -6,8 +6,8 @@
 library test;
 
 class C<T> {
-  void f< /*@covariance=genericImpl*/ U extends T>(U x) {}
-  void g1< /*@covariance=genericImpl*/ U extends T>() {
+  void f<U extends T>(U x) {}
+  void g1<U extends T>() {
     this.f<U>(1.5);
   }
 }
diff --git a/pkg/front_end/testcases/runtime_checks/covariant_generic_method_type_parameter.dart.legacy.expect b/pkg/front_end/testcases/runtime_checks/covariant_generic_method_type_parameter.dart.legacy.expect
index b8aa4df..f6a34fb 100644
--- a/pkg/front_end/testcases/runtime_checks/covariant_generic_method_type_parameter.dart.legacy.expect
+++ b/pkg/front_end/testcases/runtime_checks/covariant_generic_method_type_parameter.dart.legacy.expect
@@ -6,8 +6,8 @@
   synthetic constructor •() → self::C<self::C::T>
     : super core::Object::•()
     ;
-  method f<U extends self::C::T = dynamic>(self::C::f::U x) → void {}
-  method g1<U extends self::C::T = dynamic>() → void {
+  method f<generic-covariant-impl U extends self::C::T = dynamic>(self::C::f::U x) → void {}
+  method g1<generic-covariant-impl U extends self::C::T = dynamic>() → void {
     this.{self::C::f}<self::C::g1::U>(1.5);
   }
 }
diff --git a/pkg/front_end/testcases/runtime_checks/covariant_generic_method_type_parameter.dart.legacy.transformed.expect b/pkg/front_end/testcases/runtime_checks/covariant_generic_method_type_parameter.dart.legacy.transformed.expect
index b8aa4df..f6a34fb 100644
--- a/pkg/front_end/testcases/runtime_checks/covariant_generic_method_type_parameter.dart.legacy.transformed.expect
+++ b/pkg/front_end/testcases/runtime_checks/covariant_generic_method_type_parameter.dart.legacy.transformed.expect
@@ -6,8 +6,8 @@
   synthetic constructor •() → self::C<self::C::T>
     : super core::Object::•()
     ;
-  method f<U extends self::C::T = dynamic>(self::C::f::U x) → void {}
-  method g1<U extends self::C::T = dynamic>() → void {
+  method f<generic-covariant-impl U extends self::C::T = dynamic>(self::C::f::U x) → void {}
+  method g1<generic-covariant-impl U extends self::C::T = dynamic>() → void {
     this.{self::C::f}<self::C::g1::U>(1.5);
   }
 }
diff --git a/pkg/front_end/testcases/runtime_checks/covariant_generic_method_type_parameter.dart.outline.expect b/pkg/front_end/testcases/runtime_checks/covariant_generic_method_type_parameter.dart.outline.expect
index 6a94b0f..9f98ab1 100644
--- a/pkg/front_end/testcases/runtime_checks/covariant_generic_method_type_parameter.dart.outline.expect
+++ b/pkg/front_end/testcases/runtime_checks/covariant_generic_method_type_parameter.dart.outline.expect
@@ -5,9 +5,9 @@
 class C<T extends core::Object = dynamic> extends core::Object {
   synthetic constructor •() → self::C<self::C::T>
     ;
-  method f<U extends self::C::T = dynamic>(self::C::f::U x) → void
+  method f<generic-covariant-impl U extends self::C::T = dynamic>(self::C::f::U x) → void
     ;
-  method g1<U extends self::C::T = dynamic>() → void
+  method g1<generic-covariant-impl U extends self::C::T = dynamic>() → void
     ;
 }
 static method g2(self::C<core::Object> c) → void
diff --git a/pkg/front_end/testcases/runtime_checks/covariant_generic_parameter.dart b/pkg/front_end/testcases/runtime_checks/covariant_generic_parameter.dart
index f263624..d5cfa14 100644
--- a/pkg/front_end/testcases/runtime_checks/covariant_generic_parameter.dart
+++ b/pkg/front_end/testcases/runtime_checks/covariant_generic_parameter.dart
@@ -6,7 +6,7 @@
 library test;
 
 class C<T> {
-  void f(T /*@covariance=genericImpl*/ x) {}
+  void f(T x) {}
 }
 
 void g1(C<num> c) {
diff --git a/pkg/front_end/testcases/runtime_checks/covariant_generic_parameter.dart.legacy.expect b/pkg/front_end/testcases/runtime_checks/covariant_generic_parameter.dart.legacy.expect
index 11fed34..35df363 100644
--- a/pkg/front_end/testcases/runtime_checks/covariant_generic_parameter.dart.legacy.expect
+++ b/pkg/front_end/testcases/runtime_checks/covariant_generic_parameter.dart.legacy.expect
@@ -6,7 +6,7 @@
   synthetic constructor •() → self::C<self::C::T>
     : super core::Object::•()
     ;
-  method f(self::C::T x) → void {}
+  method f(generic-covariant-impl self::C::T x) → void {}
 }
 static method g1(self::C<core::num> c) → void {
   c.f(1.5);
diff --git a/pkg/front_end/testcases/runtime_checks/covariant_generic_parameter.dart.legacy.transformed.expect b/pkg/front_end/testcases/runtime_checks/covariant_generic_parameter.dart.legacy.transformed.expect
index 11fed34..35df363 100644
--- a/pkg/front_end/testcases/runtime_checks/covariant_generic_parameter.dart.legacy.transformed.expect
+++ b/pkg/front_end/testcases/runtime_checks/covariant_generic_parameter.dart.legacy.transformed.expect
@@ -6,7 +6,7 @@
   synthetic constructor •() → self::C<self::C::T>
     : super core::Object::•()
     ;
-  method f(self::C::T x) → void {}
+  method f(generic-covariant-impl self::C::T x) → void {}
 }
 static method g1(self::C<core::num> c) → void {
   c.f(1.5);
diff --git a/pkg/front_end/testcases/runtime_checks/covariant_generic_parameter.dart.outline.expect b/pkg/front_end/testcases/runtime_checks/covariant_generic_parameter.dart.outline.expect
index af07f90..755eea6 100644
--- a/pkg/front_end/testcases/runtime_checks/covariant_generic_parameter.dart.outline.expect
+++ b/pkg/front_end/testcases/runtime_checks/covariant_generic_parameter.dart.outline.expect
@@ -5,7 +5,7 @@
 class C<T extends core::Object = dynamic> extends core::Object {
   synthetic constructor •() → self::C<self::C::T>
     ;
-  method f(self::C::T x) → void
+  method f(generic-covariant-impl self::C::T x) → void
     ;
 }
 static method g1(self::C<core::num> c) → void
diff --git a/pkg/front_end/testcases/runtime_checks/covariant_generic_parameter_complex.dart b/pkg/front_end/testcases/runtime_checks/covariant_generic_parameter_complex.dart
index f8341a0..6cb0061 100644
--- a/pkg/front_end/testcases/runtime_checks/covariant_generic_parameter_complex.dart
+++ b/pkg/front_end/testcases/runtime_checks/covariant_generic_parameter_complex.dart
@@ -7,13 +7,13 @@
 
 class C<T> {
   // List<T> is covariant in T so it needs checking
-  void f1(List<T> /*@covariance=genericImpl*/ x) {}
+  void f1(List<T> x) {}
 
   // () -> T is covariant in T so it needs checking
-  void f2(T /*@covariance=genericImpl*/ callback()) {}
+  void f2(T callback()) {}
 
   // (T) -> T is partially covariant in T so it needs checking
-  void f3(T /*@covariance=genericImpl*/ callback(T x)) {}
+  void f3(T callback(T x)) {}
 
   // (T) -> void is contravariant in T so it doesn't need checking
   void f4(void callback(T x)) {}
diff --git a/pkg/front_end/testcases/runtime_checks/covariant_generic_parameter_complex.dart.legacy.expect b/pkg/front_end/testcases/runtime_checks/covariant_generic_parameter_complex.dart.legacy.expect
index 072d922..d0cf71d 100644
--- a/pkg/front_end/testcases/runtime_checks/covariant_generic_parameter_complex.dart.legacy.expect
+++ b/pkg/front_end/testcases/runtime_checks/covariant_generic_parameter_complex.dart.legacy.expect
@@ -6,9 +6,9 @@
   synthetic constructor •() → self::C<self::C::T>
     : super core::Object::•()
     ;
-  method f1(core::List<self::C::T> x) → void {}
-  method f2(() → self::C::T callback) → void {}
-  method f3((self::C::T) → self::C::T callback) → void {}
+  method f1(generic-covariant-impl core::List<self::C::T> x) → void {}
+  method f2(generic-covariant-impl () → self::C::T callback) → void {}
+  method f3(generic-covariant-impl (self::C::T) → self::C::T callback) → void {}
   method f4((self::C::T) → void callback) → void {}
 }
 static method g1(self::C<core::num> c, core::List<core::num> l) → void {
diff --git a/pkg/front_end/testcases/runtime_checks/covariant_generic_parameter_complex.dart.legacy.transformed.expect b/pkg/front_end/testcases/runtime_checks/covariant_generic_parameter_complex.dart.legacy.transformed.expect
index 072d922..d0cf71d 100644
--- a/pkg/front_end/testcases/runtime_checks/covariant_generic_parameter_complex.dart.legacy.transformed.expect
+++ b/pkg/front_end/testcases/runtime_checks/covariant_generic_parameter_complex.dart.legacy.transformed.expect
@@ -6,9 +6,9 @@
   synthetic constructor •() → self::C<self::C::T>
     : super core::Object::•()
     ;
-  method f1(core::List<self::C::T> x) → void {}
-  method f2(() → self::C::T callback) → void {}
-  method f3((self::C::T) → self::C::T callback) → void {}
+  method f1(generic-covariant-impl core::List<self::C::T> x) → void {}
+  method f2(generic-covariant-impl () → self::C::T callback) → void {}
+  method f3(generic-covariant-impl (self::C::T) → self::C::T callback) → void {}
   method f4((self::C::T) → void callback) → void {}
 }
 static method g1(self::C<core::num> c, core::List<core::num> l) → void {
diff --git a/pkg/front_end/testcases/runtime_checks/covariant_generic_parameter_complex.dart.outline.expect b/pkg/front_end/testcases/runtime_checks/covariant_generic_parameter_complex.dart.outline.expect
index 831387d..49d3ebd 100644
--- a/pkg/front_end/testcases/runtime_checks/covariant_generic_parameter_complex.dart.outline.expect
+++ b/pkg/front_end/testcases/runtime_checks/covariant_generic_parameter_complex.dart.outline.expect
@@ -5,11 +5,11 @@
 class C<T extends core::Object = dynamic> extends core::Object {
   synthetic constructor •() → self::C<self::C::T>
     ;
-  method f1(core::List<self::C::T> x) → void
+  method f1(generic-covariant-impl core::List<self::C::T> x) → void
     ;
-  method f2(() → self::C::T callback) → void
+  method f2(generic-covariant-impl () → self::C::T callback) → void
     ;
-  method f3((self::C::T) → self::C::T callback) → void
+  method f3(generic-covariant-impl (self::C::T) → self::C::T callback) → void
     ;
   method f4((self::C::T) → void callback) → void
     ;
diff --git a/pkg/front_end/testcases/runtime_checks/covariant_generic_parameter_in_interface.dart b/pkg/front_end/testcases/runtime_checks/covariant_generic_parameter_in_interface.dart
index 67ebc4d..3ec2d07 100644
--- a/pkg/front_end/testcases/runtime_checks/covariant_generic_parameter_in_interface.dart
+++ b/pkg/front_end/testcases/runtime_checks/covariant_generic_parameter_in_interface.dart
@@ -6,20 +6,18 @@
 library test;
 
 abstract class I<T> {
-  void f1(T /*@covariance=genericImpl*/ x);
-  void f2(T /*@covariance=genericImpl*/ x);
+  void f1(T x);
+  void f2(T x);
 }
 
 class C<U> implements I<int> {
-  void f1(int /*@covariance=genericImpl*/ x) {}
-  void f2(int /*@covariance=genericImpl*/ x,
-      [U /*@covariance=genericImpl*/ y]) {}
+  void f1(int x) {}
+  void f2(int x, [U y]) {}
 }
 
 class D<U> extends C<U> {
-  void f1(int /*@covariance=genericImpl*/ x) {}
-  void f2(int /*@covariance=genericImpl*/ x,
-      [U /*@covariance=genericImpl*/ y]) {}
+  void f1(int x) {}
+  void f2(int x, [U y]) {}
 }
 
 void g1(C<num> c) {
diff --git a/pkg/front_end/testcases/runtime_checks/covariant_generic_parameter_in_interface.dart.legacy.expect b/pkg/front_end/testcases/runtime_checks/covariant_generic_parameter_in_interface.dart.legacy.expect
index fc22b45..96700b1 100644
--- a/pkg/front_end/testcases/runtime_checks/covariant_generic_parameter_in_interface.dart.legacy.expect
+++ b/pkg/front_end/testcases/runtime_checks/covariant_generic_parameter_in_interface.dart.legacy.expect
@@ -6,22 +6,22 @@
   synthetic constructor •() → self::I<self::I::T>
     : super core::Object::•()
     ;
-  abstract method f1(self::I::T x) → void;
-  abstract method f2(self::I::T x) → void;
+  abstract method f1(generic-covariant-impl self::I::T x) → void;
+  abstract method f2(generic-covariant-impl self::I::T x) → void;
 }
 class C<U extends core::Object = dynamic> extends core::Object implements self::I<core::int> {
   synthetic constructor •() → self::C<self::C::U>
     : super core::Object::•()
     ;
   method f1(core::int x) → void {}
-  method f2(core::int x, [self::C::U y = null]) → void {}
+  method f2(core::int x, [generic-covariant-impl self::C::U y = null]) → void {}
 }
 class D<U extends core::Object = dynamic> extends self::C<self::D::U> {
   synthetic constructor •() → self::D<self::D::U>
     : super self::C::•()
     ;
   method f1(core::int x) → void {}
-  method f2(core::int x, [self::D::U y = null]) → void {}
+  method f2(core::int x, [generic-covariant-impl self::D::U y = null]) → void {}
 }
 static method g1(self::C<core::num> c) → void {
   c.f1(1);
diff --git a/pkg/front_end/testcases/runtime_checks/covariant_generic_parameter_in_interface.dart.legacy.transformed.expect b/pkg/front_end/testcases/runtime_checks/covariant_generic_parameter_in_interface.dart.legacy.transformed.expect
index fc22b45..96700b1 100644
--- a/pkg/front_end/testcases/runtime_checks/covariant_generic_parameter_in_interface.dart.legacy.transformed.expect
+++ b/pkg/front_end/testcases/runtime_checks/covariant_generic_parameter_in_interface.dart.legacy.transformed.expect
@@ -6,22 +6,22 @@
   synthetic constructor •() → self::I<self::I::T>
     : super core::Object::•()
     ;
-  abstract method f1(self::I::T x) → void;
-  abstract method f2(self::I::T x) → void;
+  abstract method f1(generic-covariant-impl self::I::T x) → void;
+  abstract method f2(generic-covariant-impl self::I::T x) → void;
 }
 class C<U extends core::Object = dynamic> extends core::Object implements self::I<core::int> {
   synthetic constructor •() → self::C<self::C::U>
     : super core::Object::•()
     ;
   method f1(core::int x) → void {}
-  method f2(core::int x, [self::C::U y = null]) → void {}
+  method f2(core::int x, [generic-covariant-impl self::C::U y = null]) → void {}
 }
 class D<U extends core::Object = dynamic> extends self::C<self::D::U> {
   synthetic constructor •() → self::D<self::D::U>
     : super self::C::•()
     ;
   method f1(core::int x) → void {}
-  method f2(core::int x, [self::D::U y = null]) → void {}
+  method f2(core::int x, [generic-covariant-impl self::D::U y = null]) → void {}
 }
 static method g1(self::C<core::num> c) → void {
   c.f1(1);
diff --git a/pkg/front_end/testcases/runtime_checks/covariant_generic_parameter_in_interface.dart.outline.expect b/pkg/front_end/testcases/runtime_checks/covariant_generic_parameter_in_interface.dart.outline.expect
index a268782..fe2f698 100644
--- a/pkg/front_end/testcases/runtime_checks/covariant_generic_parameter_in_interface.dart.outline.expect
+++ b/pkg/front_end/testcases/runtime_checks/covariant_generic_parameter_in_interface.dart.outline.expect
@@ -5,15 +5,15 @@
 abstract class I<T extends core::Object = dynamic> extends core::Object {
   synthetic constructor •() → self::I<self::I::T>
     ;
-  abstract method f1(self::I::T x) → void;
-  abstract method f2(self::I::T x) → void;
+  abstract method f1(generic-covariant-impl self::I::T x) → void;
+  abstract method f2(generic-covariant-impl self::I::T x) → void;
 }
 class C<U extends core::Object = dynamic> extends core::Object implements self::I<core::int> {
   synthetic constructor •() → self::C<self::C::U>
     ;
   method f1(core::int x) → void
     ;
-  method f2(core::int x, [self::C::U y]) → void
+  method f2(core::int x, [generic-covariant-impl self::C::U y]) → void
     ;
 }
 class D<U extends core::Object = dynamic> extends self::C<self::D::U> {
@@ -21,7 +21,7 @@
     ;
   method f1(core::int x) → void
     ;
-  method f2(core::int x, [self::D::U y]) → void
+  method f2(core::int x, [generic-covariant-impl self::D::U y]) → void
     ;
 }
 static method g1(self::C<core::num> c) → void
diff --git a/pkg/front_end/testcases/runtime_checks/covariant_generic_parameter_in_interface_mixin.dart b/pkg/front_end/testcases/runtime_checks/covariant_generic_parameter_in_interface_mixin.dart
index 064a9d2..4da2532 100644
--- a/pkg/front_end/testcases/runtime_checks/covariant_generic_parameter_in_interface_mixin.dart
+++ b/pkg/front_end/testcases/runtime_checks/covariant_generic_parameter_in_interface_mixin.dart
@@ -10,16 +10,14 @@
 }
 
 abstract class I<T> {
-  void f(T /*@covariance=genericImpl*/ x);
+  void f(T x);
 }
 
 class M {
   void f(int x) {}
 }
 
-class /*@forwardingStub=void f(covariance=(genericImpl) int x)*/ C = B
-    with M
-    implements I<int>;
+class C = B with M implements I<int>;
 void g1(C c) {
   c.f(1);
 }
diff --git a/pkg/front_end/testcases/runtime_checks/covariant_generic_parameter_in_interface_mixin.dart.legacy.expect b/pkg/front_end/testcases/runtime_checks/covariant_generic_parameter_in_interface_mixin.dart.legacy.expect
index 51518db..144807a 100644
--- a/pkg/front_end/testcases/runtime_checks/covariant_generic_parameter_in_interface_mixin.dart.legacy.expect
+++ b/pkg/front_end/testcases/runtime_checks/covariant_generic_parameter_in_interface_mixin.dart.legacy.expect
@@ -12,7 +12,7 @@
   synthetic constructor •() → self::I<self::I::T>
     : super core::Object::•()
     ;
-  abstract method f(self::I::T x) → void;
+  abstract method f(generic-covariant-impl self::I::T x) → void;
 }
 class M extends core::Object {
   synthetic constructor •() → self::M
diff --git a/pkg/front_end/testcases/runtime_checks/covariant_generic_parameter_in_interface_mixin.dart.legacy.transformed.expect b/pkg/front_end/testcases/runtime_checks/covariant_generic_parameter_in_interface_mixin.dart.legacy.transformed.expect
index 8fe549e..20d3a2e 100644
--- a/pkg/front_end/testcases/runtime_checks/covariant_generic_parameter_in_interface_mixin.dart.legacy.transformed.expect
+++ b/pkg/front_end/testcases/runtime_checks/covariant_generic_parameter_in_interface_mixin.dart.legacy.transformed.expect
@@ -12,7 +12,7 @@
   synthetic constructor •() → self::I<self::I::T>
     : super core::Object::•()
     ;
-  abstract method f(self::I::T x) → void;
+  abstract method f(generic-covariant-impl self::I::T x) → void;
 }
 class M extends core::Object {
   synthetic constructor •() → self::M
diff --git a/pkg/front_end/testcases/runtime_checks/covariant_generic_parameter_in_interface_mixin.dart.outline.expect b/pkg/front_end/testcases/runtime_checks/covariant_generic_parameter_in_interface_mixin.dart.outline.expect
index c96cbc1..10f6ea9 100644
--- a/pkg/front_end/testcases/runtime_checks/covariant_generic_parameter_in_interface_mixin.dart.outline.expect
+++ b/pkg/front_end/testcases/runtime_checks/covariant_generic_parameter_in_interface_mixin.dart.outline.expect
@@ -11,7 +11,7 @@
 abstract class I<T extends core::Object = dynamic> extends core::Object {
   synthetic constructor •() → self::I<self::I::T>
     ;
-  abstract method f(self::I::T x) → void;
+  abstract method f(generic-covariant-impl self::I::T x) → void;
 }
 class M extends core::Object {
   synthetic constructor •() → self::M
diff --git a/pkg/front_end/testcases/runtime_checks/covariant_generic_parameter_in_interface_super.dart b/pkg/front_end/testcases/runtime_checks/covariant_generic_parameter_in_interface_super.dart
index 84127a1..a869fd9 100644
--- a/pkg/front_end/testcases/runtime_checks/covariant_generic_parameter_in_interface_super.dart
+++ b/pkg/front_end/testcases/runtime_checks/covariant_generic_parameter_in_interface_super.dart
@@ -10,11 +10,10 @@
 }
 
 abstract class I<T> {
-  void f(T /*@covariance=genericImpl*/ x);
+  void f(T x);
 }
 
-class /*@forwardingStub=void f(covariance=(genericImpl) int x)*/ C extends B
-    implements I<int> {}
+class C extends B implements I<int> {}
 
 void g1(C c) {
   c.f(1);
diff --git a/pkg/front_end/testcases/runtime_checks/covariant_generic_parameter_in_interface_super.dart.legacy.expect b/pkg/front_end/testcases/runtime_checks/covariant_generic_parameter_in_interface_super.dart.legacy.expect
index 67ecc72..ca44867 100644
--- a/pkg/front_end/testcases/runtime_checks/covariant_generic_parameter_in_interface_super.dart.legacy.expect
+++ b/pkg/front_end/testcases/runtime_checks/covariant_generic_parameter_in_interface_super.dart.legacy.expect
@@ -12,7 +12,7 @@
   synthetic constructor •() → self::I<self::I::T>
     : super core::Object::•()
     ;
-  abstract method f(self::I::T x) → void;
+  abstract method f(generic-covariant-impl self::I::T x) → void;
 }
 class C extends self::B implements self::I<core::int> {
   synthetic constructor •() → self::C
diff --git a/pkg/front_end/testcases/runtime_checks/covariant_generic_parameter_in_interface_super.dart.legacy.transformed.expect b/pkg/front_end/testcases/runtime_checks/covariant_generic_parameter_in_interface_super.dart.legacy.transformed.expect
index 67ecc72..ca44867 100644
--- a/pkg/front_end/testcases/runtime_checks/covariant_generic_parameter_in_interface_super.dart.legacy.transformed.expect
+++ b/pkg/front_end/testcases/runtime_checks/covariant_generic_parameter_in_interface_super.dart.legacy.transformed.expect
@@ -12,7 +12,7 @@
   synthetic constructor •() → self::I<self::I::T>
     : super core::Object::•()
     ;
-  abstract method f(self::I::T x) → void;
+  abstract method f(generic-covariant-impl self::I::T x) → void;
 }
 class C extends self::B implements self::I<core::int> {
   synthetic constructor •() → self::C
diff --git a/pkg/front_end/testcases/runtime_checks/covariant_generic_parameter_in_interface_super.dart.outline.expect b/pkg/front_end/testcases/runtime_checks/covariant_generic_parameter_in_interface_super.dart.outline.expect
index 2c50229..ee14e2c 100644
--- a/pkg/front_end/testcases/runtime_checks/covariant_generic_parameter_in_interface_super.dart.outline.expect
+++ b/pkg/front_end/testcases/runtime_checks/covariant_generic_parameter_in_interface_super.dart.outline.expect
@@ -11,7 +11,7 @@
 abstract class I<T extends core::Object = dynamic> extends core::Object {
   synthetic constructor •() → self::I<self::I::T>
     ;
-  abstract method f(self::I::T x) → void;
+  abstract method f(generic-covariant-impl self::I::T x) → void;
 }
 class C extends self::B implements self::I<core::int> {
   synthetic constructor •() → self::C
diff --git a/pkg/front_end/testcases/runtime_checks/covariant_generic_parameter_in_interface_super_mixin.dart b/pkg/front_end/testcases/runtime_checks/covariant_generic_parameter_in_interface_super_mixin.dart
index ea42a43..8208926 100644
--- a/pkg/front_end/testcases/runtime_checks/covariant_generic_parameter_in_interface_super_mixin.dart
+++ b/pkg/front_end/testcases/runtime_checks/covariant_generic_parameter_in_interface_super_mixin.dart
@@ -10,14 +10,12 @@
 }
 
 abstract class I<T> {
-  void f(T /*@covariance=genericImpl*/ x);
+  void f(T x);
 }
 
 class M {}
 
-class /*@forwardingStub=void f(covariance=(genericImpl) int x)*/ C = B
-    with M
-    implements I<int>;
+class C = B with M implements I<int>;
 void g1(C c) {
   c.f(1);
 }
diff --git a/pkg/front_end/testcases/runtime_checks/covariant_generic_parameter_in_interface_super_mixin.dart.legacy.expect b/pkg/front_end/testcases/runtime_checks/covariant_generic_parameter_in_interface_super_mixin.dart.legacy.expect
index fff4959..45abbbf 100644
--- a/pkg/front_end/testcases/runtime_checks/covariant_generic_parameter_in_interface_super_mixin.dart.legacy.expect
+++ b/pkg/front_end/testcases/runtime_checks/covariant_generic_parameter_in_interface_super_mixin.dart.legacy.expect
@@ -12,7 +12,7 @@
   synthetic constructor •() → self::I<self::I::T>
     : super core::Object::•()
     ;
-  abstract method f(self::I::T x) → void;
+  abstract method f(generic-covariant-impl self::I::T x) → void;
 }
 class M extends core::Object {
   synthetic constructor •() → self::M
diff --git a/pkg/front_end/testcases/runtime_checks/covariant_generic_parameter_in_interface_super_mixin.dart.legacy.transformed.expect b/pkg/front_end/testcases/runtime_checks/covariant_generic_parameter_in_interface_super_mixin.dart.legacy.transformed.expect
index aca4225..0e61a92 100644
--- a/pkg/front_end/testcases/runtime_checks/covariant_generic_parameter_in_interface_super_mixin.dart.legacy.transformed.expect
+++ b/pkg/front_end/testcases/runtime_checks/covariant_generic_parameter_in_interface_super_mixin.dart.legacy.transformed.expect
@@ -12,7 +12,7 @@
   synthetic constructor •() → self::I<self::I::T>
     : super core::Object::•()
     ;
-  abstract method f(self::I::T x) → void;
+  abstract method f(generic-covariant-impl self::I::T x) → void;
 }
 class M extends core::Object {
   synthetic constructor •() → self::M
diff --git a/pkg/front_end/testcases/runtime_checks/covariant_generic_parameter_in_interface_super_mixin.dart.outline.expect b/pkg/front_end/testcases/runtime_checks/covariant_generic_parameter_in_interface_super_mixin.dart.outline.expect
index 171a55f..926b281 100644
--- a/pkg/front_end/testcases/runtime_checks/covariant_generic_parameter_in_interface_super_mixin.dart.outline.expect
+++ b/pkg/front_end/testcases/runtime_checks/covariant_generic_parameter_in_interface_super_mixin.dart.outline.expect
@@ -11,7 +11,7 @@
 abstract class I<T extends core::Object = dynamic> extends core::Object {
   synthetic constructor •() → self::I<self::I::T>
     ;
-  abstract method f(self::I::T x) → void;
+  abstract method f(generic-covariant-impl self::I::T x) → void;
 }
 class M extends core::Object {
   synthetic constructor •() → self::M
diff --git a/pkg/front_end/testcases/runtime_checks/covariant_generic_parameter_tear_off.dart b/pkg/front_end/testcases/runtime_checks/covariant_generic_parameter_tear_off.dart
index 260dabe..8261613 100644
--- a/pkg/front_end/testcases/runtime_checks/covariant_generic_parameter_tear_off.dart
+++ b/pkg/front_end/testcases/runtime_checks/covariant_generic_parameter_tear_off.dart
@@ -10,8 +10,8 @@
 typedef U G<T, U>(T x);
 
 class C<T> {
-  void f1(T /*@covariance=genericImpl*/ x) {}
-  T f2(List<T> /*@covariance=genericImpl*/ x) => x.first;
+  void f1(T x) {}
+  T f2(List<T> x) => x.first;
 }
 
 F<num> g1(C<num> c) {
diff --git a/pkg/front_end/testcases/runtime_checks/covariant_generic_parameter_tear_off.dart.legacy.expect b/pkg/front_end/testcases/runtime_checks/covariant_generic_parameter_tear_off.dart.legacy.expect
index cb4340c..173ea04 100644
--- a/pkg/front_end/testcases/runtime_checks/covariant_generic_parameter_tear_off.dart.legacy.expect
+++ b/pkg/front_end/testcases/runtime_checks/covariant_generic_parameter_tear_off.dart.legacy.expect
@@ -8,8 +8,8 @@
   synthetic constructor •() → self::C<self::C::T>
     : super core::Object::•()
     ;
-  method f1(self::C::T x) → void {}
-  method f2(core::List<self::C::T> x) → self::C::T
+  method f1(generic-covariant-impl self::C::T x) → void {}
+  method f2(generic-covariant-impl core::List<self::C::T> x) → self::C::T
     return x.first;
 }
 static method g1(self::C<core::num> c) → (core::num) → void {
diff --git a/pkg/front_end/testcases/runtime_checks/covariant_generic_parameter_tear_off.dart.legacy.transformed.expect b/pkg/front_end/testcases/runtime_checks/covariant_generic_parameter_tear_off.dart.legacy.transformed.expect
index cb4340c..173ea04 100644
--- a/pkg/front_end/testcases/runtime_checks/covariant_generic_parameter_tear_off.dart.legacy.transformed.expect
+++ b/pkg/front_end/testcases/runtime_checks/covariant_generic_parameter_tear_off.dart.legacy.transformed.expect
@@ -8,8 +8,8 @@
   synthetic constructor •() → self::C<self::C::T>
     : super core::Object::•()
     ;
-  method f1(self::C::T x) → void {}
-  method f2(core::List<self::C::T> x) → self::C::T
+  method f1(generic-covariant-impl self::C::T x) → void {}
+  method f2(generic-covariant-impl core::List<self::C::T> x) → self::C::T
     return x.first;
 }
 static method g1(self::C<core::num> c) → (core::num) → void {
diff --git a/pkg/front_end/testcases/runtime_checks/covariant_generic_parameter_tear_off.dart.outline.expect b/pkg/front_end/testcases/runtime_checks/covariant_generic_parameter_tear_off.dart.outline.expect
index d426ddb..3983048 100644
--- a/pkg/front_end/testcases/runtime_checks/covariant_generic_parameter_tear_off.dart.outline.expect
+++ b/pkg/front_end/testcases/runtime_checks/covariant_generic_parameter_tear_off.dart.outline.expect
@@ -7,9 +7,9 @@
 class C<T extends core::Object = dynamic> extends core::Object {
   synthetic constructor •() → self::C<self::C::T>
     ;
-  method f1(self::C::T x) → void
+  method f1(generic-covariant-impl self::C::T x) → void
     ;
-  method f2(core::List<self::C::T> x) → self::C::T
+  method f2(generic-covariant-impl core::List<self::C::T> x) → self::C::T
     ;
 }
 static method g1(self::C<core::num> c) → (core::num) → void
diff --git a/pkg/front_end/testcases/runtime_checks/covariant_keyword.dart b/pkg/front_end/testcases/runtime_checks/covariant_keyword.dart
index 1c44f18..02bfdcf 100644
--- a/pkg/front_end/testcases/runtime_checks/covariant_keyword.dart
+++ b/pkg/front_end/testcases/runtime_checks/covariant_keyword.dart
@@ -12,11 +12,11 @@
 }
 
 class D extends C {
-  void f(covariant int /*@covariance=explicit*/ x) {}
+  void f(covariant int x) {}
 }
 
 class E extends D {
-  void f(int /*@covariance=explicit*/ x) {}
+  void f(int x) {}
 }
 
 void g1(C c) {
diff --git a/pkg/front_end/testcases/runtime_checks/covariant_keyword_field.dart b/pkg/front_end/testcases/runtime_checks/covariant_keyword_field.dart
index 5756611..7c7f663 100644
--- a/pkg/front_end/testcases/runtime_checks/covariant_keyword_field.dart
+++ b/pkg/front_end/testcases/runtime_checks/covariant_keyword_field.dart
@@ -10,11 +10,11 @@
 }
 
 class D implements C {
-  covariant int /*@covariance=explicit*/ x;
+  covariant int x;
 }
 
 class E implements D {
-  int /*@covariance=explicit*/ x;
+  int x;
 }
 
 main() {}
diff --git a/pkg/front_end/testcases/runtime_checks/covariant_keyword_field_inherited_by_setter.dart b/pkg/front_end/testcases/runtime_checks/covariant_keyword_field_inherited_by_setter.dart
index 9ad2404..d8f1ceb 100644
--- a/pkg/front_end/testcases/runtime_checks/covariant_keyword_field_inherited_by_setter.dart
+++ b/pkg/front_end/testcases/runtime_checks/covariant_keyword_field_inherited_by_setter.dart
@@ -10,12 +10,12 @@
 }
 
 class D implements C {
-  covariant int /*@covariance=explicit*/ x;
+  covariant int x;
 }
 
 class E implements D {
   int get x => 0;
-  void set x(int /*@covariance=explicit*/ value) {}
+  void set x(int value) {}
 }
 
 main() {}
diff --git a/pkg/front_end/testcases/runtime_checks/covariant_keyword_setter.dart b/pkg/front_end/testcases/runtime_checks/covariant_keyword_setter.dart
index 0233e91..d9b8a30e 100644
--- a/pkg/front_end/testcases/runtime_checks/covariant_keyword_setter.dart
+++ b/pkg/front_end/testcases/runtime_checks/covariant_keyword_setter.dart
@@ -10,11 +10,11 @@
 }
 
 class D extends C {
-  void set x(covariant int /*@covariance=explicit*/ value) {}
+  void set x(covariant int value) {}
 }
 
 class E extends D {
-  void set x(int /*@covariance=explicit*/ value) {}
+  void set x(int value) {}
 }
 
 main() {}
diff --git a/pkg/front_end/testcases/runtime_checks/covariant_keyword_setter_inherited_by_field.dart b/pkg/front_end/testcases/runtime_checks/covariant_keyword_setter_inherited_by_field.dart
index 3594b79..21bd63d 100644
--- a/pkg/front_end/testcases/runtime_checks/covariant_keyword_setter_inherited_by_field.dart
+++ b/pkg/front_end/testcases/runtime_checks/covariant_keyword_setter_inherited_by_field.dart
@@ -10,11 +10,11 @@
 }
 
 class D extends C {
-  void set x(covariant int /*@covariance=explicit*/ value) {}
+  void set x(covariant int value) {}
 }
 
 class E implements D {
-  int /*@covariance=explicit*/ x;
+  int x;
 }
 
 main() {}
diff --git a/pkg/front_end/testcases/runtime_checks/covariant_setter.dart b/pkg/front_end/testcases/runtime_checks/covariant_setter.dart
index fc2b4f1..029caad 100644
--- a/pkg/front_end/testcases/runtime_checks/covariant_setter.dart
+++ b/pkg/front_end/testcases/runtime_checks/covariant_setter.dart
@@ -8,9 +8,9 @@
 typedef void F<T>(T x);
 
 class C<T> {
-  T /*@covariance=genericImpl*/ x;
-  void set y(T /*@covariance=genericImpl*/ value) {}
-  void f(T /*@covariance=genericImpl*/ value) {
+  T x;
+  void set y(T value) {}
+  void f(T value) {
     this.x = value;
     this.y = value;
   }
diff --git a/pkg/front_end/testcases/runtime_checks/covariant_setter.dart.legacy.expect b/pkg/front_end/testcases/runtime_checks/covariant_setter.dart.legacy.expect
index fa9d6c9..3fb057f 100644
--- a/pkg/front_end/testcases/runtime_checks/covariant_setter.dart.legacy.expect
+++ b/pkg/front_end/testcases/runtime_checks/covariant_setter.dart.legacy.expect
@@ -4,12 +4,12 @@
 
 typedef F<T extends core::Object = dynamic> = (T) → void;
 class C<T extends core::Object = dynamic> extends core::Object {
-  field self::C::T x = null;
+  generic-covariant-impl field self::C::T x = null;
   synthetic constructor •() → self::C<self::C::T>
     : super core::Object::•()
     ;
-  set y(self::C::T value) → void {}
-  method f(self::C::T value) → void {
+  set y(generic-covariant-impl self::C::T value) → void {}
+  method f(generic-covariant-impl self::C::T value) → void {
     this.{self::C::x} = value;
     this.{self::C::y} = value;
   }
diff --git a/pkg/front_end/testcases/runtime_checks/covariant_setter.dart.legacy.transformed.expect b/pkg/front_end/testcases/runtime_checks/covariant_setter.dart.legacy.transformed.expect
index fa9d6c9..3fb057f 100644
--- a/pkg/front_end/testcases/runtime_checks/covariant_setter.dart.legacy.transformed.expect
+++ b/pkg/front_end/testcases/runtime_checks/covariant_setter.dart.legacy.transformed.expect
@@ -4,12 +4,12 @@
 
 typedef F<T extends core::Object = dynamic> = (T) → void;
 class C<T extends core::Object = dynamic> extends core::Object {
-  field self::C::T x = null;
+  generic-covariant-impl field self::C::T x = null;
   synthetic constructor •() → self::C<self::C::T>
     : super core::Object::•()
     ;
-  set y(self::C::T value) → void {}
-  method f(self::C::T value) → void {
+  set y(generic-covariant-impl self::C::T value) → void {}
+  method f(generic-covariant-impl self::C::T value) → void {
     this.{self::C::x} = value;
     this.{self::C::y} = value;
   }
diff --git a/pkg/front_end/testcases/runtime_checks/covariant_setter.dart.outline.expect b/pkg/front_end/testcases/runtime_checks/covariant_setter.dart.outline.expect
index edbba3a..034ccc0 100644
--- a/pkg/front_end/testcases/runtime_checks/covariant_setter.dart.outline.expect
+++ b/pkg/front_end/testcases/runtime_checks/covariant_setter.dart.outline.expect
@@ -4,12 +4,12 @@
 
 typedef F<T extends core::Object = dynamic> = (T) → void;
 class C<T extends core::Object = dynamic> extends core::Object {
-  field self::C::T x;
+  generic-covariant-impl field self::C::T x;
   synthetic constructor •() → self::C<self::C::T>
     ;
-  set y(self::C::T value) → void
+  set y(generic-covariant-impl self::C::T value) → void
     ;
-  method f(self::C::T value) → void
+  method f(generic-covariant-impl self::C::T value) → void
     ;
 }
 static method g(self::C<core::num> c) → void
diff --git a/pkg/front_end/testcases/runtime_checks/dynamic_invocation.dart b/pkg/front_end/testcases/runtime_checks/dynamic_invocation.dart
index 279e3ba..790dff4 100644
--- a/pkg/front_end/testcases/runtime_checks/dynamic_invocation.dart
+++ b/pkg/front_end/testcases/runtime_checks/dynamic_invocation.dart
@@ -6,12 +6,12 @@
 library test;
 
 class C<T> {
-  void f1(T /*@covariance=genericImpl*/ x) {}
+  void f1(T x) {}
   void f2(int x) {}
 }
 
 class D extends C<num> {
-  void f1(covariant int /*@covariance=explicit*/ x) {}
+  void f1(covariant int x) {}
 }
 
 void g1(dynamic d) {
diff --git a/pkg/front_end/testcases/runtime_checks/dynamic_invocation.dart.legacy.expect b/pkg/front_end/testcases/runtime_checks/dynamic_invocation.dart.legacy.expect
index 92254e8..2efc919 100644
--- a/pkg/front_end/testcases/runtime_checks/dynamic_invocation.dart.legacy.expect
+++ b/pkg/front_end/testcases/runtime_checks/dynamic_invocation.dart.legacy.expect
@@ -6,7 +6,7 @@
   synthetic constructor •() → self::C<self::C::T>
     : super core::Object::•()
     ;
-  method f1(self::C::T x) → void {}
+  method f1(generic-covariant-impl self::C::T x) → void {}
   method f2(core::int x) → void {}
 }
 class D extends self::C<core::num> {
diff --git a/pkg/front_end/testcases/runtime_checks/dynamic_invocation.dart.legacy.transformed.expect b/pkg/front_end/testcases/runtime_checks/dynamic_invocation.dart.legacy.transformed.expect
index 92254e8..2efc919 100644
--- a/pkg/front_end/testcases/runtime_checks/dynamic_invocation.dart.legacy.transformed.expect
+++ b/pkg/front_end/testcases/runtime_checks/dynamic_invocation.dart.legacy.transformed.expect
@@ -6,7 +6,7 @@
   synthetic constructor •() → self::C<self::C::T>
     : super core::Object::•()
     ;
-  method f1(self::C::T x) → void {}
+  method f1(generic-covariant-impl self::C::T x) → void {}
   method f2(core::int x) → void {}
 }
 class D extends self::C<core::num> {
diff --git a/pkg/front_end/testcases/runtime_checks/dynamic_invocation.dart.outline.expect b/pkg/front_end/testcases/runtime_checks/dynamic_invocation.dart.outline.expect
index e6d2c0e..87b6f89 100644
--- a/pkg/front_end/testcases/runtime_checks/dynamic_invocation.dart.outline.expect
+++ b/pkg/front_end/testcases/runtime_checks/dynamic_invocation.dart.outline.expect
@@ -5,7 +5,7 @@
 class C<T extends core::Object = dynamic> extends core::Object {
   synthetic constructor •() → self::C<self::C::T>
     ;
-  method f1(self::C::T x) → void
+  method f1(generic-covariant-impl self::C::T x) → void
     ;
   method f2(core::int x) → void
     ;
diff --git a/pkg/front_end/testcases/runtime_checks/dynamic_invocation_generic.dart b/pkg/front_end/testcases/runtime_checks/dynamic_invocation_generic.dart
index 8f1f075..6206b0e 100644
--- a/pkg/front_end/testcases/runtime_checks/dynamic_invocation_generic.dart
+++ b/pkg/front_end/testcases/runtime_checks/dynamic_invocation_generic.dart
@@ -6,7 +6,7 @@
 library test;
 
 class C<T> {
-  void f< /*@covariance=genericImpl*/ U extends T>(U x) {}
+  void f<U extends T>(U x) {}
 }
 
 void g1(dynamic d) {
diff --git a/pkg/front_end/testcases/runtime_checks/dynamic_invocation_generic.dart.legacy.expect b/pkg/front_end/testcases/runtime_checks/dynamic_invocation_generic.dart.legacy.expect
index 8fc21ae..205ca75 100644
--- a/pkg/front_end/testcases/runtime_checks/dynamic_invocation_generic.dart.legacy.expect
+++ b/pkg/front_end/testcases/runtime_checks/dynamic_invocation_generic.dart.legacy.expect
@@ -6,7 +6,7 @@
   synthetic constructor •() → self::C<self::C::T>
     : super core::Object::•()
     ;
-  method f<U extends self::C::T = dynamic>(self::C::f::U x) → void {}
+  method f<generic-covariant-impl U extends self::C::T = dynamic>(self::C::f::U x) → void {}
 }
 static method g1(dynamic d) → void {
   d.f<core::num>(1.5);
diff --git a/pkg/front_end/testcases/runtime_checks/dynamic_invocation_generic.dart.legacy.transformed.expect b/pkg/front_end/testcases/runtime_checks/dynamic_invocation_generic.dart.legacy.transformed.expect
index 8fc21ae..205ca75 100644
--- a/pkg/front_end/testcases/runtime_checks/dynamic_invocation_generic.dart.legacy.transformed.expect
+++ b/pkg/front_end/testcases/runtime_checks/dynamic_invocation_generic.dart.legacy.transformed.expect
@@ -6,7 +6,7 @@
   synthetic constructor •() → self::C<self::C::T>
     : super core::Object::•()
     ;
-  method f<U extends self::C::T = dynamic>(self::C::f::U x) → void {}
+  method f<generic-covariant-impl U extends self::C::T = dynamic>(self::C::f::U x) → void {}
 }
 static method g1(dynamic d) → void {
   d.f<core::num>(1.5);
diff --git a/pkg/front_end/testcases/runtime_checks/dynamic_invocation_generic.dart.outline.expect b/pkg/front_end/testcases/runtime_checks/dynamic_invocation_generic.dart.outline.expect
index 195a9e4..65c7be8 100644
--- a/pkg/front_end/testcases/runtime_checks/dynamic_invocation_generic.dart.outline.expect
+++ b/pkg/front_end/testcases/runtime_checks/dynamic_invocation_generic.dart.outline.expect
@@ -5,7 +5,7 @@
 class C<T extends core::Object = dynamic> extends core::Object {
   synthetic constructor •() → self::C<self::C::T>
     ;
-  method f<U extends self::C::T = dynamic>(self::C::f::U x) → void
+  method f<generic-covariant-impl U extends self::C::T = dynamic>(self::C::f::U x) → void
     ;
 }
 static method g1(dynamic d) → void
diff --git a/pkg/front_end/testcases/runtime_checks/field_forwarding_stub_generic_covariant.dart b/pkg/front_end/testcases/runtime_checks/field_forwarding_stub_generic_covariant.dart
index 554eeae..065bd4e 100644
--- a/pkg/front_end/testcases/runtime_checks/field_forwarding_stub_generic_covariant.dart
+++ b/pkg/front_end/testcases/runtime_checks/field_forwarding_stub_generic_covariant.dart
@@ -6,14 +6,13 @@
 library test;
 
 class B<T> {
-  T /*@covariance=genericImpl*/ x;
+  T x;
 }
 
 class C {
   num x;
 }
 
-class /*@forwardingStub=void set x(covariance=(genericImpl) num _)*/ D extends C
-    implements B<num> {}
+class D extends C implements B<num> {}
 
 void main() {}
diff --git a/pkg/front_end/testcases/runtime_checks/field_forwarding_stub_generic_covariant.dart.legacy.expect b/pkg/front_end/testcases/runtime_checks/field_forwarding_stub_generic_covariant.dart.legacy.expect
index 7f689fb..084024b 100644
--- a/pkg/front_end/testcases/runtime_checks/field_forwarding_stub_generic_covariant.dart.legacy.expect
+++ b/pkg/front_end/testcases/runtime_checks/field_forwarding_stub_generic_covariant.dart.legacy.expect
@@ -3,7 +3,7 @@
 import "dart:core" as core;
 
 class B<T extends core::Object = dynamic> extends core::Object {
-  field self::B::T x = null;
+  generic-covariant-impl field self::B::T x = null;
   synthetic constructor •() → self::B<self::B::T>
     : super core::Object::•()
     ;
diff --git a/pkg/front_end/testcases/runtime_checks/field_forwarding_stub_generic_covariant.dart.legacy.transformed.expect b/pkg/front_end/testcases/runtime_checks/field_forwarding_stub_generic_covariant.dart.legacy.transformed.expect
index 7f689fb..084024b 100644
--- a/pkg/front_end/testcases/runtime_checks/field_forwarding_stub_generic_covariant.dart.legacy.transformed.expect
+++ b/pkg/front_end/testcases/runtime_checks/field_forwarding_stub_generic_covariant.dart.legacy.transformed.expect
@@ -3,7 +3,7 @@
 import "dart:core" as core;
 
 class B<T extends core::Object = dynamic> extends core::Object {
-  field self::B::T x = null;
+  generic-covariant-impl field self::B::T x = null;
   synthetic constructor •() → self::B<self::B::T>
     : super core::Object::•()
     ;
diff --git a/pkg/front_end/testcases/runtime_checks/field_forwarding_stub_generic_covariant.dart.outline.expect b/pkg/front_end/testcases/runtime_checks/field_forwarding_stub_generic_covariant.dart.outline.expect
index e67be67..d696974 100644
--- a/pkg/front_end/testcases/runtime_checks/field_forwarding_stub_generic_covariant.dart.outline.expect
+++ b/pkg/front_end/testcases/runtime_checks/field_forwarding_stub_generic_covariant.dart.outline.expect
@@ -3,7 +3,7 @@
 import "dart:core" as core;
 
 class B<T extends core::Object = dynamic> extends core::Object {
-  field self::B::T x;
+  generic-covariant-impl field self::B::T x;
   synthetic constructor •() → self::B<self::B::T>
     ;
 }
diff --git a/pkg/front_end/testcases/runtime_checks/forwarding_stub_with_default_values.dart b/pkg/front_end/testcases/runtime_checks/forwarding_stub_with_default_values.dart
index b8607ea..816a396 100644
--- a/pkg/front_end/testcases/runtime_checks/forwarding_stub_with_default_values.dart
+++ b/pkg/front_end/testcases/runtime_checks/forwarding_stub_with_default_values.dart
@@ -23,14 +23,11 @@
 }
 
 abstract class I<T> {
-  void f([T /*@covariance=genericImpl*/ x]);
-  void g({T /*@covariance=genericImpl*/ x});
+  void f([T x]);
+  void g({T x});
 }
 
-class
-/*@forwardingStub=void f([covariance=(genericImpl) num x])*/
-/*@forwardingStub=void g({covariance=(genericImpl) num x})*/
-    C extends B implements I<num> {}
+class C extends B implements I<num> {}
 
 main() {
   C c = new C();
diff --git a/pkg/front_end/testcases/runtime_checks/forwarding_stub_with_default_values.dart.legacy.expect b/pkg/front_end/testcases/runtime_checks/forwarding_stub_with_default_values.dart.legacy.expect
index 01f712b..82a32ab 100644
--- a/pkg/front_end/testcases/runtime_checks/forwarding_stub_with_default_values.dart.legacy.expect
+++ b/pkg/front_end/testcases/runtime_checks/forwarding_stub_with_default_values.dart.legacy.expect
@@ -23,8 +23,8 @@
   synthetic constructor •() → self::I<self::I::T>
     : super core::Object::•()
     ;
-  abstract method f([self::I::T x = null]) → void;
-  abstract method g({self::I::T x = null}) → void;
+  abstract method f([generic-covariant-impl self::I::T x = null]) → void;
+  abstract method g({generic-covariant-impl self::I::T x = null}) → void;
 }
 class C extends self::B implements self::I<core::num> {
   synthetic constructor •() → self::C
diff --git a/pkg/front_end/testcases/runtime_checks/forwarding_stub_with_default_values.dart.legacy.transformed.expect b/pkg/front_end/testcases/runtime_checks/forwarding_stub_with_default_values.dart.legacy.transformed.expect
index 01f712b..82a32ab 100644
--- a/pkg/front_end/testcases/runtime_checks/forwarding_stub_with_default_values.dart.legacy.transformed.expect
+++ b/pkg/front_end/testcases/runtime_checks/forwarding_stub_with_default_values.dart.legacy.transformed.expect
@@ -23,8 +23,8 @@
   synthetic constructor •() → self::I<self::I::T>
     : super core::Object::•()
     ;
-  abstract method f([self::I::T x = null]) → void;
-  abstract method g({self::I::T x = null}) → void;
+  abstract method f([generic-covariant-impl self::I::T x = null]) → void;
+  abstract method g({generic-covariant-impl self::I::T x = null}) → void;
 }
 class C extends self::B implements self::I<core::num> {
   synthetic constructor •() → self::C
diff --git a/pkg/front_end/testcases/runtime_checks/forwarding_stub_with_default_values.dart.outline.expect b/pkg/front_end/testcases/runtime_checks/forwarding_stub_with_default_values.dart.outline.expect
index 596728c..5998e7f 100644
--- a/pkg/front_end/testcases/runtime_checks/forwarding_stub_with_default_values.dart.outline.expect
+++ b/pkg/front_end/testcases/runtime_checks/forwarding_stub_with_default_values.dart.outline.expect
@@ -16,8 +16,8 @@
 abstract class I<T extends core::Object = dynamic> extends core::Object {
   synthetic constructor •() → self::I<self::I::T>
     ;
-  abstract method f([self::I::T x]) → void;
-  abstract method g({self::I::T x}) → void;
+  abstract method f([generic-covariant-impl self::I::T x]) → void;
+  abstract method g({generic-covariant-impl self::I::T x}) → void;
 }
 class C extends self::B implements self::I<core::num> {
   synthetic constructor •() → self::C
diff --git a/pkg/front_end/testcases/runtime_checks/forwarding_stub_with_non_covariant_param.dart b/pkg/front_end/testcases/runtime_checks/forwarding_stub_with_non_covariant_param.dart
index 2b22cac..2cd0b19 100644
--- a/pkg/front_end/testcases/runtime_checks/forwarding_stub_with_non_covariant_param.dart
+++ b/pkg/front_end/testcases/runtime_checks/forwarding_stub_with_non_covariant_param.dart
@@ -10,10 +10,9 @@
 }
 
 abstract class I<T> {
-  void f(T /*@covariance=genericImpl*/ x, int y);
+  void f(T x, int y);
 }
 
-class /*@forwardingStub=void f(covariance=(genericImpl) int x, covariance=() int y)*/ C
-    extends B implements I<int> {}
+class C extends B implements I<int> {}
 
 void main() {}
diff --git a/pkg/front_end/testcases/runtime_checks/forwarding_stub_with_non_covariant_param.dart.legacy.expect b/pkg/front_end/testcases/runtime_checks/forwarding_stub_with_non_covariant_param.dart.legacy.expect
index 049bff0..5486a15 100644
--- a/pkg/front_end/testcases/runtime_checks/forwarding_stub_with_non_covariant_param.dart.legacy.expect
+++ b/pkg/front_end/testcases/runtime_checks/forwarding_stub_with_non_covariant_param.dart.legacy.expect
@@ -12,7 +12,7 @@
   synthetic constructor •() → self::I<self::I::T>
     : super core::Object::•()
     ;
-  abstract method f(self::I::T x, core::int y) → void;
+  abstract method f(generic-covariant-impl self::I::T x, core::int y) → void;
 }
 class C extends self::B implements self::I<core::int> {
   synthetic constructor •() → self::C
diff --git a/pkg/front_end/testcases/runtime_checks/forwarding_stub_with_non_covariant_param.dart.legacy.transformed.expect b/pkg/front_end/testcases/runtime_checks/forwarding_stub_with_non_covariant_param.dart.legacy.transformed.expect
index 049bff0..5486a15 100644
--- a/pkg/front_end/testcases/runtime_checks/forwarding_stub_with_non_covariant_param.dart.legacy.transformed.expect
+++ b/pkg/front_end/testcases/runtime_checks/forwarding_stub_with_non_covariant_param.dart.legacy.transformed.expect
@@ -12,7 +12,7 @@
   synthetic constructor •() → self::I<self::I::T>
     : super core::Object::•()
     ;
-  abstract method f(self::I::T x, core::int y) → void;
+  abstract method f(generic-covariant-impl self::I::T x, core::int y) → void;
 }
 class C extends self::B implements self::I<core::int> {
   synthetic constructor •() → self::C
diff --git a/pkg/front_end/testcases/runtime_checks/forwarding_stub_with_non_covariant_param.dart.outline.expect b/pkg/front_end/testcases/runtime_checks/forwarding_stub_with_non_covariant_param.dart.outline.expect
index e33d959..a0b2b04 100644
--- a/pkg/front_end/testcases/runtime_checks/forwarding_stub_with_non_covariant_param.dart.outline.expect
+++ b/pkg/front_end/testcases/runtime_checks/forwarding_stub_with_non_covariant_param.dart.outline.expect
@@ -11,7 +11,7 @@
 abstract class I<T extends core::Object = dynamic> extends core::Object {
   synthetic constructor •() → self::I<self::I::T>
     ;
-  abstract method f(self::I::T x, core::int y) → void;
+  abstract method f(generic-covariant-impl self::I::T x, core::int y) → void;
 }
 class C extends self::B implements self::I<core::int> {
   synthetic constructor •() → self::C
diff --git a/pkg/front_end/testcases/runtime_checks/generic_covariance_inheritance_setter_field.dart b/pkg/front_end/testcases/runtime_checks/generic_covariance_inheritance_setter_field.dart
index b144c81..d9f6ffd 100644
--- a/pkg/front_end/testcases/runtime_checks/generic_covariance_inheritance_setter_field.dart
+++ b/pkg/front_end/testcases/runtime_checks/generic_covariance_inheritance_setter_field.dart
@@ -6,19 +6,19 @@
 library test;
 
 class C<T> {
-  void set x(T /*@covariance=genericImpl*/ t) {}
-  T /*@covariance=genericImpl*/ y;
+  void set x(T t) {}
+  T y;
 }
 
 class D implements C<num> {
-  num /*@covariance=genericImpl*/ x;
-  num /*@covariance=genericImpl*/ y;
+  num x;
+  num y;
 }
 
 class E implements C<num> {
-  void set x(num /*@covariance=genericImpl*/ t) {}
+  void set x(num t) {}
   num get y => null;
-  void set y(num /*@covariance=genericImpl*/ t) {}
+  void set y(num t) {}
 }
 
 void main() {}
diff --git a/pkg/front_end/testcases/runtime_checks/generic_covariance_inheritance_setter_field.dart.legacy.expect b/pkg/front_end/testcases/runtime_checks/generic_covariance_inheritance_setter_field.dart.legacy.expect
index 8874ff3..121a90b 100644
--- a/pkg/front_end/testcases/runtime_checks/generic_covariance_inheritance_setter_field.dart.legacy.expect
+++ b/pkg/front_end/testcases/runtime_checks/generic_covariance_inheritance_setter_field.dart.legacy.expect
@@ -3,11 +3,11 @@
 import "dart:core" as core;
 
 class C<T extends core::Object = dynamic> extends core::Object {
-  field self::C::T y = null;
+  generic-covariant-impl field self::C::T y = null;
   synthetic constructor •() → self::C<self::C::T>
     : super core::Object::•()
     ;
-  set x(self::C::T t) → void {}
+  set x(generic-covariant-impl self::C::T t) → void {}
 }
 class D extends core::Object implements self::C<core::num> {
   field core::num x = null;
diff --git a/pkg/front_end/testcases/runtime_checks/generic_covariance_inheritance_setter_field.dart.legacy.transformed.expect b/pkg/front_end/testcases/runtime_checks/generic_covariance_inheritance_setter_field.dart.legacy.transformed.expect
index 8874ff3..121a90b 100644
--- a/pkg/front_end/testcases/runtime_checks/generic_covariance_inheritance_setter_field.dart.legacy.transformed.expect
+++ b/pkg/front_end/testcases/runtime_checks/generic_covariance_inheritance_setter_field.dart.legacy.transformed.expect
@@ -3,11 +3,11 @@
 import "dart:core" as core;
 
 class C<T extends core::Object = dynamic> extends core::Object {
-  field self::C::T y = null;
+  generic-covariant-impl field self::C::T y = null;
   synthetic constructor •() → self::C<self::C::T>
     : super core::Object::•()
     ;
-  set x(self::C::T t) → void {}
+  set x(generic-covariant-impl self::C::T t) → void {}
 }
 class D extends core::Object implements self::C<core::num> {
   field core::num x = null;
diff --git a/pkg/front_end/testcases/runtime_checks/generic_covariance_inheritance_setter_field.dart.outline.expect b/pkg/front_end/testcases/runtime_checks/generic_covariance_inheritance_setter_field.dart.outline.expect
index f6ab6e3..bf98c8f 100644
--- a/pkg/front_end/testcases/runtime_checks/generic_covariance_inheritance_setter_field.dart.outline.expect
+++ b/pkg/front_end/testcases/runtime_checks/generic_covariance_inheritance_setter_field.dart.outline.expect
@@ -3,10 +3,10 @@
 import "dart:core" as core;
 
 class C<T extends core::Object = dynamic> extends core::Object {
-  field self::C::T y;
+  generic-covariant-impl field self::C::T y;
   synthetic constructor •() → self::C<self::C::T>
     ;
-  set x(self::C::T t) → void
+  set x(generic-covariant-impl self::C::T t) → void
     ;
 }
 class D extends core::Object implements self::C<core::num> {
diff --git a/pkg/front_end/testcases/runtime_checks/generic_vs_explicit_covariance.dart b/pkg/front_end/testcases/runtime_checks/generic_vs_explicit_covariance.dart
index 6558f2d..54358a5 100644
--- a/pkg/front_end/testcases/runtime_checks/generic_vs_explicit_covariance.dart
+++ b/pkg/front_end/testcases/runtime_checks/generic_vs_explicit_covariance.dart
@@ -6,17 +6,17 @@
 library test;
 
 abstract class A {
-  void set x(covariant Object /*@covariance=explicit*/ value);
+  void set x(covariant Object value);
 }
 
 class B implements A {
-  void f(covariant Object /*@covariance=explicit*/ x) {}
-  Object /*@covariance=explicit*/ x; // covariant
+  void f(covariant Object x) {}
+  Object x; // covariant
 }
 
 class C<T> implements B {
-  void f(T /*@covariance=explicit*/ x) {}
-  T /*@covariance=explicit*/ x;
+  void f(T x) {}
+  T x;
 }
 
 main() {}
diff --git a/pkg/front_end/testcases/runtime_checks/generic_vs_explicit_covariance.dart.legacy.expect b/pkg/front_end/testcases/runtime_checks/generic_vs_explicit_covariance.dart.legacy.expect
index 943bf76..fc559f4 100644
--- a/pkg/front_end/testcases/runtime_checks/generic_vs_explicit_covariance.dart.legacy.expect
+++ b/pkg/front_end/testcases/runtime_checks/generic_vs_explicit_covariance.dart.legacy.expect
@@ -16,10 +16,10 @@
   method f(covariant core::Object x) → void {}
 }
 class C<T extends core::Object = dynamic> extends core::Object implements self::B {
-  field self::C::T x = null;
+  generic-covariant-impl field self::C::T x = null;
   synthetic constructor •() → self::C<self::C::T>
     : super core::Object::•()
     ;
-  method f(self::C::T x) → void {}
+  method f(generic-covariant-impl self::C::T x) → void {}
 }
 static method main() → dynamic {}
diff --git a/pkg/front_end/testcases/runtime_checks/generic_vs_explicit_covariance.dart.legacy.transformed.expect b/pkg/front_end/testcases/runtime_checks/generic_vs_explicit_covariance.dart.legacy.transformed.expect
index 943bf76..fc559f4 100644
--- a/pkg/front_end/testcases/runtime_checks/generic_vs_explicit_covariance.dart.legacy.transformed.expect
+++ b/pkg/front_end/testcases/runtime_checks/generic_vs_explicit_covariance.dart.legacy.transformed.expect
@@ -16,10 +16,10 @@
   method f(covariant core::Object x) → void {}
 }
 class C<T extends core::Object = dynamic> extends core::Object implements self::B {
-  field self::C::T x = null;
+  generic-covariant-impl field self::C::T x = null;
   synthetic constructor •() → self::C<self::C::T>
     : super core::Object::•()
     ;
-  method f(self::C::T x) → void {}
+  method f(generic-covariant-impl self::C::T x) → void {}
 }
 static method main() → dynamic {}
diff --git a/pkg/front_end/testcases/runtime_checks/generic_vs_explicit_covariance.dart.outline.expect b/pkg/front_end/testcases/runtime_checks/generic_vs_explicit_covariance.dart.outline.expect
index 89789e5..4ed0cca 100644
--- a/pkg/front_end/testcases/runtime_checks/generic_vs_explicit_covariance.dart.outline.expect
+++ b/pkg/front_end/testcases/runtime_checks/generic_vs_explicit_covariance.dart.outline.expect
@@ -15,10 +15,10 @@
     ;
 }
 class C<T extends core::Object = dynamic> extends core::Object implements self::B {
-  field self::C::T x;
+  generic-covariant-impl field self::C::T x;
   synthetic constructor •() → self::C<self::C::T>
     ;
-  method f(self::C::T x) → void
+  method f(generic-covariant-impl self::C::T x) → void
     ;
 }
 static method main() → dynamic
diff --git a/pkg/front_end/testcases/runtime_checks_new/abstract_override_becomes_forwarding_stub.dart b/pkg/front_end/testcases/runtime_checks_new/abstract_override_becomes_forwarding_stub.dart
index ce4aebd..4b4ea07 100644
--- a/pkg/front_end/testcases/runtime_checks_new/abstract_override_becomes_forwarding_stub.dart
+++ b/pkg/front_end/testcases/runtime_checks_new/abstract_override_becomes_forwarding_stub.dart
@@ -10,11 +10,11 @@
 }
 
 abstract class I<T> {
-  void f(T /*@covariance=genericImpl*/ x);
+  void f(T x);
 }
 
 class C extends B implements I<num> {
-  void /*@forwardingStub=semi-stub*/ f(num /*@covariance=genericImpl*/ x);
+  void /*@forwardingStub=semi-stub*/ f(num x);
 }
 
 main() {}
diff --git a/pkg/front_end/testcases/runtime_checks_new/abstract_override_becomes_forwarding_stub.dart.legacy.expect b/pkg/front_end/testcases/runtime_checks_new/abstract_override_becomes_forwarding_stub.dart.legacy.expect
index aea0463..95fdf8b 100644
--- a/pkg/front_end/testcases/runtime_checks_new/abstract_override_becomes_forwarding_stub.dart.legacy.expect
+++ b/pkg/front_end/testcases/runtime_checks_new/abstract_override_becomes_forwarding_stub.dart.legacy.expect
@@ -12,7 +12,7 @@
   synthetic constructor •() → self::I<self::I::T>
     : super core::Object::•()
     ;
-  abstract method f(self::I::T x) → void;
+  abstract method f(generic-covariant-impl self::I::T x) → void;
 }
 class C extends self::B implements self::I<core::num> {
   synthetic constructor •() → self::C
diff --git a/pkg/front_end/testcases/runtime_checks_new/abstract_override_becomes_forwarding_stub.dart.legacy.transformed.expect b/pkg/front_end/testcases/runtime_checks_new/abstract_override_becomes_forwarding_stub.dart.legacy.transformed.expect
index aea0463..95fdf8b 100644
--- a/pkg/front_end/testcases/runtime_checks_new/abstract_override_becomes_forwarding_stub.dart.legacy.transformed.expect
+++ b/pkg/front_end/testcases/runtime_checks_new/abstract_override_becomes_forwarding_stub.dart.legacy.transformed.expect
@@ -12,7 +12,7 @@
   synthetic constructor •() → self::I<self::I::T>
     : super core::Object::•()
     ;
-  abstract method f(self::I::T x) → void;
+  abstract method f(generic-covariant-impl self::I::T x) → void;
 }
 class C extends self::B implements self::I<core::num> {
   synthetic constructor •() → self::C
diff --git a/pkg/front_end/testcases/runtime_checks_new/abstract_override_becomes_forwarding_stub.dart.outline.expect b/pkg/front_end/testcases/runtime_checks_new/abstract_override_becomes_forwarding_stub.dart.outline.expect
index 8a400cf..8b7ff11 100644
--- a/pkg/front_end/testcases/runtime_checks_new/abstract_override_becomes_forwarding_stub.dart.outline.expect
+++ b/pkg/front_end/testcases/runtime_checks_new/abstract_override_becomes_forwarding_stub.dart.outline.expect
@@ -11,7 +11,7 @@
 abstract class I<T extends core::Object = dynamic> extends core::Object {
   synthetic constructor •() → self::I<self::I::T>
     ;
-  abstract method f(self::I::T x) → void;
+  abstract method f(generic-covariant-impl self::I::T x) → void;
 }
 class C extends self::B implements self::I<core::num> {
   synthetic constructor •() → self::C
diff --git a/pkg/front_end/testcases/runtime_checks_new/call_through_this.dart b/pkg/front_end/testcases/runtime_checks_new/call_through_this.dart
index 9cc0c47..fa5945b 100644
--- a/pkg/front_end/testcases/runtime_checks_new/call_through_this.dart
+++ b/pkg/front_end/testcases/runtime_checks_new/call_through_this.dart
@@ -8,16 +8,16 @@
 typedef F<T>(T x);
 
 class C<T> {
-  void f(T /*@covariance=genericImpl*/ x) {}
-  void g1(T /*@covariance=genericImpl*/ x) {
+  void f(T x) {}
+  void g1(T x) {
     this.f(x);
   }
 
-  void g2(T /*@covariance=genericImpl*/ x) {
+  void g2(T x) {
     f(x);
   }
 
-  void g3(C<T> /*@covariance=genericImpl*/ c, T /*@covariance=genericImpl*/ x) {
+  void g3(C<T> c, T x) {
     c.f(x);
   }
 
@@ -27,7 +27,7 @@
 class D extends C<int> {}
 
 class E extends C<num> {
-  void f(covariant int /*@covariance=explicit*/ x) {}
+  void f(covariant int x) {}
 }
 
 test() {
diff --git a/pkg/front_end/testcases/runtime_checks_new/call_through_this.dart.legacy.expect b/pkg/front_end/testcases/runtime_checks_new/call_through_this.dart.legacy.expect
index f02f1bc..f9eaac1 100644
--- a/pkg/front_end/testcases/runtime_checks_new/call_through_this.dart.legacy.expect
+++ b/pkg/front_end/testcases/runtime_checks_new/call_through_this.dart.legacy.expect
@@ -7,14 +7,14 @@
   synthetic constructor •() → self::C<self::C::T>
     : super core::Object::•()
     ;
-  method f(self::C::T x) → void {}
-  method g1(self::C::T x) → void {
+  method f(generic-covariant-impl self::C::T x) → void {}
+  method g1(generic-covariant-impl self::C::T x) → void {
     this.{self::C::f}(x);
   }
-  method g2(self::C::T x) → void {
+  method g2(generic-covariant-impl self::C::T x) → void {
     this.{self::C::f}(x);
   }
-  method g3(self::C<self::C::T> c, self::C::T x) → void {
+  method g3(generic-covariant-impl self::C<self::C::T> c, generic-covariant-impl self::C::T x) → void {
     c.f(x);
   }
   method g4() → (self::C::T) → dynamic
diff --git a/pkg/front_end/testcases/runtime_checks_new/call_through_this.dart.legacy.transformed.expect b/pkg/front_end/testcases/runtime_checks_new/call_through_this.dart.legacy.transformed.expect
index f02f1bc..f9eaac1 100644
--- a/pkg/front_end/testcases/runtime_checks_new/call_through_this.dart.legacy.transformed.expect
+++ b/pkg/front_end/testcases/runtime_checks_new/call_through_this.dart.legacy.transformed.expect
@@ -7,14 +7,14 @@
   synthetic constructor •() → self::C<self::C::T>
     : super core::Object::•()
     ;
-  method f(self::C::T x) → void {}
-  method g1(self::C::T x) → void {
+  method f(generic-covariant-impl self::C::T x) → void {}
+  method g1(generic-covariant-impl self::C::T x) → void {
     this.{self::C::f}(x);
   }
-  method g2(self::C::T x) → void {
+  method g2(generic-covariant-impl self::C::T x) → void {
     this.{self::C::f}(x);
   }
-  method g3(self::C<self::C::T> c, self::C::T x) → void {
+  method g3(generic-covariant-impl self::C<self::C::T> c, generic-covariant-impl self::C::T x) → void {
     c.f(x);
   }
   method g4() → (self::C::T) → dynamic
diff --git a/pkg/front_end/testcases/runtime_checks_new/call_through_this.dart.outline.expect b/pkg/front_end/testcases/runtime_checks_new/call_through_this.dart.outline.expect
index 5b69334..0c9d1ca 100644
--- a/pkg/front_end/testcases/runtime_checks_new/call_through_this.dart.outline.expect
+++ b/pkg/front_end/testcases/runtime_checks_new/call_through_this.dart.outline.expect
@@ -6,13 +6,13 @@
 class C<T extends core::Object = dynamic> extends core::Object {
   synthetic constructor •() → self::C<self::C::T>
     ;
-  method f(self::C::T x) → void
+  method f(generic-covariant-impl self::C::T x) → void
     ;
-  method g1(self::C::T x) → void
+  method g1(generic-covariant-impl self::C::T x) → void
     ;
-  method g2(self::C::T x) → void
+  method g2(generic-covariant-impl self::C::T x) → void
     ;
-  method g3(self::C<self::C::T> c, self::C::T x) → void
+  method g3(generic-covariant-impl self::C<self::C::T> c, generic-covariant-impl self::C::T x) → void
     ;
   method g4() → (self::C::T) → dynamic
     ;
diff --git a/pkg/front_end/testcases/runtime_checks_new/contravariant_getter_return_compound_assign.dart b/pkg/front_end/testcases/runtime_checks_new/contravariant_getter_return_compound_assign.dart
index c88d47ada..0aeccbf 100644
--- a/pkg/front_end/testcases/runtime_checks_new/contravariant_getter_return_compound_assign.dart
+++ b/pkg/front_end/testcases/runtime_checks_new/contravariant_getter_return_compound_assign.dart
@@ -8,7 +8,7 @@
 typedef void F<T>(T x);
 
 class B<T> {
-  B<T> operator +(B<T> /*@covariance=genericImpl*/ other) => null;
+  B<T> operator +(B<T> other) => null;
 }
 
 class C<T> {
diff --git a/pkg/front_end/testcases/runtime_checks_new/contravariant_getter_return_compound_assign.dart.legacy.expect b/pkg/front_end/testcases/runtime_checks_new/contravariant_getter_return_compound_assign.dart.legacy.expect
index 89d07f9..5b0622b 100644
--- a/pkg/front_end/testcases/runtime_checks_new/contravariant_getter_return_compound_assign.dart.legacy.expect
+++ b/pkg/front_end/testcases/runtime_checks_new/contravariant_getter_return_compound_assign.dart.legacy.expect
@@ -7,7 +7,7 @@
   synthetic constructor •() → self::B<self::B::T>
     : super core::Object::•()
     ;
-  operator +(self::B<self::B::T> other) → self::B<self::B::T>
+  operator +(generic-covariant-impl self::B<self::B::T> other) → self::B<self::B::T>
     return null;
 }
 class C<T extends core::Object = dynamic> extends core::Object {
diff --git a/pkg/front_end/testcases/runtime_checks_new/contravariant_getter_return_compound_assign.dart.legacy.transformed.expect b/pkg/front_end/testcases/runtime_checks_new/contravariant_getter_return_compound_assign.dart.legacy.transformed.expect
index 89d07f9..5b0622b 100644
--- a/pkg/front_end/testcases/runtime_checks_new/contravariant_getter_return_compound_assign.dart.legacy.transformed.expect
+++ b/pkg/front_end/testcases/runtime_checks_new/contravariant_getter_return_compound_assign.dart.legacy.transformed.expect
@@ -7,7 +7,7 @@
   synthetic constructor •() → self::B<self::B::T>
     : super core::Object::•()
     ;
-  operator +(self::B<self::B::T> other) → self::B<self::B::T>
+  operator +(generic-covariant-impl self::B<self::B::T> other) → self::B<self::B::T>
     return null;
 }
 class C<T extends core::Object = dynamic> extends core::Object {
diff --git a/pkg/front_end/testcases/runtime_checks_new/contravariant_getter_return_compound_assign.dart.outline.expect b/pkg/front_end/testcases/runtime_checks_new/contravariant_getter_return_compound_assign.dart.outline.expect
index c30ef22..2df9ad8f 100644
--- a/pkg/front_end/testcases/runtime_checks_new/contravariant_getter_return_compound_assign.dart.outline.expect
+++ b/pkg/front_end/testcases/runtime_checks_new/contravariant_getter_return_compound_assign.dart.outline.expect
@@ -6,7 +6,7 @@
 class B<T extends core::Object = dynamic> extends core::Object {
   synthetic constructor •() → self::B<self::B::T>
     ;
-  operator +(self::B<self::B::T> other) → self::B<self::B::T>
+  operator +(generic-covariant-impl self::B<self::B::T> other) → self::B<self::B::T>
     ;
 }
 class C<T extends core::Object = dynamic> extends core::Object {
diff --git a/pkg/front_end/testcases/runtime_checks_new/contravariant_index_assign.dart b/pkg/front_end/testcases/runtime_checks_new/contravariant_index_assign.dart
index 47d0002..ea53d03 100644
--- a/pkg/front_end/testcases/runtime_checks_new/contravariant_index_assign.dart
+++ b/pkg/front_end/testcases/runtime_checks_new/contravariant_index_assign.dart
@@ -8,7 +8,7 @@
 typedef void F<T>(T x);
 
 class B<T> {
-  B<T> operator +(B<T> /*@covariance=genericImpl*/ other) => null;
+  B<T> operator +(B<T> other) => null;
 }
 
 class C<T> {
diff --git a/pkg/front_end/testcases/runtime_checks_new/contravariant_index_assign.dart.legacy.expect b/pkg/front_end/testcases/runtime_checks_new/contravariant_index_assign.dart.legacy.expect
index e7781b1..3345c98 100644
--- a/pkg/front_end/testcases/runtime_checks_new/contravariant_index_assign.dart.legacy.expect
+++ b/pkg/front_end/testcases/runtime_checks_new/contravariant_index_assign.dart.legacy.expect
@@ -7,7 +7,7 @@
   synthetic constructor •() → self::B<self::B::T>
     : super core::Object::•()
     ;
-  operator +(self::B<self::B::T> other) → self::B<self::B::T>
+  operator +(generic-covariant-impl self::B<self::B::T> other) → self::B<self::B::T>
     return null;
 }
 class C<T extends core::Object = dynamic> extends core::Object {
diff --git a/pkg/front_end/testcases/runtime_checks_new/contravariant_index_assign.dart.legacy.transformed.expect b/pkg/front_end/testcases/runtime_checks_new/contravariant_index_assign.dart.legacy.transformed.expect
index e7781b1..3345c98 100644
--- a/pkg/front_end/testcases/runtime_checks_new/contravariant_index_assign.dart.legacy.transformed.expect
+++ b/pkg/front_end/testcases/runtime_checks_new/contravariant_index_assign.dart.legacy.transformed.expect
@@ -7,7 +7,7 @@
   synthetic constructor •() → self::B<self::B::T>
     : super core::Object::•()
     ;
-  operator +(self::B<self::B::T> other) → self::B<self::B::T>
+  operator +(generic-covariant-impl self::B<self::B::T> other) → self::B<self::B::T>
     return null;
 }
 class C<T extends core::Object = dynamic> extends core::Object {
diff --git a/pkg/front_end/testcases/runtime_checks_new/contravariant_index_assign.dart.outline.expect b/pkg/front_end/testcases/runtime_checks_new/contravariant_index_assign.dart.outline.expect
index 5e2e915..bb5426d 100644
--- a/pkg/front_end/testcases/runtime_checks_new/contravariant_index_assign.dart.outline.expect
+++ b/pkg/front_end/testcases/runtime_checks_new/contravariant_index_assign.dart.outline.expect
@@ -6,7 +6,7 @@
 class B<T extends core::Object = dynamic> extends core::Object {
   synthetic constructor •() → self::B<self::B::T>
     ;
-  operator +(self::B<self::B::T> other) → self::B<self::B::T>
+  operator +(generic-covariant-impl self::B<self::B::T> other) → self::B<self::B::T>
     ;
 }
 class C<T extends core::Object = dynamic> extends core::Object {
diff --git a/pkg/front_end/testcases/runtime_checks_new/derived_class_typed.dart b/pkg/front_end/testcases/runtime_checks_new/derived_class_typed.dart
index 0c73221..5d2400e 100644
--- a/pkg/front_end/testcases/runtime_checks_new/derived_class_typed.dart
+++ b/pkg/front_end/testcases/runtime_checks_new/derived_class_typed.dart
@@ -6,9 +6,9 @@
 library test;
 
 class B<T> {
-  void f(T /*@covariance=genericImpl*/ x) {}
-  void g({T /*@covariance=genericImpl*/ x}) {}
-  void h< /*@covariance=genericImpl*/ U extends T>() {}
+  void f(T x) {}
+  void g({T x}) {}
+  void h<U extends T>() {}
 }
 
 class C extends B<int> {}
diff --git a/pkg/front_end/testcases/runtime_checks_new/derived_class_typed.dart.legacy.expect b/pkg/front_end/testcases/runtime_checks_new/derived_class_typed.dart.legacy.expect
index 1fe58ed..9addeea 100644
--- a/pkg/front_end/testcases/runtime_checks_new/derived_class_typed.dart.legacy.expect
+++ b/pkg/front_end/testcases/runtime_checks_new/derived_class_typed.dart.legacy.expect
@@ -6,9 +6,9 @@
   synthetic constructor •() → self::B<self::B::T>
     : super core::Object::•()
     ;
-  method f(self::B::T x) → void {}
-  method g({self::B::T x = null}) → void {}
-  method h<U extends self::B::T = dynamic>() → void {}
+  method f(generic-covariant-impl self::B::T x) → void {}
+  method g({generic-covariant-impl self::B::T x = null}) → void {}
+  method h<generic-covariant-impl U extends self::B::T = dynamic>() → void {}
 }
 class C extends self::B<core::int> {
   synthetic constructor •() → self::C
diff --git a/pkg/front_end/testcases/runtime_checks_new/derived_class_typed.dart.legacy.transformed.expect b/pkg/front_end/testcases/runtime_checks_new/derived_class_typed.dart.legacy.transformed.expect
index 1fe58ed..9addeea 100644
--- a/pkg/front_end/testcases/runtime_checks_new/derived_class_typed.dart.legacy.transformed.expect
+++ b/pkg/front_end/testcases/runtime_checks_new/derived_class_typed.dart.legacy.transformed.expect
@@ -6,9 +6,9 @@
   synthetic constructor •() → self::B<self::B::T>
     : super core::Object::•()
     ;
-  method f(self::B::T x) → void {}
-  method g({self::B::T x = null}) → void {}
-  method h<U extends self::B::T = dynamic>() → void {}
+  method f(generic-covariant-impl self::B::T x) → void {}
+  method g({generic-covariant-impl self::B::T x = null}) → void {}
+  method h<generic-covariant-impl U extends self::B::T = dynamic>() → void {}
 }
 class C extends self::B<core::int> {
   synthetic constructor •() → self::C
diff --git a/pkg/front_end/testcases/runtime_checks_new/derived_class_typed.dart.outline.expect b/pkg/front_end/testcases/runtime_checks_new/derived_class_typed.dart.outline.expect
index b4ae0e0..88a2113 100644
--- a/pkg/front_end/testcases/runtime_checks_new/derived_class_typed.dart.outline.expect
+++ b/pkg/front_end/testcases/runtime_checks_new/derived_class_typed.dart.outline.expect
@@ -5,11 +5,11 @@
 class B<T extends core::Object = dynamic> extends core::Object {
   synthetic constructor •() → self::B<self::B::T>
     ;
-  method f(self::B::T x) → void
+  method f(generic-covariant-impl self::B::T x) → void
     ;
-  method g({self::B::T x}) → void
+  method g({generic-covariant-impl self::B::T x}) → void
     ;
-  method h<U extends self::B::T = dynamic>() → void
+  method h<generic-covariant-impl U extends self::B::T = dynamic>() → void
     ;
 }
 class C extends self::B<core::int> {
diff --git a/pkg/front_end/testcases/runtime_checks_new/field_forwarding_stub_abstract_generic_covariant.dart b/pkg/front_end/testcases/runtime_checks_new/field_forwarding_stub_abstract_generic_covariant.dart
index 7b9e86e..e454c40 100644
--- a/pkg/front_end/testcases/runtime_checks_new/field_forwarding_stub_abstract_generic_covariant.dart
+++ b/pkg/front_end/testcases/runtime_checks_new/field_forwarding_stub_abstract_generic_covariant.dart
@@ -6,7 +6,7 @@
 library test;
 
 class B<T> {
-  T /*@covariance=genericImpl*/ x;
+  T x;
 }
 
 class C extends B<num> {}
diff --git a/pkg/front_end/testcases/runtime_checks_new/field_forwarding_stub_abstract_generic_covariant.dart.legacy.expect b/pkg/front_end/testcases/runtime_checks_new/field_forwarding_stub_abstract_generic_covariant.dart.legacy.expect
index 052b5bf..ff86372 100644
--- a/pkg/front_end/testcases/runtime_checks_new/field_forwarding_stub_abstract_generic_covariant.dart.legacy.expect
+++ b/pkg/front_end/testcases/runtime_checks_new/field_forwarding_stub_abstract_generic_covariant.dart.legacy.expect
@@ -3,7 +3,7 @@
 import "dart:core" as core;
 
 class B<T extends core::Object = dynamic> extends core::Object {
-  field self::B::T x = null;
+  generic-covariant-impl field self::B::T x = null;
   synthetic constructor •() → self::B<self::B::T>
     : super core::Object::•()
     ;
diff --git a/pkg/front_end/testcases/runtime_checks_new/field_forwarding_stub_abstract_generic_covariant.dart.legacy.transformed.expect b/pkg/front_end/testcases/runtime_checks_new/field_forwarding_stub_abstract_generic_covariant.dart.legacy.transformed.expect
index 052b5bf..ff86372 100644
--- a/pkg/front_end/testcases/runtime_checks_new/field_forwarding_stub_abstract_generic_covariant.dart.legacy.transformed.expect
+++ b/pkg/front_end/testcases/runtime_checks_new/field_forwarding_stub_abstract_generic_covariant.dart.legacy.transformed.expect
@@ -3,7 +3,7 @@
 import "dart:core" as core;
 
 class B<T extends core::Object = dynamic> extends core::Object {
-  field self::B::T x = null;
+  generic-covariant-impl field self::B::T x = null;
   synthetic constructor •() → self::B<self::B::T>
     : super core::Object::•()
     ;
diff --git a/pkg/front_end/testcases/runtime_checks_new/field_forwarding_stub_abstract_generic_covariant.dart.outline.expect b/pkg/front_end/testcases/runtime_checks_new/field_forwarding_stub_abstract_generic_covariant.dart.outline.expect
index 9318356..8403e2a 100644
--- a/pkg/front_end/testcases/runtime_checks_new/field_forwarding_stub_abstract_generic_covariant.dart.outline.expect
+++ b/pkg/front_end/testcases/runtime_checks_new/field_forwarding_stub_abstract_generic_covariant.dart.outline.expect
@@ -3,7 +3,7 @@
 import "dart:core" as core;
 
 class B<T extends core::Object = dynamic> extends core::Object {
-  field self::B::T x;
+  generic-covariant-impl field self::B::T x;
   synthetic constructor •() → self::B<self::B::T>
     ;
 }
diff --git a/pkg/front_end/testcases/runtime_checks_new/field_forwarding_stub_explicit_covariant.dart b/pkg/front_end/testcases/runtime_checks_new/field_forwarding_stub_explicit_covariant.dart
index 5f52760..aa86636 100644
--- a/pkg/front_end/testcases/runtime_checks_new/field_forwarding_stub_explicit_covariant.dart
+++ b/pkg/front_end/testcases/runtime_checks_new/field_forwarding_stub_explicit_covariant.dart
@@ -6,14 +6,13 @@
 library test;
 
 class B {
-  covariant num /*@covariance=explicit*/ x;
+  covariant num x;
 }
 
 class C {
   int x;
 }
 
-class /*@forwardingStub=void set x(covariance=(explicit) num _)*/ D extends C
-    implements B {}
+class D extends C implements B {}
 
 void main() {}
diff --git a/pkg/front_end/testcases/runtime_checks_new/generic_covariance_based_on_inference.dart b/pkg/front_end/testcases/runtime_checks_new/generic_covariance_based_on_inference.dart
index 1df42eb..72eae8b 100644
--- a/pkg/front_end/testcases/runtime_checks_new/generic_covariance_based_on_inference.dart
+++ b/pkg/front_end/testcases/runtime_checks_new/generic_covariance_based_on_inference.dart
@@ -6,25 +6,25 @@
 library test;
 
 class B<T> {
-  T /*@covariance=genericImpl*/ x;
-  T /*@covariance=genericImpl*/ y;
+  T x;
+  T y;
 }
 
 // This class inherits genericImpl annotations from its superclass, but doesn't
 // have any members marked genericInterface because the inferred types of x and
 // y do not depend on the type parameter T.
 abstract class C<T> implements B<num> {
-  var /*@covariance=genericImpl*/ x;
+  var x;
   get y;
-  set y(/*@covariance=genericImpl*/ value);
+  set y(value);
 }
 
 // This class also has members marked genericInterface, since the inferred types
 // of x and y *do* depend on the type parameter T.
 abstract class D<T> implements B<T> {
-  var /*@covariance=genericImpl*/ x;
+  var x;
   get y;
-  set y(/*@covariance=genericImpl*/ value);
+  set y(value);
 }
 
 main() {}
diff --git a/pkg/front_end/testcases/runtime_checks_new/generic_covariance_based_on_inference.dart.legacy.expect b/pkg/front_end/testcases/runtime_checks_new/generic_covariance_based_on_inference.dart.legacy.expect
index 29d74ce..a959413 100644
--- a/pkg/front_end/testcases/runtime_checks_new/generic_covariance_based_on_inference.dart.legacy.expect
+++ b/pkg/front_end/testcases/runtime_checks_new/generic_covariance_based_on_inference.dart.legacy.expect
@@ -3,8 +3,8 @@
 import "dart:core" as core;
 
 class B<T extends core::Object = dynamic> extends core::Object {
-  field self::B::T x = null;
-  field self::B::T y = null;
+  generic-covariant-impl field self::B::T x = null;
+  generic-covariant-impl field self::B::T y = null;
   synthetic constructor •() → self::B<self::B::T>
     : super core::Object::•()
     ;
diff --git a/pkg/front_end/testcases/runtime_checks_new/generic_covariance_based_on_inference.dart.legacy.transformed.expect b/pkg/front_end/testcases/runtime_checks_new/generic_covariance_based_on_inference.dart.legacy.transformed.expect
index 29d74ce..a959413 100644
--- a/pkg/front_end/testcases/runtime_checks_new/generic_covariance_based_on_inference.dart.legacy.transformed.expect
+++ b/pkg/front_end/testcases/runtime_checks_new/generic_covariance_based_on_inference.dart.legacy.transformed.expect
@@ -3,8 +3,8 @@
 import "dart:core" as core;
 
 class B<T extends core::Object = dynamic> extends core::Object {
-  field self::B::T x = null;
-  field self::B::T y = null;
+  generic-covariant-impl field self::B::T x = null;
+  generic-covariant-impl field self::B::T y = null;
   synthetic constructor •() → self::B<self::B::T>
     : super core::Object::•()
     ;
diff --git a/pkg/front_end/testcases/runtime_checks_new/generic_covariance_based_on_inference.dart.outline.expect b/pkg/front_end/testcases/runtime_checks_new/generic_covariance_based_on_inference.dart.outline.expect
index e9bcb8a..60525b9 100644
--- a/pkg/front_end/testcases/runtime_checks_new/generic_covariance_based_on_inference.dart.outline.expect
+++ b/pkg/front_end/testcases/runtime_checks_new/generic_covariance_based_on_inference.dart.outline.expect
@@ -3,8 +3,8 @@
 import "dart:core" as core;
 
 class B<T extends core::Object = dynamic> extends core::Object {
-  field self::B::T x;
-  field self::B::T y;
+  generic-covariant-impl field self::B::T x;
+  generic-covariant-impl field self::B::T y;
   synthetic constructor •() → self::B<self::B::T>
     ;
 }
diff --git a/pkg/front_end/testcases/runtime_checks_new/mixin_forwarding_stub_field.dart b/pkg/front_end/testcases/runtime_checks_new/mixin_forwarding_stub_field.dart
index f38c741..261d869 100644
--- a/pkg/front_end/testcases/runtime_checks_new/mixin_forwarding_stub_field.dart
+++ b/pkg/front_end/testcases/runtime_checks_new/mixin_forwarding_stub_field.dart
@@ -38,9 +38,9 @@
 
 abstract class I<T> {
   T get x;
-  void set x(T /*@covariance=genericImpl*/ value);
+  void set x(T value);
   Object get y;
-  void set y(covariant Object /*@covariance=explicit*/ value);
+  void set y(covariant Object value);
 }
 
 class M {
@@ -48,10 +48,7 @@
   int y;
 }
 
-class
-/*@forwardingStub=void set y(covariance=(explicit) Object value)*/
-/*@forwardingStub=void set x(covariance=(genericImpl) int _)*/
-    C = B with M implements I<int>;
+class C = B with M implements I<int>;
 
 void test(I<Object> i) {
   expectTypeError(() {
diff --git a/pkg/front_end/testcases/runtime_checks_new/mixin_forwarding_stub_field.dart.outline.expect b/pkg/front_end/testcases/runtime_checks_new/mixin_forwarding_stub_field.dart.outline.expect
index 2c1118b..4978034 100644
--- a/pkg/front_end/testcases/runtime_checks_new/mixin_forwarding_stub_field.dart.outline.expect
+++ b/pkg/front_end/testcases/runtime_checks_new/mixin_forwarding_stub_field.dart.outline.expect
@@ -18,7 +18,7 @@
   synthetic constructor •() → self::I<self::I::T>
     ;
   abstract get x() → self::I::T;
-  abstract set x(self::I::T value) → void;
+  abstract set x(generic-covariant-impl self::I::T value) → void;
   abstract get y() → core::Object;
   abstract set y(covariant core::Object value) → void;
 }
diff --git a/pkg/front_end/testcases/runtime_checks_new/mixin_forwarding_stub_field.dart.strong.expect b/pkg/front_end/testcases/runtime_checks_new/mixin_forwarding_stub_field.dart.strong.expect
index 5fceebe..79e85ab 100644
--- a/pkg/front_end/testcases/runtime_checks_new/mixin_forwarding_stub_field.dart.strong.expect
+++ b/pkg/front_end/testcases/runtime_checks_new/mixin_forwarding_stub_field.dart.strong.expect
@@ -8,11 +8,11 @@
 //   int y;
 //       ^
 // pkg/front_end/testcases/runtime_checks_new/mixin_forwarding_stub_field.dart:43:12: Context: This is the overridden method ('y').
-//   void set y(covariant Object /*@covariance=explicit*/ value);
+//   void set y(covariant Object value);
 //            ^
-// pkg/front_end/testcases/runtime_checks_new/mixin_forwarding_stub_field.dart:54:5: Context: Override was introduced in the mixin application class 'C'.
-//     C = B with M implements I<int>;
-//     ^
+// pkg/front_end/testcases/runtime_checks_new/mixin_forwarding_stub_field.dart:51:7: Context: Override was introduced in the mixin application class 'C'.
+// class C = B with M implements I<int>;
+//       ^
 //
 import self as self;
 import "dart:core" as core;
diff --git a/pkg/front_end/testcases/runtime_checks_new/mixin_forwarding_stub_setter.dart b/pkg/front_end/testcases/runtime_checks_new/mixin_forwarding_stub_setter.dart
index 8eeb4d8..574153f 100644
--- a/pkg/front_end/testcases/runtime_checks_new/mixin_forwarding_stub_setter.dart
+++ b/pkg/front_end/testcases/runtime_checks_new/mixin_forwarding_stub_setter.dart
@@ -38,9 +38,9 @@
 
 abstract class I<T> {
   T get x;
-  void set x(T /*@covariance=genericImpl*/ value);
+  void set x(T value);
   Object get y;
-  void set y(covariant Object /*@covariance=explicit*/ value);
+  void set y(covariant Object value);
 }
 
 class M {
@@ -55,10 +55,7 @@
   }
 }
 
-class
-/*@forwardingStub=void set y(covariance=(explicit) Object value)*/
-/*@forwardingStub=void set x(covariance=(genericImpl) int value)*/
-    C = B with M implements I<int>;
+class C = B with M implements I<int>;
 
 void test(I<Object> i) {
   expectTypeError(() {
diff --git a/pkg/front_end/testcases/runtime_checks_new/mixin_forwarding_stub_setter.dart.outline.expect b/pkg/front_end/testcases/runtime_checks_new/mixin_forwarding_stub_setter.dart.outline.expect
index 4195710..4b6371a 100644
--- a/pkg/front_end/testcases/runtime_checks_new/mixin_forwarding_stub_setter.dart.outline.expect
+++ b/pkg/front_end/testcases/runtime_checks_new/mixin_forwarding_stub_setter.dart.outline.expect
@@ -18,7 +18,7 @@
   synthetic constructor •() → self::I<self::I::T>
     ;
   abstract get x() → self::I::T;
-  abstract set x(self::I::T value) → void;
+  abstract set x(generic-covariant-impl self::I::T value) → void;
   abstract get y() → core::Object;
   abstract set y(covariant core::Object value) → void;
 }
diff --git a/pkg/front_end/testcases/runtime_checks_new/mixin_forwarding_stub_setter.dart.strong.expect b/pkg/front_end/testcases/runtime_checks_new/mixin_forwarding_stub_setter.dart.strong.expect
index 5a1fc12..693230f 100644
--- a/pkg/front_end/testcases/runtime_checks_new/mixin_forwarding_stub_setter.dart.strong.expect
+++ b/pkg/front_end/testcases/runtime_checks_new/mixin_forwarding_stub_setter.dart.strong.expect
@@ -8,11 +8,11 @@
 //   void set y(int value) {
 //                  ^
 // pkg/front_end/testcases/runtime_checks_new/mixin_forwarding_stub_setter.dart:43:12: Context: This is the overridden method ('y').
-//   void set y(covariant Object /*@covariance=explicit*/ value);
+//   void set y(covariant Object value);
 //            ^
-// pkg/front_end/testcases/runtime_checks_new/mixin_forwarding_stub_setter.dart:61:5: Context: Override was introduced in the mixin application class 'C'.
-//     C = B with M implements I<int>;
-//     ^
+// pkg/front_end/testcases/runtime_checks_new/mixin_forwarding_stub_setter.dart:58:7: Context: Override was introduced in the mixin application class 'C'.
+// class C = B with M implements I<int>;
+//       ^
 //
 import self as self;
 import "dart:core" as core;
diff --git a/pkg/front_end/testcases/runtime_checks_new/stub_checked_via_target.dart b/pkg/front_end/testcases/runtime_checks_new/stub_checked_via_target.dart
index 0a8e34b..a4fc889 100644
--- a/pkg/front_end/testcases/runtime_checks_new/stub_checked_via_target.dart
+++ b/pkg/front_end/testcases/runtime_checks_new/stub_checked_via_target.dart
@@ -26,7 +26,7 @@
 }
 
 abstract class I {
-  int f(covariant Object /*@covariance=explicit*/ x);
+  int f(covariant Object x);
 }
 
 // Not a compile time error, because B.f satisfies the interface contract of I.f
@@ -35,8 +35,7 @@
 // Note that even though the forwarding stub's type is `(Object) -> int`, it
 // must check that `x` is an `int`, since it forwards to a method whose type is
 // `(int) -> int`.
-class /*@forwardingStub=int f(covariance=(explicit) Object x)*/ C extends B
-    implements I {}
+class C extends B implements I {}
 
 void g(C c) {
   // Not a compile time error, because C's interface inherits I.f (since it has
diff --git a/pkg/front_end/testcases/runtime_checks_new/stub_from_interface_contravariant_from_class.dart b/pkg/front_end/testcases/runtime_checks_new/stub_from_interface_contravariant_from_class.dart
index 4c3139d..fc4ec48 100644
--- a/pkg/front_end/testcases/runtime_checks_new/stub_from_interface_contravariant_from_class.dart
+++ b/pkg/front_end/testcases/runtime_checks_new/stub_from_interface_contravariant_from_class.dart
@@ -15,8 +15,6 @@
   T f(Object x);
 }
 
-abstract class
-/*@forwardingStub=abstract (C::T) -> void f(covariance=() Object x)*/
-    C<T> extends B<F<T>> implements I<F<T>> {}
+abstract class C<T> extends B<F<T>> implements I<F<T>> {}
 
 void main() {}
diff --git a/pkg/front_end/testcases/runtime_checks_new/stub_from_interface_covariantImpl_from_class.dart b/pkg/front_end/testcases/runtime_checks_new/stub_from_interface_covariantImpl_from_class.dart
index ff360dc..bf9a66b 100644
--- a/pkg/front_end/testcases/runtime_checks_new/stub_from_interface_covariantImpl_from_class.dart
+++ b/pkg/front_end/testcases/runtime_checks_new/stub_from_interface_covariantImpl_from_class.dart
@@ -15,8 +15,6 @@
   void f(F<T> x, Object y);
 }
 
-abstract class
-/*@forwardingStub=void f(covariance=(genericImpl) ((C::T) -> void) -> void x, covariance=() Object y)*/
-    C<T> extends B<F<T>> implements I<F<T>> {}
+abstract class C<T> extends B<F<T>> implements I<F<T>> {}
 
 void main() {}
diff --git a/pkg/front_end/testcases/runtime_checks_new/stub_from_interface_covariantImpl_from_interface.dart b/pkg/front_end/testcases/runtime_checks_new/stub_from_interface_covariantImpl_from_interface.dart
index dc1766a..ef67155 100644
--- a/pkg/front_end/testcases/runtime_checks_new/stub_from_interface_covariantImpl_from_interface.dart
+++ b/pkg/front_end/testcases/runtime_checks_new/stub_from_interface_covariantImpl_from_interface.dart
@@ -10,11 +10,9 @@
 }
 
 abstract class I<T> {
-  void f(T /*@covariance=genericImpl*/ x, Object y);
+  void f(T x, Object y);
 }
 
-abstract class
-/*@forwardingStub=void f(covariance=(genericImpl) int x, covariance=() Object y)*/
-    C extends B implements I<int> {}
+abstract class C extends B implements I<int> {}
 
 void main() {}
diff --git a/pkg/front_end/testcases/runtime_checks_new/stub_from_interface_covariantImpl_from_interface.dart.legacy.expect b/pkg/front_end/testcases/runtime_checks_new/stub_from_interface_covariantImpl_from_interface.dart.legacy.expect
index 083d277..3334045 100644
--- a/pkg/front_end/testcases/runtime_checks_new/stub_from_interface_covariantImpl_from_interface.dart.legacy.expect
+++ b/pkg/front_end/testcases/runtime_checks_new/stub_from_interface_covariantImpl_from_interface.dart.legacy.expect
@@ -12,7 +12,7 @@
   synthetic constructor •() → self::I<self::I::T>
     : super core::Object::•()
     ;
-  abstract method f(self::I::T x, core::Object y) → void;
+  abstract method f(generic-covariant-impl self::I::T x, core::Object y) → void;
 }
 abstract class C extends self::B implements self::I<core::int> {
   synthetic constructor •() → self::C
diff --git a/pkg/front_end/testcases/runtime_checks_new/stub_from_interface_covariantImpl_from_interface.dart.legacy.transformed.expect b/pkg/front_end/testcases/runtime_checks_new/stub_from_interface_covariantImpl_from_interface.dart.legacy.transformed.expect
index 083d277..3334045 100644
--- a/pkg/front_end/testcases/runtime_checks_new/stub_from_interface_covariantImpl_from_interface.dart.legacy.transformed.expect
+++ b/pkg/front_end/testcases/runtime_checks_new/stub_from_interface_covariantImpl_from_interface.dart.legacy.transformed.expect
@@ -12,7 +12,7 @@
   synthetic constructor •() → self::I<self::I::T>
     : super core::Object::•()
     ;
-  abstract method f(self::I::T x, core::Object y) → void;
+  abstract method f(generic-covariant-impl self::I::T x, core::Object y) → void;
 }
 abstract class C extends self::B implements self::I<core::int> {
   synthetic constructor •() → self::C
diff --git a/pkg/front_end/testcases/runtime_checks_new/stub_from_interface_covariantImpl_from_interface.dart.outline.expect b/pkg/front_end/testcases/runtime_checks_new/stub_from_interface_covariantImpl_from_interface.dart.outline.expect
index 2fd12fe..205776d 100644
--- a/pkg/front_end/testcases/runtime_checks_new/stub_from_interface_covariantImpl_from_interface.dart.outline.expect
+++ b/pkg/front_end/testcases/runtime_checks_new/stub_from_interface_covariantImpl_from_interface.dart.outline.expect
@@ -11,7 +11,7 @@
 abstract class I<T extends core::Object = dynamic> extends core::Object {
   synthetic constructor •() → self::I<self::I::T>
     ;
-  abstract method f(self::I::T x, core::Object y) → void;
+  abstract method f(generic-covariant-impl self::I::T x, core::Object y) → void;
 }
 abstract class C extends self::B implements self::I<core::int> {
   synthetic constructor •() → self::C
diff --git a/pkg/front_end/testcases/runtime_checks_new/stub_from_interface_covariantImpl_from_super.dart b/pkg/front_end/testcases/runtime_checks_new/stub_from_interface_covariantImpl_from_super.dart
index 6c7a38e..4d1e82d 100644
--- a/pkg/front_end/testcases/runtime_checks_new/stub_from_interface_covariantImpl_from_super.dart
+++ b/pkg/front_end/testcases/runtime_checks_new/stub_from_interface_covariantImpl_from_super.dart
@@ -6,15 +6,13 @@
 library test;
 
 class B<T> {
-  void f(T /*@covariance=genericImpl*/ x, int y) {}
+  void f(T x, int y) {}
 }
 
 abstract class I {
   void f(int x, Object y);
 }
 
-abstract class
-/*@forwardingStub=abstract void f(covariance=(genericImpl) int x, covariance=() Object y)*/
-    C extends B<int> implements I {}
+abstract class C extends B<int> implements I {}
 
 void main() {}
diff --git a/pkg/front_end/testcases/runtime_checks_new/stub_from_interface_covariantImpl_from_super.dart.legacy.expect b/pkg/front_end/testcases/runtime_checks_new/stub_from_interface_covariantImpl_from_super.dart.legacy.expect
index c6e865f..3038f0e 100644
--- a/pkg/front_end/testcases/runtime_checks_new/stub_from_interface_covariantImpl_from_super.dart.legacy.expect
+++ b/pkg/front_end/testcases/runtime_checks_new/stub_from_interface_covariantImpl_from_super.dart.legacy.expect
@@ -6,7 +6,7 @@
   synthetic constructor •() → self::B<self::B::T>
     : super core::Object::•()
     ;
-  method f(self::B::T x, core::int y) → void {}
+  method f(generic-covariant-impl self::B::T x, core::int y) → void {}
 }
 abstract class I extends core::Object {
   synthetic constructor •() → self::I
diff --git a/pkg/front_end/testcases/runtime_checks_new/stub_from_interface_covariantImpl_from_super.dart.legacy.transformed.expect b/pkg/front_end/testcases/runtime_checks_new/stub_from_interface_covariantImpl_from_super.dart.legacy.transformed.expect
index c6e865f..3038f0e 100644
--- a/pkg/front_end/testcases/runtime_checks_new/stub_from_interface_covariantImpl_from_super.dart.legacy.transformed.expect
+++ b/pkg/front_end/testcases/runtime_checks_new/stub_from_interface_covariantImpl_from_super.dart.legacy.transformed.expect
@@ -6,7 +6,7 @@
   synthetic constructor •() → self::B<self::B::T>
     : super core::Object::•()
     ;
-  method f(self::B::T x, core::int y) → void {}
+  method f(generic-covariant-impl self::B::T x, core::int y) → void {}
 }
 abstract class I extends core::Object {
   synthetic constructor •() → self::I
diff --git a/pkg/front_end/testcases/runtime_checks_new/stub_from_interface_covariantImpl_from_super.dart.outline.expect b/pkg/front_end/testcases/runtime_checks_new/stub_from_interface_covariantImpl_from_super.dart.outline.expect
index a447e02..9e7de41 100644
--- a/pkg/front_end/testcases/runtime_checks_new/stub_from_interface_covariantImpl_from_super.dart.outline.expect
+++ b/pkg/front_end/testcases/runtime_checks_new/stub_from_interface_covariantImpl_from_super.dart.outline.expect
@@ -5,7 +5,7 @@
 class B<T extends core::Object = dynamic> extends core::Object {
   synthetic constructor •() → self::B<self::B::T>
     ;
-  method f(self::B::T x, core::int y) → void
+  method f(generic-covariant-impl self::B::T x, core::int y) → void
     ;
 }
 abstract class I extends core::Object {
diff --git a/pkg/front_end/testcases/runtime_checks_new/stub_from_interface_covariantInterface_from_class.dart b/pkg/front_end/testcases/runtime_checks_new/stub_from_interface_covariantInterface_from_class.dart
index 4b5e2b0..3b2bac1 100644
--- a/pkg/front_end/testcases/runtime_checks_new/stub_from_interface_covariantInterface_from_class.dart
+++ b/pkg/front_end/testcases/runtime_checks_new/stub_from_interface_covariantInterface_from_class.dart
@@ -8,19 +8,17 @@
 typedef void F<T>(T t);
 
 abstract class A<T> {
-  void f(T /*@covariance=genericImpl*/ x, int y);
+  void f(T x, int y);
 }
 
 class B<T> implements A<F<T>> {
-  void f(F<T> /*@covariance=genericImpl*/ x, int y) {}
+  void f(F<T> x, int y) {}
 }
 
 abstract class I<T> implements A<F<T>> {
-  void f(F<T> /*@covariance=genericImpl*/ x, Object y);
+  void f(F<T> x, Object y);
 }
 
-abstract class
-/*@forwardingStub=abstract void f(covariance=(genericImpl) ((C::T) -> void) -> void x, covariance=() Object y)*/
-    C<T> extends B<F<T>> implements I<F<T>> {}
+abstract class C<T> extends B<F<T>> implements I<F<T>> {}
 
 void main() {}
diff --git a/pkg/front_end/testcases/runtime_checks_new/stub_from_interface_covariantInterface_from_class.dart.legacy.expect b/pkg/front_end/testcases/runtime_checks_new/stub_from_interface_covariantInterface_from_class.dart.legacy.expect
index 8455164..df1249c 100644
--- a/pkg/front_end/testcases/runtime_checks_new/stub_from_interface_covariantInterface_from_class.dart.legacy.expect
+++ b/pkg/front_end/testcases/runtime_checks_new/stub_from_interface_covariantInterface_from_class.dart.legacy.expect
@@ -7,7 +7,7 @@
   synthetic constructor •() → self::A<self::A::T>
     : super core::Object::•()
     ;
-  abstract method f(self::A::T x, core::int y) → void;
+  abstract method f(generic-covariant-impl self::A::T x, core::int y) → void;
 }
 class B<T extends core::Object = dynamic> extends core::Object implements self::A<(self::B::T) → void> {
   synthetic constructor •() → self::B<self::B::T>
diff --git a/pkg/front_end/testcases/runtime_checks_new/stub_from_interface_covariantInterface_from_class.dart.legacy.transformed.expect b/pkg/front_end/testcases/runtime_checks_new/stub_from_interface_covariantInterface_from_class.dart.legacy.transformed.expect
index 8455164..df1249c 100644
--- a/pkg/front_end/testcases/runtime_checks_new/stub_from_interface_covariantInterface_from_class.dart.legacy.transformed.expect
+++ b/pkg/front_end/testcases/runtime_checks_new/stub_from_interface_covariantInterface_from_class.dart.legacy.transformed.expect
@@ -7,7 +7,7 @@
   synthetic constructor •() → self::A<self::A::T>
     : super core::Object::•()
     ;
-  abstract method f(self::A::T x, core::int y) → void;
+  abstract method f(generic-covariant-impl self::A::T x, core::int y) → void;
 }
 class B<T extends core::Object = dynamic> extends core::Object implements self::A<(self::B::T) → void> {
   synthetic constructor •() → self::B<self::B::T>
diff --git a/pkg/front_end/testcases/runtime_checks_new/stub_from_interface_covariantInterface_from_class.dart.outline.expect b/pkg/front_end/testcases/runtime_checks_new/stub_from_interface_covariantInterface_from_class.dart.outline.expect
index 5313aae..c638537 100644
--- a/pkg/front_end/testcases/runtime_checks_new/stub_from_interface_covariantInterface_from_class.dart.outline.expect
+++ b/pkg/front_end/testcases/runtime_checks_new/stub_from_interface_covariantInterface_from_class.dart.outline.expect
@@ -6,7 +6,7 @@
 abstract class A<T extends core::Object = dynamic> extends core::Object {
   synthetic constructor •() → self::A<self::A::T>
     ;
-  abstract method f(self::A::T x, core::int y) → void;
+  abstract method f(generic-covariant-impl self::A::T x, core::int y) → void;
 }
 class B<T extends core::Object = dynamic> extends core::Object implements self::A<(self::B::T) → void> {
   synthetic constructor •() → self::B<self::B::T>
diff --git a/pkg/front_end/testcases/runtime_checks_new/stub_from_interface_covariant_from_interface.dart b/pkg/front_end/testcases/runtime_checks_new/stub_from_interface_covariant_from_interface.dart
index 2de34db..57a9f99 100644
--- a/pkg/front_end/testcases/runtime_checks_new/stub_from_interface_covariant_from_interface.dart
+++ b/pkg/front_end/testcases/runtime_checks_new/stub_from_interface_covariant_from_interface.dart
@@ -10,11 +10,9 @@
 }
 
 abstract class I {
-  void f(covariant int /*@covariance=explicit*/ x, Object y);
+  void f(covariant int x, Object y);
 }
 
-abstract class
-/*@forwardingStub=void f(covariance=(explicit) int x, covariance=() Object y)*/
-    C extends B implements I {}
+abstract class C extends B implements I {}
 
 void main() {}
diff --git a/pkg/front_end/testcases/runtime_checks_new/stub_from_interface_covariant_from_super.dart b/pkg/front_end/testcases/runtime_checks_new/stub_from_interface_covariant_from_super.dart
index f6e26ca..3daf251 100644
--- a/pkg/front_end/testcases/runtime_checks_new/stub_from_interface_covariant_from_super.dart
+++ b/pkg/front_end/testcases/runtime_checks_new/stub_from_interface_covariant_from_super.dart
@@ -6,15 +6,13 @@
 library test;
 
 class B {
-  void f(covariant int /*@covariance=explicit*/ x, int y) {}
+  void f(covariant int x, int y) {}
 }
 
 abstract class I {
   void f(int x, Object y);
 }
 
-abstract class
-/*@forwardingStub=abstract void f(covariance=(explicit) int x, covariance=() Object y)*/
-    C extends B implements I {}
+abstract class C extends B implements I {}
 
 void main() {}
diff --git a/pkg/front_end/testcases/spread_collection_inference.dart b/pkg/front_end/testcases/spread_collection_inference.dart
index 6225eca..60c1032 100644
--- a/pkg/front_end/testcases/spread_collection_inference.dart
+++ b/pkg/front_end/testcases/spread_collection_inference.dart
@@ -5,13 +5,18 @@
 // This test case checks that inference works for spread collections, and that
 // the errors are reported when necessary.
 
-/*@testedFeatures=inference,error*/
+/*@testedFeatures=inference*/
 
-foo() {
+Map<K, V> bar<K, V>() => null;
+
+foo(dynamic dynVar) {
   List<int> spread = <int>[1, 2, 3];
   Map<String, int> mapSpread = <String, int>{"foo": 4, "bar": 2};
   int notSpreadInt = 42;
   int Function() notSpreadFunction = null;
+  // Note that all values are actually ints.
+  Map<int, num> mapIntNum = <int, num>{42: 42};
+  List<num> listNum = <num>[42];
 
   var /*@type=List<dynamic>*/ lhs10 = /*@typeArgs=dynamic*/ [...
     /*@typeArgs=dynamic*/ []];
@@ -45,7 +50,7 @@
   var /*@type=Map<dynamic, dynamic>*/ map21 = /*@typeArgs=dynamic, dynamic*/
     {...(mapSpread as dynamic), "baz": 42};
 
-  dynamic map21ambiguous = /*@error=CantDisambiguateNotEnoughInformation*/ {...
+  dynamic map21ambiguous = {...
     (mapSpread as dynamic)};
 
   List<int> lhs22 = /*@typeArgs=int*/ [... /*@typeArgs=int*/ []];
@@ -69,60 +74,60 @@
   Map<String, List<int>> map23 = /*@typeArgs=String, List<int>*/
     {... /*@typeArgs=String, List<int>*/ {"baz": /*@typeArgs=int*/ []}};
 
-  dynamic map24ambiguous = /*@error=CantDisambiguateAmbiguousInformation*/ {...
+  dynamic map24ambiguous = {...
     spread, ...mapSpread};
 
-  int lhs30 = /*@error=InvalidAssignment*/ /*@typeArgs=int*/ [...spread];
+  int lhs30 = /*@typeArgs=int*/ [...spread];
 
-  int set30 = /*@error=InvalidAssignment*/ /*@typeArgs=int*/ {...spread, 42};
+  int set30 = /*@typeArgs=int*/ {...spread, 42};
 
-  int set30ambiguous = /*@error=InvalidAssignment*/ /*@typeArgs=int*/
+  int set30ambiguous = /*@typeArgs=int*/
     {...spread};
 
-  int map30 = /*@error=InvalidAssignment*/ /*@typeArgs=String, int*/
+  int map30 = /*@typeArgs=String, int*/
     {...mapSpread, "baz": 42};
 
-  int map30ambiguous = /*@error=InvalidAssignment*/ /*@typeArgs=String, int*/
+  int map30ambiguous = /*@typeArgs=String, int*/
     {...mapSpread};
 
-  List<dynamic> lhs40 = <dynamic>[... /*@error=SpreadTypeMismatch*/
+  List<dynamic> lhs40 = <dynamic>[...
     notSpreadInt];
 
-  Set<dynamic> set40 = <dynamic>{... /*@error=SpreadTypeMismatch*/
+  Set<dynamic> set40 = <dynamic>{...
     notSpreadInt};
 
   Map<dynamic, dynamic> map40 = <dynamic, dynamic>{...
-    /*@error=SpreadMapEntryTypeMismatch*/ notSpreadInt};
+ notSpreadInt};
 
-  List<dynamic> lhs50 = <dynamic> [... /*@error=SpreadTypeMismatch*/
+  List<dynamic> lhs50 = <dynamic> [...
     notSpreadFunction];
 
-  Set<dynamic> set50 = <dynamic> {... /*@error=SpreadTypeMismatch*/
+  Set<dynamic> set50 = <dynamic> {...
     notSpreadFunction};
 
   Map<dynamic, dynamic> map50 = <dynamic, dynamic>{...
-    /*@error=SpreadMapEntryTypeMismatch*/ notSpreadFunction};
+ notSpreadFunction};
 
-  List<String> lhs60 = <String>[... /*@error=SpreadElementTypeMismatch*/
+  List<String> lhs60 = <String>[...
     spread];
 
-  Set<String> set60 = <String>{... /*@error=SpreadElementTypeMismatch*/ spread};
+  Set<String> set60 = <String>{... spread};
 
   Map<int, int> map60 = <int, int>{...
-    /*@error=SpreadMapEntryElementKeyTypeMismatch*/ mapSpread};
+ mapSpread};
 
   Map<String, String> map61 = <String, String>{...
-    /*@error=SpreadMapEntryElementValueTypeMismatch*/ mapSpread};
+ mapSpread};
 
-  List<int> lhs70 = <int>[... /*@error=NonNullAwareSpreadIsNull*/ null];
+  List<int> lhs70 = <int>[... null];
 
-  Set<int> set70 = <int>{... /*@error=NonNullAwareSpreadIsNull*/ null};
+  Set<int> set70 = <int>{... null};
 
   var /*@type=Set<dynamic>*/ set71ambiguous = /*@typeArgs=dynamic*/
-    {... /*@error=NonNullAwareSpreadIsNull*/ null, ... /*@typeArgs=dynamic*/
+    {... null, ... /*@typeArgs=dynamic*/
       []};
 
-  Map<String, int> map70 = <String, int>{... /*@error=NonNullAwareSpreadIsNull*/
+  Map<String, int> map70 = <String, int>{...
     null};
 
   List<int> lhs80 = <int>[...?null];
@@ -133,6 +138,16 @@
     {...?null, ... /*@typeArgs=dynamic*/ []};
 
   Map<String, int> map80 = <String, int>{...?null};
+
+  var /*@type=Map<String, int>*/ map90 = <String, int>{... /*@typeArgs=String, int*/ bar()};
+
+  List<int> list100 = <int>[...listNum];
+
+  Map<num, int> map100 = <num, int>{...mapIntNum};
+
+  List<int> list110 = <int>[...dynVar];
+
+  Map<num, int> map110 = <num, int>{...dynVar};
 }
 
 main() {}
diff --git a/pkg/front_end/testcases/spread_collection_inference.dart.legacy.expect b/pkg/front_end/testcases/spread_collection_inference.dart.legacy.expect
index b419aeb..4eac9e2 100644
--- a/pkg/front_end/testcases/spread_collection_inference.dart.legacy.expect
+++ b/pkg/front_end/testcases/spread_collection_inference.dart.legacy.expect
@@ -2,206 +2,230 @@
 //
 // Problems in library:
 //
-// pkg/front_end/testcases/spread_collection_inference.dart:16:62: Error: Unexpected token '...'.
+// pkg/front_end/testcases/spread_collection_inference.dart:21:62: Error: Unexpected token '...'.
 //   var /*@type=List<dynamic>*/ lhs10 = /*@typeArgs=dynamic*/ [...
 //                                                              ^^^
 //
-// pkg/front_end/testcases/spread_collection_inference.dart:19:48: Error: Unexpected token '...'.
+// pkg/front_end/testcases/spread_collection_inference.dart:24:48: Error: Unexpected token '...'.
 //   var /*@type=Set<dynamic>*/ set10 = <dynamic>{... /*@typeArgs=dynamic*/ []};
 //                                                ^^^
 //
-// pkg/front_end/testcases/spread_collection_inference.dart:21:66: Error: Unexpected token '...'.
+// pkg/front_end/testcases/spread_collection_inference.dart:26:66: Error: Unexpected token '...'.
 //   var /*@type=Map<dynamic, dynamic>*/ map10 = <dynamic, dynamic>{...
 //                                                                  ^^^
 //
-// pkg/front_end/testcases/spread_collection_inference.dart:25:37: Error: Unexpected token '...'.
+// pkg/front_end/testcases/spread_collection_inference.dart:30:37: Error: Unexpected token '...'.
 //     /*@typeArgs=dynamic, dynamic*/ {...  /*@typeArgs=dynamic, dynamic*/ {}};
 //                                     ^^^
 //
-// pkg/front_end/testcases/spread_collection_inference.dart:27:54: Error: Unexpected token '...'.
+// pkg/front_end/testcases/spread_collection_inference.dart:32:54: Error: Unexpected token '...'.
 //   var /*@type=List<int>*/ lhs20 = /*@typeArgs=int*/ [...spread];
 //                                                      ^^^
 //
-// pkg/front_end/testcases/spread_collection_inference.dart:29:53: Error: Unexpected token '...'.
+// pkg/front_end/testcases/spread_collection_inference.dart:34:53: Error: Unexpected token '...'.
 //   var /*@type=Set<int>*/ set20 = /*@typeArgs=int*/ {...spread, 42};
 //                                                     ^^^
 //
-// pkg/front_end/testcases/spread_collection_inference.dart:31:62: Error: Unexpected token '...'.
+// pkg/front_end/testcases/spread_collection_inference.dart:36:62: Error: Unexpected token '...'.
 //   var /*@type=Set<int>*/ set20ambiguous = /*@typeArgs=int*/ {...spread};
 //                                                              ^^^
 //
-// pkg/front_end/testcases/spread_collection_inference.dart:34:6: Error: Unexpected token '...'.
+// pkg/front_end/testcases/spread_collection_inference.dart:39:6: Error: Unexpected token '...'.
 //     {...mapSpread, "baz": 42};
 //      ^^^
 //
-// pkg/front_end/testcases/spread_collection_inference.dart:37:6: Error: Unexpected token '...'.
+// pkg/front_end/testcases/spread_collection_inference.dart:42:6: Error: Unexpected token '...'.
 //     {...mapSpread};
 //      ^^^
 //
-// pkg/front_end/testcases/spread_collection_inference.dart:39:62: Error: Unexpected token '...'.
+// pkg/front_end/testcases/spread_collection_inference.dart:44:62: Error: Unexpected token '...'.
 //   var /*@type=List<dynamic>*/ lhs21 = /*@typeArgs=dynamic*/ [...(spread as
 //                                                              ^^^
 //
-// pkg/front_end/testcases/spread_collection_inference.dart:42:61: Error: Unexpected token '...'.
+// pkg/front_end/testcases/spread_collection_inference.dart:47:61: Error: Unexpected token '...'.
 //   var /*@type=Set<dynamic>*/ set21 = /*@typeArgs=dynamic*/ {...(spread as
 //                                                             ^^^
 //
-// pkg/front_end/testcases/spread_collection_inference.dart:46:6: Error: Unexpected token '...'.
+// pkg/front_end/testcases/spread_collection_inference.dart:51:6: Error: Unexpected token '...'.
 //     {...(mapSpread as dynamic), "baz": 42};
 //      ^^^
 //
-// pkg/front_end/testcases/spread_collection_inference.dart:48:77: Error: Unexpected token '...'.
-//   dynamic map21ambiguous = /*@error=CantDisambiguateNotEnoughInformation*/ {...
-//                                                                             ^^^
+// pkg/front_end/testcases/spread_collection_inference.dart:53:29: Error: Unexpected token '...'.
+//   dynamic map21ambiguous = {...
+//                             ^^^
 //
-// pkg/front_end/testcases/spread_collection_inference.dart:51:40: Error: Unexpected token '...'.
+// pkg/front_end/testcases/spread_collection_inference.dart:56:40: Error: Unexpected token '...'.
 //   List<int> lhs22 = /*@typeArgs=int*/ [... /*@typeArgs=int*/ []];
 //                                        ^^^
 //
-// pkg/front_end/testcases/spread_collection_inference.dart:53:39: Error: Unexpected token '...'.
+// pkg/front_end/testcases/spread_collection_inference.dart:58:39: Error: Unexpected token '...'.
 //   Set<int> set22 = /*@typeArgs=int*/ {... /*@typeArgs=int*/ [], 42};
 //                                       ^^^
 //
-// pkg/front_end/testcases/spread_collection_inference.dart:55:48: Error: Unexpected token '...'.
+// pkg/front_end/testcases/spread_collection_inference.dart:60:48: Error: Unexpected token '...'.
 //   Set<int> set22ambiguous = /*@typeArgs=int*/ {... /*@typeArgs=int*/ []};
 //                                                ^^^
 //
-// pkg/front_end/testcases/spread_collection_inference.dart:58:6: Error: Unexpected token '...'.
+// pkg/front_end/testcases/spread_collection_inference.dart:63:6: Error: Unexpected token '...'.
 //     {... /*@typeArgs=String, int*/ {}};
 //      ^^^
 //
-// pkg/front_end/testcases/spread_collection_inference.dart:60:52: Error: Unexpected token '...'.
+// pkg/front_end/testcases/spread_collection_inference.dart:65:52: Error: Unexpected token '...'.
 //   List<List<int>> lhs23 = /*@typeArgs=List<int>*/ [... /*@typeArgs=List<int>*/
 //                                                    ^^^
 //
-// pkg/front_end/testcases/spread_collection_inference.dart:63:51: Error: Unexpected token '...'.
+// pkg/front_end/testcases/spread_collection_inference.dart:68:51: Error: Unexpected token '...'.
 //   Set<List<int>> set23 = /*@typeArgs=List<int>*/ {... /*@typeArgs=List<int>*/
 //                                                   ^^^
 //
-// pkg/front_end/testcases/spread_collection_inference.dart:67:6: Error: Unexpected token '...'.
+// pkg/front_end/testcases/spread_collection_inference.dart:72:6: Error: Unexpected token '...'.
 //     {... /*@typeArgs=List<int>*/ [/*@typeArgs=int*/ []]};
 //      ^^^
 //
-// pkg/front_end/testcases/spread_collection_inference.dart:70:6: Error: Unexpected token '...'.
+// pkg/front_end/testcases/spread_collection_inference.dart:75:6: Error: Unexpected token '...'.
 //     {... /*@typeArgs=String, List<int>*/ {"baz": /*@typeArgs=int*/ []}};
 //      ^^^
 //
-// pkg/front_end/testcases/spread_collection_inference.dart:72:77: Error: Unexpected token '...'.
-//   dynamic map24ambiguous = /*@error=CantDisambiguateAmbiguousInformation*/ {...
-//                                                                             ^^^
+// pkg/front_end/testcases/spread_collection_inference.dart:77:29: Error: Unexpected token '...'.
+//   dynamic map24ambiguous = {...
+//                             ^^^
 //
-// pkg/front_end/testcases/spread_collection_inference.dart:73:13: Error: Unexpected token '...'.
+// pkg/front_end/testcases/spread_collection_inference.dart:78:13: Error: Unexpected token '...'.
 //     spread, ...mapSpread};
 //             ^^^
 //
-// pkg/front_end/testcases/spread_collection_inference.dart:75:63: Error: Unexpected token '...'.
-//   int lhs30 = /*@error=InvalidAssignment*/ /*@typeArgs=int*/ [...spread];
-//                                                               ^^^
+// pkg/front_end/testcases/spread_collection_inference.dart:80:34: Error: Unexpected token '...'.
+//   int lhs30 = /*@typeArgs=int*/ [...spread];
+//                                  ^^^
 //
-// pkg/front_end/testcases/spread_collection_inference.dart:77:63: Error: Unexpected token '...'.
-//   int set30 = /*@error=InvalidAssignment*/ /*@typeArgs=int*/ {...spread, 42};
-//                                                               ^^^
+// pkg/front_end/testcases/spread_collection_inference.dart:82:34: Error: Unexpected token '...'.
+//   int set30 = /*@typeArgs=int*/ {...spread, 42};
+//                                  ^^^
 //
-// pkg/front_end/testcases/spread_collection_inference.dart:80:6: Error: Unexpected token '...'.
+// pkg/front_end/testcases/spread_collection_inference.dart:85:6: Error: Unexpected token '...'.
 //     {...spread};
 //      ^^^
 //
-// pkg/front_end/testcases/spread_collection_inference.dart:83:6: Error: Unexpected token '...'.
+// pkg/front_end/testcases/spread_collection_inference.dart:88:6: Error: Unexpected token '...'.
 //     {...mapSpread, "baz": 42};
 //      ^^^
 //
-// pkg/front_end/testcases/spread_collection_inference.dart:86:6: Error: Unexpected token '...'.
+// pkg/front_end/testcases/spread_collection_inference.dart:91:6: Error: Unexpected token '...'.
 //     {...mapSpread};
 //      ^^^
 //
-// pkg/front_end/testcases/spread_collection_inference.dart:88:35: Error: Unexpected token '...'.
-//   List<dynamic> lhs40 = <dynamic>[... /*@error=SpreadTypeMismatch*/
+// pkg/front_end/testcases/spread_collection_inference.dart:93:35: Error: Unexpected token '...'.
+//   List<dynamic> lhs40 = <dynamic>[...
 //                                   ^^^
 //
-// pkg/front_end/testcases/spread_collection_inference.dart:91:34: Error: Unexpected token '...'.
-//   Set<dynamic> set40 = <dynamic>{... /*@error=SpreadTypeMismatch*/
+// pkg/front_end/testcases/spread_collection_inference.dart:96:34: Error: Unexpected token '...'.
+//   Set<dynamic> set40 = <dynamic>{...
 //                                  ^^^
 //
-// pkg/front_end/testcases/spread_collection_inference.dart:94:52: Error: Unexpected token '...'.
+// pkg/front_end/testcases/spread_collection_inference.dart:99:52: Error: Unexpected token '...'.
 //   Map<dynamic, dynamic> map40 = <dynamic, dynamic>{...
 //                                                    ^^^
 //
-// pkg/front_end/testcases/spread_collection_inference.dart:97:36: Error: Unexpected token '...'.
-//   List<dynamic> lhs50 = <dynamic> [... /*@error=SpreadTypeMismatch*/
+// pkg/front_end/testcases/spread_collection_inference.dart:102:36: Error: Unexpected token '...'.
+//   List<dynamic> lhs50 = <dynamic> [...
 //                                    ^^^
 //
-// pkg/front_end/testcases/spread_collection_inference.dart:100:35: Error: Unexpected token '...'.
-//   Set<dynamic> set50 = <dynamic> {... /*@error=SpreadTypeMismatch*/
+// pkg/front_end/testcases/spread_collection_inference.dart:105:35: Error: Unexpected token '...'.
+//   Set<dynamic> set50 = <dynamic> {...
 //                                   ^^^
 //
-// pkg/front_end/testcases/spread_collection_inference.dart:103:52: Error: Unexpected token '...'.
+// pkg/front_end/testcases/spread_collection_inference.dart:108:52: Error: Unexpected token '...'.
 //   Map<dynamic, dynamic> map50 = <dynamic, dynamic>{...
 //                                                    ^^^
 //
-// pkg/front_end/testcases/spread_collection_inference.dart:106:33: Error: Unexpected token '...'.
-//   List<String> lhs60 = <String>[... /*@error=SpreadElementTypeMismatch*/
+// pkg/front_end/testcases/spread_collection_inference.dart:111:33: Error: Unexpected token '...'.
+//   List<String> lhs60 = <String>[...
 //                                 ^^^
 //
-// pkg/front_end/testcases/spread_collection_inference.dart:109:32: Error: Unexpected token '...'.
-//   Set<String> set60 = <String>{... /*@error=SpreadElementTypeMismatch*/ spread};
+// pkg/front_end/testcases/spread_collection_inference.dart:114:32: Error: Unexpected token '...'.
+//   Set<String> set60 = <String>{... spread};
 //                                ^^^
 //
-// pkg/front_end/testcases/spread_collection_inference.dart:111:36: Error: Unexpected token '...'.
+// pkg/front_end/testcases/spread_collection_inference.dart:116:36: Error: Unexpected token '...'.
 //   Map<int, int> map60 = <int, int>{...
 //                                    ^^^
 //
-// pkg/front_end/testcases/spread_collection_inference.dart:114:48: Error: Unexpected token '...'.
+// pkg/front_end/testcases/spread_collection_inference.dart:119:48: Error: Unexpected token '...'.
 //   Map<String, String> map61 = <String, String>{...
 //                                                ^^^
 //
-// pkg/front_end/testcases/spread_collection_inference.dart:117:27: Error: Unexpected token '...'.
-//   List<int> lhs70 = <int>[... /*@error=NonNullAwareSpreadIsNull*/ null];
+// pkg/front_end/testcases/spread_collection_inference.dart:122:27: Error: Unexpected token '...'.
+//   List<int> lhs70 = <int>[... null];
 //                           ^^^
 //
-// pkg/front_end/testcases/spread_collection_inference.dart:119:26: Error: Unexpected token '...'.
-//   Set<int> set70 = <int>{... /*@error=NonNullAwareSpreadIsNull*/ null};
+// pkg/front_end/testcases/spread_collection_inference.dart:124:26: Error: Unexpected token '...'.
+//   Set<int> set70 = <int>{... null};
 //                          ^^^
 //
-// pkg/front_end/testcases/spread_collection_inference.dart:122:6: Error: Unexpected token '...'.
-//     {... /*@error=NonNullAwareSpreadIsNull*/ null, ... /*@typeArgs=dynamic*/
+// pkg/front_end/testcases/spread_collection_inference.dart:127:6: Error: Unexpected token '...'.
+//     {... null, ... /*@typeArgs=dynamic*/
 //      ^^^
 //
-// pkg/front_end/testcases/spread_collection_inference.dart:122:52: Error: Unexpected token '...'.
-//     {... /*@error=NonNullAwareSpreadIsNull*/ null, ... /*@typeArgs=dynamic*/
-//                                                    ^^^
+// pkg/front_end/testcases/spread_collection_inference.dart:127:16: Error: Unexpected token '...'.
+//     {... null, ... /*@typeArgs=dynamic*/
+//                ^^^
 //
-// pkg/front_end/testcases/spread_collection_inference.dart:125:42: Error: Unexpected token '...'.
-//   Map<String, int> map70 = <String, int>{... /*@error=NonNullAwareSpreadIsNull*/
+// pkg/front_end/testcases/spread_collection_inference.dart:130:42: Error: Unexpected token '...'.
+//   Map<String, int> map70 = <String, int>{...
 //                                          ^^^
 //
-// pkg/front_end/testcases/spread_collection_inference.dart:128:27: Error: Unexpected token '...?'.
+// pkg/front_end/testcases/spread_collection_inference.dart:133:27: Error: Unexpected token '...?'.
 //   List<int> lhs80 = <int>[...?null];
 //                           ^^^^
 //
-// pkg/front_end/testcases/spread_collection_inference.dart:130:26: Error: Unexpected token '...?'.
+// pkg/front_end/testcases/spread_collection_inference.dart:135:26: Error: Unexpected token '...?'.
 //   Set<int> set80 = <int>{...?null};
 //                          ^^^^
 //
-// pkg/front_end/testcases/spread_collection_inference.dart:133:6: Error: Unexpected token '...?'.
+// pkg/front_end/testcases/spread_collection_inference.dart:138:6: Error: Unexpected token '...?'.
 //     {...?null, ... /*@typeArgs=dynamic*/ []};
 //      ^^^^
 //
-// pkg/front_end/testcases/spread_collection_inference.dart:133:16: Error: Unexpected token '...'.
+// pkg/front_end/testcases/spread_collection_inference.dart:138:16: Error: Unexpected token '...'.
 //     {...?null, ... /*@typeArgs=dynamic*/ []};
 //                ^^^
 //
-// pkg/front_end/testcases/spread_collection_inference.dart:135:42: Error: Unexpected token '...?'.
+// pkg/front_end/testcases/spread_collection_inference.dart:140:42: Error: Unexpected token '...?'.
 //   Map<String, int> map80 = <String, int>{...?null};
 //                                          ^^^^
 //
+// pkg/front_end/testcases/spread_collection_inference.dart:142:56: Error: Unexpected token '...'.
+//   var /*@type=Map<String, int>*/ map90 = <String, int>{... /*@typeArgs=String, int*/ bar()};
+//                                                        ^^^
+//
+// pkg/front_end/testcases/spread_collection_inference.dart:144:29: Error: Unexpected token '...'.
+//   List<int> list100 = <int>[...listNum];
+//                             ^^^
+//
+// pkg/front_end/testcases/spread_collection_inference.dart:146:37: Error: Unexpected token '...'.
+//   Map<num, int> map100 = <num, int>{...mapIntNum};
+//                                     ^^^
+//
+// pkg/front_end/testcases/spread_collection_inference.dart:148:29: Error: Unexpected token '...'.
+//   List<int> list110 = <int>[...dynVar];
+//                             ^^^
+//
+// pkg/front_end/testcases/spread_collection_inference.dart:150:37: Error: Unexpected token '...'.
+//   Map<num, int> map110 = <num, int>{...dynVar};
+//                                     ^^^
+//
 import self as self;
 import "dart:core" as core;
 
-static method foo() → dynamic {
+static method bar<K extends core::Object = dynamic, V extends core::Object = dynamic>() → core::Map<self::bar::K, self::bar::V>
+  return null;
+static method foo(dynamic dynVar) → dynamic {
   core::List<core::int> spread = <core::int>[1, 2, 3];
   core::Map<core::String, core::int> mapSpread = <core::String, core::int>{"foo": 4, "bar": 2};
   core::int notSpreadInt = 42;
   () → core::int notSpreadFunction = null;
+  core::Map<core::int, core::num> mapIntNum = <core::int, core::num>{42: 42};
+  core::List<core::num> listNum = <core::num>[42];
   dynamic lhs10 = <dynamic>[];
   dynamic set10 = <dynamic>{};
   dynamic map10 = <dynamic, dynamic>{};
@@ -247,5 +271,10 @@
   core::Set<core::int> set80 = <core::int>{};
   dynamic set81ambiguous = <dynamic, dynamic>{};
   core::Map<core::String, core::int> map80 = <core::String, core::int>{};
+  dynamic map90 = <core::String, core::int>{};
+  core::List<core::int> list100 = <core::int>[];
+  core::Map<core::num, core::int> map100 = <core::num, core::int>{};
+  core::List<core::int> list110 = <core::int>[];
+  core::Map<core::num, core::int> map110 = <core::num, core::int>{};
 }
 static method main() → dynamic {}
diff --git a/pkg/front_end/testcases/spread_collection_inference.dart.legacy.transformed.expect b/pkg/front_end/testcases/spread_collection_inference.dart.legacy.transformed.expect
index b419aeb..4eac9e2 100644
--- a/pkg/front_end/testcases/spread_collection_inference.dart.legacy.transformed.expect
+++ b/pkg/front_end/testcases/spread_collection_inference.dart.legacy.transformed.expect
@@ -2,206 +2,230 @@
 //
 // Problems in library:
 //
-// pkg/front_end/testcases/spread_collection_inference.dart:16:62: Error: Unexpected token '...'.
+// pkg/front_end/testcases/spread_collection_inference.dart:21:62: Error: Unexpected token '...'.
 //   var /*@type=List<dynamic>*/ lhs10 = /*@typeArgs=dynamic*/ [...
 //                                                              ^^^
 //
-// pkg/front_end/testcases/spread_collection_inference.dart:19:48: Error: Unexpected token '...'.
+// pkg/front_end/testcases/spread_collection_inference.dart:24:48: Error: Unexpected token '...'.
 //   var /*@type=Set<dynamic>*/ set10 = <dynamic>{... /*@typeArgs=dynamic*/ []};
 //                                                ^^^
 //
-// pkg/front_end/testcases/spread_collection_inference.dart:21:66: Error: Unexpected token '...'.
+// pkg/front_end/testcases/spread_collection_inference.dart:26:66: Error: Unexpected token '...'.
 //   var /*@type=Map<dynamic, dynamic>*/ map10 = <dynamic, dynamic>{...
 //                                                                  ^^^
 //
-// pkg/front_end/testcases/spread_collection_inference.dart:25:37: Error: Unexpected token '...'.
+// pkg/front_end/testcases/spread_collection_inference.dart:30:37: Error: Unexpected token '...'.
 //     /*@typeArgs=dynamic, dynamic*/ {...  /*@typeArgs=dynamic, dynamic*/ {}};
 //                                     ^^^
 //
-// pkg/front_end/testcases/spread_collection_inference.dart:27:54: Error: Unexpected token '...'.
+// pkg/front_end/testcases/spread_collection_inference.dart:32:54: Error: Unexpected token '...'.
 //   var /*@type=List<int>*/ lhs20 = /*@typeArgs=int*/ [...spread];
 //                                                      ^^^
 //
-// pkg/front_end/testcases/spread_collection_inference.dart:29:53: Error: Unexpected token '...'.
+// pkg/front_end/testcases/spread_collection_inference.dart:34:53: Error: Unexpected token '...'.
 //   var /*@type=Set<int>*/ set20 = /*@typeArgs=int*/ {...spread, 42};
 //                                                     ^^^
 //
-// pkg/front_end/testcases/spread_collection_inference.dart:31:62: Error: Unexpected token '...'.
+// pkg/front_end/testcases/spread_collection_inference.dart:36:62: Error: Unexpected token '...'.
 //   var /*@type=Set<int>*/ set20ambiguous = /*@typeArgs=int*/ {...spread};
 //                                                              ^^^
 //
-// pkg/front_end/testcases/spread_collection_inference.dart:34:6: Error: Unexpected token '...'.
+// pkg/front_end/testcases/spread_collection_inference.dart:39:6: Error: Unexpected token '...'.
 //     {...mapSpread, "baz": 42};
 //      ^^^
 //
-// pkg/front_end/testcases/spread_collection_inference.dart:37:6: Error: Unexpected token '...'.
+// pkg/front_end/testcases/spread_collection_inference.dart:42:6: Error: Unexpected token '...'.
 //     {...mapSpread};
 //      ^^^
 //
-// pkg/front_end/testcases/spread_collection_inference.dart:39:62: Error: Unexpected token '...'.
+// pkg/front_end/testcases/spread_collection_inference.dart:44:62: Error: Unexpected token '...'.
 //   var /*@type=List<dynamic>*/ lhs21 = /*@typeArgs=dynamic*/ [...(spread as
 //                                                              ^^^
 //
-// pkg/front_end/testcases/spread_collection_inference.dart:42:61: Error: Unexpected token '...'.
+// pkg/front_end/testcases/spread_collection_inference.dart:47:61: Error: Unexpected token '...'.
 //   var /*@type=Set<dynamic>*/ set21 = /*@typeArgs=dynamic*/ {...(spread as
 //                                                             ^^^
 //
-// pkg/front_end/testcases/spread_collection_inference.dart:46:6: Error: Unexpected token '...'.
+// pkg/front_end/testcases/spread_collection_inference.dart:51:6: Error: Unexpected token '...'.
 //     {...(mapSpread as dynamic), "baz": 42};
 //      ^^^
 //
-// pkg/front_end/testcases/spread_collection_inference.dart:48:77: Error: Unexpected token '...'.
-//   dynamic map21ambiguous = /*@error=CantDisambiguateNotEnoughInformation*/ {...
-//                                                                             ^^^
+// pkg/front_end/testcases/spread_collection_inference.dart:53:29: Error: Unexpected token '...'.
+//   dynamic map21ambiguous = {...
+//                             ^^^
 //
-// pkg/front_end/testcases/spread_collection_inference.dart:51:40: Error: Unexpected token '...'.
+// pkg/front_end/testcases/spread_collection_inference.dart:56:40: Error: Unexpected token '...'.
 //   List<int> lhs22 = /*@typeArgs=int*/ [... /*@typeArgs=int*/ []];
 //                                        ^^^
 //
-// pkg/front_end/testcases/spread_collection_inference.dart:53:39: Error: Unexpected token '...'.
+// pkg/front_end/testcases/spread_collection_inference.dart:58:39: Error: Unexpected token '...'.
 //   Set<int> set22 = /*@typeArgs=int*/ {... /*@typeArgs=int*/ [], 42};
 //                                       ^^^
 //
-// pkg/front_end/testcases/spread_collection_inference.dart:55:48: Error: Unexpected token '...'.
+// pkg/front_end/testcases/spread_collection_inference.dart:60:48: Error: Unexpected token '...'.
 //   Set<int> set22ambiguous = /*@typeArgs=int*/ {... /*@typeArgs=int*/ []};
 //                                                ^^^
 //
-// pkg/front_end/testcases/spread_collection_inference.dart:58:6: Error: Unexpected token '...'.
+// pkg/front_end/testcases/spread_collection_inference.dart:63:6: Error: Unexpected token '...'.
 //     {... /*@typeArgs=String, int*/ {}};
 //      ^^^
 //
-// pkg/front_end/testcases/spread_collection_inference.dart:60:52: Error: Unexpected token '...'.
+// pkg/front_end/testcases/spread_collection_inference.dart:65:52: Error: Unexpected token '...'.
 //   List<List<int>> lhs23 = /*@typeArgs=List<int>*/ [... /*@typeArgs=List<int>*/
 //                                                    ^^^
 //
-// pkg/front_end/testcases/spread_collection_inference.dart:63:51: Error: Unexpected token '...'.
+// pkg/front_end/testcases/spread_collection_inference.dart:68:51: Error: Unexpected token '...'.
 //   Set<List<int>> set23 = /*@typeArgs=List<int>*/ {... /*@typeArgs=List<int>*/
 //                                                   ^^^
 //
-// pkg/front_end/testcases/spread_collection_inference.dart:67:6: Error: Unexpected token '...'.
+// pkg/front_end/testcases/spread_collection_inference.dart:72:6: Error: Unexpected token '...'.
 //     {... /*@typeArgs=List<int>*/ [/*@typeArgs=int*/ []]};
 //      ^^^
 //
-// pkg/front_end/testcases/spread_collection_inference.dart:70:6: Error: Unexpected token '...'.
+// pkg/front_end/testcases/spread_collection_inference.dart:75:6: Error: Unexpected token '...'.
 //     {... /*@typeArgs=String, List<int>*/ {"baz": /*@typeArgs=int*/ []}};
 //      ^^^
 //
-// pkg/front_end/testcases/spread_collection_inference.dart:72:77: Error: Unexpected token '...'.
-//   dynamic map24ambiguous = /*@error=CantDisambiguateAmbiguousInformation*/ {...
-//                                                                             ^^^
+// pkg/front_end/testcases/spread_collection_inference.dart:77:29: Error: Unexpected token '...'.
+//   dynamic map24ambiguous = {...
+//                             ^^^
 //
-// pkg/front_end/testcases/spread_collection_inference.dart:73:13: Error: Unexpected token '...'.
+// pkg/front_end/testcases/spread_collection_inference.dart:78:13: Error: Unexpected token '...'.
 //     spread, ...mapSpread};
 //             ^^^
 //
-// pkg/front_end/testcases/spread_collection_inference.dart:75:63: Error: Unexpected token '...'.
-//   int lhs30 = /*@error=InvalidAssignment*/ /*@typeArgs=int*/ [...spread];
-//                                                               ^^^
+// pkg/front_end/testcases/spread_collection_inference.dart:80:34: Error: Unexpected token '...'.
+//   int lhs30 = /*@typeArgs=int*/ [...spread];
+//                                  ^^^
 //
-// pkg/front_end/testcases/spread_collection_inference.dart:77:63: Error: Unexpected token '...'.
-//   int set30 = /*@error=InvalidAssignment*/ /*@typeArgs=int*/ {...spread, 42};
-//                                                               ^^^
+// pkg/front_end/testcases/spread_collection_inference.dart:82:34: Error: Unexpected token '...'.
+//   int set30 = /*@typeArgs=int*/ {...spread, 42};
+//                                  ^^^
 //
-// pkg/front_end/testcases/spread_collection_inference.dart:80:6: Error: Unexpected token '...'.
+// pkg/front_end/testcases/spread_collection_inference.dart:85:6: Error: Unexpected token '...'.
 //     {...spread};
 //      ^^^
 //
-// pkg/front_end/testcases/spread_collection_inference.dart:83:6: Error: Unexpected token '...'.
+// pkg/front_end/testcases/spread_collection_inference.dart:88:6: Error: Unexpected token '...'.
 //     {...mapSpread, "baz": 42};
 //      ^^^
 //
-// pkg/front_end/testcases/spread_collection_inference.dart:86:6: Error: Unexpected token '...'.
+// pkg/front_end/testcases/spread_collection_inference.dart:91:6: Error: Unexpected token '...'.
 //     {...mapSpread};
 //      ^^^
 //
-// pkg/front_end/testcases/spread_collection_inference.dart:88:35: Error: Unexpected token '...'.
-//   List<dynamic> lhs40 = <dynamic>[... /*@error=SpreadTypeMismatch*/
+// pkg/front_end/testcases/spread_collection_inference.dart:93:35: Error: Unexpected token '...'.
+//   List<dynamic> lhs40 = <dynamic>[...
 //                                   ^^^
 //
-// pkg/front_end/testcases/spread_collection_inference.dart:91:34: Error: Unexpected token '...'.
-//   Set<dynamic> set40 = <dynamic>{... /*@error=SpreadTypeMismatch*/
+// pkg/front_end/testcases/spread_collection_inference.dart:96:34: Error: Unexpected token '...'.
+//   Set<dynamic> set40 = <dynamic>{...
 //                                  ^^^
 //
-// pkg/front_end/testcases/spread_collection_inference.dart:94:52: Error: Unexpected token '...'.
+// pkg/front_end/testcases/spread_collection_inference.dart:99:52: Error: Unexpected token '...'.
 //   Map<dynamic, dynamic> map40 = <dynamic, dynamic>{...
 //                                                    ^^^
 //
-// pkg/front_end/testcases/spread_collection_inference.dart:97:36: Error: Unexpected token '...'.
-//   List<dynamic> lhs50 = <dynamic> [... /*@error=SpreadTypeMismatch*/
+// pkg/front_end/testcases/spread_collection_inference.dart:102:36: Error: Unexpected token '...'.
+//   List<dynamic> lhs50 = <dynamic> [...
 //                                    ^^^
 //
-// pkg/front_end/testcases/spread_collection_inference.dart:100:35: Error: Unexpected token '...'.
-//   Set<dynamic> set50 = <dynamic> {... /*@error=SpreadTypeMismatch*/
+// pkg/front_end/testcases/spread_collection_inference.dart:105:35: Error: Unexpected token '...'.
+//   Set<dynamic> set50 = <dynamic> {...
 //                                   ^^^
 //
-// pkg/front_end/testcases/spread_collection_inference.dart:103:52: Error: Unexpected token '...'.
+// pkg/front_end/testcases/spread_collection_inference.dart:108:52: Error: Unexpected token '...'.
 //   Map<dynamic, dynamic> map50 = <dynamic, dynamic>{...
 //                                                    ^^^
 //
-// pkg/front_end/testcases/spread_collection_inference.dart:106:33: Error: Unexpected token '...'.
-//   List<String> lhs60 = <String>[... /*@error=SpreadElementTypeMismatch*/
+// pkg/front_end/testcases/spread_collection_inference.dart:111:33: Error: Unexpected token '...'.
+//   List<String> lhs60 = <String>[...
 //                                 ^^^
 //
-// pkg/front_end/testcases/spread_collection_inference.dart:109:32: Error: Unexpected token '...'.
-//   Set<String> set60 = <String>{... /*@error=SpreadElementTypeMismatch*/ spread};
+// pkg/front_end/testcases/spread_collection_inference.dart:114:32: Error: Unexpected token '...'.
+//   Set<String> set60 = <String>{... spread};
 //                                ^^^
 //
-// pkg/front_end/testcases/spread_collection_inference.dart:111:36: Error: Unexpected token '...'.
+// pkg/front_end/testcases/spread_collection_inference.dart:116:36: Error: Unexpected token '...'.
 //   Map<int, int> map60 = <int, int>{...
 //                                    ^^^
 //
-// pkg/front_end/testcases/spread_collection_inference.dart:114:48: Error: Unexpected token '...'.
+// pkg/front_end/testcases/spread_collection_inference.dart:119:48: Error: Unexpected token '...'.
 //   Map<String, String> map61 = <String, String>{...
 //                                                ^^^
 //
-// pkg/front_end/testcases/spread_collection_inference.dart:117:27: Error: Unexpected token '...'.
-//   List<int> lhs70 = <int>[... /*@error=NonNullAwareSpreadIsNull*/ null];
+// pkg/front_end/testcases/spread_collection_inference.dart:122:27: Error: Unexpected token '...'.
+//   List<int> lhs70 = <int>[... null];
 //                           ^^^
 //
-// pkg/front_end/testcases/spread_collection_inference.dart:119:26: Error: Unexpected token '...'.
-//   Set<int> set70 = <int>{... /*@error=NonNullAwareSpreadIsNull*/ null};
+// pkg/front_end/testcases/spread_collection_inference.dart:124:26: Error: Unexpected token '...'.
+//   Set<int> set70 = <int>{... null};
 //                          ^^^
 //
-// pkg/front_end/testcases/spread_collection_inference.dart:122:6: Error: Unexpected token '...'.
-//     {... /*@error=NonNullAwareSpreadIsNull*/ null, ... /*@typeArgs=dynamic*/
+// pkg/front_end/testcases/spread_collection_inference.dart:127:6: Error: Unexpected token '...'.
+//     {... null, ... /*@typeArgs=dynamic*/
 //      ^^^
 //
-// pkg/front_end/testcases/spread_collection_inference.dart:122:52: Error: Unexpected token '...'.
-//     {... /*@error=NonNullAwareSpreadIsNull*/ null, ... /*@typeArgs=dynamic*/
-//                                                    ^^^
+// pkg/front_end/testcases/spread_collection_inference.dart:127:16: Error: Unexpected token '...'.
+//     {... null, ... /*@typeArgs=dynamic*/
+//                ^^^
 //
-// pkg/front_end/testcases/spread_collection_inference.dart:125:42: Error: Unexpected token '...'.
-//   Map<String, int> map70 = <String, int>{... /*@error=NonNullAwareSpreadIsNull*/
+// pkg/front_end/testcases/spread_collection_inference.dart:130:42: Error: Unexpected token '...'.
+//   Map<String, int> map70 = <String, int>{...
 //                                          ^^^
 //
-// pkg/front_end/testcases/spread_collection_inference.dart:128:27: Error: Unexpected token '...?'.
+// pkg/front_end/testcases/spread_collection_inference.dart:133:27: Error: Unexpected token '...?'.
 //   List<int> lhs80 = <int>[...?null];
 //                           ^^^^
 //
-// pkg/front_end/testcases/spread_collection_inference.dart:130:26: Error: Unexpected token '...?'.
+// pkg/front_end/testcases/spread_collection_inference.dart:135:26: Error: Unexpected token '...?'.
 //   Set<int> set80 = <int>{...?null};
 //                          ^^^^
 //
-// pkg/front_end/testcases/spread_collection_inference.dart:133:6: Error: Unexpected token '...?'.
+// pkg/front_end/testcases/spread_collection_inference.dart:138:6: Error: Unexpected token '...?'.
 //     {...?null, ... /*@typeArgs=dynamic*/ []};
 //      ^^^^
 //
-// pkg/front_end/testcases/spread_collection_inference.dart:133:16: Error: Unexpected token '...'.
+// pkg/front_end/testcases/spread_collection_inference.dart:138:16: Error: Unexpected token '...'.
 //     {...?null, ... /*@typeArgs=dynamic*/ []};
 //                ^^^
 //
-// pkg/front_end/testcases/spread_collection_inference.dart:135:42: Error: Unexpected token '...?'.
+// pkg/front_end/testcases/spread_collection_inference.dart:140:42: Error: Unexpected token '...?'.
 //   Map<String, int> map80 = <String, int>{...?null};
 //                                          ^^^^
 //
+// pkg/front_end/testcases/spread_collection_inference.dart:142:56: Error: Unexpected token '...'.
+//   var /*@type=Map<String, int>*/ map90 = <String, int>{... /*@typeArgs=String, int*/ bar()};
+//                                                        ^^^
+//
+// pkg/front_end/testcases/spread_collection_inference.dart:144:29: Error: Unexpected token '...'.
+//   List<int> list100 = <int>[...listNum];
+//                             ^^^
+//
+// pkg/front_end/testcases/spread_collection_inference.dart:146:37: Error: Unexpected token '...'.
+//   Map<num, int> map100 = <num, int>{...mapIntNum};
+//                                     ^^^
+//
+// pkg/front_end/testcases/spread_collection_inference.dart:148:29: Error: Unexpected token '...'.
+//   List<int> list110 = <int>[...dynVar];
+//                             ^^^
+//
+// pkg/front_end/testcases/spread_collection_inference.dart:150:37: Error: Unexpected token '...'.
+//   Map<num, int> map110 = <num, int>{...dynVar};
+//                                     ^^^
+//
 import self as self;
 import "dart:core" as core;
 
-static method foo() → dynamic {
+static method bar<K extends core::Object = dynamic, V extends core::Object = dynamic>() → core::Map<self::bar::K, self::bar::V>
+  return null;
+static method foo(dynamic dynVar) → dynamic {
   core::List<core::int> spread = <core::int>[1, 2, 3];
   core::Map<core::String, core::int> mapSpread = <core::String, core::int>{"foo": 4, "bar": 2};
   core::int notSpreadInt = 42;
   () → core::int notSpreadFunction = null;
+  core::Map<core::int, core::num> mapIntNum = <core::int, core::num>{42: 42};
+  core::List<core::num> listNum = <core::num>[42];
   dynamic lhs10 = <dynamic>[];
   dynamic set10 = <dynamic>{};
   dynamic map10 = <dynamic, dynamic>{};
@@ -247,5 +271,10 @@
   core::Set<core::int> set80 = <core::int>{};
   dynamic set81ambiguous = <dynamic, dynamic>{};
   core::Map<core::String, core::int> map80 = <core::String, core::int>{};
+  dynamic map90 = <core::String, core::int>{};
+  core::List<core::int> list100 = <core::int>[];
+  core::Map<core::num, core::int> map100 = <core::num, core::int>{};
+  core::List<core::int> list110 = <core::int>[];
+  core::Map<core::num, core::int> map110 = <core::num, core::int>{};
 }
 static method main() → dynamic {}
diff --git a/pkg/front_end/testcases/spread_collection_inference.dart.outline.expect b/pkg/front_end/testcases/spread_collection_inference.dart.outline.expect
index 07ce31d..e8acddb 100644
--- a/pkg/front_end/testcases/spread_collection_inference.dart.outline.expect
+++ b/pkg/front_end/testcases/spread_collection_inference.dart.outline.expect
@@ -1,7 +1,10 @@
 library;
 import self as self;
+import "dart:core" as core;
 
-static method foo() → dynamic
+static method bar<K extends core::Object = dynamic, V extends core::Object = dynamic>() → core::Map<self::bar::K, self::bar::V>
+  ;
+static method foo(dynamic dynVar) → dynamic
   ;
 static method main() → dynamic
   ;
diff --git a/pkg/front_end/testcases/spread_collection_inference.dart.strong.expect b/pkg/front_end/testcases/spread_collection_inference.dart.strong.expect
index fa9fa70..7599faa 100644
--- a/pkg/front_end/testcases/spread_collection_inference.dart.strong.expect
+++ b/pkg/front_end/testcases/spread_collection_inference.dart.strong.expect
@@ -2,104 +2,112 @@
 //
 // Problems in library:
 //
-// pkg/front_end/testcases/spread_collection_inference.dart:48:76: Error: Not enough type information to disambiguate between literal set and literal map.
+// pkg/front_end/testcases/spread_collection_inference.dart:53:28: Error: Not enough type information to disambiguate between literal set and literal map.
 // Try providing type arguments for the literal explicitly to disambiguate it.
-//   dynamic map21ambiguous = /*@error=CantDisambiguateNotEnoughInformation*/ {...
-//                                                                            ^
+//   dynamic map21ambiguous = {...
+//                            ^
 //
-// pkg/front_end/testcases/spread_collection_inference.dart:72:76: Error: Both Iterable and Map spread elements encountered in ambiguous literal.
-//   dynamic map24ambiguous = /*@error=CantDisambiguateAmbiguousInformation*/ {...
-//                                                                            ^
-// pkg/front_end/testcases/spread_collection_inference.dart:73:5: Context: Iterable spread.
-//     spread, ...mapSpread};
-//     ^
-// pkg/front_end/testcases/spread_collection_inference.dart:73:16: Context: Map spread.
-//     spread, ...mapSpread};
-//                ^
+// pkg/front_end/testcases/spread_collection_inference.dart:77:28: Error: Both Iterable and Map spread elements encountered in ambiguous literal.
+//   dynamic map24ambiguous = {...
+//                            ^
 //
-// pkg/front_end/testcases/spread_collection_inference.dart:75:62: Error: A value of type 'List<int>' can't be assigned to a variable of type 'int'.
+// pkg/front_end/testcases/spread_collection_inference.dart:80:33: Error: A value of type 'List<int>' can't be assigned to a variable of type 'int'.
 //  - 'List' is from 'dart:core'.
 // Try changing the type of the left hand side, or casting the right hand side to 'int'.
-//   int lhs30 = /*@error=InvalidAssignment*/ /*@typeArgs=int*/ [...spread];
-//                                                              ^
+//   int lhs30 = /*@typeArgs=int*/ [...spread];
+//                                 ^
 //
-// pkg/front_end/testcases/spread_collection_inference.dart:77:62: Error: A value of type 'Set<int>' can't be assigned to a variable of type 'int'.
+// pkg/front_end/testcases/spread_collection_inference.dart:82:33: Error: A value of type 'Set<int>' can't be assigned to a variable of type 'int'.
 //  - 'Set' is from 'dart:core'.
 // Try changing the type of the left hand side, or casting the right hand side to 'int'.
-//   int set30 = /*@error=InvalidAssignment*/ /*@typeArgs=int*/ {...spread, 42};
-//                                                              ^
+//   int set30 = /*@typeArgs=int*/ {...spread, 42};
+//                                 ^
 //
-// pkg/front_end/testcases/spread_collection_inference.dart:80:5: Error: A value of type 'Set<int>' can't be assigned to a variable of type 'int'.
+// pkg/front_end/testcases/spread_collection_inference.dart:85:5: Error: A value of type 'Set<int>' can't be assigned to a variable of type 'int'.
 //  - 'Set' is from 'dart:core'.
 // Try changing the type of the left hand side, or casting the right hand side to 'int'.
 //     {...spread};
 //     ^
 //
-// pkg/front_end/testcases/spread_collection_inference.dart:83:5: Error: A value of type 'Map<String, int>' can't be assigned to a variable of type 'int'.
+// pkg/front_end/testcases/spread_collection_inference.dart:88:5: Error: A value of type 'Map<String, int>' can't be assigned to a variable of type 'int'.
 //  - 'Map' is from 'dart:core'.
 // Try changing the type of the left hand side, or casting the right hand side to 'int'.
 //     {...mapSpread, "baz": 42};
 //     ^
 //
-// pkg/front_end/testcases/spread_collection_inference.dart:86:5: Error: A value of type 'Map<String, int>' can't be assigned to a variable of type 'int'.
+// pkg/front_end/testcases/spread_collection_inference.dart:91:5: Error: A value of type 'Map<String, int>' can't be assigned to a variable of type 'int'.
 //  - 'Map' is from 'dart:core'.
 // Try changing the type of the left hand side, or casting the right hand side to 'int'.
 //     {...mapSpread};
 //     ^
 //
-// pkg/front_end/testcases/spread_collection_inference.dart:89:5: Error: Unexpected type 'int' of a spread.  Expected 'dynamic' or an Iterable.
+// pkg/front_end/testcases/spread_collection_inference.dart:94:5: Error: Unexpected type 'int' of a spread.  Expected 'dynamic' or an Iterable.
 //     notSpreadInt];
 //     ^
 //
-// pkg/front_end/testcases/spread_collection_inference.dart:92:5: Error: Unexpected type 'int' of a spread.  Expected 'dynamic' or an Iterable.
+// pkg/front_end/testcases/spread_collection_inference.dart:97:5: Error: Unexpected type 'int' of a spread.  Expected 'dynamic' or an Iterable.
 //     notSpreadInt};
 //     ^
 //
-// pkg/front_end/testcases/spread_collection_inference.dart:95:43: Error: Unexpected type 'int' of a map spread entry.  Expected 'dynamic' or a Map.
-//     /*@error=SpreadMapEntryTypeMismatch*/ notSpreadInt};
-//                                           ^
+// pkg/front_end/testcases/spread_collection_inference.dart:100:2: Error: Unexpected type 'int' of a map spread entry.  Expected 'dynamic' or a Map.
+//  notSpreadInt};
+//  ^
 //
-// pkg/front_end/testcases/spread_collection_inference.dart:98:5: Error: Unexpected type 'int Function()' of a spread.  Expected 'dynamic' or an Iterable.
+// pkg/front_end/testcases/spread_collection_inference.dart:103:5: Error: Unexpected type 'int Function()' of a spread.  Expected 'dynamic' or an Iterable.
 //     notSpreadFunction];
 //     ^
 //
-// pkg/front_end/testcases/spread_collection_inference.dart:101:5: Error: Unexpected type 'int Function()' of a spread.  Expected 'dynamic' or an Iterable.
+// pkg/front_end/testcases/spread_collection_inference.dart:106:5: Error: Unexpected type 'int Function()' of a spread.  Expected 'dynamic' or an Iterable.
 //     notSpreadFunction};
 //     ^
 //
-// pkg/front_end/testcases/spread_collection_inference.dart:104:43: Error: Unexpected type 'int Function()' of a map spread entry.  Expected 'dynamic' or a Map.
-//     /*@error=SpreadMapEntryTypeMismatch*/ notSpreadFunction};
-//                                           ^
+// pkg/front_end/testcases/spread_collection_inference.dart:109:2: Error: Unexpected type 'int Function()' of a map spread entry.  Expected 'dynamic' or a Map.
+//  notSpreadFunction};
+//  ^
 //
-// pkg/front_end/testcases/spread_collection_inference.dart:107:5: Error: Can't assign spread elements of type 'int' to collection elements of type 'String'.
+// pkg/front_end/testcases/spread_collection_inference.dart:112:5: Error: Can't assign spread elements of type 'int' to collection elements of type 'String'.
 //     spread];
 //     ^
 //
-// pkg/front_end/testcases/spread_collection_inference.dart:109:73: Error: Can't assign spread elements of type 'int' to collection elements of type 'String'.
-//   Set<String> set60 = <String>{... /*@error=SpreadElementTypeMismatch*/ spread};
-//                                                                         ^
+// pkg/front_end/testcases/spread_collection_inference.dart:112:5: Error: A value of type 'int' can't be assigned to a variable of type 'String'.
+// Try changing the type of the left hand side, or casting the right hand side to 'String'.
+//     spread];
+//     ^
 //
-// pkg/front_end/testcases/spread_collection_inference.dart:112:53: Error: Can't assign spread entry keys of type 'String' to map entry keys of type 'int'.
-//     /*@error=SpreadMapEntryElementKeyTypeMismatch*/ mapSpread};
-//                                                     ^
+// pkg/front_end/testcases/spread_collection_inference.dart:114:36: Error: Can't assign spread elements of type 'int' to collection elements of type 'String'.
+//   Set<String> set60 = <String>{... spread};
+//                                    ^
 //
-// pkg/front_end/testcases/spread_collection_inference.dart:115:55: Error: Can't assign spread entry values of type 'int' to map entry values of type 'String'.
-//     /*@error=SpreadMapEntryElementValueTypeMismatch*/ mapSpread};
-//                                                       ^
+// pkg/front_end/testcases/spread_collection_inference.dart:114:36: Error: A value of type 'int' can't be assigned to a variable of type 'String'.
+// Try changing the type of the left hand side, or casting the right hand side to 'String'.
+//   Set<String> set60 = <String>{... spread};
+//                                    ^
 //
-// pkg/front_end/testcases/spread_collection_inference.dart:117:67: Error: Can't spread a value with static type Null.
-//   List<int> lhs70 = <int>[... /*@error=NonNullAwareSpreadIsNull*/ null];
-//                                                                   ^
+// pkg/front_end/testcases/spread_collection_inference.dart:117:2: Error: Can't assign spread entry keys of type 'String' to map entry keys of type 'int'.
+//  mapSpread};
+//  ^
 //
-// pkg/front_end/testcases/spread_collection_inference.dart:119:66: Error: Can't spread a value with static type Null.
-//   Set<int> set70 = <int>{... /*@error=NonNullAwareSpreadIsNull*/ null};
-//                                                                  ^
+// pkg/front_end/testcases/spread_collection_inference.dart:120:2: Error: Can't assign spread entry values of type 'int' to map entry values of type 'String'.
+//  mapSpread};
+//  ^
 //
-// pkg/front_end/testcases/spread_collection_inference.dart:122:46: Error: Can't spread a value with static type Null.
-//     {... /*@error=NonNullAwareSpreadIsNull*/ null, ... /*@typeArgs=dynamic*/
-//                                              ^
+// pkg/front_end/testcases/spread_collection_inference.dart:122:31: Error: Can't spread a value with static type Null.
+//   List<int> lhs70 = <int>[... null];
+//                               ^
 //
-// pkg/front_end/testcases/spread_collection_inference.dart:126:5: Error: Can't spread a value with static type Null.
+// pkg/front_end/testcases/spread_collection_inference.dart:124:30: Error: Can't spread a value with static type Null.
+//   Set<int> set70 = <int>{... null};
+//                              ^
+//
+// pkg/front_end/testcases/spread_collection_inference.dart:127:10: Error: Can't spread a value with static type Null.
+//     {... null, ... /*@typeArgs=dynamic*/
+//          ^
+//
+// pkg/front_end/testcases/spread_collection_inference.dart:127:10: Error: Expected ',' before this.
+//     {... null, ... /*@typeArgs=dynamic*/
+//          ^
+//
+// pkg/front_end/testcases/spread_collection_inference.dart:131:5: Error: Can't spread a value with static type Null.
 //     null};
 //     ^
 //
@@ -107,11 +115,15 @@
 import "dart:core" as core;
 import "dart:collection" as col;
 
-static method foo() → dynamic {
+static method bar<K extends core::Object = dynamic, V extends core::Object = dynamic>() → core::Map<self::bar::K, self::bar::V>
+  return null;
+static method foo(dynamic dynVar) → dynamic {
   core::List<core::int> spread = <core::int>[1, 2, 3];
   core::Map<core::String, core::int> mapSpread = <core::String, core::int>{"foo": 4, "bar": 2};
   core::int notSpreadInt = 42;
   () → core::int notSpreadFunction = null;
+  core::Map<core::int, core::num> mapIntNum = <core::int, core::num>{42: 42};
+  core::List<core::num> listNum = <core::num>[42];
   core::List<dynamic> lhs10 = block {
     final core::List<dynamic> #t1 = <dynamic>[];
     for (final dynamic #t2 in <dynamic>[])
@@ -145,209 +157,264 @@
   } =>#t11;
   core::Set<core::int> set20ambiguous = block {
     final core::Set<core::int> #t13 = col::LinkedHashSet::•<core::int>();
-    for (final core::int #t14 in spread)
-      #t13.{core::Set::add}(#t14);
+    for (final dynamic #t14 in spread) {
+      final core::int #t15 = #t14 as{TypeError} core::int;
+      #t13.{core::Set::add}(#t15);
+    }
   } =>#t13;
   core::Map<core::String, core::int> map20 = block {
-    final core::Map<core::String, core::int> #t15 = <core::String, core::int>{};
-    for (final core::MapEntry<core::String, core::int> #t16 in mapSpread.{core::Map::entries})
-      #t15.{core::Map::[]=}(#t16.{core::MapEntry::key}, #t16.{core::MapEntry::value});
-    #t15.{core::Map::[]=}("baz", 42);
-  } =>#t15;
+    final core::Map<core::String, core::int> #t16 = <core::String, core::int>{};
+    for (final core::MapEntry<core::String, core::int> #t17 in mapSpread.{core::Map::entries})
+      #t16.{core::Map::[]=}(#t17.{core::MapEntry::key}, #t17.{core::MapEntry::value});
+    #t16.{core::Map::[]=}("baz", 42);
+  } =>#t16;
   core::Map<core::String, core::int> map20ambiguous = block {
-    final core::Map<core::String, core::int> #t17 = <core::String, core::int>{};
-    for (final core::MapEntry<core::String, core::int> #t18 in mapSpread.{core::Map::entries})
-      #t17.{core::Map::[]=}(#t18.{core::MapEntry::key}, #t18.{core::MapEntry::value});
-  } =>#t17;
+    final core::Map<core::String, core::int> #t18 = <core::String, core::int>{};
+    for (final core::MapEntry<core::String, core::int> #t19 in mapSpread.{core::Map::entries})
+      #t18.{core::Map::[]=}(#t19.{core::MapEntry::key}, #t19.{core::MapEntry::value});
+  } =>#t18;
   core::List<dynamic> lhs21 = block {
-    final core::List<dynamic> #t19 = <dynamic>[];
-    for (final dynamic #t20 in (spread as dynamic) as{TypeError} core::Iterable<dynamic>)
-      #t19.{core::List::add}(#t20);
-  } =>#t19;
+    final core::List<dynamic> #t20 = <dynamic>[];
+    for (final dynamic #t21 in (spread as dynamic) as{TypeError} core::Iterable<dynamic>)
+      #t20.{core::List::add}(#t21);
+  } =>#t20;
   core::Set<dynamic> set21 = block {
-    final core::Set<dynamic> #t21 = col::LinkedHashSet::•<dynamic>();
-    for (final dynamic #t22 in (spread as dynamic) as{TypeError} core::Iterable<dynamic>)
-      #t21.{core::Set::add}(#t22);
-    #t21.{core::Set::add}(42);
-  } =>#t21;
+    final core::Set<dynamic> #t22 = col::LinkedHashSet::•<dynamic>();
+    for (final dynamic #t23 in (spread as dynamic) as{TypeError} core::Iterable<dynamic>)
+      #t22.{core::Set::add}(#t23);
+    #t22.{core::Set::add}(42);
+  } =>#t22;
   core::Map<dynamic, dynamic> map21 = block {
-    final core::Map<dynamic, dynamic> #t23 = <dynamic, dynamic>{};
-    for (final core::MapEntry<dynamic, dynamic> #t24 in ((mapSpread as dynamic) as{TypeError} core::Map<dynamic, dynamic>).{core::Map::entries})
-      #t23.{core::Map::[]=}(#t24.{core::MapEntry::key}, #t24.{core::MapEntry::value});
-    #t23.{core::Map::[]=}("baz", 42);
-  } =>#t23;
-  dynamic map21ambiguous = invalid-expression "pkg/front_end/testcases/spread_collection_inference.dart:48:76: Error: Not enough type information to disambiguate between literal set and literal map.
+    final core::Map<dynamic, dynamic> #t24 = <dynamic, dynamic>{};
+    for (final core::MapEntry<dynamic, dynamic> #t25 in ((mapSpread as dynamic) as{TypeError} core::Map<dynamic, dynamic>).{core::Map::entries})
+      #t24.{core::Map::[]=}(#t25.{core::MapEntry::key}, #t25.{core::MapEntry::value});
+    #t24.{core::Map::[]=}("baz", 42);
+  } =>#t24;
+  dynamic map21ambiguous = invalid-expression "pkg/front_end/testcases/spread_collection_inference.dart:53:28: Error: Not enough type information to disambiguate between literal set and literal map.
 Try providing type arguments for the literal explicitly to disambiguate it.
-  dynamic map21ambiguous = /*@error=CantDisambiguateNotEnoughInformation*/ {...
-                                                                           ^";
+  dynamic map21ambiguous = {...
+                           ^";
   core::List<core::int> lhs22 = block {
-    final core::List<core::int> #t25 = <core::int>[];
-    for (final core::int #t26 in <core::int>[])
-      #t25.{core::List::add}(#t26);
-  } =>#t25;
+    final core::List<core::int> #t26 = <core::int>[];
+    for (final core::int #t27 in <core::int>[])
+      #t26.{core::List::add}(#t27);
+  } =>#t26;
   core::Set<core::int> set22 = block {
-    final core::Set<core::int> #t27 = col::LinkedHashSet::•<core::int>();
-    for (final core::int #t28 in <core::int>[])
-      #t27.{core::Set::add}(#t28);
-    #t27.{core::Set::add}(42);
-  } =>#t27;
+    final core::Set<core::int> #t28 = col::LinkedHashSet::•<core::int>();
+    for (final core::int #t29 in <core::int>[])
+      #t28.{core::Set::add}(#t29);
+    #t28.{core::Set::add}(42);
+  } =>#t28;
   core::Set<core::int> set22ambiguous = block {
-    final core::Set<core::int> #t29 = col::LinkedHashSet::•<core::int>();
-    for (final core::int #t30 in <core::int>[])
-      #t29.{core::Set::add}(#t30);
-  } =>#t29;
+    final core::Set<core::int> #t30 = col::LinkedHashSet::•<core::int>();
+    for (final dynamic #t31 in <core::int>[]) {
+      final core::int #t32 = #t31 as{TypeError} core::int;
+      #t30.{core::Set::add}(#t32);
+    }
+  } =>#t30;
   core::Map<core::String, core::int> map22 = block {
-    final core::Map<core::String, core::int> #t31 = <core::String, core::int>{};
-    for (final core::MapEntry<core::String, core::int> #t32 in <core::String, core::int>{}.{core::Map::entries})
-      #t31.{core::Map::[]=}(#t32.{core::MapEntry::key}, #t32.{core::MapEntry::value});
-  } =>#t31;
-  core::List<core::List<core::int>> lhs23 = block {
-    final core::List<core::List<core::int>> #t33 = <core::List<core::int>>[];
-    for (final core::List<core::int> #t34 in <core::List<core::int>>[<core::int>[]])
-      #t33.{core::List::add}(#t34);
+    final core::Map<core::String, core::int> #t33 = <core::String, core::int>{};
+    for (final core::MapEntry<core::String, core::int> #t34 in <core::String, core::int>{}.{core::Map::entries})
+      #t33.{core::Map::[]=}(#t34.{core::MapEntry::key}, #t34.{core::MapEntry::value});
   } =>#t33;
-  core::Set<core::List<core::int>> set23 = block {
-    final core::Set<core::List<core::int>> #t35 = col::LinkedHashSet::•<core::List<core::int>>();
+  core::List<core::List<core::int>> lhs23 = block {
+    final core::List<core::List<core::int>> #t35 = <core::List<core::int>>[];
     for (final core::List<core::int> #t36 in <core::List<core::int>>[<core::int>[]])
-      #t35.{core::Set::add}(#t36);
-    #t35.{core::Set::add}(<core::int>[42]);
+      #t35.{core::List::add}(#t36);
   } =>#t35;
-  core::Set<core::List<core::int>> set23ambiguous = block {
+  core::Set<core::List<core::int>> set23 = block {
     final core::Set<core::List<core::int>> #t37 = col::LinkedHashSet::•<core::List<core::int>>();
     for (final core::List<core::int> #t38 in <core::List<core::int>>[<core::int>[]])
       #t37.{core::Set::add}(#t38);
+    #t37.{core::Set::add}(<core::int>[42]);
   } =>#t37;
-  core::Map<core::String, core::List<core::int>> map23 = block {
-    final core::Map<core::String, core::List<core::int>> #t39 = <core::String, core::List<core::int>>{};
-    for (final core::MapEntry<core::String, core::List<core::int>> #t40 in <core::String, core::List<core::int>>{"baz": <core::int>[]}.{core::Map::entries})
-      #t39.{core::Map::[]=}(#t40.{core::MapEntry::key}, #t40.{core::MapEntry::value});
+  core::Set<core::List<core::int>> set23ambiguous = block {
+    final core::Set<core::List<core::int>> #t39 = col::LinkedHashSet::•<core::List<core::int>>();
+    for (final dynamic #t40 in <core::List<core::int>>[<core::int>[]]) {
+      final core::List<core::int> #t41 = #t40 as{TypeError} core::List<core::int>;
+      #t39.{core::Set::add}(#t41);
+    }
   } =>#t39;
-  dynamic map24ambiguous = invalid-expression "pkg/front_end/testcases/spread_collection_inference.dart:72:76: Error: Both Iterable and Map spread elements encountered in ambiguous literal.
-  dynamic map24ambiguous = /*@error=CantDisambiguateAmbiguousInformation*/ {...
-                                                                           ^";
-  core::int lhs30 = let final<BottomType> #t41 = invalid-expression "pkg/front_end/testcases/spread_collection_inference.dart:75:62: Error: A value of type 'List<int>' can't be assigned to a variable of type 'int'.
+  core::Map<core::String, core::List<core::int>> map23 = block {
+    final core::Map<core::String, core::List<core::int>> #t42 = <core::String, core::List<core::int>>{};
+    for (final core::MapEntry<core::String, core::List<core::int>> #t43 in <core::String, core::List<core::int>>{"baz": <core::int>[]}.{core::Map::entries})
+      #t42.{core::Map::[]=}(#t43.{core::MapEntry::key}, #t43.{core::MapEntry::value});
+  } =>#t42;
+  dynamic map24ambiguous = invalid-expression "pkg/front_end/testcases/spread_collection_inference.dart:77:28: Error: Both Iterable and Map spread elements encountered in ambiguous literal.
+  dynamic map24ambiguous = {...
+                           ^";
+  core::int lhs30 = let final<BottomType> #t44 = invalid-expression "pkg/front_end/testcases/spread_collection_inference.dart:80:33: Error: A value of type 'List<int>' can't be assigned to a variable of type 'int'.
  - 'List' is from 'dart:core'.
 Try changing the type of the left hand side, or casting the right hand side to 'int'.
-  int lhs30 = /*@error=InvalidAssignment*/ /*@typeArgs=int*/ [...spread];
-                                                             ^" in ( block {
-    final core::List<core::int> #t42 = <core::int>[];
-    for (final core::int #t43 in spread)
-      #t42.{core::List::add}(#t43);
-  } =>#t42) as{TypeError} core::int;
-  core::int set30 = let final<BottomType> #t44 = invalid-expression "pkg/front_end/testcases/spread_collection_inference.dart:77:62: Error: A value of type 'Set<int>' can't be assigned to a variable of type 'int'.
+  int lhs30 = /*@typeArgs=int*/ [...spread];
+                                ^" in ( block {
+    final core::List<core::int> #t45 = <core::int>[];
+    for (final core::int #t46 in spread)
+      #t45.{core::List::add}(#t46);
+  } =>#t45) as{TypeError} core::int;
+  core::int set30 = let final<BottomType> #t47 = invalid-expression "pkg/front_end/testcases/spread_collection_inference.dart:82:33: Error: A value of type 'Set<int>' can't be assigned to a variable of type 'int'.
  - 'Set' is from 'dart:core'.
 Try changing the type of the left hand side, or casting the right hand side to 'int'.
-  int set30 = /*@error=InvalidAssignment*/ /*@typeArgs=int*/ {...spread, 42};
-                                                             ^" in ( block {
-    final core::Set<core::int> #t45 = col::LinkedHashSet::•<core::int>();
-    for (final core::int #t46 in spread)
-      #t45.{core::Set::add}(#t46);
-    #t45.{core::Set::add}(42);
-  } =>#t45) as{TypeError} core::int;
-  core::int set30ambiguous = let final<BottomType> #t47 = invalid-expression "pkg/front_end/testcases/spread_collection_inference.dart:80:5: Error: A value of type 'Set<int>' can't be assigned to a variable of type 'int'.
+  int set30 = /*@typeArgs=int*/ {...spread, 42};
+                                ^" in ( block {
+    final core::Set<core::int> #t48 = col::LinkedHashSet::•<core::int>();
+    for (final core::int #t49 in spread)
+      #t48.{core::Set::add}(#t49);
+    #t48.{core::Set::add}(42);
+  } =>#t48) as{TypeError} core::int;
+  core::int set30ambiguous = let final<BottomType> #t50 = invalid-expression "pkg/front_end/testcases/spread_collection_inference.dart:85:5: Error: A value of type 'Set<int>' can't be assigned to a variable of type 'int'.
  - 'Set' is from 'dart:core'.
 Try changing the type of the left hand side, or casting the right hand side to 'int'.
     {...spread};
     ^" in ( block {
-    final core::Set<core::int> #t48 = col::LinkedHashSet::•<core::int>();
-    for (final core::int #t49 in spread)
-      #t48.{core::Set::add}(#t49);
-  } =>#t48) as{TypeError} core::int;
-  core::int map30 = let final<BottomType> #t50 = invalid-expression "pkg/front_end/testcases/spread_collection_inference.dart:83:5: Error: A value of type 'Map<String, int>' can't be assigned to a variable of type 'int'.
+    final core::Set<core::int> #t51 = col::LinkedHashSet::•<core::int>();
+    for (final dynamic #t52 in spread) {
+      final core::int #t53 = #t52 as{TypeError} core::int;
+      #t51.{core::Set::add}(#t53);
+    }
+  } =>#t51) as{TypeError} core::int;
+  core::int map30 = let final<BottomType> #t54 = invalid-expression "pkg/front_end/testcases/spread_collection_inference.dart:88:5: Error: A value of type 'Map<String, int>' can't be assigned to a variable of type 'int'.
  - 'Map' is from 'dart:core'.
 Try changing the type of the left hand side, or casting the right hand side to 'int'.
     {...mapSpread, \"baz\": 42};
     ^" in ( block {
-    final core::Map<core::String, core::int> #t51 = <core::String, core::int>{};
-    for (final core::MapEntry<core::String, core::int> #t52 in mapSpread.{core::Map::entries})
-      #t51.{core::Map::[]=}(#t52.{core::MapEntry::key}, #t52.{core::MapEntry::value});
-    #t51.{core::Map::[]=}("baz", 42);
-  } =>#t51) as{TypeError} core::int;
-  core::int map30ambiguous = let final<BottomType> #t53 = invalid-expression "pkg/front_end/testcases/spread_collection_inference.dart:86:5: Error: A value of type 'Map<String, int>' can't be assigned to a variable of type 'int'.
+    final core::Map<core::String, core::int> #t55 = <core::String, core::int>{};
+    for (final core::MapEntry<core::String, core::int> #t56 in mapSpread.{core::Map::entries})
+      #t55.{core::Map::[]=}(#t56.{core::MapEntry::key}, #t56.{core::MapEntry::value});
+    #t55.{core::Map::[]=}("baz", 42);
+  } =>#t55) as{TypeError} core::int;
+  core::int map30ambiguous = let final<BottomType> #t57 = invalid-expression "pkg/front_end/testcases/spread_collection_inference.dart:91:5: Error: A value of type 'Map<String, int>' can't be assigned to a variable of type 'int'.
  - 'Map' is from 'dart:core'.
 Try changing the type of the left hand side, or casting the right hand side to 'int'.
     {...mapSpread};
     ^" in ( block {
-    final core::Map<core::String, core::int> #t54 = <core::String, core::int>{};
-    for (final core::MapEntry<core::String, core::int> #t55 in mapSpread.{core::Map::entries})
-      #t54.{core::Map::[]=}(#t55.{core::MapEntry::key}, #t55.{core::MapEntry::value});
-  } =>#t54) as{TypeError} core::int;
-  core::List<dynamic> lhs40 = <dynamic>[invalid-expression "pkg/front_end/testcases/spread_collection_inference.dart:89:5: Error: Unexpected type 'int' of a spread.  Expected 'dynamic' or an Iterable.
+    final core::Map<core::String, core::int> #t58 = <core::String, core::int>{};
+    for (final core::MapEntry<core::String, core::int> #t59 in mapSpread.{core::Map::entries})
+      #t58.{core::Map::[]=}(#t59.{core::MapEntry::key}, #t59.{core::MapEntry::value});
+  } =>#t58) as{TypeError} core::int;
+  core::List<dynamic> lhs40 = <dynamic>[invalid-expression "pkg/front_end/testcases/spread_collection_inference.dart:94:5: Error: Unexpected type 'int' of a spread.  Expected 'dynamic' or an Iterable.
     notSpreadInt];
     ^"];
-  core::Set<dynamic> set40 = let final core::Set<dynamic> #t56 = col::LinkedHashSet::•<dynamic>() in let final dynamic #t57 = #t56.{core::Set::add}(invalid-expression "pkg/front_end/testcases/spread_collection_inference.dart:92:5: Error: Unexpected type 'int' of a spread.  Expected 'dynamic' or an Iterable.
+  core::Set<dynamic> set40 = let final core::Set<dynamic> #t60 = col::LinkedHashSet::•<dynamic>() in let final dynamic #t61 = #t60.{core::Set::add}(invalid-expression "pkg/front_end/testcases/spread_collection_inference.dart:97:5: Error: Unexpected type 'int' of a spread.  Expected 'dynamic' or an Iterable.
     notSpreadInt};
-    ^") in #t56;
-  core::Map<dynamic, dynamic> map40 = <dynamic, dynamic>{invalid-expression "pkg/front_end/testcases/spread_collection_inference.dart:95:43: Error: Unexpected type 'int' of a map spread entry.  Expected 'dynamic' or a Map.
-    /*@error=SpreadMapEntryTypeMismatch*/ notSpreadInt};
-                                          ^": null};
-  core::List<dynamic> lhs50 = <dynamic>[invalid-expression "pkg/front_end/testcases/spread_collection_inference.dart:98:5: Error: Unexpected type 'int Function()' of a spread.  Expected 'dynamic' or an Iterable.
+    ^") in #t60;
+  core::Map<dynamic, dynamic> map40 = <dynamic, dynamic>{invalid-expression "pkg/front_end/testcases/spread_collection_inference.dart:100:2: Error: Unexpected type 'int' of a map spread entry.  Expected 'dynamic' or a Map.
+ notSpreadInt};
+ ^": null};
+  core::List<dynamic> lhs50 = <dynamic>[invalid-expression "pkg/front_end/testcases/spread_collection_inference.dart:103:5: Error: Unexpected type 'int Function()' of a spread.  Expected 'dynamic' or an Iterable.
     notSpreadFunction];
     ^"];
-  core::Set<dynamic> set50 = let final core::Set<dynamic> #t58 = col::LinkedHashSet::•<dynamic>() in let final dynamic #t59 = #t58.{core::Set::add}(invalid-expression "pkg/front_end/testcases/spread_collection_inference.dart:101:5: Error: Unexpected type 'int Function()' of a spread.  Expected 'dynamic' or an Iterable.
+  core::Set<dynamic> set50 = let final core::Set<dynamic> #t62 = col::LinkedHashSet::•<dynamic>() in let final dynamic #t63 = #t62.{core::Set::add}(invalid-expression "pkg/front_end/testcases/spread_collection_inference.dart:106:5: Error: Unexpected type 'int Function()' of a spread.  Expected 'dynamic' or an Iterable.
     notSpreadFunction};
-    ^") in #t58;
-  core::Map<dynamic, dynamic> map50 = <dynamic, dynamic>{invalid-expression "pkg/front_end/testcases/spread_collection_inference.dart:104:43: Error: Unexpected type 'int Function()' of a map spread entry.  Expected 'dynamic' or a Map.
-    /*@error=SpreadMapEntryTypeMismatch*/ notSpreadFunction};
-                                          ^": null};
-  core::List<core::String> lhs60 = <core::String>[invalid-expression "pkg/front_end/testcases/spread_collection_inference.dart:107:5: Error: Can't assign spread elements of type 'int' to collection elements of type 'String'.
+    ^") in #t62;
+  core::Map<dynamic, dynamic> map50 = <dynamic, dynamic>{invalid-expression "pkg/front_end/testcases/spread_collection_inference.dart:109:2: Error: Unexpected type 'int Function()' of a map spread entry.  Expected 'dynamic' or a Map.
+ notSpreadFunction};
+ ^": null};
+  core::List<core::String> lhs60 = <core::String>[let final<BottomType> #t64 = invalid-expression "pkg/front_end/testcases/spread_collection_inference.dart:112:5: Error: A value of type 'int' can't be assigned to a variable of type 'String'.
+Try changing the type of the left hand side, or casting the right hand side to 'String'.
     spread];
-    ^"];
-  core::Set<core::String> set60 = let final core::Set<core::String> #t60 = col::LinkedHashSet::•<core::String>() in let final dynamic #t61 = #t60.{core::Set::add}(invalid-expression "pkg/front_end/testcases/spread_collection_inference.dart:109:73: Error: Can't assign spread elements of type 'int' to collection elements of type 'String'.
-  Set<String> set60 = <String>{... /*@error=SpreadElementTypeMismatch*/ spread};
-                                                                        ^") in #t60;
-  core::Map<core::int, core::int> map60 = <core::int, core::int>{invalid-expression "pkg/front_end/testcases/spread_collection_inference.dart:112:53: Error: Can't assign spread entry keys of type 'String' to map entry keys of type 'int'.
-    /*@error=SpreadMapEntryElementKeyTypeMismatch*/ mapSpread};
-                                                    ^": null};
-  core::Map<core::String, core::String> map61 = <core::String, core::String>{null: invalid-expression "pkg/front_end/testcases/spread_collection_inference.dart:115:55: Error: Can't assign spread entry values of type 'int' to map entry values of type 'String'.
-    /*@error=SpreadMapEntryElementValueTypeMismatch*/ mapSpread};
-                                                      ^"};
-  core::List<core::int> lhs70 = <core::int>[invalid-expression "pkg/front_end/testcases/spread_collection_inference.dart:117:67: Error: Can't spread a value with static type Null.
-  List<int> lhs70 = <int>[... /*@error=NonNullAwareSpreadIsNull*/ null];
-                                                                  ^"];
-  core::Set<core::int> set70 = let final core::Set<core::int> #t62 = col::LinkedHashSet::•<core::int>() in let final dynamic #t63 = #t62.{core::Set::add}(invalid-expression "pkg/front_end/testcases/spread_collection_inference.dart:119:66: Error: Can't spread a value with static type Null.
-  Set<int> set70 = <int>{... /*@error=NonNullAwareSpreadIsNull*/ null};
-                                                                 ^") in #t62;
+    ^" in invalid-expression "pkg/front_end/testcases/spread_collection_inference.dart:112:5: Error: Can't assign spread elements of type 'int' to collection elements of type 'String'.
+    spread];
+    ^" as{TypeError} core::String];
+  core::Set<core::String> set60 = let final core::Set<core::String> #t65 = col::LinkedHashSet::•<core::String>() in let final dynamic #t66 = #t65.{core::Set::add}(let final<BottomType> #t67 = invalid-expression "pkg/front_end/testcases/spread_collection_inference.dart:114:36: Error: A value of type 'int' can't be assigned to a variable of type 'String'.
+Try changing the type of the left hand side, or casting the right hand side to 'String'.
+  Set<String> set60 = <String>{... spread};
+                                   ^" in invalid-expression "pkg/front_end/testcases/spread_collection_inference.dart:114:36: Error: Can't assign spread elements of type 'int' to collection elements of type 'String'.
+  Set<String> set60 = <String>{... spread};
+                                   ^" as{TypeError} core::String) in #t65;
+  core::Map<core::int, core::int> map60 = <core::int, core::int>{invalid-expression "pkg/front_end/testcases/spread_collection_inference.dart:117:2: Error: Can't assign spread entry keys of type 'String' to map entry keys of type 'int'.
+ mapSpread};
+ ^": null};
+  core::Map<core::String, core::String> map61 = <core::String, core::String>{null: invalid-expression "pkg/front_end/testcases/spread_collection_inference.dart:120:2: Error: Can't assign spread entry values of type 'int' to map entry values of type 'String'.
+ mapSpread};
+ ^"};
+  core::List<core::int> lhs70 = <core::int>[invalid-expression "pkg/front_end/testcases/spread_collection_inference.dart:122:31: Error: Can't spread a value with static type Null.
+  List<int> lhs70 = <int>[... null];
+                              ^" as{TypeError} core::int];
+  core::Set<core::int> set70 = let final core::Set<core::int> #t68 = col::LinkedHashSet::•<core::int>() in let final dynamic #t69 = #t68.{core::Set::add}(invalid-expression "pkg/front_end/testcases/spread_collection_inference.dart:124:30: Error: Can't spread a value with static type Null.
+  Set<int> set70 = <int>{... null};
+                             ^" as{TypeError} core::int) in #t68;
   core::Set<dynamic> set71ambiguous = block {
-    final core::Set<dynamic> #t64 = col::LinkedHashSet::•<dynamic>();
-    #t64.{core::Set::add}(invalid-expression "pkg/front_end/testcases/spread_collection_inference.dart:122:46: Error: Can't spread a value with static type Null.
-    {... /*@error=NonNullAwareSpreadIsNull*/ null, ... /*@typeArgs=dynamic*/
-                                             ^");
-    for (final dynamic #t65 in <dynamic>[])
-      #t64.{core::Set::add}(#t65);
-  } =>#t64;
-  core::Map<core::String, core::int> map70 = <core::String, core::int>{invalid-expression "pkg/front_end/testcases/spread_collection_inference.dart:126:5: Error: Can't spread a value with static type Null.
+    final core::Set<dynamic> #t70 = col::LinkedHashSet::•<dynamic>();
+    #t70.{core::Set::add}(invalid-expression "pkg/front_end/testcases/spread_collection_inference.dart:127:10: Error: Expected ',' before this.
+    {... null, ... /*@typeArgs=dynamic*/
+         ^");
+    for (final dynamic #t71 in <dynamic>[]) {
+      final dynamic #t72 = #t71 as{TypeError} dynamic;
+      #t70.{core::Set::add}(#t72);
+    }
+  } =>#t70;
+  core::Map<core::String, core::int> map70 = <core::String, core::int>{invalid-expression "pkg/front_end/testcases/spread_collection_inference.dart:131:5: Error: Can't spread a value with static type Null.
     null};
     ^": null};
   core::List<core::int> lhs80 = block {
-    final core::List<core::int> #t66 = <core::int>[];
-    final dynamic #t67 = null;
-    if(!#t67.{core::Object::==}(null))
-      for (final core::int #t68 in #t67)
-        #t66.{core::List::add}(#t68);
-  } =>#t66;
+    final core::List<core::int> #t73 = <core::int>[];
+    final dynamic #t74 = null;
+    if(!#t74.{core::Object::==}(null))
+      for (final core::int #t75 in #t74)
+        #t73.{core::List::add}(#t75);
+  } =>#t73;
   core::Set<core::int> set80 = block {
-    final core::Set<core::int> #t69 = col::LinkedHashSet::•<core::int>();
-    final dynamic #t70 = null;
-    if(!#t70.{core::Object::==}(null))
-      for (final core::int #t71 in #t70)
-        #t69.{core::Set::add}(#t71);
-  } =>#t69;
-  core::Set<dynamic> set81ambiguous = block {
-    final core::Set<dynamic> #t72 = col::LinkedHashSet::•<dynamic>();
-    final dynamic #t73 = null;
-    if(!#t73.{core::Object::==}(null))
-      for (final dynamic #t74 in #t73)
-        #t72.{core::Set::add}(#t74);
-    for (final dynamic #t75 in <dynamic>[])
-      #t72.{core::Set::add}(#t75);
-  } =>#t72;
-  core::Map<core::String, core::int> map80 = block {
-    final core::Map<core::String, core::int> #t76 = <core::String, core::int>{};
-    final core::Map<dynamic, dynamic> #t77 = null;
+    final core::Set<core::int> #t76 = col::LinkedHashSet::•<core::int>();
+    final dynamic #t77 = null;
     if(!#t77.{core::Object::==}(null))
-      for (final core::MapEntry<core::String, core::int> #t78 in #t77.{core::Map::entries})
-        #t76.{core::Map::[]=}(#t78.{core::MapEntry::key}, #t78.{core::MapEntry::value});
+      for (final core::int #t78 in #t77)
+        #t76.{core::Set::add}(#t78);
   } =>#t76;
+  core::Set<dynamic> set81ambiguous = block {
+    final core::Set<dynamic> #t79 = col::LinkedHashSet::•<dynamic>();
+    final dynamic #t80 = null;
+    if(!#t80.{core::Object::==}(null))
+      for (final dynamic #t81 in #t80) {
+        final dynamic #t82 = #t81 as{TypeError} dynamic;
+        #t79.{core::Set::add}(#t82);
+      }
+    for (final dynamic #t83 in <dynamic>[]) {
+      final dynamic #t84 = #t83 as{TypeError} dynamic;
+      #t79.{core::Set::add}(#t84);
+    }
+  } =>#t79;
+  core::Map<core::String, core::int> map80 = block {
+    final core::Map<core::String, core::int> #t85 = <core::String, core::int>{};
+    final core::Map<dynamic, dynamic> #t86 = null;
+    if(!#t86.{core::Object::==}(null))
+      for (final core::MapEntry<core::String, core::int> #t87 in #t86.{core::Map::entries})
+        #t85.{core::Map::[]=}(#t87.{core::MapEntry::key}, #t87.{core::MapEntry::value});
+  } =>#t85;
+  core::Map<core::String, core::int> map90 = block {
+    final core::Map<core::String, core::int> #t88 = <core::String, core::int>{};
+    for (final core::MapEntry<core::String, core::int> #t89 in self::bar<core::String, core::int>().{core::Map::entries})
+      #t88.{core::Map::[]=}(#t89.{core::MapEntry::key}, #t89.{core::MapEntry::value});
+  } =>#t88;
+  core::List<core::int> list100 = block {
+    final core::List<core::int> #t90 = <core::int>[];
+    for (final dynamic #t91 in listNum) {
+      final core::int #t92 = #t91 as{TypeError} core::int;
+      #t90.{core::List::add}(#t92);
+    }
+  } =>#t90;
+  core::Map<core::num, core::int> map100 = block {
+    final core::Map<core::num, core::int> #t93 = <core::num, core::int>{};
+    for (final core::MapEntry<dynamic, dynamic> #t94 in mapIntNum.{core::Map::entries}) {
+      final core::num #t95 = #t94.{core::MapEntry::key} as{TypeError} core::num;
+      final core::int #t96 = #t94.{core::MapEntry::value} as{TypeError} core::int;
+      #t93.{core::Map::[]=}(#t95, #t96);
+    }
+  } =>#t93;
+  core::List<core::int> list110 = block {
+    final core::List<core::int> #t97 = <core::int>[];
+    for (final dynamic #t98 in dynVar as{TypeError} core::Iterable<dynamic>) {
+      final core::int #t99 = #t98 as{TypeError} core::int;
+      #t97.{core::List::add}(#t99);
+    }
+  } =>#t97;
+  core::Map<core::num, core::int> map110 = block {
+    final core::Map<core::num, core::int> #t100 = <core::num, core::int>{};
+    for (final core::MapEntry<dynamic, dynamic> #t101 in (dynVar as{TypeError} core::Map<dynamic, dynamic>).{core::Map::entries}) {
+      final core::num #t102 = #t101.{core::MapEntry::key} as{TypeError} core::num;
+      final core::int #t103 = #t101.{core::MapEntry::value} as{TypeError} core::int;
+      #t100.{core::Map::[]=}(#t102, #t103);
+    }
+  } =>#t100;
 }
 static method main() → dynamic {}
diff --git a/pkg/front_end/testcases/spread_collection_inference.dart.strong.transformed.expect b/pkg/front_end/testcases/spread_collection_inference.dart.strong.transformed.expect
index d9fbaef..3262225 100644
--- a/pkg/front_end/testcases/spread_collection_inference.dart.strong.transformed.expect
+++ b/pkg/front_end/testcases/spread_collection_inference.dart.strong.transformed.expect
@@ -2,104 +2,112 @@
 //
 // Problems in library:
 //
-// pkg/front_end/testcases/spread_collection_inference.dart:48:76: Error: Not enough type information to disambiguate between literal set and literal map.
+// pkg/front_end/testcases/spread_collection_inference.dart:53:28: Error: Not enough type information to disambiguate between literal set and literal map.
 // Try providing type arguments for the literal explicitly to disambiguate it.
-//   dynamic map21ambiguous = /*@error=CantDisambiguateNotEnoughInformation*/ {...
-//                                                                            ^
+//   dynamic map21ambiguous = {...
+//                            ^
 //
-// pkg/front_end/testcases/spread_collection_inference.dart:72:76: Error: Both Iterable and Map spread elements encountered in ambiguous literal.
-//   dynamic map24ambiguous = /*@error=CantDisambiguateAmbiguousInformation*/ {...
-//                                                                            ^
-// pkg/front_end/testcases/spread_collection_inference.dart:73:5: Context: Iterable spread.
-//     spread, ...mapSpread};
-//     ^
-// pkg/front_end/testcases/spread_collection_inference.dart:73:16: Context: Map spread.
-//     spread, ...mapSpread};
-//                ^
+// pkg/front_end/testcases/spread_collection_inference.dart:77:28: Error: Both Iterable and Map spread elements encountered in ambiguous literal.
+//   dynamic map24ambiguous = {...
+//                            ^
 //
-// pkg/front_end/testcases/spread_collection_inference.dart:75:62: Error: A value of type 'List<int>' can't be assigned to a variable of type 'int'.
+// pkg/front_end/testcases/spread_collection_inference.dart:80:33: Error: A value of type 'List<int>' can't be assigned to a variable of type 'int'.
 //  - 'List' is from 'dart:core'.
 // Try changing the type of the left hand side, or casting the right hand side to 'int'.
-//   int lhs30 = /*@error=InvalidAssignment*/ /*@typeArgs=int*/ [...spread];
-//                                                              ^
+//   int lhs30 = /*@typeArgs=int*/ [...spread];
+//                                 ^
 //
-// pkg/front_end/testcases/spread_collection_inference.dart:77:62: Error: A value of type 'Set<int>' can't be assigned to a variable of type 'int'.
+// pkg/front_end/testcases/spread_collection_inference.dart:82:33: Error: A value of type 'Set<int>' can't be assigned to a variable of type 'int'.
 //  - 'Set' is from 'dart:core'.
 // Try changing the type of the left hand side, or casting the right hand side to 'int'.
-//   int set30 = /*@error=InvalidAssignment*/ /*@typeArgs=int*/ {...spread, 42};
-//                                                              ^
+//   int set30 = /*@typeArgs=int*/ {...spread, 42};
+//                                 ^
 //
-// pkg/front_end/testcases/spread_collection_inference.dart:80:5: Error: A value of type 'Set<int>' can't be assigned to a variable of type 'int'.
+// pkg/front_end/testcases/spread_collection_inference.dart:85:5: Error: A value of type 'Set<int>' can't be assigned to a variable of type 'int'.
 //  - 'Set' is from 'dart:core'.
 // Try changing the type of the left hand side, or casting the right hand side to 'int'.
 //     {...spread};
 //     ^
 //
-// pkg/front_end/testcases/spread_collection_inference.dart:83:5: Error: A value of type 'Map<String, int>' can't be assigned to a variable of type 'int'.
+// pkg/front_end/testcases/spread_collection_inference.dart:88:5: Error: A value of type 'Map<String, int>' can't be assigned to a variable of type 'int'.
 //  - 'Map' is from 'dart:core'.
 // Try changing the type of the left hand side, or casting the right hand side to 'int'.
 //     {...mapSpread, "baz": 42};
 //     ^
 //
-// pkg/front_end/testcases/spread_collection_inference.dart:86:5: Error: A value of type 'Map<String, int>' can't be assigned to a variable of type 'int'.
+// pkg/front_end/testcases/spread_collection_inference.dart:91:5: Error: A value of type 'Map<String, int>' can't be assigned to a variable of type 'int'.
 //  - 'Map' is from 'dart:core'.
 // Try changing the type of the left hand side, or casting the right hand side to 'int'.
 //     {...mapSpread};
 //     ^
 //
-// pkg/front_end/testcases/spread_collection_inference.dart:89:5: Error: Unexpected type 'int' of a spread.  Expected 'dynamic' or an Iterable.
+// pkg/front_end/testcases/spread_collection_inference.dart:94:5: Error: Unexpected type 'int' of a spread.  Expected 'dynamic' or an Iterable.
 //     notSpreadInt];
 //     ^
 //
-// pkg/front_end/testcases/spread_collection_inference.dart:92:5: Error: Unexpected type 'int' of a spread.  Expected 'dynamic' or an Iterable.
+// pkg/front_end/testcases/spread_collection_inference.dart:97:5: Error: Unexpected type 'int' of a spread.  Expected 'dynamic' or an Iterable.
 //     notSpreadInt};
 //     ^
 //
-// pkg/front_end/testcases/spread_collection_inference.dart:95:43: Error: Unexpected type 'int' of a map spread entry.  Expected 'dynamic' or a Map.
-//     /*@error=SpreadMapEntryTypeMismatch*/ notSpreadInt};
-//                                           ^
+// pkg/front_end/testcases/spread_collection_inference.dart:100:2: Error: Unexpected type 'int' of a map spread entry.  Expected 'dynamic' or a Map.
+//  notSpreadInt};
+//  ^
 //
-// pkg/front_end/testcases/spread_collection_inference.dart:98:5: Error: Unexpected type 'int Function()' of a spread.  Expected 'dynamic' or an Iterable.
+// pkg/front_end/testcases/spread_collection_inference.dart:103:5: Error: Unexpected type 'int Function()' of a spread.  Expected 'dynamic' or an Iterable.
 //     notSpreadFunction];
 //     ^
 //
-// pkg/front_end/testcases/spread_collection_inference.dart:101:5: Error: Unexpected type 'int Function()' of a spread.  Expected 'dynamic' or an Iterable.
+// pkg/front_end/testcases/spread_collection_inference.dart:106:5: Error: Unexpected type 'int Function()' of a spread.  Expected 'dynamic' or an Iterable.
 //     notSpreadFunction};
 //     ^
 //
-// pkg/front_end/testcases/spread_collection_inference.dart:104:43: Error: Unexpected type 'int Function()' of a map spread entry.  Expected 'dynamic' or a Map.
-//     /*@error=SpreadMapEntryTypeMismatch*/ notSpreadFunction};
-//                                           ^
+// pkg/front_end/testcases/spread_collection_inference.dart:109:2: Error: Unexpected type 'int Function()' of a map spread entry.  Expected 'dynamic' or a Map.
+//  notSpreadFunction};
+//  ^
 //
-// pkg/front_end/testcases/spread_collection_inference.dart:107:5: Error: Can't assign spread elements of type 'int' to collection elements of type 'String'.
+// pkg/front_end/testcases/spread_collection_inference.dart:112:5: Error: Can't assign spread elements of type 'int' to collection elements of type 'String'.
 //     spread];
 //     ^
 //
-// pkg/front_end/testcases/spread_collection_inference.dart:109:73: Error: Can't assign spread elements of type 'int' to collection elements of type 'String'.
-//   Set<String> set60 = <String>{... /*@error=SpreadElementTypeMismatch*/ spread};
-//                                                                         ^
+// pkg/front_end/testcases/spread_collection_inference.dart:112:5: Error: A value of type 'int' can't be assigned to a variable of type 'String'.
+// Try changing the type of the left hand side, or casting the right hand side to 'String'.
+//     spread];
+//     ^
 //
-// pkg/front_end/testcases/spread_collection_inference.dart:112:53: Error: Can't assign spread entry keys of type 'String' to map entry keys of type 'int'.
-//     /*@error=SpreadMapEntryElementKeyTypeMismatch*/ mapSpread};
-//                                                     ^
+// pkg/front_end/testcases/spread_collection_inference.dart:114:36: Error: Can't assign spread elements of type 'int' to collection elements of type 'String'.
+//   Set<String> set60 = <String>{... spread};
+//                                    ^
 //
-// pkg/front_end/testcases/spread_collection_inference.dart:115:55: Error: Can't assign spread entry values of type 'int' to map entry values of type 'String'.
-//     /*@error=SpreadMapEntryElementValueTypeMismatch*/ mapSpread};
-//                                                       ^
+// pkg/front_end/testcases/spread_collection_inference.dart:114:36: Error: A value of type 'int' can't be assigned to a variable of type 'String'.
+// Try changing the type of the left hand side, or casting the right hand side to 'String'.
+//   Set<String> set60 = <String>{... spread};
+//                                    ^
 //
-// pkg/front_end/testcases/spread_collection_inference.dart:117:67: Error: Can't spread a value with static type Null.
-//   List<int> lhs70 = <int>[... /*@error=NonNullAwareSpreadIsNull*/ null];
-//                                                                   ^
+// pkg/front_end/testcases/spread_collection_inference.dart:117:2: Error: Can't assign spread entry keys of type 'String' to map entry keys of type 'int'.
+//  mapSpread};
+//  ^
 //
-// pkg/front_end/testcases/spread_collection_inference.dart:119:66: Error: Can't spread a value with static type Null.
-//   Set<int> set70 = <int>{... /*@error=NonNullAwareSpreadIsNull*/ null};
-//                                                                  ^
+// pkg/front_end/testcases/spread_collection_inference.dart:120:2: Error: Can't assign spread entry values of type 'int' to map entry values of type 'String'.
+//  mapSpread};
+//  ^
 //
-// pkg/front_end/testcases/spread_collection_inference.dart:122:46: Error: Can't spread a value with static type Null.
-//     {... /*@error=NonNullAwareSpreadIsNull*/ null, ... /*@typeArgs=dynamic*/
-//                                              ^
+// pkg/front_end/testcases/spread_collection_inference.dart:122:31: Error: Can't spread a value with static type Null.
+//   List<int> lhs70 = <int>[... null];
+//                               ^
 //
-// pkg/front_end/testcases/spread_collection_inference.dart:126:5: Error: Can't spread a value with static type Null.
+// pkg/front_end/testcases/spread_collection_inference.dart:124:30: Error: Can't spread a value with static type Null.
+//   Set<int> set70 = <int>{... null};
+//                              ^
+//
+// pkg/front_end/testcases/spread_collection_inference.dart:127:10: Error: Can't spread a value with static type Null.
+//     {... null, ... /*@typeArgs=dynamic*/
+//          ^
+//
+// pkg/front_end/testcases/spread_collection_inference.dart:127:10: Error: Expected ',' before this.
+//     {... null, ... /*@typeArgs=dynamic*/
+//          ^
+//
+// pkg/front_end/testcases/spread_collection_inference.dart:131:5: Error: Can't spread a value with static type Null.
 //     null};
 //     ^
 //
@@ -107,11 +115,15 @@
 import "dart:core" as core;
 import "dart:collection" as col;
 
-static method foo() → dynamic {
+static method bar<K extends core::Object = dynamic, V extends core::Object = dynamic>() → core::Map<self::bar::K, self::bar::V>
+  return null;
+static method foo(dynamic dynVar) → dynamic {
   core::List<core::int> spread = <core::int>[1, 2, 3];
   core::Map<core::String, core::int> mapSpread = <core::String, core::int>{"foo": 4, "bar": 2};
   core::int notSpreadInt = 42;
   () → core::int notSpreadFunction = null;
+  core::Map<core::int, core::num> mapIntNum = <core::int, core::num>{42: 42};
+  core::List<core::num> listNum = <core::num>[42];
   core::List<dynamic> lhs10 = block {
     final core::List<dynamic> #t1 = <dynamic>[];
     for (final dynamic #t2 in <dynamic>[])
@@ -145,209 +157,264 @@
   } =>#t11;
   core::Set<core::int> set20ambiguous = block {
     final core::Set<core::int> #t13 = col::LinkedHashSet::•<core::int>();
-    for (final core::int #t14 in spread)
-      #t13.{core::Set::add}(#t14);
+    for (final dynamic #t14 in spread) {
+      final core::int #t15 = #t14 as{TypeError} core::int;
+      #t13.{core::Set::add}(#t15);
+    }
   } =>#t13;
   core::Map<core::String, core::int> map20 = block {
-    final core::Map<core::String, core::int> #t15 = <core::String, core::int>{};
-    for (final core::MapEntry<core::String, core::int> #t16 in mapSpread.{core::Map::entries})
-      #t15.{core::Map::[]=}(#t16.{core::MapEntry::key}, #t16.{core::MapEntry::value});
-    #t15.{core::Map::[]=}("baz", 42);
-  } =>#t15;
+    final core::Map<core::String, core::int> #t16 = <core::String, core::int>{};
+    for (final core::MapEntry<core::String, core::int> #t17 in mapSpread.{core::Map::entries})
+      #t16.{core::Map::[]=}(#t17.{core::MapEntry::key}, #t17.{core::MapEntry::value});
+    #t16.{core::Map::[]=}("baz", 42);
+  } =>#t16;
   core::Map<core::String, core::int> map20ambiguous = block {
-    final core::Map<core::String, core::int> #t17 = <core::String, core::int>{};
-    for (final core::MapEntry<core::String, core::int> #t18 in mapSpread.{core::Map::entries})
-      #t17.{core::Map::[]=}(#t18.{core::MapEntry::key}, #t18.{core::MapEntry::value});
-  } =>#t17;
+    final core::Map<core::String, core::int> #t18 = <core::String, core::int>{};
+    for (final core::MapEntry<core::String, core::int> #t19 in mapSpread.{core::Map::entries})
+      #t18.{core::Map::[]=}(#t19.{core::MapEntry::key}, #t19.{core::MapEntry::value});
+  } =>#t18;
   core::List<dynamic> lhs21 = block {
-    final core::List<dynamic> #t19 = <dynamic>[];
-    for (final dynamic #t20 in (spread as dynamic) as{TypeError} core::Iterable<dynamic>)
-      #t19.{core::List::add}(#t20);
-  } =>#t19;
+    final core::List<dynamic> #t20 = <dynamic>[];
+    for (final dynamic #t21 in (spread as dynamic) as{TypeError} core::Iterable<dynamic>)
+      #t20.{core::List::add}(#t21);
+  } =>#t20;
   core::Set<dynamic> set21 = block {
-    final core::Set<dynamic> #t21 = col::LinkedHashSet::•<dynamic>();
-    for (final dynamic #t22 in (spread as dynamic) as{TypeError} core::Iterable<dynamic>)
-      #t21.{core::Set::add}(#t22);
-    #t21.{core::Set::add}(42);
-  } =>#t21;
+    final core::Set<dynamic> #t22 = col::LinkedHashSet::•<dynamic>();
+    for (final dynamic #t23 in (spread as dynamic) as{TypeError} core::Iterable<dynamic>)
+      #t22.{core::Set::add}(#t23);
+    #t22.{core::Set::add}(42);
+  } =>#t22;
   core::Map<dynamic, dynamic> map21 = block {
-    final core::Map<dynamic, dynamic> #t23 = <dynamic, dynamic>{};
-    for (final core::MapEntry<dynamic, dynamic> #t24 in ((mapSpread as dynamic) as{TypeError} core::Map<dynamic, dynamic>).{core::Map::entries})
-      #t23.{core::Map::[]=}(#t24.{core::MapEntry::key}, #t24.{core::MapEntry::value});
-    #t23.{core::Map::[]=}("baz", 42);
-  } =>#t23;
-  dynamic map21ambiguous = invalid-expression "pkg/front_end/testcases/spread_collection_inference.dart:48:76: Error: Not enough type information to disambiguate between literal set and literal map.
+    final core::Map<dynamic, dynamic> #t24 = <dynamic, dynamic>{};
+    for (final core::MapEntry<dynamic, dynamic> #t25 in ((mapSpread as dynamic) as{TypeError} core::Map<dynamic, dynamic>).{core::Map::entries})
+      #t24.{core::Map::[]=}(#t25.{core::MapEntry::key}, #t25.{core::MapEntry::value});
+    #t24.{core::Map::[]=}("baz", 42);
+  } =>#t24;
+  dynamic map21ambiguous = invalid-expression "pkg/front_end/testcases/spread_collection_inference.dart:53:28: Error: Not enough type information to disambiguate between literal set and literal map.
 Try providing type arguments for the literal explicitly to disambiguate it.
-  dynamic map21ambiguous = /*@error=CantDisambiguateNotEnoughInformation*/ {...
-                                                                           ^";
+  dynamic map21ambiguous = {...
+                           ^";
   core::List<core::int> lhs22 = block {
-    final core::List<core::int> #t25 = <core::int>[];
-    for (final core::int #t26 in <core::int>[])
-      #t25.{core::List::add}(#t26);
-  } =>#t25;
+    final core::List<core::int> #t26 = <core::int>[];
+    for (final core::int #t27 in <core::int>[])
+      #t26.{core::List::add}(#t27);
+  } =>#t26;
   core::Set<core::int> set22 = block {
-    final core::Set<core::int> #t27 = col::LinkedHashSet::•<core::int>();
-    for (final core::int #t28 in <core::int>[])
-      #t27.{core::Set::add}(#t28);
-    #t27.{core::Set::add}(42);
-  } =>#t27;
+    final core::Set<core::int> #t28 = col::LinkedHashSet::•<core::int>();
+    for (final core::int #t29 in <core::int>[])
+      #t28.{core::Set::add}(#t29);
+    #t28.{core::Set::add}(42);
+  } =>#t28;
   core::Set<core::int> set22ambiguous = block {
-    final core::Set<core::int> #t29 = col::LinkedHashSet::•<core::int>();
-    for (final core::int #t30 in <core::int>[])
-      #t29.{core::Set::add}(#t30);
-  } =>#t29;
+    final core::Set<core::int> #t30 = col::LinkedHashSet::•<core::int>();
+    for (final dynamic #t31 in <core::int>[]) {
+      final core::int #t32 = #t31 as{TypeError} core::int;
+      #t30.{core::Set::add}(#t32);
+    }
+  } =>#t30;
   core::Map<core::String, core::int> map22 = block {
-    final core::Map<core::String, core::int> #t31 = <core::String, core::int>{};
-    for (final core::MapEntry<core::String, core::int> #t32 in <core::String, core::int>{}.{core::Map::entries})
-      #t31.{core::Map::[]=}(#t32.{core::MapEntry::key}, #t32.{core::MapEntry::value});
-  } =>#t31;
-  core::List<core::List<core::int>> lhs23 = block {
-    final core::List<core::List<core::int>> #t33 = <core::List<core::int>>[];
-    for (final core::List<core::int> #t34 in <core::List<core::int>>[<core::int>[]])
-      #t33.{core::List::add}(#t34);
+    final core::Map<core::String, core::int> #t33 = <core::String, core::int>{};
+    for (final core::MapEntry<core::String, core::int> #t34 in <core::String, core::int>{}.{core::Map::entries})
+      #t33.{core::Map::[]=}(#t34.{core::MapEntry::key}, #t34.{core::MapEntry::value});
   } =>#t33;
-  core::Set<core::List<core::int>> set23 = block {
-    final core::Set<core::List<core::int>> #t35 = col::LinkedHashSet::•<core::List<core::int>>();
+  core::List<core::List<core::int>> lhs23 = block {
+    final core::List<core::List<core::int>> #t35 = <core::List<core::int>>[];
     for (final core::List<core::int> #t36 in <core::List<core::int>>[<core::int>[]])
-      #t35.{core::Set::add}(#t36);
-    #t35.{core::Set::add}(<core::int>[42]);
+      #t35.{core::List::add}(#t36);
   } =>#t35;
-  core::Set<core::List<core::int>> set23ambiguous = block {
+  core::Set<core::List<core::int>> set23 = block {
     final core::Set<core::List<core::int>> #t37 = col::LinkedHashSet::•<core::List<core::int>>();
     for (final core::List<core::int> #t38 in <core::List<core::int>>[<core::int>[]])
       #t37.{core::Set::add}(#t38);
+    #t37.{core::Set::add}(<core::int>[42]);
   } =>#t37;
-  core::Map<core::String, core::List<core::int>> map23 = block {
-    final core::Map<core::String, core::List<core::int>> #t39 = <core::String, core::List<core::int>>{};
-    for (final core::MapEntry<core::String, core::List<core::int>> #t40 in <core::String, core::List<core::int>>{"baz": <core::int>[]}.{core::Map::entries})
-      #t39.{core::Map::[]=}(#t40.{core::MapEntry::key}, #t40.{core::MapEntry::value});
+  core::Set<core::List<core::int>> set23ambiguous = block {
+    final core::Set<core::List<core::int>> #t39 = col::LinkedHashSet::•<core::List<core::int>>();
+    for (final dynamic #t40 in <core::List<core::int>>[<core::int>[]]) {
+      final core::List<core::int> #t41 = #t40 as{TypeError} core::List<core::int>;
+      #t39.{core::Set::add}(#t41);
+    }
   } =>#t39;
-  dynamic map24ambiguous = invalid-expression "pkg/front_end/testcases/spread_collection_inference.dart:72:76: Error: Both Iterable and Map spread elements encountered in ambiguous literal.
-  dynamic map24ambiguous = /*@error=CantDisambiguateAmbiguousInformation*/ {...
-                                                                           ^";
-  core::int lhs30 = let final<BottomType> #t41 = invalid-expression "pkg/front_end/testcases/spread_collection_inference.dart:75:62: Error: A value of type 'List<int>' can't be assigned to a variable of type 'int'.
+  core::Map<core::String, core::List<core::int>> map23 = block {
+    final core::Map<core::String, core::List<core::int>> #t42 = <core::String, core::List<core::int>>{};
+    for (final core::MapEntry<core::String, core::List<core::int>> #t43 in <core::String, core::List<core::int>>{"baz": <core::int>[]}.{core::Map::entries})
+      #t42.{core::Map::[]=}(#t43.{core::MapEntry::key}, #t43.{core::MapEntry::value});
+  } =>#t42;
+  dynamic map24ambiguous = invalid-expression "pkg/front_end/testcases/spread_collection_inference.dart:77:28: Error: Both Iterable and Map spread elements encountered in ambiguous literal.
+  dynamic map24ambiguous = {...
+                           ^";
+  core::int lhs30 = let final<BottomType> #t44 = invalid-expression "pkg/front_end/testcases/spread_collection_inference.dart:80:33: Error: A value of type 'List<int>' can't be assigned to a variable of type 'int'.
  - 'List' is from 'dart:core'.
 Try changing the type of the left hand side, or casting the right hand side to 'int'.
-  int lhs30 = /*@error=InvalidAssignment*/ /*@typeArgs=int*/ [...spread];
-                                                             ^" in ( block {
-    final core::List<core::int> #t42 = <core::int>[];
-    for (final core::int #t43 in spread)
-      #t42.{core::List::add}(#t43);
-  } =>#t42) as{TypeError} core::int;
-  core::int set30 = let final<BottomType> #t44 = invalid-expression "pkg/front_end/testcases/spread_collection_inference.dart:77:62: Error: A value of type 'Set<int>' can't be assigned to a variable of type 'int'.
+  int lhs30 = /*@typeArgs=int*/ [...spread];
+                                ^" in ( block {
+    final core::List<core::int> #t45 = <core::int>[];
+    for (final core::int #t46 in spread)
+      #t45.{core::List::add}(#t46);
+  } =>#t45) as{TypeError} core::int;
+  core::int set30 = let final<BottomType> #t47 = invalid-expression "pkg/front_end/testcases/spread_collection_inference.dart:82:33: Error: A value of type 'Set<int>' can't be assigned to a variable of type 'int'.
  - 'Set' is from 'dart:core'.
 Try changing the type of the left hand side, or casting the right hand side to 'int'.
-  int set30 = /*@error=InvalidAssignment*/ /*@typeArgs=int*/ {...spread, 42};
-                                                             ^" in ( block {
-    final core::Set<core::int> #t45 = col::LinkedHashSet::•<core::int>();
-    for (final core::int #t46 in spread)
-      #t45.{core::Set::add}(#t46);
-    #t45.{core::Set::add}(42);
-  } =>#t45) as{TypeError} core::int;
-  core::int set30ambiguous = let final<BottomType> #t47 = invalid-expression "pkg/front_end/testcases/spread_collection_inference.dart:80:5: Error: A value of type 'Set<int>' can't be assigned to a variable of type 'int'.
+  int set30 = /*@typeArgs=int*/ {...spread, 42};
+                                ^" in ( block {
+    final core::Set<core::int> #t48 = col::LinkedHashSet::•<core::int>();
+    for (final core::int #t49 in spread)
+      #t48.{core::Set::add}(#t49);
+    #t48.{core::Set::add}(42);
+  } =>#t48) as{TypeError} core::int;
+  core::int set30ambiguous = let final<BottomType> #t50 = invalid-expression "pkg/front_end/testcases/spread_collection_inference.dart:85:5: Error: A value of type 'Set<int>' can't be assigned to a variable of type 'int'.
  - 'Set' is from 'dart:core'.
 Try changing the type of the left hand side, or casting the right hand side to 'int'.
     {...spread};
     ^" in ( block {
-    final core::Set<core::int> #t48 = col::LinkedHashSet::•<core::int>();
-    for (final core::int #t49 in spread)
-      #t48.{core::Set::add}(#t49);
-  } =>#t48) as{TypeError} core::int;
-  core::int map30 = let final<BottomType> #t50 = invalid-expression "pkg/front_end/testcases/spread_collection_inference.dart:83:5: Error: A value of type 'Map<String, int>' can't be assigned to a variable of type 'int'.
+    final core::Set<core::int> #t51 = col::LinkedHashSet::•<core::int>();
+    for (final dynamic #t52 in spread) {
+      final core::int #t53 = #t52 as{TypeError} core::int;
+      #t51.{core::Set::add}(#t53);
+    }
+  } =>#t51) as{TypeError} core::int;
+  core::int map30 = let final<BottomType> #t54 = invalid-expression "pkg/front_end/testcases/spread_collection_inference.dart:88:5: Error: A value of type 'Map<String, int>' can't be assigned to a variable of type 'int'.
  - 'Map' is from 'dart:core'.
 Try changing the type of the left hand side, or casting the right hand side to 'int'.
     {...mapSpread, \"baz\": 42};
     ^" in ( block {
-    final core::Map<core::String, core::int> #t51 = <core::String, core::int>{};
-    for (final core::MapEntry<core::String, core::int> #t52 in mapSpread.{core::Map::entries})
-      #t51.{core::Map::[]=}(#t52.{core::MapEntry::key}, #t52.{core::MapEntry::value});
-    #t51.{core::Map::[]=}("baz", 42);
-  } =>#t51) as{TypeError} core::int;
-  core::int map30ambiguous = let final<BottomType> #t53 = invalid-expression "pkg/front_end/testcases/spread_collection_inference.dart:86:5: Error: A value of type 'Map<String, int>' can't be assigned to a variable of type 'int'.
+    final core::Map<core::String, core::int> #t55 = <core::String, core::int>{};
+    for (final core::MapEntry<core::String, core::int> #t56 in mapSpread.{core::Map::entries})
+      #t55.{core::Map::[]=}(#t56.{core::MapEntry::key}, #t56.{core::MapEntry::value});
+    #t55.{core::Map::[]=}("baz", 42);
+  } =>#t55) as{TypeError} core::int;
+  core::int map30ambiguous = let final<BottomType> #t57 = invalid-expression "pkg/front_end/testcases/spread_collection_inference.dart:91:5: Error: A value of type 'Map<String, int>' can't be assigned to a variable of type 'int'.
  - 'Map' is from 'dart:core'.
 Try changing the type of the left hand side, or casting the right hand side to 'int'.
     {...mapSpread};
     ^" in ( block {
-    final core::Map<core::String, core::int> #t54 = <core::String, core::int>{};
-    for (final core::MapEntry<core::String, core::int> #t55 in mapSpread.{core::Map::entries})
-      #t54.{core::Map::[]=}(#t55.{core::MapEntry::key}, #t55.{core::MapEntry::value});
-  } =>#t54) as{TypeError} core::int;
-  core::List<dynamic> lhs40 = <dynamic>[invalid-expression "pkg/front_end/testcases/spread_collection_inference.dart:89:5: Error: Unexpected type 'int' of a spread.  Expected 'dynamic' or an Iterable.
+    final core::Map<core::String, core::int> #t58 = <core::String, core::int>{};
+    for (final core::MapEntry<core::String, core::int> #t59 in mapSpread.{core::Map::entries})
+      #t58.{core::Map::[]=}(#t59.{core::MapEntry::key}, #t59.{core::MapEntry::value});
+  } =>#t58) as{TypeError} core::int;
+  core::List<dynamic> lhs40 = <dynamic>[invalid-expression "pkg/front_end/testcases/spread_collection_inference.dart:94:5: Error: Unexpected type 'int' of a spread.  Expected 'dynamic' or an Iterable.
     notSpreadInt];
     ^"];
-  core::Set<dynamic> set40 = let final core::Set<dynamic> #t56 = col::LinkedHashSet::•<dynamic>() in let final core::bool #t57 = #t56.{core::Set::add}(invalid-expression "pkg/front_end/testcases/spread_collection_inference.dart:92:5: Error: Unexpected type 'int' of a spread.  Expected 'dynamic' or an Iterable.
+  core::Set<dynamic> set40 = let final core::Set<dynamic> #t60 = col::LinkedHashSet::•<dynamic>() in let final core::bool #t61 = #t60.{core::Set::add}(invalid-expression "pkg/front_end/testcases/spread_collection_inference.dart:97:5: Error: Unexpected type 'int' of a spread.  Expected 'dynamic' or an Iterable.
     notSpreadInt};
-    ^") in #t56;
-  core::Map<dynamic, dynamic> map40 = <dynamic, dynamic>{invalid-expression "pkg/front_end/testcases/spread_collection_inference.dart:95:43: Error: Unexpected type 'int' of a map spread entry.  Expected 'dynamic' or a Map.
-    /*@error=SpreadMapEntryTypeMismatch*/ notSpreadInt};
-                                          ^": null};
-  core::List<dynamic> lhs50 = <dynamic>[invalid-expression "pkg/front_end/testcases/spread_collection_inference.dart:98:5: Error: Unexpected type 'int Function()' of a spread.  Expected 'dynamic' or an Iterable.
+    ^") in #t60;
+  core::Map<dynamic, dynamic> map40 = <dynamic, dynamic>{invalid-expression "pkg/front_end/testcases/spread_collection_inference.dart:100:2: Error: Unexpected type 'int' of a map spread entry.  Expected 'dynamic' or a Map.
+ notSpreadInt};
+ ^": null};
+  core::List<dynamic> lhs50 = <dynamic>[invalid-expression "pkg/front_end/testcases/spread_collection_inference.dart:103:5: Error: Unexpected type 'int Function()' of a spread.  Expected 'dynamic' or an Iterable.
     notSpreadFunction];
     ^"];
-  core::Set<dynamic> set50 = let final core::Set<dynamic> #t58 = col::LinkedHashSet::•<dynamic>() in let final core::bool #t59 = #t58.{core::Set::add}(invalid-expression "pkg/front_end/testcases/spread_collection_inference.dart:101:5: Error: Unexpected type 'int Function()' of a spread.  Expected 'dynamic' or an Iterable.
+  core::Set<dynamic> set50 = let final core::Set<dynamic> #t62 = col::LinkedHashSet::•<dynamic>() in let final core::bool #t63 = #t62.{core::Set::add}(invalid-expression "pkg/front_end/testcases/spread_collection_inference.dart:106:5: Error: Unexpected type 'int Function()' of a spread.  Expected 'dynamic' or an Iterable.
     notSpreadFunction};
-    ^") in #t58;
-  core::Map<dynamic, dynamic> map50 = <dynamic, dynamic>{invalid-expression "pkg/front_end/testcases/spread_collection_inference.dart:104:43: Error: Unexpected type 'int Function()' of a map spread entry.  Expected 'dynamic' or a Map.
-    /*@error=SpreadMapEntryTypeMismatch*/ notSpreadFunction};
-                                          ^": null};
-  core::List<core::String> lhs60 = <core::String>[invalid-expression "pkg/front_end/testcases/spread_collection_inference.dart:107:5: Error: Can't assign spread elements of type 'int' to collection elements of type 'String'.
+    ^") in #t62;
+  core::Map<dynamic, dynamic> map50 = <dynamic, dynamic>{invalid-expression "pkg/front_end/testcases/spread_collection_inference.dart:109:2: Error: Unexpected type 'int Function()' of a map spread entry.  Expected 'dynamic' or a Map.
+ notSpreadFunction};
+ ^": null};
+  core::List<core::String> lhs60 = <core::String>[let final<BottomType> #t64 = invalid-expression "pkg/front_end/testcases/spread_collection_inference.dart:112:5: Error: A value of type 'int' can't be assigned to a variable of type 'String'.
+Try changing the type of the left hand side, or casting the right hand side to 'String'.
     spread];
-    ^"];
-  core::Set<core::String> set60 = let final core::Set<core::String> #t60 = col::LinkedHashSet::•<core::String>() in let final core::bool #t61 = #t60.{core::Set::add}(invalid-expression "pkg/front_end/testcases/spread_collection_inference.dart:109:73: Error: Can't assign spread elements of type 'int' to collection elements of type 'String'.
-  Set<String> set60 = <String>{... /*@error=SpreadElementTypeMismatch*/ spread};
-                                                                        ^") in #t60;
-  core::Map<core::int, core::int> map60 = <core::int, core::int>{invalid-expression "pkg/front_end/testcases/spread_collection_inference.dart:112:53: Error: Can't assign spread entry keys of type 'String' to map entry keys of type 'int'.
-    /*@error=SpreadMapEntryElementKeyTypeMismatch*/ mapSpread};
-                                                    ^": null};
-  core::Map<core::String, core::String> map61 = <core::String, core::String>{null: invalid-expression "pkg/front_end/testcases/spread_collection_inference.dart:115:55: Error: Can't assign spread entry values of type 'int' to map entry values of type 'String'.
-    /*@error=SpreadMapEntryElementValueTypeMismatch*/ mapSpread};
-                                                      ^"};
-  core::List<core::int> lhs70 = <core::int>[invalid-expression "pkg/front_end/testcases/spread_collection_inference.dart:117:67: Error: Can't spread a value with static type Null.
-  List<int> lhs70 = <int>[... /*@error=NonNullAwareSpreadIsNull*/ null];
-                                                                  ^"];
-  core::Set<core::int> set70 = let final core::Set<core::int> #t62 = col::LinkedHashSet::•<core::int>() in let final core::bool #t63 = #t62.{core::Set::add}(invalid-expression "pkg/front_end/testcases/spread_collection_inference.dart:119:66: Error: Can't spread a value with static type Null.
-  Set<int> set70 = <int>{... /*@error=NonNullAwareSpreadIsNull*/ null};
-                                                                 ^") in #t62;
+    ^" in invalid-expression "pkg/front_end/testcases/spread_collection_inference.dart:112:5: Error: Can't assign spread elements of type 'int' to collection elements of type 'String'.
+    spread];
+    ^" as{TypeError} core::String];
+  core::Set<core::String> set60 = let final core::Set<core::String> #t65 = col::LinkedHashSet::•<core::String>() in let final core::bool #t66 = #t65.{core::Set::add}(let final<BottomType> #t67 = invalid-expression "pkg/front_end/testcases/spread_collection_inference.dart:114:36: Error: A value of type 'int' can't be assigned to a variable of type 'String'.
+Try changing the type of the left hand side, or casting the right hand side to 'String'.
+  Set<String> set60 = <String>{... spread};
+                                   ^" in invalid-expression "pkg/front_end/testcases/spread_collection_inference.dart:114:36: Error: Can't assign spread elements of type 'int' to collection elements of type 'String'.
+  Set<String> set60 = <String>{... spread};
+                                   ^" as{TypeError} core::String) in #t65;
+  core::Map<core::int, core::int> map60 = <core::int, core::int>{invalid-expression "pkg/front_end/testcases/spread_collection_inference.dart:117:2: Error: Can't assign spread entry keys of type 'String' to map entry keys of type 'int'.
+ mapSpread};
+ ^": null};
+  core::Map<core::String, core::String> map61 = <core::String, core::String>{null: invalid-expression "pkg/front_end/testcases/spread_collection_inference.dart:120:2: Error: Can't assign spread entry values of type 'int' to map entry values of type 'String'.
+ mapSpread};
+ ^"};
+  core::List<core::int> lhs70 = <core::int>[invalid-expression "pkg/front_end/testcases/spread_collection_inference.dart:122:31: Error: Can't spread a value with static type Null.
+  List<int> lhs70 = <int>[... null];
+                              ^" as{TypeError} core::int];
+  core::Set<core::int> set70 = let final core::Set<core::int> #t68 = col::LinkedHashSet::•<core::int>() in let final core::bool #t69 = #t68.{core::Set::add}(invalid-expression "pkg/front_end/testcases/spread_collection_inference.dart:124:30: Error: Can't spread a value with static type Null.
+  Set<int> set70 = <int>{... null};
+                             ^" as{TypeError} core::int) in #t68;
   core::Set<dynamic> set71ambiguous = block {
-    final core::Set<dynamic> #t64 = col::LinkedHashSet::•<dynamic>();
-    #t64.{core::Set::add}(invalid-expression "pkg/front_end/testcases/spread_collection_inference.dart:122:46: Error: Can't spread a value with static type Null.
-    {... /*@error=NonNullAwareSpreadIsNull*/ null, ... /*@typeArgs=dynamic*/
-                                             ^");
-    for (final dynamic #t65 in <dynamic>[])
-      #t64.{core::Set::add}(#t65);
-  } =>#t64;
-  core::Map<core::String, core::int> map70 = <core::String, core::int>{invalid-expression "pkg/front_end/testcases/spread_collection_inference.dart:126:5: Error: Can't spread a value with static type Null.
+    final core::Set<dynamic> #t70 = col::LinkedHashSet::•<dynamic>();
+    #t70.{core::Set::add}(invalid-expression "pkg/front_end/testcases/spread_collection_inference.dart:127:10: Error: Expected ',' before this.
+    {... null, ... /*@typeArgs=dynamic*/
+         ^");
+    for (final dynamic #t71 in <dynamic>[]) {
+      final dynamic #t72 = #t71 as{TypeError} dynamic;
+      #t70.{core::Set::add}(#t72);
+    }
+  } =>#t70;
+  core::Map<core::String, core::int> map70 = <core::String, core::int>{invalid-expression "pkg/front_end/testcases/spread_collection_inference.dart:131:5: Error: Can't spread a value with static type Null.
     null};
     ^": null};
   core::List<core::int> lhs80 = block {
-    final core::List<core::int> #t66 = <core::int>[];
-    final dynamic #t67 = null;
-    if(!#t67.{core::Object::==}(null))
-      for (final core::int #t68 in #t67)
-        #t66.{core::List::add}(#t68);
-  } =>#t66;
+    final core::List<core::int> #t73 = <core::int>[];
+    final dynamic #t74 = null;
+    if(!#t74.{core::Object::==}(null))
+      for (final core::int #t75 in #t74)
+        #t73.{core::List::add}(#t75);
+  } =>#t73;
   core::Set<core::int> set80 = block {
-    final core::Set<core::int> #t69 = col::LinkedHashSet::•<core::int>();
-    final dynamic #t70 = null;
-    if(!#t70.{core::Object::==}(null))
-      for (final core::int #t71 in #t70)
-        #t69.{core::Set::add}(#t71);
-  } =>#t69;
-  core::Set<dynamic> set81ambiguous = block {
-    final core::Set<dynamic> #t72 = col::LinkedHashSet::•<dynamic>();
-    final dynamic #t73 = null;
-    if(!#t73.{core::Object::==}(null))
-      for (final dynamic #t74 in #t73)
-        #t72.{core::Set::add}(#t74);
-    for (final dynamic #t75 in <dynamic>[])
-      #t72.{core::Set::add}(#t75);
-  } =>#t72;
-  core::Map<core::String, core::int> map80 = block {
-    final core::Map<core::String, core::int> #t76 = <core::String, core::int>{};
-    final core::Map<dynamic, dynamic> #t77 = null;
+    final core::Set<core::int> #t76 = col::LinkedHashSet::•<core::int>();
+    final dynamic #t77 = null;
     if(!#t77.{core::Object::==}(null))
-      for (final core::MapEntry<core::String, core::int> #t78 in #t77.{core::Map::entries})
-        #t76.{core::Map::[]=}(#t78.{core::MapEntry::key}, #t78.{core::MapEntry::value});
+      for (final core::int #t78 in #t77)
+        #t76.{core::Set::add}(#t78);
   } =>#t76;
+  core::Set<dynamic> set81ambiguous = block {
+    final core::Set<dynamic> #t79 = col::LinkedHashSet::•<dynamic>();
+    final dynamic #t80 = null;
+    if(!#t80.{core::Object::==}(null))
+      for (final dynamic #t81 in #t80) {
+        final dynamic #t82 = #t81 as{TypeError} dynamic;
+        #t79.{core::Set::add}(#t82);
+      }
+    for (final dynamic #t83 in <dynamic>[]) {
+      final dynamic #t84 = #t83 as{TypeError} dynamic;
+      #t79.{core::Set::add}(#t84);
+    }
+  } =>#t79;
+  core::Map<core::String, core::int> map80 = block {
+    final core::Map<core::String, core::int> #t85 = <core::String, core::int>{};
+    final core::Map<dynamic, dynamic> #t86 = null;
+    if(!#t86.{core::Object::==}(null))
+      for (final core::MapEntry<core::String, core::int> #t87 in #t86.{core::Map::entries})
+        #t85.{core::Map::[]=}(#t87.{core::MapEntry::key}, #t87.{core::MapEntry::value});
+  } =>#t85;
+  core::Map<core::String, core::int> map90 = block {
+    final core::Map<core::String, core::int> #t88 = <core::String, core::int>{};
+    for (final core::MapEntry<core::String, core::int> #t89 in self::bar<core::String, core::int>().{core::Map::entries})
+      #t88.{core::Map::[]=}(#t89.{core::MapEntry::key}, #t89.{core::MapEntry::value});
+  } =>#t88;
+  core::List<core::int> list100 = block {
+    final core::List<core::int> #t90 = <core::int>[];
+    for (final dynamic #t91 in listNum) {
+      final core::int #t92 = #t91 as{TypeError} core::int;
+      #t90.{core::List::add}(#t92);
+    }
+  } =>#t90;
+  core::Map<core::num, core::int> map100 = block {
+    final core::Map<core::num, core::int> #t93 = <core::num, core::int>{};
+    for (final core::MapEntry<dynamic, dynamic> #t94 in mapIntNum.{core::Map::entries}) {
+      final core::num #t95 = #t94.{core::MapEntry::key} as{TypeError} core::num;
+      final core::int #t96 = #t94.{core::MapEntry::value} as{TypeError} core::int;
+      #t93.{core::Map::[]=}(#t95, #t96);
+    }
+  } =>#t93;
+  core::List<core::int> list110 = block {
+    final core::List<core::int> #t97 = <core::int>[];
+    for (final dynamic #t98 in dynVar as{TypeError} core::Iterable<dynamic>) {
+      final core::int #t99 = #t98 as{TypeError} core::int;
+      #t97.{core::List::add}(#t99);
+    }
+  } =>#t97;
+  core::Map<core::num, core::int> map110 = block {
+    final core::Map<core::num, core::int> #t100 = <core::num, core::int>{};
+    for (final core::MapEntry<dynamic, dynamic> #t101 in (dynVar as{TypeError} core::Map<dynamic, dynamic>).{core::Map::entries}) {
+      final core::num #t102 = #t101.{core::MapEntry::key} as{TypeError} core::num;
+      final core::int #t103 = #t101.{core::MapEntry::value} as{TypeError} core::int;
+      #t100.{core::Map::[]=}(#t102, #t103);
+    }
+  } =>#t100;
 }
 static method main() → dynamic {}
diff --git a/pkg/front_end/testcases/strong.status b/pkg/front_end/testcases/strong.status
index d89dded..d6443fb 100644
--- a/pkg/front_end/testcases/strong.status
+++ b/pkg/front_end/testcases/strong.status
@@ -58,9 +58,8 @@
 inference/override_equals: RuntimeError
 inference/unresolved_super: TypeCheckError
 inference/unsafe_block_closure_inference_function_call_explicit_dynamic_param_via_expr1: InstrumentationMismatch # Issue #25824
-inference/unsafe_block_closure_inference_function_call_explicit_dynamic_param_via_expr2: InstrumentationMismatch # Issue #25824
 inference/unsafe_block_closure_inference_function_call_explicit_type_param_via_expr1: InstrumentationMismatch # Issue #25824
-inference/unsafe_block_closure_inference_function_call_explicit_type_param_via_expr2: InstrumentationMismatch # Issue #25824
+inference_new/dependency_only_if_overloaded: TypeCheckError
 inference_new/infer_assign_to_index_super_upwards: TypeCheckError
 inference_new/infer_assign_to_index_this_upwards: TypeCheckError
 inference_new/infer_assign_to_index_upwards: TypeCheckError
@@ -68,13 +67,15 @@
 inference_new/infer_field_getter_setter_mismatch: TypeCheckError
 inference_new/infer_field_override_getter_overrides_setter: TypeCheckError
 inference_new/invalid_assignment_during_toplevel_inference: TypeCheckError
-instantiate_to_bound/non_simple_generic_function_in_bound_regress: RuntimeError # Expected
+inference_new/strongly_connected_component: TypeCheckError
 instantiate_to_bound/non_simple_class_parametrized_typedef_cycle: RuntimeError # Expected
+instantiate_to_bound/non_simple_generic_function_in_bound_regress: RuntimeError # Expected
 invalid_type: TypeCheckError
 invocations: RuntimeError
 issue34899: TypeCheckError
 micro: RuntimeError
 mixin_application_override: TypeCheckError
+operator_method_not_found: RuntimeError # Expected
 optional: TypeCheckError
 override_check_accessor_after_inference: TypeCheckError # Issue #31620
 override_check_accessor_basic: TypeCheckError # Issue #31620
@@ -131,7 +132,6 @@
 regress/issue_29982: RuntimeError # Tests runtime behavior of error recovery.
 regress/issue_30836: RuntimeError # Issue 30836.
 regress/issue_31299: TypeCheckError
-regress/issue_32200: RuntimeError # Invalid type.
 regress/issue_32972: TypeCheckError
 regress/issue_33452: RuntimeError # Test has an intentional error
 regress/issue_34225: RuntimeError
@@ -150,7 +150,6 @@
 spread_collection: RuntimeError
 statements: Crash
 type_variable_as_super: RuntimeError
-type_variable_prefix: RuntimeError
 unsound_promotion: RuntimeError
 void_methods: ExpectationFileMismatch
 warn_unresolved_sends: InstrumentationMismatch # Test assumes Dart 1.0 semantics
diff --git a/pkg/front_end/testcases/text_serialization.status b/pkg/front_end/testcases/text_serialization.status
index 4d5dc75..8e6529f 100644
--- a/pkg/front_end/testcases/text_serialization.status
+++ b/pkg/front_end/testcases/text_serialization.status
@@ -67,6 +67,8 @@
 constructor_initializer_invalid: TextSerializationFailure # Was: RuntimeError # Fails execution after recovery
 continue_inference_after_error: TextSerializationFailure # Was: Pass
 continue_inference_after_error_lib: TextSerializationFailure # Was: Pass
+control_flow_collection: TextSerializationFailure
+control_flow_collection_inference: TextSerializationFailure
 covariant_generic: TextSerializationFailure # Was: RuntimeError
 cycles: TextSerializationFailure # Was: Pass
 default_values: TextSerializationFailure # Was: Pass
@@ -525,9 +527,11 @@
 inference/unsafe_block_closure_inference_function_call_explicit_dynamic_param: TextSerializationFailure # Was: Pass
 inference/unsafe_block_closure_inference_function_call_explicit_dynamic_param_via_expr1: InstrumentationMismatch # Issue #25824
 inference/unsafe_block_closure_inference_function_call_explicit_dynamic_param_via_expr2: InstrumentationMismatch # Issue #25824
+inference/unsafe_block_closure_inference_function_call_explicit_dynamic_param_via_expr2: TextSerializationFailure
 inference/unsafe_block_closure_inference_function_call_explicit_type_param: TextSerializationFailure # Was: Pass
 inference/unsafe_block_closure_inference_function_call_explicit_type_param_via_expr1: InstrumentationMismatch # Issue #25824
 inference/unsafe_block_closure_inference_function_call_explicit_type_param_via_expr2: InstrumentationMismatch # Issue #25824
+inference/unsafe_block_closure_inference_function_call_explicit_type_param_via_expr2: TextSerializationFailure
 inference/unsafe_block_closure_inference_function_call_implicit_type_param: TextSerializationFailure # Was: Pass
 inference/unsafe_block_closure_inference_function_call_implicit_type_param_via_expr: TextSerializationFailure # Was: Pass
 inference/unsafe_block_closure_inference_function_call_no_type_param: TextSerializationFailure # Was: Pass
@@ -546,6 +550,7 @@
 inference_new/const_invocation: TextSerializationFailure # Was: Pass
 inference_new/dependency_only_if_generic_method: TextSerializationFailure # Was: Pass
 inference_new/dependency_only_if_overloaded: TextSerializationFailure # Was: Pass
+inference_new/dependency_only_if_overloaded: TypeCheckError
 inference_new/do_loop: TextSerializationFailure # Was: Pass
 inference_new/downwards_inference_inside_top_level: TextSerializationFailure # Was: Pass
 inference_new/downwards_inference_inside_top_level_2: TextSerializationFailure # Was: Pass
@@ -593,6 +598,7 @@
 inference_new/property_get_toplevel: TextSerializationFailure # Was: Pass
 inference_new/static_assign_combiner: TextSerializationFailure # Was: Pass
 inference_new/strongly_connected_component: TextSerializationFailure # Was: Pass
+inference_new/strongly_connected_component: TypeCheckError
 inference_new/super_index_get: TextSerializationFailure # Was: Pass
 inference_new/super_index_get_substitution: TextSerializationFailure # Was: Pass
 inference_new/switch: TextSerializationFailure # Was: Pass
@@ -716,6 +722,7 @@
 no_such_method_private_setter: TextSerializationFailure # Was: Pass
 no_such_method_private_setter_lib: TextSerializationFailure # Was: Pass
 null_aware: TextSerializationFailure # Was: Pass
+operator_method_not_found: TextSerializationFailure
 operators: TextSerializationFailure # Was: Pass
 optional: TypeCheckError
 override: TextSerializationFailure # Was: Pass
diff --git a/pkg/front_end/testcases/type_variable_prefix.dart.strong.expect b/pkg/front_end/testcases/type_variable_prefix.dart.strong.expect
index 1ca7685..019571a 100644
--- a/pkg/front_end/testcases/type_variable_prefix.dart.strong.expect
+++ b/pkg/front_end/testcases/type_variable_prefix.dart.strong.expect
@@ -6,16 +6,6 @@
 //   T.String method() => "Hello, World!";
 //   ^^^^^^^^
 //
-// pkg/front_end/testcases/type_variable_prefix.dart:8:24: Error: A value of type 'String' can't be assigned to a variable of type 'invalid-type'.
-// Try changing the type of the left hand side, or casting the right hand side to 'invalid-type'.
-//   T.String method() => "Hello, World!";
-//                        ^
-//
-// pkg/front_end/testcases/type_variable_prefix.dart:12:24: Error: A value of type 'invalid-type' can't be assigned to a variable of type 'String'.
-// Try changing the type of the left hand side, or casting the right hand side to 'String'.
-//   T.String s = new C().method();
-//                        ^
-//
 import self as self;
 import "dart:core" as core;
 
@@ -26,15 +16,9 @@
     : super core::Object::•()
     ;
   method method() → invalid-type
-    return let final<BottomType> #t1 = invalid-expression "pkg/front_end/testcases/type_variable_prefix.dart:8:24: Error: A value of type 'String' can't be assigned to a variable of type 'invalid-type'.
-Try changing the type of the left hand side, or casting the right hand side to 'invalid-type'.
-  T.String method() => \"Hello, World!\";
-                       ^" in "Hello, World!" as{TypeError} invalid-type;
+    return "Hello, World!" as{TypeError} invalid-type;
 }
 static method main() → dynamic {
-  core::String s = let final<BottomType> #t2 = invalid-expression "pkg/front_end/testcases/type_variable_prefix.dart:12:24: Error: A value of type 'invalid-type' can't be assigned to a variable of type 'String'.
-Try changing the type of the left hand side, or casting the right hand side to 'String'.
-  T.String s = new C().method();
-                       ^" in new self::C::•<dynamic>().{self::C::method}() as{TypeError} core::String;
+  core::String s = new self::C::•<dynamic>().{self::C::method}() as{TypeError} core::String;
   core::print(s);
 }
diff --git a/pkg/front_end/testcases/type_variable_prefix.dart.strong.transformed.expect b/pkg/front_end/testcases/type_variable_prefix.dart.strong.transformed.expect
index 1ca7685..019571a 100644
--- a/pkg/front_end/testcases/type_variable_prefix.dart.strong.transformed.expect
+++ b/pkg/front_end/testcases/type_variable_prefix.dart.strong.transformed.expect
@@ -6,16 +6,6 @@
 //   T.String method() => "Hello, World!";
 //   ^^^^^^^^
 //
-// pkg/front_end/testcases/type_variable_prefix.dart:8:24: Error: A value of type 'String' can't be assigned to a variable of type 'invalid-type'.
-// Try changing the type of the left hand side, or casting the right hand side to 'invalid-type'.
-//   T.String method() => "Hello, World!";
-//                        ^
-//
-// pkg/front_end/testcases/type_variable_prefix.dart:12:24: Error: A value of type 'invalid-type' can't be assigned to a variable of type 'String'.
-// Try changing the type of the left hand side, or casting the right hand side to 'String'.
-//   T.String s = new C().method();
-//                        ^
-//
 import self as self;
 import "dart:core" as core;
 
@@ -26,15 +16,9 @@
     : super core::Object::•()
     ;
   method method() → invalid-type
-    return let final<BottomType> #t1 = invalid-expression "pkg/front_end/testcases/type_variable_prefix.dart:8:24: Error: A value of type 'String' can't be assigned to a variable of type 'invalid-type'.
-Try changing the type of the left hand side, or casting the right hand side to 'invalid-type'.
-  T.String method() => \"Hello, World!\";
-                       ^" in "Hello, World!" as{TypeError} invalid-type;
+    return "Hello, World!" as{TypeError} invalid-type;
 }
 static method main() → dynamic {
-  core::String s = let final<BottomType> #t2 = invalid-expression "pkg/front_end/testcases/type_variable_prefix.dart:12:24: Error: A value of type 'invalid-type' can't be assigned to a variable of type 'String'.
-Try changing the type of the left hand side, or casting the right hand side to 'String'.
-  T.String s = new C().method();
-                       ^" in new self::C::•<dynamic>().{self::C::method}() as{TypeError} core::String;
+  core::String s = new self::C::•<dynamic>().{self::C::method}() as{TypeError} core::String;
   core::print(s);
 }
diff --git a/pkg/front_end/testcases/undefined.dart b/pkg/front_end/testcases/undefined.dart
index d94de88..6e2fc23 100644
--- a/pkg/front_end/testcases/undefined.dart
+++ b/pkg/front_end/testcases/undefined.dart
@@ -2,8 +2,6 @@
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
 
-/*@testedFeatures=error*/
-
 class C {
   var x;
   void f() {}
@@ -11,11 +9,11 @@
 
 void test(C c) {
   c.x;
-  c. /*@error=UndefinedGetter*/ y;
+  c.y;
   c.f();
-  c. /*@error=UndefinedMethod*/ g();
+  c.g();
   c.x = null;
-  c. /*@error=UndefinedSetter*/ y = null;
+  c.y = null;
 }
 
 main() {}
diff --git a/pkg/front_end/testcases/undefined.dart.strong.expect b/pkg/front_end/testcases/undefined.dart.strong.expect
index acd6f2d..cf77098 100644
--- a/pkg/front_end/testcases/undefined.dart.strong.expect
+++ b/pkg/front_end/testcases/undefined.dart.strong.expect
@@ -2,23 +2,23 @@
 //
 // Problems in library:
 //
-// pkg/front_end/testcases/undefined.dart:14:33: Error: The getter 'y' isn't defined for the class 'C'.
+// pkg/front_end/testcases/undefined.dart:12:5: Error: The getter 'y' isn't defined for the class 'C'.
 //  - 'C' is from 'pkg/front_end/testcases/undefined.dart'.
 // Try correcting the name to the name of an existing getter, or defining a getter or field named 'y'.
-//   c. /*@error=UndefinedGetter*/ y;
-//                                 ^
+//   c.y;
+//     ^
 //
-// pkg/front_end/testcases/undefined.dart:16:33: Error: The method 'g' isn't defined for the class 'C'.
+// pkg/front_end/testcases/undefined.dart:14:5: Error: The method 'g' isn't defined for the class 'C'.
 //  - 'C' is from 'pkg/front_end/testcases/undefined.dart'.
 // Try correcting the name to the name of an existing method, or defining a method named 'g'.
-//   c. /*@error=UndefinedMethod*/ g();
-//                                 ^
+//   c.g();
+//     ^
 //
-// pkg/front_end/testcases/undefined.dart:18:33: Error: The setter 'y' isn't defined for the class 'C'.
+// pkg/front_end/testcases/undefined.dart:16:5: Error: The setter 'y' isn't defined for the class 'C'.
 //  - 'C' is from 'pkg/front_end/testcases/undefined.dart'.
 // Try correcting the name to the name of an existing setter, or defining a setter or field named 'y'.
-//   c. /*@error=UndefinedSetter*/ y = null;
-//                                 ^
+//   c.y = null;
+//     ^
 //
 import self as self;
 import "dart:core" as core;
@@ -32,22 +32,22 @@
 }
 static method test(self::C c) → void {
   c.{self::C::x};
-  invalid-expression "pkg/front_end/testcases/undefined.dart:14:33: Error: The getter 'y' isn't defined for the class 'C'.
+  invalid-expression "pkg/front_end/testcases/undefined.dart:12:5: Error: The getter 'y' isn't defined for the class 'C'.
  - 'C' is from 'pkg/front_end/testcases/undefined.dart'.
 Try correcting the name to the name of an existing getter, or defining a getter or field named 'y'.
-  c. /*@error=UndefinedGetter*/ y;
-                                ^";
+  c.y;
+    ^";
   c.{self::C::f}();
-  invalid-expression "pkg/front_end/testcases/undefined.dart:16:33: Error: The method 'g' isn't defined for the class 'C'.
+  invalid-expression "pkg/front_end/testcases/undefined.dart:14:5: Error: The method 'g' isn't defined for the class 'C'.
  - 'C' is from 'pkg/front_end/testcases/undefined.dart'.
 Try correcting the name to the name of an existing method, or defining a method named 'g'.
-  c. /*@error=UndefinedMethod*/ g();
-                                ^";
+  c.g();
+    ^";
   c.{self::C::x} = null;
-  invalid-expression "pkg/front_end/testcases/undefined.dart:18:33: Error: The setter 'y' isn't defined for the class 'C'.
+  invalid-expression "pkg/front_end/testcases/undefined.dart:16:5: Error: The setter 'y' isn't defined for the class 'C'.
  - 'C' is from 'pkg/front_end/testcases/undefined.dart'.
 Try correcting the name to the name of an existing setter, or defining a setter or field named 'y'.
-  c. /*@error=UndefinedSetter*/ y = null;
-                                ^";
+  c.y = null;
+    ^";
 }
 static method main() → dynamic {}
diff --git a/pkg/front_end/testcases/undefined.dart.strong.transformed.expect b/pkg/front_end/testcases/undefined.dart.strong.transformed.expect
index acd6f2d..cf77098 100644
--- a/pkg/front_end/testcases/undefined.dart.strong.transformed.expect
+++ b/pkg/front_end/testcases/undefined.dart.strong.transformed.expect
@@ -2,23 +2,23 @@
 //
 // Problems in library:
 //
-// pkg/front_end/testcases/undefined.dart:14:33: Error: The getter 'y' isn't defined for the class 'C'.
+// pkg/front_end/testcases/undefined.dart:12:5: Error: The getter 'y' isn't defined for the class 'C'.
 //  - 'C' is from 'pkg/front_end/testcases/undefined.dart'.
 // Try correcting the name to the name of an existing getter, or defining a getter or field named 'y'.
-//   c. /*@error=UndefinedGetter*/ y;
-//                                 ^
+//   c.y;
+//     ^
 //
-// pkg/front_end/testcases/undefined.dart:16:33: Error: The method 'g' isn't defined for the class 'C'.
+// pkg/front_end/testcases/undefined.dart:14:5: Error: The method 'g' isn't defined for the class 'C'.
 //  - 'C' is from 'pkg/front_end/testcases/undefined.dart'.
 // Try correcting the name to the name of an existing method, or defining a method named 'g'.
-//   c. /*@error=UndefinedMethod*/ g();
-//                                 ^
+//   c.g();
+//     ^
 //
-// pkg/front_end/testcases/undefined.dart:18:33: Error: The setter 'y' isn't defined for the class 'C'.
+// pkg/front_end/testcases/undefined.dart:16:5: Error: The setter 'y' isn't defined for the class 'C'.
 //  - 'C' is from 'pkg/front_end/testcases/undefined.dart'.
 // Try correcting the name to the name of an existing setter, or defining a setter or field named 'y'.
-//   c. /*@error=UndefinedSetter*/ y = null;
-//                                 ^
+//   c.y = null;
+//     ^
 //
 import self as self;
 import "dart:core" as core;
@@ -32,22 +32,22 @@
 }
 static method test(self::C c) → void {
   c.{self::C::x};
-  invalid-expression "pkg/front_end/testcases/undefined.dart:14:33: Error: The getter 'y' isn't defined for the class 'C'.
+  invalid-expression "pkg/front_end/testcases/undefined.dart:12:5: Error: The getter 'y' isn't defined for the class 'C'.
  - 'C' is from 'pkg/front_end/testcases/undefined.dart'.
 Try correcting the name to the name of an existing getter, or defining a getter or field named 'y'.
-  c. /*@error=UndefinedGetter*/ y;
-                                ^";
+  c.y;
+    ^";
   c.{self::C::f}();
-  invalid-expression "pkg/front_end/testcases/undefined.dart:16:33: Error: The method 'g' isn't defined for the class 'C'.
+  invalid-expression "pkg/front_end/testcases/undefined.dart:14:5: Error: The method 'g' isn't defined for the class 'C'.
  - 'C' is from 'pkg/front_end/testcases/undefined.dart'.
 Try correcting the name to the name of an existing method, or defining a method named 'g'.
-  c. /*@error=UndefinedMethod*/ g();
-                                ^";
+  c.g();
+    ^";
   c.{self::C::x} = null;
-  invalid-expression "pkg/front_end/testcases/undefined.dart:18:33: Error: The setter 'y' isn't defined for the class 'C'.
+  invalid-expression "pkg/front_end/testcases/undefined.dart:16:5: Error: The setter 'y' isn't defined for the class 'C'.
  - 'C' is from 'pkg/front_end/testcases/undefined.dart'.
 Try correcting the name to the name of an existing setter, or defining a setter or field named 'y'.
-  c. /*@error=UndefinedSetter*/ y = null;
-                                ^";
+  c.y = null;
+    ^";
 }
 static method main() → dynamic {}
diff --git a/pkg/front_end/testcases/undefined_getter_in_compound_assignment.dart b/pkg/front_end/testcases/undefined_getter_in_compound_assignment.dart
index 1da15ad..c6b5b4d 100644
--- a/pkg/front_end/testcases/undefined_getter_in_compound_assignment.dart
+++ b/pkg/front_end/testcases/undefined_getter_in_compound_assignment.dart
@@ -2,16 +2,14 @@
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
 
-/*@testedFeatures=error*/
-
 class C {
   void set x(value) {}
 }
 
 void test(C c) {
   c.x = 1; // Ok
-  c. /*@error=UndefinedGetter*/ x += 1;
-  c. /*@error=UndefinedGetter*/ x ??= 1;
+  c.x += 1;
+  c.x ??= 1;
 }
 
 main() {}
diff --git a/pkg/front_end/testcases/undefined_getter_in_compound_assignment.dart.strong.expect b/pkg/front_end/testcases/undefined_getter_in_compound_assignment.dart.strong.expect
index a86da13..35fb71c 100644
--- a/pkg/front_end/testcases/undefined_getter_in_compound_assignment.dart.strong.expect
+++ b/pkg/front_end/testcases/undefined_getter_in_compound_assignment.dart.strong.expect
@@ -2,17 +2,17 @@
 //
 // Problems in library:
 //
-// pkg/front_end/testcases/undefined_getter_in_compound_assignment.dart:13:33: Error: The getter 'x' isn't defined for the class 'C'.
+// pkg/front_end/testcases/undefined_getter_in_compound_assignment.dart:11:5: Error: The getter 'x' isn't defined for the class 'C'.
 //  - 'C' is from 'pkg/front_end/testcases/undefined_getter_in_compound_assignment.dart'.
 // Try correcting the name to the name of an existing getter, or defining a getter or field named 'x'.
-//   c. /*@error=UndefinedGetter*/ x += 1;
-//                                 ^
+//   c.x += 1;
+//     ^
 //
-// pkg/front_end/testcases/undefined_getter_in_compound_assignment.dart:14:33: Error: The getter 'x' isn't defined for the class 'C'.
+// pkg/front_end/testcases/undefined_getter_in_compound_assignment.dart:12:5: Error: The getter 'x' isn't defined for the class 'C'.
 //  - 'C' is from 'pkg/front_end/testcases/undefined_getter_in_compound_assignment.dart'.
 // Try correcting the name to the name of an existing getter, or defining a getter or field named 'x'.
-//   c. /*@error=UndefinedGetter*/ x ??= 1;
-//                                 ^
+//   c.x ??= 1;
+//     ^
 //
 import self as self;
 import "dart:core" as core;
@@ -25,15 +25,15 @@
 }
 static method test(self::C c) → void {
   c.{self::C::x} = 1;
-  let final self::C #t1 = c in #t1.{self::C::x} = invalid-expression "pkg/front_end/testcases/undefined_getter_in_compound_assignment.dart:13:33: Error: The getter 'x' isn't defined for the class 'C'.
+  let final self::C #t1 = c in #t1.{self::C::x} = invalid-expression "pkg/front_end/testcases/undefined_getter_in_compound_assignment.dart:11:5: Error: The getter 'x' isn't defined for the class 'C'.
  - 'C' is from 'pkg/front_end/testcases/undefined_getter_in_compound_assignment.dart'.
 Try correcting the name to the name of an existing getter, or defining a getter or field named 'x'.
-  c. /*@error=UndefinedGetter*/ x += 1;
-                                ^".+(1);
-  let final self::C #t2 = c in invalid-expression "pkg/front_end/testcases/undefined_getter_in_compound_assignment.dart:14:33: Error: The getter 'x' isn't defined for the class 'C'.
+  c.x += 1;
+    ^".+(1);
+  let final self::C #t2 = c in invalid-expression "pkg/front_end/testcases/undefined_getter_in_compound_assignment.dart:12:5: Error: The getter 'x' isn't defined for the class 'C'.
  - 'C' is from 'pkg/front_end/testcases/undefined_getter_in_compound_assignment.dart'.
 Try correcting the name to the name of an existing getter, or defining a getter or field named 'x'.
-  c. /*@error=UndefinedGetter*/ x ??= 1;
-                                ^".{core::Object::==}(null) ?{dynamic} #t2.{self::C::x} = 1 : null;
+  c.x ??= 1;
+    ^".{core::Object::==}(null) ?{dynamic} #t2.{self::C::x} = 1 : null;
 }
 static method main() → dynamic {}
diff --git a/pkg/front_end/testcases/undefined_getter_in_compound_assignment.dart.strong.transformed.expect b/pkg/front_end/testcases/undefined_getter_in_compound_assignment.dart.strong.transformed.expect
index a86da13..35fb71c 100644
--- a/pkg/front_end/testcases/undefined_getter_in_compound_assignment.dart.strong.transformed.expect
+++ b/pkg/front_end/testcases/undefined_getter_in_compound_assignment.dart.strong.transformed.expect
@@ -2,17 +2,17 @@
 //
 // Problems in library:
 //
-// pkg/front_end/testcases/undefined_getter_in_compound_assignment.dart:13:33: Error: The getter 'x' isn't defined for the class 'C'.
+// pkg/front_end/testcases/undefined_getter_in_compound_assignment.dart:11:5: Error: The getter 'x' isn't defined for the class 'C'.
 //  - 'C' is from 'pkg/front_end/testcases/undefined_getter_in_compound_assignment.dart'.
 // Try correcting the name to the name of an existing getter, or defining a getter or field named 'x'.
-//   c. /*@error=UndefinedGetter*/ x += 1;
-//                                 ^
+//   c.x += 1;
+//     ^
 //
-// pkg/front_end/testcases/undefined_getter_in_compound_assignment.dart:14:33: Error: The getter 'x' isn't defined for the class 'C'.
+// pkg/front_end/testcases/undefined_getter_in_compound_assignment.dart:12:5: Error: The getter 'x' isn't defined for the class 'C'.
 //  - 'C' is from 'pkg/front_end/testcases/undefined_getter_in_compound_assignment.dart'.
 // Try correcting the name to the name of an existing getter, or defining a getter or field named 'x'.
-//   c. /*@error=UndefinedGetter*/ x ??= 1;
-//                                 ^
+//   c.x ??= 1;
+//     ^
 //
 import self as self;
 import "dart:core" as core;
@@ -25,15 +25,15 @@
 }
 static method test(self::C c) → void {
   c.{self::C::x} = 1;
-  let final self::C #t1 = c in #t1.{self::C::x} = invalid-expression "pkg/front_end/testcases/undefined_getter_in_compound_assignment.dart:13:33: Error: The getter 'x' isn't defined for the class 'C'.
+  let final self::C #t1 = c in #t1.{self::C::x} = invalid-expression "pkg/front_end/testcases/undefined_getter_in_compound_assignment.dart:11:5: Error: The getter 'x' isn't defined for the class 'C'.
  - 'C' is from 'pkg/front_end/testcases/undefined_getter_in_compound_assignment.dart'.
 Try correcting the name to the name of an existing getter, or defining a getter or field named 'x'.
-  c. /*@error=UndefinedGetter*/ x += 1;
-                                ^".+(1);
-  let final self::C #t2 = c in invalid-expression "pkg/front_end/testcases/undefined_getter_in_compound_assignment.dart:14:33: Error: The getter 'x' isn't defined for the class 'C'.
+  c.x += 1;
+    ^".+(1);
+  let final self::C #t2 = c in invalid-expression "pkg/front_end/testcases/undefined_getter_in_compound_assignment.dart:12:5: Error: The getter 'x' isn't defined for the class 'C'.
  - 'C' is from 'pkg/front_end/testcases/undefined_getter_in_compound_assignment.dart'.
 Try correcting the name to the name of an existing getter, or defining a getter or field named 'x'.
-  c. /*@error=UndefinedGetter*/ x ??= 1;
-                                ^".{core::Object::==}(null) ?{dynamic} #t2.{self::C::x} = 1 : null;
+  c.x ??= 1;
+    ^".{core::Object::==}(null) ?{dynamic} #t2.{self::C::x} = 1 : null;
 }
 static method main() → dynamic {}
diff --git a/pkg/front_end/testcases/warn_unresolved_sends.dart b/pkg/front_end/testcases/warn_unresolved_sends.dart
index a5be7f4..9591e28 100644
--- a/pkg/front_end/testcases/warn_unresolved_sends.dart
+++ b/pkg/front_end/testcases/warn_unresolved_sends.dart
@@ -2,7 +2,6 @@
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
 
-/*@testedFeatures=warning*/
 class C {
   var superField;
   superMethod() {}
diff --git a/pkg/front_end/testcases/warn_unresolved_sends.dart.legacy.expect b/pkg/front_end/testcases/warn_unresolved_sends.dart.legacy.expect
index 6a98a24..a170b83 100644
--- a/pkg/front_end/testcases/warn_unresolved_sends.dart.legacy.expect
+++ b/pkg/front_end/testcases/warn_unresolved_sends.dart.legacy.expect
@@ -2,27 +2,27 @@
 //
 // Problems in library:
 //
-// pkg/front_end/testcases/warn_unresolved_sends.dart:49:39: Warning: Getter not found: 'missingField'.
+// pkg/front_end/testcases/warn_unresolved_sends.dart:48:39: Warning: Getter not found: 'missingField'.
 //     this. /*@warning=GetterNotFound*/ missingField;
 //                                       ^^^^^^^^^^^^
 //
-// pkg/front_end/testcases/warn_unresolved_sends.dart:50:39: Warning: Setter not found: 'missingField'.
+// pkg/front_end/testcases/warn_unresolved_sends.dart:49:39: Warning: Setter not found: 'missingField'.
 //     this. /*@warning=SetterNotFound*/ missingField = 0;
 //                                       ^^^^^^^^^^^^
 //
-// pkg/front_end/testcases/warn_unresolved_sends.dart:51:39: Warning: Method not found: 'missingMethod'.
+// pkg/front_end/testcases/warn_unresolved_sends.dart:50:39: Warning: Method not found: 'missingMethod'.
 //     this. /*@warning=MethodNotFound*/ missingMethod();
 //                                       ^^^^^^^^^^^^^
 //
-// pkg/front_end/testcases/warn_unresolved_sends.dart:53:33: Warning: Getter not found: 'missingField'.
+// pkg/front_end/testcases/warn_unresolved_sends.dart:52:33: Warning: Getter not found: 'missingField'.
 //     /*@warning=GetterNotFound*/ missingField;
 //                                 ^^^^^^^^^^^^
 //
-// pkg/front_end/testcases/warn_unresolved_sends.dart:54:33: Warning: Setter not found: 'missingField'.
+// pkg/front_end/testcases/warn_unresolved_sends.dart:53:33: Warning: Setter not found: 'missingField'.
 //     /*@warning=SetterNotFound*/ missingField = 0;
 //                                 ^^^^^^^^^^^^
 //
-// pkg/front_end/testcases/warn_unresolved_sends.dart:55:33: Warning: Method not found: 'missingMethod'.
+// pkg/front_end/testcases/warn_unresolved_sends.dart:54:33: Warning: Method not found: 'missingMethod'.
 //     /*@warning=MethodNotFound*/ missingMethod();
 //                                 ^^^^^^^^^^^^^
 //
diff --git a/pkg/front_end/testcases/warn_unresolved_sends.dart.legacy.transformed.expect b/pkg/front_end/testcases/warn_unresolved_sends.dart.legacy.transformed.expect
index 6a98a24..a170b83 100644
--- a/pkg/front_end/testcases/warn_unresolved_sends.dart.legacy.transformed.expect
+++ b/pkg/front_end/testcases/warn_unresolved_sends.dart.legacy.transformed.expect
@@ -2,27 +2,27 @@
 //
 // Problems in library:
 //
-// pkg/front_end/testcases/warn_unresolved_sends.dart:49:39: Warning: Getter not found: 'missingField'.
+// pkg/front_end/testcases/warn_unresolved_sends.dart:48:39: Warning: Getter not found: 'missingField'.
 //     this. /*@warning=GetterNotFound*/ missingField;
 //                                       ^^^^^^^^^^^^
 //
-// pkg/front_end/testcases/warn_unresolved_sends.dart:50:39: Warning: Setter not found: 'missingField'.
+// pkg/front_end/testcases/warn_unresolved_sends.dart:49:39: Warning: Setter not found: 'missingField'.
 //     this. /*@warning=SetterNotFound*/ missingField = 0;
 //                                       ^^^^^^^^^^^^
 //
-// pkg/front_end/testcases/warn_unresolved_sends.dart:51:39: Warning: Method not found: 'missingMethod'.
+// pkg/front_end/testcases/warn_unresolved_sends.dart:50:39: Warning: Method not found: 'missingMethod'.
 //     this. /*@warning=MethodNotFound*/ missingMethod();
 //                                       ^^^^^^^^^^^^^
 //
-// pkg/front_end/testcases/warn_unresolved_sends.dart:53:33: Warning: Getter not found: 'missingField'.
+// pkg/front_end/testcases/warn_unresolved_sends.dart:52:33: Warning: Getter not found: 'missingField'.
 //     /*@warning=GetterNotFound*/ missingField;
 //                                 ^^^^^^^^^^^^
 //
-// pkg/front_end/testcases/warn_unresolved_sends.dart:54:33: Warning: Setter not found: 'missingField'.
+// pkg/front_end/testcases/warn_unresolved_sends.dart:53:33: Warning: Setter not found: 'missingField'.
 //     /*@warning=SetterNotFound*/ missingField = 0;
 //                                 ^^^^^^^^^^^^
 //
-// pkg/front_end/testcases/warn_unresolved_sends.dart:55:33: Warning: Method not found: 'missingMethod'.
+// pkg/front_end/testcases/warn_unresolved_sends.dart:54:33: Warning: Method not found: 'missingMethod'.
 //     /*@warning=MethodNotFound*/ missingMethod();
 //                                 ^^^^^^^^^^^^^
 //
diff --git a/pkg/front_end/tool/fasta b/pkg/front_end/tool/fasta
index 465f05b..65b9ec4 100755
--- a/pkg/front_end/tool/fasta
+++ b/pkg/front_end/tool/fasta
@@ -62,4 +62,4 @@
 
 shift
 
-exec "${DART_VM}" "${EXTRA_VM_ARGS[@]}" -c "${SCRIPT}" "$@"
+exec "${DART_VM}" "${EXTRA_VM_ARGS[@]}" --enable-asserts "${SCRIPT}" "$@"
diff --git a/pkg/kernel/bin/transform.dart b/pkg/kernel/bin/transform.dart
index 5f792a5..d0019c3 100755
--- a/pkg/kernel/bin/transform.dart
+++ b/pkg/kernel/bin/transform.dart
@@ -6,6 +6,9 @@
 import 'dart:async';
 import 'dart:io';
 
+import 'package:front_end/src/api_prototype/constant_evaluator.dart'
+    as constants show SimpleErrorReporter, transformComponent;
+
 import 'package:args/args.dart';
 import 'package:kernel/class_hierarchy.dart';
 import 'package:kernel/core_types.dart';
@@ -13,9 +16,6 @@
 import 'package:kernel/src/tool/batch_util.dart';
 import 'package:kernel/target/targets.dart';
 
-import 'package:kernel/transformations/constants.dart' as constants
-    show SimpleErrorReporter, transformComponent;
-
 import 'package:kernel/transformations/continuation.dart' as cont;
 import 'package:kernel/transformations/empty.dart' as empty;
 import 'package:kernel/transformations/method_call.dart' as method_call;
diff --git a/pkg/kernel/binary.md b/pkg/kernel/binary.md
index 613741e7..91d9ae1 100644
--- a/pkg/kernel/binary.md
+++ b/pkg/kernel/binary.md
@@ -97,6 +97,8 @@
   // Line starts are delta-encoded (they are encoded as line lengths).  The list
   // [0, 10, 25, 32, 42] is encoded as [0, 10, 15, 7, 10].
   List<UInt> lineStarts;
+
+  List<Byte> importUriUtf8Bytes;
 }
 
 type UriSource {
@@ -137,7 +139,7 @@
 
 type ComponentFile {
   UInt32 magic = 0x90ABCDEF;
-  UInt32 formatVersion = 21;
+  UInt32 formatVersion = 22;
   List<String> problemsAsJson; // Described in problems.md.
   Library[] libraries;
   UriSource sourceMap;
diff --git a/pkg/kernel/lib/ast.dart b/pkg/kernel/lib/ast.dart
index 2d7e3a1..8e41e89 100644
--- a/pkg/kernel/lib/ast.dart
+++ b/pkg/kernel/lib/ast.dart
@@ -5951,9 +5951,13 @@
 
   final List<int> source;
 
+  final Uri importUri;
+
+  final Uri fileUri;
+
   String cachedText;
 
-  Source(this.lineStarts, this.source);
+  Source(this.lineStarts, this.source, this.importUri, this.fileUri);
 
   /// Return the text corresponding to [line] which is a 1-based line
   /// number. The returned line contains no line separators.
@@ -6112,7 +6116,7 @@
 /// This function will return "S with M1" and "S with M1, M2", respectively.
 String demangleMixinApplicationName(String name) {
   List<String> nameParts = name.split('&');
-  if (nameParts.length < 2) return name;
+  if (nameParts.length < 2 || name == "&") return name;
   String demangledName = nameParts[1];
   for (int i = 2; i < nameParts.length; i++) {
     demangledName += (i == 2 ? " with " : ", ") + nameParts[i];
diff --git a/pkg/kernel/lib/binary/ast_from_binary.dart b/pkg/kernel/lib/binary/ast_from_binary.dart
index f5b7c33..6306cef 100644
--- a/pkg/kernel/lib/binary/ast_from_binary.dart
+++ b/pkg/kernel/lib/binary/ast_from_binary.dart
@@ -696,7 +696,11 @@
         lineStarts[j] = lineStart;
         previousLineStart = lineStart;
       }
-      uriToSource[uri] = new Source(lineStarts, sourceCode);
+      List<int> importUriBytes = readByteList();
+      Uri importUri = importUriBytes.isEmpty
+          ? null
+          : Uri.parse(const Utf8Decoder().convert(importUriBytes));
+      uriToSource[uri] = new Source(lineStarts, sourceCode, importUri, uri);
     }
 
     // Read index.
diff --git a/pkg/kernel/lib/binary/ast_to_binary.dart b/pkg/kernel/lib/binary/ast_to_binary.dart
index db91bfb..a0619f6 100644
--- a/pkg/kernel/lib/binary/ast_to_binary.dart
+++ b/pkg/kernel/lib/binary/ast_to_binary.dart
@@ -740,31 +740,20 @@
     Uint8List buffer = new Uint8List(1 << 16);
     for (Uri uri in _sourceUriIndexer.index.keys) {
       index[i] = getBufferOffset();
-      Source source = ((includeSources &&
-                  _sourcesFromRealImplementation.length > i &&
-                  _sourcesFromRealImplementation[i] == true)
-              ? uriToSource[uri]
-              : null) ??
-          new Source(<int>[], const <int>[]);
-
-      String uriAsString = uri == null ? "" : "$uri";
-      if (uriAsString.length * 3 < buffer.length) {
-        int length = NotQuiteString.writeUtf8(buffer, 0, uriAsString);
-        if (length < 0) {
-          // Utf8 encoding failed.
-          writeByteList(utf8.encoder.convert(uriAsString));
-        } else {
-          writeUInt30(length);
-          for (int j = 0; j < length; j++) {
-            writeByte(buffer[j]);
-          }
-        }
-      } else {
-        // Uncommon case with very long url.
-        writeByteList(utf8.encoder.convert(uriAsString));
+      Source source = uriToSource[uri];
+      if (source == null ||
+          !(includeSources &&
+              _sourcesFromRealImplementation.length > i &&
+              _sourcesFromRealImplementation[i] == true)) {
+        source = new Source(
+            <int>[], const <int>[], source?.importUri, source?.fileUri);
       }
 
+      String uriAsString = uri == null ? "" : "$uri";
+      outputStringViaBuffer(uriAsString, buffer);
+
       writeByteList(source.source);
+
       List<int> lineStarts = source.lineStarts;
       writeUInt30(lineStarts.length);
       int previousLineStart = 0;
@@ -773,6 +762,11 @@
         writeUInt30(lineStart - previousLineStart);
         previousLineStart = lineStart;
       }
+
+      String importUriAsString =
+          source.importUri == null ? "" : "${source.importUri}";
+      outputStringViaBuffer(importUriAsString, buffer);
+
       i++;
     }
 
@@ -782,6 +776,24 @@
     }
   }
 
+  void outputStringViaBuffer(String uriAsString, Uint8List buffer) {
+    if (uriAsString.length * 3 < buffer.length) {
+      int length = NotQuiteString.writeUtf8(buffer, 0, uriAsString);
+      if (length < 0) {
+        // Utf8 encoding failed.
+        writeByteList(utf8.encoder.convert(uriAsString));
+      } else {
+        writeUInt30(length);
+        for (int j = 0; j < length; j++) {
+          writeByte(buffer[j]);
+        }
+      }
+    } else {
+      // Uncommon case with very long url.
+      writeByteList(utf8.encoder.convert(uriAsString));
+    }
+  }
+
   void writeLibraryDependencyReference(LibraryDependency node) {
     int index = _libraryDependencyIndex[node];
     if (index == null) {
diff --git a/pkg/kernel/lib/binary/tag.dart b/pkg/kernel/lib/binary/tag.dart
index ba6cc4e..9650fa7 100644
--- a/pkg/kernel/lib/binary/tag.dart
+++ b/pkg/kernel/lib/binary/tag.dart
@@ -145,7 +145,7 @@
   /// Internal version of kernel binary format.
   /// Bump it when making incompatible changes in kernel binaries.
   /// Keep in sync with runtime/vm/kernel_binary.h, pkg/kernel/binary.md.
-  static const int BinaryFormatVersion = 21;
+  static const int BinaryFormatVersion = 22;
 }
 
 abstract class ConstantTag {
diff --git a/pkg/kernel/lib/target/targets.dart b/pkg/kernel/lib/target/targets.dart
index 3472254..47521ca 100644
--- a/pkg/kernel/lib/target/targets.dart
+++ b/pkg/kernel/lib/target/targets.dart
@@ -6,7 +6,6 @@
 import '../ast.dart';
 import '../class_hierarchy.dart';
 import '../core_types.dart';
-import '../transformations/constants.dart' show ConstantsBackend;
 
 final List<String> targetNames = targets.keys.toList();
 
@@ -33,6 +32,32 @@
       {List<C> context});
 }
 
+/// The different kinds of number semantics supported by the constant evaluator.
+enum NumberSemantics {
+  /// Dart VM number semantics.
+  vm,
+
+  /// JavaScript (Dart2js and DDC) number semantics.
+  js,
+}
+
+// Backend specific constant evaluation behavior
+class ConstantsBackend {
+  const ConstantsBackend();
+
+  /// Lowering of a list constant to a backend-specific representation.
+  Constant lowerListConstant(ListConstant constant) => constant;
+
+  /// Lowering of a set constant to a backend-specific representation.
+  Constant lowerSetConstant(SetConstant constant) => constant;
+
+  /// Lowering of a map constant to a backend-specific representation.
+  Constant lowerMapConstant(MapConstant constant) => constant;
+
+  /// Number semantics to use for this backend.
+  NumberSemantics get numberSemantics => NumberSemantics.vm;
+}
+
 /// A target provides backend-specific options for generating kernel IR.
 abstract class Target {
   String get name;
diff --git a/pkg/kernel/lib/text/ast_to_text.dart b/pkg/kernel/lib/text/ast_to_text.dart
index 29af291..8d957f4 100644
--- a/pkg/kernel/lib/text/ast_to_text.dart
+++ b/pkg/kernel/lib/text/ast_to_text.dart
@@ -477,6 +477,9 @@
         }
         writeWord('external');
       }
+      if (showMetadata) {
+        inner.writeMetadata(library);
+      }
       writeAnnotationList(library.annotations);
       writeWord('library');
       if (library.name != null) {
diff --git a/pkg/kernel/lib/transformations/async.dart b/pkg/kernel/lib/transformations/async.dart
index 31fe3f3..dbdca9b 100644
--- a/pkg/kernel/lib/transformations/async.dart
+++ b/pkg/kernel/lib/transformations/async.dart
@@ -91,11 +91,13 @@
   Expression rewrite(Expression expression, List<Statement> outer) {
     assert(statements.isEmpty);
     assert(nameIndex == 0);
+    var saved = seenAwait;
     seenAwait = false;
     Expression result = expression.accept(this);
     outer.addAll(statements.reversed);
     statements.clear();
     nameIndex = 0;
+    seenAwait = seenAwait || saved;
     return result;
   }
 
@@ -503,4 +505,42 @@
         new RecursiveContinuationRewriter(continuationRewriter.helper);
     return node.accept(nestedRewriter);
   }
+
+  TreeNode visitBlockExpression(BlockExpression expr) {
+    return transform(expr, () {
+      expr.value = expr.value.accept(this)..parent = expr;
+      List<Statement> body = <Statement>[];
+      for (Statement stmt in expr.body.statements.reversed) {
+        Statement translation = stmt.accept(this);
+        if (translation != null) body.add(translation);
+      }
+      expr.body = new Block(body.reversed.toList())..parent = expr;
+    });
+  }
+
+  TreeNode defaultStatement(Statement stmt) {
+    // This method translates a statement nested in an expression (e.g., in a
+    // block expression).  It produces a translated statement, a list of
+    // statements which are side effects necessary for any await, and a flag
+    // indicating whether there was an await in the statement or to its right.
+    // The translated statement can be null in the case where there was already
+    // an await to the right.
+
+    // The translation is accumulating two lists of statements, an inner list
+    // which is a reversed list of effects needed for the current expression and
+    // an outer list which represents the block containing the current
+    // statement.  We need to preserve both of those from side effects.
+    List<Statement> savedInner = statements;
+    List<Statement> savedOuter = continuationRewriter.statements;
+    statements = <Statement>[];
+    continuationRewriter.statements = <Statement>[];
+    stmt.accept(continuationRewriter);
+
+    List<Statement> results = continuationRewriter.statements;
+    statements = savedInner;
+    continuationRewriter.statements = savedOuter;
+    if (!seenAwait && results.length == 1) return results.first;
+    statements.addAll(results.reversed);
+    return null;
+  }
 }
diff --git a/pkg/kernel/lib/transformations/constants.dart b/pkg/kernel/lib/transformations/constants.dart
deleted file mode 100644
index e7c77df..0000000
--- a/pkg/kernel/lib/transformations/constants.dart
+++ /dev/null
@@ -1,1904 +0,0 @@
-// Copyright (c) 2017, the Dart project authors.  Please see the AUTHORS file
-// for details. All rights reserved. Use of this source code is governed by a
-// BSD-style license that can be found in the LICENSE file.
-
-/// This library implements a kernel2kernel constant evaluation transformation.
-///
-/// Even though it is expected that the frontend does not emit kernel AST which
-/// contains compile-time errors, this transformation still performs some
-/// valiation and throws a [ConstantEvaluationError] if there was a compile-time
-/// errors.
-///
-/// Due to the lack information which is is only available in the front-end,
-/// this validation is incomplete (e.g. whether an integer literal used the
-/// hexadecimal syntax or not).
-///
-/// Furthermore due to the lowering of certain constructs in the front-end
-/// (e.g. '??') we need to support a super-set of the normal constant expression
-/// language.  Issue(http://dartbug.com/31799)
-library kernel.transformations.constants;
-
-import 'dart:io' as io;
-
-import '../ast.dart';
-import '../class_hierarchy.dart';
-import '../clone.dart';
-import '../core_types.dart';
-import '../kernel.dart';
-import '../type_algebra.dart';
-import '../type_environment.dart';
-
-Component transformComponent(Component component, ConstantsBackend backend,
-    Map<String, String> environmentDefines, ErrorReporter errorReporter,
-    {bool keepFields: false,
-    bool enableAsserts: false,
-    bool evaluateAnnotations: true,
-    CoreTypes coreTypes,
-    ClassHierarchy hierarchy}) {
-  coreTypes ??= new CoreTypes(component);
-  hierarchy ??= new ClassHierarchy(component);
-
-  final typeEnvironment = new TypeEnvironment(coreTypes, hierarchy);
-
-  transformLibraries(component.libraries, backend, environmentDefines,
-      typeEnvironment, errorReporter,
-      keepFields: keepFields,
-      enableAsserts: enableAsserts,
-      evaluateAnnotations: evaluateAnnotations);
-  return component;
-}
-
-void transformLibraries(
-    List<Library> libraries,
-    ConstantsBackend backend,
-    Map<String, String> environmentDefines,
-    TypeEnvironment typeEnvironment,
-    ErrorReporter errorReporter,
-    {bool keepFields: false,
-    bool keepVariables: false,
-    bool evaluateAnnotations: true,
-    bool enableAsserts: false}) {
-  final ConstantsTransformer constantsTransformer = new ConstantsTransformer(
-      backend,
-      environmentDefines,
-      keepFields,
-      keepVariables,
-      evaluateAnnotations,
-      typeEnvironment,
-      enableAsserts,
-      errorReporter);
-  for (final Library library in libraries) {
-    constantsTransformer.convertLibrary(library);
-  }
-}
-
-class ConstantsTransformer extends Transformer {
-  final ConstantEvaluator constantEvaluator;
-  final TypeEnvironment typeEnvironment;
-
-  /// Whether to preserve constant [Field]s.  All use-sites will be rewritten.
-  final bool keepFields;
-  final bool keepVariables;
-  final bool evaluateAnnotations;
-
-  ConstantsTransformer(
-      ConstantsBackend backend,
-      Map<String, String> environmentDefines,
-      this.keepFields,
-      this.keepVariables,
-      this.evaluateAnnotations,
-      this.typeEnvironment,
-      bool enableAsserts,
-      ErrorReporter errorReporter)
-      : constantEvaluator = new ConstantEvaluator(backend, environmentDefines,
-            typeEnvironment, enableAsserts, errorReporter);
-
-  // Transform the library/class members:
-
-  void convertLibrary(Library library) {
-    transformAnnotations(library.annotations, library);
-
-    transformList(library.dependencies, this, library);
-    transformList(library.parts, this, library);
-    transformList(library.typedefs, this, library);
-    transformList(library.classes, this, library);
-    transformList(library.procedures, this, library);
-    transformList(library.fields, this, library);
-
-    if (!keepFields) {
-      // The transformer API does not iterate over `Library.additionalExports`,
-      // so we manually delete the references to shaken nodes.
-      library.additionalExports.removeWhere((Reference reference) {
-        return reference.canonicalName == null;
-      });
-    }
-  }
-
-  visitLibraryPart(LibraryPart node) {
-    constantEvaluator.withNewEnvironment(() {
-      transformAnnotations(node.annotations, node);
-    });
-    return node;
-  }
-
-  visitLibraryDependency(LibraryDependency node) {
-    constantEvaluator.withNewEnvironment(() {
-      transformAnnotations(node.annotations, node);
-    });
-    return node;
-  }
-
-  visitClass(Class node) {
-    constantEvaluator.withNewEnvironment(() {
-      transformAnnotations(node.annotations, node);
-      transformList(node.fields, this, node);
-      transformList(node.typeParameters, this, node);
-      transformList(node.constructors, this, node);
-      transformList(node.procedures, this, node);
-      transformList(node.redirectingFactoryConstructors, this, node);
-    });
-    return node;
-  }
-
-  visitProcedure(Procedure node) {
-    constantEvaluator.withNewEnvironment(() {
-      transformAnnotations(node.annotations, node);
-      node.function = node.function.accept(this)..parent = node;
-    });
-    return node;
-  }
-
-  visitConstructor(Constructor node) {
-    constantEvaluator.withNewEnvironment(() {
-      transformAnnotations(node.annotations, node);
-      transformList(node.initializers, this, node);
-      node.function = node.function.accept(this)..parent = node;
-    });
-    return node;
-  }
-
-  visitTypedef(Typedef node) {
-    constantEvaluator.withNewEnvironment(() {
-      transformAnnotations(node.annotations, node);
-      transformList(node.typeParameters, this, node);
-      transformList(node.typeParametersOfFunctionType, this, node);
-      transformList(node.positionalParameters, this, node);
-      transformList(node.namedParameters, this, node);
-    });
-    return node;
-  }
-
-  visitRedirectingFactoryConstructor(RedirectingFactoryConstructor node) {
-    constantEvaluator.withNewEnvironment(() {
-      transformAnnotations(node.annotations, node);
-      transformList(node.typeParameters, this, node);
-      transformList(node.positionalParameters, this, node);
-      transformList(node.namedParameters, this, node);
-    });
-    return node;
-  }
-
-  visitTypeParameter(TypeParameter node) {
-    transformAnnotations(node.annotations, node);
-    return node;
-  }
-
-  void transformAnnotations(List<Expression> nodes, TreeNode parent) {
-    if (evaluateAnnotations && nodes.length > 0) {
-      transformExpressions(nodes, parent);
-    }
-  }
-
-  void transformExpressions(List<Expression> nodes, TreeNode parent) {
-    constantEvaluator.withNewEnvironment(() {
-      for (int i = 0; i < nodes.length; ++i) {
-        nodes[i] = tryEvaluateAndTransformWithContext(parent, nodes[i])
-          ..parent = parent;
-      }
-    });
-  }
-
-  // Handle definition of constants:
-
-  visitFunctionNode(FunctionNode node) {
-    final positionalParameterCount = node.positionalParameters.length;
-    for (int i = 0; i < positionalParameterCount; ++i) {
-      final VariableDeclaration variable = node.positionalParameters[i];
-      transformAnnotations(variable.annotations, variable);
-      if (variable.initializer != null) {
-        variable.initializer =
-            tryEvaluateAndTransformWithContext(variable, variable.initializer)
-              ..parent = node;
-      }
-    }
-    for (final VariableDeclaration variable in node.namedParameters) {
-      transformAnnotations(variable.annotations, variable);
-      if (variable.initializer != null) {
-        variable.initializer =
-            tryEvaluateAndTransformWithContext(variable, variable.initializer)
-              ..parent = node;
-      }
-    }
-    if (node.body != null) {
-      node.body = node.body.accept(this)..parent = node;
-    }
-    return node;
-  }
-
-  visitVariableDeclaration(VariableDeclaration node) {
-    transformAnnotations(node.annotations, node);
-
-    if (node.initializer != null) {
-      if (node.isConst) {
-        final Constant constant =
-            tryEvaluateWithContext(node, node.initializer);
-
-        // If there was a constant evaluation error we will not continue and
-        // simply keep the old [node].
-        if (constant != null) {
-          constantEvaluator.env.addVariableValue(node, constant);
-
-          if (keepVariables) {
-            // So the value of the variable is still available for debugging
-            // purposes we convert the constant variable to be a final variable
-            // initialized to the evaluated constant expression.
-            node.initializer = new ConstantExpression(constant)..parent = node;
-            node.isFinal = true;
-            node.isConst = false;
-          } else {
-            // Since we convert all use-sites of constants, the constant
-            // [VariableDeclaration] is unused and we'll therefore remove it.
-            return null;
-          }
-        }
-      } else {
-        node.initializer = node.initializer.accept(this)..parent = node;
-      }
-    }
-    return node;
-  }
-
-  visitField(Field node) {
-    return constantEvaluator.withNewEnvironment(() {
-      if (node.isConst) {
-        // Since we convert all use-sites of constants, the constant [Field]
-        // cannot be referenced anymore.  We therefore get rid of it if
-        // [keepFields] was not specified.
-        if (!keepFields) {
-          return null;
-        }
-
-        // Otherwise we keep the constant [Field] and convert it's initializer.
-        transformAnnotations(node.annotations, node);
-        if (node.initializer != null) {
-          node.initializer =
-              tryEvaluateAndTransformWithContext(node, node.initializer)
-                ..parent = node;
-        }
-      } else {
-        transformAnnotations(node.annotations, node);
-        if (node.initializer != null) {
-          node.initializer = node.initializer.accept(this)..parent = node;
-        }
-      }
-      return node;
-    });
-  }
-
-  // Handle use-sites of constants (and "inline" constant expressions):
-
-  visitSymbolLiteral(SymbolLiteral node) {
-    return new ConstantExpression(constantEvaluator.evaluate(node));
-  }
-
-  visitStaticGet(StaticGet node) {
-    final Member target = node.target;
-    if (target is Field && target.isConst) {
-      final Constant constant =
-          tryEvaluateWithContext(node, target.initializer);
-      return constant != null ? new ConstantExpression(constant) : node;
-    } else if (target is Procedure && target.kind == ProcedureKind.Method) {
-      return tryEvaluateAndTransformWithContext(node, node);
-    }
-    return super.visitStaticGet(node);
-  }
-
-  visitSwitchCase(SwitchCase node) {
-    transformExpressions(node.expressions, node);
-    return super.visitSwitchCase(node);
-  }
-
-  visitVariableGet(VariableGet node) {
-    if (node.variable.isConst) {
-      return tryEvaluateAndTransformWithContext(node, node);
-    }
-    return super.visitVariableGet(node);
-  }
-
-  visitListLiteral(ListLiteral node) {
-    if (node.isConst) {
-      return tryEvaluateAndTransformWithContext(node, node);
-    }
-    return super.visitListLiteral(node);
-  }
-
-  visitMapLiteral(MapLiteral node) {
-    if (node.isConst) {
-      return tryEvaluateAndTransformWithContext(node, node);
-    }
-    return super.visitMapLiteral(node);
-  }
-
-  visitConstructorInvocation(ConstructorInvocation node) {
-    if (node.isConst) {
-      return tryEvaluateAndTransformWithContext(node, node);
-    }
-    return super.visitConstructorInvocation(node);
-  }
-
-  visitStaticInvocation(StaticInvocation node) {
-    if (node.isConst) {
-      return tryEvaluateAndTransformWithContext(node, node);
-    }
-    return super.visitStaticInvocation(node);
-  }
-
-  visitConstantExpression(ConstantExpression node) {
-    Constant constant = node.constant;
-    if (constant is UnevaluatedConstant) {
-      Expression expression = constant.expression;
-      return tryEvaluateAndTransformWithContext(expression, expression);
-    } else {
-      node.constant = constantEvaluator.canonicalize(constant);
-      return node;
-    }
-  }
-
-  tryEvaluateAndTransformWithContext(TreeNode treeContext, Expression node) {
-    final Constant constant = tryEvaluateWithContext(treeContext, node);
-    return constant != null ? new ConstantExpression(constant) : node;
-  }
-
-  tryEvaluateWithContext(TreeNode treeContext, Expression node) {
-    if (treeContext == node) {
-      return constantEvaluator.evaluate(node);
-    }
-
-    return constantEvaluator.runInsideContext(treeContext, () {
-      return constantEvaluator.evaluate(node);
-    });
-  }
-}
-
-class ConstantEvaluator extends RecursiveVisitor {
-  final ConstantsBackend backend;
-  final NumberSemantics numberSemantics;
-  Map<String, String> environmentDefines;
-  final CoreTypes coreTypes;
-  final TypeEnvironment typeEnvironment;
-  final bool enableAsserts;
-  final ErrorReporter errorReporter;
-
-  final isInstantiated = new IsInstantiatedVisitor().isInstantiated;
-
-  final Map<Constant, Constant> canonicalizationCache;
-  final Map<Node, Object> nodeCache;
-  final CloneVisitor cloner = new CloneVisitor();
-
-  final NullConstant nullConstant = new NullConstant();
-  final BoolConstant trueConstant = new BoolConstant(true);
-  final BoolConstant falseConstant = new BoolConstant(false);
-
-  final List<TreeNode> contextChain = [];
-
-  InstanceBuilder instanceBuilder;
-  EvaluationEnvironment env;
-  Expression evaluationRoot;
-  Set<TreeNode> unevaluatedNodes;
-  Set<Expression> replacementNodes;
-
-  bool get targetingJavaScript => numberSemantics == NumberSemantics.js;
-
-  ConstantEvaluator(this.backend, this.environmentDefines, this.typeEnvironment,
-      this.enableAsserts, this.errorReporter)
-      : numberSemantics = backend.numberSemantics,
-        coreTypes = typeEnvironment.coreTypes,
-        canonicalizationCache = <Constant, Constant>{},
-        nodeCache = <Node, Constant>{},
-        env = new EvaluationEnvironment();
-
-  /// Evaluates [node] and possibly cache the evaluation result.
-  Constant evaluate(Expression node) {
-    evaluationRoot = node;
-    try {
-      return _evaluateSubexpression(node);
-    } on _AbortCurrentEvaluation catch (e) {
-      return new UnevaluatedConstant(new InvalidExpression(e.message));
-    } finally {
-      // Release collections used to keep track of unevaluated nodes.
-      evaluationRoot = null;
-      unevaluatedNodes = null;
-      replacementNodes = null;
-    }
-  }
-
-  /// Produce an unevaluated constant node for an expression.
-  /// Mark all ancestors (up to the root of the constant evaluation) to
-  /// indicate that they should also be unevaluated.
-  Constant unevaluated(Expression original, Expression replacement) {
-    assert(evaluationRoot != null);
-    replacement.fileOffset = original.fileOffset;
-    unevaluatedNodes ??= new Set<TreeNode>.identity();
-    TreeNode mark = original;
-    while (unevaluatedNodes.add(mark)) {
-      if (identical(mark, evaluationRoot)) break;
-      mark = mark.parent;
-    }
-    return new UnevaluatedConstant(replacement);
-  }
-
-  /// Called whenever an expression is extracted from an unevaluated constant
-  /// to become part of the expression tree of another unevaluated constant.
-  /// Makes sure a particular expression occurs only once in the tree by
-  /// cloning further instances.
-  Expression unique(Expression expression) {
-    replacementNodes ??= new Set<Expression>.identity();
-    if (!replacementNodes.add(expression)) {
-      expression = cloner.clone(expression);
-      replacementNodes.add(expression);
-    }
-    return expression;
-  }
-
-  /// Should this node become unevaluated because of an unevaluated child?
-  bool hasUnevaluatedChild(TreeNode node) {
-    return unevaluatedNodes != null && unevaluatedNodes.contains(node);
-  }
-
-  /// Evaluates [node] and possibly cache the evaluation result.
-  /// @throws _AbortCurrentEvaluation if expression can't be evaluated.
-  Constant _evaluateSubexpression(Expression node) {
-    if (node == null) return nullConstant;
-    if (env.isEmpty) {
-      // We only try to evaluate the same [node] *once* within an empty
-      // environment.
-      if (nodeCache.containsKey(node)) {
-        final Constant constant = nodeCache[node];
-        if (constant == null)
-          throw new _AbortCurrentEvaluation(
-              errorReporter.circularity(contextChain, node));
-        return constant;
-      }
-
-      nodeCache[node] = null;
-      return nodeCache[node] = node.accept(this);
-    }
-    return node.accept(this);
-  }
-
-  Constant runInsideContext(TreeNode node, Constant fun()) {
-    try {
-      pushContext(node);
-      return fun();
-    } finally {
-      popContext(node);
-    }
-  }
-
-  Constant runInsideContextIfNoContext(TreeNode node, Constant fun()) {
-    if (contextChain.isEmpty) {
-      return runInsideContext(node, fun);
-    } else {
-      return fun();
-    }
-  }
-
-  pushContext(TreeNode contextNode) {
-    contextChain.add(contextNode);
-  }
-
-  popContext(TreeNode contextNode) {
-    assert(contextChain.last == contextNode);
-    contextChain.length = contextChain.length - 1;
-  }
-
-  defaultTreeNode(Node node) {
-    // Only a subset of the expression language is valid for constant
-    // evaluation.
-    throw 'Constant evaluation has no support for ${node.runtimeType} yet!';
-  }
-
-  visitNullLiteral(NullLiteral node) => nullConstant;
-
-  visitBoolLiteral(BoolLiteral node) {
-    return node.value ? trueConstant : falseConstant;
-  }
-
-  visitIntLiteral(IntLiteral node) {
-    // The frontend will ensure the integer literals are in signed 64-bit
-    // range.
-    return canonicalize(new IntConstant(node.value));
-  }
-
-  visitDoubleLiteral(DoubleLiteral node) {
-    return canonicalize(makeDoubleConstant(node.value));
-  }
-
-  visitStringLiteral(StringLiteral node) {
-    return canonicalize(new StringConstant(node.value));
-  }
-
-  visitTypeLiteral(TypeLiteral node) {
-    final DartType type = evaluateDartType(node, node.type);
-    return canonicalize(new TypeLiteralConstant(type));
-  }
-
-  visitConstantExpression(ConstantExpression node) {
-    // If there were already constants in the AST then we make sure we
-    // re-canonicalize them.  After running the transformer we will therefore
-    // have a fully-canonicalized constant DAG with roots coming from the
-    // [ConstantExpression] nodes in the AST.
-    return canonicalize(node.constant);
-  }
-
-  visitListLiteral(ListLiteral node) {
-    if (!node.isConst) {
-      throw new _AbortCurrentEvaluation(
-          errorReporter.nonConstLiteral(contextChain, node, 'List'));
-    }
-    final List<Constant> entries = new List<Constant>(node.expressions.length);
-    for (int i = 0; i < node.expressions.length; ++i) {
-      entries[i] = _evaluateSubexpression(node.expressions[i]);
-    }
-    if (hasUnevaluatedChild(node)) {
-      final expressions = new List<Expression>(node.expressions.length);
-      for (int i = 0; i < node.expressions.length; ++i) {
-        expressions[i] = unique(entries[i].asExpression());
-      }
-      return unevaluated(
-          node,
-          new ListLiteral(expressions,
-              typeArgument: node.typeArgument, isConst: true));
-    }
-    final DartType typeArgument = evaluateDartType(node, node.typeArgument);
-    return canonicalize(
-        backend.lowerListConstant(new ListConstant(typeArgument, entries)));
-  }
-
-  visitSetLiteral(SetLiteral node) {
-    if (!node.isConst) {
-      throw new _AbortCurrentEvaluation(
-          errorReporter.nonConstLiteral(contextChain, node, 'Set'));
-    }
-    final List<Constant> entries = new List<Constant>(node.expressions.length);
-    for (int i = 0; i < node.expressions.length; ++i) {
-      entries[i] = _evaluateSubexpression(node.expressions[i]);
-    }
-    if (hasUnevaluatedChild(node)) {
-      final expressions = new List<Expression>(node.expressions.length);
-      for (int i = 0; i < node.expressions.length; ++i) {
-        expressions[i] = unique(entries[i].asExpression());
-      }
-      return unevaluated(
-          node,
-          new SetLiteral(expressions,
-              typeArgument: node.typeArgument, isConst: true));
-    }
-    final DartType typeArgument = evaluateDartType(node, node.typeArgument);
-    return canonicalize(
-        backend.lowerSetConstant(new SetConstant(typeArgument, entries)));
-  }
-
-  visitMapLiteral(MapLiteral node) {
-    if (!node.isConst) {
-      throw new _AbortCurrentEvaluation(
-          errorReporter.nonConstLiteral(contextChain, node, 'Map'));
-    }
-    final Set<Constant> usedKeys = new Set<Constant>();
-    final List<ConstantMapEntry> entries =
-        new List<ConstantMapEntry>(node.entries.length);
-    for (int i = 0; i < node.entries.length; ++i) {
-      final key = _evaluateSubexpression(node.entries[i].key);
-      final value = _evaluateSubexpression(node.entries[i].value);
-      if (!usedKeys.add(key)) {
-        // TODO(kustermann): We should change the context handling from just
-        // capturing the `TreeNode`s to a `(TreeNode, String message)` tuple and
-        // report where the first key with the same value was.
-        throw new _AbortCurrentEvaluation(
-            errorReporter.duplicateKey(contextChain, node.entries[i], key));
-      }
-      entries[i] = new ConstantMapEntry(key, value);
-    }
-    if (hasUnevaluatedChild(node)) {
-      final mapEntries = new List<MapEntry>(node.entries.length);
-      for (int i = 0; i < node.entries.length; ++i) {
-        mapEntries[i] = new MapEntry(unique(entries[i].key.asExpression()),
-            unique(entries[i].value.asExpression()));
-      }
-      return unevaluated(
-          node,
-          new MapLiteral(mapEntries,
-              keyType: node.keyType, valueType: node.valueType, isConst: true));
-    }
-    final DartType keyType = evaluateDartType(node, node.keyType);
-    final DartType valueType = evaluateDartType(node, node.valueType);
-    return canonicalize(
-        backend.lowerMapConstant(new MapConstant(keyType, valueType, entries)));
-  }
-
-  visitFunctionExpression(FunctionExpression node) {
-    throw new _AbortCurrentEvaluation(
-        errorReporter.nonConstLiteral(contextChain, node, 'Function'));
-  }
-
-  visitConstructorInvocation(ConstructorInvocation node) {
-    final Constructor constructor = node.target;
-    final Class klass = constructor.enclosingClass;
-    if (!constructor.isConst) {
-      throw 'The front-end should ensure we do not encounter a '
-          'constructor invocation of a non-const constructor.';
-    }
-    if (constructor.function.body != null &&
-        constructor.function.body is! EmptyStatement) {
-      throw 'Constructor "$node" has non-trivial body "${constructor.function.body.runtimeType}".';
-    }
-    if (klass.isAbstract) {
-      throw 'Constructor "$node" belongs to abstract class "${klass}".';
-    }
-
-    final positionals = evaluatePositionalArguments(node.arguments);
-    final named = evaluateNamedArguments(node.arguments);
-
-    // Is the constructor unavailable due to separate compilation?
-    bool isUnavailable = constructor.isInExternalLibrary &&
-        constructor.initializers.isEmpty &&
-        constructor.enclosingClass.supertype != null;
-
-    if (isUnavailable || hasUnevaluatedChild(node)) {
-      return unevaluated(
-          node,
-          new ConstructorInvocation(constructor,
-              unevaluatedArguments(positionals, named, node.arguments.types),
-              isConst: true));
-    }
-
-    final typeArguments = evaluateTypeArguments(node, node.arguments);
-
-    // Fill in any missing type arguments with "dynamic".
-    for (int i = typeArguments.length; i < klass.typeParameters.length; i++) {
-      typeArguments.add(const DynamicType());
-    }
-
-    // Start building a new instance.
-    return withNewInstanceBuilder(klass, typeArguments, () {
-      return runInsideContextIfNoContext(node, () {
-        // "Run" the constructor (and any super constructor calls), which will
-        // initialize the fields of the new instance.
-        handleConstructorInvocation(
-            constructor, typeArguments, positionals, named);
-        final InstanceConstant result = instanceBuilder.buildInstance();
-
-        // Special case the dart:core's Symbol class here and convert it to a
-        // [SymbolConstant].  For invalid values we report a compile-time error.
-        if (result.classNode == coreTypes.internalSymbolClass) {
-          // The dart:_internal's Symbol class has only the name field.
-          assert(coreTypes.internalSymbolClass.fields
-                  .where((f) => !f.isStatic)
-                  .length ==
-              1);
-          final nameValue = result.fieldValues.values.single;
-
-          if (nameValue is StringConstant &&
-              isValidSymbolName(nameValue.value)) {
-            return canonicalize(new SymbolConstant(nameValue.value, null));
-          }
-          throw new _AbortCurrentEvaluation(errorReporter.invalidSymbolName(
-              contextChain, node.arguments.positional.first, nameValue));
-        }
-
-        return canonicalize(result);
-      });
-    });
-  }
-
-  bool isValidSymbolName(String name) {
-    // See https://api.dartlang.org/stable/2.0.0/dart-core/Symbol/Symbol.html:
-    //
-    //  A qualified name is a valid name preceded by a public identifier name and
-    //  a '.', e.g., foo.bar.baz= is a qualified version of baz=.
-    //
-    //  That means that the content of the name String must be either
-    //     - a valid public Dart identifier (that is, an identifier not
-    //       starting with "_"),
-    //     - such an identifier followed by "=" (a setter name),
-    //     - the name of a declarable operator,
-    //     - any of the above preceded by any number of qualifiers, where a
-    //       qualifier is a non-private identifier followed by '.',
-    //     - or the empty string (the default name of a library with no library
-    //       name declaration).
-
-    const operatorNames = const <String>[
-      '+',
-      '-',
-      '*',
-      '/',
-      '%',
-      '~/',
-      '&',
-      '|',
-      '^',
-      '~',
-      '<<',
-      '>>',
-      '<',
-      '<=',
-      '>',
-      '>=',
-      '==',
-      '[]',
-      '[]=',
-      'unary-'
-    ];
-
-    if (name == null) return false;
-    if (name == '') return true;
-
-    final parts = name.split('.');
-
-    // Each qualifier must be a public identifier.
-    for (int i = 0; i < parts.length - 1; ++i) {
-      if (!isValidPublicIdentifier(parts[i])) return false;
-    }
-
-    String last = parts.last;
-    if (operatorNames.contains(last)) {
-      return true;
-    }
-    if (last.endsWith('=')) {
-      last = last.substring(0, last.length - 1);
-    }
-    if (!isValidPublicIdentifier(last)) return false;
-
-    return true;
-  }
-
-  /// From the Dart Language specification:
-  ///
-  ///   IDENTIFIER:
-  ///     IDENTIFIER_START IDENTIFIER_PART*
-  ///
-  ///   IDENTIFIER_START:
-  ///       IDENTIFIER_START_NO_DOLLAR | ‘$’
-  ///
-  ///   IDENTIFIER_PART:
-  ///       IDENTIFIER_START | DIGIT
-  ///
-  ///   IDENTIFIER_NO_DOLLAR:
-  ///     IDENTIFIER_START_NO_DOLLAR IDENTIFIER_PART_NO_DOLLAR*
-  ///
-  ///   IDENTIFIER_START_NO_DOLLAR:
-  ///       LETTER | '_'
-  ///
-  ///   IDENTIFIER_PART_NO_DOLLAR:
-  ///       IDENTIFIER_START_NO_DOLLAR | DIGIT
-  ///
-  static final publicIdentifierRegExp =
-      new RegExp(r'^[a-zA-Z$][a-zA-Z0-9_$]*$');
-
-  static const nonUsableKeywords = const <String>[
-    'assert',
-    'break',
-    'case',
-    'catch',
-    'class',
-    'const',
-    'continue',
-    'default',
-    'do',
-    'else',
-    'enum',
-    'extends',
-    'false',
-    'final',
-    'finally',
-    'for',
-    'if',
-    'in',
-    'is',
-    'new',
-    'null',
-    'rethrow',
-    'return',
-    'super',
-    'switch',
-    'this',
-    'throw',
-    'true',
-    'try',
-    'var',
-    'while',
-    'with',
-  ];
-
-  bool isValidPublicIdentifier(String name) {
-    return publicIdentifierRegExp.hasMatch(name) &&
-        !nonUsableKeywords.contains(name);
-  }
-
-  handleConstructorInvocation(
-      Constructor constructor,
-      List<DartType> typeArguments,
-      List<Constant> positionalArguments,
-      Map<String, Constant> namedArguments) {
-    return runInsideContext(constructor, () {
-      return withNewEnvironment(() {
-        final Class klass = constructor.enclosingClass;
-        final FunctionNode function = constructor.function;
-
-        // We simulate now the constructor invocation.
-
-        // Step 1) Map type arguments and normal arguments from caller to callee.
-        for (int i = 0; i < klass.typeParameters.length; i++) {
-          env.addTypeParameterValue(klass.typeParameters[i], typeArguments[i]);
-        }
-        for (int i = 0; i < function.positionalParameters.length; i++) {
-          final VariableDeclaration parameter =
-              function.positionalParameters[i];
-          final Constant value = (i < positionalArguments.length)
-              ? positionalArguments[i]
-              : _evaluateSubexpression(parameter.initializer);
-          env.addVariableValue(parameter, value);
-        }
-        for (final VariableDeclaration parameter in function.namedParameters) {
-          final Constant value = namedArguments[parameter.name] ??
-              _evaluateSubexpression(parameter.initializer);
-          env.addVariableValue(parameter, value);
-        }
-
-        // Step 2) Run all initializers (including super calls) with environment setup.
-        for (final Field field in klass.fields) {
-          if (!field.isStatic) {
-            instanceBuilder.setFieldValue(
-                field, _evaluateSubexpression(field.initializer));
-          }
-        }
-        for (final Initializer init in constructor.initializers) {
-          if (init is FieldInitializer) {
-            instanceBuilder.setFieldValue(
-                init.field, _evaluateSubexpression(init.value));
-          } else if (init is LocalInitializer) {
-            final VariableDeclaration variable = init.variable;
-            env.addVariableValue(
-                variable, _evaluateSubexpression(variable.initializer));
-          } else if (init is SuperInitializer) {
-            handleConstructorInvocation(
-                init.target,
-                evaluateSuperTypeArguments(
-                    init, constructor.enclosingClass.supertype),
-                evaluatePositionalArguments(init.arguments),
-                evaluateNamedArguments(init.arguments));
-          } else if (init is RedirectingInitializer) {
-            // Since a redirecting constructor targets a constructor of the same
-            // class, we pass the same [typeArguments].
-            handleConstructorInvocation(
-                init.target,
-                typeArguments,
-                evaluatePositionalArguments(init.arguments),
-                evaluateNamedArguments(init.arguments));
-          } else if (init is AssertInitializer) {
-            if (enableAsserts) {
-              final Constant condition =
-                  _evaluateSubexpression(init.statement.condition);
-
-              if (condition is BoolConstant) {
-                if (!condition.value) {
-                  if (init.statement.message == null) {
-                    throw new _AbortCurrentEvaluation(
-                        errorReporter.failedAssertion(
-                            contextChain, init.statement.condition, null));
-                  }
-                  final Constant message =
-                      _evaluateSubexpression(init.statement.message);
-                  if (message is StringConstant) {
-                    throw new _AbortCurrentEvaluation(
-                        errorReporter.failedAssertion(contextChain,
-                            init.statement.condition, message.value));
-                  }
-                  throw new _AbortCurrentEvaluation(
-                      errorReporter.invalidDartType(
-                          contextChain,
-                          init.statement.message,
-                          message,
-                          typeEnvironment.stringType));
-                }
-              } else {
-                throw new _AbortCurrentEvaluation(errorReporter.invalidDartType(
-                    contextChain,
-                    init.statement.condition,
-                    condition,
-                    typeEnvironment.boolType));
-              }
-            }
-          } else {
-            throw new Exception(
-                'No support for handling initializer of type "${init.runtimeType}".');
-          }
-        }
-      });
-    });
-  }
-
-  visitInvalidExpression(InvalidExpression node) {
-    throw new _AbortCurrentEvaluation(node.message);
-  }
-
-  visitMethodInvocation(MethodInvocation node) {
-    // We have no support for generic method invocation atm.
-    assert(node.arguments.named.isEmpty);
-
-    final Constant receiver = _evaluateSubexpression(node.receiver);
-    final List<Constant> arguments =
-        evaluatePositionalArguments(node.arguments);
-
-    if (hasUnevaluatedChild(node)) {
-      return unevaluated(
-          node,
-          new MethodInvocation(unique(receiver.asExpression()), node.name,
-              unevaluatedArguments(arguments, {}, node.arguments.types)));
-    }
-
-    // TODO(http://dartbug.com/31799): Ensure we only invoke ==/!= on
-    // null/bool/int/double/String objects.
-
-    // Handle == and != first (it's common between all types).
-    if (arguments.length == 1 && node.name.name == '==') {
-      final right = arguments[0];
-      return receiver == right ? trueConstant : falseConstant;
-    }
-    if (arguments.length == 1 && node.name.name == '!=') {
-      final right = arguments[0];
-      return receiver != right ? trueConstant : falseConstant;
-    }
-
-    // This is a white-listed set of methods we need to support on constants.
-    if (receiver is StringConstant) {
-      if (arguments.length == 1) {
-        switch (node.name.name) {
-          case '+':
-            final Constant other = arguments[0];
-            if (other is StringConstant) {
-              return canonicalize(
-                  new StringConstant(receiver.value + other.value));
-            }
-            throw new _AbortCurrentEvaluation(
-                errorReporter.invalidBinaryOperandType(
-                    contextChain,
-                    node,
-                    receiver,
-                    '+',
-                    typeEnvironment.stringType,
-                    other.getType(typeEnvironment)));
-        }
-      }
-    } else if (receiver is IntConstant) {
-      if (arguments.length == 0) {
-        switch (node.name.name) {
-          case 'unary-':
-            return canonicalize(new IntConstant(-receiver.value));
-          case '~':
-            return canonicalize(new IntConstant(~receiver.value));
-        }
-      } else if (arguments.length == 1) {
-        final Constant other = arguments[0];
-        final op = node.name.name;
-        if (other is IntConstant) {
-          if ((op == '<<' || op == '>>') && other.value < 0) {
-            throw new _AbortCurrentEvaluation(errorReporter.negativeShift(
-                contextChain,
-                node.arguments.positional.first,
-                receiver,
-                op,
-                other));
-          }
-          switch (op) {
-            case '|':
-              return canonicalize(
-                  new IntConstant(receiver.value | other.value));
-            case '&':
-              return canonicalize(
-                  new IntConstant(receiver.value & other.value));
-            case '^':
-              return canonicalize(
-                  new IntConstant(receiver.value ^ other.value));
-            case '<<':
-              return canonicalize(
-                  new IntConstant(receiver.value << other.value));
-            case '>>':
-              return canonicalize(
-                  new IntConstant(receiver.value >> other.value));
-          }
-        }
-
-        if (other is IntConstant) {
-          if (other.value == 0 && (op == '%' || op == '~/')) {
-            throw new _AbortCurrentEvaluation(errorReporter.zeroDivisor(
-                contextChain, node.arguments.positional.first, receiver, op));
-          }
-
-          return evaluateBinaryNumericOperation(
-              node.name.name, receiver.value, other.value, node);
-        } else if (other is DoubleConstant) {
-          return evaluateBinaryNumericOperation(
-              node.name.name, receiver.value, other.value, node);
-        }
-        throw new _AbortCurrentEvaluation(
-            errorReporter.invalidBinaryOperandType(
-                contextChain,
-                node,
-                receiver,
-                '${node.name.name}',
-                typeEnvironment.numType,
-                other.getType(typeEnvironment)));
-      }
-    } else if (receiver is DoubleConstant) {
-      if (arguments.length == 0) {
-        switch (node.name.name) {
-          case 'unary-':
-            return canonicalize(makeDoubleConstant(-receiver.value));
-        }
-      } else if (arguments.length == 1) {
-        final Constant other = arguments[0];
-
-        if (other is IntConstant || other is DoubleConstant) {
-          final num value = (other is IntConstant)
-              ? other.value
-              : (other as DoubleConstant).value;
-          return evaluateBinaryNumericOperation(
-              node.name.name, receiver.value, value, node);
-        }
-        throw new _AbortCurrentEvaluation(
-            errorReporter.invalidBinaryOperandType(
-                contextChain,
-                node,
-                receiver,
-                '${node.name.name}',
-                typeEnvironment.numType,
-                other.getType(typeEnvironment)));
-      }
-    }
-    throw new _AbortCurrentEvaluation(errorReporter.invalidMethodInvocation(
-        contextChain, node, receiver, node.name.name));
-  }
-
-  visitLogicalExpression(LogicalExpression node) {
-    final Constant left = _evaluateSubexpression(node.left);
-    if (left is UnevaluatedConstant) {
-      return unevaluated(
-          node,
-          new LogicalExpression(unique(left.expression), node.operator,
-              cloner.clone(node.right)));
-    }
-    switch (node.operator) {
-      case '||':
-        if (left is BoolConstant) {
-          if (left.value) return trueConstant;
-
-          final Constant right = _evaluateSubexpression(node.right);
-          if (right is BoolConstant || right is UnevaluatedConstant) {
-            return right;
-          }
-
-          throw new _AbortCurrentEvaluation(
-              errorReporter.invalidBinaryOperandType(
-                  contextChain,
-                  node,
-                  left,
-                  '${node.operator}',
-                  typeEnvironment.boolType,
-                  right.getType(typeEnvironment)));
-        }
-        throw new _AbortCurrentEvaluation(errorReporter.invalidMethodInvocation(
-            contextChain, node, left, '${node.operator}'));
-      case '&&':
-        if (left is BoolConstant) {
-          if (!left.value) return falseConstant;
-
-          final Constant right = _evaluateSubexpression(node.right);
-          if (right is BoolConstant || right is UnevaluatedConstant) {
-            return right;
-          }
-
-          throw new _AbortCurrentEvaluation(
-              errorReporter.invalidBinaryOperandType(
-                  contextChain,
-                  node,
-                  left,
-                  '${node.operator}',
-                  typeEnvironment.boolType,
-                  right.getType(typeEnvironment)));
-        }
-        throw new _AbortCurrentEvaluation(errorReporter.invalidMethodInvocation(
-            contextChain, node, left, '${node.operator}'));
-      case '??':
-        return (left is! NullConstant)
-            ? left
-            : _evaluateSubexpression(node.right);
-      default:
-        throw new _AbortCurrentEvaluation(errorReporter.invalidMethodInvocation(
-            contextChain, node, left, '${node.operator}'));
-    }
-  }
-
-  visitConditionalExpression(ConditionalExpression node) {
-    final Constant condition = _evaluateSubexpression(node.condition);
-    if (condition == trueConstant) {
-      return _evaluateSubexpression(node.then);
-    } else if (condition == falseConstant) {
-      return _evaluateSubexpression(node.otherwise);
-    } else if (condition is UnevaluatedConstant) {
-      return unevaluated(
-          node,
-          new ConditionalExpression(
-              unique(condition.expression),
-              cloner.clone(node.then),
-              cloner.clone(node.otherwise),
-              node.staticType));
-    } else {
-      throw new _AbortCurrentEvaluation(errorReporter.invalidDartType(
-          contextChain, node, condition, typeEnvironment.boolType));
-    }
-  }
-
-  visitPropertyGet(PropertyGet node) {
-    if (node.receiver is ThisExpression) {
-      // Access "this" during instance creation.
-      for (final Field field in instanceBuilder.fields.keys) {
-        if (field.name == node.name) {
-          return instanceBuilder.fields[field];
-        }
-      }
-      throw 'Could not evaluate field get ${node.name} on incomplete instance';
-    }
-
-    final Constant receiver = _evaluateSubexpression(node.receiver);
-    if (receiver is StringConstant && node.name.name == 'length') {
-      return canonicalize(new IntConstant(receiver.value.length));
-    } else if (receiver is InstanceConstant) {
-      for (final Reference fieldRef in receiver.fieldValues.keys) {
-        if (fieldRef.asField.name == node.name) {
-          return receiver.fieldValues[fieldRef];
-        }
-      }
-    } else if (receiver is UnevaluatedConstant) {
-      return unevaluated(
-          node,
-          new PropertyGet(
-              unique(receiver.expression), node.name, node.interfaceTarget));
-    }
-    throw 'Could not evaluate property get on $receiver.';
-  }
-
-  visitLet(Let node) {
-    env.addVariableValue(
-        node.variable, _evaluateSubexpression(node.variable.initializer));
-    return _evaluateSubexpression(node.body);
-  }
-
-  visitVariableGet(VariableGet node) {
-    // Not every variable which a [VariableGet] refers to must be marked as
-    // constant.  For example function parameters as well as constructs
-    // desugared to [Let] expressions are ok.
-    //
-    // TODO(kustermann): The heuristic of allowing all [VariableGet]s on [Let]
-    // variables might allow more than it should.
-    final VariableDeclaration variable = node.variable;
-    if (variable.parent is Let || _isFormalParameter(variable)) {
-      final Constant constant = env.lookupVariable(node.variable);
-      if (constant == null) {
-        throw new _AbortCurrentEvaluation(errorReporter.nonConstantVariableGet(
-            contextChain, node, variable.name));
-      }
-      return constant;
-    }
-    if (variable.isConst) {
-      return _evaluateSubexpression(variable.initializer);
-    }
-    throw new Exception('The front-end should ensure we do not encounter a '
-        'variable get of a non-const variable.');
-  }
-
-  visitStaticGet(StaticGet node) {
-    return withNewEnvironment(() {
-      final Member target = node.target;
-      if (target is Field) {
-        if (target.isConst) {
-          if (target.isInExternalLibrary && target.initializer == null) {
-            // The variable is unavailable due to separate compilation.
-            return unevaluated(node, new StaticGet(target));
-          }
-          return runInsideContext(target, () {
-            return _evaluateSubexpression(target.initializer);
-          });
-        }
-        throw new _AbortCurrentEvaluation(
-            errorReporter.invalidStaticInvocation(contextChain, node, target));
-      } else if (target is Procedure) {
-        if (target.kind == ProcedureKind.Method) {
-          return canonicalize(new TearOffConstant(target));
-        }
-        throw new _AbortCurrentEvaluation(
-            errorReporter.invalidStaticInvocation(contextChain, node, target));
-      } else {
-        throw new Exception(
-            'No support for ${target.runtimeType} in a static-get.');
-      }
-    });
-  }
-
-  visitStringConcatenation(StringConcatenation node) {
-    final List<Object> concatenated = <Object>[new StringBuffer()];
-    for (int i = 0; i < node.expressions.length; i++) {
-      Constant constant = _evaluateSubexpression(node.expressions[i]);
-      if (constant is PrimitiveConstant) {
-        String value = constant.value.toString();
-        Object last = concatenated.last;
-        if (last is StringBuffer) {
-          last.write(value);
-        } else {
-          concatenated.add(new StringBuffer(value));
-        }
-      } else if (constant is UnevaluatedConstant) {
-        concatenated.add(constant);
-      } else {
-        throw new _AbortCurrentEvaluation(errorReporter
-            .invalidStringInterpolationOperand(contextChain, node, constant));
-      }
-    }
-    if (concatenated.length > 1) {
-      final expressions = new List<Expression>(concatenated.length);
-      for (int i = 0; i < concatenated.length; i++) {
-        Object value = concatenated[i];
-        if (value is UnevaluatedConstant) {
-          expressions[i] = unique(value.expression);
-        } else {
-          expressions[i] = new ConstantExpression(
-              canonicalize(new StringConstant(value.toString())));
-        }
-      }
-      return unevaluated(node, new StringConcatenation(expressions));
-    }
-    return canonicalize(new StringConstant(concatenated.single.toString()));
-  }
-
-  visitStaticInvocation(StaticInvocation node) {
-    final Procedure target = node.target;
-    final Arguments arguments = node.arguments;
-    final positionals = evaluatePositionalArguments(arguments);
-    final named = evaluateNamedArguments(arguments);
-    if (hasUnevaluatedChild(node)) {
-      return unevaluated(
-          node,
-          new StaticInvocation(
-              target, unevaluatedArguments(positionals, named, arguments.types),
-              isConst: true));
-    }
-    if (target.kind == ProcedureKind.Factory) {
-      if (target.isConst &&
-          target.name.name == "fromEnvironment" &&
-          target.enclosingLibrary == coreTypes.coreLibrary &&
-          positionals.length == 1) {
-        if (environmentDefines != null) {
-          // Evaluate environment constant.
-          Constant name = positionals.single;
-          if (name is StringConstant) {
-            String value = environmentDefines[name.value];
-            Constant defaultValue = named["defaultValue"];
-
-            if (target.enclosingClass == coreTypes.boolClass) {
-              Constant boolConstant = value == "true"
-                  ? trueConstant
-                  : value == "false"
-                      ? falseConstant
-                      : defaultValue is BoolConstant
-                          ? defaultValue.value ? trueConstant : falseConstant
-                          : defaultValue is NullConstant
-                              ? nullConstant
-                              : falseConstant;
-              return boolConstant;
-            } else if (target.enclosingClass == coreTypes.intClass) {
-              int intValue = value != null ? int.tryParse(value) : null;
-              intValue ??=
-                  defaultValue is IntConstant ? defaultValue.value : null;
-              if (intValue == null) return nullConstant;
-              return canonicalize(new IntConstant(intValue));
-            } else if (target.enclosingClass == coreTypes.stringClass) {
-              value ??=
-                  defaultValue is StringConstant ? defaultValue.value : null;
-              if (value == null) return nullConstant;
-              return canonicalize(new StringConstant(value));
-            }
-          }
-          // TODO(askesc): Give more meaningful error message if name is null.
-        } else {
-          // Leave environment constant unevaluated.
-          return unevaluated(
-              node,
-              new StaticInvocation(target,
-                  unevaluatedArguments(positionals, named, arguments.types),
-                  isConst: true));
-        }
-      }
-    } else if (target.name.name == 'identical') {
-      // Ensure the "identical()" function comes from dart:core.
-      final parent = target.parent;
-      if (parent is Library && parent == coreTypes.coreLibrary) {
-        final Constant left = positionals[0];
-        final Constant right = positionals[1];
-        // Since we canonicalize constants during the evaluation, we can use
-        // identical here.
-        return identical(left, right) ? trueConstant : falseConstant;
-      }
-    }
-    throw new _AbortCurrentEvaluation(
-        errorReporter.invalidStaticInvocation(contextChain, node, target));
-  }
-
-  visitAsExpression(AsExpression node) {
-    final Constant constant = _evaluateSubexpression(node.operand);
-    if (constant is UnevaluatedConstant) {
-      return unevaluated(
-          node, new AsExpression(unique(constant.expression), node.type));
-    }
-    ensureIsSubtype(constant, evaluateDartType(node, node.type), node);
-    return constant;
-  }
-
-  visitNot(Not node) {
-    final Constant constant = _evaluateSubexpression(node.operand);
-    if (constant is BoolConstant) {
-      return constant == trueConstant ? falseConstant : trueConstant;
-    }
-    if (constant is UnevaluatedConstant) {
-      return unevaluated(node, new Not(unique(constant.expression)));
-    }
-    throw new _AbortCurrentEvaluation(errorReporter.invalidDartType(
-        contextChain, node, constant, typeEnvironment.boolType));
-  }
-
-  visitSymbolLiteral(SymbolLiteral node) {
-    final libraryReference =
-        node.value.startsWith('_') ? libraryOf(node).reference : null;
-    return canonicalize(new SymbolConstant(node.value, libraryReference));
-  }
-
-  visitInstantiation(Instantiation node) {
-    final Constant constant = _evaluateSubexpression(node.expression);
-    if (constant is TearOffConstant) {
-      if (node.typeArguments.length ==
-          constant.procedure.function.typeParameters.length) {
-        final typeArguments = evaluateDartTypes(node, node.typeArguments);
-        return canonicalize(
-            new PartialInstantiationConstant(constant, typeArguments));
-      }
-      throw new Exception(
-          'The number of type arguments supplied in the partial instantiation '
-          'does not match the number of type arguments of the $constant.');
-    }
-    if (constant is UnevaluatedConstant) {
-      return unevaluated(node,
-          new Instantiation(unique(constant.expression), node.typeArguments));
-    }
-    throw new Exception(
-        'Only tear-off constants can be partially instantiated.');
-  }
-
-  @override
-  visitCheckLibraryIsLoaded(CheckLibraryIsLoaded node) {
-    throw new _AbortCurrentEvaluation(
-        errorReporter.deferredLibrary(contextChain, node, node.import.name));
-  }
-
-  // Helper methods:
-
-  Constant makeDoubleConstant(double value) {
-    if (targetingJavaScript) {
-      // Convert to an integer when possible (matching the runtime behavior
-      // of `is int`).
-      if (value.isFinite) {
-        var i = value.toInt();
-        if (value == i.toDouble()) return new IntConstant(i);
-      }
-    }
-    return new DoubleConstant(value);
-  }
-
-  void ensureIsSubtype(Constant constant, DartType type, TreeNode node) {
-    DartType constantType = constant.getType(typeEnvironment);
-
-    if (!typeEnvironment.isSubtypeOf(constantType, type)) {
-      throw new _AbortCurrentEvaluation(
-          errorReporter.invalidDartType(contextChain, node, constant, type));
-    }
-  }
-
-  List<DartType> evaluateTypeArguments(TreeNode node, Arguments arguments) {
-    return evaluateDartTypes(node, arguments.types);
-  }
-
-  List<DartType> evaluateSuperTypeArguments(TreeNode node, Supertype type) {
-    return evaluateDartTypes(node, type.typeArguments);
-  }
-
-  List<DartType> evaluateDartTypes(TreeNode node, List<DartType> types) {
-    // TODO: Once the frontend gurantees that there are no free type variables
-    // left over after stubstitution, we can enable this shortcut again:
-    // if (env.isEmpty) return types;
-    return types.map((t) => evaluateDartType(node, t)).toList();
-  }
-
-  DartType evaluateDartType(TreeNode node, DartType type) {
-    final result = env.subsituteType(type);
-
-    if (!isInstantiated(result)) {
-      throw new _AbortCurrentEvaluation(
-          errorReporter.freeTypeParameter(contextChain, node, type));
-    }
-
-    return result;
-  }
-
-  List<Constant> evaluatePositionalArguments(Arguments arguments) {
-    return arguments.positional.map((Expression node) {
-      return _evaluateSubexpression(node);
-    }).toList();
-  }
-
-  Map<String, Constant> evaluateNamedArguments(Arguments arguments) {
-    if (arguments.named.isEmpty) return const <String, Constant>{};
-
-    final Map<String, Constant> named = {};
-    arguments.named.forEach((NamedExpression pair) {
-      named[pair.name] = _evaluateSubexpression(pair.value);
-    });
-    return named;
-  }
-
-  Arguments unevaluatedArguments(List<Constant> positionalArgs,
-      Map<String, Constant> namedArgs, List<DartType> types) {
-    final positional = new List<Expression>(positionalArgs.length);
-    final named = new List<NamedExpression>(namedArgs.length);
-    for (int i = 0; i < positionalArgs.length; ++i) {
-      positional[i] = unique(positionalArgs[i].asExpression());
-    }
-    int i = 0;
-    namedArgs.forEach((String name, Constant value) {
-      named[i++] = new NamedExpression(name, unique(value.asExpression()));
-    });
-    return new Arguments(positional, named: named, types: types);
-  }
-
-  Constant canonicalize(Constant constant) {
-    return canonicalizationCache.putIfAbsent(constant, () => constant);
-  }
-
-  withNewInstanceBuilder(Class klass, List<DartType> typeArguments, fn()) {
-    InstanceBuilder old = instanceBuilder;
-    try {
-      instanceBuilder = new InstanceBuilder(klass, typeArguments);
-      return fn();
-    } finally {
-      instanceBuilder = old;
-    }
-  }
-
-  withNewEnvironment(fn()) {
-    final EvaluationEnvironment oldEnv = env;
-    try {
-      env = new EvaluationEnvironment();
-      return fn();
-    } finally {
-      env = oldEnv;
-    }
-  }
-
-  Constant evaluateBinaryNumericOperation(
-      String op, num a, num b, TreeNode node) {
-    if (targetingJavaScript) {
-      a = a.toDouble();
-      b = b.toDouble();
-    }
-    num result;
-    switch (op) {
-      case '+':
-        result = a + b;
-        break;
-      case '-':
-        result = a - b;
-        break;
-      case '*':
-        result = a * b;
-        break;
-      case '/':
-        result = a / b;
-        break;
-      case '~/':
-        result = a ~/ b;
-        break;
-      case '%':
-        result = a % b;
-        break;
-    }
-
-    if (result is int) {
-      return canonicalize(new IntConstant(result.toSigned(64)));
-    }
-    if (result is double) {
-      return canonicalize(makeDoubleConstant(result));
-    }
-
-    switch (op) {
-      case '<':
-        return a < b ? trueConstant : falseConstant;
-      case '<=':
-        return a <= b ? trueConstant : falseConstant;
-      case '>=':
-        return a >= b ? trueConstant : falseConstant;
-      case '>':
-        return a > b ? trueConstant : falseConstant;
-    }
-
-    throw new Exception("Unexpected binary numeric operation '$op'.");
-  }
-
-  Library libraryOf(TreeNode node) {
-    // The tree structure of the kernel AST ensures we always have an enclosing
-    // library.
-    while (true) {
-      if (node is Library) return node;
-      node = node.parent;
-    }
-  }
-}
-
-/// Holds the necessary information for a constant object, namely
-///   * the [klass] being instantiated
-///   * the [typeArguments] used for the instantiation
-///   * the [fields] the instance will obtain (all fields from the
-///     instantiated [klass] up to the [Object] klass).
-class InstanceBuilder {
-  /// The class of the new instance.
-  final Class klass;
-
-  /// The values of the type parameters of the new instance.
-  final List<DartType> typeArguments;
-
-  /// The field values of the new instance.
-  final Map<Field, Constant> fields = <Field, Constant>{};
-
-  InstanceBuilder(this.klass, this.typeArguments);
-
-  void setFieldValue(Field field, Constant constant) {
-    fields[field] = constant;
-  }
-
-  InstanceConstant buildInstance() {
-    final Map<Reference, Constant> fieldValues = <Reference, Constant>{};
-    fields.forEach((Field field, Constant value) {
-      fieldValues[field.reference] = value;
-    });
-    return new InstanceConstant(klass.reference, typeArguments, fieldValues);
-  }
-}
-
-/// Holds an environment of type parameters, parameters and variables.
-class EvaluationEnvironment {
-  /// The values of the type parameters in scope.
-  final Map<TypeParameter, DartType> _typeVariables =
-      <TypeParameter, DartType>{};
-
-  /// The values of the parameters/variables in scope.
-  final Map<VariableDeclaration, Constant> _variables =
-      <VariableDeclaration, Constant>{};
-
-  /// Whether the current environment is empty.
-  bool get isEmpty => _typeVariables.isEmpty && _variables.isEmpty;
-
-  void addTypeParameterValue(TypeParameter parameter, DartType value) {
-    assert(!_typeVariables.containsKey(parameter));
-    _typeVariables[parameter] = value;
-  }
-
-  void addVariableValue(VariableDeclaration variable, Constant value) {
-    assert(!_variables.containsKey(variable));
-    _variables[variable] = value;
-  }
-
-  DartType lookupParameterValue(TypeParameter parameter) {
-    final DartType value = _typeVariables[parameter];
-    assert(value != null);
-    return value;
-  }
-
-  Constant lookupVariable(VariableDeclaration variable) {
-    return _variables[variable];
-  }
-
-  DartType subsituteType(DartType type) {
-    if (_typeVariables.isEmpty) return type;
-    return substitute(type, _typeVariables);
-  }
-}
-
-/// The different kinds of number semantics supported by the constant evaluator.
-enum NumberSemantics {
-  /// Dart VM number semantics.
-  vm,
-
-  /// JavaScript (Dart2js and DDC) number semantics.
-  js,
-}
-
-// Backend specific constant evaluation behavior
-class ConstantsBackend {
-  const ConstantsBackend();
-
-  /// Lowering of a list constant to a backend-specific representation.
-  Constant lowerListConstant(ListConstant constant) => constant;
-
-  /// Lowering of a set constant to a backend-specific representation.
-  Constant lowerSetConstant(SetConstant constant) => constant;
-
-  /// Lowering of a map constant to a backend-specific representation.
-  Constant lowerMapConstant(MapConstant constant) => constant;
-
-  /// Number semantics to use for this backend.
-  NumberSemantics get numberSemantics => NumberSemantics.vm;
-}
-
-// Used as control-flow to abort the current evaluation.
-class _AbortCurrentEvaluation {
-  final String message;
-  _AbortCurrentEvaluation(this.message);
-}
-
-abstract class ErrorReporter {
-  const ErrorReporter();
-
-  Uri getFileUri(TreeNode node) {
-    while (node is! FileUriNode) {
-      node = node.parent;
-    }
-    return (node as FileUriNode).fileUri;
-  }
-
-  int getFileOffset(TreeNode node) {
-    while (node.fileOffset == TreeNode.noOffset) {
-      node = node.parent;
-    }
-    return node == null ? TreeNode.noOffset : node.fileOffset;
-  }
-
-  String freeTypeParameter(
-      List<TreeNode> context, TreeNode node, DartType type);
-  String invalidDartType(List<TreeNode> context, TreeNode node,
-      Constant receiver, DartType expectedType);
-  String invalidBinaryOperandType(List<TreeNode> context, TreeNode node,
-      Constant receiver, String op, DartType expectedType, DartType actualType);
-  String invalidMethodInvocation(
-      List<TreeNode> context, TreeNode node, Constant receiver, String op);
-  String invalidStaticInvocation(
-      List<TreeNode> context, TreeNode node, Member target);
-  String invalidStringInterpolationOperand(
-      List<TreeNode> context, TreeNode node, Constant constant);
-  String invalidSymbolName(
-      List<TreeNode> context, TreeNode node, Constant constant);
-  String zeroDivisor(
-      List<TreeNode> context, TreeNode node, IntConstant receiver, String op);
-  String negativeShift(List<TreeNode> context, TreeNode node,
-      IntConstant receiver, String op, IntConstant argument);
-  String nonConstLiteral(List<TreeNode> context, TreeNode node, String klass);
-  String duplicateKey(List<TreeNode> context, TreeNode node, Constant key);
-  String failedAssertion(List<TreeNode> context, TreeNode node, String message);
-  String nonConstantVariableGet(
-      List<TreeNode> context, TreeNode node, String variableName);
-  String deferredLibrary(
-      List<TreeNode> context, TreeNode node, String importName);
-  String circularity(List<TreeNode> context, TreeNode node);
-}
-
-class SimpleErrorReporter extends ErrorReporter {
-  const SimpleErrorReporter();
-
-  String report(List<TreeNode> context, String what, TreeNode node) {
-    io.exitCode = 42;
-    final Uri uri = getFileUri(node);
-    final int fileOffset = getFileOffset(node);
-    final String message = '$uri:$fileOffset Constant evaluation error: $what';
-    io.stderr.writeln(message);
-    return message;
-  }
-
-  @override
-  String freeTypeParameter(
-      List<TreeNode> context, TreeNode node, DartType type) {
-    return report(
-        context, 'Expected type to be instantiated but was ${type}', node);
-  }
-
-  @override
-  String invalidDartType(List<TreeNode> context, TreeNode node,
-      Constant receiver, DartType expectedType) {
-    return report(
-        context,
-        'Expected expression to evaluate to "$expectedType" but got "$receiver.',
-        node);
-  }
-
-  @override
-  String invalidBinaryOperandType(
-      List<TreeNode> context,
-      TreeNode node,
-      Constant receiver,
-      String op,
-      DartType expectedType,
-      DartType actualType) {
-    return report(
-        context,
-        'Calling "$op" on "$receiver" needs operand of type '
-        '"$expectedType" (but got "$actualType")',
-        node);
-  }
-
-  @override
-  String invalidMethodInvocation(
-      List<TreeNode> context, TreeNode node, Constant receiver, String op) {
-    return report(context,
-        'Cannot call "$op" on "$receiver" in constant expression', node);
-  }
-
-  @override
-  String invalidStaticInvocation(
-      List<TreeNode> context, TreeNode node, Member target) {
-    return report(
-        context, 'Cannot invoke "$target" inside a constant expression', node);
-  }
-
-  @override
-  String invalidStringInterpolationOperand(
-      List<TreeNode> context, TreeNode node, Constant constant) {
-    return report(
-        context,
-        'Only null/bool/int/double/String values are allowed as string '
-        'interpolation expressions during constant evaluation (was: "$constant").',
-        node);
-  }
-
-  @override
-  String invalidSymbolName(
-      List<TreeNode> context, TreeNode node, Constant constant) {
-    return report(
-        context,
-        'The symbol name must be a valid public Dart member name, public '
-        'constructor name, or library name, optionally qualified.',
-        node);
-  }
-
-  @override
-  String zeroDivisor(
-      List<TreeNode> context, TreeNode node, IntConstant receiver, String op) {
-    return report(
-        context,
-        "Binary operator '$op' on '${receiver.value}' requires non-zero "
-        "divisor, but divisor was '0'.",
-        node);
-  }
-
-  @override
-  String negativeShift(List<TreeNode> context, TreeNode node,
-      IntConstant receiver, String op, IntConstant argument) {
-    return report(
-        context,
-        "Binary operator '$op' on '${receiver.value}' requires non-negative "
-        "operand, but was '${argument.value}'.",
-        node);
-  }
-
-  @override
-  String nonConstLiteral(List<TreeNode> context, TreeNode node, String klass) {
-    return report(
-        context,
-        'Cannot have a non-constant $klass literal within a const context.',
-        node);
-  }
-
-  @override
-  String duplicateKey(List<TreeNode> context, TreeNode node, Constant key) {
-    return report(
-        context,
-        'Duplicate keys are not allowed in constant maps (found duplicate key "$key")',
-        node);
-  }
-
-  @override
-  String failedAssertion(
-      List<TreeNode> context, TreeNode node, String message) {
-    return report(
-        context,
-        'The assertion condition evaluated to "false" with message "$message"',
-        node);
-  }
-
-  @override
-  String nonConstantVariableGet(
-      List<TreeNode> context, TreeNode node, String variableName) {
-    return report(
-        context,
-        'The variable "$variableName" cannot be used inside a constant '
-        'expression.',
-        node);
-  }
-
-  @override
-  String deferredLibrary(
-      List<TreeNode> context, TreeNode node, String importName) {
-    return report(
-        context,
-        'Deferred "$importName" cannot be used inside a constant '
-        'expression',
-        node);
-  }
-
-  @override
-  String circularity(List<TreeNode> context, TreeNode node) {
-    return report(context, 'Constant expression depends on itself.', node);
-  }
-}
-
-class IsInstantiatedVisitor extends DartTypeVisitor<bool> {
-  final _availableVariables = new Set<TypeParameter>();
-
-  bool isInstantiated(DartType type) {
-    return type.accept(this);
-  }
-
-  bool defaultDartType(DartType node) {
-    throw 'A visitor method seems to be unimplemented!';
-  }
-
-  bool visitInvalidType(InvalidType node) => true;
-  bool visitDynamicType(DynamicType node) => true;
-  bool visitVoidType(VoidType node) => true;
-  bool visitBottomType(BottomType node) => true;
-
-  bool visitTypeParameterType(TypeParameterType node) {
-    return _availableVariables.contains(node.parameter);
-  }
-
-  bool visitInterfaceType(InterfaceType node) {
-    return node.typeArguments
-        .every((DartType typeArgument) => typeArgument.accept(this));
-  }
-
-  bool visitFunctionType(FunctionType node) {
-    final parameters = node.typeParameters;
-    _availableVariables.addAll(parameters);
-    final bool result = node.returnType.accept(this) &&
-        node.positionalParameters.every((p) => p.accept(this)) &&
-        node.namedParameters.every((p) => p.type.accept(this));
-    _availableVariables.removeAll(parameters);
-    return result;
-  }
-
-  bool visitTypedefType(TypedefType node) {
-    return node.unalias.accept(this);
-  }
-}
-
-bool _isFormalParameter(VariableDeclaration variable) {
-  final parent = variable.parent;
-  if (parent is FunctionNode) {
-    return parent.positionalParameters.contains(variable) ||
-        parent.namedParameters.contains(variable);
-  }
-  return false;
-}
diff --git a/pkg/kernel/lib/visitor.dart b/pkg/kernel/lib/visitor.dart
index 0cecee1..388f3cf 100644
--- a/pkg/kernel/lib/visitor.dart
+++ b/pkg/kernel/lib/visitor.dart
@@ -288,6 +288,8 @@
 }
 
 class ConstantVisitor<R> {
+  const ConstantVisitor();
+
   R defaultConstant(Constant node) => null;
 
   R visitNullConstant(NullConstant node) => defaultConstant(node);
diff --git a/pkg/kernel/lib/vm/constants_native_effects.dart b/pkg/kernel/lib/vm/constants_native_effects.dart
index 9a9c9c8..2dc607d 100644
--- a/pkg/kernel/lib/vm/constants_native_effects.dart
+++ b/pkg/kernel/lib/vm/constants_native_effects.dart
@@ -5,7 +5,7 @@
 library vm.constants_native_effects;
 
 import '../ast.dart';
-import '../transformations/constants.dart';
+import '../target/targets.dart';
 import '../core_types.dart';
 
 class VmConstantsBackend extends ConstantsBackend {
diff --git a/pkg/kernel/pubspec.yaml b/pkg/kernel/pubspec.yaml
index 6072c7e..d9d4a46 100644
--- a/pkg/kernel/pubspec.yaml
+++ b/pkg/kernel/pubspec.yaml
@@ -1,7 +1,7 @@
 name: kernel
 # Currently, kernel API is not stable and users should
 # not depend on semver semantics when depending on this package.
-version: 0.3.14
+version: 0.3.15
 author: Dart Team <misc@dartlang.org>
 description: Dart IR (Intermediate Representation)
 homepage: https://github.com/dart-lang/sdk/tree/master/pkg/kernel
diff --git a/pkg/vm/lib/bytecode/ast_remover.dart b/pkg/vm/lib/bytecode/ast_remover.dart
index 17adabc..e7a28d1 100644
--- a/pkg/vm/lib/bytecode/ast_remover.dart
+++ b/pkg/vm/lib/bytecode/ast_remover.dart
@@ -11,64 +11,171 @@
 /// Can preserve removed AST and restore it if needed.
 class ASTRemover extends Transformer {
   final BytecodeMetadataRepository metadata;
-  final droppedAST = <Member, dynamic>{};
+  final stashes = <Node, _Stash>{};
 
   ASTRemover(Component component)
-      : metadata = component.metadata[new BytecodeMetadataRepository().tag];
+      : metadata = component.metadata[new BytecodeMetadataRepository().tag] {
+    stashes[component] = new _ComponentStash(component.mainMethod,
+        new Map<String, MetadataRepository<dynamic>>.from(component.metadata));
+    component.mainMethod = null;
+    component.metadata.removeWhere((tag, md) => tag != metadata.tag);
+  }
 
   @override
-  TreeNode defaultMember(Member node) {
-    if (_hasBytecode(node)) {
-      if (node is Field) {
-        droppedAST[node] = node.initializer;
-        node.initializer = null;
-      } else if (node is Constructor) {
-        droppedAST[node] =
-            new _DroppedConstructor(node.initializers, node.function.body);
-        node.initializers = <Initializer>[];
-        node.function.body = null;
-      } else if (node.function != null) {
-        droppedAST[node] = node.function.body;
-        node.function.body = null;
-      }
-    }
+  visitLibrary(Library node) {
+    stashes[node] = new _LibraryStash(
+        new List<Expression>.from(node.annotations),
+        new List<Field>.from(node.fields),
+        new List<Procedure>.from(node.procedures),
+        new List<Reference>.from(node.additionalExports));
 
-    // Instance field initializers do not form separate functions, and bytecode
-    // is not attached to instance fields (it is included into constructors).
-    // When VM reads a constructor from kernel, it also reads and translates
-    // instance field initializers. So, their ASTs can be dropped only if
-    // bytecode was generated for all generative constructors.
-    if (node is Field && !node.isStatic && node.initializer != null) {
-      if (node.enclosingClass.constructors.every(_hasBytecode)) {
-        droppedAST[node] = node.initializer;
-        node.initializer = null;
-      }
-    }
+    node.annotations.clear();
+    node.fields.clear();
+    node.procedures.clear();
+    node.additionalExports.clear();
+
+    super.visitLibrary(node);
 
     return node;
   }
 
-  bool _hasBytecode(Member node) =>
-      metadata != null && metadata.mapping.containsKey(node);
+  @override
+  visitLibraryDependency(LibraryDependency node) {
+    stashes[node] = new _LibraryDependencyStash(
+        new List<Expression>.from(node.annotations));
+
+    node.annotations.clear();
+
+    super.visitLibraryDependency(node);
+
+    return node;
+  }
+
+  // Still referenced from function types which may appear in class supertypes.
+  @override
+  visitTypedef(Typedef node) {
+    stashes[node] = new _TypedefStash(node.annotations);
+
+    node.annotations = const <Expression>[];
+
+    super.visitTypedef(node);
+
+    // TODO(alexmarkov): fix Typedef visitor to visit these fields.
+    transformList(node.positionalParameters, this, node);
+    transformList(node.namedParameters, this, node);
+
+    return node;
+  }
+
+  // May appear in typedefs.
+  @override
+  visitVariableDeclaration(VariableDeclaration node) {
+    stashes[node] = new _VariableDeclarationStash(node.annotations);
+
+    node.annotations = const <Expression>[];
+
+    super.visitVariableDeclaration(node);
+
+    return node;
+  }
+
+  @override
+  visitClass(Class node) {
+    stashes[node] = new _ClassStash(
+        node.annotations,
+        new List<Field>.from(node.fields),
+        new List<Procedure>.from(node.procedures),
+        new List<Constructor>.from(node.constructors));
+
+    node.annotations = const <Expression>[];
+    node.fields.clear();
+    node.procedures.clear();
+    node.constructors.clear();
+
+    super.visitClass(node);
+
+    return node;
+  }
 
   void restoreAST() {
-    droppedAST.forEach((Member node, dynamic dropped) {
-      if (node is Field) {
-        node.initializer = dropped;
-      } else if (node is Constructor) {
-        _DroppedConstructor droppedConstructor = dropped;
-        node.initializers = droppedConstructor.initializers;
-        node.function.body = droppedConstructor.body;
+    stashes.forEach((Node node, _Stash stash) {
+      if (node is Component) {
+        _ComponentStash componentStash = stash as _ComponentStash;
+        node.mainMethod = componentStash.mainMethod;
+        node.metadata.addAll(componentStash.metadata);
+      } else if (node is Library) {
+        _LibraryStash libraryStash = stash as _LibraryStash;
+        node.annotations.addAll(libraryStash.annotations);
+        node.fields.addAll(libraryStash.fields);
+        node.procedures.addAll(libraryStash.procedures);
+        node.additionalExports.addAll(libraryStash.additionalExports);
+      } else if (node is LibraryDependency) {
+        _LibraryDependencyStash libraryDependencyStash =
+            stash as _LibraryDependencyStash;
+        node.annotations.addAll(libraryDependencyStash.annotations);
+      } else if (node is Typedef) {
+        _TypedefStash typedefStash = stash as _TypedefStash;
+        node.annotations = typedefStash.annotations;
+      } else if (node is VariableDeclaration) {
+        _VariableDeclarationStash variableDeclarationStash =
+            stash as _VariableDeclarationStash;
+        node.annotations = variableDeclarationStash.annotations;
+      } else if (node is Class) {
+        _ClassStash classStash = stash as _ClassStash;
+        node.annotations = classStash.annotations;
+        node.fields.addAll(classStash.fields);
+        node.procedures.addAll(classStash.procedures);
+        node.constructors.addAll(classStash.constructors);
       } else {
-        node.function.body = dropped;
+        throw 'Unexpected ${node.runtimeType} $node';
       }
     });
   }
 }
 
-class _DroppedConstructor {
-  final List<Initializer> initializers;
-  final Statement body;
+abstract class _Stash {}
 
-  _DroppedConstructor(this.initializers, this.body);
+class _ClassStash extends _Stash {
+  final List<Expression> annotations;
+  final List<Field> fields;
+  final List<Procedure> procedures;
+  final List<Constructor> constructors;
+
+  _ClassStash(
+      this.annotations, this.fields, this.procedures, this.constructors);
+}
+
+class _LibraryStash extends _Stash {
+  final List<Expression> annotations;
+  final List<Field> fields;
+  final List<Procedure> procedures;
+  final List<Reference> additionalExports;
+
+  _LibraryStash(
+      this.annotations, this.fields, this.procedures, this.additionalExports);
+}
+
+class _LibraryDependencyStash extends _Stash {
+  final List<Expression> annotations;
+
+  _LibraryDependencyStash(this.annotations);
+}
+
+class _TypedefStash extends _Stash {
+  final List<Expression> annotations;
+
+  _TypedefStash(this.annotations);
+}
+
+class _VariableDeclarationStash extends _Stash {
+  final List<Expression> annotations;
+
+  _VariableDeclarationStash(this.annotations);
+}
+
+class _ComponentStash extends _Stash {
+  final Procedure mainMethod;
+  final Map<String, MetadataRepository<dynamic>> metadata;
+
+  _ComponentStash(this.mainMethod, this.metadata);
 }
diff --git a/pkg/vm/lib/bytecode/bytecode_serialization.dart b/pkg/vm/lib/bytecode/bytecode_serialization.dart
index fd577df..4845307 100644
--- a/pkg/vm/lib/bytecode/bytecode_serialization.dart
+++ b/pkg/vm/lib/bytecode/bytecode_serialization.dart
@@ -29,15 +29,17 @@
   final int formatVersion;
   final StringWriter stringWriter;
   final ObjectWriter objectWriter;
+  final LinkWriter linkWriter;
   final BytesBuilder bytes = new BytesBuilder();
   final int baseOffset;
 
-  BufferedWriter(this.formatVersion, this.stringWriter, this.objectWriter,
+  BufferedWriter(
+      this.formatVersion, this.stringWriter, this.objectWriter, this.linkWriter,
       {this.baseOffset: 0});
 
   factory BufferedWriter.fromWriter(BufferedWriter writer) =>
-      new BufferedWriter(
-          writer.formatVersion, writer.stringWriter, writer.objectWriter);
+      new BufferedWriter(writer.formatVersion, writer.stringWriter,
+          writer.objectWriter, writer.linkWriter);
 
   List<int> takeBytes() => bytes.takeBytes();
 
@@ -110,6 +112,11 @@
     }
   }
 
+  void writeLinkOffset(Object target) {
+    final offset = linkWriter.getOffset(target);
+    writePackedUInt30(offset);
+  }
+
   void align(int alignment) {
     assert(alignment & (alignment - 1) == 0);
     int offs = baseOffset + offset;
@@ -124,14 +131,15 @@
   int formatVersion;
   StringReader stringReader;
   ObjectReader objectReader;
+  LinkReader linkReader;
   final List<int> bytes;
   final int baseOffset;
 
   /// Position within [bytes], already includes [baseOffset].
   int _pos;
 
-  BufferedReader(
-      this.formatVersion, this.stringReader, this.objectReader, this.bytes,
+  BufferedReader(this.formatVersion, this.stringReader, this.objectReader,
+      this.linkReader, this.bytes,
       {this.baseOffset: 0})
       : _pos = baseOffset {
     assert((0 <= _pos) && (_pos <= bytes.length));
@@ -221,6 +229,11 @@
     return result;
   }
 
+  T readLinkOffset<T>() {
+    final offset = readPackedUInt30();
+    return linkReader.get<T>(offset);
+  }
+
   void align(int alignment) {
     assert(alignment & (alignment - 1) == 0);
     _pos = ((_pos + alignment - 1) & -alignment);
@@ -384,6 +397,37 @@
       "  (count: ${count.toString().padLeft(8)})";
 }
 
+class LinkWriter {
+  final _map = <Object, int>{};
+
+  void put(Object target, int offset) {
+    _map[target] = offset;
+  }
+
+  int getOffset(Object target) {
+    return _map[target] ??
+        (throw 'Offset of ${target.runtimeType} $target is not set');
+  }
+}
+
+class LinkReader {
+  final _map = <Type, Map<int, Object>>{};
+
+  void setOffset<T>(T target, int offset) {
+    final offsetToObject = (_map[T] ??= <int, Object>{});
+    final previous = offsetToObject[offset];
+    if (previous != null) {
+      throw 'Unable to associate offset $T/$offset with ${target.runtimeType} $target.'
+          ' It is already associated with ${previous.runtimeType} $previous';
+    }
+    offsetToObject[offset] = target;
+  }
+
+  T get<T>(int offset) {
+    return _map[T][offset] ?? (throw 'No object at offset $T/$offset');
+  }
+}
+
 class BytecodeSizeStatistics {
   static int componentSize = 0;
   static int objectTableSize = 0;
diff --git a/pkg/vm/lib/bytecode/dbc.dart b/pkg/vm/lib/bytecode/dbc.dart
index c4b55c6..f9b3aa8 100644
--- a/pkg/vm/lib/bytecode/dbc.dart
+++ b/pkg/vm/lib/bytecode/dbc.dart
@@ -8,16 +8,14 @@
 
 /// Version of bytecode format, produced by default.
 /// Before bumping current bytecode version format, make sure that
-/// all users have switched to a VM which is able to consume next
+/// all users have switched to a VM which is able to consume new
 /// version of bytecode.
-const int stableBytecodeFormatVersion = 2;
+const int currentBytecodeFormatVersion = 3;
 
-/// Version of bleeding edge bytecode format.
+/// Version of experimental / bleeding edge bytecode format.
 /// Produced by bytecode generator when --use-future-bytecode-format
 /// option is enabled.
-/// Should match kMaxSupportedBytecodeFormatVersion in
-/// runtime/vm/constants_kbc.h.
-const int futureBytecodeFormatVersion = stableBytecodeFormatVersion + 1;
+const int futureBytecodeFormatVersion = currentBytecodeFormatVersion + 1;
 
 /// Alignment of bytecode instructions.
 const int bytecodeInstructionsAlignment = 4;
diff --git a/pkg/vm/lib/bytecode/declarations.dart b/pkg/vm/lib/bytecode/declarations.dart
new file mode 100644
index 0000000..a028f6e
--- /dev/null
+++ b/pkg/vm/lib/bytecode/declarations.dart
@@ -0,0 +1,1041 @@
+// Copyright (c) 2019, the Dart project authors.  Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+library vm.bytecode.declarations;
+
+import 'package:kernel/ast.dart';
+import 'bytecode_serialization.dart'
+    show BufferedWriter, BufferedReader, BytecodeSizeStatistics, StringTable;
+import 'constant_pool.dart' show ConstantPool;
+import 'dbc.dart'
+    show
+        currentBytecodeFormatVersion,
+        futureBytecodeFormatVersion,
+        bytecodeInstructionsAlignment;
+import 'disassembler.dart' show BytecodeDisassembler;
+import 'exceptions.dart' show ExceptionsTable;
+import 'object_table.dart' show ObjectTable, ObjectHandle, NameAndType;
+import 'source_positions.dart' show SourcePositions;
+
+class Members {
+  final List<FieldDeclaration> fields;
+  final List<FunctionDeclaration> functions;
+
+  Members(this.fields, this.functions);
+
+  int countFunctions() {
+    int count = functions.length;
+    for (var field in fields) {
+      if ((field.flags & FieldDeclaration.hasGetterFlag) != 0) {
+        ++count;
+      }
+      if ((field.flags & FieldDeclaration.hasSetterFlag) != 0) {
+        ++count;
+      }
+    }
+    return count;
+  }
+
+  void write(BufferedWriter writer) {
+    writer.writePackedUInt30(countFunctions());
+    writer.writePackedUInt30(fields.length);
+    for (var field in fields) {
+      field.write(writer);
+    }
+    writer.writePackedUInt30(functions.length);
+    for (var func in functions) {
+      func.write(writer);
+    }
+  }
+
+  factory Members.read(BufferedReader reader) {
+    reader.readPackedUInt30(); // numFunctions
+    final fields = new List<FieldDeclaration>.generate(
+        reader.readPackedUInt30(), (_) => new FieldDeclaration.read(reader));
+    final functions = new List<FunctionDeclaration>.generate(
+        reader.readPackedUInt30(), (_) => new FunctionDeclaration.read(reader));
+    return new Members(fields, functions);
+  }
+
+  @override
+  String toString() => "\n"
+      "Members {\n"
+      "${fields.join('\n')}\n"
+      "${functions.join('\n')}"
+      "}\n";
+}
+
+class FieldDeclaration {
+  static const hasInitializerFlag = 1 << 0;
+  static const hasGetterFlag = 1 << 1;
+  static const hasSetterFlag = 1 << 2;
+  static const isReflectableFlag = 1 << 3;
+  static const isStaticFlag = 1 << 4;
+  static const isConstFlag = 1 << 5;
+  static const isFinalFlag = 1 << 6;
+  static const isCovariantFlag = 1 << 7;
+  static const isGenericCovariantImplFlag = 1 << 8;
+  static const hasSourcePositionsFlag = 1 << 9;
+  static const hasAnnotationsFlag = 1 << 10;
+  static const hasPragmaFlag = 1 << 11;
+  static const hasCustomScriptFlag = 1 << 12;
+
+  final int flags;
+  final ObjectHandle name;
+  final ObjectHandle type;
+  final ObjectHandle value;
+  final ObjectHandle script;
+  final int position;
+  final int endPosition;
+  final ObjectHandle getterName;
+  final ObjectHandle setterName;
+  final Code initializerCode;
+  final ObjectHandle annotations;
+
+  FieldDeclaration(
+      this.flags,
+      this.name,
+      this.type,
+      this.value,
+      this.script,
+      this.position,
+      this.endPosition,
+      this.getterName,
+      this.setterName,
+      this.initializerCode,
+      this.annotations);
+
+  void write(BufferedWriter writer) {
+    writer.writePackedUInt30(flags);
+    writer.writePackedObject(name);
+    writer.writePackedObject(type);
+
+    if ((flags & hasCustomScriptFlag) != 0) {
+      writer.writePackedObject(script);
+    }
+    if ((flags & hasSourcePositionsFlag) != 0) {
+      writer.writePackedUInt30(position + 1);
+      writer.writePackedUInt30(endPosition + 1);
+    }
+    if ((flags & hasInitializerFlag) != 0 && (flags & isStaticFlag) != 0) {
+      writer.writeLinkOffset(initializerCode);
+    }
+    if ((flags & hasInitializerFlag) == 0) {
+      writer.writePackedObject(value);
+    }
+    if ((flags & hasGetterFlag) != 0) {
+      writer.writePackedObject(getterName);
+    }
+    if ((flags & hasSetterFlag) != 0) {
+      writer.writePackedObject(setterName);
+    }
+    if ((flags & hasAnnotationsFlag) != 0) {
+      writer.writeLinkOffset(annotations);
+    }
+  }
+
+  factory FieldDeclaration.read(BufferedReader reader) {
+    final flags = reader.readPackedUInt30();
+    final name = reader.readPackedObject();
+    final type = reader.readPackedObject();
+    final script =
+        ((flags & hasCustomScriptFlag) != 0) ? reader.readPackedObject() : null;
+    final position = ((flags & hasSourcePositionsFlag) != 0)
+        ? reader.readPackedUInt30() - 1
+        : 0;
+    final endPosition = ((flags & hasSourcePositionsFlag) != 0)
+        ? reader.readPackedUInt30() - 1
+        : 0;
+    final initializerCode =
+        ((flags & hasInitializerFlag) != 0 && (flags & isStaticFlag) != 0)
+            ? reader.readLinkOffset<Code>()
+            : null;
+    final value =
+        ((flags & hasInitializerFlag) == 0) ? reader.readPackedObject() : null;
+    final getterName =
+        ((flags & hasGetterFlag) != 0) ? reader.readPackedObject() : null;
+    final setterName =
+        ((flags & hasSetterFlag) != 0) ? reader.readPackedObject() : null;
+    final annotations = ((flags & hasAnnotationsFlag) != 0)
+        ? reader.readLinkOffset<ObjectHandle>()
+        : null;
+    return new FieldDeclaration(flags, name, type, value, script, position,
+        endPosition, getterName, setterName, initializerCode, annotations);
+  }
+
+  @override
+  String toString() {
+    StringBuffer sb = new StringBuffer();
+    sb.write('Field $name, type = $type');
+    if ((flags & hasGetterFlag) != 0) {
+      sb.write(', getter = $getterName');
+    }
+    if ((flags & hasSetterFlag) != 0) {
+      sb.write(', setter = $setterName');
+    }
+    if ((flags & isReflectableFlag) != 0) {
+      sb.write(', reflectable');
+    }
+    if ((flags & isStaticFlag) != 0) {
+      sb.write(', static');
+    }
+    if ((flags & isConstFlag) != 0) {
+      sb.write(', const');
+    }
+    if ((flags & isFinalFlag) != 0) {
+      sb.write(', final');
+    }
+    if ((flags & hasPragmaFlag) != 0) {
+      sb.write(', has-pragma');
+    }
+    if ((flags & hasCustomScriptFlag) != 0) {
+      sb.write(', custom-script = $script');
+    }
+    if ((flags & hasSourcePositionsFlag) != 0) {
+      sb.write(', pos = $position, end-pos = $endPosition');
+    }
+    sb.writeln();
+    if ((flags & hasInitializerFlag) != 0) {
+      sb.write('    initializer $initializerCode\n');
+    } else {
+      sb.write('    value = $value\n');
+    }
+    if ((flags & hasAnnotationsFlag) != 0) {
+      sb.write('    annotations $annotations\n');
+    }
+    return sb.toString();
+  }
+}
+
+class FunctionDeclaration {
+  static const isConstructorFlag = 1 << 0;
+  static const isGetterFlag = 1 << 1;
+  static const isSetterFlag = 1 << 2;
+  static const isFactoryFlag = 1 << 3;
+  static const isStaticFlag = 1 << 4;
+  static const isAbstractFlag = 1 << 5;
+  static const isConstFlag = 1 << 6;
+  static const hasOptionalPositionalParamsFlag = 1 << 7;
+  static const hasOptionalNamedParamsFlag = 1 << 8;
+  static const hasTypeParamsFlag = 1 << 9;
+  static const isReflectableFlag = 1 << 10;
+  static const isDebuggableFlag = 1 << 11;
+  static const isAsyncFlag = 1 << 12;
+  static const isAsyncStarFlag = 1 << 13;
+  static const isSyncStarFlag = 1 << 14;
+  static const isForwardingStubFlag = 1 << 15;
+  static const isNoSuchMethodForwarderFlag = 1 << 16;
+  static const isNativeFlag = 1 << 17;
+  static const isExternalFlag = 1 << 18;
+  static const hasSourcePositionsFlag = 1 << 19;
+  static const hasAnnotationsFlag = 1 << 20;
+  static const hasPragmaFlag = 1 << 21;
+  static const hasCustomScriptFlag = 1 << 22;
+
+  final int flags;
+  final ObjectHandle name;
+  final ObjectHandle script;
+  final int position;
+  final int endPosition;
+  final TypeParametersDeclaration typeParameters;
+  final int numRequiredParameters;
+  final List<ParameterDeclaration> parameters;
+  final ObjectHandle returnType;
+  final ObjectHandle nativeName;
+  final Code code;
+  final ObjectHandle annotations;
+
+  FunctionDeclaration(
+      this.flags,
+      this.name,
+      this.script,
+      this.position,
+      this.endPosition,
+      this.typeParameters,
+      this.numRequiredParameters,
+      this.parameters,
+      this.returnType,
+      this.nativeName,
+      this.code,
+      this.annotations);
+
+  void write(BufferedWriter writer) {
+    writer.writePackedUInt30(flags);
+    writer.writePackedObject(name);
+    if ((flags & hasCustomScriptFlag) != 0) {
+      writer.writePackedObject(script);
+    }
+    if ((flags & hasSourcePositionsFlag) != 0) {
+      writer.writePackedUInt30(position + 1);
+      writer.writePackedUInt30(endPosition + 1);
+    }
+    if ((flags & hasTypeParamsFlag) != 0) {
+      typeParameters.write(writer);
+    }
+    writer.writePackedUInt30(parameters.length);
+    if ((flags & hasOptionalPositionalParamsFlag) != 0 ||
+        (flags & hasOptionalNamedParamsFlag) != 0) {
+      writer.writePackedUInt30(numRequiredParameters);
+    }
+    for (var param in parameters) {
+      param.write(writer);
+    }
+    writer.writePackedObject(returnType);
+    if ((flags & isNativeFlag) != 0) {
+      writer.writePackedObject(nativeName);
+    }
+    if ((flags & isAbstractFlag) == 0) {
+      writer.writeLinkOffset(code);
+    }
+    if ((flags & hasAnnotationsFlag) != 0) {
+      writer.writeLinkOffset(annotations);
+    }
+  }
+
+  factory FunctionDeclaration.read(BufferedReader reader) {
+    final flags = reader.readPackedUInt30();
+    final name = reader.readPackedObject();
+
+    final script =
+        ((flags & hasCustomScriptFlag) != 0) ? reader.readPackedObject() : null;
+    final position = ((flags & hasSourcePositionsFlag) != 0)
+        ? reader.readPackedUInt30() - 1
+        : 0;
+    final endPosition = ((flags & hasSourcePositionsFlag) != 0)
+        ? reader.readPackedUInt30() - 1
+        : 0;
+    final typeParameters = ((flags & hasTypeParamsFlag) != 0)
+        ? new TypeParametersDeclaration.read(reader)
+        : null;
+
+    final numParameters = reader.readPackedUInt30();
+    final numRequiredParameters =
+        ((flags & hasOptionalPositionalParamsFlag) != 0 ||
+                (flags & hasOptionalNamedParamsFlag) != 0)
+            ? reader.readPackedUInt30()
+            : numParameters;
+
+    final parameters = new List<ParameterDeclaration>.generate(
+        numParameters, (_) => new ParameterDeclaration.read(reader));
+    final returnType = reader.readPackedObject();
+    final nativeName =
+        ((flags & isNativeFlag) != 0) ? reader.readPackedObject() : null;
+    final code =
+        ((flags & isAbstractFlag) == 0) ? reader.readLinkOffset<Code>() : null;
+    final annotations = ((flags & hasAnnotationsFlag) != 0)
+        ? reader.readLinkOffset<ObjectHandle>()
+        : null;
+    return new FunctionDeclaration(
+        flags,
+        name,
+        script,
+        position,
+        endPosition,
+        typeParameters,
+        numRequiredParameters,
+        parameters,
+        returnType,
+        nativeName,
+        code,
+        annotations);
+  }
+
+  @override
+  String toString() {
+    StringBuffer sb = new StringBuffer();
+    sb.write('Function $name');
+    if ((flags & isConstructorFlag) != 0) {
+      sb.write(', constructor');
+    }
+    if ((flags & isGetterFlag) != 0) {
+      sb.write(', getter');
+    }
+    if ((flags & isSetterFlag) != 0) {
+      sb.write(', setter');
+    }
+    if ((flags & isFactoryFlag) != 0) {
+      sb.write(', factory');
+    }
+    if ((flags & isStaticFlag) != 0) {
+      sb.write(', static');
+    }
+    if ((flags & isAbstractFlag) != 0) {
+      sb.write(', abstract');
+    }
+    if ((flags & isConstFlag) != 0) {
+      sb.write(', const');
+    }
+    if ((flags & hasOptionalPositionalParamsFlag) != 0) {
+      sb.write(', has-optional-positional-params');
+    }
+    if ((flags & hasOptionalNamedParamsFlag) != 0) {
+      sb.write(', has-optional-named-params');
+    }
+    if ((flags & isReflectableFlag) != 0) {
+      sb.write(', reflectable');
+    }
+    if ((flags & isDebuggableFlag) != 0) {
+      sb.write(', debuggable');
+    }
+    if ((flags & isAsyncFlag) != 0) {
+      sb.write(', async');
+    }
+    if ((flags & isAsyncStarFlag) != 0) {
+      sb.write(', async*');
+    }
+    if ((flags & isSyncStarFlag) != 0) {
+      sb.write(', sync*');
+    }
+    if ((flags & isForwardingStubFlag) != 0) {
+      sb.write(', forwarding-stub');
+    }
+    if ((flags & isNoSuchMethodForwarderFlag) != 0) {
+      sb.write(', no-such-method-forwarder');
+    }
+    if ((flags & isNativeFlag) != 0) {
+      sb.write(', native $nativeName');
+    }
+    if ((flags & isExternalFlag) != 0) {
+      sb.write(', external');
+    }
+    if ((flags & hasPragmaFlag) != 0) {
+      sb.write(', has-pragma');
+    }
+    if ((flags & hasCustomScriptFlag) != 0) {
+      sb.write(', custom-script = $script');
+    }
+    if ((flags & hasSourcePositionsFlag) != 0) {
+      sb.write(', pos = $position, end-pos = $endPosition');
+    }
+    sb.writeln();
+    if ((flags & hasTypeParamsFlag) != 0) {
+      sb.write('    type-params $typeParameters\n');
+    }
+    sb.write('    parameters $parameters (required: $numRequiredParameters)\n');
+    sb.write('    return-type $returnType\n');
+    if ((flags & hasAnnotationsFlag) != 0) {
+      sb.write('    annotations $annotations\n');
+    }
+    if ((flags & isAbstractFlag) == 0 && (flags & isExternalFlag) == 0) {
+      sb.write('\n$code\n');
+    }
+    return sb.toString();
+  }
+}
+
+class TypeParametersDeclaration {
+  final List<NameAndType> typeParams;
+
+  TypeParametersDeclaration(this.typeParams);
+
+  void write(BufferedWriter writer) {
+    writer.writePackedUInt30(typeParams.length);
+    for (var tp in typeParams) {
+      writer.writePackedObject(tp.name);
+    }
+    for (var tp in typeParams) {
+      writer.writePackedObject(tp.type);
+    }
+  }
+
+  factory TypeParametersDeclaration.read(BufferedReader reader) {
+    final int numTypeParams = reader.readPackedUInt30();
+    List<ObjectHandle> names = new List<ObjectHandle>.generate(
+        numTypeParams, (_) => reader.readPackedObject());
+    List<ObjectHandle> bounds = new List<ObjectHandle>.generate(
+        numTypeParams, (_) => reader.readPackedObject());
+    return new TypeParametersDeclaration(new List<NameAndType>.generate(
+        numTypeParams, (int i) => new NameAndType(names[i], bounds[i])));
+  }
+
+  @override
+  int get hashCode => listHashCode(typeParams);
+
+  @override
+  bool operator ==(other) =>
+      other is TypeParametersDeclaration &&
+      listEquals(this.typeParams, other.typeParams);
+
+  @override
+  String toString() => '<${typeParams.join(', ')}>';
+}
+
+class ParameterDeclaration {
+  // Parameter flags are written separately (in Code).
+  static const isCovariantFlag = 1 << 0;
+  static const isGenericCovariantImplFlag = 1 << 1;
+
+  final ObjectHandle name;
+  final ObjectHandle type;
+
+  ParameterDeclaration(this.name, this.type);
+
+  void write(BufferedWriter writer) {
+    writer.writePackedObject(name);
+    writer.writePackedObject(type);
+  }
+
+  factory ParameterDeclaration.read(BufferedReader reader) {
+    final name = reader.readPackedObject();
+    final type = reader.readPackedObject();
+    return new ParameterDeclaration(name, type);
+  }
+
+  @override
+  String toString() => '$type $name';
+}
+
+class Code {
+  static const hasExceptionsTableFlag = 1 << 0;
+  static const hasSourcePositionsFlag = 1 << 1;
+  static const hasNullableFieldsFlag = 1 << 2;
+  static const hasClosuresFlag = 1 << 3;
+  static const hasParameterFlagsFlag = 1 << 4;
+  static const hasForwardingStubTargetFlag = 1 << 5;
+  static const hasDefaultFunctionTypeArgsFlag = 1 << 6;
+
+  final ConstantPool constantPool;
+  final List<int> bytecodes;
+  final ExceptionsTable exceptionsTable;
+  final SourcePositions sourcePositions;
+  final List<ObjectHandle> nullableFields;
+  final List<ClosureDeclaration> closures;
+  final List<int> parameterFlags;
+  final int forwardingStubTargetCpIndex;
+  final int defaultFunctionTypeArgsCpIndex;
+
+  bool get hasExceptionsTable => exceptionsTable.blocks.isNotEmpty;
+  bool get hasSourcePositions =>
+      sourcePositions != null && sourcePositions.mapping.isNotEmpty;
+  bool get hasNullableFields => nullableFields.isNotEmpty;
+  bool get hasClosures => closures.isNotEmpty;
+
+  int get flags =>
+      (hasExceptionsTable ? hasExceptionsTableFlag : 0) |
+      (hasSourcePositions ? hasSourcePositionsFlag : 0) |
+      (hasNullableFields ? hasNullableFieldsFlag : 0) |
+      (hasClosures ? hasClosuresFlag : 0) |
+      (parameterFlags != null ? hasParameterFlagsFlag : 0) |
+      (forwardingStubTargetCpIndex != null ? hasForwardingStubTargetFlag : 0) |
+      (defaultFunctionTypeArgsCpIndex != null
+          ? hasDefaultFunctionTypeArgsFlag
+          : 0);
+
+  Code(
+      this.constantPool,
+      this.bytecodes,
+      this.exceptionsTable,
+      this.sourcePositions,
+      this.nullableFields,
+      this.closures,
+      this.parameterFlags,
+      this.forwardingStubTargetCpIndex,
+      this.defaultFunctionTypeArgsCpIndex);
+
+  void write(BufferedWriter writer) {
+    final start = writer.offset;
+    writer.writePackedUInt30(flags);
+    if (parameterFlags != null) {
+      writer.writePackedUInt30(parameterFlags.length);
+      parameterFlags.forEach((flags) => writer.writePackedUInt30(flags));
+    }
+    if (forwardingStubTargetCpIndex != null) {
+      writer.writePackedUInt30(forwardingStubTargetCpIndex);
+    }
+    if (defaultFunctionTypeArgsCpIndex != null) {
+      writer.writePackedUInt30(defaultFunctionTypeArgsCpIndex);
+    }
+    if (hasClosures) {
+      writer.writePackedUInt30(closures.length);
+      closures.forEach((c) => c.write(writer));
+    }
+    constantPool.write(writer);
+    _writeBytecodeInstructions(writer, bytecodes);
+    if (hasExceptionsTable) {
+      exceptionsTable.write(writer);
+    }
+    if (hasSourcePositions) {
+      writer.writeLinkOffset(sourcePositions);
+    }
+    if (hasNullableFields) {
+      writer.writePackedList(nullableFields);
+    }
+    if (hasClosures) {
+      closures.forEach((c) => c.code.write(writer));
+    }
+    BytecodeSizeStatistics.membersSize += (writer.offset - start);
+  }
+
+  factory Code.read(BufferedReader reader) {
+    int flags = reader.readPackedUInt30();
+    final parameterFlags = ((flags & hasParameterFlagsFlag) != 0)
+        ? new List<int>.generate(
+            reader.readPackedUInt30(), (_) => reader.readPackedUInt30())
+        : null;
+    final forwardingStubTargetCpIndex =
+        ((flags & hasForwardingStubTargetFlag) != 0)
+            ? reader.readPackedUInt30()
+            : null;
+    final defaultFunctionTypeArgsCpIndex =
+        ((flags & hasDefaultFunctionTypeArgsFlag) != 0)
+            ? reader.readPackedUInt30()
+            : null;
+    final List<ClosureDeclaration> closures = ((flags & hasClosuresFlag) != 0)
+        ? new List<ClosureDeclaration>.generate(reader.readPackedUInt30(),
+            (_) => new ClosureDeclaration.read(reader))
+        : const <ClosureDeclaration>[];
+    final ConstantPool constantPool = new ConstantPool.read(reader);
+    final List<int> bytecodes = _readBytecodeInstructions(reader);
+    final exceptionsTable = ((flags & hasExceptionsTableFlag) != 0)
+        ? new ExceptionsTable.read(reader)
+        : new ExceptionsTable();
+    final sourcePositions = ((flags & hasSourcePositionsFlag) != 0)
+        ? reader.readLinkOffset<SourcePositions>()
+        : null;
+    final List<ObjectHandle> nullableFields =
+        ((flags & hasNullableFieldsFlag) != 0)
+            ? reader.readPackedList<ObjectHandle>()
+            : const <ObjectHandle>[];
+    for (var c in closures) {
+      c.code = new ClosureCode.read(reader);
+    }
+    return new Code(
+        constantPool,
+        bytecodes,
+        exceptionsTable,
+        sourcePositions,
+        nullableFields,
+        closures,
+        parameterFlags,
+        forwardingStubTargetCpIndex,
+        defaultFunctionTypeArgsCpIndex);
+  }
+
+  // TODO(alexmarkov): Consider printing constant pool before bytecode.
+  @override
+  String toString() => "\n"
+      "Bytecode {\n"
+      "${new BytecodeDisassembler().disassemble(bytecodes, exceptionsTable, annotations: [
+        hasSourcePositions
+            ? sourcePositions.getBytecodeAnnotations()
+            : const <int, String>{}
+      ])}}\n"
+      "$exceptionsTable"
+      "${nullableFields.isEmpty ? '' : 'Nullable fields: $nullableFields\n'}"
+      "${parameterFlags == null ? '' : 'Parameter flags: $parameterFlags\n'}"
+      "${forwardingStubTargetCpIndex == null ? '' : 'Forwarding stub target: CP#$forwardingStubTargetCpIndex\n'}"
+      "${defaultFunctionTypeArgsCpIndex == null ? '' : 'Default function type arguments: CP#$defaultFunctionTypeArgsCpIndex\n'}"
+      "$constantPool"
+      "${closures.join('\n')}";
+}
+
+class ClosureDeclaration {
+  static const int flagHasOptionalPositionalParams = 1 << 0;
+  static const int flagHasOptionalNamedParams = 1 << 1;
+  static const int flagHasTypeParams = 1 << 2;
+
+  final ObjectHandle parent;
+  final ObjectHandle name;
+  final List<NameAndType> typeParams;
+  final int numRequiredParams;
+  final int numNamedParams;
+  final List<NameAndType> parameters;
+  final ObjectHandle returnType;
+  ClosureCode code;
+
+  ClosureDeclaration(
+      this.parent,
+      this.name,
+      this.typeParams,
+      this.numRequiredParams,
+      this.numNamedParams,
+      this.parameters,
+      this.returnType);
+
+  void write(BufferedWriter writer) {
+    int flags = 0;
+    if (numRequiredParams != parameters.length) {
+      if (numNamedParams > 0) {
+        flags |= flagHasOptionalNamedParams;
+      } else {
+        flags |= flagHasOptionalPositionalParams;
+      }
+    }
+    if (typeParams.isNotEmpty) {
+      flags |= flagHasTypeParams;
+    }
+    writer.writePackedUInt30(flags);
+    writer.writePackedObject(parent);
+    writer.writePackedObject(name);
+
+    if (flags & flagHasTypeParams != 0) {
+      writer.writePackedUInt30(typeParams.length);
+      for (var tp in typeParams) {
+        writer.writePackedObject(tp.name);
+      }
+      for (var tp in typeParams) {
+        writer.writePackedObject(tp.type);
+      }
+    }
+    writer.writePackedUInt30(parameters.length);
+    if (flags &
+            (flagHasOptionalPositionalParams | flagHasOptionalNamedParams) !=
+        0) {
+      writer.writePackedUInt30(numRequiredParams);
+    }
+    for (var param in parameters) {
+      writer.writePackedObject(param.name);
+      writer.writePackedObject(param.type);
+    }
+    writer.writePackedObject(returnType);
+  }
+
+  factory ClosureDeclaration.read(BufferedReader reader) {
+    final int flags = reader.readPackedUInt30();
+    final parent = reader.readPackedObject();
+    final name = reader.readPackedObject();
+    List<NameAndType> typeParams;
+    if ((flags & flagHasTypeParams) != 0) {
+      final int numTypeParams = reader.readPackedUInt30();
+      List<ObjectHandle> names = new List<ObjectHandle>.generate(
+          numTypeParams, (_) => reader.readPackedObject());
+      List<ObjectHandle> bounds = new List<ObjectHandle>.generate(
+          numTypeParams, (_) => reader.readPackedObject());
+      typeParams = new List<NameAndType>.generate(
+          numTypeParams, (int i) => new NameAndType(names[i], bounds[i]));
+    } else {
+      typeParams = const <NameAndType>[];
+    }
+    final numParams = reader.readPackedUInt30();
+    final numRequiredParams = (flags &
+                (flagHasOptionalPositionalParams |
+                    flagHasOptionalNamedParams) !=
+            0)
+        ? reader.readPackedUInt30()
+        : numParams;
+    final numNamedParams = (flags & flagHasOptionalNamedParams != 0)
+        ? (numParams - numRequiredParams)
+        : 0;
+    final List<NameAndType> parameters = new List<NameAndType>.generate(
+        numParams,
+        (_) => new NameAndType(
+            reader.readPackedObject(), reader.readPackedObject()));
+    final returnType = reader.readPackedObject();
+    return new ClosureDeclaration(parent, name, typeParams, numRequiredParams,
+        numNamedParams, parameters, returnType);
+  }
+
+  @override
+  String toString() {
+    StringBuffer sb = new StringBuffer();
+    sb.write('Closure $parent::$name');
+    if (typeParams.isNotEmpty) {
+      sb.write(' <${typeParams.join(', ')}>');
+    }
+    sb.write(' (');
+    sb.write(parameters.sublist(0, numRequiredParams).join(', '));
+    if (numRequiredParams != parameters.length) {
+      if (numRequiredParams > 0) {
+        sb.write(', ');
+      }
+      if (numNamedParams > 0) {
+        sb.write('{ ${parameters.sublist(numRequiredParams).join(', ')} }');
+      } else {
+        sb.write('[ ${parameters.sublist(numRequiredParams).join(', ')} ]');
+      }
+    }
+    sb.write(') -> ');
+    sb.writeln(returnType);
+    if (code != null) {
+      sb.write(code.toString());
+    }
+    return sb.toString();
+  }
+}
+
+/// Bytecode of a nested function (closure).
+/// Closures share the constant pool of a top-level member.
+class ClosureCode {
+  final List<int> bytecodes;
+  final ExceptionsTable exceptionsTable;
+  final SourcePositions sourcePositions;
+
+  bool get hasExceptionsTable => exceptionsTable.blocks.isNotEmpty;
+  bool get hasSourcePositions =>
+      sourcePositions != null && sourcePositions.mapping.isNotEmpty;
+
+  int get flags =>
+      (hasExceptionsTable ? Code.hasExceptionsTableFlag : 0) |
+      (hasSourcePositions ? Code.hasSourcePositionsFlag : 0);
+
+  ClosureCode(this.bytecodes, this.exceptionsTable, this.sourcePositions);
+
+  void write(BufferedWriter writer) {
+    writer.writePackedUInt30(flags);
+    _writeBytecodeInstructions(writer, bytecodes);
+    if (hasExceptionsTable) {
+      exceptionsTable.write(writer);
+    }
+    if (hasSourcePositions) {
+      writer.writeLinkOffset(sourcePositions);
+    }
+  }
+
+  factory ClosureCode.read(BufferedReader reader) {
+    final int flags = reader.readPackedUInt30();
+    final List<int> bytecodes = _readBytecodeInstructions(reader);
+    final exceptionsTable = ((flags & Code.hasExceptionsTableFlag) != 0)
+        ? new ExceptionsTable.read(reader)
+        : new ExceptionsTable();
+    final sourcePositions = ((flags & Code.hasSourcePositionsFlag) != 0)
+        ? reader.readLinkOffset<SourcePositions>()
+        : null;
+    return new ClosureCode(bytecodes, exceptionsTable, sourcePositions);
+  }
+
+  @override
+  String toString() {
+    StringBuffer sb = new StringBuffer();
+    sb.writeln('ClosureCode {');
+    sb.writeln(new BytecodeDisassembler()
+        .disassemble(bytecodes, exceptionsTable, annotations: [
+      hasSourcePositions
+          ? sourcePositions.getBytecodeAnnotations()
+          : const <int, String>{}
+    ]));
+    sb.writeln('}');
+    return sb.toString();
+  }
+}
+
+class _Section {
+  int numItems;
+  int offset;
+  BufferedWriter writer;
+
+  _Section(this.numItems, this.writer);
+
+  int get size => writer.offset;
+}
+
+class Component {
+  static const int magicValue = 0x44424332; // 'DBC2'
+  static const int numSections = 7;
+  static const int sectionAlignment = 4;
+
+  //  UInt32 magic, version, numSections x (numItems, offset)
+  static const int headerSize = (2 + numSections * 2) * 4;
+
+  int version;
+  StringTable stringTable;
+  ObjectTable objectTable;
+  List<Members> members = <Members>[];
+  List<Code> codes = <Code>[];
+  List<SourcePositions> sourcePositions = <SourcePositions>[];
+  List<ObjectHandle> annotations = <ObjectHandle>[];
+  ObjectHandle mainLibrary;
+
+  Component(this.version)
+      : stringTable = new StringTable(),
+        objectTable = new ObjectTable();
+
+  void write(BufferedWriter writer) {
+    objectTable.allocateIndexTable();
+
+    // Write sections to their own buffers in reverse order as section may
+    // reference data structures from successor sections by offsets.
+
+    final BufferedWriter annotationsWriter =
+        new BufferedWriter.fromWriter(writer);
+    for (var annot in annotations) {
+      writer.linkWriter.put(annot, annotationsWriter.offset);
+      annotationsWriter.writePackedObject(annot);
+    }
+
+    final BufferedWriter sourcePositionsWriter =
+        new BufferedWriter.fromWriter(writer);
+    for (var sp in sourcePositions) {
+      writer.linkWriter.put(sp, sourcePositionsWriter.offset);
+      sp.write(sourcePositionsWriter);
+    }
+
+    final BufferedWriter codesWriter = new BufferedWriter.fromWriter(writer);
+    for (var code in codes) {
+      writer.linkWriter.put(code, codesWriter.offset);
+      code.write(codesWriter);
+    }
+
+    final BufferedWriter membersWriter = new BufferedWriter.fromWriter(writer);
+    for (var m in members) {
+      writer.linkWriter.put(m, membersWriter.offset);
+      m.write(membersWriter);
+    }
+
+    BufferedWriter mainWriter;
+    if (mainLibrary != null) {
+      mainWriter = new BufferedWriter.fromWriter(writer);
+      mainWriter.writePackedObject(mainLibrary);
+    }
+
+    final BufferedWriter objectsWriter = new BufferedWriter.fromWriter(writer);
+    objectTable.write(objectsWriter);
+
+    final BufferedWriter stringsWriter = new BufferedWriter.fromWriter(writer);
+    stringTable.write(stringsWriter);
+
+    List<_Section> sections = [
+      new _Section(0, stringsWriter),
+      new _Section(0, objectsWriter),
+      new _Section(0, mainWriter),
+      new _Section(members.length, membersWriter),
+      new _Section(codes.length, codesWriter),
+      new _Section(sourcePositions.length, sourcePositionsWriter),
+      new _Section(annotations.length, annotationsWriter),
+    ];
+    assert(sections.length == numSections);
+
+    int offset = headerSize;
+    for (var section in sections) {
+      if (section.writer != null) {
+        offset = (offset + sectionAlignment - 1) & ~(sectionAlignment - 1);
+        section.offset = offset;
+        offset += section.size;
+      } else {
+        section.offset = 0;
+      }
+    }
+
+    final start = writer.offset;
+
+    writer.writeUInt32(magicValue);
+    writer.writeUInt32(version);
+    for (var section in sections) {
+      writer.writeUInt32(section.numItems);
+      writer.writeUInt32(section.offset);
+    }
+    assert(writer.offset - start == headerSize);
+    for (var section in sections) {
+      if (section.writer != null) {
+        writer.align(sectionAlignment);
+        assert(writer.offset - start == section.offset);
+        writer.writeBytes(section.writer.takeBytes());
+      }
+    }
+
+    BytecodeSizeStatistics.componentSize += (writer.offset - start);
+  }
+
+  Component.read(BufferedReader reader) {
+    final int start = reader.offset;
+
+    final int magic = reader.readUInt32();
+    if (magic != magicValue) {
+      throw 'Error: unexpected bytecode magic $magic';
+    }
+
+    version = reader.readUInt32();
+    if (version != currentBytecodeFormatVersion) {
+      throw 'Error: unexpected bytecode format version $version';
+    }
+
+    reader.formatVersion = version;
+
+    reader.readUInt32();
+    final stringTableOffset = reader.readUInt32();
+
+    reader.readUInt32();
+    final objectTableOffset = reader.readUInt32();
+
+    reader.readUInt32();
+    final mainOffset = reader.readUInt32();
+
+    final membersNum = reader.readUInt32();
+    final membersOffset = reader.readUInt32();
+
+    final codesNum = reader.readUInt32();
+    final codesOffset = reader.readUInt32();
+
+    final sourcePositionsNum = reader.readUInt32();
+    final sourcePositionsOffset = reader.readUInt32();
+
+    final annotationsNum = reader.readUInt32();
+    final annotationsOffset = reader.readUInt32();
+
+    reader.offset = start + stringTableOffset;
+    stringTable = new StringTable.read(reader);
+    reader.stringReader = stringTable;
+
+    reader.offset = start + objectTableOffset;
+    objectTable = new ObjectTable.read(reader);
+    reader.objectReader = objectTable;
+
+    // Read sections in the reverse order as section may reference
+    // successor sections by offsets.
+
+    final annotationsStart = start + annotationsOffset;
+    reader.offset = annotationsStart;
+    for (int i = 0; i < annotationsNum; ++i) {
+      int offset = reader.offset - annotationsStart;
+      ObjectHandle annot = reader.readPackedObject();
+      reader.linkReader.setOffset(annot, offset);
+      annotations.add(annot);
+    }
+
+    final sourcePositionsStart = start + sourcePositionsOffset;
+    reader.offset = sourcePositionsStart;
+    for (int i = 0; i < sourcePositionsNum; ++i) {
+      int offset = reader.offset - sourcePositionsStart;
+      SourcePositions sp = new SourcePositions.read(reader);
+      reader.linkReader.setOffset(sp, offset);
+      sourcePositions.add(sp);
+    }
+
+    final codesStart = start + codesOffset;
+    reader.offset = codesStart;
+    for (int i = 0; i < codesNum; ++i) {
+      int offset = reader.offset - codesStart;
+      Code code = new Code.read(reader);
+      reader.linkReader.setOffset(code, offset);
+      codes.add(code);
+    }
+
+    final membersStart = start + membersOffset;
+    reader.offset = membersStart;
+    for (int i = 0; i < membersNum; ++i) {
+      int offset = reader.offset - membersStart;
+      Members m = new Members.read(reader);
+      reader.linkReader.setOffset(m, offset);
+      members.add(m);
+    }
+
+    if (mainOffset != 0) {
+      reader.offset = start + mainOffset;
+      mainLibrary = reader.readPackedObject();
+    }
+  }
+
+  String toString() => "\n"
+      "Bytecode"
+      " (version: "
+      "${version == currentBytecodeFormatVersion ? 'stable' : version == futureBytecodeFormatVersion ? 'future' : "v$version"}"
+      ")\n"
+//      "$objectTable\n"
+//      "$stringTable\n"
+      "${mainLibrary != null ? 'Main library: $mainLibrary\n' : ''}"
+//      "${members.join('\n')}\n"
+      ;
+}
+
+void _writeBytecodeInstructions(BufferedWriter writer, List<int> bytecodes) {
+  writer.writePackedUInt30(bytecodes.length);
+  writer.align(bytecodeInstructionsAlignment);
+  writer.writeBytes(bytecodes);
+  BytecodeSizeStatistics.instructionsSize += bytecodes.length;
+}
+
+List<int> _readBytecodeInstructions(BufferedReader reader) {
+  int len = reader.readPackedUInt30();
+  reader.align(bytecodeInstructionsAlignment);
+  return reader.readBytesAsUint8List(len);
+}
diff --git a/pkg/vm/lib/bytecode/gen_bytecode.dart b/pkg/vm/lib/bytecode/gen_bytecode.dart
index cecadf5..6770f3a 100644
--- a/pkg/vm/lib/bytecode/gen_bytecode.dart
+++ b/pkg/vm/lib/bytecode/gen_bytecode.dart
@@ -4,17 +4,18 @@
 
 library vm.bytecode.gen_bytecode;
 
-import 'package:kernel/ast.dart' hide MapEntry;
+// TODO(askesc): We should not need to call the constant evaluator
+// explicitly once constant-update-2018 is shipped.
+import 'package:front_end/src/api_prototype/constant_evaluator.dart'
+    show ConstantEvaluator, EvaluationEnvironment, ErrorReporter;
+
+import 'package:kernel/ast.dart' hide MapEntry, Component, FunctionDeclaration;
+import 'package:kernel/ast.dart' as ast show Component, FunctionDeclaration;
 import 'package:kernel/class_hierarchy.dart' show ClassHierarchy;
 import 'package:kernel/core_types.dart' show CoreTypes;
 import 'package:kernel/external_name.dart' show getExternalName;
 import 'package:kernel/library_index.dart' show LibraryIndex;
-import 'package:kernel/transformations/constants.dart'
-    show
-        ConstantEvaluator,
-        ConstantsBackend,
-        EvaluationEnvironment,
-        ErrorReporter;
+import 'package:kernel/target/targets.dart' show ConstantsBackend;
 import 'package:kernel/type_algebra.dart'
     show Substitution, containsTypeVariable;
 import 'package:kernel/type_environment.dart' show TypeEnvironment;
@@ -24,10 +25,12 @@
 import 'bytecode_serialization.dart' show StringTable;
 import 'constant_pool.dart';
 import 'dbc.dart';
+import 'declarations.dart';
 import 'exceptions.dart';
 import 'generics.dart'
     show
         flattenInstantiatorTypeArguments,
+        getDefaultFunctionTypeArguments,
         getInstantiatorTypeArguments,
         hasFreeTypeParameters,
         hasInstantiatorTypeArguments;
@@ -35,6 +38,7 @@
 import 'nullability_detector.dart' show NullabilityDetector;
 import 'object_table.dart' show ObjectHandle, ObjectTable, NameAndType;
 import 'recognized_methods.dart' show RecognizedMethods;
+import 'source_positions.dart' show SourcePositions;
 import '../constants_error_reporter.dart' show ForwardConstantEvaluationErrors;
 import '../metadata/bytecode.dart';
 
@@ -44,8 +48,9 @@
 const String symbolForTypeCast = ' in type cast';
 
 void generateBytecode(
-  Component component, {
+  ast.Component component, {
   bool emitSourcePositions: false,
+  bool emitAnnotations: false,
   bool omitAssertSourcePositions: false,
   bool useFutureBytecodeFormat: false,
   Map<String, String> environmentDefines: const <String, String>{},
@@ -58,7 +63,7 @@
       onAmbiguousSupertypes: ignoreAmbiguousSupertypes);
   final typeEnvironment = new TypeEnvironment(coreTypes, hierarchy);
   final constantsBackend = new VmConstantsBackend(coreTypes);
-  final errorReporter = new ForwardConstantEvaluationErrors(typeEnvironment);
+  final errorReporter = new ForwardConstantEvaluationErrors();
   libraries ??= component.libraries;
   final bytecodeGenerator = new BytecodeGenerator(
       component,
@@ -68,6 +73,7 @@
       constantsBackend,
       environmentDefines,
       emitSourcePositions,
+      emitAnnotations,
       omitAssertSourcePositions,
       useFutureBytecodeFormat,
       errorReporter);
@@ -77,13 +83,13 @@
 }
 
 class BytecodeGenerator extends RecursiveVisitor<Null> {
-  final Component component;
   final CoreTypes coreTypes;
   final ClassHierarchy hierarchy;
   final TypeEnvironment typeEnvironment;
   final ConstantsBackend constantsBackend;
   final Map<String, String> environmentDefines;
   final bool emitSourcePositions;
+  final bool emitAnnotations;
   final bool omitAssertSourcePositions;
   final bool useFutureBytecodeFormat;
   final ErrorReporter errorReporter;
@@ -92,8 +98,11 @@
   final int formatVersion;
   StringTable stringTable;
   ObjectTable objectTable;
+  Component bytecodeComponent;
   NullabilityDetector nullabilityDetector;
 
+  List<FieldDeclaration> fieldDeclarations;
+  List<FunctionDeclaration> functionDeclarations;
   Class enclosingClass;
   Member enclosingMember;
   FunctionNode enclosingFunction;
@@ -121,29 +130,37 @@
   int currentLoopDepth;
 
   BytecodeGenerator(
-      this.component,
+      ast.Component component,
       this.coreTypes,
       this.hierarchy,
       this.typeEnvironment,
       this.constantsBackend,
       this.environmentDefines,
       this.emitSourcePositions,
+      this.emitAnnotations,
       this.omitAssertSourcePositions,
       this.useFutureBytecodeFormat,
       this.errorReporter)
       : recognizedMethods = new RecognizedMethods(typeEnvironment),
         formatVersion = useFutureBytecodeFormat
             ? futureBytecodeFormatVersion
-            : stableBytecodeFormatVersion {
+            : currentBytecodeFormatVersion {
     nullabilityDetector = new NullabilityDetector(recognizedMethods);
     component.addMetadataRepository(metadata);
 
-    metadata.bytecodeComponent = new BytecodeComponent(formatVersion);
-    metadata.mapping[component] = metadata.bytecodeComponent;
+    bytecodeComponent = new Component(formatVersion);
+    metadata.bytecodeComponent = bytecodeComponent;
+    metadata.mapping[component] =
+        new ComponentBytecodeMetadata(bytecodeComponent);
 
-    stringTable = metadata.bytecodeComponent.stringTable;
-    objectTable = metadata.bytecodeComponent.objectTable;
+    stringTable = bytecodeComponent.stringTable;
+    objectTable = bytecodeComponent.objectTable;
     objectTable.coreTypes = coreTypes;
+
+    if (component.mainMethod != null) {
+      bytecodeComponent.mainLibrary =
+          objectTable.getHandle(component.mainMethod.enclosingLibrary);
+    }
   }
 
   @override
@@ -151,62 +168,373 @@
     if (node.isExternal) {
       return;
     }
+
     visitList(node.classes, this);
+
+    startMembers();
     visitList(node.procedures, this);
     visitList(node.fields, this);
+    endMembers(node);
   }
 
   @override
   visitClass(Class node) {
+    startMembers();
     visitList(node.constructors, this);
     visitList(node.procedures, this);
     visitList(node.fields, this);
+    endMembers(node);
+  }
+
+  void startMembers() {
+    fieldDeclarations = <FieldDeclaration>[];
+    functionDeclarations = <FunctionDeclaration>[];
+  }
+
+  void endMembers(TreeNode node) {
+    final members = new Members(fieldDeclarations, functionDeclarations);
+    bytecodeComponent.members.add(members);
+    metadata.mapping[node] = new MembersBytecodeMetadata(members);
+
+    fieldDeclarations = null;
+    functionDeclarations = null;
+  }
+
+  bool _isPragma(Constant annotation) =>
+      annotation is InstanceConstant &&
+      annotation.classNode == coreTypes.pragmaClass;
+
+  Annotations getAnnotations(List<Expression> nodes) {
+    if (nodes.isEmpty) {
+      return const Annotations(null, false);
+    }
+    List<Constant> constants = nodes.map(_evaluateConstantExpression).toList();
+    bool hasPragma = constants.any(_isPragma);
+    if (!emitAnnotations) {
+      if (hasPragma) {
+        constants = constants.where(_isPragma).toList();
+      } else {
+        return const Annotations(null, false);
+      }
+    }
+    final object =
+        objectTable.getHandle(new ListConstant(const DynamicType(), constants));
+    bytecodeComponent.annotations.add(object);
+    return new Annotations(object, hasPragma);
+  }
+
+  FieldDeclaration getFieldDeclaration(Field field, Code initializer) {
+    int flags = 0;
+    Constant value;
+    if (_hasTrivialInitializer(field)) {
+      if (field.initializer != null) {
+        value = _evaluateConstantExpression(field.initializer);
+      }
+    } else {
+      flags |= FieldDeclaration.hasInitializerFlag;
+    }
+    final name = objectTable.getNameHandle(
+        field.name.library, objectTable.mangleMemberName(field, false, false));
+    ObjectHandle getterName;
+    ObjectHandle setterName;
+    if (!field.isStatic || (initializer != null)) {
+      flags |= FieldDeclaration.hasGetterFlag;
+      getterName = objectTable.getNameHandle(
+          field.name.library, objectTable.mangleMemberName(field, true, false));
+    }
+    if (!field.isStatic && !field.isFinal) {
+      flags |= FieldDeclaration.hasSetterFlag;
+      setterName = objectTable.getNameHandle(
+          field.name.library, objectTable.mangleMemberName(field, false, true));
+    }
+    if (isReflectable(field)) {
+      flags |= FieldDeclaration.isReflectableFlag;
+    }
+    if (field.isStatic) {
+      flags |= FieldDeclaration.isStaticFlag;
+    }
+    if (field.isConst) {
+      flags |= FieldDeclaration.isConstFlag;
+    }
+    // Const fields are implicitly final.
+    if (field.isConst || field.isFinal) {
+      flags |= FieldDeclaration.isFinalFlag;
+    }
+    if (field.isCovariant) {
+      flags |= FieldDeclaration.isCovariantFlag;
+    }
+    if (field.isGenericCovariantImpl) {
+      flags |= FieldDeclaration.isGenericCovariantImplFlag;
+    }
+    int position = TreeNode.noOffset;
+    int endPosition = TreeNode.noOffset;
+    if (emitSourcePositions && field.fileOffset != TreeNode.noOffset) {
+      flags |= FieldDeclaration.hasSourcePositionsFlag;
+      position = field.fileOffset;
+      endPosition = field.fileEndOffset;
+    }
+    Annotations annotations = getAnnotations(field.annotations);
+    if (annotations.object != null) {
+      flags |= FieldDeclaration.hasAnnotationsFlag;
+      if (annotations.hasPragma) {
+        flags |= FieldDeclaration.hasPragmaFlag;
+      }
+    }
+    if (field.fileUri != (field.parent as dynamic).fileUri) {
+      // TODO(alexmarkov): support custom scripts
+      // flags |= FieldDeclaration.hasCustomScriptFlag;
+    }
+    return new FieldDeclaration(
+        flags,
+        name,
+        objectTable.getHandle(field.type),
+        objectTable.getHandle(value),
+        null, // TODO(alexmarkov): script
+        position,
+        endPosition,
+        getterName,
+        setterName,
+        initializer,
+        annotations.object);
+  }
+
+  FunctionDeclaration getFunctionDeclaration(Member member, Code code) {
+    int flags = 0;
+    if (member is Constructor) {
+      flags |= FunctionDeclaration.isConstructorFlag;
+    }
+    if (member is Procedure) {
+      if (member.isGetter) {
+        flags |= FunctionDeclaration.isGetterFlag;
+      } else if (member.isSetter) {
+        flags |= FunctionDeclaration.isSetterFlag;
+      } else if (member.isFactory) {
+        flags |= FunctionDeclaration.isFactoryFlag;
+      }
+      if (member.isStatic) {
+        flags |= FunctionDeclaration.isStaticFlag;
+      }
+      if (member.isForwardingStub) {
+        flags |= FunctionDeclaration.isForwardingStubFlag;
+      }
+      if (member.isNoSuchMethodForwarder) {
+        flags |= FunctionDeclaration.isNoSuchMethodForwarderFlag;
+      }
+    }
+    if (member.isAbstract) {
+      flags |= FunctionDeclaration.isAbstractFlag;
+    }
+    if (member.isConst) {
+      flags |= FunctionDeclaration.isConstFlag;
+    }
+
+    FunctionNode function = member.function;
+    if (function.requiredParameterCount !=
+        function.positionalParameters.length) {
+      flags |= FunctionDeclaration.hasOptionalPositionalParamsFlag;
+    }
+    if (function.namedParameters.isNotEmpty) {
+      flags |= FunctionDeclaration.hasOptionalNamedParamsFlag;
+    }
+    TypeParametersDeclaration typeParameters;
+    if (function.typeParameters.isNotEmpty) {
+      flags |= FunctionDeclaration.hasTypeParamsFlag;
+      typeParameters = getTypeParametersDeclaration(function.typeParameters);
+    }
+    if (isReflectable(member)) {
+      flags |= FunctionDeclaration.isReflectableFlag;
+    }
+    if (isDebuggable(member)) {
+      flags |= FunctionDeclaration.isDebuggableFlag;
+    }
+    switch (function.dartAsyncMarker) {
+      case AsyncMarker.Async:
+        flags |= FunctionDeclaration.isAsyncFlag;
+        break;
+      case AsyncMarker.AsyncStar:
+        flags |= FunctionDeclaration.isAsyncStarFlag;
+        break;
+      case AsyncMarker.SyncStar:
+        flags |= FunctionDeclaration.isSyncStarFlag;
+        break;
+      default:
+        break;
+    }
+    ObjectHandle nativeName;
+    if (member.isExternal) {
+      final String externalName = getExternalName(member);
+      if (externalName == null) {
+        flags |= FunctionDeclaration.isExternalFlag;
+      } else {
+        flags |= FunctionDeclaration.isNativeFlag;
+        nativeName = objectTable.getNameHandle(null, externalName);
+      }
+    }
+    int position = TreeNode.noOffset;
+    int endPosition = TreeNode.noOffset;
+    if (emitSourcePositions && member.fileOffset != TreeNode.noOffset) {
+      flags |= FunctionDeclaration.hasSourcePositionsFlag;
+      position = member.fileOffset;
+      endPosition = member.fileEndOffset;
+    }
+    Annotations annotations = getAnnotations(member.annotations);
+    if (annotations.object != null) {
+      flags |= FunctionDeclaration.hasAnnotationsFlag;
+      if (annotations.hasPragma) {
+        flags |= FunctionDeclaration.hasPragmaFlag;
+      }
+    }
+    if (member.fileUri != (member.parent as dynamic).fileUri) {
+      // TODO(alexmarkov): support custom scripts
+      // flags |= FunctionDeclaration.hasCustomScriptFlag;
+    }
+
+    final name = objectTable.getNameHandle(member.name.library,
+        objectTable.mangleMemberName(member, false, false));
+
+    final parameters = <ParameterDeclaration>[];
+    parameters
+        .addAll(function.positionalParameters.map(getParameterDeclaration));
+    parameters.addAll(function.namedParameters.map(getParameterDeclaration));
+
+    return new FunctionDeclaration(
+        flags,
+        name,
+        null, // TODO(alexmarkov): script
+        position,
+        endPosition,
+        typeParameters,
+        function.requiredParameterCount,
+        parameters,
+        objectTable.getHandle(function.returnType),
+        nativeName,
+        code,
+        annotations.object);
+  }
+
+  bool isReflectable(Member member) {
+    if (member is Field && member.fileOffset == TreeNode.noOffset) {
+      return false;
+    }
+    final library = member.enclosingLibrary;
+    if (library.importUri.scheme == 'dart' && member.name.isPrivate) {
+      return false;
+    }
+    if (member is Procedure &&
+        member.isStatic &&
+        library.importUri.toString() == 'dart:_internal') {
+      return false;
+    }
+    return true;
+  }
+
+  bool isDebuggable(Member member) {
+    if (member is Constructor && member.isSynthetic) {
+      return false;
+    }
+    if (member.function.dartAsyncMarker != AsyncMarker.Sync) {
+      return false;
+    }
+    if (member == asyncAwaitCompleterGetFuture) {
+      return false;
+    }
+    return true;
+  }
+
+  TypeParametersDeclaration getTypeParametersDeclaration(
+      List<TypeParameter> typeParams) {
+    return new TypeParametersDeclaration(typeParams
+        .map((tp) => new NameAndType(objectTable.getNameHandle(null, tp.name),
+            objectTable.getHandle(tp.bound)))
+        .toList());
+  }
+
+  ParameterDeclaration getParameterDeclaration(VariableDeclaration variable) {
+    final name = objectTable.getNameHandle(null, variable.name);
+    final type = objectTable.getHandle(variable.type);
+    return new ParameterDeclaration(name, type);
+  }
+
+  List<int> getParameterFlags(FunctionNode function) {
+    int getFlags(VariableDeclaration variable) {
+      int flags = 0;
+      if (variable.isCovariant) {
+        flags |= ParameterDeclaration.isCovariantFlag;
+      }
+      if (variable.isGenericCovariantImpl) {
+        flags |= ParameterDeclaration.isGenericCovariantImplFlag;
+      }
+      return flags;
+    }
+
+    List<int> paramFlags = <int>[];
+    paramFlags.addAll(function.positionalParameters.map(getFlags));
+    paramFlags.addAll(function.namedParameters.map(getFlags));
+
+    for (int flags in paramFlags) {
+      if (flags != 0) {
+        return paramFlags;
+      }
+    }
+    return null;
   }
 
   @override
   defaultMember(Member node) {
-    if (node.isAbstract) {
+    if (node is Procedure && node.isRedirectingFactoryConstructor) {
       return;
     }
     try {
+      bool hasCode = false;
+      start(node);
       if (node is Field) {
-        if (node.isStatic && !_hasTrivialInitializer(node)) {
-          start(node);
+        if (hasInitializerCode(node)) {
+          hasCode = true;
           if (node.isConst) {
             _genPushConstExpr(node.initializer);
           } else {
             _generateNode(node.initializer);
           }
           _genReturnTOS();
-          end(node);
         }
       } else if ((node is Procedure && !node.isRedirectingFactoryConstructor) ||
           (node is Constructor)) {
-        start(node);
-        if (node is Constructor) {
-          _genConstructorInitializers(node);
-        }
-        if (node.isExternal) {
-          final String nativeName = getExternalName(node);
-          if (nativeName == null) {
-            return;
+        if (!node.isAbstract) {
+          hasCode = true;
+          if (node is Constructor) {
+            _genConstructorInitializers(node);
           }
-          _genNativeCall(nativeName);
-        } else {
-          _generateNode(node.function?.body);
-          // BytecodeAssembler eliminates this bytecode if it is unreachable.
-          asm.emitPushNull();
+          if (node.isExternal) {
+            final String nativeName = getExternalName(node);
+            if (nativeName != null) {
+              _genNativeCall(nativeName);
+            } else {
+              // TODO(alexmarkov): generate throwing UnimplementedError
+              //  ("No definition given for external method Foo.bar").
+              asm.emitPushNull();
+            }
+          } else {
+            _generateNode(node.function?.body);
+            // BytecodeAssembler eliminates this bytecode if it is unreachable.
+            asm.emitPushNull();
+          }
+          _genReturnTOS();
         }
-        _genReturnTOS();
-        end(node);
+      } else {
+        throw 'Unexpected member ${node.runtimeType} $node';
       }
+      end(node, hasCode);
     } on BytecodeLimitExceededException {
       // Do not generate bytecode and fall back to using kernel AST.
+      // TODO(alexmarkov): issue compile-time error
       hasErrors = true;
-      end(node);
+      end(node, false);
     }
   }
 
+  bool hasInitializerCode(Field field) =>
+      field.isStatic && !_hasTrivialInitializer(field);
+
   void _genNativeCall(String nativeName) {
     final function = enclosingMember.function;
     assert(function != null);
@@ -324,6 +652,11 @@
   Procedure get iteratorCurrent => _iteratorCurrent ??=
       libraryIndex.getMember('dart:core', 'Iterator', 'get:current');
 
+  Procedure _asyncAwaitCompleterGetFuture;
+  Procedure get asyncAwaitCompleterGetFuture =>
+      _asyncAwaitCompleterGetFuture ??= libraryIndex.getMember(
+          'dart:async', '_AsyncAwaitCompleter', 'get:future');
+
   void _recordSourcePosition(TreeNode node) {
     if (emitSourcePositions) {
       asm.currentSourcePosition = node.fileOffset;
@@ -784,7 +1117,6 @@
           new List<TypeParameter>.from(enclosingFunction.typeParameters);
       functionTypeParametersSet = functionTypeParameters.toSet();
     }
-    locals = new LocalVariables(node);
     // TODO(alexmarkov): improve caching in ConstantEvaluator and reuse it
     constantEvaluator = new ConstantEvaluator(
         constantsBackend,
@@ -793,6 +1125,11 @@
         /* enableAsserts = */ true,
         errorReporter)
       ..env = new EvaluationEnvironment();
+
+    if (node.isAbstract || node is Field && !hasInitializerCode(node)) {
+      return;
+    }
+
     labeledStatements = <LabeledStatement, Label>{};
     switchCases = <SwitchCase, Label>{};
     tryCatches = <TryCatch, TryBlock>{};
@@ -807,6 +1144,7 @@
     savedAssemblers = <BytecodeAssembler>[];
     currentLoopDepth = 0;
 
+    locals = new LocalVariables(node);
     locals.enterScope(node);
     assert(!locals.isSyncYieldingFrame);
 
@@ -838,10 +1176,44 @@
     asm.bind(done);
   }
 
-  void end(Member node) {
+  void end(Member node, bool hasCode) {
     if (!hasErrors) {
-      metadata.mapping[node] = new MemberBytecode(cp, asm.bytecode,
-          asm.exceptionsTable, asm.sourcePositions, nullableFields, closures);
+      Code code;
+      if (hasCode) {
+        List<int> parameterFlags = null;
+        int forwardingStubTargetCpIndex = null;
+        int defaultFunctionTypeArgsCpIndex = null;
+
+        if (node is Procedure) {
+          parameterFlags = getParameterFlags(node.function);
+
+          if (node.isForwardingStub) {
+            forwardingStubTargetCpIndex =
+                cp.addObjectRef(node.forwardingStubSuperTarget);
+          }
+
+          final defaultTypes = getDefaultFunctionTypeArguments(node.function);
+          if (defaultTypes != null) {
+            defaultFunctionTypeArgsCpIndex = cp.addTypeArguments(defaultTypes);
+          }
+        }
+        code = new Code(
+            cp,
+            asm.bytecode,
+            asm.exceptionsTable,
+            finalizeSourcePositions(),
+            nullableFields,
+            closures,
+            parameterFlags,
+            forwardingStubTargetCpIndex,
+            defaultFunctionTypeArgsCpIndex);
+        bytecodeComponent.codes.add(code);
+      }
+      if (node is Field) {
+        fieldDeclarations.add(getFieldDeclaration(node, code));
+      } else {
+        functionDeclarations.add(getFunctionDeclaration(node, code));
+      }
     }
 
     typeEnvironment.thisType = null;
@@ -871,6 +1243,14 @@
     hasErrors = false;
   }
 
+  SourcePositions finalizeSourcePositions() {
+    if (asm.sourcePositions.mapping.isEmpty) {
+      return null;
+    }
+    bytecodeComponent.sourcePositions.add(asm.sourcePositions);
+    return asm.sourcePositions;
+  }
+
   void _genPrologue(Node node, FunctionNode function) {
     if (locals.hasOptionalParameters) {
       final int numOptionalPositional = function.positionalParameters.length -
@@ -971,18 +1351,13 @@
 
   void _handleDefaultTypeArguments(
       FunctionNode function, Label doneCheckingTypeArguments) {
-    bool hasNonDynamicDefaultTypes = function.typeParameters.any(
-        (p) => p.defaultType != null && p.defaultType != const DynamicType());
-    if (!hasNonDynamicDefaultTypes) {
+    List<DartType> defaultTypes = getDefaultFunctionTypeArguments(function);
+    if (defaultTypes == null) {
       return;
     }
 
     asm.emitJumpIfNotZeroTypeArgs(doneCheckingTypeArguments);
 
-    List<DartType> defaultTypes = function.typeParameters
-        .map((p) => p.defaultType ?? const DynamicType())
-        .toList();
-
     // Load parent function type arguments if they are used to
     // instantiate default types.
     if (isClosure &&
@@ -1317,8 +1692,8 @@
 
     locals.leaveScope();
 
-    closure.bytecode = new ClosureBytecode(
-        asm.bytecode, asm.exceptionsTable, asm.sourcePositions);
+    closure.code = new ClosureCode(
+        asm.bytecode, asm.exceptionsTable, finalizeSourcePositions());
 
     _popAssemblerState();
     yieldPoints = savedYieldPoints;
@@ -2070,13 +2445,27 @@
     _genRethrow(tryCatch);
   }
 
-  bool _hasTrivialInitializer(Field field) =>
-      (field.initializer == null) ||
-      (field.initializer is StringLiteral) ||
-      (field.initializer is BoolLiteral) ||
-      (field.initializer is IntLiteral) ||
-      (field.initializer is DoubleLiteral) ||
-      (field.initializer is NullLiteral);
+  bool _hasTrivialInitializer(Field field) {
+    final initializer = field.initializer;
+    if (initializer == null ||
+        initializer is StringLiteral ||
+        initializer is BoolLiteral ||
+        initializer is IntLiteral ||
+        initializer is DoubleLiteral ||
+        initializer is NullLiteral) {
+      return true;
+    }
+    Constant constValue;
+    if (initializer is ConstantExpression) {
+      constValue = initializer.constant;
+    } else if (field.isConst) {
+      constValue = _evaluateConstantExpression(initializer);
+    }
+    if (constValue is PrimitiveConstant) {
+      return true;
+    }
+    return false;
+  }
 
   @override
   visitStaticGet(StaticGet node) {
@@ -2483,7 +2872,7 @@
   }
 
   @override
-  visitFunctionDeclaration(FunctionDeclaration node) {
+  visitFunctionDeclaration(ast.FunctionDeclaration node) {
     _genPushContextIfCaptured(node.variable);
     _genClosure(node, node.variable.name, node.function);
     _genStoreVar(node.variable);
@@ -2991,3 +3380,10 @@
 
   FinallyBlock(this.generateContinuation);
 }
+
+class Annotations {
+  final ObjectHandle object;
+  final bool hasPragma;
+
+  const Annotations(this.object, this.hasPragma);
+}
diff --git a/pkg/vm/lib/bytecode/generics.dart b/pkg/vm/lib/bytecode/generics.dart
index 70b6327..9382da6 100644
--- a/pkg/vm/lib/bytecode/generics.dart
+++ b/pkg/vm/lib/bytecode/generics.dart
@@ -73,6 +73,16 @@
   return flatTypeArgs;
 }
 
+List<DartType> getDefaultFunctionTypeArguments(FunctionNode function) {
+  List<DartType> defaultTypes = function.typeParameters
+      .map((p) => p.defaultType ?? const DynamicType())
+      .toList();
+  if (_isAllDynamic(defaultTypes)) {
+    return null;
+  }
+  return defaultTypes;
+}
+
 bool _isAllDynamic(List<DartType> typeArgs) {
   for (var t in typeArgs) {
     if (t != const DynamicType()) {
diff --git a/pkg/vm/lib/bytecode/local_vars.dart b/pkg/vm/lib/bytecode/local_vars.dart
index 0baa233..d365fd2 100644
--- a/pkg/vm/lib/bytecode/local_vars.dart
+++ b/pkg/vm/lib/bytecode/local_vars.dart
@@ -300,7 +300,7 @@
     _enterFrame(node);
 
     if (node is Field) {
-      node.initializer.accept(this);
+      node.initializer?.accept(this);
     } else {
       assert(node is Procedure ||
           node is Constructor ||
@@ -959,7 +959,7 @@
 
     if (node is Field) {
       _allocateSpecialVariables();
-      node.initializer.accept(this);
+      node.initializer?.accept(this);
     } else {
       assert(node is Procedure ||
           node is Constructor ||
diff --git a/pkg/vm/lib/bytecode/object_table.dart b/pkg/vm/lib/bytecode/object_table.dart
index fd54b70..9c3f530 100644
--- a/pkg/vm/lib/bytecode/object_table.dart
+++ b/pkg/vm/lib/bytecode/object_table.dart
@@ -21,6 +21,7 @@
         StringWriter;
 import 'generics.dart'
     show getInstantiatorTypeArguments, isRecursiveAfterFlattening;
+import 'declarations.dart' show TypeParametersDeclaration;
 
 /*
 
@@ -797,13 +798,7 @@
   @override
   void writeContents(BufferedWriter writer) {
     if ((_flags & flagHasTypeParams) != 0) {
-      writer.writePackedUInt30(typeParams.length);
-      for (var tp in typeParams) {
-        writer.writePackedObject(tp.name);
-      }
-      for (var tp in typeParams) {
-        writer.writePackedObject(tp.type);
-      }
+      new TypeParametersDeclaration(typeParams).write(writer);
     }
     writer.writePackedUInt30(positionalParams.length + namedParams.length);
     if (_flags &
@@ -824,13 +819,7 @@
   @override
   void readContents(BufferedReader reader) {
     if ((_flags & flagHasTypeParams) != 0) {
-      final int numTypeParams = reader.readPackedUInt30();
-      List<_NameHandle> names = new List<_NameHandle>.generate(
-          numTypeParams, (_) => reader.readPackedObject());
-      List<_TypeHandle> bounds = new List<_TypeHandle>.generate(
-          numTypeParams, (_) => reader.readPackedObject());
-      typeParams = new List<NameAndType>.generate(
-          numTypeParams, (int i) => new NameAndType(names[i], bounds[i]));
+      typeParams = new TypeParametersDeclaration.read(reader).typeParams;
     } else {
       typeParams = const <NameAndType>[];
     }
@@ -847,7 +836,7 @@
         (_) => reader.readPackedObject());
     if (hasNamedParams) {
       namedParams = new List<NameAndType>.generate(
-          reader.readPackedUInt30(),
+          numParams - numRequiredParams,
           (_) => new NameAndType(
               reader.readPackedObject(), reader.readPackedObject()));
     } else {
@@ -1782,11 +1771,7 @@
     }
     final returnType = objectTable.getHandle(node.returnType);
 
-    for (int i = 0; i < node.typeParameters.length; ++i) {
-      _typeParameters.remove(node.typeParameters[i]);
-    }
-
-    return objectTable.getOrAddObject(new _FunctionTypeHandle(
+    final result = objectTable.getOrAddObject(new _FunctionTypeHandle(
         node.typeParameters
             .map((tp) => new NameAndType(
                 objectTable.getNameHandle(null, tp.name),
@@ -1796,6 +1781,12 @@
         positionalParams,
         namedParams,
         returnType));
+
+    for (int i = 0; i < node.typeParameters.length; ++i) {
+      _typeParameters.remove(node.typeParameters[i]);
+    }
+
+    return result;
   }
 
   @override
diff --git a/pkg/vm/lib/bytecode/source_positions.dart b/pkg/vm/lib/bytecode/source_positions.dart
index ce4bc3a..22ed3b1 100644
--- a/pkg/vm/lib/bytecode/source_positions.dart
+++ b/pkg/vm/lib/bytecode/source_positions.dart
@@ -24,7 +24,7 @@
     }
   }
 
-  void writeContents(BufferedWriter writer) {
+  void write(BufferedWriter writer) {
     writer.writePackedUInt30(mapping.length);
     final encodePC = new PackedUInt30DeltaEncoder();
     final encodeOffset = new SLEB128DeltaEncoder();
@@ -34,18 +34,7 @@
     });
   }
 
-  void write(BufferedWriter writer) {
-    // TODO(alexmarkov): write source positions in a separate section
-    BufferedWriter contentsWriter = new BufferedWriter.fromWriter(writer);
-    writeContents(contentsWriter);
-
-    final contents = contentsWriter.takeBytes();
-    writer.writePackedUInt30(contents.length);
-    writer.writeBytes(contents);
-  }
-
   SourcePositions.read(BufferedReader reader) {
-    reader.readPackedUInt30(); // Contents length in bytes.
     final int length = reader.readPackedUInt30();
     final decodePC = new PackedUInt30DeltaDecoder();
     final decodeOffset = new SLEB128DeltaDecoder();
diff --git a/pkg/vm/lib/constants_error_reporter.dart b/pkg/vm/lib/constants_error_reporter.dart
index d2fdc95..724f5d8 100644
--- a/pkg/vm/lib/constants_error_reporter.dart
+++ b/pkg/vm/lib/constants_error_reporter.dart
@@ -6,164 +6,26 @@
 /// [constants.ErrorReporter] which uses package:front_end to report errors.
 library vm.constants_error_reporter;
 
+import 'package:front_end/src/api_prototype/constant_evaluator.dart'
+    as constants;
+
 import 'package:front_end/src/api_unstable/vm.dart'
-    show CompilerContext, Severity;
+    show CompilerContext, LocatedMessage, Severity;
 
-import 'package:front_end/src/api_unstable/vm.dart' as codes;
+import 'package:kernel/ast.dart' show InvalidExpression;
 
-import 'package:kernel/ast.dart'
-    show Constant, DartType, IntConstant, Member, TreeNode;
-import 'package:kernel/transformations/constants.dart' as constants;
-import 'package:kernel/type_environment.dart' show TypeEnvironment;
-
-class ForwardConstantEvaluationErrors extends constants.ErrorReporter {
+class ForwardConstantEvaluationErrors implements constants.ErrorReporter {
   // This will get the currently active [CompilerContext] from a zone variable.
   // If there is no active context, this will throw.
   final CompilerContext compilerContext = CompilerContext.current;
 
-  final TypeEnvironment typeEnvironment;
-
-  ForwardConstantEvaluationErrors(this.typeEnvironment);
-
   @override
-  String freeTypeParameter(
-      List<TreeNode> context, TreeNode node, DartType type) {
-    final message =
-        codes.templateConstEvalFreeTypeParameter.withArguments(type);
-    return reportIt(context, message, node);
+  void report(LocatedMessage message, List<LocatedMessage> context) {
+    compilerContext.options.report(message, Severity.error, context: context);
   }
 
   @override
-  String duplicateKey(List<TreeNode> context, TreeNode node, Constant key) {
-    final message = codes.templateConstEvalDuplicateKey.withArguments(key);
-    return reportIt(context, message, node);
-  }
-
-  @override
-  String invalidDartType(List<TreeNode> context, TreeNode node,
-      Constant receiver, DartType expectedType) {
-    final message = codes.templateConstEvalInvalidType.withArguments(
-        receiver, expectedType, receiver.getType(typeEnvironment));
-    return reportIt(context, message, node);
-  }
-
-  @override
-  String invalidBinaryOperandType(
-      List<TreeNode> context,
-      TreeNode node,
-      Constant receiver,
-      String op,
-      DartType expectedType,
-      DartType actualType) {
-    final message = codes.templateConstEvalInvalidBinaryOperandType
-        .withArguments(op, receiver, expectedType, actualType);
-    return reportIt(context, message, node);
-  }
-
-  @override
-  String invalidMethodInvocation(
-      List<TreeNode> context, TreeNode node, Constant receiver, String op) {
-    final message = codes.templateConstEvalInvalidMethodInvocation
-        .withArguments(op, receiver);
-    return reportIt(context, message, node);
-  }
-
-  @override
-  String invalidStaticInvocation(
-      List<TreeNode> context, TreeNode node, Member target) {
-    final message = codes.templateConstEvalInvalidStaticInvocation
-        .withArguments(target.name.toString());
-    return reportIt(context, message, node);
-  }
-
-  @override
-  String invalidStringInterpolationOperand(
-      List<TreeNode> context, TreeNode node, Constant constant) {
-    final message = codes.templateConstEvalInvalidStringInterpolationOperand
-        .withArguments(constant);
-    return reportIt(context, message, node);
-  }
-
-  @override
-  String invalidSymbolName(
-      List<TreeNode> context, TreeNode node, Constant constant) {
-    final message =
-        codes.templateConstEvalInvalidSymbolName.withArguments(constant);
-    return reportIt(context, message, node);
-  }
-
-  @override
-  String zeroDivisor(
-      List<TreeNode> context, TreeNode node, IntConstant receiver, String op) {
-    final message = codes.templateConstEvalZeroDivisor
-        .withArguments(op, '${receiver.value}');
-    return reportIt(context, message, node);
-  }
-
-  @override
-  String negativeShift(List<TreeNode> context, TreeNode node,
-      IntConstant receiver, String op, IntConstant argument) {
-    final message = codes.templateConstEvalNegativeShift
-        .withArguments(op, '${receiver.value}', '${argument.value}');
-    return reportIt(context, message, node);
-  }
-
-  @override
-  String nonConstLiteral(List<TreeNode> context, TreeNode node, String klass) {
-    final message =
-        codes.templateConstEvalNonConstantLiteral.withArguments(klass);
-    return reportIt(context, message, node);
-  }
-
-  @override
-  String failedAssertion(List<TreeNode> context, TreeNode node, String string) {
-    final message = string == null
-        ? codes.messageConstEvalFailedAssertion
-        : codes.templateConstEvalFailedAssertionWithMessage
-            .withArguments(string);
-    return reportIt(context, message, node);
-  }
-
-  @override
-  String nonConstantVariableGet(
-      List<TreeNode> context, TreeNode node, String variableName) {
-    final message = codes.templateConstEvalNonConstantVariableGet
-        .withArguments(variableName);
-    return reportIt(context, message, node);
-  }
-
-  @override
-  String deferredLibrary(
-      List<TreeNode> context, TreeNode node, String importName) {
-    final message =
-        codes.templateConstEvalDeferredLibrary.withArguments(importName);
-    return reportIt(context, message, node);
-  }
-
-  @override
-  String circularity(List<TreeNode> context, TreeNode node) {
-    final message = codes.messageConstEvalCircularity;
-    return reportIt(context, message, node);
-  }
-
-  String reportIt(
-      List<TreeNode> context, codes.Message message, TreeNode node) {
-    final Uri uri = getFileUri(node);
-    final int fileOffset = getFileOffset(node);
-
-    final contextMessages = <codes.LocatedMessage>[];
-    for (final TreeNode node in context) {
-      final Uri uri = getFileUri(node);
-      final int fileOffset = getFileOffset(node);
-      contextMessages.add(codes.messageConstEvalContext
-          .withLocation(uri, fileOffset, codes.noLength));
-    }
-
-    final locatedMessage =
-        message.withLocation(uri, fileOffset, codes.noLength);
-
-    compilerContext.options
-        .report(locatedMessage, Severity.error, context: contextMessages);
-    return locatedMessage.message;
+  void reportInvalidExpression(InvalidExpression node) {
+    // Assumed to be already reported.
   }
 }
diff --git a/pkg/vm/lib/kernel_front_end.dart b/pkg/vm/lib/kernel_front_end.dart
index 9313820..28d0cd0 100644
--- a/pkg/vm/lib/kernel_front_end.dart
+++ b/pkg/vm/lib/kernel_front_end.dart
@@ -13,6 +13,11 @@
 import 'package:build_integration/file_system/multi_root.dart'
     show MultiRootFileSystem, MultiRootFileSystemEntity;
 
+// TODO(askesc): We should not need to call the constant evaluator
+// explicitly once constant-update-2018 is shipped.
+import 'package:front_end/src/api_prototype/constant_evaluator.dart'
+    as constants;
+
 import 'package:front_end/src/api_unstable/vm.dart'
     show
         CompilerContext,
@@ -30,7 +35,6 @@
         parseExperimentalFlags,
         printDiagnosticMessage;
 
-import 'package:kernel/type_environment.dart' show TypeEnvironment;
 import 'package:kernel/class_hierarchy.dart' show ClassHierarchy;
 import 'package:kernel/ast.dart'
     show Component, Field, Library, Reference, StaticGet;
@@ -39,7 +43,6 @@
     show LimitedBinaryPrinter;
 import 'package:kernel/core_types.dart' show CoreTypes;
 import 'package:kernel/target/targets.dart' show Target, TargetFlags, getTarget;
-import 'package:kernel/transformations/constants.dart' as constants;
 import 'package:kernel/vm/constants_native_effects.dart' as vm_constants;
 
 import 'bytecode/ast_remover.dart' show ASTRemover;
@@ -105,6 +108,8 @@
   args.addFlag('gen-bytecode', help: 'Generate bytecode', defaultsTo: false);
   args.addFlag('emit-bytecode-source-positions',
       help: 'Emit source positions in bytecode', defaultsTo: false);
+  args.addFlag('emit-bytecode-annotations',
+      help: 'Emit Dart annotations in bytecode', defaultsTo: false);
   args.addFlag('drop-ast',
       help: 'Drop AST for members with bytecode', defaultsTo: false);
   args.addFlag('show-bytecode-size-stat',
@@ -149,6 +154,7 @@
   final bool genBytecode = options['gen-bytecode'];
   final bool emitBytecodeSourcePositions =
       options['emit-bytecode-source-positions'];
+  final bool emitBytecodeAnnotations = options['emit-bytecode-annotations'];
   final bool dropAST = options['drop-ast'];
   final bool useFutureBytecodeFormat = options['use-future-bytecode-format'];
   final bool enableAsserts = options['enable-asserts'];
@@ -207,6 +213,7 @@
       environmentDefines: environmentDefines,
       genBytecode: genBytecode,
       emitBytecodeSourcePositions: emitBytecodeSourcePositions,
+      emitBytecodeAnnotations: emitBytecodeAnnotations,
       dropAST: dropAST && !splitOutputByPackages,
       useFutureBytecodeFormat: useFutureBytecodeFormat,
       enableAsserts: enableAsserts,
@@ -244,6 +251,7 @@
       environmentDefines: environmentDefines,
       genBytecode: genBytecode,
       emitBytecodeSourcePositions: emitBytecodeSourcePositions,
+      emitBytecodeAnnotations: emitBytecodeAnnotations,
       dropAST: dropAST,
       showBytecodeSizeStat: showBytecodeSizeStat,
       useFutureBytecodeFormat: useFutureBytecodeFormat,
@@ -264,6 +272,7 @@
     Map<String, String> environmentDefines,
     bool genBytecode: false,
     bool emitBytecodeSourcePositions: false,
+    bool emitBytecodeAnnotations: false,
     bool dropAST: false,
     bool useFutureBytecodeFormat: false,
     bool enableAsserts: false,
@@ -309,6 +318,7 @@
     await runWithFrontEndCompilerContext(source, options, component, () {
       generateBytecode(component,
           emitSourcePositions: emitBytecodeSourcePositions,
+          emitAnnotations: emitBytecodeAnnotations,
           useFutureBytecodeFormat: useFutureBytecodeFormat,
           environmentDefines: environmentDefines);
     });
@@ -401,16 +411,14 @@
   final vmConstants = new vm_constants.VmConstantsBackend(coreTypes);
 
   await runWithFrontEndCompilerContext(source, compilerOptions, component, () {
-    final hierarchy = new ClassHierarchy(component);
-    final typeEnvironment = new TypeEnvironment(coreTypes, hierarchy);
-
     // TFA will remove constants fields which are unused (and respects the
     // vm/embedder entrypoints).
     constants.transformComponent(component, vmConstants, environmentDefines,
-        new ForwardConstantEvaluationErrors(typeEnvironment),
+        new ForwardConstantEvaluationErrors(),
         keepFields: true,
         evaluateAnnotations: true,
-        enableAsserts: enableAsserts);
+        enableAsserts: enableAsserts,
+        desugarSets: !compilerOptions.target.supportsSetLiterals);
   });
 }
 
@@ -602,6 +610,7 @@
   Map<String, String> environmentDefines,
   bool genBytecode: false,
   bool emitBytecodeSourcePositions: false,
+  bool emitBytecodeAnnotations: false,
   bool dropAST: false,
   bool showBytecodeSizeStat: false,
   bool useFutureBytecodeFormat: false,
@@ -653,6 +662,7 @@
         generateBytecode(component,
             libraries: libraries,
             emitSourcePositions: emitBytecodeSourcePositions,
+            emitAnnotations: emitBytecodeAnnotations,
             useFutureBytecodeFormat: useFutureBytecodeFormat,
             environmentDefines: environmentDefines);
 
@@ -667,11 +677,12 @@
       final BinaryPrinter printer = new LimitedBinaryPrinter(sink,
           (lib) => packageFor(lib) == package, false /* excludeUriToSource */);
       printer.writeComponentFile(component);
-      component.mainMethod = main;
-      component.problemsAsJson = problems;
+
       if (genBytecode && dropAST) {
         astRemover.restoreAST();
       }
+      component.mainMethod = main;
+      component.problemsAsJson = problems;
 
       await sink.close();
     }
diff --git a/pkg/vm/lib/metadata/bytecode.dart b/pkg/vm/lib/metadata/bytecode.dart
index cd9f65e..6b18d0e 100644
--- a/pkg/vm/lib/metadata/bytecode.dart
+++ b/pkg/vm/lib/metadata/bytecode.dart
@@ -4,417 +4,57 @@
 
 library vm.metadata.bytecode;
 
-import 'package:kernel/ast.dart';
+import 'package:kernel/ast.dart'
+    show BinarySink, BinarySource, MetadataRepository, Node, TreeNode;
+import 'package:kernel/ast.dart' as ast show Component;
 import '../bytecode/bytecode_serialization.dart'
-    show BufferedWriter, BufferedReader, BytecodeSizeStatistics, StringTable;
-import '../bytecode/constant_pool.dart' show ConstantPool;
-import '../bytecode/dbc.dart'
-    show
-        stableBytecodeFormatVersion,
-        futureBytecodeFormatVersion,
-        bytecodeInstructionsAlignment;
-import '../bytecode/disassembler.dart' show BytecodeDisassembler;
-import '../bytecode/exceptions.dart' show ExceptionsTable;
-import '../bytecode/object_table.dart'
-    show ObjectTable, ObjectHandle, NameAndType;
-import '../bytecode/source_positions.dart' show SourcePositions;
+    show BufferedWriter, BufferedReader, LinkWriter, LinkReader;
+import '../bytecode/declarations.dart' show Component, Members;
 
 abstract class BytecodeMetadata {
   void write(BufferedWriter writer);
 }
 
-/// Bytecode of a member is encoded in the following way:
-///
-/// type MemberBytecode {
-///   UInt flags (HasExceptionsTable, HasSourcePositions, HasNullableFields,
-///               HasClosures)
-///
-///   (optional, present if HasClosures)
-///   List<ClosureDeclaration> closureDeclarations
-///
-///   ConstantPool constantPool
-///
-///   UInt bytecodeSizeInBytes
-///   Byte[] padding
-///   Byte[bytecodeSizeInBytes] bytecodes
-///
-///   (optional, present if HasExceptionsTable)
-///   ExceptionsTable exceptionsTable
-///
-///   (optional, present if HasSourcePositions)
-///   SourcePositions sourcePositionsTabe
-///
-///   (optional, present if HasNullableFields)
-///   List<PackedObject> nullableFields
-///
-///   (optional, present if HasClosures)
-///   ClosureBytecode[] closures
-/// }
-///
-/// type ClosureDeclaration {
-///   UInt flags (hasOptionalPositionalParams, hasOptionalNamedParams,
-///               hasTypeParams)
-///
-///   PackedObject parent // Member or Closure
-///   PackedObject name
-///
-///   if hasTypeParams
-///     UInt numTypeParameters
-///     PackedObject[numTypeParameters] typeParameterNames
-///     PackedObject[numTypeParameters] typeParameterBounds
-///
-///   UInt numParameters
-///
-///   if hasOptionalPositionalParams || hasOptionalNamedParams
-///     UInt numRequiredParameters
-///
-///   NameAndType[numParameters] parameters
-///   PackedObject returnType
-/// }
-///
-/// type ClosureBytecode {
-///   UInt flags (HasExceptionsTable, HasSourcePositions)
-///
-///   UInt bytecodeSizeInBytes
-///   Byte[] padding
-///   Byte[bytecodeSizeInBytes] bytecodes
-///
-///   (optional, present if HasExceptionsTable)
-///   ExceptionsTable exceptionsTable
-///
-///   (optional, present if HasSourcePositions)
-///   SourcePositions sourcePositionsTabe
-/// }
-///
-/// Encoding of ExceptionsTable is described in
-/// pkg/vm/lib/bytecode/exceptions.dart.
-///
-/// Encoding of ConstantPool is described in
-/// pkg/vm/lib/bytecode/constant_pool.dart.
-///
-class MemberBytecode extends BytecodeMetadata {
-  static const hasExceptionsTableFlag = 1 << 0;
-  static const hasSourcePositionsFlag = 1 << 1;
-  static const hasNullableFieldsFlag = 1 << 2;
-  static const hasClosuresFlag = 1 << 3;
+class MembersBytecodeMetadata extends BytecodeMetadata {
+  final Members members;
 
-  final ConstantPool constantPool;
-  final List<int> bytecodes;
-  final ExceptionsTable exceptionsTable;
-  final SourcePositions sourcePositions;
-  final List<ObjectHandle> nullableFields;
-  final List<ClosureDeclaration> closures;
-
-  bool get hasExceptionsTable => exceptionsTable.blocks.isNotEmpty;
-  bool get hasSourcePositions => sourcePositions.mapping.isNotEmpty;
-  bool get hasNullableFields => nullableFields.isNotEmpty;
-  bool get hasClosures => closures.isNotEmpty;
-
-  int get flags =>
-      (hasExceptionsTable ? hasExceptionsTableFlag : 0) |
-      (hasSourcePositions ? hasSourcePositionsFlag : 0) |
-      (hasNullableFields ? hasNullableFieldsFlag : 0) |
-      (hasClosures ? hasClosuresFlag : 0);
-
-  MemberBytecode(this.constantPool, this.bytecodes, this.exceptionsTable,
-      this.sourcePositions, this.nullableFields, this.closures);
+  MembersBytecodeMetadata(this.members);
 
   @override
   void write(BufferedWriter writer) {
-    final start = writer.offset;
-    writer.writePackedUInt30(flags);
-    if (hasClosures) {
-      writer.writePackedUInt30(closures.length);
-      closures.forEach((c) => c.write(writer));
-    }
-    constantPool.write(writer);
-    _writeBytecodeInstructions(writer, bytecodes);
-    if (hasExceptionsTable) {
-      exceptionsTable.write(writer);
-    }
-    if (hasSourcePositions) {
-      sourcePositions.write(writer);
-    }
-    if (hasNullableFields) {
-      writer.writePackedList(nullableFields);
-    }
-    if (hasClosures) {
-      closures.forEach((c) => c.bytecode.write(writer));
-    }
-    BytecodeSizeStatistics.membersSize += (writer.offset - start);
+    writer.writeLinkOffset(members);
   }
 
-  factory MemberBytecode.read(BufferedReader reader) {
-    int flags = reader.readPackedUInt30();
-    final List<ClosureDeclaration> closures = ((flags & hasClosuresFlag) != 0)
-        ? new List<ClosureDeclaration>.generate(reader.readPackedUInt30(),
-            (_) => new ClosureDeclaration.read(reader))
-        : const <ClosureDeclaration>[];
-    final ConstantPool constantPool = new ConstantPool.read(reader);
-    final List<int> bytecodes = _readBytecodeInstructions(reader);
-    final exceptionsTable = ((flags & hasExceptionsTableFlag) != 0)
-        ? new ExceptionsTable.read(reader)
-        : new ExceptionsTable();
-    final sourcePositions = ((flags & hasSourcePositionsFlag) != 0)
-        ? new SourcePositions.read(reader)
-        : new SourcePositions();
-    final List<ObjectHandle> nullableFields =
-        ((flags & hasNullableFieldsFlag) != 0)
-            ? reader.readPackedList<ObjectHandle>()
-            : const <ObjectHandle>[];
-    for (var c in closures) {
-      c.bytecode = new ClosureBytecode.read(reader);
-    }
-    return new MemberBytecode(constantPool, bytecodes, exceptionsTable,
-        sourcePositions, nullableFields, closures);
+  factory MembersBytecodeMetadata.read(BufferedReader reader) {
+    return new MembersBytecodeMetadata(reader.readLinkOffset<Members>());
   }
 
-  // TODO(alexmarkov): Consider printing constant pool before bytecode.
   @override
   String toString() => "\n"
-      "Bytecode {\n"
-      "${new BytecodeDisassembler().disassemble(bytecodes, exceptionsTable, annotations: [
-        sourcePositions.getBytecodeAnnotations()
-      ])}}\n"
-      "$exceptionsTable"
-      "${nullableFields.isEmpty ? '' : 'Nullable fields: $nullableFields}\n'}"
-      "$constantPool"
-      "${closures.join('\n')}";
+      "MembersBytecodeMetadata {\n"
+      "$members\n"
+      "}\n";
 }
 
-class ClosureDeclaration {
-  static const int flagHasOptionalPositionalParams = 1 << 0;
-  static const int flagHasOptionalNamedParams = 1 << 1;
-  static const int flagHasTypeParams = 1 << 2;
+class ComponentBytecodeMetadata extends BytecodeMetadata {
+  final Component component;
 
-  final ObjectHandle parent;
-  final ObjectHandle name;
-  final List<NameAndType> typeParams;
-  final int numRequiredParams;
-  final int numNamedParams;
-  final List<NameAndType> parameters;
-  final ObjectHandle returnType;
-  ClosureBytecode bytecode;
-
-  ClosureDeclaration(
-      this.parent,
-      this.name,
-      this.typeParams,
-      this.numRequiredParams,
-      this.numNamedParams,
-      this.parameters,
-      this.returnType);
-
-  void write(BufferedWriter writer) {
-    int flags = 0;
-    if (numRequiredParams != parameters.length) {
-      if (numNamedParams > 0) {
-        flags |= flagHasOptionalNamedParams;
-      } else {
-        flags |= flagHasOptionalPositionalParams;
-      }
-    }
-    if (typeParams.isNotEmpty) {
-      flags |= flagHasTypeParams;
-    }
-    writer.writePackedUInt30(flags);
-    writer.writePackedObject(parent);
-    writer.writePackedObject(name);
-
-    if (flags & flagHasTypeParams != 0) {
-      writer.writePackedUInt30(typeParams.length);
-      for (var tp in typeParams) {
-        writer.writePackedObject(tp.name);
-      }
-      for (var tp in typeParams) {
-        writer.writePackedObject(tp.type);
-      }
-    }
-    writer.writePackedUInt30(parameters.length);
-    if (flags &
-            (flagHasOptionalPositionalParams | flagHasOptionalNamedParams) !=
-        0) {
-      writer.writePackedUInt30(numRequiredParams);
-    }
-    for (var param in parameters) {
-      writer.writePackedObject(param.name);
-      writer.writePackedObject(param.type);
-    }
-    writer.writePackedObject(returnType);
-  }
-
-  factory ClosureDeclaration.read(BufferedReader reader) {
-    final int flags = reader.readPackedUInt30();
-    final parent = reader.readPackedObject();
-    final name = reader.readPackedObject();
-    List<NameAndType> typeParams;
-    if ((flags & flagHasTypeParams) != 0) {
-      final int numTypeParams = reader.readPackedUInt30();
-      List<ObjectHandle> names = new List<ObjectHandle>.generate(
-          numTypeParams, (_) => reader.readPackedObject());
-      List<ObjectHandle> bounds = new List<ObjectHandle>.generate(
-          numTypeParams, (_) => reader.readPackedObject());
-      typeParams = new List<NameAndType>.generate(
-          numTypeParams, (int i) => new NameAndType(names[i], bounds[i]));
-    } else {
-      typeParams = const <NameAndType>[];
-    }
-    final numParams = reader.readPackedUInt30();
-    final numRequiredParams = (flags &
-                (flagHasOptionalPositionalParams |
-                    flagHasOptionalNamedParams) !=
-            0)
-        ? reader.readPackedUInt30()
-        : numParams;
-    final numNamedParams = (flags & flagHasOptionalNamedParams != 0)
-        ? (numParams - numRequiredParams)
-        : 0;
-    final List<NameAndType> parameters = new List<NameAndType>.generate(
-        numParams,
-        (_) => new NameAndType(
-            reader.readPackedObject(), reader.readPackedObject()));
-    final returnType = reader.readPackedObject();
-    return new ClosureDeclaration(parent, name, typeParams, numRequiredParams,
-        numNamedParams, parameters, returnType);
-  }
-
-  @override
-  String toString() {
-    StringBuffer sb = new StringBuffer();
-    sb.write('Closure $parent::$name');
-    if (typeParams.isNotEmpty) {
-      sb.write(' <${typeParams.join(', ')}>');
-    }
-    sb.write(' (');
-    sb.write(parameters.sublist(0, numRequiredParams).join(', '));
-    if (numRequiredParams != parameters.length) {
-      if (numRequiredParams > 0) {
-        sb.write(', ');
-      }
-      if (numNamedParams > 0) {
-        sb.write('{ ${parameters.sublist(numRequiredParams).join(', ')} }');
-      } else {
-        sb.write('[ ${parameters.sublist(numRequiredParams).join(', ')} ]');
-      }
-    }
-    sb.write(') -> ');
-    sb.writeln(returnType);
-    if (bytecode != null) {
-      sb.write(bytecode.toString());
-    }
-    return sb.toString();
-  }
-}
-
-/// Bytecode of a nested function (closure).
-/// Closures share the constant pool of a top-level member.
-class ClosureBytecode {
-  final List<int> bytecodes;
-  final ExceptionsTable exceptionsTable;
-  final SourcePositions sourcePositions;
-
-  bool get hasExceptionsTable => exceptionsTable.blocks.isNotEmpty;
-  bool get hasSourcePositions => sourcePositions.mapping.isNotEmpty;
-
-  int get flags =>
-      (hasExceptionsTable ? MemberBytecode.hasExceptionsTableFlag : 0) |
-      (hasSourcePositions ? MemberBytecode.hasSourcePositionsFlag : 0);
-
-  ClosureBytecode(this.bytecodes, this.exceptionsTable, this.sourcePositions);
-
-  void write(BufferedWriter writer) {
-    writer.writePackedUInt30(flags);
-    _writeBytecodeInstructions(writer, bytecodes);
-    if (hasExceptionsTable) {
-      exceptionsTable.write(writer);
-    }
-    if (hasSourcePositions) {
-      sourcePositions.write(writer);
-    }
-  }
-
-  factory ClosureBytecode.read(BufferedReader reader) {
-    final int flags = reader.readPackedUInt30();
-    final List<int> bytecodes = _readBytecodeInstructions(reader);
-    final exceptionsTable =
-        ((flags & MemberBytecode.hasExceptionsTableFlag) != 0)
-            ? new ExceptionsTable.read(reader)
-            : new ExceptionsTable();
-    final sourcePositions =
-        ((flags & MemberBytecode.hasSourcePositionsFlag) != 0)
-            ? new SourcePositions.read(reader)
-            : new SourcePositions();
-    return new ClosureBytecode(bytecodes, exceptionsTable, sourcePositions);
-  }
-
-  @override
-  String toString() {
-    StringBuffer sb = new StringBuffer();
-    sb.writeln('ClosureBytecode {');
-    sb.writeln(new BytecodeDisassembler().disassemble(
-        bytecodes, exceptionsTable,
-        annotations: [sourcePositions.getBytecodeAnnotations()]));
-    sb.writeln('}');
-    return sb.toString();
-  }
-}
-
-class BytecodeComponent extends BytecodeMetadata {
-  int version;
-  StringTable stringTable;
-  ObjectTable objectTable;
-
-  BytecodeComponent(this.version)
-      : stringTable = new StringTable(),
-        objectTable = new ObjectTable();
+  ComponentBytecodeMetadata(this.component);
 
   @override
   void write(BufferedWriter writer) {
-    final start = writer.offset;
-    objectTable.allocateIndexTable();
-
-    // Writing object table may add new strings to strings table,
-    // so serialize object table first.
-    BufferedWriter objectsWriter = new BufferedWriter.fromWriter(writer);
-    objectTable.write(objectsWriter);
-
-    BufferedWriter stringsWriter = new BufferedWriter.fromWriter(writer);
-    stringTable.write(stringsWriter);
-
-    writer.writePackedUInt30(version);
-    writer.writePackedUInt30(stringsWriter.offset);
-    writer.writePackedUInt30(objectsWriter.offset);
-
-    writer.writeBytes(stringsWriter.takeBytes());
-    writer.writeBytes(objectsWriter.takeBytes());
-    BytecodeSizeStatistics.componentSize += (writer.offset - start);
+    component.write(writer);
   }
 
-  BytecodeComponent.read(BufferedReader reader) {
-    version = reader.readPackedUInt30();
-    if (version != stableBytecodeFormatVersion &&
-        version != futureBytecodeFormatVersion) {
-      throw 'Error: unexpected bytecode version $version';
-    }
-    reader.formatVersion = version;
-    reader.readPackedUInt30(); // Strings size
-    reader.readPackedUInt30(); // Objects size
-
-    stringTable = new StringTable.read(reader);
-    reader.stringReader = stringTable;
-
-    objectTable = new ObjectTable.read(reader);
-    reader.objectReader = objectTable;
+  factory ComponentBytecodeMetadata.read(BufferedReader reader) {
+    return new ComponentBytecodeMetadata(new Component.read(reader));
   }
 
+  @override
   String toString() => "\n"
-      "Bytecode"
-      " (version: "
-      "${version == stableBytecodeFormatVersion ? 'stable' : version == futureBytecodeFormatVersion ? 'future' : "v$version"}"
-      ")\n"
-//      "$objectTable\n"
-//      "$stringTable\n"
-      ;
+      "ComponentBytecodeMetadata {\n"
+      "$component\n"
+      "}\n";
 }
 
 /// Repository for [BytecodeMetadata].
@@ -426,17 +66,24 @@
   final Map<TreeNode, BytecodeMetadata> mapping =
       <TreeNode, BytecodeMetadata>{};
 
-  BytecodeComponent bytecodeComponent;
+  Component bytecodeComponent;
+  LinkWriter linkWriter;
+  LinkReader linkReader;
 
   @override
   void writeToBinary(BytecodeMetadata metadata, Node node, BinarySink sink) {
-    if (node is Component) {
-      bytecodeComponent = metadata as BytecodeComponent;
+    if (node is ast.Component) {
+      bytecodeComponent = (metadata as ComponentBytecodeMetadata).component;
+      linkWriter = new LinkWriter();
     } else {
       assert(bytecodeComponent != null);
+      assert(linkWriter != null);
     }
-    final writer = new BufferedWriter(bytecodeComponent.version,
-        bytecodeComponent.stringTable, bytecodeComponent.objectTable,
+    final writer = new BufferedWriter(
+        bytecodeComponent.version,
+        bytecodeComponent.stringTable,
+        bytecodeComponent.objectTable,
+        linkWriter,
         baseOffset: sink.getBufferOffset());
     metadata.write(writer);
     sink.writeBytes(writer.takeBytes());
@@ -444,32 +91,22 @@
 
   @override
   BytecodeMetadata readFromBinary(Node node, BinarySource source) {
-    if (node is Component) {
-      final reader = new BufferedReader(-1, null, null, source.bytes,
+    if (node is ast.Component) {
+      linkReader = new LinkReader();
+      final reader = new BufferedReader(
+          -1, null, null, linkReader, source.bytes,
           baseOffset: source.currentOffset);
-      bytecodeComponent = new BytecodeComponent.read(reader);
-      return bytecodeComponent;
+      bytecodeComponent = new Component.read(reader);
+      return new ComponentBytecodeMetadata(bytecodeComponent);
     } else {
       final reader = new BufferedReader(
           bytecodeComponent.version,
           bytecodeComponent.stringTable,
           bytecodeComponent.objectTable,
+          linkReader,
           source.bytes,
           baseOffset: source.currentOffset);
-      return new MemberBytecode.read(reader);
+      return new MembersBytecodeMetadata.read(reader);
     }
   }
 }
-
-void _writeBytecodeInstructions(BufferedWriter writer, List<int> bytecodes) {
-  writer.writePackedUInt30(bytecodes.length);
-  writer.align(bytecodeInstructionsAlignment);
-  writer.writeBytes(bytecodes);
-  BytecodeSizeStatistics.instructionsSize += bytecodes.length;
-}
-
-List<int> _readBytecodeInstructions(BufferedReader reader) {
-  int len = reader.readPackedUInt30();
-  reader.align(bytecodeInstructionsAlignment);
-  return reader.readBytesAsUint8List(len);
-}
diff --git a/pkg/vm/lib/target/vm.dart b/pkg/vm/lib/target/vm.dart
index 5af1fdd..a04416a 100644
--- a/pkg/vm/lib/target/vm.dart
+++ b/pkg/vm/lib/target/vm.dart
@@ -11,7 +11,6 @@
 import 'package:kernel/target/targets.dart';
 import 'package:kernel/transformations/mixin_full_resolution.dart'
     as transformMixins show transformLibraries;
-import 'package:kernel/transformations/constants.dart' show ConstantsBackend;
 import 'package:kernel/transformations/continuation.dart' as transformAsync
     show transformLibraries, transformProcedure;
 import 'package:kernel/vm/constants_native_effects.dart'
diff --git a/pkg/vm/lib/transformations/ffi_definitions.dart b/pkg/vm/lib/transformations/ffi_definitions.dart
index 72110a3..32ff1f4 100644
--- a/pkg/vm/lib/transformations/ffi_definitions.dart
+++ b/pkg/vm/lib/transformations/ffi_definitions.dart
@@ -68,7 +68,8 @@
     ClassHierarchy hierarchy,
     List<Library> libraries,
     DiagnosticReporter diagnosticReporter) {
-  final index = new LibraryIndex(component, ["dart:ffi"]);
+  final LibraryIndex index = LibraryIndex(
+      component, const ["dart:ffi", "dart:_internal", "dart:core"]);
   if (!index.containsLibrary("dart:ffi")) {
     // if dart:ffi is not loaded, do not do the transformation
     return ReplacedMembers({}, {});
@@ -82,12 +83,28 @@
 
 /// Checks and expands the dart:ffi @struct and field annotations.
 class _FfiDefinitionTransformer extends FfiTransformer {
+  final LibraryIndex index;
+  final Field _internalIs64Bit;
+  final Constructor _unimplementedErrorCtor;
+  static const String _errorOn32BitMessage =
+      "Code-gen for FFI structs is not supported on 32-bit platforms.";
+
   Map<Field, Procedure> replacedGetters = {};
   Map<Field, Procedure> replacedSetters = {};
 
-  _FfiDefinitionTransformer(LibraryIndex index, CoreTypes coreTypes,
+  _FfiDefinitionTransformer(this.index, CoreTypes coreTypes,
       ClassHierarchy hierarchy, DiagnosticReporter diagnosticReporter)
-      : super(index, coreTypes, hierarchy, diagnosticReporter) {}
+      : _internalIs64Bit = index.getTopLevelMember('dart:_internal', 'is64Bit'),
+        _unimplementedErrorCtor =
+            index.getMember('dart:core', 'UnimplementedError', ''),
+        super(index, coreTypes, hierarchy, diagnosticReporter) {}
+
+  Statement guardOn32Bit(Statement body) {
+    final Throw error = Throw(ConstructorInvocation(_unimplementedErrorCtor,
+        Arguments([StringLiteral(_errorOn32BitMessage)])));
+    return IfStatement(
+        StaticGet(_internalIs64Bit), body, ExpressionStatement(error));
+  }
 
   @override
   visitClass(Class node) {
@@ -237,8 +254,11 @@
         pointerName,
         ProcedureKind.Getter,
         FunctionNode(
-            ReturnStatement(MethodInvocation(offsetExpression, castMethod.name,
-                Arguments([], types: [pointerType]), castMethod)),
+            guardOn32Bit(ReturnStatement(MethodInvocation(
+                offsetExpression,
+                castMethod.name,
+                Arguments([], types: [pointerType]),
+                castMethod))),
             returnType: pointerType));
 
     // Sample output:
@@ -247,11 +267,11 @@
         field.name,
         ProcedureKind.Getter,
         FunctionNode(
-            ReturnStatement(MethodInvocation(
+            guardOn32Bit(ReturnStatement(MethodInvocation(
                 PropertyGet(ThisExpression(), pointerName, pointerGetter),
                 loadMethod.name,
                 Arguments([], types: [field.type]),
-                loadMethod)),
+                loadMethod))),
             returnType: field.type));
 
     // Sample output:
@@ -261,11 +281,11 @@
         field.name,
         ProcedureKind.Setter,
         FunctionNode(
-            ReturnStatement(MethodInvocation(
+            guardOn32Bit(ReturnStatement(MethodInvocation(
                 PropertyGet(ThisExpression(), pointerName, pointerGetter),
                 storeMethod.name,
                 Arguments([VariableGet(argument)]),
-                storeMethod)),
+                storeMethod))),
             returnType: VoidType(),
             positionalParameters: [argument]));
 
@@ -287,7 +307,8 @@
     }
 
     // replace in place to avoid going over use sites
-    sizeOf.function = FunctionNode(ReturnStatement(IntLiteral(size)),
+    sizeOf.function = FunctionNode(
+        guardOn32Bit(ReturnStatement(IntLiteral(size))),
         returnType: InterfaceType(intClass));
     sizeOf.isExternal = false;
   }
diff --git a/pkg/vm/lib/transformations/protobuf_aware_treeshaker/transformer.dart b/pkg/vm/lib/transformations/protobuf_aware_treeshaker/transformer.dart
index fba5844..9034c55 100644
--- a/pkg/vm/lib/transformations/protobuf_aware_treeshaker/transformer.dart
+++ b/pkg/vm/lib/transformations/protobuf_aware_treeshaker/transformer.dart
@@ -2,10 +2,11 @@
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
 
+import 'package:front_end/src/api_prototype/constant_evaluator.dart'
+    as constants;
 import 'package:kernel/kernel.dart';
 import 'package:kernel/target/targets.dart';
 import 'package:kernel/core_types.dart';
-import 'package:kernel/transformations/constants.dart' as constants;
 import 'package:kernel/vm/constants_native_effects.dart' as vm_constants;
 import 'package:meta/meta.dart';
 import 'package:vm/transformations/type_flow/transformer.dart' as globalTypeFlow
@@ -30,7 +31,8 @@
   constants.transformComponent(component, vmConstants, environment, null,
       keepFields: true,
       evaluateAnnotations: true,
-      enableAsserts: enableAsserts);
+      enableAsserts: enableAsserts,
+      desugarSets: !target.supportsSetLiterals);
 
   TransformationInfo info = collectInfo ? TransformationInfo() : null;
 
diff --git a/pkg/vm/test/bytecode/gen_bytecode_test.dart b/pkg/vm/test/bytecode/gen_bytecode_test.dart
index f821480..887a8a0 100644
--- a/pkg/vm/test/bytecode/gen_bytecode_test.dart
+++ b/pkg/vm/test/bytecode/gen_bytecode_test.dart
@@ -28,13 +28,17 @@
       fail("Compilation error: ${message.plainTextFormatted.join('\n')}");
     };
 
+  final mainLibrary = component.mainMethod.enclosingLibrary;
+
   await runWithFrontEndCompilerContext(source, options, component, () {
     // Need to omit source positions from bytecode as they are different on
     // Linux and Windows (due to differences in newline characters).
-    generateBytecode(component, omitAssertSourcePositions: true);
+    generateBytecode(component,
+        omitAssertSourcePositions: true, libraries: [mainLibrary]);
   });
 
-  String actual = kernelLibraryToString(component.mainMethod.enclosingLibrary);
+  component.libraries.removeWhere((lib) => lib != mainLibrary);
+  String actual = kernelComponentToString(component);
 
   // Remove absolute library URIs.
   actual = actual.replaceAll(new Uri.file(pkgVmDir).toString(), '#pkg/vm');
diff --git a/pkg/vm/test/common_test_utils.dart b/pkg/vm/test/common_test_utils.dart
index 9669536..ff23f2f 100644
--- a/pkg/vm/test/common_test_utils.dart
+++ b/pkg/vm/test/common_test_utils.dart
@@ -59,6 +59,16 @@
       .replaceAll(library.importUri.toString(), library.name);
 }
 
+String kernelComponentToString(Component component) {
+  final StringBuffer buffer = new StringBuffer();
+  new Printer(buffer, showExternal: false, showMetadata: true)
+      .writeComponentFile(component);
+  final mainLibrary = component.mainMethod.enclosingLibrary;
+  return buffer
+      .toString()
+      .replaceAll(mainLibrary.importUri.toString(), mainLibrary.name);
+}
+
 class DevNullSink<T> extends Sink<T> {
   @override
   void add(T data) {}
diff --git a/pkg/vm/test/frontend_server_test.dart b/pkg/vm/test/frontend_server_test.dart
index bf7bf47..3ff0a6c 100644
--- a/pkg/vm/test/frontend_server_test.dart
+++ b/pkg/vm/test/frontend_server_test.dart
@@ -611,9 +611,7 @@
 
       expect(await result, 0);
       inputStreamController.close();
-    },
-        timeout: Timeout.factor(100),
-        skip: true /* TODO(dartbug/36197): Unskip when compiler is fixed. */);
+    }, timeout: Timeout.factor(100));
 
     test('compile expression when delta is rejected', () async {
       var fileLib = new File('${tempDir.path}/lib.dart')..createSync();
diff --git a/pkg/vm/test/incremental_compiler_test.dart b/pkg/vm/test/incremental_compiler_test.dart
index 349b566..a280c93 100644
--- a/pkg/vm/test/incremental_compiler_test.dart
+++ b/pkg/vm/test/incremental_compiler_test.dart
@@ -130,12 +130,35 @@
     Directory mytest;
     File main;
     File lib;
+    Process vm;
     setUpAll(() {
       mytest = Directory.systemTemp.createTempSync('incremental');
       main = new File('${mytest.path}/main.dart')..createSync();
-      main.writeAsStringSync("import 'lib.dart'; main() => print(foo()); \n");
+      main.writeAsStringSync("""
+      import 'lib.dart';
+      main() => print(foo());
+      class C1 extends Object with C2, C3 {
+        c1method() {
+          print("c1");
+        }
+      }
+      class C3 {
+        c3method() {
+          print("c3");
+        }
+      }
+      """);
       lib = new File('${mytest.path}/lib.dart')..createSync();
-      lib.writeAsStringSync("foo() => 'foo'; main() => print('bar');\n");
+      lib.writeAsStringSync("""
+      import 'main.dart';
+      foo() => 'foo';
+      main() => print('bar');
+      class C2 extends Object with C3 {
+        c2method() {
+          print("c2");
+        }
+      }
+      """);
     });
 
     tearDownAll(() {
@@ -144,6 +167,11 @@
       } catch (_) {
         // Ignore errors;
       }
+      try {
+        vm.kill();
+      } catch (_) {
+        // Ignore errors;
+      }
     });
 
     compileAndSerialize(
@@ -178,7 +206,7 @@
 
       var list = new File(p.join(dir.path, 'myMain.dilllist'))..createSync();
       list.writeAsStringSync("#@dill\n${mainDill.path}\n${libDill.path}\n");
-      var vm =
+      vm =
           await Process.start(Platform.resolvedExecutable, <String>[list.path]);
 
       final splitter = new LineSplitter();
@@ -205,7 +233,7 @@
 
       var list = new File(p.join(dir.path, 'myMain.dilllist'))..createSync();
       list.writeAsStringSync("#@dill\n${libDill.path}\n${mainDill.path}\n");
-      var vm =
+      vm =
           await Process.start(Platform.resolvedExecutable, <String>[list.path]);
 
       final splitter = new LineSplitter();
@@ -227,7 +255,7 @@
     test('empty list', () async {
       var list = new File(p.join(mytest.path, 'myMain.dilllist'))..createSync();
       list.writeAsStringSync("#@dill\n");
-      var vm =
+      vm =
           await Process.start(Platform.resolvedExecutable, <String>[list.path]);
 
       Completer<int> exitCodeCompleter = new Completer<int>();
@@ -241,7 +269,7 @@
     test('fallback to source compilation if fail to load', () async {
       var list = new File('${mytest.path}/myMain.dilllist')..createSync();
       list.writeAsStringSync("main() => print('baz');\n");
-      var vm =
+      vm =
           await Process.start(Platform.resolvedExecutable, <String>[list.path]);
 
       final splitter = new LineSplitter();
@@ -270,8 +298,7 @@
       var list = new File(p.join(dir.path, 'myMain.dilllist'))..createSync();
       list.writeAsStringSync("#@dill\n../main.dart.dill\n../lib.dart.dill\n");
       Directory runFrom = new Directory(dir.path + "/runFrom")..createSync();
-      var vm = await Process.start(
-          Platform.resolvedExecutable, <String>[list.path],
+      vm = await Process.start(Platform.resolvedExecutable, <String>[list.path],
           workingDirectory: runFrom.path);
 
       final splitter = new LineSplitter();
@@ -288,6 +315,129 @@
       expect(await portLineCompleter.future, equals('foo'));
       print("Compiler terminated with ${await vm.exitCode} exit code");
     });
+
+    test('collect coverage', () async {
+      collectStuff(int port) async {
+        RemoteVm remoteVm = new RemoteVm(port);
+
+        // Wait for the script to have finished.
+        while (true) {
+          Map isolate = await remoteVm.getIsolate();
+          Map pauseEvent = isolate["pauseEvent"];
+          if (pauseEvent["kind"] == "PauseExit") break;
+        }
+
+        // Collect coverage for the two user scripts.
+        Map sourceReport = await remoteVm.getSourceReport();
+        List scripts = sourceReport["scripts"];
+        Map<String, int> scriptIdToIndex = new Map<String, int>();
+        int i = 0;
+        for (Map script in scripts) {
+          if (script["uri"].toString().endsWith("main.dart") ||
+              script["uri"].toString().endsWith("lib.dart")) {
+            scriptIdToIndex[script["id"]] = i;
+          }
+          i++;
+        }
+        expect(scriptIdToIndex.length >= 2, isTrue);
+
+        List<String> errorMessages = new List<String>();
+
+        // Ensure the scripts all have a non-null 'tokenPosTable' entry.
+        Map<int, Map> scriptIndexToScript = new Map<int, Map>();
+        for (String scriptId in scriptIdToIndex.keys) {
+          Map script = await remoteVm.getObject(scriptId);
+          int scriptIdx = scriptIdToIndex[scriptId];
+          scriptIndexToScript[scriptIdx] = script;
+          List tokenPosTable = script["tokenPosTable"];
+          if (tokenPosTable == null) {
+            errorMessages.add("Script with uri ${script['uri']} "
+                "and id ${script['id']} "
+                "has null tokenPosTable.");
+          } else if (tokenPosTable.isEmpty) {
+            errorMessages.add("Script with uri ${script['uri']} "
+                "and id ${script['id']} "
+                "has empty tokenPosTable.");
+          }
+        }
+
+        // Ensure that we can get a line and column number for all reported
+        // positions in the scripts we care about.
+        List ranges = sourceReport["ranges"];
+        Set<int> scriptIndexesSet = new Set<int>.from(scriptIndexToScript.keys);
+        for (Map range in ranges) {
+          if (scriptIndexesSet.contains(range["scriptIndex"])) {
+            Set<int> positions = new Set<int>();
+            positions.add(range["startPos"]);
+            positions.add(range["endPos"]);
+            Map coverage = range["coverage"];
+            for (int pos in coverage["hits"]) positions.add(pos);
+            for (int pos in coverage["misses"]) positions.add(pos);
+            for (int pos in range["possibleBreakpoints"]) positions.add(pos);
+            Map script = scriptIndexToScript[range["scriptIndex"]];
+            Set<int> knownPositions = new Set<int>();
+            if (script["tokenPosTable"] != null) {
+              for (List tokenPosTableLine in script["tokenPosTable"]) {
+                for (int i = 1; i < tokenPosTableLine.length; i += 2) {
+                  knownPositions.add(tokenPosTableLine[i]);
+                }
+              }
+            }
+            for (int pos in positions) {
+              if (!knownPositions.contains(pos)) {
+                errorMessages.add("Script with uri ${script['uri']} "
+                    "and id ${script['id']} "
+                    "references position $pos which cannot be translated to "
+                    "line and column.");
+              }
+            }
+          }
+        }
+        expect(errorMessages, isEmpty);
+        remoteVm.resume();
+      }
+
+      Directory dir = mytest.createTempSync();
+      File mainDill = File(p.join(dir.path, p.basename(main.path + ".dill")));
+      File libDill = File(p.join(dir.path, p.basename(lib.path + ".dill")));
+      IncrementalCompiler compiler = new IncrementalCompiler(options, main.uri);
+      await compileAndSerialize(mainDill, libDill, compiler);
+
+      var list = new File(p.join(dir.path, 'myMain.dilllist'))..createSync();
+      list.writeAsStringSync("#@dill\n${mainDill.path}\n${libDill.path}\n");
+      vm = await Process.start(Platform.resolvedExecutable, <String>[
+        "--pause-isolates-on-exit",
+        "--enable-vm-service:0",
+        list.path
+      ]);
+
+      const kObservatoryListening = 'Observatory listening on ';
+      final RegExp observatoryPortRegExp =
+          new RegExp("Observatory listening on http://127.0.0.1:\([0-9]*\)/");
+      int port;
+      final splitter = new LineSplitter();
+      Completer<String> portLineCompleter = new Completer<String>();
+      vm.stdout
+          .transform(utf8.decoder)
+          .transform(splitter)
+          .listen((String s) async {
+        if (s.startsWith(kObservatoryListening)) {
+          expect(observatoryPortRegExp.hasMatch(s), isTrue);
+          final match = observatoryPortRegExp.firstMatch(s);
+          port = int.parse(match.group(1));
+          await collectStuff(port);
+          if (!portLineCompleter.isCompleted) {
+            portLineCompleter.complete("done");
+          }
+        }
+        print("vm stdout: $s");
+      });
+      vm.stderr.transform(utf8.decoder).transform(splitter).listen((String s) {
+        print("vm stderr: $s");
+      });
+      await portLineCompleter.future;
+      print("Compiler terminated with ${await vm.exitCode} exit code");
+    });
   });
 
   group('reload', () {
@@ -529,6 +679,28 @@
     await rpc.sendRequest('resume', {'isolateId': id});
   }
 
+  Future getIsolate() async {
+    var id = await mainId;
+    return await rpc.sendRequest('getIsolate', {'isolateId': id});
+  }
+
+  Future getSourceReport() async {
+    var id = await mainId;
+    return await rpc.sendRequest('getSourceReport', {
+      'isolateId': id,
+      'reports': ['Coverage', 'PossibleBreakpoints'],
+      'forceCompile': true
+    });
+  }
+
+  Future getObject(String objectId) async {
+    var id = await mainId;
+    return await rpc.sendRequest('getObject', {
+      'isolateId': id,
+      'objectId': objectId,
+    });
+  }
+
   /// Close any connections used to communicate with the VM.
   Future disconnect() async {
     if (_rpc == null) return null;
diff --git a/pkg/vm/testcases/bytecode/asserts.dart.expect b/pkg/vm/testcases/bytecode/asserts.dart.expect
index 0c5afe3..de42a48 100644
--- a/pkg/vm/testcases/bytecode/asserts.dart.expect
+++ b/pkg/vm/testcases/bytecode/asserts.dart.expect
@@ -1,8 +1,21 @@
-library #lib;
-import self as self;
-import "dart:core" as core;
+main = #lib::main;
+ [@vm.bytecode=
+ComponentBytecodeMetadata {
 
-[@vm.bytecode=
+Bytecode (version: stable)
+Main library: #lib
+
+}
+] [@vm.bytecode=
+MembersBytecodeMetadata {
+
+Members {
+
+Function 'test1', static, reflectable, debuggable
+    parameters [dart:core::bool 'condition'] (required: 1)
+    return-type void
+
+
 Bytecode {
   Entry                0
   CheckStack           0
@@ -23,10 +36,13 @@
   [0] = DirectCall 'dart:core::_AssertionError::_throwNew', ArgDesc num-args 3, num-type-args 0, names []
   [1] = Reserved
 }
-]static method test1(core::bool condition) → void {
-  assert(condition);
-}
-[@vm.bytecode=
+
+
+Function 'test2', static, reflectable, debuggable
+    parameters [FunctionType () -> dart:core::bool 'condition', FunctionType () -> dart:core::String 'message'] (required: 2)
+    return-type void
+
+
 Bytecode {
   Entry                0
   CheckStack           0
@@ -52,10 +68,13 @@
   [3] = DirectCall 'dart:core::_AssertionError::_throwNew', ArgDesc num-args 3, num-type-args 0, names []
   [4] = Reserved
 }
-]static method test2(() → core::bool condition, () → core::String message) → void {
-  assert([@vm.call-site-attributes.metadata=receiverType:() → dart.core::bool] condition.call(), [@vm.call-site-attributes.metadata=receiverType:() → dart.core::String] message.call());
-}
-[@vm.bytecode=
+
+
+Function 'main', static, reflectable, debuggable
+    parameters [] (required: 0)
+    return-type dynamic
+
+
 Bytecode {
   Entry                0
   CheckStack           0
@@ -64,4 +83,17 @@
 }
 ConstantPool {
 }
-]static method main() → dynamic {}
+
+}
+
+}
+]library #lib from "#lib" as #lib {
+
+  static method test1(dart.core::bool condition) → void {
+    assert(condition);
+  }
+  static method test2(() → dart.core::bool condition, () → dart.core::String message) → void {
+    assert([@vm.call-site-attributes.metadata=receiverType:() → dart.core::bool] condition.call(), [@vm.call-site-attributes.metadata=receiverType:() → dart.core::String] message.call());
+  }
+  static method main() → dynamic {}
+}
diff --git a/pkg/vm/testcases/bytecode/async.dart.expect b/pkg/vm/testcases/bytecode/async.dart.expect
index a9c151f..3a89af2 100644
--- a/pkg/vm/testcases/bytecode/async.dart.expect
+++ b/pkg/vm/testcases/bytecode/async.dart.expect
@@ -1,11 +1,17 @@
-library #lib;
-import self as self;
-import "dart:async" as asy;
-import "dart:core" as core;
+main = #lib::main;
+ [@vm.bytecode=
+ComponentBytecodeMetadata {
 
-import "dart:async";
+Bytecode (version: stable)
+Main library: #lib
 
-[@vm.bytecode=
+}
+] [@vm.bytecode=
+MembersBytecodeMetadata {
+
+Members {
+Field 'asyncInFieldInitializer', type = FunctionType (dart:async::Future < dart:core::int >) -> dart:async::Future < dart:core::Null >, getter = 'get:asyncInFieldInitializer', reflectable, static
+    initializer 
 Bytecode {
   Entry                3
   CheckStack           0
@@ -72,7 +78,7 @@
   [40] = EndClosureFunctionScope
 }
 Closure #lib::asyncInFieldInitializer (field)::'<anonymous closure>' (dart:async::Future < dart:core::int > x) -> dart:async::Future < dart:core::Null >
-ClosureBytecode {
+ClosureCode {
   EntryFixed           2, 4
   CheckStack           0
   Push                 FP[-6]
@@ -166,7 +172,7 @@
 }
 
 Closure #lib::asyncInFieldInitializer (field)::Closure/0::':async_op' ([ dynamic :result, dynamic :exception, dynamic :stack_trace ]) -> dynamic
-ClosureBytecode {
+ClosureCode {
   EntryOptional        1, 3, 0
   LoadConstant         r1, CP#11
   LoadConstant         r2, CP#11
@@ -252,35 +258,13 @@
   Jump                 L4
 
 }
-]static field (asy::Future<core::int>) → asy::Future<core::Null> asyncInFieldInitializer = (asy::Future<core::int> x) → asy::Future<core::Null> /* originally async */ {
-  final asy::_AsyncAwaitCompleter<core::Null> :async_completer = new asy::_AsyncAwaitCompleter::•<core::Null>();
-  asy::FutureOr<core::Null> :return_value;
-  dynamic :async_stack_trace;
-  dynamic :async_op_then;
-  dynamic :async_op_error;
-  dynamic :await_jump_var = 0;
-  dynamic :await_ctx_var;
-  dynamic :saved_try_context_var0;
-  function :async_op([dynamic :result, dynamic :exception, dynamic :stack_trace]) → dynamic yielding 
-    try {
-      #L1:
-      {
-        [yield] let dynamic #t1 = asy::_awaitHelper(x, :async_op_then, :async_op_error, :async_op) in null;
-        :result;
-      }
-      asy::_completeOnAsyncReturn(:async_completer, :return_value);
-      return;
-    }
-    on dynamic catch(dynamic :exception, dynamic :stack_trace) {
-      :async_completer.{asy::Completer::completeError}(:exception, :stack_trace);
-    }
-  :async_stack_trace = asy::_asyncStackTraceHelper(:async_op);
-  :async_op_then = asy::_asyncThenWrapperHelper(:async_op);
-  :async_op_error = asy::_asyncErrorWrapperHelper(:async_op);
-  :async_completer.start(:async_op);
-  return :async_completer.{asy::Completer::future};
-};
-[@vm.bytecode=
+
+
+Function 'foo', static, reflectable, async
+    parameters [] (required: 0)
+    return-type dart:async::Future < dart:core::int >
+
+
 Bytecode {
   Entry                7
   CheckStack           0
@@ -384,7 +368,7 @@
   [33] = Reserved
 }
 Closure #lib::foo::':async_op' ([ dynamic :result, dynamic :exception, dynamic :stack_trace ]) -> dynamic
-ClosureBytecode {
+ClosureCode {
   EntryOptional        1, 3, 0
   LoadConstant         r1, CP#5
   LoadConstant         r2, CP#5
@@ -440,34 +424,13 @@
   Trap
 
 }
-]static method foo() → asy::Future<core::int> /* originally async */ {
-  final asy::_AsyncAwaitCompleter<core::int> :async_completer = new asy::_AsyncAwaitCompleter::•<core::int>();
-  asy::FutureOr<core::int> :return_value;
-  dynamic :async_stack_trace;
-  dynamic :async_op_then;
-  dynamic :async_op_error;
-  dynamic :await_jump_var = 0;
-  dynamic :await_ctx_var;
-  function :async_op([dynamic :result, dynamic :exception, dynamic :stack_trace]) → dynamic yielding 
-    try {
-      #L2:
-      {
-        :return_value = 42;
-        break #L2;
-      }
-      asy::_completeOnAsyncReturn(:async_completer, :return_value);
-      return;
-    }
-    on dynamic catch(dynamic :exception, dynamic :stack_trace) {
-      :async_completer.{asy::Completer::completeError}(:exception, :stack_trace);
-    }
-  :async_stack_trace = asy::_asyncStackTraceHelper(:async_op);
-  :async_op_then = asy::_asyncThenWrapperHelper(:async_op);
-  :async_op_error = asy::_asyncErrorWrapperHelper(:async_op);
-  :async_completer.start(:async_op);
-  return :async_completer.{asy::Completer::future};
-}
-[@vm.bytecode=
+
+
+Function 'simpleAsyncAwait', static, reflectable, async
+    parameters [dart:async::Future < dart:core::int > 'a', dart:async::Future < dart:core::int > 'b'] (required: 2)
+    return-type dart:async::Future < dart:core::int >
+
+
 Bytecode {
   Entry                4
   CheckStack           0
@@ -596,7 +559,7 @@
   [37] = Reserved
 }
 Closure #lib::simpleAsyncAwait::':async_op' ([ dynamic :result, dynamic :exception, dynamic :stack_trace ]) -> dynamic
-ClosureBytecode {
+ClosureCode {
   EntryOptional        1, 3, 0
   LoadConstant         r1, CP#5
   LoadConstant         r2, CP#5
@@ -719,39 +682,13 @@
   Jump                 L7
 
 }
-]static method simpleAsyncAwait(asy::Future<core::int> a, asy::Future<core::int> b) → asy::Future<core::int> /* originally async */ {
-  final asy::_AsyncAwaitCompleter<core::int> :async_completer = new asy::_AsyncAwaitCompleter::•<core::int>();
-  asy::FutureOr<core::int> :return_value;
-  dynamic :async_stack_trace;
-  dynamic :async_op_then;
-  dynamic :async_op_error;
-  dynamic :await_jump_var = 0;
-  dynamic :await_ctx_var;
-  dynamic :saved_try_context_var0;
-  dynamic :async_temporary_0;
-  function :async_op([dynamic :result, dynamic :exception, dynamic :stack_trace]) → dynamic yielding 
-    try {
-      #L3:
-      {
-        [yield] let dynamic #t2 = asy::_awaitHelper(a, :async_op_then, :async_op_error, :async_op) in null;
-        :async_temporary_0 = :result;
-        [yield] let dynamic #t3 = asy::_awaitHelper(b, :async_op_then, :async_op_error, :async_op) in null;
-        :return_value = :async_temporary_0.{core::num::+}(:result);
-        break #L3;
-      }
-      asy::_completeOnAsyncReturn(:async_completer, :return_value);
-      return;
-    }
-    on dynamic catch(dynamic :exception, dynamic :stack_trace) {
-      :async_completer.{asy::Completer::completeError}(:exception, :stack_trace);
-    }
-  :async_stack_trace = asy::_asyncStackTraceHelper(:async_op);
-  :async_op_then = asy::_asyncThenWrapperHelper(:async_op);
-  :async_op_error = asy::_asyncErrorWrapperHelper(:async_op);
-  :async_completer.start(:async_op);
-  return :async_completer.{asy::Completer::future};
-}
-[@vm.bytecode=
+
+
+Function 'loops', static, reflectable, async
+    parameters [dart:core::List < dart:core::int > 'list'] (required: 1)
+    return-type dart:async::Future < dart:core::int >
+
+
 Bytecode {
   Entry                4
   CheckStack           0
@@ -888,7 +825,7 @@
   [45] = Reserved
 }
 Closure #lib::loops::':async_op' ([ dynamic :result, dynamic :exception, dynamic :stack_trace ]) -> dynamic
-ClosureBytecode {
+ClosureCode {
   EntryOptional        1, 3, 0
   LoadConstant         r1, CP#5
   LoadConstant         r2, CP#5
@@ -1127,49 +1064,13 @@
   Jump                 L11
 
 }
-]static method loops(core::List<core::int> list) → asy::Future<core::int> /* originally async */ {
-  final asy::_AsyncAwaitCompleter<core::int> :async_completer = new asy::_AsyncAwaitCompleter::•<core::int>();
-  asy::FutureOr<core::int> :return_value;
-  dynamic :async_stack_trace;
-  dynamic :async_op_then;
-  dynamic :async_op_error;
-  dynamic :await_jump_var = 0;
-  dynamic :await_ctx_var;
-  dynamic :saved_try_context_var0;
-  dynamic :async_temporary_0;
-  dynamic :async_temporary_1;
-  function :async_op([dynamic :result, dynamic :exception, dynamic :stack_trace]) → dynamic yielding 
-    try {
-      #L4:
-      {
-        core::int sum = 0;
-        for (core::int i = 0; i.{core::num::<}(10); i = i.{core::num::+}(1)) {
-          for (core::int j in list) {
-            :async_temporary_1 = sum;
-            :async_temporary_0 = i.{core::num::+}(j);
-            [yield] let dynamic #t4 = asy::_awaitHelper(self::foo(), :async_op_then, :async_op_error, :async_op) in null;
-            sum = :async_temporary_1.{core::num::+}(:async_temporary_0.{core::num::+}(:result));
-          }
-        }
-        for (core::int k = 0; k.{core::num::<}(10); k = k.{core::num::+}(1)) {
-          sum = sum.{core::num::+}(k);
-        }
-        :return_value = sum;
-        break #L4;
-      }
-      asy::_completeOnAsyncReturn(:async_completer, :return_value);
-      return;
-    }
-    on dynamic catch(dynamic :exception, dynamic :stack_trace) {
-      :async_completer.{asy::Completer::completeError}(:exception, :stack_trace);
-    }
-  :async_stack_trace = asy::_asyncStackTraceHelper(:async_op);
-  :async_op_then = asy::_asyncThenWrapperHelper(:async_op);
-  :async_op_error = asy::_asyncErrorWrapperHelper(:async_op);
-  :async_completer.start(:async_op);
-  return :async_completer.{asy::Completer::future};
-}
-[@vm.bytecode=
+
+
+Function 'tryCatchRethrow', static, reflectable, async
+    parameters [dart:async::Future < dart:core::int > 'a', dart:async::Future < dart:core::int > 'b', dart:async::Future < dart:core::int > 'c'] (required: 3)
+    return-type dart:async::Future < dart:core::int >
+
+
 Bytecode {
   Entry                4
   CheckStack           0
@@ -1319,7 +1220,7 @@
   [43] = Reserved
 }
 Closure #lib::tryCatchRethrow::':async_op' ([ dynamic :result, dynamic :exception, dynamic :stack_trace ]) -> dynamic
-ClosureBytecode {
+ClosureCode {
   EntryOptional        1, 3, 0
   LoadConstant         r1, CP#5
   LoadConstant         r2, CP#5
@@ -1737,63 +1638,13 @@
   Jump                 L17
 
 }
-]static method tryCatchRethrow(asy::Future<core::int> a, asy::Future<core::int> b, asy::Future<core::int> c) → asy::Future<core::int> /* originally async */ {
-  final asy::_AsyncAwaitCompleter<core::int> :async_completer = new asy::_AsyncAwaitCompleter::•<core::int>();
-  asy::FutureOr<core::int> :return_value;
-  dynamic :async_stack_trace;
-  dynamic :async_op_then;
-  dynamic :async_op_error;
-  dynamic :await_jump_var = 0;
-  dynamic :await_ctx_var;
-  dynamic :saved_try_context_var0;
-  dynamic :saved_try_context_var1;
-  dynamic :saved_try_context_var2;
-  dynamic :exception0;
-  dynamic :stack_trace0;
-  dynamic :async_temporary_0;
-  function :async_op([dynamic :result, dynamic :exception, dynamic :stack_trace]) → dynamic yielding 
-    try {
-      #L5:
-      {
-        core::int x = 1;
-        try
-          try {
-            :async_temporary_0 = x;
-            [yield] let dynamic #t5 = asy::_awaitHelper(a, :async_op_then, :async_op_error, :async_op) in null;
-            x = :async_temporary_0.{core::num::+}(:result);
-          }
-          on dynamic catch(final dynamic e) {
-            if(e is core::Error) {
-              :return_value = 42;
-              break #L5;
-            }
-            :async_temporary_0 = x;
-            [yield] let dynamic #t6 = asy::_awaitHelper(b, :async_op_then, :async_op_error, :async_op) in null;
-            x = :async_temporary_0.{core::num::+}(:result);
-            rethrow;
-          }
-        finally {
-          core::print("fin");
-          :async_temporary_0 = x;
-          [yield] let dynamic #t7 = asy::_awaitHelper(c, :async_op_then, :async_op_error, :async_op) in null;
-          x = :async_temporary_0.{core::num::+}(:result);
-          :return_value = x;
-          break #L5;
-        }
-      }
-      asy::_completeOnAsyncReturn(:async_completer, :return_value);
-      return;
-    }
-    on dynamic catch(dynamic :exception, dynamic :stack_trace) {
-      :async_completer.{asy::Completer::completeError}(:exception, :stack_trace);
-    }
-  :async_stack_trace = asy::_asyncStackTraceHelper(:async_op);
-  :async_op_then = asy::_asyncThenWrapperHelper(:async_op);
-  :async_op_error = asy::_asyncErrorWrapperHelper(:async_op);
-  :async_completer.start(:async_op);
-  return :async_completer.{asy::Completer::future};
-}
-[@vm.bytecode=
+
+
+Function 'closure', static, reflectable, debuggable
+    parameters [dart:async::Future < dart:core::int > 'a'] (required: 1)
+    return-type dynamic
+
+
 Bytecode {
   Entry                4
   CheckStack           0
@@ -1870,7 +1721,7 @@
   [40] = EndClosureFunctionScope
 }
 Closure #lib::closure::'nested' () -> dart:async::Future < dart:core::int >
-ClosureBytecode {
+ClosureCode {
   EntryFixed           1, 4
   CheckStack           0
   Push                 FP[-5]
@@ -1961,7 +1812,7 @@
 }
 
 Closure #lib::closure::Closure/0::':async_op' ([ dynamic :result, dynamic :exception, dynamic :stack_trace ]) -> dynamic
-ClosureBytecode {
+ClosureCode {
   EntryOptional        1, 3, 0
   LoadConstant         r1, CP#8
   LoadConstant         r2, CP#8
@@ -2117,49 +1968,13 @@
   Jump                 L6
 
 }
-]static method closure(asy::Future<core::int> a) → dynamic {
-  core::int x = 3;
-  function nested() → asy::Future<core::int> /* originally async */ {
-    final asy::_AsyncAwaitCompleter<core::int> :async_completer = new asy::_AsyncAwaitCompleter::•<core::int>();
-    asy::FutureOr<core::int> :return_value;
-    dynamic :async_stack_trace;
-    dynamic :async_op_then;
-    dynamic :async_op_error;
-    dynamic :await_jump_var = 0;
-    dynamic :await_ctx_var;
-    dynamic :saved_try_context_var0;
-    dynamic :saved_try_context_var1;
-    function :async_op([dynamic :result, dynamic :exception, dynamic :stack_trace]) → dynamic yielding 
-      try {
-        #L6:
-        {
-          core::int y = 4;
-          try {
-            x = 5;
-            [yield] let dynamic #t8 = asy::_awaitHelper(a, :async_op_then, :async_op_error, :async_op) in null;
-            y = :result;
-            :return_value = x.{core::num::+}(y);
-            break #L6;
-          }
-          finally {
-            core::print("fin");
-          }
-        }
-        asy::_completeOnAsyncReturn(:async_completer, :return_value);
-        return;
-      }
-      on dynamic catch(dynamic :exception, dynamic :stack_trace) {
-        :async_completer.{asy::Completer::completeError}(:exception, :stack_trace);
-      }
-    :async_stack_trace = asy::_asyncStackTraceHelper(:async_op);
-    :async_op_then = asy::_asyncThenWrapperHelper(:async_op);
-    :async_op_error = asy::_asyncErrorWrapperHelper(:async_op);
-    :async_completer.start(:async_op);
-    return :async_completer.{asy::Completer::future};
-  }
-  return nested;
-}
-[@vm.bytecode=
+
+
+Function 'testAssert', static, reflectable, async
+    parameters [dart:async::Future < dart:core::int > 'a'] (required: 1)
+    return-type dart:async::Future < dart:core::int >
+
+
 Bytecode {
   Entry                4
   CheckStack           0
@@ -2284,7 +2099,7 @@
   [39] = Reserved
 }
 Closure #lib::testAssert::':async_op' ([ dynamic :result, dynamic :exception, dynamic :stack_trace ]) -> dynamic
-ClosureBytecode {
+ClosureCode {
   EntryOptional        1, 3, 0
   LoadConstant         r1, CP#5
   LoadConstant         r2, CP#5
@@ -2386,39 +2201,13 @@
   Jump                 L6
 
 }
-]static method testAssert(asy::Future<core::int> a) → asy::Future<core::int> /* originally async */ {
-  final asy::_AsyncAwaitCompleter<core::int> :async_completer = new asy::_AsyncAwaitCompleter::•<core::int>();
-  asy::FutureOr<core::int> :return_value;
-  dynamic :async_stack_trace;
-  dynamic :async_op_then;
-  dynamic :async_op_error;
-  dynamic :await_jump_var = 0;
-  dynamic :await_ctx_var;
-  dynamic :saved_try_context_var0;
-  function :async_op([dynamic :result, dynamic :exception, dynamic :stack_trace]) → dynamic yielding 
-    try {
-      #L7:
-      {
-        assert {
-          [yield] let dynamic #t9 = asy::_awaitHelper(a, :async_op_then, :async_op_error, :async_op) in null;
-          assert(:result.{core::num::==}(42));
-        }
-        :return_value = 7;
-        break #L7;
-      }
-      asy::_completeOnAsyncReturn(:async_completer, :return_value);
-      return;
-    }
-    on dynamic catch(dynamic :exception, dynamic :stack_trace) {
-      :async_completer.{asy::Completer::completeError}(:exception, :stack_trace);
-    }
-  :async_stack_trace = asy::_asyncStackTraceHelper(:async_op);
-  :async_op_then = asy::_asyncThenWrapperHelper(:async_op);
-  :async_op_error = asy::_asyncErrorWrapperHelper(:async_op);
-  :async_completer.start(:async_op);
-  return :async_completer.{asy::Completer::future};
-}
-[@vm.bytecode=
+
+
+Function 'main', static, reflectable, debuggable
+    parameters [] (required: 0)
+    return-type dynamic
+
+
 Bytecode {
   Entry                0
   CheckStack           0
@@ -2427,4 +2216,272 @@
 }
 ConstantPool {
 }
-]static method main() → dynamic {}
+
+}
+
+}
+]library #lib from "#lib" as #lib {
+
+  import "dart:async";
+
+  static field (dart.async::Future<dart.core::int>) → dart.async::Future<dart.core::Null> asyncInFieldInitializer = (dart.async::Future<dart.core::int> x) → dart.async::Future<dart.core::Null> /* originally async */ {
+    final dart.async::_AsyncAwaitCompleter<dart.core::Null> :async_completer = new dart.async::_AsyncAwaitCompleter::•<dart.core::Null>();
+    dart.async::FutureOr<dart.core::Null> :return_value;
+    dynamic :async_stack_trace;
+    dynamic :async_op_then;
+    dynamic :async_op_error;
+    dynamic :await_jump_var = 0;
+    dynamic :await_ctx_var;
+    dynamic :saved_try_context_var0;
+    function :async_op([dynamic :result, dynamic :exception, dynamic :stack_trace]) → dynamic yielding 
+      try {
+        #L1:
+        {
+          [yield] let dynamic #t1 = dart.async::_awaitHelper(x, :async_op_then, :async_op_error, :async_op) in null;
+          :result;
+        }
+        dart.async::_completeOnAsyncReturn(:async_completer, :return_value);
+        return;
+      }
+      on dynamic catch(dynamic :exception, dynamic :stack_trace) {
+        :async_completer.{dart.async::Completer::completeError}(:exception, :stack_trace);
+      }
+    :async_stack_trace = dart.async::_asyncStackTraceHelper(:async_op);
+    :async_op_then = dart.async::_asyncThenWrapperHelper(:async_op);
+    :async_op_error = dart.async::_asyncErrorWrapperHelper(:async_op);
+    :async_completer.start(:async_op);
+    return :async_completer.{dart.async::Completer::future};
+  };
+  static method foo() → dart.async::Future<dart.core::int> /* originally async */ {
+    final dart.async::_AsyncAwaitCompleter<dart.core::int> :async_completer = new dart.async::_AsyncAwaitCompleter::•<dart.core::int>();
+    dart.async::FutureOr<dart.core::int> :return_value;
+    dynamic :async_stack_trace;
+    dynamic :async_op_then;
+    dynamic :async_op_error;
+    dynamic :await_jump_var = 0;
+    dynamic :await_ctx_var;
+    function :async_op([dynamic :result, dynamic :exception, dynamic :stack_trace]) → dynamic yielding 
+      try {
+        #L2:
+        {
+          :return_value = 42;
+          break #L2;
+        }
+        dart.async::_completeOnAsyncReturn(:async_completer, :return_value);
+        return;
+      }
+      on dynamic catch(dynamic :exception, dynamic :stack_trace) {
+        :async_completer.{dart.async::Completer::completeError}(:exception, :stack_trace);
+      }
+    :async_stack_trace = dart.async::_asyncStackTraceHelper(:async_op);
+    :async_op_then = dart.async::_asyncThenWrapperHelper(:async_op);
+    :async_op_error = dart.async::_asyncErrorWrapperHelper(:async_op);
+    :async_completer.start(:async_op);
+    return :async_completer.{dart.async::Completer::future};
+  }
+  static method simpleAsyncAwait(dart.async::Future<dart.core::int> a, dart.async::Future<dart.core::int> b) → dart.async::Future<dart.core::int> /* originally async */ {
+    final dart.async::_AsyncAwaitCompleter<dart.core::int> :async_completer = new dart.async::_AsyncAwaitCompleter::•<dart.core::int>();
+    dart.async::FutureOr<dart.core::int> :return_value;
+    dynamic :async_stack_trace;
+    dynamic :async_op_then;
+    dynamic :async_op_error;
+    dynamic :await_jump_var = 0;
+    dynamic :await_ctx_var;
+    dynamic :saved_try_context_var0;
+    dynamic :async_temporary_0;
+    function :async_op([dynamic :result, dynamic :exception, dynamic :stack_trace]) → dynamic yielding 
+      try {
+        #L3:
+        {
+          [yield] let dynamic #t2 = dart.async::_awaitHelper(a, :async_op_then, :async_op_error, :async_op) in null;
+          :async_temporary_0 = :result;
+          [yield] let dynamic #t3 = dart.async::_awaitHelper(b, :async_op_then, :async_op_error, :async_op) in null;
+          :return_value = :async_temporary_0.{dart.core::num::+}(:result);
+          break #L3;
+        }
+        dart.async::_completeOnAsyncReturn(:async_completer, :return_value);
+        return;
+      }
+      on dynamic catch(dynamic :exception, dynamic :stack_trace) {
+        :async_completer.{dart.async::Completer::completeError}(:exception, :stack_trace);
+      }
+    :async_stack_trace = dart.async::_asyncStackTraceHelper(:async_op);
+    :async_op_then = dart.async::_asyncThenWrapperHelper(:async_op);
+    :async_op_error = dart.async::_asyncErrorWrapperHelper(:async_op);
+    :async_completer.start(:async_op);
+    return :async_completer.{dart.async::Completer::future};
+  }
+  static method loops(dart.core::List<dart.core::int> list) → dart.async::Future<dart.core::int> /* originally async */ {
+    final dart.async::_AsyncAwaitCompleter<dart.core::int> :async_completer = new dart.async::_AsyncAwaitCompleter::•<dart.core::int>();
+    dart.async::FutureOr<dart.core::int> :return_value;
+    dynamic :async_stack_trace;
+    dynamic :async_op_then;
+    dynamic :async_op_error;
+    dynamic :await_jump_var = 0;
+    dynamic :await_ctx_var;
+    dynamic :saved_try_context_var0;
+    dynamic :async_temporary_0;
+    dynamic :async_temporary_1;
+    function :async_op([dynamic :result, dynamic :exception, dynamic :stack_trace]) → dynamic yielding 
+      try {
+        #L4:
+        {
+          dart.core::int sum = 0;
+          for (dart.core::int i = 0; i.{dart.core::num::<}(10); i = i.{dart.core::num::+}(1)) {
+            for (dart.core::int j in list) {
+              :async_temporary_1 = sum;
+              :async_temporary_0 = i.{dart.core::num::+}(j);
+              [yield] let dynamic #t4 = dart.async::_awaitHelper(#lib::foo(), :async_op_then, :async_op_error, :async_op) in null;
+              sum = :async_temporary_1.{dart.core::num::+}(:async_temporary_0.{dart.core::num::+}(:result));
+            }
+          }
+          for (dart.core::int k = 0; k.{dart.core::num::<}(10); k = k.{dart.core::num::+}(1)) {
+            sum = sum.{dart.core::num::+}(k);
+          }
+          :return_value = sum;
+          break #L4;
+        }
+        dart.async::_completeOnAsyncReturn(:async_completer, :return_value);
+        return;
+      }
+      on dynamic catch(dynamic :exception, dynamic :stack_trace) {
+        :async_completer.{dart.async::Completer::completeError}(:exception, :stack_trace);
+      }
+    :async_stack_trace = dart.async::_asyncStackTraceHelper(:async_op);
+    :async_op_then = dart.async::_asyncThenWrapperHelper(:async_op);
+    :async_op_error = dart.async::_asyncErrorWrapperHelper(:async_op);
+    :async_completer.start(:async_op);
+    return :async_completer.{dart.async::Completer::future};
+  }
+  static method tryCatchRethrow(dart.async::Future<dart.core::int> a, dart.async::Future<dart.core::int> b, dart.async::Future<dart.core::int> c) → dart.async::Future<dart.core::int> /* originally async */ {
+    final dart.async::_AsyncAwaitCompleter<dart.core::int> :async_completer = new dart.async::_AsyncAwaitCompleter::•<dart.core::int>();
+    dart.async::FutureOr<dart.core::int> :return_value;
+    dynamic :async_stack_trace;
+    dynamic :async_op_then;
+    dynamic :async_op_error;
+    dynamic :await_jump_var = 0;
+    dynamic :await_ctx_var;
+    dynamic :saved_try_context_var0;
+    dynamic :saved_try_context_var1;
+    dynamic :saved_try_context_var2;
+    dynamic :exception0;
+    dynamic :stack_trace0;
+    dynamic :async_temporary_0;
+    function :async_op([dynamic :result, dynamic :exception, dynamic :stack_trace]) → dynamic yielding 
+      try {
+        #L5:
+        {
+          dart.core::int x = 1;
+          try
+            try {
+              :async_temporary_0 = x;
+              [yield] let dynamic #t5 = dart.async::_awaitHelper(a, :async_op_then, :async_op_error, :async_op) in null;
+              x = :async_temporary_0.{dart.core::num::+}(:result);
+            }
+            on dynamic catch(final dynamic e) {
+              if(e is dart.core::Error) {
+                :return_value = 42;
+                break #L5;
+              }
+              :async_temporary_0 = x;
+              [yield] let dynamic #t6 = dart.async::_awaitHelper(b, :async_op_then, :async_op_error, :async_op) in null;
+              x = :async_temporary_0.{dart.core::num::+}(:result);
+              rethrow;
+            }
+          finally {
+            dart.core::print("fin");
+            :async_temporary_0 = x;
+            [yield] let dynamic #t7 = dart.async::_awaitHelper(c, :async_op_then, :async_op_error, :async_op) in null;
+            x = :async_temporary_0.{dart.core::num::+}(:result);
+            :return_value = x;
+            break #L5;
+          }
+        }
+        dart.async::_completeOnAsyncReturn(:async_completer, :return_value);
+        return;
+      }
+      on dynamic catch(dynamic :exception, dynamic :stack_trace) {
+        :async_completer.{dart.async::Completer::completeError}(:exception, :stack_trace);
+      }
+    :async_stack_trace = dart.async::_asyncStackTraceHelper(:async_op);
+    :async_op_then = dart.async::_asyncThenWrapperHelper(:async_op);
+    :async_op_error = dart.async::_asyncErrorWrapperHelper(:async_op);
+    :async_completer.start(:async_op);
+    return :async_completer.{dart.async::Completer::future};
+  }
+  static method closure(dart.async::Future<dart.core::int> a) → dynamic {
+    dart.core::int x = 3;
+    function nested() → dart.async::Future<dart.core::int> /* originally async */ {
+      final dart.async::_AsyncAwaitCompleter<dart.core::int> :async_completer = new dart.async::_AsyncAwaitCompleter::•<dart.core::int>();
+      dart.async::FutureOr<dart.core::int> :return_value;
+      dynamic :async_stack_trace;
+      dynamic :async_op_then;
+      dynamic :async_op_error;
+      dynamic :await_jump_var = 0;
+      dynamic :await_ctx_var;
+      dynamic :saved_try_context_var0;
+      dynamic :saved_try_context_var1;
+      function :async_op([dynamic :result, dynamic :exception, dynamic :stack_trace]) → dynamic yielding 
+        try {
+          #L6:
+          {
+            dart.core::int y = 4;
+            try {
+              x = 5;
+              [yield] let dynamic #t8 = dart.async::_awaitHelper(a, :async_op_then, :async_op_error, :async_op) in null;
+              y = :result;
+              :return_value = x.{dart.core::num::+}(y);
+              break #L6;
+            }
+            finally {
+              dart.core::print("fin");
+            }
+          }
+          dart.async::_completeOnAsyncReturn(:async_completer, :return_value);
+          return;
+        }
+        on dynamic catch(dynamic :exception, dynamic :stack_trace) {
+          :async_completer.{dart.async::Completer::completeError}(:exception, :stack_trace);
+        }
+      :async_stack_trace = dart.async::_asyncStackTraceHelper(:async_op);
+      :async_op_then = dart.async::_asyncThenWrapperHelper(:async_op);
+      :async_op_error = dart.async::_asyncErrorWrapperHelper(:async_op);
+      :async_completer.start(:async_op);
+      return :async_completer.{dart.async::Completer::future};
+    }
+    return nested;
+  }
+  static method testAssert(dart.async::Future<dart.core::int> a) → dart.async::Future<dart.core::int> /* originally async */ {
+    final dart.async::_AsyncAwaitCompleter<dart.core::int> :async_completer = new dart.async::_AsyncAwaitCompleter::•<dart.core::int>();
+    dart.async::FutureOr<dart.core::int> :return_value;
+    dynamic :async_stack_trace;
+    dynamic :async_op_then;
+    dynamic :async_op_error;
+    dynamic :await_jump_var = 0;
+    dynamic :await_ctx_var;
+    dynamic :saved_try_context_var0;
+    function :async_op([dynamic :result, dynamic :exception, dynamic :stack_trace]) → dynamic yielding 
+      try {
+        #L7:
+        {
+          assert {
+            [yield] let dynamic #t9 = dart.async::_awaitHelper(a, :async_op_then, :async_op_error, :async_op) in null;
+            assert(:result.{dart.core::num::==}(42));
+          }
+          :return_value = 7;
+          break #L7;
+        }
+        dart.async::_completeOnAsyncReturn(:async_completer, :return_value);
+        return;
+      }
+      on dynamic catch(dynamic :exception, dynamic :stack_trace) {
+        :async_completer.{dart.async::Completer::completeError}(:exception, :stack_trace);
+      }
+    :async_stack_trace = dart.async::_asyncStackTraceHelper(:async_op);
+    :async_op_then = dart.async::_asyncThenWrapperHelper(:async_op);
+    :async_op_error = dart.async::_asyncErrorWrapperHelper(:async_op);
+    :async_completer.start(:async_op);
+    return :async_completer.{dart.async::Completer::future};
+  }
+  static method main() → dynamic {}
+}
diff --git a/pkg/vm/testcases/bytecode/bootstrapping.dart.expect b/pkg/vm/testcases/bytecode/bootstrapping.dart.expect
index 31b1d4a..a71a37a 100644
--- a/pkg/vm/testcases/bytecode/bootstrapping.dart.expect
+++ b/pkg/vm/testcases/bytecode/bootstrapping.dart.expect
@@ -1,374 +1,35 @@
-library #lib;
-import self as self;
-import "dart:core" as core;
-import "dart:_internal" as _in;
+main = #lib::main;
+ [@vm.bytecode=
+ComponentBytecodeMetadata {
 
-typedef _ScheduleImmediateClosure = (() → void) → void;
-class _ScheduleImmediate extends core::Object {
-  static field (() → void) → void _closure = null;
-[@vm.bytecode=
-Bytecode {
-  Entry                0
-  CheckStack           0
-  Push                 FP[-5]
-  DirectCall           1, CP#0
-  Drop1
-  PushNull
-  ReturnTOS
+Bytecode (version: stable)
+Main library: #lib
+
 }
-ConstantPool {
-  [0] = DirectCall 'dart:core::Object:: (constructor)', ArgDesc num-args 1, num-type-args 0, names []
-  [1] = Reserved
-}
-]  synthetic constructor •() → self::_ScheduleImmediate
-    : super core::Object::•()
-    ;
-}
-class _NamespaceImpl extends core::Object implements self::_Namespace {
-  static field self::_NamespaceImpl _cachedNamespace = null;
-[@vm.bytecode=
-Bytecode {
-  Entry                0
-  CheckStack           0
-  Push                 FP[-5]
-  DirectCall           1, CP#0
-  Drop1
-  PushNull
-  ReturnTOS
-}
-ConstantPool {
-  [0] = DirectCall 'dart:core::Object:: (constructor)', ArgDesc num-args 1, num-type-args 0, names []
-  [1] = Reserved
-}
-]  constructor _() → self::_NamespaceImpl
-    : super core::Object::•()
-    ;
-[@vm.bytecode=
-Bytecode {
-  Entry                0
-  CheckStack           0
-  Push                 FP[-6]
-  Push                 FP[-5]
-  NativeCall           CP#0
-  ReturnTOS
-}
-ConstantPool {
-  [0] = NativeEntry Namespace_Create
-}
-]  @_in::ExternalName::•("Namespace_Create")
-  external static method _create(self::_NamespaceImpl namespace, dynamic n) → self::_NamespaceImpl;
-[@vm.bytecode=
-Bytecode {
-  Entry                0
-  CheckStack           0
-  Push                 FP[-5]
-  NativeCall           CP#0
-  ReturnTOS
-}
-ConstantPool {
-  [0] = NativeEntry Namespace_GetPointer
-}
-]  @_in::ExternalName::•("Namespace_GetPointer")
-  external static method _getPointer(self::_NamespaceImpl namespace) → core::int;
-[@vm.bytecode=
-Bytecode {
-  Entry                0
-  CheckStack           0
-  NativeCall           CP#0
-  ReturnTOS
-}
-ConstantPool {
-  [0] = NativeEntry Namespace_GetDefault
-}
-]  @_in::ExternalName::•("Namespace_GetDefault")
-  external static method _getDefault() → core::int;
-[@vm.bytecode=
-Bytecode {
-  Entry                2
-  CheckStack           0
-  Allocate             CP#0
-  StoreLocal           r1
-  Push                 r1
-  DirectCall           1, CP#1
-  Drop1
-  Push                 FP[-5]
-  DirectCall           2, CP#3
-  StoreStaticTOS       CP#5
-  PushNull
-  ReturnTOS
-}
-ConstantPool {
-  [0] = Class #lib::_NamespaceImpl
-  [1] = DirectCall '#lib::_NamespaceImpl::_ (constructor)', ArgDesc num-args 1, num-type-args 0, names []
-  [2] = Reserved
-  [3] = DirectCall '#lib::_NamespaceImpl::_create', ArgDesc num-args 2, num-type-args 0, names []
-  [4] = Reserved
-  [5] = StaticField #lib::_NamespaceImpl::_cachedNamespace (field)
-}
-]  static method _setupNamespace(dynamic namespace) → void {
-    self::_NamespaceImpl::_cachedNamespace = self::_NamespaceImpl::_create(new self::_NamespaceImpl::_(), namespace);
-  }
-[@vm.bytecode=
-Bytecode {
-  Entry                2
-  CheckStack           0
-  PushConstant         CP#0
-  PushStatic           CP#0
-  EqualsNull
-  JumpIfFalse          L1
-  Allocate             CP#1
-  StoreLocal           r1
-  Push                 r1
-  DirectCall           1, CP#2
-  Drop1
-  DirectCall           0, CP#4
-  DirectCall           2, CP#6
-  StoreStaticTOS       CP#0
-L1:
-  PushConstant         CP#0
-  PushStatic           CP#0
-  ReturnTOS
-}
-ConstantPool {
-  [0] = StaticField #lib::_NamespaceImpl::_cachedNamespace (field)
-  [1] = Class #lib::_NamespaceImpl
-  [2] = DirectCall '#lib::_NamespaceImpl::_ (constructor)', ArgDesc num-args 1, num-type-args 0, names []
-  [3] = Reserved
-  [4] = DirectCall '#lib::_NamespaceImpl::_getDefault', ArgDesc num-args 0, num-type-args 0, names []
-  [5] = Reserved
-  [6] = DirectCall '#lib::_NamespaceImpl::_create', ArgDesc num-args 2, num-type-args 0, names []
-  [7] = Reserved
-}
-]  static get _namespace() → self::_NamespaceImpl {
-    if(self::_NamespaceImpl::_cachedNamespace.{core::Object::==}(null)) {
-      self::_NamespaceImpl::_cachedNamespace = self::_NamespaceImpl::_create(new self::_NamespaceImpl::_(), self::_NamespaceImpl::_getDefault());
-    }
-    return self::_NamespaceImpl::_cachedNamespace;
-  }
-[@vm.bytecode=
-Bytecode {
-  Entry                0
-  CheckStack           0
-  DirectCall           0, CP#0
-  DirectCall           1, CP#2
-  ReturnTOS
-}
-ConstantPool {
-  [0] = DirectCall '#lib::_NamespaceImpl::get:_namespace', ArgDesc num-args 0, num-type-args 0, names []
-  [1] = Reserved
-  [2] = DirectCall '#lib::_NamespaceImpl::_getPointer', ArgDesc num-args 1, num-type-args 0, names []
-  [3] = Reserved
-}
-]  static get _namespacePointer() → core::int
-    return self::_NamespaceImpl::_getPointer(self::_NamespaceImpl::_namespace);
-}
-class _Namespace extends core::Object {
-[@vm.bytecode=
-Bytecode {
-  Entry                0
-  CheckStack           0
-  Push                 FP[-5]
-  DirectCall           1, CP#0
-  Drop1
-  PushNull
-  ReturnTOS
-}
-ConstantPool {
-  [0] = DirectCall 'dart:core::Object:: (constructor)', ArgDesc num-args 1, num-type-args 0, names []
-  [1] = Reserved
-}
-]  synthetic constructor •() → self::_Namespace
-    : super core::Object::•()
-    ;
-[@vm.bytecode=
-Bytecode {
-  Entry                0
-  CheckStack           0
-  Push                 FP[-5]
-  DirectCall           1, CP#0
-  Drop1
-  PushNull
-  ReturnTOS
-}
-ConstantPool {
-  [0] = DirectCall '#lib::_NamespaceImpl::_setupNamespace', ArgDesc num-args 1, num-type-args 0, names []
-  [1] = Reserved
-}
-]  static method _setupNamespace(dynamic namespace) → void {
-    self::_NamespaceImpl::_setupNamespace(namespace);
-  }
-[@vm.bytecode=
-Bytecode {
-  Entry                0
-  CheckStack           0
-  DirectCall           0, CP#0
-  ReturnTOS
-}
-ConstantPool {
-  [0] = DirectCall '#lib::_NamespaceImpl::get:_namespace', ArgDesc num-args 0, num-type-args 0, names []
-  [1] = Reserved
-}
-]  static get _namespace() → self::_Namespace
-    return self::_NamespaceImpl::_namespace;
-[@vm.bytecode=
-Bytecode {
-  Entry                0
-  CheckStack           0
-  DirectCall           0, CP#0
-  ReturnTOS
-}
-ConstantPool {
-  [0] = DirectCall '#lib::_NamespaceImpl::get:_namespacePointer', ArgDesc num-args 0, num-type-args 0, names []
-  [1] = Reserved
-}
-]  static get _namespacePointer() → core::int
-    return self::_NamespaceImpl::_namespacePointer;
-}
-class VMLibraryHooks extends core::Object {
-  static field dynamic timerFactory = null;
-  static field dynamic eventHandlerSendData = null;
-  static field dynamic timerMillisecondClock = null;
-  static field dynamic resourceReadAsBytes = null;
-  static field dynamic packageRootString = null;
-  static field dynamic packageConfigString = null;
-  static field dynamic packageRootUriFuture = null;
-  static field dynamic packageConfigUriFuture = null;
-  static field dynamic resolvePackageUriFuture = null;
-  static field dynamic _computeScriptUri = null;
-  static field dynamic _cachedScript = null;
-[@vm.bytecode=
-Bytecode {
-  Entry                0
-  CheckStack           0
-  Push                 FP[-5]
-  DirectCall           1, CP#0
-  Drop1
-  PushNull
-  ReturnTOS
-}
-ConstantPool {
-  [0] = DirectCall 'dart:core::Object:: (constructor)', ArgDesc num-args 1, num-type-args 0, names []
-  [1] = Reserved
-}
-]  synthetic constructor •() → self::VMLibraryHooks
-    : super core::Object::•()
-    ;
-[@vm.bytecode=
-Bytecode {
-  Entry                1
-  CheckStack           0
-  Push                 FP[-5]
-  StoreStaticTOS       CP#0
-  PushNull
-  StoreStaticTOS       CP#1
-  PushNull
-  ReturnTOS
-}
-ConstantPool {
-  [0] = StaticField #lib::VMLibraryHooks::_computeScriptUri (field)
-  [1] = StaticField #lib::VMLibraryHooks::_cachedScript (field)
-}
-]  static set platformScript(dynamic f) → void {
-    self::VMLibraryHooks::_computeScriptUri = f;
-    self::VMLibraryHooks::_cachedScript = null;
-  }
-[@vm.bytecode=
-Bytecode {
-  Entry                1
-  CheckStack           0
-  PushConstant         CP#0
-  PushStatic           CP#0
-  EqualsNull
-  JumpIfFalse          L1
-  PushConstant         CP#1
-  PushStatic           CP#1
-  EqualsNull
-  BooleanNegateTOS
-  PopLocal             r0
-  Jump                 L2
-L1:
-  PushFalse
-  PopLocal             r0
-L2:
-  Push                 r0
-  JumpIfFalse          L3
-  PushConstant         CP#1
-  PushStatic           CP#1
-  DynamicCall          1, CP#3
-  StoreStaticTOS       CP#0
-L3:
-  PushConstant         CP#0
-  PushStatic           CP#0
-  ReturnTOS
-}
-ConstantPool {
-  [0] = StaticField #lib::VMLibraryHooks::_cachedScript (field)
-  [1] = StaticField #lib::VMLibraryHooks::_computeScriptUri (field)
-  [2] = ObjectRef ArgDesc num-args 1, num-type-args 0, names []
-  [3] = ICData dynamic target-name 'call', arg-desc CP#2
-}
-]  static get platformScript() → dynamic {
-    if(self::VMLibraryHooks::_cachedScript.{core::Object::==}(null) && !self::VMLibraryHooks::_computeScriptUri.{core::Object::==}(null)) {
-      self::VMLibraryHooks::_cachedScript = [@vm.call-site-attributes.metadata=receiverType:dynamic] self::VMLibraryHooks::_computeScriptUri.call();
-    }
-    return self::VMLibraryHooks::_cachedScript;
-  }
-}
-class Stdin extends core::Object {
-[@vm.bytecode=
-Bytecode {
-  Entry                0
-  CheckStack           0
-  Push                 FP[-5]
-  DirectCall           1, CP#0
-  Drop1
-  PushNull
-  ReturnTOS
-}
-ConstantPool {
-  [0] = DirectCall 'dart:core::Object:: (constructor)', ArgDesc num-args 1, num-type-args 0, names []
-  [1] = Reserved
-}
-]  synthetic constructor •() → self::Stdin
-    : super core::Object::•()
-    ;
-}
-class _StdIOUtils extends core::Object {
-[@vm.bytecode=
-Bytecode {
-  Entry                0
-  CheckStack           0
-  Push                 FP[-5]
-  DirectCall           1, CP#0
-  Drop1
-  PushNull
-  ReturnTOS
-}
-ConstantPool {
-  [0] = DirectCall 'dart:core::Object:: (constructor)', ArgDesc num-args 1, num-type-args 0, names []
-  [1] = Reserved
-}
-]  synthetic constructor •() → self::_StdIOUtils
-    : super core::Object::•()
-    ;
-[@vm.bytecode=
-Bytecode {
-  Entry                0
-  CheckStack           0
-  PushNull
-  ReturnTOS
-}
-ConstantPool {
-}
-]  static method _getStdioInputStream(core::int fd) → self::Stdin
-    return null;
-}
-static field core::int _stdinFD = 0;
-static field core::int _stdoutFD = 1;
-static field core::int _stderrFD = 2;
-static field core::String _rawScript;
-static field self::Stdin _stdin;
-[@vm.bytecode=
+] [@vm.bytecode=
+MembersBytecodeMetadata {
+
+Members {
+Field '_stdinFD', type = dart:core::int, reflectable, static
+    value = const 0
+
+Field '_stdoutFD', type = dart:core::int, reflectable, static
+    value = const 1
+
+Field '_stderrFD', type = dart:core::int, reflectable, static
+    value = const 2
+
+Field '_rawScript', type = dart:core::String, reflectable, static
+    value = null
+
+Field '_stdin', type = #lib::Stdin, reflectable, static
+    value = null
+
+Function '_printString', static, reflectable, debuggable, native 'Builtin_PrintString'
+    parameters [dart:core::String 's'] (required: 1)
+    return-type void
+
+
 Bytecode {
   Entry                0
   CheckStack           0
@@ -379,9 +40,13 @@
 ConstantPool {
   [0] = NativeEntry Builtin_PrintString
 }
-]@_in::ExternalName::•("Builtin_PrintString")
-external static method _printString(core::String s) → void;
-[@vm.bytecode=
+
+
+Function '_print', static, reflectable, debuggable
+    parameters [dynamic 'arg'] (required: 1)
+    return-type void
+
+
 Bytecode {
   Entry                0
   CheckStack           0
@@ -398,10 +63,13 @@
   [2] = DirectCall '#lib::_printString', ArgDesc num-args 1, num-type-args 0, names []
   [3] = Reserved
 }
-]static method _print(dynamic arg) → void {
-  self::_printString(arg.{core::Object::toString}());
-}
-[@vm.bytecode=
+
+
+Function '_getPrintClosure', static, reflectable, debuggable
+    parameters [] (required: 0)
+    return-type dynamic
+
+
 Bytecode {
   Entry                0
   CheckStack           0
@@ -411,9 +79,13 @@
 ConstantPool {
   [0] = ObjectRef const tear-off #lib::_print
 }
-]static method _getPrintClosure() → dynamic
-  return self::_print;
-[@vm.bytecode=
+
+
+Function '_setScheduleImmediateClosure', static, reflectable, debuggable
+    parameters [FunctionType (FunctionType () -> void) -> void 'closure'] (required: 1)
+    return-type void
+
+
 Bytecode {
   Entry                1
   CheckStack           0
@@ -425,10 +97,13 @@
 ConstantPool {
   [0] = StaticField #lib::_ScheduleImmediate::_closure (field)
 }
-]static method _setScheduleImmediateClosure((() → void) → void closure) → void {
-  self::_ScheduleImmediate::_closure = closure;
-}
-[@vm.bytecode=
+
+
+Function '_setStdioFDs', static, reflectable, debuggable
+    parameters [dart:core::int 'stdin', dart:core::int 'stdout', dart:core::int 'stderr'] (required: 3)
+    return-type void
+
+
 Bytecode {
   Entry                1
   CheckStack           0
@@ -446,12 +121,13 @@
   [1] = StaticField #lib::_stdoutFD (field)
   [2] = StaticField #lib::_stderrFD (field)
 }
-]static method _setStdioFDs(core::int stdin, core::int stdout, core::int stderr) → void {
-  self::_stdinFD = stdin;
-  self::_stdoutFD = stdout;
-  self::_stderrFD = stderr;
-}
-[@vm.bytecode=
+
+
+Function '_scriptUri', static, reflectable, debuggable
+    parameters [] (required: 0)
+    return-type dart:core::Uri
+
+
 Bytecode {
   Entry                2
   CheckStack           0
@@ -516,15 +192,13 @@
   [12] = InterfaceCall 'dart:core::Uri::resolveUri', ArgDesc num-args 2, num-type-args 0, names []
   [13] = Reserved
 }
-]static method _scriptUri() → core::Uri {
-  if(self::_rawScript.{core::String::startsWith}("http:") || self::_rawScript.{core::String::startsWith}("https:") || self::_rawScript.{core::String::startsWith}("file:")) {
-    return core::Uri::parse(self::_rawScript);
-  }
-  else {
-    return core::Uri::base.{core::Uri::resolveUri}(core::_Uri::file(self::_rawScript));
-  }
-}
-[@vm.bytecode=
+
+
+Function '_setupHooks', static, reflectable, debuggable
+    parameters [] (required: 0)
+    return-type dynamic
+
+
 Bytecode {
   Entry                1
   CheckStack           0
@@ -539,10 +213,13 @@
   [1] = DirectCall '#lib::VMLibraryHooks::set:platformScript', ArgDesc num-args 1, num-type-args 0, names []
   [2] = Reserved
 }
-]static method _setupHooks() → dynamic {
-  self::VMLibraryHooks::platformScript = self::_scriptUri;
-}
-[@vm.bytecode=
+
+
+Function 'get:stdin', getter, static, reflectable, debuggable
+    parameters [] (required: 0)
+    return-type #lib::Stdin
+
+
 Bytecode {
   Entry                2
   CheckStack           0
@@ -574,11 +251,13 @@
   [2] = DirectCall '#lib::_StdIOUtils::_getStdioInputStream', ArgDesc num-args 1, num-type-args 0, names []
   [3] = Reserved
 }
-]static get stdin() → self::Stdin {
-  self::_stdin.{core::Object::==}(null) ?{self::Stdin} self::_stdin = self::_StdIOUtils::_getStdioInputStream(self::_stdinFD) : null;
-  return self::_stdin;
-}
-[@vm.bytecode=
+
+
+Function 'main', static, reflectable, debuggable
+    parameters [] (required: 0)
+    return-type dynamic
+
+
 Bytecode {
   Entry                0
   CheckStack           0
@@ -587,4 +266,592 @@
 }
 ConstantPool {
 }
-]static method main() → dynamic {}
+
+}
+
+}
+]library #lib from "#lib" as #lib {
+
+  typedef _ScheduleImmediateClosure = (() → void) → void;
+[@vm.bytecode=
+MembersBytecodeMetadata {
+
+Members {
+Field '_closure', type = FunctionType (FunctionType () -> void) -> void, reflectable, static
+    value = null
+
+Function '', constructor, reflectable
+    parameters [] (required: 0)
+    return-type #lib::_ScheduleImmediate
+
+
+Bytecode {
+  Entry                0
+  CheckStack           0
+  Push                 FP[-5]
+  DirectCall           1, CP#0
+  Drop1
+  PushNull
+  ReturnTOS
+}
+ConstantPool {
+  [0] = DirectCall 'dart:core::Object:: (constructor)', ArgDesc num-args 1, num-type-args 0, names []
+  [1] = Reserved
+}
+
+}
+
+}
+]  class _ScheduleImmediate extends dart.core::Object {
+    static field (() → void) → void _closure = null;
+    synthetic constructor •() → #lib::_ScheduleImmediate
+      : super dart.core::Object::•()
+      ;
+  }
+[@vm.bytecode=
+MembersBytecodeMetadata {
+
+Members {
+Field '_cachedNamespace', type = #lib::_NamespaceImpl, reflectable, static
+    value = null
+
+Function '_', constructor, reflectable, debuggable
+    parameters [] (required: 0)
+    return-type #lib::_NamespaceImpl
+
+
+Bytecode {
+  Entry                0
+  CheckStack           0
+  Push                 FP[-5]
+  DirectCall           1, CP#0
+  Drop1
+  PushNull
+  ReturnTOS
+}
+ConstantPool {
+  [0] = DirectCall 'dart:core::Object:: (constructor)', ArgDesc num-args 1, num-type-args 0, names []
+  [1] = Reserved
+}
+
+
+Function '_create', static, reflectable, debuggable, native 'Namespace_Create'
+    parameters [#lib::_NamespaceImpl 'namespace', dynamic 'n'] (required: 2)
+    return-type #lib::_NamespaceImpl
+
+
+Bytecode {
+  Entry                0
+  CheckStack           0
+  Push                 FP[-6]
+  Push                 FP[-5]
+  NativeCall           CP#0
+  ReturnTOS
+}
+ConstantPool {
+  [0] = NativeEntry Namespace_Create
+}
+
+
+Function '_getPointer', static, reflectable, debuggable, native 'Namespace_GetPointer'
+    parameters [#lib::_NamespaceImpl 'namespace'] (required: 1)
+    return-type dart:core::int
+
+
+Bytecode {
+  Entry                0
+  CheckStack           0
+  Push                 FP[-5]
+  NativeCall           CP#0
+  ReturnTOS
+}
+ConstantPool {
+  [0] = NativeEntry Namespace_GetPointer
+}
+
+
+Function '_getDefault', static, reflectable, debuggable, native 'Namespace_GetDefault'
+    parameters [] (required: 0)
+    return-type dart:core::int
+
+
+Bytecode {
+  Entry                0
+  CheckStack           0
+  NativeCall           CP#0
+  ReturnTOS
+}
+ConstantPool {
+  [0] = NativeEntry Namespace_GetDefault
+}
+
+
+Function '_setupNamespace', static, reflectable, debuggable
+    parameters [dynamic 'namespace'] (required: 1)
+    return-type void
+
+
+Bytecode {
+  Entry                2
+  CheckStack           0
+  Allocate             CP#0
+  StoreLocal           r1
+  Push                 r1
+  DirectCall           1, CP#1
+  Drop1
+  Push                 FP[-5]
+  DirectCall           2, CP#3
+  StoreStaticTOS       CP#5
+  PushNull
+  ReturnTOS
+}
+ConstantPool {
+  [0] = Class #lib::_NamespaceImpl
+  [1] = DirectCall '#lib::_NamespaceImpl::_ (constructor)', ArgDesc num-args 1, num-type-args 0, names []
+  [2] = Reserved
+  [3] = DirectCall '#lib::_NamespaceImpl::_create', ArgDesc num-args 2, num-type-args 0, names []
+  [4] = Reserved
+  [5] = StaticField #lib::_NamespaceImpl::_cachedNamespace (field)
+}
+
+
+Function 'get:_namespace', getter, static, reflectable, debuggable
+    parameters [] (required: 0)
+    return-type #lib::_NamespaceImpl
+
+
+Bytecode {
+  Entry                2
+  CheckStack           0
+  PushConstant         CP#0
+  PushStatic           CP#0
+  EqualsNull
+  JumpIfFalse          L1
+  Allocate             CP#1
+  StoreLocal           r1
+  Push                 r1
+  DirectCall           1, CP#2
+  Drop1
+  DirectCall           0, CP#4
+  DirectCall           2, CP#6
+  StoreStaticTOS       CP#0
+L1:
+  PushConstant         CP#0
+  PushStatic           CP#0
+  ReturnTOS
+}
+ConstantPool {
+  [0] = StaticField #lib::_NamespaceImpl::_cachedNamespace (field)
+  [1] = Class #lib::_NamespaceImpl
+  [2] = DirectCall '#lib::_NamespaceImpl::_ (constructor)', ArgDesc num-args 1, num-type-args 0, names []
+  [3] = Reserved
+  [4] = DirectCall '#lib::_NamespaceImpl::_getDefault', ArgDesc num-args 0, num-type-args 0, names []
+  [5] = Reserved
+  [6] = DirectCall '#lib::_NamespaceImpl::_create', ArgDesc num-args 2, num-type-args 0, names []
+  [7] = Reserved
+}
+
+
+Function 'get:_namespacePointer', getter, static, reflectable, debuggable
+    parameters [] (required: 0)
+    return-type dart:core::int
+
+
+Bytecode {
+  Entry                0
+  CheckStack           0
+  DirectCall           0, CP#0
+  DirectCall           1, CP#2
+  ReturnTOS
+}
+ConstantPool {
+  [0] = DirectCall '#lib::_NamespaceImpl::get:_namespace', ArgDesc num-args 0, num-type-args 0, names []
+  [1] = Reserved
+  [2] = DirectCall '#lib::_NamespaceImpl::_getPointer', ArgDesc num-args 1, num-type-args 0, names []
+  [3] = Reserved
+}
+
+}
+
+}
+]  class _NamespaceImpl extends dart.core::Object implements #lib::_Namespace {
+    static field #lib::_NamespaceImpl _cachedNamespace = null;
+    constructor _() → #lib::_NamespaceImpl
+      : super dart.core::Object::•()
+      ;
+    @dart._internal::ExternalName::•("Namespace_Create")
+    external static method _create(#lib::_NamespaceImpl namespace, dynamic n) → #lib::_NamespaceImpl;
+    @dart._internal::ExternalName::•("Namespace_GetPointer")
+    external static method _getPointer(#lib::_NamespaceImpl namespace) → dart.core::int;
+    @dart._internal::ExternalName::•("Namespace_GetDefault")
+    external static method _getDefault() → dart.core::int;
+    static method _setupNamespace(dynamic namespace) → void {
+      #lib::_NamespaceImpl::_cachedNamespace = #lib::_NamespaceImpl::_create(new #lib::_NamespaceImpl::_(), namespace);
+    }
+    static get _namespace() → #lib::_NamespaceImpl {
+      if(#lib::_NamespaceImpl::_cachedNamespace.{dart.core::Object::==}(null)) {
+        #lib::_NamespaceImpl::_cachedNamespace = #lib::_NamespaceImpl::_create(new #lib::_NamespaceImpl::_(), #lib::_NamespaceImpl::_getDefault());
+      }
+      return #lib::_NamespaceImpl::_cachedNamespace;
+    }
+    static get _namespacePointer() → dart.core::int
+      return #lib::_NamespaceImpl::_getPointer(#lib::_NamespaceImpl::_namespace);
+  }
+[@vm.bytecode=
+MembersBytecodeMetadata {
+
+Members {
+
+Function '', constructor, reflectable
+    parameters [] (required: 0)
+    return-type #lib::_Namespace
+
+
+Bytecode {
+  Entry                0
+  CheckStack           0
+  Push                 FP[-5]
+  DirectCall           1, CP#0
+  Drop1
+  PushNull
+  ReturnTOS
+}
+ConstantPool {
+  [0] = DirectCall 'dart:core::Object:: (constructor)', ArgDesc num-args 1, num-type-args 0, names []
+  [1] = Reserved
+}
+
+
+Function '_setupNamespace', static, reflectable, debuggable
+    parameters [dynamic 'namespace'] (required: 1)
+    return-type void
+
+
+Bytecode {
+  Entry                0
+  CheckStack           0
+  Push                 FP[-5]
+  DirectCall           1, CP#0
+  Drop1
+  PushNull
+  ReturnTOS
+}
+ConstantPool {
+  [0] = DirectCall '#lib::_NamespaceImpl::_setupNamespace', ArgDesc num-args 1, num-type-args 0, names []
+  [1] = Reserved
+}
+
+
+Function 'get:_namespace', getter, static, reflectable, debuggable
+    parameters [] (required: 0)
+    return-type #lib::_Namespace
+
+
+Bytecode {
+  Entry                0
+  CheckStack           0
+  DirectCall           0, CP#0
+  ReturnTOS
+}
+ConstantPool {
+  [0] = DirectCall '#lib::_NamespaceImpl::get:_namespace', ArgDesc num-args 0, num-type-args 0, names []
+  [1] = Reserved
+}
+
+
+Function 'get:_namespacePointer', getter, static, reflectable, debuggable
+    parameters [] (required: 0)
+    return-type dart:core::int
+
+
+Bytecode {
+  Entry                0
+  CheckStack           0
+  DirectCall           0, CP#0
+  ReturnTOS
+}
+ConstantPool {
+  [0] = DirectCall '#lib::_NamespaceImpl::get:_namespacePointer', ArgDesc num-args 0, num-type-args 0, names []
+  [1] = Reserved
+}
+
+}
+
+}
+]  class _Namespace extends dart.core::Object {
+    synthetic constructor •() → #lib::_Namespace
+      : super dart.core::Object::•()
+      ;
+    static method _setupNamespace(dynamic namespace) → void {
+      #lib::_NamespaceImpl::_setupNamespace(namespace);
+    }
+    static get _namespace() → #lib::_Namespace
+      return #lib::_NamespaceImpl::_namespace;
+    static get _namespacePointer() → dart.core::int
+      return #lib::_NamespaceImpl::_namespacePointer;
+  }
+[@vm.bytecode=
+MembersBytecodeMetadata {
+
+Members {
+Field 'timerFactory', type = dynamic, reflectable, static
+    value = null
+
+Field 'eventHandlerSendData', type = dynamic, reflectable, static
+    value = null
+
+Field 'timerMillisecondClock', type = dynamic, reflectable, static
+    value = null
+
+Field 'resourceReadAsBytes', type = dynamic, reflectable, static
+    value = null
+
+Field 'packageRootString', type = dynamic, reflectable, static
+    value = null
+
+Field 'packageConfigString', type = dynamic, reflectable, static
+    value = null
+
+Field 'packageRootUriFuture', type = dynamic, reflectable, static
+    value = null
+
+Field 'packageConfigUriFuture', type = dynamic, reflectable, static
+    value = null
+
+Field 'resolvePackageUriFuture', type = dynamic, reflectable, static
+    value = null
+
+Field '_computeScriptUri', type = dynamic, reflectable, static
+    value = null
+
+Field '_cachedScript', type = dynamic, reflectable, static
+    value = null
+
+Function '', constructor, reflectable
+    parameters [] (required: 0)
+    return-type #lib::VMLibraryHooks
+
+
+Bytecode {
+  Entry                0
+  CheckStack           0
+  Push                 FP[-5]
+  DirectCall           1, CP#0
+  Drop1
+  PushNull
+  ReturnTOS
+}
+ConstantPool {
+  [0] = DirectCall 'dart:core::Object:: (constructor)', ArgDesc num-args 1, num-type-args 0, names []
+  [1] = Reserved
+}
+
+
+Function 'set:platformScript', setter, static, reflectable, debuggable
+    parameters [dynamic 'f'] (required: 1)
+    return-type void
+
+
+Bytecode {
+  Entry                1
+  CheckStack           0
+  Push                 FP[-5]
+  StoreStaticTOS       CP#0
+  PushNull
+  StoreStaticTOS       CP#1
+  PushNull
+  ReturnTOS
+}
+ConstantPool {
+  [0] = StaticField #lib::VMLibraryHooks::_computeScriptUri (field)
+  [1] = StaticField #lib::VMLibraryHooks::_cachedScript (field)
+}
+
+
+Function 'get:platformScript', getter, static, reflectable, debuggable
+    parameters [] (required: 0)
+    return-type dynamic
+
+
+Bytecode {
+  Entry                1
+  CheckStack           0
+  PushConstant         CP#0
+  PushStatic           CP#0
+  EqualsNull
+  JumpIfFalse          L1
+  PushConstant         CP#1
+  PushStatic           CP#1
+  EqualsNull
+  BooleanNegateTOS
+  PopLocal             r0
+  Jump                 L2
+L1:
+  PushFalse
+  PopLocal             r0
+L2:
+  Push                 r0
+  JumpIfFalse          L3
+  PushConstant         CP#1
+  PushStatic           CP#1
+  DynamicCall          1, CP#3
+  StoreStaticTOS       CP#0
+L3:
+  PushConstant         CP#0
+  PushStatic           CP#0
+  ReturnTOS
+}
+ConstantPool {
+  [0] = StaticField #lib::VMLibraryHooks::_cachedScript (field)
+  [1] = StaticField #lib::VMLibraryHooks::_computeScriptUri (field)
+  [2] = ObjectRef ArgDesc num-args 1, num-type-args 0, names []
+  [3] = ICData dynamic target-name 'call', arg-desc CP#2
+}
+
+}
+
+}
+]  class VMLibraryHooks extends dart.core::Object {
+    static field dynamic timerFactory = null;
+    static field dynamic eventHandlerSendData = null;
+    static field dynamic timerMillisecondClock = null;
+    static field dynamic resourceReadAsBytes = null;
+    static field dynamic packageRootString = null;
+    static field dynamic packageConfigString = null;
+    static field dynamic packageRootUriFuture = null;
+    static field dynamic packageConfigUriFuture = null;
+    static field dynamic resolvePackageUriFuture = null;
+    static field dynamic _computeScriptUri = null;
+    static field dynamic _cachedScript = null;
+    synthetic constructor •() → #lib::VMLibraryHooks
+      : super dart.core::Object::•()
+      ;
+    static set platformScript(dynamic f) → void {
+      #lib::VMLibraryHooks::_computeScriptUri = f;
+      #lib::VMLibraryHooks::_cachedScript = null;
+    }
+    static get platformScript() → dynamic {
+      if(#lib::VMLibraryHooks::_cachedScript.{dart.core::Object::==}(null) && !#lib::VMLibraryHooks::_computeScriptUri.{dart.core::Object::==}(null)) {
+        #lib::VMLibraryHooks::_cachedScript = [@vm.call-site-attributes.metadata=receiverType:dynamic] #lib::VMLibraryHooks::_computeScriptUri.call();
+      }
+      return #lib::VMLibraryHooks::_cachedScript;
+    }
+  }
+[@vm.bytecode=
+MembersBytecodeMetadata {
+
+Members {
+
+Function '', constructor, reflectable
+    parameters [] (required: 0)
+    return-type #lib::Stdin
+
+
+Bytecode {
+  Entry                0
+  CheckStack           0
+  Push                 FP[-5]
+  DirectCall           1, CP#0
+  Drop1
+  PushNull
+  ReturnTOS
+}
+ConstantPool {
+  [0] = DirectCall 'dart:core::Object:: (constructor)', ArgDesc num-args 1, num-type-args 0, names []
+  [1] = Reserved
+}
+
+}
+
+}
+]  class Stdin extends dart.core::Object {
+    synthetic constructor •() → #lib::Stdin
+      : super dart.core::Object::•()
+      ;
+  }
+[@vm.bytecode=
+MembersBytecodeMetadata {
+
+Members {
+
+Function '', constructor, reflectable
+    parameters [] (required: 0)
+    return-type #lib::_StdIOUtils
+
+
+Bytecode {
+  Entry                0
+  CheckStack           0
+  Push                 FP[-5]
+  DirectCall           1, CP#0
+  Drop1
+  PushNull
+  ReturnTOS
+}
+ConstantPool {
+  [0] = DirectCall 'dart:core::Object:: (constructor)', ArgDesc num-args 1, num-type-args 0, names []
+  [1] = Reserved
+}
+
+
+Function '_getStdioInputStream', static, reflectable, debuggable
+    parameters [dart:core::int 'fd'] (required: 1)
+    return-type #lib::Stdin
+
+
+Bytecode {
+  Entry                0
+  CheckStack           0
+  PushNull
+  ReturnTOS
+}
+ConstantPool {
+}
+
+}
+
+}
+]  class _StdIOUtils extends dart.core::Object {
+    synthetic constructor •() → #lib::_StdIOUtils
+      : super dart.core::Object::•()
+      ;
+    static method _getStdioInputStream(dart.core::int fd) → #lib::Stdin
+      return null;
+  }
+  static field dart.core::int _stdinFD = 0;
+  static field dart.core::int _stdoutFD = 1;
+  static field dart.core::int _stderrFD = 2;
+  static field dart.core::String _rawScript;
+  static field #lib::Stdin _stdin;
+  @dart._internal::ExternalName::•("Builtin_PrintString")
+  external static method _printString(dart.core::String s) → void;
+  static method _print(dynamic arg) → void {
+    #lib::_printString(arg.{dart.core::Object::toString}());
+  }
+  static method _getPrintClosure() → dynamic
+    return #lib::_print;
+  static method _setScheduleImmediateClosure((() → void) → void closure) → void {
+    #lib::_ScheduleImmediate::_closure = closure;
+  }
+  static method _setStdioFDs(dart.core::int stdin, dart.core::int stdout, dart.core::int stderr) → void {
+    #lib::_stdinFD = stdin;
+    #lib::_stdoutFD = stdout;
+    #lib::_stderrFD = stderr;
+  }
+  static method _scriptUri() → dart.core::Uri {
+    if(#lib::_rawScript.{dart.core::String::startsWith}("http:") || #lib::_rawScript.{dart.core::String::startsWith}("https:") || #lib::_rawScript.{dart.core::String::startsWith}("file:")) {
+      return dart.core::Uri::parse(#lib::_rawScript);
+    }
+    else {
+      return dart.core::Uri::base.{dart.core::Uri::resolveUri}(dart.core::_Uri::file(#lib::_rawScript));
+    }
+  }
+  static method _setupHooks() → dynamic {
+    #lib::VMLibraryHooks::platformScript = #lib::_scriptUri;
+  }
+  static get stdin() → #lib::Stdin {
+    #lib::_stdin.{dart.core::Object::==}(null) ?{#lib::Stdin} #lib::_stdin = #lib::_StdIOUtils::_getStdioInputStream(#lib::_stdinFD) : null;
+    return #lib::_stdin;
+  }
+  static method main() → dynamic {}
+}
diff --git a/pkg/vm/testcases/bytecode/closures.dart.expect b/pkg/vm/testcases/bytecode/closures.dart.expect
index 6eaeaf0..50124d6 100644
--- a/pkg/vm/testcases/bytecode/closures.dart.expect
+++ b/pkg/vm/testcases/bytecode/closures.dart.expect
@@ -1,10 +1,391 @@
-library #lib;
-import self as self;
-import "dart:core" as core;
+main = #lib::main;
+ [@vm.bytecode=
+ComponentBytecodeMetadata {
 
-typedef IntFunc = (core::int) → dynamic;
-class C1 extends core::Object {
+Bytecode (version: stable)
+Main library: #lib
+
+}
+] [@vm.bytecode=
+MembersBytecodeMetadata {
+
+Members {
+
+Function 'simpleClosure', static, reflectable, debuggable
+    parameters [] (required: 0)
+    return-type dart:core::int
+
+
+Bytecode {
+  Entry                4
+  CheckStack           0
+  AllocateContext      0, 1
+  PopLocal             r0
+  Push                 r0
+  PushInt              5
+  StoreContextVar      0, 0
+  Allocate             CP#7
+  StoreLocal           r3
+  Push                 r3
+  PushNull
+  StoreFieldTOS        CP#8
+  Push                 r3
+  PushNull
+  StoreFieldTOS        CP#10
+  Push                 r3
+  PushConstant         CP#12
+  StoreFieldTOS        CP#13
+  Push                 r3
+  PushConstant         CP#0
+  StoreFieldTOS        CP#15
+  Push                 r3
+  Push                 r0
+  StoreFieldTOS        CP#1
+  PopLocal             r2
+  Push                 r2
+  PushInt              3
+  DynamicCall          2, CP#18
+  Drop1
+  Push                 r0
+  LoadContextVar       0, 0
+  ReturnTOS
+}
+ConstantPool {
+  [0] = ClosureFunction 0
+  [1] = InstanceField dart:core::_Closure::_context (field)
+  [2] = Reserved
+  [3] = Type dart:core::int
+  [4] = ObjectRef 'y'
+  [5] = SubtypeTestCache
+  [6] = EndClosureFunctionScope
+  [7] = Class dart:core::_Closure
+  [8] = InstanceField dart:core::_Closure::_instantiator_type_arguments (field)
+  [9] = Reserved
+  [10] = InstanceField dart:core::_Closure::_function_type_arguments (field)
+  [11] = Reserved
+  [12] = EmptyTypeArguments
+  [13] = InstanceField dart:core::_Closure::_delayed_type_arguments (field)
+  [14] = Reserved
+  [15] = InstanceField dart:core::_Closure::_function (field)
+  [16] = Reserved
+  [17] = ObjectRef ArgDesc num-args 2, num-type-args 0, names []
+  [18] = ICData dynamic target-name 'call', arg-desc CP#17
+}
+Closure #lib::simpleClosure::'<anonymous closure>' (dart:core::int y) -> dart:core::Null
+ClosureCode {
+  EntryFixed           2, 3
+  CheckStack           0
+  Push                 FP[-6]
+  LoadFieldTOS         CP#1
+  PopLocal             r0
+  Push                 FP[-5]
+  PushConstant         CP#3
+  PushNull
+  PushNull
+  PushConstant         CP#4
+  AssertAssignable     1, CP#5
+  Drop1
+  Push                 r0
+  Push                 r0
+  LoadContextVar       0, 0
+  Push                 FP[-5]
+  AddInt
+  StoreContextVar      0, 0
+  PushNull
+  ReturnTOS
+
+}
+
+
+Function 'callWithArgs', static, reflectable, debuggable
+    type-params <dart:core::Object T1, dart:core::Object T2, dart:core::Object T3, dart:core::Object T4, dart:core::Object T5, dart:core::Object T6, dart:core::Object T7, dart:core::Object T8>
+    parameters [] (required: 0)
+    return-type void
+
+
+Bytecode {
+  Entry                2
+  CheckStack           0
+  CheckFunctionTypeArgs 8, r0
+  PushConstant         CP#0
+  StoreLocal           r1
+  Push                 r1
+  PushInt              8
+  CreateArrayTOS
+  StoreLocal           r1
+  Push                 r1
+  PushInt              0
+  PushNull
+  Push                 r0
+  InstantiateType      CP#1
+  StoreIndexedTOS
+  Push                 r1
+  PushInt              1
+  PushNull
+  Push                 r0
+  InstantiateType      CP#2
+  StoreIndexedTOS
+  Push                 r1
+  PushInt              2
+  PushNull
+  Push                 r0
+  InstantiateType      CP#3
+  StoreIndexedTOS
+  Push                 r1
+  PushInt              3
+  PushNull
+  Push                 r0
+  InstantiateType      CP#4
+  StoreIndexedTOS
+  Push                 r1
+  PushInt              4
+  PushNull
+  Push                 r0
+  InstantiateType      CP#5
+  StoreIndexedTOS
+  Push                 r1
+  PushInt              5
+  PushNull
+  Push                 r0
+  InstantiateType      CP#6
+  StoreIndexedTOS
+  Push                 r1
+  PushInt              6
+  PushNull
+  Push                 r0
+  InstantiateType      CP#7
+  StoreIndexedTOS
+  Push                 r1
+  PushInt              7
+  PushNull
+  Push                 r0
+  InstantiateType      CP#8
+  StoreIndexedTOS
+  DirectCall           2, CP#9
+  DirectCall           1, CP#11
+  Drop1
+  PushNull
+  ReturnTOS
+}
+ConstantPool {
+  [0] = ObjectRef < dart:core::Type >
+  [1] = Type #lib::callWithArgs::TypeParam/0
+  [2] = Type #lib::callWithArgs::TypeParam/1
+  [3] = Type #lib::callWithArgs::TypeParam/2
+  [4] = Type #lib::callWithArgs::TypeParam/3
+  [5] = Type #lib::callWithArgs::TypeParam/4
+  [6] = Type #lib::callWithArgs::TypeParam/5
+  [7] = Type #lib::callWithArgs::TypeParam/6
+  [8] = Type #lib::callWithArgs::TypeParam/7
+  [9] = DirectCall 'dart:core::List::_fromLiteral (constructor)', ArgDesc num-args 2, num-type-args 0, names []
+  [10] = Reserved
+  [11] = DirectCall 'dart:core::print', ArgDesc num-args 1, num-type-args 0, names []
+  [12] = Reserved
+}
+
+
+Function 'callA', static, reflectable, debuggable
+    parameters [] (required: 0)
+    return-type void
+
+
+Bytecode {
+  Entry                1
+  CheckStack           0
+  PushConstant         CP#0
+  PushConstant         CP#2
+  PushConstant         CP#1
+  AllocateT
+  StoreLocal           r0
+  Push                 r0
+  DirectCall           1, CP#3
+  Drop1
+  InterfaceCall        2, CP#5
+  Drop1
+  PushConstant         CP#7
+  PushConstant         CP#2
+  PushConstant         CP#1
+  AllocateT
+  StoreLocal           r0
+  Push                 r0
+  DirectCall           1, CP#3
+  Drop1
+  InterfaceCall        2, CP#5
+  Drop1
+  PushConstant         CP#7
+  PushConstant         CP#8
+  PushConstant         CP#1
+  AllocateT
+  StoreLocal           r0
+  Push                 r0
+  DirectCall           1, CP#3
+  Drop1
+  InterfaceCall        2, CP#5
+  Drop1
+  PushNull
+  ReturnTOS
+}
+ConstantPool {
+  [0] = ObjectRef < #lib::C3, #lib::C4 >
+  [1] = Class #lib::A
+  [2] = ObjectRef < #lib::C1, #lib::C2 >
+  [3] = DirectCall '#lib::A:: (constructor)', ArgDesc num-args 1, num-type-args 0, names []
+  [4] = Reserved
+  [5] = InterfaceCall '#lib::A::foo', ArgDesc num-args 1, num-type-args 2, names []
+  [6] = Reserved
+  [7] = ObjectRef < dart:core::List < #lib::C3 >, dart:core::List < #lib::C4 > >
+  [8] = ObjectRef < dart:core::List < #lib::C1 >, dart:core::List < #lib::C2 > >
+}
+
+
+Function 'testPartialInstantiation', static, reflectable, debuggable
+    parameters [] (required: 0)
+    return-type FunctionType (dart:core::int) -> dynamic
+
+
+Bytecode {
+  Entry                7
+  CheckStack           0
+  Allocate             CP#14
+  StoreLocal           r3
+  Push                 r3
+  PushNull
+  StoreFieldTOS        CP#15
+  Push                 r3
+  PushNull
+  StoreFieldTOS        CP#6
+  Push                 r3
+  PushConstant         CP#5
+  StoreFieldTOS        CP#3
+  Push                 r3
+  PushConstant         CP#0
+  StoreFieldTOS        CP#17
+  Push                 r3
+  Push                 r0
+  StoreFieldTOS        CP#1
+  PopLocal             r2
+  Push                 r2
+  StoreLocal           r3
+  PushConstant         CP#19
+  StoreLocal           r6
+  DirectCall           2, CP#20
+  Drop1
+  Allocate             CP#14
+  StoreLocal           r5
+  Push                 r6
+  StoreFieldTOS        CP#3
+  Push                 r5
+  Push                 r3
+  LoadFieldTOS         CP#15
+  StoreFieldTOS        CP#15
+  Push                 r5
+  Push                 r3
+  LoadFieldTOS         CP#6
+  StoreFieldTOS        CP#6
+  Push                 r5
+  Push                 r3
+  LoadFieldTOS         CP#17
+  StoreFieldTOS        CP#17
+  Push                 r5
+  Push                 r3
+  LoadFieldTOS         CP#1
+  StoreFieldTOS        CP#1
+  Push                 r5
+  PopLocal             r4
+  Push                 r4
+  ReturnTOS
+}
+ConstantPool {
+  [0] = ClosureFunction 0
+  [1] = InstanceField dart:core::_Closure::_context (field)
+  [2] = Reserved
+  [3] = InstanceField dart:core::_Closure::_delayed_type_arguments (field)
+  [4] = Reserved
+  [5] = EmptyTypeArguments
+  [6] = InstanceField dart:core::_Closure::_function_type_arguments (field)
+  [7] = Reserved
+  [8] = DirectCall 'dart:_internal::_prependTypeArguments', ArgDesc num-args 4, num-type-args 0, names []
+  [9] = Reserved
+  [10] = Type #lib::testPartialInstantiation::Closure/0::TypeParam/0
+  [11] = ObjectRef 't'
+  [12] = SubtypeTestCache
+  [13] = EndClosureFunctionScope
+  [14] = Class dart:core::_Closure
+  [15] = InstanceField dart:core::_Closure::_instantiator_type_arguments (field)
+  [16] = Reserved
+  [17] = InstanceField dart:core::_Closure::_function (field)
+  [18] = Reserved
+  [19] = ObjectRef < dart:core::int >
+  [20] = DirectCall 'dart:_internal::_boundsCheckForPartialInstantiation', ArgDesc num-args 2, num-type-args 0, names []
+  [21] = Reserved
+}
+Closure #lib::testPartialInstantiation::'foo' <dart:core::Object T> (#lib::testPartialInstantiation::Closure/0::TypeParam/0 t) -> void
+ClosureCode {
+  EntryFixed           2, 3
+  CheckStack           0
+  Push                 FP[-6]
+  LoadFieldTOS         CP#1
+  PopLocal             r1
+  Push                 FP[-6]
+  LoadFieldTOS         CP#3
+  StoreLocal           r0
+  PushConstant         CP#5
+  JumpIfEqStrict       L1
+  CheckFunctionTypeArgs 0, r2
+  Jump                 L2
+L1:
+  CheckFunctionTypeArgs 1, r0
+L2:
+  Push                 r0
+  Push                 FP[-6]
+  LoadFieldTOS         CP#6
+  PushInt              0
+  PushInt              1
+  DirectCall           4, CP#8
+  PopLocal             r0
+  Push                 FP[-5]
+  PushConstant         CP#10
+  PushNull
+  Push                 r0
+  PushConstant         CP#11
+  AssertAssignable     0, CP#12
+  Drop1
+  PushNull
+  ReturnTOS
+
+}
+
+
+Function 'main', static, reflectable, debuggable
+    parameters [] (required: 0)
+    return-type dynamic
+
+
+Bytecode {
+  Entry                0
+  CheckStack           0
+  PushNull
+  ReturnTOS
+}
+ConstantPool {
+}
+
+}
+
+}
+]library #lib from "#lib" as #lib {
+
+  typedef IntFunc = (dart.core::int) → dynamic;
 [@vm.bytecode=
+MembersBytecodeMetadata {
+
+Members {
+
+Function '', constructor, reflectable
+    parameters [] (required: 0)
+    return-type #lib::C1
+
+
 Bytecode {
   Entry                0
   CheckStack           0
@@ -18,12 +399,25 @@
   [0] = DirectCall 'dart:core::Object:: (constructor)', ArgDesc num-args 1, num-type-args 0, names []
   [1] = Reserved
 }
-]  synthetic constructor •() → self::C1
-    : super core::Object::•()
-    ;
+
 }
-class C2 extends core::Object {
+
+}
+]  class C1 extends dart.core::Object {
+    synthetic constructor •() → #lib::C1
+      : super dart.core::Object::•()
+      ;
+  }
 [@vm.bytecode=
+MembersBytecodeMetadata {
+
+Members {
+
+Function '', constructor, reflectable
+    parameters [] (required: 0)
+    return-type #lib::C2
+
+
 Bytecode {
   Entry                0
   CheckStack           0
@@ -37,12 +431,25 @@
   [0] = DirectCall 'dart:core::Object:: (constructor)', ArgDesc num-args 1, num-type-args 0, names []
   [1] = Reserved
 }
-]  synthetic constructor •() → self::C2
-    : super core::Object::•()
-    ;
+
 }
-class C3 extends core::Object {
+
+}
+]  class C2 extends dart.core::Object {
+    synthetic constructor •() → #lib::C2
+      : super dart.core::Object::•()
+      ;
+  }
 [@vm.bytecode=
+MembersBytecodeMetadata {
+
+Members {
+
+Function '', constructor, reflectable
+    parameters [] (required: 0)
+    return-type #lib::C3
+
+
 Bytecode {
   Entry                0
   CheckStack           0
@@ -56,12 +463,25 @@
   [0] = DirectCall 'dart:core::Object:: (constructor)', ArgDesc num-args 1, num-type-args 0, names []
   [1] = Reserved
 }
-]  synthetic constructor •() → self::C3
-    : super core::Object::•()
-    ;
+
 }
-class C4 extends core::Object {
+
+}
+]  class C3 extends dart.core::Object {
+    synthetic constructor •() → #lib::C3
+      : super dart.core::Object::•()
+      ;
+  }
 [@vm.bytecode=
+MembersBytecodeMetadata {
+
+Members {
+
+Function '', constructor, reflectable
+    parameters [] (required: 0)
+    return-type #lib::C4
+
+
 Bytecode {
   Entry                0
   CheckStack           0
@@ -75,12 +495,25 @@
   [0] = DirectCall 'dart:core::Object:: (constructor)', ArgDesc num-args 1, num-type-args 0, names []
   [1] = Reserved
 }
-]  synthetic constructor •() → self::C4
-    : super core::Object::•()
-    ;
+
 }
-class C5 extends core::Object {
+
+}
+]  class C4 extends dart.core::Object {
+    synthetic constructor •() → #lib::C4
+      : super dart.core::Object::•()
+      ;
+  }
 [@vm.bytecode=
+MembersBytecodeMetadata {
+
+Members {
+
+Function '', constructor, reflectable
+    parameters [] (required: 0)
+    return-type #lib::C5
+
+
 Bytecode {
   Entry                0
   CheckStack           0
@@ -94,12 +527,25 @@
   [0] = DirectCall 'dart:core::Object:: (constructor)', ArgDesc num-args 1, num-type-args 0, names []
   [1] = Reserved
 }
-]  synthetic constructor •() → self::C5
-    : super core::Object::•()
-    ;
+
 }
-class C6 extends core::Object {
+
+}
+]  class C5 extends dart.core::Object {
+    synthetic constructor •() → #lib::C5
+      : super dart.core::Object::•()
+      ;
+  }
 [@vm.bytecode=
+MembersBytecodeMetadata {
+
+Members {
+
+Function '', constructor, reflectable
+    parameters [] (required: 0)
+    return-type #lib::C6
+
+
 Bytecode {
   Entry                0
   CheckStack           0
@@ -113,12 +559,25 @@
   [0] = DirectCall 'dart:core::Object:: (constructor)', ArgDesc num-args 1, num-type-args 0, names []
   [1] = Reserved
 }
-]  synthetic constructor •() → self::C6
-    : super core::Object::•()
-    ;
+
 }
-class C7 extends core::Object {
+
+}
+]  class C6 extends dart.core::Object {
+    synthetic constructor •() → #lib::C6
+      : super dart.core::Object::•()
+      ;
+  }
 [@vm.bytecode=
+MembersBytecodeMetadata {
+
+Members {
+
+Function '', constructor, reflectable
+    parameters [] (required: 0)
+    return-type #lib::C7
+
+
 Bytecode {
   Entry                0
   CheckStack           0
@@ -132,12 +591,25 @@
   [0] = DirectCall 'dart:core::Object:: (constructor)', ArgDesc num-args 1, num-type-args 0, names []
   [1] = Reserved
 }
-]  synthetic constructor •() → self::C7
-    : super core::Object::•()
-    ;
+
 }
-class C8 extends core::Object {
+
+}
+]  class C7 extends dart.core::Object {
+    synthetic constructor •() → #lib::C7
+      : super dart.core::Object::•()
+      ;
+  }
 [@vm.bytecode=
+MembersBytecodeMetadata {
+
+Members {
+
+Function '', constructor, reflectable
+    parameters [] (required: 0)
+    return-type #lib::C8
+
+
 Bytecode {
   Entry                0
   CheckStack           0
@@ -151,12 +623,25 @@
   [0] = DirectCall 'dart:core::Object:: (constructor)', ArgDesc num-args 1, num-type-args 0, names []
   [1] = Reserved
 }
-]  synthetic constructor •() → self::C8
-    : super core::Object::•()
-    ;
+
 }
-class A<T1 extends core::Object = dynamic, T2 extends core::Object = dynamic> extends core::Object {
+
+}
+]  class C8 extends dart.core::Object {
+    synthetic constructor •() → #lib::C8
+      : super dart.core::Object::•()
+      ;
+  }
 [@vm.bytecode=
+MembersBytecodeMetadata {
+
+Members {
+
+Function '', constructor, reflectable
+    parameters [] (required: 0)
+    return-type #lib::A < #lib::A::TypeParam/0, #lib::A::TypeParam/1 >
+
+
 Bytecode {
   Entry                0
   CheckStack           0
@@ -170,10 +655,14 @@
   [0] = DirectCall 'dart:core::Object:: (constructor)', ArgDesc num-args 1, num-type-args 0, names []
   [1] = Reserved
 }
-]  synthetic constructor •() → self::A<self::A::T1, self::A::T2>
-    : super core::Object::•()
-    ;
-[@vm.bytecode=
+
+
+Function 'foo', reflectable, debuggable
+    type-params <dart:core::Object T3, dart:core::Object T4>
+    parameters [] (required: 0)
+    return-type void
+
+
 Bytecode {
   Entry                5
   CheckStack           0
@@ -264,7 +753,7 @@
   [47] = ICData dynamic target-name 'call', arg-desc CP#39
 }
 Closure #lib::A::foo::'nested1' <dart:core::Object T5, dart:core::Object T6> () -> void
-ClosureBytecode {
+ClosureCode {
   EntryFixed           1, 5
   CheckStack           0
   Push                 FP[-5]
@@ -321,7 +810,7 @@
 }
 
 Closure #lib::A::foo::Closure/0::'nested2' <dart:core::Object T7, dart:core::Object T8> () -> void
-ClosureBytecode {
+ClosureCode {
   EntryFixed           1, 5
   CheckStack           0
   Push                 FP[-5]
@@ -373,7 +862,7 @@
 }
 
 Closure #lib::A::foo::Closure/1::'<anonymous closure>' () -> dart:core::Null
-ClosureBytecode {
+ClosureCode {
   EntryFixed           1, 4
   CheckStack           0
   Push                 FP[-5]
@@ -454,25 +943,42 @@
   ReturnTOS
 
 }
-]  method foo<T3 extends core::Object = dynamic, T4 extends core::Object = dynamic>() → void {
-    function nested1<T5 extends core::Object = dynamic, T6 extends core::Object = dynamic>() → void {
-      function nested2<T7 extends core::Object = dynamic, T8 extends core::Object = dynamic>() → void {
-        () → core::Null nested3 = () → core::Null {
-          core::print(<core::Type>[self::A::T1, self::A::T2, self::A::foo::T3, self::A::foo::T4, T5, T6, T7, T8]);
-          self::callWithArgs<self::A::T1, self::A::T2, self::A::foo::T3, self::A::foo::T4, T5, T6, T7, T8>();
-        };
-        [@vm.call-site-attributes.metadata=receiverType:() → dart.core::Null] nested3.call();
-      }
-      [@vm.call-site-attributes.metadata=receiverType:<T7 extends dart.core::Object = dynamic, T8 extends dart.core::Object = dynamic>() → void] nested2.call<self::C7, self::C8>();
-      [@vm.call-site-attributes.metadata=receiverType:<T7 extends dart.core::Object = dynamic, T8 extends dart.core::Object = dynamic>() → void] nested2.call<core::List<self::C7>, core::List<self::C8>>();
-    }
-    [@vm.call-site-attributes.metadata=receiverType:<T5 extends dart.core::Object = dynamic, T6 extends dart.core::Object = dynamic>() → void] nested1.call<self::C5, self::C6>();
-    [@vm.call-site-attributes.metadata=receiverType:<T5 extends dart.core::Object = dynamic, T6 extends dart.core::Object = dynamic>() → void] nested1.call<core::List<self::C5>, core::List<self::C6>>();
-  }
+
 }
-class B extends core::Object {
-  field core::int foo = null;
+
+}
+]  class A<T1 extends dart.core::Object = dynamic, T2 extends dart.core::Object = dynamic> extends dart.core::Object {
+    synthetic constructor •() → #lib::A<#lib::A::T1, #lib::A::T2>
+      : super dart.core::Object::•()
+      ;
+    method foo<T3 extends dart.core::Object = dynamic, T4 extends dart.core::Object = dynamic>() → void {
+      function nested1<T5 extends dart.core::Object = dynamic, T6 extends dart.core::Object = dynamic>() → void {
+        function nested2<T7 extends dart.core::Object = dynamic, T8 extends dart.core::Object = dynamic>() → void {
+          () → dart.core::Null nested3 = () → dart.core::Null {
+            dart.core::print(<dart.core::Type>[#lib::A::T1, #lib::A::T2, #lib::A::foo::T3, #lib::A::foo::T4, T5, T6, T7, T8]);
+            #lib::callWithArgs<#lib::A::T1, #lib::A::T2, #lib::A::foo::T3, #lib::A::foo::T4, T5, T6, T7, T8>();
+          };
+          [@vm.call-site-attributes.metadata=receiverType:() → dart.core::Null] nested3.call();
+        }
+        [@vm.call-site-attributes.metadata=receiverType:<T7 extends dart.core::Object = dynamic, T8 extends dart.core::Object = dynamic>() → void] nested2.call<#lib::C7, #lib::C8>();
+        [@vm.call-site-attributes.metadata=receiverType:<T7 extends dart.core::Object = dynamic, T8 extends dart.core::Object = dynamic>() → void] nested2.call<dart.core::List<#lib::C7>, dart.core::List<#lib::C8>>();
+      }
+      [@vm.call-site-attributes.metadata=receiverType:<T5 extends dart.core::Object = dynamic, T6 extends dart.core::Object = dynamic>() → void] nested1.call<#lib::C5, #lib::C6>();
+      [@vm.call-site-attributes.metadata=receiverType:<T5 extends dart.core::Object = dynamic, T6 extends dart.core::Object = dynamic>() → void] nested1.call<dart.core::List<#lib::C5>, dart.core::List<#lib::C6>>();
+    }
+  }
 [@vm.bytecode=
+MembersBytecodeMetadata {
+
+Members {
+Field 'foo', type = dart:core::int, getter = 'get:foo', setter = 'set:foo', reflectable
+    value = null
+
+Function '', constructor, reflectable
+    parameters [] (required: 0)
+    return-type #lib::B
+
+
 Bytecode {
   Entry                0
   CheckStack           0
@@ -482,15 +988,18 @@
   PushNull
   ReturnTOS
 }
-Nullable fields: [#lib::B::foo (field)]}
+Nullable fields: [#lib::B::foo (field)]
 ConstantPool {
   [0] = DirectCall 'dart:core::Object:: (constructor)', ArgDesc num-args 1, num-type-args 0, names []
   [1] = Reserved
 }
-]  synthetic constructor •() → self::B
-    : super core::Object::•()
-    ;
-[@vm.bytecode=
+
+
+Function 'topLevel', reflectable, debuggable
+    parameters [] (required: 0)
+    return-type void
+
+
 Bytecode {
   Entry                5
   CheckStack           0
@@ -607,7 +1116,7 @@
   [32] = ICData dynamic target-name 'call', arg-desc CP#20
 }
 Closure #lib::B::topLevel::'<anonymous closure>' (dart:core::int y) -> dart:core::Null
-ClosureBytecode {
+ClosureCode {
   EntryFixed           2, 4
   CheckStack           0
   Push                 FP[-6]
@@ -677,7 +1186,7 @@
 }
 
 Closure #lib::B::topLevel::Closure/0::'closure2' () -> void
-ClosureBytecode {
+ClosureCode {
   EntryFixed           1, 3
   CheckStack           0
   Push                 FP[-5]
@@ -706,7 +1215,7 @@
 }
 
 Closure #lib::B::topLevel::'<anonymous closure>' () -> dart:core::Null
-ClosureBytecode {
+ClosureCode {
   EntryFixed           1, 3
   CheckStack           0
   Push                 FP[-5]
@@ -722,42 +1231,59 @@
   ReturnTOS
 
 }
-]  method topLevel() → void {
-    {
-      core::int x = 1;
+
+}
+
+}
+]  class B extends dart.core::Object {
+    field dart.core::int foo = null;
+    synthetic constructor •() → #lib::B
+      : super dart.core::Object::•()
+      ;
+    method topLevel() → void {
       {
-        core::int y = 2;
-        core::int z = 3;
-        (core::int) → core::Null closure1 = (core::int y) → core::Null {
-          x = y.{core::num::+}(1);
-          if(x.{core::num::>}(5)) {
-            core::int w = 4;
-            function closure2() → void {
-              z = x.{core::num::+}(2);
-              w = this.{self::B::foo}.{core::num::+}(y);
+        dart.core::int x = 1;
+        {
+          dart.core::int y = 2;
+          dart.core::int z = 3;
+          (dart.core::int) → dart.core::Null closure1 = (dart.core::int y) → dart.core::Null {
+            x = y.{dart.core::num::+}(1);
+            if(x.{dart.core::num::>}(5)) {
+              dart.core::int w = 4;
+              function closure2() → void {
+                z = x.{dart.core::num::+}(2);
+                w = this.{#lib::B::foo}.{dart.core::num::+}(y);
+              }
+              [@vm.call-site-attributes.metadata=receiverType:() → void] closure2.call();
+              dart.core::print(w);
             }
-            [@vm.call-site-attributes.metadata=receiverType:() → void] closure2.call();
-            core::print(w);
-          }
-        };
-        [@vm.call-site-attributes.metadata=receiverType:(dart.core::int) → dart.core::Null] closure1.call(10);
-        [@vm.call-site-attributes.metadata=receiverType:(dart.core::int) → dart.core::Null] closure1.call(11);
-        core::print(y);
-        core::print(z);
+          };
+          [@vm.call-site-attributes.metadata=receiverType:(dart.core::int) → dart.core::Null] closure1.call(10);
+          [@vm.call-site-attributes.metadata=receiverType:(dart.core::int) → dart.core::Null] closure1.call(11);
+          dart.core::print(y);
+          dart.core::print(z);
+        }
+        dart.core::print(x);
       }
-      core::print(x);
-    }
-    {
-      core::int x = 42;
-      () → core::Null closure3 = () → core::Null {
-        this.{self::B::foo} = x;
-      };
-      [@vm.call-site-attributes.metadata=receiverType:() → dart.core::Null] closure3.call();
+      {
+        dart.core::int x = 42;
+        () → dart.core::Null closure3 = () → dart.core::Null {
+          this.{#lib::B::foo} = x;
+        };
+        [@vm.call-site-attributes.metadata=receiverType:() → dart.core::Null] closure3.call();
+      }
     }
   }
-}
-class C extends core::Object {
 [@vm.bytecode=
+MembersBytecodeMetadata {
+
+Members {
+
+Function '', constructor, reflectable
+    parameters [] (required: 0)
+    return-type #lib::C
+
+
 Bytecode {
   Entry                0
   CheckStack           0
@@ -771,10 +1297,13 @@
   [0] = DirectCall 'dart:core::Object:: (constructor)', ArgDesc num-args 1, num-type-args 0, names []
   [1] = Reserved
 }
-]  synthetic constructor •() → self::C
-    : super core::Object::•()
-    ;
-[@vm.bytecode=
+
+
+Function 'testForLoop', reflectable, debuggable
+    parameters [] (required: 0)
+    return-type void
+
+
 Bytecode {
   Entry                5
   CheckStack           0
@@ -905,7 +1434,7 @@
   [23] = EndClosureFunctionScope
 }
 Closure #lib::C::testForLoop::'<anonymous closure>' () -> dart:core::int
-ClosureBytecode {
+ClosureCode {
   EntryFixed           1, 2
   CheckStack           0
   Push                 FP[-5]
@@ -922,7 +1451,7 @@
 }
 
 Closure #lib::C::testForLoop::'<anonymous closure>' (dart:core::int ii) -> dart:core::Null
-ClosureBytecode {
+ClosureCode {
   EntryFixed           2, 3
   CheckStack           0
   Push                 FP[-6]
@@ -946,18 +1475,13 @@
   ReturnTOS
 
 }
-]  method testForLoop() → void {
-    core::int delta = 0;
-    core::List<core::Function> getI = <core::Function>[];
-    core::List<core::Function> setI = <core::Function>[];
-    for (core::int i = 0; i.{core::num::<}(10); i = i.{core::num::+}(1)) {
-      [@vm.call-site-attributes.metadata=receiverType:dart.core::List<dart.core::Function>] getI.{core::List::add}(() → core::int => i.{core::num::+}(delta));
-      [@vm.call-site-attributes.metadata=receiverType:dart.core::List<dart.core::Function>] setI.{core::List::add}((core::int ii) → core::Null {
-        i = ii.{core::num::+}(delta);
-      });
-    }
-  }
-[@vm.bytecode=
+
+
+Function 'testForInLoop', reflectable, debuggable
+    parameters [dart:core::List < dart:core::int > 'list'] (required: 1)
+    return-type void
+
+
 Bytecode {
   Entry                5
   CheckStack           0
@@ -1035,7 +1559,7 @@
   [23] = Reserved
 }
 Closure #lib::C::testForInLoop::'<anonymous closure>' () -> dart:core::Null
-ClosureBytecode {
+ClosureCode {
   EntryFixed           1, 3
   CheckStack           0
   Push                 FP[-5]
@@ -1051,18 +1575,45 @@
   ReturnTOS
 
 }
-]  method testForInLoop(core::List<core::int> list) → void {
-    for (core::int i in list) {
-      () → core::Null inc = () → core::Null {
-        i = i.{core::num::+}(1);
-      };
-      [@vm.call-site-attributes.metadata=receiverType:() → dart.core::Null] inc.call();
-      core::print(i);
+
+}
+
+}
+]  class C extends dart.core::Object {
+    synthetic constructor •() → #lib::C
+      : super dart.core::Object::•()
+      ;
+    method testForLoop() → void {
+      dart.core::int delta = 0;
+      dart.core::List<dart.core::Function> getI = <dart.core::Function>[];
+      dart.core::List<dart.core::Function> setI = <dart.core::Function>[];
+      for (dart.core::int i = 0; i.{dart.core::num::<}(10); i = i.{dart.core::num::+}(1)) {
+        [@vm.call-site-attributes.metadata=receiverType:dart.core::List<dart.core::Function>] getI.{dart.core::List::add}(() → dart.core::int => i.{dart.core::num::+}(delta));
+        [@vm.call-site-attributes.metadata=receiverType:dart.core::List<dart.core::Function>] setI.{dart.core::List::add}((dart.core::int ii) → dart.core::Null {
+          i = ii.{dart.core::num::+}(delta);
+        });
+      }
+    }
+    method testForInLoop(dart.core::List<dart.core::int> list) → void {
+      for (dart.core::int i in list) {
+        () → dart.core::Null inc = () → dart.core::Null {
+          i = i.{dart.core::num::+}(1);
+        };
+        [@vm.call-site-attributes.metadata=receiverType:() → dart.core::Null] inc.call();
+        dart.core::print(i);
+      }
     }
   }
-}
-class D<T extends core::Object = dynamic> extends core::Object {
 [@vm.bytecode=
+MembersBytecodeMetadata {
+
+Members {
+
+Function '', constructor, reflectable
+    parameters [] (required: 0)
+    return-type #lib::D < #lib::D::TypeParam/0 >
+
+
 Bytecode {
   Entry                0
   CheckStack           0
@@ -1076,10 +1627,13 @@
   [0] = DirectCall 'dart:core::Object:: (constructor)', ArgDesc num-args 1, num-type-args 0, names []
   [1] = Reserved
 }
-]  synthetic constructor •() → self::D<self::D::T>
-    : super core::Object::•()
-    ;
-[@vm.bytecode=
+
+
+Function 'foo', reflectable, debuggable
+    parameters [#lib::D::TypeParam/0 't'] (required: 1)
+    return-type dynamic
+
+
 Bytecode {
   Entry                3
   CheckStack           0
@@ -1116,6 +1670,7 @@
   StoreFieldTOS        CP#5
   ReturnTOS
 }
+Parameter flags: [2]
 ConstantPool {
   [0] = Type #lib::D::TypeParam/0
   [1] = TypeArgumentsField #lib::D
@@ -1137,7 +1692,7 @@
   [17] = Reserved
 }
 Closure #lib::D::foo::'<anonymous closure>' () -> #lib::D::TypeParam/0
-ClosureBytecode {
+ClosureCode {
   EntryFixed           1, 2
   CheckStack           0
   Push                 FP[-5]
@@ -1148,10 +1703,13 @@
   ReturnTOS
 
 }
-]  method foo(generic-covariant-impl self::D::T t) → dynamic {
-    return () → self::D::T => t;
-  }
-[@vm.bytecode=
+
+
+Function 'bar', reflectable, debuggable
+    parameters [] (required: 0)
+    return-type dynamic
+
+
 Bytecode {
   Entry                3
   CheckStack           0
@@ -1202,7 +1760,7 @@
   [18] = EndClosureFunctionScope
 }
 Closure #lib::D::bar::'<anonymous closure>' () -> dart:core::Null
-ClosureBytecode {
+ClosureCode {
   EntryFixed           1, 4
   CheckStack           0
   Push                 FP[-5]
@@ -1237,7 +1795,7 @@
 }
 
 Closure #lib::D::bar::Closure/0::'inner' () -> dart:core::Null
-ClosureBytecode {
+ClosureCode {
   EntryFixed           1, 2
   CheckStack           0
   Push                 FP[-5]
@@ -1247,361 +1805,44 @@
   ReturnTOS
 
 }
-]  method bar() → dynamic {
-    return () → core::Null {
-      function inner() → core::Null {}
-      [@vm.call-site-attributes.metadata=receiverType:() → dart.core::Null] inner.call();
-    };
+
+}
+
+}
+]  class D<T extends dart.core::Object = dynamic> extends dart.core::Object {
+    synthetic constructor •() → #lib::D<#lib::D::T>
+      : super dart.core::Object::•()
+      ;
+    method foo(generic-covariant-impl #lib::D::T t) → dynamic {
+      return () → #lib::D::T => t;
+    }
+    method bar() → dynamic {
+      return () → dart.core::Null {
+        function inner() → dart.core::Null {}
+        [@vm.call-site-attributes.metadata=receiverType:() → dart.core::Null] inner.call();
+      };
+    }
   }
+  static method simpleClosure() → dart.core::int {
+    dart.core::int x = 5;
+    (dart.core::int) → dart.core::Null inc = (dart.core::int y) → dart.core::Null {
+      x = x.{dart.core::num::+}(y);
+    };
+    [@vm.call-site-attributes.metadata=receiverType:(dart.core::int) → dart.core::Null] inc.call(3);
+    return x;
+  }
+  static method callWithArgs<T1 extends dart.core::Object = dynamic, T2 extends dart.core::Object = dynamic, T3 extends dart.core::Object = dynamic, T4 extends dart.core::Object = dynamic, T5 extends dart.core::Object = dynamic, T6 extends dart.core::Object = dynamic, T7 extends dart.core::Object = dynamic, T8 extends dart.core::Object = dynamic>() → void {
+    dart.core::print(<dart.core::Type>[#lib::callWithArgs::T1, #lib::callWithArgs::T2, #lib::callWithArgs::T3, #lib::callWithArgs::T4, #lib::callWithArgs::T5, #lib::callWithArgs::T6, #lib::callWithArgs::T7, #lib::callWithArgs::T8]);
+  }
+  static method callA() → void {
+    new #lib::A::•<#lib::C1, #lib::C2>().{#lib::A::foo}<#lib::C3, #lib::C4>();
+    new #lib::A::•<#lib::C1, #lib::C2>().{#lib::A::foo}<dart.core::List<#lib::C3>, dart.core::List<#lib::C4>>();
+    new #lib::A::•<dart.core::List<#lib::C1>, dart.core::List<#lib::C2>>().{#lib::A::foo}<dart.core::List<#lib::C3>, dart.core::List<#lib::C4>>();
+  }
+  static method testPartialInstantiation() → (dart.core::int) → dynamic {
+    function foo<T extends dart.core::Object = dynamic>(T t) → void {}
+    (dart.core::int) → dynamic intFunc = foo<dart.core::int>;
+    return intFunc;
+  }
+  static method main() → dynamic {}
 }
-[@vm.bytecode=
-Bytecode {
-  Entry                4
-  CheckStack           0
-  AllocateContext      0, 1
-  PopLocal             r0
-  Push                 r0
-  PushInt              5
-  StoreContextVar      0, 0
-  Allocate             CP#7
-  StoreLocal           r3
-  Push                 r3
-  PushNull
-  StoreFieldTOS        CP#8
-  Push                 r3
-  PushNull
-  StoreFieldTOS        CP#10
-  Push                 r3
-  PushConstant         CP#12
-  StoreFieldTOS        CP#13
-  Push                 r3
-  PushConstant         CP#0
-  StoreFieldTOS        CP#15
-  Push                 r3
-  Push                 r0
-  StoreFieldTOS        CP#1
-  PopLocal             r2
-  Push                 r2
-  PushInt              3
-  DynamicCall          2, CP#18
-  Drop1
-  Push                 r0
-  LoadContextVar       0, 0
-  ReturnTOS
-}
-ConstantPool {
-  [0] = ClosureFunction 0
-  [1] = InstanceField dart:core::_Closure::_context (field)
-  [2] = Reserved
-  [3] = Type dart:core::int
-  [4] = ObjectRef 'y'
-  [5] = SubtypeTestCache
-  [6] = EndClosureFunctionScope
-  [7] = Class dart:core::_Closure
-  [8] = InstanceField dart:core::_Closure::_instantiator_type_arguments (field)
-  [9] = Reserved
-  [10] = InstanceField dart:core::_Closure::_function_type_arguments (field)
-  [11] = Reserved
-  [12] = EmptyTypeArguments
-  [13] = InstanceField dart:core::_Closure::_delayed_type_arguments (field)
-  [14] = Reserved
-  [15] = InstanceField dart:core::_Closure::_function (field)
-  [16] = Reserved
-  [17] = ObjectRef ArgDesc num-args 2, num-type-args 0, names []
-  [18] = ICData dynamic target-name 'call', arg-desc CP#17
-}
-Closure #lib::simpleClosure::'<anonymous closure>' (dart:core::int y) -> dart:core::Null
-ClosureBytecode {
-  EntryFixed           2, 3
-  CheckStack           0
-  Push                 FP[-6]
-  LoadFieldTOS         CP#1
-  PopLocal             r0
-  Push                 FP[-5]
-  PushConstant         CP#3
-  PushNull
-  PushNull
-  PushConstant         CP#4
-  AssertAssignable     1, CP#5
-  Drop1
-  Push                 r0
-  Push                 r0
-  LoadContextVar       0, 0
-  Push                 FP[-5]
-  AddInt
-  StoreContextVar      0, 0
-  PushNull
-  ReturnTOS
-
-}
-]static method simpleClosure() → core::int {
-  core::int x = 5;
-  (core::int) → core::Null inc = (core::int y) → core::Null {
-    x = x.{core::num::+}(y);
-  };
-  [@vm.call-site-attributes.metadata=receiverType:(dart.core::int) → dart.core::Null] inc.call(3);
-  return x;
-}
-[@vm.bytecode=
-Bytecode {
-  Entry                2
-  CheckStack           0
-  CheckFunctionTypeArgs 8, r0
-  PushConstant         CP#0
-  StoreLocal           r1
-  Push                 r1
-  PushInt              8
-  CreateArrayTOS
-  StoreLocal           r1
-  Push                 r1
-  PushInt              0
-  PushNull
-  Push                 r0
-  InstantiateType      CP#1
-  StoreIndexedTOS
-  Push                 r1
-  PushInt              1
-  PushNull
-  Push                 r0
-  InstantiateType      CP#2
-  StoreIndexedTOS
-  Push                 r1
-  PushInt              2
-  PushNull
-  Push                 r0
-  InstantiateType      CP#3
-  StoreIndexedTOS
-  Push                 r1
-  PushInt              3
-  PushNull
-  Push                 r0
-  InstantiateType      CP#4
-  StoreIndexedTOS
-  Push                 r1
-  PushInt              4
-  PushNull
-  Push                 r0
-  InstantiateType      CP#5
-  StoreIndexedTOS
-  Push                 r1
-  PushInt              5
-  PushNull
-  Push                 r0
-  InstantiateType      CP#6
-  StoreIndexedTOS
-  Push                 r1
-  PushInt              6
-  PushNull
-  Push                 r0
-  InstantiateType      CP#7
-  StoreIndexedTOS
-  Push                 r1
-  PushInt              7
-  PushNull
-  Push                 r0
-  InstantiateType      CP#8
-  StoreIndexedTOS
-  DirectCall           2, CP#9
-  DirectCall           1, CP#11
-  Drop1
-  PushNull
-  ReturnTOS
-}
-ConstantPool {
-  [0] = ObjectRef < dart:core::Type >
-  [1] = Type #lib::callWithArgs::TypeParam/0
-  [2] = Type #lib::callWithArgs::TypeParam/1
-  [3] = Type #lib::callWithArgs::TypeParam/2
-  [4] = Type #lib::callWithArgs::TypeParam/3
-  [5] = Type #lib::callWithArgs::TypeParam/4
-  [6] = Type #lib::callWithArgs::TypeParam/5
-  [7] = Type #lib::callWithArgs::TypeParam/6
-  [8] = Type #lib::callWithArgs::TypeParam/7
-  [9] = DirectCall 'dart:core::List::_fromLiteral (constructor)', ArgDesc num-args 2, num-type-args 0, names []
-  [10] = Reserved
-  [11] = DirectCall 'dart:core::print', ArgDesc num-args 1, num-type-args 0, names []
-  [12] = Reserved
-}
-]static method callWithArgs<T1 extends core::Object = dynamic, T2 extends core::Object = dynamic, T3 extends core::Object = dynamic, T4 extends core::Object = dynamic, T5 extends core::Object = dynamic, T6 extends core::Object = dynamic, T7 extends core::Object = dynamic, T8 extends core::Object = dynamic>() → void {
-  core::print(<core::Type>[self::callWithArgs::T1, self::callWithArgs::T2, self::callWithArgs::T3, self::callWithArgs::T4, self::callWithArgs::T5, self::callWithArgs::T6, self::callWithArgs::T7, self::callWithArgs::T8]);
-}
-[@vm.bytecode=
-Bytecode {
-  Entry                1
-  CheckStack           0
-  PushConstant         CP#0
-  PushConstant         CP#2
-  PushConstant         CP#1
-  AllocateT
-  StoreLocal           r0
-  Push                 r0
-  DirectCall           1, CP#3
-  Drop1
-  InterfaceCall        2, CP#5
-  Drop1
-  PushConstant         CP#7
-  PushConstant         CP#2
-  PushConstant         CP#1
-  AllocateT
-  StoreLocal           r0
-  Push                 r0
-  DirectCall           1, CP#3
-  Drop1
-  InterfaceCall        2, CP#5
-  Drop1
-  PushConstant         CP#7
-  PushConstant         CP#8
-  PushConstant         CP#1
-  AllocateT
-  StoreLocal           r0
-  Push                 r0
-  DirectCall           1, CP#3
-  Drop1
-  InterfaceCall        2, CP#5
-  Drop1
-  PushNull
-  ReturnTOS
-}
-ConstantPool {
-  [0] = ObjectRef < #lib::C3, #lib::C4 >
-  [1] = Class #lib::A
-  [2] = ObjectRef < #lib::C1, #lib::C2 >
-  [3] = DirectCall '#lib::A:: (constructor)', ArgDesc num-args 1, num-type-args 0, names []
-  [4] = Reserved
-  [5] = InterfaceCall '#lib::A::foo', ArgDesc num-args 1, num-type-args 2, names []
-  [6] = Reserved
-  [7] = ObjectRef < dart:core::List < #lib::C3 >, dart:core::List < #lib::C4 > >
-  [8] = ObjectRef < dart:core::List < #lib::C1 >, dart:core::List < #lib::C2 > >
-}
-]static method callA() → void {
-  new self::A::•<self::C1, self::C2>().{self::A::foo}<self::C3, self::C4>();
-  new self::A::•<self::C1, self::C2>().{self::A::foo}<core::List<self::C3>, core::List<self::C4>>();
-  new self::A::•<core::List<self::C1>, core::List<self::C2>>().{self::A::foo}<core::List<self::C3>, core::List<self::C4>>();
-}
-[@vm.bytecode=
-Bytecode {
-  Entry                7
-  CheckStack           0
-  Allocate             CP#14
-  StoreLocal           r3
-  Push                 r3
-  PushNull
-  StoreFieldTOS        CP#15
-  Push                 r3
-  PushNull
-  StoreFieldTOS        CP#6
-  Push                 r3
-  PushConstant         CP#5
-  StoreFieldTOS        CP#3
-  Push                 r3
-  PushConstant         CP#0
-  StoreFieldTOS        CP#17
-  Push                 r3
-  Push                 r0
-  StoreFieldTOS        CP#1
-  PopLocal             r2
-  Push                 r2
-  StoreLocal           r3
-  PushConstant         CP#19
-  StoreLocal           r6
-  DirectCall           2, CP#20
-  Drop1
-  Allocate             CP#14
-  StoreLocal           r5
-  Push                 r6
-  StoreFieldTOS        CP#3
-  Push                 r5
-  Push                 r3
-  LoadFieldTOS         CP#15
-  StoreFieldTOS        CP#15
-  Push                 r5
-  Push                 r3
-  LoadFieldTOS         CP#6
-  StoreFieldTOS        CP#6
-  Push                 r5
-  Push                 r3
-  LoadFieldTOS         CP#17
-  StoreFieldTOS        CP#17
-  Push                 r5
-  Push                 r3
-  LoadFieldTOS         CP#1
-  StoreFieldTOS        CP#1
-  Push                 r5
-  PopLocal             r4
-  Push                 r4
-  ReturnTOS
-}
-ConstantPool {
-  [0] = ClosureFunction 0
-  [1] = InstanceField dart:core::_Closure::_context (field)
-  [2] = Reserved
-  [3] = InstanceField dart:core::_Closure::_delayed_type_arguments (field)
-  [4] = Reserved
-  [5] = EmptyTypeArguments
-  [6] = InstanceField dart:core::_Closure::_function_type_arguments (field)
-  [7] = Reserved
-  [8] = DirectCall 'dart:_internal::_prependTypeArguments', ArgDesc num-args 4, num-type-args 0, names []
-  [9] = Reserved
-  [10] = Type #lib::testPartialInstantiation::Closure/0::TypeParam/0
-  [11] = ObjectRef 't'
-  [12] = SubtypeTestCache
-  [13] = EndClosureFunctionScope
-  [14] = Class dart:core::_Closure
-  [15] = InstanceField dart:core::_Closure::_instantiator_type_arguments (field)
-  [16] = Reserved
-  [17] = InstanceField dart:core::_Closure::_function (field)
-  [18] = Reserved
-  [19] = ObjectRef < dart:core::int >
-  [20] = DirectCall 'dart:_internal::_boundsCheckForPartialInstantiation', ArgDesc num-args 2, num-type-args 0, names []
-  [21] = Reserved
-}
-Closure #lib::testPartialInstantiation::'foo' <dart:core::Object T> (#lib::testPartialInstantiation::Closure/0::TypeParam/0 t) -> void
-ClosureBytecode {
-  EntryFixed           2, 3
-  CheckStack           0
-  Push                 FP[-6]
-  LoadFieldTOS         CP#1
-  PopLocal             r1
-  Push                 FP[-6]
-  LoadFieldTOS         CP#3
-  StoreLocal           r0
-  PushConstant         CP#5
-  JumpIfEqStrict       L1
-  CheckFunctionTypeArgs 0, r2
-  Jump                 L2
-L1:
-  CheckFunctionTypeArgs 1, r0
-L2:
-  Push                 r0
-  Push                 FP[-6]
-  LoadFieldTOS         CP#6
-  PushInt              0
-  PushInt              1
-  DirectCall           4, CP#8
-  PopLocal             r0
-  Push                 FP[-5]
-  PushConstant         CP#10
-  PushNull
-  Push                 r0
-  PushConstant         CP#11
-  AssertAssignable     0, CP#12
-  Drop1
-  PushNull
-  ReturnTOS
-
-}
-]static method testPartialInstantiation() → (core::int) → dynamic {
-  function foo<T extends core::Object = dynamic>(T t) → void {}
-  (core::int) → dynamic intFunc = foo<core::int>;
-  return intFunc;
-}
-[@vm.bytecode=
-Bytecode {
-  Entry                0
-  CheckStack           0
-  PushNull
-  ReturnTOS
-}
-ConstantPool {
-}
-]static method main() → dynamic {}
diff --git a/pkg/vm/testcases/bytecode/deferred_lib.dart.expect b/pkg/vm/testcases/bytecode/deferred_lib.dart.expect
index 131cb14..3974030 100644
--- a/pkg/vm/testcases/bytecode/deferred_lib.dart.expect
+++ b/pkg/vm/testcases/bytecode/deferred_lib.dart.expect
@@ -1,10 +1,21 @@
-library #lib;
-import self as self;
-import "./hello.dart" as hel;
+main = #lib::main;
+ [@vm.bytecode=
+ComponentBytecodeMetadata {
 
-import "#pkg/vm/testcases/bytecode/hello.dart" deferred as lib;
+Bytecode (version: stable)
+Main library: #lib
 
-[@vm.bytecode=
+}
+] [@vm.bytecode=
+MembersBytecodeMetadata {
+
+Members {
+
+Function 'callDeferred', static, reflectable, debuggable
+    parameters [] (required: 0)
+    return-type dynamic
+
+
 Bytecode {
   Entry                1
   CheckStack           0
@@ -20,9 +31,13 @@
   [2] = DirectCall '#pkg/vm/testcases/bytecode/hello.dart::main', ArgDesc num-args 0, num-type-args 0, names []
   [3] = Reserved
 }
-]static method callDeferred() → dynamic
-  return let final dynamic #t1 = CheckLibraryIsLoaded(lib) in hel::main();
-[@vm.bytecode=
+
+
+Function 'testLoadLibrary', static, reflectable, debuggable
+    parameters [] (required: 0)
+    return-type dynamic
+
+
 Bytecode {
   Entry                0
   CheckStack           0
@@ -34,9 +49,13 @@
   [0] = DirectCall 'dart:async::Future::value (constructor)', ArgDesc num-args 1, num-type-args 0, names []
   [1] = Reserved
 }
-]static method testLoadLibrary() → dynamic
-  return LoadLibrary(lib);
-[@vm.bytecode=
+
+
+Function 'main', static, reflectable, debuggable
+    parameters [] (required: 0)
+    return-type dynamic
+
+
 Bytecode {
   Entry                0
   CheckStack           0
@@ -45,4 +64,17 @@
 }
 ConstantPool {
 }
-]static method main() → dynamic {}
+
+}
+
+}
+]library #lib from "#lib" as #lib {
+
+  import "#pkg/vm/testcases/bytecode/hello.dart" deferred as lib;
+
+  static method callDeferred() → dynamic
+    return let final dynamic #t1 = CheckLibraryIsLoaded(lib) in #lib1::main();
+  static method testLoadLibrary() → dynamic
+    return LoadLibrary(lib);
+  static method main() → dynamic {}
+}
diff --git a/pkg/vm/testcases/bytecode/field_initializers.dart.expect b/pkg/vm/testcases/bytecode/field_initializers.dart.expect
index f5f3808..b122da6 100644
--- a/pkg/vm/testcases/bytecode/field_initializers.dart.expect
+++ b/pkg/vm/testcases/bytecode/field_initializers.dart.expect
@@ -1,14 +1,59 @@
-library #lib;
-import self as self;
-import "dart:core" as core;
+main = #lib::main;
+ [@vm.bytecode=
+ComponentBytecodeMetadata {
 
-class A extends core::Object {
-  field core::int foo1;
-  field core::int foo2 = null;
-  field core::int foo3 = 42;
-  field core::int foo4;
-  field core::int foo5 = 43;
+Bytecode (version: stable)
+Main library: #lib
+
+}
+] [@vm.bytecode=
+MembersBytecodeMetadata {
+
+Members {
+
+Function 'main', static, reflectable, debuggable
+    parameters [] (required: 0)
+    return-type dynamic
+
+
+Bytecode {
+  Entry                0
+  CheckStack           0
+  PushNull
+  ReturnTOS
+}
+ConstantPool {
+}
+
+}
+
+}
+]library #lib from "#lib" as #lib {
+
 [@vm.bytecode=
+MembersBytecodeMetadata {
+
+Members {
+Field 'foo1', type = dart:core::int, getter = 'get:foo1', setter = 'set:foo1', reflectable
+    value = null
+
+Field 'foo2', type = dart:core::int, getter = 'get:foo2', setter = 'set:foo2', reflectable
+    value = null
+
+Field 'foo3', type = dart:core::int, getter = 'get:foo3', setter = 'set:foo3', reflectable
+    value = const 42
+
+Field 'foo4', type = dart:core::int, getter = 'get:foo4', setter = 'set:foo4', reflectable
+    value = null
+
+Field 'foo5', type = dart:core::int, getter = 'get:foo5', setter = 'set:foo5', reflectable
+    value = const 43
+
+Function '', constructor, reflectable, debuggable
+    parameters [dart:core::int 'foo4'] (required: 1)
+    return-type #lib::A
+
+
 Bytecode {
   Entry                0
   CheckStack           0
@@ -30,7 +75,7 @@
   PushNull
   ReturnTOS
 }
-Nullable fields: [#lib::A::foo1 (field), #lib::A::foo2 (field)]}
+Nullable fields: [#lib::A::foo1 (field), #lib::A::foo2 (field)]
 ConstantPool {
   [0] = InstanceField #lib::A::foo3 (field)
   [1] = Reserved
@@ -41,10 +86,13 @@
   [6] = DirectCall 'dart:core::Object:: (constructor)', ArgDesc num-args 1, num-type-args 0, names []
   [7] = Reserved
 }
-]  constructor •(core::int foo4) → self::A
-    : self::A::foo1 = null, self::A::foo4 = foo4, self::A::foo5 = 44, super core::Object::•()
-    ;
-[@vm.bytecode=
+
+
+Function 'constr2', constructor, reflectable, debuggable
+    parameters [dart:core::int 'x', dart:core::int 'y'] (required: 2)
+    return-type #lib::A
+
+
 Bytecode {
   Entry                0
   CheckStack           0
@@ -68,7 +116,7 @@
   PushNull
   ReturnTOS
 }
-Nullable fields: [#lib::A::foo2 (field), #lib::A::foo4 (field)]}
+Nullable fields: [#lib::A::foo2 (field), #lib::A::foo4 (field)]
 ConstantPool {
   [0] = InstanceField #lib::A::foo3 (field)
   [1] = Reserved
@@ -79,10 +127,13 @@
   [6] = DirectCall 'dart:core::Object:: (constructor)', ArgDesc num-args 1, num-type-args 0, names []
   [7] = Reserved
 }
-]  constructor constr2(core::int x, core::int y) → self::A
-    : self::A::foo4 = null, self::A::foo1 = x, self::A::foo5 = y.{core::num::+}(1), super core::Object::•()
-    ;
-[@vm.bytecode=
+
+
+Function 'redirecting1', constructor, reflectable, debuggable
+    parameters [] (required: 0)
+    return-type #lib::A
+
+
 Bytecode {
   Entry                0
   CheckStack           0
@@ -97,10 +148,13 @@
   [0] = DirectCall '#lib::A:: (constructor)', ArgDesc num-args 2, num-type-args 0, names []
   [1] = Reserved
 }
-]  constructor redirecting1() → self::A
-    : this self::A::•(45)
-    ;
-[@vm.bytecode=
+
+
+Function 'redirecting2', constructor, reflectable, debuggable
+    parameters [dart:core::int 'a', dart:core::int 'b', dart:core::int 'c'] (required: 3)
+    return-type #lib::A
+
+
 Bytecode {
   Entry                0
   CheckStack           0
@@ -118,15 +172,47 @@
   [0] = DirectCall '#lib::A::constr2 (constructor)', ArgDesc num-args 3, num-type-args 0, names []
   [1] = Reserved
 }
-]  constructor redirecting2(core::int a, core::int b, core::int c) → self::A
-    : this self::A::constr2(a, b.{core::num::*}(c))
-    ;
+
 }
-class B extends self::A {
-  field core::int foo6 = 46;
-  static field core::int foo7 = 47;
-  static const field core::int foo8 = 48;
+
+}
+]  class A extends dart.core::Object {
+    field dart.core::int foo1;
+    field dart.core::int foo2 = null;
+    field dart.core::int foo3 = 42;
+    field dart.core::int foo4;
+    field dart.core::int foo5 = 43;
+    constructor •(dart.core::int foo4) → #lib::A
+      : #lib::A::foo1 = null, #lib::A::foo4 = foo4, #lib::A::foo5 = 44, super dart.core::Object::•()
+      ;
+    constructor constr2(dart.core::int x, dart.core::int y) → #lib::A
+      : #lib::A::foo4 = null, #lib::A::foo1 = x, #lib::A::foo5 = y.{dart.core::num::+}(1), super dart.core::Object::•()
+      ;
+    constructor redirecting1() → #lib::A
+      : this #lib::A::•(45)
+      ;
+    constructor redirecting2(dart.core::int a, dart.core::int b, dart.core::int c) → #lib::A
+      : this #lib::A::constr2(a, b.{dart.core::num::*}(c))
+      ;
+  }
 [@vm.bytecode=
+MembersBytecodeMetadata {
+
+Members {
+Field 'foo6', type = dart:core::int, getter = 'get:foo6', setter = 'set:foo6', reflectable
+    value = const 46
+
+Field 'foo7', type = dart:core::int, reflectable, static
+    value = const 47
+
+Field 'foo8', type = dart:core::int, reflectable, static, const, final
+    value = const 48
+
+Function '', constructor, reflectable, debuggable
+    parameters [] (required: 0)
+    return-type #lib::B
+
+
 Bytecode {
   Entry                0
   CheckStack           0
@@ -146,10 +232,13 @@
   [2] = DirectCall '#lib::A:: (constructor)', ArgDesc num-args 2, num-type-args 0, names []
   [3] = Reserved
 }
-]  constructor •() → self::B
-    : super self::A::•(49)
-    ;
-[@vm.bytecode=
+
+
+Function 'c2', constructor, reflectable, debuggable
+    parameters [dart:core::int 'i', dart:core::int 'j'] (required: 2)
+    return-type #lib::B
+
+
 Bytecode {
   Entry                0
   CheckStack           0
@@ -174,17 +263,20 @@
   [2] = DirectCall '#lib::A::redirecting2 (constructor)', ArgDesc num-args 4, num-type-args 0, names []
   [3] = Reserved
 }
-]  constructor c2(core::int i, core::int j) → self::B
-    : self::B::foo6 = 50, super self::A::redirecting2(i, j, 51)
-    ;
+
 }
-[@vm.bytecode=
-Bytecode {
-  Entry                0
-  CheckStack           0
-  PushNull
-  ReturnTOS
+
 }
-ConstantPool {
+]  class B extends #lib::A {
+    field dart.core::int foo6 = 46;
+    static field dart.core::int foo7 = 47;
+    static const field dart.core::int foo8 = 48;
+    constructor •() → #lib::B
+      : super #lib::A::•(49)
+      ;
+    constructor c2(dart.core::int i, dart.core::int j) → #lib::B
+      : #lib::B::foo6 = 50, super #lib::A::redirecting2(i, j, 51)
+      ;
+  }
+  static method main() → dynamic {}
 }
-]static method main() → dynamic {}
diff --git a/pkg/vm/testcases/bytecode/hello.dart.expect b/pkg/vm/testcases/bytecode/hello.dart.expect
index bcddfbb..ce754e8 100644
--- a/pkg/vm/testcases/bytecode/hello.dart.expect
+++ b/pkg/vm/testcases/bytecode/hello.dart.expect
@@ -1,8 +1,21 @@
-library #lib;
-import self as self;
-import "dart:core" as core;
+main = #lib::main;
+ [@vm.bytecode=
+ComponentBytecodeMetadata {
 
-[@vm.bytecode=
+Bytecode (version: stable)
+Main library: #lib
+
+}
+] [@vm.bytecode=
+MembersBytecodeMetadata {
+
+Members {
+
+Function 'main', static, reflectable, debuggable
+    parameters [] (required: 0)
+    return-type dynamic
+
+
 Bytecode {
   Entry                0
   CheckStack           0
@@ -17,6 +30,13 @@
   [1] = DirectCall 'dart:core::print', ArgDesc num-args 1, num-type-args 0, names []
   [2] = Reserved
 }
-]static method main() → dynamic {
-  core::print("Hello, Dart Bytecode!");
+
+}
+
+}
+]library #lib from "#lib" as #lib {
+
+  static method main() → dynamic {
+    dart.core::print("Hello, Dart Bytecode!");
+  }
 }
diff --git a/pkg/vm/testcases/bytecode/instance_creation.dart.expect b/pkg/vm/testcases/bytecode/instance_creation.dart.expect
index 7c6bf14..b79b398 100644
--- a/pkg/vm/testcases/bytecode/instance_creation.dart.expect
+++ b/pkg/vm/testcases/bytecode/instance_creation.dart.expect
@@ -1,12 +1,247 @@
-library #lib;
-import self as self;
-import "dart:core" as core;
-import "dart:_internal" as _in;
+main = #lib::main;
+ [@vm.bytecode=
+ComponentBytecodeMetadata {
 
-class Base<T1 extends core::Object = dynamic, T2 extends core::Object = dynamic> extends core::Object {
-  generic-covariant-impl field self::Base::T1 t1 = null;
-  generic-covariant-impl field self::Base::T2 t2 = null;
+Bytecode (version: stable)
+Main library: #lib
+
+}
+] [@vm.bytecode=
+MembersBytecodeMetadata {
+
+Members {
+
+Function 'foo1', static, reflectable, debuggable
+    parameters [] (required: 0)
+    return-type dynamic
+
+
+Bytecode {
+  Entry                1
+  CheckStack           0
+  Allocate             CP#0
+  StoreLocal           r0
+  Push                 r0
+  PushConstant         CP#1
+  DirectCall           2, CP#2
+  Drop1
+  ReturnTOS
+}
+ConstantPool {
+  [0] = Class #lib::C
+  [1] = ObjectRef 'hello'
+  [2] = DirectCall '#lib::C:: (constructor)', ArgDesc num-args 2, num-type-args 0, names []
+  [3] = Reserved
+}
+
+
+Function 'foo2', static, reflectable, debuggable
+    parameters [] (required: 0)
+    return-type void
+
+
+Bytecode {
+  Entry                1
+  CheckStack           0
+  PushConstant         CP#1
+  PushConstant         CP#0
+  AllocateT
+  StoreLocal           r0
+  Push                 r0
+  PushConstant         CP#2
+  DirectCall           2, CP#3
+  Drop1
+  Drop1
+  PushConstant         CP#6
+  PushConstant         CP#5
+  AllocateT
+  StoreLocal           r0
+  Push                 r0
+  DirectCall           1, CP#7
+  Drop1
+  Drop1
+  PushNull
+  ReturnTOS
+}
+ConstantPool {
+  [0] = Class #lib::A
+  [1] = ObjectRef < dart:core::int, dart:core::String >
+  [2] = ObjectRef 'hi'
+  [3] = DirectCall '#lib::A:: (constructor)', ArgDesc num-args 2, num-type-args 0, names []
+  [4] = Reserved
+  [5] = Class #lib::B
+  [6] = ObjectRef < dart:core::List < dart:core::int >, dart:core::String, dart:core::int >
+  [7] = DirectCall '#lib::B:: (constructor)', ArgDesc num-args 1, num-type-args 0, names []
+  [8] = Reserved
+}
+
+
+Function 'foo3', static, reflectable, debuggable
+    type-params <dart:core::Object T>
+    parameters [] (required: 0)
+    return-type void
+
+
+Bytecode {
+  Entry                2
+  CheckStack           0
+  CheckFunctionTypeArgs 1, r0
+  PushNull
+  Push                 r0
+  InstantiateTypeArgumentsTOS 0, CP#1
+  PushConstant         CP#0
+  AllocateT
+  StoreLocal           r1
+  Push                 r1
+  DirectCall           1, CP#2
+  Drop1
+  Drop1
+  PushNull
+  ReturnTOS
+}
+ConstantPool {
+  [0] = Class #lib::B
+  [1] = ObjectRef < dart:core::List < dart:core::List < #lib::foo3::TypeParam/0 > >, dart:core::String, dart:core::List < #lib::foo3::TypeParam/0 > >
+  [2] = DirectCall '#lib::B:: (constructor)', ArgDesc num-args 1, num-type-args 0, names []
+  [3] = Reserved
+}
+
+
+Function 'foo4', static, reflectable, debuggable
+    parameters [] (required: 0)
+    return-type void
+
+
+Bytecode {
+  Entry                0
+  CheckStack           0
+  PushConstant         CP#0
+  DirectCall           1, CP#1
+  Drop1
+  PushNull
+  ReturnTOS
+}
+ConstantPool {
+  [0] = ObjectRef < dart:core::int, dart:core::List < dart:core::String > >
+  [1] = DirectCall '#lib::G::test_factory (constructor)', ArgDesc num-args 1, num-type-args 0, names []
+  [2] = Reserved
+}
+
+
+Function 'foo5', static, reflectable, debuggable
+    parameters [] (required: 0)
+    return-type void
+
+
+Bytecode {
+  Entry                0
+  CheckStack           0
+  PushNull
+  DirectCall           1, CP#0
+  Drop1
+  PushNull
+  PushInt              42
+  DirectCall           2, CP#2
+  Drop1
+  PushNull
+  ReturnTOS
+}
+ConstantPool {
+  [0] = DirectCall '#lib::I::test_factory2 (constructor)', ArgDesc num-args 1, num-type-args 0, names []
+  [1] = Reserved
+  [2] = DirectCall '#lib::I::test_factory2 (constructor)', ArgDesc num-args 2, num-type-args 0, names ['param']
+  [3] = Reserved
+}
+
+
+Function 'foo6', static, reflectable, debuggable
+    parameters [] (required: 0)
+    return-type dynamic
+
+
+Bytecode {
+  Entry                0
+  CheckStack           0
+  PushConstant         CP#0
+  PushInt              0
+  DirectCall           2, CP#1
+  ReturnTOS
+}
+ConstantPool {
+  [0] = ObjectRef < dart:core::String >
+  [1] = DirectCall 'dart:core::_GrowableList:: (constructor)', ArgDesc num-args 2, num-type-args 0, names []
+  [2] = Reserved
+}
+
+
+Function 'foo7', static, reflectable, debuggable
+    parameters [dart:core::int 'n'] (required: 1)
+    return-type dynamic
+
+
+Bytecode {
+  Entry                0
+  CheckStack           0
+  PushConstant         CP#0
+  Push                 FP[-5]
+  DirectCall           2, CP#1
+  ReturnTOS
+}
+ConstantPool {
+  [0] = ObjectRef < dart:core::int >
+  [1] = DirectCall 'dart:core::_List:: (constructor)', ArgDesc num-args 2, num-type-args 0, names []
+  [2] = Reserved
+}
+
+
+Function 'main', static, reflectable, debuggable
+    parameters [] (required: 0)
+    return-type dynamic
+
+
+Bytecode {
+  Entry                0
+  CheckStack           0
+  DirectCall           0, CP#0
+  Drop1
+  DirectCall           0, CP#2
+  Drop1
+  PushConstant         CP#4
+  DirectCall           1, CP#5
+  Drop1
+  PushNull
+  ReturnTOS
+}
+ConstantPool {
+  [0] = DirectCall '#lib::foo1', ArgDesc num-args 0, num-type-args 0, names []
+  [1] = Reserved
+  [2] = DirectCall '#lib::foo2', ArgDesc num-args 0, num-type-args 0, names []
+  [3] = Reserved
+  [4] = ObjectRef < dart:core::String >
+  [5] = DirectCall '#lib::foo3', ArgDesc num-args 0, num-type-args 1, names []
+  [6] = Reserved
+}
+
+}
+
+}
+]library #lib from "#lib" as #lib {
+
 [@vm.bytecode=
+MembersBytecodeMetadata {
+
+Members {
+Field 't1', type = #lib::Base::TypeParam/0, getter = 'get:t1', setter = 'set:t1', reflectable
+    value = null
+
+Field 't2', type = #lib::Base::TypeParam/1, getter = 'get:t2', setter = 'set:t2', reflectable
+    value = null
+
+Function '', constructor, reflectable, debuggable
+    parameters [] (required: 0)
+    return-type #lib::Base < #lib::Base::TypeParam/0, #lib::Base::TypeParam/1 >
+
+
 Bytecode {
   Entry                1
   CheckStack           0
@@ -45,7 +280,7 @@
   PushNull
   ReturnTOS
 }
-Nullable fields: [#lib::Base::t1 (field), #lib::Base::t2 (field)]}
+Nullable fields: [#lib::Base::t1 (field), #lib::Base::t2 (field)]
 ConstantPool {
   [0] = DirectCall 'dart:core::Object:: (constructor)', ArgDesc num-args 1, num-type-args 0, names []
   [1] = Reserved
@@ -59,13 +294,28 @@
   [9] = DirectCall 'dart:core::print', ArgDesc num-args 1, num-type-args 0, names []
   [10] = Reserved
 }
-]  constructor •() → self::Base<self::Base::T1, self::Base::T2>
-    : super core::Object::•() {
-    core::print("Base: ${self::Base::T1}, ${self::Base::T2}");
-  }
+
 }
-class A extends self::Base<core::int, core::String> {
+
+}
+]  class Base<T1 extends dart.core::Object = dynamic, T2 extends dart.core::Object = dynamic> extends dart.core::Object {
+    generic-covariant-impl field #lib::Base::T1 t1 = null;
+    generic-covariant-impl field #lib::Base::T2 t2 = null;
+    constructor •() → #lib::Base<#lib::Base::T1, #lib::Base::T2>
+      : super dart.core::Object::•() {
+      dart.core::print("Base: ${#lib::Base::T1}, ${#lib::Base::T2}");
+    }
+  }
 [@vm.bytecode=
+MembersBytecodeMetadata {
+
+Members {
+
+Function '', constructor, reflectable, debuggable
+    parameters [dart:core::String 's'] (required: 1)
+    return-type #lib::A
+
+
 Bytecode {
   Entry                0
   CheckStack           0
@@ -79,12 +329,25 @@
   [0] = DirectCall '#lib::Base:: (constructor)', ArgDesc num-args 1, num-type-args 0, names []
   [1] = Reserved
 }
-]  constructor •(core::String s) → self::A
-    : super self::Base::•()
-    ;
+
 }
-class B<T extends core::Object = dynamic> extends self::Base<core::List<self::B::T>, core::String> {
+
+}
+]  class A extends #lib::Base<dart.core::int, dart.core::String> {
+    constructor •(dart.core::String s) → #lib::A
+      : super #lib::Base::•()
+      ;
+  }
 [@vm.bytecode=
+MembersBytecodeMetadata {
+
+Members {
+
+Function '', constructor, reflectable, debuggable
+    parameters [] (required: 0)
+    return-type #lib::B < dart:core::List < #lib::B::TypeParam/0 >, dart:core::String, #lib::B::TypeParam/0 >
+
+
 Bytecode {
   Entry                1
   CheckStack           0
@@ -123,13 +386,26 @@
   [7] = DirectCall 'dart:core::print', ArgDesc num-args 1, num-type-args 0, names []
   [8] = Reserved
 }
-]  constructor •() → self::B<self::B::T>
-    : super self::Base::•() {
-    core::print("B: ${self::B::T}");
-  }
+
 }
-class C extends core::Object {
+
+}
+]  class B<T extends dart.core::Object = dynamic> extends #lib::Base<dart.core::List<#lib::B::T>, dart.core::String> {
+    constructor •() → #lib::B<#lib::B::T>
+      : super #lib::Base::•() {
+      dart.core::print("B: ${#lib::B::T}");
+    }
+  }
 [@vm.bytecode=
+MembersBytecodeMetadata {
+
+Members {
+
+Function '', constructor, reflectable, debuggable
+    parameters [dart:core::String 's'] (required: 1)
+    return-type #lib::C
+
+
 Bytecode {
   Entry                1
   CheckStack           0
@@ -163,13 +439,26 @@
   [5] = DirectCall 'dart:core::print', ArgDesc num-args 1, num-type-args 0, names []
   [6] = Reserved
 }
-]  constructor •(core::String s) → self::C
-    : super core::Object::•() {
-    core::print("C: ${s}");
-  }
+
 }
-class E<K extends core::Object = dynamic, V extends core::Object = dynamic> extends core::Object {
+
+}
+]  class C extends dart.core::Object {
+    constructor •(dart.core::String s) → #lib::C
+      : super dart.core::Object::•() {
+      dart.core::print("C: ${s}");
+    }
+  }
 [@vm.bytecode=
+MembersBytecodeMetadata {
+
+Members {
+
+Function '', constructor, reflectable
+    parameters [] (required: 0)
+    return-type #lib::E < #lib::E::TypeParam/0, #lib::E::TypeParam/1 >
+
+
 Bytecode {
   Entry                0
   CheckStack           0
@@ -183,10 +472,13 @@
   [0] = DirectCall 'dart:core::Object:: (constructor)', ArgDesc num-args 1, num-type-args 0, names []
   [1] = Reserved
 }
-]  synthetic constructor •() → self::E<self::E::K, self::E::V>
-    : super core::Object::•()
-    ;
-[@vm.bytecode=
+
+
+Function 'test_reuse1', reflectable, debuggable
+    parameters [] (required: 0)
+    return-type dynamic
+
+
 Bytecode {
   Entry                0
   CheckStack           0
@@ -200,11 +492,27 @@
   [1] = DirectCall 'dart:core::Map:: (constructor)', ArgDesc num-args 1, num-type-args 0, names []
   [2] = Reserved
 }
-]  method test_reuse1() → dynamic
-    return core::Map::•<self::E::K, self::E::V>();
+
 }
-class F<K extends core::Object = dynamic, V extends core::Object = dynamic> extends self::E<core::String, core::List<self::F::V>> {
+
+}
+]  class E<K extends dart.core::Object = dynamic, V extends dart.core::Object = dynamic> extends dart.core::Object {
+    synthetic constructor •() → #lib::E<#lib::E::K, #lib::E::V>
+      : super dart.core::Object::•()
+      ;
+    method test_reuse1() → dynamic
+      return dart.core::Map::•<#lib::E::K, #lib::E::V>();
+  }
 [@vm.bytecode=
+MembersBytecodeMetadata {
+
+Members {
+
+Function '', constructor, reflectable
+    parameters [] (required: 0)
+    return-type #lib::F < dart:core::String, dart:core::List < #lib::F::TypeParam/1 >, #lib::F::TypeParam/0, #lib::F::TypeParam/1 >
+
+
 Bytecode {
   Entry                0
   CheckStack           0
@@ -218,10 +526,13 @@
   [0] = DirectCall '#lib::E:: (constructor)', ArgDesc num-args 1, num-type-args 0, names []
   [1] = Reserved
 }
-]  synthetic constructor •() → self::F<self::F::K, self::F::V>
-    : super self::E::•()
-    ;
-[@vm.bytecode=
+
+
+Function 'test_reuse2', reflectable, debuggable
+    parameters [] (required: 0)
+    return-type dynamic
+
+
 Bytecode {
   Entry                0
   CheckStack           0
@@ -235,11 +546,27 @@
   [1] = DirectCall 'dart:core::Map:: (constructor)', ArgDesc num-args 1, num-type-args 0, names []
   [2] = Reserved
 }
-]  method test_reuse2() → dynamic
-    return core::Map::•<core::String, core::List<self::F::V>>();
+
 }
-class G<K extends core::Object = dynamic, V extends core::Object = dynamic> extends core::Object {
+
+}
+]  class F<K extends dart.core::Object = dynamic, V extends dart.core::Object = dynamic> extends #lib::E<dart.core::String, dart.core::List<#lib::F::V>> {
+    synthetic constructor •() → #lib::F<#lib::F::K, #lib::F::V>
+      : super #lib::E::•()
+      ;
+    method test_reuse2() → dynamic
+      return dart.core::Map::•<dart.core::String, dart.core::List<#lib::F::V>>();
+  }
 [@vm.bytecode=
+MembersBytecodeMetadata {
+
+Members {
+
+Function '', constructor, reflectable, debuggable
+    parameters [] (required: 0)
+    return-type #lib::G < #lib::G::TypeParam/0, #lib::G::TypeParam/1 >
+
+
 Bytecode {
   Entry                0
   CheckStack           0
@@ -253,10 +580,14 @@
   [0] = DirectCall 'dart:core::Object:: (constructor)', ArgDesc num-args 1, num-type-args 0, names []
   [1] = Reserved
 }
-]  constructor •() → self::G<self::G::K, self::G::V>
-    : super core::Object::•()
-    ;
-[@vm.bytecode=
+
+
+Function 'test_factory', factory, static, reflectable, debuggable
+    type-params <dart:core::Object K, dart:core::Object V>
+    parameters [] (required: 0)
+    return-type #lib::G < #lib::G::test_factory (constructor)::TypeParam/0, #lib::G::test_factory (constructor)::TypeParam/1 >
+
+
 Bytecode {
   Entry                1
   CheckStack           0
@@ -277,11 +608,27 @@
   [2] = DirectCall '#lib::H:: (constructor)', ArgDesc num-args 1, num-type-args 0, names []
   [3] = Reserved
 }
-]  static factory test_factory<K extends core::Object = dynamic, V extends core::Object = dynamic>() → self::G<self::G::test_factory::K, self::G::test_factory::V>
-    return new self::H::•<core::String, self::G::test_factory::K, self::G::test_factory::V>();
+
 }
-class H<P1 extends core::Object = dynamic, P2 extends core::Object = dynamic, P3 extends core::Object = dynamic> extends self::G<self::H::P2, self::H::P3> {
+
+}
+]  class G<K extends dart.core::Object = dynamic, V extends dart.core::Object = dynamic> extends dart.core::Object {
+    constructor •() → #lib::G<#lib::G::K, #lib::G::V>
+      : super dart.core::Object::•()
+      ;
+    static factory test_factory<K extends dart.core::Object = dynamic, V extends dart.core::Object = dynamic>() → #lib::G<#lib::G::test_factory::K, #lib::G::test_factory::V>
+      return new #lib::H::•<dart.core::String, #lib::G::test_factory::K, #lib::G::test_factory::V>();
+  }
 [@vm.bytecode=
+MembersBytecodeMetadata {
+
+Members {
+
+Function '', constructor, reflectable
+    parameters [] (required: 0)
+    return-type #lib::H < #lib::H::TypeParam/1, #lib::H::TypeParam/2, #lib::H::TypeParam/0, #lib::H::TypeParam/1, #lib::H::TypeParam/2 >
+
+
 Bytecode {
   Entry                0
   CheckStack           0
@@ -295,12 +642,25 @@
   [0] = DirectCall '#lib::G:: (constructor)', ArgDesc num-args 1, num-type-args 0, names []
   [1] = Reserved
 }
-]  synthetic constructor •() → self::H<self::H::P1, self::H::P2, self::H::P3>
-    : super self::G::•()
-    ;
+
 }
-class I extends core::Object {
+
+}
+]  class H<P1 extends dart.core::Object = dynamic, P2 extends dart.core::Object = dynamic, P3 extends dart.core::Object = dynamic> extends #lib::G<#lib::H::P2, #lib::H::P3> {
+    synthetic constructor •() → #lib::H<#lib::H::P1, #lib::H::P2, #lib::H::P3>
+      : super #lib::G::•()
+      ;
+  }
 [@vm.bytecode=
+MembersBytecodeMetadata {
+
+Members {
+
+Function '', constructor, reflectable, debuggable
+    parameters [dynamic 'param'] (required: 1)
+    return-type #lib::I
+
+
 Bytecode {
   Entry                0
   CheckStack           0
@@ -314,10 +674,13 @@
   [0] = DirectCall 'dart:core::Object:: (constructor)', ArgDesc num-args 1, num-type-args 0, names []
   [1] = Reserved
 }
-]  constructor •(dynamic param) → self::I
-    : super core::Object::•()
-    ;
-[@vm.bytecode=
+
+
+Function 'test_factory2', factory, static, has-optional-named-params, reflectable, debuggable
+    parameters [dynamic 'param'] (required: 0)
+    return-type #lib::I
+
+
 Bytecode {
   EntryOptional        1, 0, 1
   LoadConstant         r1, CP#0
@@ -339,11 +702,27 @@
   [3] = DirectCall '#lib::I:: (constructor)', ArgDesc num-args 2, num-type-args 0, names []
   [4] = Reserved
 }
-]  static factory test_factory2({dynamic param = null}) → self::I
-    return new self::I::•(param);
+
 }
-class J extends core::Object {
+
+}
+]  class I extends dart.core::Object {
+    constructor •(dynamic param) → #lib::I
+      : super dart.core::Object::•()
+      ;
+    static factory test_factory2({dynamic param = null}) → #lib::I
+      return new #lib::I::•(param);
+  }
 [@vm.bytecode=
+MembersBytecodeMetadata {
+
+Members {
+
+Function '', factory, static, reflectable, debuggable, native 'agent_J'
+    parameters [] (required: 0)
+    return-type #lib::J
+
+
 Bytecode {
   Entry                0
   CheckStack           0
@@ -354,11 +733,25 @@
 ConstantPool {
   [0] = NativeEntry agent_J
 }
-]  @_in::ExternalName::•("agent_J")
-  external static factory •() → self::J;
+
 }
-abstract class K<A extends core::Object = dynamic, B extends core::Object = dynamic> extends core::Object {
+
+}
+]  class J extends dart.core::Object {
+    @dart._internal::ExternalName::•("agent_J")
+    external static factory •() → #lib::J;
+  }
 [@vm.bytecode=
+MembersBytecodeMetadata {
+
+Members {
+
+Function '', factory, static, reflectable, debuggable
+    type-params <dart:core::Object A, dart:core::Object B>
+    parameters [] (required: 0)
+    return-type #lib::K < #lib::K:: (constructor)::TypeParam/0, #lib::K:: (constructor)::TypeParam/1 >
+
+
 Bytecode {
   Entry                1
   CheckStack           0
@@ -376,11 +769,24 @@
   [1] = DirectCall '#lib::TestTypeArgReuse:: (constructor)', ArgDesc num-args 1, num-type-args 0, names []
   [2] = Reserved
 }
-]  static factory •<A extends core::Object = dynamic, B extends core::Object = dynamic>() → self::K<self::K::•::A, self::K::•::B>
-    return new self::TestTypeArgReuse::•<self::K::•::A, self::K::•::B>();
+
 }
-class TestTypeArgReuse<P extends core::Object = dynamic, Q extends core::Object = dynamic> extends self::Base<self::TestTypeArgReuse::P, self::TestTypeArgReuse::Q> implements self::K<self::TestTypeArgReuse::P, self::TestTypeArgReuse::Q> {
+
+}
+]  abstract class K<A extends dart.core::Object = dynamic, B extends dart.core::Object = dynamic> extends dart.core::Object {
+    static factory •<A extends dart.core::Object = dynamic, B extends dart.core::Object = dynamic>() → #lib::K<#lib::K::•::A, #lib::K::•::B>
+      return new #lib::TestTypeArgReuse::•<#lib::K::•::A, #lib::K::•::B>();
+  }
 [@vm.bytecode=
+MembersBytecodeMetadata {
+
+Members {
+
+Function '', constructor, reflectable
+    parameters [] (required: 0)
+    return-type #lib::TestTypeArgReuse < #lib::TestTypeArgReuse::TypeParam/0, #lib::TestTypeArgReuse::TypeParam/1 >
+
+
 Bytecode {
   Entry                0
   CheckStack           0
@@ -394,195 +800,38 @@
   [0] = DirectCall '#lib::Base:: (constructor)', ArgDesc num-args 1, num-type-args 0, names []
   [1] = Reserved
 }
-]  synthetic constructor •() → self::TestTypeArgReuse<self::TestTypeArgReuse::P, self::TestTypeArgReuse::Q>
-    : super self::Base::•()
-    ;
+
 }
-[@vm.bytecode=
-Bytecode {
-  Entry                1
-  CheckStack           0
-  Allocate             CP#0
-  StoreLocal           r0
-  Push                 r0
-  PushConstant         CP#1
-  DirectCall           2, CP#2
-  Drop1
-  ReturnTOS
+
 }
-ConstantPool {
-  [0] = Class #lib::C
-  [1] = ObjectRef 'hello'
-  [2] = DirectCall '#lib::C:: (constructor)', ArgDesc num-args 2, num-type-args 0, names []
-  [3] = Reserved
-}
-]static method foo1() → dynamic
-  return new self::C::•("hello");
-[@vm.bytecode=
-Bytecode {
-  Entry                1
-  CheckStack           0
-  PushConstant         CP#1
-  PushConstant         CP#0
-  AllocateT
-  StoreLocal           r0
-  Push                 r0
-  PushConstant         CP#2
-  DirectCall           2, CP#3
-  Drop1
-  Drop1
-  PushConstant         CP#6
-  PushConstant         CP#5
-  AllocateT
-  StoreLocal           r0
-  Push                 r0
-  DirectCall           1, CP#7
-  Drop1
-  Drop1
-  PushNull
-  ReturnTOS
-}
-ConstantPool {
-  [0] = Class #lib::A
-  [1] = ObjectRef < dart:core::int, dart:core::String >
-  [2] = ObjectRef 'hi'
-  [3] = DirectCall '#lib::A:: (constructor)', ArgDesc num-args 2, num-type-args 0, names []
-  [4] = Reserved
-  [5] = Class #lib::B
-  [6] = ObjectRef < dart:core::List < dart:core::int >, dart:core::String, dart:core::int >
-  [7] = DirectCall '#lib::B:: (constructor)', ArgDesc num-args 1, num-type-args 0, names []
-  [8] = Reserved
-}
-]static method foo2() → void {
-  new self::A::•("hi");
-  new self::B::•<core::int>();
-}
-[@vm.bytecode=
-Bytecode {
-  Entry                2
-  CheckStack           0
-  CheckFunctionTypeArgs 1, r0
-  PushNull
-  Push                 r0
-  InstantiateTypeArgumentsTOS 0, CP#1
-  PushConstant         CP#0
-  AllocateT
-  StoreLocal           r1
-  Push                 r1
-  DirectCall           1, CP#2
-  Drop1
-  Drop1
-  PushNull
-  ReturnTOS
-}
-ConstantPool {
-  [0] = Class #lib::B
-  [1] = ObjectRef < dart:core::List < dart:core::List < #lib::foo3::TypeParam/0 > >, dart:core::String, dart:core::List < #lib::foo3::TypeParam/0 > >
-  [2] = DirectCall '#lib::B:: (constructor)', ArgDesc num-args 1, num-type-args 0, names []
-  [3] = Reserved
-}
-]static method foo3<T extends core::Object = dynamic>() → void {
-  new self::B::•<core::List<self::foo3::T>>();
-}
-[@vm.bytecode=
-Bytecode {
-  Entry                0
-  CheckStack           0
-  PushConstant         CP#0
-  DirectCall           1, CP#1
-  Drop1
-  PushNull
-  ReturnTOS
-}
-ConstantPool {
-  [0] = ObjectRef < dart:core::int, dart:core::List < dart:core::String > >
-  [1] = DirectCall '#lib::G::test_factory (constructor)', ArgDesc num-args 1, num-type-args 0, names []
-  [2] = Reserved
-}
-]static method foo4() → void {
-  self::G::test_factory<core::int, core::List<core::String>>();
-}
-[@vm.bytecode=
-Bytecode {
-  Entry                0
-  CheckStack           0
-  PushNull
-  DirectCall           1, CP#0
-  Drop1
-  PushNull
-  PushInt              42
-  DirectCall           2, CP#2
-  Drop1
-  PushNull
-  ReturnTOS
-}
-ConstantPool {
-  [0] = DirectCall '#lib::I::test_factory2 (constructor)', ArgDesc num-args 1, num-type-args 0, names []
-  [1] = Reserved
-  [2] = DirectCall '#lib::I::test_factory2 (constructor)', ArgDesc num-args 2, num-type-args 0, names ['param']
-  [3] = Reserved
-}
-]static method foo5() → void {
-  self::I::test_factory2();
-  self::I::test_factory2(param: 42);
-}
-[@vm.bytecode=
-Bytecode {
-  Entry                0
-  CheckStack           0
-  PushConstant         CP#0
-  PushInt              0
-  DirectCall           2, CP#1
-  ReturnTOS
-}
-ConstantPool {
-  [0] = ObjectRef < dart:core::String >
-  [1] = DirectCall 'dart:core::_GrowableList:: (constructor)', ArgDesc num-args 2, num-type-args 0, names []
-  [2] = Reserved
-}
-]static method foo6() → dynamic
-  return core::_GrowableList::•<core::String>(0);
-[@vm.bytecode=
-Bytecode {
-  Entry                0
-  CheckStack           0
-  PushConstant         CP#0
-  Push                 FP[-5]
-  DirectCall           2, CP#1
-  ReturnTOS
-}
-ConstantPool {
-  [0] = ObjectRef < dart:core::int >
-  [1] = DirectCall 'dart:core::_List:: (constructor)', ArgDesc num-args 2, num-type-args 0, names []
-  [2] = Reserved
-}
-]static method foo7(core::int n) → dynamic
-  return core::_List::•<core::int>(n);
-[@vm.bytecode=
-Bytecode {
-  Entry                0
-  CheckStack           0
-  DirectCall           0, CP#0
-  Drop1
-  DirectCall           0, CP#2
-  Drop1
-  PushConstant         CP#4
-  DirectCall           1, CP#5
-  Drop1
-  PushNull
-  ReturnTOS
-}
-ConstantPool {
-  [0] = DirectCall '#lib::foo1', ArgDesc num-args 0, num-type-args 0, names []
-  [1] = Reserved
-  [2] = DirectCall '#lib::foo2', ArgDesc num-args 0, num-type-args 0, names []
-  [3] = Reserved
-  [4] = ObjectRef < dart:core::String >
-  [5] = DirectCall '#lib::foo3', ArgDesc num-args 0, num-type-args 1, names []
-  [6] = Reserved
-}
-]static method main() → dynamic {
-  self::foo1();
-  self::foo2();
-  self::foo3<core::String>();
+]  class TestTypeArgReuse<P extends dart.core::Object = dynamic, Q extends dart.core::Object = dynamic> extends #lib::Base<#lib::TestTypeArgReuse::P, #lib::TestTypeArgReuse::Q> implements #lib::K<#lib::TestTypeArgReuse::P, #lib::TestTypeArgReuse::Q> {
+    synthetic constructor •() → #lib::TestTypeArgReuse<#lib::TestTypeArgReuse::P, #lib::TestTypeArgReuse::Q>
+      : super #lib::Base::•()
+      ;
+  }
+  static method foo1() → dynamic
+    return new #lib::C::•("hello");
+  static method foo2() → void {
+    new #lib::A::•("hi");
+    new #lib::B::•<dart.core::int>();
+  }
+  static method foo3<T extends dart.core::Object = dynamic>() → void {
+    new #lib::B::•<dart.core::List<#lib::foo3::T>>();
+  }
+  static method foo4() → void {
+    #lib::G::test_factory<dart.core::int, dart.core::List<dart.core::String>>();
+  }
+  static method foo5() → void {
+    #lib::I::test_factory2();
+    #lib::I::test_factory2(param: 42);
+  }
+  static method foo6() → dynamic
+    return dart.core::_GrowableList::•<dart.core::String>(0);
+  static method foo7(dart.core::int n) → dynamic
+    return dart.core::_List::•<dart.core::int>(n);
+  static method main() → dynamic {
+    #lib::foo1();
+    #lib::foo2();
+    #lib::foo3<dart.core::String>();
+  }
 }
diff --git a/pkg/vm/testcases/bytecode/literals.dart.expect b/pkg/vm/testcases/bytecode/literals.dart.expect
index bef20c6..bc4b45d 100644
--- a/pkg/vm/testcases/bytecode/literals.dart.expect
+++ b/pkg/vm/testcases/bytecode/literals.dart.expect
@@ -1,45 +1,17 @@
-library #lib;
-import self as self;
-import "dart:core" as core;
+main = #lib::main;
+ [@vm.bytecode=
+ComponentBytecodeMetadata {
 
-typedef GenericFunctionType = <X extends core::Object = dynamic>(X) → X;
-class A extends core::Object {
-  final field core::int index;
-  final field core::String _name;
-[@vm.bytecode=
-Bytecode {
-  Entry                0
-  CheckStack           0
-  PushConstant         CP#0
-  ReturnTOS
+Bytecode (version: stable)
+Main library: #lib
+
 }
-ConstantPool {
-  [0] = ObjectRef const <#lib::A> [const #lib::A {#lib::A::index (field): const 0, #lib::A::_name (field): 'A.elem1'}, const #lib::A {#lib::A::index (field): const 1, #lib::A::_name (field): 'A.elem2'}, const #lib::A {#lib::A::index (field): const 2, #lib::A::_name (field): 'A.elem3'}, const #lib::A {#lib::A::index (field): const 3, #lib::A::_name (field): 'A.elem4'}]
-}
-]  static const field core::List<self::A> values = const <self::A>[self::A::elem1, self::A::elem2, self::A::elem3, self::A::elem4];
-[@vm.bytecode=
-Bytecode {
-  Entry                0
-  CheckStack           0
-  PushConstant         CP#0
-  ReturnTOS
-}
-ConstantPool {
-  [0] = ObjectRef const #lib::A {#lib::A::index (field): const 0, #lib::A::_name (field): 'A.elem1'}
-}
-]  static const field self::A elem1 = const self::A::•(0, "A.elem1");
-[@vm.bytecode=
-Bytecode {
-  Entry                0
-  CheckStack           0
-  PushConstant         CP#0
-  ReturnTOS
-}
-ConstantPool {
-  [0] = ObjectRef const #lib::A {#lib::A::index (field): const 1, #lib::A::_name (field): 'A.elem2'}
-}
-]  static const field self::A elem2 = const self::A::•(1, "A.elem2");
-[@vm.bytecode=
+] [@vm.bytecode=
+MembersBytecodeMetadata {
+
+Members {
+Field 'c1', type = #lib::A, getter = 'get:c1', reflectable, static, const, final
+    initializer 
 Bytecode {
   Entry                0
   CheckStack           0
@@ -49,210 +21,16 @@
 ConstantPool {
   [0] = ObjectRef const #lib::A {#lib::A::index (field): const 2, #lib::A::_name (field): 'A.elem3'}
 }
-]  static const field self::A elem3 = const self::A::•(2, "A.elem3");
-[@vm.bytecode=
-Bytecode {
-  Entry                0
-  CheckStack           0
-  PushConstant         CP#0
-  ReturnTOS
-}
-ConstantPool {
-  [0] = ObjectRef const #lib::A {#lib::A::index (field): const 3, #lib::A::_name (field): 'A.elem4'}
-}
-]  static const field self::A elem4 = const self::A::•(3, "A.elem4");
-[@vm.bytecode=
-Bytecode {
-  Entry                0
-  CheckStack           0
-  Push                 FP[-7]
-  Push                 FP[-6]
-  StoreFieldTOS        CP#0
-  Push                 FP[-7]
-  Push                 FP[-5]
-  StoreFieldTOS        CP#2
-  Push                 FP[-7]
-  DirectCall           1, CP#4
-  Drop1
-  PushNull
-  ReturnTOS
-}
-ConstantPool {
-  [0] = InstanceField #lib::A::index (field)
-  [1] = Reserved
-  [2] = InstanceField #lib::A::_name (field)
-  [3] = Reserved
-  [4] = DirectCall 'dart:core::Object:: (constructor)', ArgDesc num-args 1, num-type-args 0, names []
-  [5] = Reserved
-}
-]  const constructor •(core::int index, core::String _name) → self::A
-    : self::A::index = index, self::A::_name = _name, super core::Object::•()
-    ;
-[@vm.bytecode=
-Bytecode {
-  Entry                0
-  CheckStack           0
-  Push                 FP[-5]
-  DirectCall           1, CP#0
-  ReturnTOS
-}
-ConstantPool {
-  [0] = DirectCall '#lib::A::get:_name', ArgDesc num-args 1, num-type-args 0, names []
-  [1] = Reserved
-}
-]  method toString() → core::String
-    return this.{=self::A::_name};
-}
-class B extends core::Object {
-  final field core::int i;
-[@vm.bytecode=
-Bytecode {
-  Entry                0
-  CheckStack           0
-  Push                 FP[-6]
-  Push                 FP[-5]
-  StoreFieldTOS        CP#0
-  Push                 FP[-6]
-  DirectCall           1, CP#2
-  Drop1
-  PushNull
-  ReturnTOS
-}
-ConstantPool {
-  [0] = InstanceField #lib::B::i (field)
-  [1] = Reserved
-  [2] = DirectCall 'dart:core::Object:: (constructor)', ArgDesc num-args 1, num-type-args 0, names []
-  [3] = Reserved
-}
-]  const constructor •(core::int i) → self::B
-    : self::B::i = i, super core::Object::•()
-    ;
-}
-class C extends self::B {
-  final field core::int j;
-[@vm.bytecode=
-Bytecode {
-  Entry                0
-  CheckStack           0
-  Push                 FP[-8]
-  Push                 FP[-7]
-  Push                 FP[-6]
-  AddInt
-  StoreFieldTOS        CP#0
-  Push                 FP[-8]
-  Push                 FP[-5]
-  PushInt              5
-  MulInt
-  DirectCall           2, CP#2
-  Drop1
-  PushNull
-  ReturnTOS
-}
-ConstantPool {
-  [0] = InstanceField #lib::C::j (field)
-  [1] = Reserved
-  [2] = DirectCall '#lib::B:: (constructor)', ArgDesc num-args 2, num-type-args 0, names []
-  [3] = Reserved
-}
-]  const constructor •(core::int a, core::int b, core::int c) → self::C
-    : self::C::j = a.{core::num::+}(b), super self::B::•(c.{core::num::*}(5))
-    ;
-}
-class D extends core::Object {
-  final field dynamic x;
-  final field dynamic y;
-[@vm.bytecode=
-Bytecode {
-  EntryOptional        2, 1, 0
-  LoadConstant         r2, CP#0
-  Frame                0
-  CheckStack           0
-  Push                 r0
-  Push                 r1
-  StoreFieldTOS        CP#1
-  Push                 r0
-  Push                 r2
-  StoreFieldTOS        CP#3
-  Push                 r0
-  DirectCall           1, CP#5
-  Drop1
-  PushNull
-  ReturnTOS
-}
-ConstantPool {
-  [0] = ObjectRef null
-  [1] = InstanceField #lib::D::x (field)
-  [2] = Reserved
-  [3] = InstanceField #lib::D::y (field)
-  [4] = Reserved
-  [5] = DirectCall 'dart:core::Object:: (constructor)', ArgDesc num-args 1, num-type-args 0, names []
-  [6] = Reserved
-}
-]  const constructor •(dynamic x, [dynamic y = null]) → self::D
-    : self::D::x = x, self::D::y = y, super core::Object::•()
-    ;
-}
-class E<T extends core::Object = dynamic> extends core::Object {
-[@vm.bytecode=
-Bytecode {
-  Entry                0
-  CheckStack           0
-  Push                 FP[-5]
-  DirectCall           1, CP#0
-  Drop1
-  PushNull
-  ReturnTOS
-}
-ConstantPool {
-  [0] = DirectCall 'dart:core::Object:: (constructor)', ArgDesc num-args 1, num-type-args 0, names []
-  [1] = Reserved
-}
-]  const constructor •() → self::E<self::E::T>
-    : super core::Object::•()
-    ;
-}
-class F<P extends core::Object = dynamic, Q extends core::Object = dynamic> extends self::E<core::Map<self::F::P, self::F::Q>> {
-[@vm.bytecode=
-Bytecode {
-  Entry                0
-  CheckStack           0
-  Push                 FP[-5]
-  DirectCall           1, CP#0
-  Drop1
-  PushNull
-  ReturnTOS
-}
-ConstantPool {
-  [0] = DirectCall '#lib::E:: (constructor)', ArgDesc num-args 1, num-type-args 0, names []
-  [1] = Reserved
-}
-]  const constructor •() → self::F<self::F::P, self::F::Q>
-    : super self::E::•()
-    ;
-}
-[@vm.bytecode=
-Bytecode {
-  Entry                0
-  CheckStack           0
-  PushConstant         CP#0
-  ReturnTOS
-}
-ConstantPool {
-  [0] = ObjectRef const #lib::A {#lib::A::index (field): const 2, #lib::A::_name (field): 'A.elem3'}
-}
-]static const field self::A c1 = self::A::elem3;
-static const field core::String c2 = "hello!";
-[@vm.bytecode=
-Bytecode {
-  Entry                0
-  CheckStack           0
-  PushInt              6
-  ReturnTOS
-}
-ConstantPool {
-}
-]static const field core::int c3 = self::c2.{core::String::length};
-[@vm.bytecode=
+
+
+Field 'c2', type = dart:core::String, reflectable, static, const, final
+    value = 'hello!'
+
+Field 'c3', type = dart:core::int, reflectable, static, const, final
+    value = const 6
+
+Field 'c4', type = #lib::C, getter = 'get:c4', reflectable, static, const, final
+    initializer 
 Bytecode {
   Entry                0
   CheckStack           0
@@ -262,8 +40,10 @@
 ConstantPool {
   [0] = ObjectRef const #lib::C {#lib::C::j (field): const 3, #lib::B::i (field): const 15}
 }
-]static const field self::C c4 = const self::C::•(1, 2, 3);
-[@vm.bytecode=
+
+
+Field 'c5', type = #lib::D, getter = 'get:c5', reflectable, static, const, final
+    initializer 
 Bytecode {
   Entry                0
   CheckStack           0
@@ -273,9 +53,16 @@
 ConstantPool {
   [0] = ObjectRef const #lib::D {#lib::D::x (field): const #lib::B {#lib::B::i (field): const 4}, #lib::D::y (field): null}
 }
-]static const field self::D c5 = const self::D::•(const self::B::•(4));
-static field core::double fieldWithDoubleLiteralInitializer = 1.0;
-[@vm.bytecode=
+
+
+Field 'fieldWithDoubleLiteralInitializer', type = dart:core::double, reflectable, static
+    value = const 1.0
+
+Function 'test_constants1', static, reflectable, debuggable
+    parameters [] (required: 0)
+    return-type void
+
+
 Bytecode {
   Entry                0
   CheckStack           0
@@ -305,14 +92,13 @@
   [4] = ObjectRef const #lib::C {#lib::C::j (field): const 3, #lib::B::i (field): const 15}
   [5] = ObjectRef const #lib::D {#lib::D::x (field): const #lib::B {#lib::B::i (field): const 4}, #lib::D::y (field): null}
 }
-]static method test_constants1() → void {
-  core::print(self::c1);
-  core::print(self::c2);
-  core::print(self::c3);
-  core::print(self::c4);
-  core::print(self::c5);
-}
-[@vm.bytecode=
+
+
+Function 'test_constants2', static, reflectable, debuggable
+    parameters [] (required: 0)
+    return-type void
+
+
 Bytecode {
   Entry                0
   CheckStack           0
@@ -346,15 +132,13 @@
   [5] = ObjectRef const dart:core::_ImmutableMap < dart:core::String, #lib::A > {dart:core::_ImmutableMap::_kvPairs (field): const <dynamic> ['E2', const #lib::A {#lib::A::index (field): const 1, #lib::A::_name (field): 'A.elem2'}, 'E4', const #lib::A {#lib::A::index (field): const 3, #lib::A::_name (field): 'A.elem4'}]}
   [6] = ObjectRef const #lib::D {#lib::D::x (field): const #lib::C {#lib::C::j (field): const 9, #lib::B::i (field): const 30}, #lib::D::y (field): const dart:core::_ImmutableMap < dart:core::String, dart:core::Object > {dart:core::_ImmutableMap::_kvPairs (field): const <dynamic> ['foo', const 42, 'bar', const #lib::B {#lib::B::i (field): const 6}]}}
 }
-]static method test_constants2() → void {
-  core::print(42);
-  core::print("foo");
-  core::print(self::A::elem2);
-  core::print(const <core::Object>[42, "foo", core::int]);
-  core::print(const <core::String, self::A>{"E2": self::A::elem2, "E4": self::A::elem4});
-  core::print(const self::D::•(const self::C::•(4, 5, 6), const <core::String, core::Object>{"foo": 42, "bar": const self::B::•(self::c2.{core::String::length})}));
-}
-[@vm.bytecode=
+
+
+Function 'test_list_literal', static, reflectable, debuggable
+    parameters [dart:core::int 'a'] (required: 1)
+    return-type void
+
+
 Bytecode {
   Entry                1
   CheckStack           0
@@ -416,11 +200,14 @@
   [8] = Reserved
   [9] = ObjectRef 'b'
 }
-]static method test_list_literal(core::int a) → void {
-  core::print(<core::int>[1, a, 3]);
-  core::print(<core::String>["a", a.{core::int::toString}(), "b"]);
-}
-[@vm.bytecode=
+
+
+Function 'test_map_literal', static, reflectable, debuggable
+    type-params <dart:core::Object T>
+    parameters [dart:core::int 'a', dart:core::int 'b', #lib::test_map_literal::TypeParam/0 'c'] (required: 3)
+    return-type void
+
+
 Bytecode {
   Entry                2
   CheckStack           0
@@ -517,13 +304,13 @@
   [11] = ObjectRef const <dynamic> []
   [12] = ObjectRef < #lib::test_map_literal::TypeParam/0, dart:core::int >
 }
-]static method test_map_literal<T extends core::Object = dynamic>(core::int a, core::int b, self::test_map_literal::T c) → void {
-  core::print(<core::int, core::int>{1: a, b: 2});
-  core::print(<core::String, core::int>{"foo": a, b.{core::int::toString}(): 3});
-  core::print(<core::String, self::test_map_literal::T>{});
-  core::print(<self::test_map_literal::T, core::int>{c: 4});
-}
-[@vm.bytecode=
+
+
+Function 'test_symbol', static, reflectable, debuggable
+    parameters [] (required: 0)
+    return-type void
+
+
 Bytecode {
   Entry                0
   CheckStack           0
@@ -542,11 +329,14 @@
   [2] = Reserved
   [3] = ObjectRef const '_private_symbol'
 }
-]static method test_symbol() → void {
-  core::print(#test_symbol);
-  core::print(#_private_symbol);
-}
-[@vm.bytecode=
+
+
+Function 'test_type_literal', static, reflectable, debuggable
+    type-params <dart:core::Object T>
+    parameters [] (required: 0)
+    return-type void
+
+
 Bytecode {
   Entry                1
   CheckStack           0
@@ -568,11 +358,13 @@
   [2] = Reserved
   [3] = Type #lib::test_type_literal::TypeParam/0
 }
-]static method test_type_literal<T extends core::Object = dynamic>() → void {
-  core::print(core::String);
-  core::print(self::test_type_literal::T);
-}
-[@vm.bytecode=
+
+
+Function 'testGenericConstInstance', static, reflectable, debuggable
+    parameters [] (required: 0)
+    return-type dynamic
+
+
 Bytecode {
   Entry                0
   CheckStack           0
@@ -582,9 +374,13 @@
 ConstantPool {
   [0] = ObjectRef const #lib::F < dart:core::Map < dart:core::int, dart:core::String >, dart:core::int, dart:core::String > {}
 }
-]static method testGenericConstInstance() → dynamic
-  return const self::F::•<core::int, core::String>();
-[@vm.bytecode=
+
+
+Function 'testGenericFunctionTypeLiteral', static, reflectable, debuggable
+    parameters [] (required: 0)
+    return-type dynamic
+
+
 Bytecode {
   Entry                0
   CheckStack           0
@@ -594,9 +390,13 @@
 ConstantPool {
   [0] = Type FunctionType <dart:core::Object X> (null::TypeParam/0) -> null::TypeParam/0
 }
-]static method testGenericFunctionTypeLiteral() → dynamic
-  return <X extends core::Object = dynamic>(X) → X;
-[@vm.bytecode=
+
+
+Function 'testFieldWithDoubleLiteralInitializer', static, reflectable, debuggable
+    parameters [] (required: 0)
+    return-type dynamic
+
+
 Bytecode {
   Entry                0
   CheckStack           0
@@ -607,9 +407,13 @@
 ConstantPool {
   [0] = StaticField #lib::fieldWithDoubleLiteralInitializer (field)
 }
-]static method testFieldWithDoubleLiteralInitializer() → dynamic
-  return self::fieldWithDoubleLiteralInitializer;
-[@vm.bytecode=
+
+
+Function 'main', static, reflectable, debuggable
+    parameters [] (required: 0)
+    return-type dynamic
+
+
 Bytecode {
   Entry                0
   CheckStack           0
@@ -618,4 +422,397 @@
 }
 ConstantPool {
 }
-]static method main() → dynamic {}
+
+}
+
+}
+]library #lib from "#lib" as #lib {
+
+  typedef GenericFunctionType = <X extends dart.core::Object = dynamic>(X) → X;
+[@vm.bytecode=
+MembersBytecodeMetadata {
+
+Members {
+Field 'index', type = dart:core::int, getter = 'get:index', reflectable, final
+    value = null
+
+Field '_name', type = dart:core::String, getter = 'get:_name', reflectable, final
+    value = null
+
+Field 'values', type = dart:core::List < #lib::A >, getter = 'get:values', reflectable, static, const, final
+    initializer 
+Bytecode {
+  Entry                0
+  CheckStack           0
+  PushConstant         CP#0
+  ReturnTOS
+}
+ConstantPool {
+  [0] = ObjectRef const <#lib::A> [const #lib::A {#lib::A::index (field): const 0, #lib::A::_name (field): 'A.elem1'}, const #lib::A {#lib::A::index (field): const 1, #lib::A::_name (field): 'A.elem2'}, const #lib::A {#lib::A::index (field): const 2, #lib::A::_name (field): 'A.elem3'}, const #lib::A {#lib::A::index (field): const 3, #lib::A::_name (field): 'A.elem4'}]
+}
+
+
+Field 'elem1', type = #lib::A, getter = 'get:elem1', reflectable, static, const, final
+    initializer 
+Bytecode {
+  Entry                0
+  CheckStack           0
+  PushConstant         CP#0
+  ReturnTOS
+}
+ConstantPool {
+  [0] = ObjectRef const #lib::A {#lib::A::index (field): const 0, #lib::A::_name (field): 'A.elem1'}
+}
+
+
+Field 'elem2', type = #lib::A, getter = 'get:elem2', reflectable, static, const, final
+    initializer 
+Bytecode {
+  Entry                0
+  CheckStack           0
+  PushConstant         CP#0
+  ReturnTOS
+}
+ConstantPool {
+  [0] = ObjectRef const #lib::A {#lib::A::index (field): const 1, #lib::A::_name (field): 'A.elem2'}
+}
+
+
+Field 'elem3', type = #lib::A, getter = 'get:elem3', reflectable, static, const, final
+    initializer 
+Bytecode {
+  Entry                0
+  CheckStack           0
+  PushConstant         CP#0
+  ReturnTOS
+}
+ConstantPool {
+  [0] = ObjectRef const #lib::A {#lib::A::index (field): const 2, #lib::A::_name (field): 'A.elem3'}
+}
+
+
+Field 'elem4', type = #lib::A, getter = 'get:elem4', reflectable, static, const, final
+    initializer 
+Bytecode {
+  Entry                0
+  CheckStack           0
+  PushConstant         CP#0
+  ReturnTOS
+}
+ConstantPool {
+  [0] = ObjectRef const #lib::A {#lib::A::index (field): const 3, #lib::A::_name (field): 'A.elem4'}
+}
+
+
+Function '', constructor, const, reflectable, debuggable
+    parameters [dart:core::int 'index', dart:core::String '_name'] (required: 2)
+    return-type #lib::A
+
+
+Bytecode {
+  Entry                0
+  CheckStack           0
+  Push                 FP[-7]
+  Push                 FP[-6]
+  StoreFieldTOS        CP#0
+  Push                 FP[-7]
+  Push                 FP[-5]
+  StoreFieldTOS        CP#2
+  Push                 FP[-7]
+  DirectCall           1, CP#4
+  Drop1
+  PushNull
+  ReturnTOS
+}
+ConstantPool {
+  [0] = InstanceField #lib::A::index (field)
+  [1] = Reserved
+  [2] = InstanceField #lib::A::_name (field)
+  [3] = Reserved
+  [4] = DirectCall 'dart:core::Object:: (constructor)', ArgDesc num-args 1, num-type-args 0, names []
+  [5] = Reserved
+}
+
+
+Function 'toString', reflectable, debuggable
+    parameters [] (required: 0)
+    return-type dart:core::String
+
+
+Bytecode {
+  Entry                0
+  CheckStack           0
+  Push                 FP[-5]
+  DirectCall           1, CP#0
+  ReturnTOS
+}
+ConstantPool {
+  [0] = DirectCall '#lib::A::get:_name', ArgDesc num-args 1, num-type-args 0, names []
+  [1] = Reserved
+}
+
+}
+
+}
+]  class A extends dart.core::Object {
+    final field dart.core::int index;
+    final field dart.core::String _name;
+    static const field dart.core::List<#lib::A> values = const <#lib::A>[#lib::A::elem1, #lib::A::elem2, #lib::A::elem3, #lib::A::elem4];
+    static const field #lib::A elem1 = const #lib::A::•(0, "A.elem1");
+    static const field #lib::A elem2 = const #lib::A::•(1, "A.elem2");
+    static const field #lib::A elem3 = const #lib::A::•(2, "A.elem3");
+    static const field #lib::A elem4 = const #lib::A::•(3, "A.elem4");
+    const constructor •(dart.core::int index, dart.core::String _name) → #lib::A
+      : #lib::A::index = index, #lib::A::_name = _name, super dart.core::Object::•()
+      ;
+    method toString() → dart.core::String
+      return this.{=#lib::A::_name};
+  }
+[@vm.bytecode=
+MembersBytecodeMetadata {
+
+Members {
+Field 'i', type = dart:core::int, getter = 'get:i', reflectable, final
+    value = null
+
+Function '', constructor, const, reflectable, debuggable
+    parameters [dart:core::int 'i'] (required: 1)
+    return-type #lib::B
+
+
+Bytecode {
+  Entry                0
+  CheckStack           0
+  Push                 FP[-6]
+  Push                 FP[-5]
+  StoreFieldTOS        CP#0
+  Push                 FP[-6]
+  DirectCall           1, CP#2
+  Drop1
+  PushNull
+  ReturnTOS
+}
+ConstantPool {
+  [0] = InstanceField #lib::B::i (field)
+  [1] = Reserved
+  [2] = DirectCall 'dart:core::Object:: (constructor)', ArgDesc num-args 1, num-type-args 0, names []
+  [3] = Reserved
+}
+
+}
+
+}
+]  class B extends dart.core::Object {
+    final field dart.core::int i;
+    const constructor •(dart.core::int i) → #lib::B
+      : #lib::B::i = i, super dart.core::Object::•()
+      ;
+  }
+[@vm.bytecode=
+MembersBytecodeMetadata {
+
+Members {
+Field 'j', type = dart:core::int, getter = 'get:j', reflectable, final
+    value = null
+
+Function '', constructor, const, reflectable, debuggable
+    parameters [dart:core::int 'a', dart:core::int 'b', dart:core::int 'c'] (required: 3)
+    return-type #lib::C
+
+
+Bytecode {
+  Entry                0
+  CheckStack           0
+  Push                 FP[-8]
+  Push                 FP[-7]
+  Push                 FP[-6]
+  AddInt
+  StoreFieldTOS        CP#0
+  Push                 FP[-8]
+  Push                 FP[-5]
+  PushInt              5
+  MulInt
+  DirectCall           2, CP#2
+  Drop1
+  PushNull
+  ReturnTOS
+}
+ConstantPool {
+  [0] = InstanceField #lib::C::j (field)
+  [1] = Reserved
+  [2] = DirectCall '#lib::B:: (constructor)', ArgDesc num-args 2, num-type-args 0, names []
+  [3] = Reserved
+}
+
+}
+
+}
+]  class C extends #lib::B {
+    final field dart.core::int j;
+    const constructor •(dart.core::int a, dart.core::int b, dart.core::int c) → #lib::C
+      : #lib::C::j = a.{dart.core::num::+}(b), super #lib::B::•(c.{dart.core::num::*}(5))
+      ;
+  }
+[@vm.bytecode=
+MembersBytecodeMetadata {
+
+Members {
+Field 'x', type = dynamic, getter = 'get:x', reflectable, final
+    value = null
+
+Field 'y', type = dynamic, getter = 'get:y', reflectable, final
+    value = null
+
+Function '', constructor, const, has-optional-positional-params, reflectable, debuggable
+    parameters [dynamic 'x', dynamic 'y'] (required: 1)
+    return-type #lib::D
+
+
+Bytecode {
+  EntryOptional        2, 1, 0
+  LoadConstant         r2, CP#0
+  Frame                0
+  CheckStack           0
+  Push                 r0
+  Push                 r1
+  StoreFieldTOS        CP#1
+  Push                 r0
+  Push                 r2
+  StoreFieldTOS        CP#3
+  Push                 r0
+  DirectCall           1, CP#5
+  Drop1
+  PushNull
+  ReturnTOS
+}
+ConstantPool {
+  [0] = ObjectRef null
+  [1] = InstanceField #lib::D::x (field)
+  [2] = Reserved
+  [3] = InstanceField #lib::D::y (field)
+  [4] = Reserved
+  [5] = DirectCall 'dart:core::Object:: (constructor)', ArgDesc num-args 1, num-type-args 0, names []
+  [6] = Reserved
+}
+
+}
+
+}
+]  class D extends dart.core::Object {
+    final field dynamic x;
+    final field dynamic y;
+    const constructor •(dynamic x, [dynamic y = null]) → #lib::D
+      : #lib::D::x = x, #lib::D::y = y, super dart.core::Object::•()
+      ;
+  }
+[@vm.bytecode=
+MembersBytecodeMetadata {
+
+Members {
+
+Function '', constructor, const, reflectable, debuggable
+    parameters [] (required: 0)
+    return-type #lib::E < #lib::E::TypeParam/0 >
+
+
+Bytecode {
+  Entry                0
+  CheckStack           0
+  Push                 FP[-5]
+  DirectCall           1, CP#0
+  Drop1
+  PushNull
+  ReturnTOS
+}
+ConstantPool {
+  [0] = DirectCall 'dart:core::Object:: (constructor)', ArgDesc num-args 1, num-type-args 0, names []
+  [1] = Reserved
+}
+
+}
+
+}
+]  class E<T extends dart.core::Object = dynamic> extends dart.core::Object {
+    const constructor •() → #lib::E<#lib::E::T>
+      : super dart.core::Object::•()
+      ;
+  }
+[@vm.bytecode=
+MembersBytecodeMetadata {
+
+Members {
+
+Function '', constructor, const, reflectable, debuggable
+    parameters [] (required: 0)
+    return-type #lib::F < dart:core::Map < #lib::F::TypeParam/0, #lib::F::TypeParam/1 >, #lib::F::TypeParam/0, #lib::F::TypeParam/1 >
+
+
+Bytecode {
+  Entry                0
+  CheckStack           0
+  Push                 FP[-5]
+  DirectCall           1, CP#0
+  Drop1
+  PushNull
+  ReturnTOS
+}
+ConstantPool {
+  [0] = DirectCall '#lib::E:: (constructor)', ArgDesc num-args 1, num-type-args 0, names []
+  [1] = Reserved
+}
+
+}
+
+}
+]  class F<P extends dart.core::Object = dynamic, Q extends dart.core::Object = dynamic> extends #lib::E<dart.core::Map<#lib::F::P, #lib::F::Q>> {
+    const constructor •() → #lib::F<#lib::F::P, #lib::F::Q>
+      : super #lib::E::•()
+      ;
+  }
+  static const field #lib::A c1 = #lib::A::elem3;
+  static const field dart.core::String c2 = "hello!";
+  static const field dart.core::int c3 = #lib::c2.{dart.core::String::length};
+  static const field #lib::C c4 = const #lib::C::•(1, 2, 3);
+  static const field #lib::D c5 = const #lib::D::•(const #lib::B::•(4));
+  static field dart.core::double fieldWithDoubleLiteralInitializer = 1.0;
+  static method test_constants1() → void {
+    dart.core::print(#lib::c1);
+    dart.core::print(#lib::c2);
+    dart.core::print(#lib::c3);
+    dart.core::print(#lib::c4);
+    dart.core::print(#lib::c5);
+  }
+  static method test_constants2() → void {
+    dart.core::print(42);
+    dart.core::print("foo");
+    dart.core::print(#lib::A::elem2);
+    dart.core::print(const <dart.core::Object>[42, "foo", dart.core::int]);
+    dart.core::print(const <dart.core::String, #lib::A>{"E2": #lib::A::elem2, "E4": #lib::A::elem4});
+    dart.core::print(const #lib::D::•(const #lib::C::•(4, 5, 6), const <dart.core::String, dart.core::Object>{"foo": 42, "bar": const #lib::B::•(#lib::c2.{dart.core::String::length})}));
+  }
+  static method test_list_literal(dart.core::int a) → void {
+    dart.core::print(<dart.core::int>[1, a, 3]);
+    dart.core::print(<dart.core::String>["a", a.{dart.core::int::toString}(), "b"]);
+  }
+  static method test_map_literal<T extends dart.core::Object = dynamic>(dart.core::int a, dart.core::int b, #lib::test_map_literal::T c) → void {
+    dart.core::print(<dart.core::int, dart.core::int>{1: a, b: 2});
+    dart.core::print(<dart.core::String, dart.core::int>{"foo": a, b.{dart.core::int::toString}(): 3});
+    dart.core::print(<dart.core::String, #lib::test_map_literal::T>{});
+    dart.core::print(<#lib::test_map_literal::T, dart.core::int>{c: 4});
+  }
+  static method test_symbol() → void {
+    dart.core::print(#test_symbol);
+    dart.core::print(#_private_symbol);
+  }
+  static method test_type_literal<T extends dart.core::Object = dynamic>() → void {
+    dart.core::print(dart.core::String);
+    dart.core::print(#lib::test_type_literal::T);
+  }
+  static method testGenericConstInstance() → dynamic
+    return const #lib::F::•<dart.core::int, dart.core::String>();
+  static method testGenericFunctionTypeLiteral() → dynamic
+    return <X extends dart.core::Object = dynamic>(X) → X;
+  static method testFieldWithDoubleLiteralInitializer() → dynamic
+    return #lib::fieldWithDoubleLiteralInitializer;
+  static method main() → dynamic {}
+}
diff --git a/pkg/vm/testcases/bytecode/loops.dart.expect b/pkg/vm/testcases/bytecode/loops.dart.expect
index 0c91ab3..d4b5acb 100644
--- a/pkg/vm/testcases/bytecode/loops.dart.expect
+++ b/pkg/vm/testcases/bytecode/loops.dart.expect
@@ -1,8 +1,21 @@
-library #lib;
-import self as self;
-import "dart:core" as core;
+main = #lib::main;
+ [@vm.bytecode=
+ComponentBytecodeMetadata {
 
-[@vm.bytecode=
+Bytecode (version: stable)
+Main library: #lib
+
+}
+] [@vm.bytecode=
+MembersBytecodeMetadata {
+
+Members {
+
+Function 'test_for', static, reflectable, debuggable
+    parameters [dart:core::List < dart:core::int > 'list'] (required: 1)
+    return-type dart:core::int
+
+
 Bytecode {
   Entry                2
   CheckStack           0
@@ -39,14 +52,13 @@
   [2] = InterfaceCall 'dart:core::List::[]', ArgDesc num-args 2, num-type-args 0, names []
   [3] = Reserved
 }
-]static method test_for(core::List<core::int> list) → core::int {
-  core::int sum = 0;
-  for (core::int i = 0; i.{core::num::<}(list.{core::List::length}); i = i.{core::num::+}(1)) {
-    sum = sum.{core::num::+}(list.{core::List::[]}(i));
-  }
-  return sum;
-}
-[@vm.bytecode=
+
+
+Function 'test_for_break', static, reflectable, debuggable
+    parameters [dart:core::List < dart:core::int > 'list'] (required: 1)
+    return-type dart:core::int
+
+
 Bytecode {
   Entry                2
   CheckStack           0
@@ -89,18 +101,13 @@
   [2] = InterfaceCall 'dart:core::List::[]', ArgDesc num-args 2, num-type-args 0, names []
   [3] = Reserved
 }
-]static method test_for_break(core::List<core::int> list) → core::int {
-  core::int sum = 0;
-  #L1:
-  for (core::int i = 0; i.{core::num::>=}(0); i = i.{core::num::+}(1)) {
-    if(i.{core::num::>=}(list.{core::List::length})) {
-      break #L1;
-    }
-    sum = sum.{core::num::+}(list.{core::List::[]}(i));
-  }
-  return sum;
-}
-[@vm.bytecode=
+
+
+Function 'test_for_continue', static, reflectable, debuggable
+    parameters [dart:core::List < dart:core::int > 'list'] (required: 1)
+    return-type dart:core::int
+
+
 Bytecode {
   Entry                2
   CheckStack           0
@@ -145,19 +152,13 @@
   [2] = InterfaceCall 'dart:core::List::[]', ArgDesc num-args 2, num-type-args 0, names []
   [3] = Reserved
 }
-]static method test_for_continue(core::List<core::int> list) → core::int {
-  core::int sum = 0;
-  for (core::int i = 100.{core::int::unary-}(); i.{core::num::<}(list.{core::List::length}); i = i.{core::num::+}(1))
-    #L2:
-    {
-      if(i.{core::num::<}(0)) {
-        break #L2;
-      }
-      sum = sum.{core::num::+}(list.{core::List::[]}(i));
-    }
-  return sum;
-}
-[@vm.bytecode=
+
+
+Function 'test_while', static, reflectable, debuggable
+    parameters [dart:core::List < dart:core::int > 'list'] (required: 1)
+    return-type dart:core::int
+
+
 Bytecode {
   Entry                4
   CheckStack           0
@@ -196,15 +197,13 @@
   [2] = InterfaceCall 'dart:core::List::[]', ArgDesc num-args 2, num-type-args 0, names []
   [3] = Reserved
 }
-]static method test_while(core::List<core::int> list) → core::int {
-  core::int sum = 0;
-  core::int i = 0;
-  while (i.{core::num::<}(list.{core::List::length})) {
-    sum = sum.{core::num::+}(list.{core::List::[]}(let final core::int #t1 = i in let final core::int #t2 = i = #t1.{core::num::+}(1) in #t1));
-  }
-  return sum;
-}
-[@vm.bytecode=
+
+
+Function 'test_do_while', static, reflectable, debuggable
+    parameters [dart:core::List < dart:core::int > 'list'] (required: 1)
+    return-type dart:core::int
+
+
 Bytecode {
   Entry                2
   CheckStack           0
@@ -238,17 +237,13 @@
   [2] = InterfaceCall 'dart:core::List::get:length', ArgDesc num-args 1, num-type-args 0, names []
   [3] = Reserved
 }
-]static method test_do_while(core::List<core::int> list) → core::int {
-  core::int sum = 0;
-  core::int i = 0;
-  do {
-    sum = sum.{core::num::+}(list.{core::List::[]}(i));
-    i = i.{core::num::+}(1);
-  }
-  while (i.{core::num::<}(list.{core::List::length}))
-  return sum;
-}
-[@vm.bytecode=
+
+
+Function 'test_for_in', static, reflectable, debuggable
+    parameters [dart:core::List < dart:core::int > 'list'] (required: 1)
+    return-type dart:core::int
+
+
 Bytecode {
   Entry                3
   CheckStack           0
@@ -282,14 +277,13 @@
   [4] = InterfaceCall 'dart:core::Iterator::get:current', ArgDesc num-args 1, num-type-args 0, names []
   [5] = Reserved
 }
-]static method test_for_in(core::List<core::int> list) → core::int {
-  core::int sum = 0;
-  for (core::int e in list) {
-    sum = sum.{core::num::+}(e);
-  }
-  return sum;
-}
-[@vm.bytecode=
+
+
+Function 'test_for_in_with_outer_var', static, reflectable, debuggable
+    parameters [dart:core::List < dart:core::int > 'list'] (required: 1)
+    return-type dart:core::int
+
+
 Bytecode {
   Entry                4
   CheckStack           0
@@ -327,16 +321,13 @@
   [4] = InterfaceCall 'dart:core::Iterator::get:current', ArgDesc num-args 1, num-type-args 0, names []
   [5] = Reserved
 }
-]static method test_for_in_with_outer_var(core::List<core::int> list) → core::int {
-  core::int sum = 0;
-  core::int e = 42;
-  for (final core::int #t3 in list) {
-    e = #t3;
-    sum = sum.{core::num::+}(e);
-  }
-  return sum;
-}
-[@vm.bytecode=
+
+
+Function 'main', static, reflectable, debuggable
+    parameters [] (required: 0)
+    return-type dynamic
+
+
 Bytecode {
   Entry                0
   CheckStack           0
@@ -345,4 +336,75 @@
 }
 ConstantPool {
 }
-]static method main() → dynamic {}
+
+}
+
+}
+]library #lib from "#lib" as #lib {
+
+  static method test_for(dart.core::List<dart.core::int> list) → dart.core::int {
+    dart.core::int sum = 0;
+    for (dart.core::int i = 0; i.{dart.core::num::<}(list.{dart.core::List::length}); i = i.{dart.core::num::+}(1)) {
+      sum = sum.{dart.core::num::+}(list.{dart.core::List::[]}(i));
+    }
+    return sum;
+  }
+  static method test_for_break(dart.core::List<dart.core::int> list) → dart.core::int {
+    dart.core::int sum = 0;
+    #L1:
+    for (dart.core::int i = 0; i.{dart.core::num::>=}(0); i = i.{dart.core::num::+}(1)) {
+      if(i.{dart.core::num::>=}(list.{dart.core::List::length})) {
+        break #L1;
+      }
+      sum = sum.{dart.core::num::+}(list.{dart.core::List::[]}(i));
+    }
+    return sum;
+  }
+  static method test_for_continue(dart.core::List<dart.core::int> list) → dart.core::int {
+    dart.core::int sum = 0;
+    for (dart.core::int i = 100.{dart.core::int::unary-}(); i.{dart.core::num::<}(list.{dart.core::List::length}); i = i.{dart.core::num::+}(1))
+      #L2:
+      {
+        if(i.{dart.core::num::<}(0)) {
+          break #L2;
+        }
+        sum = sum.{dart.core::num::+}(list.{dart.core::List::[]}(i));
+      }
+    return sum;
+  }
+  static method test_while(dart.core::List<dart.core::int> list) → dart.core::int {
+    dart.core::int sum = 0;
+    dart.core::int i = 0;
+    while (i.{dart.core::num::<}(list.{dart.core::List::length})) {
+      sum = sum.{dart.core::num::+}(list.{dart.core::List::[]}(let final dart.core::int #t1 = i in let final dart.core::int #t2 = i = #t1.{dart.core::num::+}(1) in #t1));
+    }
+    return sum;
+  }
+  static method test_do_while(dart.core::List<dart.core::int> list) → dart.core::int {
+    dart.core::int sum = 0;
+    dart.core::int i = 0;
+    do {
+      sum = sum.{dart.core::num::+}(list.{dart.core::List::[]}(i));
+      i = i.{dart.core::num::+}(1);
+    }
+    while (i.{dart.core::num::<}(list.{dart.core::List::length}))
+    return sum;
+  }
+  static method test_for_in(dart.core::List<dart.core::int> list) → dart.core::int {
+    dart.core::int sum = 0;
+    for (dart.core::int e in list) {
+      sum = sum.{dart.core::num::+}(e);
+    }
+    return sum;
+  }
+  static method test_for_in_with_outer_var(dart.core::List<dart.core::int> list) → dart.core::int {
+    dart.core::int sum = 0;
+    dart.core::int e = 42;
+    for (final dart.core::int #t3 in list) {
+      e = #t3;
+      sum = sum.{dart.core::num::+}(e);
+    }
+    return sum;
+  }
+  static method main() → dynamic {}
+}
diff --git a/pkg/vm/testcases/bytecode/optional_params.dart.expect b/pkg/vm/testcases/bytecode/optional_params.dart.expect
index 0920f3c..3ff8087 100644
--- a/pkg/vm/testcases/bytecode/optional_params.dart.expect
+++ b/pkg/vm/testcases/bytecode/optional_params.dart.expect
@@ -1,8 +1,21 @@
-library #lib;
-import self as self;
-import "dart:core" as core;
+main = #lib::main;
+ [@vm.bytecode=
+ComponentBytecodeMetadata {
 
-[@vm.bytecode=
+Bytecode (version: stable)
+Main library: #lib
+
+}
+] [@vm.bytecode=
+MembersBytecodeMetadata {
+
+Members {
+
+Function 'foo1', static, has-optional-positional-params, reflectable, debuggable
+    parameters [dynamic 'x', dynamic 'a', dynamic 'b'] (required: 1)
+    return-type void
+
+
 Bytecode {
   EntryOptional        1, 2, 0
   LoadConstant         r1, CP#0
@@ -68,12 +81,13 @@
   [7] = ObjectRef 'a = '
   [8] = ObjectRef 'b = '
 }
-]static method foo1(dynamic x, [dynamic a = "default_a", dynamic b = "default_b"]) → void {
-  core::print("x = ${x}");
-  core::print("a = ${a}");
-  core::print("b = ${b}");
-}
-[@vm.bytecode=
+
+
+Function 'foo2', static, has-optional-named-params, reflectable, debuggable
+    parameters [dynamic 'y', dynamic 'z', dynamic 'c', dynamic 'a', dynamic 'b'] (required: 2)
+    return-type void
+
+
 Bytecode {
   EntryOptional        2, 0, 3
   LoadConstant         r2, CP#0
@@ -179,14 +193,14 @@
   [13] = ObjectRef 'b = '
   [14] = ObjectRef 'c = '
 }
-]static method foo2(dynamic y, dynamic z, {dynamic c = "default_c", dynamic a = 42, dynamic b = const <core::String>["default_b"]}) → void {
-  core::print("y = ${y}");
-  core::print("z = ${z}");
-  core::print("a = ${a}");
-  core::print("b = ${b}");
-  core::print("c = ${c}");
-}
-[@vm.bytecode=
+
+
+Function 'foo3', static, has-optional-named-params, reflectable, debuggable
+    type-params <dart:core::Object P, dart:core::Object Q>
+    parameters [dynamic 'z', dynamic 'y', dart:core::bool 'a', dart:core::Map < #lib::foo3::TypeParam/0, #lib::foo3::TypeParam/1 > 'b'] (required: 2)
+    return-type void
+
+
 Bytecode {
   EntryOptional        2, 0, 2
   LoadConstant         r2, CP#0
@@ -219,12 +233,13 @@
   [5] = DirectCall 'dart:core::print', ArgDesc num-args 1, num-type-args 0, names []
   [6] = Reserved
 }
-]static method foo3<P extends core::Object = dynamic, Q extends core::Object = dynamic>(dynamic z, dynamic y, {core::bool a = false, core::Map<self::foo3::P, self::foo3::Q> b = null}) → void {
-  core::print(self::foo3::P);
-  core::print(y);
-  core::print(b);
-}
-[@vm.bytecode=
+
+
+Function 'main', static, reflectable, debuggable
+    parameters [] (required: 0)
+    return-type dynamic
+
+
 Bytecode {
   Entry                0
   CheckStack           0
@@ -250,7 +265,31 @@
   [6] = DirectCall '#lib::foo2', ArgDesc num-args 3, num-type-args 0, names ['a']
   [7] = Reserved
 }
-]static method main() → dynamic {
-  self::foo1("fixed_x", "concrete_a");
-  self::foo2("fixed_y", "fixed_z", a: "concrete_a");
+
+}
+
+}
+]library #lib from "#lib" as #lib {
+
+  static method foo1(dynamic x, [dynamic a = "default_a", dynamic b = "default_b"]) → void {
+    dart.core::print("x = ${x}");
+    dart.core::print("a = ${a}");
+    dart.core::print("b = ${b}");
+  }
+  static method foo2(dynamic y, dynamic z, {dynamic c = "default_c", dynamic a = 42, dynamic b = const <dart.core::String>["default_b"]}) → void {
+    dart.core::print("y = ${y}");
+    dart.core::print("z = ${z}");
+    dart.core::print("a = ${a}");
+    dart.core::print("b = ${b}");
+    dart.core::print("c = ${c}");
+  }
+  static method foo3<P extends dart.core::Object = dynamic, Q extends dart.core::Object = dynamic>(dynamic z, dynamic y, {dart.core::bool a = false, dart.core::Map<#lib::foo3::P, #lib::foo3::Q> b = null}) → void {
+    dart.core::print(#lib::foo3::P);
+    dart.core::print(y);
+    dart.core::print(b);
+  }
+  static method main() → dynamic {
+    #lib::foo1("fixed_x", "concrete_a");
+    #lib::foo2("fixed_y", "fixed_z", a: "concrete_a");
+  }
 }
diff --git a/pkg/vm/testcases/bytecode/super_calls.dart.expect b/pkg/vm/testcases/bytecode/super_calls.dart.expect
index 4fa0a47..286cf41 100644
--- a/pkg/vm/testcases/bytecode/super_calls.dart.expect
+++ b/pkg/vm/testcases/bytecode/super_calls.dart.expect
@@ -1,9 +1,45 @@
-library #lib;
-import self as self;
-import "dart:core" as core;
+main = #lib::main;
+ [@vm.bytecode=
+ComponentBytecodeMetadata {
 
-class Base1 extends core::Object {
+Bytecode (version: stable)
+Main library: #lib
+
+}
+] [@vm.bytecode=
+MembersBytecodeMetadata {
+
+Members {
+
+Function 'main', static, reflectable, debuggable
+    parameters [] (required: 0)
+    return-type dynamic
+
+
+Bytecode {
+  Entry                0
+  CheckStack           0
+  PushNull
+  ReturnTOS
+}
+ConstantPool {
+}
+
+}
+
+}
+]library #lib from "#lib" as #lib {
+
 [@vm.bytecode=
+MembersBytecodeMetadata {
+
+Members {
+
+Function '', constructor, reflectable
+    parameters [] (required: 0)
+    return-type #lib::Base1
+
+
 Bytecode {
   Entry                0
   CheckStack           0
@@ -17,10 +53,14 @@
   [0] = DirectCall 'dart:core::Object:: (constructor)', ArgDesc num-args 1, num-type-args 0, names []
   [1] = Reserved
 }
-]  synthetic constructor •() → self::Base1
-    : super core::Object::•()
-    ;
-[@vm.bytecode=
+
+
+Function 'foo', reflectable, debuggable
+    type-params <dart:core::Object T>
+    parameters [#lib::Base1::foo::TypeParam/0 'a1', dart:core::int 'a2'] (required: 2)
+    return-type void
+
+
 Bytecode {
   Entry                1
   CheckStack           0
@@ -30,8 +70,13 @@
 }
 ConstantPool {
 }
-]  method foo<T extends core::Object = dynamic>(self::Base1::foo::T a1, core::int a2) → void {}
-[@vm.bytecode=
+
+
+Function 'get:bar', getter, reflectable, debuggable
+    parameters [] (required: 0)
+    return-type dynamic
+
+
 Bytecode {
   Entry                0
   CheckStack           0
@@ -40,9 +85,13 @@
 }
 ConstantPool {
 }
-]  get bar() → dynamic
-    return 42;
-[@vm.bytecode=
+
+
+Function 'set:bazz', setter, reflectable, debuggable
+    parameters [dart:core::int 'x'] (required: 1)
+    return-type void
+
+
 Bytecode {
   Entry                0
   CheckStack           0
@@ -51,10 +100,29 @@
 }
 ConstantPool {
 }
-]  set bazz(core::int x) → void {}
+
 }
-class A extends self::Base1 {
+
+}
+]  class Base1 extends dart.core::Object {
+    synthetic constructor •() → #lib::Base1
+      : super dart.core::Object::•()
+      ;
+    method foo<T extends dart.core::Object = dynamic>(#lib::Base1::foo::T a1, dart.core::int a2) → void {}
+    get bar() → dynamic
+      return 42;
+    set bazz(dart.core::int x) → void {}
+  }
 [@vm.bytecode=
+MembersBytecodeMetadata {
+
+Members {
+
+Function '', constructor, reflectable
+    parameters [] (required: 0)
+    return-type #lib::A
+
+
 Bytecode {
   Entry                0
   CheckStack           0
@@ -68,10 +136,13 @@
   [0] = DirectCall '#lib::Base1:: (constructor)', ArgDesc num-args 1, num-type-args 0, names []
   [1] = Reserved
 }
-]  synthetic constructor •() → self::A
-    : super self::Base1::•()
-    ;
-[@vm.bytecode=
+
+
+Function 'testSuperCall', reflectable, debuggable
+    parameters [dart:core::int 'x'] (required: 1)
+    return-type dynamic
+
+
 Bytecode {
   Entry                1
   CheckStack           0
@@ -88,9 +159,13 @@
   [2] = DirectCall '#lib::Base1::foo', ArgDesc num-args 3, num-type-args 1, names []
   [3] = Reserved
 }
-]  method testSuperCall(core::int x) → dynamic
-    return super.{self::Base1::foo}<core::String>("a1", 2);
-[@vm.bytecode=
+
+
+Function 'testSuperTearOff', reflectable, debuggable
+    parameters [] (required: 0)
+    return-type dynamic
+
+
 Bytecode {
   Entry                1
   CheckStack           0
@@ -102,9 +177,13 @@
   [0] = DirectCall '#lib::Base1::get:foo', ArgDesc num-args 1, num-type-args 0, names []
   [1] = Reserved
 }
-]  method testSuperTearOff() → dynamic
-    return super.{self::Base1::foo};
-[@vm.bytecode=
+
+
+Function 'testSuperGet', reflectable, debuggable
+    parameters [] (required: 0)
+    return-type dynamic
+
+
 Bytecode {
   Entry                1
   CheckStack           0
@@ -116,9 +195,13 @@
   [0] = DirectCall '#lib::Base1::get:bar', ArgDesc num-args 1, num-type-args 0, names []
   [1] = Reserved
 }
-]  method testSuperGet() → dynamic
-    return super.{self::Base1::bar};
-[@vm.bytecode=
+
+
+Function 'testSuperCallViaGetter', reflectable, debuggable
+    parameters [] (required: 0)
+    return-type dynamic
+
+
 Bytecode {
   Entry                1
   CheckStack           0
@@ -137,9 +220,13 @@
   [4] = ObjectRef ArgDesc num-args 2, num-type-args 1, names []
   [5] = ICData dynamic target-name 'call', arg-desc CP#4
 }
-]  method testSuperCallViaGetter() → dynamic
-    return [@vm.call-site-attributes.metadata=receiverType:dynamic] super.{self::Base1::bar}.call<core::int>("param");
-[@vm.bytecode=
+
+
+Function 'testSuperSet', reflectable, debuggable
+    parameters [] (required: 0)
+    return-type dynamic
+
+
 Bytecode {
   Entry                1
   CheckStack           0
@@ -154,12 +241,36 @@
   [0] = DirectCall '#lib::Base1::set:bazz', ArgDesc num-args 2, num-type-args 0, names []
   [1] = Reserved
 }
-]  method testSuperSet() → dynamic {
-    super.{self::Base1::bazz} = 3;
-  }
+
 }
-abstract class Base2 extends core::Object {
+
+}
+]  class A extends #lib::Base1 {
+    synthetic constructor •() → #lib::A
+      : super #lib::Base1::•()
+      ;
+    method testSuperCall(dart.core::int x) → dynamic
+      return super.{#lib::Base1::foo}<dart.core::String>("a1", 2);
+    method testSuperTearOff() → dynamic
+      return super.{#lib::Base1::foo};
+    method testSuperGet() → dynamic
+      return super.{#lib::Base1::bar};
+    method testSuperCallViaGetter() → dynamic
+      return [@vm.call-site-attributes.metadata=receiverType:dynamic] super.{#lib::Base1::bar}.call<dart.core::int>("param");
+    method testSuperSet() → dynamic {
+      super.{#lib::Base1::bazz} = 3;
+    }
+  }
 [@vm.bytecode=
+MembersBytecodeMetadata {
+
+Members {
+
+Function '', constructor, reflectable
+    parameters [] (required: 0)
+    return-type #lib::Base2
+
+
 Bytecode {
   Entry                0
   CheckStack           0
@@ -173,15 +284,41 @@
   [0] = DirectCall 'dart:core::Object:: (constructor)', ArgDesc num-args 1, num-type-args 0, names []
   [1] = Reserved
 }
-]  synthetic constructor •() → self::Base2
-    : super core::Object::•()
-    ;
-  abstract method foo<T extends core::Object = dynamic>(core::String a1, self::Base2::foo::T a2, core::int a3) → void;
-  abstract get bar() → dynamic;
-  abstract set bazz(core::int x) → void;
+
+
+Function 'foo', abstract, reflectable, debuggable
+    type-params <dart:core::Object T>
+    parameters [dart:core::String 'a1', #lib::Base2::foo::TypeParam/0 'a2', dart:core::int 'a3'] (required: 3)
+    return-type void
+
+Function 'get:bar', getter, abstract, reflectable, debuggable
+    parameters [] (required: 0)
+    return-type dynamic
+
+Function 'set:bazz', setter, abstract, reflectable, debuggable
+    parameters [dart:core::int 'x'] (required: 1)
+    return-type void
 }
-abstract class B extends self::Base2 {
+
+}
+]  abstract class Base2 extends dart.core::Object {
+    synthetic constructor •() → #lib::Base2
+      : super dart.core::Object::•()
+      ;
+    abstract method foo<T extends dart.core::Object = dynamic>(dart.core::String a1, #lib::Base2::foo::T a2, dart.core::int a3) → void;
+    abstract get bar() → dynamic;
+    abstract set bazz(dart.core::int x) → void;
+  }
 [@vm.bytecode=
+MembersBytecodeMetadata {
+
+Members {
+
+Function '', constructor, reflectable
+    parameters [] (required: 0)
+    return-type #lib::B
+
+
 Bytecode {
   Entry                0
   CheckStack           0
@@ -195,10 +332,13 @@
   [0] = DirectCall '#lib::Base2:: (constructor)', ArgDesc num-args 1, num-type-args 0, names []
   [1] = Reserved
 }
-]  synthetic constructor •() → self::B
-    : super self::Base2::•()
-    ;
-[@vm.bytecode=
+
+
+Function 'testSuperCall', reflectable, debuggable
+    parameters [dart:core::int 'x'] (required: 1)
+    return-type dynamic
+
+
 Bytecode {
   Entry                1
   CheckStack           0
@@ -246,9 +386,13 @@
   [8] = DirectCall 'dart:core::Object::noSuchMethod', ArgDesc num-args 2, num-type-args 0, names []
   [9] = Reserved
 }
-]  method testSuperCall(core::int x) → dynamic
-    return super.{self::Base2::foo}<core::double>("a1", 3.14, 5);
-[@vm.bytecode=
+
+
+Function 'testSuperTearOff', reflectable, debuggable
+    parameters [] (required: 0)
+    return-type dynamic
+
+
 Bytecode {
   Entry                1
   CheckStack           0
@@ -277,9 +421,13 @@
   [5] = DirectCall 'dart:core::Object::noSuchMethod', ArgDesc num-args 2, num-type-args 0, names []
   [6] = Reserved
 }
-]  method testSuperTearOff() → dynamic
-    return super.{self::Base2::foo};
-[@vm.bytecode=
+
+
+Function 'testSuperGet', reflectable, debuggable
+    parameters [] (required: 0)
+    return-type dynamic
+
+
 Bytecode {
   Entry                1
   CheckStack           0
@@ -308,9 +456,13 @@
   [5] = DirectCall 'dart:core::Object::noSuchMethod', ArgDesc num-args 2, num-type-args 0, names []
   [6] = Reserved
 }
-]  method testSuperGet() → dynamic
-    return super.{self::Base2::bar};
-[@vm.bytecode=
+
+
+Function 'testSuperCallViaGetter', reflectable, debuggable
+    parameters [] (required: 0)
+    return-type dynamic
+
+
 Bytecode {
   Entry                1
   CheckStack           0
@@ -346,9 +498,13 @@
   [9] = ObjectRef ArgDesc num-args 2, num-type-args 1, names []
   [10] = ICData dynamic target-name 'call', arg-desc CP#9
 }
-]  method testSuperCallViaGetter() → dynamic
-    return [@vm.call-site-attributes.metadata=receiverType:dynamic] super.{self::Base2::bar}.call<core::int>("param");
-[@vm.bytecode=
+
+
+Function 'testSuperSet', reflectable, debuggable
+    parameters [] (required: 0)
+    return-type dynamic
+
+
 Bytecode {
   Entry                1
   CheckStack           0
@@ -383,17 +539,25 @@
   [5] = DirectCall 'dart:core::Object::noSuchMethod', ArgDesc num-args 2, num-type-args 0, names []
   [6] = Reserved
 }
-]  method testSuperSet() → dynamic {
-    super.{self::Base2::bazz} = 3;
+
+}
+
+}
+]  abstract class B extends #lib::Base2 {
+    synthetic constructor •() → #lib::B
+      : super #lib::Base2::•()
+      ;
+    method testSuperCall(dart.core::int x) → dynamic
+      return super.{#lib::Base2::foo}<dart.core::double>("a1", 3.14, 5);
+    method testSuperTearOff() → dynamic
+      return super.{#lib::Base2::foo};
+    method testSuperGet() → dynamic
+      return super.{#lib::Base2::bar};
+    method testSuperCallViaGetter() → dynamic
+      return [@vm.call-site-attributes.metadata=receiverType:dynamic] super.{#lib::Base2::bar}.call<dart.core::int>("param");
+    method testSuperSet() → dynamic {
+      super.{#lib::Base2::bazz} = 3;
+    }
   }
+  static method main() → dynamic {}
 }
-[@vm.bytecode=
-Bytecode {
-  Entry                0
-  CheckStack           0
-  PushNull
-  ReturnTOS
-}
-ConstantPool {
-}
-]static method main() → dynamic {}
diff --git a/pkg/vm/testcases/bytecode/switch.dart.expect b/pkg/vm/testcases/bytecode/switch.dart.expect
index d66c358..b7ca049 100644
--- a/pkg/vm/testcases/bytecode/switch.dart.expect
+++ b/pkg/vm/testcases/bytecode/switch.dart.expect
@@ -1,8 +1,21 @@
-library #lib;
-import self as self;
-import "dart:core" as core;
+main = #lib::main;
+ [@vm.bytecode=
+ComponentBytecodeMetadata {
 
-[@vm.bytecode=
+Bytecode (version: stable)
+Main library: #lib
+
+}
+] [@vm.bytecode=
+MembersBytecodeMetadata {
+
+Members {
+
+Function 'foo1', static, reflectable, debuggable
+    parameters [dart:core::int 'x'] (required: 1)
+    return-type dart:core::int
+
+
 Bytecode {
   Entry                2
   CheckStack           0
@@ -43,32 +56,13 @@
   [0] = InterfaceCall 'dart:core::Object::==', ArgDesc num-args 2, num-type-args 0, names []
   [1] = Reserved
 }
-]static method foo1(core::int x) → core::int {
-  core::int y;
-  #L1:
-  switch(x) {
-    #L2:
-    case 1:
-      {
-        y = 11;
-        break #L1;
-      }
-    #L3:
-    case 2:
-      {
-        y = 22;
-        break #L1;
-      }
-    #L4:
-    case 3:
-      {
-        y = 33;
-        break #L1;
-      }
-  }
-  return y;
-}
-[@vm.bytecode=
+
+
+Function 'foo2', static, reflectable, debuggable
+    parameters [dart:core::int 'x'] (required: 1)
+    return-type dart:core::int
+
+
 Bytecode {
   Entry                2
   CheckStack           0
@@ -120,35 +114,13 @@
   [0] = InterfaceCall 'dart:core::Object::==', ArgDesc num-args 2, num-type-args 0, names []
   [1] = Reserved
 }
-]static method foo2(core::int x) → core::int {
-  core::int y;
-  #L5:
-  switch(x) {
-    #L6:
-    case 1:
-    case 2:
-    case 3:
-      {
-        y = 11;
-        break #L5;
-      }
-    #L7:
-    case 4:
-    case 5:
-    case 6:
-      {
-        y = 22;
-        break #L5;
-      }
-    #L8:
-    default:
-      {
-        y = 33;
-      }
-  }
-  return y;
-}
-[@vm.bytecode=
+
+
+Function 'foo3', static, reflectable, debuggable
+    parameters [dart:core::int 'x'] (required: 1)
+    return-type dart:core::int
+
+
 Bytecode {
   Entry                2
   CheckStack           0
@@ -200,34 +172,13 @@
   [0] = InterfaceCall 'dart:core::Object::==', ArgDesc num-args 2, num-type-args 0, names []
   [1] = Reserved
 }
-]static method foo3(core::int x) → core::int {
-  core::int y;
-  switch(x) {
-    #L9:
-    case 1:
-    case 2:
-    case 3:
-      {
-        y = 11;
-        continue #L10;
-      }
-    #L10:
-    case 4:
-    case 5:
-    case 6:
-      {
-        y = 22;
-        return 42;
-      }
-    #L11:
-    default:
-      {
-        y = 33;
-      }
-  }
-  return y;
-}
-[@vm.bytecode=
+
+
+Function 'main', static, reflectable, debuggable
+    parameters [] (required: 0)
+    return-type dynamic
+
+
 Bytecode {
   Entry                0
   CheckStack           0
@@ -236,4 +187,91 @@
 }
 ConstantPool {
 }
-]static method main() → dynamic {}
+
+}
+
+}
+]library #lib from "#lib" as #lib {
+
+  static method foo1(dart.core::int x) → dart.core::int {
+    dart.core::int y;
+    #L1:
+    switch(x) {
+      #L2:
+      case 1:
+        {
+          y = 11;
+          break #L1;
+        }
+      #L3:
+      case 2:
+        {
+          y = 22;
+          break #L1;
+        }
+      #L4:
+      case 3:
+        {
+          y = 33;
+          break #L1;
+        }
+    }
+    return y;
+  }
+  static method foo2(dart.core::int x) → dart.core::int {
+    dart.core::int y;
+    #L5:
+    switch(x) {
+      #L6:
+      case 1:
+      case 2:
+      case 3:
+        {
+          y = 11;
+          break #L5;
+        }
+      #L7:
+      case 4:
+      case 5:
+      case 6:
+        {
+          y = 22;
+          break #L5;
+        }
+      #L8:
+      default:
+        {
+          y = 33;
+        }
+    }
+    return y;
+  }
+  static method foo3(dart.core::int x) → dart.core::int {
+    dart.core::int y;
+    switch(x) {
+      #L9:
+      case 1:
+      case 2:
+      case 3:
+        {
+          y = 11;
+          continue #L10;
+        }
+      #L10:
+      case 4:
+      case 5:
+      case 6:
+        {
+          y = 22;
+          return 42;
+        }
+      #L11:
+      default:
+        {
+          y = 33;
+        }
+    }
+    return y;
+  }
+  static method main() → dynamic {}
+}
diff --git a/pkg/vm/testcases/bytecode/try_blocks.dart.expect b/pkg/vm/testcases/bytecode/try_blocks.dart.expect
index 384bd81..2cdcf6d 100644
--- a/pkg/vm/testcases/bytecode/try_blocks.dart.expect
+++ b/pkg/vm/testcases/bytecode/try_blocks.dart.expect
@@ -1,8 +1,21 @@
-library #lib;
-import self as self;
-import "dart:core" as core;
+main = #lib::main;
+ [@vm.bytecode=
+ComponentBytecodeMetadata {
 
-[@vm.bytecode=
+Bytecode (version: stable)
+Main library: #lib
+
+}
+] [@vm.bytecode=
+MembersBytecodeMetadata {
+
+Members {
+
+Function 'testTryCatch1', static, reflectable, debuggable
+    parameters [] (required: 0)
+    return-type dynamic
+
+
 Bytecode {
   Entry                4
   CheckStack           0
@@ -50,15 +63,13 @@
   [5] = DirectCall 'dart:core::_StringBase::_interpolate', ArgDesc num-args 1, num-type-args 0, names []
   [6] = Reserved
 }
-]static method testTryCatch1() → dynamic {
-  try {
-    core::print("danger!");
-  }
-  on dynamic catch(final dynamic e) {
-    core::print("caught ${e}");
-  }
-}
-[@vm.bytecode=
+
+
+Function 'testTryCatch2', static, reflectable, debuggable
+    parameters [] (required: 0)
+    return-type dynamic
+
+
 Bytecode {
   Entry                5
   CheckStack           0
@@ -190,24 +201,13 @@
   [14] = Type dynamic
   [15] = ObjectRef 'caught something '
 }
-]static method testTryCatch2() → dynamic {
-  try {
-    core::print("danger!");
-  }
-  on core::TypeError catch(no-exception-var) {
-    core::print("caught type error");
-  }
-  on core::AssertionError catch(final core::AssertionError e) {
-    core::print("caught assertion error ${e}");
-  }
-  on core::Error catch(final core::Error e, final core::StackTrace st) {
-    core::print("caught error ${e} ${st}");
-  }
-  on dynamic catch(final dynamic e, final core::StackTrace st) {
-    core::print("caught something ${e} ${st}");
-  }
-}
-[@vm.bytecode=
+
+
+Function 'testTryCatch3', static, reflectable, debuggable
+    parameters [] (required: 0)
+    return-type dynamic
+
+
 Bytecode {
   Entry                7
   CheckStack           0
@@ -349,7 +349,7 @@
   [31] = EndClosureFunctionScope
 }
 Closure #lib::testTryCatch3::'foo' () -> void
-ClosureBytecode {
+ClosureCode {
   EntryFixed           1, 6
   CheckStack           0
   Push                 FP[-5]
@@ -386,7 +386,7 @@
 }
 
 Closure #lib::testTryCatch3::'bar' () -> void
-ClosureBytecode {
+ClosureCode {
   EntryFixed           1, 6
   CheckStack           0
   Push                 FP[-5]
@@ -446,36 +446,13 @@
   ReturnTOS
 
 }
-]static method testTryCatch3() → dynamic {
-  core::int x = 1;
-  try {
-    core::int y = 2;
-    function foo() → void {
-      try {
-        core::print("danger foo");
-      }
-      on dynamic catch(final dynamic e) {
-        core::print(x);
-        y = 3;
-      }
-    }
-    [@vm.call-site-attributes.metadata=receiverType:() → void] foo.call();
-    core::print(y);
-  }
-  on dynamic catch(final dynamic e, final core::StackTrace st) {
-    core::print("caught ${e} ${st}");
-    function bar() → void {
-      try {
-        core::print("danger bar");
-      }
-      on core::Error catch(final core::Error e) {
-        core::print("error ${e}, captured stack trace: ${st}");
-      }
-    }
-    return bar;
-  }
-}
-[@vm.bytecode=
+
+
+Function 'testRethrow', static, reflectable, debuggable
+    parameters [dart:core::bool 'cond'] (required: 1)
+    return-type dynamic
+
+
 Bytecode {
   Entry                8
   CheckStack           0
@@ -553,29 +530,13 @@
   [5] = ObjectRef 'try 1 > catch 2 > catch 3'
   [6] = ObjectRef 'catch 1'
 }
-]static method testRethrow(core::bool cond) → dynamic {
-  try {
-    try {
-      core::print("try 1 > try 2");
-    }
-    on dynamic catch(final dynamic e) {
-      try {
-        core::print("try 1 > catch 2 > try 3");
-        if(cond) {
-          rethrow;
-        }
-      }
-      on dynamic catch(final dynamic e) {
-        core::print("try 1 > catch 2 > catch 3");
-      }
-    }
-  }
-  on dynamic catch(final dynamic e, final core::StackTrace st) {
-    core::print("catch 1");
-    core::print(st);
-  }
-}
-[@vm.bytecode=
+
+
+Function 'testTryFinally1', static, reflectable, debuggable
+    parameters [] (required: 0)
+    return-type dynamic
+
+
 Bytecode {
   Entry                3
   CheckStack           0
@@ -633,20 +594,13 @@
   [1] = DirectCall 'dart:core::print', ArgDesc num-args 1, num-type-args 0, names []
   [2] = Reserved
 }
-]static method testTryFinally1() → dynamic {
-  #L1:
-  for (core::int i = 0; i.{core::num::<}(10); i = i.{core::num::+}(1)) {
-    try {
-      if(i.{core::num::>}(5)) {
-        break #L1;
-      }
-    }
-    finally {
-      core::print(i);
-    }
-  }
-}
-[@vm.bytecode=
+
+
+Function 'testTryFinally2', static, reflectable, debuggable
+    parameters [dart:core::int 'x'] (required: 1)
+    return-type dynamic
+
+
 Bytecode {
   Entry                9
   CheckStack           0
@@ -788,7 +742,7 @@
   [26] = ObjectRef 'case 2'
 }
 Closure #lib::testTryFinally2::'foo' () -> void
-ClosureBytecode {
+ClosureCode {
   EntryFixed           1, 2
   CheckStack           0
   Push                 FP[-5]
@@ -806,43 +760,13 @@
   ReturnTOS
 
 }
-]static method testTryFinally2(core::int x) → dynamic {
-  #L2:
-  switch(x) {
-    #L3:
-    case 1:
-      {
-        try {
-          core::print("before try 1");
-          core::int y = 3;
-          try {
-            core::print("try");
-            function foo() → void {
-              core::print(x);
-              core::print(y);
-            }
-            [@vm.call-site-attributes.metadata=receiverType:() → void] foo.call();
-            continue #L4;
-          }
-          finally {
-            core::print("finally 1");
-          }
-          core::print("after try 1");
-        }
-        finally {
-          core::print("finally 2");
-        }
-        break #L2;
-      }
-    #L4:
-    case 2:
-      {
-        core::print("case 2");
-        break #L2;
-      }
-  }
-}
-[@vm.bytecode=
+
+
+Function 'testTryFinally3', static, reflectable, debuggable
+    parameters [] (required: 0)
+    return-type dynamic
+
+
 Bytecode {
   Entry                6
   CheckStack           0
@@ -936,7 +860,7 @@
   [21] = ICData dynamic target-name 'call', arg-desc CP#19
 }
 Closure #lib::testTryFinally3::'<anonymous closure>' () -> dart:core::int
-ClosureBytecode {
+ClosureCode {
   EntryFixed           1, 6
   CheckStack           0
   Push                 FP[-5]
@@ -1025,33 +949,13 @@
   ReturnTOS
 
 }
-]static method testTryFinally3() → dynamic {
-  core::int x = 11;
-  dynamic y;
-  try {
-    y = () → core::int {
-      core::print(x);
-      try {
-        core::print("try 1");
-        return 42;
-      }
-      finally {
-        try {
-          core::print("try 2");
-          return 43;
-        }
-        finally {
-          core::print(x);
-        }
-      }
-    };
-  }
-  finally {
-    core::print(x);
-    [@vm.call-site-attributes.metadata=receiverType:dynamic] y.call();
-  }
-}
-[@vm.bytecode=
+
+
+Function 'testTryCatchFinally', static, reflectable, debuggable
+    parameters [] (required: 0)
+    return-type dynamic
+
+
 Bytecode {
   Entry                5
   CheckStack           0
@@ -1104,19 +1008,13 @@
   [4] = ObjectRef 'catch'
   [5] = ObjectRef 'finally'
 }
-]static method testTryCatchFinally() → dynamic {
-  try
-    try {
-      core::print("try");
-    }
-    on dynamic catch(final dynamic e) {
-      core::print("catch");
-    }
-  finally {
-    core::print("finally");
-  }
-}
-[@vm.bytecode=
+
+
+Function 'main', static, reflectable, debuggable
+    parameters [] (required: 0)
+    return-type dynamic
+
+
 Bytecode {
   Entry                0
   CheckStack           0
@@ -1125,4 +1023,174 @@
 }
 ConstantPool {
 }
-]static method main() → dynamic {}
+
+}
+
+}
+]library #lib from "#lib" as #lib {
+
+  static method testTryCatch1() → dynamic {
+    try {
+      dart.core::print("danger!");
+    }
+    on dynamic catch(final dynamic e) {
+      dart.core::print("caught ${e}");
+    }
+  }
+  static method testTryCatch2() → dynamic {
+    try {
+      dart.core::print("danger!");
+    }
+    on dart.core::TypeError catch(no-exception-var) {
+      dart.core::print("caught type error");
+    }
+    on dart.core::AssertionError catch(final dart.core::AssertionError e) {
+      dart.core::print("caught assertion error ${e}");
+    }
+    on dart.core::Error catch(final dart.core::Error e, final dart.core::StackTrace st) {
+      dart.core::print("caught error ${e} ${st}");
+    }
+    on dynamic catch(final dynamic e, final dart.core::StackTrace st) {
+      dart.core::print("caught something ${e} ${st}");
+    }
+  }
+  static method testTryCatch3() → dynamic {
+    dart.core::int x = 1;
+    try {
+      dart.core::int y = 2;
+      function foo() → void {
+        try {
+          dart.core::print("danger foo");
+        }
+        on dynamic catch(final dynamic e) {
+          dart.core::print(x);
+          y = 3;
+        }
+      }
+      [@vm.call-site-attributes.metadata=receiverType:() → void] foo.call();
+      dart.core::print(y);
+    }
+    on dynamic catch(final dynamic e, final dart.core::StackTrace st) {
+      dart.core::print("caught ${e} ${st}");
+      function bar() → void {
+        try {
+          dart.core::print("danger bar");
+        }
+        on dart.core::Error catch(final dart.core::Error e) {
+          dart.core::print("error ${e}, captured stack trace: ${st}");
+        }
+      }
+      return bar;
+    }
+  }
+  static method testRethrow(dart.core::bool cond) → dynamic {
+    try {
+      try {
+        dart.core::print("try 1 > try 2");
+      }
+      on dynamic catch(final dynamic e) {
+        try {
+          dart.core::print("try 1 > catch 2 > try 3");
+          if(cond) {
+            rethrow;
+          }
+        }
+        on dynamic catch(final dynamic e) {
+          dart.core::print("try 1 > catch 2 > catch 3");
+        }
+      }
+    }
+    on dynamic catch(final dynamic e, final dart.core::StackTrace st) {
+      dart.core::print("catch 1");
+      dart.core::print(st);
+    }
+  }
+  static method testTryFinally1() → dynamic {
+    #L1:
+    for (dart.core::int i = 0; i.{dart.core::num::<}(10); i = i.{dart.core::num::+}(1)) {
+      try {
+        if(i.{dart.core::num::>}(5)) {
+          break #L1;
+        }
+      }
+      finally {
+        dart.core::print(i);
+      }
+    }
+  }
+  static method testTryFinally2(dart.core::int x) → dynamic {
+    #L2:
+    switch(x) {
+      #L3:
+      case 1:
+        {
+          try {
+            dart.core::print("before try 1");
+            dart.core::int y = 3;
+            try {
+              dart.core::print("try");
+              function foo() → void {
+                dart.core::print(x);
+                dart.core::print(y);
+              }
+              [@vm.call-site-attributes.metadata=receiverType:() → void] foo.call();
+              continue #L4;
+            }
+            finally {
+              dart.core::print("finally 1");
+            }
+            dart.core::print("after try 1");
+          }
+          finally {
+            dart.core::print("finally 2");
+          }
+          break #L2;
+        }
+      #L4:
+      case 2:
+        {
+          dart.core::print("case 2");
+          break #L2;
+        }
+    }
+  }
+  static method testTryFinally3() → dynamic {
+    dart.core::int x = 11;
+    dynamic y;
+    try {
+      y = () → dart.core::int {
+        dart.core::print(x);
+        try {
+          dart.core::print("try 1");
+          return 42;
+        }
+        finally {
+          try {
+            dart.core::print("try 2");
+            return 43;
+          }
+          finally {
+            dart.core::print(x);
+          }
+        }
+      };
+    }
+    finally {
+      dart.core::print(x);
+      [@vm.call-site-attributes.metadata=receiverType:dynamic] y.call();
+    }
+  }
+  static method testTryCatchFinally() → dynamic {
+    try
+      try {
+        dart.core::print("try");
+      }
+      on dynamic catch(final dynamic e) {
+        dart.core::print("catch");
+      }
+    finally {
+      dart.core::print("finally");
+    }
+  }
+  static method main() → dynamic {}
+}
diff --git a/pkg/vm/testcases/bytecode/type_ops.dart.expect b/pkg/vm/testcases/bytecode/type_ops.dart.expect
index 6da40f3..6b29eac 100644
--- a/pkg/vm/testcases/bytecode/type_ops.dart.expect
+++ b/pkg/vm/testcases/bytecode/type_ops.dart.expect
@@ -1,9 +1,124 @@
-library #lib;
-import self as self;
-import "dart:core" as core;
+main = #lib::main;
+ [@vm.bytecode=
+ComponentBytecodeMetadata {
 
-class A<T extends core::Object = dynamic> extends core::Object {
+Bytecode (version: stable)
+Main library: #lib
+
+}
+] [@vm.bytecode=
+MembersBytecodeMetadata {
+
+Members {
+Field 'globalVar', type = dart:core::List < dart:core::Iterable null >, reflectable, static
+    value = null
+
+Function 'foo1', static, reflectable, debuggable
+    parameters [dynamic 'x'] (required: 1)
+    return-type dynamic
+
+
+Bytecode {
+  Entry                0
+  CheckStack           0
+  Push                 FP[-5]
+  PushConstant         CP#0
+  InterfaceCall        2, CP#1
+  JumpIfFalse          L1
+  PushConstant         CP#3
+  DirectCall           1, CP#4
+  Drop1
+L1:
+  Push                 FP[-5]
+  PushNull
+  PushNull
+  PushConstant         CP#6
+  InterfaceCall        4, CP#7
+  JumpIfFalse          L2
+  PushConstant         CP#9
+  DirectCall           1, CP#4
+  Drop1
+L2:
+  Push                 FP[-5]
+  PushConstant         CP#10
+  PushNull
+  PushNull
+  PushConstant         CP#11
+  AssertAssignable     0, CP#12
+  ReturnTOS
+}
+ConstantPool {
+  [0] = Type #lib::B
+  [1] = InterfaceCall 'dart:core::Object::_simpleInstanceOf', ArgDesc num-args 2, num-type-args 0, names []
+  [2] = Reserved
+  [3] = ObjectRef '11'
+  [4] = DirectCall 'dart:core::print', ArgDesc num-args 1, num-type-args 0, names []
+  [5] = Reserved
+  [6] = Type #lib::C < dart:core::String, dart:core::int, dart:core::Object, dynamic >
+  [7] = InterfaceCall 'dart:core::Object::_instanceOf', ArgDesc num-args 4, num-type-args 0, names []
+  [8] = Reserved
+  [9] = ObjectRef '12'
+  [10] = Type #lib::A < dart:core::int >
+  [11] = ObjectRef ' in type cast'
+  [12] = SubtypeTestCache
+}
+
+
+Function 'foo5', static, reflectable, debuggable
+    parameters [dynamic 'x'] (required: 1)
+    return-type void
+
+
+Bytecode {
+  Entry                1
+  CheckStack           0
+  Push                 FP[-5]
+  PushConstant         CP#0
+  PushNull
+  PushNull
+  PushConstant         CP#1
+  AssertAssignable     0, CP#2
+  StoreStaticTOS       CP#3
+  PushNull
+  ReturnTOS
+}
+ConstantPool {
+  [0] = Type dart:core::List < dart:core::Iterable null >
+  [1] = ObjectRef ''
+  [2] = SubtypeTestCache
+  [3] = StaticField #lib::globalVar (field)
+}
+
+
+Function 'main', static, reflectable, debuggable
+    parameters [] (required: 0)
+    return-type dynamic
+
+
+Bytecode {
+  Entry                0
+  CheckStack           0
+  PushNull
+  ReturnTOS
+}
+ConstantPool {
+}
+
+}
+
+}
+]library #lib from "#lib" as #lib {
+
 [@vm.bytecode=
+MembersBytecodeMetadata {
+
+Members {
+
+Function '', constructor, reflectable
+    parameters [] (required: 0)
+    return-type #lib::A < #lib::A::TypeParam/0 >
+
+
 Bytecode {
   Entry                0
   CheckStack           0
@@ -17,12 +132,25 @@
   [0] = DirectCall 'dart:core::Object:: (constructor)', ArgDesc num-args 1, num-type-args 0, names []
   [1] = Reserved
 }
-]  synthetic constructor •() → self::A<self::A::T>
-    : super core::Object::•()
-    ;
+
 }
-class B extends self::A<core::String> {
+
+}
+]  class A<T extends dart.core::Object = dynamic> extends dart.core::Object {
+    synthetic constructor •() → #lib::A<#lib::A::T>
+      : super dart.core::Object::•()
+      ;
+  }
 [@vm.bytecode=
+MembersBytecodeMetadata {
+
+Members {
+
+Function '', constructor, reflectable
+    parameters [] (required: 0)
+    return-type #lib::B
+
+
 Bytecode {
   Entry                0
   CheckStack           0
@@ -36,12 +164,25 @@
   [0] = DirectCall '#lib::A:: (constructor)', ArgDesc num-args 1, num-type-args 0, names []
   [1] = Reserved
 }
-]  synthetic constructor •() → self::B
-    : super self::A::•()
-    ;
+
 }
-class C<T1 extends core::Object = dynamic, T2 extends core::Object = dynamic, T3 extends core::Object = dynamic> extends self::B {
+
+}
+]  class B extends #lib::A<dart.core::String> {
+    synthetic constructor •() → #lib::B
+      : super #lib::A::•()
+      ;
+  }
 [@vm.bytecode=
+MembersBytecodeMetadata {
+
+Members {
+
+Function '', constructor, reflectable
+    parameters [] (required: 0)
+    return-type #lib::C < dart:core::String, #lib::C::TypeParam/0, #lib::C::TypeParam/1, #lib::C::TypeParam/2 >
+
+
 Bytecode {
   Entry                0
   CheckStack           0
@@ -55,13 +196,27 @@
   [0] = DirectCall '#lib::B:: (constructor)', ArgDesc num-args 1, num-type-args 0, names []
   [1] = Reserved
 }
-]  synthetic constructor •() → self::C<self::C::T1, self::C::T2, self::C::T3>
-    : super self::B::•()
-    ;
+
 }
-class D<P extends core::Object = dynamic, Q extends core::Object = dynamic> extends self::C<core::int, self::D::Q, self::D::P> {
-  generic-covariant-impl field core::Map<self::D::P, self::D::Q> foo;
+
+}
+]  class C<T1 extends dart.core::Object = dynamic, T2 extends dart.core::Object = dynamic, T3 extends dart.core::Object = dynamic> extends #lib::B {
+    synthetic constructor •() → #lib::C<#lib::C::T1, #lib::C::T2, #lib::C::T3>
+      : super #lib::B::•()
+      ;
+  }
 [@vm.bytecode=
+MembersBytecodeMetadata {
+
+Members {
+Field 'foo', type = dart:core::Map < #lib::D::TypeParam/0, #lib::D::TypeParam/1 >, getter = 'get:foo', setter = 'set:foo', reflectable
+    value = null
+
+Function '', constructor, reflectable, debuggable
+    parameters [dynamic 'tt'] (required: 1)
+    return-type #lib::D < dart:core::String, dart:core::int, #lib::D::TypeParam/1, #lib::D::TypeParam/0, #lib::D::TypeParam/1 >
+
+
 Bytecode {
   Entry                0
   CheckStack           0
@@ -90,10 +245,13 @@
   [6] = DirectCall '#lib::C:: (constructor)', ArgDesc num-args 1, num-type-args 0, names []
   [7] = Reserved
 }
-]  constructor •(dynamic tt) → self::D<self::D::P, self::D::Q>
-    : self::D::foo = tt as{TypeError} core::Map<self::D::P, self::D::Q>, super self::C::•()
-    ;
-[@vm.bytecode=
+
+
+Function 'foo2', reflectable, debuggable
+    parameters [dynamic 'y'] (required: 1)
+    return-type dynamic
+
+
 Bytecode {
   Entry                1
   CheckStack           0
@@ -148,16 +306,14 @@
   [12] = InterfaceCall '#lib::D::set:foo', ArgDesc num-args 2, num-type-args 0, names []
   [13] = Reserved
 }
-]  method foo2(dynamic y) → dynamic {
-    if(y is self::A<self::D::P>) {
-      core::print("21");
-    }
-    if(y is self::C<dynamic, self::D::Q, core::List<self::D::P>>) {
-      core::print("22");
-    }
-    [@vm.call-site-attributes.metadata=receiverType:#lib::D<#lib::D::P, #lib::D::Q>] this.{self::D::foo} = y as{TypeError} core::Map<self::D::P, self::D::Q>;
-  }
-[@vm.bytecode=
+
+
+Function 'foo3', reflectable, debuggable
+    type-params <dart:core::Object T1, dart:core::Object T2>
+    parameters [dynamic 'z'] (required: 1)
+    return-type dynamic
+
+
 Bytecode {
   Entry                1
   CheckStack           0
@@ -209,16 +365,13 @@
   [12] = InterfaceCall 'dart:core::Map::get:values', ArgDesc num-args 1, num-type-args 0, names []
   [13] = Reserved
 }
-]  method foo3<T1 extends core::Object = dynamic, T2 extends core::Object = dynamic>(dynamic z) → dynamic {
-    if(z is self::A<self::D::foo3::T1>) {
-      core::print("31");
-    }
-    if(z is self::C<core::Map<self::D::foo3::T1, self::D::P>, core::List<self::D::foo3::T2>, self::D::Q>) {
-      core::print("32");
-    }
-    return (z as core::Map<self::D::foo3::T2, self::D::Q>).{core::Map::values};
-  }
-[@vm.bytecode=
+
+
+Function 'foo4', reflectable, debuggable
+    parameters [dynamic 'w'] (required: 1)
+    return-type dart:core::Map < #lib::D::TypeParam/0, #lib::D::TypeParam/1 >
+
+
 Bytecode {
   Entry                2
   CheckStack           0
@@ -262,13 +415,49 @@
   [6] = Reserved
   [7] = SubtypeTestCache
 }
-]  method foo4(dynamic w) → core::Map<self::D::P, self::D::Q> {
-    core::List<core::Map<self::D::P, self::D::Q>> list = <core::Map<self::D::P, self::D::Q>>[w as{TypeError} core::Map<self::D::P, self::D::Q>];
-    return w as{TypeError} core::Map<self::D::P, self::D::Q>;
-  }
+
 }
-class E<P extends core::String = core::String> extends core::Object {
+
+}
+]  class D<P extends dart.core::Object = dynamic, Q extends dart.core::Object = dynamic> extends #lib::C<dart.core::int, #lib::D::Q, #lib::D::P> {
+    generic-covariant-impl field dart.core::Map<#lib::D::P, #lib::D::Q> foo;
+    constructor •(dynamic tt) → #lib::D<#lib::D::P, #lib::D::Q>
+      : #lib::D::foo = tt as{TypeError} dart.core::Map<#lib::D::P, #lib::D::Q>, super #lib::C::•()
+      ;
+    method foo2(dynamic y) → dynamic {
+      if(y is #lib::A<#lib::D::P>) {
+        dart.core::print("21");
+      }
+      if(y is #lib::C<dynamic, #lib::D::Q, dart.core::List<#lib::D::P>>) {
+        dart.core::print("22");
+      }
+      [@vm.call-site-attributes.metadata=receiverType:#lib::D<#lib::D::P, #lib::D::Q>] this.{#lib::D::foo} = y as{TypeError} dart.core::Map<#lib::D::P, #lib::D::Q>;
+    }
+    method foo3<T1 extends dart.core::Object = dynamic, T2 extends dart.core::Object = dynamic>(dynamic z) → dynamic {
+      if(z is #lib::A<#lib::D::foo3::T1>) {
+        dart.core::print("31");
+      }
+      if(z is #lib::C<dart.core::Map<#lib::D::foo3::T1, #lib::D::P>, dart.core::List<#lib::D::foo3::T2>, #lib::D::Q>) {
+        dart.core::print("32");
+      }
+      return (z as dart.core::Map<#lib::D::foo3::T2, #lib::D::Q>).{dart.core::Map::values};
+    }
+    method foo4(dynamic w) → dart.core::Map<#lib::D::P, #lib::D::Q> {
+      dart.core::List<dart.core::Map<#lib::D::P, #lib::D::Q>> list = <dart.core::Map<#lib::D::P, #lib::D::Q>>[w as{TypeError} dart.core::Map<#lib::D::P, #lib::D::Q>];
+      return w as{TypeError} dart.core::Map<#lib::D::P, #lib::D::Q>;
+    }
+  }
 [@vm.bytecode=
+MembersBytecodeMetadata {
+
+Members {
+
+Function '', factory, static, reflectable, debuggable
+    type-params <dart:core::String P>
+    parameters [] (required: 0)
+    return-type #lib::E < #lib::E:: (constructor)::TypeParam/0 >
+
+
 Bytecode {
   Entry                0
   CheckStack           0
@@ -277,9 +466,14 @@
 }
 ConstantPool {
 }
-]  static factory •<P extends core::String = dynamic>() → self::E<self::E::•::P>
-    return null;
-[@vm.bytecode=
+
+
+Function 'foo6', reflectable, debuggable
+    type-params <#lib::E::TypeParam/0 T, dart:core::List < #lib::E::foo6::TypeParam/0 > U>
+    parameters [dart:core::Map < #lib::E::foo6::TypeParam/0, #lib::E::foo6::TypeParam/1 > 'map'] (required: 1)
+    return-type void
+
+
 Bytecode {
   Entry                1
   CheckStack           0
@@ -301,6 +495,7 @@
   PushNull
   ReturnTOS
 }
+Default function type arguments: CP#1
 ConstantPool {
   [0] = TypeArgumentsField #lib::E
   [1] = ObjectRef < #lib::E::TypeParam/0, dart:core::List < #lib::E::TypeParam/0 > >
@@ -308,93 +503,27 @@
   [3] = Type #lib::E::TypeParam/0
   [4] = ObjectRef 'T'
 }
-]  method foo6<generic-covariant-impl T extends self::E::P = self::E::P, U extends core::List<self::E::foo6::T> = core::List<self::E::P>>(core::Map<self::E::foo6::T, self::E::foo6::U> map) → void {}
+
 }
-static field core::List<core::Iterable<dynamic>> globalVar;
-[@vm.bytecode=
-Bytecode {
-  Entry                0
-  CheckStack           0
-  Push                 FP[-5]
-  PushConstant         CP#0
-  InterfaceCall        2, CP#1
-  JumpIfFalse          L1
-  PushConstant         CP#3
-  DirectCall           1, CP#4
-  Drop1
-L1:
-  Push                 FP[-5]
-  PushNull
-  PushNull
-  PushConstant         CP#6
-  InterfaceCall        4, CP#7
-  JumpIfFalse          L2
-  PushConstant         CP#9
-  DirectCall           1, CP#4
-  Drop1
-L2:
-  Push                 FP[-5]
-  PushConstant         CP#10
-  PushNull
-  PushNull
-  PushConstant         CP#11
-  AssertAssignable     0, CP#12
-  ReturnTOS
+
 }
-ConstantPool {
-  [0] = Type #lib::B
-  [1] = InterfaceCall 'dart:core::Object::_simpleInstanceOf', ArgDesc num-args 2, num-type-args 0, names []
-  [2] = Reserved
-  [3] = ObjectRef '11'
-  [4] = DirectCall 'dart:core::print', ArgDesc num-args 1, num-type-args 0, names []
-  [5] = Reserved
-  [6] = Type #lib::C < dart:core::String, dart:core::int, dart:core::Object, dynamic >
-  [7] = InterfaceCall 'dart:core::Object::_instanceOf', ArgDesc num-args 4, num-type-args 0, names []
-  [8] = Reserved
-  [9] = ObjectRef '12'
-  [10] = Type #lib::A < dart:core::int >
-  [11] = ObjectRef ' in type cast'
-  [12] = SubtypeTestCache
-}
-]static method foo1(dynamic x) → dynamic {
-  if(x is self::B) {
-    core::print("11");
+]  class E<P extends dart.core::String = dart.core::String> extends dart.core::Object {
+    static factory •<P extends dart.core::String = dynamic>() → #lib::E<#lib::E::•::P>
+      return null;
+    method foo6<generic-covariant-impl T extends #lib::E::P = #lib::E::P, U extends dart.core::List<#lib::E::foo6::T> = dart.core::List<#lib::E::P>>(dart.core::Map<#lib::E::foo6::T, #lib::E::foo6::U> map) → void {}
   }
-  if(x is self::C<core::int, core::Object, dynamic>) {
-    core::print("12");
+  static field dart.core::List<dart.core::Iterable<dynamic>> globalVar;
+  static method foo1(dynamic x) → dynamic {
+    if(x is #lib::B) {
+      dart.core::print("11");
+    }
+    if(x is #lib::C<dart.core::int, dart.core::Object, dynamic>) {
+      dart.core::print("12");
+    }
+    return x as #lib::A<dart.core::int>;
   }
-  return x as self::A<core::int>;
+  static method foo5(dynamic x) → void {
+    #lib::globalVar = x as{TypeError} dart.core::List<dart.core::Iterable<dynamic>>;
+  }
+  static method main() → dynamic {}
 }
-[@vm.bytecode=
-Bytecode {
-  Entry                1
-  CheckStack           0
-  Push                 FP[-5]
-  PushConstant         CP#0
-  PushNull
-  PushNull
-  PushConstant         CP#1
-  AssertAssignable     0, CP#2
-  StoreStaticTOS       CP#3
-  PushNull
-  ReturnTOS
-}
-ConstantPool {
-  [0] = Type dart:core::List < dart:core::Iterable null >
-  [1] = ObjectRef ''
-  [2] = SubtypeTestCache
-  [3] = StaticField #lib::globalVar (field)
-}
-]static method foo5(dynamic x) → void {
-  self::globalVar = x as{TypeError} core::List<core::Iterable<dynamic>>;
-}
-[@vm.bytecode=
-Bytecode {
-  Entry                0
-  CheckStack           0
-  PushNull
-  ReturnTOS
-}
-ConstantPool {
-}
-]static method main() → dynamic {}
diff --git a/pkg/vm/tool/gen_kernel b/pkg/vm/tool/gen_kernel
index d0494c7..a968d05 100755
--- a/pkg/vm/tool/gen_kernel
+++ b/pkg/vm/tool/gen_kernel
@@ -8,6 +8,25 @@
 
 set -e
 
+ABI_VERSION=""
+HAS_PLATFORM=""
+ARGV=()
+
+for arg in "$@"; do
+  case $arg in
+    --abi-version=*)
+    ABI_VERSION="$(echo "$arg" | sed "s|--abi-version=||")"
+    ;;
+    --platform*)
+    HAS_PLATFORM="TRUE"
+    ARGV+=("$arg")
+    ;;
+    *)
+    ARGV+=("$arg")
+    ;;
+  esac
+done
+
 function follow_links() {
   file="$1"
   while [ -h "$file" ]; do
@@ -35,4 +54,18 @@
   OUT_DIR="$SDK_DIR/out"
 fi
 
-exec "$DART" $DART_VM_FLAGS "${SDK_DIR}/pkg/vm/bin/gen_kernel.dart" $@
+export DART_CONFIGURATION=${DART_CONFIGURATION:-ReleaseX64}
+BIN_DIR="$OUT_DIR/$DART_CONFIGURATION"
+
+if [ $ABI_VERSION ]; then
+  ABI_DIR="$BIN_DIR/dart-sdk/lib/_internal/abiversions/$ABI_VERSION"
+  PLATFORM=()
+  if [ -z $HAS_PLATFORM ]; then
+    PLATFORM+=("--platform" "$ABI_DIR/vm_platform_strong.dill")
+  fi
+  exec "$BIN_DIR/dart" $DART_VM_FLAGS --enable-interpreter \
+    "$ABI_DIR/gen_kernel_bytecode.dill" "${PLATFORM[@]}" "${ARGV[@]}"
+else
+  exec "$DART" $DART_VM_FLAGS \
+    "${SDK_DIR}/pkg/vm/bin/gen_kernel.dart" "${ARGV[@]}"
+fi
diff --git a/runtime/BUILD.gn b/runtime/BUILD.gn
index 919ee59..9ef4444 100644
--- a/runtime/BUILD.gn
+++ b/runtime/BUILD.gn
@@ -152,6 +152,7 @@
       "-Wall",
       "-Wextra",  # Also known as -W.
       "-Wno-unused-parameter",
+      "-Wno-unused-private-field",
       "-Wnon-virtual-dtor",
       "-Wvla",
       "-Wno-conversion-null",
diff --git a/runtime/bin/BUILD.gn b/runtime/bin/BUILD.gn
index 5724879..55e9d2e 100644
--- a/runtime/bin/BUILD.gn
+++ b/runtime/bin/BUILD.gn
@@ -136,7 +136,7 @@
     if (is_fuchsia) {
       configs -= [ "//build/config:symbol_visibility_hidden" ]
     }
-    deps = extra_deps
+    deps = [ ":generate_abi_version_cc_file" ] + extra_deps
 
     sources = [
       "address_sanitizer.cc",
@@ -152,6 +152,7 @@
       "snapshot_utils.h",
 
       # Very limited native resolver provided.
+      "$target_gen_dir/abi_version.cc",
       "builtin_common.cc",
       "builtin_gen_snapshot.cc",
       "dfe.cc",
@@ -647,8 +648,10 @@
 source_set("dart_kernel_platform_cc") {
   visibility = [ ":*" ]
   deps = [
+    ":gen_kernel_bytecode_dill",
     ":kernel_service_dill_linkable",
     ":platform_strong_dill_linkable",
+    "../../utils/kernel-service:kernel_service_bytecode_dill",
   ]
   sources = get_target_outputs(":kernel_service_dill_linkable") +
             get_target_outputs(":platform_strong_dill_linkable")
@@ -878,10 +881,6 @@
 }
 
 prebuilt_dart_action("gen_kernel_bytecode_dill") {
-  if (target_os == "fuchsia") {
-    testonly = true
-  }
-
   deps = [
     "../vm:vm_platform",
   ]
@@ -935,6 +934,7 @@
     ":dart_kernel_platform_cc",
     ":dart_snapshot_cc",
     ":gen_kernel_bytecode_dill",
+    ":generate_abi_version_cc_file",
     ":generate_snapshot_test_dat_file",
     ":libdart_builtin",
     ":standalone_dart_io",
@@ -963,6 +963,7 @@
   heap_tests = rebase_path(heap_sources_tests, ".", "../vm/heap")
 
   sources = [
+              "$target_gen_dir/abi_version.cc",
               "builtin.cc",
               "dfe.cc",
               "dfe.h",
diff --git a/runtime/bin/dartutils.cc b/runtime/bin/dartutils.cc
index 9252508..9211fc0 100644
--- a/runtime/bin/dartutils.cc
+++ b/runtime/bin/dartutils.cc
@@ -801,9 +801,9 @@
 Dart_CObject CObject::api_null_ = {Dart_CObject_kNull, {0}};
 Dart_CObject CObject::api_true_ = {Dart_CObject_kBool, {true}};
 Dart_CObject CObject::api_false_ = {Dart_CObject_kBool, {false}};
-CObject CObject::null_ = CObject(&api_null_);
-CObject CObject::true_ = CObject(&api_true_);
-CObject CObject::false_ = CObject(&api_false_);
+CObject CObject::null_(&api_null_);
+CObject CObject::true_(&api_true_);
+CObject CObject::false_(&api_false_);
 
 CObject* CObject::Null() {
   return &null_;
diff --git a/runtime/bin/dfe.cc b/runtime/bin/dfe.cc
index 517df57..0ef24e7 100644
--- a/runtime/bin/dfe.cc
+++ b/runtime/bin/dfe.cc
@@ -4,6 +4,9 @@
 
 #include "bin/dfe.h"
 
+#include <memory>
+
+#include "bin/abi_version.h"
 #include "bin/dartutils.h"
 #include "bin/directory.h"
 #include "bin/error_exit.h"
@@ -31,18 +34,6 @@
 namespace dart {
 namespace bin {
 
-#if defined(DART_NO_SNAPSHOT) || defined(DART_PRECOMPILER)
-const uint8_t* kernel_service_dill = NULL;
-const intptr_t kernel_service_dill_size = 0;
-const uint8_t* platform_strong_dill = NULL;
-const intptr_t platform_strong_dill_size = 0;
-#else
-const uint8_t* kernel_service_dill = kKernelServiceDill;
-const intptr_t kernel_service_dill_size = kKernelServiceDillSize;
-const uint8_t* platform_strong_dill = kPlatformStrongDill;
-const intptr_t platform_strong_dill_size = kPlatformStrongDillSize;
-#endif
-
 #if !defined(DART_PRECOMPILED_RUNTIME)
 DFE dfe;
 #endif
@@ -76,7 +67,19 @@
       use_incremental_compiler_(false),
       frontend_filename_(NULL),
       application_kernel_buffer_(NULL),
-      application_kernel_buffer_size_(0) {}
+      application_kernel_buffer_size_(0) {
+#if defined(DART_NO_SNAPSHOT) || defined(DART_PRECOMPILER)
+  kernel_service_dill_ = NULL;
+  kernel_service_dill_size_ = 0;
+  platform_strong_dill_ = NULL;
+  platform_strong_dill_size_ = 0;
+#else
+  kernel_service_dill_ = kKernelServiceDill;
+  kernel_service_dill_size_ = kKernelServiceDillSize;
+  platform_strong_dill_ = kPlatformStrongDill;
+  platform_strong_dill_size_ = kPlatformStrongDillSize;
+#endif
+}
 
 DFE::~DFE() {
   if (frontend_filename_ != NULL) {
@@ -90,56 +93,108 @@
 }
 
 void DFE::Init() {
-  if (platform_strong_dill == NULL) {
+  Init(AbiVersion::GetCurrent());
+}
+
+void DFE::Init(int target_abi_version) {
+  if (platform_strong_dill_ == NULL) {
     return;
   }
 
-  Dart_SetDartLibrarySourcesKernel(platform_strong_dill,
-                                   platform_strong_dill_size);
-
-  if (frontend_filename_ == NULL) {
-    // Look for the frontend snapshot next to the executable.
-    char* dir_prefix = GetDirectoryPrefixFromExeName();
-    // |dir_prefix| includes the last path seperator.
-    frontend_filename_ =
-        OS::SCreate(NULL, "%s%s", dir_prefix, kKernelServiceSnapshot);
-
-    if (!File::Exists(NULL, frontend_filename_)) {
-      // If the frontend snapshot is not found next to the executable,
-      // then look for it in the "snapshots" directory.
-      free(frontend_filename_);
-      // |dir_prefix| includes the last path seperator.
-      frontend_filename_ =
-          OS::SCreate(NULL, "%s%s%s%s", dir_prefix, kSnapshotsDirectory,
-                      File::PathSeparator(), kKernelServiceSnapshot);
-    }
-
-    free(dir_prefix);
-    if (!File::Exists(NULL, frontend_filename_)) {
-      free(frontend_filename_);
-      frontend_filename_ = NULL;
-    }
+  if (!InitKernelServiceAndPlatformDills(target_abi_version)) {
+    return;
   }
+
+  Dart_SetDartLibrarySourcesKernel(platform_strong_dill_,
+                                   platform_strong_dill_size_);
 }
 
-bool DFE::KernelServiceDillAvailable() {
-  return kernel_service_dill != NULL;
+bool DFE::InitKernelServiceAndPlatformDills(int target_abi_version) {
+  const char kAbiVersionsDir[] = "dart-sdk/lib/_internal/abiversions";
+  const char kKernelServiceDillFile[] = "kernel_service.dill";
+  const char kPlatformStrongDillFile[] = "vm_platform_strong.dill";
+
+  if (frontend_filename_ != NULL) {
+    return true;
+  }
+
+  // |dir_prefix| includes the last path seperator.
+  auto dir_prefix = std::unique_ptr<char, void (*)(void*)>(
+      GetDirectoryPrefixFromExeName(), free);
+
+  if (target_abi_version != AbiVersion::GetCurrent()) {
+    kernel_service_dill_ = NULL;
+    kernel_service_dill_size_ = 0;
+    platform_strong_dill_ = NULL;
+    platform_strong_dill_size_ = 0;
+
+    // Look in the old abi version directory.
+    char* script_uri =
+        OS::SCreate(NULL, "%s%s/%d/%s", dir_prefix.get(), kAbiVersionsDir,
+                    target_abi_version, kPlatformStrongDillFile);
+    if (!TryReadKernelFile(script_uri,
+                           const_cast<uint8_t**>(&platform_strong_dill_),
+                           &platform_strong_dill_size_)) {
+      Log::PrintErr("Can't find old ABI dill file: %s\n", script_uri);
+      free(script_uri);
+      return false;
+    }
+    free(script_uri);
+    script_uri =
+        OS::SCreate(NULL, "%s%s/%d/%s", dir_prefix.get(), kAbiVersionsDir,
+                    target_abi_version, kKernelServiceDillFile);
+    if (!TryReadKernelFile(script_uri,
+                           const_cast<uint8_t**>(&kernel_service_dill_),
+                           &kernel_service_dill_size_)) {
+      Log::PrintErr("Can't find old ABI dill file: %s\n", script_uri);
+      free(script_uri);
+      return false;
+    } else {
+      frontend_filename_ = script_uri;
+      return true;
+    }
+  }
+
+  // Look for the frontend snapshot next to the executable.
+  frontend_filename_ =
+      OS::SCreate(NULL, "%s%s", dir_prefix.get(), kKernelServiceSnapshot);
+  if (File::Exists(NULL, frontend_filename_)) {
+    return true;
+  }
+  free(frontend_filename_);
+  frontend_filename_ = NULL;
+
+  // If the frontend snapshot is not found next to the executable, then look for
+  // it in the "snapshots" directory.
+  frontend_filename_ =
+      OS::SCreate(NULL, "%s%s%s%s", dir_prefix.get(), kSnapshotsDirectory,
+                  File::PathSeparator(), kKernelServiceSnapshot);
+  if (File::Exists(NULL, frontend_filename_)) {
+    return true;
+  }
+  free(frontend_filename_);
+  frontend_filename_ = NULL;
+  return true;
+}
+
+bool DFE::KernelServiceDillAvailable() const {
+  return kernel_service_dill_ != NULL;
 }
 
 void DFE::LoadKernelService(const uint8_t** kernel_service_buffer,
                             intptr_t* kernel_service_buffer_size) {
-  *kernel_service_buffer = kernel_service_dill;
-  *kernel_service_buffer_size = kernel_service_dill_size;
+  *kernel_service_buffer = kernel_service_dill_;
+  *kernel_service_buffer_size = kernel_service_dill_size_;
 }
 
 void DFE::LoadPlatform(const uint8_t** kernel_buffer,
                        intptr_t* kernel_buffer_size) {
-  *kernel_buffer = platform_strong_dill;
-  *kernel_buffer_size = platform_strong_dill_size;
+  *kernel_buffer = platform_strong_dill_;
+  *kernel_buffer_size = platform_strong_dill_size_;
 }
 
 bool DFE::CanUseDartFrontend() const {
-  return (platform_strong_dill != NULL) &&
+  return (platform_strong_dill_ != NULL) &&
          (KernelServiceDillAvailable() || (frontend_filename() != NULL));
 }
 
@@ -191,8 +246,8 @@
   const char* sanitized_uri = script_uri;
 #endif
 
-  return Dart_CompileToKernel(sanitized_uri, platform_strong_dill,
-                              platform_strong_dill_size, incremental,
+  return Dart_CompileToKernel(sanitized_uri, platform_strong_dill_,
+                              platform_strong_dill_size_, incremental,
                               package_config);
 }
 
diff --git a/runtime/bin/dfe.h b/runtime/bin/dfe.h
index af520658..932936f 100644
--- a/runtime/bin/dfe.h
+++ b/runtime/bin/dfe.h
@@ -21,6 +21,7 @@
   // Call Init before Dart_Initialize to prevent races between the
   // different isolates.
   void Init();
+  void Init(int target_abi_version);
 
   char* frontend_filename() const { return frontend_filename_; }
 
@@ -78,7 +79,7 @@
                   uint8_t** kernel_buffer,
                   intptr_t* kernel_buffer_size) const;
 
-  static bool KernelServiceDillAvailable();
+  bool KernelServiceDillAvailable() const;
 
   // Tries to read [script_uri] as a Kernel IR file.
   // Returns `true` if successful and sets [kernel_file] and [kernel_length]
@@ -104,11 +105,17 @@
   bool use_dfe_;
   bool use_incremental_compiler_;
   char* frontend_filename_;
+  const uint8_t* kernel_service_dill_;
+  intptr_t kernel_service_dill_size_;
+  const uint8_t* platform_strong_dill_;
+  intptr_t platform_strong_dill_size_;
 
   // Kernel binary specified on the cmd line.
   uint8_t* application_kernel_buffer_;
   intptr_t application_kernel_buffer_size_;
 
+  bool InitKernelServiceAndPlatformDills(int target_abi_version);
+
   DISALLOW_COPY_AND_ASSIGN(DFE);
 };
 
diff --git a/runtime/bin/eventhandler_fuchsia.cc b/runtime/bin/eventhandler_fuchsia.cc
index 1b4769b..9f3b1df 100644
--- a/runtime/bin/eventhandler_fuchsia.cc
+++ b/runtime/bin/eventhandler_fuchsia.cc
@@ -32,7 +32,7 @@
 #include "platform/utils.h"
 
 // The EventHandler for Fuchsia uses its "ports v2" API:
-// https://fuchsia.googlesource.com/zircon/+/HEAD/docs/syscalls/port_create.md
+// https://fuchsia.googlesource.com/fuchsia/+/HEAD/zircon/docs/syscalls/port_create.md
 // This API does not have epoll()-like edge triggering (EPOLLET). Since clients
 // of the EventHandler expect edge-triggered notifications, we must simulate it.
 // When a packet from zx_port_wait() indicates that a signal is asserted for a
@@ -45,7 +45,7 @@
 // 4. Some time later the Dart thread actually does a write().
 // 5. After writing, the Dart thread resubscribes to write events.
 //
-// We use he same procedure for ZX_SOCKET_READABLE, and read()/accept().
+// We use the same procedure for ZX_SOCKET_READABLE, and read()/accept().
 
 // define EVENTHANDLER_LOG_ERROR to get log messages only for errors.
 // define EVENTHANDLER_LOG_INFO to get log messages for both information and
@@ -267,7 +267,23 @@
     LOG_INFO("IOHandle::ToggleEvents: fd=%ld de-asserting read\n", fd_);
     event_mask = event_mask & ~(1 << kInEvent);
   }
-  if ((event_mask & (1 << kInEvent)) != 0) {
+  // We may get In events without available bytes, so we must make sure there
+  // are actually bytes, or we will never resubscribe (due to a short-circuit
+  // on the Dart side).
+  //
+  // This happens due to how packets get enqueued on the port with all signals
+  // asserted at that time. Sometimes we enqueue a packet due to
+  // zx_object_wait_async e.g. for POLLOUT (writability) while the socket is
+  // readable and while we have a Read queued up on the Dart side. This packet
+  // will also have POLLIN (readable) asserted. We may then perform the Read
+  // and drain the socket before our zx_port_wait is serviced, at which point
+  // when we process the packet for POLLOUT with its stale POLLIN (readable)
+  // signal, the socket is no longer actually readable.
+  //
+  // As a detail, negative available bytes (errors) are handled specially; see
+  // IOHandle::AvailableBytes for more information.
+  if ((event_mask & (1 << kInEvent)) != 0 &&
+      FDUtils::AvailableBytes(fd_) != 0) {
     LOG_INFO("IOHandle::ToggleEvents: fd = %ld asserting read and disabling\n",
              fd_);
     read_events_enabled_ = false;
@@ -468,15 +484,15 @@
 
 void EventHandlerImplementation::HandlePacket(zx_port_packet_t* pkt) {
   LOG_INFO("HandlePacket: Got event packet: key=%lx\n", pkt->key);
-  LOG_INFO("HandlePacket: Got event packet: type=%lx\n", pkt->type);
-  LOG_INFO("HandlePacket: Got event packet: status=%ld\n", pkt->status);
+  LOG_INFO("HandlePacket: Got event packet: type=%x\n", pkt->type);
+  LOG_INFO("HandlePacket: Got event packet: status=%d\n", pkt->status);
   if (pkt->type == ZX_PKT_TYPE_USER) {
     ASSERT(pkt->key == kInterruptPacketKey);
     InterruptMessage* msg = reinterpret_cast<InterruptMessage*>(&pkt->user);
     HandleInterrupt(msg);
     return;
   }
-  LOG_INFO("HandlePacket: Got event packet: observed = %lx\n",
+  LOG_INFO("HandlePacket: Got event packet: observed = %x\n",
            pkt->signal.observed);
   LOG_INFO("HandlePacket: Got event packet: count = %ld\n", pkt->signal.count);
 
diff --git a/runtime/bin/ffi_test_functions.cc b/runtime/bin/ffi_test_functions.cc
index 248020d..c22939d 100644
--- a/runtime/bin/ffi_test_functions.cc
+++ b/runtime/bin/ffi_test_functions.cc
@@ -33,9 +33,60 @@
   return retval;
 }
 
-// Test 32-bit (int32_t) -> 64-bit (Dart int) sign extension and truncation.
-DART_EXPORT int32_t TestExtension() {
-  return 1UL << 31;
+//// Tests for sign and zero extension of arguments and results.
+
+DART_EXPORT uint8_t ReturnMaxUint8() {
+  return 0xff;
+}
+
+DART_EXPORT uint16_t ReturnMaxUint16() {
+  return 0xffff;
+}
+
+DART_EXPORT uint32_t ReturnMaxUint32() {
+  return 0xffffffff;
+}
+
+DART_EXPORT int8_t ReturnMinInt8() {
+  return 0x80;
+}
+
+DART_EXPORT int16_t ReturnMinInt16() {
+  return 0x8000;
+}
+
+DART_EXPORT int32_t ReturnMinInt32() {
+  return 0x80000000;
+}
+
+DART_EXPORT intptr_t TakeMaxUint8(uint8_t x) {
+  return x == 0xff ? 1 : 0;
+}
+
+DART_EXPORT intptr_t TakeMaxUint16(uint16_t x) {
+  return x == 0xffff ? 1 : 0;
+}
+
+DART_EXPORT intptr_t TakeMaxUint32(uint32_t x) {
+  return x == 0xffffffff ? 1 : 0;
+}
+
+DART_EXPORT intptr_t TakeMinInt8(int8_t x) {
+  const int64_t expected = -0x80;
+  const int64_t received = x;
+  return expected == received ? 1 : 0;
+}
+
+DART_EXPORT intptr_t TakeMinInt16(int16_t x) {
+  const int64_t expected = -0x8000;
+  const int64_t received = x;
+  return expected == received ? 1 : 0;
+}
+
+DART_EXPORT intptr_t TakeMinInt32(int32_t x) {
+  const int64_t expected = -(int32_t)0x80000000;
+  const int64_t received = x;
+  return expected == received ? 1 : 0;
 }
 
 // Performs some computation on various sized signed ints.
@@ -411,13 +462,11 @@
   return 0x80000000 * -1.0;
 }
 
-DART_EXPORT void* SmallPointer() {
-  intptr_t value = 0x80000000;
-  return reinterpret_cast<void*>(-value);
-}
-
+// Requires boxing on 32-bit and 64-bit systems, even if the top 32-bits are
+// truncated.
 DART_EXPORT void* LargePointer() {
-  return reinterpret_cast<void*>(-0x8000000000000000L);
+  uint64_t origin = 0x8100000082000000;
+  return *reinterpret_cast<void**>(&origin);
 }
 
 #if !defined(_WIN32)
diff --git a/runtime/bin/main.cc b/runtime/bin/main.cc
index f572e20..9117f38 100644
--- a/runtime/bin/main.cc
+++ b/runtime/bin/main.cc
@@ -379,7 +379,6 @@
 // For now we only support the kernel isolate coming up from an
 // application snapshot or from a .dill file.
 static Dart_Isolate CreateAndSetupKernelIsolate(const char* script_uri,
-                                                const char* main,
                                                 const char* package_root,
                                                 const char* packages_config,
                                                 Dart_IsolateFlags* flags,
@@ -424,9 +423,10 @@
     isolate_data =
         new IsolateData(uri, package_root, packages_config, app_snapshot);
     isolate = Dart_CreateIsolate(
-        DART_KERNEL_ISOLATE_NAME, main, isolate_snapshot_data,
-        isolate_snapshot_instructions, app_isolate_shared_data,
-        app_isolate_shared_instructions, flags, isolate_data, error);
+        DART_KERNEL_ISOLATE_NAME, DART_KERNEL_ISOLATE_NAME,
+        isolate_snapshot_data, isolate_snapshot_instructions,
+        app_isolate_shared_data, app_isolate_shared_instructions, flags,
+        isolate_data, error);
   }
   if (isolate == NULL) {
     // Clear error from app snapshot and re-trying from kernel file.
@@ -443,8 +443,9 @@
         const_cast<uint8_t*>(kernel_service_buffer),
         kernel_service_buffer_size);
     isolate = Dart_CreateIsolateFromKernel(
-        DART_KERNEL_ISOLATE_NAME, main, kernel_service_buffer,
-        kernel_service_buffer_size, flags, isolate_data, error);
+        DART_KERNEL_ISOLATE_NAME, DART_KERNEL_ISOLATE_NAME,
+        kernel_service_buffer, kernel_service_buffer_size, flags, isolate_data,
+        error);
   }
 
   if (isolate == NULL) {
@@ -463,7 +464,6 @@
 // For now we only support the service isolate coming up from sources
 // which are compiled by the VM parser.
 static Dart_Isolate CreateAndSetupServiceIsolate(const char* script_uri,
-                                                 const char* main,
                                                  const char* package_root,
                                                  const char* packages_config,
                                                  Dart_IsolateFlags* flags,
@@ -480,9 +480,9 @@
   const uint8_t* isolate_snapshot_instructions =
       app_isolate_snapshot_instructions;
   isolate = Dart_CreateIsolate(
-      script_uri, main, isolate_snapshot_data, isolate_snapshot_instructions,
-      app_isolate_shared_data, app_isolate_shared_instructions, flags,
-      isolate_data, error);
+      script_uri, DART_VM_SERVICE_ISOLATE_NAME, isolate_snapshot_data,
+      isolate_snapshot_instructions, app_isolate_shared_data,
+      app_isolate_shared_instructions, flags, isolate_data, error);
 #else
   // JIT: Service isolate uses the core libraries snapshot.
 
@@ -493,9 +493,9 @@
   const uint8_t* isolate_snapshot_instructions =
       core_isolate_snapshot_instructions;
   isolate = Dart_CreateIsolate(
-      script_uri, NULL, isolate_snapshot_data, isolate_snapshot_instructions,
-      app_isolate_shared_data, app_isolate_shared_instructions, flags,
-      isolate_data, error);
+      script_uri, DART_VM_SERVICE_ISOLATE_NAME, isolate_snapshot_data,
+      isolate_snapshot_instructions, app_isolate_shared_data,
+      app_isolate_shared_instructions, flags, isolate_data, error);
 #endif  // !defined(DART_PRECOMPILED_RUNTIME)
   if (isolate == NULL) {
     delete isolate_data;
@@ -529,7 +529,7 @@
 // Returns newly created Isolate on success, NULL on failure.
 static Dart_Isolate CreateIsolateAndSetupHelper(bool is_main_isolate,
                                                 const char* script_uri,
-                                                const char* main,
+                                                const char* name,
                                                 const char* package_root,
                                                 const char* packages_config,
                                                 Dart_IsolateFlags* flags,
@@ -626,17 +626,17 @@
     // application kernel binary is self contained or an incremental binary.
     // Isolate should be created only if it is a self contained kernel binary.
     isolate = Dart_CreateIsolateFromKernel(
-        script_uri, main, platform_kernel_buffer, platform_kernel_buffer_size,
+        script_uri, name, platform_kernel_buffer, platform_kernel_buffer_size,
         flags, isolate_data, error);
   } else {
     isolate = Dart_CreateIsolate(
-        script_uri, main, isolate_snapshot_data, isolate_snapshot_instructions,
+        script_uri, name, isolate_snapshot_data, isolate_snapshot_instructions,
         app_isolate_shared_data, app_isolate_shared_instructions, flags,
         isolate_data, error);
   }
 #else
   isolate = Dart_CreateIsolate(
-      script_uri, main, isolate_snapshot_data, isolate_snapshot_instructions,
+      script_uri, name, isolate_snapshot_data, isolate_snapshot_instructions,
       app_isolate_shared_data, app_isolate_shared_instructions, flags,
       isolate_data, error);
 #endif  // !defined(DART_PRECOMPILED_RUNTIME)
@@ -677,15 +677,13 @@
   int exit_code = 0;
 #if !defined(EXCLUDE_CFE_AND_KERNEL_PLATFORM)
   if (strcmp(script_uri, DART_KERNEL_ISOLATE_NAME) == 0) {
-    return CreateAndSetupKernelIsolate(script_uri, main, package_root,
-                                       package_config, flags, error,
-                                       &exit_code);
+    return CreateAndSetupKernelIsolate(script_uri, package_root, package_config,
+                                       flags, error, &exit_code);
   }
 #endif  // !defined(EXCLUDE_CFE_AND_KERNEL_PLATFORM)
   if (strcmp(script_uri, DART_VM_SERVICE_ISOLATE_NAME) == 0) {
-    return CreateAndSetupServiceIsolate(script_uri, main, package_root,
-                                        package_config, flags, error,
-                                        &exit_code);
+    return CreateAndSetupServiceIsolate(
+        script_uri, package_root, package_config, flags, error, &exit_code);
   }
   bool is_main_isolate = false;
   return CreateIsolateAndSetupHelper(is_main_isolate, script_uri, main,
@@ -693,21 +691,6 @@
                                      callback_data, error, &exit_code);
 }
 
-char* BuildIsolateName(const char* script_name, const char* func_name) {
-  // Skip past any slashes in the script name.
-  const char* last_slash = strrchr(script_name, '/');
-  if (last_slash != NULL) {
-    script_name = last_slash + 1;
-  }
-
-  const char* kFormat = "%s/%s";
-  intptr_t len = strlen(script_name) + strlen(func_name) + 2;
-  char* buffer = new char[len];
-  ASSERT(buffer != NULL);
-  snprintf(buffer, len, kFormat, script_name, func_name);
-  return buffer;
-}
-
 static void OnIsolateShutdown(void* callback_data) {
   Dart_EnterScope();
 
@@ -818,7 +801,6 @@
   char* error = NULL;
   bool is_main_isolate = true;
   int exit_code = 0;
-  char* isolate_name = BuildIsolateName(script_name, "main");
   Dart_IsolateFlags flags;
   Dart_IsolateFlagsInitialize(&flags);
 
@@ -828,7 +810,6 @@
       &exit_code);
 
   if (isolate == NULL) {
-    delete[] isolate_name;
     Log::PrintErr("%s\n", error);
     free(error);
     error = NULL;
@@ -843,7 +824,6 @@
     Platform::Exit((exit_code != 0) ? exit_code : kErrorExitCode);
   }
   main_isolate = isolate;
-  delete[] isolate_name;
 
   Dart_EnterIsolate(isolate);
   ASSERT(isolate == Dart_CurrentIsolate());
@@ -1125,7 +1105,7 @@
 // Note: must read platform only *after* VM flags are parsed because
 // they might affect how the platform is loaded.
 #if !defined(DART_PRECOMPILED_RUNTIME)
-  dfe.Init();
+  dfe.Init(Options::target_abi_version());
   uint8_t* application_kernel_buffer = NULL;
   intptr_t application_kernel_buffer_size = 0;
   dfe.ReadScript(script_name, &application_kernel_buffer,
diff --git a/runtime/bin/main_options.cc b/runtime/bin/main_options.cc
index d68bfaa..a0db7aa 100644
--- a/runtime/bin/main_options.cc
+++ b/runtime/bin/main_options.cc
@@ -351,8 +351,6 @@
   return true;
 }
 
-static bool checked_set = false;
-
 int Options::ParseArguments(int argc,
                             char** argv,
                             bool vm_run_app_snapshot,
@@ -376,14 +374,7 @@
       i++;
     } else {
       // Check if this flag is a potentially valid VM flag.
-      const char* kChecked = "-c";
-      const char* kCheckedFull = "--checked";
-      if ((strncmp(argv[i], kChecked, strlen(kChecked)) == 0) ||
-          (strncmp(argv[i], kCheckedFull, strlen(kCheckedFull)) == 0)) {
-        checked_set = true;
-        i++;
-        continue;  // '-c' is not a VM flag so don't add to vm options.
-      } else if (!OptionProcessor::IsValidFlag(argv[i], kPrefix, kPrefixLen)) {
+      if (!OptionProcessor::IsValidFlag(argv[i], kPrefix, kPrefixLen)) {
         break;
       }
       // The following two flags are processed by both the embedder and
@@ -485,9 +476,6 @@
         " run using a snapshot is invalid.\n");
     return -1;
   }
-  if (checked_set) {
-    vm_options->AddArgument("--enable-asserts");
-  }
 
   // If --snapshot is given without --snapshot-kind, default to script snapshot.
   if ((snapshot_filename_ != NULL) && (gen_snapshot_kind_ == kNone)) {
diff --git a/runtime/bin/process_android.cc b/runtime/bin/process_android.cc
index 54c1f3b..c26e462 100644
--- a/runtime/bin/process_android.cc
+++ b/runtime/bin/process_android.cc
@@ -547,6 +547,10 @@
             ReportChildError();
           }
 
+          if (program_environment_ != NULL) {
+            environ = program_environment_;
+          }
+
           // Report the final PID and do the exec.
           ReportPid(getpid());  // getpid cannot fail.
           char realpath[PATH_MAX];
diff --git a/runtime/bin/process_fuchsia.cc b/runtime/bin/process_fuchsia.cc
index 072e0da..0615daa 100644
--- a/runtime/bin/process_fuchsia.cc
+++ b/runtime/bin/process_fuchsia.cc
@@ -664,12 +664,10 @@
 
   zx_status_t AddPipe(int target_fd, int* local_fd,
                       fdio_spawn_action_t* action) {
-    zx_status_t status = fdio_pipe_half(&action->h.handle, &action->h.id);
-    if (status < 0)
-      return status;
-    *local_fd = status;
+    zx_status_t status = fdio_pipe_half2(local_fd, &action->h.handle);
+    if (status != ZX_OK) return status;
     action->action = FDIO_SPAWN_ACTION_ADD_HANDLE;
-    action->h.id = PA_HND(PA_HND_TYPE(action->h.id), target_fd);
+    action->h.id = PA_HND(PA_HND_TYPE(PA_FD), target_fd);
     return ZX_OK;
   }
 
@@ -677,11 +675,12 @@
   intptr_t BuildSpawnActions(fdio_ns_t* ns, fdio_spawn_action_t** actions_out) {
     const intptr_t fixed_actions_cnt = 4;
     intptr_t ns_cnt = 0;
+    zx_status_t status;
 
     // First, figure out how many namespace actions are needed.
     fdio_flat_namespace_t* flat_ns = nullptr;
     if (ns != nullptr) {
-      zx_status_t status = fdio_ns_export(ns, &flat_ns);
+      status = fdio_ns_export(ns, &flat_ns);
       if (status != ZX_OK) {
         LOG_ERR("ProcessStarter: BuildSpawnActions: fdio_ns_export: %s\n",
                 zx_status_get_string(status));
@@ -696,9 +695,33 @@
 
     // Fill in the entries for passing stdin/out/err handles, and the program
     // name.
-    AddPipe(0, &write_out_, &actions[0]);
-    AddPipe(1, &read_in_, &actions[1]);
-    AddPipe(2, &read_err_, &actions[2]);
+    status = AddPipe(0, &write_out_, &actions[0]);
+    if (status != ZX_OK) {
+      LOG_ERR("ProcessStarter: BuildSpawnActions: stdout AddPipe failed: %s\n",
+              zx_status_get_string(status));
+      if (flat_ns != nullptr) {
+        fdio_ns_free_flat_ns(flat_ns);
+      }
+      return -1;
+    }
+    status = AddPipe(1, &read_in_, &actions[1]);
+    if (status != ZX_OK) {
+      LOG_ERR("ProcessStarter: BuildSpawnActions: stdin AddPipe failed: %s\n",
+              zx_status_get_string(status));
+      if (flat_ns != nullptr) {
+        fdio_ns_free_flat_ns(flat_ns);
+      }
+      return -1;
+    }
+    status = AddPipe(2, &read_err_, &actions[2]);
+    if (status != ZX_OK) {
+      LOG_ERR("ProcessStarter: BuildSpawnActions: stderr AddPipe failed: %s\n",
+              zx_status_get_string(status));
+      if (flat_ns != nullptr) {
+        fdio_ns_free_flat_ns(flat_ns);
+      }
+      return -1;
+    }
     actions[3] = {
       .action = FDIO_SPAWN_ACTION_SET_NAME,
       .name.data = program_arguments_[0],
diff --git a/runtime/bin/process_macos.cc b/runtime/bin/process_macos.cc
index 830705c..d78db22 100644
--- a/runtime/bin/process_macos.cc
+++ b/runtime/bin/process_macos.cc
@@ -515,6 +515,14 @@
               (TEMP_FAILURE_RETRY(chdir(working_directory_)) == -1)) {
             ReportChildError();
           }
+#if !HOST_OS_IOS
+          if (program_environment_ != NULL) {
+            // On MacOS you have to do a bit of magic to get to the
+            // environment strings.
+            char*** environ = _NSGetEnviron();
+            *environ = program_environment_;
+          }
+#endif
 
           // Report the final PID and do the exec.
           ReportPid(getpid());  // getpid cannot fail.
diff --git a/runtime/bin/run_vm_tests.cc b/runtime/bin/run_vm_tests.cc
index f024c4d..4eb653e 100644
--- a/runtime/bin/run_vm_tests.cc
+++ b/runtime/bin/run_vm_tests.cc
@@ -148,9 +148,10 @@
         &isolate_snapshot_data, &isolate_snapshot_instructions);
     isolate_data = new bin::IsolateData(script_uri, package_root,
                                         packages_config, app_snapshot);
-    isolate = Dart_CreateIsolate(
-        DART_KERNEL_ISOLATE_NAME, main, isolate_snapshot_data,
-        isolate_snapshot_instructions, NULL, NULL, flags, isolate_data, error);
+    isolate =
+        Dart_CreateIsolate(DART_KERNEL_ISOLATE_NAME, DART_KERNEL_ISOLATE_NAME,
+                           isolate_snapshot_data, isolate_snapshot_instructions,
+                           NULL, NULL, flags, isolate_data, error);
     if (*error != NULL) {
       free(*error);
       *error = NULL;
diff --git a/runtime/bin/socket_fuchsia.cc b/runtime/bin/socket_fuchsia.cc
index d45119d..4af64a6 100644
--- a/runtime/bin/socket_fuchsia.cc
+++ b/runtime/bin/socket_fuchsia.cc
@@ -11,6 +11,7 @@
 
 #include "bin/eventhandler.h"
 #include "bin/fdutils.h"
+#include "bin/log.h"
 #include "platform/signal_blocker.h"
 
 // #define SOCKET_LOG_INFO 1
@@ -19,6 +20,7 @@
 // define SOCKET_LOG_ERROR to get log messages only for errors.
 // define SOCKET_LOG_INFO to get log messages for both information and errors.
 #if defined(SOCKET_LOG_INFO) || defined(SOCKET_LOG_ERROR)
+
 #define LOG_ERR(msg, ...)                                                      \
   {                                                                            \
     int err = errno;                                                           \
@@ -204,7 +206,7 @@
   intptr_t socket;
   struct sockaddr clientaddr;
   socklen_t addrlen = sizeof(clientaddr);
-  LOG_INFO("ServerSocket::Accept: calling accept(%ld)\n", listen_fd);
+  LOG_INFO("ServerSocket::Accept: calling accept(%ld)\n", fd);
   socket = listen_handle->Accept(&clientaddr, &addrlen);
   if (socket == -1) {
     if (IsTemporaryAcceptError(errno)) {
@@ -214,12 +216,11 @@
       ASSERT(kTemporaryFailure != -1);
       socket = kTemporaryFailure;
     } else {
-      LOG_ERR("ServerSocket::Accept: accept(%ld) failed\n", listen_fd);
+      LOG_ERR("ServerSocket::Accept: accept(%ld) failed\n", fd);
     }
   } else {
     IOHandle* io_handle = new IOHandle(socket);
-    LOG_INFO("ServerSocket::Accept: accept(%ld) -> socket %ld\n", listen_fd,
-             socket);
+    LOG_INFO("ServerSocket::Accept: accept(%ld) -> socket %ld\n", fd, socket);
     if (!FDUtils::SetCloseOnExec(socket)) {
       LOG_ERR("FDUtils::SetCloseOnExec(%ld) failed\n", socket);
       FDUtils::SaveErrorAndClose(socket);
diff --git a/runtime/include/dart_api.h b/runtime/include/dart_api.h
index 1c4c151..51a1f80 100644
--- a/runtime/include/dart_api.h
+++ b/runtime/include/dart_api.h
@@ -836,9 +836,8 @@
  *   The VM will provide this URI to the Dart_IsolateCreateCallback when a child
  *   isolate is created by Isolate.spawn. The embedder should use a URI that
  *   allows it to load the same program into such a child isolate.
- * \param main The name of the main entry point this isolate will run. Provided
- *   only for advisory purposes to improve debugging messages. Typically either
- *   'main' or the name of the function passed to Isolate.spawn.
+ * \param name A short name for the isolate to improve debugging messages.
+ *   Typically of the format 'foo.dart:main()'.
  * \param isolate_snapshot_data
  * \param isolate_snapshot_instructions Buffers containing a snapshot of the
  *   isolate or NULL if no snapshot is provided. If provided, the buffers must
@@ -855,7 +854,7 @@
  */
 DART_EXPORT Dart_Isolate
 Dart_CreateIsolate(const char* script_uri,
-                   const char* main,
+                   const char* name,
                    const uint8_t* isolate_snapshot_data,
                    const uint8_t* isolate_snapshot_instructions,
                    const uint8_t* shared_data,
@@ -876,9 +875,8 @@
  *   The VM will provide this URI to the Dart_IsolateCreateCallback when a child
  *   isolate is created by Isolate.spawn. The embedder should use a URI that
  *   allows it to load the same program into such a child isolate.
- * \param main The name of the main entry point this isolate will run. Provided
- *   only for advisory purposes to improve debugging messages. Typically either
- *   'main' or the name of the function passed to Isolate.spawn.
+ * \param name A short name for the isolate to improve debugging messages.
+ *   Typically of the format 'foo.dart:main()'.
  * \param kernel_buffer
  * \param kernel_buffer_size A buffer which contains a kernel/DIL program. Must
  *   remain valid until isolate shutdown.
@@ -894,7 +892,7 @@
  */
 DART_EXPORT Dart_Isolate
 Dart_CreateIsolateFromKernel(const char* script_uri,
-                             const char* main,
+                             const char* name,
                              const uint8_t* kernel_buffer,
                              intptr_t kernel_buffer_size,
                              Dart_IsolateFlags* flags,
diff --git a/runtime/lib/convert_patch.dart b/runtime/lib/convert_patch.dart
index 7342f87..d2cf222 100644
--- a/runtime/lib/convert_patch.dart
+++ b/runtime/lib/convert_patch.dart
@@ -53,7 +53,7 @@
 }
 
 class _JsonUtf8Decoder extends Converter<List<int>, Object> {
-  final _Reviver _reviver;
+  final Function(Object key, Object value) _reviver;
   final bool _allowMalformed;
 
   _JsonUtf8Decoder(this._reviver, this._allowMalformed);
@@ -193,7 +193,7 @@
 }
 
 class _ReviverJsonListener extends _BuildJsonListener {
-  final _Reviver reviver;
+  final Function(Object key, Object value) reviver;
   _ReviverJsonListener(this.reviver);
 
   void arrayElement() {
@@ -1456,7 +1456,7 @@
  */
 class _JsonStringDecoderSink extends StringConversionSinkBase {
   _JsonStringParser _parser;
-  final Function _reviver;
+  final Function(Object key, Object value) _reviver;
   final Sink<Object> _sink;
 
   _JsonStringDecoderSink(this._reviver, this._sink)
diff --git a/runtime/lib/ffi.cc b/runtime/lib/ffi.cc
index 6e1903b..d717fc9 100644
--- a/runtime/lib/ffi.cc
+++ b/runtime/lib/ffi.cc
@@ -559,18 +559,11 @@
   // https://github.com/dart-lang/sdk/issues/35773 DBC
   UNREACHABLE();
 #else
-  extern void GenerateFfiInverseTrampoline(
-      Assembler * assembler, const Function& signature, void* dart_entry_point);
-  ObjectPoolBuilder object_pool_builder;
-  Assembler assembler(&object_pool_builder);
-  GenerateFfiInverseTrampoline(&assembler, signature, dart_entry_point);
-  const Code& code = Code::Handle(
-      Code::FinalizeCodeAndNotify("inverse trampoline", nullptr, &assembler,
-                                  Code::PoolAttachment::kAttachPool, false));
 
-  uword entryPoint = code.EntryPoint();
-
-  return reinterpret_cast<void*>(entryPoint);
+  // TODO(dacoharkes): Implement this.
+  // https://github.com/dart-lang/sdk/issues/35761
+  // Look at StubCode::GenerateInvokeDartCodeStub.
+  UNREACHABLE();
 #endif
 }
 
diff --git a/runtime/lib/ffi_dynamic_library.cc b/runtime/lib/ffi_dynamic_library.cc
index af4a52e..4bd67e2 100644
--- a/runtime/lib/ffi_dynamic_library.cc
+++ b/runtime/lib/ffi_dynamic_library.cc
@@ -2,7 +2,8 @@
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
 
-#if !defined(TARGET_OS_LINUX) && !defined(TARGET_OS_MACOS)
+#if !defined(TARGET_OS_LINUX) && !defined(TARGET_OS_MACOS) &&                  \
+    !defined(TARGET_OS_ANDROID)
 // TODO(dacoharkes): Implement dynamic libraries for other targets & merge the
 // implementation with:
 // - runtime/bin/extensions.h
@@ -20,7 +21,8 @@
 namespace dart {
 
 static void* LoadExtensionLibrary(const char* library_file) {
-#if defined(TARGET_OS_LINUX) || defined(TARGET_OS_MACOS)
+#if defined(TARGET_OS_LINUX) || defined(TARGET_OS_MACOS) ||                    \
+    defined(TARGET_OS_ANDROID)
   void* handle = dlopen(library_file, RTLD_LAZY);
   if (handle == nullptr) {
     char* error = dlerror();
@@ -68,7 +70,8 @@
 }
 
 static void* ResolveSymbol(void* handle, const char* symbol) {
-#if defined(TARGET_OS_LINUX) || defined(TARGET_OS_MACOS)
+#if defined(TARGET_OS_LINUX) || defined(TARGET_OS_MACOS) ||                    \
+    defined(TARGET_OS_ANDROID)
   dlerror();  // Clear any errors.
   void* pointer = dlsym(handle, symbol);
   if (pointer == nullptr) {
diff --git a/runtime/lib/isolate.cc b/runtime/lib/isolate.cc
index b925147..55c61f8 100644
--- a/runtime/lib/isolate.cc
+++ b/runtime/lib/isolate.cc
@@ -130,9 +130,12 @@
 
     // Make a copy of the state's isolate flags and hand it to the callback.
     Dart_IsolateFlags api_flags = *(state_->isolate_flags());
+    const char* name = (state_->debug_name() == NULL) ? state_->function_name()
+                                                      : state_->debug_name();
+    ASSERT(name != NULL);
 
     Isolate* isolate = reinterpret_cast<Isolate*>((callback)(
-        state_->script_url(), state_->function_name(), state_->package_root(),
+        state_->script_url(), name, state_->package_root(),
         state_->package_config(), &api_flags, state_->init_data(), &error));
     state_->DecrementSpawnCount();
     if (isolate == NULL) {
@@ -182,7 +185,7 @@
   return result;
 }
 
-DEFINE_NATIVE_ENTRY(Isolate_spawnFunction, 0, 10) {
+DEFINE_NATIVE_ENTRY(Isolate_spawnFunction, 0, 11) {
   GET_NON_NULL_NATIVE_ARGUMENT(SendPort, port, arguments->NativeArgAt(0));
   GET_NON_NULL_NATIVE_ARGUMENT(String, script_uri, arguments->NativeArgAt(1));
   GET_NON_NULL_NATIVE_ARGUMENT(Instance, closure, arguments->NativeArgAt(2));
@@ -193,6 +196,7 @@
   GET_NATIVE_ARGUMENT(SendPort, onError, arguments->NativeArgAt(7));
   GET_NATIVE_ARGUMENT(String, packageRoot, arguments->NativeArgAt(8));
   GET_NATIVE_ARGUMENT(String, packageConfig, arguments->NativeArgAt(9));
+  GET_NATIVE_ARGUMENT(String, debugName, arguments->NativeArgAt(10));
 
   if (closure.IsClosure()) {
     Function& func = Function::Handle();
@@ -223,13 +227,15 @@
       const char* utf8_package_root = NULL;
       const char* utf8_package_config =
           packageConfig.IsNull() ? NULL : String2UTF8(packageConfig);
+      const char* utf8_debug_name =
+          debugName.IsNull() ? NULL : String2UTF8(debugName);
 
       IsolateSpawnState* state = new IsolateSpawnState(
           port.Id(), isolate->origin_id(), isolate->init_callback_data(),
           String2UTF8(script_uri), func, &message_buffer,
           isolate->spawn_count_monitor(), isolate->spawn_count(),
           utf8_package_root, utf8_package_config, paused.value(), fatal_errors,
-          on_exit_port, on_error_port);
+          on_exit_port, on_error_port, utf8_debug_name);
 
       // Since this is a call to Isolate.spawn, copy the parent isolate's code.
       state->isolate_flags()->copy_parent_code = true;
@@ -285,7 +291,7 @@
   return result;
 }
 
-DEFINE_NATIVE_ENTRY(Isolate_spawnUri, 0, 12) {
+DEFINE_NATIVE_ENTRY(Isolate_spawnUri, 0, 13) {
   GET_NON_NULL_NATIVE_ARGUMENT(SendPort, port, arguments->NativeArgAt(0));
   GET_NON_NULL_NATIVE_ARGUMENT(String, uri, arguments->NativeArgAt(1));
 
@@ -304,6 +310,8 @@
   GET_NATIVE_ARGUMENT(String, packageRoot, arguments->NativeArgAt(10));
   GET_NATIVE_ARGUMENT(String, packageConfig, arguments->NativeArgAt(11));
 
+  GET_NATIVE_ARGUMENT(String, debugName, arguments->NativeArgAt(12));
+
   if (Dart::vm_snapshot_kind() == Snapshot::kFullAOT) {
     const Array& args = Array::Handle(Array::New(1));
     args.SetAt(
@@ -347,12 +355,15 @@
   const char* utf8_package_root = NULL;
   const char* utf8_package_config =
       packageConfig.IsNull() ? NULL : String2UTF8(packageConfig);
+  const char* utf8_debug_name =
+      debugName.IsNull() ? NULL : String2UTF8(debugName);
 
   IsolateSpawnState* state = new IsolateSpawnState(
       port.Id(), isolate->init_callback_data(), canonical_uri,
       utf8_package_root, utf8_package_config, &arguments_buffer,
       &message_buffer, isolate->spawn_count_monitor(), isolate->spawn_count(),
-      paused.value(), fatal_errors, on_exit_port, on_error_port);
+      paused.value(), fatal_errors, on_exit_port, on_error_port,
+      utf8_debug_name);
 
   // If we were passed a value then override the default flags state for
   // checked mode.
@@ -378,6 +389,15 @@
   return Object::null();
 }
 
+DEFINE_NATIVE_ENTRY(Isolate_getDebugName, 0, 1) {
+  GET_NON_NULL_NATIVE_ARGUMENT(SendPort, port, arguments->NativeArgAt(0));
+  Isolate* isolate_lookup = Isolate::LookupIsolateByPort(port.Id());
+  if (isolate_lookup == NULL) {
+    return String::null();
+  }
+  return String::New(isolate_lookup->name());
+}
+
 DEFINE_NATIVE_ENTRY(Isolate_getPortAndCapabilitiesOfCurrentIsolate, 0, 0) {
   const Array& result = Array::Handle(Array::New(3));
   result.SetAt(0, SendPort::Handle(SendPort::New(isolate->main_port())));
diff --git a/runtime/lib/isolate_patch.dart b/runtime/lib/isolate_patch.dart
index 5e5c235..cdd5394 100644
--- a/runtime/lib/isolate_patch.dart
+++ b/runtime/lib/isolate_patch.dart
@@ -316,6 +316,9 @@
   static Isolate get current => _currentIsolate;
 
   @patch
+  String get debugName => _getDebugName(controlPort);
+
+  @patch
   static Future<Uri> get packageRoot {
     var hook = VMLibraryHooks.packageRootUriFuture;
     if (hook == null) {
@@ -352,7 +355,8 @@
       {bool paused: false,
       bool errorsAreFatal,
       SendPort onExit,
-      SendPort onError}) async {
+      SendPort onError,
+      String debugName}) async {
     // `paused` isn't handled yet.
     RawReceivePort readyPort;
     try {
@@ -377,8 +381,18 @@
         script = await Isolate.resolvePackageUri(script);
       }
 
-      _spawnFunction(readyPort.sendPort, script.toString(), entryPoint, message,
-          paused, errorsAreFatal, onExit, onError, null, packageConfig);
+      _spawnFunction(
+          readyPort.sendPort,
+          script.toString(),
+          entryPoint,
+          message,
+          paused,
+          errorsAreFatal,
+          onExit,
+          onError,
+          null,
+          packageConfig,
+          debugName);
       return await _spawnCommon(readyPort);
     } catch (e, st) {
       if (readyPort != null) {
@@ -398,7 +412,8 @@
       Map<String, String> environment,
       Uri packageRoot,
       Uri packageConfig,
-      bool automaticPackageResolution: false}) async {
+      bool automaticPackageResolution: false,
+      String debugName}) async {
     RawReceivePort readyPort;
     if (environment != null) {
       throw new UnimplementedError("environment");
@@ -467,7 +482,8 @@
           null,
           /* environment */
           packageRootString,
-          packageConfigString);
+          packageConfigString,
+          debugName);
       return await _spawnCommon(readyPort);
     } catch (e) {
       if (readyPort != null) {
@@ -524,7 +540,8 @@
       SendPort onExit,
       SendPort onError,
       String packageRoot,
-      String packageConfig) native "Isolate_spawnFunction";
+      String packageConfig,
+      String debugName) native "Isolate_spawnFunction";
 
   static void _spawnUri(
       SendPort readyPort,
@@ -538,10 +555,14 @@
       bool checked,
       List environment,
       String packageRoot,
-      String packageConfig) native "Isolate_spawnUri";
+      String packageConfig,
+      String debugName) native "Isolate_spawnUri";
 
   static void _sendOOB(port, msg) native "Isolate_sendOOB";
 
+  static String _getDebugName(SendPort controlPort)
+      native "Isolate_getDebugName";
+
   @patch
   void _pause(Capability resumeCapability) {
     var msg = new List(4)
diff --git a/runtime/lib/regexp.cc b/runtime/lib/regexp.cc
index aa58c5f..4dba76e 100644
--- a/runtime/lib/regexp.cc
+++ b/runtime/lib/regexp.cc
@@ -60,6 +60,22 @@
     return regexp.num_bracket_expressions();
   }
   const String& pattern = String::Handle(regexp.pattern());
+  const String& errmsg =
+      String::Handle(String::New("Regular expression is not initialized yet."));
+  const String& message = String::Handle(String::Concat(errmsg, pattern));
+  const Array& args = Array::Handle(Array::New(1));
+  args.SetAt(0, message);
+  Exceptions::ThrowByType(Exceptions::kFormat, args);
+  return Object::null();
+}
+
+DEFINE_NATIVE_ENTRY(RegExp_getGroupNameMap, 0, 1) {
+  const RegExp& regexp = RegExp::CheckedHandle(zone, arguments->NativeArgAt(0));
+  ASSERT(!regexp.IsNull());
+  if (regexp.is_initialized()) {
+    return regexp.capture_name_map();
+  }
+  const String& pattern = String::Handle(regexp.pattern());
   const String& errmsg = String::Handle(
       String::New("Regular expression is not initialized yet. "));
   const String& message = String::Handle(String::Concat(errmsg, pattern));
diff --git a/runtime/lib/regexp_patch.dart b/runtime/lib/regexp_patch.dart
index de20a72..4eac446 100644
--- a/runtime/lib/regexp_patch.dart
+++ b/runtime/lib/regexp_patch.dart
@@ -104,6 +104,8 @@
       new LinkedList<_RegExpHashKey>();
 
   int get _groupCount;
+  Iterable<String> get _groupNames;
+  int _groupNameIndex(String name);
 }
 
 // Represents both a key in the regular expression cache as well as its
@@ -133,7 +135,7 @@
   _RegExpHashValue(this.regexp, this.key);
 }
 
-class _RegExpMatch implements Match {
+class _RegExpMatch implements RegExpMatch {
   _RegExpMatch(this._regexp, this.input, this._match);
 
   int get start => _start(0);
@@ -176,6 +178,18 @@
 
   Pattern get pattern => _regexp;
 
+  String namedGroup(String name) {
+    var idx = _regexp._groupNameIndex(name);
+    if (idx < 0) {
+      throw ArgumentError("Not a capture group name: ${name}");
+    }
+    return group(idx);
+  }
+
+  Iterable<String> get groupNames {
+    return _regexp._groupNames;
+  }
+
   final RegExp _regexp;
   final String input;
   final List<int> _match;
@@ -240,6 +254,28 @@
 
   int get _groupCount native "RegExp_getGroupCount";
 
+  // Returns a List [String, int, String, int, ...] where each
+  // String is the name of a capture group and the following
+  // int is that capture group's index.
+  List get _groupNameList native "RegExp_getGroupNameMap";
+
+  Iterable<String> get _groupNames sync* {
+    final nameList = _groupNameList;
+    for (var i = 0; i < nameList.length; i += 2) {
+      yield nameList[i] as String;
+    }
+  }
+
+  int _groupNameIndex(String name) {
+    var nameList = _groupNameList;
+    for (var i = 0; i < nameList.length; i += 2) {
+      if (name == nameList[i]) {
+        return nameList[i + 1];
+      }
+    }
+    return -1;
+  }
+
   // Byte map of one byte characters with a 0xff if the character is a word
   // character (digit, letter or underscore) and 0x00 otherwise.
   // Used by generated RegExp code.
diff --git a/runtime/lib/string_patch.dart b/runtime/lib/string_patch.dart
index 0fcb35c..e75284a 100644
--- a/runtime/lib/string_patch.dart
+++ b/runtime/lib/string_patch.dart
@@ -628,10 +628,13 @@
   String replaceAll(Pattern pattern, String replacement) {
     if (pattern == null) throw new ArgumentError.notNull("pattern");
     if (replacement == null) throw new ArgumentError.notNull("replacement");
-    List matches = [];
-    int length = 0;
-    int replacementLength = replacement.length;
+
     int startIndex = 0;
+    // String fragments that replace the the prefix [this] up to [startIndex].
+    List matches = [];
+    int length = 0; // Length of all fragments.
+    int replacementLength = replacement.length;
+
     if (replacementLength == 0) {
       for (Match match in pattern.allMatches(this)) {
         length += _addReplaceSlice(matches, startIndex, match.start);
@@ -645,6 +648,8 @@
         startIndex = match.end;
       }
     }
+    // No match, or a zero-length match at start with zero-length replacement.
+    if (startIndex == 0 && length == 0) return this;
     length += _addReplaceSlice(matches, startIndex, this.length);
     bool replacementIsOneByte = replacement._isOneByte;
     if (replacementIsOneByte &&
diff --git a/runtime/lib/timer_impl.dart b/runtime/lib/timer_impl.dart
index f6e85bd..d61c71d 100644
--- a/runtime/lib/timer_impl.dart
+++ b/runtime/lib/timer_impl.dart
@@ -430,9 +430,10 @@
 
   // Cancel pending wakeups in the event handler.
   static void _cancelWakeup() {
-    assert(_sendPort != null);
-    VMLibraryHooks.eventHandlerSendData(null, _sendPort, _NO_TIMER);
-    _scheduledWakeupTime = null;
+    if (_sendPort != null) {
+      VMLibraryHooks.eventHandlerSendData(null, _sendPort, _NO_TIMER);
+      _scheduledWakeupTime = null;
+    }
   }
 
   // Create a receive port and register a message handler for the timer
diff --git a/runtime/lib/typed_data.cc b/runtime/lib/typed_data.cc
index 1c55247..af97a0f 100644
--- a/runtime/lib/typed_data.cc
+++ b/runtime/lib/typed_data.cc
@@ -203,20 +203,16 @@
 #undef TYPED_DATA_NEW_NATIVE
 #undef TYPED_DATA_NEW
 
-#define TYPED_DATA_VIEW_NEW(native_name, cid_name)                             \
+#define TYPED_DATA_VIEW_NEW(native_name, cid)                                  \
   DEFINE_NATIVE_ENTRY(native_name, 0, 4) {                                     \
-    GET_NON_NULL_NATIVE_ARGUMENT(Instance, typed_data,                         \
+    GET_NON_NULL_NATIVE_ARGUMENT(TypedDataBase, typed_data,                    \
                                  arguments->NativeArgAt(1));                   \
     GET_NON_NULL_NATIVE_ARGUMENT(Smi, offset, arguments->NativeArgAt(2));      \
     GET_NON_NULL_NATIVE_ARGUMENT(Smi, len, arguments->NativeArgAt(3));         \
-    const intptr_t backing_length =                                            \
-        typed_data.IsTypedData()                                               \
-            ? TypedData::Cast(typed_data).LengthInBytes()                      \
-            : ExternalTypedData::Cast(typed_data).LengthInBytes();             \
-    const intptr_t cid = cid_name;                                             \
+    const intptr_t backing_length = typed_data.LengthInBytes();                \
     const intptr_t offset_in_bytes = offset.Value();                           \
     const intptr_t length = len.Value();                                       \
-    const intptr_t element_size = TypedDataView::ElementSizeInBytes(cid);      \
+    const intptr_t element_size = TypedDataBase::ElementSizeInBytes(cid);      \
     AlignmentCheck(offset_in_bytes, element_size);                             \
     LengthCheck(offset_in_bytes + length * element_size, backing_length);      \
     return TypedDataView::New(cid, typed_data, offset_in_bytes, length);       \
diff --git a/runtime/observatory/.packages b/runtime/observatory/.packages
index 69347be..914bffb 100644
--- a/runtime/observatory/.packages
+++ b/runtime/observatory/.packages
@@ -32,3 +32,4 @@
 term_glyph:../../third_party/pkg/term_glyph/lib
 test:../../third_party/pkg/test/lib
 typed_data:../../third_party/pkg/typed_data/lib
+observatory_test_package:tests/service/observatory_test_package
diff --git a/runtime/observatory/lib/src/elements/script_inset.dart b/runtime/observatory/lib/src/elements/script_inset.dart
index 3a46dab..c386824 100644
--- a/runtime/observatory/lib/src/elements/script_inset.dart
+++ b/runtime/observatory/lib/src/elements/script_inset.dart
@@ -476,7 +476,7 @@
     var rootUri = Uri.parse(script.library.uri);
     if (rootUri.scheme == 'dart') {
       // The relative paths from dart:* libraries to their parts are not valid.
-      rootUri = new Uri.directory(script.library.uri);
+      rootUri = Uri.parse(script.library.uri + '/');
     }
     var targetUri = rootUri.resolve(relativeUri);
     for (M.Script s in script.library.scripts) {
diff --git a/runtime/observatory/tests/service/breakpoint_in_package_parts_class_file_uri_test.dart b/runtime/observatory/tests/service/breakpoint_in_package_parts_class_file_uri_test.dart
new file mode 100644
index 0000000..52dee71
--- /dev/null
+++ b/runtime/observatory/tests/service/breakpoint_in_package_parts_class_file_uri_test.dart
@@ -0,0 +1,43 @@
+// Copyright (c) 2019, the Dart project authors.  Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+library breakpoint_in_parts_class;
+
+import 'dart:io' show Platform;
+
+import 'package:observatory_test_package/has_part.dart' as hasPart;
+import 'package:path/path.dart' as path;
+import 'test_helper.dart';
+import 'service_test_common.dart';
+
+// Chop off the file name.
+String baseDirectory = path.dirname(Platform.script.path) + '/';
+Uri baseUri = Platform.script.replace(path: baseDirectory);
+Uri breakpointFile = baseUri.resolve('observatory_test_package/the_part.dart');
+const String shortFile = "the_part.dart";
+
+const int LINE = 87;
+
+code() {
+  hasPart.main();
+}
+
+List<String> stops = [];
+
+List<String> expected = [
+  "$shortFile:${LINE + 0}:5", // on 'print'
+  "$shortFile:${LINE + 1}:3" // on class ending '}'
+];
+
+var tests = <IsolateTest>[
+  hasPausedAtStart,
+  setBreakpointAtUriAndLine(breakpointFile.toString(), LINE),
+  runStepThroughProgramRecordingStops(stops),
+  checkRecordedStops(stops, expected)
+];
+
+main(args) {
+  runIsolateTestsSynchronous(args, tests,
+      testeeConcurrent: code, pause_on_start: true, pause_on_exit: true);
+}
diff --git a/runtime/observatory/tests/service/breakpoint_in_package_parts_class_test.dart b/runtime/observatory/tests/service/breakpoint_in_package_parts_class_test.dart
new file mode 100644
index 0000000..504065d
--- /dev/null
+++ b/runtime/observatory/tests/service/breakpoint_in_package_parts_class_test.dart
@@ -0,0 +1,36 @@
+// Copyright (c) 2019, the Dart project authors.  Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+library breakpoint_in_parts_class;
+
+import 'package:observatory_test_package/has_part.dart' as hasPart;
+import 'test_helper.dart';
+import 'service_test_common.dart';
+
+const int LINE = 87;
+const String breakpointFile = "package:observatory_test_package/the_part.dart";
+const String shortFile = "the_part.dart";
+
+code() {
+  hasPart.main();
+}
+
+List<String> stops = [];
+
+List<String> expected = [
+  "$shortFile:${LINE + 0}:5", // on 'print'
+  "$shortFile:${LINE + 1}:3" // on class ending '}'
+];
+
+var tests = <IsolateTest>[
+  hasPausedAtStart,
+  setBreakpointAtUriAndLine(breakpointFile, LINE),
+  runStepThroughProgramRecordingStops(stops),
+  checkRecordedStops(stops, expected)
+];
+
+main(args) {
+  runIsolateTestsSynchronous(args, tests,
+      testeeConcurrent: code, pause_on_start: true, pause_on_exit: true);
+}
diff --git a/runtime/observatory/tests/service/breakpoint_partfile_test.dart b/runtime/observatory/tests/service/breakpoint_partfile_test.dart
new file mode 100644
index 0000000..33e80f5
--- /dev/null
+++ b/runtime/observatory/tests/service/breakpoint_partfile_test.dart
@@ -0,0 +1,37 @@
+// Copyright (c) 2019, the Dart project authors.  Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+library breakpoint_in_parts_class;
+
+import 'package:observatory_test_package/has_part.dart' as hasPart;
+import 'test_helper.dart';
+import 'service_test_common.dart';
+
+const int LINE = 8;
+const String breakpointFile =
+    "package:observatory_test_package/the_part_2.dart";
+const String shortFile = "the_part_2.dart";
+
+code() {
+  hasPart.bar();
+}
+
+List<String> stops = [];
+
+List<String> expected = [
+  "$shortFile:${LINE + 0}:3", // on 'print'
+  "$shortFile:${LINE + 1}:1" // on class ending '}'
+];
+
+var tests = <IsolateTest>[
+  hasPausedAtStart,
+  setBreakpointAtUriAndLine(breakpointFile, LINE),
+  runStepThroughProgramRecordingStops(stops),
+  checkRecordedStops(stops, expected)
+];
+
+main(args) {
+  runIsolateTestsSynchronous(args, tests,
+      testeeConcurrent: code, pause_on_start: true, pause_on_exit: true);
+}
diff --git a/runtime/observatory/tests/service/dev_fs_spawn_test.dart b/runtime/observatory/tests/service/dev_fs_spawn_test.dart
index c0a182e..1221a58 100644
--- a/runtime/observatory/tests/service/dev_fs_spawn_test.dart
+++ b/runtime/observatory/tests/service/dev_fs_spawn_test.dart
@@ -118,7 +118,7 @@
       if (event.kind == ServiceEvent.kIsolateSpawn) {
         expect(event.spawnToken, equals('mySpawnToken0'));
         expect(event.isolate, isNotNull);
-        expect(event.isolate.name, equals('devfs_file0.dart:main()'));
+        expect(event.isolate.name, equals('main'));
         completer.complete(event.isolate);
         sub.cancel();
       }
@@ -147,7 +147,7 @@
       if (event.kind == ServiceEvent.kIsolateSpawn) {
         expect(event.spawnToken, equals('mySpawnToken1'));
         expect(event.isolate, isNotNull);
-        expect(event.isolate.name, equals('devfs_file1.dart:main()'));
+        expect(event.isolate.name, equals('main'));
         completer.complete(event.isolate);
         sub.cancel();
       }
@@ -177,7 +177,7 @@
       if (event.kind == ServiceEvent.kIsolateSpawn) {
         expect(event.spawnToken, equals('mySpawnToken2'));
         expect(event.isolate, isNotNull);
-        expect(event.isolate.name, equals('devfs_file2.dart:main()'));
+        expect(event.isolate.name, equals('main'));
         completer.complete(event.isolate);
         sub.cancel();
       }
diff --git a/runtime/observatory/tests/service/observatory_test_package/.packages b/runtime/observatory/tests/service/observatory_test_package/.packages
new file mode 100644
index 0000000..684be4e
--- /dev/null
+++ b/runtime/observatory/tests/service/observatory_test_package/.packages
@@ -0,0 +1 @@
+observatory_test_package:.
\ No newline at end of file
diff --git a/runtime/observatory/tests/service/observatory_test_package/has_part.dart b/runtime/observatory/tests/service/observatory_test_package/has_part.dart
new file mode 100644
index 0000000..381f7e8
--- /dev/null
+++ b/runtime/observatory/tests/service/observatory_test_package/has_part.dart
@@ -0,0 +1,13 @@
+// Copyright (c) 2019, the Dart project authors.  Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+library has_part;
+
+part 'the_part.dart';
+part 'the_part_2.dart';
+
+main() {
+  Foo10 foo = new Foo10("Foo!");
+  print(foo);
+}
diff --git a/runtime/observatory/tests/service/observatory_test_package/the_part.dart b/runtime/observatory/tests/service/observatory_test_package/the_part.dart
new file mode 100644
index 0000000..d8545f8
--- /dev/null
+++ b/runtime/observatory/tests/service/observatory_test_package/the_part.dart
@@ -0,0 +1,91 @@
+// Copyright (c) 2019, the Dart project authors.  Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+part of has_part;
+
+void foo() {
+  print("lalala");
+}
+
+class Foo1 {
+  final foo;
+
+  Foo1(this.foo) {
+    print("hello from foo!");
+  }
+}
+
+class Foo2 {
+  final foo;
+
+  Foo2(this.foo) {
+    print("hello from foo!");
+  }
+}
+
+class Foo3 {
+  final foo;
+
+  Foo3(this.foo) {
+    print("hello from foo!");
+  }
+}
+
+class Foo4 {
+  final foo;
+
+  Foo4(this.foo) {
+    print("hello from foo!");
+  }
+}
+
+class Foo5 {
+  final foo;
+
+  Foo5(this.foo) {
+    print("hello from foo!");
+  }
+}
+
+class Foo6 {
+  final foo;
+
+  Foo6(this.foo) {
+    print("hello from foo!");
+  }
+}
+
+class Foo7 {
+  final foo;
+
+  Foo7(this.foo) {
+    print("hello from foo!");
+  }
+}
+
+class Foo8 {
+  final foo;
+
+  Foo8(this.foo) {
+    print("hello from foo!");
+  }
+}
+
+class Foo9 {
+  final foo;
+
+  Foo9(this.foo) {
+    print("hello from foo!");
+  }
+}
+
+class Foo10 {
+  final foo;
+
+  Foo10(this.foo) {
+    print("hello from foo!");
+  }
+}
+
+var foo2 = foo() as dynamic;
diff --git a/runtime/observatory/tests/service/observatory_test_package/the_part_2.dart b/runtime/observatory/tests/service/observatory_test_package/the_part_2.dart
new file mode 100644
index 0000000..c38df9c
--- /dev/null
+++ b/runtime/observatory/tests/service/observatory_test_package/the_part_2.dart
@@ -0,0 +1,9 @@
+// Copyright (c) 2019, the Dart project authors.  Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+part of has_part;
+
+void bar() {
+  print('Should break here');
+}
diff --git a/runtime/observatory/tests/service/service_kernel.status b/runtime/observatory/tests/service/service_kernel.status
index b72cf4c..086e741a 100644
--- a/runtime/observatory/tests/service/service_kernel.status
+++ b/runtime/observatory/tests/service/service_kernel.status
@@ -140,6 +140,7 @@
 async_generator_breakpoint_test: SkipByDesign # No incremental compiler available.
 bad_reload_test: Skip # Times out on sim architectures, also RuntimeError.
 break_on_activation_test: RuntimeError # Issue #34736
+breakpoint_in_package_parts_class_file_uri_test: RuntimeError # Issue #34736
 complex_reload_test: Skip # Times out on sim architectures, also RuntimeError.
 debugger_inspect_test: RuntimeError, Timeout # Issue #34736
 developer_service_get_isolate_id_test: RuntimeError # Issue #34736
diff --git a/runtime/observatory/tests/service/set_name_rpc_test.dart b/runtime/observatory/tests/service/set_name_rpc_test.dart
index 1d743cc..186e4e0 100644
--- a/runtime/observatory/tests/service/set_name_rpc_test.dart
+++ b/runtime/observatory/tests/service/set_name_rpc_test.dart
@@ -10,11 +10,7 @@
 
 var tests = <IsolateTest>[
   (Isolate isolate) async {
-    expect(
-        ((isolate.name == 'set_name_rpc_test.dart:main()') ||
-            (isolate.name == 'out.jitsnapshot:main()')),
-        isTrue);
-
+    expect(isolate.name == 'main', isTrue);
     Completer completer = new Completer();
     var stream = await isolate.vm.getEventStream(VM.kIsolateStream);
     var subscription;
diff --git a/runtime/observatory/tests/service/simple_reload_test.dart b/runtime/observatory/tests/service/simple_reload_test.dart
index 9a41817..3ae8295 100644
--- a/runtime/observatory/tests/service/simple_reload_test.dart
+++ b/runtime/observatory/tests/service/simple_reload_test.dart
@@ -1,6 +1,8 @@
 // Copyright (c) 2018, the Dart project authors.  Please see the AUTHORS file
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
+//
+// OtherResources=simple_reload/v1/main.dart simple_reload/v2/main.dart
 
 import 'test_helper.dart';
 import 'dart:async';
diff --git a/runtime/platform/globals.h b/runtime/platform/globals.h
index 07d2d03..be43b30 100644
--- a/runtime/platform/globals.h
+++ b/runtime/platform/globals.h
@@ -376,8 +376,9 @@
 
 // Determine whether dual mapping of code pages is supported.
 // We test dual mapping on linux x64 and deploy it on fuchsia.
-#if defined(TARGET_OS_LINUX) && defined(TARGET_ARCH_X64) ||                    \
-    defined(TARGET_OS_FUCHSIA)
+#if !defined(DART_PRECOMPILED_RUNTIME) &&                                      \
+    (defined(TARGET_OS_LINUX) && defined(TARGET_ARCH_X64) ||                   \
+     defined(TARGET_OS_FUCHSIA))
 #define DUAL_MAPPING_SUPPORTED 1
 #endif
 
@@ -530,8 +531,8 @@
 #if !defined(DISALLOW_COPY_AND_ASSIGN)
 #define DISALLOW_COPY_AND_ASSIGN(TypeName)                                     \
  private:                                                                      \
-  TypeName(const TypeName&);                                                   \
-  void operator=(const TypeName&)
+  TypeName(const TypeName&) = delete;                                          \
+  void operator=(const TypeName&) = delete
 #endif  // !defined(DISALLOW_COPY_AND_ASSIGN)
 
 // A macro to disallow all the implicit constructors, namely the default
@@ -542,7 +543,7 @@
 #if !defined(DISALLOW_IMPLICIT_CONSTRUCTORS)
 #define DISALLOW_IMPLICIT_CONSTRUCTORS(TypeName)                               \
  private:                                                                      \
-  TypeName();                                                                  \
+  TypeName() = delete;                                                         \
   DISALLOW_COPY_AND_ASSIGN(TypeName)
 #endif  // !defined(DISALLOW_IMPLICIT_CONSTRUCTORS)
 
diff --git a/runtime/tests/vm/dart/regress_36374_test.dart b/runtime/tests/vm/dart/regress_36374_test.dart
new file mode 100644
index 0000000..45df0f1
--- /dev/null
+++ b/runtime/tests/vm/dart/regress_36374_test.dart
@@ -0,0 +1,29 @@
+// Copyright (c) 2019, the Dart project authors.  Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+//
+// Regression test for https://github.com/dart-lang/sdk/issues/36374.
+//
+// Bytecode flow graph builder should be able to correctly handle non-empty
+// expression stack when throwing an exception: dropping some of the entries,
+// while keeping entries which could still be used.
+//
+// VMOptions=--optimization_counter_threshold=10 --deterministic
+
+class Foo {
+  Foo(int x);
+}
+
+class Bar {
+  Bar(String y, Foo z);
+}
+
+foo(Object arg) {
+  return Bar('abc', arg == null ? null : Foo((throw 'Err')));
+}
+
+main() {
+  for (int i = 0; i < 20; ++i) {
+    foo(null);
+  }
+}
diff --git a/runtime/tests/vm/dart/trigger_gc_in_native_test.dart b/runtime/tests/vm/dart/trigger_gc_in_native_test.dart
new file mode 100644
index 0000000..4205fa6
--- /dev/null
+++ b/runtime/tests/vm/dart/trigger_gc_in_native_test.dart
@@ -0,0 +1,31 @@
+// Copyright (c) 2019, the Dart project authors.  Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+// VMOptions=--no_concurrent_mark --no_concurrent_sweep
+// VMOptions=--no_concurrent_mark --concurrent_sweep
+// VMOptions=--no_concurrent_mark --use_compactor
+// VMOptions=--no_concurrent_mark --use_compactor --force_evacuation
+// VMOptions=--concurrent_mark --no_concurrent_sweep
+// VMOptions=--concurrent_mark --concurrent_sweep
+// VMOptions=--concurrent_mark --use_compactor
+// VMOptions=--concurrent_mark --use_compactor --force_evacuation
+
+import 'dart:typed_data';
+
+main() {
+  final List<List> arrays = [];
+  // Fill up heap with alternate large-small items.
+  for (int i = 0; i < 500000; i++) {
+    arrays.add(new Uint32List(260));
+    arrays.add(new Uint32List(1));
+  }
+  // Clear the large items so the heap has large gaps.
+  for (int i = 0; i < arrays.length; i += 2) {
+    arrays[i] = null;
+  }
+  // Allocate a lot of large items which don't fit in the gaps created above.
+  for (int i = 0; i < 600000; i++) {
+    arrays.add(new Uint32List(300));
+  }
+}
diff --git a/runtime/tools/dartfuzz/dartfuzz.dart b/runtime/tools/dartfuzz/dartfuzz.dart
index 12f1d93..27cd715 100644
--- a/runtime/tools/dartfuzz/dartfuzz.dart
+++ b/runtime/tools/dartfuzz/dartfuzz.dart
@@ -8,11 +8,12 @@
 import 'package:args/args.dart';
 
 import 'dartfuzz_values.dart';
+import 'dartfuzz_api_table.dart';
 
 // Version of DartFuzz. Increase this each time changes are made
 // to preserve the property that a given version of DartFuzz yields
 // the same fuzzed program for a deterministic random seed.
-const String version = '1.4';
+const String version = '1.5';
 
 // Restriction on statement and expression depths.
 const int stmtDepth = 2;
@@ -65,6 +66,16 @@
     emitLn('// The Dart Project Fuzz Tester ($version).');
     emitLn('// Program generated as:');
     emitLn('//   dart dartfuzz.dart --seed $seed');
+    emitLn('');
+    emitLn("import 'dart:async';");
+    emitLn("import 'dart:cli';");
+    emitLn("import 'dart:collection';");
+    emitLn("import 'dart:convert';");
+    emitLn("import 'dart:core';");
+    emitLn("import 'dart:io';");
+    emitLn("import 'dart:isolate';");
+    emitLn("import 'dart:math';");
+    emitLn("import 'dart:typed_data';");
   }
 
   void emitMethods(String name, List<List<DartType>> methods) {
@@ -283,7 +294,7 @@
   bool emitForIn(int depth) {
     int i = localVars.length;
     emitLn('for (var $localName$i in ', newline: false);
-    emitExpr(0, DartType.INT_LIST);
+    emitExpr(0, rand.nextBool() ? DartType.INT_LIST : DartType.INT_SET);
     emit(') {', newline: true);
     indent += 2;
     nest++;
@@ -486,30 +497,26 @@
   }
 
   void emitInt() {
-    switch (rand.nextInt(4)) {
-      // Favors small positive int.
+    switch (rand.nextInt(7)) {
+      // Favors small ints.
       case 0:
-        emit('${oneOf(DartFuzzValues.interestingIntegers)}');
-        break;
       case 1:
+      case 2:
+        emitSmallPositiveInt();
+        break;
+      case 3:
+      case 4:
+      case 5:
         emitSmallNegativeInt();
         break;
       default:
-        emitSmallPositiveInt();
+        emit('${oneOf(DartFuzzValues.interestingIntegers)}');
         break;
     }
   }
 
   void emitDouble() {
-    switch (rand.nextInt(10)) {
-      // Favors regular double.
-      case 0:
-        emit(oneOf(DartFuzzValues.interestingDoubles));
-        break;
-      default:
-        emit('${rand.nextDouble()}');
-        break;
-    }
+    emit('${rand.nextDouble()}');
   }
 
   void emitChar() {
@@ -519,8 +526,8 @@
         emit(oneOf(DartFuzzValues.interestingChars));
         break;
       default:
-        emit(DartFuzzValues.regularChars[
-            rand.nextInt(DartFuzzValues.interestingChars.length)]);
+        emit(DartFuzzValues
+            .regularChars[rand.nextInt(DartFuzzValues.regularChars.length)]);
         break;
     }
   }
@@ -534,8 +541,8 @@
     emit("'");
   }
 
-  void emitIntList() {
-    emit('[ ');
+  void emitList(String open, String close) {
+    emit('$open ');
     int l = 1 + rand.nextInt(4);
     for (int i = 0; i < l; i++) {
       emitInt();
@@ -543,10 +550,10 @@
         emit(', ');
       }
     }
-    emit(' ]');
+    emit(' $close');
   }
 
-  void emitIntStringMap() {
+  void emitMap() {
     emit('{ ');
     int l = 1 + rand.nextInt(4);
     for (int i = 0; i < l; i++) {
@@ -569,9 +576,11 @@
     } else if (tp == DartType.STRING) {
       emitString();
     } else if (tp == DartType.INT_LIST) {
-      emitIntList();
+      emitList('[', ']');
+    } else if (tp == DartType.INT_SET) {
+      emitList('{', '}');
     } else if (tp == DartType.INT_STRING_MAP) {
-      emitIntStringMap();
+      emitMap();
     } else {
       assert(false);
     }
@@ -919,9 +928,11 @@
     } else if (tp == DartType.STRING) {
       return oneOf(DartLib.stringLibs);
     } else if (tp == DartType.INT_LIST) {
-      return oneOf(DartLib.intListLibs);
+      return oneOf(DartLib.listLibs);
+    } else if (tp == DartType.INT_SET) {
+      return oneOf(DartLib.setLibs);
     } else if (tp == DartType.INT_STRING_MAP) {
-      return oneOf(DartLib.intStringMapLibs);
+      return oneOf(DartLib.mapLibs);
     } else {
       assert(false);
     }
@@ -948,6 +959,9 @@
       case 'L':
         emitExpr(depth, DartType.INT_LIST);
         break;
+      case 'X':
+        emitExpr(depth, DartType.INT_SET);
+        break;
       case 'M':
         emitExpr(depth, DartType.INT_STRING_MAP);
         break;
@@ -962,7 +976,7 @@
 
   // Get a random value type.
   DartType getType() {
-    switch (rand.nextInt(6)) {
+    switch (rand.nextInt(7)) {
       case 0:
         return DartType.BOOL;
       case 1:
@@ -974,6 +988,8 @@
       case 4:
         return DartType.INT_LIST;
       case 5:
+        return DartType.INT_SET;
+      case 6:
         return DartType.INT_STRING_MAP;
     }
   }
diff --git a/runtime/tools/dartfuzz/dartfuzz_api_table.dart b/runtime/tools/dartfuzz/dartfuzz_api_table.dart
new file mode 100644
index 0000000..de5df1c
--- /dev/null
+++ b/runtime/tools/dartfuzz/dartfuzz_api_table.dart
@@ -0,0 +1,830 @@
+// Copyright (c) 2019, the Dart project authors.  Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+/// Class that represents Dart library methods.
+///
+/// The invididual lists are organized by return type.
+/// The proto string has the following format:
+///    +-------> receiver type (V denotes none)
+///    |+------> param1 type  (V denotes none, v denotes getter)
+///    ||+-----> param2 type
+///    |||+----> ..
+///    ||||
+///   'TTTT..'
+/// where:
+///   V void
+///   v void (special)
+///   B bool
+///   I int
+///   i int (small)
+///   D double
+///   S String
+///   L List<int>
+///   X Set<int>
+///   M Map<int, String>
+///
+/// NOTE: this code has been generated automatically.
+///
+class DartLib {
+  final String name;
+  final String proto;
+  const DartLib(this.name, this.proto);
+
+  static const boolLibs = [
+    DartLib('bool.fromEnvironment', 'VS'),
+    DartLib('isEven', 'Iv'),
+    DartLib('isOdd', 'Iv'),
+    DartLib('isEmpty', 'Mv'),
+    DartLib('isNotEmpty', 'Mv'),
+    DartLib('isNaN', 'Dv'),
+    DartLib('isNegative', 'Dv'),
+    DartLib('isInfinite', 'Dv'),
+    DartLib('isFinite', 'Dv'),
+    DartLib('add', 'XI'),
+    DartLib('endsWith', 'SS'),
+    DartLib('isEmpty', 'Sv'),
+    DartLib('isNotEmpty', 'Sv'),
+    DartLib('FileSystemEntity.identicalSync', 'VSS'),
+    DartLib('FileSystemEntity.isLinkSync', 'VS'),
+    DartLib('FileSystemEntity.isFileSync', 'VS'),
+    DartLib('FileSystemEntity.isDirectorySync', 'VS'),
+    DartLib('FileSystemEntity.isWatchSupported', 'Vv'),
+    DartLib('Platform.isLinux', 'Vv'),
+    DartLib('Platform.isMacOS', 'Vv'),
+    DartLib('Platform.isWindows', 'Vv'),
+    DartLib('Platform.isAndroid', 'Vv'),
+    DartLib('Platform.isIOS', 'Vv'),
+    DartLib('Platform.isFuchsia', 'Vv'),
+    DartLib('SecurityContext.alpnSupported', 'Vv'),
+    DartLib('NetworkInterface.listSupported', 'Vv'),
+  ];
+  static const intLibs = [
+    DartLib('JsonUtf8Encoder.DEFAULT_BUFFER_SIZE', 'Vv'),
+    DartLib('unicodeReplacementCharacterRune', 'Vv'),
+    DartLib('unicodeBomCharacterRune', 'Vv'),
+    DartLib('hashCode', 'Bv'),
+    DartLib('DateTime.monday', 'Vv'),
+    DartLib('DateTime.tuesday', 'Vv'),
+    DartLib('DateTime.wednesday', 'Vv'),
+    DartLib('DateTime.thursday', 'Vv'),
+    DartLib('DateTime.friday', 'Vv'),
+    DartLib('DateTime.saturday', 'Vv'),
+    DartLib('DateTime.sunday', 'Vv'),
+    DartLib('DateTime.daysPerWeek', 'Vv'),
+    DartLib('DateTime.january', 'Vv'),
+    DartLib('DateTime.february', 'Vv'),
+    DartLib('DateTime.march', 'Vv'),
+    DartLib('DateTime.april', 'Vv'),
+    DartLib('DateTime.may', 'Vv'),
+    DartLib('DateTime.june', 'Vv'),
+    DartLib('DateTime.july', 'Vv'),
+    DartLib('DateTime.august', 'Vv'),
+    DartLib('DateTime.september', 'Vv'),
+    DartLib('DateTime.october', 'Vv'),
+    DartLib('DateTime.november', 'Vv'),
+    DartLib('DateTime.december', 'Vv'),
+    DartLib('DateTime.monthsPerYear', 'Vv'),
+    DartLib('round', 'DV'),
+    DartLib('floor', 'DV'),
+    DartLib('ceil', 'DV'),
+    DartLib('truncate', 'DV'),
+    DartLib('Duration.microsecondsPerMillisecond', 'Vv'),
+    DartLib('Duration.millisecondsPerSecond', 'Vv'),
+    DartLib('Duration.secondsPerMinute', 'Vv'),
+    DartLib('Duration.minutesPerHour', 'Vv'),
+    DartLib('Duration.hoursPerDay', 'Vv'),
+    DartLib('Duration.microsecondsPerSecond', 'Vv'),
+    DartLib('Duration.microsecondsPerMinute', 'Vv'),
+    DartLib('Duration.microsecondsPerHour', 'Vv'),
+    DartLib('Duration.microsecondsPerDay', 'Vv'),
+    DartLib('Duration.millisecondsPerMinute', 'Vv'),
+    DartLib('Duration.millisecondsPerHour', 'Vv'),
+    DartLib('Duration.millisecondsPerDay', 'Vv'),
+    DartLib('Duration.secondsPerHour', 'Vv'),
+    DartLib('Duration.secondsPerDay', 'Vv'),
+    DartLib('Duration.minutesPerDay', 'Vv'),
+    DartLib('RangeError.checkValidRange', 'VIIISSS'),
+    DartLib('int.fromEnvironment', 'VS'),
+    DartLib('modPow', 'III'),
+    DartLib('modInverse', 'II'),
+    DartLib('gcd', 'II'),
+    DartLib('toUnsigned', 'II'),
+    DartLib('toSigned', 'II'),
+    DartLib('abs', 'IV'),
+    DartLib('round', 'IV'),
+    DartLib('floor', 'IV'),
+    DartLib('ceil', 'IV'),
+    DartLib('truncate', 'IV'),
+    DartLib('int.parse', 'VS'),
+    DartLib('int.tryParse', 'VS'),
+    DartLib('bitLength', 'Iv'),
+    DartLib('sign', 'Iv'),
+    DartLib('indexOf', 'LII'),
+    DartLib('lastIndexOf', 'LII'),
+    DartLib('removeAt', 'LI'),
+    DartLib('removeLast', 'LV'),
+    DartLib('length', 'Lv'),
+    DartLib('length', 'Mv'),
+    DartLib('compareTo', 'DD'),
+    DartLib('round', 'DV'),
+    DartLib('floor', 'DV'),
+    DartLib('ceil', 'DV'),
+    DartLib('truncate', 'DV'),
+    DartLib('toInt', 'DV'),
+    DartLib('hashCode', 'Dv'),
+    DartLib('codeUnitAt', 'SI'),
+    DartLib('compareTo', 'SS'),
+    DartLib('length', 'Sv'),
+    DartLib('hashCode', 'Sv'),
+    DartLib('OSError.noErrorCode', 'Vv'),
+    DartLib('ZLibOption.minWindowBits', 'Vv'),
+    DartLib('ZLibOption.MIN_WINDOW_BITS', 'Vv'),
+    DartLib('ZLibOption.maxWindowBits', 'Vv'),
+    DartLib('ZLibOption.MAX_WINDOW_BITS', 'Vv'),
+    DartLib('ZLibOption.defaultWindowBits', 'Vv'),
+    DartLib('ZLibOption.DEFAULT_WINDOW_BITS', 'Vv'),
+    DartLib('ZLibOption.minLevel', 'Vv'),
+    DartLib('ZLibOption.MIN_LEVEL', 'Vv'),
+    DartLib('ZLibOption.maxLevel', 'Vv'),
+    DartLib('ZLibOption.MAX_LEVEL', 'Vv'),
+    DartLib('ZLibOption.defaultLevel', 'Vv'),
+    DartLib('ZLibOption.DEFAULT_LEVEL', 'Vv'),
+    DartLib('ZLibOption.minMemLevel', 'Vv'),
+    DartLib('ZLibOption.MIN_MEM_LEVEL', 'Vv'),
+    DartLib('ZLibOption.maxMemLevel', 'Vv'),
+    DartLib('ZLibOption.MAX_MEM_LEVEL', 'Vv'),
+    DartLib('ZLibOption.defaultMemLevel', 'Vv'),
+    DartLib('ZLibOption.DEFAULT_MEM_LEVEL', 'Vv'),
+    DartLib('ZLibOption.strategyFiltered', 'Vv'),
+    DartLib('ZLibOption.STRATEGY_FILTERED', 'Vv'),
+    DartLib('ZLibOption.strategyHuffmanOnly', 'Vv'),
+    DartLib('ZLibOption.STRATEGY_HUFFMAN_ONLY', 'Vv'),
+    DartLib('ZLibOption.strategyRle', 'Vv'),
+    DartLib('ZLibOption.STRATEGY_RLE', 'Vv'),
+    DartLib('ZLibOption.strategyFixed', 'Vv'),
+    DartLib('ZLibOption.STRATEGY_FIXED', 'Vv'),
+    DartLib('ZLibOption.strategyDefault', 'Vv'),
+    DartLib('ZLibOption.STRATEGY_DEFAULT', 'Vv'),
+    DartLib('FileSystemEvent.create', 'Vv'),
+    DartLib('FileSystemEvent.CREATE', 'Vv'),
+    DartLib('FileSystemEvent.modify', 'Vv'),
+    DartLib('FileSystemEvent.MODIFY', 'Vv'),
+    DartLib('FileSystemEvent.delete', 'Vv'),
+    DartLib('FileSystemEvent.DELETE', 'Vv'),
+    DartLib('FileSystemEvent.move', 'Vv'),
+    DartLib('FileSystemEvent.MOVE', 'Vv'),
+    DartLib('FileSystemEvent.all', 'Vv'),
+    DartLib('FileSystemEvent.ALL', 'Vv'),
+    DartLib('Platform.numberOfProcessors', 'Vv'),
+    DartLib('exitCode', 'Vv'),
+    DartLib('pid', 'Vv'),
+    DartLib('ProcessInfo.currentRss', 'Vv'),
+    DartLib('ProcessInfo.maxRss', 'Vv'),
+    DartLib('RawSocketOption.levelSocket', 'Vv'),
+    DartLib('RawSocketOption.levelIPv4', 'Vv'),
+    DartLib('RawSocketOption.IPv4MulticastInterface', 'Vv'),
+    DartLib('RawSocketOption.levelIPv6', 'Vv'),
+    DartLib('RawSocketOption.IPv6MulticastInterface', 'Vv'),
+    DartLib('RawSocketOption.levelTcp', 'Vv'),
+    DartLib('RawSocketOption.levelUdp', 'Vv'),
+    DartLib('Isolate.immediate', 'Vv'),
+    DartLib('Isolate.beforeNextEvent', 'Vv'),
+    DartLib('Int8List.bytesPerElement', 'Vv'),
+    DartLib('Uint8List.bytesPerElement', 'Vv'),
+    DartLib('Uint8ClampedList.bytesPerElement', 'Vv'),
+    DartLib('Int16List.bytesPerElement', 'Vv'),
+    DartLib('Uint16List.bytesPerElement', 'Vv'),
+    DartLib('Int32List.bytesPerElement', 'Vv'),
+    DartLib('Uint32List.bytesPerElement', 'Vv'),
+    DartLib('Int64List.bytesPerElement', 'Vv'),
+    DartLib('Uint64List.bytesPerElement', 'Vv'),
+    DartLib('Float32List.bytesPerElement', 'Vv'),
+    DartLib('Float64List.bytesPerElement', 'Vv'),
+    DartLib('Float32x4List.bytesPerElement', 'Vv'),
+    DartLib('Int32x4List.bytesPerElement', 'Vv'),
+    DartLib('Float64x2List.bytesPerElement', 'Vv'),
+    DartLib('Float32x4.xxxx', 'Vv'),
+    DartLib('Float32x4.xxxy', 'Vv'),
+    DartLib('Float32x4.xxxz', 'Vv'),
+    DartLib('Float32x4.xxxw', 'Vv'),
+    DartLib('Float32x4.xxyx', 'Vv'),
+    DartLib('Float32x4.xxyy', 'Vv'),
+    DartLib('Float32x4.xxyz', 'Vv'),
+    DartLib('Float32x4.xxyw', 'Vv'),
+    DartLib('Float32x4.xxzx', 'Vv'),
+    DartLib('Float32x4.xxzy', 'Vv'),
+    DartLib('Float32x4.xxzz', 'Vv'),
+    DartLib('Float32x4.xxzw', 'Vv'),
+    DartLib('Float32x4.xxwx', 'Vv'),
+    DartLib('Float32x4.xxwy', 'Vv'),
+    DartLib('Float32x4.xxwz', 'Vv'),
+    DartLib('Float32x4.xxww', 'Vv'),
+    DartLib('Float32x4.xyxx', 'Vv'),
+    DartLib('Float32x4.xyxy', 'Vv'),
+    DartLib('Float32x4.xyxz', 'Vv'),
+    DartLib('Float32x4.xyxw', 'Vv'),
+    DartLib('Float32x4.xyyx', 'Vv'),
+    DartLib('Float32x4.xyyy', 'Vv'),
+    DartLib('Float32x4.xyyz', 'Vv'),
+    DartLib('Float32x4.xyyw', 'Vv'),
+    DartLib('Float32x4.xyzx', 'Vv'),
+    DartLib('Float32x4.xyzy', 'Vv'),
+    DartLib('Float32x4.xyzz', 'Vv'),
+    DartLib('Float32x4.xyzw', 'Vv'),
+    DartLib('Float32x4.xywx', 'Vv'),
+    DartLib('Float32x4.xywy', 'Vv'),
+    DartLib('Float32x4.xywz', 'Vv'),
+    DartLib('Float32x4.xyww', 'Vv'),
+    DartLib('Float32x4.xzxx', 'Vv'),
+    DartLib('Float32x4.xzxy', 'Vv'),
+    DartLib('Float32x4.xzxz', 'Vv'),
+    DartLib('Float32x4.xzxw', 'Vv'),
+    DartLib('Float32x4.xzyx', 'Vv'),
+    DartLib('Float32x4.xzyy', 'Vv'),
+    DartLib('Float32x4.xzyz', 'Vv'),
+    DartLib('Float32x4.xzyw', 'Vv'),
+    DartLib('Float32x4.xzzx', 'Vv'),
+    DartLib('Float32x4.xzzy', 'Vv'),
+    DartLib('Float32x4.xzzz', 'Vv'),
+    DartLib('Float32x4.xzzw', 'Vv'),
+    DartLib('Float32x4.xzwx', 'Vv'),
+    DartLib('Float32x4.xzwy', 'Vv'),
+    DartLib('Float32x4.xzwz', 'Vv'),
+    DartLib('Float32x4.xzww', 'Vv'),
+    DartLib('Float32x4.xwxx', 'Vv'),
+    DartLib('Float32x4.xwxy', 'Vv'),
+    DartLib('Float32x4.xwxz', 'Vv'),
+    DartLib('Float32x4.xwxw', 'Vv'),
+    DartLib('Float32x4.xwyx', 'Vv'),
+    DartLib('Float32x4.xwyy', 'Vv'),
+    DartLib('Float32x4.xwyz', 'Vv'),
+    DartLib('Float32x4.xwyw', 'Vv'),
+    DartLib('Float32x4.xwzx', 'Vv'),
+    DartLib('Float32x4.xwzy', 'Vv'),
+    DartLib('Float32x4.xwzz', 'Vv'),
+    DartLib('Float32x4.xwzw', 'Vv'),
+    DartLib('Float32x4.xwwx', 'Vv'),
+    DartLib('Float32x4.xwwy', 'Vv'),
+    DartLib('Float32x4.xwwz', 'Vv'),
+    DartLib('Float32x4.xwww', 'Vv'),
+    DartLib('Float32x4.yxxx', 'Vv'),
+    DartLib('Float32x4.yxxy', 'Vv'),
+    DartLib('Float32x4.yxxz', 'Vv'),
+    DartLib('Float32x4.yxxw', 'Vv'),
+    DartLib('Float32x4.yxyx', 'Vv'),
+    DartLib('Float32x4.yxyy', 'Vv'),
+    DartLib('Float32x4.yxyz', 'Vv'),
+    DartLib('Float32x4.yxyw', 'Vv'),
+    DartLib('Float32x4.yxzx', 'Vv'),
+    DartLib('Float32x4.yxzy', 'Vv'),
+    DartLib('Float32x4.yxzz', 'Vv'),
+    DartLib('Float32x4.yxzw', 'Vv'),
+    DartLib('Float32x4.yxwx', 'Vv'),
+    DartLib('Float32x4.yxwy', 'Vv'),
+    DartLib('Float32x4.yxwz', 'Vv'),
+    DartLib('Float32x4.yxww', 'Vv'),
+    DartLib('Float32x4.yyxx', 'Vv'),
+    DartLib('Float32x4.yyxy', 'Vv'),
+    DartLib('Float32x4.yyxz', 'Vv'),
+    DartLib('Float32x4.yyxw', 'Vv'),
+    DartLib('Float32x4.yyyx', 'Vv'),
+    DartLib('Float32x4.yyyy', 'Vv'),
+    DartLib('Float32x4.yyyz', 'Vv'),
+    DartLib('Float32x4.yyyw', 'Vv'),
+    DartLib('Float32x4.yyzx', 'Vv'),
+    DartLib('Float32x4.yyzy', 'Vv'),
+    DartLib('Float32x4.yyzz', 'Vv'),
+    DartLib('Float32x4.yyzw', 'Vv'),
+    DartLib('Float32x4.yywx', 'Vv'),
+    DartLib('Float32x4.yywy', 'Vv'),
+    DartLib('Float32x4.yywz', 'Vv'),
+    DartLib('Float32x4.yyww', 'Vv'),
+    DartLib('Float32x4.yzxx', 'Vv'),
+    DartLib('Float32x4.yzxy', 'Vv'),
+    DartLib('Float32x4.yzxz', 'Vv'),
+    DartLib('Float32x4.yzxw', 'Vv'),
+    DartLib('Float32x4.yzyx', 'Vv'),
+    DartLib('Float32x4.yzyy', 'Vv'),
+    DartLib('Float32x4.yzyz', 'Vv'),
+    DartLib('Float32x4.yzyw', 'Vv'),
+    DartLib('Float32x4.yzzx', 'Vv'),
+    DartLib('Float32x4.yzzy', 'Vv'),
+    DartLib('Float32x4.yzzz', 'Vv'),
+    DartLib('Float32x4.yzzw', 'Vv'),
+    DartLib('Float32x4.yzwx', 'Vv'),
+    DartLib('Float32x4.yzwy', 'Vv'),
+    DartLib('Float32x4.yzwz', 'Vv'),
+    DartLib('Float32x4.yzww', 'Vv'),
+    DartLib('Float32x4.ywxx', 'Vv'),
+    DartLib('Float32x4.ywxy', 'Vv'),
+    DartLib('Float32x4.ywxz', 'Vv'),
+    DartLib('Float32x4.ywxw', 'Vv'),
+    DartLib('Float32x4.ywyx', 'Vv'),
+    DartLib('Float32x4.ywyy', 'Vv'),
+    DartLib('Float32x4.ywyz', 'Vv'),
+    DartLib('Float32x4.ywyw', 'Vv'),
+    DartLib('Float32x4.ywzx', 'Vv'),
+    DartLib('Float32x4.ywzy', 'Vv'),
+    DartLib('Float32x4.ywzz', 'Vv'),
+    DartLib('Float32x4.ywzw', 'Vv'),
+    DartLib('Float32x4.ywwx', 'Vv'),
+    DartLib('Float32x4.ywwy', 'Vv'),
+    DartLib('Float32x4.ywwz', 'Vv'),
+    DartLib('Float32x4.ywww', 'Vv'),
+    DartLib('Float32x4.zxxx', 'Vv'),
+    DartLib('Float32x4.zxxy', 'Vv'),
+    DartLib('Float32x4.zxxz', 'Vv'),
+    DartLib('Float32x4.zxxw', 'Vv'),
+    DartLib('Float32x4.zxyx', 'Vv'),
+    DartLib('Float32x4.zxyy', 'Vv'),
+    DartLib('Float32x4.zxyz', 'Vv'),
+    DartLib('Float32x4.zxyw', 'Vv'),
+    DartLib('Float32x4.zxzx', 'Vv'),
+    DartLib('Float32x4.zxzy', 'Vv'),
+    DartLib('Float32x4.zxzz', 'Vv'),
+    DartLib('Float32x4.zxzw', 'Vv'),
+    DartLib('Float32x4.zxwx', 'Vv'),
+    DartLib('Float32x4.zxwy', 'Vv'),
+    DartLib('Float32x4.zxwz', 'Vv'),
+    DartLib('Float32x4.zxww', 'Vv'),
+    DartLib('Float32x4.zyxx', 'Vv'),
+    DartLib('Float32x4.zyxy', 'Vv'),
+    DartLib('Float32x4.zyxz', 'Vv'),
+    DartLib('Float32x4.zyxw', 'Vv'),
+    DartLib('Float32x4.zyyx', 'Vv'),
+    DartLib('Float32x4.zyyy', 'Vv'),
+    DartLib('Float32x4.zyyz', 'Vv'),
+    DartLib('Float32x4.zyyw', 'Vv'),
+    DartLib('Float32x4.zyzx', 'Vv'),
+    DartLib('Float32x4.zyzy', 'Vv'),
+    DartLib('Float32x4.zyzz', 'Vv'),
+    DartLib('Float32x4.zyzw', 'Vv'),
+    DartLib('Float32x4.zywx', 'Vv'),
+    DartLib('Float32x4.zywy', 'Vv'),
+    DartLib('Float32x4.zywz', 'Vv'),
+    DartLib('Float32x4.zyww', 'Vv'),
+    DartLib('Float32x4.zzxx', 'Vv'),
+    DartLib('Float32x4.zzxy', 'Vv'),
+    DartLib('Float32x4.zzxz', 'Vv'),
+    DartLib('Float32x4.zzxw', 'Vv'),
+    DartLib('Float32x4.zzyx', 'Vv'),
+    DartLib('Float32x4.zzyy', 'Vv'),
+    DartLib('Float32x4.zzyz', 'Vv'),
+    DartLib('Float32x4.zzyw', 'Vv'),
+    DartLib('Float32x4.zzzx', 'Vv'),
+    DartLib('Float32x4.zzzy', 'Vv'),
+    DartLib('Float32x4.zzzz', 'Vv'),
+    DartLib('Float32x4.zzzw', 'Vv'),
+    DartLib('Float32x4.zzwx', 'Vv'),
+    DartLib('Float32x4.zzwy', 'Vv'),
+    DartLib('Float32x4.zzwz', 'Vv'),
+    DartLib('Float32x4.zzww', 'Vv'),
+    DartLib('Float32x4.zwxx', 'Vv'),
+    DartLib('Float32x4.zwxy', 'Vv'),
+    DartLib('Float32x4.zwxz', 'Vv'),
+    DartLib('Float32x4.zwxw', 'Vv'),
+    DartLib('Float32x4.zwyx', 'Vv'),
+    DartLib('Float32x4.zwyy', 'Vv'),
+    DartLib('Float32x4.zwyz', 'Vv'),
+    DartLib('Float32x4.zwyw', 'Vv'),
+    DartLib('Float32x4.zwzx', 'Vv'),
+    DartLib('Float32x4.zwzy', 'Vv'),
+    DartLib('Float32x4.zwzz', 'Vv'),
+    DartLib('Float32x4.zwzw', 'Vv'),
+    DartLib('Float32x4.zwwx', 'Vv'),
+    DartLib('Float32x4.zwwy', 'Vv'),
+    DartLib('Float32x4.zwwz', 'Vv'),
+    DartLib('Float32x4.zwww', 'Vv'),
+    DartLib('Float32x4.wxxx', 'Vv'),
+    DartLib('Float32x4.wxxy', 'Vv'),
+    DartLib('Float32x4.wxxz', 'Vv'),
+    DartLib('Float32x4.wxxw', 'Vv'),
+    DartLib('Float32x4.wxyx', 'Vv'),
+    DartLib('Float32x4.wxyy', 'Vv'),
+    DartLib('Float32x4.wxyz', 'Vv'),
+    DartLib('Float32x4.wxyw', 'Vv'),
+    DartLib('Float32x4.wxzx', 'Vv'),
+    DartLib('Float32x4.wxzy', 'Vv'),
+    DartLib('Float32x4.wxzz', 'Vv'),
+    DartLib('Float32x4.wxzw', 'Vv'),
+    DartLib('Float32x4.wxwx', 'Vv'),
+    DartLib('Float32x4.wxwy', 'Vv'),
+    DartLib('Float32x4.wxwz', 'Vv'),
+    DartLib('Float32x4.wxww', 'Vv'),
+    DartLib('Float32x4.wyxx', 'Vv'),
+    DartLib('Float32x4.wyxy', 'Vv'),
+    DartLib('Float32x4.wyxz', 'Vv'),
+    DartLib('Float32x4.wyxw', 'Vv'),
+    DartLib('Float32x4.wyyx', 'Vv'),
+    DartLib('Float32x4.wyyy', 'Vv'),
+    DartLib('Float32x4.wyyz', 'Vv'),
+    DartLib('Float32x4.wyyw', 'Vv'),
+    DartLib('Float32x4.wyzx', 'Vv'),
+    DartLib('Float32x4.wyzy', 'Vv'),
+    DartLib('Float32x4.wyzz', 'Vv'),
+    DartLib('Float32x4.wyzw', 'Vv'),
+    DartLib('Float32x4.wywx', 'Vv'),
+    DartLib('Float32x4.wywy', 'Vv'),
+    DartLib('Float32x4.wywz', 'Vv'),
+    DartLib('Float32x4.wyww', 'Vv'),
+    DartLib('Float32x4.wzxx', 'Vv'),
+    DartLib('Float32x4.wzxy', 'Vv'),
+    DartLib('Float32x4.wzxz', 'Vv'),
+    DartLib('Float32x4.wzxw', 'Vv'),
+    DartLib('Float32x4.wzyx', 'Vv'),
+    DartLib('Float32x4.wzyy', 'Vv'),
+    DartLib('Float32x4.wzyz', 'Vv'),
+    DartLib('Float32x4.wzyw', 'Vv'),
+    DartLib('Float32x4.wzzx', 'Vv'),
+    DartLib('Float32x4.wzzy', 'Vv'),
+    DartLib('Float32x4.wzzz', 'Vv'),
+    DartLib('Float32x4.wzzw', 'Vv'),
+    DartLib('Float32x4.wzwx', 'Vv'),
+    DartLib('Float32x4.wzwy', 'Vv'),
+    DartLib('Float32x4.wzwz', 'Vv'),
+    DartLib('Float32x4.wzww', 'Vv'),
+    DartLib('Float32x4.wwxx', 'Vv'),
+    DartLib('Float32x4.wwxy', 'Vv'),
+    DartLib('Float32x4.wwxz', 'Vv'),
+    DartLib('Float32x4.wwxw', 'Vv'),
+    DartLib('Float32x4.wwyx', 'Vv'),
+    DartLib('Float32x4.wwyy', 'Vv'),
+    DartLib('Float32x4.wwyz', 'Vv'),
+    DartLib('Float32x4.wwyw', 'Vv'),
+    DartLib('Float32x4.wwzx', 'Vv'),
+    DartLib('Float32x4.wwzy', 'Vv'),
+    DartLib('Float32x4.wwzz', 'Vv'),
+    DartLib('Float32x4.wwzw', 'Vv'),
+    DartLib('Float32x4.wwwx', 'Vv'),
+    DartLib('Float32x4.wwwy', 'Vv'),
+    DartLib('Float32x4.wwwz', 'Vv'),
+    DartLib('Float32x4.wwww', 'Vv'),
+    DartLib('Int32x4.xxxx', 'Vv'),
+    DartLib('Int32x4.xxxy', 'Vv'),
+    DartLib('Int32x4.xxxz', 'Vv'),
+    DartLib('Int32x4.xxxw', 'Vv'),
+    DartLib('Int32x4.xxyx', 'Vv'),
+    DartLib('Int32x4.xxyy', 'Vv'),
+    DartLib('Int32x4.xxyz', 'Vv'),
+    DartLib('Int32x4.xxyw', 'Vv'),
+    DartLib('Int32x4.xxzx', 'Vv'),
+    DartLib('Int32x4.xxzy', 'Vv'),
+    DartLib('Int32x4.xxzz', 'Vv'),
+    DartLib('Int32x4.xxzw', 'Vv'),
+    DartLib('Int32x4.xxwx', 'Vv'),
+    DartLib('Int32x4.xxwy', 'Vv'),
+    DartLib('Int32x4.xxwz', 'Vv'),
+    DartLib('Int32x4.xxww', 'Vv'),
+    DartLib('Int32x4.xyxx', 'Vv'),
+    DartLib('Int32x4.xyxy', 'Vv'),
+    DartLib('Int32x4.xyxz', 'Vv'),
+    DartLib('Int32x4.xyxw', 'Vv'),
+    DartLib('Int32x4.xyyx', 'Vv'),
+    DartLib('Int32x4.xyyy', 'Vv'),
+    DartLib('Int32x4.xyyz', 'Vv'),
+    DartLib('Int32x4.xyyw', 'Vv'),
+    DartLib('Int32x4.xyzx', 'Vv'),
+    DartLib('Int32x4.xyzy', 'Vv'),
+    DartLib('Int32x4.xyzz', 'Vv'),
+    DartLib('Int32x4.xyzw', 'Vv'),
+    DartLib('Int32x4.xywx', 'Vv'),
+    DartLib('Int32x4.xywy', 'Vv'),
+    DartLib('Int32x4.xywz', 'Vv'),
+    DartLib('Int32x4.xyww', 'Vv'),
+    DartLib('Int32x4.xzxx', 'Vv'),
+    DartLib('Int32x4.xzxy', 'Vv'),
+    DartLib('Int32x4.xzxz', 'Vv'),
+    DartLib('Int32x4.xzxw', 'Vv'),
+    DartLib('Int32x4.xzyx', 'Vv'),
+    DartLib('Int32x4.xzyy', 'Vv'),
+    DartLib('Int32x4.xzyz', 'Vv'),
+    DartLib('Int32x4.xzyw', 'Vv'),
+    DartLib('Int32x4.xzzx', 'Vv'),
+    DartLib('Int32x4.xzzy', 'Vv'),
+    DartLib('Int32x4.xzzz', 'Vv'),
+    DartLib('Int32x4.xzzw', 'Vv'),
+    DartLib('Int32x4.xzwx', 'Vv'),
+    DartLib('Int32x4.xzwy', 'Vv'),
+    DartLib('Int32x4.xzwz', 'Vv'),
+    DartLib('Int32x4.xzww', 'Vv'),
+    DartLib('Int32x4.xwxx', 'Vv'),
+    DartLib('Int32x4.xwxy', 'Vv'),
+    DartLib('Int32x4.xwxz', 'Vv'),
+    DartLib('Int32x4.xwxw', 'Vv'),
+    DartLib('Int32x4.xwyx', 'Vv'),
+    DartLib('Int32x4.xwyy', 'Vv'),
+    DartLib('Int32x4.xwyz', 'Vv'),
+    DartLib('Int32x4.xwyw', 'Vv'),
+    DartLib('Int32x4.xwzx', 'Vv'),
+    DartLib('Int32x4.xwzy', 'Vv'),
+    DartLib('Int32x4.xwzz', 'Vv'),
+    DartLib('Int32x4.xwzw', 'Vv'),
+    DartLib('Int32x4.xwwx', 'Vv'),
+    DartLib('Int32x4.xwwy', 'Vv'),
+    DartLib('Int32x4.xwwz', 'Vv'),
+    DartLib('Int32x4.xwww', 'Vv'),
+    DartLib('Int32x4.yxxx', 'Vv'),
+    DartLib('Int32x4.yxxy', 'Vv'),
+    DartLib('Int32x4.yxxz', 'Vv'),
+    DartLib('Int32x4.yxxw', 'Vv'),
+    DartLib('Int32x4.yxyx', 'Vv'),
+    DartLib('Int32x4.yxyy', 'Vv'),
+    DartLib('Int32x4.yxyz', 'Vv'),
+    DartLib('Int32x4.yxyw', 'Vv'),
+    DartLib('Int32x4.yxzx', 'Vv'),
+    DartLib('Int32x4.yxzy', 'Vv'),
+    DartLib('Int32x4.yxzz', 'Vv'),
+    DartLib('Int32x4.yxzw', 'Vv'),
+    DartLib('Int32x4.yxwx', 'Vv'),
+    DartLib('Int32x4.yxwy', 'Vv'),
+    DartLib('Int32x4.yxwz', 'Vv'),
+    DartLib('Int32x4.yxww', 'Vv'),
+    DartLib('Int32x4.yyxx', 'Vv'),
+    DartLib('Int32x4.yyxy', 'Vv'),
+    DartLib('Int32x4.yyxz', 'Vv'),
+    DartLib('Int32x4.yyxw', 'Vv'),
+    DartLib('Int32x4.yyyx', 'Vv'),
+    DartLib('Int32x4.yyyy', 'Vv'),
+    DartLib('Int32x4.yyyz', 'Vv'),
+    DartLib('Int32x4.yyyw', 'Vv'),
+    DartLib('Int32x4.yyzx', 'Vv'),
+    DartLib('Int32x4.yyzy', 'Vv'),
+    DartLib('Int32x4.yyzz', 'Vv'),
+    DartLib('Int32x4.yyzw', 'Vv'),
+    DartLib('Int32x4.yywx', 'Vv'),
+    DartLib('Int32x4.yywy', 'Vv'),
+    DartLib('Int32x4.yywz', 'Vv'),
+    DartLib('Int32x4.yyww', 'Vv'),
+    DartLib('Int32x4.yzxx', 'Vv'),
+    DartLib('Int32x4.yzxy', 'Vv'),
+    DartLib('Int32x4.yzxz', 'Vv'),
+    DartLib('Int32x4.yzxw', 'Vv'),
+    DartLib('Int32x4.yzyx', 'Vv'),
+    DartLib('Int32x4.yzyy', 'Vv'),
+    DartLib('Int32x4.yzyz', 'Vv'),
+    DartLib('Int32x4.yzyw', 'Vv'),
+    DartLib('Int32x4.yzzx', 'Vv'),
+    DartLib('Int32x4.yzzy', 'Vv'),
+    DartLib('Int32x4.yzzz', 'Vv'),
+    DartLib('Int32x4.yzzw', 'Vv'),
+    DartLib('Int32x4.yzwx', 'Vv'),
+    DartLib('Int32x4.yzwy', 'Vv'),
+    DartLib('Int32x4.yzwz', 'Vv'),
+    DartLib('Int32x4.yzww', 'Vv'),
+    DartLib('Int32x4.ywxx', 'Vv'),
+    DartLib('Int32x4.ywxy', 'Vv'),
+    DartLib('Int32x4.ywxz', 'Vv'),
+    DartLib('Int32x4.ywxw', 'Vv'),
+    DartLib('Int32x4.ywyx', 'Vv'),
+    DartLib('Int32x4.ywyy', 'Vv'),
+    DartLib('Int32x4.ywyz', 'Vv'),
+    DartLib('Int32x4.ywyw', 'Vv'),
+    DartLib('Int32x4.ywzx', 'Vv'),
+    DartLib('Int32x4.ywzy', 'Vv'),
+    DartLib('Int32x4.ywzz', 'Vv'),
+    DartLib('Int32x4.ywzw', 'Vv'),
+    DartLib('Int32x4.ywwx', 'Vv'),
+    DartLib('Int32x4.ywwy', 'Vv'),
+    DartLib('Int32x4.ywwz', 'Vv'),
+    DartLib('Int32x4.ywww', 'Vv'),
+    DartLib('Int32x4.zxxx', 'Vv'),
+    DartLib('Int32x4.zxxy', 'Vv'),
+    DartLib('Int32x4.zxxz', 'Vv'),
+    DartLib('Int32x4.zxxw', 'Vv'),
+    DartLib('Int32x4.zxyx', 'Vv'),
+    DartLib('Int32x4.zxyy', 'Vv'),
+    DartLib('Int32x4.zxyz', 'Vv'),
+    DartLib('Int32x4.zxyw', 'Vv'),
+    DartLib('Int32x4.zxzx', 'Vv'),
+    DartLib('Int32x4.zxzy', 'Vv'),
+    DartLib('Int32x4.zxzz', 'Vv'),
+    DartLib('Int32x4.zxzw', 'Vv'),
+    DartLib('Int32x4.zxwx', 'Vv'),
+    DartLib('Int32x4.zxwy', 'Vv'),
+    DartLib('Int32x4.zxwz', 'Vv'),
+    DartLib('Int32x4.zxww', 'Vv'),
+    DartLib('Int32x4.zyxx', 'Vv'),
+    DartLib('Int32x4.zyxy', 'Vv'),
+    DartLib('Int32x4.zyxz', 'Vv'),
+    DartLib('Int32x4.zyxw', 'Vv'),
+    DartLib('Int32x4.zyyx', 'Vv'),
+    DartLib('Int32x4.zyyy', 'Vv'),
+    DartLib('Int32x4.zyyz', 'Vv'),
+    DartLib('Int32x4.zyyw', 'Vv'),
+    DartLib('Int32x4.zyzx', 'Vv'),
+    DartLib('Int32x4.zyzy', 'Vv'),
+    DartLib('Int32x4.zyzz', 'Vv'),
+    DartLib('Int32x4.zyzw', 'Vv'),
+    DartLib('Int32x4.zywx', 'Vv'),
+    DartLib('Int32x4.zywy', 'Vv'),
+    DartLib('Int32x4.zywz', 'Vv'),
+    DartLib('Int32x4.zyww', 'Vv'),
+    DartLib('Int32x4.zzxx', 'Vv'),
+    DartLib('Int32x4.zzxy', 'Vv'),
+    DartLib('Int32x4.zzxz', 'Vv'),
+    DartLib('Int32x4.zzxw', 'Vv'),
+    DartLib('Int32x4.zzyx', 'Vv'),
+    DartLib('Int32x4.zzyy', 'Vv'),
+    DartLib('Int32x4.zzyz', 'Vv'),
+    DartLib('Int32x4.zzyw', 'Vv'),
+    DartLib('Int32x4.zzzx', 'Vv'),
+    DartLib('Int32x4.zzzy', 'Vv'),
+    DartLib('Int32x4.zzzz', 'Vv'),
+    DartLib('Int32x4.zzzw', 'Vv'),
+    DartLib('Int32x4.zzwx', 'Vv'),
+    DartLib('Int32x4.zzwy', 'Vv'),
+    DartLib('Int32x4.zzwz', 'Vv'),
+    DartLib('Int32x4.zzww', 'Vv'),
+    DartLib('Int32x4.zwxx', 'Vv'),
+    DartLib('Int32x4.zwxy', 'Vv'),
+    DartLib('Int32x4.zwxz', 'Vv'),
+    DartLib('Int32x4.zwxw', 'Vv'),
+    DartLib('Int32x4.zwyx', 'Vv'),
+    DartLib('Int32x4.zwyy', 'Vv'),
+    DartLib('Int32x4.zwyz', 'Vv'),
+    DartLib('Int32x4.zwyw', 'Vv'),
+    DartLib('Int32x4.zwzx', 'Vv'),
+    DartLib('Int32x4.zwzy', 'Vv'),
+    DartLib('Int32x4.zwzz', 'Vv'),
+    DartLib('Int32x4.zwzw', 'Vv'),
+    DartLib('Int32x4.zwwx', 'Vv'),
+    DartLib('Int32x4.zwwy', 'Vv'),
+    DartLib('Int32x4.zwwz', 'Vv'),
+    DartLib('Int32x4.zwww', 'Vv'),
+    DartLib('Int32x4.wxxx', 'Vv'),
+    DartLib('Int32x4.wxxy', 'Vv'),
+    DartLib('Int32x4.wxxz', 'Vv'),
+    DartLib('Int32x4.wxxw', 'Vv'),
+    DartLib('Int32x4.wxyx', 'Vv'),
+    DartLib('Int32x4.wxyy', 'Vv'),
+    DartLib('Int32x4.wxyz', 'Vv'),
+    DartLib('Int32x4.wxyw', 'Vv'),
+    DartLib('Int32x4.wxzx', 'Vv'),
+    DartLib('Int32x4.wxzy', 'Vv'),
+    DartLib('Int32x4.wxzz', 'Vv'),
+    DartLib('Int32x4.wxzw', 'Vv'),
+    DartLib('Int32x4.wxwx', 'Vv'),
+    DartLib('Int32x4.wxwy', 'Vv'),
+    DartLib('Int32x4.wxwz', 'Vv'),
+    DartLib('Int32x4.wxww', 'Vv'),
+    DartLib('Int32x4.wyxx', 'Vv'),
+    DartLib('Int32x4.wyxy', 'Vv'),
+    DartLib('Int32x4.wyxz', 'Vv'),
+    DartLib('Int32x4.wyxw', 'Vv'),
+    DartLib('Int32x4.wyyx', 'Vv'),
+    DartLib('Int32x4.wyyy', 'Vv'),
+    DartLib('Int32x4.wyyz', 'Vv'),
+    DartLib('Int32x4.wyyw', 'Vv'),
+    DartLib('Int32x4.wyzx', 'Vv'),
+    DartLib('Int32x4.wyzy', 'Vv'),
+    DartLib('Int32x4.wyzz', 'Vv'),
+    DartLib('Int32x4.wyzw', 'Vv'),
+    DartLib('Int32x4.wywx', 'Vv'),
+    DartLib('Int32x4.wywy', 'Vv'),
+    DartLib('Int32x4.wywz', 'Vv'),
+    DartLib('Int32x4.wyww', 'Vv'),
+    DartLib('Int32x4.wzxx', 'Vv'),
+    DartLib('Int32x4.wzxy', 'Vv'),
+    DartLib('Int32x4.wzxz', 'Vv'),
+    DartLib('Int32x4.wzxw', 'Vv'),
+    DartLib('Int32x4.wzyx', 'Vv'),
+    DartLib('Int32x4.wzyy', 'Vv'),
+    DartLib('Int32x4.wzyz', 'Vv'),
+    DartLib('Int32x4.wzyw', 'Vv'),
+    DartLib('Int32x4.wzzx', 'Vv'),
+    DartLib('Int32x4.wzzy', 'Vv'),
+    DartLib('Int32x4.wzzz', 'Vv'),
+    DartLib('Int32x4.wzzw', 'Vv'),
+    DartLib('Int32x4.wzwx', 'Vv'),
+    DartLib('Int32x4.wzwy', 'Vv'),
+    DartLib('Int32x4.wzwz', 'Vv'),
+    DartLib('Int32x4.wzww', 'Vv'),
+    DartLib('Int32x4.wwxx', 'Vv'),
+    DartLib('Int32x4.wwxy', 'Vv'),
+    DartLib('Int32x4.wwxz', 'Vv'),
+    DartLib('Int32x4.wwxw', 'Vv'),
+    DartLib('Int32x4.wwyx', 'Vv'),
+    DartLib('Int32x4.wwyy', 'Vv'),
+    DartLib('Int32x4.wwyz', 'Vv'),
+    DartLib('Int32x4.wwyw', 'Vv'),
+    DartLib('Int32x4.wwzx', 'Vv'),
+    DartLib('Int32x4.wwzy', 'Vv'),
+    DartLib('Int32x4.wwzz', 'Vv'),
+    DartLib('Int32x4.wwzw', 'Vv'),
+    DartLib('Int32x4.wwwx', 'Vv'),
+    DartLib('Int32x4.wwwy', 'Vv'),
+    DartLib('Int32x4.wwwz', 'Vv'),
+    DartLib('Int32x4.wwww', 'Vv'),
+  ];
+  static const doubleLibs = [
+    DartLib('remainder', 'DD'),
+    DartLib('abs', 'DV'),
+    DartLib('roundToDouble', 'DV'),
+    DartLib('floorToDouble', 'DV'),
+    DartLib('ceilToDouble', 'DV'),
+    DartLib('truncateToDouble', 'DV'),
+    DartLib('double.tryParse', 'VS'),
+    DartLib('sign', 'Dv'),
+    DartLib('double.nan', 'Vv'),
+    DartLib('double.infinity', 'Vv'),
+    DartLib('double.negativeInfinity', 'Vv'),
+    DartLib('double.minPositive', 'Vv'),
+    DartLib('double.maxFinite', 'Vv'),
+    DartLib('roundToDouble', 'IV'),
+    DartLib('floorToDouble', 'IV'),
+    DartLib('ceilToDouble', 'IV'),
+    DartLib('truncateToDouble', 'IV'),
+    DartLib('remainder', 'DD'),
+    DartLib('abs', 'DV'),
+    DartLib('roundToDouble', 'DV'),
+    DartLib('floorToDouble', 'DV'),
+    DartLib('ceilToDouble', 'DV'),
+    DartLib('truncateToDouble', 'DV'),
+    DartLib('clamp', 'DDD'),
+    DartLib('toDouble', 'DV'),
+    DartLib('num.tryParse', 'VS'),
+    DartLib('sign', 'Dv'),
+    DartLib('e', 'Vv'),
+    DartLib('ln10', 'Vv'),
+    DartLib('ln2', 'Vv'),
+    DartLib('log2e', 'Vv'),
+    DartLib('log10e', 'Vv'),
+    DartLib('pi', 'Vv'),
+    DartLib('sqrt1_2', 'Vv'),
+    DartLib('sqrt2', 'Vv'),
+    DartLib('atan2', 'VDD'),
+    DartLib('pow', 'VDD'),
+    DartLib('sin', 'VD'),
+    DartLib('cos', 'VD'),
+    DartLib('tan', 'VD'),
+    DartLib('acos', 'VD'),
+    DartLib('asin', 'VD'),
+    DartLib('atan', 'VD'),
+    DartLib('sqrt', 'VD'),
+    DartLib('exp', 'VD'),
+    DartLib('log', 'VD'),
+  ];
+  static const stringLibs = [
+    DartLib('ListBase.listToString', 'VL'),
+    DartLib('MapBase.mapToString', 'VM'),
+    DartLib('SetBase.setToString', 'VX'),
+    DartLib('base64Encode', 'VL'),
+    DartLib('base64UrlEncode', 'VL'),
+    DartLib('toString', 'BV'),
+    DartLib('toString', 'DV'),
+    DartLib('toString', 'IV'),
+    DartLib('toRadixString', 'II'),
+    DartLib('toStringAsFixed', 'DI'),
+    DartLib('toStringAsExponential', 'DI'),
+    DartLib('toStringAsPrecision', 'DI'),
+    DartLib('toString', 'DV'),
+    DartLib('RegExp.escape', 'VS'),
+    DartLib('String.fromCharCode', 'VI'),
+    DartLib('String.fromEnvironment', 'VS'),
+    DartLib('substring', 'SII'),
+    DartLib('trim', 'SV'),
+    DartLib('trimLeft', 'SV'),
+    DartLib('trimRight', 'SV'),
+    DartLib('padLeft', 'SiS'),
+    DartLib('padRight', 'SiS'),
+    DartLib('replaceRange', 'SIIS'),
+    DartLib('toLowerCase', 'SV'),
+    DartLib('toUpperCase', 'SV'),
+    DartLib('Uri.encodeComponent', 'VS'),
+    DartLib('Uri.encodeQueryComponent', 'VS'),
+    DartLib('Uri.decodeComponent', 'VS'),
+    DartLib('Uri.decodeQueryComponent', 'VS'),
+    DartLib('Uri.encodeFull', 'VS'),
+    DartLib('Uri.decodeFull', 'VS'),
+    DartLib('FileSystemEntity.parentOf', 'VS'),
+    DartLib('Platform.pathSeparator', 'Vv'),
+    DartLib('Platform.localeName', 'Vv'),
+    DartLib('Platform.operatingSystem', 'Vv'),
+    DartLib('Platform.operatingSystemVersion', 'Vv'),
+    DartLib('Platform.localHostname', 'Vv'),
+    DartLib('Platform.packageRoot', 'Vv'),
+    DartLib('Platform.packageConfig', 'Vv'),
+    DartLib('Platform.version', 'Vv'),
+  ];
+  static const listLibs = [
+    DartLib('List.filled', 'VII'),
+    DartLib('sublist', 'LII'),
+    DartLib('codeUnits', 'Sv'),
+    DartLib('Uri.parseIPv4Address', 'VS'),
+    DartLib('Uri.parseIPv6Address', 'VSII'),
+  ];
+  static const setLibs = [
+    DartLib('Set.identity', 'VV'),
+    DartLib('intersection', 'XX'),
+    DartLib('union', 'XX'),
+    DartLib('difference', 'XX'),
+    DartLib('toSet', 'XV'),
+  ];
+  static const mapLibs = [
+    DartLib('Map.from', 'VM'),
+    DartLib('Map.of', 'VM'),
+    DartLib('Map.unmodifiable', 'VM'),
+    DartLib('Map.identity', 'VV'),
+  ];
+}
diff --git a/runtime/tools/dartfuzz/dartfuzz_values.dart b/runtime/tools/dartfuzz/dartfuzz_values.dart
index 163fc4c..704e511 100644
--- a/runtime/tools/dartfuzz/dartfuzz_values.dart
+++ b/runtime/tools/dartfuzz/dartfuzz_values.dart
@@ -17,10 +17,19 @@
   static const DOUBLE = const DartType._withName('double');
   static const STRING = const DartType._withName('String');
   static const INT_LIST = const DartType._withName('List<int>');
+  static const INT_SET = const DartType._withName('Set<int>');
   static const INT_STRING_MAP = const DartType._withName('Map<int, String>');
 
   // All value types.
-  static const allTypes = [BOOL, INT, DOUBLE, STRING, INT_LIST, INT_STRING_MAP];
+  static const allTypes = [
+    BOOL,
+    INT,
+    DOUBLE,
+    STRING,
+    INT_LIST,
+    INT_SET,
+    INT_STRING_MAP
+  ];
 }
 
 /// Class with interesting values for fuzzing.
@@ -35,15 +44,6 @@
   static const regularChars =
       'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789!@#&()+- ';
 
-  // Interesting doubles.
-  static const interestingDoubles = [
-    'double.infinity',
-    'double.maxFinite',
-    'double.minPositive',
-    'double.nan',
-    'double.negativeInfinity',
-  ];
-
   // Interesting integer values.
   static const List<int> interestingIntegers = [
     0x0000000000000000,
@@ -84,113 +84,3 @@
     0xffffffffffffffff
   ];
 }
-
-/// Class that represents Dart library methods.
-//
-/// The invididual lists are organized by return type.
-/// The proto string has the following format:
-///    +-------> receiver type (V denotes none)
-///    |+------> param1 type  (V denotes none, v denotes getter)
-///    ||+-----> param2 type
-///    |||+----> ....
-///    ||||
-///   "TTTT...."
-/// where:
-///   V void
-///   v void (special)
-///   B bool
-///   I int
-///   i int (small)
-///   D double
-///   S String
-///   L List<int>
-///   M Map<int, String>
-///
-/// TODO(ajcbik): generate these lists automatically
-///
-class DartLib {
-  final String name;
-  final String proto;
-  const DartLib(this.name, this.proto);
-
-  static const boolLibs = [
-    DartLib('isEven', "Iv"),
-    DartLib('isOdd', "Iv"),
-    DartLib('isEmpty', "Sv"),
-    DartLib('isEmpty', "Mv"),
-    DartLib('isNotEmpty', "Sv"),
-    DartLib('isNotEmpty', "Mv"),
-    DartLib('endsWith', "SS"),
-    DartLib('remove', "LI"),
-    DartLib('containsValue', "MS"),
-    DartLib('containsKey', "MI"),
-  ];
-
-  static const intLibs = [
-    DartLib('bitLength', "Iv"),
-    DartLib('sign', "Iv"),
-    DartLib('abs', "IV"),
-    DartLib('round', "IV"),
-    DartLib('round', "DV"),
-    DartLib('floor', "IV"),
-    DartLib('floor', "DV"),
-    DartLib('ceil', "IV"),
-    DartLib('ceil', "DV"),
-    DartLib('truncate', "IV"),
-    DartLib('truncate', "DV"),
-    DartLib('toInt', "DV"),
-    DartLib('toUnsigned', "II"),
-    DartLib('toSigned', "II"),
-    DartLib('modInverse', "II"),
-    DartLib('modPow', "III"),
-    DartLib('length', "Sv"),
-    DartLib('length', "Lv"),
-    DartLib('length', "Mv"),
-    DartLib('codeUnitAt', "SI"),
-    DartLib('compareTo', "SS"),
-    DartLib('removeLast', "LV"),
-    DartLib('removeAt', "LI"),
-    DartLib('indexOf', "LI"),
-    DartLib('lastIndexOf', "LI"),
-  ];
-
-  static const doubleLibs = [
-    DartLib('sign', "Dv"),
-    DartLib('abs', "DV"),
-    DartLib('toDouble', "IV"),
-    DartLib('roundToDouble', "IV"),
-    DartLib('roundToDouble', "DV"),
-    DartLib('floorToDouble', "IV"),
-    DartLib('floorToDouble', "DV"),
-    DartLib('ceilToDouble', "IV"),
-    DartLib('ceilToDouble', "DV"),
-    DartLib('truncateToDouble', "IV"),
-    DartLib('truncateToDouble', "DV"),
-    DartLib('remainder', "DD"),
-  ];
-
-  static const stringLibs = [
-    DartLib('toString', "BV"),
-    DartLib('toString', "IV"),
-    DartLib('toString', "DV"),
-    DartLib('toRadixString', "II"),
-    DartLib('trim', "SV"),
-    DartLib('trimLeft', "SV"),
-    DartLib('trimRight', "SV"),
-    DartLib('toLowerCase', "SV"),
-    DartLib('toUpperCase', "SV"),
-    DartLib('substring', "SI"),
-    DartLib('replaceRange', "SIIS"),
-    DartLib('remove', "MI"),
-    DartLib('padLeft', "Si"), // restrict!
-    DartLib('padRight', "Si"), // restrict!
-  ];
-
-  static const intListLibs = [
-    DartLib('sublist', "LI"),
-  ];
-
-  static const intStringMapLibs = [
-    DartLib('Map.from', "VM"),
-  ];
-}
diff --git a/runtime/tools/dartfuzz/gen_api_table.dart b/runtime/tools/dartfuzz/gen_api_table.dart
new file mode 100755
index 0000000..e02a310
--- /dev/null
+++ b/runtime/tools/dartfuzz/gen_api_table.dart
@@ -0,0 +1,310 @@
+// Copyright (c) 2019, the Dart project authors.  Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+// Generates the API tables used by DartFuzz. Automatically generating these
+// tables is less error-prone than generating such tables by hand. Furthermore,
+// it simplifies regenerating the table when the libraries change.
+//
+// Usage:
+//   dart gen_api_table.dart > dartfuzz_api_table.dart
+//
+// Then send out modified dartfuzz_api_table.dart for review together
+// with a modified dartfuzz.dart that increases the version.
+
+import 'dart:io';
+
+import 'package:analyzer/dart/analysis/analysis_context_collection.dart';
+import 'package:analyzer/dart/analysis/session.dart';
+import 'package:analyzer/dart/analysis/results.dart';
+import 'package:analyzer/dart/element/element.dart';
+import 'package:analyzer/dart/element/type.dart';
+import 'package:analyzer/file_system/physical_file_system.dart';
+
+import 'package:analyzer/src/dart/analysis/analysis_context_collection.dart';
+
+// Class to represent a library method by name and prototype representation.
+class DartLib {
+  final String name;
+  final String proto;
+  const DartLib(this.name, this.proto);
+}
+
+// Lists of recognized methods, organized by return type.
+var boolTable = List<DartLib>();
+var intTable = List<DartLib>();
+var doubleTable = List<DartLib>();
+var stringTable = List<DartLib>();
+var listTable = List<DartLib>();
+var setTable = List<DartLib>();
+var mapTable = List<DartLib>();
+
+main() async {
+  // Set paths. Note that for this particular use case, packageRoot can be
+  // any directory. Here, we set it to the top of the SDK development, and
+  // derive the required sdkPath from there.
+  String packageRoot = Platform.environment['DART_TOP'];
+  if (packageRoot == null) {
+    throw new StateError('No environment variable DART_TOP');
+  }
+  String sdkPath = '$packageRoot/tools/sdks/dart-sdk';
+
+  // This does most of the hard work of getting the analyzer configured
+  // correctly. Typically the included paths are the files and directories
+  // that need to be analyzed, but the SDK is always available, so it isn't
+  // really important for this particular use case. We use the implementation
+  // class in order to pass in the sdkPath directly.
+  PhysicalResourceProvider provider = PhysicalResourceProvider.INSTANCE;
+  AnalysisContextCollection collection = new AnalysisContextCollectionImpl(
+      includedPaths: <String>[packageRoot],
+      resourceProvider: provider,
+      sdkPath: sdkPath);
+  AnalysisSession session = collection.contexts[0].currentSession;
+
+  // Visit libraries for table generation.
+  await visitLibraryAtUri(session, 'dart:async');
+  await visitLibraryAtUri(session, 'dart:cli');
+  await visitLibraryAtUri(session, 'dart:collection');
+  await visitLibraryAtUri(session, 'dart:convert');
+  await visitLibraryAtUri(session, 'dart:core');
+  await visitLibraryAtUri(session, 'dart:io');
+  await visitLibraryAtUri(session, 'dart:isolate');
+  await visitLibraryAtUri(session, 'dart:math');
+  await visitLibraryAtUri(session, 'dart:typed_data');
+
+  // Generate the tables in a stand-alone Dart class.
+  dumpHeader();
+  dumpTable('boolLibs', boolTable);
+  dumpTable('intLibs', intTable);
+  dumpTable('doubleLibs', doubleTable);
+  dumpTable('stringLibs', stringTable);
+  dumpTable('listLibs', listTable);
+  dumpTable('setLibs', setTable);
+  dumpTable('mapLibs', mapTable);
+  dumpFooter();
+}
+
+visitLibraryAtUri(AnalysisSession session, String uri) async {
+  String libPath = session.uriConverter.uriToPath(Uri.parse(uri));
+  ResolvedLibraryResult result = await session.getResolvedLibrary(libPath);
+  if (result.state != ResultState.VALID) {
+    throw new StateError('Unable to resolve "$uri"');
+  }
+  visitLibrary(result.element);
+}
+
+visitLibrary(LibraryElement library) async {
+  // This uses the element model to traverse the code. The element model
+  // represents the semantic structure of the code. A library consists of
+  // one or more compilation units.
+  for (CompilationUnitElement unit in library.units) {
+    visitCompilationUnit(unit);
+  }
+}
+
+visitCompilationUnit(CompilationUnitElement unit) {
+  // Each compilation unit contains elements for all of the top-level
+  // declarations in a single file, such as variables, functions, and
+  // classes. Note that `types` only returns classes. You can use
+  // `mixins` to visit mixins, `enums` to visit enum, `functionTypeAliases`
+  // to visit typedefs, etc.
+  for (TopLevelVariableElement variable in unit.topLevelVariables) {
+    if (variable.isPublic) {
+      addToTable(typeString(variable.type), variable.name, 'Vv');
+    }
+  }
+  for (FunctionElement function in unit.functions) {
+    if (function.isPublic && !function.isOperator) {
+      addToTable(typeString(function.returnType), function.name,
+          protoString(null, function.parameters));
+    }
+  }
+  for (ClassElement classElement in unit.types) {
+    if (classElement.isPublic) {
+      visitClass(classElement);
+    }
+  }
+}
+
+void visitClass(ClassElement classElement) {
+  // Every class element contains elements for the members, viz. `methods` visits
+  // methods, `fields` visits fields, `accessors` visits getters and setters, etc.
+  // There are also accessors to get the superclass, mixins, interfaces, type
+  // parameters, etc.
+  for (ConstructorElement constructor in classElement.constructors) {
+    if (constructor.isPublic &&
+        constructor.isFactory &&
+        !constructor.name.isEmpty) {
+      addToTable(
+          typeString(classElement.type),
+          '${classElement.name}.${constructor.name}',
+          protoString(null, constructor.parameters));
+    }
+  }
+  for (MethodElement method in classElement.methods) {
+    if (method.isPublic && !method.isOperator) {
+      if (method.isStatic) {
+        addToTable(
+            typeString(method.returnType),
+            '${classElement.name}.${method.name}',
+            protoString(null, method.parameters));
+      } else {
+        addToTable(typeString(method.returnType), method.name,
+            protoString(classElement.type, method.parameters));
+      }
+    }
+  }
+  for (PropertyAccessorElement accessor in classElement.accessors) {
+    if (accessor.isPublic && accessor.isGetter) {
+      var variable = accessor.variable;
+      if (accessor.isStatic) {
+        addToTable(typeString(variable.type),
+            '${classElement.name}.${variable.name}', 'Vv');
+      } else {
+        addToTable(typeString(variable.type), variable.name,
+            '${typeString(classElement.type)}v');
+      }
+    }
+  }
+}
+
+// Types are represented by an instance of `DartType`. For classes, the type
+// will be an instance of `InterfaceType`, which will provide access to the
+// defining (class) element, as well as any type arguments.
+String typeString(DartType type) {
+  if (type.isDartCoreBool) {
+    return 'B';
+  } else if (type.isDartCoreInt) {
+    return 'I';
+  } else if (type.isDartCoreDouble) {
+    return 'D';
+  } else if (type.isDartCoreString) {
+    return 'S';
+  }
+  // Supertypes or type parameters are specialized in a consistent manner.
+  // TODO(ajcbik): inspect type structure semantically, not by display name
+  //               and unify DartFuzz's DartType with analyzer DartType.
+  switch (type.displayName) {
+    case 'E':
+      return 'I';
+    case 'num':
+      return 'D';
+    case 'List<E>':
+    case 'List<Object>':
+    case 'List<dynamic>':
+    case 'List<int>':
+    case 'List':
+      return 'L';
+    case 'Set<E>':
+    case 'Set<Object>':
+    case 'Set<dynamic>':
+    case 'Set<int>':
+    case 'Set':
+      return 'X';
+    case 'Map<K, V>':
+    case 'Map<dynamic, dynamic>':
+    case 'Map<int, String>':
+    case 'Map':
+      return 'M';
+  }
+  return '?';
+}
+
+String protoString(DartType receiver, List<ParameterElement> parameters) {
+  var proto = receiver == null ? 'V' : typeString(receiver);
+  // Construct prototype for non-named parameters.
+  for (ParameterElement parameter in parameters) {
+    if (!parameter.isNamed) {
+      proto += typeString(parameter.type);
+    }
+  }
+  // Use 'void' for an empty parameter list.
+  return proto.length == 1 ? proto + 'V' : proto;
+}
+
+List<DartLib> getTable(String ret) {
+  switch (ret) {
+    case 'B':
+      return boolTable;
+    case 'I':
+      return intTable;
+    case 'D':
+      return doubleTable;
+    case 'S':
+      return stringTable;
+    case 'L':
+      return listTable;
+    case 'X':
+      return setTable;
+    case 'M':
+      return mapTable;
+  }
+}
+
+void addToTable(String ret, String name, String proto) {
+  // If any of the type representations contains a question
+  // mark, this means that DartFuzz' type system cannot
+  // deal with such an expression yet. So drop the entry.
+  if (ret.contains('?') || proto.contains('?')) {
+    return;
+  }
+  // Restrict parameters for a few hardcoded cases, for
+  // example, to avoid excessive runtime or memory allocation
+  // in the generated fuzzing program or to avoid obvious
+  // divergences.
+  if (name == 'padLeft' || name == 'padRight') {
+    proto = proto.replaceAll('I', 'i');
+  } else if (name == 'Platform.executable' ||
+      name == 'Platform.resolvedExecutable') {
+    return;
+  }
+  // Add to table.
+  getTable(ret).add(DartLib(name, proto));
+}
+
+void dumpHeader() {
+  print("""
+// Copyright (c) 2019, the Dart project authors.  Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+/// Class that represents Dart library methods.
+///
+/// The invididual lists are organized by return type.
+/// The proto string has the following format:
+///    +-------> receiver type (V denotes none)
+///    |+------> param1 type  (V denotes none, v denotes getter)
+///    ||+-----> param2 type
+///    |||+----> ..
+///    ||||
+///   'TTTT..'
+/// where:
+///   V void
+///   v void (special)
+///   B bool
+///   I int
+///   i int (small)
+///   D double
+///   S String
+///   L List<int>
+///   X Set<int>
+///   M Map<int, String>
+///
+/// NOTE: this code has been generated automatically.
+///
+class DartLib {
+  final String name;
+  final String proto;
+  const DartLib(this.name, this.proto);
+""");
+}
+
+void dumpTable(String identifier, List<DartLib> table) {
+  print('  static const $identifier = [');
+  table.forEach((t) => print('    DartLib(\'${t.name}\', \'${t.proto}\'),'));
+  print('  ];');
+}
+
+void dumpFooter() {
+  print('}');
+}
diff --git a/runtime/vm/bootstrap.cc b/runtime/vm/bootstrap.cc
index fc59b64..8c05417 100644
--- a/runtime/vm/bootstrap.cc
+++ b/runtime/vm/bootstrap.cc
@@ -89,7 +89,7 @@
     const String& msg = String::Handle(String::New(message_buffer, Heap::kOld));
     return ApiError::New(msg, Heap::kOld);
   }
-  kernel::KernelLoader loader(program);
+  kernel::KernelLoader loader(program, /*uri_to_source_table=*/nullptr);
 
   Isolate* isolate = thread->isolate();
 
diff --git a/runtime/vm/bootstrap_natives.h b/runtime/vm/bootstrap_natives.h
index da9161f..da1dc36 100644
--- a/runtime/vm/bootstrap_natives.h
+++ b/runtime/vm/bootstrap_natives.h
@@ -103,6 +103,7 @@
   V(RegExp_getIsMultiLine, 1)                                                  \
   V(RegExp_getIsCaseSensitive, 1)                                              \
   V(RegExp_getGroupCount, 1)                                                   \
+  V(RegExp_getGroupNameMap, 1)                                                 \
   V(RegExp_ExecuteMatch, 3)                                                    \
   V(RegExp_ExecuteMatchSticky, 3)                                              \
   V(List_new, 2)                                                               \
@@ -312,11 +313,12 @@
   V(Int32x4_setFlagZ, 2)                                                       \
   V(Int32x4_setFlagW, 2)                                                       \
   V(Int32x4_select, 3)                                                         \
-  V(Isolate_spawnFunction, 10)                                                 \
-  V(Isolate_spawnUri, 12)                                                      \
+  V(Isolate_spawnFunction, 11)                                                 \
+  V(Isolate_spawnUri, 13)                                                      \
   V(Isolate_getPortAndCapabilitiesOfCurrentIsolate, 0)                         \
   V(Isolate_getCurrentRootUriStr, 0)                                           \
   V(Isolate_sendOOB, 2)                                                        \
+  V(Isolate_getDebugName, 1)                                                   \
   V(GrowableList_allocate, 2)                                                  \
   V(GrowableList_getIndexed, 2)                                                \
   V(GrowableList_setIndexed, 3)                                                \
diff --git a/runtime/vm/class_finalizer.cc b/runtime/vm/class_finalizer.cc
index eb79223..f4d63f7 100644
--- a/runtime/vm/class_finalizer.cc
+++ b/runtime/vm/class_finalizer.cc
@@ -1246,7 +1246,7 @@
         if (field.IsUninitialized()) {
           if (pending_unevaluated_const_fields.IsNull()) {
             // Evaluate right away.
-            error = field.EvaluateInitializer();
+            error = field.Initialize();
             if (!error.IsNull()) {
               ReportError(error);
             }
diff --git a/runtime/vm/class_id.h b/runtime/vm/class_id.h
index 22cf733..9acabba 100644
--- a/runtime/vm/class_id.h
+++ b/runtime/vm/class_id.h
@@ -64,6 +64,7 @@
   V(Float32x4)                                                                 \
   V(Int32x4)                                                                   \
   V(Float64x2)                                                                 \
+  V(TypedDataBase)                                                             \
   V(TypedData)                                                                 \
   V(ExternalTypedData)                                                         \
   V(TypedDataView)                                                             \
@@ -177,25 +178,19 @@
   CLASS_LIST(DEFINE_OBJECT_KIND)
 #undef DEFINE_OBJECT_KIND
 
-#define DEFINE_OBJECT_KIND(clazz) kFfi##clazz##Cid,
-      CLASS_LIST_FFI(DEFINE_OBJECT_KIND)
-#undef DEFINE_OBJECT_KIND
-
 // clang-format off
-#define DEFINE_OBJECT_KIND(clazz) kTypedData##clazz##Cid,
-  CLASS_LIST_TYPED_DATA(DEFINE_OBJECT_KIND)
+#define DEFINE_OBJECT_KIND(clazz) kFfi##clazz##Cid,
+  CLASS_LIST_FFI(DEFINE_OBJECT_KIND)
 #undef DEFINE_OBJECT_KIND
 
-#define DEFINE_OBJECT_KIND(clazz) kTypedData##clazz##ViewCid,
+#define DEFINE_OBJECT_KIND(clazz)                                              \
+  kTypedData##clazz##Cid,                                                      \
+  kTypedData##clazz##ViewCid,                                                  \
+  kExternalTypedData##clazz##Cid,
   CLASS_LIST_TYPED_DATA(DEFINE_OBJECT_KIND)
 #undef DEFINE_OBJECT_KIND
-
   kByteDataViewCid,
 
-#define DEFINE_OBJECT_KIND(clazz) kExternalTypedData##clazz##Cid,
-  CLASS_LIST_TYPED_DATA(DEFINE_OBJECT_KIND)
-#undef DEFINE_OBJECT_KIND
-
   kByteBufferCid,
   // clang-format on
 
@@ -208,6 +203,11 @@
   kNumPredefinedCids,
 };
 
+// Keep these in sync with the cid numbering above.
+const int kTypedDataCidRemainderInternal = 0;
+const int kTypedDataCidRemainderView = 1;
+const int kTypedDataCidRemainderExternal = 2;
+
 }  // namespace dart
 
 #endif  // RUNTIME_VM_CLASS_ID_H_
diff --git a/runtime/vm/class_table.cc b/runtime/vm/class_table.cc
index 3aa1544..f3f5fd5 100644
--- a/runtime/vm/class_table.cc
+++ b/runtime/vm/class_table.cc
@@ -22,7 +22,6 @@
       table_(NULL),
       old_tables_(new MallocGrowableArray<ClassAndSize*>()) {
   NOT_IN_PRODUCT(class_heap_stats_table_ = NULL);
-  NOT_IN_PRODUCT(predefined_class_heap_stats_table_ = NULL);
   if (Dart::vm_isolate() == NULL) {
     capacity_ = initial_capacity_;
     table_ = reinterpret_cast<ClassAndSize*>(
@@ -41,20 +40,12 @@
     table_[kForwardingCorpse] = vm_class_table->PairAt(kForwardingCorpse);
     table_[kDynamicCid] = vm_class_table->PairAt(kDynamicCid);
     table_[kVoidCid] = vm_class_table->PairAt(kVoidCid);
-
-#ifndef PRODUCT
-    class_heap_stats_table_ = reinterpret_cast<ClassHeapStats*>(
-        calloc(capacity_, sizeof(ClassHeapStats)));  // NOLINT
-    for (intptr_t i = 0; i < capacity_; i++) {
-      class_heap_stats_table_[i].Initialize();
-    }
-#endif  // !PRODUCT
   }
 #ifndef PRODUCT
-  predefined_class_heap_stats_table_ = reinterpret_cast<ClassHeapStats*>(
-      calloc(kNumPredefinedCids, sizeof(ClassHeapStats)));  // NOLINT
-  for (intptr_t i = 0; i < kNumPredefinedCids; i++) {
-    predefined_class_heap_stats_table_[i].Initialize();
+  class_heap_stats_table_ = reinterpret_cast<ClassHeapStats*>(
+      calloc(capacity_, sizeof(ClassHeapStats)));  // NOLINT
+  for (intptr_t i = 0; i < capacity_; i++) {
+    class_heap_stats_table_[i].Initialize();
   }
 #endif  // !PRODUCT
 }
@@ -65,7 +56,6 @@
       table_(original->table_),
       old_tables_(NULL) {
   NOT_IN_PRODUCT(class_heap_stats_table_ = NULL);
-  NOT_IN_PRODUCT(predefined_class_heap_stats_table_ = NULL);
 }
 
 ClassTable::~ClassTable() {
@@ -73,11 +63,9 @@
     FreeOldTables();
     delete old_tables_;
     free(table_);
-    NOT_IN_PRODUCT(free(predefined_class_heap_stats_table_));
     NOT_IN_PRODUCT(free(class_heap_stats_table_));
   } else {
     // This instance was a shallow copy. It doesn't own any memory.
-    NOT_IN_PRODUCT(ASSERT(predefined_class_heap_stats_table_ == NULL));
     NOT_IN_PRODUCT(ASSERT(class_heap_stats_table_ == NULL));
   }
 }
@@ -93,18 +81,6 @@
   }
 }
 
-#ifndef PRODUCT
-void ClassTable::SetTraceAllocationFor(intptr_t cid, bool trace) {
-  ClassHeapStats* stats = PreliminaryStatsAt(cid);
-  stats->set_trace_allocation(trace);
-}
-
-bool ClassTable::TraceAllocationFor(intptr_t cid) {
-  ClassHeapStats* stats = PreliminaryStatsAt(cid);
-  return stats->trace_allocation();
-}
-#endif  // !PRODUCT
-
 void ClassTable::Register(const Class& cls) {
   ASSERT(Thread::Current()->IsMutatorThread());
   intptr_t index = cls.id();
@@ -466,15 +442,6 @@
   return !RawObject::IsVariableSizeClassId(cid);
 }
 
-ClassHeapStats* ClassTable::PreliminaryStatsAt(intptr_t cid) {
-  ASSERT(cid > 0);
-  if (cid < kNumPredefinedCids) {
-    return &predefined_class_heap_stats_table_[cid];
-  }
-  ASSERT(cid < top_);
-  return &class_heap_stats_table_[cid];
-}
-
 ClassHeapStats* ClassTable::StatsWithUpdatedSize(intptr_t cid) {
   if (!HasValidClassAt(cid) || (cid == kFreeListElement) ||
       (cid == kForwardingCorpse) || (cid == kSmiCid)) {
@@ -494,41 +461,25 @@
 }
 
 void ClassTable::ResetCountersOld() {
-  for (intptr_t i = 0; i < kNumPredefinedCids; i++) {
-    predefined_class_heap_stats_table_[i].ResetAtOldGC();
-  }
-  for (intptr_t i = kNumPredefinedCids; i < top_; i++) {
+  for (intptr_t i = 0; i < top_; i++) {
     class_heap_stats_table_[i].ResetAtOldGC();
   }
 }
 
 void ClassTable::ResetCountersNew() {
-  for (intptr_t i = 0; i < kNumPredefinedCids; i++) {
-    predefined_class_heap_stats_table_[i].ResetAtNewGC();
-  }
-  for (intptr_t i = kNumPredefinedCids; i < top_; i++) {
+  for (intptr_t i = 0; i < top_; i++) {
     class_heap_stats_table_[i].ResetAtNewGC();
   }
 }
 
 void ClassTable::UpdatePromoted() {
-  for (intptr_t i = 0; i < kNumPredefinedCids; i++) {
-    predefined_class_heap_stats_table_[i].UpdatePromotedAfterNewGC();
-  }
-  for (intptr_t i = kNumPredefinedCids; i < top_; i++) {
+  for (intptr_t i = 0; i < top_; i++) {
     class_heap_stats_table_[i].UpdatePromotedAfterNewGC();
   }
 }
 
-ClassHeapStats** ClassTable::TableAddressFor(intptr_t cid) {
-  return (cid < kNumPredefinedCids) ? &predefined_class_heap_stats_table_
-                                    : &class_heap_stats_table_;
-}
-
 intptr_t ClassTable::TableOffsetFor(intptr_t cid) {
-  return (cid < kNumPredefinedCids)
-             ? OFFSET_OF(ClassTable, predefined_class_heap_stats_table_)
-             : OFFSET_OF(ClassTable, class_heap_stats_table_);
+  return OFFSET_OF(ClassTable, class_heap_stats_table_);
 }
 
 intptr_t ClassTable::ClassOffsetFor(intptr_t cid) {
diff --git a/runtime/vm/class_table.h b/runtime/vm/class_table.h
index df71e43..6a49f54 100644
--- a/runtime/vm/class_table.h
+++ b/runtime/vm/class_table.h
@@ -275,7 +275,6 @@
   void UpdatePromoted();
 
   // Used by the generated code.
-  ClassHeapStats** TableAddressFor(intptr_t cid);
   static intptr_t TableOffsetFor(intptr_t cid);
 
   // Used by the generated code.
@@ -293,14 +292,21 @@
   void ResetAllocationAccumulators();
 
   void PrintToJSONObject(JSONObject* object);
+
+  void SetTraceAllocationFor(intptr_t cid, bool trace) {
+    ClassHeapStats* stats = PreliminaryStatsAt(cid);
+    stats->set_trace_allocation(trace);
+  }
+  bool TraceAllocationFor(intptr_t cid) {
+    ClassHeapStats* stats = PreliminaryStatsAt(cid);
+    return stats->trace_allocation();
+  }
 #endif  // !PRODUCT
 
   void AddOldTable(ClassAndSize* old_table);
   // Deallocates table copies. Do not call during concurrent access to table.
   void FreeOldTables();
 
-  void SetTraceAllocationFor(intptr_t cid, bool trace);
-  bool TraceAllocationFor(intptr_t cid);
 
  private:
   friend class GCMarker;
@@ -323,10 +329,13 @@
 
 #ifndef PRODUCT
   ClassHeapStats* class_heap_stats_table_;
-  ClassHeapStats* predefined_class_heap_stats_table_;
 
   // May not have updated size for variable size classes.
-  ClassHeapStats* PreliminaryStatsAt(intptr_t cid);
+  ClassHeapStats* PreliminaryStatsAt(intptr_t cid) {
+    ASSERT(cid > 0);
+    ASSERT(cid < top_);
+    return &class_heap_stats_table_[cid];
+  }
   void UpdateLiveOld(intptr_t cid, intptr_t size, intptr_t count = 1);
   void UpdateLiveNew(intptr_t cid, intptr_t size);
   void UpdateLiveNewGC(intptr_t cid, intptr_t size);
diff --git a/runtime/vm/clustered_snapshot.cc b/runtime/vm/clustered_snapshot.cc
index 972d93e..213a394 100644
--- a/runtime/vm/clustered_snapshot.cc
+++ b/runtime/vm/clustered_snapshot.cc
@@ -76,7 +76,6 @@
   uint32_t tags = 0;
   tags = RawObject::ClassIdTag::update(class_id, tags);
   tags = RawObject::SizeTag::update(size, tags);
-  tags = RawObject::ReadOnlyBit::update(false, tags);
   tags = RawObject::CanonicalBit::update(is_canonical, tags);
   tags = RawObject::OldBit::update(true, tags);
   tags = RawObject::OldAndNotMarkedBit::update(true, tags);
@@ -503,7 +502,7 @@
       if (kind != Snapshot::kFullAOT) {
         s->WriteTokenPosition(func->ptr()->token_pos_);
         s->WriteTokenPosition(func->ptr()->end_token_pos_);
-        s->Write<int32_t>(func->ptr()->kernel_offset_);
+        s->Write<uint32_t>(func->ptr()->binary_declaration_);
       }
 #endif
       s->Write<uint32_t>(func->ptr()->packed_fields_);
@@ -563,7 +562,7 @@
       if (kind != Snapshot::kFullAOT) {
         func->ptr()->token_pos_ = d->ReadTokenPosition();
         func->ptr()->end_token_pos_ = d->ReadTokenPosition();
-        func->ptr()->kernel_offset_ = d->Read<int32_t>();
+        func->ptr()->binary_declaration_ = d->Read<uint32_t>();
       }
 #endif
       func->ptr()->packed_fields_ = d->Read<uint32_t>();
@@ -936,7 +935,7 @@
         s->WriteCid(field->ptr()->is_nullable_);
         s->Write<int8_t>(field->ptr()->static_type_exactness_state_);
 #if !defined(DART_PRECOMPILED_RUNTIME)
-        s->Write<int32_t>(field->ptr()->kernel_offset_);
+        s->Write<uint32_t>(field->ptr()->binary_declaration_);
 #endif
       }
       s->Write<uint16_t>(field->ptr()->kind_bits_);
@@ -977,7 +976,7 @@
         field->ptr()->is_nullable_ = d->ReadCid();
         field->ptr()->static_type_exactness_state_ = d->Read<int8_t>();
 #if !defined(DART_PRECOMPILED_RUNTIME)
-        field->ptr()->kernel_offset_ = d->Read<int32_t>();
+        field->ptr()->binary_declaration_ = d->Read<uint32_t>();
 #endif
       }
       field->ptr()->kind_bits_ = d->Read<uint16_t>();
@@ -1761,7 +1760,8 @@
     // will be loaded into read-only memory. Extra bytes due to allocation
     // rounding need to be deterministically set for reliable deduplication in
     // shared images.
-    if (object->IsReadOnly()) {
+    if (object->InVMIsolateHeap() ||
+        s->isolate()->heap()->old_space()->IsObjectFromImagePages(object)) {
       // This object is already read-only.
     } else {
       Object::FinalizeReadOnlyObject(object);
@@ -3372,8 +3372,8 @@
       Deserializer::InitializeHeader(
           data, cid_, TypedData::InstanceSize(length_in_bytes), is_canonical);
       data->ptr()->length_ = Smi::New(length);
-      data->ResetData();
-      uint8_t* cdata = data->ptr()->data();
+      data->RecomputeDataField();
+      uint8_t* cdata = reinterpret_cast<uint8_t*>(data->ptr()->data());
       d->ReadBytes(cdata, length_in_bytes);
     }
   }
@@ -3383,6 +3383,84 @@
 };
 
 #if !defined(DART_PRECOMPILED_RUNTIME)
+class TypedDataViewSerializationCluster : public SerializationCluster {
+ public:
+  explicit TypedDataViewSerializationCluster(intptr_t cid)
+      : SerializationCluster("TypedDataView"), cid_(cid) {}
+  ~TypedDataViewSerializationCluster() {}
+
+  void Trace(Serializer* s, RawObject* object) {
+    RawTypedDataView* view = TypedDataView::RawCast(object);
+    objects_.Add(view);
+
+    PushFromTo(view);
+  }
+
+  void WriteAlloc(Serializer* s) {
+    const intptr_t count = objects_.length();
+    s->WriteCid(cid_);
+    s->WriteUnsigned(count);
+    for (intptr_t i = 0; i < count; i++) {
+      RawTypedDataView* view = objects_[i];
+      s->AssignRef(view);
+    }
+  }
+
+  void WriteFill(Serializer* s) {
+    const intptr_t count = objects_.length();
+    for (intptr_t i = 0; i < count; i++) {
+      RawTypedDataView* view = objects_[i];
+      AutoTraceObject(view);
+      s->Write<bool>(view->IsCanonical());
+      WriteFromTo(view);
+    }
+  }
+
+ private:
+  const intptr_t cid_;
+  GrowableArray<RawTypedDataView*> objects_;
+};
+#endif  // !DART_PRECOMPILED_RUNTIME
+
+class TypedDataViewDeserializationCluster : public DeserializationCluster {
+ public:
+  explicit TypedDataViewDeserializationCluster(intptr_t cid) : cid_(cid) {}
+  ~TypedDataViewDeserializationCluster() {}
+
+  void ReadAlloc(Deserializer* d) {
+    start_index_ = d->next_index();
+    PageSpace* old_space = d->heap()->old_space();
+    const intptr_t count = d->ReadUnsigned();
+    for (intptr_t i = 0; i < count; i++) {
+      d->AssignRef(
+          AllocateUninitialized(old_space, TypedDataView::InstanceSize()));
+    }
+    stop_index_ = d->next_index();
+  }
+
+  void ReadFill(Deserializer* d) {
+    for (intptr_t id = start_index_; id < stop_index_; id++) {
+      RawTypedDataView* view = reinterpret_cast<RawTypedDataView*>(d->Ref(id));
+      const bool is_canonical = d->Read<bool>();
+      Deserializer::InitializeHeader(view, cid_, TypedDataView::InstanceSize(),
+                                     is_canonical);
+      ReadFromTo(view);
+    }
+  }
+
+  void PostLoad(const Array& refs, Snapshot::Kind kind, Zone* zone) {
+    auto& view = TypedDataView::Handle(zone);
+    for (intptr_t id = start_index_; id < stop_index_; id++) {
+      view ^= refs.At(id);
+      view.RecomputeDataField();
+    }
+  }
+
+ private:
+  const intptr_t cid_;
+};
+
+#if !defined(DART_PRECOMPILED_RUNTIME)
 class ExternalTypedDataSerializationCluster : public SerializationCluster {
  public:
   explicit ExternalTypedDataSerializationCluster(intptr_t cid)
@@ -4123,11 +4201,13 @@
   return NULL;
 #else
   Zone* Z = zone_;
-  if ((cid >= kNumPredefinedCids) || (cid == kInstanceCid) ||
-      RawObject::IsTypedDataViewClassId(cid)) {
+  if (cid >= kNumPredefinedCids || cid == kInstanceCid) {
     Push(isolate()->class_table()->At(cid));
     return new (Z) InstanceSerializationCluster(cid);
   }
+  if (RawObject::IsTypedDataViewClassId(cid)) {
+    return new (Z) TypedDataViewSerializationCluster(cid);
+  }
   if (RawObject::IsExternalTypedDataClassId(cid)) {
     return new (Z) ExternalTypedDataSerializationCluster(cid);
   }
@@ -4605,6 +4685,12 @@
                 "<empty>");
   AddBaseObject(Object::empty_exception_handlers().raw(), "ExceptionHandlers",
                 "<empty>");
+  ASSERT(Object::implicit_getter_bytecode().raw() != Object::null());
+  AddBaseObject(Object::implicit_getter_bytecode().raw(), "Bytecode",
+                "<implicit getter>");
+  ASSERT(Object::implicit_setter_bytecode().raw() != Object::null());
+  AddBaseObject(Object::implicit_setter_bytecode().raw(), "Bytecode",
+                "<implicit setter>");
 
   for (intptr_t i = 0; i < ArgumentsDescriptor::kCachedDescriptorCount; i++) {
     AddBaseObject(ArgumentsDescriptor::cached_args_descriptors_[i],
@@ -4740,10 +4826,12 @@
 DeserializationCluster* Deserializer::ReadCluster() {
   intptr_t cid = ReadCid();
   Zone* Z = zone_;
-  if ((cid >= kNumPredefinedCids) || (cid == kInstanceCid) ||
-      RawObject::IsTypedDataViewClassId(cid)) {
+  if (cid >= kNumPredefinedCids || cid == kInstanceCid) {
     return new (Z) InstanceDeserializationCluster(cid);
   }
+  if (RawObject::IsTypedDataViewClassId(cid)) {
+    return new (Z) TypedDataViewDeserializationCluster(cid);
+  }
   if (RawObject::IsExternalTypedDataClassId(cid)) {
     return new (Z) ExternalTypedDataDeserializationCluster(cid);
   }
@@ -5058,6 +5146,8 @@
   AddBaseObject(Object::empty_descriptors().raw());
   AddBaseObject(Object::empty_var_descriptors().raw());
   AddBaseObject(Object::empty_exception_handlers().raw());
+  AddBaseObject(Object::implicit_getter_bytecode().raw());
+  AddBaseObject(Object::implicit_setter_bytecode().raw());
 
   for (intptr_t i = 0; i < ArgumentsDescriptor::kCachedDescriptorCount; i++) {
     AddBaseObject(ArgumentsDescriptor::cached_args_descriptors_[i]);
diff --git a/runtime/vm/compilation_trace.cc b/runtime/vm/compilation_trace.cc
index 65791e4..e5f91a0 100644
--- a/runtime/vm/compilation_trace.cc
+++ b/runtime/vm/compilation_trace.cc
@@ -178,7 +178,14 @@
     return Object::null();
   }
 
+  bool is_dyn = Function::IsDynamicInvocationForwarderName(function_name_);
+  if (is_dyn) {
+    function_name_ =
+        Function::DemangleDynamicInvocationForwarderName(function_name_);
+  }
+
   bool is_getter = Field::IsGetterName(function_name_);
+  bool is_init = Field::IsInitName(function_name_);
   bool add_closure = false;
   bool processed = false;
 
@@ -192,6 +199,14 @@
       function_ = lib_.LookupFunctionAllowPrivate(function_name2_);
       field_ = lib_.LookupFieldAllowPrivate(function_name2_);
     }
+    if (field_.IsNull() && is_getter) {
+      function_name2_ = Field::NameFromGetter(function_name_);
+      field_ = lib_.LookupFieldAllowPrivate(function_name2_);
+    }
+    if (field_.IsNull() && is_init) {
+      function_name2_ = Field::NameFromInit(function_name_);
+      field_ = lib_.LookupFieldAllowPrivate(function_name2_);
+    }
   } else {
     cls_ = lib_.SlowLookupClassAllowMultiPartPrivate(class_name_);
     if (cls_.IsNull()) {
@@ -244,12 +259,20 @@
         }
       }
     }
+    if (field_.IsNull() && is_getter) {
+      function_name2_ = Field::NameFromGetter(function_name_);
+      field_ = cls_.LookupFieldAllowPrivate(function_name2_);
+    }
+    if (field_.IsNull() && is_init) {
+      function_name2_ = Field::NameFromInit(function_name_);
+      field_ = cls_.LookupFieldAllowPrivate(function_name2_);
+    }
   }
 
   if (!field_.IsNull() && field_.is_const() && field_.is_static() &&
       (field_.StaticValue() == Object::sentinel().raw())) {
     processed = true;
-    error_ = field_.EvaluateInitializer();
+    error_ = field_.Initialize();
     if (error_.IsError()) {
       if (FLAG_trace_compilation_trace) {
         THR_Print(
@@ -286,6 +309,38 @@
         }
         return error_.raw();
       }
+    } else if (is_dyn) {
+      function_name_ = function_.name();  // With private mangling.
+      function_name_ =
+          Function::CreateDynamicInvocationForwarderName(function_name_);
+      function_ = function_.GetDynamicInvocationForwarder(function_name_);
+      error_ = CompileFunction(function_);
+      if (error_.IsError()) {
+        if (FLAG_trace_compilation_trace) {
+          THR_Print(
+              "Compilation trace: error compiling dynamic forwarder %s,%s,%s "
+              "(%s)\n",
+              uri_.ToCString(), class_name_.ToCString(),
+              function_name_.ToCString(), Error::Cast(error_).ToErrorCString());
+        }
+        return error_.raw();
+      }
+    }
+  }
+
+  if (!field_.IsNull() && field_.is_static() && !field_.is_const() &&
+      field_.has_initializer()) {
+    processed = true;
+    function_ = field_.EnsureInitializerFunction();
+    error_ = CompileFunction(function_);
+    if (error_.IsError()) {
+      if (FLAG_trace_compilation_trace) {
+        THR_Print(
+            "Compilation trace: error compiling initializer %s,%s,%s (%s)\n",
+            uri_.ToCString(), class_name_.ToCString(),
+            function_name_.ToCString(), Error::Cast(error_).ToErrorCString());
+      }
+      return error_.raw();
     }
   }
 
@@ -303,9 +358,8 @@
     return Object::null();
   }
   // Prevent premature code collection due to major GC during startup.
-  const intptr_t kFakeInitialUsage = 32;
-  if (function.usage_counter() < kFakeInitialUsage) {
-    function.set_usage_counter(kFakeInitialUsage);
+  if (function.usage_counter() < Function::kGraceUsageCounter) {
+    function.set_usage_counter(Function::kGraceUsageCounter);
   }
   return Compiler::CompileFunction(thread_, function);
 }
diff --git a/runtime/vm/compiler/aot/aot_call_specializer.cc b/runtime/vm/compiler/aot/aot_call_specializer.cc
index d3a6504..b04473bf 100644
--- a/runtime/vm/compiler/aot/aot_call_specializer.cc
+++ b/runtime/vm/compiler/aot/aot_call_specializer.cc
@@ -442,8 +442,8 @@
       Smi::ZoneHandle(Z, Smi::New(modulus - 1)), kUnboxedInt32);
   InsertBefore(instr, right_definition, /*env=*/NULL, FlowGraph::kValue);
   right_definition = new (Z)
-      UnboxedIntConverterInstr(kUnboxedInt32, kUnboxedInt64,
-                               new (Z) Value(right_definition), DeoptId::kNone);
+      IntConverterInstr(kUnboxedInt32, kUnboxedInt64,
+                        new (Z) Value(right_definition), DeoptId::kNone);
   InsertBefore(instr, right_definition, /*env=*/NULL, FlowGraph::kValue);
 #else
   Definition* right_definition = new (Z) UnboxedConstantInstr(
diff --git a/runtime/vm/compiler/aot/precompiler.cc b/runtime/vm/compiler/aot/precompiler.cc
index 31b9c6b..4289942 100644
--- a/runtime/vm/compiler/aot/precompiler.cc
+++ b/runtime/vm/compiler/aot/precompiler.cc
@@ -1506,7 +1506,7 @@
   for (intptr_t i = 0; i < types.length(); i++) {
     const AbstractType& type = types.At(i);
 
-    if (type.IsReadOnly()) {
+    if (type.InVMIsolateHeap()) {
       // The only important types in the vm isolate are "dynamic"/"void", which
       // will get their optimized top-type testing stub installed at creation.
       continue;
diff --git a/runtime/vm/compiler/asm_intrinsifier_arm.cc b/runtime/vm/compiler/asm_intrinsifier_arm.cc
index cf5264e..2da017e 100644
--- a/runtime/vm/compiler/asm_intrinsifier_arm.cc
+++ b/runtime/vm/compiler/asm_intrinsifier_arm.cc
@@ -153,7 +153,7 @@
   /* R4: allocation stats address. */                                          \
   __ ldr(R3, Address(SP, kArrayLengthStackOffset)); /* Array length. */        \
   __ StoreIntoObjectNoBarrier(                                                 \
-      R0, FieldAddress(R0, target::TypedData::length_offset()), R3);           \
+      R0, FieldAddress(R0, target::TypedDataBase::length_offset()), R3);       \
   /* Initialize all array elements to 0. */                                    \
   /* R0: new object start as a tagged pointer. */                              \
   /* R1: new object end address. */                                            \
@@ -165,8 +165,8 @@
   __ LoadImmediate(R8, 0);                                                     \
   __ mov(R9, Operand(R8));                                                     \
   __ AddImmediate(R3, R0, target::TypedData::InstanceSize() - 1);              \
-  __ StoreIntoObjectNoBarrier(                                                 \
-      R0, FieldAddress(R0, target::TypedData::data_offset()), R3);             \
+  __ StoreInternalPointer(                                                     \
+      R0, FieldAddress(R0, target::TypedDataBase::data_field_offset()), R3);   \
   Label init_loop;                                                             \
   __ Bind(&init_loop);                                                         \
   __ AddImmediate(R3, 2 * target::kWordSize);                                  \
@@ -695,12 +695,13 @@
   // R4 = n ~/ _DIGIT_BITS
   __ Asr(R4, R3, Operand(5));
   // R8 = &x_digits[0]
-  __ ldr(R8, FieldAddress(R1, target::TypedData::data_offset()));
+  __ add(R8, R1, Operand(target::TypedData::data_offset() - kHeapObjectTag));
   // NOTFP = &x_digits[x_used]
   __ add(NOTFP, R8, Operand(R0, LSL, 1));
   // R6 = &r_digits[1]
-  __ ldr(R6, FieldAddress(R2, target::TypedData::data_offset()));
-  __ add(R6, R6, Operand(kBytesPerBigIntDigit));
+  __ add(R6, R2,
+         Operand(target::TypedData::data_offset() - kHeapObjectTag +
+                 kBytesPerBigIntDigit));
   // R6 = &r_digits[x_used + n ~/ _DIGIT_BITS + 1]
   __ add(R4, R4, Operand(R0, ASR, 1));
   __ add(R6, R6, Operand(R4, LSL, 2));
@@ -734,9 +735,9 @@
   // R4 = n ~/ _DIGIT_BITS
   __ Asr(R4, R3, Operand(5));
   // R6 = &r_digits[0]
-  __ ldr(R6, FieldAddress(R2, target::TypedData::data_offset()));
+  __ add(R6, R2, Operand(target::TypedData::data_offset() - kHeapObjectTag));
   // NOTFP = &x_digits[n ~/ _DIGIT_BITS]
-  __ ldr(NOTFP, FieldAddress(R1, target::TypedData::data_offset()));
+  __ add(NOTFP, R1, Operand(target::TypedData::data_offset() - kHeapObjectTag));
   __ add(NOTFP, NOTFP, Operand(R4, LSL, 2));
   // R8 = &r_digits[x_used - n ~/ _DIGIT_BITS - 1]
   __ add(R4, R4, Operand(1));
@@ -774,17 +775,17 @@
   // R0 = used, R1 = digits
   __ ldrd(R0, R1, SP, 3 * target::kWordSize);
   // R1 = &digits[0]
-  __ ldr(R1, FieldAddress(R1, target::TypedData::data_offset()));
+  __ add(R1, R1, Operand(target::TypedData::data_offset() - kHeapObjectTag));
 
   // R2 = a_used, R3 = a_digits
   __ ldrd(R2, R3, SP, 1 * target::kWordSize);
   // R3 = &a_digits[0]
-  __ ldr(R3, FieldAddress(R3, target::TypedData::data_offset()));
+  __ add(R3, R3, Operand(target::TypedData::data_offset() - kHeapObjectTag));
 
   // R8 = r_digits
   __ ldr(R8, Address(SP, 0 * target::kWordSize));
   // R8 = &r_digits[0]
-  __ ldr(R8, FieldAddress(R8, target::TypedData::data_offset()));
+  __ add(R8, R8, Operand(target::TypedData::data_offset() - kHeapObjectTag));
 
   // NOTFP = &digits[a_used >> 1], a_used is Smi.
   __ add(NOTFP, R1, Operand(R2, LSL, 1));
@@ -834,17 +835,17 @@
   // R0 = used, R1 = digits
   __ ldrd(R0, R1, SP, 3 * target::kWordSize);
   // R1 = &digits[0]
-  __ ldr(R1, FieldAddress(R1, target::TypedData::data_offset()));
+  __ add(R1, R1, Operand(target::TypedData::data_offset() - kHeapObjectTag));
 
   // R2 = a_used, R3 = a_digits
   __ ldrd(R2, R3, SP, 1 * target::kWordSize);
   // R3 = &a_digits[0]
-  __ ldr(R3, FieldAddress(R3, target::TypedData::data_offset()));
+  __ add(R3, R3, Operand(target::TypedData::data_offset() - kHeapObjectTag));
 
   // R8 = r_digits
   __ ldr(R8, Address(SP, 0 * target::kWordSize));
   // R8 = &r_digits[0]
-  __ ldr(R8, FieldAddress(R8, target::TypedData::data_offset()));
+  __ add(R8, R8, Operand(target::TypedData::data_offset() - kHeapObjectTag));
 
   // NOTFP = &digits[a_used >> 1], a_used is Smi.
   __ add(NOTFP, R1, Operand(R2, LSL, 1));
@@ -913,8 +914,8 @@
   Label done;
   // R3 = x, no_op if x == 0
   __ ldrd(R0, R1, SP, 5 * target::kWordSize);  // R0 = xi as Smi, R1 = x_digits.
+  __ add(R1, R1, Operand(R0, LSL, 1));
   __ ldr(R3, FieldAddress(R1, target::TypedData::data_offset()));
-  __ ldr(R3, Address(R3, R0, LSL, 1));
   __ tst(R3, Operand(R3));
   __ b(&done, EQ);
 
@@ -925,13 +926,13 @@
 
   // R4 = mip = &m_digits[i >> 1]
   __ ldrd(R0, R1, SP, 3 * target::kWordSize);  // R0 = i as Smi, R1 = m_digits.
-  __ ldr(R4, FieldAddress(R1, target::TypedData::data_offset()));
-  __ add(R4, R4, Operand(R0, LSL, 1));
+  __ add(R1, R1, Operand(R0, LSL, 1));
+  __ add(R4, R1, Operand(target::TypedData::data_offset() - kHeapObjectTag));
 
   // R9 = ajp = &a_digits[j >> 1]
   __ ldrd(R0, R1, SP, 1 * target::kWordSize);  // R0 = j as Smi, R1 = a_digits.
-  __ ldr(R9, FieldAddress(R1, target::TypedData::data_offset()));
-  __ add(R9, R9, Operand(R0, LSL, 1));
+  __ add(R1, R1, Operand(R0, LSL, 1));
+  __ add(R9, R1, Operand(target::TypedData::data_offset() - kHeapObjectTag));
 
   // R1 = c = 0
   __ mov(R1, Operand(0));
@@ -1013,8 +1014,8 @@
 
   // R4 = xip = &x_digits[i >> 1]
   __ ldrd(R2, R3, SP, 2 * target::kWordSize);  // R2 = i as Smi, R3 = x_digits
-  __ ldr(R4, FieldAddress(R3, target::TypedData::data_offset()));
-  __ add(R4, R4, Operand(R2, LSL, 1));
+  __ add(R3, R3, Operand(R2, LSL, 1));
+  __ add(R4, R3, Operand(target::TypedData::data_offset() - kHeapObjectTag));
 
   // R3 = x = *xip++, return if x == 0
   Label x_zero;
@@ -1024,8 +1025,8 @@
 
   // NOTFP = ajp = &a_digits[i]
   __ ldr(R1, Address(SP, 1 * target::kWordSize));  // a_digits
-  __ ldr(NOTFP, FieldAddress(R1, target::TypedData::data_offset()));
-  __ add(NOTFP, NOTFP, Operand(R2, LSL, 2));  // j == 2*i, i is Smi.
+  __ add(R1, R1, Operand(R2, LSL, 2));             // j == 2*i, i is Smi.
+  __ add(NOTFP, R1, Operand(target::TypedData::data_offset() - kHeapObjectTag));
 
   // R8:R0 = t = x*x + *ajp
   __ ldr(R0, Address(NOTFP, 0));
@@ -1113,24 +1114,24 @@
   //   return 1;
   // }
 
-  // R4 = &args[0]
+  // R4 = args
   __ ldr(R4, Address(SP, 2 * target::kWordSize));  // args
-  __ ldr(R4, FieldAddress(R4, target::TypedData::data_offset()));
 
   // R3 = rho = args[2]
-  __ ldr(R3, Address(R4, 2 * kBytesPerBigIntDigit));
+  __ ldr(R3, FieldAddress(R4, target::TypedData::data_offset() +
+                                  2 * kBytesPerBigIntDigit));
 
   // R2 = digits[i >> 1]
   __ ldrd(R0, R1, SP, 0 * target::kWordSize);  // R0 = i as Smi, R1 = digits
+  __ add(R1, R1, Operand(R0, LSL, 1));
   __ ldr(R2, FieldAddress(R1, target::TypedData::data_offset()));
-  __ add(R2, R2, Operand(R0, LSL, 1));
-  __ ldr(R2, Address(R2));
 
   // R1:R0 = t = rho*d
   __ umull(R0, R1, R2, R3);
 
   // args[4] = t mod DIGIT_BASE = low32(t)
-  __ str(R0, Address(R4, 4 * kBytesPerBigIntDigit));
+  __ str(R0, FieldAddress(R4, target::TypedData::data_offset() +
+                                  4 * kBytesPerBigIntDigit));
 
   __ mov(R0, Operand(target::ToRawSmi(1)));  // One digit processed.
   __ Ret();
@@ -1496,7 +1497,6 @@
   // Field '_state'.
   __ ldr(R1, FieldAddress(R0, LookupFieldOffsetInBytes(state_field)));
   // Addresses of _state[0] and _state[1].
-  __ ldr(R1, FieldAddress(R1, target::TypedData::data_offset()));
 
   const int64_t disp_0 =
       target::Instance::DataOffsetFor(kTypedDataUint32ArrayCid);
@@ -1504,13 +1504,13 @@
       disp_0 + target::Instance::ElementSizeFor(kTypedDataUint32ArrayCid);
 
   __ LoadImmediate(R0, a_int32_value);
-  __ LoadFromOffset(kWord, R2, R1, disp_0);
-  __ LoadFromOffset(kWord, R3, R1, disp_1);
+  __ LoadFromOffset(kWord, R2, R1, disp_0 - kHeapObjectTag);
+  __ LoadFromOffset(kWord, R3, R1, disp_1 - kHeapObjectTag);
   __ mov(R8, Operand(0));  // Zero extend unsigned _state[kSTATE_HI].
   // Unsigned 32-bit multiply and 64-bit accumulate into R8:R3.
   __ umlal(R3, R8, R0, R2);  // R8:R3 <- R8:R3 + R0 * R2.
-  __ StoreToOffset(kWord, R3, R1, disp_0);
-  __ StoreToOffset(kWord, R8, R1, disp_1);
+  __ StoreToOffset(kWord, R3, R1, disp_0 - kHeapObjectTag);
+  __ StoreToOffset(kWord, R8, R1, disp_1 - kHeapObjectTag);
   ASSERT(target::ToRawSmi(0) == 0);
   __ eor(R0, R0, Operand(R0));
   __ Ret();
diff --git a/runtime/vm/compiler/asm_intrinsifier_arm64.cc b/runtime/vm/compiler/asm_intrinsifier_arm64.cc
index 0153c00..6c63421 100644
--- a/runtime/vm/compiler/asm_intrinsifier_arm64.cc
+++ b/runtime/vm/compiler/asm_intrinsifier_arm64.cc
@@ -168,7 +168,7 @@
   /* R1: new object end address. */                                            \
   __ ldr(R2, Address(SP, kArrayLengthStackOffset)); /* Array length. */        \
   __ StoreIntoObjectNoBarrier(                                                 \
-      R0, FieldAddress(R0, target::TypedData::length_offset()), R2);           \
+      R0, FieldAddress(R0, target::TypedDataBase::length_offset()), R2);       \
   /* Initialize all array elements to 0. */                                    \
   /* R0: new object start as a tagged pointer. */                              \
   /* R1: new object end address. */                                            \
@@ -177,8 +177,8 @@
   /* data area to be initialized. */                                           \
   __ mov(R3, ZR);                                                              \
   __ AddImmediate(R2, R0, target::TypedData::InstanceSize() - 1);              \
-  __ StoreIntoObjectNoBarrier(                                                 \
-      R0, FieldAddress(R0, target::TypedData::data_offset()), R2);             \
+  __ StoreInternalPointer(                                                     \
+      R0, FieldAddress(R0, target::TypedDataBase::data_field_offset()), R2);   \
   Label init_loop, done;                                                       \
   __ Bind(&init_loop);                                                         \
   __ cmp(R2, Operand(R1));                                                     \
@@ -603,12 +603,13 @@
   // R0 = n ~/ (2*_DIGIT_BITS)
   __ AsrImmediate(R0, R5, 6);
   // R6 = &x_digits[0]
-  __ ldr(R6, FieldAddress(R3, target::TypedData::data_offset()));
+  __ add(R6, R3, Operand(target::TypedData::data_offset() - kHeapObjectTag));
   // R7 = &x_digits[2*R2]
   __ add(R7, R6, Operand(R2, LSL, 3));
   // R8 = &r_digits[2*1]
-  __ ldr(R8, FieldAddress(R4, target::TypedData::data_offset()));
-  __ add(R8, R8, Operand(2 * kBytesPerBigIntDigit));
+  __ add(R8, R4,
+         Operand(target::TypedData::data_offset() - kHeapObjectTag +
+                 2 * kBytesPerBigIntDigit));
   // R8 = &r_digits[2*(R2 + n ~/ (2*_DIGIT_BITS) + 1)]
   __ add(R0, R0, Operand(R2));
   __ add(R8, R8, Operand(R0, LSL, 3));
@@ -646,9 +647,9 @@
   // R0 = n ~/ (2*_DIGIT_BITS)
   __ AsrImmediate(R0, R5, 6);
   // R8 = &r_digits[0]
-  __ ldr(R8, FieldAddress(R4, target::TypedData::data_offset()));
+  __ add(R8, R4, Operand(target::TypedData::data_offset() - kHeapObjectTag));
   // R7 = &x_digits[2*(n ~/ (2*_DIGIT_BITS))]
-  __ ldr(R7, FieldAddress(R3, target::TypedData::data_offset()));
+  __ add(R7, R3, Operand(target::TypedData::data_offset() - kHeapObjectTag));
   __ add(R7, R7, Operand(R0, LSL, 3));
   // R6 = &r_digits[2*(R2 - n ~/ (2*_DIGIT_BITS) - 1)]
   __ add(R0, R0, Operand(1));
@@ -690,19 +691,19 @@
   __ add(R2, R2, Operand(2));  // used > 0, Smi. R2 = used + 1, round up.
   __ add(R2, ZR, Operand(R2, ASR, 2));  // R2 = num of digit pairs to process.
   // R3 = &digits[0]
-  __ ldr(R3, FieldAddress(R3, target::TypedData::data_offset()));
+  __ add(R3, R3, Operand(target::TypedData::data_offset() - kHeapObjectTag));
 
   // R4 = a_used, R5 = a_digits
   __ ldp(R4, R5, Address(SP, 1 * target::kWordSize, Address::PairOffset));
   __ add(R4, R4, Operand(2));  // a_used > 0, Smi. R4 = a_used + 1, round up.
   __ add(R4, ZR, Operand(R4, ASR, 2));  // R4 = num of digit pairs to process.
   // R5 = &a_digits[0]
-  __ ldr(R5, FieldAddress(R5, target::TypedData::data_offset()));
+  __ add(R5, R5, Operand(target::TypedData::data_offset() - kHeapObjectTag));
 
   // R6 = r_digits
   __ ldr(R6, Address(SP, 0 * target::kWordSize));
   // R6 = &r_digits[0]
-  __ ldr(R6, FieldAddress(R6, target::TypedData::data_offset()));
+  __ add(R6, R6, Operand(target::TypedData::data_offset() - kHeapObjectTag));
 
   // R7 = &digits[a_used rounded up to even number].
   __ add(R7, R3, Operand(R4, LSL, 3));
@@ -756,19 +757,19 @@
   __ add(R2, R2, Operand(2));  // used > 0, Smi. R2 = used + 1, round up.
   __ add(R2, ZR, Operand(R2, ASR, 2));  // R2 = num of digit pairs to process.
   // R3 = &digits[0]
-  __ ldr(R3, FieldAddress(R3, target::TypedData::data_offset()));
+  __ add(R3, R3, Operand(target::TypedData::data_offset() - kHeapObjectTag));
 
   // R4 = a_used, R5 = a_digits
   __ ldp(R4, R5, Address(SP, 1 * target::kWordSize, Address::PairOffset));
   __ add(R4, R4, Operand(2));  // a_used > 0, Smi. R4 = a_used + 1, round up.
   __ add(R4, ZR, Operand(R4, ASR, 2));  // R4 = num of digit pairs to process.
   // R5 = &a_digits[0]
-  __ ldr(R5, FieldAddress(R5, target::TypedData::data_offset()));
+  __ add(R5, R5, Operand(target::TypedData::data_offset() - kHeapObjectTag));
 
   // R6 = r_digits
   __ ldr(R6, Address(SP, 0 * target::kWordSize));
   // R6 = &r_digits[0]
-  __ ldr(R6, FieldAddress(R6, target::TypedData::data_offset()));
+  __ add(R6, R6, Operand(target::TypedData::data_offset() - kHeapObjectTag));
 
   // R7 = &digits[a_used rounded up to even number].
   __ add(R7, R3, Operand(R4, LSL, 3));
@@ -839,9 +840,8 @@
   // R3 = x, no_op if x == 0
   // R0 = xi as Smi, R1 = x_digits.
   __ ldp(R0, R1, Address(SP, 5 * target::kWordSize, Address::PairOffset));
+  __ add(R1, R1, Operand(R0, LSL, 1));
   __ ldr(R3, FieldAddress(R1, target::TypedData::data_offset()));
-  __ add(R3, R3, Operand(R0, LSL, 1));
-  __ ldr(R3, Address(R3, 0));
   __ tst(R3, Operand(R3));
   __ b(&done, EQ);
 
@@ -854,14 +854,14 @@
   // R4 = mip = &m_digits[i >> 1]
   // R0 = i as Smi, R1 = m_digits.
   __ ldp(R0, R1, Address(SP, 3 * target::kWordSize, Address::PairOffset));
-  __ ldr(R4, FieldAddress(R1, target::TypedData::data_offset()));
-  __ add(R4, R4, Operand(R0, LSL, 1));
+  __ add(R1, R1, Operand(R0, LSL, 1));
+  __ add(R4, R1, Operand(target::TypedData::data_offset() - kHeapObjectTag));
 
   // R5 = ajp = &a_digits[j >> 1]
   // R0 = j as Smi, R1 = a_digits.
   __ ldp(R0, R1, Address(SP, 1 * target::kWordSize, Address::PairOffset));
-  __ ldr(R5, FieldAddress(R1, target::TypedData::data_offset()));
-  __ add(R5, R5, Operand(R0, LSL, 1));
+  __ add(R1, R1, Operand(R0, LSL, 1));
+  __ add(R5, R1, Operand(target::TypedData::data_offset() - kHeapObjectTag));
 
   // R1 = c = 0
   __ mov(R1, ZR);
@@ -948,8 +948,8 @@
   // R4 = xip = &x_digits[i >> 1]
   // R2 = i as Smi, R3 = x_digits
   __ ldp(R2, R3, Address(SP, 2 * target::kWordSize, Address::PairOffset));
-  __ ldr(R4, FieldAddress(R3, target::TypedData::data_offset()));
-  __ add(R4, R4, Operand(R2, LSL, 1));
+  __ add(R3, R3, Operand(R2, LSL, 1));
+  __ add(R4, R3, Operand(target::TypedData::data_offset() - kHeapObjectTag));
 
   // R3 = x = *xip++, return if x == 0
   Label x_zero;
@@ -959,8 +959,8 @@
 
   // R5 = ajp = &a_digits[i]
   __ ldr(R1, Address(SP, 1 * target::kWordSize));  // a_digits
-  __ ldr(R5, FieldAddress(R1, target::TypedData::data_offset()));
-  __ add(R5, R5, Operand(R2, LSL, 2));  // j == 2*i, i is Smi.
+  __ add(R1, R1, Operand(R2, LSL, 2));             // j == 2*i, i is Smi.
+  __ add(R5, R1, Operand(target::TypedData::data_offset() - kHeapObjectTag));
 
   // R6:R1 = t = x*x + *ajp
   __ ldr(R0, Address(R5, 0));
@@ -1078,19 +1078,18 @@
   //   return 2;
   // }
 
-  // R4 = &args[0]
+  // R4 = args
   __ ldr(R4, Address(SP, 2 * target::kWordSize));  // args
-  __ ldr(R4, FieldAddress(R4, target::TypedData::data_offset()));
 
   // R3 = yt = args[0..1]
-  __ ldr(R3, Address(R4, 0));
+  __ ldr(R3, FieldAddress(R4, target::TypedData::data_offset()));
 
   // R2 = dh = digits[(i >> 1) - 1 .. i >> 1]
   // R0 = i as Smi, R1 = digits
   __ ldp(R0, R1, Address(SP, 0 * target::kWordSize, Address::PairOffset));
-  __ ldr(R1, FieldAddress(R1, target::TypedData::data_offset()));
   __ add(R1, R1, Operand(R0, LSL, 1));
-  __ ldr(R2, Address(R1, -kBytesPerBigIntDigit));
+  __ ldr(R2, FieldAddress(
+                 R1, target::TypedData::data_offset() - kBytesPerBigIntDigit));
 
   // R0 = qd = (DIGIT_MASK << 32) | DIGIT_MASK = -1
   __ movn(R0, Immediate(0), 0);
@@ -1101,7 +1100,8 @@
   __ b(&return_qd, EQ);
 
   // R1 = dl = digits[(i >> 1) - 3 .. (i >> 1) - 2]
-  __ ldr(R1, Address(R1, -3 * kBytesPerBigIntDigit));
+  __ ldr(R1, FieldAddress(R1, target::TypedData::data_offset() -
+                                  3 * kBytesPerBigIntDigit));
 
   // R5 = yth = yt >> 32
   __ orr(R5, ZR, Operand(R3, LSR, 32));
@@ -1205,7 +1205,8 @@
 
   __ Bind(&return_qd);
   // args[2..3] = qd
-  __ str(R0, Address(R4, 2 * kBytesPerBigIntDigit));
+  __ str(R0, FieldAddress(R4, target::TypedData::data_offset() +
+                                  2 * kBytesPerBigIntDigit));
 
   __ LoadImmediate(R0, target::ToRawSmi(2));  // Two digits processed.
   __ ret();
@@ -1222,25 +1223,25 @@
   //   return 2;
   // }
 
-  // R4 = &args[0]
+  // R4 = args
   __ ldr(R4, Address(SP, 2 * target::kWordSize));  // args
-  __ ldr(R4, FieldAddress(R4, target::TypedData::data_offset()));
 
   // R3 = rho = args[2..3]
-  __ ldr(R3, Address(R4, 2 * kBytesPerBigIntDigit));
+  __ ldr(R3, FieldAddress(R4, target::TypedData::data_offset() +
+                                  2 * kBytesPerBigIntDigit));
 
   // R2 = digits[i >> 1 .. (i >> 1) + 1]
   // R0 = i as Smi, R1 = digits
   __ ldp(R0, R1, Address(SP, 0 * target::kWordSize, Address::PairOffset));
+  __ add(R1, R1, Operand(R0, LSL, 1));
   __ ldr(R2, FieldAddress(R1, target::TypedData::data_offset()));
-  __ add(R2, R2, Operand(R0, LSL, 1));
-  __ ldr(R2, Address(R2, 0));
 
   // R0 = rho*d mod DIGIT_BASE
   __ mul(R0, R2, R3);  // R0 = low64(R2*R3).
 
   // args[4 .. 5] = R0
-  __ str(R0, Address(R4, 4 * kBytesPerBigIntDigit));
+  __ str(R0, FieldAddress(R4, target::TypedData::data_offset() +
+                                  4 * kBytesPerBigIntDigit));
 
   __ LoadImmediate(R0, target::ToRawSmi(2));  // Two digits processed.
   __ ret();
@@ -1558,10 +1559,10 @@
   // Field '_state'.
   __ ldr(R1, FieldAddress(R0, LookupFieldOffsetInBytes(state_field)));
 
-  // Address of _state[0].
-  __ ldr(R1, FieldAddress(R1, target::TypedData::data_offset()));
+  // Addresses of _state[0].
   const int64_t disp =
-      target::Instance::DataOffsetFor(kTypedDataUint32ArrayCid);
+      target::Instance::DataOffsetFor(kTypedDataUint32ArrayCid) -
+      kHeapObjectTag;
 
   __ LoadImmediate(R0, a_int_value);
   __ LoadFromOffset(R2, R1, disp);
diff --git a/runtime/vm/compiler/asm_intrinsifier_ia32.cc b/runtime/vm/compiler/asm_intrinsifier_ia32.cc
index 88c48f9..d26494d 100644
--- a/runtime/vm/compiler/asm_intrinsifier_ia32.cc
+++ b/runtime/vm/compiler/asm_intrinsifier_ia32.cc
@@ -158,7 +158,7 @@
   /* EBX: new object end address. */                                           \
   __ movl(EDI, Address(ESP, kArrayLengthStackOffset)); /* Array length. */     \
   __ StoreIntoObjectNoBarrier(                                                 \
-      EAX, FieldAddress(EAX, target::TypedData::length_offset()), EDI);        \
+      EAX, FieldAddress(EAX, target::TypedDataBase::length_offset()), EDI);    \
   /* Initialize all array elements to 0. */                                    \
   /* EAX: new object start as a tagged pointer. */                             \
   /* EBX: new object end address. */                                           \
@@ -167,8 +167,9 @@
   /* data area to be initialized. */                                           \
   __ xorl(ECX, ECX); /* Zero. */                                               \
   __ leal(EDI, FieldAddress(EAX, target::TypedData::InstanceSize()));          \
-  __ StoreIntoObjectNoBarrier(                                                 \
-      EAX, FieldAddress(EAX, target::TypedData::data_offset()), EDI);          \
+  __ StoreInternalPointer(                                                     \
+      EAX, FieldAddress(EAX, target::TypedDataBase::data_field_offset()),      \
+      EDI);                                                                    \
   Label done, init_loop;                                                       \
   __ Bind(&init_loop);                                                         \
   __ cmpl(EDI, EBX);                                                           \
@@ -715,14 +716,14 @@
   __ movl(EBX, Address(ESP, 2 * target::kWordSize));  // r_digits
   __ movl(ESI, ECX);
   __ sarl(ESI, Immediate(5));  // ESI = n ~/ _DIGIT_BITS.
-  __ movl(EBX, FieldAddress(EBX, target::TypedData::data_offset()));
-  __ leal(EBX, Address(EBX, ESI, TIMES_4, 0));
+  __ leal(EBX,
+          FieldAddress(EBX, ESI, TIMES_4, target::TypedData::data_offset()));
   __ movl(ESI, Address(ESP, 4 * target::kWordSize));  // x_used > 0, Smi.
   __ SmiUntag(ESI);
   __ decl(ESI);
   __ xorl(EAX, EAX);  // EAX = 0.
-  __ movl(EDI, FieldAddress(EDI, target::TypedData::data_offset()));
-  __ movl(EDX, Address(EDI, ESI, TIMES_4, 0));
+  __ movl(EDX,
+          FieldAddress(EDI, ESI, TIMES_4, target::TypedData::data_offset()));
   __ shldl(EAX, EDX, ECX);
   __ movl(Address(EBX, ESI, TIMES_4, kBytesPerBigIntDigit), EAX);
   Label last;
@@ -731,7 +732,9 @@
   Label loop;
   __ Bind(&loop);
   __ movl(EAX, EDX);
-  __ movl(EDX, Address(EDI, ESI, TIMES_4, -kBytesPerBigIntDigit));
+  __ movl(EDX, FieldAddress(
+                   EDI, ESI, TIMES_4,
+                   target::TypedData::data_offset() - kBytesPerBigIntDigit));
   __ shldl(EAX, EDX, ECX);
   __ movl(Address(EBX, ESI, TIMES_4, 0), EAX);
   __ decl(ESI);
@@ -764,12 +767,12 @@
   __ SmiUntag(ESI);
   __ decl(ESI);
   // EDI = &x_digits[x_used - 1].
-  __ movl(EDI, FieldAddress(EDI, target::TypedData::data_offset()));
-  __ leal(EDI, Address(EDI, ESI, TIMES_4, 0));
+  __ leal(EDI,
+          FieldAddress(EDI, ESI, TIMES_4, target::TypedData::data_offset()));
   __ subl(ESI, EDX);
   // EBX = &r_digits[x_used - 1 - (n ~/ 32)].
-  __ movl(EBX, FieldAddress(EBX, target::TypedData::data_offset()));
-  __ leal(EBX, Address(EBX, ESI, TIMES_4, 0));
+  __ leal(EBX,
+          FieldAddress(EBX, ESI, TIMES_4, target::TypedData::data_offset()));
   __ negl(ESI);
   __ movl(EDX, Address(EDI, ESI, TIMES_4, 0));
   Label last;
@@ -811,10 +814,6 @@
   __ SmiUntag(ECX);                                   // a_used > 0.
   __ movl(EBX, Address(ESP, 2 * target::kWordSize));  // r_digits
 
-  __ movl(EDI, FieldAddress(EDI, target::TypedData::data_offset()));
-  __ movl(ESI, FieldAddress(ESI, target::TypedData::data_offset()));
-  __ movl(EBX, FieldAddress(EBX, target::TypedData::data_offset()));
-
   // Precompute 'used - a_used' now so that carry flag is not lost later.
   __ subl(EAX, ECX);
   __ incl(EAX);  // To account for the extra test between loops.
@@ -824,9 +823,12 @@
   Label add_loop;
   __ Bind(&add_loop);
   // Loop a_used times, ECX = a_used, ECX > 0.
-  __ movl(EAX, Address(EDI, EDX, TIMES_4, 0));
-  __ adcl(EAX, Address(ESI, EDX, TIMES_4, 0));
-  __ movl(Address(EBX, EDX, TIMES_4, 0), EAX);
+  __ movl(EAX,
+          FieldAddress(EDI, EDX, TIMES_4, target::TypedData::data_offset()));
+  __ adcl(EAX,
+          FieldAddress(ESI, EDX, TIMES_4, target::TypedData::data_offset()));
+  __ movl(FieldAddress(EBX, EDX, TIMES_4, target::TypedData::data_offset()),
+          EAX);
   __ incl(EDX);  // Does not affect carry flag.
   __ decl(ECX);  // Does not affect carry flag.
   __ j(NOT_ZERO, &add_loop, Assembler::kNearJump);
@@ -839,9 +841,11 @@
   Label carry_loop;
   __ Bind(&carry_loop);
   // Loop used - a_used times, ECX = used - a_used, ECX > 0.
-  __ movl(EAX, Address(EDI, EDX, TIMES_4, 0));
+  __ movl(EAX,
+          FieldAddress(EDI, EDX, TIMES_4, target::TypedData::data_offset()));
   __ adcl(EAX, Immediate(0));
-  __ movl(Address(EBX, EDX, TIMES_4, 0), EAX);
+  __ movl(FieldAddress(EBX, EDX, TIMES_4, target::TypedData::data_offset()),
+          EAX);
   __ incl(EDX);  // Does not affect carry flag.
   __ decl(ECX);  // Does not affect carry flag.
   __ j(NOT_ZERO, &carry_loop, Assembler::kNearJump);
@@ -849,7 +853,8 @@
   __ Bind(&last_carry);
   __ movl(EAX, Immediate(0));
   __ adcl(EAX, Immediate(0));
-  __ movl(Address(EBX, EDX, TIMES_4, 0), EAX);
+  __ movl(FieldAddress(EBX, EDX, TIMES_4, target::TypedData::data_offset()),
+          EAX);
 
   // Restore THR and return.
   __ popl(THR);
@@ -875,10 +880,6 @@
   __ SmiUntag(ECX);                                   // a_used > 0.
   __ movl(EBX, Address(ESP, 2 * target::kWordSize));  // r_digits
 
-  __ movl(EDI, FieldAddress(EDI, target::TypedData::data_offset()));
-  __ movl(ESI, FieldAddress(ESI, target::TypedData::data_offset()));
-  __ movl(EBX, FieldAddress(EBX, target::TypedData::data_offset()));
-
   // Precompute 'used - a_used' now so that carry flag is not lost later.
   __ subl(EAX, ECX);
   __ incl(EAX);  // To account for the extra test between loops.
@@ -888,9 +889,12 @@
   Label sub_loop;
   __ Bind(&sub_loop);
   // Loop a_used times, ECX = a_used, ECX > 0.
-  __ movl(EAX, Address(EDI, EDX, TIMES_4, 0));
-  __ sbbl(EAX, Address(ESI, EDX, TIMES_4, 0));
-  __ movl(Address(EBX, EDX, TIMES_4, 0), EAX);
+  __ movl(EAX,
+          FieldAddress(EDI, EDX, TIMES_4, target::TypedData::data_offset()));
+  __ sbbl(EAX,
+          FieldAddress(ESI, EDX, TIMES_4, target::TypedData::data_offset()));
+  __ movl(FieldAddress(EBX, EDX, TIMES_4, target::TypedData::data_offset()),
+          EAX);
   __ incl(EDX);  // Does not affect carry flag.
   __ decl(ECX);  // Does not affect carry flag.
   __ j(NOT_ZERO, &sub_loop, Assembler::kNearJump);
@@ -903,9 +907,11 @@
   Label carry_loop;
   __ Bind(&carry_loop);
   // Loop used - a_used times, ECX = used - a_used, ECX > 0.
-  __ movl(EAX, Address(EDI, EDX, TIMES_4, 0));
+  __ movl(EAX,
+          FieldAddress(EDI, EDX, TIMES_4, target::TypedData::data_offset()));
   __ sbbl(EAX, Immediate(0));
-  __ movl(Address(EBX, EDX, TIMES_4, 0), EAX);
+  __ movl(FieldAddress(EBX, EDX, TIMES_4, target::TypedData::data_offset()),
+          EAX);
   __ incl(EDX);  // Does not affect carry flag.
   __ decl(ECX);  // Does not affect carry flag.
   __ j(NOT_ZERO, &carry_loop, Assembler::kNearJump);
@@ -950,8 +956,8 @@
   // EBX = x, no_op if x == 0
   __ movl(ECX, Address(ESP, 7 * target::kWordSize));  // x_digits
   __ movl(EAX, Address(ESP, 6 * target::kWordSize));  // xi is Smi
-  __ movl(EBX, FieldAddress(ECX, target::TypedData::data_offset()));
-  __ movl(EBX, Address(EBX, EAX, TIMES_2, 0));
+  __ movl(EBX,
+          FieldAddress(ECX, EAX, TIMES_2, target::TypedData::data_offset()));
   __ testl(EBX, EBX);
   __ j(ZERO, &no_op, Assembler::kNearJump);
 
@@ -967,14 +973,14 @@
   // EDI = mip = &m_digits[i >> 1]
   __ movl(EDI, Address(ESP, 6 * target::kWordSize));  // m_digits
   __ movl(EAX, Address(ESP, 5 * target::kWordSize));  // i is Smi
-  __ movl(EDI, FieldAddress(EDI, target::TypedData::data_offset()));
-  __ leal(EDI, Address(EDI, EAX, TIMES_2, 0));
+  __ leal(EDI,
+          FieldAddress(EDI, EAX, TIMES_2, target::TypedData::data_offset()));
 
   // ESI = ajp = &a_digits[j >> 1]
   __ movl(ESI, Address(ESP, 4 * target::kWordSize));  // a_digits
   __ movl(EAX, Address(ESP, 3 * target::kWordSize));  // j is Smi
-  __ movl(ESI, FieldAddress(ESI, target::TypedData::data_offset()));
-  __ leal(ESI, Address(ESI, EAX, TIMES_2, 0));
+  __ leal(ESI,
+          FieldAddress(ESI, EAX, TIMES_2, target::TypedData::data_offset()));
 
   // Save n
   __ pushl(EDX);
@@ -1071,8 +1077,8 @@
   // EDI = xip = &x_digits[i >> 1]
   __ movl(EDI, Address(ESP, 4 * target::kWordSize));  // x_digits
   __ movl(EAX, Address(ESP, 3 * target::kWordSize));  // i is Smi
-  __ movl(EDI, FieldAddress(EDI, target::TypedData::data_offset()));
-  __ leal(EDI, Address(EDI, EAX, TIMES_2, 0));
+  __ leal(EDI,
+          FieldAddress(EDI, EAX, TIMES_2, target::TypedData::data_offset()));
 
   // EBX = x = *xip++, return if x == 0
   Label x_zero;
@@ -1087,8 +1093,8 @@
 
   // ESI = ajp = &a_digits[i]
   __ movl(ESI, Address(ESP, 3 * target::kWordSize));  // a_digits
-  __ movl(ESI, FieldAddress(ESI, target::TypedData::data_offset()));
-  __ leal(ESI, Address(ESI, EAX, TIMES_4, 0));
+  __ leal(ESI,
+          FieldAddress(ESI, EAX, TIMES_4, target::TypedData::data_offset()));
 
   // EDX:EAX = t = x*x + *ajp
   __ movl(EAX, EBX);
@@ -1193,18 +1199,18 @@
   //   return 1;
   // }
 
-  // EDI = &args[0]
+  // EDI = args
   __ movl(EDI, Address(ESP, 3 * target::kWordSize));  // args
-  __ movl(EDI, FieldAddress(EDI, target::TypedData::data_offset()));
 
   // ECX = yt = args[1]
-  __ movl(ECX, Address(EDI, kBytesPerBigIntDigit));
+  __ movl(ECX, FieldAddress(EDI, target::TypedData::data_offset() +
+                                     kBytesPerBigIntDigit));
 
   // EBX = dp = &digits[i >> 1]
   __ movl(EBX, Address(ESP, 2 * target::kWordSize));  // digits
   __ movl(EAX, Address(ESP, 1 * target::kWordSize));  // i is Smi
-  __ movl(EBX, FieldAddress(EBX, target::TypedData::data_offset()));
-  __ leal(EBX, Address(EBX, EAX, TIMES_2, 0));
+  __ leal(EBX,
+          FieldAddress(EBX, EAX, TIMES_2, target::TypedData::data_offset()));
 
   // EDX = dh = dp[0]
   __ movl(EDX, Address(EBX, 0));
@@ -1225,7 +1231,9 @@
 
   __ Bind(&return_qd);
   // args[2] = qd
-  __ movl(Address(EDI, 2 * kBytesPerBigIntDigit), EAX);
+  __ movl(FieldAddress(
+              EDI, target::TypedData::data_offset() + 2 * kBytesPerBigIntDigit),
+          EAX);
 
   __ movl(EAX, Immediate(target::ToRawSmi(1)));  // One digit processed.
   __ ret();
@@ -1242,24 +1250,26 @@
   //   return 1;
   // }
 
-  // EDI = &args[0]
+  // EDI = args
   __ movl(EDI, Address(ESP, 3 * target::kWordSize));  // args
-  __ movl(EDI, FieldAddress(EDI, target::TypedData::data_offset()));
 
   // ECX = rho = args[2]
-  __ movl(ECX, Address(EDI, 2 * kBytesPerBigIntDigit));
+  __ movl(ECX, FieldAddress(EDI, target::TypedData::data_offset() +
+                                     2 * kBytesPerBigIntDigit));
 
   // EAX = digits[i >> 1]
   __ movl(EBX, Address(ESP, 2 * target::kWordSize));  // digits
   __ movl(EAX, Address(ESP, 1 * target::kWordSize));  // i is Smi
-  __ movl(EBX, FieldAddress(EBX, target::TypedData::data_offset()));
-  __ movl(EAX, Address(EBX, EAX, TIMES_2, 0));
+  __ movl(EAX,
+          FieldAddress(EBX, EAX, TIMES_2, target::TypedData::data_offset()));
 
   // EDX:EAX = t = rho*d
   __ mull(ECX);
 
   // args[4] = t mod DIGIT_BASE = low32(t)
-  __ movl(Address(EDI, 4 * kBytesPerBigIntDigit), EAX);
+  __ movl(FieldAddress(
+              EDI, target::TypedData::data_offset() + 4 * kBytesPerBigIntDigit),
+          EAX);
 
   __ movl(EAX, Immediate(target::ToRawSmi(1)));  // One digit processed.
   __ ret();
@@ -1589,13 +1599,12 @@
   // Field '_state'.
   __ movl(EBX, FieldAddress(EAX, LookupFieldOffsetInBytes(state_field)));
   // Addresses of _state[0] and _state[1].
-  __ movl(EBX, FieldAddress(EBX, target::TypedData::data_offset()));
   const intptr_t scale =
       target::Instance::ElementSizeFor(kTypedDataUint32ArrayCid);
   const intptr_t offset =
       target::Instance::DataOffsetFor(kTypedDataUint32ArrayCid);
-  Address addr_0 = Address(EBX, 0 * scale + offset);
-  Address addr_1 = Address(EBX, 1 * scale + offset);
+  Address addr_0 = FieldAddress(EBX, 0 * scale + offset);
+  Address addr_1 = FieldAddress(EBX, 1 * scale + offset);
   __ movl(EAX, Immediate(a_int32_value));
   // 64-bit multiply EAX * value -> EDX:EAX.
   __ mull(addr_0);
@@ -2204,7 +2213,7 @@
 // On stack: user tag (+1), return-address (+0).
 void AsmIntrinsifier::UserTag_makeCurrent(Assembler* assembler,
                                           Label* normal_ir_body) {
-  // RDI: Isolate.
+  // EDI: Isolate.
   __ LoadIsolate(EDI);
   // EAX: Current user tag.
   __ movl(EAX, Address(EDI, target::Isolate::current_tag_offset()));
diff --git a/runtime/vm/compiler/asm_intrinsifier_x64.cc b/runtime/vm/compiler/asm_intrinsifier_x64.cc
index 1532070..76618bc 100644
--- a/runtime/vm/compiler/asm_intrinsifier_x64.cc
+++ b/runtime/vm/compiler/asm_intrinsifier_x64.cc
@@ -160,7 +160,7 @@
   /* RCX: new object end address. */                                           \
   __ movq(RDI, Address(RSP, kArrayLengthStackOffset)); /* Array length. */     \
   __ StoreIntoObjectNoBarrier(                                                 \
-      RAX, FieldAddress(RAX, target::TypedData::length_offset()), RDI);        \
+      RAX, FieldAddress(RAX, target::TypedDataBase::length_offset()), RDI);    \
   /* Initialize all array elements to 0. */                                    \
   /* RAX: new object start as a tagged pointer. */                             \
   /* RCX: new object end address. */                                           \
@@ -169,8 +169,9 @@
   /* data area to be initialized. */                                           \
   __ xorq(RBX, RBX); /* Zero. */                                               \
   __ leaq(RDI, FieldAddress(RAX, target::TypedData::InstanceSize()));          \
-  __ StoreIntoObjectNoBarrier(                                                 \
-      RAX, FieldAddress(RAX, target::TypedData::data_offset()), RDI);          \
+  __ StoreInternalPointer(                                                     \
+      RAX, FieldAddress(RAX, target::TypedDataBase::data_field_offset()),      \
+      RDI);                                                                    \
   Label done, init_loop;                                                       \
   __ Bind(&init_loop);                                                         \
   __ cmpq(RDI, RCX);                                                           \
@@ -686,11 +687,11 @@
   __ movq(RBX, Address(RSP, 1 * target::kWordSize));  // r_digits
   __ movq(RSI, RCX);
   __ sarq(RSI, Immediate(6));  // RSI = n ~/ (2*_DIGIT_BITS).
-  __ movq(RBX, FieldAddress(RBX, target::TypedData::data_offset()));
-  __ leaq(RBX, Address(RBX, RSI, TIMES_8, 0));
+  __ leaq(RBX,
+          FieldAddress(RBX, RSI, TIMES_8, target::TypedData::data_offset()));
   __ xorq(RAX, RAX);  // RAX = 0.
-  __ movq(RDI, FieldAddress(RDI, target::TypedData::data_offset()));
-  __ movq(RDX, Address(RDI, R8, TIMES_8, 0));
+  __ movq(RDX,
+          FieldAddress(RDI, R8, TIMES_8, target::TypedData::data_offset()));
   __ shldq(RAX, RDX, RCX);
   __ movq(Address(RBX, R8, TIMES_8, 2 * kBytesPerBigIntDigit), RAX);
   Label last;
@@ -699,7 +700,9 @@
   Label loop;
   __ Bind(&loop);
   __ movq(RAX, RDX);
-  __ movq(RDX, Address(RDI, R8, TIMES_8, -2 * kBytesPerBigIntDigit));
+  __ movq(RDX, FieldAddress(RDI, R8, TIMES_8,
+                            target::TypedData::data_offset() -
+                                2 * kBytesPerBigIntDigit));
   __ shldq(RAX, RDX, RCX);
   __ movq(Address(RBX, R8, TIMES_8, 0), RAX);
   __ decq(R8);
@@ -724,11 +727,11 @@
   __ movq(RSI, Address(RSP, 3 * target::kWordSize));  // x_used is Smi
   __ subq(RSI, Immediate(2));  // x_used > 0, Smi. RSI = x_used - 1, round up.
   __ sarq(RSI, Immediate(2));
-  __ movq(RDI, FieldAddress(RDI, target::TypedData::data_offset()));
-  __ leaq(RDI, Address(RDI, RSI, TIMES_8, 0));
+  __ leaq(RDI,
+          FieldAddress(RDI, RSI, TIMES_8, target::TypedData::data_offset()));
   __ subq(RSI, RDX);  // RSI + 1 = number of digit pairs to read.
-  __ movq(RBX, FieldAddress(RBX, target::TypedData::data_offset()));
-  __ leaq(RBX, Address(RBX, RSI, TIMES_8, 0));
+  __ leaq(RBX,
+          FieldAddress(RBX, RSI, TIMES_8, target::TypedData::data_offset()));
   __ negq(RSI);
   __ movq(RDX, Address(RDI, RSI, TIMES_8, 0));
   Label last;
@@ -765,10 +768,6 @@
   __ sarq(RCX, Immediate(2));  // R8 = number of digit pairs to process.
   __ movq(RBX, Address(RSP, 1 * target::kWordSize));  // r_digits
 
-  __ movq(RDI, FieldAddress(RDI, target::TypedData::data_offset()));
-  __ movq(RBX, FieldAddress(RBX, target::TypedData::data_offset()));
-  __ movq(RSI, FieldAddress(RSI, target::TypedData::data_offset()));
-
   // Precompute 'used - a_used' now so that carry flag is not lost later.
   __ subq(R8, RCX);
   __ incq(R8);  // To account for the extra test between loops.
@@ -777,9 +776,12 @@
   Label add_loop;
   __ Bind(&add_loop);
   // Loop (a_used+1)/2 times, RCX > 0.
-  __ movq(RAX, Address(RDI, RDX, TIMES_8, 0));
-  __ adcq(RAX, Address(RSI, RDX, TIMES_8, 0));
-  __ movq(Address(RBX, RDX, TIMES_8, 0), RAX);
+  __ movq(RAX,
+          FieldAddress(RDI, RDX, TIMES_8, target::TypedData::data_offset()));
+  __ adcq(RAX,
+          FieldAddress(RSI, RDX, TIMES_8, target::TypedData::data_offset()));
+  __ movq(FieldAddress(RBX, RDX, TIMES_8, target::TypedData::data_offset()),
+          RAX);
   __ incq(RDX);  // Does not affect carry flag.
   __ decq(RCX);  // Does not affect carry flag.
   __ j(NOT_ZERO, &add_loop, Assembler::kNearJump);
@@ -791,9 +793,11 @@
   Label carry_loop;
   __ Bind(&carry_loop);
   // Loop (used+1)/2 - (a_used+1)/2 times, R8 > 0.
-  __ movq(RAX, Address(RDI, RDX, TIMES_8, 0));
+  __ movq(RAX,
+          FieldAddress(RDI, RDX, TIMES_8, target::TypedData::data_offset()));
   __ adcq(RAX, Immediate(0));
-  __ movq(Address(RBX, RDX, TIMES_8, 0), RAX);
+  __ movq(FieldAddress(RBX, RDX, TIMES_8, target::TypedData::data_offset()),
+          RAX);
   __ incq(RDX);  // Does not affect carry flag.
   __ decq(R8);   // Does not affect carry flag.
   __ j(NOT_ZERO, &carry_loop, Assembler::kNearJump);
@@ -801,7 +805,8 @@
   __ Bind(&last_carry);
   Label done;
   __ j(NOT_CARRY, &done);
-  __ movq(Address(RBX, RDX, TIMES_8, 0), Immediate(1));
+  __ movq(FieldAddress(RBX, RDX, TIMES_8, target::TypedData::data_offset()),
+          Immediate(1));
 
   __ Bind(&done);
   __ LoadObject(RAX, NullObject());
@@ -824,10 +829,6 @@
   __ sarq(RCX, Immediate(2));  // R8 = number of digit pairs to process.
   __ movq(RBX, Address(RSP, 1 * target::kWordSize));  // r_digits
 
-  __ movq(RDI, FieldAddress(RDI, target::TypedData::data_offset()));
-  __ movq(RBX, FieldAddress(RBX, target::TypedData::data_offset()));
-  __ movq(RSI, FieldAddress(RSI, target::TypedData::data_offset()));
-
   // Precompute 'used - a_used' now so that carry flag is not lost later.
   __ subq(R8, RCX);
   __ incq(R8);  // To account for the extra test between loops.
@@ -836,9 +837,12 @@
   Label sub_loop;
   __ Bind(&sub_loop);
   // Loop (a_used+1)/2 times, RCX > 0.
-  __ movq(RAX, Address(RDI, RDX, TIMES_8, 0));
-  __ sbbq(RAX, Address(RSI, RDX, TIMES_8, 0));
-  __ movq(Address(RBX, RDX, TIMES_8, 0), RAX);
+  __ movq(RAX,
+          FieldAddress(RDI, RDX, TIMES_8, target::TypedData::data_offset()));
+  __ sbbq(RAX,
+          FieldAddress(RSI, RDX, TIMES_8, target::TypedData::data_offset()));
+  __ movq(FieldAddress(RBX, RDX, TIMES_8, target::TypedData::data_offset()),
+          RAX);
   __ incq(RDX);  // Does not affect carry flag.
   __ decq(RCX);  // Does not affect carry flag.
   __ j(NOT_ZERO, &sub_loop, Assembler::kNearJump);
@@ -850,9 +854,11 @@
   Label carry_loop;
   __ Bind(&carry_loop);
   // Loop (used+1)/2 - (a_used+1)/2 times, R8 > 0.
-  __ movq(RAX, Address(RDI, RDX, TIMES_8, 0));
+  __ movq(RAX,
+          FieldAddress(RDI, RDX, TIMES_8, target::TypedData::data_offset()));
   __ sbbq(RAX, Immediate(0));
-  __ movq(Address(RBX, RDX, TIMES_8, 0), RAX);
+  __ movq(FieldAddress(RBX, RDX, TIMES_8, target::TypedData::data_offset()),
+          RAX);
   __ incq(RDX);  // Does not affect carry flag.
   __ decq(R8);   // Does not affect carry flag.
   __ j(NOT_ZERO, &carry_loop, Assembler::kNearJump);
@@ -896,8 +902,8 @@
   // RBX = x, done if x == 0
   __ movq(RCX, Address(RSP, 7 * target::kWordSize));  // x_digits
   __ movq(RAX, Address(RSP, 6 * target::kWordSize));  // xi is Smi
-  __ movq(RBX, FieldAddress(RCX, target::TypedData::data_offset()));
-  __ movq(RBX, Address(RBX, RAX, TIMES_2, 0));
+  __ movq(RBX,
+          FieldAddress(RCX, RAX, TIMES_2, target::TypedData::data_offset()));
   __ testq(RBX, RBX);
   __ j(ZERO, &done, Assembler::kNearJump);
 
@@ -910,14 +916,14 @@
   // RDI = mip = &m_digits[i >> 1]
   __ movq(RDI, Address(RSP, 5 * target::kWordSize));  // m_digits
   __ movq(RAX, Address(RSP, 4 * target::kWordSize));  // i is Smi
-  __ movq(RDI, FieldAddress(RDI, target::TypedData::data_offset()));
-  __ leaq(RDI, Address(RDI, RAX, TIMES_2, 0));
+  __ leaq(RDI,
+          FieldAddress(RDI, RAX, TIMES_2, target::TypedData::data_offset()));
 
   // RSI = ajp = &a_digits[j >> 1]
   __ movq(RSI, Address(RSP, 3 * target::kWordSize));  // a_digits
   __ movq(RAX, Address(RSP, 2 * target::kWordSize));  // j is Smi
-  __ movq(RSI, FieldAddress(RSI, target::TypedData::data_offset()));
-  __ leaq(RSI, Address(RSI, RAX, TIMES_2, 0));
+  __ leaq(RSI,
+          FieldAddress(RSI, RAX, TIMES_2, target::TypedData::data_offset()));
 
   // RCX = c = 0
   __ xorq(RCX, RCX);
@@ -1004,8 +1010,8 @@
   // RDI = xip = &x_digits[i >> 1]
   __ movq(RDI, Address(RSP, 4 * target::kWordSize));  // x_digits
   __ movq(RAX, Address(RSP, 3 * target::kWordSize));  // i is Smi
-  __ movq(RDI, FieldAddress(RDI, target::TypedData::data_offset()));
-  __ leaq(RDI, Address(RDI, RAX, TIMES_2, 0));
+  __ leaq(RDI,
+          FieldAddress(RDI, RAX, TIMES_2, target::TypedData::data_offset()));
 
   // RBX = x = *xip++, return if x == 0
   Label x_zero;
@@ -1016,8 +1022,8 @@
 
   // RSI = ajp = &a_digits[i]
   __ movq(RSI, Address(RSP, 2 * target::kWordSize));  // a_digits
-  __ movq(RSI, FieldAddress(RSI, target::TypedData::data_offset()));
-  __ leaq(RSI, Address(RSI, RAX, TIMES_4, 0));
+  __ leaq(RSI,
+          FieldAddress(RSI, RAX, TIMES_4, target::TypedData::data_offset()));
 
   // RDX:RAX = t = x*x + *ajp
   __ movq(RAX, RBX);
@@ -1113,18 +1119,18 @@
   //   return 2;
   // }
 
-  // RDI = &args[0]
+  // RDI = args
   __ movq(RDI, Address(RSP, 3 * target::kWordSize));  // args
-  __ movq(RDI, FieldAddress(RDI, target::TypedData::data_offset()));
 
   // RCX = yt = args[0..1]
-  __ movq(RCX, Address(RDI, 0));
+  __ movq(RCX, FieldAddress(RDI, target::TypedData::data_offset()));
 
   // RBX = dp = &digits[(i >> 1) - 1]
   __ movq(RBX, Address(RSP, 2 * target::kWordSize));  // digits
   __ movq(RAX, Address(RSP, 1 * target::kWordSize));  // i is Smi and odd.
-  __ movq(RBX, FieldAddress(RBX, target::TypedData::data_offset()));
-  __ leaq(RBX, Address(RBX, RAX, TIMES_2, -kBytesPerBigIntDigit));
+  __ leaq(RBX, FieldAddress(
+                   RBX, RAX, TIMES_2,
+                   target::TypedData::data_offset() - kBytesPerBigIntDigit));
 
   // RDX = dh = dp[0]
   __ movq(RDX, Address(RBX, 0));
@@ -1145,7 +1151,9 @@
 
   __ Bind(&return_qd);
   // args[2..3] = qd
-  __ movq(Address(RDI, 2 * kBytesPerBigIntDigit), RAX);
+  __ movq(FieldAddress(
+              RDI, target::TypedData::data_offset() + 2 * kBytesPerBigIntDigit),
+          RAX);
 
   __ movq(RAX, Immediate(target::ToRawSmi(2)));  // Two digits processed.
   __ ret();
@@ -1162,24 +1170,26 @@
   //   return 2;
   // }
 
-  // RDI = &args[0]
+  // RDI = args
   __ movq(RDI, Address(RSP, 3 * target::kWordSize));  // args
-  __ movq(RDI, FieldAddress(RDI, target::TypedData::data_offset()));
 
   // RCX = rho = args[2 .. 3]
-  __ movq(RCX, Address(RDI, 2 * kBytesPerBigIntDigit));
+  __ movq(RCX, FieldAddress(RDI, target::TypedData::data_offset() +
+                                     2 * kBytesPerBigIntDigit));
 
   // RAX = digits[i >> 1 .. (i >> 1) + 1]
   __ movq(RBX, Address(RSP, 2 * target::kWordSize));  // digits
   __ movq(RAX, Address(RSP, 1 * target::kWordSize));  // i is Smi
-  __ movq(RBX, FieldAddress(RBX, target::TypedData::data_offset()));
-  __ movq(RAX, Address(RBX, RAX, TIMES_2, 0));
+  __ movq(RAX,
+          FieldAddress(RBX, RAX, TIMES_2, target::TypedData::data_offset()));
 
   // RDX:RAX = t = rho*d
   __ mulq(RCX);
 
   // args[4 .. 5] = t mod DIGIT_BASE^2 = low64(t)
-  __ movq(Address(RDI, 4 * kBytesPerBigIntDigit), RAX);
+  __ movq(FieldAddress(
+              RDI, target::TypedData::data_offset() + 4 * kBytesPerBigIntDigit),
+          RAX);
 
   __ movq(RAX, Immediate(target::ToRawSmi(2)));  // Two digits processed.
   __ ret();
@@ -1496,13 +1506,12 @@
   // Field '_state'.
   __ movq(RBX, FieldAddress(RAX, LookupFieldOffsetInBytes(state_field)));
   // Addresses of _state[0] and _state[1].
-  __ movq(RBX, FieldAddress(RBX, target::TypedData::data_offset()));
   const intptr_t scale =
       target::Instance::ElementSizeFor(kTypedDataUint32ArrayCid);
   const intptr_t offset =
       target::Instance::DataOffsetFor(kTypedDataUint32ArrayCid);
-  Address addr_0 = Address(RBX, 0 * scale + offset);
-  Address addr_1 = Address(RBX, 1 * scale + offset);
+  Address addr_0 = FieldAddress(RBX, 0 * scale + offset);
+  Address addr_1 = FieldAddress(RBX, 1 * scale + offset);
   __ movq(RAX, Immediate(a_int_value));
   __ movl(RCX, addr_0);
   __ imulq(RCX, RAX);
diff --git a/runtime/vm/compiler/assembler/assembler_arm.cc b/runtime/vm/compiler/assembler/assembler_arm.cc
index c7b7037..e5e6e5f 100644
--- a/runtime/vm/compiler/assembler/assembler_arm.cc
+++ b/runtime/vm/compiler/assembler/assembler_arm.cc
@@ -1747,6 +1747,11 @@
 #if defined(DEBUG)
   Label done;
   StoreIntoObjectFilter(object, value, &done, kValueCanBeSmi, kJumpToNoUpdate);
+
+  ldrb(TMP, FieldAddress(object, target::Object::tags_offset()));
+  tst(TMP, Operand(1 << target::RawObject::kOldAndNotRememberedBit));
+  b(&done, ZERO);
+
   Stop("Store buffer update is required");
   Bind(&done);
 #endif  // defined(DEBUG)
@@ -1794,6 +1799,12 @@
   }
 }
 
+void Assembler::StoreInternalPointer(Register object,
+                                     const Address& dest,
+                                     Register value) {
+  str(value, dest);
+}
+
 void Assembler::InitializeFieldsNoBarrier(Register object,
                                           Register begin,
                                           Register end,
@@ -3446,9 +3457,7 @@
                                              intptr_t index,
                                              Register temp) {
   const int64_t offset_base =
-      ((is_external || RawObject::IsTypedDataClassId(cid))
-           ? 0
-           : (Instance::DataOffsetFor(cid) - kHeapObjectTag));
+      (is_external ? 0 : (Instance::DataOffsetFor(cid) - kHeapObjectTag));
   const int64_t offset =
       offset_base + static_cast<int64_t>(index) * index_scale;
   ASSERT(Utils::IsInt(32, offset));
@@ -3470,9 +3479,7 @@
                                               Register array,
                                               intptr_t index) {
   const int64_t offset_base =
-      ((is_external || RawObject::IsTypedDataClassId(cid))
-           ? 0
-           : (Instance::DataOffsetFor(cid) - kHeapObjectTag));
+      (is_external ? 0 : (Instance::DataOffsetFor(cid) - kHeapObjectTag));
   const int64_t offset =
       offset_base + static_cast<int64_t>(index) * index_scale;
   ASSERT(Utils::IsInt(32, offset));
@@ -3487,9 +3494,8 @@
                                              Register index) {
   // Note that index is expected smi-tagged, (i.e, LSL 1) for all arrays.
   const intptr_t shift = Utils::ShiftForPowerOfTwo(index_scale) - kSmiTagShift;
-  int32_t offset = (is_external || RawObject::IsTypedDataClassId(cid))
-                       ? 0
-                       : (Instance::DataOffsetFor(cid) - kHeapObjectTag);
+  int32_t offset =
+      is_external ? 0 : (Instance::DataOffsetFor(cid) - kHeapObjectTag);
   const OperandSize size = Address::OperandSizeFor(cid);
   ASSERT(array != IP);
   ASSERT(index != IP);
@@ -3529,9 +3535,8 @@
                                               Register index) {
   // Note that index is expected smi-tagged, (i.e, LSL 1) for all arrays.
   const intptr_t shift = Utils::ShiftForPowerOfTwo(index_scale) - kSmiTagShift;
-  int32_t offset = (is_external || RawObject::IsTypedDataClassId(cid))
-                       ? 0
-                       : (Instance::DataOffsetFor(cid) - kHeapObjectTag);
+  int32_t offset =
+      is_external ? 0 : (Instance::DataOffsetFor(cid) - kHeapObjectTag);
   if (shift < 0) {
     ASSERT(shift == -1);
     add(address, array, Operand(index, ASR, 1));
diff --git a/runtime/vm/compiler/assembler/assembler_arm.h b/runtime/vm/compiler/assembler/assembler_arm.h
index 6b79492..2d224df 100644
--- a/runtime/vm/compiler/assembler/assembler_arm.h
+++ b/runtime/vm/compiler/assembler/assembler_arm.h
@@ -808,6 +808,11 @@
                                       int32_t offset,
                                       const Object& value);
 
+  // Stores a non-tagged value into a heap object.
+  void StoreInternalPointer(Register object,
+                            const Address& dest,
+                            Register value);
+
   // Store value_even, value_odd, value_even, ... into the words in the address
   // range [begin, end), assumed to be uninitialized fields in object (tagged).
   // The stores must not need a generational store barrier (e.g., smi/null),
@@ -854,6 +859,13 @@
                      Register base,
                      int32_t offset,
                      Condition cond = AL);
+  void StoreFieldToOffset(OperandSize type,
+                          Register reg,
+                          Register base,
+                          int32_t offset,
+                          Condition cond = AL) {
+    StoreToOffset(type, reg, base, offset - kHeapObjectTag, cond);
+  }
   void LoadSFromOffset(SRegister reg,
                        Register base,
                        int32_t offset,
diff --git a/runtime/vm/compiler/assembler/assembler_arm64.cc b/runtime/vm/compiler/assembler/assembler_arm64.cc
index a7eaf8d..b466c6b 100644
--- a/runtime/vm/compiler/assembler/assembler_arm64.cc
+++ b/runtime/vm/compiler/assembler/assembler_arm64.cc
@@ -1093,6 +1093,11 @@
 #if defined(DEBUG)
   Label done;
   StoreIntoObjectFilter(object, value, &done, kValueCanBeSmi, kJumpToNoUpdate);
+
+  ldr(TMP, FieldAddress(object, target::Object::tags_offset()), kUnsignedByte);
+  tsti(TMP, Immediate(1 << target::RawObject::kOldAndNotRememberedBit));
+  b(&done, ZERO);
+
   Stop("Store buffer update is required");
   Bind(&done);
 #endif  // defined(DEBUG)
@@ -1131,6 +1136,12 @@
   }
 }
 
+void Assembler::StoreInternalPointer(Register object,
+                                     const Address& dest,
+                                     Register value) {
+  str(value, dest);
+}
+
 void Assembler::LoadClassId(Register result, Register object) {
   ASSERT(RawObject::kClassIdTagPos == 16);
   ASSERT(RawObject::kClassIdTagSize == 16);
@@ -1566,9 +1577,7 @@
                                              intptr_t index) const {
   const int64_t offset =
       index * index_scale +
-      ((is_external || RawObject::IsTypedDataClassId(cid))
-           ? 0
-           : (Instance::DataOffsetFor(cid) - kHeapObjectTag));
+      (is_external ? 0 : (Instance::DataOffsetFor(cid) - kHeapObjectTag));
   ASSERT(Utils::IsInt(32, offset));
   const OperandSize size = Address::OperandSizeFor(cid);
   ASSERT(Address::CanHoldOffset(offset, Address::Offset, size));
@@ -1583,9 +1592,7 @@
                                               intptr_t index) {
   const int64_t offset =
       index * index_scale +
-      ((is_external || RawObject::IsTypedDataClassId(cid))
-           ? 0
-           : (Instance::DataOffsetFor(cid) - kHeapObjectTag));
+      (is_external ? 0 : (Instance::DataOffsetFor(cid) - kHeapObjectTag));
   AddImmediate(address, array, offset);
 }
 
@@ -1597,9 +1604,8 @@
                                              Register index) {
   // Note that index is expected smi-tagged, (i.e, LSL 1) for all arrays.
   const intptr_t shift = Utils::ShiftForPowerOfTwo(index_scale) - kSmiTagShift;
-  const int32_t offset = (is_external || RawObject::IsTypedDataClassId(cid))
-                             ? 0
-                             : (Instance::DataOffsetFor(cid) - kHeapObjectTag);
+  const int32_t offset =
+      is_external ? 0 : (Instance::DataOffsetFor(cid) - kHeapObjectTag);
   ASSERT(array != TMP);
   ASSERT(index != TMP);
   const Register base = is_load ? TMP : index;
@@ -1625,9 +1631,8 @@
                                               Register index) {
   // Note that index is expected smi-tagged, (i.e, LSL 1) for all arrays.
   const intptr_t shift = Utils::ShiftForPowerOfTwo(index_scale) - kSmiTagShift;
-  const int32_t offset = (is_external || RawObject::IsTypedDataClassId(cid))
-                             ? 0
-                             : (Instance::DataOffsetFor(cid) - kHeapObjectTag);
+  const int32_t offset =
+      is_external ? 0 : (Instance::DataOffsetFor(cid) - kHeapObjectTag);
   if (shift == 0) {
     add(address, array, Operand(index));
   } else if (shift < 0) {
diff --git a/runtime/vm/compiler/assembler/assembler_arm64.h b/runtime/vm/compiler/assembler/assembler_arm64.h
index da5466b..f542eea 100644
--- a/runtime/vm/compiler/assembler/assembler_arm64.h
+++ b/runtime/vm/compiler/assembler/assembler_arm64.h
@@ -1475,6 +1475,11 @@
                                       int32_t offset,
                                       const Object& value);
 
+  // Stores a non-tagged value into a heap object.
+  void StoreInternalPointer(Register object,
+                            const Address& dest,
+                            Register value);
+
   // Object pool, loading from pool, etc.
   void LoadPoolPointer(Register pp = PP);
 
diff --git a/runtime/vm/compiler/assembler/assembler_ia32.cc b/runtime/vm/compiler/assembler/assembler_ia32.cc
index 38c3771..5df8760 100644
--- a/runtime/vm/compiler/assembler/assembler_ia32.cc
+++ b/runtime/vm/compiler/assembler/assembler_ia32.cc
@@ -1910,6 +1910,11 @@
   Label done;
   pushl(value);
   StoreIntoObjectFilter(object, value, &done, kValueCanBeSmi, kJumpToNoUpdate);
+
+  testb(FieldAddress(object, target::Object::tags_offset()),
+        Immediate(1 << target::RawObject::kOldAndNotRememberedBit));
+  j(ZERO, &done, Assembler::kNearJump);
+
   Stop("Store buffer update is required");
   Bind(&done);
   popl(value);
@@ -1975,6 +1980,12 @@
   // No store buffer update.
 }
 
+void Assembler::StoreInternalPointer(Register object,
+                                     const Address& dest,
+                                     Register value) {
+  movl(dest, value);
+}
+
 void Assembler::StoreIntoSmiField(const Address& dest, Register value) {
 #if defined(DEBUG)
   Label done;
@@ -2535,7 +2546,7 @@
                                              Register array,
                                              intptr_t index,
                                              intptr_t extra_disp) {
-  if (is_external || RawObject::IsTypedDataClassId(cid)) {
+  if (is_external) {
     return Address(array, index * index_scale + extra_disp);
   } else {
     const int64_t disp = static_cast<int64_t>(index) * index_scale +
@@ -2573,7 +2584,7 @@
                                              Register array,
                                              Register index,
                                              intptr_t extra_disp) {
-  if (is_external || RawObject::IsTypedDataClassId(cid)) {
+  if (is_external) {
     return Address(array, index, ToScaleFactor(index_scale), extra_disp);
   } else {
     return FieldAddress(array, index, ToScaleFactor(index_scale),
diff --git a/runtime/vm/compiler/assembler/assembler_ia32.h b/runtime/vm/compiler/assembler/assembler_ia32.h
index 1b110d7..e3e78c2 100644
--- a/runtime/vm/compiler/assembler/assembler_ia32.h
+++ b/runtime/vm/compiler/assembler/assembler_ia32.h
@@ -620,6 +620,11 @@
                                 const Address& dest,
                                 const Object& value);
 
+  // Stores a non-tagged value into a heap object.
+  void StoreInternalPointer(Register object,
+                            const Address& dest,
+                            Register value);
+
   // Stores a Smi value into a heap object field that always contains a Smi.
   void StoreIntoSmiField(const Address& dest, Register value);
   void ZeroInitSmiField(const Address& dest);
diff --git a/runtime/vm/compiler/assembler/assembler_x64.cc b/runtime/vm/compiler/assembler/assembler_x64.cc
index ebccda6..0889448 100644
--- a/runtime/vm/compiler/assembler/assembler_x64.cc
+++ b/runtime/vm/compiler/assembler/assembler_x64.cc
@@ -1371,6 +1371,11 @@
   Label done;
   pushq(value);
   StoreIntoObjectFilter(object, value, &done, kValueCanBeSmi, kJumpToNoUpdate);
+
+  testb(FieldAddress(object, target::Object::tags_offset()),
+        Immediate(1 << target::RawObject::kOldAndNotRememberedBit));
+  j(ZERO, &done, Assembler::kNearJump);
+
   Stop("Store buffer update is required");
   Bind(&done);
   popq(value);
@@ -1384,6 +1389,12 @@
   StoreObject(dest, value);
 }
 
+void Assembler::StoreInternalPointer(Register object,
+                                     const Address& dest,
+                                     Register value) {
+  movq(dest, value);
+}
+
 void Assembler::StoreIntoSmiField(const Address& dest, Register value) {
 #if defined(DEBUG)
   Label done;
@@ -2075,7 +2086,7 @@
                                              intptr_t index_scale,
                                              Register array,
                                              intptr_t index) {
-  if (is_external || RawObject::IsTypedDataClassId(cid)) {
+  if (is_external) {
     return Address(array, index * index_scale);
   } else {
     const int64_t disp = static_cast<int64_t>(index) * index_scale +
@@ -2112,7 +2123,7 @@
                                              intptr_t index_scale,
                                              Register array,
                                              Register index) {
-  if (is_external || RawObject::IsTypedDataClassId(cid)) {
+  if (is_external) {
     return Address(array, index, ToScaleFactor(index_scale), 0);
   } else {
     return FieldAddress(array, index, ToScaleFactor(index_scale),
diff --git a/runtime/vm/compiler/assembler/assembler_x64.h b/runtime/vm/compiler/assembler/assembler_x64.h
index 8f2d56b..4e073d5 100644
--- a/runtime/vm/compiler/assembler/assembler_x64.h
+++ b/runtime/vm/compiler/assembler/assembler_x64.h
@@ -744,6 +744,11 @@
                                 const Address& dest,
                                 const Object& value);
 
+  // Stores a non-tagged value into a heap object.
+  void StoreInternalPointer(Register object,
+                            const Address& dest,
+                            Register value);
+
   // Stores a Smi value into a heap object field that always contains a Smi.
   void StoreIntoSmiField(const Address& dest, Register value);
   void ZeroInitSmiField(const Address& dest);
diff --git a/runtime/vm/compiler/backend/block_scheduler.cc b/runtime/vm/compiler/backend/block_scheduler.cc
index 451c824..af57dfd 100644
--- a/runtime/vm/compiler/backend/block_scheduler.cc
+++ b/runtime/vm/compiler/backend/block_scheduler.cc
@@ -59,16 +59,17 @@
     return;
   }
 
+  const Function& function = flow_graph()->parsed_function().function();
   const Array& ic_data_array =
-      Array::Handle(flow_graph()->zone(),
-                    flow_graph()->parsed_function().function().ic_data_array());
+      Array::Handle(flow_graph()->zone(), function.ic_data_array());
   if (Compiler::IsBackgroundCompilation() && ic_data_array.IsNull()) {
     // Deferred loading cleared ic_data_array.
     Compiler::AbortBackgroundCompilation(
         DeoptId::kNone, "BlockScheduler: ICData array cleared");
   }
   if (ic_data_array.IsNull()) {
-    DEBUG_ASSERT(Isolate::Current()->HasAttemptedReload());
+    DEBUG_ASSERT(Isolate::Current()->HasAttemptedReload() ||
+                 function.ForceOptimize());
     return;
   }
   Array& edge_counters = Array::Handle();
diff --git a/runtime/vm/compiler/backend/constant_propagator.cc b/runtime/vm/compiler/backend/constant_propagator.cc
index 7eab5b9..a33c17b 100644
--- a/runtime/vm/compiler/backend/constant_propagator.cc
+++ b/runtime/vm/compiler/backend/constant_propagator.cc
@@ -270,6 +270,8 @@
 void ConstantPropagator::VisitCheckEitherNonSmi(CheckEitherNonSmiInstr* instr) {
 }
 
+void ConstantPropagator::VisitStoreUntagged(StoreUntaggedInstr* instr) {}
+
 void ConstantPropagator::VisitStoreIndexedUnsafe(
     StoreIndexedUnsafeInstr* instr) {}
 
@@ -1315,8 +1317,12 @@
   SetValue(instr, non_constant_);
 }
 
-void ConstantPropagator::VisitUnboxedIntConverter(
-    UnboxedIntConverterInstr* instr) {
+void ConstantPropagator::VisitIntConverter(IntConverterInstr* instr) {
+  SetValue(instr, non_constant_);
+}
+
+void ConstantPropagator::VisitUnboxedWidthExtender(
+    UnboxedWidthExtenderInstr* instr) {
   SetValue(instr, non_constant_);
 }
 
diff --git a/runtime/vm/compiler/backend/flow_graph.cc b/runtime/vm/compiler/backend/flow_graph.cc
index 41adc25..f8c33a1 100644
--- a/runtime/vm/compiler/backend/flow_graph.cc
+++ b/runtime/vm/compiler/backend/flow_graph.cc
@@ -1727,8 +1727,8 @@
     const intptr_t deopt_id = (to == kUnboxedInt32) && (deopt_target != NULL)
                                   ? deopt_target->DeoptimizationTarget()
                                   : DeoptId::kNone;
-    converted = new (Z)
-        UnboxedIntConverterInstr(from, to, use->CopyWithType(), deopt_id);
+    converted =
+        new (Z) IntConverterInstr(from, to, use->CopyWithType(), deopt_id);
   } else if ((from == kUnboxedInt32) && (to == kUnboxedDouble)) {
     converted = new Int32ToDoubleInstr(use->CopyWithType());
   } else if ((from == kUnboxedInt64) && (to == kUnboxedDouble) &&
diff --git a/runtime/vm/compiler/backend/flow_graph_compiler.cc b/runtime/vm/compiler/backend/flow_graph_compiler.cc
index f36f34f..990ae31 100644
--- a/runtime/vm/compiler/backend/flow_graph_compiler.cc
+++ b/runtime/vm/compiler/backend/flow_graph_compiler.cc
@@ -1065,7 +1065,9 @@
 // No debugger: no var descriptors.
 #else
   // TODO(alexmarkov): revise local vars descriptors when compiling bytecode
-  if (code.is_optimized() || flow_graph().function().HasBytecode()) {
+  if (code.is_optimized() ||
+      flow_graph().function().is_declared_in_bytecode() ||
+      flow_graph().function().HasBytecode()) {
     // Optimized code does not need variable descriptors. They are
     // only stored in the unoptimized version.
     code.set_var_descriptors(Object::empty_var_descriptors());
diff --git a/runtime/vm/compiler/backend/flow_graph_compiler_arm.cc b/runtime/vm/compiler/backend/flow_graph_compiler_arm.cc
index 16dddf6..47ba86e 100644
--- a/runtime/vm/compiler/backend/flow_graph_compiler_arm.cc
+++ b/runtime/vm/compiler/backend/flow_graph_compiler_arm.cc
@@ -33,7 +33,7 @@
 
     const auto& stub =
         Code::ZoneHandle(object_store->write_barrier_wrappers_stub());
-    if (!stub.IsReadOnly()) {
+    if (!stub.InVMIsolateHeap()) {
       assembler_->generate_invoke_write_barrier_wrapper_ =
           [&](Condition condition, Register reg) {
             const intptr_t offset_into_target =
@@ -46,7 +46,7 @@
 
     const auto& array_stub =
         Code::ZoneHandle(object_store->array_write_barrier_stub());
-    if (!array_stub.IsReadOnly()) {
+    if (!array_stub.InVMIsolateHeap()) {
       assembler_->generate_invoke_array_write_barrier_ =
           [&](Condition condition) {
             AddPcRelativeCallStubTarget(array_stub);
@@ -952,7 +952,7 @@
                                      RawPcDescriptors::Kind kind,
                                      LocationSummary* locs) {
   if (FLAG_precompiled_mode && FLAG_use_bare_instructions &&
-      !stub.IsReadOnly()) {
+      !stub.InVMIsolateHeap()) {
     AddPcRelativeCallStubTarget(stub);
     __ GenerateUnRelocatedPcRelativeCall();
     EmitCallsiteMetadata(token_pos, DeoptId::kNone, kind, locs);
diff --git a/runtime/vm/compiler/backend/flow_graph_compiler_arm64.cc b/runtime/vm/compiler/backend/flow_graph_compiler_arm64.cc
index d01b918..fe52d41 100644
--- a/runtime/vm/compiler/backend/flow_graph_compiler_arm64.cc
+++ b/runtime/vm/compiler/backend/flow_graph_compiler_arm64.cc
@@ -32,7 +32,7 @@
 
     const auto& stub =
         Code::ZoneHandle(object_store->write_barrier_wrappers_stub());
-    if (!stub.IsReadOnly()) {
+    if (!stub.InVMIsolateHeap()) {
       assembler_->generate_invoke_write_barrier_wrapper_ = [&](Register reg) {
         const intptr_t offset_into_target =
             Thread::WriteBarrierWrappersOffsetForRegister(reg);
@@ -43,7 +43,7 @@
 
     const auto& array_stub =
         Code::ZoneHandle(object_store->array_write_barrier_stub());
-    if (!array_stub.IsReadOnly()) {
+    if (!array_stub.InVMIsolateHeap()) {
       assembler_->generate_invoke_array_write_barrier_ = [&]() {
         AddPcRelativeCallStubTarget(array_stub);
         assembler_->GenerateUnRelocatedPcRelativeCall();
@@ -945,7 +945,7 @@
                                      RawPcDescriptors::Kind kind,
                                      LocationSummary* locs) {
   if (FLAG_precompiled_mode && FLAG_use_bare_instructions &&
-      !stub.IsReadOnly()) {
+      !stub.InVMIsolateHeap()) {
     AddPcRelativeCallStubTarget(stub);
     __ GenerateUnRelocatedPcRelativeCall();
     EmitCallsiteMetadata(token_pos, DeoptId::kNone, kind, locs);
diff --git a/runtime/vm/compiler/backend/flow_graph_compiler_x64.cc b/runtime/vm/compiler/backend/flow_graph_compiler_x64.cc
index e5c711e..1a1a007 100644
--- a/runtime/vm/compiler/backend/flow_graph_compiler_x64.cc
+++ b/runtime/vm/compiler/backend/flow_graph_compiler_x64.cc
@@ -31,7 +31,7 @@
 
     const auto& stub =
         Code::ZoneHandle(object_store->write_barrier_wrappers_stub());
-    if (!stub.IsReadOnly()) {
+    if (!stub.InVMIsolateHeap()) {
       assembler_->generate_invoke_write_barrier_wrapper_ = [&](Register reg) {
         const intptr_t offset_into_target =
             Thread::WriteBarrierWrappersOffsetForRegister(reg);
@@ -42,7 +42,7 @@
 
     const auto& array_stub =
         Code::ZoneHandle(object_store->array_write_barrier_stub());
-    if (!array_stub.IsReadOnly()) {
+    if (!array_stub.InVMIsolateHeap()) {
       assembler_->generate_invoke_array_write_barrier_ = [&]() {
         AddPcRelativeCallStubTarget(array_stub);
         assembler_->GenerateUnRelocatedPcRelativeCall();
@@ -941,7 +941,7 @@
                                      RawPcDescriptors::Kind kind,
                                      LocationSummary* locs) {
   if (FLAG_precompiled_mode && FLAG_use_bare_instructions &&
-      !stub.IsReadOnly()) {
+      !stub.InVMIsolateHeap()) {
     AddPcRelativeCallStubTarget(stub);
     __ GenerateUnRelocatedPcRelativeCall();
     EmitCallsiteMetadata(token_pos, DeoptId::kNone, kind, locs);
diff --git a/runtime/vm/compiler/backend/il.cc b/runtime/vm/compiler/backend/il.cc
index 3d2a546..465be1e 100644
--- a/runtime/vm/compiler/backend/il.cc
+++ b/runtime/vm/compiler/backend/il.cc
@@ -261,7 +261,7 @@
                                       bool use_subtype_test,
                                       bool include_abstract,
                                       bool exclude_null) {
-  if (dst_klass.IsReadOnly()) {
+  if (dst_klass.InVMIsolateHeap()) {
     BuildRangesFor(table, ranges, dst_klass, use_subtype_test, include_abstract,
                    exclude_null);
     return;
@@ -520,6 +520,20 @@
   return defn;
 }
 
+Definition* Definition::OriginalDefinitionIgnoreBoxingAndConstraints() {
+  Definition* def = this;
+  while (true) {
+    Definition* orig;
+    if (def->IsConstraint() || def->IsBox() || def->IsUnbox()) {
+      orig = def->InputAt(0)->definition();
+    } else {
+      orig = def->OriginalDefinition();
+    }
+    if (orig == def) return def;
+    def = orig;
+  }
+}
+
 const ICData* Instruction::GetICData(
     const ZoneGrowableArray<const ICData*>& ic_data_array) const {
   // The deopt_id can be outside the range of the IC data array for
@@ -1756,7 +1770,7 @@
   LinkTo(new GotoInstr(entry, CompilerState::Current().GetNextDeoptId()));
 }
 
-bool UnboxedIntConverterInstr::ComputeCanDeoptimize() const {
+bool IntConverterInstr::ComputeCanDeoptimize() const {
   return (to() == kUnboxedInt32) && !is_truncating() &&
          !RangeUtils::Fits(value()->definition()->range(),
                            RangeBoundary::kRangeBoundaryInt32);
@@ -1839,6 +1853,14 @@
     case Token::kMOD:
       return RangeUtils::CanBeZero(right_range());
 
+    case Token::kTRUNCDIV:
+#if defined(TARGET_ARCH_DBC)
+      return true;
+#else
+      return RangeUtils::CanBeZero(right_range()) ||
+             RangeUtils::Overlaps(right_range(), -1, -1);
+#endif
+
     default:
       return can_overflow();
   }
@@ -2553,8 +2575,7 @@
 bool LoadFieldInstr::IsImmutableLengthLoad() const {
   switch (slot().kind()) {
     case Slot::Kind::kArray_length:
-    case Slot::Kind::kTypedData_length:
-    case Slot::Kind::kTypedDataView_length:
+    case Slot::Kind::kTypedDataBase_length:
     case Slot::Kind::kString_length:
       return true;
     case Slot::Kind::kGrowableObjectArray_length:
@@ -2570,6 +2591,7 @@
     case Slot::Kind::kArgumentsDescriptor_positional_count:
     case Slot::Kind::kArgumentsDescriptor_count:
     case Slot::Kind::kTypeArguments:
+    case Slot::Kind::kTypedDataBase_data_field:
     case Slot::Kind::kTypedDataView_offset_in_bytes:
     case Slot::Kind::kTypedDataView_data:
     case Slot::Kind::kGrowableObjectArray_data:
@@ -2905,8 +2927,7 @@
     return replacement;
   }
 
-  UnboxedIntConverterInstr* conv =
-      value()->definition()->AsUnboxedIntConverter();
+  IntConverterInstr* conv = value()->definition()->AsIntConverter();
   if (conv != NULL) {
     Definition* replacement = this;
 
@@ -2976,7 +2997,7 @@
       return box_defn->value()->definition();
     } else if (from_representation != kTagged) {
       // Only operate on explicit unboxed operands.
-      UnboxedIntConverterInstr* converter = new UnboxedIntConverterInstr(
+      IntConverterInstr* converter = new IntConverterInstr(
           from_representation, representation(),
           box_defn->value()->CopyWithType(),
           (representation() == kUnboxedInt32) ? GetDeoptId() : DeoptId::kNone);
@@ -3052,11 +3073,10 @@
   return this;
 }
 
-Definition* UnboxedIntConverterInstr::Canonicalize(FlowGraph* flow_graph) {
+Definition* IntConverterInstr::Canonicalize(FlowGraph* flow_graph) {
   if (!HasUses()) return NULL;
 
-  UnboxedIntConverterInstr* box_defn =
-      value()->definition()->AsUnboxedIntConverter();
+  IntConverterInstr* box_defn = value()->definition()->AsIntConverter();
   if ((box_defn != NULL) && (box_defn->representation() == from())) {
     if (box_defn->from() == to()) {
       // Do not erase truncating conversions from 64-bit value to 32-bit values
@@ -3067,7 +3087,7 @@
       return box_defn->value()->definition();
     }
 
-    UnboxedIntConverterInstr* converter = new UnboxedIntConverterInstr(
+    IntConverterInstr* converter = new IntConverterInstr(
         box_defn->from(), representation(), box_defn->value()->CopyWithType(),
         (to() == kUnboxedInt32) ? GetDeoptId() : DeoptId::kNone);
     if ((representation() == kUnboxedInt32) && is_truncating()) {
@@ -3525,6 +3545,8 @@
 bool UnboxInstr::CanConvertSmi() const {
   switch (representation()) {
     case kUnboxedDouble:
+    case kUnboxedFloat:
+    case kUnboxedInt32:
     case kUnboxedInt64:
       return true;
 
@@ -4646,6 +4668,10 @@
         EmitLoadFromBox(compiler);
         break;
 
+      case kUnboxedInt32:
+        EmitLoadInt32FromBoxOrSmi(compiler);
+        break;
+
       case kUnboxedInt64: {
         if (value()->Type()->ToCid() == kSmiCid) {
           // Smi -> int64 conversion is more efficient than
@@ -4656,7 +4682,6 @@
         }
         break;
       }
-
       default:
         UNREACHABLE();
         break;
@@ -4881,12 +4906,12 @@
 }
 
 intptr_t CheckArrayBoundInstr::LengthOffsetFor(intptr_t class_id) {
-  if (RawObject::IsExternalTypedDataClassId(class_id)) {
-    return ExternalTypedData::length_offset();
+  if (RawObject::IsTypedDataClassId(class_id) ||
+      RawObject::IsTypedDataViewClassId(class_id) ||
+      RawObject::IsExternalTypedDataClassId(class_id)) {
+    return TypedDataBase::length_offset();
   }
-  if (RawObject::IsTypedDataClassId(class_id)) {
-    return TypedData::length_offset();
-  }
+
   switch (class_id) {
     case kGrowableObjectArrayCid:
       return GrowableObjectArray::length_offset();
@@ -5192,13 +5217,14 @@
   set_native_c_function(native_function);
 }
 
-#if defined(TARGET_ARCH_X64)
+#if defined(TARGET_ARCH_X64) || defined(TARGET_ARCH_ARM64) ||                  \
+    defined(TARGET_ARCH_IA32)
 
 #define Z zone_
 
 Representation FfiCallInstr::RequiredInputRepresentation(intptr_t idx) const {
   if (idx == TargetAddressIndex()) {
-    return kUnboxedIntPtr;
+    return kUnboxedFfiIntPtr;
   } else {
     return arg_representations_[idx];
   }
@@ -5211,27 +5237,38 @@
   ASSERT(((1 << CallingConventions::kFirstCalleeSavedCpuReg) &
           CallingConventions::kArgumentRegisters) == 0);
 
-  LocationSummary* summary =
-      new (zone) LocationSummary(zone, /*num_inputs=*/InputCount(),
-                                 /*num_temps=*/1, LocationSummary::kCall);
+#if defined(TARGET_ARCH_ARM64) || defined(TARGET_ARCH_IA32)
+  constexpr intptr_t kNumTemps = 2;
+#else
+  constexpr intptr_t kNumTemps = 1;
+#endif
+
+  LocationSummary* summary = new (zone)
+      LocationSummary(zone, /*num_inputs=*/InputCount(),
+                      /*num_temps=*/kNumTemps, LocationSummary::kCall);
 
   summary->set_in(TargetAddressIndex(),
                   Location::RegisterLocation(
                       CallingConventions::kFirstNonArgumentRegister));
   summary->set_temp(0, Location::RegisterLocation(
                            CallingConventions::kSecondNonArgumentRegister));
+#if defined(TARGET_ARCH_IA32) || defined(TARGET_ARCH_ARM64)
+  summary->set_temp(1, Location::RegisterLocation(
+                           CallingConventions::kFirstCalleeSavedCpuReg));
+#endif
   summary->set_out(0, compiler::ffi::ResultLocation(
                           compiler::ffi::ResultRepresentation(signature_)));
 
   for (intptr_t i = 0, n = NativeArgCount(); i < n; ++i) {
-    Location target = arg_locations_[i];
-    if (target.IsMachineRegister()) {
-      summary->set_in(i, target);
-    } else {
-      // Since we have to push this input on the stack, there's no point in
-      // pinning it to any specific register.
-      summary->set_in(i, Location::Any());
-    }
+    // Floating point values are never split: they are either in a single "FPU"
+    // register or a contiguous 64-bit slot on the stack. Unboxed 64-bit integer
+    // values, in contrast, can be split between any two registers on a 32-bit
+    // system.
+    const bool is_atomic = arg_representations_[i] == kUnboxedFloat ||
+                           arg_representations_[i] == kUnboxedDouble;
+    // Since we have to move this input down to the stack, there's no point in
+    // pinning it to any specific register.
+    summary->set_in(i, UnallocateStackSlots(arg_locations_[i], is_atomic));
   }
 
   return summary;
@@ -5241,6 +5278,22 @@
   return compiler::ffi::ResultRepresentation(signature_);
 }
 
+Location FfiCallInstr::UnallocateStackSlots(Location in, bool is_atomic) {
+  if (in.IsPairLocation()) {
+    ASSERT(!is_atomic);
+    return Location::Pair(UnallocateStackSlots(in.AsPairLocation()->At(0)),
+                          UnallocateStackSlots(in.AsPairLocation()->At(1)));
+  } else if (in.IsMachineRegister()) {
+    return in;
+  } else if (in.IsDoubleStackSlot()) {
+    return is_atomic ? Location::Any()
+                     : Location::Pair(Location::Any(), Location::Any());
+  } else {
+    ASSERT(in.IsStackSlot());
+    return Location::Any();
+  }
+}
+
 #undef Z
 
 #else
diff --git a/runtime/vm/compiler/backend/il.h b/runtime/vm/compiler/backend/il.h
index a16b035..fa4b7be 100644
--- a/runtime/vm/compiler/backend/il.h
+++ b/runtime/vm/compiler/backend/il.h
@@ -382,6 +382,7 @@
   M(AllocateObject, _)                                                         \
   M(LoadField, kNoGC)                                                          \
   M(LoadUntagged, kNoGC)                                                       \
+  M(StoreUntagged, kNoGC)                                                      \
   M(LoadClassId, kNoGC)                                                        \
   M(InstantiateType, _)                                                        \
   M(InstantiateTypeArguments, _)                                               \
@@ -449,7 +450,8 @@
   M(UnboxUint32, kNoGC)                                                        \
   M(BoxInt32, _)                                                               \
   M(UnboxInt32, kNoGC)                                                         \
-  M(UnboxedIntConverter, _)                                                    \
+  M(IntConverter, _)                                                           \
+  M(UnboxedWidthExtender, _)                                                   \
   M(Deoptimize, kNoGC)                                                         \
   M(SimdOp, kNoGC)
 
@@ -1305,6 +1307,15 @@
 
   Instruction* Current() const { return current_; }
 
+  bool operator==(const ForwardInstructionIterator& other) const {
+    return current_ == other.current_;
+  }
+
+  ForwardInstructionIterator& operator++() {
+    Advance();
+    return *this;
+  }
+
  private:
   Instruction* current_;
 };
@@ -1839,7 +1850,7 @@
 
   bool IsInt32Definition() {
     return IsBinaryInt32Op() || IsBoxInt32() || IsUnboxInt32() ||
-           IsUnboxedIntConverter();
+           IsIntConverter();
   }
 
   // Compute compile type for this definition. It is safe to use this
@@ -1937,8 +1948,16 @@
 
   virtual void SetIdentity(AliasIdentity identity) { UNREACHABLE(); }
 
+  // Find the original definition of [this] by following through any
+  // redefinition and check instructions.
   Definition* OriginalDefinition();
 
+  // Find the original definition of [this].
+  //
+  // This is an extension of [OriginalDefinition] which also follows through any
+  // boxing/unboxing and constraint instructions.
+  Definition* OriginalDefinitionIgnoreBoxingAndConstraints();
+
   virtual Definition* AsDefinition() { return this; }
 
  protected:
@@ -3112,7 +3131,7 @@
         argument_names_(argument_names),
         arguments_(arguments),
         token_pos_(token_pos) {
-    ASSERT(argument_names.IsZoneHandle() || argument_names.IsReadOnly());
+    ASSERT(argument_names.IsZoneHandle() || argument_names.InVMIsolateHeap());
   }
 
   RawString* Selector() {
@@ -4136,6 +4155,10 @@
  private:
   virtual void RawSetInputAt(intptr_t i, Value* value) { inputs_[i] = value; }
 
+  // Mark stack slots in 'loc' as unallocated. Split a double-word stack slot
+  // into a pair location if 'is_atomic' is false.
+  static Location UnallocateStackSlots(Location loc, bool is_atomic = false);
+
   Zone* const zone_;
   const Function& signature_;
 
@@ -5075,9 +5098,9 @@
   DISALLOW_COPY_AND_ASSIGN(CreateArrayInstr);
 };
 
-// Note: this instruction must not be moved without the indexed access that
-// depends on it (e.g. out of loops). GC may cause collect
-// the array while the external data-array is still accessed.
+// Note: This instruction must not be moved without the indexed access that
+// depends on it (e.g. out of loops). GC may collect the array while the
+// external data-array is still accessed.
 // TODO(vegorov) enable LICMing this instruction by ensuring that array itself
 // is kept alive.
 class LoadUntaggedInstr : public TemplateDefinition<1, NoThrow> {
@@ -5102,7 +5125,9 @@
   virtual bool ComputeCanDeoptimize() const { return false; }
 
   virtual bool HasUnknownSideEffects() const { return false; }
-  virtual bool AttributesEqual(Instruction* other) const { return true; }
+  virtual bool AttributesEqual(Instruction* other) const {
+    return other->AsLoadUntagged()->offset_ == offset_;
+  }
 
  private:
   intptr_t offset_;
@@ -5110,6 +5135,55 @@
   DISALLOW_COPY_AND_ASSIGN(LoadUntaggedInstr);
 };
 
+// Stores an untagged value into the given object.
+//
+// If the untagged value is a derived pointer (e.g. pointer to start of internal
+// typed data array backing) then this instruction cannot be moved across
+// instructions which can trigger GC, to ensure that
+//
+//    LoadUntaggeed + Arithmetic + StoreUntagged
+//
+// are performed atomically
+//
+// See kernel_to_il.cc:BuildTypedDataViewFactoryConstructor.
+class StoreUntaggedInstr : public TemplateInstruction<2, NoThrow> {
+ public:
+  StoreUntaggedInstr(Value* object, Value* value, intptr_t offset)
+      : offset_(offset) {
+    SetInputAt(0, object);
+    SetInputAt(1, value);
+  }
+
+  DECLARE_INSTRUCTION(StoreUntagged)
+
+  virtual Representation RequiredInputRepresentation(intptr_t idx) const {
+    ASSERT(idx == 0 || idx == 1);
+    // The object may be tagged or untagged (for external objects).
+    if (idx == 0) return kNoRepresentation;
+    return kUntagged;
+  }
+
+  Value* object() const { return inputs_[0]; }
+  Value* value() const { return inputs_[1]; }
+  intptr_t offset() const { return offset_; }
+
+  virtual bool ComputeCanDeoptimize() const { return false; }
+  virtual bool HasUnknownSideEffects() const { return false; }
+  virtual bool AttributesEqual(Instruction* other) const {
+    return other->AsStoreUntagged()->offset_ == offset_;
+  }
+
+  intptr_t offset_from_tagged() const {
+    const bool is_tagged = object()->definition()->representation() == kTagged;
+    return offset() - (is_tagged ? kHeapObjectTag : 0);
+  }
+
+ private:
+  intptr_t offset_;
+
+  DISALLOW_COPY_AND_ASSIGN(StoreUntaggedInstr);
+};
+
 class LoadClassIdInstr : public TemplateDefinition<1, NoThrow, Pure> {
  public:
   explicit LoadClassIdInstr(Value* object) { SetInputAt(0, object); }
@@ -5633,6 +5707,7 @@
   bool CanConvertSmi() const;
   void EmitLoadFromBox(FlowGraphCompiler* compiler);
   void EmitSmiConversion(FlowGraphCompiler* compiler);
+  void EmitLoadInt32FromBoxOrSmi(FlowGraphCompiler* compiler);
   void EmitLoadInt64FromBoxOrSmi(FlowGraphCompiler* compiler);
   void EmitLoadFromBoxWithDeopt(FlowGraphCompiler* compiler);
 
@@ -7437,21 +7512,23 @@
   DISALLOW_COPY_AND_ASSIGN(CheckConditionInstr);
 };
 
-class UnboxedIntConverterInstr : public TemplateDefinition<1, NoThrow, Pure> {
+class IntConverterInstr : public TemplateDefinition<1, NoThrow, Pure> {
  public:
-  UnboxedIntConverterInstr(Representation from,
-                           Representation to,
-                           Value* value,
-                           intptr_t deopt_id)
+  IntConverterInstr(Representation from,
+                    Representation to,
+                    Value* value,
+                    intptr_t deopt_id)
       : TemplateDefinition(deopt_id),
         from_representation_(from),
         to_representation_(to),
         is_truncating_(to == kUnboxedUint32) {
     ASSERT(from != to);
-    ASSERT((from == kUnboxedInt64) || (from == kUnboxedUint32) ||
-           (from == kUnboxedInt32));
-    ASSERT((to == kUnboxedInt64) || (to == kUnboxedUint32) ||
-           (to == kUnboxedInt32));
+    ASSERT(from == kUnboxedInt64 || from == kUnboxedUint32 ||
+           from == kUnboxedInt32 || from == kUntagged);
+    ASSERT(to == kUnboxedInt64 || to == kUnboxedUint32 || to == kUnboxedInt32 ||
+           to == kUntagged);
+    ASSERT(from != kUntagged || to == kUnboxedIntPtr);
+    ASSERT(to != kUntagged || from == kUnboxedIntPtr);
     SetInputAt(0, value);
   }
 
@@ -7475,8 +7552,8 @@
   }
 
   virtual bool AttributesEqual(Instruction* other) const {
-    ASSERT(other->IsUnboxedIntConverter());
-    UnboxedIntConverterInstr* converter = other->AsUnboxedIntConverter();
+    ASSERT(other->IsIntConverter());
+    auto converter = other->AsIntConverter();
     return (converter->from() == from()) && (converter->to() == to()) &&
            (converter->is_truncating() == is_truncating());
   }
@@ -7488,7 +7565,7 @@
     return CompileType::Int();
   }
 
-  DECLARE_INSTRUCTION(UnboxedIntConverter);
+  DECLARE_INSTRUCTION(IntConverter);
 
   PRINT_OPERANDS_TO_SUPPORT
 
@@ -7497,10 +7574,61 @@
   const Representation to_representation_;
   bool is_truncating_;
 
-  DISALLOW_COPY_AND_ASSIGN(UnboxedIntConverterInstr);
+  DISALLOW_COPY_AND_ASSIGN(IntConverterInstr);
 };
 
+// Sign- or zero-extends an integer in unboxed 32-bit representation.
 //
+// The choice between sign- and zero- extension is made based on the whether the
+// chosen representation is signed or unsigned.
+//
+// It is only supported to extend 1- or 2-byte operands; however, since we don't
+// have a representation less than 32-bits, both the input and output
+// representations are 32-bit (and equal).
+class UnboxedWidthExtenderInstr : public TemplateDefinition<1, NoThrow, Pure> {
+ public:
+  UnboxedWidthExtenderInstr(Value* value,
+                            Representation rep,
+                            intptr_t from_width_bytes)
+      : TemplateDefinition(DeoptId::kNone),
+        representation_(rep),
+        from_width_bytes_(from_width_bytes) {
+    ASSERT(from_width_bytes == 1 || from_width_bytes == 2);
+    ASSERT(rep == kUnboxedInt32 || rep == kUnboxedUint32);
+    SetInputAt(0, value);
+  }
+
+  Value* value() const { return inputs_[0]; }
+
+  Representation representation() const { return representation_; }
+
+  bool ComputeCanDeoptimize() const { return false; }
+
+  virtual Representation RequiredInputRepresentation(intptr_t idx) const {
+    ASSERT(idx == 0);
+    return representation_;
+  }
+
+  virtual bool AttributesEqual(Instruction* other) const {
+    ASSERT(other->IsUnboxedWidthExtender());
+    const UnboxedWidthExtenderInstr* ext = other->AsUnboxedWidthExtender();
+    return ext->representation() == representation() &&
+           ext->from_width_bytes_ == from_width_bytes_;
+  }
+
+  virtual CompileType ComputeType() const { return CompileType::Int(); }
+
+  DECLARE_INSTRUCTION(UnboxedWidthExtender);
+
+  PRINT_OPERANDS_TO_SUPPORT
+
+ private:
+  const Representation representation_;
+  const intptr_t from_width_bytes_;
+
+  DISALLOW_COPY_AND_ASSIGN(UnboxedWidthExtenderInstr);
+};
+
 // SimdOpInstr
 //
 // All SIMD intrinsics and recognized methods are represented via instances
diff --git a/runtime/vm/compiler/backend/il_arm.cc b/runtime/vm/compiler/backend/il_arm.cc
index e6766dc..942c9e8 100644
--- a/runtime/vm/compiler/backend/il_arm.cc
+++ b/runtime/vm/compiler/backend/il_arm.cc
@@ -1066,6 +1066,10 @@
   }
 }
 
+DEFINE_BACKEND(StoreUntagged, (NoLocation, Register obj, Register value)) {
+  __ StoreToOffset(kWord, value, obj, instr->offset_from_tagged());
+}
+
 LocationSummary* LoadClassIdInstr::MakeLocationSummary(Zone* zone,
                                                        bool opt) const {
   const intptr_t kNumInputs = 1;
@@ -1184,9 +1188,7 @@
   const int64_t index = Smi::Cast(constant->value()).AsInt64Value();
   const intptr_t scale = Instance::ElementSizeFor(cid);
   const intptr_t base_offset =
-      (is_external || RawObject::IsTypedDataClassId(cid)
-           ? 0
-           : (Instance::DataOffsetFor(cid) - kHeapObjectTag));
+      (is_external ? 0 : (Instance::DataOffsetFor(cid) - kHeapObjectTag));
   const int64_t offset = index * scale + base_offset;
   if (!Utils::IsAbsoluteUint(12, offset)) {
     return false;
@@ -3089,7 +3091,7 @@
           : object_store->stack_overflow_stub_without_fpu_regs_stub());
   const bool using_shared_stub = locs()->call_on_shared_slow_path();
   if (FLAG_precompiled_mode && FLAG_use_bare_instructions &&
-      using_shared_stub && !stub.IsReadOnly()) {
+      using_shared_stub && !stub.InVMIsolateHeap()) {
     compiler->AddPcRelativeCallStubTarget(stub);
     __ GenerateUnRelocatedPcRelativeCall(LS);
 
@@ -3718,10 +3720,12 @@
       __ SmiUntag(IP, right);
       __ IntegerDivide(result, temp, IP, dtemp, DTMP);
 
-      // Check the corner case of dividing the 'MIN_SMI' with -1, in which
-      // case we cannot tag the result.
-      __ CompareImmediate(result, 0x40000000);
-      __ b(deopt, EQ);
+      if (RangeUtils::Overlaps(right_range(), -1, -1)) {
+        // Check the corner case of dividing the 'MIN_SMI' with -1, in which
+        // case we cannot tag the result.
+        __ CompareImmediate(result, 0x40000000);
+        __ b(deopt, EQ);
+      }
       __ SmiTag(result);
       break;
     }
@@ -4084,6 +4088,8 @@
   if (representation() == kUnboxedInt64) {
     summary->set_out(0, Location::Pair(Location::RequiresRegister(),
                                        Location::RequiresRegister()));
+  } else if (representation() == kUnboxedInt32) {
+    summary->set_out(0, Location::RequiresRegister());
   } else {
     summary->set_out(0, Location::RequiresFpuRegister());
   }
@@ -4156,6 +4162,15 @@
   }
 }
 
+void UnboxInstr::EmitLoadInt32FromBoxOrSmi(FlowGraphCompiler* compiler) {
+  const Register value = locs()->in(0).reg();
+  const Register result = locs()->out(0).reg();
+  Label done;
+  __ SmiUntag(result, value, &done);
+  __ LoadFieldFromOffset(kWord, result, value, Mint::value_offset());
+  __ Bind(&done);
+}
+
 void UnboxInstr::EmitLoadInt64FromBoxOrSmi(FlowGraphCompiler* compiler) {
   const Register box = locs()->in(0).reg();
   PairLocation* result = locs()->out(0).AsPairLocation();
@@ -5796,7 +5811,7 @@
                     : object_store->null_error_stub_without_fpu_regs_stub());
   const bool using_shared_stub = locs()->call_on_shared_slow_path();
   if (FLAG_precompiled_mode && FLAG_use_bare_instructions &&
-      using_shared_stub && !stub.IsReadOnly()) {
+      using_shared_stub && !stub.InVMIsolateHeap()) {
     compiler->AddPcRelativeCallStubTarget(stub);
     __ GenerateUnRelocatedPcRelativeCall(EQUAL);
 
@@ -6513,32 +6528,48 @@
   __ mvn(out, Operand(left));
 }
 
-LocationSummary* UnboxedIntConverterInstr::MakeLocationSummary(Zone* zone,
-                                                               bool opt) const {
+LocationSummary* IntConverterInstr::MakeLocationSummary(Zone* zone,
+                                                        bool opt) const {
   const intptr_t kNumInputs = 1;
   const intptr_t kNumTemps = 0;
   LocationSummary* summary = new (zone)
       LocationSummary(zone, kNumInputs, kNumTemps, LocationSummary::kNoCall);
-  if (from() == kUnboxedInt64) {
-    ASSERT((to() == kUnboxedUint32) || (to() == kUnboxedInt32));
+  if (from() == kUntagged || to() == kUntagged) {
+    ASSERT((from() == kUntagged && to() == kUnboxedIntPtr) ||
+           (from() == kUnboxedIntPtr && to() == kUntagged));
+    ASSERT(!CanDeoptimize());
+    summary->set_in(0, Location::RequiresRegister());
+    summary->set_out(0, Location::SameAsFirstInput());
+  } else if (from() == kUnboxedInt64) {
+    ASSERT(to() == kUnboxedUint32 || to() == kUnboxedInt32);
     summary->set_in(0, Location::Pair(Location::RequiresRegister(),
                                       Location::RequiresRegister()));
     summary->set_out(0, Location::RequiresRegister());
   } else if (to() == kUnboxedInt64) {
-    ASSERT((from() == kUnboxedUint32) || (from() == kUnboxedInt32));
+    ASSERT(from() == kUnboxedUint32 || from() == kUnboxedInt32);
     summary->set_in(0, Location::RequiresRegister());
     summary->set_out(0, Location::Pair(Location::RequiresRegister(),
                                        Location::RequiresRegister()));
   } else {
-    ASSERT((to() == kUnboxedUint32) || (to() == kUnboxedInt32));
-    ASSERT((from() == kUnboxedUint32) || (from() == kUnboxedInt32));
+    ASSERT(to() == kUnboxedUint32 || to() == kUnboxedInt32);
+    ASSERT(from() == kUnboxedUint32 || from() == kUnboxedInt32);
     summary->set_in(0, Location::RequiresRegister());
     summary->set_out(0, Location::SameAsFirstInput());
   }
   return summary;
 }
 
-void UnboxedIntConverterInstr::EmitNativeCode(FlowGraphCompiler* compiler) {
+void IntConverterInstr::EmitNativeCode(FlowGraphCompiler* compiler) {
+  const bool is_nop_conversion =
+      (from() == kUntagged && to() == kUnboxedInt32) ||
+      (from() == kUntagged && to() == kUnboxedUint32) ||
+      (from() == kUnboxedInt32 && to() == kUntagged) ||
+      (from() == kUnboxedUint32 && to() == kUntagged);
+  if (is_nop_conversion) {
+    ASSERT(locs()->in(0).reg() == locs()->out(0).reg());
+    return;
+  }
+
   if (from() == kUnboxedInt32 && to() == kUnboxedUint32) {
     const Register out = locs()->out(0).reg();
     // Representations are bitwise equivalent.
@@ -6587,6 +6618,36 @@
   }
 }
 
+LocationSummary* UnboxedWidthExtenderInstr::MakeLocationSummary(
+    Zone* zone,
+    bool is_optimizing) const {
+  const intptr_t kNumTemps = 0;
+  LocationSummary* summary = new (zone)
+      LocationSummary(zone, /*num_inputs=*/InputCount(),
+                      /*num_temps=*/kNumTemps, LocationSummary::kNoCall);
+  summary->set_in(0, Location::RequiresRegister());
+  summary->set_out(0, Location::SameAsFirstInput());
+  return summary;
+}
+
+void UnboxedWidthExtenderInstr::EmitNativeCode(FlowGraphCompiler* compiler) {
+  Register reg = locs()->in(0).reg();
+  // There are no builtin sign- or zero-extension instructions, so we'll have to
+  // use shifts instead.
+  const intptr_t shift_length = (kWordSize - from_width_bytes_) * kBitsPerByte;
+  __ Lsl(reg, reg, Operand(shift_length));
+  switch (representation_) {
+    case kUnboxedInt32:  // Sign extend operand.
+      __ Asr(reg, reg, Operand(shift_length));
+      break;
+    case kUnboxedUint32:  // Zero extend operand.
+      __ Lsr(reg, reg, Operand(shift_length));
+      break;
+    default:
+      UNREACHABLE();
+  }
+}
+
 LocationSummary* ThrowInstr::MakeLocationSummary(Zone* zone, bool opt) const {
   return new (zone) LocationSummary(zone, 0, 0, LocationSummary::kCall);
 }
diff --git a/runtime/vm/compiler/backend/il_arm64.cc b/runtime/vm/compiler/backend/il_arm64.cc
index b10e64d..c5a2cf0 100644
--- a/runtime/vm/compiler/backend/il_arm64.cc
+++ b/runtime/vm/compiler/backend/il_arm64.cc
@@ -873,7 +873,102 @@
 }
 
 void FfiCallInstr::EmitNativeCode(FlowGraphCompiler* compiler) {
-  UNREACHABLE();
+  Register saved_fp = locs()->temp(0).reg();
+  Register temp = locs()->temp(1).reg();
+  Register branch = locs()->in(TargetAddressIndex()).reg();
+
+  // Save frame pointer because we're going to update it when we enter the exit
+  // frame.
+  __ mov(saved_fp, FPREG);
+
+  // We need to create a dummy "exit frame". It will share the same pool pointer
+  // but have a null code object.
+  __ LoadObject(CODE_REG, Object::null_object());
+  __ set_constant_pool_allowed(false);
+  __ EnterDartFrame(0, PP);
+
+  // Save exit frame information to enable stack walking as we are about
+  // to transition to Dart VM C++ code.
+  __ StoreToOffset(FPREG, THR,
+                   compiler::target::Thread::top_exit_frame_info_offset());
+
+  // Make space for arguments and align the frame.
+  __ ReserveAlignedFrameSpace(compiler::ffi::NumStackSlots(arg_locations_) *
+                              kWordSize);
+
+  for (intptr_t i = 0, n = NativeArgCount(); i < n; ++i) {
+    Location origin = locs()->in(i);
+    Location target = arg_locations_[i];
+
+    if (target.IsStackSlot()) {
+      if (origin.IsRegister()) {
+        __ StoreToOffset(origin.reg(), SPREG, target.ToStackSlotOffset());
+      } else if (origin.IsFpuRegister()) {
+        __ StoreDToOffset(origin.fpu_reg(), SPREG, target.ToStackSlotOffset());
+      } else if (origin.IsStackSlot() || origin.IsDoubleStackSlot()) {
+        // The base register cannot be SPREG because we've moved it.
+        ASSERT(origin.base_reg() == FPREG);
+        __ LoadFromOffset(TMP, saved_fp, origin.ToStackSlotOffset());
+        __ StoreToOffset(TMP, SPREG, target.ToStackSlotOffset());
+      }
+    } else {
+      ASSERT(origin.Equals(target));
+    }
+  }
+
+  // Mark that the thread is executing VM code.
+  __ StoreToOffset(branch, THR, compiler::target::Thread::vm_tag_offset());
+
+  // We need to copy the return address up into the dummy stack frame so the
+  // stack walker will know which safepoint to use.
+  const intptr_t call_sequence_start = __ CodeSize();
+
+  // 5 instructions, 4 bytes each.
+  constexpr intptr_t kCallSequenceLength = 5 * 4;
+
+  __ adr(temp, Immediate(kCallSequenceLength));
+  __ StoreToOffset(temp, FPREG, kSavedCallerPcSlotFromFp * kWordSize);
+
+  // We are entering runtime code, so the C stack pointer must be restored from
+  // the stack limit to the top of the stack. We cache the stack limit address
+  // in a callee-saved register.
+  __ mov(temp, CSP);
+  __ mov(CSP, SP);
+
+  __ blr(branch);
+
+  ASSERT(__ CodeSize() - call_sequence_start == kCallSequenceLength);
+
+  // Restore the Dart stack pointer and the saved C stack pointer.
+  __ mov(SP, CSP);
+  __ mov(CSP, temp);
+
+  compiler->EmitCallsiteMetadata(token_pos(), DeoptId::kNone,
+                                 RawPcDescriptors::Kind::kOther, locs());
+
+  // Mark that the thread is executing Dart code.
+  __ LoadImmediate(temp, VMTag::kDartCompiledTagId);
+  __ StoreToOffset(temp, THR, compiler::target::Thread::vm_tag_offset());
+
+  // Reset exit frame information in Isolate structure.
+  __ StoreToOffset(ZR, THR,
+                   compiler::target::Thread::top_exit_frame_info_offset());
+
+  // Refresh write barrier mask.
+  __ ldr(BARRIER_MASK,
+         Address(THR, compiler::target::Thread::write_barrier_mask_offset()));
+
+  // Although PP is a callee-saved register, it may have been moved by the GC.
+  __ LeaveDartFrame(compiler::kRestoreCallerPP);
+
+  // Restore the global object pool after returning from runtime (old space is
+  // moving, so the GOP could have been relocated).
+  if (FLAG_precompiled_mode && FLAG_use_bare_instructions) {
+    __ ldr(PP, Address(THR, Thread::global_object_pool_offset()));
+    __ sub(PP, PP, Operand(kHeapObjectTag));  // Pool in PP is untagged!
+  }
+
+  __ set_constant_pool_allowed(true);
 }
 
 LocationSummary* OneByteStringFromCharCodeInstr::MakeLocationSummary(
@@ -958,6 +1053,10 @@
   }
 }
 
+DEFINE_BACKEND(StoreUntagged, (NoLocation, Register obj, Register value)) {
+  __ StoreToOffset(value, obj, instr->offset_from_tagged());
+}
+
 LocationSummary* LoadClassIdInstr::MakeLocationSummary(Zone* zone,
                                                        bool opt) const {
   const intptr_t kNumInputs = 1;
@@ -1064,9 +1163,8 @@
   const int64_t index = Smi::Cast(constant->value()).AsInt64Value();
   const intptr_t scale = Instance::ElementSizeFor(cid);
   const int64_t offset =
-      index * scale + (is_external || RawObject::IsTypedDataClassId(cid)
-                           ? 0
-                           : (Instance::DataOffsetFor(cid) - kHeapObjectTag));
+      index * scale +
+      (is_external ? 0 : (Instance::DataOffsetFor(cid) - kHeapObjectTag));
   if (!Utils::IsInt(32, offset)) {
     return false;
   }
@@ -2732,7 +2830,7 @@
               : object_store->stack_overflow_stub_without_fpu_regs_stub());
 
       if (FLAG_precompiled_mode && FLAG_use_bare_instructions &&
-          using_shared_stub && !stub.IsReadOnly()) {
+          using_shared_stub && !stub.InVMIsolateHeap()) {
         compiler->AddPcRelativeCallStubTarget(stub);
         __ GenerateUnRelocatedPcRelativeCall();
 
@@ -3372,11 +3470,12 @@
       __ SmiUntag(TMP, right);
 
       __ sdiv(result, temp, TMP);
-
-      // Check the corner case of dividing the 'MIN_SMI' with -1, in which
-      // case we cannot tag the result.
-      __ CompareImmediate(result, 0x4000000000000000LL);
-      __ b(deopt, EQ);
+      if (RangeUtils::Overlaps(right_range(), -1, -1)) {
+        // Check the corner case of dividing the 'MIN_SMI' with -1, in which
+        // case we cannot tag the result.
+        __ CompareImmediate(result, 0x4000000000000000LL);
+        __ b(deopt, EQ);
+      }
       __ SmiTag(result);
       break;
     }
@@ -3528,7 +3627,8 @@
 LocationSummary* UnboxInstr::MakeLocationSummary(Zone* zone, bool opt) const {
   const intptr_t kNumInputs = 1;
   const intptr_t kNumTemps = 0;
-  const bool is_floating_point = representation() != kUnboxedInt64;
+  const bool is_floating_point =
+      representation() != kUnboxedInt64 && representation() != kUnboxedInt32;
   LocationSummary* summary = new (zone)
       LocationSummary(zone, kNumInputs, kNumTemps, LocationSummary::kNoCall);
   summary->set_in(0, Location::RequiresRegister());
@@ -3597,6 +3697,18 @@
   }
 }
 
+void UnboxInstr::EmitLoadInt32FromBoxOrSmi(FlowGraphCompiler* compiler) {
+  const Register value = locs()->in(0).reg();
+  const Register result = locs()->out(0).reg();
+  ASSERT(value != result);
+  Label done;
+  __ SmiUntag(result, value);
+  __ BranchIfSmi(value, &done);
+  __ ldr(result, FieldAddress(value, Mint::value_offset()), kWord);
+  __ LoadFieldFromOffset(result, value, Mint::value_offset());
+  __ Bind(&done);
+}
+
 void UnboxInstr::EmitLoadInt64FromBoxOrSmi(FlowGraphCompiler* compiler) {
   const Register value = locs()->in(0).reg();
   const Register result = locs()->out(0).reg();
@@ -5009,7 +5121,7 @@
       live_fpu_regs ? object_store->null_error_stub_with_fpu_regs_stub()
                     : object_store->null_error_stub_without_fpu_regs_stub());
   if (FLAG_precompiled_mode && FLAG_use_bare_instructions &&
-      using_shared_stub && !stub.IsReadOnly()) {
+      using_shared_stub && !stub.InVMIsolateHeap()) {
     compiler->AddPcRelativeCallStubTarget(stub);
     compiler->assembler()->GenerateUnRelocatedPcRelativeCall();
     return;
@@ -5744,19 +5856,23 @@
 
 DEFINE_UNIMPLEMENTED_INSTRUCTION(BinaryInt32OpInstr)
 
-LocationSummary* UnboxedIntConverterInstr::MakeLocationSummary(Zone* zone,
-                                                               bool opt) const {
+LocationSummary* IntConverterInstr::MakeLocationSummary(Zone* zone,
+                                                        bool opt) const {
   const intptr_t kNumInputs = 1;
   const intptr_t kNumTemps = 0;
   LocationSummary* summary = new (zone)
       LocationSummary(zone, kNumInputs, kNumTemps, LocationSummary::kNoCall);
-  if (from() == kUnboxedInt64) {
-    ASSERT((to() == kUnboxedUint32) || (to() == kUnboxedInt32));
+  if (from() == kUntagged || to() == kUntagged) {
+    ASSERT((from() == kUntagged && to() == kUnboxedIntPtr) ||
+           (from() == kUnboxedIntPtr && to() == kUntagged));
+    ASSERT(!CanDeoptimize());
+  } else if (from() == kUnboxedInt64) {
+    ASSERT(to() == kUnboxedUint32 || to() == kUnboxedInt32);
   } else if (to() == kUnboxedInt64) {
-    ASSERT((from() == kUnboxedUint32) || (from() == kUnboxedInt32));
+    ASSERT(from() == kUnboxedInt32 || from() == kUnboxedUint32);
   } else {
-    ASSERT((to() == kUnboxedUint32) || (to() == kUnboxedInt32));
-    ASSERT((from() == kUnboxedUint32) || (from() == kUnboxedInt32));
+    ASSERT(to() == kUnboxedUint32 || to() == kUnboxedInt32);
+    ASSERT(from() == kUnboxedUint32 || from() == kUnboxedInt32);
   }
   summary->set_in(0, Location::RequiresRegister());
   if (CanDeoptimize()) {
@@ -5767,8 +5883,17 @@
   return summary;
 }
 
-void UnboxedIntConverterInstr::EmitNativeCode(FlowGraphCompiler* compiler) {
+void IntConverterInstr::EmitNativeCode(FlowGraphCompiler* compiler) {
   ASSERT(from() != to());  // We don't convert from a representation to itself.
+
+  const bool is_nop_conversion =
+      (from() == kUntagged && to() == kUnboxedIntPtr) ||
+      (from() == kUnboxedIntPtr && to() == kUntagged);
+  if (is_nop_conversion) {
+    ASSERT(locs()->in(0).reg() == locs()->out(0).reg());
+    return;
+  }
+
   const Register value = locs()->in(0).reg();
   const Register out = locs()->out(0).reg();
   Label* deopt = !CanDeoptimize() ? NULL
@@ -5820,6 +5945,50 @@
   }
 }
 
+LocationSummary* UnboxedWidthExtenderInstr::MakeLocationSummary(
+    Zone* zone,
+    bool is_optimizing) const {
+  const intptr_t kNumTemps = 0;
+  LocationSummary* summary = new (zone)
+      LocationSummary(zone, /*num_inputs=*/InputCount(),
+                      /*num_temps=*/kNumTemps, LocationSummary::kNoCall);
+  summary->set_in(0, Location::RequiresRegister());
+  summary->set_out(0, Location::SameAsFirstInput());
+  return summary;
+}
+
+void UnboxedWidthExtenderInstr::EmitNativeCode(FlowGraphCompiler* compiler) {
+  Register reg = locs()->in(0).reg();
+  switch (representation_) {
+    case kUnboxedInt32:  // Sign extend operand.
+      switch (from_width_bytes_) {
+        case 1:
+          __ sxtb(reg, reg);
+          break;
+        case 2:
+          __ sxth(reg, reg);
+          break;
+        default:
+          UNREACHABLE();
+      }
+      break;
+    case kUnboxedUint32:  // Zero extend operand.
+      switch (from_width_bytes_) {
+        case 1:
+          __ uxtb(reg, reg);
+          break;
+        case 2:
+          __ uxth(reg, reg);
+          break;
+        default:
+          UNREACHABLE();
+      }
+      break;
+    default:
+      UNREACHABLE();
+  }
+}
+
 LocationSummary* ThrowInstr::MakeLocationSummary(Zone* zone, bool opt) const {
   return new (zone) LocationSummary(zone, 0, 0, LocationSummary::kCall);
 }
diff --git a/runtime/vm/compiler/backend/il_dbc.cc b/runtime/vm/compiler/backend/il_dbc.cc
index 0ffd8d9..421954b 100644
--- a/runtime/vm/compiler/backend/il_dbc.cc
+++ b/runtime/vm/compiler/backend/il_dbc.cc
@@ -46,7 +46,8 @@
   M(SpeculativeShiftUint32Op)                                                  \
   M(TruncDivMod)                                                               \
   M(UnaryUint32Op)                                                             \
-  M(UnboxedIntConverter)
+  M(IntConverter)                                                              \
+  M(UnboxedWidthExtender)
 
 // List of instructions that are not used by DBC.
 // Things we aren't planning to implement for DBC:
@@ -748,7 +749,7 @@
     case kExternalTypedDataUint8ArrayCid:
       ASSERT(index_scale() == 1);
       if (IsExternal()) {
-        __ StoreIndexedExternalUint8(array, index, value);
+        __ StoreIndexedUntaggedUint8(array, index, value);
       } else {
         __ StoreIndexedUint8(array, index, value);
       }
@@ -760,43 +761,58 @@
     case kTypedDataInt32ArrayCid:
     case kTypedDataUint32ArrayCid: {
       if (IsExternal()) {
-        Unsupported(compiler);
-        UNREACHABLE();
-      }
-      if (index_scale() == 1) {
-        __ StoreIndexedUint32(array, index, value);
+        if (index_scale() == 1) {
+          __ StoreIndexedUntaggedUint32(array, index, value);
+        } else {
+          __ ShlImm(temp, index, Utils::ShiftForPowerOfTwo(index_scale()));
+          __ StoreIndexedUntaggedUint32(array, temp, value);
+        }
       } else {
-        __ ShlImm(temp, index, Utils::ShiftForPowerOfTwo(index_scale()));
-        __ StoreIndexedUint32(array, temp, value);
+        if (index_scale() == 1) {
+          __ StoreIndexedUint32(array, index, value);
+        } else {
+          __ ShlImm(temp, index, Utils::ShiftForPowerOfTwo(index_scale()));
+          __ StoreIndexedUint32(array, temp, value);
+        }
       }
       break;
     }
     case kTypedDataFloat32ArrayCid:
       if (IsExternal()) {
-        Unsupported(compiler);
-        UNREACHABLE();
-      }
-      if (index_scale() == 1) {
-        __ StoreIndexedFloat32(array, index, value);
-      } else if (index_scale() == 4) {
-        __ StoreIndexed4Float32(array, index, value);
+        if (index_scale() == 1) {
+          __ StoreIndexedUntaggedFloat32(array, index, value);
+        } else {
+          __ ShlImm(temp, index, Utils::ShiftForPowerOfTwo(index_scale()));
+          __ StoreIndexedUntaggedFloat32(array, temp, value);
+        }
       } else {
-        __ ShlImm(temp, index, Utils::ShiftForPowerOfTwo(index_scale()));
-        __ StoreIndexedFloat32(array, temp, value);
+        if (index_scale() == 1) {
+          __ StoreIndexedFloat32(array, index, value);
+        } else if (index_scale() == 4) {
+          __ StoreIndexed4Float32(array, index, value);
+        } else {
+          __ ShlImm(temp, index, Utils::ShiftForPowerOfTwo(index_scale()));
+          __ StoreIndexedFloat32(array, temp, value);
+        }
       }
       break;
     case kTypedDataFloat64ArrayCid:
       if (IsExternal()) {
-        Unsupported(compiler);
-        UNREACHABLE();
-      }
-      if (index_scale() == 1) {
-        __ StoreIndexedFloat64(array, index, value);
-      } else if (index_scale() == 8) {
-        __ StoreIndexed8Float64(array, index, value);
+        if (index_scale() == 1) {
+          __ StoreIndexedUntaggedFloat64(array, index, value);
+        } else {
+          __ ShlImm(temp, index, Utils::ShiftForPowerOfTwo(index_scale()));
+          __ StoreIndexedUntaggedFloat64(array, temp, value);
+        }
       } else {
-        __ ShlImm(temp, index, Utils::ShiftForPowerOfTwo(index_scale()));
-        __ StoreIndexedFloat64(array, temp, value);
+        if (index_scale() == 1) {
+          __ StoreIndexedFloat64(array, index, value);
+        } else if (index_scale() == 8) {
+          __ StoreIndexed8Float64(array, index, value);
+        } else {
+          __ ShlImm(temp, index, Utils::ShiftForPowerOfTwo(index_scale()));
+          __ StoreIndexedFloat64(array, temp, value);
+        }
       }
       break;
     default:
@@ -829,7 +845,7 @@
       case kExternalTypedDataUint8ClampedArrayCid:
         ASSERT(index_scale() == 1);
         if (IsExternal()) {
-          __ LoadIndexedExternalUint8(result, array, index);
+          __ LoadIndexedUntaggedUint8(result, array, index);
         } else {
           __ LoadIndexedUint8(result, array, index);
         }
@@ -837,7 +853,7 @@
       case kTypedDataInt8ArrayCid:
         ASSERT(index_scale() == 1);
         if (IsExternal()) {
-          __ LoadIndexedExternalInt8(result, array, index);
+          __ LoadIndexedUntaggedInt8(result, array, index);
         } else {
           __ LoadIndexedInt8(result, array, index);
         }
@@ -861,55 +877,75 @@
       case kTypedDataInt32ArrayCid:
         ASSERT(representation() == kUnboxedInt32);
         if (IsExternal()) {
-          Unsupported(compiler);
-          UNREACHABLE();
-        }
-        if (index_scale() == 1) {
-          __ LoadIndexedInt32(result, array, index);
+          if (index_scale() == 1) {
+            __ LoadIndexedUntaggedInt32(result, array, index);
+          } else {
+            __ ShlImm(temp, index, Utils::ShiftForPowerOfTwo(index_scale()));
+            __ LoadIndexedUntaggedInt32(result, array, temp);
+          }
         } else {
-          __ ShlImm(temp, index, Utils::ShiftForPowerOfTwo(index_scale()));
-          __ LoadIndexedInt32(result, array, temp);
+          if (index_scale() == 1) {
+            __ LoadIndexedInt32(result, array, index);
+          } else {
+            __ ShlImm(temp, index, Utils::ShiftForPowerOfTwo(index_scale()));
+            __ LoadIndexedInt32(result, array, temp);
+          }
         }
         break;
       case kTypedDataUint32ArrayCid:
         ASSERT(representation() == kUnboxedUint32);
         if (IsExternal()) {
-          Unsupported(compiler);
-          UNREACHABLE();
-        }
-        if (index_scale() == 1) {
-          __ LoadIndexedUint32(result, array, index);
+          if (index_scale() == 1) {
+            __ LoadIndexedUntaggedUint32(result, array, index);
+          } else {
+            __ ShlImm(temp, index, Utils::ShiftForPowerOfTwo(index_scale()));
+            __ LoadIndexedUntaggedUint32(result, array, temp);
+          }
         } else {
-          __ ShlImm(temp, index, Utils::ShiftForPowerOfTwo(index_scale()));
-          __ LoadIndexedUint32(result, array, temp);
+          if (index_scale() == 1) {
+            __ LoadIndexedUint32(result, array, index);
+          } else {
+            __ ShlImm(temp, index, Utils::ShiftForPowerOfTwo(index_scale()));
+            __ LoadIndexedUint32(result, array, temp);
+          }
         }
         break;
       case kTypedDataFloat32ArrayCid:
         if (IsExternal()) {
-          Unsupported(compiler);
-          UNREACHABLE();
-        }
-        if (index_scale() == 1) {
-          __ LoadIndexedFloat32(result, array, index);
-        } else if (index_scale() == 4) {
-          __ LoadIndexed4Float32(result, array, index);
+          if (index_scale() == 1) {
+            __ LoadIndexedUntaggedFloat32(result, array, index);
+          } else {
+            __ ShlImm(temp, index, Utils::ShiftForPowerOfTwo(index_scale()));
+            __ LoadIndexedUntaggedFloat32(result, array, temp);
+          }
         } else {
-          __ ShlImm(temp, index, Utils::ShiftForPowerOfTwo(index_scale()));
-          __ LoadIndexedFloat32(result, array, temp);
+          if (index_scale() == 1) {
+            __ LoadIndexedFloat32(result, array, index);
+          } else if (index_scale() == 4) {
+            __ LoadIndexed4Float32(result, array, index);
+          } else {
+            __ ShlImm(temp, index, Utils::ShiftForPowerOfTwo(index_scale()));
+            __ LoadIndexedFloat32(result, array, temp);
+          }
         }
         break;
       case kTypedDataFloat64ArrayCid:
         if (IsExternal()) {
-          Unsupported(compiler);
-          UNREACHABLE();
-        }
-        if (index_scale() == 1) {
-          __ LoadIndexedFloat64(result, array, index);
-        } else if (index_scale() == 8) {
-          __ LoadIndexed8Float64(result, array, index);
+          if (index_scale() == 1) {
+            __ LoadIndexedUntaggedFloat64(result, array, index);
+          } else {
+            __ ShlImm(temp, index, Utils::ShiftForPowerOfTwo(index_scale()));
+            __ LoadIndexedUntaggedFloat64(result, array, temp);
+          }
         } else {
-          __ ShlImm(temp, index, Utils::ShiftForPowerOfTwo(index_scale()));
-          __ LoadIndexedFloat64(result, array, temp);
+          if (index_scale() == 1) {
+            __ LoadIndexedFloat64(result, array, index);
+          } else if (index_scale() == 8) {
+            __ LoadIndexed8Float64(result, array, index);
+          } else {
+            __ ShlImm(temp, index, Utils::ShiftForPowerOfTwo(index_scale()));
+            __ LoadIndexedFloat64(result, array, temp);
+          }
         }
         break;
       default:
@@ -1131,6 +1167,18 @@
   }
 }
 
+EMIT_NATIVE_CODE(StoreUntagged, 1, Location::RequiresRegister()) {
+  const Register obj = locs()->in(0).reg();
+  const Register value = locs()->out(0).reg();
+  const auto offset_in_words = offset() / kWordSize;
+  if (object()->definition()->representation() == kUntagged) {
+    __ StoreUntagged(obj, offset_in_words, value);
+  } else {
+    ASSERT(object()->definition()->representation() == kTagged);
+    __ StoreField(obj, offset_in_words, value);
+  }
+}
+
 EMIT_NATIVE_CODE(BooleanNegate, 1, Location::RequiresRegister()) {
   if (compiler->is_optimizing()) {
     __ BooleanNegate(locs()->out(0).reg(), locs()->in(0).reg());
diff --git a/runtime/vm/compiler/backend/il_ia32.cc b/runtime/vm/compiler/backend/il_ia32.cc
index 1d0b013..71dedf6 100644
--- a/runtime/vm/compiler/backend/il_ia32.cc
+++ b/runtime/vm/compiler/backend/il_ia32.cc
@@ -846,7 +846,119 @@
 }
 
 void FfiCallInstr::EmitNativeCode(FlowGraphCompiler* compiler) {
-  UNREACHABLE();
+  Register saved_fp = locs()->temp(0).reg();
+  Register branch = locs()->in(TargetAddressIndex()).reg();
+  Register tmp = locs()->temp(1).reg();
+
+  // Save frame pointer because we're going to update it when we enter the exit
+  // frame.
+  __ movl(saved_fp, FPREG);
+
+  // Make a space to put the return address.
+  __ pushl(Immediate(0));
+
+  // We need to create a dummy "exit frame". It will have a null code object.
+  __ LoadObject(CODE_REG, Object::null_object());
+  __ EnterDartFrame(compiler::ffi::NumStackSlots(arg_locations_) * kWordSize);
+
+  // Save exit frame information to enable stack walking as we are about
+  // to transition to Dart VM C++ code.
+  __ movl(Address(THR, Thread::top_exit_frame_info_offset()), FPREG);
+
+  // Align frame before entering C++ world.
+  if (OS::ActivationFrameAlignment() > 1) {
+    __ andl(SPREG, Immediate(~(OS::ActivationFrameAlignment() - 1)));
+  }
+
+  // Load a 32-bit argument, or a 32-bit component of a 64-bit argument.
+  auto load_single_slot = [&](Location from, Location to) {
+    ASSERT(to.IsStackSlot());
+    if (from.IsRegister()) {
+      __ movl(to.ToStackSlotAddress(), from.reg());
+    } else if (from.IsFpuRegister()) {
+      __ movss(to.ToStackSlotAddress(), from.fpu_reg());
+    } else if (from.IsStackSlot() || from.IsDoubleStackSlot()) {
+      ASSERT(from.base_reg() == FPREG);
+      __ movl(tmp, Address(saved_fp, from.ToStackSlotOffset()));
+      __ movl(to.ToStackSlotAddress(), tmp);
+    } else {
+      UNREACHABLE();
+    }
+  };
+
+  for (intptr_t i = 0, n = NativeArgCount(); i < n; ++i) {
+    Location origin = locs()->in(i);
+    Location target = arg_locations_[i];
+
+    if (target.IsStackSlot()) {
+      load_single_slot(origin, target);
+    } else if (target.IsDoubleStackSlot()) {
+      if (origin.IsFpuRegister()) {
+        __ movsd(target.ToStackSlotAddress(), origin.fpu_reg());
+      } else {
+        ASSERT(origin.IsDoubleStackSlot() && origin.base_reg() == FPREG);
+        __ movl(tmp, Address(saved_fp, origin.ToStackSlotOffset()));
+        __ movl(target.ToStackSlotAddress(), tmp);
+        __ movl(tmp, Address(saved_fp, origin.ToStackSlotOffset() + 4));
+        __ movl(Address(SPREG, target.ToStackSlotOffset() + 4), tmp);
+      }
+    } else if (target.IsPairLocation()) {
+      ASSERT(origin.IsPairLocation());
+      load_single_slot(origin.AsPairLocation()->At(0),
+                       target.AsPairLocation()->At(0));
+      load_single_slot(origin.AsPairLocation()->At(1),
+                       target.AsPairLocation()->At(1));
+    }
+  }
+
+  // Mark that the thread is executing VM code.
+  __ movl(Assembler::VMTagAddress(), branch);
+
+  // We need to copy the return address up into the dummy stack frame so the
+  // stack walker will know which safepoint to use. Unlike X64, there's no
+  // PC-relative 'leaq' available, so we have do a trick with 'call'.
+  constexpr intptr_t kCallSequenceLength = 6;
+
+  Label get_pc;
+  __ call(&get_pc);
+  __ Bind(&get_pc);
+
+  const intptr_t call_sequence_start = __ CodeSize();
+
+  __ popl(tmp);
+  __ movl(Address(FPREG, kSavedCallerPcSlotFromFp * kWordSize), tmp);
+  __ call(branch);
+
+  ASSERT(__ CodeSize() - call_sequence_start == kCallSequenceLength);
+
+  compiler->EmitCallsiteMetadata(TokenPosition::kNoSource, DeoptId::kNone,
+                                 RawPcDescriptors::Kind::kOther, locs());
+
+  // The x86 calling convention requires floating point values to be returned on
+  // the "floating-point stack" (aka. register ST0). We don't use the
+  // floating-point stack in Dart, so we need to move the return value back into
+  // an XMM register.
+  if (representation() == kUnboxedDouble) {
+    __ subl(SPREG, Immediate(8));
+    __ fstpl(Address(SPREG, 0));
+    __ movsd(XMM0, Address(SPREG, 0));
+  } else if (representation() == kUnboxedFloat) {
+    __ subl(SPREG, Immediate(4));
+    __ fstps(Address(SPREG, 0));
+    __ movss(XMM0, Address(SPREG, 0));
+  }
+
+  // Mark that the thread is executing Dart code.
+  __ movl(Assembler::VMTagAddress(), Immediate(VMTag::kDartCompiledTagId));
+
+  // Reset exit frame information in Isolate structure.
+  __ movl(Address(THR, Thread::top_exit_frame_info_offset()), Immediate(0));
+
+  // Leave dummy exit frame.
+  __ LeaveFrame();
+
+  // Instead of returning to the "fake" return address, we just pop it.
+  __ popl(tmp);
 }
 
 static bool CanBeImmediateIndex(Value* value, intptr_t cid) {
@@ -946,6 +1058,10 @@
   }
 }
 
+DEFINE_BACKEND(StoreUntagged, (NoLocation, Register obj, Register value)) {
+  __ movl(Address(obj, instr->offset_from_tagged()), value);
+}
+
 LocationSummary* LoadClassIdInstr::MakeLocationSummary(Zone* zone,
                                                        bool opt) const {
   const intptr_t kNumInputs = 1;
@@ -3018,10 +3134,12 @@
       __ SmiUntag(right);
       __ cdq();         // Sign extend EAX -> EDX:EAX.
       __ idivl(right);  //  EAX: quotient, EDX: remainder.
-      // Check the corner case of dividing the 'MIN_SMI' with -1, in which
-      // case we cannot tag the result.
-      __ cmpl(result, Immediate(0x40000000));
-      __ j(EQUAL, deopt);
+      if (RangeUtils::Overlaps(right_range(), -1, -1)) {
+        // Check the corner case of dividing the 'MIN_SMI' with -1, in which
+        // case we cannot tag the result.
+        __ cmpl(result, Immediate(0x40000000));
+        __ j(EQUAL, deopt);
+      }
       __ SmiTag(result);
       break;
     }
@@ -3394,6 +3512,8 @@
   if (representation() == kUnboxedInt64) {
     summary->set_out(0, Location::Pair(Location::RegisterLocation(EAX),
                                        Location::RegisterLocation(EDX)));
+  } else if (representation() == kUnboxedInt32) {
+    summary->set_out(0, Location::SameAsFirstInput());
   } else {
     summary->set_out(0, Location::RequiresFpuRegister());
   }
@@ -3469,6 +3589,17 @@
   }
 }
 
+void UnboxInstr::EmitLoadInt32FromBoxOrSmi(FlowGraphCompiler* compiler) {
+  const Register value = locs()->in(0).reg();
+  const Register result = locs()->out(0).reg();
+  ASSERT(value == result);
+  Label done;
+  __ SmiUntag(value);  // Leaves CF after SmiUntag.
+  __ j(NOT_CARRY, &done, Assembler::kNearJump);
+  __ movl(result, FieldAddress(value, Mint::value_offset()));
+  __ Bind(&done);
+}
+
 void UnboxInstr::EmitLoadInt64FromBoxOrSmi(FlowGraphCompiler* compiler) {
   const Register box = locs()->in(0).reg();
   PairLocation* result = locs()->out(0).AsPairLocation();
@@ -5843,14 +5974,21 @@
   __ notl(out);
 }
 
-LocationSummary* UnboxedIntConverterInstr::MakeLocationSummary(Zone* zone,
-                                                               bool opt) const {
+LocationSummary* IntConverterInstr::MakeLocationSummary(Zone* zone,
+                                                        bool opt) const {
   const intptr_t kNumInputs = 1;
   const intptr_t kNumTemps = 0;
   LocationSummary* summary = new (zone)
       LocationSummary(zone, kNumInputs, kNumTemps, LocationSummary::kNoCall);
-  if ((from() == kUnboxedInt32 || from() == kUnboxedUint32) &&
-      (to() == kUnboxedInt32 || to() == kUnboxedUint32)) {
+
+  if (from() == kUntagged || to() == kUntagged) {
+    ASSERT((from() == kUntagged && to() == kUnboxedIntPtr) ||
+           (from() == kUnboxedIntPtr && to() == kUntagged));
+    ASSERT(!CanDeoptimize());
+    summary->set_in(0, Location::RequiresRegister());
+    summary->set_out(0, Location::SameAsFirstInput());
+  } else if ((from() == kUnboxedInt32 || from() == kUnboxedUint32) &&
+             (to() == kUnboxedInt32 || to() == kUnboxedUint32)) {
     summary->set_in(0, Location::RequiresRegister());
     summary->set_out(0, Location::SameAsFirstInput());
   } else if (from() == kUnboxedInt64) {
@@ -5868,10 +6006,19 @@
     summary->set_out(0, Location::Pair(Location::RegisterLocation(EAX),
                                        Location::RegisterLocation(EDX)));
   }
+
   return summary;
 }
 
-void UnboxedIntConverterInstr::EmitNativeCode(FlowGraphCompiler* compiler) {
+void IntConverterInstr::EmitNativeCode(FlowGraphCompiler* compiler) {
+  const bool is_nop_conversion =
+      (from() == kUntagged && to() == kUnboxedIntPtr) ||
+      (from() == kUnboxedIntPtr && to() == kUntagged);
+  if (is_nop_conversion) {
+    ASSERT(locs()->in(0).reg() == locs()->out(0).reg());
+    return;
+  }
+
   if (from() == kUnboxedInt32 && to() == kUnboxedUint32) {
     // Representations are bitwise equivalent.
     ASSERT(locs()->out(0).reg() == locs()->in(0).reg());
@@ -5926,6 +6073,49 @@
   }
 }
 
+LocationSummary* UnboxedWidthExtenderInstr::MakeLocationSummary(
+    Zone* zone,
+    bool is_optimizing) const {
+  const intptr_t kNumTemps = 0;
+  LocationSummary* summary = new (zone)
+      LocationSummary(zone, /*num_inputs=*/InputCount(),
+                      /*num_temps=*/kNumTemps, LocationSummary::kNoCall);
+  summary->set_in(0, Location::RegisterLocation(EAX));
+  summary->set_out(0, Location::RegisterLocation(EAX));
+  return summary;
+}
+
+void UnboxedWidthExtenderInstr::EmitNativeCode(FlowGraphCompiler* compiler) {
+  switch (representation_) {
+    case kUnboxedInt32:  // Sign-extend operand.
+      switch (from_width_bytes_) {
+        case 1:
+          __ movsxb(EAX, AL);
+          break;
+        case 2:
+          __ movsxw(EAX, EAX);
+          break;
+        default:
+          UNREACHABLE();
+      }
+      break;
+    case kUnboxedUint32:  // Zero-extend operand.
+      switch (from_width_bytes_) {
+        case 1:
+          __ movzxb(EAX, AL);
+          break;
+        case 2:
+          __ movzxw(EAX, EAX);
+          break;
+        default:
+          UNREACHABLE();
+      }
+      break;
+    default:
+      UNREACHABLE();
+  }
+}
+
 LocationSummary* ThrowInstr::MakeLocationSummary(Zone* zone, bool opt) const {
   return new (zone) LocationSummary(zone, 0, 0, LocationSummary::kCall);
 }
diff --git a/runtime/vm/compiler/backend/il_printer.cc b/runtime/vm/compiler/backend/il_printer.cc
index c6ab009..b735a6f 100644
--- a/runtime/vm/compiler/backend/il_printer.cc
+++ b/runtime/vm/compiler/backend/il_printer.cc
@@ -985,12 +985,18 @@
   Definition::PrintOperandsTo(f);
 }
 
-void UnboxedIntConverterInstr::PrintOperandsTo(BufferFormatter* f) const {
+void IntConverterInstr::PrintOperandsTo(BufferFormatter* f) const {
   f->Print("%s->%s%s, ", RepresentationToCString(from()),
            RepresentationToCString(to()), is_truncating() ? "[tr]" : "");
   Definition::PrintOperandsTo(f);
 }
 
+void UnboxedWidthExtenderInstr::PrintOperandsTo(BufferFormatter* f) const {
+  f->Print("%" Pd " -> 4 (%s), ", from_width_bytes_,
+           RepresentationToCString(representation()));
+  Definition::PrintOperandsTo(f);
+}
+
 void ParameterInstr::PrintOperandsTo(BufferFormatter* f) const {
   f->Print("%" Pd, index());
 }
diff --git a/runtime/vm/compiler/backend/il_x64.cc b/runtime/vm/compiler/backend/il_x64.cc
index 53c0b02..16569e8 100644
--- a/runtime/vm/compiler/backend/il_x64.cc
+++ b/runtime/vm/compiler/backend/il_x64.cc
@@ -894,8 +894,8 @@
   // but have a null code object.
   __ LoadObject(CODE_REG, Object::null_object());
   __ set_constant_pool_allowed(false);
-  __ EnterDartFrame(
-      compiler::ffi::NumStackArguments(arg_locations_) * kWordSize, PP);
+  __ EnterDartFrame(compiler::ffi::NumStackSlots(arg_locations_) * kWordSize,
+                    PP);
 
   // Save exit frame information to enable stack walking as we are about to
   // transition to Dart VM C++ code.
@@ -1069,6 +1069,10 @@
   }
 }
 
+DEFINE_BACKEND(StoreUntagged, (NoLocation, Register obj, Register value)) {
+  __ movq(Address(obj, instr->offset_from_tagged()), value);
+}
+
 LocationSummary* LoadClassIdInstr::MakeLocationSummary(Zone* zone,
                                                        bool opt) const {
   const intptr_t kNumInputs = 1;
@@ -3609,10 +3613,12 @@
       __ SmiUntag(right);
       __ cqo();         // Sign extend RAX -> RDX:RAX.
       __ idivq(right);  //  RAX: quotient, RDX: remainder.
-      // Check the corner case of dividing the 'MIN_SMI' with -1, in which
-      // case we cannot tag the result.
-      __ CompareImmediate(result, Immediate(0x4000000000000000));
-      __ j(EQUAL, deopt);
+      if (RangeUtils::Overlaps(right_range(), -1, -1)) {
+        // Check the corner case of dividing the 'MIN_SMI' with -1, in which
+        // case we cannot tag the result.
+        __ CompareImmediate(result, Immediate(0x4000000000000000));
+        __ j(EQUAL, deopt);
+      }
       __ Bind(&done);
       __ SmiTag(result);
       break;
@@ -3819,7 +3825,7 @@
       LocationSummary(zone, kNumInputs, kNumTemps, LocationSummary::kNoCall);
   summary->set_in(0, needs_writable_input ? Location::WritableRegister()
                                           : Location::RequiresRegister());
-  if (representation() == kUnboxedInt64) {
+  if (representation() == kUnboxedInt64 || representation() == kUnboxedInt32) {
     summary->set_out(0, Location::SameAsFirstInput());
   } else {
     summary->set_out(0, Location::RequiresFpuRegister());
@@ -3888,6 +3894,17 @@
   }
 }
 
+void UnboxInstr::EmitLoadInt32FromBoxOrSmi(FlowGraphCompiler* compiler) {
+  const Register value = locs()->in(0).reg();
+  const Register result = locs()->out(0).reg();
+  ASSERT(value == result);
+  Label done;
+  __ SmiUntag(value);
+  __ j(NOT_CARRY, &done, Assembler::kNearJump);
+  __ movsxw(result, Address(value, TIMES_2, Mint::value_offset()));
+  __ Bind(&done);
+}
+
 void UnboxInstr::EmitLoadInt64FromBoxOrSmi(FlowGraphCompiler* compiler) {
   const Register value = locs()->in(0).reg();
   const Register result = locs()->out(0).reg();
@@ -6130,30 +6147,40 @@
 
 DEFINE_UNIMPLEMENTED_INSTRUCTION(BinaryInt32OpInstr)
 
-LocationSummary* UnboxedIntConverterInstr::MakeLocationSummary(Zone* zone,
-                                                               bool opt) const {
+LocationSummary* IntConverterInstr::MakeLocationSummary(Zone* zone,
+                                                        bool opt) const {
   const intptr_t kNumInputs = 1;
   const intptr_t kNumTemps = 0;
   LocationSummary* summary = new (zone)
       LocationSummary(zone, kNumInputs, kNumTemps, LocationSummary::kNoCall);
-  if (from() == kUnboxedInt64) {
-    ASSERT((to() == kUnboxedUint32) || (to() == kUnboxedInt32));
-    summary->set_in(0, Location::RequiresRegister());
-    summary->set_out(0, Location::SameAsFirstInput());
+  if (from() == kUntagged || to() == kUntagged) {
+    ASSERT((from() == kUntagged && to() == kUnboxedIntPtr) ||
+           (from() == kUnboxedIntPtr && to() == kUntagged));
+    ASSERT(!CanDeoptimize());
+  } else if (from() == kUnboxedInt64) {
+    ASSERT(to() == kUnboxedUint32 || to() == kUnboxedInt32);
   } else if (to() == kUnboxedInt64) {
-    ASSERT((from() == kUnboxedInt32) || (from() == kUnboxedUint32));
-    summary->set_in(0, Location::RequiresRegister());
-    summary->set_out(0, Location::SameAsFirstInput());
+    ASSERT(from() == kUnboxedInt32 || from() == kUnboxedUint32);
   } else {
-    ASSERT((to() == kUnboxedUint32) || (to() == kUnboxedInt32));
-    ASSERT((from() == kUnboxedUint32) || (from() == kUnboxedInt32));
-    summary->set_in(0, Location::RequiresRegister());
-    summary->set_out(0, Location::SameAsFirstInput());
+    ASSERT(to() == kUnboxedUint32 || to() == kUnboxedInt32);
+    ASSERT(from() == kUnboxedUint32 || from() == kUnboxedInt32);
   }
+
+  summary->set_in(0, Location::RequiresRegister());
+  summary->set_out(0, Location::SameAsFirstInput());
+
   return summary;
 }
 
-void UnboxedIntConverterInstr::EmitNativeCode(FlowGraphCompiler* compiler) {
+void IntConverterInstr::EmitNativeCode(FlowGraphCompiler* compiler) {
+  const bool is_nop_conversion =
+      (from() == kUntagged && to() == kUnboxedIntPtr) ||
+      (from() == kUnboxedIntPtr && to() == kUntagged);
+  if (is_nop_conversion) {
+    ASSERT(locs()->in(0).reg() == locs()->out(0).reg());
+    return;
+  }
+
   if (from() == kUnboxedInt32 && to() == kUnboxedUint32) {
     const Register value = locs()->in(0).reg();
     const Register out = locs()->out(0).reg();
@@ -6174,7 +6201,7 @@
       __ j(NEGATIVE, deopt);
     }
   } else if (from() == kUnboxedInt64) {
-    ASSERT((to() == kUnboxedUint32) || (to() == kUnboxedInt32));
+    ASSERT(to() == kUnboxedUint32 || to() == kUnboxedInt32);
     const Register value = locs()->in(0).reg();
     const Register out = locs()->out(0).reg();
     if (!CanDeoptimize()) {
@@ -6207,6 +6234,49 @@
   }
 }
 
+LocationSummary* UnboxedWidthExtenderInstr::MakeLocationSummary(
+    Zone* zone,
+    bool is_optimizing) const {
+  const intptr_t kNumTemps = 0;
+  LocationSummary* summary = new (zone)
+      LocationSummary(zone, /*num_inputs=*/InputCount(),
+                      /*num_temps=*/kNumTemps, LocationSummary::kNoCall);
+  summary->set_in(0, Location::RegisterLocation(RAX));
+  summary->set_out(0, Location::RegisterLocation(RAX));
+  return summary;
+}
+
+void UnboxedWidthExtenderInstr::EmitNativeCode(FlowGraphCompiler* compiler) {
+  switch (representation_) {
+    case kUnboxedInt32:  // Sign extend operand.
+      switch (from_width_bytes_) {
+        case 1:
+          __ movsxb(RAX, RAX);
+          break;
+        case 2:
+          __ movsxw(RAX, RAX);
+          break;
+        default:
+          UNREACHABLE();
+      }
+      break;
+    case kUnboxedUint32:  // Zero extend operand.
+      switch (from_width_bytes_) {
+        case 1:
+          __ movzxb(RAX, RAX);
+          break;
+        case 2:
+          __ movzxw(RAX, RAX);
+          break;
+        default:
+          UNREACHABLE();
+      }
+      break;
+    default:
+      UNREACHABLE();
+  }
+}
+
 LocationSummary* ThrowInstr::MakeLocationSummary(Zone* zone, bool opt) const {
   return new (zone) LocationSummary(zone, 0, 0, LocationSummary::kCall);
 }
diff --git a/runtime/vm/compiler/backend/inliner.cc b/runtime/vm/compiler/backend/inliner.cc
index a81b2cc..b53f252 100644
--- a/runtime/vm/compiler/backend/inliner.cc
+++ b/runtime/vm/compiler/backend/inliner.cc
@@ -2439,11 +2439,9 @@
     // Load from the data from backing store which is a fixed-length array.
     *array = elements;
     array_cid = kArrayCid;
-  } else if (RawObject::IsTypedDataClassId(array_cid) ||
-             RawObject::IsExternalTypedDataClassId(array_cid)) {
-    ASSERT(TypedData::data_offset() == ExternalTypedData::data_offset());
-    LoadUntaggedInstr* elements = new (Z)
-        LoadUntaggedInstr(new (Z) Value(*array), TypedData::data_offset());
+  } else if (RawObject::IsExternalTypedDataClassId(array_cid)) {
+    LoadUntaggedInstr* elements = new (Z) LoadUntaggedInstr(
+        new (Z) Value(*array), ExternalTypedData::data_offset());
     *cursor = flow_graph->AppendTo(*cursor, elements, NULL, FlowGraph::kValue);
     *array = elements;
   }
@@ -2858,6 +2856,64 @@
                                  FlowGraph::kValue);
 }
 
+// Emits preparatory code for a typed getter/setter.
+// Handles three cases:
+//   (1) dynamic:  generates a conditional on the receiver cid
+//                 that handles external (load untagged) and
+//                 internal storage at runtime.
+//   (2) external: generates load untagged.
+//   (3) internal: no code required.
+static void PrepareInlineByteArrayBaseOp(FlowGraph* flow_graph,
+                                         Instruction* call,
+                                         Definition* receiver,
+                                         intptr_t array_cid,
+                                         Definition** array,
+                                         Instruction** cursor,
+                                         TargetEntryInstr** block_external,
+                                         TargetEntryInstr** block_internal) {
+  if (array_cid == kDynamicCid) {
+    // Dynamic case:   runtime resolution between external/internal typed data.
+    //                 cid = LoadCid
+    //                 if cid in [ kExternalTypedDataInt8ArrayCid,
+    //                             kExternalTypedDataFloat64x2ArrayCid ]
+    // block_external: LoadUntagged
+    //                 ..
+    //                 else
+    // block_internal: ..
+    //
+    // TODO(ajcbik): as suggested above, subtract + single unsigned test.
+    //
+    LoadClassIdInstr* load_cid =
+        new (Z) LoadClassIdInstr(new (Z) Value(receiver));
+    *cursor = flow_graph->AppendTo(*cursor, load_cid, NULL, FlowGraph::kValue);
+    ConstantInstr* cid_lo = flow_graph->GetConstant(
+        Smi::ZoneHandle(Smi::New(kExternalTypedDataInt8ArrayCid)));
+    RelationalOpInstr* le_lo = new (Z)
+        RelationalOpInstr(call->token_pos(), Token::kLTE, new (Z) Value(cid_lo),
+                          new (Z) Value(load_cid), kSmiCid, call->deopt_id());
+    ConstantInstr* cid_hi = flow_graph->GetConstant(
+        Smi::ZoneHandle(Smi::New(kExternalTypedDataFloat64x2ArrayCid)));
+    RelationalOpInstr* le_hi = new (Z) RelationalOpInstr(
+        call->token_pos(), Token::kLTE, new (Z) Value(load_cid),
+        new (Z) Value(cid_hi), kSmiCid, call->deopt_id());
+    *cursor = flow_graph->NewDiamond(*cursor, call,
+                                     FlowGraph::LogicalAnd(le_lo, le_hi),
+                                     block_external, block_internal);
+    LoadUntaggedInstr* elements = new (Z) LoadUntaggedInstr(
+        new (Z) Value(*array), ExternalTypedData::data_offset());
+    flow_graph->InsertAfter(*block_external, elements, NULL, FlowGraph::kValue);
+    *array = elements;  // return load untagged definition in array
+  } else if (RawObject::IsExternalTypedDataClassId(array_cid)) {
+    // External typed data: load untagged.
+    LoadUntaggedInstr* elements = new (Z) LoadUntaggedInstr(
+        new (Z) Value(*array), ExternalTypedData::data_offset());
+    *cursor = flow_graph->AppendTo(*cursor, elements, NULL, FlowGraph::kValue);
+    *array = elements;
+  } else {
+    // Internal typed data: no action.
+  }
+}
+
 static LoadIndexedInstr* NewLoad(FlowGraph* flow_graph,
                                  Instruction* call,
                                  Definition* array,
@@ -2909,16 +2965,44 @@
                                        array, &index, &cursor);
   }
 
-  ASSERT(TypedData::data_offset() == ExternalTypedData::data_offset());
-  LoadUntaggedInstr* elements =
-      new (Z) LoadUntaggedInstr(new (Z) Value(array), TypedData::data_offset());
-  cursor = flow_graph->AppendTo(cursor, elements, nullptr, FlowGraph::kValue);
+  // Generates a template for the load, either a dynamic conditional
+  // that dispatches on external and internal storage, or a single
+  // case that deals with either external or internal storage.
+  TargetEntryInstr* block_external = nullptr;
+  TargetEntryInstr* block_internal = nullptr;
+  PrepareInlineByteArrayBaseOp(flow_graph, call, receiver, array_cid, &array,
+                               &cursor, &block_external, &block_internal);
 
-  LoadIndexedInstr* load = NewLoad(flow_graph, call, elements, index, view_cid);
-  flow_graph->AppendTo(
-      cursor, load, call->deopt_id() != DeoptId::kNone ? call->env() : nullptr,
-      FlowGraph::kValue);
-  cursor = *last = load;
+  // Fill out the generated template with loads.
+  if (array_cid == kDynamicCid) {
+    ASSERT(block_external != nullptr && block_internal != nullptr);
+    // Load from external in block_external and internal in block_internal
+    // (resolves (B)). The former loads from "array", which is the returned
+    // load untagged definition. The latter loads from the original "receiver".
+    LoadIndexedInstr* load1 = NewLoad(flow_graph, call, array, index, view_cid);
+    ASSERT(block_external->next() == array);
+    flow_graph->InsertAfter(
+        block_external->next(), load1,
+        call->deopt_id() != DeoptId::kNone ? call->env() : nullptr,
+        FlowGraph::kValue);
+    LoadIndexedInstr* load2 =
+        NewLoad(flow_graph, call, receiver, index, view_cid);
+    flow_graph->InsertAfter(
+        block_internal, load2,
+        call->deopt_id() != DeoptId::kNone ? call->env() : nullptr,
+        FlowGraph::kValue);
+    // Construct phi of external and internal load.
+    *last = flow_graph->AddPhi(cursor->AsJoinEntry(), load1, load2);
+  } else {
+    ASSERT(block_external == nullptr && block_internal == nullptr);
+    // Load from either external or internal.
+    LoadIndexedInstr* load = NewLoad(flow_graph, call, array, index, view_cid);
+    flow_graph->AppendTo(
+        cursor, load,
+        call->deopt_id() != DeoptId::kNone ? call->env() : nullptr,
+        FlowGraph::kValue);
+    cursor = *last = load;
+  }
 
   if (view_cid == kTypedDataFloat32ArrayCid) {
     *last = new (Z) FloatToDoubleInstr(new (Z) Value((*last)->AsDefinition()),
@@ -3097,17 +3181,43 @@
                                   FlowGraph::kValue);
   }
 
-  ASSERT(TypedData::data_offset() == ExternalTypedData::data_offset());
-  LoadUntaggedInstr* elements =
-      new (Z) LoadUntaggedInstr(new (Z) Value(array), TypedData::data_offset());
-  cursor = flow_graph->AppendTo(cursor, elements, nullptr, FlowGraph::kValue);
+  // Generates a template for the store, either a dynamic conditional
+  // that dispatches on external and internal storage, or a single
+  // case that deals with either external or internal storage.
+  TargetEntryInstr* block_external = nullptr;
+  TargetEntryInstr* block_internal = nullptr;
+  PrepareInlineByteArrayBaseOp(flow_graph, call, receiver, array_cid, &array,
+                               &cursor, &block_external, &block_internal);
 
-  StoreIndexedInstr* store =
-      NewStore(flow_graph, call, elements, index, stored_value, view_cid);
-  flow_graph->AppendTo(
-      cursor, store, call->deopt_id() != DeoptId::kNone ? call->env() : nullptr,
-      FlowGraph::kEffect);
-  *last = store;
+  // Fill out the generated template with stores.
+  if (array_cid == kDynamicCid) {
+    ASSERT(block_external != nullptr && block_internal != nullptr);
+    // Store to external in block_external and internal in block_internal
+    // (resolves (B)). The former stores to "array", which is the returned
+    // load untagged definition. The latter stores to the original "receiver".
+    ASSERT(block_external->next() == array);
+    flow_graph->InsertAfter(
+        block_external->next(),
+        NewStore(flow_graph, call, array, index, stored_value, view_cid),
+        call->deopt_id() != DeoptId::kNone ? call->env() : nullptr,
+        FlowGraph::kEffect);
+    flow_graph->InsertAfter(
+        block_internal,
+        NewStore(flow_graph, call, receiver, index, stored_value, view_cid),
+        call->deopt_id() != DeoptId::kNone ? call->env() : nullptr,
+        FlowGraph::kEffect);
+    *last = cursor;
+  } else {
+    ASSERT(block_external == nullptr && block_internal == nullptr);
+    // Store on either external or internal.
+    StoreIndexedInstr* store =
+        NewStore(flow_graph, call, array, index, stored_value, view_cid);
+    flow_graph->AppendTo(
+        cursor, store,
+        call->deopt_id() != DeoptId::kNone ? call->env() : nullptr,
+        FlowGraph::kEffect);
+    *last = store;
+  }
   // We need a return value to replace uses of the original definition. However,
   // the final instruction is a use of 'void operator[]=()', so we use null.
   *result = flow_graph->constant_null();
diff --git a/runtime/vm/compiler/backend/linearscan.cc b/runtime/vm/compiler/backend/linearscan.cc
index 23b5189..d786d83 100644
--- a/runtime/vm/compiler/backend/linearscan.cc
+++ b/runtime/vm/compiler/backend/linearscan.cc
@@ -1465,9 +1465,9 @@
       if (locs->in(j).IsPairLocation()) {
         PairLocation* pair = locs->in_slot(j)->AsPairLocation();
         ASSERT(!pair->At(0).IsUnallocated() ||
-               locs->in(j).policy() == Location::kAny);
+               pair->At(0).policy() == Location::kAny);
         ASSERT(!pair->At(1).IsUnallocated() ||
-               locs->in(j).policy() == Location::kAny);
+               pair->At(1).policy() == Location::kAny);
       } else {
         ASSERT(!locs->in(j).IsUnallocated() ||
                locs->in(j).policy() == Location::kAny);
diff --git a/runtime/vm/compiler/backend/locations.h b/runtime/vm/compiler/backend/locations.h
index d1e6f00..a14d8a0 100644
--- a/runtime/vm/compiler/backend/locations.h
+++ b/runtime/vm/compiler/backend/locations.h
@@ -34,6 +34,17 @@
   kNumRepresentations
 };
 
+// 'UnboxedFfiIntPtr' should be able to hold a pointer of the target word-size.
+// On a 32-bit platform, it's an unsigned 32-bit int because it should be
+// zero-extended to 64-bits, not sign-extended (pointers are inherently
+// unsigned).
+//
+// Issue(36370): Use [kUnboxedIntPtr] instead.
+static constexpr Representation kUnboxedFfiIntPtr =
+    compiler::target::kWordSize == 4 ? kUnboxedUint32 : kUnboxedInt64;
+
+// The representation which can be used for native pointers. We use signed 32/64
+// bit representation to be able to do arithmetic on pointers.
 static constexpr Representation kUnboxedIntPtr =
     compiler::target::kWordSize == 4 ? kUnboxedInt32 : kUnboxedInt64;
 
@@ -342,8 +353,8 @@
 
   bool IsStackSlot() const { return kind() == kStackSlot; }
 
-  static Location DoubleStackSlot(intptr_t stack_index) {
-    uword payload = StackSlotBaseField::encode(FPREG) |
+  static Location DoubleStackSlot(intptr_t stack_index, Register base = FPREG) {
+    uword payload = StackSlotBaseField::encode(base) |
                     StackIndexField::encode(EncodeStackIndex(stack_index));
     Location loc(kDoubleStackSlot, payload);
     // Ensure that sign is preserved.
@@ -642,8 +653,16 @@
     ASSERT(index < num_inputs_);
     // See FlowGraphAllocator::ProcessOneInstruction for explanation of this
     // restriction.
-    ASSERT(!always_calls() || loc.IsMachineRegister() ||
-           (loc.IsUnallocated() && loc.policy() == Location::kAny));
+    if (always_calls()) {
+      if (loc.IsUnallocated()) {
+        ASSERT(loc.policy() == Location::kAny);
+      } else if (loc.IsPairLocation()) {
+        ASSERT(!loc.AsPairLocation()->At(0).IsUnallocated() ||
+               loc.AsPairLocation()->At(0).policy() == Location::kAny);
+        ASSERT(!loc.AsPairLocation()->At(0).IsUnallocated() ||
+               loc.AsPairLocation()->At(0).policy() == Location::kAny);
+      }
+    }
     input_locations_[index] = loc;
   }
 
diff --git a/runtime/vm/compiler/backend/loops.cc b/runtime/vm/compiler/backend/loops.cc
index f307a21..a641557 100644
--- a/runtime/vm/compiler/backend/loops.cc
+++ b/runtime/vm/compiler/backend/loops.cc
@@ -132,22 +132,6 @@
   return false;
 }
 
-// Helper method to trace back to original true definition, now
-// also ignoring constraints and (un)boxing operations, since
-// these are not relevant to the induction behavior.
-static Definition* OriginalDefinition(Definition* def) {
-  while (true) {
-    Definition* orig;
-    if (def->IsConstraint() || def->IsBox() || def->IsUnbox()) {
-      orig = def->InputAt(0)->definition();
-    } else {
-      orig = def->OriginalDefinition();
-    }
-    if (orig == def) return def;
-    def = orig;
-  }
-}
-
 void InductionVarAnalysis::VisitHierarchy(LoopInfo* loop) {
   for (; loop != nullptr; loop = loop->next_) {
     VisitLoop(loop);
@@ -273,7 +257,7 @@
   } else if (def->IsUnaryIntegerOp()) {
     induc = TransferUnary(loop, def);
   } else {
-    Definition* orig = OriginalDefinition(def);
+    Definition* orig = def->OriginalDefinitionIgnoreBoxingAndConstraints();
     if (orig != def) {
       induc = Lookup(loop, orig);  // pass-through
     }
@@ -316,7 +300,7 @@
       } else if (def->IsConstraint()) {
         update = SolveConstraint(loop, def, init);
       } else {
-        Definition* orig = OriginalDefinition(def);
+        Definition* orig = def->OriginalDefinitionIgnoreBoxingAndConstraints();
         if (orig != def) {
           update = LookupCycle(orig);  // pass-through
         }
@@ -370,10 +354,14 @@
     // Comparison against linear constant stride induction?
     // Express the comparison such that induction appears left.
     int64_t stride = 0;
-    InductionVar* x =
-        Lookup(loop, OriginalDefinition(compare->left()->definition()));
-    InductionVar* y =
-        Lookup(loop, OriginalDefinition(compare->right()->definition()));
+    auto left = compare->left()
+                    ->definition()
+                    ->OriginalDefinitionIgnoreBoxingAndConstraints();
+    auto right = compare->right()
+                     ->definition()
+                     ->OriginalDefinitionIgnoreBoxingAndConstraints();
+    InductionVar* x = Lookup(loop, left);
+    InductionVar* y = Lookup(loop, right);
     if (InductionVar::IsLinear(x, &stride) && InductionVar::IsInvariant(y)) {
       // ok as is
     } else if (InductionVar::IsInvariant(x) &&
diff --git a/runtime/vm/compiler/backend/range_analysis.cc b/runtime/vm/compiler/backend/range_analysis.cc
index 755ff5e..e06cd75 100644
--- a/runtime/vm/compiler/backend/range_analysis.cc
+++ b/runtime/vm/compiler/backend/range_analysis.cc
@@ -1321,11 +1321,12 @@
 
     for (intptr_t i = 0; i < bounds_checks_.length(); i++) {
       // Is this a non-speculative check bound?
-      GenericCheckBoundInstr* aot_check =
-          bounds_checks_[i]->AsGenericCheckBound();
+      auto aot_check = bounds_checks_[i]->AsGenericCheckBound();
       if (aot_check != nullptr) {
-        RangeBoundary array_length =
-            RangeBoundary::FromDefinition(aot_check->length()->definition());
+        auto length = aot_check->length()
+                          ->definition()
+                          ->OriginalDefinitionIgnoreBoxingAndConstraints();
+        auto array_length = RangeBoundary::FromDefinition(length);
         if (aot_check->IsRedundant(array_length)) {
           aot_check->ReplaceUsesWith(aot_check->index()->definition());
           aot_check->RemoveFromGraph();
@@ -2328,6 +2329,31 @@
   *result_max = RangeBoundary::PositiveInfinity();
 }
 
+void Range::TruncDiv(const Range* left_range,
+                     const Range* right_range,
+                     RangeBoundary* result_min,
+                     RangeBoundary* result_max) {
+  ASSERT(left_range != nullptr);
+  ASSERT(right_range != nullptr);
+  ASSERT(result_min != nullptr);
+  ASSERT(result_max != nullptr);
+
+  if (left_range->OnlyGreaterThanOrEqualTo(0) &&
+      right_range->OnlyGreaterThanOrEqualTo(1)) {
+    const int64_t left_max = ConstantAbsMax(left_range);
+    const int64_t left_min = ConstantAbsMin(left_range);
+    const int64_t right_max = ConstantAbsMax(right_range);
+    const int64_t right_min = ConstantAbsMin(right_range);
+
+    *result_max = RangeBoundary::FromConstant(left_max / right_min);
+    *result_min = RangeBoundary::FromConstant(left_min / right_max);
+    return;
+  }
+
+  *result_min = RangeBoundary::NegativeInfinity();
+  *result_max = RangeBoundary::PositiveInfinity();
+}
+
 // Both the a and b ranges are >= 0.
 bool Range::OnlyPositiveOrZero(const Range& a, const Range& b) {
   return a.OnlyGreaterThanOrEqualTo(0) && b.OnlyGreaterThanOrEqualTo(0);
@@ -2391,6 +2417,10 @@
       Range::Mul(left_range, right_range, &min, &max);
       break;
 
+    case Token::kTRUNCDIV:
+      Range::TruncDiv(left_range, right_range, &min, &max);
+      break;
+
     case Token::kSHL:
       Range::Shl(left_range, right_range, &min, &max);
       break;
@@ -2604,8 +2634,7 @@
                      RangeBoundary::FromConstant(Array::kMaxElements));
       break;
 
-    case Slot::Kind::kTypedData_length:
-    case Slot::Kind::kTypedDataView_length:
+    case Slot::Kind::kTypedDataBase_length:
     case Slot::Kind::kTypedDataView_offset_in_bytes:
       *range = Range(RangeBoundary::FromConstant(0), RangeBoundary::MaxSmi());
       break;
@@ -2632,6 +2661,7 @@
     case Slot::Kind::kClosure_function_type_arguments:
     case Slot::Kind::kClosure_instantiator_type_arguments:
     case Slot::Kind::kPointer_c_memory_address:
+    case Slot::Kind::kTypedDataBase_data_field:
     case Slot::Kind::kTypedDataView_data:
       // Not an integer valued field.
       UNREACHABLE();
@@ -2870,12 +2900,17 @@
   }
 }
 
-void UnboxedIntConverterInstr::InferRange(RangeAnalysis* analysis,
-                                          Range* range) {
-  ASSERT((from() == kUnboxedInt32) || (from() == kUnboxedInt64) ||
-         (from() == kUnboxedUint32));
-  ASSERT((to() == kUnboxedInt32) || (to() == kUnboxedInt64) ||
-         (to() == kUnboxedUint32));
+void IntConverterInstr::InferRange(RangeAnalysis* analysis, Range* range) {
+  if (from() == kUntagged || to() == kUntagged) {
+    ASSERT((from() == kUntagged && to() == kUnboxedIntPtr) ||
+           (from() == kUnboxedIntPtr && to() == kUntagged));
+  } else {
+    ASSERT(from() == kUnboxedInt32 || from() == kUnboxedInt64 ||
+           from() == kUnboxedUint32);
+    ASSERT(to() == kUnboxedInt32 || to() == kUnboxedInt64 ||
+           to() == kUnboxedUint32);
+  }
+
   const Range* value_range = value()->definition()->range();
   if (Range::IsUnknown(value_range)) {
     return;
diff --git a/runtime/vm/compiler/backend/range_analysis.h b/runtime/vm/compiler/backend/range_analysis.h
index 24adeed..8a8ca4b 100644
--- a/runtime/vm/compiler/backend/range_analysis.h
+++ b/runtime/vm/compiler/backend/range_analysis.h
@@ -436,6 +436,12 @@
                   const Range* right_range,
                   RangeBoundary* min,
                   RangeBoundary* max);
+
+  static void TruncDiv(const Range* left_range,
+                       const Range* right_range,
+                       RangeBoundary* min,
+                       RangeBoundary* max);
+
   static void Shr(const Range* left_range,
                   const Range* right_range,
                   RangeBoundary* min,
diff --git a/runtime/vm/compiler/backend/redundancy_elimination.cc b/runtime/vm/compiler/backend/redundancy_elimination.cc
index 6f39110..abb9f5a 100644
--- a/runtime/vm/compiler/backend/redundancy_elimination.cc
+++ b/runtime/vm/compiler/backend/redundancy_elimination.cc
@@ -3176,18 +3176,270 @@
   }
 }
 
-void TryCatchAnalyzer::Optimize(FlowGraph* flow_graph) {
+// TryCatchAnalyzer tries to reduce the state that needs to be synchronized
+// on entry to the catch by discovering Parameter-s which are never used
+// or which are always constant.
+//
+// This analysis is similar to dead/redundant phi elimination because
+// Parameter instructions serve as "implicit" phis.
+//
+// Caveat: when analyzing which Parameter-s are redundant we limit ourselves to
+// constant values because CatchBlockEntry-s are hanging out directly from
+// GraphEntry and thus they are only dominated by constants from GraphEntry -
+// thus we can't replace Parameter with arbitrary Definition which is not a
+// Constant even if we know that this Parameter is redundant and would always
+// evaluate to that Definition.
+class TryCatchAnalyzer : public ValueObject {
+ public:
+  explicit TryCatchAnalyzer(FlowGraph* flow_graph, bool is_aot)
+      : flow_graph_(flow_graph),
+        is_aot_(is_aot),
+        // Initial capacity is selected based on trivial examples.
+        worklist_(flow_graph, /*initial_capacity=*/10) {}
+
+  // Run analysis and eliminate dead/redundant Parameter-s.
+  void Optimize();
+
+ private:
+  // In precompiled mode we can eliminate all parameters that have no real uses
+  // and subsequently clear out corresponding slots in the environments assigned
+  // to instructions that can throw an exception which would be caught by
+  // the corresponding CatchEntryBlock.
+  //
+  // Computing "dead" parameters is essentially a fixed point algorithm because
+  // Parameter value can flow into another Parameter via an environment attached
+  // to an instruction that can throw.
+  //
+  // Note: this optimization pass assumes that environment values are only
+  // used during catching, that is why it should only be used in AOT mode.
+  void OptimizeDeadParameters() {
+    ASSERT(is_aot_);
+
+    NumberCatchEntryParameters();
+    ComputeIncommingValues();
+    CollectAliveParametersOrPhis();
+    PropagateLivenessToInputs();
+    EliminateDeadParameters();
+  }
+
+  // Assign sequential ids to each ParameterInstr in each CatchEntryBlock.
+  // Collect reverse mapping from try indexes to corresponding catches.
+  void NumberCatchEntryParameters() {
+    for (auto catch_entry : flow_graph_->graph_entry()->catch_entries()) {
+      const GrowableArray<Definition*>& idefs =
+          *catch_entry->initial_definitions();
+      for (auto idef : idefs) {
+        if (idef->IsParameter()) {
+          idef->set_place_id(parameter_info_.length());
+          parameter_info_.Add(new ParameterInfo(idef->AsParameter()));
+        }
+      }
+
+      catch_by_index_.EnsureLength(catch_entry->catch_try_index() + 1, nullptr);
+      catch_by_index_[catch_entry->catch_try_index()] = catch_entry;
+    }
+  }
+
+  // Compute potential incoming values for each Parameter in each catch block
+  // by looking into environments assigned to MayThrow instructions within
+  // blocks covered by the corresponding catch.
+  void ComputeIncommingValues() {
+    for (auto block : flow_graph_->reverse_postorder()) {
+      if (block->try_index() == -1) continue;
+
+      auto catch_entry = catch_by_index_[block->try_index()];
+      const auto& idefs = *catch_entry->initial_definitions();
+
+      for (ForwardInstructionIterator instr_it(block); !instr_it.Done();
+           instr_it.Advance()) {
+        Instruction* current = instr_it.Current();
+        if (!current->MayThrow()) continue;
+
+        Environment* env = current->env()->Outermost();
+        ASSERT(env != nullptr);
+
+        for (intptr_t env_idx = 0; env_idx < idefs.length(); ++env_idx) {
+          if (ParameterInstr* param = idefs[env_idx]->AsParameter()) {
+            Definition* defn = env->ValueAt(env_idx)->definition();
+
+            // Add defn as an incoming value to the parameter if it is not
+            // already present in the list.
+            bool found = false;
+            for (auto other_defn :
+                 parameter_info_[param->place_id()]->incoming) {
+              if (other_defn == defn) {
+                found = true;
+                break;
+              }
+            }
+            if (!found) {
+              parameter_info_[param->place_id()]->incoming.Add(defn);
+            }
+          }
+        }
+      }
+    }
+  }
+
+  // Find all parameters (and phis) that are definitely alive - because they
+  // have non-phi uses and place them into worklist.
+  //
+  // Note: phis that only have phi (and environment) uses would be marked as
+  // dead.
+  void CollectAliveParametersOrPhis() {
+    for (auto block : flow_graph_->reverse_postorder()) {
+      if (JoinEntryInstr* join = block->AsJoinEntry()) {
+        if (join->phis() == nullptr) continue;
+
+        for (auto phi : *join->phis()) {
+          phi->mark_dead();
+          if (HasNonPhiUse(phi)) {
+            MarkLive(phi);
+          }
+        }
+      }
+    }
+
+    for (auto info : parameter_info_) {
+      if (HasNonPhiUse(info->instr)) {
+        MarkLive(info->instr);
+      }
+    }
+  }
+
+  // Propagate liveness from live parameters and phis to other parameters and
+  // phis transitively.
+  void PropagateLivenessToInputs() {
+    while (!worklist_.IsEmpty()) {
+      Definition* defn = worklist_.RemoveLast();
+      if (ParameterInstr* param = defn->AsParameter()) {
+        auto s = parameter_info_[param->place_id()];
+        for (auto input : s->incoming) {
+          MarkLive(input);
+        }
+      } else if (PhiInstr* phi = defn->AsPhi()) {
+        for (intptr_t i = 0; i < phi->InputCount(); i++) {
+          MarkLive(phi->InputAt(i)->definition());
+        }
+      }
+    }
+  }
+
+  // Mark definition as live if it is a dead Phi or a dead Parameter and place
+  // them into worklist.
+  void MarkLive(Definition* defn) {
+    if (PhiInstr* phi = defn->AsPhi()) {
+      if (!phi->is_alive()) {
+        phi->mark_alive();
+        worklist_.Add(phi);
+      }
+    } else if (ParameterInstr* param = defn->AsParameter()) {
+      if (param->place_id() != -1) {
+        auto input_s = parameter_info_[param->place_id()];
+        if (!input_s->alive) {
+          input_s->alive = true;
+          worklist_.Add(param);
+        }
+      }
+    }
+  }
+
+  // Replace all dead parameters with null value and clear corresponding
+  // slots in environments.
+  void EliminateDeadParameters() {
+    for (auto info : parameter_info_) {
+      if (!info->alive) {
+        info->instr->ReplaceUsesWith(flow_graph_->constant_null());
+      }
+    }
+
+    for (auto block : flow_graph_->reverse_postorder()) {
+      if (block->try_index() == -1) continue;
+
+      auto catch_entry = catch_by_index_[block->try_index()];
+      const auto& idefs = *catch_entry->initial_definitions();
+
+      for (ForwardInstructionIterator instr_it(block); !instr_it.Done();
+           instr_it.Advance()) {
+        Instruction* current = instr_it.Current();
+        if (!current->MayThrow()) continue;
+
+        Environment* env = current->env()->Outermost();
+        RELEASE_ASSERT(env != nullptr);
+
+        for (intptr_t env_idx = 0; env_idx < idefs.length(); ++env_idx) {
+          if (ParameterInstr* param = idefs[env_idx]->AsParameter()) {
+            if (!parameter_info_[param->place_id()]->alive) {
+              env->ValueAt(env_idx)->BindToEnvironment(
+                  flow_graph_->constant_null());
+            }
+          }
+        }
+      }
+    }
+
+    DeadCodeElimination::RemoveDeadAndRedundantPhisFromTheGraph(flow_graph_);
+  }
+
+  // Returns true if definition has a use in an instruction which is not a phi.
+  static bool HasNonPhiUse(Definition* defn) {
+    for (Value* use = defn->input_use_list(); use != nullptr;
+         use = use->next_use()) {
+      if (!use->instruction()->IsPhi()) {
+        return true;
+      }
+    }
+    return false;
+  }
+
+  struct ParameterInfo : public ZoneAllocated {
+    explicit ParameterInfo(ParameterInstr* instr) : instr(instr) {}
+
+    ParameterInstr* instr;
+    bool alive = false;
+    GrowableArray<Definition*> incoming;
+  };
+
+  FlowGraph* const flow_graph_;
+  const bool is_aot_;
+
+  // Additional information for each Parameter from each CatchBlockEntry.
+  // Parameter-s are numbered and their number is stored in
+  // Instruction::place_id() field which is otherwise not used for anything
+  // at this stage.
+  GrowableArray<ParameterInfo*> parameter_info_;
+
+  // Mapping from catch_try_index to corresponding CatchBlockEntry-s.
+  GrowableArray<CatchBlockEntryInstr*> catch_by_index_;
+
+  // Worklist for live Phi and Parameter instructions which need to be
+  // processed by PropagateLivenessToInputs.
+  DefinitionWorklist worklist_;
+};
+
+void OptimizeCatchEntryStates(FlowGraph* flow_graph, bool is_aot) {
+  if (flow_graph->graph_entry()->catch_entries().is_empty()) {
+    return;
+  }
+
+  TryCatchAnalyzer analyzer(flow_graph, is_aot);
+  analyzer.Optimize();
+}
+
+void TryCatchAnalyzer::Optimize() {
+  // Analyze catch entries and remove "dead" Parameter instructions.
+  if (is_aot_) {
+    OptimizeDeadParameters();
+  }
+
   // For every catch-block: Iterate over all call instructions inside the
   // corresponding try-block and figure out for each environment value if it
   // is the same constant at all calls. If yes, replace the initial definition
   // at the catch-entry with this constant.
   const GrowableArray<CatchBlockEntryInstr*>& catch_entries =
-      flow_graph->graph_entry()->catch_entries();
+      flow_graph_->graph_entry()->catch_entries();
 
-  for (intptr_t catch_idx = 0; catch_idx < catch_entries.length();
-       ++catch_idx) {
-    CatchBlockEntryInstr* catch_entry = catch_entries[catch_idx];
-
+  for (auto catch_entry : catch_entries) {
     // Initialize cdefs with the original initial definitions (ParameterInstr).
     // The following representation is used:
     // ParameterInstr => unknown
@@ -3201,10 +3453,10 @@
     // generator functions they may be context-allocated in which case they are
     // not tracked in the environment anyway.
 
-    cdefs[flow_graph->EnvIndex(catch_entry->raw_exception_var())] = NULL;
-    cdefs[flow_graph->EnvIndex(catch_entry->raw_stacktrace_var())] = NULL;
+    cdefs[flow_graph_->EnvIndex(catch_entry->raw_exception_var())] = nullptr;
+    cdefs[flow_graph_->EnvIndex(catch_entry->raw_stacktrace_var())] = nullptr;
 
-    for (BlockIterator block_it = flow_graph->reverse_postorder_iterator();
+    for (BlockIterator block_it = flow_graph_->reverse_postorder_iterator();
          !block_it.Done(); block_it.Advance()) {
       BlockEntryInstr* block = block_it.Current();
       if (block->try_index() == catch_entry->catch_try_index()) {
@@ -3213,17 +3465,17 @@
           Instruction* current = instr_it.Current();
           if (current->MayThrow()) {
             Environment* env = current->env()->Outermost();
-            ASSERT(env != NULL);
+            ASSERT(env != nullptr);
             for (intptr_t env_idx = 0; env_idx < cdefs.length(); ++env_idx) {
-              if (cdefs[env_idx] != NULL && !cdefs[env_idx]->IsConstant() &&
+              if (cdefs[env_idx] != nullptr && !cdefs[env_idx]->IsConstant() &&
                   env->ValueAt(env_idx)->BindsToConstant()) {
                 // If the recorded definition is not a constant, record this
                 // definition as the current constant definition.
                 cdefs[env_idx] = env->ValueAt(env_idx)->definition();
               }
               if (cdefs[env_idx] != env->ValueAt(env_idx)->definition()) {
-                // Non-constant definitions are reset to NULL.
-                cdefs[env_idx] = NULL;
+                // Non-constant definitions are reset to nullptr.
+                cdefs[env_idx] = nullptr;
               }
             }
           }
@@ -3231,13 +3483,12 @@
       }
     }
     for (intptr_t j = 0; j < idefs->length(); ++j) {
-      if (cdefs[j] != NULL && cdefs[j]->IsConstant()) {
-        // TODO(fschneider): Use constants from the constant pool.
+      if (cdefs[j] != nullptr && cdefs[j]->IsConstant()) {
         Definition* old = (*idefs)[j];
         ConstantInstr* orig = cdefs[j]->AsConstant();
         ConstantInstr* copy =
-            new (flow_graph->zone()) ConstantInstr(orig->value());
-        copy->set_ssa_temp_index(flow_graph->alloc_ssa_temp_index());
+            new (flow_graph_->zone()) ConstantInstr(orig->value());
+        copy->set_ssa_temp_index(flow_graph_->alloc_ssa_temp_index());
         old->ReplaceUsesWith(copy);
         (*idefs)[j] = copy;
       }
@@ -3266,7 +3517,7 @@
         PhiInstr* phi = it.Current();
         // Phis that have uses and phis inside try blocks are
         // marked as live.
-        if (HasRealUse(phi) || join->InsideTryBlock()) {
+        if (HasRealUse(phi)) {
           live_phis.Add(phi);
           phi->mark_alive();
         } else {
@@ -3288,28 +3539,31 @@
     }
   }
 
-  for (BlockIterator it(flow_graph->postorder_iterator()); !it.Done();
-       it.Advance()) {
-    JoinEntryInstr* join = it.Current()->AsJoinEntry();
-    if (join != NULL) {
-      if (join->phis_ == NULL) continue;
+  RemoveDeadAndRedundantPhisFromTheGraph(flow_graph);
+}
+
+void DeadCodeElimination::RemoveDeadAndRedundantPhisFromTheGraph(
+    FlowGraph* flow_graph) {
+  for (auto block : flow_graph->postorder()) {
+    if (JoinEntryInstr* join = block->AsJoinEntry()) {
+      if (join->phis_ == nullptr) continue;
 
       // Eliminate dead phis and compact the phis_ array of the block.
       intptr_t to_index = 0;
       for (intptr_t i = 0; i < join->phis_->length(); ++i) {
         PhiInstr* phi = (*join->phis_)[i];
-        if (phi != NULL) {
+        if (phi != nullptr) {
           if (!phi->is_alive()) {
             phi->ReplaceUsesWith(flow_graph->constant_null());
             phi->UnuseAllInputs();
-            (*join->phis_)[i] = NULL;
+            (*join->phis_)[i] = nullptr;
             if (FLAG_trace_optimization) {
               THR_Print("Removing dead phi v%" Pd "\n", phi->ssa_temp_index());
             }
           } else if (phi->IsRedundant()) {
             phi->ReplaceUsesWith(phi->InputAt(0)->definition());
             phi->UnuseAllInputs();
-            (*join->phis_)[i] = NULL;
+            (*join->phis_)[i] = nullptr;
             if (FLAG_trace_optimization) {
               THR_Print("Removing redundant phi v%" Pd "\n",
                         phi->ssa_temp_index());
@@ -3320,7 +3574,7 @@
         }
       }
       if (to_index == 0) {
-        join->phis_ = NULL;
+        join->phis_ = nullptr;
       } else {
         join->phis_->TruncateTo(to_index);
       }
diff --git a/runtime/vm/compiler/backend/redundancy_elimination.h b/runtime/vm/compiler/backend/redundancy_elimination.h
index f759073..6fb3438 100644
--- a/runtime/vm/compiler/backend/redundancy_elimination.h
+++ b/runtime/vm/compiler/backend/redundancy_elimination.h
@@ -100,15 +100,20 @@
 
 class DeadCodeElimination : public AllStatic {
  public:
+  // Discover phis that have no real (non-phi) uses and don't escape into
+  // deoptimization environments and eliminate them.
   static void EliminateDeadPhis(FlowGraph* graph);
+
+  // Remove phis that are not marked alive from the graph.
+  static void RemoveDeadAndRedundantPhisFromTheGraph(FlowGraph* graph);
 };
 
 // Optimize spill stores inside try-blocks by identifying values that always
 // contain a single known constant at catch block entry.
-class TryCatchAnalyzer : public AllStatic {
- public:
-  static void Optimize(FlowGraph* flow_graph);
-};
+// If is_aot is passed then this optimization can assume that no deoptimization
+// can occur and environments assigned to instructions are only used to
+// compute try/catch sync moves.
+void OptimizeCatchEntryStates(FlowGraph* flow_graph, bool is_aot);
 
 // Loop invariant code motion.
 class LICM : public ValueObject {
diff --git a/runtime/vm/compiler/backend/redundancy_elimination_test.cc b/runtime/vm/compiler/backend/redundancy_elimination_test.cc
new file mode 100644
index 0000000..dc9e015
--- /dev/null
+++ b/runtime/vm/compiler/backend/redundancy_elimination_test.cc
@@ -0,0 +1,231 @@
+// Copyright (c) 2018, the Dart project authors.  Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+#include "vm/compiler/backend/redundancy_elimination.h"
+#include "vm/compiler/backend/il_printer.h"
+#include "vm/compiler/backend/inliner.h"
+#include "vm/compiler/backend/loops.h"
+#include "vm/compiler/backend/type_propagator.h"
+#include "vm/compiler/compiler_pass.h"
+#include "vm/compiler/frontend/kernel_to_il.h"
+#include "vm/compiler/jit/jit_call_specializer.h"
+#include "vm/log.h"
+#include "vm/object.h"
+#include "vm/parser.h"
+#include "vm/symbols.h"
+#include "vm/unit_test.h"
+
+namespace dart {
+
+static void NoopNative(Dart_NativeArguments args) {}
+
+static Dart_NativeFunction NoopNativeLookup(Dart_Handle name,
+                                            int argument_count,
+                                            bool* auto_setup_scope) {
+  ASSERT(auto_setup_scope != nullptr);
+  *auto_setup_scope = false;
+  return reinterpret_cast<Dart_NativeFunction>(&NoopNative);
+}
+
+// Helper method to build CFG and run some preliminary optimizations on it.
+// TODO(vegorov) we should consider moving this function into utils to share
+// between all compiler tests.
+static FlowGraph* BuildOptimizedGraph(Thread* thread,
+                                      const char* script_chars) {
+  // Invoke the script.
+  Dart_Handle script =
+      TestCase::LoadTestScript(script_chars, &NoopNativeLookup);
+  Dart_Handle result = Dart_Invoke(script, NewString("main"), 0, nullptr);
+  EXPECT_VALID(result);
+
+  // Find parsed function "foo".
+  TransitionNativeToVM transition(thread);
+  Zone* zone = thread->zone();
+  Library& lib =
+      Library::ZoneHandle(Library::RawCast(Api::UnwrapHandle(script)));
+  RawFunction* raw_func =
+      lib.LookupLocalFunction(String::Handle(Symbols::New(thread, "foo")));
+  ParsedFunction* parsed_function =
+      new (zone) ParsedFunction(thread, Function::ZoneHandle(zone, raw_func));
+  EXPECT(parsed_function != nullptr);
+
+  // Build flow graph.
+  CompilerState state(thread);
+  ZoneGrowableArray<const ICData*>* ic_data_array =
+      new (zone) ZoneGrowableArray<const ICData*>();
+  parsed_function->function().RestoreICDataMap(ic_data_array, true);
+  kernel::FlowGraphBuilder builder(parsed_function, ic_data_array, nullptr,
+                                   nullptr, true, DeoptId::kNone);
+  FlowGraph* flow_graph = builder.BuildGraph();
+  EXPECT(flow_graph != nullptr);
+
+  // Setup some pass data structures and perform minimum passes.
+  SpeculativeInliningPolicy speculative_policy(/*enable_blacklist=*/false);
+  CompilerPassState pass_state(thread, flow_graph, &speculative_policy);
+  JitCallSpecializer call_specializer(flow_graph, &speculative_policy);
+  pass_state.call_specializer = &call_specializer;
+  flow_graph->ComputeSSA(0, nullptr);
+  FlowGraphTypePropagator::Propagate(flow_graph);
+  call_specializer.ApplyICData();
+  flow_graph->SelectRepresentations();
+  FlowGraphTypePropagator::Propagate(flow_graph);
+  flow_graph->Canonicalize();
+
+  return flow_graph;
+}
+
+// Flatten all non-captured LocalVariables from the given scope and its children
+// and siblings into the given array based on their environment index.
+static void FlattenScopeIntoEnvironment(FlowGraph* graph,
+                                        LocalScope* scope,
+                                        GrowableArray<LocalVariable*>* env) {
+  for (intptr_t i = 0; i < scope->num_variables(); i++) {
+    auto var = scope->VariableAt(i);
+    if (var->is_captured()) {
+      continue;
+    }
+
+    auto index = graph->EnvIndex(var);
+    env->EnsureLength(index + 1, nullptr);
+    (*env)[index] = var;
+  }
+
+  if (scope->sibling() != nullptr) {
+    FlattenScopeIntoEnvironment(graph, scope->sibling(), env);
+  }
+  if (scope->child() != nullptr) {
+    FlattenScopeIntoEnvironment(graph, scope->child(), env);
+  }
+}
+
+// Run TryCatchAnalyzer optimization on the function foo from the given script
+// and check that the only variables from the given list are synchronized
+// on catch entry.
+static void TryCatchOptimizerTest(
+    Thread* thread,
+    const char* script_chars,
+    std::initializer_list<const char*> synchronized) {
+  FlowGraph* graph = BuildOptimizedGraph(thread, script_chars);
+
+  // Finally run TryCatchAnalyzer on the graph (in AOT mode).
+  OptimizeCatchEntryStates(graph, /*is_aot=*/true);
+
+  EXPECT_EQ(1, graph->graph_entry()->catch_entries().length());
+
+  auto scope = graph->parsed_function().node_sequence()->scope();
+
+  GrowableArray<LocalVariable*> env;
+  FlattenScopeIntoEnvironment(graph, scope, &env);
+
+  for (intptr_t i = 0; i < env.length(); i++) {
+    bool found = false;
+    for (auto name : synchronized) {
+      if (env[i]->name().Equals(name)) {
+        found = true;
+        break;
+      }
+    }
+    if (!found) {
+      env[i] = nullptr;
+    }
+  }
+
+  CatchBlockEntryInstr* catch_entry = graph->graph_entry()->catch_entries()[0];
+
+  // We should only synchronize state for variables from the synchronized list.
+  for (auto defn : *catch_entry->initial_definitions()) {
+    if (ParameterInstr* param = defn->AsParameter()) {
+      EXPECT(0 <= param->index() && param->index() < env.length());
+      EXPECT(env[param->index()] != nullptr);
+    }
+  }
+}
+
+//
+// Tests for TryCatchOptimizer.
+//
+
+TEST_CASE(TryCatchOptimizer_DeadParameterElimination_Simple1) {
+  const char* script_chars = R"(
+      dynamic blackhole([dynamic val]) native 'BlackholeNative';
+      foo(int p) {
+        var a = blackhole(), b = blackhole();
+        try {
+          blackhole([a, b]);
+        } catch (e) {
+          // nothing is used
+        }
+      }
+      main() {
+        foo(42);
+      }
+  )";
+
+  TryCatchOptimizerTest(thread, script_chars, /*synchronized=*/{});
+}
+
+TEST_CASE(TryCatchOptimizer_DeadParameterElimination_Simple2) {
+  const char* script_chars = R"(
+      dynamic blackhole([dynamic val]) native 'BlackholeNative';
+      foo(int p) {
+        var a = blackhole(), b = blackhole();
+        try {
+          blackhole([a, b]);
+        } catch (e) {
+          // a should be synchronized
+          blackhole(a);
+        }
+      }
+      main() {
+        foo(42);
+      }
+  )";
+
+  TryCatchOptimizerTest(thread, script_chars, /*synchronized=*/{"a"});
+}
+
+TEST_CASE(TryCatchOptimizer_DeadParameterElimination_Cyclic1) {
+  const char* script_chars = R"(
+      dynamic blackhole([dynamic val]) native 'BlackholeNative';
+      foo(int p) {
+        var a = blackhole(), b;
+        for (var i = 0; i < 42; i++) {
+          b = blackhole();
+          try {
+            blackhole([a, b]);
+          } catch (e) {
+            // a and i should be synchronized
+          }
+        }
+      }
+      main() {
+        foo(42);
+      }
+  )";
+
+  TryCatchOptimizerTest(thread, script_chars, /*synchronized=*/{"a", "i"});
+}
+
+TEST_CASE(TryCatchOptimizer_DeadParameterElimination_Cyclic2) {
+  const char* script_chars = R"(
+      dynamic blackhole([dynamic val]) native 'BlackholeNative';
+      foo(int p) {
+        var a = blackhole(), b = blackhole();
+        for (var i = 0; i < 42; i++) {
+          try {
+            blackhole([a, b]);
+          } catch (e) {
+            // a, b and i should be synchronized
+          }
+        }
+      }
+      main() {
+        foo(42);
+      }
+  )";
+
+  TryCatchOptimizerTest(thread, script_chars, /*synchronized=*/{"a", "b", "i"});
+}
+
+}  // namespace dart
diff --git a/runtime/vm/compiler/backend/slot.cc b/runtime/vm/compiler/backend/slot.cc
index 695760d..df6904b 100644
--- a/runtime/vm/compiler/backend/slot.cc
+++ b/runtime/vm/compiler/backend/slot.cc
@@ -70,13 +70,10 @@
 // Note: should only be called with cids of array-like classes.
 const Slot& Slot::GetLengthFieldForArrayCid(intptr_t array_cid) {
   if (RawObject::IsExternalTypedDataClassId(array_cid) ||
-      RawObject::IsTypedDataClassId(array_cid)) {
-    return GetNativeSlot(Kind::kTypedData_length);
+      RawObject::IsTypedDataClassId(array_cid) ||
+      RawObject::IsTypedDataViewClassId(array_cid)) {
+    return GetNativeSlot(Kind::kTypedDataBase_length);
   }
-  if (RawObject::IsTypedDataViewClassId(array_cid)) {
-    return GetNativeSlot(Kind::kTypedDataView_length);
-  }
-
   switch (array_cid) {
     case kGrowableObjectArrayCid:
       return GetNativeSlot(Kind::kGrowableObjectArray_length);
diff --git a/runtime/vm/compiler/backend/slot.h b/runtime/vm/compiler/backend/slot.h
index fc82584..ef6a408 100644
--- a/runtime/vm/compiler/backend/slot.h
+++ b/runtime/vm/compiler/backend/slot.h
@@ -58,8 +58,8 @@
   V(Closure, hash, Context, VAR)                                               \
   V(GrowableObjectArray, length, Smi, VAR)                                     \
   V(GrowableObjectArray, data, Array, VAR)                                     \
-  V(TypedData, length, Smi, FINAL)                                             \
-  V(TypedDataView, length, Smi, FINAL)                                         \
+  V(TypedDataBase, data_field, Dynamic, FINAL)                                 \
+  V(TypedDataBase, length, Smi, FINAL)                                         \
   V(TypedDataView, offset_in_bytes, Smi, FINAL)                                \
   V(TypedDataView, data, Dynamic, FINAL)                                       \
   V(String, length, Smi, FINAL)                                                \
diff --git a/runtime/vm/compiler/call_specializer.cc b/runtime/vm/compiler/call_specializer.cc
index 51ac37f..d5a4c2d 100644
--- a/runtime/vm/compiler/call_specializer.cc
+++ b/runtime/vm/compiler/call_specializer.cc
@@ -1016,7 +1016,7 @@
     // Compute if we need to type check the value. Always type check if
     // not in strong mode or if at a dynamic invocation.
     bool needs_check = true;
-    if (!instr->interface_target().IsNull() && (field.kernel_offset() >= 0)) {
+    if (!instr->interface_target().IsNull()) {
       if (field.is_covariant()) {
         // Always type check covariant fields.
         needs_check = true;
diff --git a/runtime/vm/compiler/cha.cc b/runtime/vm/compiler/cha.cc
index 7856c72..53e2480 100644
--- a/runtime/vm/compiler/cha.cc
+++ b/runtime/vm/compiler/cha.cc
@@ -39,7 +39,7 @@
   // read-only.
   // TODO(fschneider): Enable tracking of CHA dependent code for VM heap
   // classes.
-  if (cls.IsReadOnly()) return true;
+  if (cls.InVMIsolateHeap()) return true;
 
   if (cls.IsObjectClass()) {
     // Class Object has subclasses, although we do not keep track of them.
@@ -58,7 +58,7 @@
 
 bool CHA::ConcreteSubclasses(const Class& cls,
                              GrowableArray<intptr_t>* class_ids) {
-  if (cls.IsReadOnly()) return false;
+  if (cls.InVMIsolateHeap()) return false;
   if (cls.IsObjectClass()) return false;
 
   if (!cls.is_abstract()) {
@@ -87,7 +87,7 @@
   // read-only.
   // TODO(fschneider): Enable tracking of CHA dependent code for VM heap
   // classes.
-  if (cls.IsReadOnly()) return true;
+  if (cls.InVMIsolateHeap()) return true;
 
   return cls.is_implemented();
 }
@@ -129,7 +129,7 @@
   // read-only.
   // TODO(fschneider): Enable tracking of CHA dependent code for VM heap
   // classes.
-  if (cls.IsReadOnly()) return true;
+  if (cls.InVMIsolateHeap()) return true;
 
   // Subclasses of Object are not tracked by CHA. Safely assume that overrides
   // exist.
diff --git a/runtime/vm/compiler/compiler_pass.cc b/runtime/vm/compiler/compiler_pass.cc
index 4befad9..9303066 100644
--- a/runtime/vm/compiler/compiler_pass.cc
+++ b/runtime/vm/compiler/compiler_pass.cc
@@ -363,8 +363,9 @@
   ConstantPropagator::OptimizeBranches(flow_graph);
 });
 
-COMPILER_PASS(TryCatchOptimization,
-              { TryCatchAnalyzer::Optimize(flow_graph); });
+COMPILER_PASS(TryCatchOptimization, {
+  OptimizeCatchEntryStates(flow_graph, /*is_aot=*/FLAG_precompiled_mode);
+});
 
 COMPILER_PASS(EliminateEnvironments, { flow_graph->EliminateEnvironments(); });
 
diff --git a/runtime/vm/compiler/compiler_sources.gni b/runtime/vm/compiler/compiler_sources.gni
index 3829445..ff5b6ed 100644
--- a/runtime/vm/compiler/compiler_sources.gni
+++ b/runtime/vm/compiler/compiler_sources.gni
@@ -100,6 +100,8 @@
   "frontend/bytecode_flow_graph_builder.h",
   "frontend/bytecode_reader.cc",
   "frontend/bytecode_reader.h",
+  "frontend/bytecode_scope_builder.cc",
+  "frontend/bytecode_scope_builder.h",
   "frontend/constant_evaluator.cc",
   "frontend/constant_evaluator.h",
   "frontend/flow_graph_builder.cc",
@@ -155,6 +157,7 @@
   "backend/locations_helpers_test.cc",
   "backend/loops_test.cc",
   "backend/range_analysis_test.cc",
+  "backend/redundancy_elimination_test.cc",
   "backend/slot_test.cc",
   "cha_test.cc",
 ]
diff --git a/runtime/vm/compiler/ffi.cc b/runtime/vm/compiler/ffi.cc
index 375dc5d..d63e1f7 100644
--- a/runtime/vm/compiler/ffi.cc
+++ b/runtime/vm/compiler/ffi.cc
@@ -3,6 +3,7 @@
 // BSD-style license that can be found in the LICENSE file.
 
 #include "vm/compiler/ffi.h"
+#include "vm/compiler/runtime_api.h"
 
 namespace dart {
 
@@ -10,7 +11,8 @@
 
 namespace ffi {
 
-#if defined(TARGET_ARCH_X64)
+#if defined(TARGET_ARCH_X64) || defined(TARGET_ARCH_ARM64) ||                  \
+    defined(TARGET_ARCH_IA32)
 
 static const size_t kSizeUnknown = 0;
 
@@ -44,6 +46,8 @@
   return element_size_table[index];
 }
 
+#if !defined(DART_PRECOMPILED_RUNTIME)
+
 Representation TypeRepresentation(const AbstractType& result_type) {
   switch (result_type.type_class_id()) {
     case kFfiFloatCid:
@@ -64,7 +68,7 @@
     case kFfiIntPtrCid:
     case kFfiPointerCid:
     default:  // Subtypes of Pointer.
-      return kUnboxedIntPtr;
+      return kUnboxedFfiIntPtr;
   }
 }
 
@@ -107,54 +111,81 @@
   return result;
 }
 
+// Represents the state of a stack frame going into a call, between allocations
+// of argument locations. Acts like a register allocator but for arguments in
+// the native ABI.
+class ArgumentFrameState : public ValueObject {
+ public:
+  Location AllocateArgument(Representation rep) {
+    switch (rep) {
+      case kUnboxedInt64:
+      case kUnboxedUint32:
+      case kUnboxedInt32:
+        if (rep == kUnboxedInt64) {
+          ASSERT(compiler::target::kWordSize == 8);
+        }
+        if (cpu_regs_used < CallingConventions::kNumArgRegs) {
+          Location result = Location::RegisterLocation(
+              CallingConventions::ArgumentRegisters[cpu_regs_used]);
+          cpu_regs_used++;
+          if (CallingConventions::kArgumentIntRegXorFpuReg) {
+            fpu_regs_used++;
+          }
+          return result;
+        }
+        break;
+      case kUnboxedFloat:
+      case kUnboxedDouble:
+        if (fpu_regs_used < CallingConventions::kNumFpuArgRegs) {
+          Location result = Location::FpuRegisterLocation(
+              CallingConventions::FpuArgumentRegisters[fpu_regs_used]);
+          fpu_regs_used++;
+          if (CallingConventions::kArgumentIntRegXorFpuReg) {
+            cpu_regs_used++;
+          }
+          return result;
+        }
+        break;
+      default:
+        UNREACHABLE();
+    }
+
+    // Argument must be spilled.
+    const intptr_t stack_slots_needed =
+        rep == kUnboxedDouble || rep == kUnboxedInt64
+            ? 8 / compiler::target::kWordSize
+            : 1;
+    Location result =
+        stack_slots_needed == 1
+            ? Location::StackSlot(stack_height_in_slots, SPREG)
+            : Location::DoubleStackSlot(stack_height_in_slots, SPREG);
+    stack_height_in_slots += stack_slots_needed;
+    return result;
+  }
+
+  intptr_t cpu_regs_used = 0;
+  intptr_t fpu_regs_used = 0;
+  intptr_t stack_height_in_slots = 0;
+};
+
 // Takes a list of argument representations, and converts it to a list of
 // argument locations based on calling convention.
 ZoneGrowableArray<Location>* ArgumentLocations(
     const ZoneGrowableArray<Representation>& arg_reps) {
   intptr_t num_arguments = arg_reps.length();
   auto result = new ZoneGrowableArray<Location>(num_arguments);
-  result->FillWith(Location(), 0, num_arguments);
-  Location* data = result->data();
 
   // Loop through all arguments and assign a register or a stack location.
-  intptr_t regs_used = 0;
-  intptr_t xmm_regs_used = 0;
-  intptr_t nth_stack_argument = 0;
-  bool on_stack;
+  ArgumentFrameState frame_state;
   for (intptr_t i = 0; i < num_arguments; i++) {
-    on_stack = true;
-    switch (arg_reps.At(i)) {
-      case kUnboxedInt32:
-      case kUnboxedUint32:
-      case kUnboxedInt64:
-        if (regs_used < CallingConventions::kNumArgRegs) {
-          data[i] = Location::RegisterLocation(
-              CallingConventions::ArgumentRegisters[regs_used]);
-          regs_used++;
-          if (CallingConventions::kArgumentIntRegXorXmmReg) {
-            xmm_regs_used++;
-          }
-          on_stack = false;
-        }
-        break;
-      case kUnboxedFloat:
-      case kUnboxedDouble:
-        if (xmm_regs_used < CallingConventions::kNumXmmArgRegs) {
-          data[i] = Location::FpuRegisterLocation(
-              CallingConventions::XmmArgumentRegisters[xmm_regs_used]);
-          xmm_regs_used++;
-          if (CallingConventions::kArgumentIntRegXorXmmReg) {
-            regs_used++;
-          }
-          on_stack = false;
-        }
-        break;
-      default:
-        UNREACHABLE();
-    }
-    if (on_stack) {
-      data[i] = Location::StackSlot(nth_stack_argument, RSP);
-      nth_stack_argument++;
+    Representation rep = arg_reps[i];
+    if (rep == kUnboxedInt64 && compiler::target::kWordSize < 8) {
+      Location low_bits_loc = frame_state.AllocateArgument(kUnboxedInt32);
+      Location high_bits_loc = frame_state.AllocateArgument(kUnboxedInt32);
+      ASSERT(low_bits_loc.IsStackSlot() == high_bits_loc.IsStackSlot());
+      result->Add(Location::Pair(low_bits_loc, high_bits_loc));
+    } else {
+      result->Add(frame_state.AllocateArgument(rep));
     }
   }
   return result;
@@ -169,34 +200,56 @@
   switch (result_rep) {
     case kUnboxedInt32:
     case kUnboxedUint32:
-    case kUnboxedInt64:
       return Location::RegisterLocation(CallingConventions::kReturnReg);
+    case kUnboxedInt64:
+      if (compiler::target::kWordSize == 4) {
+        return Location::Pair(
+            Location::RegisterLocation(CallingConventions::kReturnReg),
+            Location::RegisterLocation(CallingConventions::kSecondReturnReg));
+      } else {
+        return Location::RegisterLocation(CallingConventions::kReturnReg);
+      }
     case kUnboxedFloat:
     case kUnboxedDouble:
+#if defined(TARGET_ARCH_IA32)
+      // The result is returned in ST0, but we don't allocate ST registers, so
+      // the FFI trampoline will move it to XMM0.
+      return Location::FpuRegisterLocation(XMM0);
+#else
       return Location::FpuRegisterLocation(CallingConventions::kReturnFpuReg);
+#endif
     default:
       UNREACHABLE();
   }
 }
 
-intptr_t NumStackArguments(const ZoneGrowableArray<Location>& locations) {
+intptr_t NumStackSlots(const ZoneGrowableArray<Location>& locations) {
   intptr_t num_arguments = locations.length();
-  intptr_t num_stack_arguments = 0;
+  intptr_t num_stack_slots = 0;
   for (intptr_t i = 0; i < num_arguments; i++) {
     if (locations.At(i).IsStackSlot()) {
-      num_stack_arguments++;
+      num_stack_slots++;
+    } else if (locations.At(i).IsDoubleStackSlot()) {
+      num_stack_slots += 8 / compiler::target::kWordSize;
+    } else if (locations.At(i).IsPairLocation()) {
+      num_stack_slots +=
+          locations.At(i).AsPairLocation()->At(0).IsStackSlot() ? 1 : 0;
+      num_stack_slots +=
+          locations.At(i).AsPairLocation()->At(1).IsStackSlot() ? 1 : 0;
     }
   }
-  return num_stack_arguments;
+  return num_stack_slots;
 }
 
+#endif  // !defined(DART_PRECOMPILED_RUNTIME)
+
 #else
 
 size_t ElementSizeInBytes(intptr_t class_id) {
   UNREACHABLE();
 }
 
-#endif
+#endif  // defined(TARGET_ARCH_X64) || defined(TARGET_ARCH_IA32)
 
 }  // namespace ffi
 
diff --git a/runtime/vm/compiler/ffi.h b/runtime/vm/compiler/ffi.h
index e3eca6f..efed0cc 100644
--- a/runtime/vm/compiler/ffi.h
+++ b/runtime/vm/compiler/ffi.h
@@ -18,6 +18,10 @@
 
 namespace ffi {
 
+// On all supported platforms, the minimum width an argument must be sign- or
+// zero-extended to is 4 bytes.
+constexpr intptr_t kMinimumArgumentWidth = 4;
+
 // Storage size for an FFI type (extends 'ffi.NativeType').
 size_t ElementSizeInBytes(intptr_t class_id);
 
@@ -45,7 +49,7 @@
     const ZoneGrowableArray<Representation>& arg_reps);
 
 // Number of stack slots used in 'locations'.
-intptr_t NumStackArguments(const ZoneGrowableArray<Location>& locations);
+intptr_t NumStackSlots(const ZoneGrowableArray<Location>& locations);
 
 }  // namespace ffi
 
diff --git a/runtime/vm/compiler/frontend/base_flow_graph_builder.cc b/runtime/vm/compiler/frontend/base_flow_graph_builder.cc
index d134dc1..c6df1ea 100644
--- a/runtime/vm/compiler/frontend/base_flow_graph_builder.cc
+++ b/runtime/vm/compiler/frontend/base_flow_graph_builder.cc
@@ -6,6 +6,7 @@
 
 #include "vm/compiler/frontend/flow_graph_builder.h"  // For InlineExitCollector.
 #include "vm/compiler/jit/compiler.h"  // For Compiler::IsBackgroundCompilation().
+#include "vm/compiler/runtime_api.h"
 
 #if !defined(DART_PRECOMPILED_RUNTIME)
 
@@ -193,6 +194,17 @@
       new (Z) CheckStackOverflowInstr(position, loop_depth, GetNextDeoptId()));
 }
 
+Fragment BaseFlowGraphBuilder::CheckStackOverflowInPrologue(
+    TokenPosition position) {
+  if (IsInlining()) {
+    // If we are inlining don't actually attach the stack check.  We must still
+    // create the stack check in order to allocate a deopt id.
+    CheckStackOverflow(position, 0);
+    return Fragment();
+  }
+  return CheckStackOverflow(position, 0);
+}
+
 Fragment BaseFlowGraphBuilder::Constant(const Object& value) {
   ASSERT(value.IsNotTemporaryScopedHandle());
   ConstantInstr* constant = new (Z) ConstantInstr(value);
@@ -312,6 +324,62 @@
   return Fragment(instr);
 }
 
+Fragment BaseFlowGraphBuilder::LoadUntagged(intptr_t offset) {
+  Value* object = Pop();
+  auto load = new (Z) LoadUntaggedInstr(object, offset);
+  Push(load);
+  return Fragment(load);
+}
+
+Fragment BaseFlowGraphBuilder::StoreUntagged(intptr_t offset) {
+  Value* value = Pop();
+  Value* object = Pop();
+  auto store = new (Z) StoreUntaggedInstr(object, value, offset);
+  return Fragment(store);
+}
+
+Fragment BaseFlowGraphBuilder::ConvertUntaggedToIntptr() {
+  Value* value = Pop();
+  auto converted = new (Z)
+      IntConverterInstr(kUntagged, kUnboxedIntPtr, value, DeoptId::kNone);
+  converted->mark_truncating();
+  Push(converted);
+  return Fragment(converted);
+}
+
+Fragment BaseFlowGraphBuilder::ConvertIntptrToUntagged() {
+  Value* value = Pop();
+  auto converted = new (Z)
+      IntConverterInstr(kUnboxedIntPtr, kUntagged, value, DeoptId::kNone);
+  converted->mark_truncating();
+  Push(converted);
+  return Fragment(converted);
+}
+
+Fragment BaseFlowGraphBuilder::AddIntptrIntegers() {
+  Value* right = Pop();
+  Value* left = Pop();
+#if defined(TARGET_ARCH_ARM64) || defined(TARGET_ARCH_X64)
+  auto add = new (Z) BinaryInt64OpInstr(
+      Token::kADD, left, right, DeoptId::kNone, Instruction::kNotSpeculative);
+#else
+  auto add =
+      new (Z) BinaryInt32OpInstr(Token::kADD, left, right, DeoptId::kNone);
+#endif
+  add->mark_truncating();
+  Push(add);
+  return Fragment(add);
+}
+
+Fragment BaseFlowGraphBuilder::UnboxSmiToIntptr() {
+  Value* value = Pop();
+  auto untagged = new (Z)
+      UnboxIntegerInstr(kUnboxedIntPtr, UnboxIntegerInstr::kNoTruncation, value,
+                        DeoptId::kNone, Instruction::kNotSpeculative);
+  Push(untagged);
+  return Fragment(untagged);
+}
+
 Fragment BaseFlowGraphBuilder::LoadField(const Field& field) {
   return LoadNativeField(Slot::Get(MayCloneField(field), parsed_function_));
 }
diff --git a/runtime/vm/compiler/frontend/base_flow_graph_builder.h b/runtime/vm/compiler/frontend/base_flow_graph_builder.h
index fa4ff07..21fb118 100644
--- a/runtime/vm/compiler/frontend/base_flow_graph_builder.h
+++ b/runtime/vm/compiler/frontend/base_flow_graph_builder.h
@@ -136,6 +136,14 @@
   Fragment LoadNativeField(const Slot& native_field);
   Fragment LoadIndexed(intptr_t index_scale);
 
+  Fragment LoadUntagged(intptr_t offset);
+  Fragment StoreUntagged(intptr_t offset);
+  Fragment ConvertUntaggedToIntptr();
+  Fragment ConvertIntptrToUntagged();
+  Fragment UnboxSmiToIntptr();
+
+  Fragment AddIntptrIntegers();
+
   void SetTempIndex(Definition* definition);
 
   Fragment LoadLocal(LocalVariable* variable);
@@ -219,6 +227,7 @@
                                TargetEntryInstr** otherwise_entry);
   Fragment Return(TokenPosition position);
   Fragment CheckStackOverflow(TokenPosition position, intptr_t loop_depth);
+  Fragment CheckStackOverflowInPrologue(TokenPosition position);
   Fragment ThrowException(TokenPosition position);
   Fragment TailCall(const Code& code);
 
diff --git a/runtime/vm/compiler/frontend/bytecode_flow_graph_builder.cc b/runtime/vm/compiler/frontend/bytecode_flow_graph_builder.cc
index f5f3c3a..ca0eb36 100644
--- a/runtime/vm/compiler/frontend/bytecode_flow_graph_builder.cc
+++ b/runtime/vm/compiler/frontend/bytecode_flow_graph_builder.cc
@@ -126,6 +126,7 @@
   if (is_generating_interpreter()) {
     UNIMPLEMENTED();  // TODO(alexmarkov): interpreter
   } else {
+    ASSERT(!IsStackEmpty());
     const Object& value = B->stack_->definition()->AsConstant()->value();
     code_ += B->Drop();
     return Constant(Z, value);
@@ -133,14 +134,11 @@
 }
 
 void BytecodeFlowGraphBuilder::LoadStackSlots(intptr_t num_slots) {
-  if (B->stack_ != nullptr) {
-    intptr_t stack_depth = B->stack_->definition()->temp_index() + 1;
-    ASSERT(stack_depth >= num_slots);
-    return;
+  if (is_generating_interpreter()) {
+    UNIMPLEMENTED();  // TODO(alexmarkov): interpreter
   }
 
-  ASSERT(is_generating_interpreter());
-  UNIMPLEMENTED();  // TODO(alexmarkov): interpreter
+  ASSERT(GetStackDepth() >= num_slots);
 }
 
 void BytecodeFlowGraphBuilder::AllocateLocalVariables(
@@ -288,11 +286,22 @@
   return B->Pop();
 }
 
+intptr_t BytecodeFlowGraphBuilder::GetStackDepth() const {
+  ASSERT(!is_generating_interpreter());
+  return B->stack_ == nullptr ? 0 : B->stack_->definition()->temp_index() + 1;
+}
+
+bool BytecodeFlowGraphBuilder::IsStackEmpty() const {
+  ASSERT(!is_generating_interpreter());
+  return B->stack_ == nullptr;
+}
+
 ArgumentArray BytecodeFlowGraphBuilder::GetArguments(int count) {
   ArgumentArray arguments =
       new (Z) ZoneGrowableArray<PushArgumentInstr*>(Z, count);
   arguments->SetLength(count);
   for (intptr_t i = count - 1; i >= 0; --i) {
+    ASSERT(!IsStackEmpty());
     Definition* arg_def = B->stack_->definition();
     ASSERT(!arg_def->HasSSATemp());
     ASSERT(arg_def->temp_index() >= i);
@@ -314,7 +323,7 @@
 }
 
 void BytecodeFlowGraphBuilder::PropagateStackState(intptr_t target_pc) {
-  if (is_generating_interpreter() || (B->stack_ == nullptr)) {
+  if (is_generating_interpreter() || IsStackEmpty()) {
     return;
   }
 
@@ -336,6 +345,32 @@
   }
 }
 
+// Drop values from the stack unless they are used in control flow joins
+// which are not generated yet (dartbug.com/36374).
+void BytecodeFlowGraphBuilder::DropUnusedValuesFromStack() {
+  intptr_t drop_depth = GetStackDepth();
+  auto it = stack_states_.GetIterator();
+  for (const auto* current = it.Next(); current != nullptr;
+       current = it.Next()) {
+    if (current->key > pc_) {
+      Value* used_value = current->value;
+      Value* value = B->stack_;
+      // Find if a value on the expression stack is used in a propagated
+      // stack state, and adjust [drop_depth] to preserve it.
+      for (intptr_t i = 0; i < drop_depth; ++i) {
+        if (value == used_value) {
+          drop_depth = i;
+          break;
+        }
+        value = value->next_use();
+      }
+    }
+  }
+  for (intptr_t i = 0; i < drop_depth; ++i) {
+    B->Pop();
+  }
+}
+
 void BytecodeFlowGraphBuilder::BuildInstruction(KernelBytecode::Opcode opcode) {
   switch (opcode) {
 #define BUILD_BYTECODE_CASE(name, encoding, op1, op2, op3)                     \
@@ -343,7 +378,7 @@
     Build##name();                                                             \
     break;
 
-    KERNEL_BYTECODES_LIST(BUILD_BYTECODE_CASE)
+    PUBLIC_KERNEL_BYTECODES_LIST(BUILD_BYTECODE_CASE)
 
 #undef BUILD_BYTECODE_CASE
     default:
@@ -391,7 +426,7 @@
   Fragment(fail1) + B->Goto(throw_no_such_method_);
   Fragment(fail2) + B->Goto(throw_no_such_method_);
 
-  ASSERT(B->stack_ == nullptr);
+  ASSERT(IsStackEmpty());
 
   if (!B->IsInlining() && !B->IsCompiledForOsr()) {
     code_ += check_args;
@@ -527,7 +562,7 @@
   // Skip LoadConstant and Frame instructions.
   pc_ += num_load_const + 1;
 
-  ASSERT(B->stack_ == nullptr);
+  ASSERT(IsStackEmpty());
 }
 
 void BytecodeFlowGraphBuilder::BuildLoadConstant() {
@@ -613,7 +648,7 @@
   }
 
   setup_type_args = Fragment(setup_type_args.entry, done);
-  ASSERT(B->stack_ == nullptr);
+  ASSERT(IsStackEmpty());
 
   if (expected_num_type_args != 0) {
     parsed_function()->set_function_type_arguments(type_args_var);
@@ -629,8 +664,13 @@
   if (is_generating_interpreter()) {
     UNIMPLEMENTED();  // TODO(alexmarkov): interpreter
   }
-  code_ += B->CheckStackOverflow(position_, DecodeOperandA().value());
-  ASSERT(B->stack_ == nullptr);
+  const intptr_t loop_depth = DecodeOperandA().value();
+  if (loop_depth == 0) {
+    code_ += B->CheckStackOverflowInPrologue(position_);
+  } else {
+    code_ += B->CheckStackOverflow(position_, loop_depth);
+  }
+  ASSERT(IsStackEmpty());
 }
 
 void BytecodeFlowGraphBuilder::BuildPushConstant() {
@@ -707,10 +747,24 @@
   }
 
   const Function& target = Function::Cast(ConstantAt(DecodeOperandD()).value());
+  const intptr_t argc = DecodeOperandA().value();
+
+  // Recognize identical() call.
+  // Note: similar optimization is performed in AST flow graph builder - see
+  // StreamingFlowGraphBuilder::BuildStaticInvocation, special_case_identical.
+  // TODO(alexmarkov): find a better place for this optimization.
+  if (target.name() == Symbols::Identical().raw()) {
+    const auto& owner = Class::Handle(Z, target.Owner());
+    if (owner.IsTopLevel() && (owner.library() == Library::CoreLibrary())) {
+      ASSERT(argc == 2);
+      code_ += B->StrictCompare(Token::kEQ_STRICT, /*number_check=*/true);
+      return;
+    }
+  }
+
   const Array& arg_desc_array =
       Array::Cast(ConstantAt(DecodeOperandD(), 1).value());
   const ArgumentsDescriptor arg_desc(arg_desc_array);
-  intptr_t argc = DecodeOperandA().value();
 
   ArgumentArray arguments = GetArguments(argc);
 
@@ -838,9 +892,11 @@
       ASSERT((function().NumParameters() == 1) && !function().IsGeneric());
       code_ += B->LoadNativeField(Slot::Array_length());
       break;
-    case MethodRecognizer::kTypedDataLength:
+    case MethodRecognizer::kTypedListLength:
+    case MethodRecognizer::kTypedListViewLength:
+    case MethodRecognizer::kByteDataViewLength:
       ASSERT((function().NumParameters() == 1) && !function().IsGeneric());
-      code_ += B->LoadNativeField(Slot::TypedData_length());
+      code_ += B->LoadNativeField(Slot::TypedDataBase_length());
       break;
     case MethodRecognizer::kClassIDgetID:
       ASSERT((function().NumParameters() == 1) && !function().IsGeneric());
@@ -1297,7 +1353,7 @@
 }
 
 void BytecodeFlowGraphBuilder::BuildJumpIfNoAsserts() {
-  ASSERT(B->stack_ == nullptr);
+  ASSERT(IsStackEmpty());
   if (!isolate()->asserts()) {
     BuildJump();
     // Skip all instructions up to the target PC, as they are all unreachable.
@@ -1401,7 +1457,7 @@
   LoadStackSlots(1);
   ASSERT(code_.is_open());
   code_ += B->Return(position_);
-  ASSERT(B->stack_ == nullptr);
+  ASSERT(IsStackEmpty());
 }
 
 void BytecodeFlowGraphBuilder::BuildTrap() {
@@ -1429,9 +1485,9 @@
 
   ASSERT(code_.is_closed());
 
-  // Empty stack as closed fragment should not leave any values on the stack.
-  while (B->stack_ != nullptr) {
-    B->Pop();
+  if (!IsStackEmpty()) {
+    DropUnusedValuesFromStack();
+    B->stack_ = nullptr;
   }
 }
 
@@ -1465,7 +1521,7 @@
   }
 
   // No-op in compiled code.
-  ASSERT(B->stack_ == nullptr);
+  ASSERT(IsStackEmpty());
 }
 
 void BytecodeFlowGraphBuilder::BuildEqualsNull() {
@@ -1771,7 +1827,7 @@
         ASSERT((stack_state == nullptr) || (stack_state == B->stack_));
         code_ += B->Goto(join);
       } else {
-        ASSERT(B->stack_ == nullptr);
+        ASSERT(IsStackEmpty());
         B->stack_ = stack_state;
       }
       code_ = Fragment(join);
@@ -1790,7 +1846,7 @@
     BuildInstruction(KernelBytecode::DecodeOpcode(bytecode_instr_));
 
     if (code_.is_closed()) {
-      ASSERT(B->stack_ == nullptr);
+      ASSERT(IsStackEmpty());
     }
   }
 
diff --git a/runtime/vm/compiler/frontend/bytecode_flow_graph_builder.h b/runtime/vm/compiler/frontend/bytecode_flow_graph_builder.h
index cbfa60d..35f1cc5 100644
--- a/runtime/vm/compiler/frontend/bytecode_flow_graph_builder.h
+++ b/runtime/vm/compiler/frontend/bytecode_flow_graph_builder.h
@@ -126,8 +126,11 @@
   void StoreLocal(Operand local_index);
   void LoadLocal(Operand local_index);
   Value* Pop();
+  intptr_t GetStackDepth() const;
+  bool IsStackEmpty() const;
   ArgumentArray GetArguments(int count);
   void PropagateStackState(intptr_t target_pc);
+  void DropUnusedValuesFromStack();
   void BuildJumpIfStrictCompare(Token::Kind cmp_kind);
   void BuildIntOp(const String& name, Token::Kind token_kind, int num_args);
 
diff --git a/runtime/vm/compiler/frontend/bytecode_reader.cc b/runtime/vm/compiler/frontend/bytecode_reader.cc
index b6e394a..0834b09 100644
--- a/runtime/vm/compiler/frontend/bytecode_reader.cc
+++ b/runtime/vm/compiler/frontend/bytecode_reader.cc
@@ -4,10 +4,12 @@
 
 #include "vm/compiler/frontend/bytecode_reader.h"
 
+#include "vm/bit_vector.h"
 #include "vm/bootstrap.h"
 #include "vm/class_finalizer.h"
 #include "vm/code_descriptors.h"
 #include "vm/compiler/assembler/disassembler_kbc.h"
+#include "vm/compiler/frontend/bytecode_scope_builder.h"
 #include "vm/constants_kbc.h"
 #include "vm/dart_entry.h"
 #include "vm/longjump.h"
@@ -19,7 +21,7 @@
 
 #define Z (zone_)
 #define H (translation_helper_)
-#define I Isolate::Current()
+#define I (translation_helper_.isolate())
 
 namespace dart {
 
@@ -47,28 +49,138 @@
   tds.SetNumArguments(1);
   tds.CopyArgument(0, "Function", function.ToQualifiedCString());
 #endif  // defined(DEBUG)
-#endif  // !defined(PRODUCT)
+#endif  // !defined(SUPPORT_TIMELINE)
 
-  const intptr_t node_offset = function.kernel_offset();
-  const intptr_t md_offset = GetNextMetadataPayloadOffset(node_offset);
-  if (md_offset < 0) {
-    return;
+  switch (function.kind()) {
+    case RawFunction::kImplicitGetter:
+      function.AttachBytecode(Object::implicit_getter_bytecode());
+      return;
+    case RawFunction::kImplicitSetter:
+      function.AttachBytecode(Object::implicit_setter_bytecode());
+      return;
+    default: {
+    }
+  }
+
+  intptr_t code_offset = 0;
+  if (function.is_declared_in_bytecode()) {
+    code_offset = function.bytecode_offset();
+    if (code_offset == 0) {
+      return;
+    }
+  } else {
+    const intptr_t node_offset = function.kernel_offset();
+    code_offset = GetNextMetadataPayloadOffset(node_offset);
+    if (code_offset < 0) {
+      return;
+    }
   }
 
   ASSERT(Thread::Current()->IsMutatorThread());
 
-  Array& bytecode_component_array =
-      Array::Handle(helper_->zone_, translation_helper_.GetBytecodeComponent());
-  if (bytecode_component_array.IsNull()) {
-    bytecode_component_array = ReadBytecodeComponent();
-    ASSERT(!bytecode_component_array.IsNull());
-  }
-
-  BytecodeComponentData bytecode_component(bytecode_component_array);
+  BytecodeComponentData bytecode_component(
+      Array::Handle(helper_->zone_, GetBytecodeComponent()));
   BytecodeReaderHelper bytecode_reader(helper_, active_class_,
                                        &bytecode_component);
 
-  bytecode_reader.ReadMemberBytecode(function, md_offset);
+  bytecode_reader.ReadCode(function, code_offset);
+}
+
+void BytecodeMetadataHelper::ParseBytecodeFunction(
+    ParsedFunction* parsed_function) {
+  TIMELINE_DURATION(Thread::Current(), CompilerVerbose,
+                    "BytecodeMetadataHelper::ParseBytecodeFunction");
+
+  const Function& function = parsed_function->function();
+  ASSERT(function.is_declared_in_bytecode());
+
+  // No parsing is needed if function has bytecode attached.
+  // With one exception: implicit getters and setters have artificial
+  // bytecodes, but they are still handled by shared flow graph builder
+  // which requires scopes/parsing.
+  if (function.HasBytecode() && !function.IsImplicitGetterFunction() &&
+      !function.IsImplicitSetterFunction()) {
+    return;
+  }
+
+  BytecodeComponentData bytecode_component(
+      Array::Handle(helper_->zone_, GetBytecodeComponent()));
+  BytecodeReaderHelper bytecode_reader(helper_, active_class_,
+                                       &bytecode_component);
+
+  bytecode_reader.ParseBytecodeFunction(parsed_function, function);
+}
+
+bool BytecodeMetadataHelper::ReadMembers(intptr_t node_offset,
+                                         const Class& cls,
+                                         bool discard_fields) {
+  TIMELINE_DURATION(Thread::Current(), Compiler,
+                    "BytecodeMetadataHelper::ReadMembers");
+
+  ASSERT(node_offset > 0);
+  const intptr_t md_offset = GetNextMetadataPayloadOffset(node_offset);
+  if (md_offset < 0) {
+    return false;
+  }
+
+  ASSERT(Thread::Current()->IsMutatorThread());
+
+  BytecodeComponentData bytecode_component(
+      Array::Handle(helper_->zone_, GetBytecodeComponent()));
+  BytecodeReaderHelper bytecode_reader(helper_, active_class_,
+                                       &bytecode_component);
+
+  AlternativeReadingScope alt(&helper_->reader_, &H.metadata_payloads(),
+                              md_offset);
+
+  intptr_t members_offset = helper_->reader_.ReadUInt();
+
+  bytecode_reader.ReadMembers(cls, members_offset, discard_fields);
+
+  return true;
+}
+
+RawObject* BytecodeMetadataHelper::ReadAnnotation(intptr_t annotation_offset) {
+  ASSERT(Thread::Current()->IsMutatorThread());
+
+  BytecodeComponentData bytecode_component(
+      Array::Handle(helper_->zone_, GetBytecodeComponent()));
+  BytecodeReaderHelper bytecode_reader(helper_, active_class_,
+                                       &bytecode_component);
+
+  AlternativeReadingScope alt(&helper_->reader_, &H.metadata_payloads(),
+                              annotation_offset);
+
+  return bytecode_reader.ReadObject();
+}
+
+RawLibrary* BytecodeMetadataHelper::GetMainLibrary() {
+  const intptr_t md_offset = GetComponentMetadataPayloadOffset();
+  if (md_offset < 0) {
+    return Library::null();
+  }
+
+  BytecodeComponentData bytecode_component(
+      Array::Handle(helper_->zone_, GetBytecodeComponent()));
+  const intptr_t main_offset = bytecode_component.GetMainOffset();
+  if (main_offset == 0) {
+    return Library::null();
+  }
+
+  BytecodeReaderHelper bytecode_reader(helper_, active_class_,
+                                       &bytecode_component);
+  AlternativeReadingScope alt(&helper_->reader_, &H.metadata_payloads(),
+                              main_offset);
+  return bytecode_reader.ReadMain();
+}
+
+RawArray* BytecodeMetadataHelper::GetBytecodeComponent() {
+  RawArray* array = translation_helper_.GetBytecodeComponent();
+  if (array == Array::null()) {
+    array = ReadBytecodeComponent();
+    ASSERT(array != Array::null());
+  }
+  return array;
 }
 
 RawArray* BytecodeMetadataHelper::ReadBytecodeComponent() {
@@ -90,26 +202,47 @@
       active_class_(active_class),
       zone_(helper_->zone_),
       bytecode_component_(bytecode_component),
-      closures_(nullptr),
-      function_type_type_parameters_(nullptr) {}
+      scoped_function_(Function::Handle(helper_->zone_)),
+      scoped_function_name_(String::Handle(helper_->zone_)),
+      scoped_function_class_(Class::Handle(helper_->zone_)) {}
 
-void BytecodeReaderHelper::ReadMemberBytecode(const Function& function,
-                                              intptr_t md_offset) {
+void BytecodeReaderHelper::ReadCode(const Function& function,
+                                    intptr_t code_offset) {
   ASSERT(Thread::Current()->IsMutatorThread());
+  ASSERT(!function.IsImplicitGetterFunction() &&
+         !function.IsImplicitSetterFunction());
+  ASSERT(code_offset > 0);
 
   AlternativeReadingScope alt(&helper_->reader_, &H.metadata_payloads(),
-                              md_offset);
-
-  const int kHasExceptionsTableFlag = 1 << 0;
-  const int kHasSourcePositionsFlag = 1 << 1;
-  const int kHasNullableFieldsFlag = 1 << 2;
-  const int kHasClosuresFlag = 1 << 3;
+                              code_offset);
 
   const intptr_t flags = helper_->reader_.ReadUInt();
-  const bool has_exceptions_table = (flags & kHasExceptionsTableFlag) != 0;
-  const bool has_source_positions = (flags & kHasSourcePositionsFlag) != 0;
-  const bool has_nullable_fields = (flags & kHasNullableFieldsFlag) != 0;
-  const bool has_closures = (flags & kHasClosuresFlag) != 0;
+  const bool has_exceptions_table =
+      (flags & Code::kHasExceptionsTableFlag) != 0;
+  const bool has_source_positions =
+      (flags & Code::kHasSourcePositionsFlag) != 0;
+  const bool has_nullable_fields = (flags & Code::kHasNullableFieldsFlag) != 0;
+  const bool has_closures = (flags & Code::kHasClosuresFlag) != 0;
+  const bool has_parameters_flags = (flags & Code::kHasParameterFlagsFlag) != 0;
+  const bool has_forwarding_stub_target =
+      (flags & Code::kHasForwardingStubTargetFlag) != 0;
+  const bool has_default_function_type_args =
+      (flags & Code::kHasDefaultFunctionTypeArgsFlag) != 0;
+
+  if (has_parameters_flags) {
+    intptr_t num_params = helper_->reader_.ReadUInt();
+    ASSERT(num_params ==
+           function.NumParameters() - function.NumImplicitParameters());
+    for (intptr_t i = 0; i < num_params; ++i) {
+      helper_->reader_.ReadUInt();
+    }
+  }
+  if (has_forwarding_stub_target) {
+    helper_->reader_.ReadUInt();
+  }
+  if (has_default_function_type_args) {
+    helper_->reader_.ReadUInt();
+  }
 
   intptr_t num_closures = 0;
   if (has_closures) {
@@ -173,8 +306,10 @@
       closure ^= closures_->At(i);
 
       const intptr_t flags = helper_->reader_.ReadUInt();
-      const bool has_exceptions_table = (flags & kHasExceptionsTableFlag) != 0;
-      const bool has_source_positions = (flags & kHasSourcePositionsFlag) != 0;
+      const bool has_exceptions_table =
+          (flags & Code::kHasExceptionsTableFlag) != 0;
+      const bool has_source_positions =
+          (flags & Code::kHasSourcePositionsFlag) != 0;
 
       // Read closure bytecode and attach to closure function.
       closure_bytecode = ReadBytecode(pool);
@@ -236,8 +371,7 @@
   FunctionTypeScope function_type_scope(this);
 
   if (has_type_params) {
-    const intptr_t num_type_params = helper_->reader_.ReadUInt();
-    ReadTypeParametersDeclaration(Class::Handle(Z), func, num_type_params);
+    ReadTypeParametersDeclaration(Class::Handle(Z), func);
     function_type_type_parameters_ =
         &TypeArguments::Handle(Z, func.type_parameters());
   }
@@ -291,9 +425,10 @@
 
 void BytecodeReaderHelper::ReadTypeParametersDeclaration(
     const Class& parameterized_class,
-    const Function& parameterized_function,
-    intptr_t num_type_params) {
+    const Function& parameterized_function) {
   ASSERT(parameterized_class.IsNull() != parameterized_function.IsNull());
+
+  const intptr_t num_type_params = helper_->reader_.ReadUInt();
   ASSERT(num_type_params > 0);
 
   // First setup the type parameters, so if any of the following code uses it
@@ -316,7 +451,9 @@
 
   if (!parameterized_class.IsNull()) {
     parameterized_class.set_type_parameters(type_parameters);
-  } else {
+  } else if (!parameterized_function.IsFactory()) {
+    // Do not set type parameters for factories, as VM uses class type
+    // parameters instead.
     parameterized_function.set_type_parameters(type_parameters);
   }
 
@@ -690,8 +827,10 @@
 }
 
 RawBytecode* BytecodeReaderHelper::ReadBytecode(const ObjectPool& pool) {
+#if defined(SUPPORT_TIMELINE)
   TIMELINE_DURATION(Thread::Current(), CompilerVerbose,
                     "BytecodeReaderHelper::ReadBytecode");
+#endif  // defined(SUPPORT_TIMELINE)
   intptr_t size = helper_->ReadUInt();
   intptr_t offset = Utils::RoundUp(helper_->reader_.offset(), sizeof(KBCInstr));
   const uint8_t* data = helper_->reader_.BufferAt(offset);
@@ -704,8 +843,10 @@
 
 void BytecodeReaderHelper::ReadExceptionsTable(const Bytecode& bytecode,
                                                bool has_exceptions_table) {
+#if defined(SUPPORT_TIMELINE)
   TIMELINE_DURATION(Thread::Current(), CompilerVerbose,
                     "BytecodeReaderHelper::ReadExceptionsTable");
+#endif
 
   const intptr_t try_block_count =
       has_exceptions_table ? helper_->reader_.ReadListLength() : 0;
@@ -773,9 +914,9 @@
     return;
   }
 
-  intptr_t length = helper_->reader_.ReadUInt();
-  bytecode.set_source_positions_binary_offset(helper_->reader_.offset());
-  helper_->SkipBytes(length);
+  intptr_t offset = helper_->reader_.ReadUInt();
+  bytecode.set_source_positions_binary_offset(
+      bytecode_component_->GetSourcePositionsOffset() + offset);
 }
 
 RawTypedData* BytecodeReaderHelper::NativeEntry(const Function& function,
@@ -790,7 +931,9 @@
     case MethodRecognizer::kGrowableArrayLength:
     case MethodRecognizer::kObjectArrayLength:
     case MethodRecognizer::kImmutableArrayLength:
-    case MethodRecognizer::kTypedDataLength:
+    case MethodRecognizer::kTypedListLength:
+    case MethodRecognizer::kTypedListViewLength:
+    case MethodRecognizer::kByteDataViewLength:
     case MethodRecognizer::kClassIDgetID:
     case MethodRecognizer::kGrowableArrayCapacity:
     case MethodRecognizer::kListFactory:
@@ -823,7 +966,13 @@
       bool is_auto_scope = true;
       native_function = NativeEntry::ResolveNative(library, external_name,
                                                    num_params, &is_auto_scope);
-      ASSERT(native_function != NULL);  // TODO(regis): Should we throw instead?
+      if (native_function == nullptr) {
+        Report::MessageF(Report::kError, Script::Handle(function.script()),
+                         function.token_pos(), Report::AtLocation,
+                         "native function '%s' (%" Pd
+                         " arguments) cannot be found",
+                         external_name.ToCString(), function.NumParameters());
+      }
       if (is_bootstrap_native) {
         trampoline = &NativeEntry::BootstrapNativeCallWrapper;
       } else if (is_auto_scope) {
@@ -843,7 +992,14 @@
   AlternativeReadingScope alt(&helper_->reader_, &H.metadata_payloads(),
                               md_offset);
 
-  const intptr_t version = helper_->reader_.ReadUInt();
+  const intptr_t start_offset = helper_->reader_.offset();
+
+  intptr_t magic = helper_->reader_.ReadUInt32();
+  if (magic != KernelBytecode::kMagicValue) {
+    return ReadBytecodeComponentV2(md_offset);
+  }
+
+  const intptr_t version = helper_->reader_.ReadUInt32();
   if ((version < KernelBytecode::kMinSupportedBytecodeFormatVersion) ||
       (version > KernelBytecode::kMaxSupportedBytecodeFormatVersion)) {
     FATAL3("Unsupported Dart bytecode format version %" Pd
@@ -854,6 +1010,83 @@
            KernelBytecode::kMaxSupportedBytecodeFormatVersion);
   }
 
+  helper_->reader_.ReadUInt32();  // Skip stringTable.numItems
+  const intptr_t string_table_offset =
+      start_offset + helper_->reader_.ReadUInt32();
+
+  helper_->reader_.ReadUInt32();  // Skip objectTable.numItems
+  const intptr_t object_table_offset =
+      start_offset + helper_->reader_.ReadUInt32();
+
+  helper_->reader_.ReadUInt32();  // Skip main.numItems
+  const intptr_t main_offset = start_offset + helper_->reader_.ReadUInt32();
+
+  helper_->reader_.ReadUInt32();  // Skip members.numItems
+  const intptr_t members_offset = start_offset + helper_->reader_.ReadUInt32();
+
+  helper_->reader_.ReadUInt32();  // Skip codes.numItems
+  const intptr_t codes_offset = start_offset + helper_->reader_.ReadUInt32();
+
+  helper_->reader_.ReadUInt32();  // Skip sourcePositions.numItems
+  const intptr_t sources_positions_offset =
+      start_offset + helper_->reader_.ReadUInt32();
+
+  helper_->reader_.ReadUInt32();  // Skip annotations.numItems
+  const intptr_t annotations_offset =
+      start_offset + helper_->reader_.ReadUInt32();
+
+  // Read header of string table.
+  helper_->reader_.set_offset(string_table_offset);
+  const intptr_t num_one_byte_strings = helper_->reader_.ReadUInt32();
+  const intptr_t num_two_byte_strings = helper_->reader_.ReadUInt32();
+  const intptr_t strings_contents_offset =
+      helper_->reader_.offset() +
+      (num_one_byte_strings + num_two_byte_strings) * 4;
+
+  // Read header of object table.
+  helper_->reader_.set_offset(object_table_offset);
+  const intptr_t num_objects = helper_->reader_.ReadUInt();
+  const intptr_t objects_size = helper_->reader_.ReadUInt();
+
+  // Skip over contents of objects.
+  const intptr_t objects_contents_offset = helper_->reader_.offset();
+  helper_->reader_.set_offset(objects_contents_offset + objects_size);
+
+  const Array& bytecode_component_array = Array::Handle(
+      Z,
+      BytecodeComponentData::New(
+          Z, version, num_objects, string_table_offset, strings_contents_offset,
+          objects_contents_offset, main_offset, members_offset, codes_offset,
+          sources_positions_offset, annotations_offset, Heap::kOld));
+
+  BytecodeComponentData bytecode_component(bytecode_component_array);
+
+  // Read object offsets.
+  Smi& offs = Smi::Handle(Z);
+  for (intptr_t i = 0; i < num_objects; ++i) {
+    offs = Smi::New(helper_->reader_.ReadUInt());
+    bytecode_component.SetObject(i, offs);
+  }
+
+  H.SetBytecodeComponent(bytecode_component_array);
+
+  return bytecode_component_array.raw();
+}
+
+// TODO(alexmarkov): obsolete, remove when dropping support for old bytecode
+// format version.
+RawArray* BytecodeReaderHelper::ReadBytecodeComponentV2(intptr_t md_offset) {
+  AlternativeReadingScope alt(&helper_->reader_, &H.metadata_payloads(),
+                              md_offset);
+
+  const intptr_t kMinVersion = 1;
+  const intptr_t kMaxVersion = 2;
+
+  const intptr_t version = helper_->reader_.ReadUInt();
+  if ((version < kMinVersion) || (version > kMaxVersion)) {
+    FATAL1("Unsupported Dart bytecode format version %" Pd ".", version);
+  }
+
   const intptr_t strings_size = helper_->reader_.ReadUInt();
   helper_->reader_.ReadUInt();  // Objects table size.
 
@@ -874,10 +1107,11 @@
   const intptr_t objects_contents_offset = helper_->reader_.offset();
   helper_->reader_.set_offset(objects_contents_offset + objects_size);
 
-  const Array& bytecode_component_array = Array::Handle(
-      Z, BytecodeComponentData::New(
-             Z, version, num_objects, strings_header_offset,
-             strings_contents_offset, objects_contents_offset, Heap::kOld));
+  const Array& bytecode_component_array =
+      Array::Handle(Z, BytecodeComponentData::New(
+                           Z, version, num_objects, strings_header_offset,
+                           strings_contents_offset, objects_contents_offset, 0,
+                           0, 0, 0, 0, Heap::kOld));
   BytecodeComponentData bytecode_component(bytecode_component_array);
 
   // Read object offsets.
@@ -925,6 +1159,15 @@
   return ReadObjectContents(header);
 }
 
+RawString* BytecodeReaderHelper::ConstructorName(const Class& cls,
+                                                 const String& name) {
+  GrowableHandlePtrArray<const String> pieces(Z, 3);
+  pieces.Add(String::Handle(Z, cls.Name()));
+  pieces.Add(Symbols::Dot());
+  pieces.Add(name);
+  return Symbols::FromConcatAll(H.thread(), pieces);
+}
+
 RawObject* BytecodeReaderHelper::ReadObjectContents(uint32_t header) {
   ASSERT(((header & kReferenceBit) == 0));
 
@@ -1008,11 +1251,12 @@
         return field;
       } else {
         if ((flags & kFlagIsConstructor) != 0) {
-          GrowableHandlePtrArray<const String> pieces(Z, 3);
-          pieces.Add(String::Handle(Z, cls.Name()));
-          pieces.Add(Symbols::Dot());
-          pieces.Add(name);
-          name = Symbols::FromConcatAll(H.thread(), pieces);
+          name = ConstructorName(cls, name);
+        }
+        ASSERT(!name.IsNull() && name.IsSymbol());
+        if (name.raw() == scoped_function_name_.raw() &&
+            cls.raw() == scoped_function_class_.raw()) {
+          return scoped_function_.raw();
         }
         RawFunction* function = cls.LookupFunctionAllowPrivate(name);
         if (function == Function::null()) {
@@ -1339,6 +1583,649 @@
   return type.arguments();
 }
 
+void BytecodeReaderHelper::ReadMembers(const Class& cls,
+                                       intptr_t members_offset,
+                                       bool discard_fields) {
+  ASSERT(Thread::Current()->IsMutatorThread());
+  ASSERT(cls.is_type_finalized());
+  ASSERT(!cls.is_loaded());
+
+  const intptr_t offset =
+      bytecode_component_->GetMembersOffset() + members_offset;
+  AlternativeReadingScope alt_md(&helper_->reader_, &H.metadata_payloads(),
+                                 offset);
+
+  const intptr_t num_functions = helper_->reader_.ReadUInt();
+  functions_ = &Array::Handle(Z, Array::New(num_functions, Heap::kOld));
+  function_index_ = 0;
+
+  ReadFieldDeclarations(cls, discard_fields);
+  ReadFunctionDeclarations(cls);
+
+  cls.set_is_loaded(true);
+}
+
+void BytecodeReaderHelper::ReadFieldDeclarations(const Class& cls,
+                                                 bool discard_fields) {
+  // Field flags, must be in sync with FieldDeclaration constants in
+  // pkg/vm/lib/bytecode/declarations.dart.
+  const int kHasInitializerFlag = 1 << 0;
+  const int kHasGetterFlag = 1 << 1;
+  const int kHasSetterFlag = 1 << 2;
+  const int kIsReflectableFlag = 1 << 3;
+  const int kIsStaticFlag = 1 << 4;
+  const int kIsConstFlag = 1 << 5;
+  const int kIsFinalFlag = 1 << 6;
+  const int kIsCovariantFlag = 1 << 7;
+  const int kIsGenericCovariantImplFlag = 1 << 8;
+  const int kHasSourcePositionsFlag = 1 << 9;
+  const int kHasAnnotationsFlag = 1 << 10;
+  const int kHasPragmaFlag = 1 << 11;
+  const int kHasCustomScriptFlag = 1 << 12;
+
+  const int num_fields = helper_->ReadListLength();
+  if ((num_fields == 0) && !cls.is_enum_class()) {
+    return;
+  }
+  const Array& fields = Array::Handle(
+      Z, Array::New(num_fields + (cls.is_enum_class() ? 1 : 0), Heap::kOld));
+  String& name = String::Handle(Z);
+  Object& script_class = Object::Handle(Z);
+  AbstractType& type = AbstractType::Handle(Z);
+  Field& field = Field::Handle(Z);
+  Instance& value = Instance::Handle(Z);
+  Function& function = Function::Handle(Z);
+
+  for (intptr_t i = 0; i < num_fields; ++i) {
+    intptr_t flags = helper_->reader_.ReadUInt();
+
+    const bool is_static = (flags & kIsStaticFlag) != 0;
+    const bool is_final = (flags & kIsFinalFlag) != 0;
+    const bool is_const = (flags & kIsConstFlag) != 0;
+    const bool has_initializer = (flags & kHasInitializerFlag) != 0;
+    const bool has_pragma = (flags & kHasPragmaFlag) != 0;
+
+    name ^= ReadObject();
+    type ^= ReadObject();
+
+    if ((flags & kHasCustomScriptFlag) != 0) {
+      Script& script = Script::CheckedHandle(Z, ReadObject());
+      script_class = GetPatchClass(cls, script);
+    } else {
+      script_class = cls.raw();
+    }
+
+    TokenPosition position = TokenPosition::kNoSource;
+    TokenPosition end_position = TokenPosition::kNoSource;
+    if ((flags & kHasSourcePositionsFlag) != 0) {
+      position = helper_->ReadPosition();
+      end_position = helper_->ReadPosition();
+    }
+
+    field = Field::New(name, is_static, is_final, is_const,
+                       (flags & kIsReflectableFlag) != 0, script_class, type,
+                       position, end_position);
+
+    field.set_is_declared_in_bytecode(true);
+    field.set_has_pragma(has_pragma);
+    field.set_is_covariant((flags & kIsCovariantFlag) != 0);
+    field.set_is_generic_covariant_impl((flags & kIsGenericCovariantImplFlag) !=
+                                        0);
+    field.set_has_initializer(has_initializer);
+
+    if (!has_initializer) {
+      value ^= ReadObject();
+      if (is_static) {
+        field.SetStaticValue(value, true);
+      } else {
+        // Note: optimizer relies on DoubleInitialized bit in its field-unboxing
+        // heuristics. See JitCallSpecializer::VisitStoreInstanceField for more
+        // details.
+        field.RecordStore(value);
+        if (value.IsDouble()) {
+          field.set_is_double_initialized(true);
+        }
+      }
+    }
+
+    if (has_initializer && is_static) {
+      const intptr_t code_offset = helper_->reader_.ReadUInt();
+      field.set_bytecode_offset(code_offset +
+                                bytecode_component_->GetCodesOffset());
+      field.SetStaticValue(Object::sentinel(), true);
+    }
+
+    if ((flags & kHasGetterFlag) != 0) {
+      name ^= ReadObject();
+      function =
+          Function::New(name,
+                        is_static ? RawFunction::kImplicitStaticFinalGetter
+                                  : RawFunction::kImplicitGetter,
+                        is_static, is_const,
+                        false,  // is_abstract
+                        false,  // is_external
+                        false,  // is_native
+                        script_class, position);
+      function.set_end_token_pos(end_position);
+      function.set_result_type(type);
+      function.set_is_debuggable(false);
+      function.set_accessor_field(field);
+      function.set_is_declared_in_bytecode(true);
+      if (is_const && has_initializer) {
+        function.set_bytecode_offset(field.bytecode_offset());
+      }
+      H.SetupFieldAccessorFunction(cls, function, type);
+      functions_->SetAt(function_index_++, function);
+    }
+
+    if ((flags & kHasSetterFlag) != 0) {
+      ASSERT((!is_static) && (!is_final) && (!is_const));
+      name ^= ReadObject();
+      function = Function::New(name, RawFunction::kImplicitSetter,
+                               false,  // is_static
+                               false,  // is_const
+                               false,  // is_abstract
+                               false,  // is_external
+                               false,  // is_native
+                               script_class, position);
+      function.set_end_token_pos(end_position);
+      function.set_result_type(Object::void_type());
+      function.set_is_debuggable(false);
+      function.set_accessor_field(field);
+      function.set_is_declared_in_bytecode(true);
+      H.SetupFieldAccessorFunction(cls, function, type);
+      functions_->SetAt(function_index_++, function);
+    }
+
+    if ((flags & kHasAnnotationsFlag) != 0) {
+      intptr_t annotations_offset = helper_->reader_.ReadUInt() +
+                                    bytecode_component_->GetAnnotationsOffset();
+      ASSERT(annotations_offset > 0);
+
+      if (FLAG_enable_mirrors || has_pragma) {
+        Library& library = Library::Handle(Z, cls.library());
+        library.AddFieldMetadata(field, TokenPosition::kNoSource, 0,
+                                 annotations_offset);
+        if (has_pragma) {
+          // TODO(alexmarkov): read annotations right away using
+          //  annotations_offset.
+          Thread* thread = H.thread();
+          NoOOBMessageScope no_msg_scope(thread);
+          NoReloadScope no_reload_scope(thread->isolate(), thread);
+          library.GetMetadata(field);
+        }
+      }
+    }
+
+    fields.SetAt(i, field);
+  }
+
+  if (cls.is_enum_class()) {
+    // Add static field 'const _deleted_enum_sentinel'.
+    field =
+        Field::New(Symbols::_DeletedEnumSentinel(),
+                   /* is_static = */ true,
+                   /* is_final = */ true,
+                   /* is_const = */ true,
+                   /* is_reflectable = */ false, cls, Object::dynamic_type(),
+                   TokenPosition::kNoSource, TokenPosition::kNoSource);
+
+    fields.SetAt(num_fields, field);
+  }
+
+  if (!discard_fields) {
+    cls.SetFields(fields);
+  }
+
+  if (cls.IsTopLevel()) {
+    const Library& library = Library::Handle(Z, cls.library());
+    for (intptr_t i = 0, n = fields.Length(); i < n; ++i) {
+      field ^= fields.At(i);
+      name = field.name();
+      library.AddObject(field, name);
+    }
+  }
+}
+
+RawPatchClass* BytecodeReaderHelper::GetPatchClass(const Class& cls,
+                                                   const Script& script) {
+  if (patch_class_ != nullptr && patch_class_->patched_class() == cls.raw() &&
+      patch_class_->script() == script.raw()) {
+    return patch_class_->raw();
+  }
+  if (patch_class_ == nullptr) {
+    patch_class_ = &PatchClass::Handle(Z);
+  }
+  *patch_class_ = PatchClass::New(cls, script);
+  return patch_class_->raw();
+}
+
+void BytecodeReaderHelper::ReadFunctionDeclarations(const Class& cls) {
+  // Function flags, must be in sync with FunctionDeclaration constants in
+  // pkg/vm/lib/bytecode/declarations.dart.
+  const int kIsConstructorFlag = 1 << 0;
+  const int kIsGetterFlag = 1 << 1;
+  const int kIsSetterFlag = 1 << 2;
+  const int kIsFactoryFlag = 1 << 3;
+  const int kIsStaticFlag = 1 << 4;
+  const int kIsAbstractFlag = 1 << 5;
+  const int kIsConstFlag = 1 << 6;
+  const int kHasOptionalPositionalParamsFlag = 1 << 7;
+  const int kHasOptionalNamedParamsFlag = 1 << 8;
+  const int kHasTypeParamsFlag = 1 << 9;
+  const int kIsReflectableFlag = 1 << 10;
+  const int kIsDebuggableFlag = 1 << 11;
+  const int kIsAsyncFlag = 1 << 12;
+  const int kIsAsyncStarFlag = 1 << 13;
+  const int kIsSyncStarFlag = 1 << 14;
+  // const int kIsForwardingStubFlag = 1 << 15;
+  const int kIsNoSuchMethodForwarderFlag = 1 << 16;
+  const int kIsNativeFlag = 1 << 17;
+  const int kIsExternalFlag = 1 << 18;
+  const int kHasSourcePositionsFlag = 1 << 19;
+  const int kHasAnnotationsFlag = 1 << 20;
+  const int kHasPragmaFlag = 1 << 21;
+  const int kHasCustomScriptFlag = 1 << 22;
+
+  const intptr_t num_functions = helper_->ReadListLength();
+  ASSERT(function_index_ + num_functions == functions_->Length());
+
+  if (function_index_ + num_functions == 0) {
+    return;
+  }
+
+  String& name = String::Handle(Z);
+  Object& script_class = Object::Handle(Z);
+  Function& function = Function::Handle(Z);
+  Array& parameter_types = Array::Handle(Z);
+  Array& parameter_names = Array::Handle(Z);
+  AbstractType& type = AbstractType::Handle(Z);
+
+  for (intptr_t i = 0; i < num_functions; ++i) {
+    intptr_t flags = helper_->reader_.ReadUInt();
+
+    const bool is_static = (flags & kIsStaticFlag) != 0;
+    const bool is_factory = (flags & kIsFactoryFlag) != 0;
+    const bool is_native = (flags & kIsNativeFlag) != 0;
+    const bool has_pragma = (flags & kHasPragmaFlag) != 0;
+
+    name ^= ReadObject();
+
+    if ((flags & kHasCustomScriptFlag) != 0) {
+      Script& script = Script::CheckedHandle(Z, ReadObject());
+      script_class = GetPatchClass(cls, script);
+    } else {
+      script_class = cls.raw();
+    }
+
+    TokenPosition position = TokenPosition::kNoSource;
+    TokenPosition end_position = TokenPosition::kNoSource;
+    if ((flags & kHasSourcePositionsFlag) != 0) {
+      position = helper_->ReadPosition();
+      end_position = helper_->ReadPosition();
+    }
+
+    RawFunction::Kind kind = RawFunction::kRegularFunction;
+    if ((flags & kIsGetterFlag) != 0) {
+      kind = RawFunction::kGetterFunction;
+    } else if ((flags & kIsSetterFlag) != 0) {
+      kind = RawFunction::kSetterFunction;
+    } else if ((flags & (kIsConstructorFlag | kIsFactoryFlag)) != 0) {
+      kind = RawFunction::kConstructor;
+      name = ConstructorName(cls, name);
+    }
+
+    // Expression evaluation functions are not supported yet.
+    ASSERT(!name.Equals(Symbols::DebugProcedureName()));
+
+    function = Function::New(name, kind, is_static, (flags & kIsConstFlag) != 0,
+                             (flags & kIsAbstractFlag) != 0,
+                             (flags & kIsExternalFlag) != 0, is_native,
+                             script_class, position);
+
+    // Declare function scope as types (type parameters) in function
+    // signature may back-reference to the function being declared.
+    // At this moment, owner class is not fully loaded yet and it won't be
+    // able to serve function lookup requests.
+    FunctionScope function_scope(this, function, name, cls);
+
+    function.set_is_declared_in_bytecode(true);
+    function.set_has_pragma(has_pragma);
+    function.set_end_token_pos(end_position);
+    function.set_is_no_such_method_forwarder(
+        (flags & kIsNoSuchMethodForwarderFlag) != 0);
+    function.set_is_reflectable((flags & kIsReflectableFlag) != 0);
+    function.set_is_debuggable((flags & kIsDebuggableFlag) != 0);
+
+    if ((flags & kIsSyncStarFlag) != 0) {
+      function.set_modifier(RawFunction::kSyncGen);
+    } else if ((flags & kIsAsyncFlag) != 0) {
+      function.set_modifier(RawFunction::kAsync);
+      function.set_is_inlinable(!FLAG_causal_async_stacks);
+    } else if ((flags & kIsAsyncStarFlag) != 0) {
+      function.set_modifier(RawFunction::kAsyncGen);
+      function.set_is_inlinable(!FLAG_causal_async_stacks);
+    }
+
+    if ((flags & kHasTypeParamsFlag) != 0) {
+      ReadTypeParametersDeclaration(Class::Handle(Z), function);
+    }
+
+    const intptr_t num_implicit_params = (!is_static || is_factory) ? 1 : 0;
+    const intptr_t num_params =
+        num_implicit_params + helper_->reader_.ReadUInt();
+
+    intptr_t num_required_params = num_params;
+    if ((flags & (kHasOptionalPositionalParamsFlag |
+                  kHasOptionalNamedParamsFlag)) != 0) {
+      num_required_params = num_implicit_params + helper_->reader_.ReadUInt();
+    }
+
+    function.set_num_fixed_parameters(num_required_params);
+    function.SetNumOptionalParameters(
+        num_params - num_required_params,
+        (flags & kHasOptionalNamedParamsFlag) == 0);
+
+    parameter_types = Array::New(num_params, Heap::kOld);
+    function.set_parameter_types(parameter_types);
+
+    parameter_names = Array::New(num_params, Heap::kOld);
+    function.set_parameter_names(parameter_names);
+
+    intptr_t param_index = 0;
+    if (!is_static) {
+      function.SetParameterTypeAt(param_index, H.GetDeclarationType(cls));
+      function.SetParameterNameAt(param_index, Symbols::This());
+      ++param_index;
+    } else if (is_factory) {
+      function.SetParameterTypeAt(param_index, AbstractType::dynamic_type());
+      function.SetParameterNameAt(param_index,
+                                  Symbols::TypeArgumentsParameter());
+      ++param_index;
+    }
+
+    for (; param_index < num_params; ++param_index) {
+      name ^= ReadObject();
+      parameter_names.SetAt(param_index, name);
+      type ^= ReadObject();
+      parameter_types.SetAt(param_index, type);
+    }
+
+    type ^= ReadObject();
+    function.set_result_type(type);
+
+    if (is_native) {
+      name ^= ReadObject();
+      function.set_native_name(name);
+    }
+
+    if ((flags & kIsAbstractFlag) == 0) {
+      const intptr_t code_offset = helper_->reader_.ReadUInt();
+      function.set_bytecode_offset(code_offset +
+                                   bytecode_component_->GetCodesOffset());
+    }
+
+    if ((flags & kHasAnnotationsFlag) != 0) {
+      const intptr_t annotations_offset =
+          helper_->reader_.ReadUInt() +
+          bytecode_component_->GetAnnotationsOffset();
+      ASSERT(annotations_offset > 0);
+
+      if (FLAG_enable_mirrors || has_pragma) {
+        Library& library = Library::Handle(Z, cls.library());
+        library.AddFunctionMetadata(function, TokenPosition::kNoSource, 0,
+                                    annotations_offset);
+
+        if (has_pragma) {
+          if (H.constants().IsNull() &&
+              library.raw() == Library::CoreLibrary()) {
+            // Bootstrapping, need to postpone evaluation of pragma annotations
+            // as classes are not fully loaded/finalized yet.
+            const auto& pragma_funcs = GrowableObjectArray::Handle(
+                Z, H.EnsurePotentialPragmaFunctions());
+            pragma_funcs.Add(function);
+          } else {
+            // TODO(alexmarkov): read annotations right away using
+            //  annotations_offset.
+            Thread* thread = H.thread();
+            NoOOBMessageScope no_msg_scope(thread);
+            NoReloadScope no_reload_scope(thread->isolate(), thread);
+            library.GetMetadata(function);
+          }
+        }
+      }
+    }
+
+    functions_->SetAt(function_index_++, function);
+  }
+
+  cls.SetFunctions(*functions_);
+
+  if (cls.IsTopLevel()) {
+    const Library& library = Library::Handle(Z, cls.library());
+    for (intptr_t i = 0, n = functions_->Length(); i < n; ++i) {
+      function ^= functions_->At(i);
+      name = function.name();
+      library.AddObject(function, name);
+    }
+  }
+
+  functions_ = nullptr;
+}
+
+void BytecodeReaderHelper::ReadParameterCovariance(
+    const Function& function,
+    BitVector* is_covariant,
+    BitVector* is_generic_covariant_impl) {
+  ASSERT(function.is_declared_in_bytecode());
+
+  const intptr_t num_params = function.NumParameters();
+  ASSERT(is_covariant->length() == num_params);
+  ASSERT(is_generic_covariant_impl->length() == num_params);
+
+  AlternativeReadingScope alt(&helper_->reader_, &H.metadata_payloads(),
+                              function.bytecode_offset());
+
+  const intptr_t code_flags = helper_->reader_.ReadUInt();
+  if ((code_flags & Code::kHasParameterFlagsFlag) != 0) {
+    const intptr_t num_explicit_params = helper_->reader_.ReadUInt();
+    ASSERT(num_params ==
+           function.NumImplicitParameters() + num_explicit_params);
+
+    for (intptr_t i = function.NumImplicitParameters(); i < num_params; ++i) {
+      const intptr_t flags = helper_->reader_.ReadUInt();
+
+      if ((flags & Parameter::kIsCovariantFlag) != 0) {
+        is_covariant->Add(i);
+      }
+      if ((flags & Parameter::kIsGenericCovariantImplFlag) != 0) {
+        is_generic_covariant_impl->Add(i);
+      }
+    }
+  }
+}
+
+void BytecodeReaderHelper::ParseBytecodeFunction(
+    ParsedFunction* parsed_function,
+    const Function& function) {
+  switch (function.kind()) {
+    case RawFunction::kImplicitClosureFunction:
+      ParseForwarderFunction(parsed_function, function,
+                             Function::Handle(Z, function.parent_function()));
+      break;
+    case RawFunction::kDynamicInvocationForwarder:
+      ParseForwarderFunction(
+          parsed_function, function,
+          Function::Handle(Z,
+                           function.GetTargetOfDynamicInvocationForwarder()));
+      break;
+    case RawFunction::kImplicitGetter:
+    case RawFunction::kImplicitSetter:
+    case RawFunction::kImplicitStaticFinalGetter:
+      if (IsBytecodeFieldInitializer(function, Z)) {
+        ReadCode(function, function.bytecode_offset());
+      } else {
+        BytecodeScopeBuilder(parsed_function).BuildScopes();
+      }
+      break;
+    case RawFunction::kMethodExtractor:
+      BytecodeScopeBuilder(parsed_function).BuildScopes();
+      break;
+    case RawFunction::kRegularFunction:
+    case RawFunction::kGetterFunction:
+    case RawFunction::kSetterFunction:
+    case RawFunction::kClosureFunction:
+    case RawFunction::kConstructor:
+      ReadCode(function, function.bytecode_offset());
+      break;
+    case RawFunction::kNoSuchMethodDispatcher:
+    case RawFunction::kInvokeFieldDispatcher:
+    case RawFunction::kSignatureFunction:
+    case RawFunction::kIrregexpFunction:
+    case RawFunction::kFfiTrampoline:
+      UNREACHABLE();
+      break;
+  }
+}
+
+void BytecodeReaderHelper::ParseForwarderFunction(
+    ParsedFunction* parsed_function,
+    const Function& function,
+    const Function& target) {
+  ASSERT(function.IsImplicitClosureFunction() ||
+         function.IsDynamicInvocationForwarder());
+
+  ASSERT(target.is_declared_in_bytecode());
+
+  if (function.IsDynamicInvocationForwarder() &&
+      target.IsImplicitSetterFunction()) {
+    BytecodeScopeBuilder(parsed_function).BuildScopes();
+    return;
+  }
+
+  if (!target.HasBytecode()) {
+    ReadCode(target, target.bytecode_offset());
+  }
+
+  BytecodeScopeBuilder(parsed_function).BuildScopes();
+
+  const auto& target_bytecode = Bytecode::Handle(Z, target.bytecode());
+  const auto& obj_pool = ObjectPool::Handle(Z, target_bytecode.object_pool());
+
+  AlternativeReadingScope alt(&helper_->reader_, &H.metadata_payloads(),
+                              target.bytecode_offset());
+
+  const intptr_t flags = helper_->reader_.ReadUInt();
+  const bool has_parameters_flags = (flags & Code::kHasParameterFlagsFlag) != 0;
+  const bool has_forwarding_stub_target =
+      (flags & Code::kHasForwardingStubTargetFlag) != 0;
+  const bool has_default_function_type_args =
+      (flags & Code::kHasDefaultFunctionTypeArgsFlag) != 0;
+
+  if (has_parameters_flags) {
+    const intptr_t num_params = helper_->reader_.ReadUInt();
+    const intptr_t num_implicit_params = function.NumImplicitParameters();
+    for (intptr_t i = 0; i < num_params; ++i) {
+      const intptr_t flags = helper_->reader_.ReadUInt();
+
+      bool is_covariant = (flags & Parameter::kIsCovariantFlag) != 0;
+      bool is_generic_covariant_impl =
+          (flags & Parameter::kIsGenericCovariantImplFlag) != 0;
+
+      LocalVariable* variable =
+          parsed_function->ParameterVariable(num_implicit_params + i);
+
+      if (is_covariant) {
+        variable->set_is_explicit_covariant_parameter();
+      }
+
+      const bool checked_in_method_body =
+          is_covariant || is_generic_covariant_impl;
+
+      if (checked_in_method_body) {
+        variable->set_type_check_mode(LocalVariable::kSkipTypeCheck);
+      } else {
+        ASSERT(variable->type_check_mode() == LocalVariable::kDoTypeCheck);
+      }
+    }
+  }
+
+  if (has_forwarding_stub_target) {
+    const intptr_t cp_index = helper_->reader_.ReadUInt();
+    const auto& forwarding_stub_target =
+        Function::CheckedZoneHandle(Z, obj_pool.ObjectAt(cp_index));
+    parsed_function->MarkForwardingStub(&forwarding_stub_target);
+  }
+
+  if (has_default_function_type_args) {
+    ASSERT(function.IsGeneric());
+    const intptr_t cp_index = helper_->reader_.ReadUInt();
+    const auto& type_args =
+        TypeArguments::CheckedHandle(Z, obj_pool.ObjectAt(cp_index));
+    parsed_function->SetDefaultFunctionTypeArguments(type_args);
+  }
+
+  if (function.HasOptionalParameters()) {
+    const KBCInstr* raw_bytecode =
+        reinterpret_cast<KBCInstr*>(target_bytecode.PayloadStart());
+    KBCInstr entry = raw_bytecode[0];
+    ASSERT(KernelBytecode::DecodeOpcode(entry) ==
+           KernelBytecode::kEntryOptional);
+    ASSERT(KernelBytecode::DecodeB(entry) ==
+           function.NumOptionalPositionalParameters());
+    ASSERT(KernelBytecode::DecodeC(entry) ==
+           function.NumOptionalNamedParameters());
+
+    const intptr_t num_opt_params = function.NumOptionalParameters();
+    ZoneGrowableArray<const Instance*>* default_values =
+        new (Z) ZoneGrowableArray<const Instance*>(Z, num_opt_params);
+
+    if (function.HasOptionalPositionalParameters()) {
+      for (intptr_t i = 0, n = function.NumOptionalPositionalParameters();
+           i < n; ++i) {
+        const KBCInstr load = raw_bytecode[1 + i];
+        ASSERT(KernelBytecode::DecodeOpcode(load) ==
+               KernelBytecode::kLoadConstant);
+        const auto& value = Instance::CheckedZoneHandle(
+            Z, obj_pool.ObjectAt(KernelBytecode::DecodeD(load)));
+        default_values->Add(&value);
+      }
+    } else {
+      const intptr_t num_fixed_params = function.num_fixed_parameters();
+      auto& param_name = String::Handle(Z);
+      default_values->EnsureLength(num_opt_params, nullptr);
+      for (intptr_t i = 0; i < num_opt_params; ++i) {
+        const KBCInstr load_name = raw_bytecode[1 + 2 * i];
+        const KBCInstr load_value = raw_bytecode[1 + 2 * i + 1];
+        ASSERT(KernelBytecode::DecodeOpcode(load_name) ==
+               KernelBytecode::kLoadConstant);
+        ASSERT(KernelBytecode::DecodeOpcode(load_value) ==
+               KernelBytecode::kLoadConstant);
+        param_name ^= obj_pool.ObjectAt(KernelBytecode::DecodeD(load_name));
+        const auto& value = Instance::CheckedZoneHandle(
+            Z, obj_pool.ObjectAt(KernelBytecode::DecodeD(load_value)));
+
+        const intptr_t num_params = function.NumParameters();
+        intptr_t param_index = num_fixed_params;
+        for (; param_index < num_params; ++param_index) {
+          if (function.ParameterNameAt(param_index) == param_name.raw()) {
+            break;
+          }
+        }
+        ASSERT(param_index < num_params);
+        ASSERT(default_values->At(param_index - num_fixed_params) == nullptr);
+        (*default_values)[param_index - num_fixed_params] = &value;
+      }
+    }
+
+    parsed_function->set_default_parameter_values(default_values);
+  }
+}
+
+RawLibrary* BytecodeReaderHelper::ReadMain() {
+  return Library::RawCast(ReadObject());
+}
+
 intptr_t BytecodeComponentData::GetVersion() const {
   return Smi::Value(Smi::RawCast(data_.At(kVersion)));
 }
@@ -1355,6 +2242,26 @@
   return Smi::Value(Smi::RawCast(data_.At(kObjectsContentsOffset)));
 }
 
+intptr_t BytecodeComponentData::GetMainOffset() const {
+  return Smi::Value(Smi::RawCast(data_.At(kMainOffset)));
+}
+
+intptr_t BytecodeComponentData::GetMembersOffset() const {
+  return Smi::Value(Smi::RawCast(data_.At(kMembersOffset)));
+}
+
+intptr_t BytecodeComponentData::GetCodesOffset() const {
+  return Smi::Value(Smi::RawCast(data_.At(kCodesOffset)));
+}
+
+intptr_t BytecodeComponentData::GetSourcePositionsOffset() const {
+  return Smi::Value(Smi::RawCast(data_.At(kSourcePositionsOffset)));
+}
+
+intptr_t BytecodeComponentData::GetAnnotationsOffset() const {
+  return Smi::Value(Smi::RawCast(data_.At(kAnnotationsOffset)));
+}
+
 void BytecodeComponentData::SetObject(intptr_t index, const Object& obj) const {
   data_.SetAt(kNumFields + index, obj);
 }
@@ -1369,6 +2276,11 @@
                                      intptr_t strings_header_offset,
                                      intptr_t strings_contents_offset,
                                      intptr_t objects_contents_offset,
+                                     intptr_t main_offset,
+                                     intptr_t members_offset,
+                                     intptr_t codes_offset,
+                                     intptr_t source_positions_offset,
+                                     intptr_t annotations_offset,
                                      Heap::Space space) {
   const Array& data =
       Array::Handle(zone, Array::New(kNumFields + num_objects, space));
@@ -1386,6 +2298,21 @@
   smi_handle = Smi::New(objects_contents_offset);
   data.SetAt(kObjectsContentsOffset, smi_handle);
 
+  smi_handle = Smi::New(main_offset);
+  data.SetAt(kMainOffset, smi_handle);
+
+  smi_handle = Smi::New(members_offset);
+  data.SetAt(kMembersOffset, smi_handle);
+
+  smi_handle = Smi::New(codes_offset);
+  data.SetAt(kCodesOffset, smi_handle);
+
+  smi_handle = Smi::New(source_positions_offset);
+  data.SetAt(kSourcePositionsOffset, smi_handle);
+
+  smi_handle = Smi::New(annotations_offset);
+  data.SetAt(kAnnotationsOffset, smi_handle);
+
   return data.raw();
 }
 
@@ -1436,6 +2363,42 @@
   }
 }
 
+RawObject* BytecodeReader::ReadAnnotation(const Field& annotation_field) {
+  ASSERT(annotation_field.is_declared_in_bytecode());
+
+  Thread* thread = Thread::Current();
+  Zone* zone = thread->zone();
+  ASSERT(thread->IsMutatorThread());
+
+  const Script& script = Script::Handle(zone, annotation_field.Script());
+  TranslationHelper translation_helper(thread);
+  translation_helper.InitFromScript(script);
+
+  KernelReaderHelper reader_helper(
+      zone, &translation_helper, script,
+      ExternalTypedData::Handle(zone, annotation_field.KernelData()),
+      annotation_field.KernelDataProgramOffset());
+  ActiveClass active_class;
+
+  BytecodeMetadataHelper bytecode_metadata_helper(&reader_helper,
+                                                  &active_class);
+
+  return bytecode_metadata_helper.ReadAnnotation(
+      annotation_field.bytecode_offset());
+}
+
+bool IsBytecodeFieldInitializer(const Function& function, Zone* zone) {
+  if (IsFieldInitializer(function, zone)) {
+    return true;
+  }
+  if (function.kind() == RawFunction::kImplicitStaticFinalGetter) {
+    const auto& field = Field::Handle(zone, function.accessor_field());
+    return field.is_declared_in_bytecode() && field.is_const() &&
+           field.has_initializer();
+  }
+  return false;
+}
+
 }  // namespace kernel
 }  // namespace dart
 
diff --git a/runtime/vm/compiler/frontend/bytecode_reader.h b/runtime/vm/compiler/frontend/bytecode_reader.h
index 600dc84..c8859cd 100644
--- a/runtime/vm/compiler/frontend/bytecode_reader.h
+++ b/runtime/vm/compiler/frontend/bytecode_reader.h
@@ -28,6 +28,20 @@
 
   void ReadMetadata(const Function& function);
 
+  void ParseBytecodeFunction(ParsedFunction* parsed_function);
+  void ParseBytecodeImplicitClosureFunction(ParsedFunction* parsed_function);
+
+  // Reads members associated with given [node_offset] and fills in [cls].
+  // Discards fields if [discard_fields] is true.
+  // Returns true if class members are loaded.
+  bool ReadMembers(intptr_t node_offset, const Class& cls, bool discard_fields);
+
+  // Read annotation at given offset.
+  RawObject* ReadAnnotation(intptr_t annotation_offset);
+
+  RawLibrary* GetMainLibrary();
+
+  RawArray* GetBytecodeComponent();
   RawArray* ReadBytecodeComponent();
 
  private:
@@ -43,9 +57,35 @@
                                 ActiveClass* active_class,
                                 BytecodeComponentData* bytecode_component);
 
-  void ReadMemberBytecode(const Function& function, intptr_t md_offset);
+  void ReadCode(const Function& function, intptr_t code_offset);
+
+  void ReadMembers(const Class& cls,
+                   intptr_t members_offset,
+                   bool discard_fields);
+
+  void ReadFieldDeclarations(const Class& cls, bool discard_fields);
+  void ReadFunctionDeclarations(const Class& cls);
+
+  void ParseBytecodeFunction(ParsedFunction* parsed_function,
+                             const Function& function);
+
+  RawLibrary* ReadMain();
 
   RawArray* ReadBytecodeComponent(intptr_t md_offset);
+  RawArray* ReadBytecodeComponentV2(intptr_t md_offset);
+
+  // Fills in [is_covariant] and [is_generic_covariant_impl] vectors
+  // according to covariance attributes of [function] parameters.
+  //
+  // [function] should be declared in bytecode.
+  // [is_covariant] and [is_generic_covariant_impl] should contain bitvectors
+  // of function.NumParameters() length.
+  void ReadParameterCovariance(const Function& function,
+                               BitVector* is_covariant,
+                               BitVector* is_generic_covariant_impl);
+
+  // Read bytecode PackedObject.
+  RawObject* ReadObject();
 
  private:
   // These constants should match corresponding constants in class ObjectHandle
@@ -60,6 +100,25 @@
   static const int kFlagBit3 = 1 << 8;
   static const int kFlagsMask = (kFlagBit0 | kFlagBit1 | kFlagBit2 | kFlagBit3);
 
+  // Code flags, must be in sync with Code constants in
+  // pkg/vm/lib/bytecode/declarations.dart.
+  struct Code {
+    static const int kHasExceptionsTableFlag = 1 << 0;
+    static const int kHasSourcePositionsFlag = 1 << 1;
+    static const int kHasNullableFieldsFlag = 1 << 2;
+    static const int kHasClosuresFlag = 1 << 3;
+    static const int kHasParameterFlagsFlag = 1 << 4;
+    static const int kHasForwardingStubTargetFlag = 1 << 5;
+    static const int kHasDefaultFunctionTypeArgsFlag = 1 << 6;
+  };
+
+  // Parameter flags, must be in sync with ParameterDeclaration constants in
+  // pkg/vm/lib/bytecode/declarations.dart.
+  struct Parameter {
+    static const int kIsCovariantFlag = 1 << 0;
+    static const int kIsGenericCovariantImplFlag = 1 << 1;
+  };
+
   class FunctionTypeScope : public ValueObject {
    public:
     explicit FunctionTypeScope(BytecodeReaderHelper* bytecode_reader)
@@ -76,6 +135,32 @@
     TypeArguments* const saved_type_parameters_;
   };
 
+  class FunctionScope : public ValueObject {
+   public:
+    FunctionScope(BytecodeReaderHelper* bytecode_reader,
+                  const Function& function,
+                  const String& name,
+                  const Class& cls)
+        : bytecode_reader_(bytecode_reader) {
+      ASSERT(bytecode_reader_->scoped_function_.IsNull());
+      ASSERT(bytecode_reader_->scoped_function_name_.IsNull());
+      ASSERT(bytecode_reader_->scoped_function_class_.IsNull());
+      ASSERT(name.IsSymbol());
+      bytecode_reader_->scoped_function_ = function.raw();
+      bytecode_reader_->scoped_function_name_ = name.raw();
+      bytecode_reader_->scoped_function_class_ = cls.raw();
+    }
+
+    ~FunctionScope() {
+      bytecode_reader_->scoped_function_ = Function::null();
+      bytecode_reader_->scoped_function_name_ = String::null();
+      bytecode_reader_->scoped_function_class_ = Class::null();
+    }
+
+   private:
+    BytecodeReaderHelper* bytecode_reader_;
+  };
+
   void ReadClosureDeclaration(const Function& function, intptr_t closureIndex);
   RawType* ReadFunctionSignature(const Function& func,
                                  bool has_optional_positional_params,
@@ -83,8 +168,7 @@
                                  bool has_type_params,
                                  bool has_positional_param_names);
   void ReadTypeParametersDeclaration(const Class& parameterized_class,
-                                     const Function& parameterized_function,
-                                     intptr_t num_type_params);
+                                     const Function& parameterized_function);
 
   void ReadConstantPool(const Function& function, const ObjectPool& pool);
   RawBytecode* ReadBytecode(const ObjectPool& pool);
@@ -92,20 +176,30 @@
   void ReadSourcePositions(const Bytecode& bytecode, bool has_source_positions);
   RawTypedData* NativeEntry(const Function& function,
                             const String& external_name);
+  RawString* ConstructorName(const Class& cls, const String& name);
 
-  RawObject* ReadObject();
   RawObject* ReadObjectContents(uint32_t header);
   RawObject* ReadConstObject(intptr_t tag);
   RawString* ReadString(bool is_canonical = true);
   RawTypeArguments* ReadTypeArguments(const Class& instantiator);
+  RawPatchClass* GetPatchClass(const Class& cls, const Script& script);
+  void ParseForwarderFunction(ParsedFunction* parsed_function,
+                              const Function& function,
+                              const Function& target);
 
   KernelReaderHelper* const helper_;
   TranslationHelper& translation_helper_;
   ActiveClass* const active_class_;
   Zone* const zone_;
   BytecodeComponentData* const bytecode_component_;
-  Array* closures_;
-  TypeArguments* function_type_type_parameters_;
+  Array* closures_ = nullptr;
+  TypeArguments* function_type_type_parameters_ = nullptr;
+  PatchClass* patch_class_ = nullptr;
+  Array* functions_ = nullptr;
+  intptr_t function_index_ = 0;
+  Function& scoped_function_;
+  String& scoped_function_name_;
+  Class& scoped_function_class_;
 
   DISALLOW_COPY_AND_ASSIGN(BytecodeReaderHelper);
 };
@@ -117,6 +211,11 @@
     kStringsHeaderOffset,
     kStringsContentsOffset,
     kObjectsContentsOffset,
+    kMainOffset,
+    kMembersOffset,
+    kCodesOffset,
+    kSourcePositionsOffset,
+    kAnnotationsOffset,
     kNumFields
   };
 
@@ -126,6 +225,11 @@
   intptr_t GetStringsHeaderOffset() const;
   intptr_t GetStringsContentsOffset() const;
   intptr_t GetObjectsContentsOffset() const;
+  intptr_t GetMainOffset() const;
+  intptr_t GetMembersOffset() const;
+  intptr_t GetCodesOffset() const;
+  intptr_t GetSourcePositionsOffset() const;
+  intptr_t GetAnnotationsOffset() const;
   void SetObject(intptr_t index, const Object& obj) const;
   RawObject* GetObject(intptr_t index) const;
 
@@ -137,6 +241,11 @@
                        intptr_t strings_header_offset,
                        intptr_t strings_contents_offset,
                        intptr_t objects_contents_offset,
+                       intptr_t main_offset,
+                       intptr_t members_offset,
+                       intptr_t codes_offset,
+                       intptr_t source_positions_offset,
+                       intptr_t annotations_offset,
                        Heap::Space space);
 
  private:
@@ -149,6 +258,9 @@
   // Returns error (if any), or null.
   static RawError* ReadFunctionBytecode(Thread* thread,
                                         const Function& function);
+
+  // Read annotation for the given annotation field.
+  static RawObject* ReadAnnotation(const Field& annotation_field);
 };
 
 class BytecodeSourcePositionsIterator : ValueObject {
@@ -191,6 +303,11 @@
   intptr_t cur_token_pos_;
 };
 
+// Returns [true] iff [function] body is a field initializer in bytecode.
+// This is [true] for ordinary static field initializers and getters of
+// const static fields.
+bool IsBytecodeFieldInitializer(const Function& function, Zone* zone);
+
 }  // namespace kernel
 }  // namespace dart
 
diff --git a/runtime/vm/compiler/frontend/bytecode_scope_builder.cc b/runtime/vm/compiler/frontend/bytecode_scope_builder.cc
new file mode 100644
index 0000000..5ff308b
--- /dev/null
+++ b/runtime/vm/compiler/frontend/bytecode_scope_builder.cc
@@ -0,0 +1,183 @@
+// Copyright (c) 2018, the Dart project authors.  Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+#include "vm/compiler/frontend/bytecode_scope_builder.h"
+
+#include "vm/compiler/frontend/bytecode_reader.h"  // For IsBytecodeFieldInitializer.
+
+#if !defined(DART_PRECOMPILED_RUNTIME)
+
+namespace dart {
+namespace kernel {
+
+#define Z (zone_)
+
+BytecodeScopeBuilder::BytecodeScopeBuilder(ParsedFunction* parsed_function)
+    : parsed_function_(parsed_function),
+      zone_(parsed_function->zone()),
+      scope_(nullptr) {}
+
+void BytecodeScopeBuilder::BuildScopes() {
+  if (parsed_function_->node_sequence() != nullptr) {
+    return;  // Scopes are already built.
+  }
+
+  const Function& function = parsed_function_->function();
+
+  LocalScope* enclosing_scope = nullptr;
+  if (function.IsImplicitClosureFunction() && !function.is_static()) {
+    // Create artificial enclosing scope for the tear-off that contains
+    // captured receiver value. This ensure that AssertAssignable will correctly
+    // load instantiator type arguments if they are needed.
+    LocalVariable* receiver_variable =
+        MakeReceiverVariable(/* is_parameter = */ false);
+    receiver_variable->set_is_captured();
+    enclosing_scope = new (Z) LocalScope(NULL, 0, 0);
+    enclosing_scope->set_context_level(0);
+    enclosing_scope->AddVariable(receiver_variable);
+    enclosing_scope->AddContextVariable(receiver_variable);
+  }
+  scope_ = new (Z) LocalScope(enclosing_scope, 0, 0);
+  scope_->set_begin_token_pos(function.token_pos());
+  scope_->set_end_token_pos(function.end_token_pos());
+
+  // Add function type arguments variable before current context variable.
+  if ((function.IsGeneric() || function.HasGenericParent())) {
+    LocalVariable* type_args_var = MakeVariable(
+        Symbols::FunctionTypeArgumentsVar(), AbstractType::dynamic_type());
+    scope_->AddVariable(type_args_var);
+    parsed_function_->set_function_type_arguments(type_args_var);
+  }
+
+  bool needs_expr_temp = false;
+  if (parsed_function_->has_arg_desc_var()) {
+    needs_expr_temp = true;
+    scope_->AddVariable(parsed_function_->arg_desc_var());
+  }
+
+  LocalVariable* context_var = parsed_function_->current_context_var();
+  context_var->set_is_forced_stack();
+  scope_->AddVariable(context_var);
+
+  parsed_function_->SetNodeSequence(
+      new SequenceNode(TokenPosition::kNoSource, scope_));
+
+  switch (function.kind()) {
+    case RawFunction::kImplicitClosureFunction: {
+      ASSERT(function.NumImplicitParameters() == 1);
+
+      LocalVariable* closure_parameter = MakeVariable(
+          Symbols::ClosureParameter(), AbstractType::dynamic_type());
+      closure_parameter->set_is_forced_stack();
+      scope_->InsertParameterAt(0, closure_parameter);
+
+      // Type check all parameters by default.
+      // This may be overridden with parameter flags in
+      // BytecodeReaderHelper::ParseImplicitClosureFunction.
+      AddParameters(function, LocalVariable::kDoTypeCheck);
+      break;
+    }
+
+    case RawFunction::kImplicitGetter:
+    case RawFunction::kImplicitSetter: {
+      const bool is_setter = function.IsImplicitSetterFunction();
+      const bool is_method = !function.IsStaticFunction();
+      intptr_t pos = 0;
+      if (is_method) {
+        MakeReceiverVariable(/* is_parameter = */ true);
+        ++pos;
+      }
+      if (is_setter) {
+        LocalVariable* setter_value = MakeVariable(
+            Symbols::Value(),
+            AbstractType::ZoneHandle(Z, function.ParameterTypeAt(pos)));
+        scope_->InsertParameterAt(pos++, setter_value);
+
+        if (is_method) {
+          const Field& field = Field::Handle(Z, function.accessor_field());
+          if (field.is_covariant()) {
+            setter_value->set_is_explicit_covariant_parameter();
+          } else if (!field.is_generic_covariant_impl()) {
+            setter_value->set_type_check_mode(
+                LocalVariable::kTypeCheckedByCaller);
+          }
+        }
+      }
+      break;
+    }
+    case RawFunction::kImplicitStaticFinalGetter:
+      ASSERT(!IsBytecodeFieldInitializer(function, Z));
+      break;
+    case RawFunction::kDynamicInvocationForwarder: {
+      // Create [this] variable.
+      MakeReceiverVariable(/* is_parameter = */ true);
+
+      // Type check all parameters by default.
+      // This may be overridden with parameter flags in
+      // BytecodeReaderHelper::ParseImplicitClosureFunction.
+      AddParameters(function, LocalVariable::kDoTypeCheck);
+      break;
+    }
+    case RawFunction::kMethodExtractor: {
+      // Add a receiver parameter.  Though it is captured, we emit code to
+      // explicitly copy it to a fixed offset in a freshly-allocated context
+      // instead of using the generic code for regular functions.
+      // Therefore, it isn't necessary to mark it as captured here.
+      MakeReceiverVariable(/* is_parameter = */ true);
+      break;
+    }
+    default:
+      UNREACHABLE();
+  }
+
+  if (needs_expr_temp) {
+    scope_->AddVariable(parsed_function_->EnsureExpressionTemp());
+  }
+  if (parsed_function_->function().MayHaveUncheckedEntryPoint(
+          parsed_function_->isolate())) {
+    scope_->AddVariable(parsed_function_->EnsureEntryPointsTemp());
+  }
+  parsed_function_->AllocateVariables();
+}
+
+// TODO(alexmarkov): pass bitvectors of parameter covariance to set type
+// check mode before AllocateVariables.
+void BytecodeScopeBuilder::AddParameters(const Function& function,
+                                         LocalVariable::TypeCheckMode mode) {
+  for (intptr_t i = function.NumImplicitParameters(),
+                n = function.NumParameters();
+       i < n; ++i) {
+    // LocalVariable caches handles, so new handles are created for each
+    // parameter.
+    String& name = String::ZoneHandle(Z, function.ParameterNameAt(i));
+    AbstractType& type =
+        AbstractType::ZoneHandle(Z, function.ParameterTypeAt(i));
+
+    LocalVariable* variable = MakeVariable(name, type);
+    variable->set_type_check_mode(mode);
+    scope_->InsertParameterAt(i, variable);
+  }
+}
+
+LocalVariable* BytecodeScopeBuilder::MakeVariable(const String& name,
+                                                  const AbstractType& type) {
+  return new (Z) LocalVariable(TokenPosition::kNoSource,
+                               TokenPosition::kNoSource, name, type, nullptr);
+}
+
+LocalVariable* BytecodeScopeBuilder::MakeReceiverVariable(bool is_parameter) {
+  const auto& cls = Class::Handle(Z, parsed_function_->function().Owner());
+  const auto& type = Type::ZoneHandle(Z, cls.DeclarationType());
+  LocalVariable* receiver_variable = MakeVariable(Symbols::This(), type);
+  parsed_function_->set_receiver_var(receiver_variable);
+  if (is_parameter) {
+    scope_->InsertParameterAt(0, receiver_variable);
+  }
+  return receiver_variable;
+}
+
+}  // namespace kernel
+}  // namespace dart
+
+#endif  // !defined(DART_PRECOMPILED_RUNTIME)
diff --git a/runtime/vm/compiler/frontend/bytecode_scope_builder.h b/runtime/vm/compiler/frontend/bytecode_scope_builder.h
new file mode 100644
index 0000000..4436565
--- /dev/null
+++ b/runtime/vm/compiler/frontend/bytecode_scope_builder.h
@@ -0,0 +1,40 @@
+// Copyright (c) 2019, the Dart project authors. Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+#ifndef RUNTIME_VM_COMPILER_FRONTEND_BYTECODE_SCOPE_BUILDER_H_
+#define RUNTIME_VM_COMPILER_FRONTEND_BYTECODE_SCOPE_BUILDER_H_
+
+#if !defined(DART_PRECOMPILED_RUNTIME)
+
+#include "vm/object.h"
+#include "vm/parser.h"  // For ParsedFunction.
+#include "vm/scopes.h"
+
+namespace dart {
+namespace kernel {
+
+// Builds scopes, populates parameters and local variables for
+// certain functions declared in bytecode.
+class BytecodeScopeBuilder : public ValueObject {
+ public:
+  explicit BytecodeScopeBuilder(ParsedFunction* parsed_function);
+
+  void BuildScopes();
+
+ private:
+  void AddParameters(const Function& function,
+                     LocalVariable::TypeCheckMode mode);
+  LocalVariable* MakeVariable(const String& name, const AbstractType& type);
+  LocalVariable* MakeReceiverVariable(bool is_parameter);
+
+  ParsedFunction* parsed_function_;
+  Zone* zone_;
+  LocalScope* scope_;
+};
+
+}  // namespace kernel
+}  // namespace dart
+
+#endif  // !defined(DART_PRECOMPILED_RUNTIME)
+#endif  // RUNTIME_VM_COMPILER_FRONTEND_BYTECODE_SCOPE_BUILDER_H_
diff --git a/runtime/vm/compiler/frontend/constant_evaluator.cc b/runtime/vm/compiler/frontend/constant_evaluator.cc
index 861a19a..002b8f8f 100644
--- a/runtime/vm/compiler/frontend/constant_evaluator.cc
+++ b/runtime/vm/compiler/frontend/constant_evaluator.cc
@@ -383,8 +383,7 @@
       H.ReportError(script_, position, "Not a constant expression.");
     } else if (field.StaticValue() == Object::sentinel().raw()) {
       field.SetStaticValue(Object::transition_sentinel());
-      const Object& value =
-          Object::Handle(Compiler::EvaluateStaticInitializer(field));
+      const Object& value = Object::Handle(Z, field.EvaluateInitializer());
       if (value.IsError()) {
         field.SetStaticValue(Object::null_instance());
         H.ReportError(Error::Cast(value), script_, position,
@@ -1045,7 +1044,7 @@
   }
 
   bool is_present = false;
-  ASSERT(!script_.IsReadOnly());
+  ASSERT(!script_.InVMIsolateHeap());
   if (script_.compile_time_constants() == Array::null()) {
     return false;
   }
@@ -1075,7 +1074,7 @@
     return;
   }
   const intptr_t kInitialConstMapSize = 16;
-  ASSERT(!script_.IsReadOnly());
+  ASSERT(!script_.InVMIsolateHeap());
   if (script_.compile_time_constants() == Array::null()) {
     const Array& array = Array::Handle(
         HashTables::New<KernelConstantsMap>(kInitialConstMapSize, Heap::kNew));
@@ -1205,7 +1204,7 @@
         temp_array_.SetTypeArguments(temp_type_arguments_);
         for (intptr_t j = 0; j < length; ++j) {
           const intptr_t entry_offset = helper_.ReadUInt();
-          ASSERT(entry_offset < offset);  // We have a DAG!
+          ASSERT(entry_offset < (offset - start_offset));  // We have a DAG!
           temp_object_ = constants.GetOrDie(entry_offset);
           temp_array_.SetAt(j, temp_object_);
         }
@@ -1249,7 +1248,7 @@
           temp_field_ =
               H.LookupFieldByKernelField(helper_.ReadCanonicalNameReference());
           const intptr_t entry_offset = helper_.ReadUInt();
-          ASSERT(entry_offset < offset);  // We have a DAG!
+          ASSERT(entry_offset < (offset - start_offset));  // We have a DAG!
           temp_object_ = constants.GetOrDie(entry_offset);
           temp_instance_.SetField(temp_field_, temp_object_);
         }
@@ -1259,6 +1258,7 @@
       }
       case kPartialInstantiationConstant: {
         const intptr_t entry_offset = helper_.ReadUInt();
+        ASSERT(entry_offset < (offset - start_offset));  // We have a DAG!
         temp_object_ = constants.GetOrDie(entry_offset);
 
         // Happens if the tearoff was in the vmservice library and we have
diff --git a/runtime/vm/compiler/frontend/kernel_binary_flowgraph.cc b/runtime/vm/compiler/frontend/kernel_binary_flowgraph.cc
index 95b52d3..83a9d2a 100644
--- a/runtime/vm/compiler/frontend/kernel_binary_flowgraph.cc
+++ b/runtime/vm/compiler/frontend/kernel_binary_flowgraph.cc
@@ -909,7 +909,6 @@
   ASSERT(flow_graph_builder_ != nullptr);
 
   const Function& function = parsed_function()->function();
-  const intptr_t kernel_offset = function.kernel_offset();
 
   // Setup a [ActiveClassScope] and a [ActiveMemberScope] which will be used
   // e.g. for type translation.
@@ -922,61 +921,60 @@
   ActiveMemberScope active_member(active_class(), &outermost_function);
   ActiveTypeParametersScope active_type_params(active_class(), function, Z);
 
-  SetOffset(kernel_offset);
+  if (function.is_declared_in_bytecode()) {
+    if (!(FLAG_use_bytecode_compiler || FLAG_enable_interpreter)) {
+      FATAL1(
+          "Cannot run bytecode function %s: specify --enable-interpreter or "
+          "--use-bytecode-compiler",
+          function.ToFullyQualifiedCString());
+    }
 
+    bytecode_metadata_helper_.ParseBytecodeFunction(parsed_function());
+
+    switch (function.kind()) {
+      case RawFunction::kImplicitClosureFunction:
+        return B->BuildGraphOfImplicitClosureFunction(function);
+      case RawFunction::kImplicitGetter:
+      case RawFunction::kImplicitSetter:
+      case RawFunction::kImplicitStaticFinalGetter:
+        if (!IsBytecodeFieldInitializer(function, Z)) {
+          return B->BuildGraphOfFieldAccessor(function);
+        }
+        break;
+      case RawFunction::kDynamicInvocationForwarder:
+        return B->BuildGraphOfDynamicInvocationForwarder(function);
+      case RawFunction::kMethodExtractor:
+        return B->BuildGraphOfMethodExtractor(function);
+      default:
+        break;
+    }
+
+    ASSERT(function.HasBytecode());
+    BytecodeFlowGraphBuilder bytecode_compiler(
+        flow_graph_builder_, parsed_function(),
+        &(flow_graph_builder_->ic_data_array_));
+    return bytecode_compiler.BuildGraph();
+  }
+
+  // This is the legacy code path to handle bytecode attached to kernel AST
+  // members.
+  // TODO(alexmarkov): clean this up after dropping old format versions.
   if ((FLAG_use_bytecode_compiler || FLAG_enable_interpreter) &&
       function.IsBytecodeAllowed(Z)) {
     if (!function.HasBytecode()) {
       bytecode_metadata_helper_.ReadMetadata(function);
     }
-    if (function.HasBytecode()) {
+    if (function.HasBytecode() &&
+        (function.kind() != RawFunction::kImplicitGetter) &&
+        (function.kind() != RawFunction::kImplicitSetter)) {
       BytecodeFlowGraphBuilder bytecode_compiler(
           flow_graph_builder_, parsed_function(),
           &(flow_graph_builder_->ic_data_array_));
-      FlowGraph* flow_graph = bytecode_compiler.BuildGraph();
-      ASSERT(flow_graph != nullptr);
-      return flow_graph;
+      return bytecode_compiler.BuildGraph();
     }
   }
 
-  // Mark forwarding stubs.
-  switch (function.kind()) {
-    case RawFunction::kRegularFunction:
-    case RawFunction::kImplicitClosureFunction:
-    case RawFunction::kGetterFunction:
-    case RawFunction::kSetterFunction:
-    case RawFunction::kClosureFunction:
-    case RawFunction::kConstructor:
-    case RawFunction::kDynamicInvocationForwarder:
-      if (PeekTag() == kProcedure) {
-        AlternativeReadingScope alt(&reader_);
-        ProcedureHelper procedure_helper(this);
-        procedure_helper.ReadUntilExcluding(ProcedureHelper::kFunction);
-        if (procedure_helper.IsForwardingStub() &&
-            !procedure_helper.IsAbstract()) {
-          const NameIndex target_name =
-              procedure_helper.forwarding_stub_super_target_;
-          ASSERT(target_name != NameIndex::kInvalidName);
-          const String& name = function.IsSetterFunction()
-                                   ? H.DartSetterName(target_name)
-                                   : H.DartProcedureName(target_name);
-          const Function* forwarding_target = &Function::ZoneHandle(
-              Z, H.LookupMethodByMember(target_name, name));
-          ASSERT(!forwarding_target->IsNull());
-          parsed_function()->MarkForwardingStub(forwarding_target);
-        }
-      }
-      break;
-    default:
-      break;
-  }
-
-  // The IR builder will create its own local variables and scopes, and it
-  // will not need an AST.  The code generator will assume that there is a
-  // local variable stack slot allocated for the current context and (I
-  // think) that the runtime will expect it to be at a fixed offset which
-  // requires allocating an unused expression temporary variable.
-  set_scopes(parsed_function()->EnsureKernelScopes());
+  ParseKernelASTFunction();
 
   switch (function.kind()) {
     case RawFunction::kRegularFunction:
@@ -1003,11 +1001,6 @@
       return B->BuildGraphOfFieldAccessor(function);
     }
     case RawFunction::kDynamicInvocationForwarder:
-      if (PeekTag() != kField) {
-        ReadUntilFunctionNode();
-        SetupDefaultParameterValues();
-        ReadDefaultFunctionTypeArguments(function);
-      }
       return B->BuildGraphOfDynamicInvocationForwarder(function);
     case RawFunction::kMethodExtractor:
       return flow_graph_builder_->BuildGraphOfMethodExtractor(function);
@@ -1016,9 +1009,6 @@
     case RawFunction::kInvokeFieldDispatcher:
       return flow_graph_builder_->BuildGraphOfInvokeFieldDispatcher(function);
     case RawFunction::kImplicitClosureFunction:
-      ReadUntilFunctionNode();
-      SetupDefaultParameterValues();
-      ReadDefaultFunctionTypeArguments(function);
       return flow_graph_builder_->BuildGraphOfImplicitClosureFunction(function);
     case RawFunction::kFfiTrampoline:
       return flow_graph_builder_->BuildGraphOfFfiTrampoline(function);
@@ -1030,6 +1020,85 @@
   return NULL;
 }
 
+void StreamingFlowGraphBuilder::ParseKernelASTFunction() {
+  const Function& function = parsed_function()->function();
+
+  const intptr_t kernel_offset = function.kernel_offset();
+  ASSERT(kernel_offset >= 0);
+
+  SetOffset(kernel_offset);
+
+  // Mark forwarding stubs.
+  switch (function.kind()) {
+    case RawFunction::kRegularFunction:
+    case RawFunction::kImplicitClosureFunction:
+    case RawFunction::kGetterFunction:
+    case RawFunction::kSetterFunction:
+    case RawFunction::kClosureFunction:
+    case RawFunction::kConstructor:
+    case RawFunction::kDynamicInvocationForwarder:
+      ReadForwardingStubTarget(function);
+      break;
+    default:
+      break;
+  }
+
+  set_scopes(parsed_function()->EnsureKernelScopes());
+
+  switch (function.kind()) {
+    case RawFunction::kRegularFunction:
+    case RawFunction::kGetterFunction:
+    case RawFunction::kSetterFunction:
+    case RawFunction::kClosureFunction:
+    case RawFunction::kConstructor:
+    case RawFunction::kImplicitGetter:
+    case RawFunction::kImplicitStaticFinalGetter:
+    case RawFunction::kImplicitSetter:
+    case RawFunction::kMethodExtractor:
+    case RawFunction::kNoSuchMethodDispatcher:
+    case RawFunction::kInvokeFieldDispatcher:
+    case RawFunction::kFfiTrampoline:
+      break;
+    case RawFunction::kImplicitClosureFunction:
+      ReadUntilFunctionNode();
+      SetupDefaultParameterValues();
+      ReadDefaultFunctionTypeArguments(function);
+      break;
+    case RawFunction::kDynamicInvocationForwarder:
+      if (PeekTag() != kField) {
+        ReadUntilFunctionNode();
+        SetupDefaultParameterValues();
+        ReadDefaultFunctionTypeArguments(function);
+      }
+      break;
+    case RawFunction::kSignatureFunction:
+    case RawFunction::kIrregexpFunction:
+      UNREACHABLE();
+      break;
+  }
+}
+
+void StreamingFlowGraphBuilder::ReadForwardingStubTarget(
+    const Function& function) {
+  if (PeekTag() == kProcedure) {
+    AlternativeReadingScope alt(&reader_);
+    ProcedureHelper procedure_helper(this);
+    procedure_helper.ReadUntilExcluding(ProcedureHelper::kFunction);
+    if (procedure_helper.IsForwardingStub() && !procedure_helper.IsAbstract()) {
+      const NameIndex target_name =
+          procedure_helper.forwarding_stub_super_target_;
+      ASSERT(target_name != NameIndex::kInvalidName);
+      const String& name = function.IsSetterFunction()
+                               ? H.DartSetterName(target_name)
+                               : H.DartProcedureName(target_name);
+      const Function* forwarding_target =
+          &Function::ZoneHandle(Z, H.LookupMethodByMember(target_name, name));
+      ASSERT(!forwarding_target->IsNull());
+      parsed_function()->MarkForwardingStub(forwarding_target);
+    }
+  }
+}
+
 Fragment StreamingFlowGraphBuilder::BuildStatementAt(intptr_t kernel_offset) {
   SetOffset(kernel_offset);
   return BuildStatement();  // read statement.
@@ -3048,6 +3117,8 @@
                                   NULL));
 
   // Special case identical(x, y) call.
+  // Note: similar optimization is performed in bytecode flow graph builder -
+  // see BytecodeFlowGraphBuilder::BuildDirectCall().
   // TODO(27590) consider moving this into the inliner and force inline it
   // there.
   if (special_case_identical) {
diff --git a/runtime/vm/compiler/frontend/kernel_binary_flowgraph.h b/runtime/vm/compiler/frontend/kernel_binary_flowgraph.h
index bedc54e..ee76b40 100644
--- a/runtime/vm/compiler/frontend/kernel_binary_flowgraph.h
+++ b/runtime/vm/compiler/frontend/kernel_binary_flowgraph.h
@@ -56,10 +56,13 @@
  private:
   Thread* thread() const { return flow_graph_builder_->thread_; }
 
-  FlowGraph* BuildGraphOfFieldInitializer();
+  void ParseKernelASTFunction();
+  void ReadForwardingStubTarget(const Function& function);
   void EvaluateConstFieldValue(const Field& field);
   void SetupDefaultParameterValues();
   void ReadDefaultFunctionTypeArguments(const Function& function);
+
+  FlowGraph* BuildGraphOfFieldInitializer();
   Fragment BuildFieldInitializer(NameIndex canonical_name);
   Fragment BuildInitializers(const Class& parent_class);
   FlowGraph* BuildGraphOfFunction(bool constructor);
diff --git a/runtime/vm/compiler/frontend/kernel_to_il.cc b/runtime/vm/compiler/frontend/kernel_to_il.cc
index 15b989b..b7b19a9 100644
--- a/runtime/vm/compiler/frontend/kernel_to_il.cc
+++ b/runtime/vm/compiler/frontend/kernel_to_il.cc
@@ -130,7 +130,7 @@
 Fragment FlowGraphBuilder::LoadInstantiatorTypeArguments() {
   // TODO(27590): We could use `active_class_->IsGeneric()`.
   Fragment instructions;
-  if (scopes_->type_arguments_variable != NULL) {
+  if (scopes_ != nullptr && scopes_->type_arguments_variable != nullptr) {
 #ifdef DEBUG
     Function& function =
         Function::Handle(Z, parsed_function_->function().raw());
@@ -321,13 +321,8 @@
 
 Fragment FlowGraphBuilder::CheckStackOverflowInPrologue(
     TokenPosition position) {
-  if (IsInlining()) {
-    // If we are inlining don't actually attach the stack check.  We must still
-    // create the stack check in order to allocate a deopt id.
-    CheckStackOverflow(position, loop_depth_);
-    return Fragment();
-  }
-  return CheckStackOverflow(position, loop_depth_);
+  ASSERT(loop_depth_ == 0);
+  return BaseFlowGraphBuilder::CheckStackOverflowInPrologue(position);
 }
 
 Fragment FlowGraphBuilder::CloneContext(
@@ -748,6 +743,8 @@
   const MethodRecognizer::Kind kind = MethodRecognizer::RecognizeKind(function);
   bool omit_result_type_check = true;
   switch (kind) {
+    // On simdbc we fall back to natives.
+#if !defined(TARGET_ARCH_DBC)
     case MethodRecognizer::kTypedData_ByteDataView_factory:
       body += BuildTypedDataViewFactoryConstructor(function, kByteDataViewCid);
       break;
@@ -807,6 +804,7 @@
       body += BuildTypedDataViewFactoryConstructor(
           function, kTypedDataFloat64x2ArrayViewCid);
       break;
+#endif  // !defined(TARGET_ARCH_DBC)
     case MethodRecognizer::kObjectEquals:
       body += LoadLocal(parsed_function_->receiver_var());
       body += LoadLocal(first_parameter);
@@ -830,14 +828,11 @@
       body += LoadLocal(parsed_function_->receiver_var());
       body += LoadNativeField(Slot::Array_length());
       break;
-    case MethodRecognizer::kTypedDataLength:
-      body += LoadLocal(parsed_function_->receiver_var());
-      body += LoadNativeField(Slot::TypedData_length());
-      break;
+    case MethodRecognizer::kTypedListLength:
+    case MethodRecognizer::kTypedListViewLength:
     case MethodRecognizer::kByteDataViewLength:
-    case MethodRecognizer::kTypedDataViewLength:
       body += LoadLocal(parsed_function_->receiver_var());
-      body += LoadNativeField(Slot::TypedDataView_length());
+      body += LoadNativeField(Slot::TypedDataBase_length());
       break;
     case MethodRecognizer::kByteDataViewOffsetInBytes:
     case MethodRecognizer::kTypedDataViewOffsetInBytes:
@@ -1032,7 +1027,21 @@
 
   body += LoadLocal(view_object);
   body += LoadLocal(length);
-  body += StoreInstanceField(token_pos, Slot::TypedDataView_length());
+  body += StoreInstanceField(token_pos, Slot::TypedDataBase_length());
+
+  // Update the inner pointer.
+  //
+  // WARNING: Notice that we assume here no GC happens between those 4
+  // instructions!
+  body += LoadLocal(view_object);
+  body += LoadLocal(typed_data);
+  body += LoadUntagged(TypedDataBase::data_field_offset());
+  body += ConvertUntaggedToIntptr();
+  body += LoadLocal(offset_in_bytes);
+  body += UnboxSmiToIntptr();
+  body += AddIntptrIntegers();
+  body += ConvertIntptrToUntagged();
+  body += StoreUntagged(TypedDataView::data_field_offset());
 
   return body;
 }
@@ -2419,6 +2428,18 @@
   return Fragment(box);
 }
 
+Fragment FlowGraphBuilder::FfiUnboxedExtend(Representation representation,
+                                            const AbstractType& ffi_type) {
+  const intptr_t width =
+      compiler::ffi::ElementSizeInBytes(ffi_type.type_class_id());
+  if (width >= compiler::ffi::kMinimumArgumentWidth) return {};
+
+  auto* extend =
+      new (Z) UnboxedWidthExtenderInstr(Pop(), representation, width);
+  Push(extend);
+  return Fragment(extend);
+}
+
 Fragment FlowGraphBuilder::FfiPointerFromAddress(const Type& result_type) {
   Fragment test;
   TargetEntryInstr* null_entry;
@@ -2473,7 +2494,8 @@
 
 FlowGraph* FlowGraphBuilder::BuildGraphOfFfiTrampoline(
     const Function& function) {
-#if !defined(TARGET_ARCH_X64)
+#if !defined(TARGET_ARCH_X64) && !defined(TARGET_ARCH_ARM64) &&                \
+    !defined(TARGET_ARCH_IA32)
   UNREACHABLE();
 #else
   graph_entry_ =
@@ -2513,9 +2535,11 @@
 
     if (compiler::ffi::NativeTypeIsPointer(ffi_type)) {
       body += LoadAddressFromFfiPointer();
-      body += UnboxTruncate(kUnboxedIntPtr);
+      body += UnboxTruncate(kUnboxedFfiIntPtr);
     } else {
-      body += UnboxTruncate(arg_reps[pos - 1]);
+      Representation rep = arg_reps[pos - 1];
+      body += UnboxTruncate(rep);
+      body += FfiUnboxedExtend(rep, ffi_type);
     }
   }
 
@@ -2527,18 +2551,20 @@
       thread_, *MakeImplicitClosureScope(
                     Z, Class::Handle(I->object_store()->ffi_pointer_class()))
                     ->context_variables()[0]));
-  body += UnboxTruncate(kUnboxedIntPtr);
+  body += UnboxTruncate(kUnboxedFfiIntPtr);
   body += FfiCall(signature, arg_reps, arg_locs);
 
   ffi_type = signature.result_type();
   if (compiler::ffi::NativeTypeIsPointer(ffi_type)) {
-    body += Box(kUnboxedIntPtr);
+    body += Box(kUnboxedFfiIntPtr);
     body += FfiPointerFromAddress(Type::Cast(ffi_type));
   } else if (compiler::ffi::NativeTypeIsVoid(ffi_type)) {
     body += Drop();
     body += NullConstant();
   } else {
-    body += Box(compiler::ffi::ResultRepresentation(signature));
+    Representation rep = compiler::ffi::ResultRepresentation(signature);
+    body += FfiUnboxedExtend(rep, ffi_type);
+    body += Box(rep);
   }
 
   body += Return(TokenPosition::kNoSource);
diff --git a/runtime/vm/compiler/frontend/kernel_to_il.h b/runtime/vm/compiler/frontend/kernel_to_il.h
index 1e76f9a..4355383 100644
--- a/runtime/vm/compiler/frontend/kernel_to_il.h
+++ b/runtime/vm/compiler/frontend/kernel_to_il.h
@@ -217,6 +217,11 @@
   // Sign-extends kUnboxedInt32 and zero-extends kUnboxedUint32.
   Fragment Box(Representation from);
 
+  // Sign- or zero-extends an integer parameter or return value for an FFI call
+  // as necessary.
+  Fragment FfiUnboxedExtend(Representation representation,
+                            const AbstractType& ffi_type);
+
   // Pops an 'ffi.Pointer' off the stack.
   // If it's null, pushes 0.
   // Otherwise pushes the address (in boxed representation).
diff --git a/runtime/vm/compiler/frontend/kernel_translation_helper.cc b/runtime/vm/compiler/frontend/kernel_translation_helper.cc
index ebd4ed7..5fd9a77 100644
--- a/runtime/vm/compiler/frontend/kernel_translation_helper.cc
+++ b/runtime/vm/compiler/frontend/kernel_translation_helper.cc
@@ -82,6 +82,16 @@
   SetKernelProgramInfo(info);
 }
 
+RawGrowableObjectArray* TranslationHelper::EnsurePotentialPragmaFunctions() {
+  auto& funcs =
+      GrowableObjectArray::Handle(Z, info_.potential_pragma_functions());
+  if (funcs.IsNull()) {
+    funcs = GrowableObjectArray::New(16, Heap::kNew);
+    info_.set_potential_pragma_functions(funcs);
+  }
+  return funcs.raw();
+}
+
 void TranslationHelper::SetStringOffsets(const TypedData& string_offsets) {
   ASSERT(string_offsets_.IsNull());
   string_offsets_ = string_offsets.raw();
@@ -657,6 +667,34 @@
   return type;
 }
 
+void TranslationHelper::SetupFieldAccessorFunction(
+    const Class& klass,
+    const Function& function,
+    const AbstractType& field_type) {
+  bool is_setter = function.IsImplicitSetterFunction();
+  bool is_method = !function.IsStaticFunction();
+  intptr_t parameter_count = (is_method ? 1 : 0) + (is_setter ? 1 : 0);
+
+  function.SetNumOptionalParameters(0, false);
+  function.set_num_fixed_parameters(parameter_count);
+  function.set_parameter_types(
+      Array::Handle(Z, Array::New(parameter_count, Heap::kOld)));
+  function.set_parameter_names(
+      Array::Handle(Z, Array::New(parameter_count, Heap::kOld)));
+
+  intptr_t pos = 0;
+  if (is_method) {
+    function.SetParameterTypeAt(pos, GetDeclarationType(klass));
+    function.SetParameterNameAt(pos, Symbols::This());
+    pos++;
+  }
+  if (is_setter) {
+    function.SetParameterTypeAt(pos, field_type);
+    function.SetParameterNameAt(pos, Symbols::Value());
+    pos++;
+  }
+}
+
 void TranslationHelper::ReportError(const char* format, ...) {
   const Script& null_script = Script::Handle(Z);
 
@@ -1894,9 +1932,8 @@
 }
 
 void KernelReaderHelper::ReportUnexpectedTag(const char* variant, Tag tag) {
-  H.ReportError(script_, TokenPosition::kNoSource,
-                "Unexpected tag %d (%s) in ?, expected %s", tag,
-                Reader::TagName(tag), variant);
+  FATAL3("Unexpected tag %d (%s) in ?, expected %s", tag, Reader::TagName(tag),
+         variant);
 }
 
 void KernelReaderHelper::ReadUntilFunctionNode() {
@@ -2617,6 +2654,26 @@
   return line_starts_data.raw();
 }
 
+String& KernelReaderHelper::SourceTableImportUriFor(intptr_t index,
+                                                    uint32_t binaryVersion) {
+  if (binaryVersion < 22) {
+    return SourceTableUriFor(index);
+  }
+
+  AlternativeReadingScope alt(&reader_);
+  SetOffset(GetOffsetForSourceInfo(index));
+  SkipBytes(ReadUInt());                         // skip uri.
+  SkipBytes(ReadUInt());                         // skip source.
+  const intptr_t line_start_count = ReadUInt();  // read number of line start
+                                                 // entries.
+  for (intptr_t i = 0; i < line_start_count; ++i) {
+    ReadUInt();
+  }
+
+  intptr_t size = ReadUInt();  // read import uri List<byte> size.
+  return H.DartString(reader_.BufferAt(ReaderOffset()), size, Heap::kOld);
+}
+
 intptr_t ActiveClass::MemberTypeParameterCount(Zone* zone) {
   ASSERT(member != NULL);
   if (member->IsFactory()) {
diff --git a/runtime/vm/compiler/frontend/kernel_translation_helper.h b/runtime/vm/compiler/frontend/kernel_translation_helper.h
index d50712e..745daa7 100644
--- a/runtime/vm/compiler/frontend/kernel_translation_helper.h
+++ b/runtime/vm/compiler/frontend/kernel_translation_helper.h
@@ -59,6 +59,8 @@
   const Array& constants() { return constants_; }
   void SetConstants(const Array& constants);
 
+  RawGrowableObjectArray* EnsurePotentialPragmaFunctions();
+
   void SetKernelProgramInfo(const KernelProgramInfo& info);
 
   intptr_t StringOffset(StringIndex index) const;
@@ -156,6 +158,10 @@
 
   Type& GetDeclarationType(const Class& klass);
 
+  void SetupFieldAccessorFunction(const Class& klass,
+                                  const Function& function,
+                                  const AbstractType& field_type);
+
   void ReportError(const char* format, ...) PRINTF_ATTRIBUTE(2, 3);
   void ReportError(const Script& script,
                    const TokenPosition position,
@@ -1061,6 +1067,7 @@
   String& SourceTableUriFor(intptr_t index);
   const String& GetSourceFor(intptr_t index);
   RawTypedData* GetLineStartsFor(intptr_t index);
+  String& SourceTableImportUriFor(intptr_t index, uint32_t binaryVersion);
 
   Zone* zone_;
   TranslationHelper& translation_helper_;
diff --git a/runtime/vm/compiler/graph_intrinsifier.cc b/runtime/vm/compiler/graph_intrinsifier.cc
index 85c5e6c..1b2f8e8 100644
--- a/runtime/vm/compiler/graph_intrinsifier.cc
+++ b/runtime/vm/compiler/graph_intrinsifier.cc
@@ -275,9 +275,7 @@
   index = PrepareIndexedOp(flow_graph, &builder, array, index,
                            Slot::GetLengthFieldForArrayCid(array_cid));
 
-  if (RawObject::IsTypedDataClassId(array_cid) ||
-      RawObject::IsExternalTypedDataClassId(array_cid)) {
-    ASSERT(TypedData::data_offset() == ExternalTypedData::data_offset());
+  if (RawObject::IsExternalTypedDataClassId(array_cid)) {
     array = builder.AddDefinition(new LoadUntaggedInstr(
         new Value(array), ExternalTypedData::data_offset()));
   }
@@ -423,9 +421,7 @@
       UNREACHABLE();
   }
 
-  if (RawObject::IsTypedDataClassId(array_cid) ||
-      RawObject::IsExternalTypedDataClassId(array_cid)) {
-    ASSERT(TypedData::data_offset() == ExternalTypedData::data_offset());
+  if (RawObject::IsExternalTypedDataClassId(array_cid)) {
     array = builder.AddDefinition(new LoadUntaggedInstr(
         new Value(array), ExternalTypedData::data_offset()));
   }
@@ -711,8 +707,16 @@
   return BuildLoadField(flow_graph, Slot::String_length());
 }
 
-bool GraphIntrinsifier::Build_TypedDataLength(FlowGraph* flow_graph) {
-  return BuildLoadField(flow_graph, Slot::TypedData_length());
+bool GraphIntrinsifier::Build_TypedListLength(FlowGraph* flow_graph) {
+  return BuildLoadField(flow_graph, Slot::TypedDataBase_length());
+}
+
+bool GraphIntrinsifier::Build_TypedListViewLength(FlowGraph* flow_graph) {
+  return BuildLoadField(flow_graph, Slot::TypedDataBase_length());
+}
+
+bool GraphIntrinsifier::Build_ByteDataViewLength(FlowGraph* flow_graph) {
+  return BuildLoadField(flow_graph, Slot::TypedDataBase_length());
 }
 
 bool GraphIntrinsifier::Build_GrowableArrayCapacity(FlowGraph* flow_graph) {
diff --git a/runtime/vm/compiler/jit/compiler.cc b/runtime/vm/compiler/jit/compiler.cc
index db4a507..b7afea4 100644
--- a/runtime/vm/compiler/jit/compiler.cc
+++ b/runtime/vm/compiler/jit/compiler.cc
@@ -174,6 +174,7 @@
   RegExpParser::ParseRegExp(pattern, multiline, compile_data);
 
   regexp.set_num_bracket_expressions(compile_data->capture_count);
+  regexp.set_capture_name_map(compile_data->capture_name_map);
   if (compile_data->simple) {
     regexp.set_is_simple();
   } else {
@@ -418,6 +419,12 @@
   }
 #endif  // !defined(PRODUCT)
 
+  if (function.is_intrinsic() &&
+      (function.usage_counter() < Function::kGraceUsageCounter)) {
+    // Intrinsic functions may execute without incrementing their usage counter.
+    // Give them a non-zero initial usage to prevent premature code collection.
+    function.set_usage_counter(Function::kGraceUsageCounter);
+  }
   if (!function.IsOptimizable()) {
     // A function with huge unoptimized code can become non-optimizable
     // after generating unoptimized code.
@@ -772,7 +779,7 @@
                                         bool optimized,
                                         intptr_t osr_id) {
   ASSERT(!FLAG_precompiled_mode);
-  ASSERT(!optimized || function.WasCompiled());
+  ASSERT(!optimized || function.WasCompiled() || function.ForceOptimize());
   if (function.ForceOptimize()) optimized = true;
   LongJumpScope jump;
   if (setjmp(*jump.Set()) == 0) {
@@ -996,8 +1003,8 @@
   CompilationPipeline* pipeline =
       CompilationPipeline::New(thread->zone(), function);
 
-  return CompileFunctionHelper(pipeline, function,
-                               /* optimized = */ false, kNoOSRDeoptId);
+  const bool optimized = function.ForceOptimize();
+  return CompileFunctionHelper(pipeline, function, optimized, kNoOSRDeoptId);
 }
 
 RawError* Compiler::ParseFunction(Thread* thread, const Function& function) {
@@ -1186,78 +1193,6 @@
   return Error::null();
 }
 
-RawObject* Compiler::EvaluateStaticInitializer(const Field& field) {
-#if defined(DART_PRECOMPILER) && !defined(TARGET_ARCH_DBC) &&                  \
-    !defined(TARGET_ARCH_IA32)
-  if (FLAG_precompiled_mode) {
-    UNREACHABLE();
-  }
-#endif
-  ASSERT(field.is_static());
-  // The VM sets the field's value to transiton_sentinel prior to
-  // evaluating the initializer value.
-  ASSERT(field.StaticValue() == Object::transition_sentinel().raw());
-  LongJumpScope jump;
-  if (setjmp(*jump.Set()) == 0) {
-    Thread* const thread = Thread::Current();
-    ASSERT(thread->IsMutatorThread());
-    NoOOBMessageScope no_msg_scope(thread);
-    NoReloadScope no_reload_scope(thread->isolate(), thread);
-    if (field.HasInitializerFunction()) {
-      const Function& initializer =
-          Function::Handle(field.InitializerFunction());
-      return DartEntry::InvokeFunction(initializer, Object::empty_array());
-    }
-    {
-      VMTagScope tagScope(thread, VMTag::kCompileUnoptimizedTagId);
-#if defined(SUPPORT_TIMELINE)
-      TimelineDurationScope tds(thread, Timeline::GetCompilerStream(),
-                                "CompileStaticInitializer");
-      if (tds.enabled()) {
-        tds.SetNumArguments(1);
-        tds.CopyArgument(0, "field", field.ToCString());
-      }
-#endif  // defined(SUPPORT_TIMELINE)
-
-      StackZone stack_zone(thread);
-      Zone* zone = stack_zone.GetZone();
-      ParsedFunction* parsed_function;
-
-      // Create a one-time-use function to evaluate the initializer and invoke
-      // it immediately.
-      parsed_function = kernel::ParseStaticFieldInitializer(zone, field);
-      const Function& initializer = parsed_function->function();
-
-      if (FLAG_enable_interpreter) {
-        ASSERT(initializer.IsBytecodeAllowed(zone));
-        if (!initializer.HasBytecode()) {
-          RawError* error =
-              kernel::BytecodeReader::ReadFunctionBytecode(thread, initializer);
-          if (error != Error::null()) {
-            return error;
-          }
-        }
-        if (initializer.HasBytecode()) {
-          return DartEntry::InvokeFunction(initializer, Object::empty_array());
-        }
-      }
-
-      // Non-optimized code generator.
-      DartCompilationPipeline pipeline;
-      CompileParsedFunctionHelper helper(parsed_function, false, kNoOSRDeoptId);
-      const Code& code = Code::Handle(helper.Compile(&pipeline));
-
-      if (!code.IsNull()) {
-        NOT_IN_PRODUCT(
-            code.set_var_descriptors(Object::empty_var_descriptors()));
-        return DartEntry::InvokeFunction(initializer, Object::empty_array());
-      }
-    }
-  }
-
-  return Thread::Current()->StealStickyError();
-}
-
 RawObject* Compiler::ExecuteOnce(SequenceNode* fragment) {
 #if defined(DART_PRECOMPILER) && !defined(TARGET_ARCH_DBC) &&                  \
     !defined(TARGET_ARCH_IA32)
@@ -1709,12 +1644,6 @@
   return Error::null();
 }
 
-RawObject* Compiler::EvaluateStaticInitializer(const Field& field) {
-  ASSERT(field.HasInitializerFunction());
-  const Function& initializer = Function::Handle(field.InitializerFunction());
-  return DartEntry::InvokeFunction(initializer, Object::empty_array());
-}
-
 RawObject* Compiler::ExecuteOnce(SequenceNode* fragment) {
   UNREACHABLE();
   return Object::null();
diff --git a/runtime/vm/compiler/jit/compiler.h b/runtime/vm/compiler/jit/compiler.h
index 43f4320..eef93a8 100644
--- a/runtime/vm/compiler/jit/compiler.h
+++ b/runtime/vm/compiler/jit/compiler.h
@@ -127,12 +127,6 @@
   // on compilation failure.
   static RawObject* ExecuteOnce(SequenceNode* fragment);
 
-  // Evaluates the initializer expression of the given static field.
-  //
-  // The return value is either a RawInstance on success or a RawError
-  // on compilation failure.
-  static RawObject* EvaluateStaticInitializer(const Field& field);
-
   // Generates local var descriptors and sets it in 'code'. Do not call if the
   // local var descriptor already exists.
   static void ComputeLocalVarDescriptors(const Code& code);
diff --git a/runtime/vm/compiler/recognized_methods_list.h b/runtime/vm/compiler/recognized_methods_list.h
index a0baa73..6fc48f4 100644
--- a/runtime/vm/compiler/recognized_methods_list.h
+++ b/runtime/vm/compiler/recognized_methods_list.h
@@ -42,10 +42,8 @@
   V(_TypedList, _setFloat64, ByteArrayBaseSetFloat64, 0x38a80b0d)              \
   V(_TypedList, _setFloat32x4, ByteArrayBaseSetFloat32x4, 0x40052c4e)          \
   V(_TypedList, _setInt32x4, ByteArrayBaseSetInt32x4, 0x07b89f54)              \
-  V(_ByteDataView, get:length, ByteDataViewLength, 0x0)                        \
   V(_ByteDataView, get:offsetInBytes, ByteDataViewOffsetInBytes, 0x0)          \
   V(_ByteDataView, get:_typedData, ByteDataViewTypedData, 0x0)                 \
-  V(_TypedListView, get:length, TypedDataViewLength, 0x0)                      \
   V(_TypedListView, get:offsetInBytes, TypedDataViewOffsetInBytes, 0x0)        \
   V(_TypedListView, get:_typedData, TypedDataViewTypedData, 0x0)               \
   V(_ByteDataView, ., TypedData_ByteDataView_factory, 0x0)                     \
@@ -298,7 +296,9 @@
   V(_Int32x4List, []=, Int32x4ArraySetIndexed, 0x31453dab)                     \
   V(_Float64x2List, [], Float64x2ArrayGetIndexed, 0x644a0be1)                  \
   V(_Float64x2List, []=, Float64x2ArraySetIndexed, 0x6b836b0b)                 \
-  V(_TypedList, get:length, TypedDataLength, 0x2091c4d8)                       \
+  V(_TypedList, get:length, TypedListLength, 0x0)                \
+  V(_TypedListView, get:length, TypedListViewLength, 0x0)        \
+  V(_ByteDataView, get:length, ByteDataViewLength, 0x0)          \
   V(_Float32x4, get:x, Float32x4ShuffleX, 0x63d1a9fd)                          \
   V(_Float32x4, get:y, Float32x4ShuffleY, 0x203523d9)                          \
   V(_Float32x4, get:z, Float32x4ShuffleZ, 0x13190678)                          \
@@ -372,10 +372,11 @@
   V(Object, ==, ObjectEquals, 0x7b32a55a)                                      \
   V(_List, get:length, ObjectArrayLength, 0x25952390)                          \
   V(_ImmutableList, get:length, ImmutableArrayLength, 0x25952390)              \
-  V(_TypedList, get:length, TypedDataLength, 0x2091c4d8)                       \
-  V(_TypedListView, get:length, TypedDataViewLength, 0x0)                      \
   V(_TypedListView, get:offsetInBytes, TypedDataViewOffsetInBytes, 0x0)        \
   V(_TypedListView, get:_typedData, TypedDataViewTypedData, 0x0)               \
+  V(_TypedList, get:length, TypedListLength, 0x0)                \
+  V(_TypedListView, get:length, TypedListViewLength, 0x0)        \
+  V(_ByteDataView, get:length, ByteDataViewLength, 0x0)          \
   V(_GrowableList, get:length, GrowableArrayLength, 0x18dd86b4)                \
   V(_GrowableList, get:_capacity, GrowableArrayCapacity, 0x2e04be60)           \
   V(_GrowableList, add, GrowableListAdd, 0x40b490b8)                           \
diff --git a/runtime/vm/compiler/runtime_api.cc b/runtime/vm/compiler/runtime_api.cc
index ba72cc1..9020925 100644
--- a/runtime/vm/compiler/runtime_api.cc
+++ b/runtime/vm/compiler/runtime_api.cc
@@ -498,8 +498,9 @@
   V(TimelineStream, enabled_offset)                                            \
   V(TwoByteString, data_offset)                                                \
   V(Type, arguments_offset)                                                    \
+  V(TypedDataBase, data_field_offset)                                          \
+  V(TypedDataBase, length_offset)                                              \
   V(TypedData, data_offset)                                                    \
-  V(TypedData, length_offset)                                                  \
   V(Type, hash_offset)                                                         \
   V(TypeRef, type_offset)                                                      \
   V(Type, signature_offset)                                                    \
@@ -773,7 +774,7 @@
 }
 
 bool CanEmbedAsRawPointerInGeneratedCode(const dart::Object& obj) {
-  return obj.IsSmi() || obj.IsReadOnly();
+  return obj.IsSmi() || obj.InVMIsolateHeap();
 }
 
 word ToRawPointer(const dart::Object& a) {
diff --git a/runtime/vm/compiler/runtime_api.h b/runtime/vm/compiler/runtime_api.h
index 652c1b3..1036a98 100644
--- a/runtime/vm/compiler/runtime_api.h
+++ b/runtime/vm/compiler/runtime_api.h
@@ -458,10 +458,15 @@
   static word length_offset();
 };
 
+class TypedDataBase : public AllStatic {
+ public:
+  static word data_field_offset();
+  static word length_offset();
+};
+
 class TypedData : public AllStatic {
  public:
   static word data_offset();
-  static word length_offset();
   static word InstanceSize();
 };
 
diff --git a/runtime/vm/compiler/stub_code_compiler_arm.cc b/runtime/vm/compiler/stub_code_compiler_arm.cc
index 512bfe6..d8f41bd 100644
--- a/runtime/vm/compiler/stub_code_compiler_arm.cc
+++ b/runtime/vm/compiler/stub_code_compiler_arm.cc
@@ -362,6 +362,12 @@
   __ StoreToOffset(kWord, R2, THR,
                    target::Thread::top_exit_frame_info_offset());
 
+  // Restore the global object pool after returning from runtime (old space is
+  // moving, so the GOP could have been relocated).
+  if (FLAG_precompiled_mode && FLAG_use_bare_instructions) {
+    __ ldr(PP, Address(THR, target::Thread::global_object_pool_offset()));
+  }
+
   __ LeaveStubFrame();
   __ Ret();
 }
@@ -456,6 +462,12 @@
   __ StoreToOffset(kWord, R2, THR,
                    target::Thread::top_exit_frame_info_offset());
 
+  // Restore the global object pool after returning from runtime (old space is
+  // moving, so the GOP could have been relocated).
+  if (FLAG_precompiled_mode && FLAG_use_bare_instructions) {
+    __ ldr(PP, Address(THR, target::Thread::global_object_pool_offset()));
+  }
+
   __ LeaveStubFrame();
   __ Ret();
 }
diff --git a/runtime/vm/compiler/stub_code_compiler_arm64.cc b/runtime/vm/compiler/stub_code_compiler_arm64.cc
index 64e2cb2..6ff109c 100644
--- a/runtime/vm/compiler/stub_code_compiler_arm64.cc
+++ b/runtime/vm/compiler/stub_code_compiler_arm64.cc
@@ -386,6 +386,13 @@
   // Reset exit frame information in Isolate structure.
   __ StoreToOffset(ZR, THR, target::Thread::top_exit_frame_info_offset());
 
+  // Restore the global object pool after returning from runtime (old space is
+  // moving, so the GOP could have been relocated).
+  if (FLAG_precompiled_mode && FLAG_use_bare_instructions) {
+    __ ldr(PP, Address(THR, target::Thread::global_object_pool_offset()));
+    __ sub(PP, PP, Operand(kHeapObjectTag));  // Pool in PP is untagged!
+  }
+
   __ LeaveStubFrame();
   __ ret();
 }
@@ -494,6 +501,13 @@
   // Reset exit frame information in Isolate structure.
   __ StoreToOffset(ZR, THR, target::Thread::top_exit_frame_info_offset());
 
+  // Restore the global object pool after returning from runtime (old space is
+  // moving, so the GOP could have been relocated).
+  if (FLAG_precompiled_mode && FLAG_use_bare_instructions) {
+    __ ldr(PP, Address(THR, target::Thread::global_object_pool_offset()));
+    __ sub(PP, PP, Operand(kHeapObjectTag));  // Pool in PP is untagged!
+  }
+
   __ LeaveStubFrame();
   __ ret();
 }
diff --git a/runtime/vm/compiler/stub_code_compiler_x64.cc b/runtime/vm/compiler/stub_code_compiler_x64.cc
index c0ea951..ccc30b5 100644
--- a/runtime/vm/compiler/stub_code_compiler_x64.cc
+++ b/runtime/vm/compiler/stub_code_compiler_x64.cc
@@ -369,6 +369,12 @@
   __ movq(Address(THR, target::Thread::top_exit_frame_info_offset()),
           Immediate(0));
 
+  // Restore the global object pool after returning from runtime (old space is
+  // moving, so the GOP could have been relocated).
+  if (FLAG_precompiled_mode && FLAG_use_bare_instructions) {
+    __ movq(PP, Address(THR, target::Thread::global_object_pool_offset()));
+  }
+
   __ LeaveStubFrame();
   __ ret();
 }
@@ -455,6 +461,12 @@
   __ movq(Address(THR, target::Thread::top_exit_frame_info_offset()),
           Immediate(0));
 
+  // Restore the global object pool after returning from runtime (old space is
+  // moving, so the GOP could have been relocated).
+  if (FLAG_precompiled_mode && FLAG_use_bare_instructions) {
+    __ movq(PP, Address(THR, target::Thread::global_object_pool_offset()));
+  }
+
   __ LeaveStubFrame();
   __ ret();
 }
diff --git a/runtime/vm/constants_arm64.cc b/runtime/vm/constants_arm64.cc
new file mode 100644
index 0000000..0714ae3
--- /dev/null
+++ b/runtime/vm/constants_arm64.cc
@@ -0,0 +1,21 @@
+// Copyright (c) 2019, the Dart project authors.  Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+#if defined(TARGET_ARCH_ARM64)
+
+#include "vm/constants_arm64.h"
+
+namespace dart {
+
+const Register CallingConventions::ArgumentRegisters[] = {
+    R0, R1, R2, R3, R4, R5, R6, R7,
+};
+
+const FpuRegister CallingConventions::FpuArgumentRegisters[] = {
+    V0, V1, V2, V3, V4, V5, V6, V7,
+};
+
+}  // namespace dart
+
+#endif
diff --git a/runtime/vm/constants_arm64.h b/runtime/vm/constants_arm64.h
index 0e2d6ea..fa592e1 100644
--- a/runtime/vm/constants_arm64.h
+++ b/runtime/vm/constants_arm64.h
@@ -137,6 +137,9 @@
 typedef uint32_t RegList;
 const RegList kAllCpuRegistersList = 0xFFFFFFFF;
 
+// See "Procedure Call Standard for the ARM 64-bit Architecture", document
+// number "ARM IHI 0055B", May 22 2013.
+
 // C++ ABI call registers.
 const RegList kAbiArgumentCpuRegs = (1 << R0) | (1 << R1) | (1 << R2) |
                                     (1 << R3) | (1 << R4) | (1 << R5) |
@@ -173,6 +176,32 @@
 
 constexpr int kStoreBufferWrapperSize = 32;
 
+#define R(REG) (1 << REG)
+
+class CallingConventions {
+ public:
+  static const intptr_t kArgumentRegisters = kAbiArgumentCpuRegs;
+  static const Register ArgumentRegisters[];
+  static const intptr_t kNumArgRegs = 8;
+
+  static const FpuRegister FpuArgumentRegisters[];
+  static const intptr_t kFpuArgumentRegisters =
+      R(V0) | R(V1) | R(V2) | R(V3) | R(V4) | R(V5) | R(V6) | R(V7);
+  static const intptr_t kNumFpuArgRegs = 8;
+
+  static const bool kArgumentIntRegXorFpuReg = false;
+
+  static constexpr Register kReturnReg = R0;
+  static constexpr Register kSecondReturnReg = kNoRegister;
+  static constexpr FpuRegister kReturnFpuReg = V0;
+
+  static constexpr Register kFirstCalleeSavedCpuReg = kAbiFirstPreservedCpuReg;
+  static constexpr Register kFirstNonArgumentRegister = R8;
+  static constexpr Register kSecondNonArgumentRegister = R9;
+};
+
+#undef R
+
 static inline Register ConcreteRegister(Register r) {
   return ((r == ZR) || (r == CSP)) ? R31 : r;
 }
diff --git a/runtime/vm/constants_dbc.h b/runtime/vm/constants_dbc.h
index 74e1ac1..d0b7703 100644
--- a/runtime/vm/constants_dbc.h
+++ b/runtime/vm/constants_dbc.h
@@ -490,6 +490,10 @@
 //    stored in the following Nop instruction. Used to access fields with
 //    large offsets.
 //
+//  - StoreUntagged rA, B, rC
+//
+//    Like StoreField, but assumes that FP[rC] is untagged.
+//
 //  - StoreFieldTOS D
 //
 //    Store value SP[0] into object SP[-1] at offset (in words) D.
@@ -866,14 +870,17 @@
   V(AllocateTOpt,                        A_D, reg, lit, ___) \
   V(StoreIndexedTOS,                       0, ___, ___, ___) \
   V(StoreIndexed,                      A_B_C, reg, reg, reg) \
-  V(StoreIndexedUint8,                 A_B_C, reg, reg, reg) \
-  V(StoreIndexedExternalUint8,         A_B_C, reg, reg, reg) \
   V(StoreIndexedOneByteString,         A_B_C, reg, reg, reg) \
+  V(StoreIndexedUint8,                 A_B_C, reg, reg, reg) \
   V(StoreIndexedUint32,                A_B_C, reg, reg, reg) \
   V(StoreIndexedFloat32,               A_B_C, reg, reg, reg) \
   V(StoreIndexed4Float32,              A_B_C, reg, reg, reg) \
   V(StoreIndexedFloat64,               A_B_C, reg, reg, reg) \
   V(StoreIndexed8Float64,              A_B_C, reg, reg, reg) \
+  V(StoreIndexedUntaggedUint8,         A_B_C, reg, reg, reg) \
+  V(StoreIndexedUntaggedUint32,        A_B_C, reg, reg, reg) \
+  V(StoreIndexedUntaggedFloat32,       A_B_C, reg, reg, reg) \
+  V(StoreIndexedUntaggedFloat64,       A_B_C, reg, reg, reg) \
   V(NoSuchMethod,                          0, ___, ___, ___) \
   V(TailCall,                              0, ___, ___, ___) \
   V(TailCallOpt,                         A_D, reg, reg, ___) \
@@ -885,20 +892,25 @@
   V(StoreFpRelativeSlotOpt,             A_B_Y, reg, reg, reg) \
   V(LoadIndexedTOS,                        0, ___, ___, ___) \
   V(LoadIndexed,                       A_B_C, reg, reg, reg) \
+  V(LoadIndexedOneByteString,          A_B_C, reg, reg, reg) \
+  V(LoadIndexedTwoByteString,          A_B_C, reg, reg, reg) \
   V(LoadIndexedUint8,                  A_B_C, reg, reg, reg) \
   V(LoadIndexedInt8,                   A_B_C, reg, reg, reg) \
   V(LoadIndexedInt32,                  A_B_C, reg, reg, reg) \
   V(LoadIndexedUint32,                 A_B_C, reg, reg, reg) \
-  V(LoadIndexedExternalUint8,          A_B_C, reg, reg, reg) \
-  V(LoadIndexedExternalInt8,           A_B_C, reg, reg, reg) \
   V(LoadIndexedFloat32,                A_B_C, reg, reg, reg) \
   V(LoadIndexed4Float32,               A_B_C, reg, reg, reg) \
   V(LoadIndexedFloat64,                A_B_C, reg, reg, reg) \
   V(LoadIndexed8Float64,               A_B_C, reg, reg, reg) \
-  V(LoadIndexedOneByteString,          A_B_C, reg, reg, reg) \
-  V(LoadIndexedTwoByteString,          A_B_C, reg, reg, reg) \
+  V(LoadIndexedUntaggedInt8,           A_B_C, reg, reg, reg) \
+  V(LoadIndexedUntaggedUint8,          A_B_C, reg, reg, reg) \
+  V(LoadIndexedUntaggedInt32,          A_B_C, reg, reg, reg) \
+  V(LoadIndexedUntaggedUint32,         A_B_C, reg, reg, reg) \
+  V(LoadIndexedUntaggedFloat32,        A_B_C, reg, reg, reg) \
+  V(LoadIndexedUntaggedFloat64,        A_B_C, reg, reg, reg) \
   V(StoreField,                        A_B_C, reg, num, reg) \
   V(StoreFieldExt,                       A_D, reg, reg, ___) \
+  V(StoreUntagged,                     A_B_C, reg, num, reg) \
   V(StoreFieldTOS,                         D, num, ___, ___) \
   V(LoadField,                         A_B_C, reg, reg, num) \
   V(LoadFieldExt,                        A_D, reg, reg, ___) \
diff --git a/runtime/vm/constants_ia32.cc b/runtime/vm/constants_ia32.cc
new file mode 100644
index 0000000..62c3f6a
--- /dev/null
+++ b/runtime/vm/constants_ia32.cc
@@ -0,0 +1,21 @@
+// Copyright (c) 2019, the Dart project authors.  Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+#if defined(TARGET_ARCH_IA32)
+
+#include "vm/constants_ia32.h"
+
+namespace dart {
+
+// Although 'kArgumentRegisters' and 'kFpuArgumentRegisters' are both 0, we have
+// to give these arrays at least one element to appease MSVC.
+
+const Register CallingConventions::ArgumentRegisters[] = {
+    static_cast<Register>(0)};
+const FpuRegister CallingConventions::FpuArgumentRegisters[] = {
+    static_cast<FpuRegister>(0)};
+
+}  // namespace dart
+
+#endif
diff --git a/runtime/vm/constants_ia32.h b/runtime/vm/constants_ia32.h
index 4e56d03..24e3783 100644
--- a/runtime/vm/constants_ia32.h
+++ b/runtime/vm/constants_ia32.h
@@ -119,6 +119,29 @@
 // becomes important to us.
 const int MAX_NOP_SIZE = 8;
 
+class CallingConventions {
+ public:
+  static const Register ArgumentRegisters[];
+  static const intptr_t kArgumentRegisters = 0;
+  static const intptr_t kNumArgRegs = 0;
+
+  static const XmmRegister FpuArgumentRegisters[];
+  static const intptr_t kXmmArgumentRegisters = 0;
+  static const intptr_t kNumFpuArgRegs = 0;
+
+  static const bool kArgumentIntRegXorFpuReg = false;
+
+  static constexpr Register kReturnReg = EAX;
+  static constexpr Register kSecondReturnReg = EDX;
+
+  // Floating point values are returned on the "FPU stack" (in "ST" registers).
+  static constexpr XmmRegister kReturnFpuReg = kNoXmmRegister;
+
+  static constexpr Register kFirstCalleeSavedCpuReg = EBX;
+  static constexpr Register kFirstNonArgumentRegister = EAX;
+  static constexpr Register kSecondNonArgumentRegister = ECX;
+};
+
 }  // namespace dart
 
 #endif  // RUNTIME_VM_CONSTANTS_IA32_H_
diff --git a/runtime/vm/constants_kbc.h b/runtime/vm/constants_kbc.h
index aeb775e..7128a46 100644
--- a/runtime/vm/constants_kbc.h
+++ b/runtime/vm/constants_kbc.h
@@ -411,7 +411,7 @@
 //               instruction because PC is incremented immediately after fetch
 //               and before decoding.
 //
-#define KERNEL_BYTECODES_LIST(V)                                               \
+#define PUBLIC_KERNEL_BYTECODES_LIST(V)                                        \
   V(Trap,                                  0, ___, ___, ___)                   \
   V(Entry,                                 D, num, ___, ___)                   \
   V(EntryFixed,                          A_D, num, num, ___)                   \
@@ -484,7 +484,17 @@
   V(CompareIntLt,                          0, ___, ___, ___)                   \
   V(CompareIntGe,                          0, ___, ___, ___)                   \
   V(CompareIntLe,                          0, ___, ___, ___)                   \
-  V(DirectCall,                          A_D, num, num, ___)
+  V(DirectCall,                          A_D, num, num, ___)                   \
+
+  // These bytecodes are only generated within the VM. Reassinging their
+  // opcodes is not a breaking change.
+#define INTERNAL_KERNEL_BYTECODES_LIST(V)                                      \
+  V(VMInternal_ImplicitGetter,             0, ___, ___, ___)                   \
+  V(VMInternal_ImplicitSetter,             0, ___, ___, ___)                   \
+
+#define KERNEL_BYTECODES_LIST(V)                                               \
+  PUBLIC_KERNEL_BYTECODES_LIST(V)                                              \
+  INTERNAL_KERNEL_BYTECODES_LIST(V)
 
 // clang-format on
 
@@ -492,11 +502,14 @@
 
 class KernelBytecode {
  public:
+  // Magic value of bytecode files.
+  static const intptr_t kMagicValue = 0x44424332;  // 'DBC2'
   // Minimum bytecode format version supported by VM.
   static const intptr_t kMinSupportedBytecodeFormatVersion = 1;
   // Maximum bytecode format version supported by VM.
-  // Should match futureBytecodeFormatVersion in pkg/vm/lib/bytecode/dbc.dart.
-  static const intptr_t kMaxSupportedBytecodeFormatVersion = 2;
+  // The range of supported versions should include version produced by bytecode
+  // generator (currentBytecodeFormatVersion in pkg/vm/lib/bytecode/dbc.dart).
+  static const intptr_t kMaxSupportedBytecodeFormatVersion = 3;
 
   enum Opcode {
 #define DECLARE_BYTECODE(name, encoding, op1, op2, op3) k##name,
diff --git a/runtime/vm/constants_x64.cc b/runtime/vm/constants_x64.cc
index df6fb75..3f38d9d 100644
--- a/runtime/vm/constants_x64.cc
+++ b/runtime/vm/constants_x64.cc
@@ -2,6 +2,8 @@
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
 
+#if defined(TARGET_ARCH_X64)
+
 #include "vm/constants_x64.h"
 
 namespace dart {
@@ -11,7 +13,7 @@
     CallingConventions::kArg1Reg, CallingConventions::kArg2Reg,
     CallingConventions::kArg3Reg, CallingConventions::kArg4Reg};
 
-const XmmRegister CallingConventions::XmmArgumentRegisters[] = {
+const XmmRegister CallingConventions::FpuArgumentRegisters[] = {
     XmmRegister::XMM0, XmmRegister::XMM1, XmmRegister::XMM2, XmmRegister::XMM3};
 #else
 const Register CallingConventions::ArgumentRegisters[] = {
@@ -19,9 +21,11 @@
     CallingConventions::kArg3Reg, CallingConventions::kArg4Reg,
     CallingConventions::kArg5Reg, CallingConventions::kArg6Reg};
 
-const XmmRegister CallingConventions::XmmArgumentRegisters[] = {
+const XmmRegister CallingConventions::FpuArgumentRegisters[] = {
     XmmRegister::XMM0, XmmRegister::XMM1, XmmRegister::XMM2, XmmRegister::XMM3,
     XmmRegister::XMM4, XmmRegister::XMM5, XmmRegister::XMM6, XmmRegister::XMM7};
 #endif
 
 }  // namespace dart
+
+#endif
diff --git a/runtime/vm/constants_x64.h b/runtime/vm/constants_x64.h
index 00affe4..3e8d0070 100644
--- a/runtime/vm/constants_x64.h
+++ b/runtime/vm/constants_x64.h
@@ -157,14 +157,14 @@
       R(kArg1Reg) | R(kArg2Reg) | R(kArg3Reg) | R(kArg4Reg);
   static const intptr_t kNumArgRegs = 4;
 
-  static const XmmRegister XmmArgumentRegisters[];
-  static const intptr_t kXmmArgumentRegisters =
+  static const XmmRegister FpuArgumentRegisters[];
+  static const intptr_t kFpuArgumentRegisters =
       R(XMM0) | R(XMM1) | R(XMM2) | R(XMM3);
-  static const intptr_t kNumXmmArgRegs = 4;
+  static const intptr_t kNumFpuArgRegs = 4;
 
   // can ArgumentRegisters[i] and XmmArgumentRegisters[i] both be used at the
   // same time? (Windows no, rest yes)
-  static const bool kArgumentIntRegXorXmmReg = true;
+  static const bool kArgumentIntRegXorFpuReg = true;
 
   static const intptr_t kShadowSpaceBytes = 4 * kWordSize;
 
@@ -188,6 +188,7 @@
   static const size_t kRegisterTransferLimit = 16;
 
   static constexpr Register kReturnReg = RAX;
+  static constexpr Register kSecondReturnReg = kNoRegister;
   static constexpr FpuRegister kReturnFpuReg = XMM0;
 #else
   static const Register kArg1Reg = RDI;
@@ -202,15 +203,15 @@
                                              R(kArg5Reg) | R(kArg6Reg);
   static const intptr_t kNumArgRegs = 6;
 
-  static const XmmRegister XmmArgumentRegisters[];
+  static const XmmRegister FpuArgumentRegisters[];
   static const intptr_t kXmmArgumentRegisters = R(XMM0) | R(XMM1) | R(XMM2) |
                                                 R(XMM3) | R(XMM4) | R(XMM5) |
                                                 R(XMM6) | R(XMM7);
-  static const intptr_t kNumXmmArgRegs = 8;
+  static const intptr_t kNumFpuArgRegs = 8;
 
   // can ArgumentRegisters[i] and XmmArgumentRegisters[i] both be used at the
   // same time? (Windows no, rest yes)
-  static const bool kArgumentIntRegXorXmmReg = false;
+  static const bool kArgumentIntRegXorFpuReg = false;
 
   static const intptr_t kShadowSpaceBytes = 0;
 
@@ -231,6 +232,7 @@
   static const XmmRegister xmmFirstNonParameterReg = XMM8;
 
   static constexpr Register kReturnReg = RAX;
+  static constexpr Register kSecondReturnReg = kNoRegister;
   static constexpr FpuRegister kReturnFpuReg = XMM0;
 #endif
 
diff --git a/runtime/vm/dart.cc b/runtime/vm/dart.cc
index 75e6353..d1354ca 100644
--- a/runtime/vm/dart.cc
+++ b/runtime/vm/dart.cc
@@ -165,6 +165,11 @@
   }
 #endif
 
+#if defined(TARGET_ARCH_DBC)
+  // DBC instructions are never executable.
+  FLAG_write_protect_code = false;
+#endif
+
   if (FLAG_enable_interpreter) {
 #if defined(TARGET_ARCH_DBC)
     return strdup("--enable-interpreter is not supported with DBC");
diff --git a/runtime/vm/dart_api_impl.cc b/runtime/vm/dart_api_impl.cc
index 0c51e1a..683a636 100644
--- a/runtime/vm/dart_api_impl.cc
+++ b/runtime/vm/dart_api_impl.cc
@@ -492,7 +492,7 @@
 }
 
 static Dart_Handle InitNewReadOnlyApiHandle(RawObject* raw) {
-  ASSERT(raw->IsReadOnly());
+  ASSERT(raw->InVMIsolateHeap());
   LocalHandle* ref = Dart::AllocateReadOnlyApiHandle();
   ref->set_raw(raw);
   return ref->apiHandle();
@@ -1075,43 +1075,8 @@
 
 // --- Isolates ---
 
-static char* BuildIsolateName(const char* script_uri, const char* main) {
-  if (script_uri == NULL) {
-    // Just use the main as the name.
-    if (main == NULL) {
-      return strdup("isolate");
-    } else {
-      return strdup(main);
-    }
-  }
-
-  if (ServiceIsolate::NameEquals(script_uri) ||
-      (strcmp(script_uri, DART_KERNEL_ISOLATE_NAME) == 0)) {
-    return strdup(script_uri);
-  }
-
-  // Skip past any slashes and backslashes in the script uri.
-  const char* last_slash = strrchr(script_uri, '/');
-  if (last_slash != NULL) {
-    script_uri = last_slash + 1;
-  }
-  const char* last_backslash = strrchr(script_uri, '\\');
-  if (last_backslash != NULL) {
-    script_uri = last_backslash + 1;
-  }
-  if (main == NULL) {
-    main = "main";
-  }
-
-  char* chars = NULL;
-  intptr_t len = Utils::SNPrint(NULL, 0, "%s:%s()", script_uri, main) + 1;
-  chars = reinterpret_cast<char*>(malloc(len));
-  Utils::SNPrint(chars, len, "%s:%s()", script_uri, main);
-  return chars;
-}
-
 static Dart_Isolate CreateIsolate(const char* script_uri,
-                                  const char* main,
+                                  const char* name,
                                   const uint8_t* snapshot_data,
                                   const uint8_t* snapshot_instructions,
                                   const uint8_t* shared_data,
@@ -1122,7 +1087,6 @@
                                   void* callback_data,
                                   char** error) {
   CHECK_NO_ISOLATE(Isolate::Current());
-  char* isolate_name = BuildIsolateName(script_uri, main);
 
   // Setup default flags in case none were passed.
   Dart_IsolateFlags api_flags;
@@ -1130,8 +1094,7 @@
     Isolate::FlagsInitialize(&api_flags);
     flags = &api_flags;
   }
-  Isolate* I = Dart::CreateIsolate(isolate_name, *flags);
-  free(isolate_name);
+  Isolate* I = Dart::CreateIsolate((name == NULL) ? "isolate" : name, *flags);
   if (I == NULL) {
     if (error != NULL) {
       *error = strdup("Isolate creation failed");
@@ -1186,7 +1149,7 @@
 
 DART_EXPORT Dart_Isolate
 Dart_CreateIsolate(const char* script_uri,
-                   const char* main,
+                   const char* name,
                    const uint8_t* snapshot_data,
                    const uint8_t* snapshot_instructions,
                    const uint8_t* shared_data,
@@ -1195,21 +1158,21 @@
                    void* callback_data,
                    char** error) {
   API_TIMELINE_DURATION(Thread::Current());
-  return CreateIsolate(script_uri, main, snapshot_data, snapshot_instructions,
+  return CreateIsolate(script_uri, name, snapshot_data, snapshot_instructions,
                        shared_data, shared_instructions, NULL, 0, flags,
                        callback_data, error);
 }
 
 DART_EXPORT Dart_Isolate
 Dart_CreateIsolateFromKernel(const char* script_uri,
-                             const char* main,
+                             const char* name,
                              const uint8_t* kernel_buffer,
                              intptr_t kernel_buffer_size,
                              Dart_IsolateFlags* flags,
                              void* callback_data,
                              char** error) {
   API_TIMELINE_DURATION(Thread::Current());
-  return CreateIsolate(script_uri, main, NULL, NULL, NULL, NULL, kernel_buffer,
+  return CreateIsolate(script_uri, name, NULL, NULL, NULL, NULL, kernel_buffer,
                        kernel_buffer_size, flags, callback_data, error);
 }
 
@@ -3088,7 +3051,7 @@
   }
   if (RawObject::IsTypedDataViewClassId(obj.GetClassId())) {
     const auto& view = TypedDataView::Cast(obj);
-    if (TypedDataView::ElementSizeInBytes(view) == 1) {
+    if (view.ElementSizeInBytes() == 1) {
       const intptr_t view_length = Smi::Value(view.length());
       if (!Utils::RangeCheck(offset, length, view_length)) {
         return Api::NewError(
diff --git a/runtime/vm/dart_api_impl.h b/runtime/vm/dart_api_impl.h
index 41f7383..202143e 100644
--- a/runtime/vm/dart_api_impl.h
+++ b/runtime/vm/dart_api_impl.h
@@ -297,11 +297,13 @@
 
   static bool IsFfiEnabled() {
     // dart:ffi is not implemented for the following configurations
-#if !defined(TARGET_ARCH_X64)
-    // https://github.com/dart-lang/sdk/issues/35774 IA32
+#if !defined(TARGET_ARCH_X64) && !defined(TARGET_ARCH_ARM64) &&                \
+    !defined(TARGET_ARCH_IA32)
+    // https://github.com/dart-lang/sdk/issues/35760 Arm32 && Android
+    // https://github.com/dart-lang/sdk/issues/35772 Arm64
     return false;
 #elif !defined(TARGET_OS_LINUX) && !defined(TARGET_OS_MACOS) &&                \
-    !defined(TARGET_OS_WINDOWS)
+    !defined(TARGET_OS_ANDROID) && !defined(TARGET_OS_WINDOWS)
     // https://github.com/dart-lang/sdk/issues/35760 Arm32 && Android
     // https://github.com/dart-lang/sdk/issues/35772 Arm64
     // https://github.com/dart-lang/sdk/issues/35773 DBC
diff --git a/runtime/vm/debugger.cc b/runtime/vm/debugger.cc
index 753a7c3..52064e7 100644
--- a/runtime/vm/debugger.cc
+++ b/runtime/vm/debugger.cc
@@ -3011,9 +3011,14 @@
       GrowableObjectArray::Handle(isolate_->object_store()->libraries());
   const GrowableObjectArray& scripts =
       GrowableObjectArray::Handle(zone, GrowableObjectArray::New());
+  bool is_package = script_url.StartsWith(Symbols::PackageScheme());
   for (intptr_t i = 0; i < libs.Length(); i++) {
     lib ^= libs.At(i);
-    script = lib.LookupScript(script_url);
+    // Ensure that all top-level members are loaded so their scripts
+    // are available for look up. When certain script only contains
+    // top level functions, scripts could still be loaded correctly.
+    lib.EnsureTopLevelClassIsFinalized();
+    script = lib.LookupScript(script_url, !is_package);
     if (!script.IsNull()) {
       scripts.Add(script);
     }
@@ -3915,9 +3920,10 @@
   while (loc != NULL) {
     url = loc->url();
     bool found_match = false;
+    bool is_package = url.StartsWith(Symbols::PackageScheme());
     for (intptr_t i = 0; i < libs.Length(); i++) {
       lib ^= libs.At(i);
-      script = lib.LookupScript(url);
+      script = lib.LookupScript(url, !is_package);
       if (!script.IsNull()) {
         // Found a script with matching url for this latent breakpoint.
         // Unlink the latent breakpoint from the list.
diff --git a/runtime/vm/ffi_trampoline_stubs_x64.cc b/runtime/vm/ffi_trampoline_stubs_x64.cc
deleted file mode 100644
index a98236d..0000000
--- a/runtime/vm/ffi_trampoline_stubs_x64.cc
+++ /dev/null
@@ -1,67 +0,0 @@
-// Copyright (c) 2019, the Dart project authors.  Please see the AUTHORS file
-// for details. All rights reserved. Use of this source code is governed by a
-// BSD-style license that can be found in the LICENSE file.
-
-// TODO(dacoharkes): Move this into compiler namespace.
-
-#include "vm/class_id.h"
-#include "vm/globals.h"
-
-#include "vm/stub_code.h"
-
-#if defined(TARGET_ARCH_X64) && !defined(DART_PRECOMPILED_RUNTIME)
-
-#include "vm/compiler/assembler/assembler.h"
-#include "vm/compiler/assembler/disassembler.h"
-#include "vm/compiler/backend/flow_graph_compiler.h"
-#include "vm/compiler/ffi.h"
-#include "vm/compiler/jit/compiler.h"
-#include "vm/constants_x64.h"
-#include "vm/dart_entry.h"
-#include "vm/heap/heap.h"
-#include "vm/heap/scavenger.h"
-#include "vm/instructions.h"
-#include "vm/object_store.h"
-#include "vm/resolver.h"
-#include "vm/stack_frame.h"
-#include "vm/tags.h"
-#include "vm/type_testing_stubs.h"
-
-#define __ assembler->
-
-namespace dart {
-
-void GenerateFfiInverseTrampoline(Assembler* assembler,
-                                  const Function& signature,
-                                  void* dart_entry_point) {
-  ZoneGrowableArray<Representation>* arg_representations =
-      compiler::ffi::ArgumentRepresentations(signature);
-  ZoneGrowableArray<Location>* arg_locations =
-      compiler::ffi::ArgumentLocations(*arg_representations);
-
-  intptr_t num_dart_arguments = signature.num_fixed_parameters();
-  intptr_t num_arguments = num_dart_arguments - 1;  // Ignore closure.
-
-  // TODO(dacoharkes): Implement this.
-  // https://github.com/dart-lang/sdk/issues/35761
-  // Look at StubCode::GenerateInvokeDartCodeStub.
-
-  __ int3();
-
-  for (intptr_t i = 0; i < num_arguments; i++) {
-    Register reg = arg_locations->At(i).reg();
-    __ SmiTag(reg);
-  }
-
-  __ movq(RBX, Immediate(reinterpret_cast<intptr_t>(dart_entry_point)));
-
-  __ int3();
-
-  __ call(RBX);
-
-  __ int3();
-}
-
-}  // namespace dart
-
-#endif  // defined(TARGET_ARCH_X64) && !defined(DART_PRECOMPILED_RUNTIME)
diff --git a/runtime/vm/hash_table.h b/runtime/vm/hash_table.h
index b84e35f..cd05fde 100644
--- a/runtime/vm/hash_table.h
+++ b/runtime/vm/hash_table.h
@@ -302,7 +302,7 @@
   }
   void UpdateCollisions(intptr_t collisions) const {
     if (KeyTraits::ReportStats()) {
-      if (data_->raw()->IsReadOnly()) {
+      if (data_->raw()->InVMIsolateHeap()) {
         return;
       }
       AdjustSmiValueAt(kNumProbesIndex, collisions + 1);
diff --git a/runtime/vm/heap/become.cc b/runtime/vm/heap/become.cc
index 9cda40a..d6feee1 100644
--- a/runtime/vm/heap/become.cc
+++ b/runtime/vm/heap/become.cc
@@ -193,14 +193,14 @@
   OS::PrintErr("BEFORE ADDRESS: %p\n", before_obj);
   OS::PrintErr("BEFORE IS HEAP OBJECT: %s",
                before_obj->IsHeapObject() ? "YES" : "NO");
-  OS::PrintErr("BEFORE IS READ ONLY OBJECT: %s",
-               before_obj->IsReadOnly() ? "YES" : "NO");
+  OS::PrintErr("BEFORE IN VMISOLATE HEAP OBJECT: %s",
+               before_obj->InVMIsolateHeap() ? "YES" : "NO");
 
   OS::PrintErr("AFTER ADDRESS: %p\n", after_obj);
   OS::PrintErr("AFTER IS HEAP OBJECT: %s",
                after_obj->IsHeapObject() ? "YES" : "NO");
-  OS::PrintErr("AFTER IS READ ONLY OBJECT: %s",
-               after_obj->IsReadOnly() ? "YES" : "NO");
+  OS::PrintErr("AFTER IN VMISOLATE HEAP OBJECT: %s",
+               after_obj->InVMIsolateHeap() ? "YES" : "NO");
 
   if (before_obj->IsHeapObject()) {
     OS::PrintErr("BEFORE OBJECT CLASS ID=%" Pd "\n", before_obj->GetClassId());
@@ -240,7 +240,7 @@
       CrashDump(before_obj, after_obj);
       FATAL("become: Cannot become immediates");
     }
-    if (before_obj->IsReadOnly()) {
+    if (before_obj->InVMIsolateHeap()) {
       CrashDump(before_obj, after_obj);
       FATAL("become: Cannot forward VM heap objects");
     }
diff --git a/runtime/vm/heap/compactor.cc b/runtime/vm/heap/compactor.cc
index 91e2058..06ac415 100644
--- a/runtime/vm/heap/compactor.cc
+++ b/runtime/vm/heap/compactor.cc
@@ -162,9 +162,9 @@
 // Slides live objects down past free gaps, updates pointers and frees empty
 // pages. Keeps cursors pointing to the next free and next live chunks, and
 // repeatedly moves the next live chunk to the next free chunk, one block at a
-// time, keeping blocks from spanning page boundries (see ForwardingBlock). Free
-// space at the end of a page that is too small for the next block is added to
-// the freelist.
+// time, keeping blocks from spanning page boundaries (see ForwardingBlock).
+// Free space at the end of a page that is too small for the next block is
+// added to the freelist.
 void GCCompactor::Compact(HeapPage* pages,
                           FreeList* freelist,
                           Mutex* pages_lock) {
@@ -246,6 +246,34 @@
     barrier.Exit();
   }
 
+  // Update inner pointers in typed data views (needs to be done after all
+  // threads are done with sliding since we need to access fields of the
+  // view's backing store)
+  //
+  // (If the sliding compactor was single-threaded we could do this during the
+  // sliding phase: The class id of the backing store can be either accessed by
+  // looking at the already-slided-object or the not-yet-slided object. Though
+  // with parallel sliding there is no safe way to access the backing store
+  // object header.)
+  {
+    TIMELINE_FUNCTION_GC_DURATION(thread(),
+                                  "ForwardTypedDataViewInternalPointers");
+    const intptr_t length = typed_data_views_.length();
+    for (intptr_t i = 0; i < length; ++i) {
+      auto raw_view = typed_data_views_[i];
+      const classid_t cid = raw_view->ptr()->typed_data_->GetClassIdMayBeSmi();
+
+      // If we have external typed data we can simply return, since the backing
+      // store lives in C-heap and will not move. Otherwise we have to update
+      // the inner pointer.
+      if (RawObject::IsTypedDataClassId(cid)) {
+        raw_view->RecomputeDataFieldForInternalTypedData();
+      } else {
+        ASSERT(RawObject::IsExternalTypedDataClassId(cid));
+      }
+    }
+  }
+
   for (intptr_t task_index = 0; task_index < num_tasks; task_index++) {
     ASSERT(tails[task_index] != NULL);
   }
@@ -394,7 +422,7 @@
   uword current = page->object_start();
   uword end = page->object_end();
 
-  ForwardingPage* forwarding_page = page->AllocateForwardingPage();
+  auto forwarding_page = page->AllocateForwardingPage();
   while (current < end) {
     current = PlanBlock(current, forwarding_page);
   }
@@ -404,7 +432,7 @@
   uword current = page->object_start();
   uword end = page->object_end();
 
-  ForwardingPage* forwarding_page = page->forwarding_page();
+  auto forwarding_page = page->forwarding_page();
   while (current < end) {
     current = SlideBlock(current, forwarding_page);
   }
@@ -485,7 +513,7 @@
                 reinterpret_cast<void*>(old_addr), size);
 
         if (RawObject::IsTypedDataClassId(new_obj->GetClassId())) {
-          reinterpret_cast<RawTypedData*>(new_obj)->ResetData();
+          reinterpret_cast<RawTypedData*>(new_obj)->RecomputeDataField();
         }
       }
       new_obj->ClearMarkBit();
@@ -570,6 +598,40 @@
   *ptr = new_target;
 }
 
+void GCCompactor::VisitTypedDataViewPointers(RawTypedDataView* view,
+                                             RawObject** first,
+                                             RawObject** last) {
+  // First we forward all fields of the typed data view.
+  RawObject* old_backing = view->ptr()->typed_data_;
+  VisitPointers(first, last);
+  RawObject* new_backing = view->ptr()->typed_data_;
+
+  const bool backing_moved = old_backing != new_backing;
+  if (backing_moved) {
+    // The backing store moved, so we *might* need to update the view's inner
+    // pointer. If the backing store is internal typed data we *have* to update
+    // it, otherwise (in case of external typed data) we don't have to.
+    //
+    // Unfortunately we cannot find out whether the backing store is internal
+    // or external during sliding phase: Even though we know the old and new
+    // location of the backing store another thread might be responsible for
+    // moving it and we have no way to tell when it got moved.
+    //
+    // So instead we queue all those views up and fix their inner pointer in a
+    // final phase after compaction.
+    MutexLocker ml(&typed_data_view_mutex_);
+    typed_data_views_.Add(view);
+  } else {
+    // The backing store didn't move, we therefore don't need to update the
+    // inner pointer.
+    if (view->ptr()->data_ == 0) {
+      ASSERT(ValueFromRawSmi(view->ptr()->offset_in_bytes_) == 0 &&
+             ValueFromRawSmi(view->ptr()->length_) == 0 &&
+             view->ptr()->typed_data_ == Object::null());
+    }
+  }
+}
+
 // N.B.: This pointer visitor is not idempotent. We must take care to visit
 // each pointer exactly once.
 void GCCompactor::VisitPointers(RawObject** first, RawObject** last) {
diff --git a/runtime/vm/heap/compactor.h b/runtime/vm/heap/compactor.h
index 903bf0e..c55eb9a 100644
--- a/runtime/vm/heap/compactor.h
+++ b/runtime/vm/heap/compactor.h
@@ -5,6 +5,8 @@
 #ifndef RUNTIME_VM_HEAP_COMPACTOR_H_
 #define RUNTIME_VM_HEAP_COMPACTOR_H_
 
+#include "platform/growable_array.h"
+
 #include "vm/allocation.h"
 #include "vm/dart_api_state.h"
 #include "vm/globals.h"
@@ -32,9 +34,14 @@
   void Compact(HeapPage* pages, FreeList* freelist, Mutex* mutex);
 
  private:
+  friend class CompactorTask;
+
   void SetupImagePageBoundaries();
   void ForwardStackPointers();
   void ForwardPointer(RawObject** ptr);
+  void VisitTypedDataViewPointers(RawTypedDataView* view,
+                                  RawObject** first,
+                                  RawObject** last);
   void VisitPointers(RawObject** first, RawObject** last);
   void VisitHandle(uword addr);
 
@@ -48,6 +55,11 @@
   // {instructions, data} x {vm isolate, current isolate, shared}
   static const intptr_t kMaxImagePages = 6;
   ImagePageRange image_page_ranges_[kMaxImagePages];
+
+  // The typed data views whose inner pointer must be updated after sliding is
+  // complete.
+  Mutex typed_data_view_mutex_;
+  MallocGrowableArray<RawTypedDataView*> typed_data_views_;
 };
 
 }  // namespace dart
diff --git a/runtime/vm/heap/heap.cc b/runtime/vm/heap/heap.cc
index a7220d1..10f20bb 100644
--- a/runtime/vm/heap/heap.cc
+++ b/runtime/vm/heap/heap.cc
@@ -1034,14 +1034,14 @@
 
 WritableVMIsolateScope::WritableVMIsolateScope(Thread* thread)
     : ThreadStackResource(thread) {
-  if (FLAG_write_protect_vm_isolate) {
+  if (FLAG_write_protect_code && FLAG_write_protect_vm_isolate) {
     Dart::vm_isolate()->heap()->WriteProtect(false);
   }
 }
 
 WritableVMIsolateScope::~WritableVMIsolateScope() {
   ASSERT(Dart::vm_isolate()->heap()->UsedInWords(Heap::kNew) == 0);
-  if (FLAG_write_protect_vm_isolate) {
+  if (FLAG_write_protect_code && FLAG_write_protect_vm_isolate) {
     Dart::vm_isolate()->heap()->WriteProtect(true);
   }
 }
diff --git a/runtime/vm/heap/marker.cc b/runtime/vm/heap/marker.cc
index 6f4a183..7ff24be 100644
--- a/runtime/vm/heap/marker.cc
+++ b/runtime/vm/heap/marker.cc
@@ -316,17 +316,30 @@
     return raw_weak->VisitPointersNonvirtual(this);
   }
 
-  void FinalizeInstructions() {
+  void ProcessDeferredMarking() {
     RawObject* raw_obj;
     while ((raw_obj = deferred_work_list_.Pop()) != NULL) {
-      ASSERT(raw_obj->IsInstructions());
-      RawInstructions* instr = static_cast<RawInstructions*>(raw_obj);
-      if (TryAcquireMarkBit(instr)) {
-        intptr_t size = instr->HeapSize();
+      ASSERT(raw_obj->IsHeapObject() && raw_obj->IsOldObject());
+      // N.B. We are scanning the object even if it is already marked.
+      const intptr_t class_id = raw_obj->GetClassId();
+      intptr_t size;
+      if (class_id != kWeakPropertyCid) {
+        size = raw_obj->VisitPointersNonvirtual(this);
+      } else {
+        RawWeakProperty* raw_weak = static_cast<RawWeakProperty*>(raw_obj);
+        size = ProcessWeakProperty(raw_weak);
+      }
+      // Add the size only if we win the marking race to prevent
+      // double-counting.
+      if (TryAcquireMarkBit(raw_obj)) {
         marked_bytes_ += size;
-        NOT_IN_PRODUCT(UpdateLiveOld(kInstructionsCid, size));
+        NOT_IN_PRODUCT(UpdateLiveOld(class_id, size));
       }
     }
+  }
+
+  void FinalizeDeferredMarking() {
+    ProcessDeferredMarking();
     deferred_work_list_.Finalize();
   }
 
@@ -654,6 +667,8 @@
       // Phase 1: Iterate over roots and drain marking stack in tasks.
       marker_->IterateRoots(visitor_);
 
+      visitor_->ProcessDeferredMarking();
+
       bool more_to_mark = false;
       do {
         do {
@@ -707,7 +722,7 @@
         barrier_->Sync();
       } while (more_to_mark);
 
-      visitor_->FinalizeInstructions();
+      visitor_->FinalizeDeferredMarking();
 
       // Phase 2: Weak processing and follow-up marking on main thread.
       barrier_->Sync();
@@ -925,8 +940,9 @@
                                 skipped_code_functions);
       ResetRootSlices();
       IterateRoots(&mark);
+      mark.ProcessDeferredMarking();
       mark.DrainMarkingStack();
-      mark.FinalizeInstructions();
+      mark.FinalizeDeferredMarking();
       {
         TIMELINE_FUNCTION_GC_DURATION(thread, "ProcessWeakHandles");
         MarkingWeakVisitor mark_weak(thread);
diff --git a/runtime/vm/heap/pages.cc b/runtime/vm/heap/pages.cc
index 19d8f04..5ef2454 100644
--- a/runtime/vm/heap/pages.cc
+++ b/runtime/vm/heap/pages.cc
@@ -57,8 +57,14 @@
 HeapPage* HeapPage::Allocate(intptr_t size_in_words,
                              PageType type,
                              const char* name) {
+#if defined(TARGET_ARCH_DBC)
+  bool executable = false;
+#else
+  bool executable = type == kExecutable;
+#endif
+
   VirtualMemory* memory = VirtualMemory::AllocateAligned(
-      size_in_words << kWordSizeLog2, kPageSize, type == kExecutable, name);
+      size_in_words << kWordSizeLog2, kPageSize, executable, name);
   if (memory == NULL) {
     return NULL;
   }
@@ -1365,6 +1371,18 @@
   image_pages_ = page;
 }
 
+bool PageSpace::IsObjectFromImagePages(dart::RawObject* object) {
+  uword object_addr = RawObject::ToAddr(object);
+  HeapPage* image_page = image_pages_;
+  while (image_page != nullptr) {
+    if (image_page->Contains(object_addr)) {
+      return true;
+    }
+    image_page = image_page->next();
+  }
+  return false;
+}
+
 PageSpaceController::PageSpaceController(Heap* heap,
                                          int heap_growth_ratio,
                                          int heap_growth_max,
diff --git a/runtime/vm/heap/pages.h b/runtime/vm/heap/pages.h
index d7381d7..8844ee7 100644
--- a/runtime/vm/heap/pages.h
+++ b/runtime/vm/heap/pages.h
@@ -445,6 +445,8 @@
     enable_concurrent_mark_ = enable_concurrent_mark;
   }
 
+  bool IsObjectFromImagePages(RawObject* object);
+
  private:
   // Ids for time and data records in Heap::GCStats.
   enum {
diff --git a/runtime/vm/heap/scavenger.cc b/runtime/vm/heap/scavenger.cc
index 0242715..fca7761 100644
--- a/runtime/vm/heap/scavenger.cc
+++ b/runtime/vm/heap/scavenger.cc
@@ -99,6 +99,44 @@
         bytes_promoted_(0),
         visiting_old_object_(NULL) {}
 
+  virtual void VisitTypedDataViewPointers(RawTypedDataView* view,
+                                          RawObject** first,
+                                          RawObject** last) {
+    // First we forward all fields of the typed data view.
+    VisitPointers(first, last);
+
+    if (view->ptr()->data_ == nullptr) {
+      ASSERT(ValueFromRawSmi(view->ptr()->offset_in_bytes_) == 0 &&
+             ValueFromRawSmi(view->ptr()->length_) == 0);
+      return;
+    }
+
+    // Validate 'this' is a typed data view.
+    const uword view_header =
+        *reinterpret_cast<uword*>(RawObject::ToAddr(view));
+    ASSERT(!IsForwarding(view_header) || view->IsOldObject());
+    ASSERT(RawObject::IsTypedDataViewClassId(view->GetClassIdMayBeSmi()));
+
+    // Validate that the backing store is not a forwarding word.
+    RawTypedDataBase* td = view->ptr()->typed_data_;
+    ASSERT(td->IsHeapObject());
+    const uword td_header = *reinterpret_cast<uword*>(RawObject::ToAddr(td));
+    ASSERT(!IsForwarding(td_header) || td->IsOldObject());
+
+    // We can always obtain the class id from the forwarded backing store.
+    const classid_t cid = td->GetClassId();
+
+    // If we have external typed data we can simply return since the backing
+    // store lives in C-heap and will not move.
+    if (RawObject::IsExternalTypedDataClassId(cid)) {
+      return;
+    }
+
+    // Now we update the inner pointer.
+    ASSERT(RawObject::IsTypedDataClassId(cid));
+    view->RecomputeDataFieldForInternalTypedData();
+  }
+
   void VisitPointers(RawObject** first, RawObject** last) {
     ASSERT(Utils::IsAligned(first, sizeof(*first)));
     ASSERT(Utils::IsAligned(last, sizeof(*last)));
@@ -209,7 +247,7 @@
       }
 
       if (RawObject::IsTypedDataClassId(new_obj->GetClassId())) {
-        reinterpret_cast<RawTypedData*>(new_obj)->ResetData();
+        reinterpret_cast<RawTypedData*>(new_obj)->RecomputeDataField();
       }
 
       // Remember forwarding address.
diff --git a/runtime/vm/image_snapshot.cc b/runtime/vm/image_snapshot.cc
index 4ca767d..34ede80 100644
--- a/runtime/vm/image_snapshot.cc
+++ b/runtime/vm/image_snapshot.cc
@@ -336,7 +336,6 @@
 
     // Write object header with the mark and read-only bits set.
     uword marked_tags = obj.raw()->ptr()->tags_;
-    marked_tags = RawObject::ReadOnlyBit::update(true, marked_tags);
     marked_tags = RawObject::OldBit::update(true, marked_tags);
     marked_tags = RawObject::OldAndNotMarkedBit::update(false, marked_tags);
     marked_tags = RawObject::OldAndNotRememberedBit::update(true, marked_tags);
@@ -487,7 +486,6 @@
 
       // Write Instructions with the mark and read-only bits set.
       uword marked_tags = insns.raw_ptr()->tags_;
-      marked_tags = RawObject::ReadOnlyBit::update(true, marked_tags);
       marked_tags = RawObject::OldBit::update(true, marked_tags);
       marked_tags = RawObject::OldAndNotMarkedBit::update(false, marked_tags);
       marked_tags =
@@ -737,7 +735,6 @@
 
     // Write Instructions with the mark and read-only bits set.
     uword marked_tags = insns.raw_ptr()->tags_;
-    marked_tags = RawObject::ReadOnlyBit::update(true, marked_tags);
     marked_tags = RawObject::OldBit::update(true, marked_tags);
     marked_tags = RawObject::OldAndNotMarkedBit::update(false, marked_tags);
     marked_tags = RawObject::OldAndNotRememberedBit::update(true, marked_tags);
@@ -823,7 +820,11 @@
   class DropCodeVisitor : public FunctionVisitor, public ClassVisitor {
    public:
     explicit DropCodeVisitor(const void* reused_instructions)
-        : code_(Code::Handle()), instructions_(Instructions::Handle()) {
+        : code_(Code::Handle()),
+          instructions_(Instructions::Handle()),
+          pool_(ObjectPool::Handle()),
+          table_(Array::Handle()),
+          entry_(Object::Handle()) {
       ImageWriter::SetupShared(&reused_instructions_, reused_instructions);
       if (FLAG_trace_reused_instructions) {
         OS::PrintErr("%" Pd " reusable instructions\n",
@@ -833,18 +834,20 @@
 
     void Visit(const Class& cls) {
       code_ = cls.allocation_stub();
-      if (!code_.IsNull() && !IsAvailable(code_)) {
-        if (FLAG_trace_reused_instructions) {
-          OS::PrintErr("No reusable instructions for %s\n", cls.ToCString());
+      if (!code_.IsNull()) {
+        if (!CanKeep(code_)) {
+          if (FLAG_trace_reused_instructions) {
+            OS::PrintErr("No reusable instructions for %s\n", cls.ToCString());
+          }
+          cls.DisableAllocationStub();
         }
-        cls.DisableAllocationStub();
       }
     }
 
     void Visit(const Function& func) {
       if (func.HasCode()) {
         code_ = func.CurrentCode();
-        if (!IsAvailable(code_)) {
+        if (!CanKeep(code_)) {
           if (FLAG_trace_reused_instructions) {
             OS::PrintErr("No reusable instructions for %s\n", func.ToCString());
           }
@@ -854,16 +857,44 @@
         }
       }
       code_ = func.unoptimized_code();
-      if (!code_.IsNull() && !IsAvailable(code_)) {
+      if (!code_.IsNull() && !CanKeep(code_)) {
         if (FLAG_trace_reused_instructions) {
           OS::PrintErr("No reusable instructions for %s\n", func.ToCString());
         }
         func.ClearCode();
         func.ClearICDataArray();
-        return;
       }
     }
 
+    bool CanKeep(const Code& code) {
+      if (!IsAvailable(code)) {
+        return false;
+      }
+
+      pool_ = code.object_pool();
+      for (intptr_t i = 0; i < pool_.Length(); i++) {
+        if (pool_.TypeAt(i) == ObjectPool::EntryType::kTaggedObject) {
+          entry_ = pool_.ObjectAt(i);
+          if (entry_.IsCode() && !IsAvailable(Code::Cast(entry_))) {
+            return false;
+          }
+        }
+      }
+
+      table_ = code.static_calls_target_table();
+      if (!table_.IsNull()) {
+        StaticCallsTable static_calls(table_);
+        for (auto& view : static_calls) {
+          entry_ = view.Get<Code::kSCallTableCodeTarget>();
+          if (entry_.IsCode() && !IsAvailable(Code::Cast(entry_))) {
+            return false;
+          }
+        }
+      }
+
+      return true;
+    }
+
    private:
     bool IsAvailable(const Code& code) {
       ObjectOffsetPair* pair = reused_instructions_.Lookup(code.instructions());
@@ -873,6 +904,9 @@
     ObjectOffsetMap reused_instructions_;
     Code& code_;
     Instructions& instructions_;
+    ObjectPool& pool_;
+    Array& table_;
+    Object& entry_;
 
     DISALLOW_COPY_AND_ASSIGN(DropCodeVisitor);
   };
diff --git a/runtime/vm/interpreter.cc b/runtime/vm/interpreter.cc
index 3e897e7..746e199 100644
--- a/runtime/vm/interpreter.cc
+++ b/runtime/vm/interpreter.cc
@@ -175,6 +175,8 @@
       return false;
     }
 
+    ASSERT(Isolate::Current()->use_field_guards());
+
     const classid_t nullability_cid = field->ptr()->is_nullable_;
     const classid_t value_cid = InterpreterHelpers::GetClassId(value);
 
@@ -575,170 +577,8 @@
                                                   RawObject*** SP) {
   ASSERT(!Function::HasCode(function) && !Function::HasBytecode(function));
   ASSERT(function == call_top[0]);
-  // If the function is an implicit getter or setter, process its invocation
-  // here without code or bytecode.
   RawFunction::Kind kind = Function::kind(function);
   switch (kind) {
-    case RawFunction::kImplicitGetter: {
-      // Field object is cached in function's data_.
-      RawInstance* instance = reinterpret_cast<RawInstance*>(*call_base);
-      RawField* field = reinterpret_cast<RawField*>(function->ptr()->data_);
-      intptr_t offset_in_words = Smi::Value(field->ptr()->value_.offset_);
-      RawObject* value =
-          reinterpret_cast<RawObject**>(instance->ptr())[offset_in_words];
-
-      const bool unboxing =
-          (field->ptr()->is_nullable_ != kNullCid) &&
-          Field::UnboxingCandidateBit::decode(field->ptr()->kind_bits_);
-      classid_t guarded_cid = field->ptr()->guarded_cid_;
-      if (unboxing && (guarded_cid == kDoubleCid)) {
-        double raw_value = Double::RawCast(value)->ptr()->value_;
-        if (!AllocateDoubleBox(thread, raw_value, *pc, *FP, *SP)) {
-          *invoked = true;
-          return false;
-        }
-        value = Double::RawCast(*SP[0]);
-      } else if (unboxing && (guarded_cid == kFloat32x4Cid)) {
-        simd128_value_t raw_value;
-        raw_value.readFrom(Float32x4::RawCast(value)->ptr()->value_);
-        if (!AllocateFloat32x4Box(thread, raw_value, *pc, *FP, *SP)) {
-          *invoked = true;
-          return false;
-        }
-        value = Float32x4::RawCast(*SP[0]);
-      } else if (unboxing && (guarded_cid == kFloat64x2Cid)) {
-        simd128_value_t raw_value;
-        raw_value.readFrom(Float64x2::RawCast(value)->ptr()->value_);
-        if (!AllocateFloat64x2Box(thread, raw_value, *pc, *FP, *SP)) {
-          *invoked = true;
-          return false;
-        }
-        value = Float64x2::RawCast(*SP[0]);
-      }
-
-      *SP = call_base;
-      **SP = value;
-      *invoked = true;
-      return true;
-    }
-    case RawFunction::kImplicitSetter: {
-      // Field object is cached in function's data_.
-      RawInstance* instance = reinterpret_cast<RawInstance*>(call_base[0]);
-      RawField* field = reinterpret_cast<RawField*>(function->ptr()->data_);
-      intptr_t offset_in_words = Smi::Value(field->ptr()->value_.offset_);
-      RawAbstractType* field_type = field->ptr()->type_;
-      classid_t cid;
-      if (field_type->GetClassId() == kTypeCid) {
-        cid = Smi::Value(reinterpret_cast<RawSmi*>(
-            Type::RawCast(field_type)->ptr()->type_class_id_));
-      } else {
-        cid = kIllegalCid;  // Not really illegal, but not a Type to skip.
-      }
-      // Perform type test of value if field type is not one of dynamic, object,
-      // or void, and if the value is not null.
-      RawObject* null_value = Object::null();
-      RawObject* value = call_base[1];
-      if (cid != kDynamicCid && cid != kInstanceCid && cid != kVoidCid &&
-          value != null_value) {
-        RawSubtypeTestCache* cache = field->ptr()->type_test_cache_;
-        if (cache->GetClassId() != kSubtypeTestCacheCid) {
-          // Allocate new cache.
-          call_top[1] = null_value;  // Result.
-          Exit(thread, *FP, call_top + 2, *pc);
-          NativeArguments native_args(thread, 0, call_top + 1, call_top + 1);
-          if (!InvokeRuntime(thread, this, DRT_AllocateSubtypeTestCache,
-                             native_args)) {
-            *invoked = true;
-            return false;
-          }
-          // Reload objects after the call which may trigger GC.
-          function = reinterpret_cast<RawFunction*>(call_top[0]);
-          field = reinterpret_cast<RawField*>(function->ptr()->data_);
-          field_type = field->ptr()->type_;
-          instance = reinterpret_cast<RawInstance*>(call_base[0]);
-          value = call_base[1];
-          cache = reinterpret_cast<RawSubtypeTestCache*>(call_top[1]);
-          field->ptr()->type_test_cache_ = cache;
-        }
-        // Push arguments of type test.
-        call_top[1] = value;
-        call_top[2] = field_type;
-        // Provide type arguments of instance as instantiator.
-        RawClass* instance_class = thread->isolate()->class_table()->At(
-            InterpreterHelpers::GetClassId(instance));
-        call_top[3] =
-            instance_class->ptr()->num_type_arguments_ > 0
-                ? reinterpret_cast<RawObject**>(
-                      instance
-                          ->ptr())[instance_class->ptr()
-                                       ->type_arguments_field_offset_in_words_]
-                : null_value;
-        call_top[4] = null_value;  // Implicit setters cannot be generic.
-        call_top[5] = field->ptr()->name_;
-        if (!AssertAssignable(thread, *pc, *FP, call_top + 5, call_top + 1,
-                              cache)) {
-          *invoked = true;
-          return false;
-        }
-        // Reload objects after the call which may trigger GC.
-        function = reinterpret_cast<RawFunction*>(call_top[0]);
-        field = reinterpret_cast<RawField*>(function->ptr()->data_);
-        instance = reinterpret_cast<RawInstance*>(call_base[0]);
-        value = call_base[1];
-      }
-      if (thread->isolate()->use_field_guards() &&
-          InterpreterHelpers::FieldNeedsGuardUpdate(field, value)) {
-        call_top[1] = 0;  // Unused result of runtime call.
-        call_top[2] = field;
-        call_top[3] = value;
-        Exit(thread, *FP, call_top + 4, *pc);
-        NativeArguments native_args(thread, 2, call_top + 2, call_top + 1);
-        if (!InvokeRuntime(thread, this, DRT_UpdateFieldCid, native_args)) {
-          *invoked = true;
-          return false;
-        }
-        // Reload objects after the call which may trigger GC.
-        instance = reinterpret_cast<RawInstance*>(call_base[0]);
-        value = call_base[1];
-      }
-
-      const bool unboxing =
-          (field->ptr()->is_nullable_ != kNullCid) &&
-          Field::UnboxingCandidateBit::decode(field->ptr()->kind_bits_);
-      classid_t guarded_cid = field->ptr()->guarded_cid_;
-      if (unboxing && (guarded_cid == kDoubleCid)) {
-        double raw_value = Double::RawCast(value)->ptr()->value_;
-        RawDouble* box =
-            *(reinterpret_cast<RawDouble**>(instance->ptr()) + offset_in_words);
-        ASSERT(box != null_value);  // Non-initializing store.
-        box->ptr()->value_ = raw_value;
-      } else if (unboxing && (guarded_cid == kFloat32x4Cid)) {
-        simd128_value_t raw_value;
-        raw_value.readFrom(Float32x4::RawCast(value)->ptr()->value_);
-        RawFloat32x4* box =
-            *(reinterpret_cast<RawFloat32x4**>(instance->ptr()) +
-              offset_in_words);
-        ASSERT(box != null_value);  // Non-initializing store.
-        raw_value.writeTo(box->ptr()->value_);
-      } else if (unboxing && (guarded_cid == kFloat64x2Cid)) {
-        simd128_value_t raw_value;
-        raw_value.readFrom(Float64x2::RawCast(value)->ptr()->value_);
-        RawFloat64x2* box =
-            *(reinterpret_cast<RawFloat64x2**>(instance->ptr()) +
-              offset_in_words);
-        ASSERT(box != null_value);  // Non-initializing store.
-        raw_value.writeTo(box->ptr()->value_);
-      } else {
-        instance->StorePointer(
-            reinterpret_cast<RawObject**>(instance->ptr()) + offset_in_words,
-            value, thread);
-      }
-
-      *SP = call_base;
-      **SP = null_value;
-      *invoked = true;
-      return true;
-    }
     case RawFunction::kImplicitStaticFinalGetter: {
       // Field object is cached in function's data_.
       RawField* field = reinterpret_cast<RawField*>(function->ptr()->data_);
@@ -801,39 +641,91 @@
       }
       if (call_function == Function::null()) {
         // Invoke field getter on receiver.
-        call_top[1] = 0;                       // Result of runtime call.
-        call_top[2] = receiver;                // Receiver.
-        call_top[3] = function->ptr()->name_;  // Field name.
-        Exit(thread, *FP, call_top + 4, *pc);
-        NativeArguments native_args(thread, 2, call_top + 2, call_top + 1);
+        call_top[1] = argdesc_;                // Save argdesc_.
+        call_top[2] = 0;                       // Result of runtime call.
+        call_top[3] = receiver;                // Receiver.
+        call_top[4] = function->ptr()->name_;  // Field name.
+        Exit(thread, *FP, call_top + 5, *pc);
+        NativeArguments native_args(thread, 2, call_top + 3, call_top + 2);
         if (!InvokeRuntime(thread, this, DRT_GetFieldForDispatch,
                            native_args)) {
           return false;
         }
+        argdesc_ = Array::RawCast(call_top[1]);
+
+        // Replace receiver with field value, keep all other arguments, and
+        // invoke 'call' function, or if not found, invoke noSuchMethod.
+        receiver = call_top[2];
+        call_base[receiver_idx] = receiver;
+
         // If the field value is a closure, no need to resolve 'call' function.
         // Otherwise, call runtime to resolve 'call' function.
-        if (InterpreterHelpers::GetClassId(call_top[1]) == kClosureCid) {
+        if (InterpreterHelpers::GetClassId(receiver) == kClosureCid) {
           // Closure call.
-          call_function = Closure::RawCast(call_top[1])->ptr()->function_;
+          call_function = Closure::RawCast(receiver)->ptr()->function_;
         } else {
           // Resolve and invoke the 'call' function.
-          call_top[2] = 0;  // Result of runtime call.
-          Exit(thread, *FP, call_top + 3, *pc);
-          NativeArguments native_args(thread, 1, call_top + 1, call_top + 2);
+          call_top[3] = argdesc_;
+          call_top[4] = 0;  // Result of runtime call.
+          Exit(thread, *FP, call_top + 5, *pc);
+          NativeArguments native_args(thread, 2, call_top + 2, call_top + 4);
           if (!InvokeRuntime(thread, this, DRT_ResolveCallFunction,
                              native_args)) {
             return false;
           }
-          call_function = Function::RawCast(call_top[2]);
+          argdesc_ = Array::RawCast(call_top[1]);
+          call_function = Function::RawCast(call_top[4]);
           if (call_function == Function::null()) {
-            // 'Call' could not be resolved. TODO(regis): Can this happen?
-            // Fall back to jitting the field dispatcher function.
-            break;
+            // Function 'call' could not be resolved for argdesc_.
+            // Invoke noSuchMethod.
+            const intptr_t argc =
+                receiver_idx + InterpreterHelpers::ArgDescArgCount(argdesc_);
+            RawObject* null_value = Object::null();
+            call_top[1] = null_value;
+            call_top[2] = call_base[receiver_idx];
+            call_top[3] = argdesc_;
+            call_top[4] = null_value;  // Array of arguments (will be filled).
+
+            // Allocate array of arguments.
+            {
+              call_top[5] = Smi::New(argc);  // length
+              call_top[6] = null_value;      // type
+              Exit(thread, *FP, call_top + 7, *pc);
+              NativeArguments native_args(thread, 2, call_top + 5,
+                                          call_top + 4);
+              if (!InvokeRuntime(thread, this, DRT_AllocateArray,
+                                 native_args)) {
+                return false;
+              }
+
+              // Copy arguments into the newly allocated array.
+              RawArray* array = static_cast<RawArray*>(call_top[4]);
+              ASSERT(array->GetClassId() == kArrayCid);
+              for (intptr_t i = 0; i < argc; i++) {
+                array->ptr()->data()[i] = call_base[i];
+              }
+            }
+
+            // We failed to resolve 'call' function.
+            call_top[5] = Symbols::Call().raw();
+
+            // Invoke noSuchMethod passing down receiver, argument descriptor,
+            // array of arguments, and target name.
+            {
+              Exit(thread, *FP, call_top + 6, *pc);
+              NativeArguments native_args(thread, 4, call_top + 2,
+                                          call_top + 1);
+              if (!InvokeRuntime(thread, this, DRT_InvokeNoSuchMethod,
+                                 native_args)) {
+                return false;
+              }
+            }
+            *SP = call_base;
+            **SP = call_top[1];
+            *invoked = true;
+            return true;
           }
         }
-        // Replace receiver with field value, keep all other arguments, and
-        // invoke 'call' function.
-        call_base[receiver_idx] = call_top[1];
       }
       ASSERT(call_function != Function::null());
       // Patch field dispatcher in callee frame with call function.
@@ -2177,10 +2069,12 @@
         SP[0] = reinterpret_cast<RawObject**>(
             instance->ptr())[Array::length_offset() / kWordSize];
       } break;
-      case MethodRecognizer::kTypedDataLength: {
-        RawInstance* instance = reinterpret_cast<RawInstance*>(SP[0]);
+      case MethodRecognizer::kTypedListLength:
+      case MethodRecognizer::kTypedListViewLength:
+      case MethodRecognizer::kByteDataViewLength: {
+        RawInstance* instance = reinterpret_cast<RawTypedDataBase*>(SP[0]);
         SP[0] = reinterpret_cast<RawObject**>(
-            instance->ptr())[TypedData::length_offset() / kWordSize];
+            instance->ptr())[TypedDataBase::length_offset() / kWordSize];
       } break;
       case MethodRecognizer::kClassIDgetID: {
         SP[0] = InterpreterHelpers::GetClassIdAsSmi(SP[0]);
@@ -2397,8 +2291,7 @@
     RawObject* value = reinterpret_cast<RawObject*>(SP[0]);
     intptr_t offset_in_words = Smi::Value(field->ptr()->value_.offset_);
 
-    if (thread->isolate()->use_field_guards() &&
-        InterpreterHelpers::FieldNeedsGuardUpdate(field, value)) {
+    if (InterpreterHelpers::FieldNeedsGuardUpdate(field, value)) {
       SP[1] = 0;  // Unused result of runtime call.
       SP[2] = field;
       SP[3] = value;
@@ -2968,6 +2861,173 @@
     DISPATCH();
   }
 
+  {
+    BYTECODE(VMInternal_ImplicitGetter, 0);
+    // Field object is cached in function's data_.
+    RawField* field =
+        reinterpret_cast<RawField*>(FrameFunction(FP)->ptr()->data_);
+    intptr_t offset_in_words = Smi::Value(field->ptr()->value_.offset_);
+
+    const intptr_t kArgc = 1;
+    RawInstance* instance =
+        reinterpret_cast<RawInstance*>(FrameArguments(FP, kArgc)[0]);
+    RawObject* value =
+        reinterpret_cast<RawObject**>(instance->ptr())[offset_in_words];
+
+    *++SP = value;
+
+    const bool unboxing =
+        (field->ptr()->is_nullable_ != kNullCid) &&
+        Field::UnboxingCandidateBit::decode(field->ptr()->kind_bits_);
+    classid_t guarded_cid = field->ptr()->guarded_cid_;
+    if (unboxing && (guarded_cid == kDoubleCid)) {
+      double raw_value = Double::RawCast(value)->ptr()->value_;
+      // AllocateDoubleBox places result at SP[0]
+      if (!AllocateDoubleBox(thread, raw_value, pc, FP, SP)) {
+        HANDLE_EXCEPTION;
+      }
+    } else if (unboxing && (guarded_cid == kFloat32x4Cid)) {
+      simd128_value_t raw_value;
+      raw_value.readFrom(Float32x4::RawCast(value)->ptr()->value_);
+      // AllocateFloat32x4Box places result at SP[0]
+      if (!AllocateFloat32x4Box(thread, raw_value, pc, FP, SP)) {
+        HANDLE_EXCEPTION;
+      }
+    } else if (unboxing && (guarded_cid == kFloat64x2Cid)) {
+      simd128_value_t raw_value;
+      raw_value.readFrom(Float64x2::RawCast(value)->ptr()->value_);
+      // AllocateFloat64x2Box places result at SP[0]
+      if (!AllocateFloat64x2Box(thread, raw_value, pc, FP, SP)) {
+        HANDLE_EXCEPTION;
+      }
+    }
+
+    DISPATCH();
+  }
+
+  {
+    BYTECODE(VMInternal_ImplicitSetter, 0);
+    // Field object is cached in function's data_.
+    RawField* field =
+        reinterpret_cast<RawField*>(FrameFunction(FP)->ptr()->data_);
+    intptr_t offset_in_words = Smi::Value(field->ptr()->value_.offset_);
+    const intptr_t kArgc = 2;
+    RawInstance* instance =
+        reinterpret_cast<RawInstance*>(FrameArguments(FP, kArgc)[0]);
+    RawObject* value = FrameArguments(FP, kArgc)[1];
+
+    RawAbstractType* field_type = field->ptr()->type_;
+    classid_t cid;
+    if (field_type->GetClassId() == kTypeCid) {
+      cid = Smi::Value(reinterpret_cast<RawSmi*>(
+          Type::RawCast(field_type)->ptr()->type_class_id_));
+    } else {
+      cid = kIllegalCid;  // Not really illegal, but not a Type to skip.
+    }
+    // Perform type test of value if field type is not one of dynamic, object,
+    // or void, and if the value is not null.
+    RawObject* null_value = Object::null();
+    if (cid != kDynamicCid && cid != kInstanceCid && cid != kVoidCid &&
+        value != null_value) {
+      RawSubtypeTestCache* cache = field->ptr()->type_test_cache_;
+      if (cache->GetClassId() != kSubtypeTestCacheCid) {
+        // Allocate new cache.
+        SP[1] = null_value;  // Result.
+
+        Exit(thread, FP, SP + 2, pc);
+        NativeArguments native_args(thread, 0, /* argv */ SP + 1,
+                                    /* retval */ SP + 1);
+        if (!InvokeRuntime(thread, this, DRT_AllocateSubtypeTestCache,
+                           native_args)) {
+          HANDLE_EXCEPTION;
+        }
+
+        // Reload objects after the call which may trigger GC.
+        field = reinterpret_cast<RawField*>(FrameFunction(FP)->ptr()->data_);
+        field_type = field->ptr()->type_;
+        instance = reinterpret_cast<RawInstance*>(FrameArguments(FP, kArgc)[0]);
+        value = FrameArguments(FP, kArgc)[1];
+        cache = reinterpret_cast<RawSubtypeTestCache*>(SP[1]);
+        field->ptr()->type_test_cache_ = cache;
+      }
+
+      // Push arguments of type test.
+      SP[1] = value;
+      SP[2] = field_type;
+      // Provide type arguments of instance as instantiator.
+      RawClass* instance_class = thread->isolate()->class_table()->At(
+          InterpreterHelpers::GetClassId(instance));
+      SP[3] =
+          instance_class->ptr()->num_type_arguments_ > 0
+              ? reinterpret_cast<RawObject**>(
+                    instance
+                        ->ptr())[instance_class->ptr()
+                                     ->type_arguments_field_offset_in_words_]
+              : null_value;
+      SP[4] = null_value;  // Implicit setters cannot be generic.
+      SP[5] = field->ptr()->name_;
+      if (!AssertAssignable(thread, pc, FP, /* argv */ SP + 5,
+                            /* reval */ SP + 1, cache)) {
+        HANDLE_EXCEPTION;
+      }
+
+      // Reload objects after the call which may trigger GC.
+      field = reinterpret_cast<RawField*>(FrameFunction(FP)->ptr()->data_);
+      instance = reinterpret_cast<RawInstance*>(FrameArguments(FP, kArgc)[0]);
+      value = FrameArguments(FP, kArgc)[1];
+    }
+
+    if (InterpreterHelpers::FieldNeedsGuardUpdate(field, value)) {
+      SP[1] = 0;  // Unused result of runtime call.
+      SP[2] = field;
+      SP[3] = value;
+      Exit(thread, FP, SP + 4, pc);
+      NativeArguments native_args(thread, 2, /* argv */ SP + 2,
+                                  /* retval */ SP + 1);
+      if (!InvokeRuntime(thread, this, DRT_UpdateFieldCid, native_args)) {
+        HANDLE_EXCEPTION;
+      }
+
+      // Reload objects after the call which may trigger GC.
+      instance = reinterpret_cast<RawInstance*>(FrameArguments(FP, kArgc)[0]);
+      value = FrameArguments(FP, kArgc)[1];
+    }
+
+    const bool unboxing =
+        (field->ptr()->is_nullable_ != kNullCid) &&
+        Field::UnboxingCandidateBit::decode(field->ptr()->kind_bits_);
+    classid_t guarded_cid = field->ptr()->guarded_cid_;
+    if (unboxing && (guarded_cid == kDoubleCid)) {
+      double raw_value = Double::RawCast(value)->ptr()->value_;
+      RawDouble* box =
+          *(reinterpret_cast<RawDouble**>(instance->ptr()) + offset_in_words);
+      ASSERT(box != null_value);  // Non-initializing store.
+      box->ptr()->value_ = raw_value;
+    } else if (unboxing && (guarded_cid == kFloat32x4Cid)) {
+      simd128_value_t raw_value;
+      raw_value.readFrom(Float32x4::RawCast(value)->ptr()->value_);
+      RawFloat32x4* box = *(reinterpret_cast<RawFloat32x4**>(instance->ptr()) +
+                            offset_in_words);
+      ASSERT(box != null_value);  // Non-initializing store.
+      raw_value.writeTo(box->ptr()->value_);
+    } else if (unboxing && (guarded_cid == kFloat64x2Cid)) {
+      simd128_value_t raw_value;
+      raw_value.readFrom(Float64x2::RawCast(value)->ptr()->value_);
+      RawFloat64x2* box = *(reinterpret_cast<RawFloat64x2**>(instance->ptr()) +
+                            offset_in_words);
+      ASSERT(box != null_value);  // Non-initializing store.
+      raw_value.writeTo(box->ptr()->value_);
+    } else {
+      instance->StorePointer(
+          reinterpret_cast<RawObject**>(instance->ptr()) + offset_in_words,
+          value, thread);
+    }
+
+    *++SP = null_value;
+
+    DISPATCH();
+  }
+
   // Helper used to handle noSuchMethod on closures.
   {
   ClosureNoSuchMethod:
diff --git a/runtime/vm/isolate.cc b/runtime/vm/isolate.cc
index ce8ed3f..b99c204 100644
--- a/runtime/vm/isolate.cc
+++ b/runtime/vm/isolate.cc
@@ -66,20 +66,6 @@
 DECLARE_FLAG(bool, trace_reload);
 #endif  // !defined(PRODUCT) && !defined(DART_PRECOMPILED_RUNTIME)
 
-#if !defined(PRODUCT)
-static void CheckedModeHandler(bool value) {
-  FLAG_enable_asserts = value;
-}
-
-// --enable-checked-mode and --checked both enable checked mode which is
-// equivalent to setting --enable-asserts and --enable-type-checks.
-DEFINE_FLAG_HANDLER(CheckedModeHandler,
-                    enable_checked_mode,
-                    "Enable checked mode.");
-
-DEFINE_FLAG_HANDLER(CheckedModeHandler, checked, "Enable checked mode.");
-#endif  // !defined(PRODUCT)
-
 static void DeterministicModeHandler(bool value) {
   if (value) {
     FLAG_background_compilation = false;  // Timing dependent.
@@ -2641,6 +2627,18 @@
   return count;
 }
 
+Isolate* Isolate::LookupIsolateByPort(Dart_Port port) {
+  MonitorLocker ml(isolates_list_monitor_);
+  Isolate* current = isolates_list_head_;
+  while (current != NULL) {
+    if (current->main_port() == port) {
+      return current;
+    }
+    current = current->next_;
+  }
+  return NULL;
+}
+
 bool Isolate::AddIsolateToList(Isolate* isolate) {
   MonitorLocker ml(isolates_list_monitor_);
   if (!creation_enabled_) {
@@ -2926,7 +2924,8 @@
                                      bool paused,
                                      bool errors_are_fatal,
                                      Dart_Port on_exit_port,
-                                     Dart_Port on_error_port)
+                                     Dart_Port on_error_port,
+                                     const char* debug_name)
     : isolate_(NULL),
       parent_port_(parent_port),
       origin_id_(origin_id),
@@ -2939,6 +2938,7 @@
       library_url_(NULL),
       class_name_(NULL),
       function_name_(NULL),
+      debug_name_(debug_name),
       serialized_args_(NULL),
       serialized_message_(message_buffer->StealMessage()),
       spawn_count_monitor_(spawn_count_monitor),
@@ -2975,7 +2975,8 @@
                                      bool paused,
                                      bool errors_are_fatal,
                                      Dart_Port on_exit_port,
-                                     Dart_Port on_error_port)
+                                     Dart_Port on_error_port,
+                                     const char* debug_name)
     : isolate_(NULL),
       parent_port_(parent_port),
       origin_id_(ILLEGAL_PORT),
@@ -2988,6 +2989,7 @@
       library_url_(NULL),
       class_name_(NULL),
       function_name_(NULL),
+      debug_name_(debug_name),
       serialized_args_(args_buffer->StealMessage()),
       serialized_message_(message_buffer->StealMessage()),
       spawn_count_monitor_(spawn_count_monitor),
@@ -3009,6 +3011,7 @@
   delete[] library_url_;
   delete[] class_name_;
   delete[] function_name_;
+  delete[] debug_name_;
   delete serialized_args_;
   delete serialized_message_;
 }
diff --git a/runtime/vm/isolate.h b/runtime/vm/isolate.h
index 40f0c6f..c4dd373 100644
--- a/runtime/vm/isolate.h
+++ b/runtime/vm/isolate.h
@@ -772,6 +772,10 @@
   static void KillAllIsolates(LibMsgId msg_id);
   static void KillIfExists(Isolate* isolate, LibMsgId msg_id);
 
+  // Lookup an isolate by its main port. Returns NULL if no matching isolate is
+  // found.
+  static Isolate* LookupIsolateByPort(Dart_Port port);
+
   static void DisableIsolateCreation();
   static void EnableIsolateCreation();
   static bool IsolateCreationEnabled();
@@ -1120,7 +1124,8 @@
                     bool paused,
                     bool errorsAreFatal,
                     Dart_Port onExit,
-                    Dart_Port onError);
+                    Dart_Port onError,
+                    const char* debug_name);
   IsolateSpawnState(Dart_Port parent_port,
                     void* init_data,
                     const char* script_url,
@@ -1133,7 +1138,8 @@
                     bool paused,
                     bool errorsAreFatal,
                     Dart_Port onExit,
-                    Dart_Port onError);
+                    Dart_Port onError,
+                    const char* debug_name);
   ~IsolateSpawnState();
 
   Isolate* isolate() const { return isolate_; }
@@ -1150,6 +1156,7 @@
   const char* library_url() const { return library_url_; }
   const char* class_name() const { return class_name_; }
   const char* function_name() const { return function_name_; }
+  const char* debug_name() const { return debug_name_; }
   bool is_spawn_uri() const { return library_url_ == NULL; }
   bool paused() const { return paused_; }
   bool errors_are_fatal() const { return errors_are_fatal_; }
@@ -1174,6 +1181,7 @@
   const char* library_url_;
   const char* class_name_;
   const char* function_name_;
+  const char* debug_name_;
   Message* serialized_args_;
   Message* serialized_message_;
 
diff --git a/runtime/vm/kernel.cc b/runtime/vm/kernel.cc
index 5d67407..13227c5 100644
--- a/runtime/vm/kernel.cc
+++ b/runtime/vm/kernel.cc
@@ -5,6 +5,7 @@
 #include "vm/kernel.h"
 
 #include "vm/bit_vector.h"
+#include "vm/compiler/frontend/bytecode_reader.h"
 #include "vm/compiler/frontend/constant_evaluator.h"
 #include "vm/compiler/frontend/kernel_translation_helper.h"
 #include "vm/longjump.h"
@@ -605,6 +606,14 @@
       ExternalTypedData::Handle(zone, function.KernelData()),
       function.KernelDataProgramOffset());
 
+  if (function.is_declared_in_bytecode()) {
+    BytecodeReaderHelper bytecode_reader_helper(&reader_helper, nullptr,
+                                                nullptr);
+    bytecode_reader_helper.ReadParameterCovariance(function, is_covariant,
+                                                   is_generic_covariant_impl);
+    return;
+  }
+
   reader_helper.SetOffset(function.kernel_offset());
   reader_helper.ReadUntilFunctionNode();
 
@@ -689,8 +698,7 @@
 
 bool IsFieldInitializer(const Function& function, Zone* zone) {
   return (function.kind() == RawFunction::kImplicitStaticFinalGetter) &&
-         String::Handle(zone, function.name())
-             .StartsWith(Symbols::InitPrefix());
+         Field::IsInitName(String::Handle(zone, function.name()));
 }
 
 static ProcedureAttributesMetadata ProcedureAttributesOf(
diff --git a/runtime/vm/kernel.h b/runtime/vm/kernel.h
index db52690..99b3454 100644
--- a/runtime/vm/kernel.h
+++ b/runtime/vm/kernel.h
@@ -73,6 +73,7 @@
                                     const char** error = nullptr);
 
   bool is_single_program() { return single_program_; }
+  uint32_t binary_version() { return binary_version_; }
   NameIndex main_method() { return main_method_reference_; }
   intptr_t source_table_offset() const { return source_table_offset_; }
   intptr_t string_table_offset() const { return string_table_offset_; }
@@ -92,6 +93,7 @@
   Program() : kernel_data_(NULL), kernel_data_size_(-1) {}
 
   bool single_program_;
+  uint32_t binary_version_;
   NameIndex main_method_reference_;  // Procedure.
   intptr_t library_count_;
 
diff --git a/runtime/vm/kernel_binary.cc b/runtime/vm/kernel_binary.cc
index 0824578..d3f2838 100644
--- a/runtime/vm/kernel_binary.cc
+++ b/runtime/vm/kernel_binary.cc
@@ -77,6 +77,7 @@
   }
 
   Program* program = new Program();
+  program->binary_version_ = formatVersion;
   program->kernel_data_ = reader->buffer();
   program->kernel_data_size_ = reader->size();
 
diff --git a/runtime/vm/kernel_binary.h b/runtime/vm/kernel_binary.h
index 28e92be..ab22ff4 100644
--- a/runtime/vm/kernel_binary.h
+++ b/runtime/vm/kernel_binary.h
@@ -20,7 +20,7 @@
 
 // Both version numbers are inclusive.
 static const uint32_t kMinSupportedKernelFormatVersion = 18;
-static const uint32_t kMaxSupportedKernelFormatVersion = 21;
+static const uint32_t kMaxSupportedKernelFormatVersion = 22;
 
 // Keep in sync with package:kernel/lib/binary/tag.dart
 #define KERNEL_TAG_LIST(V)                                                     \
diff --git a/runtime/vm/kernel_isolate.cc b/runtime/vm/kernel_isolate.cc
index ab90491..79fb581 100644
--- a/runtime/vm/kernel_isolate.cc
+++ b/runtime/vm/kernel_isolate.cc
@@ -98,8 +98,9 @@
     api_flags.use_osr = true;
 #endif
 
-    isolate = reinterpret_cast<Isolate*>(create_callback(
-        KernelIsolate::kName, NULL, NULL, NULL, &api_flags, NULL, &error));
+    isolate = reinterpret_cast<Isolate*>(
+        create_callback(KernelIsolate::kName, KernelIsolate::kName, NULL, NULL,
+                        &api_flags, NULL, &error));
     if (isolate == NULL) {
       if (FLAG_trace_kernel) {
         OS::PrintErr(DART_KERNEL_ISOLATE_NAME ": Isolate creation error: %s\n",
diff --git a/runtime/vm/kernel_loader.cc b/runtime/vm/kernel_loader.cc
index fa5549e..183ae42 100644
--- a/runtime/vm/kernel_loader.cc
+++ b/runtime/vm/kernel_loader.cc
@@ -175,7 +175,10 @@
       class_offset + class_size - 4 - (procedure_count_ + 1) * 4;
 }
 
-KernelLoader::KernelLoader(Program* program)
+using UriToSourceTable = DirectChainedHashMap<UriToSourceTableTrait>;
+
+KernelLoader::KernelLoader(Program* program,
+                           UriToSourceTable* uri_to_source_table)
     : program_(program),
       thread_(Thread::Current()),
       zone_(thread_->zone()),
@@ -209,7 +212,7 @@
         "Trying to load a concatenated dill file at a time where that is "
         "not allowed");
   }
-  InitializeFields();
+  InitializeFields(uri_to_source_table);
 }
 
 void KernelLoader::ReadObfuscationProhibitions() {
@@ -223,7 +226,7 @@
   TIMELINE_DURATION(thread, Isolate, "LoadKernel");
 
   if (program->is_single_program()) {
-    KernelLoader loader(program);
+    KernelLoader loader(program, /*uri_to_source_table=*/nullptr);
     return Object::Handle(loader.LoadProgram(process_pending_classes));
   }
 
@@ -233,8 +236,50 @@
 
   Zone* zone = thread->zone();
   Library& library = Library::Handle(zone);
-  // Create "fake programs" for each sub-program.
   intptr_t subprogram_count = subprogram_file_starts.length() - 1;
+
+  // First index all source tables.
+  UriToSourceTable uri_to_source_table;
+  UriToSourceTableEntry wrapper;
+  for (intptr_t i = subprogram_count - 1; i >= 0; --i) {
+    intptr_t subprogram_start = subprogram_file_starts.At(i);
+    intptr_t subprogram_end = subprogram_file_starts.At(i + 1);
+    Thread* thread_ = Thread::Current();
+    Zone* zone_ = thread_->zone();
+    TranslationHelper translation_helper(thread);
+    KernelReaderHelper helper_(zone_, &translation_helper,
+                               program->kernel_data() + subprogram_start,
+                               subprogram_end - subprogram_start, 0);
+    const intptr_t source_table_size = helper_.SourceTableSize();
+    for (intptr_t index = 0; index < source_table_size; ++index) {
+      const String& uri_string = helper_.SourceTableUriFor(index);
+      wrapper.uri = &uri_string;
+      TypedData& line_starts =
+          TypedData::Handle(Z, helper_.GetLineStartsFor(index));
+      if (line_starts.Length() == 0) continue;
+      const String& script_source = helper_.GetSourceFor(index);
+      wrapper.uri = &uri_string;
+      UriToSourceTableEntry* pair = uri_to_source_table.LookupValue(&wrapper);
+      if (pair != NULL) {
+        // At least two entries with content. Unless the content is the same
+        // that's not valid.
+        if (pair->sources->CompareTo(script_source) != 0 ||
+            !pair->line_starts->CanonicalizeEquals(line_starts)) {
+          FATAL(
+              "Invalid kernel binary: Contains at least two source entries "
+              "that do not agree.");
+        }
+      } else {
+        UriToSourceTableEntry* tmp = new UriToSourceTableEntry();
+        tmp->uri = &uri_string;
+        tmp->sources = &script_source;
+        tmp->line_starts = &line_starts;
+        uri_to_source_table.Insert(tmp);
+      }
+    }
+  }
+
+  // Create "fake programs" for each sub-program.
   for (intptr_t i = subprogram_count - 1; i >= 0; --i) {
     intptr_t subprogram_start = subprogram_file_starts.At(i);
     intptr_t subprogram_end = subprogram_file_starts.At(i + 1);
@@ -243,7 +288,7 @@
     reader.set_offset(0);
     Program* subprogram = Program::ReadFrom(&reader);
     ASSERT(subprogram->is_single_program());
-    KernelLoader loader(subprogram);
+    KernelLoader loader(subprogram, &uri_to_source_table);
     Object& load_result = Object::Handle(loader.LoadProgram(false));
     if (load_result.IsError()) return load_result;
 
@@ -301,7 +346,7 @@
   return String::null();
 }
 
-void KernelLoader::InitializeFields() {
+void KernelLoader::InitializeFields(UriToSourceTable* uri_to_source_table) {
   const intptr_t source_table_size = helper_.SourceTableSize();
   const Array& scripts =
       Array::Handle(Z, Array::New(source_table_size, Heap::kOld));
@@ -370,7 +415,7 @@
 
   Script& script = Script::Handle(Z);
   for (intptr_t index = 0; index < source_table_size; ++index) {
-    script = LoadScriptAt(index);
+    script = LoadScriptAt(index, uri_to_source_table);
     scripts.SetAt(index, script);
   }
 
@@ -444,7 +489,10 @@
 }
 
 void KernelLoader::EvaluateDelayedPragmas() {
+  potential_pragma_functions_ =
+      kernel_program_info_.potential_pragma_functions();
   if (potential_pragma_functions_.IsNull()) return;
+
   Thread* thread = Thread::Current();
   NoOOBMessageScope no_msg_scope(thread);
   NoReloadScope no_reload_scope(thread->isolate(), thread);
@@ -704,7 +752,7 @@
     for (intptr_t i = 0, n = pending_unevaluated_const_fields.Length(); i < n;
          i++) {
       field ^= pending_unevaluated_const_fields.At(i);
-      error = field.EvaluateInitializer();
+      error = field.Initialize();
       if (!error.IsNull()) {
         H.ReportError(error, "postponed field initializer");
       }
@@ -717,12 +765,12 @@
     EvaluateDelayedPragmas();
 
     NameIndex main = program_->main_method();
-    if (main == -1) {
-      return Library::null();
+    if (main != -1) {
+      NameIndex main_library = H.EnclosingName(main);
+      return LookupLibrary(main_library);
     }
 
-    NameIndex main_library = H.EnclosingName(main);
-    return LookupLibrary(main_library);
+    return bytecode_metadata_helper_.GetMainLibrary();
   }
 
   // Either class finalization failed or we caught a compile error.
@@ -810,7 +858,7 @@
     // kernel files, these will constitute the modified libraries.
     *is_empty_program = true;
     if (program->is_single_program()) {
-      KernelLoader loader(program);
+      KernelLoader loader(program, /*uri_to_source_table=*/nullptr);
       loader.walk_incremental_kernel(modified_libs, is_empty_program,
                                      p_num_classes, p_num_procedures);
     }
@@ -828,7 +876,7 @@
       reader.set_offset(0);
       Program* subprogram = Program::ReadFrom(&reader);
       ASSERT(subprogram->is_single_program());
-      KernelLoader loader(subprogram);
+      KernelLoader loader(subprogram, /*uri_to_source_table=*/nullptr);
       loader.walk_incremental_kernel(modified_libs, is_empty_program,
                                      p_num_classes, p_num_procedures);
       delete subprogram;
@@ -970,11 +1018,9 @@
     library.SetLoadInProgress();
   }
 
-  StringIndex import_uri_index =
-      H.CanonicalNameString(library_helper.canonical_name_);
   library_helper.ReadUntilIncluding(LibraryHelper::kSourceUriIndex);
-  const Script& script = Script::Handle(
-      Z, ScriptAt(library_helper.source_uri_index_, library, import_uri_index));
+  const Script& script =
+      Script::Handle(Z, ScriptAt(library_helper.source_uri_index_));
 
   library_helper.ReadUntilExcluding(LibraryHelper::kAnnotations);
   intptr_t annotations_kernel_offset =
@@ -1000,6 +1046,7 @@
   Class& toplevel_class =
       Class::Handle(Z, Class::New(library, Symbols::TopLevel(), script,
                                   TokenPosition::kNoSource, register_class));
+  toplevel_class.set_is_type_finalized();
   toplevel_class.set_is_cycle_free();
   library.set_toplevel_class(toplevel_class);
 
@@ -1053,6 +1100,16 @@
 
   TIMELINE_DURATION(Thread::Current(), Isolate, "FinishTopLevelClassLoading");
 
+  ActiveClassScope active_class_scope(&active_class_, &toplevel_class);
+
+  if (FLAG_enable_interpreter || FLAG_use_bytecode_compiler) {
+    if (bytecode_metadata_helper_.ReadMembers(library_kernel_offset_,
+                                              toplevel_class, false)) {
+      ASSERT(toplevel_class.is_loaded());
+      return;
+    }
+  }
+
   // Offsets within library index are whole program offsets and not
   // relative to the library.
   const intptr_t correction = correction_offset_ - library_kernel_offset_;
@@ -1061,7 +1118,6 @@
 
   fields_.Clear();
   functions_.Clear();
-  ActiveClassScope active_class_scope(&active_class_, &toplevel_class);
 
   // Load toplevel fields.
   const intptr_t field_count = helper_.ReadListLength();  // read list length.
@@ -1115,7 +1171,8 @@
     }
     if ((FLAG_enable_mirrors || has_pragma_annotation) &&
         annotation_count > 0) {
-      library.AddFieldMetadata(field, TokenPosition::kNoSource, field_offset);
+      library.AddFieldMetadata(field, TokenPosition::kNoSource, field_offset,
+                               0);
     }
     fields_.Add(&field);
   }
@@ -1298,80 +1355,6 @@
   }
 }
 
-// Workaround for http://dartbug.com/32087: currently Kernel front-end
-// embeds absolute build-time paths to core library sources into Kernel
-// binaries this introduces discrepancy between how stack traces were
-// looked like in legacy pipeline and how they look in Dart 2 pipeline and
-// breaks users' code that attempts to pattern match and filter various
-// irrelevant frames (e.g. frames from dart:async).
-// This also breaks debugging experience in external debuggers because
-// debugger attempts to open files that don't exist in the local file
-// system.
-// To work around this issue we reformat urls of scripts belonging to
-// dart:-scheme libraries to look like they looked like in legacy pipeline:
-//
-//               dart:libname/filename.dart
-//               dart:libname/runtime/lib/filename.dart
-//               dart:libname/runtime/bin/filename.dart
-//
-void KernelLoader::FixCoreLibraryScriptUri(const Library& library,
-                                           const Script& script) {
-  struct Helper {
-    static bool EndsWithCString(const String& haystack,
-                                const char* needle,
-                                intptr_t needle_length,
-                                intptr_t end_pos) {
-      const intptr_t start = end_pos - needle_length + 1;
-      if (start >= 0) {
-        for (intptr_t i = 0; i < needle_length; i++) {
-          if (haystack.CharAt(start + i) != needle[i]) {
-            return false;
-          }
-        }
-        return true;
-      }
-      return false;
-    }
-  };
-
-  if (library.is_dart_scheme()) {
-    String& url = String::Handle(zone_, script.url());
-    if (!url.StartsWith(Symbols::DartScheme())) {
-      // Search backwards until '/' is found. That gives us the filename.
-      // Note: can't use reusable handle in the code below because
-      // concat also needs it.
-      intptr_t pos = url.Length() - 1;
-      while (pos >= 0 && url.CharAt(pos) != '/') {
-        pos--;
-      }
-
-      static const char* kRuntimeLib = "runtime/lib/";
-      static const intptr_t kRuntimeLibLen = strlen(kRuntimeLib);
-      const bool inside_runtime_lib =
-          Helper::EndsWithCString(url, kRuntimeLib, kRuntimeLibLen, pos);
-
-      static const char* kRuntimeBin = "runtime/bin/";
-      static const intptr_t kRuntimeBinLen = strlen(kRuntimeBin);
-      const bool inside_runtime_bin =
-          Helper::EndsWithCString(url, kRuntimeBin, kRuntimeBinLen, pos);
-
-      String& tmp = String::Handle(zone_);
-      url = String::SubString(url, pos + 1);
-      if (inside_runtime_lib) {
-        tmp = String::New(kRuntimeLib, Heap::kNew);
-        url = String::Concat(tmp, url);
-      } else if (inside_runtime_bin) {
-        tmp = String::New(kRuntimeBin, Heap::kNew);
-        url = String::Concat(tmp, url);
-      }
-      tmp = library.url();
-      url = String::Concat(Symbols::Slash(), url);
-      url = String::Concat(tmp, url);
-      script.set_url(url);
-    }
-  }
-}
-
 void KernelLoader::LoadClass(const Library& library,
                              const Class& toplevel_class,
                              intptr_t class_end,
@@ -1393,7 +1376,6 @@
     const Script& script =
         Script::Handle(Z, ScriptAt(class_helper.source_uri_index_));
     out_class->set_script(script);
-    FixCoreLibraryScriptUri(library, script);
   }
   if (out_class->token_pos() == TokenPosition::kNoSource) {
     class_helper.ReadUntilIncluding(ClassHelper::kStartPosition);
@@ -1463,16 +1445,30 @@
 
   TIMELINE_DURATION(Thread::Current(), Isolate, "FinishClassLoading");
 
-  fields_.Clear();
-  functions_.Clear();
   ActiveClassScope active_class_scope(&active_class_, &klass);
+
+  bool discard_fields = false;
   if (library.raw() == Library::InternalLibrary() &&
       klass.Name() == Symbols::ClassID().raw()) {
     // If this is a dart:internal.ClassID class ignore field declarations
     // contained in the Kernel file and instead inject our own const
     // fields.
     klass.InjectCIDFields();
-  } else {
+    discard_fields = true;
+  }
+
+  if (FLAG_enable_interpreter || FLAG_use_bytecode_compiler) {
+    if (bytecode_metadata_helper_.ReadMembers(
+            klass.kernel_offset() + library_kernel_offset_, klass,
+            discard_fields)) {
+      ASSERT(klass.is_loaded());
+      return;
+    }
+  }
+
+  fields_.Clear();
+  functions_.Clear();
+  if (!discard_fields) {
     class_helper->ReadUntilExcluding(ClassHelper::kFields);
     int field_count = helper_.ReadListLength();  // read list length.
     for (intptr_t i = 0; i < field_count; ++i) {
@@ -1532,7 +1528,8 @@
       }
       if ((FLAG_enable_mirrors || has_pragma_annotation) &&
           annotation_count > 0) {
-        library.AddFieldMetadata(field, TokenPosition::kNoSource, field_offset);
+        library.AddFieldMetadata(field, TokenPosition::kNoSource, field_offset,
+                                 0);
       }
       fields_.Add(&field);
     }
@@ -1622,7 +1619,7 @@
     if ((FLAG_enable_mirrors || has_pragma_annotation) &&
         annotation_count > 0) {
       library.AddFunctionMetadata(function, TokenPosition::kNoSource,
-                                  constructor_offset);
+                                  constructor_offset, 0);
     }
   }
 
@@ -1912,7 +1909,7 @@
 
   if (annotation_count > 0) {
     library.AddFunctionMetadata(function, TokenPosition::kNoSource,
-                                procedure_offset);
+                                procedure_offset, 0);
   }
 
   if (has_pragma_annotation) {
@@ -1937,7 +1934,6 @@
     patch_class ^= patch_classes_.At(source_uri_index);
     if (patch_class.IsNull() || patch_class.origin_class() != klass.raw()) {
       ASSERT(!library_kernel_data_.IsNull());
-      FixCoreLibraryScriptUri(Library::Handle(klass.library()), correct_script);
       patch_class = PatchClass::New(klass, correct_script);
       patch_class.set_library_kernel_data(library_kernel_data_);
       patch_class.set_library_kernel_offset(library_kernel_offset_);
@@ -1948,37 +1944,54 @@
   return klass;
 }
 
-RawScript* KernelLoader::LoadScriptAt(intptr_t index) {
+RawScript* KernelLoader::LoadScriptAt(intptr_t index,
+                                      UriToSourceTable* uri_to_source_table) {
   const String& uri_string = helper_.SourceTableUriFor(index);
-  const String& script_source = helper_.GetSourceFor(index);
+  const String& import_uri_string =
+      helper_.SourceTableImportUriFor(index, program_->binary_version());
+
   String& sources = String::Handle(Z);
-  TypedData& line_starts =
-      TypedData::Handle(Z, helper_.GetLineStartsFor(index));
-  if (script_source.raw() == Symbols::Empty().raw() &&
-      line_starts.Length() == 0 && uri_string.Length() > 0) {
-    // Entry included only to provide URI - actual source should already exist
-    // in the VM, so try to find it.
-    Library& lib = Library::Handle(Z);
-    Script& script = Script::Handle(Z);
-    const GrowableObjectArray& libs =
-        GrowableObjectArray::Handle(isolate_->object_store()->libraries());
-    for (intptr_t i = 0; i < libs.Length(); i++) {
-      lib ^= libs.At(i);
-      script = lib.LookupScript(uri_string, /* useResolvedUri = */ true);
-      if (!script.IsNull() && script.kind() == RawScript::kKernelTag) {
-        sources ^= script.Source();
-        line_starts ^= script.line_starts();
-        break;
-      }
+  TypedData& line_starts = TypedData::Handle(Z);
+
+  if (uri_to_source_table != nullptr) {
+    UriToSourceTableEntry wrapper;
+    wrapper.uri = &uri_string;
+    UriToSourceTableEntry* pair = uri_to_source_table->LookupValue(&wrapper);
+    if (pair != nullptr) {
+      sources ^= pair->sources->raw();
+      line_starts ^= pair->line_starts->raw();
     }
-  } else {
-    sources = script_source.raw();
   }
 
-  const Script& script = Script::Handle(
-      Z, Script::New(uri_string, sources, RawScript::kKernelTag));
-  String& script_url = String::Handle();
-  script_url = script.url();
+  if (sources.IsNull() || line_starts.IsNull()) {
+    const String& script_source = helper_.GetSourceFor(index);
+    line_starts ^= helper_.GetLineStartsFor(index);
+
+    if (script_source.raw() == Symbols::Empty().raw() &&
+        line_starts.Length() == 0 && uri_string.Length() > 0) {
+      // Entry included only to provide URI - actual source should already exist
+      // in the VM, so try to find it.
+      Library& lib = Library::Handle(Z);
+      Script& script = Script::Handle(Z);
+      const GrowableObjectArray& libs =
+          GrowableObjectArray::Handle(isolate_->object_store()->libraries());
+      for (intptr_t i = 0; i < libs.Length(); i++) {
+        lib ^= libs.At(i);
+        script = lib.LookupScript(uri_string, /* useResolvedUri = */ true);
+        if (!script.IsNull() && script.kind() == RawScript::kKernelTag) {
+          sources ^= script.Source();
+          line_starts ^= script.line_starts();
+          break;
+        }
+      }
+    } else {
+      sources = script_source.raw();
+    }
+  }
+
+  const Script& script =
+      Script::Handle(Z, Script::New(import_uri_string, uri_string, sources,
+                                    RawScript::kKernelTag));
   script.set_kernel_script_index(index);
   script.set_kernel_program_info(kernel_program_info_);
   script.set_line_starts(line_starts);
@@ -1987,20 +2000,6 @@
   return script.raw();
 }
 
-RawScript* KernelLoader::ScriptAt(intptr_t index,
-                                  const Library& library,
-                                  StringIndex import_uri) {
-  ASSERT(!library.IsNull());
-  const Script& script =
-      Script::Handle(Z, kernel_program_info_.ScriptAt(index));
-  if (library.is_dart_scheme()) {
-    FixCoreLibraryScriptUri(library, script);
-  } else if (import_uri != -1) {
-    script.set_url(H.DartString(import_uri, Heap::kOld));
-  }
-  return script.raw();
-}
-
 void KernelLoader::GenerateFieldAccessors(const Class& klass,
                                           const Field& field,
                                           FieldHelper* field_helper) {
@@ -2074,7 +2073,7 @@
   getter.set_result_type(field_type);
   getter.set_is_debuggable(false);
   getter.set_accessor_field(field);
-  SetupFieldAccessorFunction(klass, getter, field_type);
+  H.SetupFieldAccessorFunction(klass, getter, field_type);
 
   if (!field_helper->IsStatic() && !field_helper->IsFinal()) {
     // Only static fields can be const.
@@ -2094,34 +2093,7 @@
     setter.set_result_type(Object::void_type());
     setter.set_is_debuggable(false);
     setter.set_accessor_field(field);
-    SetupFieldAccessorFunction(klass, setter, field_type);
-  }
-}
-
-void KernelLoader::SetupFieldAccessorFunction(const Class& klass,
-                                              const Function& function,
-                                              const AbstractType& field_type) {
-  bool is_setter = function.IsImplicitSetterFunction();
-  bool is_method = !function.IsStaticFunction();
-  intptr_t parameter_count = (is_method ? 1 : 0) + (is_setter ? 1 : 0);
-
-  function.SetNumOptionalParameters(0, false);
-  function.set_num_fixed_parameters(parameter_count);
-  function.set_parameter_types(
-      Array::Handle(Z, Array::New(parameter_count, Heap::kOld)));
-  function.set_parameter_names(
-      Array::Handle(Z, Array::New(parameter_count, Heap::kOld)));
-
-  intptr_t pos = 0;
-  if (is_method) {
-    function.SetParameterTypeAt(pos, T.ReceiverType(klass));
-    function.SetParameterNameAt(pos, Symbols::This());
-    pos++;
-  }
-  if (is_setter) {
-    function.SetParameterTypeAt(pos, field_type);
-    function.SetParameterNameAt(pos, Symbols::Value());
-    pos++;
+    H.SetupFieldAccessorFunction(klass, setter, field_type);
   }
 }
 
@@ -2239,9 +2211,8 @@
 RawFunction* CreateFieldInitializerFunction(Thread* thread,
                                             Zone* zone,
                                             const Field& field) {
-  if (field.InitializerFunction() != Function::null()) {
-    return field.InitializerFunction();
-  }
+  ASSERT(field.InitializerFunction() == Function::null());
+
   String& init_name = String::Handle(zone, field.name());
   init_name = Symbols::FromConcat(thread, Symbols::InitPrefix(), init_name);
 
@@ -2272,12 +2243,12 @@
                           false,  // is_external
                           false,  // is_native
                           initializer_owner, TokenPosition::kNoSource));
-  initializer_fun.set_kernel_offset(field.kernel_offset());
   initializer_fun.set_result_type(AbstractType::Handle(zone, field.type()));
   initializer_fun.set_is_reflectable(false);
   initializer_fun.set_is_inlinable(false);
   initializer_fun.set_token_pos(field.token_pos());
   initializer_fun.set_end_token_pos(field.end_token_pos());
+  initializer_fun.InheritBinaryDeclarationFrom(field);
   field.SetInitializerFunction(initializer_fun);
   return initializer_fun.raw();
 }
diff --git a/runtime/vm/kernel_loader.h b/runtime/vm/kernel_loader.h
index 9b176ff..ea39aac 100644
--- a/runtime/vm/kernel_loader.h
+++ b/runtime/vm/kernel_loader.h
@@ -147,9 +147,36 @@
   DISALLOW_COPY_AND_ASSIGN(ClassIndex);
 };
 
+struct UriToSourceTableEntry : public ZoneAllocated {
+  UriToSourceTableEntry() {}
+
+  const String* uri = nullptr;
+  const String* sources = nullptr;
+  const TypedData* line_starts = nullptr;
+};
+
+struct UriToSourceTableTrait {
+  typedef UriToSourceTableEntry* Value;
+  typedef const UriToSourceTableEntry* Key;
+  typedef UriToSourceTableEntry* Pair;
+
+  static Key KeyOf(Pair kv) { return kv; }
+
+  static Value ValueOf(Pair kv) { return kv; }
+
+  static inline intptr_t Hashcode(Key key) { return key->uri->Hash(); }
+
+  static inline bool IsKeyEqual(Pair kv, Key key) {
+    // Only compare uri.
+    return kv->uri->CompareTo(*key->uri) == 0;
+  }
+};
+
 class KernelLoader : public ValueObject {
  public:
-  explicit KernelLoader(Program* program);
+  explicit KernelLoader(
+      Program* program,
+      DirectChainedHashMap<UriToSourceTableTrait>* uri_to_source_table);
   static Object& LoadEntireProgram(Program* program,
                                    bool process_pending_classes = true);
 
@@ -252,7 +279,8 @@
                const ExternalTypedData& kernel_data,
                intptr_t data_program_offset);
 
-  void InitializeFields();
+  void InitializeFields(
+      DirectChainedHashMap<UriToSourceTableTrait>* uri_to_source_table);
   static void index_programs(kernel::Reader* reader,
                              GrowableArray<intptr_t>* subprogram_file_starts);
   void walk_incremental_kernel(BitVector* modified_libs,
@@ -266,8 +294,6 @@
   void ReadInferredType(const Field& field, intptr_t kernel_offset);
   void CheckForInitializer(const Field& field);
 
-  void FixCoreLibraryScriptUri(const Library& library, const Script& script);
-
   void LoadClass(const Library& library,
                  const Class& toplevel_class,
                  intptr_t class_end,
@@ -288,7 +314,9 @@
   RawArray* MakeFieldsArray();
   RawArray* MakeFunctionsArray();
 
-  RawScript* LoadScriptAt(intptr_t index);
+  RawScript* LoadScriptAt(
+      intptr_t index,
+      DirectChainedHashMap<UriToSourceTableTrait>* uri_to_source_table);
 
   // If klass's script is not the script at the uri index, return a PatchClass
   // for klass whose script corresponds to the uri index.
@@ -297,18 +325,11 @@
   RawScript* ScriptAt(intptr_t source_uri_index) {
     return kernel_program_info_.ScriptAt(source_uri_index);
   }
-  RawScript* ScriptAt(intptr_t source_uri_index,
-                      const Library& lib,
-                      StringIndex import_uri);
 
   void GenerateFieldAccessors(const Class& klass,
                               const Field& field,
                               FieldHelper* field_helper);
 
-  void SetupFieldAccessorFunction(const Class& klass,
-                                  const Function& function,
-                                  const AbstractType& field_type);
-
   void LoadLibraryImportsAndExports(Library* library,
                                     const Class& toplevel_class);
 
@@ -352,14 +373,7 @@
 
   void EnsurePotentialPragmaFunctions() {
     potential_pragma_functions_ =
-        kernel_program_info_.potential_pragma_functions();
-    if (potential_pragma_functions_.IsNull()) {
-      // To avoid too many grows in this array, we'll set it's initial size to
-      // something close to the actual number of potential native functions.
-      potential_pragma_functions_ = GrowableObjectArray::New(100, Heap::kNew);
-      kernel_program_info_.set_potential_pragma_functions(
-          potential_pragma_functions_);
-    }
+        translation_helper_.EnsurePotentialPragmaFunctions();
   }
 
   void EnsurePotentialExtensionLibraries() {
diff --git a/runtime/vm/message.cc b/runtime/vm/message.cc
index 7af0251..985c5b5 100644
--- a/runtime/vm/message.cc
+++ b/runtime/vm/message.cc
@@ -40,7 +40,7 @@
       snapshot_length_(0),
       finalizable_data_(NULL),
       priority_(priority) {
-  ASSERT(!raw_obj->IsHeapObject() || raw_obj->IsReadOnly());
+  ASSERT(!raw_obj->IsHeapObject() || raw_obj->InVMIsolateHeap());
   ASSERT((priority == kNormalPriority) ||
          (delivery_failure_port == kIllegalPort));
   ASSERT(IsRaw());
diff --git a/runtime/vm/object.cc b/runtime/vm/object.cc
index 86b63a5..ac67816 100644
--- a/runtime/vm/object.cc
+++ b/runtime/vm/object.cc
@@ -89,6 +89,8 @@
 static const intptr_t kGetterPrefixLength = strlen(kGetterPrefix);
 static const char* const kSetterPrefix = "set:";
 static const intptr_t kSetterPrefixLength = strlen(kSetterPrefix);
+static const char* const kInitPrefix = "init:";
+static const intptr_t kInitPrefixLength = strlen(kInitPrefix);
 
 // A cache of VM heap allocated preinitialized empty ic data entry arrays.
 RawArray* ICData::cached_icdata_arrays_[kCachedICDataArrayCount];
@@ -877,6 +879,28 @@
   // needs to be created earlier as VM isolate snapshot reader references it
   // before Object::FinalizeVMIsolate.
 
+  static const KBCInstr getter_instr[2] = {
+      KernelBytecode::Encode(KernelBytecode::kVMInternal_ImplicitGetter),
+      KernelBytecode::Encode(KernelBytecode::kReturnTOS),
+  };
+  *implicit_getter_bytecode_ =
+      Bytecode::New(reinterpret_cast<uword>(getter_instr), sizeof(getter_instr),
+                    -1, Object::empty_object_pool());
+  implicit_getter_bytecode_->set_pc_descriptors(Object::empty_descriptors());
+  implicit_getter_bytecode_->set_exception_handlers(
+      Object::empty_exception_handlers());
+
+  static const KBCInstr setter_instr[2] = {
+      KernelBytecode::Encode(KernelBytecode::kVMInternal_ImplicitSetter),
+      KernelBytecode::Encode(KernelBytecode::kReturnTOS),
+  };
+  *implicit_setter_bytecode_ =
+      Bytecode::New(reinterpret_cast<uword>(setter_instr), sizeof(setter_instr),
+                    -1, Object::empty_object_pool());
+  implicit_setter_bytecode_->set_pc_descriptors(Object::empty_descriptors());
+  implicit_setter_bytecode_->set_exception_handlers(
+      Object::empty_exception_handlers());
+
   // Some thread fields need to be reinitialized as null constants have not been
   // initialized until now.
   Thread* thr = Thread::Current();
@@ -934,6 +958,10 @@
   ASSERT(extractor_parameter_types_->IsArray());
   ASSERT(!extractor_parameter_names_->IsSmi());
   ASSERT(extractor_parameter_names_->IsArray());
+  ASSERT(!implicit_getter_bytecode_->IsSmi());
+  ASSERT(implicit_getter_bytecode_->IsBytecode());
+  ASSERT(!implicit_setter_bytecode_->IsSmi());
+  ASSERT(implicit_setter_bytecode_->IsBytecode());
 }
 
 void Object::FinishInit(Isolate* isolate) {
@@ -1008,7 +1036,6 @@
     ASSERT(!obj->IsForwardingCorpse());
     if (!obj->IsFreeListElement()) {
       obj->SetMarkBitUnsynchronized();
-      obj->SetReadOnlyUnsynchronized();
       Object::FinalizeReadOnlyObject(obj);
 #if defined(HASH_IN_OBJECT_HEADER)
       // These objects end up in the read-only VM isolate which is shared
@@ -1198,7 +1225,6 @@
           reinterpret_cast<RawTypedData*>(RawObject::FromAddr(addr));
       uword new_tags = RawObject::ClassIdTag::update(kTypedDataInt8ArrayCid, 0);
       new_tags = RawObject::SizeTag::update(leftover_size, new_tags);
-      new_tags = RawObject::ReadOnlyBit::update(false, new_tags);
       const bool is_old = obj.raw()->IsOldObject();
       new_tags = RawObject::OldBit::update(is_old, new_tags);
       new_tags = RawObject::OldAndNotMarkedBit::update(is_old, new_tags);
@@ -1223,14 +1249,13 @@
       intptr_t leftover_len = (leftover_size - TypedData::InstanceSize(0));
       ASSERT(TypedData::InstanceSize(leftover_len) == leftover_size);
       raw->StoreSmi(&(raw->ptr()->length_), Smi::New(leftover_len));
-      raw->ResetData();
+      raw->RecomputeDataField();
     } else {
       // Update the leftover space as a basic object.
       ASSERT(leftover_size == Object::InstanceSize());
       RawObject* raw = reinterpret_cast<RawObject*>(RawObject::FromAddr(addr));
       uword new_tags = RawObject::ClassIdTag::update(kInstanceCid, 0);
       new_tags = RawObject::SizeTag::update(leftover_size, new_tags);
-      new_tags = RawObject::ReadOnlyBit::update(false, new_tags);
       const bool is_old = obj.raw()->IsOldObject();
       new_tags = RawObject::OldBit::update(is_old, new_tags);
       new_tags = RawObject::OldAndNotMarkedBit::update(is_old, new_tags);
@@ -2015,8 +2040,8 @@
 }
 
 #if defined(DEBUG)
-bool Object::IsReadOnly() const {
-  if (FLAG_verify_handles && raw()->IsReadOnly()) {
+bool Object::InVMIsolateHeap() const {
+  if (FLAG_verify_handles && raw()->InVMIsolateHeap()) {
     Heap* vm_isolate_heap = Dart::vm_isolate()->heap();
     uword addr = RawObject::ToAddr(raw());
     if (!vm_isolate_heap->Contains(addr)) {
@@ -2025,7 +2050,7 @@
       ASSERT(vm_isolate_heap->Contains(addr));
     }
   }
-  return raw()->IsReadOnly();
+  return raw()->InVMIsolateHeap();
 }
 #endif  // DEBUG
 
@@ -2051,7 +2076,6 @@
   ASSERT(class_id != kIllegalCid);
   tags = RawObject::ClassIdTag::update(class_id, tags);
   tags = RawObject::SizeTag::update(size, tags);
-  tags = RawObject::ReadOnlyBit::update(false, tags);
   const bool is_old =
       (address & kNewObjectAlignmentOffset) == kOldObjectAlignmentOffset;
   tags = RawObject::OldBit::update(is_old, tags);
@@ -2116,15 +2140,13 @@
     UNREACHABLE();
   }
 #ifndef PRODUCT
-  Isolate* isolate = thread->isolate();
-  ClassTable* class_table = isolate->class_table();
+  ClassTable* class_table = thread->isolate()->class_table();
   if (space == Heap::kNew) {
     class_table->UpdateAllocatedNew(cls_id, size);
   } else {
     class_table->UpdateAllocatedOld(cls_id, size);
   }
-  const Class& cls = Class::Handle(class_table->At(cls_id));
-  if (FLAG_profiler && cls.TraceAllocation(isolate)) {
+  if (class_table->TraceAllocationFor(cls_id)) {
     Profiler::SampleAllocation(thread, cls_id);
   }
 #endif  // !PRODUCT
@@ -2916,7 +2938,7 @@
                     RawFunction::kMethodExtractor,
                     false,  // Not static.
                     false,  // Not const.
-                    false,  // Not abstract.
+                    is_abstract(),
                     false,  // Not external.
                     false,  // Not native.
                     owner, TokenPosition::kMethodExtractor));
@@ -2928,7 +2950,8 @@
   extractor.set_parameter_types(Object::extractor_parameter_types());
   extractor.set_parameter_names(Object::extractor_parameter_names());
   extractor.set_result_type(Object::dynamic_type());
-  extractor.set_kernel_offset(kernel_offset());
+
+  extractor.InheritBinaryDeclarationFrom(*this);
 
   extractor.set_extracted_method_closure(closure_function);
   extractor.set_is_debuggable(false);
@@ -3047,7 +3070,8 @@
   forwarder.set_optimized_instruction_count(0);
   forwarder.set_inlining_depth(0);
   forwarder.set_optimized_call_site_count(0);
-  forwarder.set_kernel_offset(kernel_offset());
+
+  forwarder.InheritBinaryDeclarationFrom(*this);
 
   return forwarder.raw();
 }
@@ -3082,6 +3106,17 @@
 
   return result.raw();
 }
+
+RawFunction* Function::GetTargetOfDynamicInvocationForwarder() const {
+  ASSERT(IsDynamicInvocationForwarder());
+  auto& func_name = String::Handle(name());
+  func_name = DemangleDynamicInvocationForwarderName(func_name);
+  const auto& owner = Class::Handle(Owner());
+  RawFunction* target = owner.LookupDynamicFunction(func_name);
+  ASSERT(target != Function::null());
+  return target;
+}
+
 #endif
 
 bool AbstractType::InstantiateAndTestSubtype(
@@ -4822,7 +4857,7 @@
 RawInstance* Class::LookupCanonicalInstance(Zone* zone,
                                             const Instance& value) const {
   ASSERT(this->raw() == value.clazz());
-  ASSERT(is_finalized());
+  ASSERT(is_finalized() || is_prefinalized());
   Instance& canonical_value = Instance::Handle(zone);
   if (this->constants() != Object::empty_array().raw()) {
     CanonicalInstancesSet constants(zone, this->constants());
@@ -5639,14 +5674,13 @@
     }
   }
   switch (kind()) {
-    case RawFunction::kImplicitGetter:
-    case RawFunction::kImplicitSetter:
     case RawFunction::kMethodExtractor:
     case RawFunction::kNoSuchMethodDispatcher:
     case RawFunction::kInvokeFieldDispatcher:
     case RawFunction::kDynamicInvocationForwarder:
     case RawFunction::kImplicitClosureFunction:
     case RawFunction::kIrregexpFunction:
+    case RawFunction::kFfiTrampoline:
       return false;
     case RawFunction::kImplicitStaticFinalGetter:
       return kernel::IsFieldInitializer(*this, zone) || is_const();
@@ -5658,8 +5692,11 @@
 void Function::AttachBytecode(const Bytecode& value) const {
   DEBUG_ASSERT(IsMutatorOrAtSafepoint());
   ASSERT(FLAG_enable_interpreter || FLAG_use_bytecode_compiler);
+  ASSERT(!value.IsNull());
   // Finish setting up code before activating it.
-  value.set_function(*this);
+  if (!value.InVMIsolateHeap()) {
+    value.set_function(*this);
+  }
   StorePointer(&raw_ptr()->bytecode_, value.raw());
 
   // We should not have loaded the bytecode if the function had code.
@@ -6458,6 +6495,7 @@
   if (FLAG_precompiled_mode) {
     return true;
   }
+  if (ForceOptimize()) return true;
   if (is_native()) {
     // Native methods don't need to be optimized.
     return false;
@@ -7181,7 +7219,8 @@
   NOT_IN_PRECOMPILED(result.set_optimized_instruction_count(0));
   NOT_IN_PRECOMPILED(result.set_optimized_call_site_count(0));
   NOT_IN_PRECOMPILED(result.set_inlining_depth(0));
-  NOT_IN_PRECOMPILED(result.set_kernel_offset(0));
+  NOT_IN_PRECOMPILED(result.set_is_declared_in_bytecode(false));
+  NOT_IN_PRECOMPILED(result.set_binary_declaration_offset(0));
   result.set_is_optimizable(is_native ? false : true);
   result.set_is_background_optimizable(is_native ? false : true);
   result.set_is_inlinable(true);
@@ -7359,7 +7398,7 @@
     param_name = ParameterNameAt(has_receiver - kClosure + i);
     closure_function.SetParameterNameAt(i, param_name);
   }
-  closure_function.set_kernel_offset(kernel_offset());
+  closure_function.InheritBinaryDeclarationFrom(*this);
 
   // Change covariant parameter types to Object in the implicit closure.
   if (!is_static()) {
@@ -7600,6 +7639,28 @@
   return PatchClass::Cast(obj).origin_class();
 }
 
+void Function::InheritBinaryDeclarationFrom(const Function& src) const {
+#if defined(DART_PRECOMPILED_RUNTIME)
+  UNREACHABLE();
+#else
+  StoreNonPointer(&raw_ptr()->binary_declaration_,
+                  src.raw_ptr()->binary_declaration_);
+#endif
+}
+
+void Function::InheritBinaryDeclarationFrom(const Field& src) const {
+#if defined(DART_PRECOMPILED_RUNTIME)
+  UNREACHABLE();
+#else
+  if (src.is_declared_in_bytecode()) {
+    set_is_declared_in_bytecode(true);
+    set_bytecode_offset(src.bytecode_offset());
+  } else {
+    set_kernel_offset(src.kernel_offset());
+  }
+#endif
+}
+
 void Function::SetKernelDataAndScript(const Script& script,
                                       const ExternalTypedData& data,
                                       intptr_t offset) {
@@ -7906,8 +7967,10 @@
 }
 
 bool Function::CheckSourceFingerprint(const char* prefix, int32_t fp) const {
-  if (!Isolate::Current()->obfuscate() && (kernel_offset() <= 0) &&
-      (SourceFingerprint() != fp)) {
+  // TODO(alexmarkov): '(kernel_offset() <= 0)' looks like an impossible
+  // condition, fix this and re-enable fingerprints checking.
+  if (!Isolate::Current()->obfuscate() && !is_declared_in_bytecode() &&
+      (kernel_offset() <= 0) && (SourceFingerprint() != fp)) {
     const bool recalculatingFingerprints = false;
     if (recalculatingFingerprints) {
       // This output can be copied into a file, then used with sed
@@ -8194,6 +8257,11 @@
                       setter_name.Length() - kSetterPrefixLength);
 }
 
+RawString* Field::NameFromInit(const String& init_name) {
+  return Symbols::New(Thread::Current(), init_name, kInitPrefixLength,
+                      init_name.Length() - kInitPrefixLength);
+}
+
 bool Field::IsGetterName(const String& function_name) {
   return function_name.StartsWith(Symbols::GetterPrefix());
 }
@@ -8202,6 +8270,10 @@
   return function_name.StartsWith(Symbols::SetterPrefix());
 }
 
+bool Field::IsInitName(const String& function_name) {
+  return function_name.StartsWith(Symbols::InitPrefix());
+}
+
 void Field::set_name(const String& value) const {
   ASSERT(value.IsSymbol());
   ASSERT(IsOriginal());
@@ -8268,6 +8340,15 @@
   return PatchClass::Cast(obj).library_kernel_data();
 }
 
+void Field::InheritBinaryDeclarationFrom(const Field& src) const {
+#if defined(DART_PRECOMPILED_RUNTIME)
+  UNREACHABLE();
+#else
+  StoreNonPointer(&raw_ptr()->binary_declaration_,
+                  src.raw_ptr()->binary_declaration_);
+#endif
+}
+
 intptr_t Field::KernelDataProgramOffset() const {
   const Object& obj = Object::Handle(raw_ptr()->owner_);
   // During background JIT compilation field objects are copied
@@ -8324,7 +8405,8 @@
   result.set_has_initializer(false);
   result.set_is_unboxing_candidate(!is_final);
   result.set_initializer_changed_after_initialization(false);
-  result.set_kernel_offset(0);
+  NOT_IN_PRECOMPILED(result.set_is_declared_in_bytecode(false));
+  NOT_IN_PRECOMPILED(result.set_binary_declaration_offset(0));
   result.set_has_pragma(false);
   result.set_static_type_exactness_state(
       StaticTypeExactnessState::NotTracking());
@@ -8391,7 +8473,7 @@
   Field& clone = Field::Handle();
   clone ^= Object::Clone(*this, Heap::kOld);
   clone.SetOriginal(original);
-  clone.set_kernel_offset(original.kernel_offset());
+  clone.InheritBinaryDeclarationFrom(original);
   return clone.raw();
 }
 
@@ -8568,6 +8650,22 @@
   return value.raw() == Object::sentinel().raw();
 }
 
+RawFunction* Field::EnsureInitializerFunction() const {
+  ASSERT(is_static() && has_initializer());
+  Thread* thread = Thread::Current();
+  Zone* zone = thread->zone();
+  Function& initializer = Function::Handle(zone, InitializerFunction());
+  if (initializer.IsNull()) {
+#if defined(DART_PRECOMPILED_RUNTIME)
+    UNREACHABLE();
+#else
+    initializer = kernel::CreateFieldInitializerFunction(thread, zone, *this);
+    SetInitializerFunction(initializer);
+#endif
+  }
+  return initializer.raw();
+}
+
 void Field::SetInitializerFunction(const Function& initializer) const {
   ASSERT(IsOriginal());
   StorePointer(&raw_ptr()->initializer_function_, initializer.raw());
@@ -8577,13 +8675,12 @@
   return raw_ptr()->initializer_function_ != Function::null();
 }
 
-RawError* Field::EvaluateInitializer() const {
+RawError* Field::Initialize() const {
   ASSERT(IsOriginal());
   ASSERT(is_static());
   if (StaticValue() == Object::sentinel().raw()) {
     SetStaticValue(Object::transition_sentinel());
-    const Object& value =
-        Object::Handle(Compiler::EvaluateStaticInitializer(*this));
+    const Object& value = Object::Handle(EvaluateInitializer());
     if (!value.IsNull() && value.IsError()) {
       SetStaticValue(Object::null_instance());
       return Error::Cast(value).raw();
@@ -8602,40 +8699,38 @@
   return Error::null();
 }
 
+RawObject* Field::EvaluateInitializer() const {
+  Thread* const thread = Thread::Current();
+  ASSERT(thread->IsMutatorThread());
+  NoOOBMessageScope no_msg_scope(thread);
+  NoReloadScope no_reload_scope(thread->isolate(), thread);
+  const Function& initializer = Function::Handle(EnsureInitializerFunction());
+  return DartEntry::InvokeFunction(initializer, Object::empty_array());
+}
+
 static intptr_t GetListLength(const Object& value) {
-  if (value.IsTypedData()) {
-    const TypedData& list = TypedData::Cast(value);
-    return list.Length();
+  if (value.IsTypedData() || value.IsTypedDataView() ||
+      value.IsExternalTypedData()) {
+    return TypedDataBase::Cast(value).Length();
   } else if (value.IsArray()) {
-    const Array& list = Array::Cast(value);
-    return list.Length();
+    return Array::Cast(value).Length();
   } else if (value.IsGrowableObjectArray()) {
     // List length is variable.
     return Field::kNoFixedLength;
-  } else if (value.IsExternalTypedData()) {
-    // TODO(johnmccutchan): Enable for external typed data.
-    return Field::kNoFixedLength;
-  } else if (RawObject::IsTypedDataViewClassId(value.GetClassId())) {
-    // TODO(johnmccutchan): Enable for typed data views.
-    return Field::kNoFixedLength;
   }
   return Field::kNoFixedLength;
 }
 
 static intptr_t GetListLengthOffset(intptr_t cid) {
-  if (RawObject::IsTypedDataClassId(cid)) {
+  if (RawObject::IsTypedDataClassId(cid) ||
+      RawObject::IsTypedDataViewClassId(cid) ||
+      RawObject::IsExternalTypedDataClassId(cid)) {
     return TypedData::length_offset();
   } else if (cid == kArrayCid || cid == kImmutableArrayCid) {
     return Array::length_offset();
   } else if (cid == kGrowableObjectArrayCid) {
     // List length is variable.
     return Field::kUnknownLengthOffset;
-  } else if (RawObject::IsExternalTypedDataClassId(cid)) {
-    // TODO(johnmccutchan): Enable for external typed data.
-    return Field::kUnknownLengthOffset;
-  } else if (RawObject::IsTypedDataViewClassId(cid)) {
-    // TODO(johnmccutchan): Enable for typed data views.
-    return Field::kUnknownLengthOffset;
   }
   return Field::kUnknownLengthOffset;
 }
@@ -9074,10 +9169,7 @@
 #if !defined(DART_PRECOMPILED_RUNTIME)
 void Script::LoadSourceFromKernel(const uint8_t* kernel_buffer,
                                   intptr_t kernel_buffer_len) const {
-  const char* dart_prefix = "dart:";
-  const size_t dart_prefix_len = strlen(dart_prefix);
-  String& uri = String::Handle(url());
-  uri ^= String::SubString(uri, dart_prefix_len);
+  String& uri = String::Handle(resolved_url());
   String& source = String::Handle(kernel::KernelLoader::FindSourceForScript(
       kernel_buffer, kernel_buffer_len, uri));
   set_source(source);
@@ -9750,7 +9842,7 @@
   GrowableHandlePtrArray<const String> pieces(zone, 3);
   pieces.Add(cname);
   pieces.Add(Symbols::At());
-  pieces.Add(String::Handle(field.name()));
+  pieces.Add(String::Handle(zone, field.name()));
   return Symbols::FromConcatAll(thread, pieces);
 }
 
@@ -9763,7 +9855,7 @@
   GrowableHandlePtrArray<const String> pieces(zone, 3);
   pieces.Add(cname);
   pieces.Add(Symbols::At());
-  pieces.Add(String::Handle(func.QualifiedScrubbedName()));
+  pieces.Add(String::Handle(zone, func.name()));
   return Symbols::FromConcatAll(thread, pieces);
 }
 
@@ -9777,14 +9869,18 @@
   GrowableHandlePtrArray<const String> pieces(zone, 3);
   pieces.Add(cname);
   pieces.Add(Symbols::At());
-  pieces.Add(String::Handle(param.name()));
+  pieces.Add(String::Handle(zone, param.name()));
   return Symbols::FromConcatAll(thread, pieces);
 }
 
 void Library::AddMetadata(const Object& owner,
                           const String& name,
                           TokenPosition token_pos,
-                          intptr_t kernel_offset) const {
+                          intptr_t kernel_offset,
+                          intptr_t bytecode_offset) const {
+#if defined(DART_PRECOMPILED_RUNTIME)
+  UNREACHABLE();
+#else
   Thread* thread = Thread::Current();
   ASSERT(thread->IsMutatorThread());
   Zone* zone = thread->zone();
@@ -9797,10 +9893,16 @@
   field.SetFieldType(Object::dynamic_type());
   field.set_is_reflectable(false);
   field.SetStaticValue(Array::empty_array(), true);
-  field.set_kernel_offset(kernel_offset);
+  if (bytecode_offset > 0) {
+    field.set_is_declared_in_bytecode(true);
+    field.set_bytecode_offset(bytecode_offset);
+  } else {
+    field.set_kernel_offset(kernel_offset);
+  }
   GrowableObjectArray& metadata =
       GrowableObjectArray::Handle(zone, this->metadata());
   metadata.Add(field, Heap::kOld);
+#endif  // defined(DART_PRECOMPILED_RUNTIME)
 }
 
 void Library::AddClassMetadata(const Class& cls,
@@ -9813,27 +9915,29 @@
   // a class's metadata is in scope of the library, not the class.
   AddMetadata(tl_owner,
               String::Handle(zone, MakeClassMetaName(thread, zone, cls)),
-              token_pos, kernel_offset);
+              token_pos, kernel_offset, 0);
 }
 
 void Library::AddFieldMetadata(const Field& field,
                                TokenPosition token_pos,
-                               intptr_t kernel_offset) const {
+                               intptr_t kernel_offset,
+                               intptr_t bytecode_offset) const {
   Thread* thread = Thread::Current();
   Zone* zone = thread->zone();
   AddMetadata(Object::Handle(zone, field.RawOwner()),
               String::Handle(zone, MakeFieldMetaName(thread, zone, field)),
-              token_pos, kernel_offset);
+              token_pos, kernel_offset, bytecode_offset);
 }
 
 void Library::AddFunctionMetadata(const Function& func,
                                   TokenPosition token_pos,
-                                  intptr_t kernel_offset) const {
+                                  intptr_t kernel_offset,
+                                  intptr_t bytecode_offset) const {
   Thread* thread = Thread::Current();
   Zone* zone = thread->zone();
   AddMetadata(Object::Handle(zone, func.RawOwner()),
               String::Handle(zone, MakeFunctionMetaName(thread, zone, func)),
-              token_pos, kernel_offset);
+              token_pos, kernel_offset, bytecode_offset);
 }
 
 void Library::AddTypeParameterMetadata(const TypeParameter& param,
@@ -9843,13 +9947,13 @@
   AddMetadata(
       Class::Handle(zone, param.parameterized_class()),
       String::Handle(zone, MakeTypeParameterMetaName(thread, zone, param)),
-      token_pos);
+      token_pos, 0, 0);
 }
 
 void Library::AddLibraryMetadata(const Object& tl_owner,
                                  TokenPosition token_pos,
                                  intptr_t kernel_offset) const {
-  AddMetadata(tl_owner, Symbols::TopLevel(), token_pos, kernel_offset);
+  AddMetadata(tl_owner, Symbols::TopLevel(), token_pos, kernel_offset, 0);
 }
 
 RawString* Library::MakeMetadataName(const Object& obj) const {
@@ -9893,8 +9997,13 @@
   const Field& from_field =
       Field::Handle(from_library.GetMetadataField(metaname));
   if (!from_field.IsNull()) {
-    AddFunctionMetadata(to_fun, from_field.token_pos(),
-                        from_field.kernel_offset());
+    if (from_field.is_declared_in_bytecode()) {
+      AddFunctionMetadata(to_fun, from_field.token_pos(), 0,
+                          from_field.bytecode_offset());
+    } else {
+      AddFunctionMetadata(to_fun, from_field.token_pos(),
+                          from_field.kernel_offset(), 0);
+    }
   }
 }
 
@@ -9915,11 +10024,12 @@
   Object& metadata = Object::Handle();
   metadata = field.StaticValue();
   if (field.StaticValue() == Object::empty_array().raw()) {
-    if (field.kernel_offset() > 0) {
+    if (field.is_declared_in_bytecode()) {
+      metadata = kernel::BytecodeReader::ReadAnnotation(field);
+    } else {
+      ASSERT(field.kernel_offset() > 0);
       metadata = kernel::EvaluateMetadata(
           field, /* is_annotations_offset = */ obj.IsLibrary());
-    } else {
-      UNREACHABLE();
     }
     if (metadata.IsArray()) {
       ASSERT(Array::Cast(metadata).raw() != Object::empty_array().raw());
@@ -10337,10 +10447,12 @@
   const intptr_t num_scripts = scripts.Length();
   for (int i = 0; i < num_scripts; i++) {
     script ^= scripts.At(i);
-    if (!useResolvedUri) {
-      script_url = script.url();
-    } else {
+    if (useResolvedUri) {
+      // Use for urls with 'org-dartlang-sdk:' or 'file:' schemes
       script_url = script.resolved_url();
+    } else {
+      // Use for urls with 'dart:', 'package:', or 'file:' schemes
+      script_url = script.url();
     }
     const intptr_t start_idx = script_url.Length() - url_length;
     if ((start_idx == 0) && url.Equals(script_url)) {
@@ -11106,7 +11218,7 @@
         String::New("Kernel isolate returned ill-formed kernel.")));
   }
 
-  kernel::KernelLoader loader(kernel_pgm);
+  kernel::KernelLoader loader(kernel_pgm, /*uri_to_source_table=*/nullptr);
   const Object& result = Object::Handle(
       loader.LoadExpressionEvaluationFunction(library_url, klass));
 
@@ -14928,7 +15040,6 @@
 #endif  // !defined(PRODUCT) || defined(FORCE_INCLUDE_DISASSEMBLER)
 }
 
-#if !defined(DART_PRECOMPILED_RUNTIME)
 RawBytecode* Bytecode::New(uword instructions,
                            intptr_t instructions_size,
                            intptr_t instructions_offset,
@@ -14949,10 +15060,12 @@
   }
   return result.raw();
 }
-#endif
 
 RawExternalTypedData* Bytecode::GetBinary(Zone* zone) const {
   const Function& func = Function::Handle(zone, function());
+  if (func.IsNull()) {
+    return ExternalTypedData::null();
+  }
   const Script& script = Script::Handle(zone, func.script());
   const KernelProgramInfo& info =
       KernelProgramInfo::Handle(zone, script.kernel_program_info());
@@ -14988,6 +15101,12 @@
 }
 
 const char* Bytecode::Name() const {
+  if (raw() == Object::implicit_getter_bytecode().raw()) {
+    return "[Bytecode Stub] VMInternal_ImplicitGetter";
+  } else if (raw() == Object::implicit_setter_bytecode().raw()) {
+    return "[Bytecode Stub] VMInternal_ImplicitSetter";
+  }
+
   Zone* zone = Thread::Current()->zone();
   const Function& fun = Function::Handle(zone, function());
   ASSERT(!fun.IsNull());
@@ -14997,6 +15116,12 @@
 }
 
 const char* Bytecode::QualifiedName() const {
+  if (raw() == Object::implicit_getter_bytecode().raw()) {
+    return "[Bytecode Stub] VMInternal__ImplicitGetter";
+  } else if (raw() == Object::implicit_setter_bytecode().raw()) {
+    return "[Bytecode Stub] VMInternal__ImplicitSetter";
+  }
+
   Zone* zone = Thread::Current()->zone();
   const Function& fun = Function::Handle(zone, function());
   ASSERT(!fun.IsNull());
@@ -16060,7 +16185,7 @@
       return result.raw();
     }
     if (IsNew()) {
-      ASSERT((isolate == Dart::vm_isolate()) || !IsReadOnly());
+      ASSERT((isolate == Dart::vm_isolate()) || !InVMIsolateHeap());
       // Create a canonical object in old space.
       result ^= Object::Clone(*this, Heap::kOld);
     } else {
@@ -16360,10 +16485,10 @@
 }
 
 intptr_t Instance::ElementSizeFor(intptr_t cid) {
-  if (RawObject::IsExternalTypedDataClassId(cid)) {
-    return ExternalTypedData::ElementSizeInBytes(cid);
-  } else if (RawObject::IsTypedDataClassId(cid)) {
-    return TypedData::ElementSizeInBytes(cid);
+  if (RawObject::IsExternalTypedDataClassId(cid) ||
+      RawObject::IsTypedDataClassId(cid) ||
+      RawObject::IsTypedDataViewClassId(cid)) {
+    return TypedDataBase::ElementSizeInBytes(cid);
   }
   switch (cid) {
     case kArrayCid:
@@ -16385,11 +16510,13 @@
 
 intptr_t Instance::DataOffsetFor(intptr_t cid) {
   if (RawObject::IsExternalTypedDataClassId(cid) ||
-      RawObject::IsExternalStringClassId(cid) ||
-      RawObject::IsTypedDataClassId(cid)) {
-    // Elements start at offset 0 of the external and typed data.
+      RawObject::IsExternalStringClassId(cid)) {
+    // Elements start at offset 0 of the external data.
     return 0;
   }
+  if (RawObject::IsTypedDataClassId(cid)) {
+    return TypedData::data_offset();
+  }
   switch (cid) {
     case kArrayCid:
     case kImmutableArrayCid:
@@ -17403,7 +17530,7 @@
     ASSERT(!IsFunctionType());
     Type& type = Type::Handle(zone, cls.declaration_type());
     if (type.IsNull()) {
-      ASSERT(!cls.raw()->IsReadOnly() || (isolate == Dart::vm_isolate()));
+      ASSERT(!cls.raw()->InVMIsolateHeap() || (isolate == Dart::vm_isolate()));
       // Canonicalize the type arguments of the supertype, if any.
       TypeArguments& type_args = TypeArguments::Handle(zone, arguments());
       type_args = type_args.Canonicalize(trail);
@@ -20787,21 +20914,22 @@
   return OS::SCreate(Thread::Current()->zone(), "[%f, %f]", _x, _y);
 }
 
-const intptr_t TypedData::element_size_table[TypedData::kNumElementSizes] = {
-    1,   // kTypedDataInt8ArrayCid.
-    1,   // kTypedDataUint8ArrayCid.
-    1,   // kTypedDataUint8ClampedArrayCid.
-    2,   // kTypedDataInt16ArrayCid.
-    2,   // kTypedDataUint16ArrayCid.
-    4,   // kTypedDataInt32ArrayCid.
-    4,   // kTypedDataUint32ArrayCid.
-    8,   // kTypedDataInt64ArrayCid.
-    8,   // kTypedDataUint64ArrayCid.
-    4,   // kTypedDataFloat32ArrayCid.
-    8,   // kTypedDataFloat64ArrayCid.
-    16,  // kTypedDataFloat32x4ArrayCid.
-    16,  // kTypedDataInt32x4ArrayCid.
-    16,  // kTypedDataFloat64x2ArrayCid,
+const intptr_t
+    TypedDataBase::element_size_table[TypedDataBase::kNumElementSizes] = {
+        1,   // kTypedDataInt8ArrayCid.
+        1,   // kTypedDataUint8ArrayCid.
+        1,   // kTypedDataUint8ClampedArrayCid.
+        2,   // kTypedDataInt16ArrayCid.
+        2,   // kTypedDataUint16ArrayCid.
+        4,   // kTypedDataInt32ArrayCid.
+        4,   // kTypedDataUint32ArrayCid.
+        8,   // kTypedDataInt64ArrayCid.
+        8,   // kTypedDataUint64ArrayCid.
+        4,   // kTypedDataFloat32ArrayCid.
+        8,   // kTypedDataFloat64ArrayCid.
+        16,  // kTypedDataFloat32x4ArrayCid.
+        16,  // kTypedDataInt32x4ArrayCid.
+        16,  // kTypedDataFloat64x2ArrayCid,
 };
 
 bool TypedData::CanonicalizeEquals(const Instance& other) const {
@@ -20849,17 +20977,16 @@
   }
   TypedData& result = TypedData::Handle();
   {
-    const intptr_t lengthInBytes = len * ElementSizeInBytes(class_id);
+    const intptr_t length_in_bytes = len * ElementSizeInBytes(class_id);
     RawObject* raw = Object::Allocate(
-        class_id, TypedData::InstanceSize(lengthInBytes), space);
+        class_id, TypedData::InstanceSize(length_in_bytes), space);
     NoSafepointScope no_safepoint;
     result ^= raw;
     result.SetLength(len);
-    result.ResetData();
+    result.RecomputeDataField();
     if (len > 0) {
-      memset(result.DataAddr(0), 0, lengthInBytes);
+      memset(result.DataAddr(0), 0, length_in_bytes);
     }
-    ASSERT(result.Length() == len);
   }
   return result.raw();
 }
@@ -20908,25 +21035,27 @@
         Object::Allocate(class_id, TypedDataView::InstanceSize(), space);
     NoSafepointScope no_safepoint;
     result ^= raw;
-    result.clear_typed_data();
-    result.set_offset_in_bytes(0);
-    result.set_length(0);
+    result.Clear();
   }
   return result.raw();
 }
 
 RawTypedDataView* TypedDataView::New(intptr_t class_id,
-                                     const Instance& typed_data,
+                                     const TypedDataBase& typed_data,
                                      intptr_t offset_in_bytes,
                                      intptr_t length,
                                      Heap::Space space) {
   auto& result = TypedDataView::Handle(TypedDataView::New(class_id, space));
-  result.set_typed_data(typed_data);
-  result.set_offset_in_bytes(offset_in_bytes);
-  result.set_length(length);
+  result.InitializeWith(typed_data, offset_in_bytes, length);
   return result.raw();
 }
 
+const char* TypedDataBase::ToCString() const {
+  // There are no instances of RawTypedDataBase.
+  UNREACHABLE();
+  return nullptr;
+}
+
 const char* TypedDataView::ToCString() const {
   auto zone = Thread::Current()->zone();
   return OS::SCreate(zone, "TypedDataView(cid: %" Pd ")", GetClassId());
@@ -21512,6 +21641,10 @@
   StoreSmi(&raw_ptr()->num_bracket_expressions_, Smi::New(value));
 }
 
+void RegExp::set_capture_name_map(const Array& array) const {
+  StorePointer(&raw_ptr()->capture_name_map_, array.raw());
+}
+
 RawRegExp* RegExp::New(Heap::Space space) {
   RegExp& result = RegExp::Handle();
   {
diff --git a/runtime/vm/object.h b/runtime/vm/object.h
index 044ecc5..dbdbe2c 100644
--- a/runtime/vm/object.h
+++ b/runtime/vm/object.h
@@ -166,10 +166,10 @@
                                                                                \
  private: /* NOLINT */                                                         \
   void* operator new(size_t size);                                             \
-  object(const object& value);                                                 \
-  void operator=(Raw##super* value);                                           \
-  void operator=(const object& value);                                         \
-  void operator=(const super& value);
+  object(const object& value) = delete;                                        \
+  void operator=(Raw##super* value) = delete;                                  \
+  void operator=(const object& value) = delete;                                \
+  void operator=(const super& value) = delete;
 
 // Conditionally include object_service.cc functionality in the vtable to avoid
 // link errors like the following:
@@ -307,9 +307,9 @@
   bool IsNew() const { return raw()->IsNewObject(); }
   bool IsOld() const { return raw()->IsOldObject(); }
 #if defined(DEBUG)
-  bool IsReadOnly() const;
+  bool InVMIsolateHeap() const;
 #else
-  bool IsReadOnly() const { return raw()->IsReadOnly(); }
+  bool InVMIsolateHeap() const { return raw()->InVMIsolateHeap(); }
 #endif  // DEBUG
 
   // Print the object on stdout for debugging.
@@ -396,6 +396,8 @@
   V(ExceptionHandlers, empty_exception_handlers)                               \
   V(Array, extractor_parameter_types)                                          \
   V(Array, extractor_parameter_names)                                          \
+  V(Bytecode, implicit_getter_bytecode)                                        \
+  V(Bytecode, implicit_setter_bytecode)                                        \
   V(Instance, sentinel)                                                        \
   V(Instance, transition_sentinel)                                             \
   V(Instance, unknown_constant)                                                \
@@ -1954,6 +1956,9 @@
 
 class Function : public Object {
  public:
+  // A value to prevent premature code collection. lg(32) = 5 major GCs.
+  static constexpr intptr_t kGraceUsageCounter = 32;
+
   RawString* name() const { return raw_ptr()->name_; }
   RawString* UserVisibleName() const;  // Same as scrubbed name.
   RawString* QualifiedScrubbedName() const {
@@ -2412,6 +2417,75 @@
 
 #undef DEFINE_GETTERS_AND_SETTERS
 
+#if !defined(DART_PRECOMPILED_RUNTIME)
+  intptr_t binary_declaration_offset() const {
+    return RawFunction::BinaryDeclarationOffset::decode(
+        raw_ptr()->binary_declaration_);
+  }
+  void set_binary_declaration_offset(intptr_t value) const {
+    ASSERT(value >= 0);
+    StoreNonPointer(&raw_ptr()->binary_declaration_,
+                    RawFunction::BinaryDeclarationOffset::update(
+                        value, raw_ptr()->binary_declaration_));
+  }
+#endif  // !defined(DART_PRECOMPILED_RUNTIME)
+
+  intptr_t kernel_offset() const {
+#if defined(DART_PRECOMPILED_RUNTIME)
+    return 0;
+#else
+    ASSERT(!is_declared_in_bytecode());
+    return binary_declaration_offset();
+#endif
+  }
+
+  void set_kernel_offset(intptr_t value) const {
+#if defined(DART_PRECOMPILED_RUNTIME)
+    UNREACHABLE();
+#else
+    ASSERT(!is_declared_in_bytecode());
+    set_binary_declaration_offset(value);
+#endif
+  }
+
+  intptr_t bytecode_offset() const {
+#if defined(DART_PRECOMPILED_RUNTIME)
+    return 0;
+#else
+    ASSERT(is_declared_in_bytecode());
+    return binary_declaration_offset();
+#endif
+  }
+
+  void set_bytecode_offset(intptr_t value) const {
+#if defined(DART_PRECOMPILED_RUNTIME)
+    UNREACHABLE();
+#else
+    ASSERT(is_declared_in_bytecode());
+    set_binary_declaration_offset(value);
+#endif
+  }
+
+  bool is_declared_in_bytecode() const {
+#if defined(DART_PRECOMPILED_RUNTIME)
+    return false;
+#else
+    return RawFunction::IsDeclaredInBytecode::decode(
+        raw_ptr()->binary_declaration_);
+#endif
+  }
+
+#if !defined(DART_PRECOMPILED_RUNTIME)
+  void set_is_declared_in_bytecode(bool value) const {
+    StoreNonPointer(&raw_ptr()->binary_declaration_,
+                    RawFunction::IsDeclaredInBytecode::update(
+                        value, raw_ptr()->binary_declaration_));
+  }
+#endif  // !defined(DART_PRECOMPILED_RUNTIME)
+
+  void InheritBinaryDeclarationFrom(const Function& src) const;
+  void InheritBinaryDeclarationFrom(const Field& src) const;
+
   static const intptr_t kMaxInstructionCount = (1 << 16) - 1;
 
   void SetOptimizedInstructionCountClamped(uintptr_t value) const {
@@ -2440,7 +2514,15 @@
   // deoptimize, since we won't generate deoptimization info or register
   // dependencies. It will be compiled into optimized code immediately when it's
   // run.
-  bool ForceOptimize() const { return IsFfiTrampoline(); }
+  bool ForceOptimize() const {
+    return IsFfiTrampoline()
+    // On DBC we use native calls instead of IR for the view factories (see
+    // kernel_to_il.cc)
+#if !defined(TARGET_ARCH_DBC)
+           || IsTypedDataViewFactory()
+#endif
+        ;
+  }
 
   bool CanBeInlined() const;
 
@@ -2624,6 +2706,15 @@
     return modifier() != RawFunction::kNoModifier;
   }
 
+  bool IsTypedDataViewFactory() const {
+    if (is_native() && kind() == RawFunction::kConstructor) {
+      // This is a native factory constructor.
+      const Class& klass = Class::Handle(Owner());
+      return RawObject::IsTypedDataViewClassId(klass.id());
+    }
+    return false;
+  }
+
   DART_WARN_UNUSED_RESULT
   RawError* VerifyCallEntryPoint() const;
 
@@ -2689,6 +2780,8 @@
 
   RawFunction* GetDynamicInvocationForwarder(const String& mangled_name,
                                              bool allow_add = true) const;
+
+  RawFunction* GetTargetOfDynamicInvocationForwarder() const;
 #endif
 
   // Slow function, use in asserts to track changes in important library
@@ -3095,20 +3188,74 @@
         GenericCovariantImplBit::update(value, raw_ptr()->kind_bits_));
   }
 
+#if !defined(DART_PRECOMPILED_RUNTIME)
+  intptr_t binary_declaration_offset() const {
+    return RawField::BinaryDeclarationOffset::decode(
+        raw_ptr()->binary_declaration_);
+  }
+  void set_binary_declaration_offset(intptr_t value) const {
+    ASSERT(value >= 0);
+    StoreNonPointer(&raw_ptr()->binary_declaration_,
+                    RawField::BinaryDeclarationOffset::update(
+                        value, raw_ptr()->binary_declaration_));
+  }
+#endif  // !defined(DART_PRECOMPILED_RUNTIME)
+
   intptr_t kernel_offset() const {
 #if defined(DART_PRECOMPILED_RUNTIME)
     return 0;
 #else
-    return raw_ptr()->kernel_offset_;
+    ASSERT(!is_declared_in_bytecode());
+    return binary_declaration_offset();
 #endif
   }
 
-  void set_kernel_offset(intptr_t offset) const {
-#if !defined(DART_PRECOMPILED_RUNTIME)
-    StoreNonPointer(&raw_ptr()->kernel_offset_, offset);
+  void set_kernel_offset(intptr_t value) const {
+#if defined(DART_PRECOMPILED_RUNTIME)
+    UNREACHABLE();
+#else
+    ASSERT(!is_declared_in_bytecode());
+    set_binary_declaration_offset(value);
 #endif
   }
 
+  intptr_t bytecode_offset() const {
+#if defined(DART_PRECOMPILED_RUNTIME)
+    return 0;
+#else
+    ASSERT(is_declared_in_bytecode());
+    return binary_declaration_offset();
+#endif
+  }
+
+  void set_bytecode_offset(intptr_t value) const {
+#if defined(DART_PRECOMPILED_RUNTIME)
+    UNREACHABLE();
+#else
+    ASSERT(is_declared_in_bytecode());
+    set_binary_declaration_offset(value);
+#endif
+  }
+
+  bool is_declared_in_bytecode() const {
+#if defined(DART_PRECOMPILED_RUNTIME)
+    return false;
+#else
+    return RawField::IsDeclaredInBytecode::decode(
+        raw_ptr()->binary_declaration_);
+#endif
+  }
+
+#if !defined(DART_PRECOMPILED_RUNTIME)
+  void set_is_declared_in_bytecode(bool value) const {
+    StoreNonPointer(&raw_ptr()->binary_declaration_,
+                    RawField::IsDeclaredInBytecode::update(
+                        value, raw_ptr()->binary_declaration_));
+  }
+#endif  // !defined(DART_PRECOMPILED_RUNTIME)
+
+  void InheritBinaryDeclarationFrom(const Field& src) const;
+
   RawExternalTypedData* KernelData() const;
 
   intptr_t KernelDataProgramOffset() const;
@@ -3298,8 +3445,13 @@
 
   bool IsUninitialized() const;
 
-  DART_WARN_UNUSED_RESULT RawError* EvaluateInitializer() const;
+  // Run initializer and set field value.
+  DART_WARN_UNUSED_RESULT RawError* Initialize() const;
 
+  // Run initializer only.
+  DART_WARN_UNUSED_RESULT RawObject* EvaluateInitializer() const;
+
+  RawFunction* EnsureInitializerFunction() const;
   RawFunction* InitializerFunction() const {
     return raw_ptr()->initializer_function_;
   }
@@ -3323,8 +3475,10 @@
   static RawString* LookupSetterSymbol(const String& field_name);
   static RawString* NameFromGetter(const String& getter_name);
   static RawString* NameFromSetter(const String& setter_name);
+  static RawString* NameFromInit(const String& init_name);
   static bool IsGetterName(const String& function_name);
   static bool IsSetterName(const String& function_name);
+  static bool IsInitName(const String& function_name);
 
  private:
   static void InitializeNew(const Field& result,
@@ -3660,6 +3814,13 @@
   RawFunction* LookupFunctionAllowPrivate(const String& name) const;
   RawFunction* LookupLocalFunction(const String& name) const;
   RawLibraryPrefix* LookupLocalLibraryPrefix(const String& name) const;
+
+  // Look up a Script based on a url. If 'useResolvedUri' is not provided or is
+  // false, 'url' should have a 'dart:' scheme for Dart core libraries,
+  // a 'package:' scheme for packages, and 'file:' scheme otherwise.
+  //
+  // If 'useResolvedUri' is true, 'url' should have a 'org-dartlang-sdk:' scheme
+  // for Dart core libraries and a 'file:' scheme otherwise.
   RawScript* LookupScript(const String& url, bool useResolvedUri = false) const;
   RawArray* LoadedScripts() const;
 
@@ -3679,16 +3840,18 @@
   void AddClassMetadata(const Class& cls,
                         const Object& tl_owner,
                         TokenPosition token_pos,
-                        intptr_t kernel_offset = 0) const;
+                        intptr_t kernel_offset) const;
   void AddFieldMetadata(const Field& field,
                         TokenPosition token_pos,
-                        intptr_t kernel_offset = 0) const;
+                        intptr_t kernel_offset,
+                        intptr_t bytecode_offset) const;
   void AddFunctionMetadata(const Function& func,
                            TokenPosition token_pos,
-                           intptr_t kernel_offset = 0) const;
+                           intptr_t kernel_offset,
+                           intptr_t bytecode_offset) const;
   void AddLibraryMetadata(const Object& tl_owner,
                           TokenPosition token_pos,
-                          intptr_t kernel_offset = 0) const;
+                          intptr_t kernel_offset) const;
   void AddTypeParameterMetadata(const TypeParameter& param,
                                 TokenPosition token_pos) const;
   void CloneMetadataFrom(const Library& from_library,
@@ -3900,7 +4063,8 @@
   void AddMetadata(const Object& owner,
                    const String& name,
                    TokenPosition token_pos,
-                   intptr_t kernel_offset = 0) const;
+                   intptr_t kernel_offset,
+                   intptr_t bytecode_offset) const;
 
   FINAL_HEAP_OBJECT_IMPLEMENTATION(Library, Object);
 
@@ -5243,12 +5407,10 @@
   static intptr_t InstanceSize() {
     return RoundedAllocationSize(sizeof(RawBytecode));
   }
-#if !defined(DART_PRECOMPILED_RUNTIME)
   static RawBytecode* New(uword instructions,
                           intptr_t instructions_size,
                           intptr_t instructions_offset,
                           const ObjectPool& object_pool);
-#endif
 
   RawExternalTypedData* GetBinary(Zone* zone) const;
 
@@ -6767,7 +6929,7 @@
   static const intptr_t kMaxValue = kSmiMax;
   static const intptr_t kMinValue = kSmiMin;
 
-  intptr_t Value() const { return ValueFromRaw(raw_value()); }
+  intptr_t Value() const { return ValueFromRawSmi(raw()); }
 
   virtual bool Equals(const Instance& other) const;
   virtual bool IsZero() const { return Value() == 0; }
@@ -6784,9 +6946,10 @@
   static intptr_t InstanceSize() { return 0; }
 
   static RawSmi* New(intptr_t value) {
-    intptr_t raw_smi = (value << kSmiTagShift) | kSmiTag;
-    ASSERT(ValueFromRaw(raw_smi) == value);
-    return reinterpret_cast<RawSmi*>(raw_smi);
+    RawSmi* raw_smi =
+        reinterpret_cast<RawSmi*>((value << kSmiTagShift) | kSmiTag);
+    ASSERT(ValueFromRawSmi(raw_smi) == value);
+    return raw_smi;
   }
 
   static RawSmi* FromAlignedAddress(uword address) {
@@ -6797,7 +6960,7 @@
   static RawClass* Class();
 
   static intptr_t Value(const RawSmi* raw_smi) {
-    return ValueFromRaw(reinterpret_cast<uword>(raw_smi));
+    return ValueFromRawSmi(raw_smi);
   }
 
   static intptr_t RawValue(intptr_t value) {
@@ -6823,12 +6986,6 @@
     return -kWordSize;
   }
 
-  static intptr_t ValueFromRaw(uword raw_value) {
-    intptr_t value = raw_value;
-    ASSERT((value & kSmiTagMask) == kSmiTag);
-    return (value >> kSmiTagShift);
-  }
-
   static cpp_vtable handle_vtable_;
 
   Smi() : Integer() {}
@@ -8154,33 +8311,87 @@
   friend class Class;
 };
 
-class TypedData : public Instance {
+class TypedDataBase : public Instance {
  public:
-  // We use 30 bits for the hash code so hashes in a snapshot taken on a
-  // 64-bit architecture stay in Smi range when loaded on a 32-bit
-  // architecture.
-  static const intptr_t kHashBits = 30;
+  static intptr_t length_offset() {
+    return OFFSET_OF(RawTypedDataBase, length_);
+  }
+
+  static intptr_t data_field_offset() {
+    return OFFSET_OF(RawTypedDataBase, data_);
+  }
+
+  RawSmi* length() const { return raw_ptr()->length_; }
 
   intptr_t Length() const {
     ASSERT(!IsNull());
     return Smi::Value(raw_ptr()->length_);
   }
 
-  intptr_t ElementSizeInBytes() const {
-    intptr_t cid = raw()->GetClassId();
-    return ElementSizeInBytes(cid);
+  intptr_t LengthInBytes() const {
+    return ElementSizeInBytes(raw()->GetClassId()) * Length();
   }
 
   TypedDataElementType ElementType() const {
-    intptr_t cid = raw()->GetClassId();
-    return ElementType(cid);
+    return ElementType(raw()->GetClassId());
   }
 
-  intptr_t LengthInBytes() const {
-    intptr_t cid = raw()->GetClassId();
-    return (ElementSizeInBytes(cid) * Length());
+  intptr_t ElementSizeInBytes() const {
+    return element_size(ElementType(raw()->GetClassId()));
   }
 
+  static intptr_t ElementSizeInBytes(classid_t cid) {
+    return element_size(ElementType(cid));
+  }
+
+  static TypedDataElementType ElementType(classid_t cid) {
+    if (cid == kByteDataViewCid) {
+      return kUint8ArrayElement;
+    } else if (RawObject::IsTypedDataClassId(cid)) {
+      const intptr_t index =
+          (cid - kTypedDataInt8ArrayCid - kTypedDataCidRemainderInternal) / 3;
+      return static_cast<TypedDataElementType>(index);
+    } else if (RawObject::IsTypedDataViewClassId(cid)) {
+      const intptr_t index =
+          (cid - kTypedDataInt8ArrayCid - kTypedDataCidRemainderView) / 3;
+      return static_cast<TypedDataElementType>(index);
+    } else {
+      ASSERT(RawObject::IsExternalTypedDataClassId(cid));
+      const intptr_t index =
+          (cid - kTypedDataInt8ArrayCid - kTypedDataCidRemainderExternal) / 3;
+      return static_cast<TypedDataElementType>(index);
+    }
+  }
+
+ protected:
+  void SetLength(intptr_t value) const {
+    ASSERT(value <= Smi::kMaxValue);
+    StoreSmi(&raw_ptr()->length_, Smi::New(value));
+  }
+
+ private:
+  friend class Class;
+
+  static intptr_t element_size(intptr_t index) {
+    ASSERT(0 <= index && index < kNumElementSizes);
+    intptr_t size = element_size_table[index];
+    ASSERT(size != 0);
+    return size;
+  }
+  static const intptr_t kNumElementSizes =
+      (kTypedDataFloat64x2ArrayCid - kTypedDataInt8ArrayCid) / 3 + 1;
+  static const intptr_t element_size_table[kNumElementSizes];
+
+  HEAP_OBJECT_IMPLEMENTATION(TypedDataBase, Instance);
+};
+
+class TypedData : public TypedDataBase {
+ public:
+  // We use 30 bits for the hash code so hashes in a snapshot taken on a
+  // 64-bit architecture stay in Smi range when loaded on a 32-bit
+  // architecture.
+  static const intptr_t kHashBits = 30;
+
   void* DataAddr(intptr_t byte_offset) const {
     ASSERT((byte_offset == 0) ||
            ((byte_offset > 0) && (byte_offset < LengthInBytes())));
@@ -8219,11 +8430,11 @@
 
 #undef TYPED_GETTER_SETTER
 
-  static intptr_t length_offset() { return OFFSET_OF(RawTypedData, length_); }
-
-  static intptr_t data_offset() { return OFFSET_OF(RawTypedData, data_); }
+  static intptr_t data_offset() { return RawTypedData::payload_offset(); }
 
   static intptr_t InstanceSize() {
+    ASSERT(sizeof(RawTypedData) ==
+           OFFSET_OF_RETURNED_VALUE(RawTypedData, internal_data));
     return 0;
   }
 
@@ -8232,16 +8443,6 @@
     return RoundedAllocationSize(sizeof(RawTypedData) + lengthInBytes);
   }
 
-  static intptr_t ElementSizeInBytes(intptr_t class_id) {
-    ASSERT(RawObject::IsTypedDataClassId(class_id));
-    return element_size(ElementType(class_id));
-  }
-
-  static TypedDataElementType ElementType(intptr_t class_id) {
-    ASSERT(RawObject::IsTypedDataClassId(class_id));
-    return static_cast<TypedDataElementType>(class_id - kTypedDataInt8ArrayCid);
-  }
-
   static intptr_t MaxElements(intptr_t class_id) {
     ASSERT(RawObject::IsTypedDataClassId(class_id));
     return (kSmiMax / ElementSizeInBytes(class_id));
@@ -8311,16 +8512,7 @@
   }
 
  protected:
-  void SetLength(intptr_t value) const {
-    StoreSmi(&raw_ptr()->length_, Smi::New(value));
-  }
-
-  void SetData(uint8_t* data) const {
-    ASSERT(Isolate::Current()->heap()->Contains(reinterpret_cast<uword>(data)));
-    StoreNonPointer(&raw_ptr()->data_, data);
-  }
-
-  void ResetData() { raw()->ResetData(); }
+  void RecomputeDataField() { raw()->RecomputeDataField(); }
 
  private:
   // Provides const access to non-pointer, non-aligned data within the object.
@@ -8335,48 +8527,18 @@
                                               byte_offset);
   }
 
-  static intptr_t element_size(intptr_t index) {
-    ASSERT(0 <= index && index < kNumElementSizes);
-    intptr_t size = element_size_table[index];
-    ASSERT(size != 0);
-    return size;
-  }
-  static const intptr_t kNumElementSizes =
-      kTypedDataFloat64x2ArrayCid - kTypedDataInt8ArrayCid + 1;
-  static const intptr_t element_size_table[kNumElementSizes];
-
-  FINAL_HEAP_OBJECT_IMPLEMENTATION(TypedData, Instance);
+  FINAL_HEAP_OBJECT_IMPLEMENTATION(TypedData, TypedDataBase);
   friend class Class;
   friend class ExternalTypedData;
   friend class TypedDataView;
 };
 
-class ExternalTypedData : public Instance {
+class ExternalTypedData : public TypedDataBase {
  public:
   // Alignment of data when serializing ExternalTypedData in a clustered
   // snapshot. Should be independent of word size.
   static const int kDataSerializationAlignment = 8;
 
-  intptr_t Length() const {
-    ASSERT(!IsNull());
-    return Smi::Value(raw_ptr()->length_);
-  }
-
-  intptr_t ElementSizeInBytes() const {
-    intptr_t cid = raw()->GetClassId();
-    return ElementSizeInBytes(cid);
-  }
-
-  TypedDataElementType ElementType() const {
-    intptr_t cid = raw()->GetClassId();
-    return ElementType(cid);
-  }
-
-  intptr_t LengthInBytes() const {
-    intptr_t cid = raw()->GetClassId();
-    return (ElementSizeInBytes(cid) * Length());
-  }
-
   void* DataAddr(intptr_t byte_offset) const {
     ASSERT((byte_offset == 0) ||
            ((byte_offset > 0) && (byte_offset < LengthInBytes())));
@@ -8411,10 +8573,6 @@
       Dart_WeakPersistentHandleFinalizer callback,
       intptr_t external_size) const;
 
-  static intptr_t length_offset() {
-    return OFFSET_OF(RawExternalTypedData, length_);
-  }
-
   static intptr_t data_offset() {
     return OFFSET_OF(RawExternalTypedData, data_);
   }
@@ -8423,17 +8581,6 @@
     return RoundedAllocationSize(sizeof(RawExternalTypedData));
   }
 
-  static intptr_t ElementSizeInBytes(intptr_t class_id) {
-    ASSERT(RawObject::IsExternalTypedDataClassId(class_id));
-    return TypedData::element_size(ElementType(class_id));
-  }
-
-  static TypedDataElementType ElementType(intptr_t class_id) {
-    ASSERT(RawObject::IsExternalTypedDataClassId(class_id));
-    return static_cast<TypedDataElementType>(class_id -
-                                             kExternalTypedDataInt8ArrayCid);
-  }
-
   static intptr_t MaxElements(intptr_t class_id) {
     ASSERT(RawObject::IsExternalTypedDataClassId(class_id));
     return (kSmiMax / ElementSizeInBytes(class_id));
@@ -8452,6 +8599,7 @@
 
  protected:
   void SetLength(intptr_t value) const {
+    ASSERT(value <= Smi::kMaxValue);
     StoreSmi(&raw_ptr()->length_, Smi::New(value));
   }
 
@@ -8462,16 +8610,16 @@
   }
 
  private:
-  FINAL_HEAP_OBJECT_IMPLEMENTATION(ExternalTypedData, Instance);
+  FINAL_HEAP_OBJECT_IMPLEMENTATION(ExternalTypedData, TypedDataBase);
   friend class Class;
 };
 
-class TypedDataView : public Instance {
+class TypedDataView : public TypedDataBase {
  public:
   static RawTypedDataView* New(intptr_t class_id,
                                Heap::Space space = Heap::kNew);
   static RawTypedDataView* New(intptr_t class_id,
-                               const Instance& typed_data,
+                               const TypedDataBase& typed_data,
                                intptr_t offset_in_bytes,
                                intptr_t length,
                                Heap::Space space = Heap::kNew);
@@ -8480,12 +8628,6 @@
     return RoundedAllocationSize(sizeof(RawTypedDataView));
   }
 
-  static intptr_t ElementSizeInBytes(const TypedDataView& view_obj) {
-    ASSERT(!view_obj.IsNull());
-    intptr_t cid = view_obj.raw()->GetClassId();
-    return ElementSizeInBytes(cid);
-  }
-
   static RawInstance* Data(const TypedDataView& view) {
     return view.typed_data();
   }
@@ -8494,8 +8636,6 @@
     return view.offset_in_bytes();
   }
 
-  static RawSmi* Length(const TypedDataView& view) { return view.length(); }
-
   static bool IsExternalTypedDataView(const TypedDataView& view_obj) {
     const auto& data = Instance::Handle(Data(view_obj));
     intptr_t cid = data.raw()->GetClassId();
@@ -8508,49 +8648,42 @@
     return OFFSET_OF(RawTypedDataView, typed_data_);
   }
 
-  static intptr_t length_offset() {
-    return OFFSET_OF(RawTypedDataView, length_);
-  }
-
   static intptr_t offset_in_bytes_offset() {
     return OFFSET_OF(RawTypedDataView, offset_in_bytes_);
   }
 
-  static intptr_t ElementSizeInBytes(intptr_t class_id) {
-    ASSERT(RawObject::IsTypedDataViewClassId(class_id));
-    return (class_id == kByteDataViewCid)
-               ? 1
-               : TypedData::element_size(class_id - kTypedDataInt8ArrayViewCid);
-  }
-
   RawInstance* typed_data() const { return raw_ptr()->typed_data_; }
 
-  void set_typed_data(const Instance& typed_data) {
+  void InitializeWith(const TypedDataBase& typed_data,
+                      intptr_t offset_in_bytes,
+                      intptr_t length) {
     const classid_t cid = typed_data.GetClassId();
     ASSERT(RawObject::IsTypedDataClassId(cid) ||
            RawObject::IsExternalTypedDataClassId(cid));
     StorePointer(&raw_ptr()->typed_data_, typed_data.raw());
-  }
+    StoreSmi(&raw_ptr()->length_, Smi::New(length));
+    StoreSmi(&raw_ptr()->offset_in_bytes_, Smi::New(offset_in_bytes));
 
-  void set_length(intptr_t value) {
-    StorePointer(&raw_ptr()->length_, Smi::New(value));
-  }
-
-  void set_offset_in_bytes(intptr_t value) {
-    StorePointer(&raw_ptr()->offset_in_bytes_, Smi::New(value));
+    // Update the inner pointer.
+    RecomputeDataField();
   }
 
   RawSmi* offset_in_bytes() const { return raw_ptr()->offset_in_bytes_; }
 
-  RawSmi* length() const { return raw_ptr()->length_; }
-
  private:
-  void clear_typed_data() {
-    StorePointer(&raw_ptr()->typed_data_, Instance::RawCast(Object::null()));
+  void RecomputeDataField() { raw()->RecomputeDataField(); }
+
+  void Clear() {
+    StoreSmi(&raw_ptr()->length_, Smi::New(0));
+    StoreSmi(&raw_ptr()->offset_in_bytes_, Smi::New(0));
+    StoreNonPointer(&raw_ptr()->data_, nullptr);
+    StorePointer(&raw_ptr()->typed_data_,
+                 TypedDataBase::RawCast(Object::null()));
   }
 
-  FINAL_HEAP_OBJECT_IMPLEMENTATION(TypedDataView, Instance);
+  FINAL_HEAP_OBJECT_IMPLEMENTATION(TypedDataView, TypedDataBase);
   friend class Class;
+  friend class TypedDataViewDeserializationCluster;
 };
 
 class ByteBuffer : public AllStatic {
@@ -8993,6 +9126,7 @@
   RawSmi* num_bracket_expressions() const {
     return raw_ptr()->num_bracket_expressions_;
   }
+  RawArray* capture_name_map() const { return raw_ptr()->capture_name_map_; }
 
   RawTypedData* bytecode(bool is_one_byte, bool sticky) const {
     if (sticky) {
@@ -9049,6 +9183,7 @@
                     const TypedData& bytecode) const;
 
   void set_num_bracket_expressions(intptr_t value) const;
+  void set_capture_name_map(const Array& array) const;
   void set_is_global() const { set_flags(flags() | kGlobal); }
   void set_is_ignore_case() const { set_flags(flags() | kIgnoreCase); }
   void set_is_multi_line() const { set_flags(flags() | kMultiLine); }
@@ -9433,7 +9568,6 @@
    public:
     TupleView(const Array& array, intptr_t index)
         : array_(array), index_(index) {
-      ASSERT(!array.IsNull());
     }
 
     template <EnumType kElement>
@@ -9481,6 +9615,7 @@
   };
 
   explicit ArrayOfTuplesView(const Array& array) : array_(array), index_(-1) {
+    ASSERT(!array.IsNull());
     ASSERT(array.Length() >= kStartOffset);
     ASSERT((array.Length() - kStartOffset) % EntrySize == kStartOffset);
   }
diff --git a/runtime/vm/object_graph.cc b/runtime/vm/object_graph.cc
index 3e52f53..32d9b09 100644
--- a/runtime/vm/object_graph.cc
+++ b/runtime/vm/object_graph.cc
@@ -38,18 +38,18 @@
         data_(kInitialCapacity) {}
 
   // Marks and pushes. Used to initialize this stack with roots.
+  // We can use ObjectIdTable normally used by serializers because it
+  // won't be in use while handling a service request (ObjectGraph's only use).
   virtual void VisitPointers(RawObject** first, RawObject** last) {
+    Heap* heap = isolate()->heap();
     for (RawObject** current = first; current <= last; ++current) {
-      if ((*current)->IsHeapObject() && !(*current)->IsGraphMarked()) {
+      if ((*current)->IsHeapObject() &&
+          !(*current)->InVMIsolateHeap() &&
+          heap->GetObjectId(*current) == 0) {  // not visited yet
         if (!include_vm_objects_ && !IsUserClass((*current)->GetClassId())) {
           continue;
         }
-        if (FLAG_write_protect_code && (*current)->IsInstructions()) {
-          // A non-writable alias mapping may exist for instruction pages.
-          HeapPage::ToWritable(*current)->SetGraphMarked();
-        } else {
-          (*current)->SetGraphMarked();
-        }
+        heap->SetObjectId(*current, 1);
         Node node;
         node.ptr = current;
         node.obj = *current;
@@ -74,16 +74,15 @@
       sentinel.ptr = kSentinel;
       data_.Add(sentinel);
       StackIterator it(this, data_.length() - 2);
-      switch (visitor->VisitObject(&it)) {
-        case ObjectGraph::Visitor::kProceed:
-          obj->VisitPointers(this);
-          break;
-        case ObjectGraph::Visitor::kBacktrack:
-          break;
-        case ObjectGraph::Visitor::kAbort:
-          return;
+      Visitor::Direction direction = visitor->VisitObject(&it);
+      if (direction == ObjectGraph::Visitor::kAbort) {
+        break;
+      }
+      if (direction == ObjectGraph::Visitor::kProceed) {
+        obj->VisitPointers(this);
       }
     }
+    isolate()->heap()->ResetObjectIdTable();
   }
 
   bool include_vm_objects_;
@@ -151,25 +150,6 @@
   }
 }
 
-class Unmarker : public ObjectVisitor {
- public:
-  Unmarker() {}
-
-  void VisitObject(RawObject* obj) {
-    if (obj->IsGraphMarked()) {
-      obj->ClearGraphMarked();
-    }
-  }
-
-  static void UnmarkAll(Isolate* isolate) {
-    Unmarker unmarker;
-    isolate->heap()->VisitObjectsNoImagePages(&unmarker);
-  }
-
- private:
-  DISALLOW_COPY_AND_ASSIGN(Unmarker);
-};
-
 static void IterateUserFields(ObjectPointerVisitor* visitor) {
   Thread* thread = Thread::Current();
   // Scope to prevent handles create here from appearing as stack references.
@@ -216,7 +196,6 @@
   Stack stack(isolate());
   isolate()->VisitObjectPointers(&stack, ValidationPolicy::kDontValidateFrames);
   stack.TraverseGraph(visitor);
-  Unmarker::UnmarkAll(isolate());
 }
 
 void ObjectGraph::IterateUserObjects(ObjectGraph::Visitor* visitor) {
@@ -224,7 +203,6 @@
   IterateUserFields(&stack);
   stack.include_vm_objects_ = false;
   stack.TraverseGraph(visitor);
-  Unmarker::UnmarkAll(isolate());
 }
 
 void ObjectGraph::IterateObjectsFrom(const Object& root,
@@ -233,7 +211,6 @@
   RawObject* root_raw = root.raw();
   stack.VisitPointer(&root_raw);
   stack.TraverseGraph(visitor);
-  Unmarker::UnmarkAll(isolate());
 }
 
 class InstanceAccumulator : public ObjectVisitor {
@@ -264,7 +241,6 @@
   iteration.IterateObjectsNoImagePages(&accumulator);
 
   stack.TraverseGraph(visitor);
-  Unmarker::UnmarkAll(isolate());
 }
 
 class SizeVisitor : public ObjectGraph::Visitor {
@@ -537,7 +513,7 @@
   virtual void VisitPointers(RawObject** first, RawObject** last) {
     for (RawObject** current = first; current <= last; ++current) {
       RawObject* object = *current;
-      if (!object->IsHeapObject() || object->IsReadOnly()) {
+      if (!object->IsHeapObject() || object->InVMIsolateHeap()) {
         // Ignore smis and objects in the VM isolate for now.
         // TODO(koda): To track which field each pointer corresponds to,
         // we'll need to encode which fields were omitted here.
diff --git a/runtime/vm/object_service.cc b/runtime/vm/object_service.cc
index 8157ccf..99576c6 100644
--- a/runtime/vm/object_service.cc
+++ b/runtime/vm/object_service.cc
@@ -1358,6 +1358,10 @@
   jsobj.AddProperty("valueAsString", ToCString());
 }
 
+void TypedDataBase::PrintJSONImpl(JSONStream* stream, bool ref) const {
+  UNREACHABLE();
+}
+
 void TypedData::PrintJSONImpl(JSONStream* stream, bool ref) const {
   JSONObject jsobj(stream);
   PrintSharedInstanceJSON(&jsobj, ref);
diff --git a/runtime/vm/parser.h b/runtime/vm/parser.h
index 25dc2b6..efbb8f9 100644
--- a/runtime/vm/parser.h
+++ b/runtime/vm/parser.h
@@ -84,7 +84,7 @@
 #if defined(DEBUG)
     if (list == NULL) return;
     for (intptr_t i = 0; i < list->length(); i++) {
-      ASSERT(list->At(i)->IsZoneHandle() || list->At(i)->IsReadOnly());
+      ASSERT(list->At(i)->IsZoneHandle() || list->At(i)->InVMIsolateHeap());
     }
 #endif
   }
diff --git a/runtime/vm/pointer_tagging.h b/runtime/vm/pointer_tagging.h
index 411b6b0..a4d6d9f 100644
--- a/runtime/vm/pointer_tagging.h
+++ b/runtime/vm/pointer_tagging.h
@@ -14,6 +14,8 @@
 
 namespace dart {
 
+class RawSmi;
+
 // Dart VM aligns all objects by 2 words in in the old space and misaligns them
 // in new space. This allows to distinguish new and old pointers by their bits.
 //
@@ -63,6 +65,12 @@
   kSmiTagShift = 1,
 };
 
+inline intptr_t ValueFromRawSmi(const RawSmi* raw_value) {
+  const intptr_t value = reinterpret_cast<intptr_t>(raw_value);
+  ASSERT((value & kSmiTagMask) == kSmiTag);
+  return (value >> kSmiTagShift);
+}
+
 }  // namespace dart
 
 #endif  // RUNTIME_VM_POINTER_TAGGING_H_
diff --git a/runtime/vm/profiler.cc b/runtime/vm/profiler.cc
index 9db291da3..adde4dd 100644
--- a/runtime/vm/profiler.cc
+++ b/runtime/vm/profiler.cc
@@ -1635,7 +1635,8 @@
       user_tag_(0),
       allocation_cid_(-1),
       truncated_(false),
-      timeline_trie_(NULL) {}
+      timeline_code_trie_(nullptr),
+      timeline_function_trie_(nullptr) {}
 
 void ProcessedSample::FixupCaller(const CodeLookupTable& clt,
                                   uword pc_marker,
diff --git a/runtime/vm/profiler.h b/runtime/vm/profiler.h
index 68518e3..2f68dbf 100644
--- a/runtime/vm/profiler.h
+++ b/runtime/vm/profiler.h
@@ -726,17 +726,20 @@
     first_frame_executing_ = first_frame_executing;
   }
 
-  ProfileTrieNode* timeline_trie() const { return timeline_trie_; }
-  void set_timeline_trie(ProfileTrieNode* trie) {
-    ASSERT(timeline_trie_ == NULL);
-    timeline_trie_ = trie;
-  }
-
   ProfileTrieNode* timeline_code_trie() const { return timeline_code_trie_; }
   void set_timeline_code_trie(ProfileTrieNode* trie) {
+    ASSERT(timeline_code_trie_ == NULL);
     timeline_code_trie_ = trie;
   }
 
+  ProfileTrieNode* timeline_function_trie() const {
+    return timeline_function_trie_;
+  }
+  void set_timeline_function_trie(ProfileTrieNode* trie) {
+    ASSERT(timeline_function_trie_ == NULL);
+    timeline_function_trie_ = trie;
+  }
+
  private:
   void FixupCaller(const CodeLookupTable& clt,
                    uword pc_marker,
@@ -757,8 +760,8 @@
   bool first_frame_executing_;
   uword native_allocation_address_;
   uintptr_t native_allocation_size_bytes_;
-  ProfileTrieNode* timeline_trie_;
   ProfileTrieNode* timeline_code_trie_;
+  ProfileTrieNode* timeline_function_trie_;
 
   friend class SampleBuffer;
   DISALLOW_COPY_AND_ASSIGN(ProcessedSample);
diff --git a/runtime/vm/profiler_service.cc b/runtime/vm/profiler_service.cc
index 0b9c746..a92e31e 100644
--- a/runtime/vm/profiler_service.cc
+++ b/runtime/vm/profiler_service.cc
@@ -1501,8 +1501,6 @@
       if (sample->truncated()) {
         current = AppendTruncatedTag(current, sample);
       }
-
-      sample->set_timeline_code_trie(current);
     }
   }
 
@@ -1553,7 +1551,7 @@
         current = AppendExitFrame(sample->vm_tag(), current, sample);
       }
 
-      sample->set_timeline_trie(current);
+      sample->set_timeline_function_trie(current);
     }
   }
 
@@ -2410,7 +2408,8 @@
 void Profile::PrintTimelineFrameJSON(JSONObject* frames,
                                      ProfileTrieNode* current,
                                      ProfileTrieNode* parent,
-                                     intptr_t* next_id) {
+                                     intptr_t* next_id,
+                                     bool code_trie) {
   ASSERT(current->frame_id() == -1);
   const intptr_t id = *next_id;
   *next_id = id + 1;
@@ -2425,8 +2424,13 @@
         zone_->PrintToString("%" Pd "-%" Pd, isolate_id, current->frame_id());
     JSONObject frame(frames, key);
     frame.AddProperty("category", "Dart");
-    ProfileFunction* func = GetFunction(current->table_index());
-    frame.AddProperty("name", func->Name());
+    if (code_trie) {
+      ProfileCode* code = GetCode(current->table_index());
+      frame.AddProperty("name", code->name());
+    } else {
+      ProfileFunction* func = GetFunction(current->table_index());
+      frame.AddProperty("name", func->Name());
+    }
     if ((parent != NULL) && (parent->frame_id() != kRootFrameId)) {
       ASSERT(parent->frame_id() != -1);
       frame.AddPropertyF("parent", "%" Pd "-%" Pd, isolate_id,
@@ -2436,20 +2440,25 @@
 
   for (intptr_t i = 0; i < current->NumChildren(); i++) {
     ProfileTrieNode* child = current->At(i);
-    PrintTimelineFrameJSON(frames, child, current, next_id);
+    PrintTimelineFrameJSON(frames, child, current, next_id, code_trie);
   }
 }
 
-void Profile::PrintTimelineJSON(JSONStream* stream) {
+void Profile::PrintTimelineJSON(JSONStream* stream, bool code_trie) {
   ScopeTimer sw("Profile::PrintTimelineJSON", FLAG_trace_profiler);
   JSONObject obj(stream);
   obj.AddProperty("type", "_CpuProfileTimeline");
   PrintHeaderJSON(&obj);
   {
     JSONObject frames(&obj, "stackFrames");
-    ProfileTrieNode* root = GetTrieRoot(kInclusiveFunction);
+    ProfileTrieNode* root;
+    if (code_trie) {
+      root = GetTrieRoot(kInclusiveCode);
+    } else {
+      root = GetTrieRoot(kInclusiveFunction);
+    }
     intptr_t next_id = kRootFrameId;
-    PrintTimelineFrameJSON(&frames, root, NULL, &next_id);
+    PrintTimelineFrameJSON(&frames, root, NULL, &next_id, code_trie);
   }
   {
     JSONArray events(&obj, "traceEvents");
@@ -2471,7 +2480,12 @@
         args.AddProperty("mode", "basic");
       }
 
-      ProfileTrieNode* trie = sample->timeline_trie();
+      ProfileTrieNode* trie;
+      if (code_trie) {
+        trie = sample->timeline_code_trie();
+      } else {
+        trie = sample->timeline_function_trie();
+      }
       ASSERT(trie->frame_id() != -1);
       event.AddPropertyF("sf", "%" Pd "-%" Pd, isolate_id, trie->frame_id());
     }
@@ -2479,16 +2493,22 @@
 }
 
 void Profile::AddParentTriePointers(ProfileTrieNode* current,
-                                    ProfileTrieNode* parent) {
+                                    ProfileTrieNode* parent,
+                                    bool code_trie) {
   if (current == NULL) {
-    ProfileTrieNode* root = GetTrieRoot(kInclusiveCode);
-    AddParentTriePointers(root, NULL);
+    ProfileTrieNode* root;
+    if (code_trie) {
+      root = GetTrieRoot(kInclusiveCode);
+    } else {
+      root = GetTrieRoot(kInclusiveFunction);
+    }
+    AddParentTriePointers(root, NULL, code_trie);
     return;
   }
 
   current->set_parent(parent);
   for (int i = 0; i < current->NumChildren(); i++) {
-    AddParentTriePointers(current->At(i), current);
+    AddParentTriePointers(current->At(i), current, code_trie);
   }
 }
 
@@ -2501,17 +2521,21 @@
   }
 }
 
-void Profile::AddToTimeline() {
+void Profile::AddToTimeline(bool code_trie) {
   TimelineStream* stream = Timeline::GetProfilerStream();
   if (stream == NULL) {
     return;
   }
-  AddParentTriePointers(NULL, NULL);
+  AddParentTriePointers(NULL, NULL, code_trie);
   for (intptr_t sample_index = 0; sample_index < samples_->length();
        sample_index++) {
     TextBuffer buf(256);
     ProcessedSample* sample = samples_->At(sample_index);
-    PrintBacktrace(sample->timeline_code_trie(), &buf);
+    if (code_trie) {
+      PrintBacktrace(sample->timeline_code_trie(), &buf);
+    } else {
+      PrintBacktrace(sample->timeline_function_trie(), &buf);
+    }
     TimelineEvent* event = stream->StartEvent();
     event->Instant("Dart CPU sample", sample->timestamp());
     event->set_owns_label(false);
@@ -2745,7 +2769,8 @@
                                     intptr_t extra_tags,
                                     SampleFilter* filter,
                                     SampleBuffer* sample_buffer,
-                                    PrintKind kind) {
+                                    PrintKind kind,
+                                    bool code_trie) {
   Isolate* isolate = thread->isolate();
   // Disable thread interrupts while processing the buffer.
   DisableThreadInterruptsScope dtis(thread);
@@ -2761,11 +2786,11 @@
     Profile profile(isolate);
     profile.Build(thread, filter, sample_buffer, tag_order, extra_tags);
     if (kind == kAsTimeline) {
-      profile.PrintTimelineJSON(stream);
+      profile.PrintTimelineJSON(stream, code_trie);
     } else if (kind == kAsProfile) {
       profile.PrintProfileJSON(stream);
     } else if (kind == kAsPlatformTimeline) {
-      profile.AddToTimeline();
+      profile.AddToTimeline(code_trie);
     }
   }
 }
@@ -2793,8 +2818,9 @@
   Isolate* isolate = thread->isolate();
   NoAllocationSampleFilter filter(isolate->main_port(), Thread::kMutatorTask,
                                   time_origin_micros, time_extent_micros);
+  bool code_trie = false;  // Doesn't matter for kAsProfile.
   PrintJSONImpl(thread, stream, tag_order, extra_tags, &filter,
-                Profiler::sample_buffer(), kAsProfile);
+                Profiler::sample_buffer(), kAsProfile, code_trie);
 }
 
 class ClassAllocationSampleFilter : public SampleFilter {
@@ -2831,8 +2857,9 @@
   ClassAllocationSampleFilter filter(isolate->main_port(), cls,
                                      Thread::kMutatorTask, time_origin_micros,
                                      time_extent_micros);
+  bool code_trie = false;  // Doesn't matter for kAsProfile.
   PrintJSONImpl(thread, stream, tag_order, kNoExtraTags, &filter,
-                Profiler::sample_buffer(), kAsProfile);
+                Profiler::sample_buffer(), kAsProfile, code_trie);
 }
 
 void ProfilerService::PrintNativeAllocationJSON(JSONStream* stream,
@@ -2841,14 +2868,16 @@
                                                 int64_t time_extent_micros) {
   Thread* thread = Thread::Current();
   NativeAllocationSampleFilter filter(time_origin_micros, time_extent_micros);
+  bool code_trie = false;  // Doesn't matter for kAsProfile.
   PrintJSONImpl(thread, stream, tag_order, kNoExtraTags, &filter,
-                Profiler::allocation_sample_buffer(), kAsProfile);
+                Profiler::allocation_sample_buffer(), kAsProfile, code_trie);
 }
 
 void ProfilerService::PrintTimelineJSON(JSONStream* stream,
                                         Profile::TagOrder tag_order,
                                         int64_t time_origin_micros,
-                                        int64_t time_extent_micros) {
+                                        int64_t time_extent_micros,
+                                        bool code_trie) {
   Thread* thread = Thread::Current();
   Isolate* isolate = thread->isolate();
   const intptr_t thread_task_mask = Thread::kMutatorTask |
@@ -2857,20 +2886,23 @@
   NoAllocationSampleFilter filter(isolate->main_port(), thread_task_mask,
                                   time_origin_micros, time_extent_micros);
   PrintJSONImpl(thread, stream, tag_order, kNoExtraTags, &filter,
-                Profiler::sample_buffer(), kAsTimeline);
+                Profiler::sample_buffer(), kAsTimeline, code_trie);
 }
 
-void ProfilerService::AddToTimeline() {
+void ProfilerService::AddToTimeline(Profile::TagOrder tag_order,
+                                    int64_t time_origin_micros,
+                                    int64_t time_extent_micros,
+                                    bool code_trie) {
   JSONStream stream;
   Thread* thread = Thread::Current();
   Isolate* isolate = thread->isolate();
   const intptr_t thread_task_mask = Thread::kMutatorTask |
                                     Thread::kCompilerTask |
                                     Thread::kSweeperTask | Thread::kMarkerTask;
-  NoAllocationSampleFilter filter(isolate->main_port(), thread_task_mask, -1,
-                                  -1);
+  NoAllocationSampleFilter filter(isolate->main_port(), thread_task_mask,
+                                  time_origin_micros, time_extent_micros);
   PrintJSONImpl(thread, &stream, Profile::kNoTags, kNoExtraTags, &filter,
-                Profiler::sample_buffer(), kAsPlatformTimeline);
+                Profiler::sample_buffer(), kAsPlatformTimeline, code_trie);
 }
 
 void ProfilerService::ClearSamples() {
diff --git a/runtime/vm/profiler_service.h b/runtime/vm/profiler_service.h
index 93fb9c8..55bc101 100644
--- a/runtime/vm/profiler_service.h
+++ b/runtime/vm/profiler_service.h
@@ -394,22 +394,25 @@
   ProfileTrieNode* GetTrieRoot(TrieKind trie_kind);
 
   void PrintProfileJSON(JSONStream* stream);
-  void PrintTimelineJSON(JSONStream* stream);
+  void PrintTimelineJSON(JSONStream* stream, bool code_trie);
 
   // Serializes sample backtraces into arguments on Instant events and adds them
   // directly to the timeline.
-  void AddToTimeline();
+  void AddToTimeline(bool code_trie);
 
   ProfileFunction* FindFunction(const Function& function);
 
  private:
-  void AddParentTriePointers(ProfileTrieNode* current, ProfileTrieNode* parent);
+  void AddParentTriePointers(ProfileTrieNode* current,
+                             ProfileTrieNode* parent,
+                             bool code_trie);
   void PrintBacktrace(ProfileTrieNode* node, TextBuffer* buf);
   void PrintHeaderJSON(JSONObject* obj);
   void PrintTimelineFrameJSON(JSONObject* frames,
                               ProfileTrieNode* current,
                               ProfileTrieNode* parent,
-                              intptr_t* next_id);
+                              intptr_t* next_id,
+                              bool code_trie);
 
   Isolate* isolate_;
   Zone* zone_;
@@ -497,9 +500,13 @@
   static void PrintTimelineJSON(JSONStream* stream,
                                 Profile::TagOrder tag_order,
                                 int64_t time_origin_micros,
-                                int64_t time_extent_micros);
+                                int64_t time_extent_micros,
+                                bool code_trie);
 
-  static void AddToTimeline();
+  static void AddToTimeline(Profile::TagOrder tag_order,
+                            int64_t time_origin_micros,
+                            int64_t time_extent_micros,
+                            bool code_trie);
 
   static void ClearSamples();
 
@@ -516,7 +523,8 @@
                             intptr_t extra_tags,
                             SampleFilter* filter,
                             SampleBuffer* sample_buffer,
-                            PrintKind kind);
+                            PrintKind kind,
+                            bool code_trie);
 };
 
 }  // namespace dart
diff --git a/runtime/vm/program_visitor.cc b/runtime/vm/program_visitor.cc
index 3026dba..dfc48dd 100644
--- a/runtime/vm/program_visitor.cc
+++ b/runtime/vm/program_visitor.cc
@@ -320,7 +320,7 @@
 
     void Visit(const Function& function) {
       bytecode_ = function.bytecode();
-      if (!bytecode_.IsNull()) {
+      if (!bytecode_.IsNull() && !bytecode_.InVMIsolateHeap()) {
         pc_descriptor_ = bytecode_.pc_descriptors();
         if (!pc_descriptor_.IsNull()) {
           pc_descriptor_ = DedupPcDescriptor(pc_descriptor_);
@@ -654,7 +654,7 @@
           if (!function.IsSignatureFunction() &&
               !function.IsClosureFunction() &&
               (function.name() != Symbols::Call().raw()) &&
-              !list_.IsReadOnly()) {
+              !list_.InVMIsolateHeap()) {
             // Parameter types not needed for function type tests.
             for (intptr_t i = 0; i < list_.Length(); i++) {
               list_.SetAt(i, Object::dynamic_type());
@@ -669,7 +669,8 @@
       if (!list_.IsNull()) {
         // Preserve parameter names in case of recompilation for the JIT.
         if (FLAG_precompiled_mode) {
-          if (!function.HasOptionalNamedParameters() && !list_.IsReadOnly()) {
+          if (!function.HasOptionalNamedParameters() &&
+              !list_.InVMIsolateHeap()) {
             // Parameter names not needed for resolution.
             for (intptr_t i = 0; i < list_.Length(); i++) {
               list_.SetAt(i, Symbols::OptimizedOut());
@@ -682,7 +683,7 @@
     }
 
     RawArray* DedupList(const Array& list) {
-      if (list.IsReadOnly()) {
+      if (list.InVMIsolateHeap()) {
         // Avoid using read-only VM objects for de-duplication.
         return list.raw();
       }
diff --git a/runtime/vm/raw_object.cc b/runtime/vm/raw_object.cc
index 1e933eb..78a9445 100644
--- a/runtime/vm/raw_object.cc
+++ b/runtime/vm/raw_object.cc
@@ -15,6 +15,10 @@
 
 namespace dart {
 
+bool RawObject::InVMIsolateHeap() const {
+  return Dart::vm_isolate()->heap()->Contains(ToAddr(this));
+}
+
 void RawObject::Validate(Isolate* isolate) const {
   if (Object::void_class_ == reinterpret_cast<RawClass*>(kHeapObjectTag)) {
     // Validation relies on properly initialized class classes. Skip if the
@@ -354,6 +358,22 @@
     return Type::InstanceSize();                                               \
   }
 
+// It calls the from() and to() methods on the raw object to get the first and
+// last cells that need visiting.
+//
+// Though as opposed to Similar to [REGULAR_VISITOR] this visitor will call the
+// specializd VisitTypedDataViewPointers
+#define TYPED_DATA_VIEW_VISITOR(Type)                                          \
+  intptr_t Raw##Type::Visit##Type##Pointers(Raw##Type* raw_obj,                \
+                                            ObjectPointerVisitor* visitor) {   \
+    /* Make sure that we got here with the tagged pointer as this. */          \
+    ASSERT(raw_obj->IsHeapObject());                                           \
+    ASSERT_UNCOMPRESSED(Type);                                                 \
+    visitor->VisitTypedDataViewPointers(raw_obj, raw_obj->from(),              \
+                                        raw_obj->to());                        \
+    return Type::InstanceSize();                                               \
+  }
+
 // For variable length objects. get_length is a code snippet that gets the
 // length of the object, which is passed to InstanceSize and the to() method.
 #define VARIABLE_VISITOR(Type, get_length)                                     \
@@ -430,7 +450,7 @@
 COMPRESSED_VISITOR(GrowableObjectArray)
 COMPRESSED_VISITOR(LinkedHashMap)
 COMPRESSED_VISITOR(ExternalTypedData)
-REGULAR_VISITOR(TypedDataView)
+TYPED_DATA_VIEW_VISITOR(TypedDataView)
 REGULAR_VISITOR(ReceivePort)
 REGULAR_VISITOR(StackTrace)
 REGULAR_VISITOR(RegExp)
@@ -467,6 +487,7 @@
 VARIABLE_NULL_VISITOR(TwoByteString, Smi::Value(raw_obj->ptr()->length_))
 // Abstract types don't have their visitor called.
 UNREACHABLE_VISITOR(AbstractType)
+UNREACHABLE_VISITOR(TypedDataBase)
 UNREACHABLE_VISITOR(Error)
 UNREACHABLE_VISITOR(Number)
 UNREACHABLE_VISITOR(Integer)
diff --git a/runtime/vm/raw_object.h b/runtime/vm/raw_object.h
index 79372ea..a6989f9 100644
--- a/runtime/vm/raw_object.h
+++ b/runtime/vm/raw_object.h
@@ -121,10 +121,10 @@
     kOldBit = 3,                  // Incremental barrier source.
     kOldAndNotRememberedBit = 4,  // Generational barrier source.
     kCanonicalBit = 5,
-    kReadOnlyBit = 6,
-    kGraphMarkedBit = 7,  // ObjectGraph needs to mark through new space.
+    kReservedTagPos = 6,
+    kReservedTagSize = 2,
 
-    kSizeTagPos = 8,
+    kSizeTagPos = kReservedTagPos + kReservedTagSize,  // = 8
     kSizeTagSize = 8,
     kClassIdTagPos = kSizeTagPos + kSizeTagSize,  // = 16
     kClassIdTagSize = 16,
@@ -192,15 +192,15 @@
 
   class CanonicalBit : public BitField<uint32_t, bool, kCanonicalBit, 1> {};
 
-  class GraphMarkedBit : public BitField<uint32_t, bool, kGraphMarkedBit, 1> {};
-
-  class ReadOnlyBit : public BitField<uint32_t, bool, kReadOnlyBit, 1> {};
-
   class OldBit : public BitField<uint32_t, bool, kOldBit, 1> {};
 
   class OldAndNotRememberedBit
       : public BitField<uint32_t, bool, kOldAndNotRememberedBit, 1> {};
 
+  class ReservedBits
+      : public BitField<uint32_t, intptr_t, kReservedTagPos, kReservedTagSize> {
+  };
+
   bool IsWellFormed() const {
     uword value = reinterpret_cast<uword>(this);
     return (value & kSmiTagMask) == 0 ||
@@ -283,30 +283,7 @@
   void SetCanonical() { UpdateTagBit<CanonicalBit>(true); }
   void ClearCanonical() { UpdateTagBit<CanonicalBit>(false); }
 
-  // Objects in the VM-isolate's heap or on an image page from an AppJIT or
-  // AppAOT snapshot are permanently read-only. They may never be modified
-  // again. In particular, they cannot be marked.
-  bool IsReadOnly() const { return ReadOnlyBit::decode(ptr()->tags_); }
-  void SetReadOnlyUnsynchronized() {
-    ptr()->tags_ = ReadOnlyBit::update(true, ptr()->tags_);
-  }
-
-  // Support for ObjectGraph marking bit, used by various tools provided by the
-  // VM-service.
-  bool IsGraphMarked() const {
-    if (IsReadOnly()) return true;
-    return GraphMarkedBit::decode(ptr()->tags_);
-  }
-  void SetGraphMarked() {
-    ASSERT(!IsReadOnly());
-    uint32_t tags = ptr()->tags_;
-    ptr()->tags_ = GraphMarkedBit::update(true, tags);
-  }
-  void ClearGraphMarked() {
-    ASSERT(!IsReadOnly());
-    uint32_t tags = ptr()->tags_;
-    ptr()->tags_ = GraphMarkedBit::update(false, tags);
-  }
+  bool InVMIsolateHeap() const;
 
   // Support for GC remembered bit.
   bool IsRemembered() const {
@@ -470,8 +447,6 @@
     return reinterpret_cast<uword>(raw_obj->ptr());
   }
 
-  static bool IsReadOnly(intptr_t value) { return ReadOnlyBit::decode(value); }
-
   static bool IsCanonical(intptr_t value) {
     return CanonicalBit::decode(value);
   }
@@ -727,9 +702,10 @@
   friend class Deserializer;
   friend class SnapshotWriter;
   friend class String;
-  friend class Type;  // GetClassId
-  friend class TypedData;
-  friend class TypedDataView;
+  friend class Type;                    // GetClassId
+  friend class TypedDataBase;           // GetClassId
+  friend class TypedData;               // GetClassId
+  friend class TypedDataView;           // GetClassId
   friend class WeakProperty;            // StorePointer
   friend class Instance;                // StorePointer
   friend class StackFrame;              // GetCodeObject assertion.
@@ -975,7 +951,6 @@
                 "RawFunction::packed_fields_ bitfields don't align.");
 
 #define JIT_FUNCTION_COUNTERS(F)                                               \
-  F(intptr_t, intptr_t, kernel_offset)                                         \
   F(intptr_t, int32_t, usage_counter)                                          \
   F(intptr_t, uint16_t, optimized_instruction_count)                           \
   F(intptr_t, uint16_t, optimized_call_site_count)                             \
@@ -984,12 +959,15 @@
   F(int, int8_t, inlining_depth)
 
 #if !defined(DART_PRECOMPILED_RUNTIME)
+  typedef BitField<uint32_t, bool, 0, 1> IsDeclaredInBytecode;
+  typedef BitField<uint32_t, uint32_t, 1, 31> BinaryDeclarationOffset;
+  uint32_t binary_declaration_;
+
 #define DECLARE(return_type, type, name) type name##_;
-
   JIT_FUNCTION_COUNTERS(DECLARE)
-
 #undef DECLARE
-#endif
+
+#endif  // !defined(DART_PRECOMPILED_RUNTIME)
 };
 
 class RawClosureData : public RawObject {
@@ -1089,7 +1067,13 @@
   classid_t guarded_cid_;
   classid_t is_nullable_;  // kNullCid if field can contain null value and
                            // any other value otherwise.
-  NOT_IN_PRECOMPILED(intptr_t kernel_offset_);
+
+#if !defined(DART_PRECOMPILED_RUNTIME)
+  typedef BitField<uint32_t, bool, 0, 1> IsDeclaredInBytecode;
+  typedef BitField<uint32_t, uint32_t, 1, 31> BinaryDeclarationOffset;
+  uint32_t binary_declaration_;
+#endif  // !defined(DART_PRECOMPILED_RUNTIME)
+
   // Offset to the guarded length field inside an instance of class matching
   // guarded_cid_. Stored corrected by -kHeapObjectTag to simplify code
   // generated on platforms with weak addressing modes (ARM).
@@ -2082,22 +2066,126 @@
   friend class String;
 };
 
-// All _*ArrayView/_ByteDataView classes share the same layout.
-class RawTypedDataView : public RawInstance {
-  RAW_HEAP_OBJECT_IMPLEMENTATION(TypedDataView);
+// Abstract base class for RawTypedData/RawExternalTypedData/RawTypedDataView.
+class RawTypedDataBase : public RawInstance {
+ protected:
+  // The contents of [data_] depends on what concrete subclass is used:
+  //
+  //  - RawTypedData: Start of the payload.
+  //  - RawExternalTypedData: Start of the C-heap payload.
+  //  - RawTypedDataView: The [data_] field of the backing store for the view
+  //    plus the [offset_in_bytes_] the view has.
+  //
+  // During allocation or snapshot reading the [data_] can be temporarily
+  // nullptr (which is the case for views which just got created but haven't
+  // gotten the backing store set).
+  uint8_t* data_;
+
+  // The length of the view in element sizes (obtainable via
+  // [TypedDataBase::ElementSizeInBytes]).
+  RawSmi* length_;
+
+ private:
+  friend class RawTypedDataView;
+  RAW_HEAP_OBJECT_IMPLEMENTATION(TypedDataBase);
+};
+
+class RawTypedData : public RawTypedDataBase {
+  RAW_HEAP_OBJECT_IMPLEMENTATION(TypedData);
+
+ public:
+  static intptr_t payload_offset() {
+    return OFFSET_OF_RETURNED_VALUE(RawTypedData, internal_data);
+  }
+
+  // Recompute [data_] pointer to internal data.
+  void RecomputeDataField() { ptr()->data_ = ptr()->internal_data(); }
 
  protected:
-  VISIT_FROM(RawObject*, typed_data_)
-  RawInstance* typed_data_;
+  VISIT_FROM(RawCompressed, length_)
+  VISIT_TO_LENGTH(RawCompressed, &ptr()->length_)
+
+  // Variable length data follows here.
+
+  uint8_t* internal_data() { OPEN_ARRAY_START(uint8_t, uint8_t); }
+  const uint8_t* internal_data() const { OPEN_ARRAY_START(uint8_t, uint8_t); }
+
+  uint8_t* data() {
+    ASSERT(data_ == internal_data());
+    return data_;
+  }
+  const uint8_t* data() const {
+    ASSERT(data_ == internal_data());
+    return data_;
+  }
+
+  friend class Api;
+  friend class Instance;
+  friend class NativeEntryData;
+  friend class Object;
+  friend class ObjectPool;
+  friend class ObjectPoolDeserializationCluster;
+  friend class ObjectPoolSerializationCluster;
+  friend class RawObjectPool;
+  friend class SnapshotReader;
+};
+
+// All _*ArrayView/_ByteDataView classes share the same layout.
+class RawTypedDataView : public RawTypedDataBase {
+  RAW_HEAP_OBJECT_IMPLEMENTATION(TypedDataView);
+
+ public:
+  // Recompute [data_] based on internal/external [typed_data_].
+  void RecomputeDataField() {
+    const intptr_t offset_in_bytes = ValueFromRawSmi(ptr()->offset_in_bytes_);
+    uint8_t* payload = ptr()->typed_data_->ptr()->data_;
+    ptr()->data_ = payload + offset_in_bytes;
+  }
+
+  // Recopute [data_] based on internal [typed_data_] - needs to be called by GC
+  // whenever the backing store moved.
+  //
+  // NOTICE: This method assumes [this] is the forwarded object and the
+  // [typed_data_] pointer points to the new backing store. The backing store's
+  // fields don't need to be valid - only it's address.
+  void RecomputeDataFieldForInternalTypedData() {
+    const intptr_t offset_in_bytes = ValueFromRawSmi(ptr()->offset_in_bytes_);
+    uint8_t* payload = reinterpret_cast<uint8_t*>(
+        RawObject::ToAddr(ptr()->typed_data_) + RawTypedData::payload_offset());
+    ptr()->data_ = payload + offset_in_bytes;
+  }
+
+  void ValidateInnerPointer() {
+    if (ptr()->typed_data_->GetClassId() == kNullCid) {
+      // The view object must have gotten just initialized.
+      if (ptr()->data_ != nullptr ||
+          ValueFromRawSmi(ptr()->offset_in_bytes_) != 0 ||
+          ValueFromRawSmi(ptr()->length_) != 0) {
+        FATAL("RawTypedDataView has invalid inner pointer.");
+      }
+    } else {
+      const intptr_t offset_in_bytes = ValueFromRawSmi(ptr()->offset_in_bytes_);
+      uint8_t* payload = ptr()->typed_data_->ptr()->data_;
+      if ((payload + offset_in_bytes) != ptr()->data_) {
+        FATAL("RawTypedDataView has invalid inner pointer.");
+      }
+    }
+  }
+
+ protected:
+  VISIT_FROM(RawObject*, length_)
+  RawTypedDataBase* typed_data_;
   RawSmi* offset_in_bytes_;
-  RawSmi* length_;
-  VISIT_TO(RawObject*, length_)
+  VISIT_TO(RawObject*, offset_in_bytes_)
+  RawObject** to_snapshot(Snapshot::Kind kind) { return to(); }
 
   friend class Api;
   friend class Object;
   friend class ObjectPoolDeserializationCluster;
   friend class ObjectPoolSerializationCluster;
   friend class RawObjectPool;
+  friend class GCCompactor;
+  friend class ScavengerVisitor;
   friend class SnapshotReader;
 };
 
@@ -2245,56 +2333,13 @@
 #error Architecture is not 32-bit or 64-bit.
 #endif  // ARCH_IS_32_BIT
 
-class RawTypedData : public RawInstance {
-  RAW_HEAP_OBJECT_IMPLEMENTATION(TypedData);
-
- public:
-  // Reset data_ pointer to internal data.
-  void ResetData() { ptr()->data_ = ptr()->internal_data(); }
-
- protected:
-  VISIT_FROM(RawCompressed, length_)
-  RawSmi* length_;
-  VISIT_TO_LENGTH(RawCompressed, &ptr()->length_)
-
-  uint8_t* data_;
-  // Variable length data follows here.
-
-  uint8_t* internal_data() { OPEN_ARRAY_START(uint8_t, uint8_t); }
-  const uint8_t* internal_data() const { OPEN_ARRAY_START(uint8_t, uint8_t); }
-
-  uint8_t* data() {
-    // TODO(alexmarkov): revise after merging with ExternalTypedData
-    ASSERT(data_ == internal_data());
-    return data_;
-  }
-  const uint8_t* data() const {
-    // TODO(alexmarkov): revise after merging with ExternalTypedData
-    ASSERT(data_ == internal_data());
-    return data_;
-  }
-
-  friend class Api;
-  friend class Instance;
-  friend class NativeEntryData;
-  friend class Object;
-  friend class ObjectPool;
-  friend class ObjectPoolDeserializationCluster;
-  friend class ObjectPoolSerializationCluster;
-  friend class RawObjectPool;
-  friend class SnapshotReader;
-};
-
-class RawExternalTypedData : public RawInstance {
+class RawExternalTypedData : public RawTypedDataBase {
   RAW_HEAP_OBJECT_IMPLEMENTATION(ExternalTypedData);
 
  protected:
   VISIT_FROM(RawCompressed, length_)
-  RawSmi* length_;
   VISIT_TO(RawCompressed, length_)
 
-  uint8_t* data_;
-
   friend class RawBytecode;
 };
 
@@ -2365,6 +2410,7 @@
 
   VISIT_FROM(RawObject*, num_bracket_expressions_)
   RawSmi* num_bracket_expressions_;
+  RawArray* capture_name_map_;
   RawString* pattern_;  // Pattern to be used for matching.
   union {
     RawFunction* function_;
@@ -2517,73 +2563,35 @@
 
 inline bool RawObject::IsTypedDataClassId(intptr_t index) {
   // Make sure this is updated when new TypedData types are added.
-  COMPILE_ASSERT(kTypedDataUint8ArrayCid == kTypedDataInt8ArrayCid + 1 &&
-                 kTypedDataUint8ClampedArrayCid == kTypedDataInt8ArrayCid + 2 &&
-                 kTypedDataInt16ArrayCid == kTypedDataInt8ArrayCid + 3 &&
-                 kTypedDataUint16ArrayCid == kTypedDataInt8ArrayCid + 4 &&
-                 kTypedDataInt32ArrayCid == kTypedDataInt8ArrayCid + 5 &&
-                 kTypedDataUint32ArrayCid == kTypedDataInt8ArrayCid + 6 &&
-                 kTypedDataInt64ArrayCid == kTypedDataInt8ArrayCid + 7 &&
-                 kTypedDataUint64ArrayCid == kTypedDataInt8ArrayCid + 8 &&
-                 kTypedDataFloat32ArrayCid == kTypedDataInt8ArrayCid + 9 &&
-                 kTypedDataFloat64ArrayCid == kTypedDataInt8ArrayCid + 10 &&
-                 kTypedDataFloat32x4ArrayCid == kTypedDataInt8ArrayCid + 11 &&
-                 kTypedDataInt32x4ArrayCid == kTypedDataInt8ArrayCid + 12 &&
-                 kTypedDataFloat64x2ArrayCid == kTypedDataInt8ArrayCid + 13 &&
-                 kTypedDataInt8ArrayViewCid == kTypedDataInt8ArrayCid + 14);
-  return (index >= kTypedDataInt8ArrayCid &&
-          index <= kTypedDataFloat64x2ArrayCid);
+  COMPILE_ASSERT(kTypedDataInt8ArrayCid + 3 == kTypedDataUint8ArrayCid);
+
+  const bool is_typed_data_base =
+      index >= kTypedDataInt8ArrayCid && index < kByteDataViewCid;
+  return is_typed_data_base && ((index - kTypedDataInt8ArrayCid) % 3) ==
+                                   kTypedDataCidRemainderInternal;
 }
 
 inline bool RawObject::IsTypedDataViewClassId(intptr_t index) {
   // Make sure this is updated when new TypedData types are added.
-  COMPILE_ASSERT(
-      kTypedDataUint8ArrayViewCid == kTypedDataInt8ArrayViewCid + 1 &&
-      kTypedDataUint8ClampedArrayViewCid == kTypedDataInt8ArrayViewCid + 2 &&
-      kTypedDataInt16ArrayViewCid == kTypedDataInt8ArrayViewCid + 3 &&
-      kTypedDataUint16ArrayViewCid == kTypedDataInt8ArrayViewCid + 4 &&
-      kTypedDataInt32ArrayViewCid == kTypedDataInt8ArrayViewCid + 5 &&
-      kTypedDataUint32ArrayViewCid == kTypedDataInt8ArrayViewCid + 6 &&
-      kTypedDataInt64ArrayViewCid == kTypedDataInt8ArrayViewCid + 7 &&
-      kTypedDataUint64ArrayViewCid == kTypedDataInt8ArrayViewCid + 8 &&
-      kTypedDataFloat32ArrayViewCid == kTypedDataInt8ArrayViewCid + 9 &&
-      kTypedDataFloat64ArrayViewCid == kTypedDataInt8ArrayViewCid + 10 &&
-      kTypedDataFloat32x4ArrayViewCid == kTypedDataInt8ArrayViewCid + 11 &&
-      kTypedDataInt32x4ArrayViewCid == kTypedDataInt8ArrayViewCid + 12 &&
-      kTypedDataFloat64x2ArrayViewCid == kTypedDataInt8ArrayViewCid + 13 &&
-      kByteDataViewCid == kTypedDataInt8ArrayViewCid + 14 &&
-      kExternalTypedDataInt8ArrayCid == kTypedDataInt8ArrayViewCid + 15);
-  return (index >= kTypedDataInt8ArrayViewCid && index <= kByteDataViewCid);
+  COMPILE_ASSERT(kTypedDataInt8ArrayViewCid + 3 == kTypedDataUint8ArrayViewCid);
+
+  const bool is_typed_data_base =
+      index >= kTypedDataInt8ArrayCid && index < kByteDataViewCid;
+  const bool is_byte_data_view = index == kByteDataViewCid;
+  return is_byte_data_view ||
+         (is_typed_data_base &&
+          ((index - kTypedDataInt8ArrayCid) % 3) == kTypedDataCidRemainderView);
 }
 
 inline bool RawObject::IsExternalTypedDataClassId(intptr_t index) {
-  // Make sure this is updated when new ExternalTypedData types are added.
-  COMPILE_ASSERT(
-      (kExternalTypedDataUint8ArrayCid == kExternalTypedDataInt8ArrayCid + 1) &&
-      (kExternalTypedDataUint8ClampedArrayCid ==
-       kExternalTypedDataInt8ArrayCid + 2) &&
-      (kExternalTypedDataInt16ArrayCid == kExternalTypedDataInt8ArrayCid + 3) &&
-      (kExternalTypedDataUint16ArrayCid ==
-       kExternalTypedDataInt8ArrayCid + 4) &&
-      (kExternalTypedDataInt32ArrayCid == kExternalTypedDataInt8ArrayCid + 5) &&
-      (kExternalTypedDataUint32ArrayCid ==
-       kExternalTypedDataInt8ArrayCid + 6) &&
-      (kExternalTypedDataInt64ArrayCid == kExternalTypedDataInt8ArrayCid + 7) &&
-      (kExternalTypedDataUint64ArrayCid ==
-       kExternalTypedDataInt8ArrayCid + 8) &&
-      (kExternalTypedDataFloat32ArrayCid ==
-       kExternalTypedDataInt8ArrayCid + 9) &&
-      (kExternalTypedDataFloat64ArrayCid ==
-       kExternalTypedDataInt8ArrayCid + 10) &&
-      (kExternalTypedDataFloat32x4ArrayCid ==
-       kExternalTypedDataInt8ArrayCid + 11) &&
-      (kExternalTypedDataInt32x4ArrayCid ==
-       kExternalTypedDataInt8ArrayCid + 12) &&
-      (kExternalTypedDataFloat64x2ArrayCid ==
-       kExternalTypedDataInt8ArrayCid + 13) &&
-      (kByteBufferCid == kExternalTypedDataInt8ArrayCid + 14));
-  return (index >= kExternalTypedDataInt8ArrayCid &&
-          index <= kExternalTypedDataFloat64x2ArrayCid);
+  // Make sure this is updated when new TypedData types are added.
+  COMPILE_ASSERT(kExternalTypedDataInt8ArrayCid + 3 ==
+                 kExternalTypedDataUint8ArrayCid);
+
+  const bool is_typed_data_base =
+      index >= kTypedDataInt8ArrayCid && index < kByteDataViewCid;
+  return is_typed_data_base && ((index - kTypedDataInt8ArrayCid) % 3) ==
+                                   kTypedDataCidRemainderExternal;
 }
 
 inline bool RawObject::IsFfiNativeTypeTypeClassId(intptr_t index) {
@@ -2664,11 +2672,31 @@
 
 inline intptr_t RawObject::NumberOfTypedDataClasses() {
   // Make sure this is updated when new TypedData types are added.
-  COMPILE_ASSERT(kTypedDataInt8ArrayViewCid == kTypedDataInt8ArrayCid + 14);
-  COMPILE_ASSERT(kExternalTypedDataInt8ArrayCid ==
-                 kTypedDataInt8ArrayViewCid + 15);
-  COMPILE_ASSERT(kByteBufferCid == kExternalTypedDataInt8ArrayCid + 14);
-  COMPILE_ASSERT(kNullCid == kByteBufferCid + 1);
+
+  // Ensure that each typed data type comes in internal/view/external variants
+  // next to each other.
+  COMPILE_ASSERT(kTypedDataInt8ArrayCid + 1 == kTypedDataInt8ArrayViewCid);
+  COMPILE_ASSERT(kTypedDataInt8ArrayCid + 2 == kExternalTypedDataInt8ArrayCid);
+
+  // Ensure the order of the typed data members in 3-step.
+  COMPILE_ASSERT(kTypedDataInt8ArrayCid + 1 * 3 == kTypedDataUint8ArrayCid);
+  COMPILE_ASSERT(kTypedDataInt8ArrayCid + 2 * 3 ==
+                 kTypedDataUint8ClampedArrayCid);
+  COMPILE_ASSERT(kTypedDataInt8ArrayCid + 3 * 3 == kTypedDataInt16ArrayCid);
+  COMPILE_ASSERT(kTypedDataInt8ArrayCid + 4 * 3 == kTypedDataUint16ArrayCid);
+  COMPILE_ASSERT(kTypedDataInt8ArrayCid + 5 * 3 == kTypedDataInt32ArrayCid);
+  COMPILE_ASSERT(kTypedDataInt8ArrayCid + 6 * 3 == kTypedDataUint32ArrayCid);
+  COMPILE_ASSERT(kTypedDataInt8ArrayCid + 7 * 3 == kTypedDataInt64ArrayCid);
+  COMPILE_ASSERT(kTypedDataInt8ArrayCid + 8 * 3 == kTypedDataUint64ArrayCid);
+  COMPILE_ASSERT(kTypedDataInt8ArrayCid + 9 * 3 == kTypedDataFloat32ArrayCid);
+  COMPILE_ASSERT(kTypedDataInt8ArrayCid + 10 * 3 == kTypedDataFloat64ArrayCid);
+  COMPILE_ASSERT(kTypedDataInt8ArrayCid + 11 * 3 ==
+                 kTypedDataFloat32x4ArrayCid);
+  COMPILE_ASSERT(kTypedDataInt8ArrayCid + 12 * 3 == kTypedDataInt32x4ArrayCid);
+  COMPILE_ASSERT(kTypedDataInt8ArrayCid + 13 * 3 ==
+                 kTypedDataFloat64x2ArrayCid);
+  COMPILE_ASSERT(kTypedDataInt8ArrayCid + 14 * 3 == kByteDataViewCid);
+  COMPILE_ASSERT(kByteBufferCid + 1 == kNullCid);
   return (kNullCid - kTypedDataInt8ArrayCid);
 }
 
diff --git a/runtime/vm/raw_object_fields.cc b/runtime/vm/raw_object_fields.cc
index f1dc7cc..6bb1ac1 100644
--- a/runtime/vm/raw_object_fields.cc
+++ b/runtime/vm/raw_object_fields.cc
@@ -178,6 +178,7 @@
   F(StackTrace, code_array_)                                                   \
   F(StackTrace, pc_offset_array_)                                              \
   F(RegExp, num_bracket_expressions_)                                          \
+  F(RegExp, capture_name_map_)                                                 \
   F(RegExp, pattern_)                                                          \
   F(RegExp, external_one_byte_function_)                                       \
   F(RegExp, external_two_byte_function_)                                       \
diff --git a/runtime/vm/raw_object_snapshot.cc b/runtime/vm/raw_object_snapshot.cc
index 58ec79e..20e3983 100644
--- a/runtime/vm/raw_object_snapshot.cc
+++ b/runtime/vm/raw_object_snapshot.cc
@@ -1721,6 +1721,22 @@
   writer->Write<double>(ptr()->value_[1]);
 }
 
+RawTypedDataBase* TypedDataBase::ReadFrom(SnapshotReader* reader,
+                                          intptr_t object_id,
+                                          intptr_t tags,
+                                          Snapshot::Kind kind,
+                                          bool as_reference) {
+  UNREACHABLE();  // TypedDataBase is an abstract class.
+  return NULL;
+}
+
+void RawTypedDataBase::WriteTo(SnapshotWriter* writer,
+                               intptr_t object_id,
+                               Snapshot::Kind kind,
+                               bool as_reference) {
+  UNREACHABLE();  // TypedDataBase is an abstract class.
+}
+
 RawTypedData* TypedData::ReadFrom(SnapshotReader* reader,
                                   intptr_t object_id,
                                   intptr_t tags,
@@ -1968,6 +1984,9 @@
                                intptr_t object_id,
                                Snapshot::Kind kind,
                                bool as_reference) {
+  // Views have always a backing store.
+  ASSERT(ptr()->typed_data_ != Object::null());
+
   // Write out the serialization header value for this object.
   writer->WriteInlinedObjectHeader(object_id);
 
@@ -1986,7 +2005,7 @@
                                           intptr_t tags,
                                           Snapshot::Kind kind,
                                           bool as_reference) {
-  auto& typed_data = *reader->InstanceHandle();
+  auto& typed_data = *reader->TypedDataBaseHandle();
   const classid_t cid = RawObject::ClassIdTag::decode(tags);
 
   auto& view = *reader->TypedDataViewHandle();
@@ -1996,9 +2015,7 @@
   const intptr_t offset_in_bytes = reader->ReadSmiValue();
   const intptr_t length = reader->ReadSmiValue();
   typed_data ^= reader->ReadObjectImpl(as_reference);
-  view.set_offset_in_bytes(offset_in_bytes);
-  view.set_length(length);
-  view.set_typed_data(typed_data);
+  view.InitializeWith(typed_data, offset_in_bytes, length);
 
   return view.raw();
 }
@@ -2149,8 +2166,12 @@
   // Read and Set all the other fields.
   regex.StoreSmi(&regex.raw_ptr()->num_bracket_expressions_,
                  reader->ReadAsSmi());
+
+  *reader->ArrayHandle() ^= reader->ReadObjectImpl(kAsInlinedObject);
+  regex.set_capture_name_map(*reader->ArrayHandle());
   *reader->StringHandle() ^= reader->ReadObjectImpl(kAsInlinedObject);
   regex.set_pattern(*reader->StringHandle());
+
   regex.StoreNonPointer(&regex.raw_ptr()->num_registers_,
                         reader->Read<int32_t>());
   regex.StoreNonPointer(&regex.raw_ptr()->type_flags_, reader->Read<int8_t>());
diff --git a/runtime/vm/regexp.h b/runtime/vm/regexp.h
index 3a477e9..092a06a 100644
--- a/runtime/vm/regexp.h
+++ b/runtime/vm/regexp.h
@@ -1318,12 +1318,14 @@
         node(NULL),
         simple(true),
         contains_anchor(false),
+        capture_name_map(Array::Handle(Array::null())),
         error(String::Handle(String::null())),
         capture_count(0) {}
   RegExpTree* tree;
   RegExpNode* node;
   bool simple;
   bool contains_anchor;
+  Array& capture_name_map;
   String& error;
   intptr_t capture_count;
 };
diff --git a/runtime/vm/regexp_assembler_bytecode.cc b/runtime/vm/regexp_assembler_bytecode.cc
index fac8a82..8288e1b 100644
--- a/runtime/vm/regexp_assembler_bytecode.cc
+++ b/runtime/vm/regexp_assembler_bytecode.cc
@@ -441,6 +441,7 @@
     RegExpParser::ParseRegExp(pattern, multiline, compile_data);
 
     regexp.set_num_bracket_expressions(compile_data->capture_count);
+    regexp.set_capture_name_map(compile_data->capture_name_map);
     if (compile_data->simple) {
       regexp.set_is_simple();
     } else {
diff --git a/runtime/vm/regexp_assembler_ir.cc b/runtime/vm/regexp_assembler_ir.cc
index bc0a132..69b8a7a 100644
--- a/runtime/vm/regexp_assembler_ir.cc
+++ b/runtime/vm/regexp_assembler_ir.cc
@@ -392,8 +392,7 @@
   DEBUG_ASSERT(Thread::Current()->TopErrorHandlerIsSetJump());
   if (word_character_field.IsUninitialized()) {
     ASSERT(!Compiler::IsBackgroundCompilation());
-    const Error& error =
-        Error::Handle(Z, word_character_field.EvaluateInitializer());
+    const Error& error = Error::Handle(Z, word_character_field.Initialize());
     if (!error.IsNull()) {
       Report::LongJump(error);
     }
diff --git a/runtime/vm/regexp_ast.h b/runtime/vm/regexp_ast.h
index 55f2f8c..17a175e 100644
--- a/runtime/vm/regexp_ast.h
+++ b/runtime/vm/regexp_ast.h
@@ -277,7 +277,8 @@
 
 class RegExpCapture : public RegExpTree {
  public:
-  explicit RegExpCapture(intptr_t index) : body_(nullptr), index_(index) {}
+  explicit RegExpCapture(intptr_t index)
+      : body_(nullptr), index_(index), name_(nullptr) {}
   virtual void* Accept(RegExpVisitor* visitor, void* data);
   virtual RegExpNode* ToNode(RegExpCompiler* compiler, RegExpNode* on_success);
   static RegExpNode* ToNode(RegExpTree* body,
@@ -298,12 +299,15 @@
   // capture group is parsed.
   void set_body(RegExpTree* body) { body_ = body; }
   intptr_t index() const { return index_; }
+  const ZoneGrowableArray<uint16_t>* name() { return name_; }
+  void set_name(const ZoneGrowableArray<uint16_t>* name) { name_ = name; }
   static intptr_t StartRegister(intptr_t index) { return index * 2; }
   static intptr_t EndRegister(intptr_t index) { return index * 2 + 1; }
 
  private:
   RegExpTree* body_;
   intptr_t index_;
+  const ZoneGrowableArray<uint16_t>* name_;
 };
 
 class RegExpLookaround : public RegExpTree {
@@ -366,7 +370,9 @@
 
 class RegExpBackReference : public RegExpTree {
  public:
-  explicit RegExpBackReference(RegExpCapture* capture) : capture_(capture) {}
+  RegExpBackReference() : capture_(nullptr), name_(nullptr) {}
+  explicit RegExpBackReference(RegExpCapture* capture)
+      : capture_(capture), name_(nullptr) {}
   virtual void* Accept(RegExpVisitor* visitor, void* data);
   virtual RegExpNode* ToNode(RegExpCompiler* compiler, RegExpNode* on_success);
   virtual RegExpBackReference* AsBackReference();
@@ -378,9 +384,13 @@
   virtual intptr_t max_match() const { return kInfinity; }
   intptr_t index() const { return capture_->index(); }
   RegExpCapture* capture() const { return capture_; }
+  void set_capture(RegExpCapture* capture) { capture_ = capture; }
+  const ZoneGrowableArray<uint16_t>* name() { return name_; }
+  void set_name(const ZoneGrowableArray<uint16_t>* name) { name_ = name; }
 
  private:
   RegExpCapture* capture_;
+  const ZoneGrowableArray<uint16_t>* name_;
 };
 
 class RegExpEmpty : public RegExpTree {
diff --git a/runtime/vm/regexp_parser.cc b/runtime/vm/regexp_parser.cc
index e08071a..b70b945 100644
--- a/runtime/vm/regexp_parser.cc
+++ b/runtime/vm/regexp_parser.cc
@@ -196,7 +196,9 @@
 
 RegExpParser::RegExpParser(const String& in, String* error, bool multiline)
     : zone_(Thread::Current()->zone()),
-      captures_(NULL),
+      captures_(nullptr),
+      named_captures_(nullptr),
+      named_back_references_(nullptr),
       in_(in),
       current_(kEndMarker),
       next_pos_(0),
@@ -206,7 +208,8 @@
       multiline_(multiline),
       simple_(false),
       contains_anchor_(false),
-      is_scanned_for_captures_(false) {
+      is_scanned_for_captures_(false),
+      has_named_captures_(false) {
   Advance();
 }
 
@@ -261,6 +264,7 @@
 //   Disjunction
 RegExpTree* RegExpParser::ParsePattern() {
   RegExpTree* result = ParseDisjunction();
+  PatchNamedBackReferences();
   ASSERT(!has_more());
   // If the result of parsing is a literal string atom, and it has the
   // same length as the input, then the atom is identical to the input.
@@ -282,8 +286,8 @@
 //   Atom Quantifier
 RegExpTree* RegExpParser::ParseDisjunction() {
   // Used to store current state while parsing subexpressions.
-  RegExpParserState initial_state(NULL, INITIAL, RegExpLookaround::LOOKAHEAD, 0,
-                                  Z);
+  RegExpParserState initial_state(nullptr, INITIAL, RegExpLookaround::LOOKAHEAD,
+                                  0, nullptr, Z);
   RegExpParserState* stored_state = &initial_state;
   // Cache the builder in a local variable for quick access.
   RegExpBuilder* builder = initial_state.builder();
@@ -317,6 +321,10 @@
 
         // Build result of subexpression.
         if (group_type == CAPTURE) {
+          if (stored_state->IsNamedCapture()) {
+            CreateNamedCaptureAtIndex(stored_state->capture_name(),
+                                      capture_index);
+          }
           RegExpCapture* capture = GetCapture(capture_index);
           capture->set_body(body);
           body = capture;
@@ -525,6 +533,18 @@
             }
             break;
           }
+          case 'k':
+            // Either an identity escape or a named back-reference.  The two
+            // interpretations are mutually exclusive: '\k' is interpreted as
+            // an identity escape for non-Unicode patterns without named
+            // capture groups, and as the beginning of a named back-reference
+            // in all other cases.
+            if (HasNamedCaptures()) {
+              Advance(2);
+              ParseNamedBackReference(builder, stored_state);
+              break;
+            }
+            FALL_THROUGH;
           default:
             // Identity escape.
             builder->AddCharacter(Next());
@@ -618,6 +638,8 @@
 RegExpParser::RegExpParserState* RegExpParser::ParseOpenParenthesis(
     RegExpParserState* state) {
   RegExpLookaround::Type lookaround_type = state->lookaround_type();
+  bool is_named_capture = false;
+  const RegExpCaptureName* capture_name = nullptr;
   SubexpressionType subexpr_type = CAPTURE;
   Advance();
   if (current() == '?') {
@@ -642,11 +664,16 @@
           Advance(2);
           lookaround_type = RegExpLookaround::LOOKBEHIND;
           subexpr_type = POSITIVE_LOOKAROUND;
+          break;
         } else if (Next() == '!') {
           Advance(2);
           lookaround_type = RegExpLookaround::LOOKBEHIND;
           subexpr_type = NEGATIVE_LOOKAROUND;
+          break;
         }
+        is_named_capture = true;
+        has_named_captures_ = true;
+        Advance();
         break;
       default:
         ReportError("Invalid group");
@@ -660,10 +687,14 @@
       UNREACHABLE();
     }
     captures_started_++;
+
+    if (is_named_capture) {
+      capture_name = ParseCaptureGroupName();
+    }
   }
   // Store current state and begin new disjunction parsing.
   return new RegExpParserState(state, subexpr_type, lookaround_type,
-                               captures_started_, Z);
+                               captures_started_, capture_name, Z);
 }
 
 // In order to know whether an escape is a backreference or not we have to scan
@@ -698,7 +729,25 @@
         break;
       }
       case '(':
-        if (current() != '?') capture_count++;
+        // At this point we could be in
+        // * a non-capturing group '(:',
+        // * a lookbehind assertion '(?<=' '(?<!'
+        // * or a named capture '(?<'.
+        //
+        // Of these, only named captures are capturing groups.
+        if (current() == '?') {
+          Advance();
+          if (current() != '<') break;
+
+          Advance();
+          if (current() == '=' || current() == '!') break;
+
+          // Found a possible named capture. It could turn out to be a syntax
+          // error (e.g. an unterminated or invalid name), but that distinction
+          // does not matter for our purposes.
+          has_named_captures_ = true;
+        }
+        capture_count++;
         break;
     }
   }
@@ -743,6 +792,147 @@
   return true;
 }
 
+namespace {
+
+inline constexpr bool IsIdentifierStart(uint16_t ch) {
+  return (ch >= 'A' && ch <= 'Z') || (ch >= 'a' && ch <= 'z') || ch == '_' ||
+         ch == '$';
+}
+
+inline constexpr bool IsIdentifierPart(uint16_t ch) {
+  return IsIdentifierStart(ch) || (ch >= '0' && ch <= '9');
+}
+
+bool IsSameName(const RegExpCaptureName* name1,
+                const RegExpCaptureName* name2) {
+  if (name1->length() != name2->length()) return false;
+  for (intptr_t i = 0; i < name1->length(); i++) {
+    if (name1->At(i) != name2->At(i)) return false;
+  }
+  return true;
+}
+
+}  // end namespace
+
+const RegExpCaptureName* RegExpParser::ParseCaptureGroupName() {
+  auto name = new (Z) RegExpCaptureName();
+
+  bool at_start = true;
+  while (true) {
+    const uint16_t c = current();
+    Advance();
+
+    // The backslash char is misclassified as both ID_Start and ID_Continue.
+    if (c == '\\') {
+      ReportError("Invalid capture group name");
+      UNREACHABLE();
+    }
+
+    if (at_start) {
+      if (!IsIdentifierStart(c)) {
+        ReportError("Invalid capture group name");
+        UNREACHABLE();
+      }
+      name->Add(c);
+      at_start = false;
+    } else {
+      if (c == '>') {
+        break;
+      } else if (IsIdentifierPart(c)) {
+        name->Add(c);
+      } else {
+        ReportError("Invalid capture group name");
+        UNREACHABLE();
+      }
+    }
+  }
+
+  return name;
+}
+
+intptr_t RegExpParser::GetNamedCaptureIndex(const RegExpCaptureName* name) {
+  for (const auto& capture : *named_captures_) {
+    if (IsSameName(name, capture->name())) return capture->index();
+  }
+  return -1;
+}
+
+void RegExpParser::CreateNamedCaptureAtIndex(const RegExpCaptureName* name,
+                                             intptr_t index) {
+  ASSERT(0 < index && index <= captures_started_);
+  ASSERT(name != nullptr);
+
+  if (named_captures_ == nullptr) {
+    named_captures_ = new (Z) ZoneGrowableArray<RegExpCapture*>(1);
+  } else {
+    // Check for duplicates and bail if we find any. Currently O(n^2).
+    if (GetNamedCaptureIndex(name) >= 0) {
+      ReportError("Duplicate capture group name");
+      UNREACHABLE();
+    }
+  }
+
+  RegExpCapture* capture = GetCapture(index);
+  ASSERT(capture->name() == nullptr);
+
+  capture->set_name(name);
+  named_captures_->Add(capture);
+}
+
+bool RegExpParser::ParseNamedBackReference(RegExpBuilder* builder,
+                                           RegExpParserState* state) {
+  // The parser is assumed to be on the '<' in \k<name>.
+  if (current() != '<') {
+    ReportError("Invalid named reference");
+    UNREACHABLE();
+  }
+
+  Advance();
+  const RegExpCaptureName* name = ParseCaptureGroupName();
+  if (name == nullptr) {
+    return false;
+  }
+
+  if (state->IsInsideCaptureGroup(name)) {
+    builder->AddEmpty();
+  } else {
+    RegExpBackReference* atom = new (Z) RegExpBackReference();
+    atom->set_name(name);
+
+    builder->AddAtom(atom);
+
+    if (named_back_references_ == nullptr) {
+      named_back_references_ =
+          new (Z) ZoneGrowableArray<RegExpBackReference*>(1);
+    }
+    named_back_references_->Add(atom);
+  }
+
+  return true;
+}
+
+void RegExpParser::PatchNamedBackReferences() {
+  if (named_back_references_ == nullptr) return;
+
+  if (named_captures_ == nullptr) {
+    ReportError("Invalid named capture referenced");
+    return;
+  }
+
+  // Look up and patch the actual capture for each named back reference.
+  // Currently O(n^2), optimize if necessary.
+  for (intptr_t i = 0; i < named_back_references_->length(); i++) {
+    RegExpBackReference* ref = named_back_references_->At(i);
+    intptr_t index = GetNamedCaptureIndex(ref->name());
+
+    if (index < 0) {
+      ReportError("Invalid named capture referenced");
+      UNREACHABLE();
+    }
+    ref->set_capture(GetCapture(index));
+  }
+}
+
 RegExpCapture* RegExpParser::GetCapture(intptr_t index) {
   // The index for the capture groups are one-based. Its index in the list is
   // zero-based.
@@ -758,6 +948,39 @@
   return captures_->At(index - 1);
 }
 
+RawArray* RegExpParser::CreateCaptureNameMap() {
+  if (named_captures_ == nullptr || named_captures_->is_empty()) {
+    return Array::null();
+  }
+
+  const intptr_t len = named_captures_->length() * 2;
+
+  const Array& array = Array::Handle(Array::New(len));
+
+  auto& name = String::Handle();
+  auto& smi = Smi::Handle();
+  for (intptr_t i = 0; i < named_captures_->length(); i++) {
+    RegExpCapture* capture = named_captures_->At(i);
+    name =
+        String::FromUTF16(capture->name()->data(), capture->name()->length());
+    smi = Smi::New(capture->index());
+    array.SetAt(i * 2, name);
+    array.SetAt(i * 2 + 1, smi);
+  }
+
+  return array.raw();
+}
+
+bool RegExpParser::HasNamedCaptures() {
+  if (has_named_captures_ || is_scanned_for_captures_) {
+    return has_named_captures_;
+  }
+
+  ScanForCaptures();
+  ASSERT(is_scanned_for_captures_);
+  return has_named_captures_;
+}
+
 bool RegExpParser::RegExpParserState::IsInsideCaptureGroup(intptr_t index) {
   for (RegExpParserState* s = this; s != nullptr; s = s->previous_state()) {
     if (s->group_type() != CAPTURE) continue;
@@ -769,6 +992,16 @@
   return false;
 }
 
+bool RegExpParser::RegExpParserState::IsInsideCaptureGroup(
+    const RegExpCaptureName* name) {
+  ASSERT(name != nullptr);
+  for (RegExpParserState* s = this; s != nullptr; s = s->previous_state()) {
+    if (s->capture_name() == nullptr) continue;
+    if (IsSameName(s->capture_name(), name)) return true;
+  }
+  return false;
+}
+
 // QuantifierPrefix ::
 //   { DecimalDigits }
 //   { DecimalDigits , }
@@ -1092,6 +1325,7 @@
   intptr_t capture_count = parser.captures_started();
   result->simple = tree->IsAtom() && parser.simple() && capture_count == 0;
   result->contains_anchor = parser.contains_anchor();
+  result->capture_name_map = parser.CreateCaptureNameMap();
   result->capture_count = capture_count;
 }
 
diff --git a/runtime/vm/regexp_parser.h b/runtime/vm/regexp_parser.h
index c4e127b..a2b626b 100644
--- a/runtime/vm/regexp_parser.h
+++ b/runtime/vm/regexp_parser.h
@@ -52,6 +52,8 @@
 #endif
 };
 
+using RegExpCaptureName = ZoneGrowableArray<uint16_t>;
+
 class RegExpParser : public ValueObject {
  public:
   RegExpParser(const String& in, String* error, bool multiline_mode);
@@ -117,12 +119,14 @@
                       SubexpressionType group_type,
                       RegExpLookaround::Type lookaround_type,
                       intptr_t disjunction_capture_index,
+                      const RegExpCaptureName* capture_name,
                       Zone* zone)
         : previous_state_(previous_state),
           builder_(new (zone) RegExpBuilder()),
           group_type_(group_type),
           lookaround_type_(lookaround_type),
-          disjunction_capture_index_(disjunction_capture_index) {}
+          disjunction_capture_index_(disjunction_capture_index),
+          capture_name_(capture_name) {}
     // Parser state of containing expression, if any.
     RegExpParserState* previous_state() { return previous_state_; }
     bool IsSubexpression() { return previous_state_ != NULL; }
@@ -136,9 +140,14 @@
     // Also the capture index of this sub-expression itself, if group_type
     // is CAPTURE.
     intptr_t capture_index() { return disjunction_capture_index_; }
+    const RegExpCaptureName* capture_name() const { return capture_name_; }
+
+    bool IsNamedCapture() const { return capture_name_ != nullptr; }
 
     // Check whether the parser is inside a capture group with the given index.
     bool IsInsideCaptureGroup(intptr_t index);
+    // Check whether the parser is inside a capture group with the given name.
+    bool IsInsideCaptureGroup(const RegExpCaptureName* name);
 
    private:
     // Linked list implementation of stack of states.
@@ -151,12 +160,37 @@
     const RegExpLookaround::Type lookaround_type_;
     // Stored disjunction's capture index (if any).
     intptr_t disjunction_capture_index_;
+    // Stored capture name (if any).
+    const RegExpCaptureName* const capture_name_;
   };
 
   // Return the 1-indexed RegExpCapture object, allocate if necessary.
   RegExpCapture* GetCapture(intptr_t index);
 
+  // Creates a new named capture at the specified index. Must be called exactly
+  // once for each named capture. Fails if a capture with the same name is
+  // encountered.
+  void CreateNamedCaptureAtIndex(const RegExpCaptureName* name, intptr_t index);
+
+  // Parses the name of a capture group (?<name>pattern). The name must adhere
+  // to IdentifierName in the ECMAScript standard.
+  const RegExpCaptureName* ParseCaptureGroupName();
+
+  bool ParseNamedBackReference(RegExpBuilder* builder,
+                               RegExpParserState* state);
   RegExpParserState* ParseOpenParenthesis(RegExpParserState* state);
+  intptr_t GetNamedCaptureIndex(const RegExpCaptureName* name);
+
+  // After the initial parsing pass, patch corresponding RegExpCapture objects
+  // into all RegExpBackReferences. This is done after initial parsing in order
+  // to avoid complicating cases in which references come before the capture.
+  void PatchNamedBackReferences();
+
+  RawArray* CreateCaptureNameMap();
+
+  // Returns true iff the pattern contains named captures. May call
+  // ScanForCaptures to look ahead at the remaining pattern.
+  bool HasNamedCaptures();
 
   Zone* zone() { return zone_; }
 
@@ -169,6 +203,8 @@
 
   Zone* zone_;
   ZoneGrowableArray<RegExpCapture*>* captures_;
+  ZoneGrowableArray<RegExpCapture*>* named_captures_;
+  ZoneGrowableArray<RegExpBackReference*>* named_back_references_;
   const String& in_;
   uint32_t current_;
   intptr_t next_pos_;
@@ -180,6 +216,7 @@
   bool simple_;
   bool contains_anchor_;
   bool is_scanned_for_captures_;
+  bool has_named_captures_;
 };
 
 }  // namespace dart
diff --git a/runtime/vm/runtime_entry.cc b/runtime/vm/runtime_entry.cc
index 8e90333..d4c12b1 100644
--- a/runtime/vm/runtime_entry.cc
+++ b/runtime/vm/runtime_entry.cc
@@ -220,9 +220,9 @@
 }
 
 static void EnsureNewOrRemembered(Thread* thread, const Object& result) {
-  // For write barrier elimination, we need to ensure that the allocation ends
-  // up in the new space if Heap::IsGuaranteedNewSpaceAllocation is true for
-  // this size or else the object needs to go into the store buffer.
+  // For generational write barrier elimination, we need to ensure that the
+  // allocation ends up in the new space if Heap::IsGuaranteedNewSpaceAllocation
+  // is true for this size or else the object needs to go into the store buffer.
   NoSafepointScope no_safepoint_scope;
 
   RawObject* object = result.raw();
@@ -231,6 +231,18 @@
   }
 }
 
+static void EnsureNewOrDeferredMarking(Thread* thread, const Object& result) {
+  // For incremental write barrier elimination, we need to ensure that the
+  // allocation ends up in the new space or else the object needs to added
+  // to deferred marking stack so it will be [re]scanned.
+  NoSafepointScope no_safepoint_scope;
+
+  RawObject* object = result.raw();
+  if (object->IsOldObject() && thread->is_marking()) {
+    thread->DeferredMarkingStackAddObject(object);
+  }
+}
+
 // Allocation of a fixed length array of given element type.
 // This runtime entry is never called for allocating a List of a generic type,
 // because a prior run time call instantiates the element type if necessary.
@@ -266,6 +278,8 @@
       if (!array.raw()->IsCardRemembered()) {
         EnsureNewOrRemembered(thread, array);
       }
+      EnsureNewOrDeferredMarking(thread, array);
+
       return;
     }
   }
@@ -314,6 +328,7 @@
 
   if (AllocateObjectInstr::WillAllocateNewOrRemembered(cls)) {
     EnsureNewOrRemembered(thread, instance);
+    EnsureNewOrDeferredMarking(thread, instance);
   }
 }
 
@@ -425,6 +440,7 @@
       AllocateUninitializedContextInstr::WillAllocateNewOrRemembered(
           num_context_variables)) {
     EnsureNewOrRemembered(thread, context);
+    EnsureNewOrDeferredMarking(thread, context);
   }
 }
 
@@ -503,16 +519,22 @@
 
 // Resolve 'call' function of receiver.
 // Arg0: receiver (not a closure).
+// Arg1: arguments descriptor
 // Return value: 'call' function'.
-DEFINE_RUNTIME_ENTRY(ResolveCallFunction, 1) {
+DEFINE_RUNTIME_ENTRY(ResolveCallFunction, 2) {
   ASSERT(FLAG_enable_interpreter);
   const Instance& receiver = Instance::CheckedHandle(zone, arguments.ArgAt(0));
+  const Array& descriptor = Array::CheckedHandle(zone, arguments.ArgAt(1));
+  ArgumentsDescriptor args_desc(descriptor);
   ASSERT(!receiver.IsClosure());  // Interpreter tests for closure.
   Class& cls = Class::Handle(zone, receiver.clazz());
   Function& call_function = Function::Handle(zone);
   do {
     call_function = cls.LookupDynamicFunction(Symbols::Call());
     if (!call_function.IsNull()) {
+      if (!call_function.AreValidArguments(args_desc, NULL)) {
+        call_function = Function::null();
+      }
       break;
     }
     cls = cls.SuperClass();
@@ -1698,7 +1720,7 @@
   const Object& result = Object::Handle(                                       \
       zone, DartEntry::InvokeNoSuchMethod(                                     \
                 receiver, target_name, orig_arguments, orig_arguments_desc));  \
-  ThrowIfError(result);                                                    \
+  ThrowIfError(result);                                                        \
   arguments.SetReturn(result);
 
 #define CLOSURIZE(some_function)                                               \
@@ -1797,6 +1819,26 @@
   arguments.SetReturn(result);
 }
 
+// Invoke appropriate noSuchMethod function.
+// Arg0: receiver
+// Arg1: arguments descriptor array.
+// Arg2: arguments array.
+// Arg3: function name.
+DEFINE_RUNTIME_ENTRY(InvokeNoSuchMethod, 4) {
+  ASSERT(FLAG_enable_interpreter);
+  const Instance& receiver = Instance::CheckedHandle(zone, arguments.ArgAt(0));
+  const Array& orig_arguments_desc =
+      Array::CheckedHandle(zone, arguments.ArgAt(1));
+  const Array& orig_arguments = Array::CheckedHandle(zone, arguments.ArgAt(2));
+  const String& original_function_name =
+      String::CheckedHandle(zone, arguments.ArgAt(3));
+
+  const Object& result = Object::Handle(DartEntry::InvokeNoSuchMethod(
+      receiver, original_function_name, orig_arguments, orig_arguments_desc));
+  ThrowIfError(result);
+  arguments.SetReturn(result);
+}
+
 #if !defined(PRODUCT) && !defined(DART_PRECOMPILED_RUNTIME)
 // The following code is used to stress test
 //  - deoptimization
@@ -1838,7 +1880,7 @@
     }
   }
   if ((FLAG_deoptimize_filter != NULL) || (FLAG_stacktrace_filter != NULL) ||
-      FLAG_reload_every_optimized) {
+      FLAG_reload_every) {
     DartFrameIterator iterator(thread,
                                StackFrameIterator::kNoCrossThreadIteration);
     StackFrame* frame = iterator.NextFrame();
@@ -2574,7 +2616,7 @@
 
 DEFINE_RUNTIME_ENTRY(InitStaticField, 1) {
   const Field& field = Field::CheckedHandle(zone, arguments.ArgAt(0));
-  const Error& result = Error::Handle(zone, field.EvaluateInitializer());
+  const Error& result = Error::Handle(zone, field.Initialize());
   ThrowIfError(result);
 }
 
diff --git a/runtime/vm/runtime_entry_list.h b/runtime/vm/runtime_entry_list.h
index 4833b04..13fb2b8ec 100644
--- a/runtime/vm/runtime_entry_list.h
+++ b/runtime/vm/runtime_entry_list.h
@@ -33,6 +33,7 @@
   V(InstantiateType)                                                           \
   V(InstantiateTypeArguments)                                                  \
   V(InvokeClosureNoSuchMethod)                                                 \
+  V(InvokeNoSuchMethod)                                                        \
   V(InvokeNoSuchMethodDispatcher)                                              \
   V(MegamorphicCacheMissHandler)                                               \
   V(OptimizeInvokedFunction)                                                   \
diff --git a/runtime/vm/service.cc b/runtime/vm/service.cc
index f08dc42..accf3f0 100644
--- a/runtime/vm/service.cc
+++ b/runtime/vm/service.cc
@@ -3866,13 +3866,22 @@
       UIntParameter::Parse(js->LookupParam("timeOriginMicros"));
   int64_t time_extent_micros =
       UIntParameter::Parse(js->LookupParam("timeExtentMicros"));
+  bool code_trie = BoolParameter::Parse(js->LookupParam("code"), false);
   ProfilerService::PrintTimelineJSON(js, tag_order, time_origin_micros,
-                                     time_extent_micros);
+                                     time_extent_micros, code_trie);
   return true;
 }
 
 static bool WriteCpuProfileTimeline(Thread* thread, JSONStream* js) {
-  ProfilerService::AddToTimeline();
+  Profile::TagOrder tag_order =
+      EnumMapper(js->LookupParam("tags"), tags_enum_names, tags_enum_values);
+  int64_t time_origin_micros =
+      UIntParameter::Parse(js->LookupParam("timeOriginMicros"));
+  int64_t time_extent_micros =
+      UIntParameter::Parse(js->LookupParam("timeExtentMicros"));
+  bool code_trie = BoolParameter::Parse(js->LookupParam("code"), true);
+  ProfilerService::AddToTimeline(tag_order, time_origin_micros,
+                                 time_extent_micros, code_trie);
   return true;
 }
 
diff --git a/runtime/vm/simulator_dbc.cc b/runtime/vm/simulator_dbc.cc
index 85e98a0..2af28ff 100644
--- a/runtime/vm/simulator_dbc.cc
+++ b/runtime/vm/simulator_dbc.cc
@@ -2353,9 +2353,8 @@
   {
     BYTECODE(StoreIndexedFloat32, A_B_C);
     uint8_t* data = SimulatorHelpers::GetTypedData(FP[rA], FP[rB]);
-    const uint64_t value = reinterpret_cast<uint64_t>(FP[rC]);
-    const uint32_t value32 = value;
-    *reinterpret_cast<uint32_t*>(data) = value32;
+    const float value = *reinterpret_cast<float*>(&FP[rC]);
+    *reinterpret_cast<float*>(data) = value;
     DISPATCH();
   }
 
@@ -2365,10 +2364,8 @@
     RawTypedData* array = reinterpret_cast<RawTypedData*>(FP[rA]);
     RawSmi* index = RAW_CAST(Smi, FP[rB]);
     ASSERT(SimulatorHelpers::CheckIndex(index, array->ptr()->length_));
-    const uint64_t value = reinterpret_cast<uint64_t>(FP[rC]);
-    const uint32_t value32 = value;
-    reinterpret_cast<uint32_t*>(array->ptr()->data())[Smi::Value(index)] =
-        value32;
+    const float value = *reinterpret_cast<float*>(&FP[rC]);
+    reinterpret_cast<float*>(array->ptr()->data())[Smi::Value(index)] = value;
     DISPATCH();
   }
 
@@ -2704,6 +2701,17 @@
   }
 
   {
+    BYTECODE(StoreUntagged, A_B_C);
+    const uint16_t offset_in_words = rB;
+    const uint16_t value_reg = rC;
+
+    RawInstance* instance = reinterpret_cast<RawInstance*>(FP[rA]);
+    word value = reinterpret_cast<word>(FP[value_reg]);
+    reinterpret_cast<word*>(instance->ptr())[offset_in_words] = value;
+    DISPATCH();
+  }
+
+  {
     BYTECODE(StoreFieldTOS, __D);
     const uint16_t offset_in_words = rD;
     RawInstance* instance = reinterpret_cast<RawInstance*>(SP[-1]);
@@ -3699,7 +3707,7 @@
   }
 
   {
-    BYTECODE(StoreIndexedExternalUint8, A_B_C);
+    BYTECODE(StoreIndexedUntaggedUint8, A_B_C);
     uint8_t* array = reinterpret_cast<uint8_t*>(FP[rA]);
     RawSmi* index = RAW_CAST(Smi, FP[rB]);
     RawSmi* value = RAW_CAST(Smi, FP[rC]);
@@ -3708,6 +3716,33 @@
   }
 
   {
+    BYTECODE(StoreIndexedUntaggedUint32, A_B_C);
+    uint8_t* array = reinterpret_cast<uint8_t*>(FP[rA]);
+    RawSmi* index = RAW_CAST(Smi, FP[rB]);
+    const uint32_t value = *reinterpret_cast<uint32_t*>(&FP[rC]);
+    *reinterpret_cast<uint32_t*>(array + Smi::Value(index)) = value;
+    DISPATCH();
+  }
+
+  {
+    BYTECODE(StoreIndexedUntaggedFloat32, A_B_C);
+    uint8_t* array = reinterpret_cast<uint8_t*>(FP[rA]);
+    RawSmi* index = RAW_CAST(Smi, FP[rB]);
+    const float value = *reinterpret_cast<float*>(&FP[rC]);
+    *reinterpret_cast<float*>(array + Smi::Value(index)) = value;
+    DISPATCH();
+  }
+
+  {
+    BYTECODE(StoreIndexedUntaggedFloat64, A_B_C);
+    uint8_t* array = reinterpret_cast<uint8_t*>(FP[rA]);
+    RawSmi* index = RAW_CAST(Smi, FP[rB]);
+    const double value = *reinterpret_cast<double*>(&FP[rC]);
+    *reinterpret_cast<double*>(array + Smi::Value(index)) = value;
+    DISPATCH();
+  }
+
+  {
     BYTECODE(StoreIndexedOneByteString, A_B_C);
     RawOneByteString* array = RAW_CAST(OneByteString, FP[rA]);
     RawSmi* index = RAW_CAST(Smi, FP[rB]);
@@ -3837,7 +3872,7 @@
     BYTECODE(LoadIndexedUint32, A_B_C);
     const uint8_t* data = SimulatorHelpers::GetTypedData(FP[rB], FP[rC]);
     const uint32_t value = *reinterpret_cast<const uint32_t*>(data);
-    FP[rA] = reinterpret_cast<RawObject*>(value);
+    *reinterpret_cast<uint32_t*>(&FP[rA]) = value;
     DISPATCH();
   }
 
@@ -3845,23 +3880,60 @@
     BYTECODE(LoadIndexedInt32, A_B_C);
     const uint8_t* data = SimulatorHelpers::GetTypedData(FP[rB], FP[rC]);
     const int32_t value = *reinterpret_cast<const int32_t*>(data);
-    FP[rA] = reinterpret_cast<RawObject*>(value);
+    *reinterpret_cast<int32_t*>(&FP[rA]) = value;
     DISPATCH();
   }
 
   {
-    BYTECODE(LoadIndexedExternalUint8, A_B_C);
+    BYTECODE(LoadIndexedUntaggedInt8, A_B_C);
     uint8_t* data = reinterpret_cast<uint8_t*>(FP[rB]);
     RawSmi* index = RAW_CAST(Smi, FP[rC]);
-    FP[rA] = Smi::New(data[Smi::Value(index)]);
+    FP[rA] = Smi::New(*reinterpret_cast<int8_t*>(data + Smi::Value(index)));
     DISPATCH();
   }
 
   {
-    BYTECODE(LoadIndexedExternalInt8, A_B_C);
-    int8_t* data = reinterpret_cast<int8_t*>(FP[rB]);
+    BYTECODE(LoadIndexedUntaggedUint8, A_B_C);
+    uint8_t* data = reinterpret_cast<uint8_t*>(FP[rB]);
     RawSmi* index = RAW_CAST(Smi, FP[rC]);
-    FP[rA] = Smi::New(data[Smi::Value(index)]);
+    FP[rA] = Smi::New(*reinterpret_cast<uint8_t*>(data + Smi::Value(index)));
+    DISPATCH();
+  }
+
+  {
+    BYTECODE(LoadIndexedUntaggedInt32, A_B_C);
+    uint8_t* data = reinterpret_cast<uint8_t*>(FP[rB]);
+    RawSmi* index = RAW_CAST(Smi, FP[rC]);
+    const int32_t value = *reinterpret_cast<int32_t*>(data + Smi::Value(index));
+    *reinterpret_cast<int32_t*>(&FP[rA]) = value;
+    DISPATCH();
+  }
+
+  {
+    BYTECODE(LoadIndexedUntaggedUint32, A_B_C);
+    uint8_t* data = reinterpret_cast<uint8_t*>(FP[rB]);
+    RawSmi* index = RAW_CAST(Smi, FP[rC]);
+    const uint32_t value =
+        *reinterpret_cast<uint32_t*>(data + Smi::Value(index));
+    *reinterpret_cast<uint32_t*>(&FP[rA]) = value;
+    DISPATCH();
+  }
+
+  {
+    BYTECODE(LoadIndexedUntaggedFloat32, A_B_C);
+    uint8_t* data = reinterpret_cast<uint8_t*>(FP[rB]);
+    RawSmi* index = RAW_CAST(Smi, FP[rC]);
+    const float value = *reinterpret_cast<float*>(data + Smi::Value(index));
+    *reinterpret_cast<float*>(&FP[rA]) = value;
+    DISPATCH();
+  }
+
+  {
+    BYTECODE(LoadIndexedUntaggedFloat64, A_B_C);
+    uint8_t* data = reinterpret_cast<uint8_t*>(FP[rB]);
+    RawSmi* index = RAW_CAST(Smi, FP[rC]);
+    const double value = *reinterpret_cast<double*>(data + Smi::Value(index));
+    *reinterpret_cast<double*>(&FP[rA]) = value;
     DISPATCH();
   }
 
diff --git a/runtime/vm/snapshot.cc b/runtime/vm/snapshot.cc
index 58b38e3..c676560 100644
--- a/runtime/vm/snapshot.cc
+++ b/runtime/vm/snapshot.cc
@@ -220,6 +220,7 @@
       type_arguments_(TypeArguments::Handle(zone_)),
       tokens_(GrowableObjectArray::Handle(zone_)),
       data_(ExternalTypedData::Handle(zone_)),
+      typed_data_base_(TypedDataBase::Handle(zone_)),
       typed_data_(TypedData::Handle(zone_)),
       typed_data_view_(TypedDataView::Handle(zone_)),
       function_(Function::Handle(zone_)),
@@ -1025,7 +1026,7 @@
 
   // Now check if it is an object from the VM isolate. These objects are shared
   // by all isolates.
-  if (rawobj->IsReadOnly() && HandleVMIsolateObject(rawobj)) {
+  if (rawobj->InVMIsolateHeap() && HandleVMIsolateObject(rawobj)) {
     return true;
   }
 
diff --git a/runtime/vm/snapshot.h b/runtime/vm/snapshot.h
index 248127c..e4861cb 100644
--- a/runtime/vm/snapshot.h
+++ b/runtime/vm/snapshot.h
@@ -26,6 +26,7 @@
 class Closure;
 class Code;
 class ExternalTypedData;
+class TypedDataBase;
 class GrowableObjectArray;
 class Heap;
 class Instance;
@@ -310,6 +311,7 @@
   TypeArguments* TypeArgumentsHandle() { return &type_arguments_; }
   GrowableObjectArray* TokensHandle() { return &tokens_; }
   ExternalTypedData* DataHandle() { return &data_; }
+  TypedDataBase* TypedDataBaseHandle() { return &typed_data_base_; }
   TypedData* TypedDataHandle() { return &typed_data_; }
   TypedDataView* TypedDataViewHandle() { return &typed_data_view_; }
   Function* FunctionHandle() { return &function_; }
@@ -403,6 +405,7 @@
   TypeArguments& type_arguments_;  // Temporary type argument handle.
   GrowableObjectArray& tokens_;    // Temporary tokens handle.
   ExternalTypedData& data_;        // Temporary stream data handle.
+  TypedDataBase& typed_data_base_;  // Temporary typed data base handle.
   TypedData& typed_data_;          // Temporary typed data handle.
   TypedDataView& typed_data_view_;  // Temporary typed data view handle.
   Function& function_;             // Temporary function handle.
diff --git a/runtime/vm/source_report.cc b/runtime/vm/source_report.cc
index 2c1be3d..9061c99 100644
--- a/runtime/vm/source_report.cc
+++ b/runtime/vm/source_report.cc
@@ -492,10 +492,7 @@
 
 void SourceReport::VisitField(JSONArray* jsarr, const Field& field) {
   if (ShouldSkipField(field) || !field.HasInitializerFunction()) return;
-  Thread* const thread = Thread::Current();
-  const Function& func = Function::Handle(
-      zone(),
-      kernel::CreateFieldInitializerFunction(thread, thread->zone(), field));
+  const Function& func = Function::Handle(field.InitializerFunction());
   VisitFunction(jsarr, func);
 }
 
diff --git a/runtime/vm/stack_frame.cc b/runtime/vm/stack_frame.cc
index 0e98fc7..8e6b4ec 100644
--- a/runtime/vm/stack_frame.cc
+++ b/runtime/vm/stack_frame.cc
@@ -402,9 +402,11 @@
 
 RawFunction* StackFrame::LookupDartFunction() const {
   if (is_interpreted()) {
-    const Bytecode& bytecode = Bytecode::Handle(LookupDartBytecode());
-    ASSERT(!bytecode.IsNull());
-    return bytecode.function();
+    RawObject* result = *(reinterpret_cast<RawFunction**>(
+        fp() + kKBCFunctionSlotFromFp * kWordSize));
+    ASSERT((result == Object::null()) ||
+           (result->GetClassId() == kFunctionCid));
+    return reinterpret_cast<RawFunction*>(result);
   }
   const Code& code = Code::Handle(LookupDartCode());
   if (!code.IsNull()) {
diff --git a/runtime/vm/symbols.h b/runtime/vm/symbols.h
index 7cb99ae..771116b 100644
--- a/runtime/vm/symbols.h
+++ b/runtime/vm/symbols.h
@@ -17,472 +17,473 @@
 
 // One-character symbols are added implicitly.
 #define PREDEFINED_SYMBOLS_LIST(V)                                             \
-  V(EqualOperator, "==")                                                       \
-  V(GreaterEqualOperator, ">=")                                                \
-  V(LessEqualOperator, "<=")                                                   \
-  V(LeftShiftOperator, "<<")                                                   \
-  V(RightShiftOperator, ">>")                                                  \
-  V(TruncDivOperator, "~/")                                                    \
-  V(UnaryMinus, "unary-")                                                      \
-  V(Identical, "identical")                                                    \
-  V(UnsafeCast, "unsafeCast")                                                  \
-  V(Length, "length")                                                          \
-  V(_setLength, "_setLength")                                                  \
-  V(IndexToken, "[]")                                                          \
-  V(AssignIndexToken, "[]=")                                                   \
-  V(TopLevel, "::")                                                            \
-  V(DefaultLabel, ":L")                                                        \
-  V(Other, "other")                                                            \
-  V(Call, "call")                                                              \
-  V(GetCall, "get:call")                                                       \
-  V(Current, "current")                                                        \
-  V(_current, "_current")                                                      \
-  V(MoveNext, "moveNext")                                                      \
-  V(_yieldEachIterable, "_yieldEachIterable")                                  \
-  V(Value, "value")                                                            \
-  V(_EnumHelper, "_EnumHelper")                                                \
-  V(_SyncIterable, "_SyncIterable")                                            \
-  V(_SyncIterableConstructor, "_SyncIterable.")                                \
-  V(_SyncIterator, "_SyncIterator")                                            \
-  V(IteratorParameter, ":iterator")                                            \
-  V(_AsyncStarStreamController, "_AsyncStarStreamController")                  \
-  V(_AsyncStarStreamControllerConstructor, "_AsyncStarStreamController.")      \
-  V(ColonController, ":controller")                                            \
-  V(ControllerStream, ":controller_stream")                                    \
-  V(Stream, "stream")                                                          \
-  V(_StreamImpl, "_StreamImpl")                                                \
-  V(isPaused, "isPaused")                                                      \
+  V(AbstractClassInstantiationError, "AbstractClassInstantiationError")        \
   V(AddError, "addError")                                                      \
   V(AddStream, "addStream")                                                    \
-  V(Cancel, "cancel")                                                          \
-  V(Close, "close")                                                            \
-  V(Values, "values")                                                          \
-  V(_EnumNames, "_enum_names")                                                 \
-  V(_DeletedEnumSentinel, "_deleted_enum_sentinel")                            \
-  V(_DeletedEnumPrefix, "Deleted enum value from ")                            \
-  V(ExprTemp, ":expr_temp")                                                    \
-  V(EntryPointsTemp, ":entry_points_temp")                                     \
-  V(FinallyRetVal, ":finally_ret_val")                                         \
+  V(AllocateInvocationMirror, "_allocateInvocationMirror")                     \
+  V(AllocateInvocationMirrorForClosure, "_allocateInvocationMirrorForClosure") \
   V(AnonymousClosure, "<anonymous closure>")                                   \
   V(AnonymousSignature, "<anonymous signature>")                               \
-  V(ImplicitClosure, "<implicit closure>")                                     \
-  V(ClosureParameter, ":closure")                                              \
-  V(TypeArgumentsParameter, ":type_arguments")                                 \
-  V(FunctionTypeArgumentsVar, ":function_type_arguments_var")                  \
-  V(AssertionError, "_AssertionError")                                         \
-  V(CastError, "_CastError")                                                   \
-  V(TypeError, "_TypeError")                                                   \
-  V(FallThroughError, "FallThroughError")                                      \
-  V(AbstractClassInstantiationError, "AbstractClassInstantiationError")        \
-  V(NoSuchMethodError, "NoSuchMethodError")                                    \
-  V(IntegerDivisionByZeroException, "IntegerDivisionByZeroException")          \
-  V(CyclicInitializationError, "CyclicInitializationError")                    \
-  V(_CompileTimeError, "_CompileTimeError")                                    \
-  V(ThrowNew, "_throwNew")                                                     \
-  V(ThrowNewInvocation, "_throwNewInvocation")                                 \
-  V(EvaluateAssertion, "_evaluateAssertion")                                   \
-  V(Symbol, "Symbol")                                                          \
-  V(SymbolCtor, "Symbol.")                                                     \
-  V(List, "List")                                                              \
-  V(ListLiteralFactory, "List._fromLiteral")                                   \
-  V(ListFactory, "List.")                                                      \
-  V(Map, "Map")                                                                \
-  V(MapLiteralFactory, "Map._fromLiteral")                                     \
-  V(ImmutableMap, "_ImmutableMap")                                             \
-  V(ImmutableMapConstructor, "_ImmutableMap._create")                          \
-  V(StringBase, "_StringBase")                                                 \
-  V(Interpolate, "_interpolate")                                               \
-  V(InterpolateSingle, "_interpolateSingle")                                   \
-  V(Iterator, "iterator")                                                      \
-  V(NoSuchMethod, "noSuchMethod")                                              \
+  V(ApiError, "ApiError")                                                      \
   V(ArgDescVar, ":arg_desc")                                                   \
-  V(CurrentContextVar, ":current_context_var")                                 \
-  V(SavedTryContextVar, ":saved_try_context_var")                              \
-  V(TryFinallyReturnValue, ":try_finally_return_value")                        \
-  V(ExceptionParameter, ":exception")                                          \
-  V(StackTraceParameter, ":stack_trace")                                       \
-  V(ExceptionVar, ":exception_var")                                            \
-  V(StackTraceVar, ":stack_trace_var")                                         \
-  V(SavedExceptionVar, ":saved_exception_var")                                 \
-  V(SavedStackTraceVar, ":saved_stack_trace_var")                              \
-  V(ListLiteralElement, "list literal element")                                \
-  V(ForInIter, ":for-in-iter")                                                 \
-  V(LoadLibrary, "loadLibrary")                                                \
-  V(_LibraryPrefix, "_LibraryPrefix")                                          \
-  V(On, "on")                                                                  \
-  V(Of, "of")                                                                  \
-  V(Show, "show")                                                              \
-  V(Hide, "hide")                                                              \
+  V(ArgumentError, "ArgumentError")                                            \
+  V(AssertionError, "_AssertionError")                                         \
+  V(AssignIndexToken, "[]=")                                                   \
   V(Async, "async")                                                            \
-  V(Sync, "sync")                                                              \
-  V(YieldKw, "yield")                                                          \
-  V(AsyncCompleter, ":async_completer")                                        \
-  V(AsyncOperation, ":async_op")                                               \
-  V(AsyncThenCallback, ":async_op_then")                                       \
+  V(AsyncAwaitHelper, "_awaitHelper")                                          \
   V(AsyncCatchErrorCallback, ":async_op_catch_error")                          \
-  V(AsyncOperationParam, ":async_result")                                      \
+  V(AsyncCatchHelper, "_asyncCatchHelper")                                     \
+  V(AsyncCompleter, ":async_completer")                                        \
+  V(AsyncErrorWrapperHelper, "_asyncErrorWrapperHelper")                       \
+  V(AsyncOperation, ":async_op")                                               \
   V(AsyncOperationErrorParam, ":async_error_param")                            \
+  V(AsyncOperationParam, ":async_result")                                      \
   V(AsyncOperationStackTraceParam, ":async_stack_trace_param")                 \
   V(AsyncSavedTryCtxVarPrefix, ":async_saved_try_ctx_var_")                    \
-  V(AsyncStackTraceVar, ":async_stack_trace")                                  \
-  V(ClearAsyncThreadStackTrace, "_clearAsyncThreadStackTrace")                 \
-  V(SetAsyncThreadStackTrace, "_setAsyncThreadStackTrace")                     \
-  V(AsyncCatchHelper, "_asyncCatchHelper")                                     \
-  V(_CompleteOnAsyncReturn, "_completeOnAsyncReturn")                          \
-  V(AsyncThenWrapperHelper, "_asyncThenWrapperHelper")                         \
-  V(AsyncErrorWrapperHelper, "_asyncErrorWrapperHelper")                       \
-  V(AsyncStarMoveNextHelper, "_asyncStarMoveNextHelper")                       \
   V(AsyncStackTraceHelper, "_asyncStackTraceHelper")                           \
-  V(AsyncAwaitHelper, "_awaitHelper")                                          \
+  V(AsyncStackTraceVar, ":async_stack_trace")                                  \
+  V(AsyncStarMoveNextHelper, "_asyncStarMoveNextHelper")                       \
+  V(AsyncThenCallback, ":async_op_then")                                       \
+  V(AsyncThenWrapperHelper, "_asyncThenWrapperHelper")                         \
   V(Await, "await")                                                            \
-  V(_Awaiter, "_awaiter")                                                      \
-  V(AwaitTempVarPrefix, ":await_temp_var_")                                    \
   V(AwaitContextVar, ":await_ctx_var")                                         \
   V(AwaitJumpVar, ":await_jump_var")                                           \
-  V(FutureImpl, "_Future")                                                     \
-  V(Future, "Future")                                                          \
-  V(FutureOr, "FutureOr")                                                      \
-  V(FutureMicrotask, "Future.microtask")                                       \
-  V(FutureValue, "Future.value")                                               \
-  V(FutureThen, "then")                                                        \
-  V(FutureCatchError, "catchError")                                            \
+  V(AwaitTempVarPrefix, ":await_temp_var_")                                    \
+  V(Bool, "bool")                                                              \
+  V(BooleanExpression, "boolean expression")                                   \
+  V(BoundsCheckForPartialInstantiation, "_boundsCheckForPartialInstantiation") \
+  V(ByteData, "ByteData")                                                      \
+  V(ByteDataDot, "ByteData.")                                                  \
+  V(ByteDataDot_view, "ByteData._view")                                        \
+  V(Bytecode, "Bytecode")                                                      \
+  V(Call, "call")                                                              \
+  V(Cancel, "cancel")                                                          \
+  V(CastError, "_CastError")                                                   \
+  V(Class, "Class")                                                            \
+  V(ClassID, "ClassID")                                                        \
+  V(ClearAsyncThreadStackTrace, "_clearAsyncThreadStackTrace")                 \
+  V(Close, "close")                                                            \
+  V(ClosureData, "ClosureData")                                                \
+  V(ClosureParameter, ":closure")                                              \
+  V(Code, "Code")                                                              \
+  V(CodeSourceMap, "CodeSourceMap")                                            \
+  V(ColonController, ":controller")                                            \
+  V(ColonMatcher, ":matcher")                                                  \
+  V(ColonStream, ":stream")                                                    \
+  V(CommaSpace, ", ")                                                          \
   V(Completer, "Completer")                                                    \
   V(CompleterComplete, "complete")                                             \
   V(CompleterCompleteError, "completeError")                                   \
+  V(CompleterFuture, "future")                                                 \
+  V(CompleterGetFuture, "get:future")                                          \
   V(CompleterSyncConstructor, "Completer.sync")                                \
+  V(ConstructorStacktracePrefix, "new ")                                       \
+  V(Context, "Context")                                                        \
+  V(ContextScope, "ContextScope")                                              \
+  V(ControllerStream, ":controller_stream")                                    \
+  V(Current, "current")                                                        \
+  V(CurrentContextVar, ":current_context_var")                                 \
+  V(CyclicInitializationError, "CyclicInitializationError")                    \
+  V(DartCollection, "dart:collection")                                         \
+  V(DartCore, "dart:core")                                                     \
+  V(DartDeveloper, "dart:developer")                                           \
+  V(DartDeveloperCausalAsyncStacks, "dart.developer.causal_async_stacks")      \
+  V(DartDeveloperTimeline, "dart.developer.timeline")                          \
+  V(DartExtensionScheme, "dart-ext:")                                          \
+  V(DartFfi, "dart:ffi")                                                       \
+  V(DartFfiLibName, "ffi")                                                     \
+  V(DartIOLibName, "dart.io")                                                  \
+  V(DartInternal, "dart:_internal")                                            \
+  V(DartInternalPackage, "package:dart_internal/")                             \
+  V(DartIsVM, "dart.isVM")                                                     \
+  V(DartIsolate, "dart:isolate")                                               \
+  V(DartLibrary, "dart.library.")                                              \
+  V(DartLibraryFfi, "dart.library.ffi")                                        \
+  V(DartLibraryMirrors, "dart.library.mirrors")                                \
+  V(DartMirrors, "dart:mirrors")                                               \
+  V(DartNativeWrappers, "dart:nativewrappers")                                 \
+  V(DartNativeWrappersLibName, "nativewrappers")                               \
+  V(DartScheme, "dart:")                                                       \
+  V(DartSchemePrivate, "dart:_")                                               \
+  V(DartTypedData, "dart:typed_data")                                          \
+  V(DartVMProduct, "dart.vm.product")                                          \
+  V(DartVMService, "dart:_vmservice")                                          \
+  V(DebugClassName, "#DebugClass")                                             \
+  V(DebugProcedureName, ":Eval")                                               \
+  V(Default, "Default")                                                        \
+  V(DefaultLabel, ":L")                                                        \
+  V(DeoptInfo, "DeoptInfo")                                                    \
+  V(DotCreate, "._create")                                                     \
+  V(DotRange, ".range")                                                        \
+  V(DotValue, ".value")                                                        \
+  V(DotWithType, "._withType")                                                 \
+  V(Double, "double")                                                          \
+  V(Dynamic, "dynamic")                                                        \
+  V(DynamicPrefix, "dyn:")                                                     \
+  V(EntryPointsTemp, ":entry_points_temp")                                     \
+  V(EqualOperator, "==")                                                       \
+  V(Error, "Error")                                                            \
+  V(EvalSourceUri, "evaluate:source")                                          \
+  V(EvaluateAssertion, "_evaluateAssertion")                                   \
+  V(ExceptionHandlers, "ExceptionHandlers")                                    \
+  V(ExceptionParameter, ":exception")                                          \
+  V(ExceptionVar, ":exception_var")                                            \
+  V(ExprTemp, ":expr_temp")                                                    \
+  V(ExternalName, "ExternalName")                                              \
+  V(ExternalOneByteString, "_ExternalOneByteString")                           \
+  V(ExternalTwoByteString, "_ExternalTwoByteString")                           \
+  V(FactoryResult, "factory result")                                           \
+  V(FallThroughError, "FallThroughError")                                      \
+  V(FfiDouble, "Double")                                                       \
+  V(FfiDynamicLibrary, "DynamicLibrary")                                       \
+  V(FfiFloat, "Float")                                                         \
+  V(FfiInt16, "Int16")                                                         \
+  V(FfiInt32, "Int32")                                                         \
+  V(FfiInt64, "Int64")                                                         \
+  V(FfiInt8, "Int8")                                                           \
+  V(FfiIntPtr, "IntPtr")                                                       \
+  V(FfiNativeFunction, "NativeFunction")                                       \
+  V(FfiNativeType, "NativeType")                                               \
+  V(FfiPointer, "Pointer")                                                     \
+  V(FfiTrampolineData, "FfiTrampolineData")                                    \
+  V(FfiUint16, "Uint16")                                                       \
+  V(FfiUint32, "Uint32")                                                       \
+  V(FfiUint64, "Uint64")                                                       \
+  V(FfiUint8, "Uint8")                                                         \
+  V(FfiVoid, "Void")                                                           \
+  V(Field, "Field")                                                            \
+  V(FinallyRetVal, ":finally_ret_val")                                         \
+  V(Float32List, "Float32List")                                                \
+  V(Float32x4, "Float32x4")                                                    \
+  V(Float32x4List, "Float32x4List")                                            \
+  V(Float64List, "Float64List")                                                \
+  V(Float64x2, "Float64x2")                                                    \
+  V(Float64x2List, "Float64x2List")                                            \
+  V(ForInIter, ":for-in-iter")                                                 \
+  V(FormatException, "FormatException")                                        \
+  V(ForwardingCorpse, "ForwardingCorpse")                                      \
+  V(FreeListElement, "FreeListElement")                                        \
+  V(Function, "Function")                                                      \
+  V(FunctionResult, "function result")                                         \
+  V(FunctionTypeArgumentsVar, ":function_type_arguments_var")                  \
+  V(Future, "Future")                                                          \
+  V(FutureCatchError, "catchError")                                            \
+  V(FutureImpl, "_Future")                                                     \
+  V(FutureMicrotask, "Future.microtask")                                       \
+  V(FutureOr, "FutureOr")                                                      \
+  V(FutureThen, "then")                                                        \
+  V(FutureValue, "Future.value")                                               \
+  V(Get, "get")                                                                \
+  V(GetCall, "get:call")                                                       \
+  V(GetRuntimeType, "get:runtimeType")                                         \
+  V(GetterPrefix, "get:")                                                      \
+  V(GreaterEqualOperator, ">=")                                                \
+  V(GrowRegExpStack, "_growRegExpStack")                                       \
+  V(HaveSameRuntimeType, "_haveSameRuntimeType")                               \
+  V(Hide, "hide")                                                              \
+  V(ICData, "ICData")                                                          \
+  V(Identical, "identical")                                                    \
+  V(ImmutableMap, "_ImmutableMap")                                             \
+  V(ImmutableMapConstructor, "_ImmutableMap._create")                          \
+  V(ImplicitClosure, "<implicit closure>")                                     \
+  V(InTypeCast, " in type cast")                                               \
+  V(Index, "index")                                                            \
+  V(IndexToken, "[]")                                                          \
+  V(InitPrefix, "init:")                                                       \
+  V(Instructions, "Instructions")                                              \
+  V(Int, "int")                                                                \
+  V(Int16List, "Int16List")                                                    \
+  V(Int32List, "Int32List")                                                    \
+  V(Int32x4, "Int32x4")                                                        \
+  V(Int32x4List, "Int32x4List")                                                \
+  V(Int64List, "Int64List")                                                    \
+  V(Int8List, "Int8List")                                                      \
+  V(IntegerDivisionByZeroException, "IntegerDivisionByZeroException")          \
+  V(Interpolate, "_interpolate")                                               \
+  V(InterpolateSingle, "_interpolateSingle")                                   \
+  V(InvocationMirror, "_InvocationMirror")                                     \
+  V(IsolateSpawnException, "IsolateSpawnException")                            \
+  V(Iterator, "iterator")                                                      \
+  V(IteratorParameter, ":iterator")                                            \
+  V(KernelProgramInfo, "KernelProgramInfo")                                    \
+  V(LanguageError, "LanguageError")                                            \
+  V(LeftShiftOperator, "<<")                                                   \
+  V(Length, "length")                                                          \
+  V(LessEqualOperator, "<=")                                                   \
+  V(LibraryClass, "Library")                                                   \
+  V(LibraryPrefix, "LibraryPrefix")                                            \
+  V(List, "List")                                                              \
+  V(ListFactory, "List.")                                                      \
+  V(ListLiteralElement, "list literal element")                                \
+  V(ListLiteralFactory, "List._fromLiteral")                                   \
+  V(LoadLibrary, "loadLibrary")                                                \
+  V(LocalVarDescriptors, "LocalVarDescriptors")                                \
+  V(Map, "Map")                                                                \
+  V(MapLiteralFactory, "Map._fromLiteral")                                     \
+  V(MegamorphicCache, "MegamorphicCache")                                      \
+  V(MegamorphicMiss, "megamorphic_miss")                                       \
+  V(MoveNext, "moveNext")                                                      \
+  V(Namespace, "Namespace")                                                    \
+  V(Native, "native")                                                          \
+  V(NoSuchMethod, "noSuchMethod")                                              \
+  V(NoSuchMethodError, "NoSuchMethodError")                                    \
+  V(NotInitialized, "<not initialized>")                                       \
+  V(NotNamed, "<not named>")                                                   \
+  V(Null, "Null")                                                              \
+  V(NullThrownError, "NullThrownError")                                        \
+  V(Number, "num")                                                             \
+  V(Object, "Object")                                                          \
+  V(ObjectPool, "ObjectPool")                                                  \
+  V(Of, "of")                                                                  \
+  V(On, "on")                                                                  \
+  V(OneByteString, "_OneByteString")                                           \
+  V(OptimizedOut, "<optimized out>")                                           \
+  V(OriginalParam, ":original:")                                               \
+  V(Other, "other")                                                            \
+  V(OutOfMemoryError, "OutOfMemoryError")                                      \
+  V(PackageScheme, "package:")                                                 \
+  V(Patch, "patch")                                                            \
+  V(PatchClass, "PatchClass")                                                  \
+  V(PcDescriptors, "PcDescriptors")                                            \
+  V(Pragma, "pragma")                                                          \
+  V(PrependTypeArguments, "_prependTypeArguments")                             \
+  V(QuoteIsNotASubtypeOf, "' is not a subtype of ")                            \
+  V(RParenArrow, ") => ")                                                      \
+  V(RangeError, "RangeError")                                                  \
+  V(RedirectionData, "RedirectionData")                                        \
+  V(RegExp, "RegExp")                                                          \
+  V(RightShiftOperator, ">>")                                                  \
+  V(SavedExceptionVar, ":saved_exception_var")                                 \
+  V(SavedStackTraceVar, ":saved_stack_trace_var")                              \
+  V(SavedTryContextVar, ":saved_try_context_var")                              \
+  V(Script, "Script")                                                          \
+  V(Set, "set")                                                                \
+  V(SetAsyncThreadStackTrace, "_setAsyncThreadStackTrace")                     \
+  V(SetterPrefix, "set:")                                                      \
+  V(Show, "show")                                                              \
+  V(SignatureData, "SignatureData")                                            \
+  V(SingleTargetCache, "SingleTargetCache")                                    \
+  V(SpaceExtendsSpace, " extends ")                                            \
+  V(SpaceIsFromSpace, " is from ")                                             \
+  V(SpaceOfSpace, " of ")                                                      \
+  V(SpaceWhereNewLine, " where\n")                                             \
+  V(StackMap, "StackMap")                                                      \
+  V(StackOverflowError, "StackOverflowError")                                  \
+  V(StackTraceParameter, ":stack_trace")                                       \
+  V(StackTraceVar, ":stack_trace_var")                                         \
+  V(Stream, "stream")                                                          \
+  V(StreamIterator, "StreamIterator")                                          \
+  V(StreamIteratorConstructor, "StreamIterator.")                              \
+  V(StringBase, "_StringBase")                                                 \
+  V(SubtypeTestCache, "SubtypeTestCache")                                      \
+  V(SwitchExpr, ":switch_expr")                                                \
+  V(Symbol, "Symbol")                                                          \
+  V(SymbolCtor, "Symbol.")                                                     \
+  V(Sync, "sync")                                                              \
+  V(TempParam, ":temp_param")                                                  \
+  V(ThrowNew, "_throwNew")                                                     \
+  V(ThrowNewInvocation, "_throwNewInvocation")                                 \
+  V(TopLevel, "::")                                                            \
+  V(TruncDivOperator, "~/")                                                    \
+  V(TryFinallyReturnValue, ":try_finally_return_value")                        \
+  V(TwoByteString, "_TwoByteString")                                           \
+  V(TwoNewlines, "\n\n")                                                       \
+  V(TwoSpaces, "  ")                                                           \
+  V(Type, "Type")                                                              \
+  V(TypeArguments, "TypeArguments")                                            \
+  V(TypeArgumentsParameter, ":type_arguments")                                 \
+  V(TypeError, "_TypeError")                                                   \
+  V(TypeQuote, "type '")                                                       \
+  V(Uint16List, "Uint16List")                                                  \
+  V(Uint32List, "Uint32List")                                                  \
+  V(Uint64List, "Uint64List")                                                  \
+  V(Uint8ClampedList, "Uint8ClampedList")                                      \
+  V(Uint8List, "Uint8List")                                                    \
+  V(UnaryMinus, "unary-")                                                      \
+  V(UnhandledException, "UnhandledException")                                  \
+  V(UnlinkedCall, "UnlinkedCall")                                              \
+  V(UnsafeCast, "unsafeCast")                                                  \
+  V(UnsupportedError, "UnsupportedError")                                      \
+  V(UnwindError, "UnwindError")                                                \
+  V(Value, "value")                                                            \
+  V(Values, "values")                                                          \
+  V(YieldKw, "yield")                                                          \
   V(_AsyncAwaitCompleter, "_AsyncAwaitCompleter")                              \
   V(_AsyncAwaitCompleterConstructor, "_AsyncAwaitCompleter.")                  \
   V(_AsyncAwaitCompleterStart, "_AsyncAwaitCompleter.start")                   \
   V(_AsyncAwaitStart, "start")                                                 \
-  V(CompleterFuture, "future")                                                 \
-  V(CompleterGetFuture, "get:future")                                          \
-  V(StreamIterator, "StreamIterator")                                          \
-  V(StreamIteratorConstructor, "StreamIterator.")                              \
-  V(Native, "native")                                                          \
-  V(Class, "Class")                                                            \
-  V(Null, "Null")                                                              \
-  V(null, "null")                                                              \
-  V(Dynamic, "dynamic")                                                        \
-  V(Type, "Type")                                                              \
-  V(_Type, "_Type")                                                            \
-  V(_TypeRef, "_TypeRef")                                                      \
-  V(_TypeParameter, "_TypeParameter")                                          \
-  V(TypeArguments, "TypeArguments")                                            \
-  V(Patch, "patch")                                                            \
-  V(Pragma, "pragma")                                                          \
-  V(PatchClass, "PatchClass")                                                  \
-  V(Function, "Function")                                                      \
+  V(_AsyncStarListenHelper, "_asyncStarListenHelper")                          \
+  V(_AsyncStarStreamController, "_AsyncStarStreamController")                  \
+  V(_AsyncStarStreamControllerConstructor, "_AsyncStarStreamController.")      \
+  V(_Awaiter, "_awaiter")                                                      \
+  V(_ByteBuffer, "_ByteBuffer")                                                \
+  V(_ByteBufferDot_New, "_ByteBuffer._New")                                    \
+  V(_ByteDataView, "_ByteDataView")                                            \
+  V(_CapabilityImpl, "_CapabilityImpl")                                        \
   V(_Closure, "_Closure")                                                      \
   V(_ClosureCall, "_Closure.call")                                             \
-  V(FunctionResult, "function result")                                         \
-  V(FactoryResult, "factory result")                                           \
-  V(ClosureData, "ClosureData")                                                \
-  V(SignatureData, "SignatureData")                                            \
-  V(RedirectionData, "RedirectionData")                                        \
-  V(FfiTrampolineData, "FfiTrampolineData")                                    \
-  V(Field, "Field")                                                            \
-  V(Script, "Script")                                                          \
-  V(LibraryClass, "Library")                                                   \
-  V(LibraryPrefix, "LibraryPrefix")                                            \
-  V(Namespace, "Namespace")                                                    \
-  V(KernelProgramInfo, "KernelProgramInfo")                                    \
-  V(Code, "Code")                                                              \
-  V(Bytecode, "Bytecode")                                                      \
-  V(Instructions, "Instructions")                                              \
-  V(ObjectPool, "ObjectPool")                                                  \
-  V(PcDescriptors, "PcDescriptors")                                            \
-  V(CodeSourceMap, "CodeSourceMap")                                            \
-  V(StackMap, "StackMap")                                                      \
-  V(LocalVarDescriptors, "LocalVarDescriptors")                                \
-  V(ExceptionHandlers, "ExceptionHandlers")                                    \
-  V(DeoptInfo, "DeoptInfo")                                                    \
-  V(Context, "Context")                                                        \
-  V(ContextScope, "ContextScope")                                              \
-  V(SingleTargetCache, "SingleTargetCache")                                    \
-  V(UnlinkedCall, "UnlinkedCall")                                              \
-  V(ICData, "ICData")                                                          \
-  V(MegamorphicCache, "MegamorphicCache")                                      \
-  V(SubtypeTestCache, "SubtypeTestCache")                                      \
-  V(Error, "Error")                                                            \
-  V(ApiError, "ApiError")                                                      \
-  V(LanguageError, "LanguageError")                                            \
-  V(UnhandledException, "UnhandledException")                                  \
-  V(UnwindError, "UnwindError")                                                \
-  V(_IntegerImplementation, "_IntegerImplementation")                          \
-  V(Number, "num")                                                             \
-  V(_Smi, "_Smi")                                                              \
-  V(_Mint, "_Mint")                                                            \
+  V(_CompileTimeError, "_CompileTimeError")                                    \
+  V(_CompleteOnAsyncReturn, "_completeOnAsyncReturn")                          \
+  V(_DeletedEnumPrefix, "Deleted enum value from ")                            \
+  V(_DeletedEnumSentinel, "_deleted_enum_sentinel")                            \
   V(_Double, "_Double")                                                        \
-  V(Bool, "bool")                                                              \
-  V(_List, "_List")                                                            \
-  V(_ListFactory, "_List.")                                                    \
+  V(_EnumHelper, "_EnumHelper")                                                \
+  V(_EnumNames, "_enum_names")                                                 \
+  V(_ExternalFloat32Array, "_ExternalFloat32Array")                            \
+  V(_ExternalFloat32x4Array, "_ExternalFloat32x4Array")                        \
+  V(_ExternalFloat64Array, "_ExternalFloat64Array")                            \
+  V(_ExternalFloat64x2Array, "_ExternalFloat64x2Array")                        \
+  V(_ExternalInt16Array, "_ExternalInt16Array")                                \
+  V(_ExternalInt32Array, "_ExternalInt32Array")                                \
+  V(_ExternalInt32x4Array, "_ExternalInt32x4Array")                            \
+  V(_ExternalInt64Array, "_ExternalInt64Array")                                \
+  V(_ExternalInt8Array, "_ExternalInt8Array")                                  \
+  V(_ExternalUint16Array, "_ExternalUint16Array")                              \
+  V(_ExternalUint32Array, "_ExternalUint32Array")                              \
+  V(_ExternalUint64Array, "_ExternalUint64Array")                              \
+  V(_ExternalUint8Array, "_ExternalUint8Array")                                \
+  V(_ExternalUint8ClampedArray, "_ExternalUint8ClampedArray")                  \
+  V(_Float32ArrayFactory, "Float32List.")                                      \
+  V(_Float32ArrayView, "_Float32ArrayView")                                    \
+  V(_Float32List, "_Float32List")                                              \
+  V(_Float32x4, "_Float32x4")                                                  \
+  V(_Float32x4ArrayFactory, "Float32x4List.")                                  \
+  V(_Float32x4ArrayView, "_Float32x4ArrayView")                                \
+  V(_Float32x4List, "_Float32x4List")                                          \
+  V(_Float64ArrayFactory, "Float64List.")                                      \
+  V(_Float64ArrayView, "_Float64ArrayView")                                    \
+  V(_Float64List, "_Float64List")                                              \
+  V(_Float64x2, "_Float64x2")                                                  \
+  V(_Float64x2ArrayFactory, "Float64x2List.")                                  \
+  V(_Float64x2ArrayView, "_Float64x2ArrayView")                                \
+  V(_Float64x2List, "_Float64x2List")                                          \
   V(_GrowableList, "_GrowableList")                                            \
   V(_GrowableListFactory, "_GrowableList.")                                    \
   V(_GrowableListWithData, "_GrowableList.withData")                           \
   V(_ImmutableList, "_ImmutableList")                                          \
+  V(_Int16ArrayFactory, "Int16List.")                                          \
+  V(_Int16ArrayView, "_Int16ArrayView")                                        \
+  V(_Int16List, "_Int16List")                                                  \
+  V(_Int32ArrayFactory, "Int32List.")                                          \
+  V(_Int32ArrayView, "_Int32ArrayView")                                        \
+  V(_Int32List, "_Int32List")                                                  \
+  V(_Int32x4, "_Int32x4")                                                      \
+  V(_Int32x4ArrayFactory, "Int32x4List.")                                      \
+  V(_Int32x4ArrayView, "_Int32x4ArrayView")                                    \
+  V(_Int32x4List, "_Int32x4List")                                              \
+  V(_Int64ArrayFactory, "Int64List.")                                          \
+  V(_Int64ArrayView, "_Int64ArrayView")                                        \
+  V(_Int64List, "_Int64List")                                                  \
+  V(_Int8ArrayFactory, "Int8List.")                                            \
+  V(_Int8ArrayView, "_Int8ArrayView")                                          \
+  V(_Int8List, "_Int8List")                                                    \
+  V(_IntegerImplementation, "_IntegerImplementation")                          \
+  V(_LibraryPrefix, "_LibraryPrefix")                                          \
   V(_LinkedHashMap, "_InternalLinkedHashMap")                                  \
   V(_LinkedHashSet, "_CompactLinkedHashSet")                                   \
-  V(_rehashObjects, "_rehashObjects")                                          \
-  V(_String, "String")                                                         \
-  V(OneByteString, "_OneByteString")                                           \
-  V(TwoByteString, "_TwoByteString")                                           \
-  V(ExternalOneByteString, "_ExternalOneByteString")                           \
-  V(ExternalTwoByteString, "_ExternalTwoByteString")                           \
-  V(_CapabilityImpl, "_CapabilityImpl")                                        \
-  V(_RawReceivePortImpl, "_RawReceivePortImpl")                                \
-  V(_SendPortImpl, "_SendPortImpl")                                            \
-  V(_StackTrace, "_StackTrace")                                                \
-  V(_RegExp, "_RegExp")                                                        \
-  V(RegExp, "RegExp")                                                          \
-  V(ColonMatcher, ":matcher")                                                  \
-  V(ColonStream, ":stream")                                                    \
-  V(Object, "Object")                                                          \
-  V(Int, "int")                                                                \
-  V(Double, "double")                                                          \
-  V(Float32x4, "Float32x4")                                                    \
-  V(Float64x2, "Float64x2")                                                    \
-  V(Int32x4, "Int32x4")                                                        \
-  V(_Float32x4, "_Float32x4")                                                  \
-  V(_Float64x2, "_Float64x2")                                                  \
-  V(_Int32x4, "_Int32x4")                                                      \
-  V(Int8List, "Int8List")                                                      \
-  V(Uint8List, "Uint8List")                                                    \
-  V(Uint8ClampedList, "Uint8ClampedList")                                      \
-  V(Int16List, "Int16List")                                                    \
-  V(Uint16List, "Uint16List")                                                  \
-  V(Int32List, "Int32List")                                                    \
-  V(Uint32List, "Uint32List")                                                  \
-  V(Int64List, "Int64List")                                                    \
-  V(Uint64List, "Uint64List")                                                  \
-  V(Float32x4List, "Float32x4List")                                            \
-  V(Int32x4List, "Int32x4List")                                                \
-  V(Float64x2List, "Float64x2List")                                            \
-  V(Float32List, "Float32List")                                                \
-  V(Float64List, "Float64List")                                                \
-  V(_Int8List, "_Int8List")                                                    \
-  V(_Uint8List, "_Uint8List")                                                  \
-  V(_Uint8ClampedList, "_Uint8ClampedList")                                    \
-  V(_Int16List, "_Int16List")                                                  \
-  V(_Uint16List, "_Uint16List")                                                \
-  V(_Int32List, "_Int32List")                                                  \
-  V(_Uint32List, "_Uint32List")                                                \
-  V(_Int64List, "_Int64List")                                                  \
-  V(_Uint64List, "_Uint64List")                                                \
-  V(_Float32x4List, "_Float32x4List")                                          \
-  V(_Int32x4List, "_Int32x4List")                                              \
-  V(_Float64x2List, "_Float64x2List")                                          \
-  V(_Float32List, "_Float32List")                                              \
-  V(_Float64List, "_Float64List")                                              \
-  V(_Int8ArrayFactory, "Int8List.")                                            \
-  V(_Uint8ArrayFactory, "Uint8List.")                                          \
-  V(_Uint8ClampedArrayFactory, "Uint8ClampedList.")                            \
-  V(_Int16ArrayFactory, "Int16List.")                                          \
-  V(_Uint16ArrayFactory, "Uint16List.")                                        \
-  V(_Int32ArrayFactory, "Int32List.")                                          \
-  V(_Uint32ArrayFactory, "Uint32List.")                                        \
-  V(_Int64ArrayFactory, "Int64List.")                                          \
-  V(_Uint64ArrayFactory, "Uint64List.")                                        \
-  V(_Float32x4ArrayFactory, "Float32x4List.")                                  \
-  V(_Int32x4ArrayFactory, "Int32x4List.")                                      \
-  V(_Float64x2ArrayFactory, "Float64x2List.")                                  \
-  V(_Float32ArrayFactory, "Float32List.")                                      \
-  V(_Float64ArrayFactory, "Float64List.")                                      \
-  V(_Int8ArrayView, "_Int8ArrayView")                                          \
-  V(_Uint8ArrayView, "_Uint8ArrayView")                                        \
-  V(_Uint8ClampedArrayView, "_Uint8ClampedArrayView")                          \
-  V(_Int16ArrayView, "_Int16ArrayView")                                        \
-  V(_Uint16ArrayView, "_Uint16ArrayView")                                      \
-  V(_Int32ArrayView, "_Int32ArrayView")                                        \
-  V(_Uint32ArrayView, "_Uint32ArrayView")                                      \
-  V(_Int64ArrayView, "_Int64ArrayView")                                        \
-  V(_Uint64ArrayView, "_Uint64ArrayView")                                      \
-  V(_Float32ArrayView, "_Float32ArrayView")                                    \
-  V(_Float64ArrayView, "_Float64ArrayView")                                    \
-  V(_Float32x4ArrayView, "_Float32x4ArrayView")                                \
-  V(_Int32x4ArrayView, "_Int32x4ArrayView")                                    \
-  V(_Float64x2ArrayView, "_Float64x2ArrayView")                                \
-  V(_ExternalInt8Array, "_ExternalInt8Array")                                  \
-  V(_ExternalUint8Array, "_ExternalUint8Array")                                \
-  V(_ExternalUint8ClampedArray, "_ExternalUint8ClampedArray")                  \
-  V(_ExternalInt16Array, "_ExternalInt16Array")                                \
-  V(_ExternalUint16Array, "_ExternalUint16Array")                              \
-  V(_ExternalInt32Array, "_ExternalInt32Array")                                \
-  V(_ExternalUint32Array, "_ExternalUint32Array")                              \
-  V(_ExternalInt64Array, "_ExternalInt64Array")                                \
-  V(_ExternalUint64Array, "_ExternalUint64Array")                              \
-  V(_ExternalFloat32x4Array, "_ExternalFloat32x4Array")                        \
-  V(_ExternalInt32x4Array, "_ExternalInt32x4Array")                            \
-  V(_ExternalFloat32Array, "_ExternalFloat32Array")                            \
-  V(_ExternalFloat64Array, "_ExternalFloat64Array")                            \
-  V(_ExternalFloat64x2Array, "_ExternalFloat64x2Array")                        \
-  V(ByteData, "ByteData")                                                      \
-  V(ByteDataDot, "ByteData.")                                                  \
-  V(ByteDataDot_view, "ByteData._view")                                        \
-  V(_ByteDataView, "_ByteDataView")                                            \
-  V(_ByteBuffer, "_ByteBuffer")                                                \
-  V(_ByteBufferDot_New, "_ByteBuffer._New")                                    \
-  V(_WeakProperty, "_WeakProperty")                                            \
-  V(_MirrorReference, "_MirrorReference")                                      \
-  V(FreeListElement, "FreeListElement")                                        \
-  V(ForwardingCorpse, "ForwardingCorpse")                                      \
-  V(InvocationMirror, "_InvocationMirror")                                     \
-  V(AllocateInvocationMirror, "_allocateInvocationMirror")                     \
-  V(AllocateInvocationMirrorForClosure, "_allocateInvocationMirrorForClosure") \
-  V(toString, "toString")                                                      \
-  V(_lookupHandler, "_lookupHandler")                                          \
-  V(_handleMessage, "_handleMessage")                                          \
-  V(DotCreate, "._create")                                                     \
-  V(DotWithType, "._withType")                                                 \
-  V(_get, "_get")                                                              \
-  V(RangeError, "RangeError")                                                  \
-  V(DotRange, ".range")                                                        \
-  V(ArgumentError, "ArgumentError")                                            \
-  V(DotValue, ".value")                                                        \
-  V(FormatException, "FormatException")                                        \
-  V(UnsupportedError, "UnsupportedError")                                      \
-  V(StackOverflowError, "StackOverflowError")                                  \
-  V(OutOfMemoryError, "OutOfMemoryError")                                      \
-  V(NullThrownError, "NullThrownError")                                        \
-  V(IsolateSpawnException, "IsolateSpawnException")                            \
-  V(BooleanExpression, "boolean expression")                                   \
-  V(MegamorphicMiss, "megamorphic_miss")                                       \
-  V(CommaSpace, ", ")                                                          \
-  V(RParenArrow, ") => ")                                                      \
-  V(SpaceExtendsSpace, " extends ")                                            \
-  V(SpaceWhereNewLine, " where\n")                                             \
-  V(SpaceIsFromSpace, " is from ")                                             \
-  V(InTypeCast, " in type cast")                                               \
-  V(TypeQuote, "type '")                                                       \
-  V(QuoteIsNotASubtypeOf, "' is not a subtype of ")                            \
-  V(SpaceOfSpace, " of ")                                                      \
-  V(SwitchExpr, ":switch_expr")                                                \
-  V(TwoNewlines, "\n\n")                                                       \
-  V(TwoSpaces, "  ")                                                           \
-  V(_instanceOf, "_instanceOf")                                                \
-  V(_simpleInstanceOf, "_simpleInstanceOf")                                    \
-  V(_simpleInstanceOfTrue, "_simpleInstanceOfTrue")                            \
-  V(_simpleInstanceOfFalse, "_simpleInstanceOfFalse")                          \
-  V(GetterPrefix, "get:")                                                      \
-  V(SetterPrefix, "set:")                                                      \
-  V(InitPrefix, "init:")                                                       \
-  V(DynamicPrefix, "dyn:")                                                     \
-  V(Index, "index")                                                            \
-  V(DartScheme, "dart:")                                                       \
-  V(DartSchemePrivate, "dart:_")                                               \
-  V(DartExtensionScheme, "dart-ext:")                                          \
-  V(DartInternalPackage, "package:dart_internal/")                             \
-  V(DartNativeWrappers, "dart:nativewrappers")                                 \
-  V(DartNativeWrappersLibName, "nativewrappers")                               \
-  V(DartCore, "dart:core")                                                     \
-  V(DartCollection, "dart:collection")                                         \
-  V(DartDeveloper, "dart:developer")                                           \
-  V(DartFfi, "dart:ffi")                                                       \
-  V(DartFfiLibName, "ffi")                                                     \
-  V(DartInternal, "dart:_internal")                                            \
-  V(DartIsolate, "dart:isolate")                                               \
-  V(DartMirrors, "dart:mirrors")                                               \
-  V(DartTypedData, "dart:typed_data")                                          \
-  V(DartVMService, "dart:_vmservice")                                          \
-  V(DartIOLibName, "dart.io")                                                  \
-  V(DartVMProduct, "dart.vm.product")                                          \
-  V(DartDeveloperTimeline, "dart.developer.timeline")                          \
-  V(EvalSourceUri, "evaluate:source")                                          \
-  V(ExternalName, "ExternalName")                                              \
-  V(_Random, "_Random")                                                        \
-  V(_state, "_state")                                                          \
-  V(_stackTrace, "_stackTrace")                                                \
-  V(_SpecialTypeMirror, "_SpecialTypeMirror")                                  \
+  V(_List, "_List")                                                            \
+  V(_ListFactory, "_List.")                                                    \
   V(_LocalClassMirror, "_LocalClassMirror")                                    \
-  V(_LocalFunctionTypeMirror, "_LocalFunctionTypeMirror")                      \
-  V(_LocalLibraryMirror, "_LocalLibraryMirror")                                \
-  V(_LocalLibraryDependencyMirror, "_LocalLibraryDependencyMirror")            \
   V(_LocalCombinatorMirror, "_LocalCombinatorMirror")                          \
-  V(_LocalMethodMirror, "_LocalMethodMirror")                                  \
-  V(_LocalVariableMirror, "_LocalVariableMirror")                              \
-  V(_LocalParameterMirror, "_LocalParameterMirror")                            \
+  V(_LocalFunctionTypeMirror, "_LocalFunctionTypeMirror")                      \
   V(_LocalIsolateMirror, "_LocalIsolateMirror")                                \
+  V(_LocalLibraryDependencyMirror, "_LocalLibraryDependencyMirror")            \
+  V(_LocalLibraryMirror, "_LocalLibraryMirror")                                \
+  V(_LocalMethodMirror, "_LocalMethodMirror")                                  \
   V(_LocalMirrorSystem, "_LocalMirrorSystem")                                  \
-  V(_LocalTypedefMirror, "_LocalTypedefMirror")                                \
+  V(_LocalParameterMirror, "_LocalParameterMirror")                            \
   V(_LocalTypeVariableMirror, "_LocalTypeVariableMirror")                      \
+  V(_LocalTypedefMirror, "_LocalTypedefMirror")                                \
+  V(_LocalVariableMirror, "_LocalVariableMirror")                              \
+  V(_Mint, "_Mint")                                                            \
+  V(_MirrorReference, "_MirrorReference")                                      \
+  V(_Random, "_Random")                                                        \
+  V(_RawReceivePortImpl, "_RawReceivePortImpl")                                \
+  V(_RegExp, "_RegExp")                                                        \
+  V(_SendPortImpl, "_SendPortImpl")                                            \
+  V(_Smi, "_Smi")                                                              \
   V(_SourceLocation, "_SourceLocation")                                        \
-  V(hashCode, "get:hashCode")                                                  \
-  V(identityHashCode, "identityHashCode")                                      \
-  V(OptimizedOut, "<optimized out>")                                           \
-  V(NotInitialized, "<not initialized>")                                       \
-  V(NotNamed, "<not named>")                                                   \
-  V(OriginalParam, ":original:")                                               \
-  V(TempParam, ":temp_param")                                                  \
+  V(_SpecialTypeMirror, "_SpecialTypeMirror")                                  \
+  V(_StackTrace, "_StackTrace")                                                \
+  V(_StreamImpl, "_StreamImpl")                                                \
+  V(_String, "String")                                                         \
+  V(_SyncIterable, "_SyncIterable")                                            \
+  V(_SyncIterableConstructor, "_SyncIterable.")                                \
+  V(_SyncIterator, "_SyncIterator")                                            \
+  V(_Type, "_Type")                                                            \
+  V(_TypeParameter, "_TypeParameter")                                          \
+  V(_TypeRef, "_TypeRef")                                                      \
+  V(_Uint16ArrayFactory, "Uint16List.")                                        \
+  V(_Uint16ArrayView, "_Uint16ArrayView")                                      \
+  V(_Uint16List, "_Uint16List")                                                \
+  V(_Uint32ArrayFactory, "Uint32List.")                                        \
+  V(_Uint32ArrayView, "_Uint32ArrayView")                                      \
+  V(_Uint32List, "_Uint32List")                                                \
+  V(_Uint64ArrayFactory, "Uint64List.")                                        \
+  V(_Uint64ArrayView, "_Uint64ArrayView")                                      \
+  V(_Uint64List, "_Uint64List")                                                \
+  V(_Uint8ArrayFactory, "Uint8List.")                                          \
+  V(_Uint8ArrayView, "_Uint8ArrayView")                                        \
+  V(_Uint8ClampedArrayFactory, "Uint8ClampedList.")                            \
+  V(_Uint8ClampedArrayView, "_Uint8ClampedArrayView")                          \
+  V(_Uint8ClampedList, "_Uint8ClampedList")                                    \
+  V(_Uint8List, "_Uint8List")                                                  \
   V(_UserTag, "_UserTag")                                                      \
-  V(Default, "Default")                                                        \
-  V(ClassID, "ClassID")                                                        \
-  V(getID, "getID")                                                            \
-  V(DartIsVM, "dart.isVM")                                                     \
-  V(stack, ":stack")                                                           \
-  V(stack_pointer, ":stack_pointer")                                           \
-  V(current_character, ":current_character")                                   \
-  V(current_position, ":current_position")                                     \
-  V(string_param_length, ":string_param_length")                               \
-  V(capture_length, ":capture_length")                                         \
-  V(word_character_map, ":word_character_map")                                 \
-  V(match_start_index, ":match_start_index")                                   \
-  V(capture_start_index, ":capture_start_index")                               \
-  V(match_end_index, ":match_end_index")                                       \
-  V(char_in_capture, ":char_in_capture")                                       \
-  V(char_in_match, ":char_in_match")                                           \
-  V(index_temp, ":index_temp")                                                 \
-  V(result, ":result")                                                         \
-  V(position_registers, ":position_registers")                                 \
-  V(string_param, ":string_param")                                             \
-  V(start_index_param, ":start_index_param")                                   \
-  V(clear, "clear")                                                            \
-  V(_wordCharacterMap, "_wordCharacterMap")                                    \
-  V(print, "print")                                                            \
-  V(last, "last")                                                              \
-  V(removeLast, "removeLast")                                                  \
-  V(add, "add")                                                                \
-  V(ConstructorStacktracePrefix, "new ")                                       \
-  V(_runExtension, "_runExtension")                                            \
-  V(_runPendingImmediateCallback, "_runPendingImmediateCallback")              \
-  V(_ensureScheduleImmediate, "_ensureScheduleImmediate")                      \
-  V(DartLibrary, "dart.library.")                                              \
-  V(DartLibraryMirrors, "dart.library.mirrors")                                \
-  V(DartLibraryFfi, "dart.library.ffi")                                        \
-  V(_name, "_name")                                                            \
-  V(name, "name")                                                              \
-  V(options, "options")                                                        \
+  V(_WeakProperty, "_WeakProperty")                                            \
   V(_classRangeCheck, "_classRangeCheck")                                      \
   V(_classRangeCheckNegative, "_classRangeCheckNegative")                      \
-  V(GetRuntimeType, "get:runtimeType")                                         \
-  V(HaveSameRuntimeType, "_haveSameRuntimeType")                               \
-  V(PrependTypeArguments, "_prependTypeArguments")                             \
-  V(DartDeveloperCausalAsyncStacks, "dart.developer.causal_async_stacks")      \
-  V(_AsyncStarListenHelper, "_asyncStarListenHelper")                          \
-  V(GrowRegExpStack, "_growRegExpStack")                                       \
-  V(DebugProcedureName, ":Eval")                                               \
-  V(DebugClassName, "#DebugClass")                                             \
+  V(_current, "_current")                                                      \
+  V(_ensureScheduleImmediate, "_ensureScheduleImmediate")                      \
+  V(_get, "_get")                                                              \
+  V(_handleMessage, "_handleMessage")                                          \
+  V(_instanceOf, "_instanceOf")                                                \
+  V(_lookupHandler, "_lookupHandler")                                          \
+  V(_name, "_name")                                                            \
+  V(_rehashObjects, "_rehashObjects")                                          \
+  V(_runExtension, "_runExtension")                                            \
+  V(_runPendingImmediateCallback, "_runPendingImmediateCallback")              \
+  V(_setLength, "_setLength")                                                  \
+  V(_simpleInstanceOf, "_simpleInstanceOf")                                    \
+  V(_simpleInstanceOfFalse, "_simpleInstanceOfFalse")                          \
+  V(_simpleInstanceOfTrue, "_simpleInstanceOfTrue")                            \
+  V(_stackTrace, "_stackTrace")                                                \
+  V(_state, "_state")                                                          \
+  V(_wordCharacterMap, "_wordCharacterMap")                                    \
+  V(_yieldEachIterable, "_yieldEachIterable")                                  \
+  V(add, "add")                                                                \
+  V(capture_length, ":capture_length")                                         \
+  V(capture_start_index, ":capture_start_index")                               \
+  V(char_in_capture, ":char_in_capture")                                       \
+  V(char_in_match, ":char_in_match")                                           \
+  V(clear, "clear")                                                            \
+  V(current_character, ":current_character")                                   \
+  V(current_position, ":current_position")                                     \
+  V(getID, "getID")                                                            \
+  V(hashCode, "get:hashCode")                                                  \
+  V(identityHashCode, "identityHashCode")                                      \
+  V(index_temp, ":index_temp")                                                 \
+  V(isPaused, "isPaused")                                                      \
+  V(last, "last")                                                              \
+  V(match_end_index, ":match_end_index")                                       \
+  V(match_start_index, ":match_start_index")                                   \
+  V(name, "name")                                                              \
+  V(null, "null")                                                              \
+  V(options, "options")                                                        \
+  V(position_registers, ":position_registers")                                 \
+  V(print, "print")                                                            \
+  V(removeLast, "removeLast")                                                  \
+  V(result, ":result")                                                         \
+  V(stack, ":stack")                                                           \
+  V(stack_pointer, ":stack_pointer")                                           \
+  V(start_index_param, ":start_index_param")                                   \
+  V(string_param, ":string_param")                                             \
+  V(string_param_length, ":string_param_length")                               \
+  V(toString, "toString")                                                      \
   V(vm_entry_point, "vm:entry-point")                                          \
-  V(vm_non_nullable_result_type, "vm:non-nullable-result-type")                \
   V(vm_exact_result_type, "vm:exact-result-type")                              \
-  V(Get, "get")                                                                \
-  V(Set, "set")                                                                \
+  V(vm_non_nullable_result_type, "vm:non-nullable-result-type")                \
   V(vm_trace_entrypoints, "vm:testing.unsafe.trace-entrypoints-fn")            \
-  V(BoundsCheckForPartialInstantiation, "_boundsCheckForPartialInstantiation") \
-  V(FfiPointer, "Pointer")                                                     \
-  V(FfiNativeFunction, "NativeFunction")                                       \
-  V(FfiInt8, "Int8")                                                           \
-  V(FfiInt16, "Int16")                                                         \
-  V(FfiInt32, "Int32")                                                         \
-  V(FfiInt64, "Int64")                                                         \
-  V(FfiUint8, "Uint8")                                                         \
-  V(FfiUint16, "Uint16")                                                       \
-  V(FfiUint32, "Uint32")                                                       \
-  V(FfiUint64, "Uint64")                                                       \
-  V(FfiIntPtr, "IntPtr")                                                       \
-  V(FfiFloat, "Float")                                                         \
-  V(FfiDouble, "Double")                                                       \
-  V(FfiVoid, "Void")                                                           \
-  V(FfiNativeType, "NativeType")                                               \
-  V(FfiDynamicLibrary, "DynamicLibrary")
+  V(word_character_map, ":word_character_map")
 
 // Contains a list of frequently used strings in a canonicalized form. This
 // list is kept in the vm_isolate in order to share the copy across isolates
diff --git a/runtime/vm/thread.cc b/runtime/vm/thread.cc
index b204514..8ea5953 100644
--- a/runtime/vm/thread.cc
+++ b/runtime/vm/thread.cc
@@ -74,6 +74,7 @@
       unboxed_int64_runtime_arg_(0),
       active_exception_(Object::null()),
       active_stacktrace_(Object::null()),
+      global_object_pool_(ObjectPool::null()),
       resume_pc_(0),
       task_kind_(kUnknownTask),
       dart_stream_(NULL),
@@ -663,6 +664,7 @@
   reusable_handles_.VisitObjectPointers(visitor);
 
   visitor->VisitPointer(reinterpret_cast<RawObject**>(&pending_functions_));
+  visitor->VisitPointer(reinterpret_cast<RawObject**>(&global_object_pool_));
   visitor->VisitPointer(reinterpret_cast<RawObject**>(&active_exception_));
   visitor->VisitPointer(reinterpret_cast<RawObject**>(&active_stacktrace_));
   visitor->VisitPointer(reinterpret_cast<RawObject**>(&sticky_error_));
@@ -740,7 +742,7 @@
   // [object] is in fact a [Code] object.
   if (object.IsCode()) {
 #define COMPUTE_OFFSET(type_name, member_name, expr, default_init_value)       \
-  ASSERT((expr)->IsReadOnly());                                                \
+  ASSERT((expr)->InVMIsolateHeap());                                           \
   if (object.raw() == expr) {                                                  \
     return Thread::member_name##offset();                                      \
   }
diff --git a/runtime/vm/thread.h b/runtime/vm/thread.h
index 1c89d5d..49d1ba8 100644
--- a/runtime/vm/thread.h
+++ b/runtime/vm/thread.h
@@ -127,8 +127,7 @@
 #define CACHED_NON_VM_STUB_LIST(V)                                             \
   V(RawObject*, object_null_, Object::null(), NULL)                            \
   V(RawBool*, bool_true_, Object::bool_true().raw(), NULL)                     \
-  V(RawBool*, bool_false_, Object::bool_false().raw(), NULL)                   \
-  V(RawObjectPool*, global_object_pool_, ObjectPool::null(), NULL)
+  V(RawBool*, bool_false_, Object::bool_false().raw(), NULL)
 
 // List of VM-global objects/addresses cached in each Thread object.
 // Important: constant false must immediately follow constant true.
@@ -567,6 +566,10 @@
   RawGrowableObjectArray* pending_functions();
   void clear_pending_functions();
 
+  static intptr_t global_object_pool_offset() {
+    return OFFSET_OF(Thread, global_object_pool_);
+  }
+
   RawObject* active_exception() const { return active_exception_; }
   void set_active_exception(const Object& value);
   static intptr_t active_exception_offset() {
@@ -830,6 +833,7 @@
   // JumpToExceptionHandler state:
   RawObject* active_exception_;
   RawObject* active_stacktrace_;
+  RawObjectPool* global_object_pool_;
   uword resume_pc_;
 
   // ---- End accessed from generated code. ----
diff --git a/runtime/vm/timeline.h b/runtime/vm/timeline.h
index 1d1462a..37e5af9 100644
--- a/runtime/vm/timeline.h
+++ b/runtime/vm/timeline.h
@@ -457,8 +457,7 @@
   TimelineDurationScope tds(thread, Timeline::GetCompilerStream(), name);      \
   if (tds.enabled()) {                                                         \
     tds.SetNumArguments(1);                                                    \
-    tds.CopyArgument(0, "function",                                            \
-                     function.ToLibNamePrefixedQualifiedCString());            \
+    tds.CopyArgument(0, "function", function.ToQualifiedCString());            \
   }
 
 #define TIMELINE_FUNCTION_GC_DURATION(thread, name)                            \
diff --git a/runtime/vm/virtual_memory_posix.cc b/runtime/vm/virtual_memory_posix.cc
index 5751e7f..fb1fff2 100644
--- a/runtime/vm/virtual_memory_posix.cc
+++ b/runtime/vm/virtual_memory_posix.cc
@@ -136,6 +136,10 @@
                                               intptr_t alignment,
                                               bool is_executable,
                                               const char* name) {
+#if defined(TARGET_ARCH_DBC)
+  RELEASE_ASSERT(!is_executable);
+#endif
+
   // When FLAG_write_protect_code is active, code memory (indicated by
   // is_executable = true) is allocated as non-executable and later
   // changed to executable via VirtualMemory::Protect.
@@ -217,6 +221,9 @@
 }
 
 void VirtualMemory::Protect(void* address, intptr_t size, Protection mode) {
+#if defined(TARGET_ARCH_DBC)
+  RELEASE_ASSERT((mode != kReadExecute) && (mode != kReadWriteExecute));
+#endif
 #if defined(DEBUG)
   Thread* thread = Thread::Current();
   ASSERT((thread == nullptr) || thread->IsMutatorThread() ||
diff --git a/runtime/vm/visitor.h b/runtime/vm/visitor.h
index 69ea746..a951b9a 100644
--- a/runtime/vm/visitor.h
+++ b/runtime/vm/visitor.h
@@ -15,6 +15,7 @@
 class Isolate;
 class RawObject;
 class RawFunction;
+class RawTypedDataView;
 
 // An object pointer visitor interface.
 class ObjectPointerVisitor {
@@ -24,6 +25,15 @@
 
   Isolate* isolate() const { return isolate_; }
 
+  // Visit pointers inside the given typed data [view].
+  //
+  // Range of pointers to visit 'first' <= pointer <= 'last'.
+  virtual void VisitTypedDataViewPointers(RawTypedDataView* view,
+                                          RawObject** first,
+                                          RawObject** last) {
+    VisitPointers(first, last);
+  }
+
   // Range of pointers to visit 'first' <= pointer <= 'last'.
   virtual void VisitPointers(RawObject** first, RawObject** last) = 0;
 
diff --git a/runtime/vm/vm_sources.gni b/runtime/vm/vm_sources.gni
index 4081d35..eadae4d 100644
--- a/runtime/vm/vm_sources.gni
+++ b/runtime/vm/vm_sources.gni
@@ -43,9 +43,11 @@
   "compilation_trace.cc",
   "compilation_trace.h",
   "constants_arm.h",
+  "constants_arm64.cc",
   "constants_arm64.h",
   "constants_dbc.h",
   "constants_ia32.h",
+  "constants_ia32.cc",
   "constants_kbc.h",
   "constants_x64.cc",
   "constants_x64.h",
@@ -92,7 +94,6 @@
   "dwarf.h",
   "exceptions.cc",
   "exceptions.h",
-  "ffi_trampoline_stubs_x64.cc",
   "finalizable_data.h",
   "fixed_cache.h",
   "flag_list.h",
diff --git a/samples/ffi/sqlite/.gitignore b/samples/ffi/sqlite/.gitignore
new file mode 100644
index 0000000..7a6bc2e
--- /dev/null
+++ b/samples/ffi/sqlite/.gitignore
@@ -0,0 +1,7 @@
+.dart_tool
+.gdb_history
+.packages
+.vscode
+pubspec.lock
+test.db
+test.db-journal
\ No newline at end of file
diff --git a/samples/ffi/sqlite/README.md b/samples/ffi/sqlite/README.md
new file mode 100644
index 0000000..85a26dd
--- /dev/null
+++ b/samples/ffi/sqlite/README.md
@@ -0,0 +1,41 @@
+# Sample code dart:ffi
+
+This is an illustrative sample for how to use `dart:ffi`.
+
+
+## Building and Running this Sample
+
+Building and running this sample is done through pub.
+Running `pub get` and `pub run example/main` should produce the following output.
+
+```sh
+$ pub get
+Resolving dependencies... (6.8s)
++ analyzer 0.35.4
+...
++ yaml 2.1.15
+Downloading analyzer 0.35.4...
+Downloading kernel 0.3.14...
+Downloading front_end 0.1.14...
+Changed 47 dependencies!
+Precompiling executables... (18.0s)
+Precompiled test:test.
+
+```
+
+```
+$ pub run example/main
+1 Chocolade chip cookie Chocolade cookie foo
+2 Ginger cookie null 42
+3 Cinnamon roll null null
+1 Chocolade chip cookie Chocolade cookie foo
+2 Ginger cookie null 42
+expected exception on accessing result data after close: The result has already been closed.
+expected this query to fail: no such column: non_existing_column (Code 1: SQL logic error)
+```
+
+## Tutorial
+
+A tutorial walking through the code is available in [docs/sqlite-tutorial.md](docs/sqlite-tutorial.md).
+For information on how to use this package within a Flutter app, see [docs/android.md].
+(Note: iOS is not yet supported).
diff --git a/samples/ffi/sqlite/docs/android.md b/samples/ffi/sqlite/docs/android.md
new file mode 100644
index 0000000..07f3e47
--- /dev/null
+++ b/samples/ffi/sqlite/docs/android.md
@@ -0,0 +1,53 @@
+**This documentation is for demonstration/testing purposes only!**
+
+# Using FFI with Flutter
+
+## Android
+
+Before using the FFI on Android, you need to procure an Android-compatible build of the native library you want to link against.
+It's important that the shared object(s) be compatible with ABI version you wish to target (or else, that you have multiple builds for different ABIs).
+See [https://developer.android.com/ndk/guides/abis] for more details on Android ABIs.
+Within Flutter, the target ABI is controlled by the `--target-platform` parameter to the `flutter` command.
+
+The workflow for packaging a native library will depend significantly on the library itself, but to illustrate the challenges at play, we'll demonstrate how to build the SQLite library from source to use with the FFI on an Android device.
+
+### Building SQLite for Android
+
+Every Android device ships with a copy of the SQLite library (`/system/lib/libsqlite.so`).
+Unfortunately, this library cannot be loaded directly by apps (see [https://developer.android.com/about/versions/nougat/android-7.0-changes#ndk]).
+It is accessible only through Java.
+Instead, we can build SQLite directly with the NDK.
+
+First, download the SQLite "amalgamation" source from [https://www.sqlite.org/download.html].
+For the sake of brevity, we'll assume the file has been saved as `sqlite-amalgamation-XXXXXXX.zip`, the Android SDK (with NDK extension) is available in `~/Android`, and we're on a Linux workstation.
+
+```sh
+unzip sqlite-amalgamation-XXXXXXX.zip
+cd sqlite-amalgamation-XXXXXXX
+~/Android/Sdk/ndk-bundle/toolchains/llvm/prebuilt/linux-x86_64/bin/aarch64-linux-android24-clang -c sqlite3.c -o sqlite3.o
+~/Android/Sdk/ndk-bundle/toolchains/llvm/prebuilt/linux-x86_64/bin/aarch64-linux-android-ld -shared sqlite3.o -o libsqlite3.so
+```
+
+Note the use of the `aarch64` prefix to the compiler: this indicates that we're building a shared object for the `arm64-v8a` ABI.
+This will be important later.
+
+### Update Gradle script
+
+Next we need to instruct Gradle to package this library with the app, so it will be available to load off the Android device at runtime.
+Create a folder `native-libraries` in the root folder of the app, and update the `android/app/build.gradle` file:
+
+```groovy
+android {
+    // ...
+    sourceSets {
+        main {
+            jniLibs.srcDir '${project.projectDir.path}/../../native-libraries'
+        }
+    }
+}
+```
+
+Within the `native-libraries` folder, the libraries are organized by ABI.
+Therefore, we must copy the compiled `libsqlite3.so` into `native-libraries/arm64-v8a/libsqlite3.so`.
+If multiple sub-directories are present, the libraries from the sub-directory corresponding to the target ABI will be available in the application's linking path, so the library can be loaded with `ffi.DynamicLibrary.open("libsqlite3.so")` in Dart.
+Finally, pass `--target-platform=android-arm64` to the `flutter` command when running or building the app since `libsqlite3.so` was compiled for the `arm64-v8a` ABI.
diff --git a/samples/ffi/sqlite/docs/lib/scenario-default.svg b/samples/ffi/sqlite/docs/lib/scenario-default.svg
new file mode 100644
index 0000000..6ffa8a3
--- /dev/null
+++ b/samples/ffi/sqlite/docs/lib/scenario-default.svg
@@ -0,0 +1,130 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
+<svg version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:xl="http://www.w3.org/1999/xlink" viewBox="27.846457 27.846457 426.19686 227.77166" width="426.19686" height="227.77166">
+  <defs>
+    <font-face font-family="Helvetica Neue" font-size="16" panose-1="2 0 5 3 0 0 0 2 0 4" units-per-em="1000" underline-position="-100" underline-thickness="50" slope="0" x-height="517" cap-height="714" ascent="951.9958" descent="-212.99744" font-weight="400">
+      <font-face-src>
+        <font-face-name name="HelveticaNeue"/>
+      </font-face-src>
+    </font-face>
+    <font-face font-family="Helvetica Neue" font-size="10" panose-1="2 0 5 3 0 0 0 2 0 4" units-per-em="1000" underline-position="-100" underline-thickness="50" slope="0" x-height="517" cap-height="714" ascent="951.9958" descent="-212.99744" font-weight="400">
+      <font-face-src>
+        <font-face-name name="HelveticaNeue"/>
+      </font-face-src>
+    </font-face>
+  </defs>
+  <metadata> Produced by OmniGraffle 7.9.4 
+    <dc:date>2019-03-13 09:56:08 +0000</dc:date>
+  </metadata>
+  <g id="Canvas_1" fill="none" fill-opacity="1" stroke="none" stroke-dasharray="none" stroke-opacity="1">
+    <title>Canvas 1</title>
+    <rect fill="white" x="27.846457" y="27.846457" width="426.19686" height="227.77166"/>
+    <g id="Canvas_1: Layer 1">
+      <title>Layer 1</title>
+      <g id="Graphic_3">
+        <rect x="28.346457" y="85.03937" width="85.03937" height="141.73229" fill="white"/>
+        <rect x="28.346457" y="85.03937" width="85.03937" height="141.73229" stroke="black" stroke-linecap="round" stroke-linejoin="round" stroke-width="1"/>
+        <text transform="translate(33.346457 110.00952)" fill="black">
+          <tspan font-family="Helvetica Neue" font-size="16" font-weight="400" fill="black" x="14.703685" y="15">Flutter </tspan>
+          <tspan font-family="Helvetica Neue" font-size="16" font-weight="400" fill="black" x="22.847685" y="33.448">App</tspan>
+          <tspan font-family="Helvetica Neue" font-size="16" font-weight="400" fill="black" x="8.031685" y="69.896">(Imports </tspan>
+          <tspan font-family="Helvetica Neue" font-size="16" font-weight="400" fill="black" x="4.775685" y="88.34399">package)</tspan>
+        </text>
+      </g>
+      <g id="Graphic_5">
+        <rect x="368.50395" y="85.03937" width="85.03937" height="141.73229" fill="white"/>
+        <rect x="368.50395" y="85.03937" width="85.03937" height="141.73229" stroke="black" stroke-linecap="round" stroke-linejoin="round" stroke-width="1"/>
+        <text transform="translate(373.50395 137.45752)" fill="black">
+          <tspan font-family="Helvetica Neue" font-size="16" font-weight="400" fill="black" x="14.855685" y="15">Native </tspan>
+          <tspan font-family="Helvetica Neue" font-size="16" font-weight="400" fill="black" x="12.927685" y="33.448">Library</tspan>
+        </text>
+      </g>
+      <g id="Graphic_6">
+        <rect x="311.81103" y="85.03937" width="56.692915" height="141.73229" fill="white"/>
+        <rect x="311.81103" y="85.03937" width="56.692915" height="141.73229" stroke="black" stroke-linecap="round" stroke-linejoin="round" stroke-width="1"/>
+        <text transform="translate(316.81103 146.68152)" fill="black">
+          <tspan font-family="Helvetica Neue" font-size="16" font-weight="400" fill="black" x=".5064575" y="15">dart:ffi</tspan>
+        </text>
+      </g>
+      <g id="Graphic_7">
+        <rect x="113.38583" y="85.03937" width="56.692915" height="141.73229" fill="white"/>
+        <rect x="113.38583" y="85.03937" width="56.692915" height="141.73229" stroke="black" stroke-linecap="round" stroke-linejoin="round" stroke-width="1"/>
+        <text transform="translate(118.38583 119.20552)" fill="black">
+          <tspan font-family="Helvetica Neue" font-size="10" font-weight="400" fill="black" x="3.9014575" y="10">Package </tspan>
+          <tspan font-family="Helvetica Neue" font-size="10" font-weight="400" fill="black" x="15.571457" y="22.28">API</tspan>
+          <tspan font-family="Helvetica Neue" font-size="10" font-weight="400" fill="black" x="1.8614575" y="46.56">(Does not </tspan>
+          <tspan font-family="Helvetica Neue" font-size="10" font-weight="400" fill="black" x="7.0514575" y="58.839996">expose </tspan>
+          <tspan font-family="Helvetica Neue" font-size="10" font-weight="400" fill="black" x="7.7764575" y="71.119995">dart:ffi)</tspan>
+        </text>
+      </g>
+      <g id="Graphic_8">
+        <rect x="28.346457" y="226.77166" width="311.81103" height="28.346457" fill="white"/>
+        <rect x="28.346457" y="226.77166" width="311.81103" height="28.346457" stroke="black" stroke-linecap="round" stroke-linejoin="round" stroke-width="1"/>
+        <text transform="translate(33.346457 231.7209)" fill="black">
+          <tspan font-family="Helvetica Neue" font-size="16" font-weight="400" fill="black" x="135.79352" y="15">Dart</tspan>
+        </text>
+      </g>
+      <g id="Graphic_9">
+        <rect x="340.1575" y="226.77166" width="113.38583" height="28.346457" fill="white"/>
+        <rect x="340.1575" y="226.77166" width="113.38583" height="28.346457" stroke="black" stroke-linecap="round" stroke-linejoin="round" stroke-width="1"/>
+        <text transform="translate(345.1575 231.7209)" fill="black">
+          <tspan font-family="Helvetica Neue" font-size="16" font-weight="400" fill="black" x="23.428915" y="15">C / C++</tspan>
+        </text>
+      </g>
+      <g id="Graphic_10">
+        <rect x="28.346457" y="28.346457" width="85.03937" height="56.692915" fill="white"/>
+        <rect x="28.346457" y="28.346457" width="85.03937" height="56.692915" stroke="black" stroke-linecap="round" stroke-linejoin="round" stroke-width="1"/>
+        <text transform="translate(33.346457 38.244917)" fill="black">
+          <tspan font-family="Helvetica Neue" font-size="16" font-weight="400" fill="black" x="22.847685" y="15">App </tspan>
+          <tspan font-family="Helvetica Neue" font-size="16" font-weight="400" fill="black" x="1.2236848" y="33.448">Developer</tspan>
+        </text>
+      </g>
+      <g id="Graphic_11">
+        <rect x="113.38583" y="28.346457" width="198.4252" height="56.692915" fill="white"/>
+        <rect x="113.38583" y="28.346457" width="198.4252" height="56.692915" stroke="black" stroke-linecap="round" stroke-linejoin="round" stroke-width="1"/>
+        <text transform="translate(118.38583 38.244917)" fill="black">
+          <tspan font-family="Helvetica Neue" font-size="16" font-weight="400" fill="black" x="63.1006" y="15">Package</tspan>
+          <tspan font-family="Helvetica Neue" font-size="16" font-weight="400" fill="black" x="57.9166" y="33.448">Developer</tspan>
+        </text>
+      </g>
+      <g id="Graphic_12">
+        <rect x="311.81103" y="28.346457" width="56.692915" height="56.692915" fill="white"/>
+        <rect x="311.81103" y="28.346457" width="56.692915" height="56.692915" stroke="black" stroke-linecap="round" stroke-linejoin="round" stroke-width="1"/>
+        <text transform="translate(316.81103 29.020918)" fill="black">
+          <tspan font-family="Helvetica Neue" font-size="16" font-weight="400" fill="black" x="8.234457" y="15">Dart </tspan>
+          <tspan font-family="Helvetica Neue" font-size="16" font-weight="400" fill="black" x="11.490457" y="33.448">VM </tspan>
+          <tspan font-family="Helvetica Neue" font-size="16" font-weight="400" fill="black" x="4.2264575" y="51.895996">Team</tspan>
+        </text>
+      </g>
+      <g id="Graphic_13">
+        <rect x="255.11812" y="85.03937" width="56.692915" height="141.73229" fill="white"/>
+        <rect x="255.11812" y="85.03937" width="56.692915" height="141.73229" stroke="black" stroke-linecap="round" stroke-linejoin="round" stroke-width="1"/>
+        <text transform="translate(260.11812 149.76552)" fill="black">
+          <tspan font-family="Helvetica Neue" font-size="10" font-weight="400" fill="black" x="3.8064575" y="10">Bindings</tspan>
+        </text>
+      </g>
+      <g id="Graphic_14">
+        <rect x="368.50395" y="28.346457" width="85.03937" height="56.692915" fill="white"/>
+        <rect x="368.50395" y="28.346457" width="85.03937" height="56.692915" stroke="black" stroke-linecap="round" stroke-linejoin="round" stroke-width="1"/>
+        <text transform="translate(373.50395 29.020918)" fill="black">
+          <tspan font-family="Helvetica Neue" font-size="16" font-weight="400" fill="black" x="14.855686" y="15">Native </tspan>
+          <tspan font-family="Helvetica Neue" font-size="16" font-weight="400" fill="black" x="12.927686" y="33.448">Library </tspan>
+          <tspan font-family="Helvetica Neue" font-size="16" font-weight="400" fill="black" x="1.2236862" y="51.895996">Developer</tspan>
+        </text>
+      </g>
+      <g id="Graphic_15">
+        <rect x="170.07874" y="85.03937" width="85.03937" height="141.73229" fill="white"/>
+        <rect x="170.07874" y="85.03937" width="85.03937" height="141.73229" stroke="black" stroke-linecap="round" stroke-linejoin="round" stroke-width="1"/>
+        <text transform="translate(175.07874 106.92552)" fill="black">
+          <tspan font-family="Helvetica Neue" font-size="10" font-weight="400" fill="black" x="18.074685" y="10">Package </tspan>
+          <tspan font-family="Helvetica Neue" font-size="10" font-weight="400" fill="black" x="2.8746848" y="22.28">Implementation</tspan>
+          <tspan font-family="Helvetica Neue" font-size="10" font-weight="400" fill="black" x="9.559685" y="46.56">(Code which </tspan>
+          <tspan font-family="Helvetica Neue" font-size="10" font-weight="400" fill="black" x="7.259685" y="58.839996">converts C++ </tspan>
+          <tspan font-family="Helvetica Neue" font-size="10" font-weight="400" fill="black" x=".1996848" y="71.119995">abstractions into </tspan>
+          <tspan font-family="Helvetica Neue" font-size="10" font-weight="400" fill="black" x="28.074685" y="83.39999">Dart </tspan>
+          <tspan font-family="Helvetica Neue" font-size="10" font-weight="400" fill="black" x="8.629685" y="95.67999">abstractions)</tspan>
+        </text>
+      </g>
+    </g>
+  </g>
+</svg>
diff --git a/samples/ffi/sqlite/docs/lib/scenario-full.svg b/samples/ffi/sqlite/docs/lib/scenario-full.svg
new file mode 100644
index 0000000..4ae18c5
--- /dev/null
+++ b/samples/ffi/sqlite/docs/lib/scenario-full.svg
@@ -0,0 +1,149 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
+<svg version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xl="http://www.w3.org/1999/xlink" xmlns:dc="http://purl.org/dc/elements/1.1/" viewBox="27.846457 27.846457 511.23623 227.77166" width="511.23623" height="227.77166">
+  <defs>
+    <font-face font-family="Helvetica Neue" font-size="16" panose-1="2 0 5 3 0 0 0 2 0 4" units-per-em="1000" underline-position="-100" underline-thickness="50" slope="0" x-height="517" cap-height="714" ascent="951.9958" descent="-212.99744" font-weight="400">
+      <font-face-src>
+        <font-face-name name="HelveticaNeue"/>
+      </font-face-src>
+    </font-face>
+    <font-face font-family="Helvetica Neue" font-size="10" panose-1="2 0 5 3 0 0 0 2 0 4" units-per-em="1000" underline-position="-100" underline-thickness="50" slope="0" x-height="517" cap-height="714" ascent="951.9958" descent="-212.99744" font-weight="400">
+      <font-face-src>
+        <font-face-name name="HelveticaNeue"/>
+      </font-face-src>
+    </font-face>
+  </defs>
+  <metadata> Produced by OmniGraffle 7.9.4 
+    <dc:date>2019-03-13 09:53:08 +0000</dc:date>
+  </metadata>
+  <g id="Canvas_1" stroke-opacity="1" stroke="none" stroke-dasharray="none" fill-opacity="1" fill="none">
+    <title>Canvas 1</title>
+    <rect fill="white" x="27.846457" y="27.846457" width="511.23623" height="227.77166"/>
+    <g id="Canvas_1: Layer 1">
+      <title>Layer 1</title>
+      <g id="Graphic_3">
+        <rect x="28.346457" y="85.03937" width="85.03937" height="141.73229" fill="white"/>
+        <rect x="28.346457" y="85.03937" width="85.03937" height="141.73229" stroke="black" stroke-linecap="round" stroke-linejoin="round" stroke-width="1"/>
+        <text transform="translate(33.346457 110.00952)" fill="black">
+          <tspan font-family="Helvetica Neue" font-size="16" font-weight="400" fill="black" x="14.703685" y="15">Flutter </tspan>
+          <tspan font-family="Helvetica Neue" font-size="16" font-weight="400" fill="black" x="22.847685" y="33.448">App</tspan>
+          <tspan font-family="Helvetica Neue" font-size="16" font-weight="400" fill="black" x="8.031685" y="69.896">(Imports </tspan>
+          <tspan font-family="Helvetica Neue" font-size="16" font-weight="400" fill="black" x="4.775685" y="88.34399">package)</tspan>
+        </text>
+      </g>
+      <g id="Graphic_5">
+        <rect x="453.5433" y="85.03937" width="85.03937" height="141.73229" fill="white"/>
+        <rect x="453.5433" y="85.03937" width="85.03937" height="141.73229" stroke="black" stroke-linecap="round" stroke-linejoin="round" stroke-width="1"/>
+        <text transform="translate(458.5433 137.45752)" fill="black">
+          <tspan font-family="Helvetica Neue" font-size="16" font-weight="400" fill="black" x="14.855685" y="15">Native </tspan>
+          <tspan font-family="Helvetica Neue" font-size="16" font-weight="400" fill="black" x="12.927685" y="33.448">Library</tspan>
+        </text>
+      </g>
+      <g id="Graphic_6">
+        <rect x="311.81103" y="85.03937" width="56.692915" height="141.73229" fill="white"/>
+        <rect x="311.81103" y="85.03937" width="56.692915" height="141.73229" stroke="black" stroke-linecap="round" stroke-linejoin="round" stroke-width="1"/>
+        <text transform="translate(316.81103 146.68152)" fill="black">
+          <tspan font-family="Helvetica Neue" font-size="16" font-weight="400" fill="black" x=".5064575" y="15">dart:ffi</tspan>
+        </text>
+      </g>
+      <g id="Graphic_7">
+        <rect x="113.38583" y="85.03937" width="56.692915" height="141.73229" fill="white"/>
+        <rect x="113.38583" y="85.03937" width="56.692915" height="141.73229" stroke="black" stroke-linecap="round" stroke-linejoin="round" stroke-width="1"/>
+        <text transform="translate(118.38583 119.20552)" fill="black">
+          <tspan font-family="Helvetica Neue" font-size="10" font-weight="400" fill="black" x="3.9014575" y="10">Package </tspan>
+          <tspan font-family="Helvetica Neue" font-size="10" font-weight="400" fill="black" x="15.571457" y="22.28">API</tspan>
+          <tspan font-family="Helvetica Neue" font-size="10" font-weight="400" fill="black" x="1.8614575" y="46.56">(Does not </tspan>
+          <tspan font-family="Helvetica Neue" font-size="10" font-weight="400" fill="black" x="7.0514575" y="58.839996">expose </tspan>
+          <tspan font-family="Helvetica Neue" font-size="10" font-weight="400" fill="black" x="7.7764575" y="71.119995">dart:ffi)</tspan>
+        </text>
+      </g>
+      <g id="Graphic_8">
+        <rect x="28.346457" y="226.77166" width="311.81103" height="28.346457" fill="white"/>
+        <rect x="28.346457" y="226.77166" width="311.81103" height="28.346457" stroke="black" stroke-linecap="round" stroke-linejoin="round" stroke-width="1"/>
+        <text transform="translate(33.346457 231.7209)" fill="black">
+          <tspan font-family="Helvetica Neue" font-size="16" font-weight="400" fill="black" x="135.79352" y="15">Dart</tspan>
+        </text>
+      </g>
+      <g id="Graphic_9">
+        <rect x="340.1575" y="226.77166" width="198.4252" height="28.346457" fill="white"/>
+        <rect x="340.1575" y="226.77166" width="198.4252" height="28.346457" stroke="black" stroke-linecap="round" stroke-linejoin="round" stroke-width="1"/>
+        <text transform="translate(345.1575 231.7209)" fill="black">
+          <tspan font-family="Helvetica Neue" font-size="16" font-weight="400" fill="black" x="65.9486" y="15">C / C++</tspan>
+        </text>
+      </g>
+      <g id="Graphic_10">
+        <rect x="28.346457" y="28.346457" width="85.03937" height="56.692915" fill="white"/>
+        <rect x="28.346457" y="28.346457" width="85.03937" height="56.692915" stroke="black" stroke-linecap="round" stroke-linejoin="round" stroke-width="1"/>
+        <text transform="translate(33.346457 38.244917)" fill="black">
+          <tspan font-family="Helvetica Neue" font-size="16" font-weight="400" fill="black" x="22.847685" y="15">App </tspan>
+          <tspan font-family="Helvetica Neue" font-size="16" font-weight="400" fill="black" x="1.2236848" y="33.448">Developer</tspan>
+        </text>
+      </g>
+      <g id="Graphic_11">
+        <rect x="113.38583" y="28.346457" width="198.4252" height="56.692915" fill="white"/>
+        <rect x="113.38583" y="28.346457" width="198.4252" height="56.692915" stroke="black" stroke-linecap="round" stroke-linejoin="round" stroke-width="1"/>
+        <text transform="translate(118.38583 38.244917)" fill="black">
+          <tspan font-family="Helvetica Neue" font-size="16" font-weight="400" fill="black" x="63.1006" y="15">Package</tspan>
+          <tspan font-family="Helvetica Neue" font-size="16" font-weight="400" fill="black" x="57.9166" y="33.448">Developer</tspan>
+        </text>
+      </g>
+      <g id="Graphic_12">
+        <rect x="311.81103" y="28.346457" width="56.692915" height="56.692915" fill="white"/>
+        <rect x="311.81103" y="28.346457" width="56.692915" height="56.692915" stroke="black" stroke-linecap="round" stroke-linejoin="round" stroke-width="1"/>
+        <text transform="translate(316.81103 29.020918)" fill="black">
+          <tspan font-family="Helvetica Neue" font-size="16" font-weight="400" fill="black" x="8.234457" y="15">Dart </tspan>
+          <tspan font-family="Helvetica Neue" font-size="16" font-weight="400" fill="black" x="11.490457" y="33.448">VM </tspan>
+          <tspan font-family="Helvetica Neue" font-size="16" font-weight="400" fill="black" x="4.2264575" y="51.895996">Team</tspan>
+        </text>
+      </g>
+      <g id="Graphic_13">
+        <rect x="255.11812" y="85.03937" width="56.692915" height="141.73229" fill="white"/>
+        <rect x="255.11812" y="85.03937" width="56.692915" height="141.73229" stroke="black" stroke-linecap="round" stroke-linejoin="round" stroke-width="1"/>
+        <text transform="translate(260.11812 149.76552)" fill="black">
+          <tspan font-family="Helvetica Neue" font-size="10" font-weight="400" fill="black" x="3.8064575" y="10">Bindings</tspan>
+        </text>
+      </g>
+      <g id="Graphic_14">
+        <rect x="453.5433" y="28.346457" width="85.03937" height="56.692915" fill="white"/>
+        <rect x="453.5433" y="28.346457" width="85.03937" height="56.692915" stroke="black" stroke-linecap="round" stroke-linejoin="round" stroke-width="1"/>
+        <text transform="translate(458.5433 29.020918)" fill="black">
+          <tspan font-family="Helvetica Neue" font-size="16" font-weight="400" fill="black" x="14.855686" y="15">Native </tspan>
+          <tspan font-family="Helvetica Neue" font-size="16" font-weight="400" fill="black" x="12.927686" y="33.448">Library </tspan>
+          <tspan font-family="Helvetica Neue" font-size="16" font-weight="400" fill="black" x="1.2236862" y="51.895996">Developer</tspan>
+        </text>
+      </g>
+      <g id="Graphic_15">
+        <rect x="170.07874" y="85.03937" width="85.03937" height="141.73229" fill="white"/>
+        <rect x="170.07874" y="85.03937" width="85.03937" height="141.73229" stroke="black" stroke-linecap="round" stroke-linejoin="round" stroke-width="1"/>
+        <text transform="translate(175.07874 106.92552)" fill="black">
+          <tspan font-family="Helvetica Neue" font-size="10" font-weight="400" fill="black" x="18.074685" y="10">Package </tspan>
+          <tspan font-family="Helvetica Neue" font-size="10" font-weight="400" fill="black" x="2.8746848" y="22.28">Implementation</tspan>
+          <tspan font-family="Helvetica Neue" font-size="10" font-weight="400" fill="black" x="9.559685" y="46.56">(Code which </tspan>
+          <tspan font-family="Helvetica Neue" font-size="10" font-weight="400" fill="black" x="7.259685" y="58.839996">converts C++ </tspan>
+          <tspan font-family="Helvetica Neue" font-size="10" font-weight="400" fill="black" x=".1996848" y="71.119995">abstractions into </tspan>
+          <tspan font-family="Helvetica Neue" font-size="10" font-weight="400" fill="black" x="28.074685" y="83.39999">Dart </tspan>
+          <tspan font-family="Helvetica Neue" font-size="10" font-weight="400" fill="black" x="8.629685" y="95.67999">abstractions)</tspan>
+        </text>
+      </g>
+      <g id="Graphic_16">
+        <rect x="368.50395" y="28.346457" width="85.03937" height="56.692915" fill="white"/>
+        <rect x="368.50395" y="28.346457" width="85.03937" height="56.692915" stroke="black" stroke-linecap="round" stroke-linejoin="round" stroke-width="1"/>
+        <text transform="translate(373.50395 38.244917)" fill="black">
+          <tspan font-family="Helvetica Neue" font-size="16" font-weight="400" fill="black" x="6.407685" y="15">Package </tspan>
+          <tspan font-family="Helvetica Neue" font-size="16" font-weight="400" fill="black" x="1.2236848" y="33.448">Developer</tspan>
+        </text>
+      </g>
+      <g id="Graphic_17">
+        <rect x="368.50395" y="85.03937" width="85.03937" height="141.73229" fill="white"/>
+        <rect x="368.50395" y="85.03937" width="85.03937" height="141.73229" stroke="black" stroke-linecap="round" stroke-linejoin="round" stroke-width="1"/>
+        <text transform="translate(373.50395 119.20552)" fill="black">
+          <tspan font-family="Helvetica Neue" font-size="10" font-weight="400" fill="black" x="14.554685" y="10">Glue code</tspan>
+          <tspan font-family="Helvetica Neue" font-size="10" font-weight="400" fill="black" x="9.559685" y="34.28">(Code which </tspan>
+          <tspan font-family="Helvetica Neue" font-size="10" font-weight="400" fill="black" x="8.719685" y="46.56">takes care of </tspan>
+          <tspan font-family="Helvetica Neue" font-size="10" font-weight="400" fill="black" x="5.194685" y="58.839996">things such as </tspan>
+          <tspan font-family="Helvetica Neue" font-size="10" font-weight="400" fill="black" x=".7796848" y="71.119995">C++ exceptions)</tspan>
+        </text>
+      </g>
+    </g>
+  </g>
+</svg>
diff --git a/samples/ffi/sqlite/docs/sqlite-tutorial.md b/samples/ffi/sqlite/docs/sqlite-tutorial.md
new file mode 100644
index 0000000..7f7aa22
--- /dev/null
+++ b/samples/ffi/sqlite/docs/sqlite-tutorial.md
@@ -0,0 +1,234 @@
+# dart:ffi SQLite mini tutorial
+
+In this mini tutorial we learn how to bind SQLite, a native library, in Dart using Dart's new foreign function interface `dart:ffi`.
+We build a package which provides a Dartlike SQLite API using objects and `Iterator`s.
+Inside the package we write Dart code which directly invokes C functions and manipulates C memory.
+
+## Binding C Functions to Dart
+
+The first step is to load a Native Library:
+
+```dart
+import "dart:ffi";
+
+DynamicLibrary sqlite = dlopenPlatformSpecific("sqlite3");
+```
+
+In a `DynamicLibrary` we can `lookup` functions.
+Let's lookup the function `sqlite3_prepare_v2` in the SQLite library.
+That function has the following signature in the library header file.
+
+```c++
+SQLITE_API int sqlite3_prepare_v2(
+  sqlite3 *db,            /* Database handle */
+  const char *zSql,       /* SQL statement, UTF-8 encoded */
+  int nByte,              /* Maximum length of zSql in bytes. */
+  sqlite3_stmt **ppStmt,  /* OUT: Statement handle */
+  const char **pzTail     /* OUT: Pointer to unused portion of zSql */
+);
+```
+
+In order to lookup a function, we need a _C signature_ and a _Dart signature_.
+
+```dart
+typedef sqlite3_prepare_v2_native_t = Int32 Function(
+    DatabasePointer database,
+    CString query,
+    Int32 nbytes,
+    Pointer<StatementPointer> statementOut,
+    Pointer<CString> tail);
+
+typedef Sqlite3_prepare_v2_t = int Function(
+    DatabasePointer database,
+    CString query,
+    int nbytes,
+    Pointer<StatementPointer> statementOut,
+    Pointer<CString> tail);
+```
+
+With these two signatures we can `lookup` the C function and expose it as a Dart function with `asFunction`.
+
+```dart
+Sqlite3_prepare_v2_t sqlite3_prepare_v2 = sqlite
+    .lookup<NativeFunction<sqlite3_prepare_v2_native_t>>("sqlite3_prepare_v2")
+    .asFunction();
+```
+
+Browse the code: [platform specific dynamic library loading](../lib/src/ffi/dylib_utils.dart), [C signatures](../lib/src/bindings/signatures.dart), [Dart signatures and bindings](../lib/src/bindings/bindings.dart), and [dart:ffi dynamic library interface](../../../../sdk/lib/ffi/dynamic_library.dart).
+
+## Managing C Memory
+
+In order to call `sqlite3_prepare_v2` to prepare a SQLite statement before executing, we need to be able to pass C pointers to C functions.
+
+Database and Statement pointers are opaque pointers in the SQLite C API.
+We specify these as classes extending `Pointer<Void>`.
+
+```dart
+class DatabasePointer extends Pointer<Void> {}
+class StatementPointer extends Pointer<Void> {}
+```
+
+Strings in C are pointers to character arrays.
+
+```dart
+class CString extends Pointer<Int8> {}
+```
+
+Pointers to C integers, floats, an doubles can be read from and written through to `dart:ffi`.
+However, before we can write to C memory from dart, we need to `allocate` some memory.
+
+```dart
+Pointer<Int8> p = allocate(); // Infers type argument allocate<Int8>(), and allocates 1 byte.
+p.store(123);                 // Stores a Dart int into this C int8.
+int v = p.load();             // Infers type argument p.load<int>(), and loads a value from C memory.
+```
+
+Note that you can only load a Dart `int` from a C `Int8`.
+Trying to load a Dart `double` will result in a runtime exception.
+
+We've almost modeled C Strings.
+The last thing we need is to use this `Pointer` as an array.
+We can do this by using `elementAt`.
+
+```dart
+CString string = allocate(count: 4).cast(); // Allocates 4 bytes and casts it to a string.
+string.store(73);                           // Stores 'F' at index 0.
+string.elementAt(1).store(73);              // Stores 'F' at index 1.
+string.elementAt(2).store(70);              // Stores 'I' at index 2.
+string.elementAt(3).store(0);               // Null terminates the string.
+```
+
+We wrap the above logic of allocating strings in the constructor `CString.allocate`.
+
+Now we have all ingredients to call `sqlite3_prepare_v2`.
+
+```dart
+Pointer<StatementPointer> statementOut = allocate();
+CString queryC = CString.allocate(query);
+int resultCode = sqlite3_prepare_v2(
+    _database, queryC, -1, statementOut, fromAddress(0));
+```
+
+With `dart:ffi` we are responsible for freeing C memory that we allocate.
+So after calling `sqlite3_prepare_v2` we read out the statement pointer, and free the statement pointer pointer and `CString` which held the query string.
+
+```
+StatementPointer statement = statementOut.load();
+statementOut.free();
+queryC.free();
+```
+
+Browse the code: [CString class](../lib/src/ffi/cstring.dart), [code calling sqlite3_prepare_v2](../lib/src/database.dart#57), and [dart:ffi pointer interface](../../../../sdk/lib/ffi/ffi.dart).
+
+## Dart API
+
+We would like to present the users of our package with an object oriented API - not exposing any `dart:ffi` objects to them.
+
+The SQLite C API returns a cursor to the first row of a result after executing a query.
+We can read out the columns of this row and move the cursor to the next row.
+The most natural way to expose this in Dart is through an `Iterable`.
+We provide our package users with the following API.
+
+```dart
+class Result implements Iterable<Row> {}
+
+class Row {
+  dynamic readColumnByIndex(int columnIndex) {}
+  dynamic readColumn(String columnName) {}
+}
+```
+
+However, this interface does not completely match the semantics of the C API.
+When we start reading the next `Row`, we do no longer have access to the previous `Row`.
+We can model this by letting a `Row` keep track if its current or not.
+
+```dart
+class Row {
+  bool _isCurrentRow = true;
+
+  dynamic readColumnByIndex(int columnIndex) {
+    if (!_isCurrentRow) {
+      throw Exception(
+          "This row is not the current row, reading data from the non-current"
+          " row is not supported by sqlite.");
+    }
+    // ...  
+    }
+}
+```
+
+A second mismatch between Dart and C is that in C we have to manually release resources.
+After executing a query and reading its results we need to call `sqlite3_finalize(statement)`.
+
+We can take two approaches here, either we structure the API in such a way that users of our package (implicitly) release resources, or we use finalizers to release resources.
+In this tutorial we take the first approach.
+
+If our users iterate over all `Row`s, we can implicitly finalize the statement after they are done with the last row.
+However, if they decide they do not want to iterate over the whole result, they need to explicitly state this.
+In this tutorial, we use the `ClosableIterator` abstraction for `Iterators` with backing resources that need to be `close`d.
+
+```dart
+Result result = d.query("""
+  select id, name
+  from Cookies
+  ;""");
+for (Row r in result) {
+  String name = r.readColumn("name");
+  print(name);
+}
+// Implicitly closes the iterator.
+
+result = d.query("""
+  select id, name
+  from Cookies
+  ;""");
+for (Row r in result) {
+  int id = r.readColumn("id");
+  if (id == 1) {
+    result.close(); // Explicitly closes the iterator, releasing underlying resources.
+    break;
+  }
+}
+```
+
+Browse the code: [Database, Result, Row](../lib/src/database.dart), and [CloseableIterator](../lib/src/collections/closable_iterator.dart).
+
+## Architecture Overview
+
+The following diagram summarized what we have implemented as _package developers_ in this tutorial.
+
+![architecture](lib/scenario-default.svg)
+
+As the package developers wrapping an existing native library, we have only written Dart code - not any C/C++ code.
+We specified bindings to the native library.
+We have provided our package users with an object oriented API without exposing any `dart:ffi` objects.
+And finally, we have implemented the package API by calling the C API.
+
+## Current dart:ffi Development Status
+
+In this minitutorial we used these `dart:ffi` features:
+
+* Loading dynamic libararies and looking up C functions in these dynamic libraries.
+* Calling C functions, with `dart:ffi` automatically marshalling arguments and return value.
+* Manipulating C memory through `Pointer`s with `allocate`, `free`, `load`, `store`, and `elementAt`.
+
+Features which we did not use in this tutorial:
+
+* `@struct` on subtypes of `Pointer` to define a struct with fields. (However, this feature is likely to change in the future.)
+
+Features which `dart:ffi` does not support yet:
+
+* Callbacks from C back into Dart.
+* Finalizers
+* C++ Exceptions (Not on roadmap yet.)
+
+Platform limitations:
+
+* `dart:ffi` is only enabled on 64 bit Windows, Linux, and MacOS. (Arm64 and 32 bit Intel are under review.)
+* `dart:ffi` only works in JIT mode, not in AOT.
+
+It is possible to work around some of the current limitations by adding a C/C++ layer.
+For example we could catch C++ exceptions in a C++ layer, and rethrow them in Dart.
+The architecture diagram would change to the following in that case.
+
+![architecture2](lib/scenario-full.svg)
\ No newline at end of file
diff --git a/samples/ffi/sqlite/example/main.dart b/samples/ffi/sqlite/example/main.dart
new file mode 100644
index 0000000..f54e7d3
--- /dev/null
+++ b/samples/ffi/sqlite/example/main.dart
@@ -0,0 +1,84 @@
+// Copyright (c) 2019, the Dart project authors.  Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+import "package:test/test.dart";
+
+import "../lib/sqlite.dart";
+
+void main() {
+  Database d = Database("test.db");
+  d.execute("drop table if exists Cookies;");
+  d.execute("""
+      create table Cookies (
+        id integer primary key,
+        name text not null,
+        alternative_name text
+      );""");
+  d.execute("""
+      insert into Cookies (id, name, alternative_name)
+      values
+        (1,'Chocolade chip cookie', 'Chocolade cookie'),
+        (2,'Ginger cookie', null),
+        (3,'Cinnamon roll', null)
+      ;""");
+  Result result = d.query("""
+      select
+        id,
+        name,
+        alternative_name,
+        case
+          when id=1 then 'foo'
+          when id=2 then 42
+          when id=3 then null
+        end as multi_typed_column
+      from Cookies
+      ;""");
+  for (Row r in result) {
+    int id = r.readColumnAsInt("id");
+    String name = r.readColumnByIndex(1);
+    String alternativeName = r.readColumn("alternative_name");
+    dynamic multiTypedValue = r.readColumn("multi_typed_column");
+    print("$id $name $alternativeName $multiTypedValue");
+  }
+  result = d.query("""
+      select
+        id,
+        name,
+        alternative_name,
+        case
+          when id=1 then 'foo'
+          when id=2 then 42
+          when id=3 then null
+        end as multi_typed_column
+      from Cookies
+      ;""");
+  for (Row r in result) {
+    int id = r.readColumnAsInt("id");
+    String name = r.readColumnByIndex(1);
+    String alternativeName = r.readColumn("alternative_name");
+    dynamic multiTypedValue = r.readColumn("multi_typed_column");
+    print("$id $name $alternativeName $multiTypedValue");
+    if (id == 2) {
+      result.close();
+      break;
+    }
+  }
+  try {
+    result.iterator.moveNext();
+  } on SQLiteException catch (e) {
+    print("expected exception on accessing result data after close: $e");
+  }
+  try {
+    d.query("""
+      select
+        id,
+        non_existing_column
+      from Cookies
+      ;""");
+  } on SQLiteException catch (e) {
+    print("expected this query to fail: $e");
+  }
+  d.execute("drop table Cookies;");
+  d.close();
+}
diff --git a/samples/ffi/sqlite/lib/sqlite.dart b/samples/ffi/sqlite/lib/sqlite.dart
new file mode 100644
index 0000000..d6bac5b
--- /dev/null
+++ b/samples/ffi/sqlite/lib/sqlite.dart
@@ -0,0 +1,10 @@
+// Copyright (c) 2019, the Dart project authors.  Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+/// A synchronous SQLite wrapper.
+///
+/// Written using dart:ffi.
+library sqlite;
+
+export "src/database.dart";
diff --git a/samples/ffi/sqlite/lib/src/bindings/bindings.dart b/samples/ffi/sqlite/lib/src/bindings/bindings.dart
new file mode 100644
index 0000000..613dbad
--- /dev/null
+++ b/samples/ffi/sqlite/lib/src/bindings/bindings.dart
@@ -0,0 +1,392 @@
+// Copyright (c) 2019, the Dart project authors.  Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+import "dart:ffi";
+
+import "../ffi/cstring.dart";
+import "../ffi/dylib_utils.dart";
+
+import "signatures.dart";
+import "types.dart";
+
+class _SQLiteBindings {
+  DynamicLibrary sqlite;
+
+  /// Opening A New Database Connection
+  ///
+  /// ^These routines open an SQLite database file as specified by the
+  /// filename argument. ^The filename argument is interpreted as UTF-8 for
+  /// sqlite3_open() and sqlite3_open_v2() and as UTF-16 in the native byte
+  /// order for sqlite3_open16(). ^(A database connection handle is usually
+  /// returned in *ppDb, even if an error occurs.  The only exception is that
+  /// if SQLite is unable to allocate memory to hold the sqlite3 object,
+  /// a NULL will be written into *ppDb instead of a pointer to the sqlite3
+  /// object.)^ ^(If the database is opened (and/or created) successfully, then
+  /// [SQLITE_OK] is returned.  Otherwise an error code is returned.)^ ^The
+  /// [sqlite3_errmsg] or sqlite3_errmsg16() routines can be used to obtain
+  /// an English language description of the error following a failure of any
+  /// of the sqlite3_open() routines.
+  int Function(CString filename, Pointer<DatabasePointer> databaseOut,
+      int flags, CString vfs) sqlite3_open_v2;
+
+  int Function(DatabasePointer database) sqlite3_close_v2;
+
+  /// Compiling An SQL Statement
+  ///
+  /// To execute an SQL query, it must first be compiled into a byte-code
+  /// program using one of these routines.
+  ///
+  /// The first argument, "db", is a database connection obtained from a
+  /// prior successful call to sqlite3_open, [sqlite3_open_v2] or
+  /// sqlite3_open16.  The database connection must not have been closed.
+  ///
+  /// The second argument, "zSql", is the statement to be compiled, encoded
+  /// as either UTF-8 or UTF-16.  The sqlite3_prepare() and sqlite3_prepare_v2()
+  /// interfaces use UTF-8, and sqlite3_prepare16() and sqlite3_prepare16_v2()
+  /// use UTF-16.
+  ///
+  /// ^If the nByte argument is less than zero, then zSql is read up to the
+  /// first zero terminator. ^If nByte is non-negative, then it is the maximum
+  /// number of  bytes read from zSql.  ^When nByte is non-negative, the
+  /// zSql string ends at either the first '\000' or '\u0000' character or
+  /// the nByte-th byte, whichever comes first. If the caller knows
+  /// that the supplied string is nul-terminated, then there is a small
+  /// performance advantage to be gained by passing an nByte parameter that
+  /// is equal to the number of bytes in the input string <i>including</i>
+  /// the nul-terminator bytes.
+  ///
+  /// ^If pzTail is not NULL then *pzTail is made to point to the first byte
+  /// past the end of the first SQL statement in zSql.  These routines only
+  /// compile the first statement in zSql, so *pzTail is left pointing to
+  /// what remains uncompiled.
+  ///
+  /// ^*ppStmt is left pointing to a compiled prepared statement that can be
+  /// executed using sqlite3_step.  ^If there is an error, *ppStmt is set
+  /// to NULL.  ^If the input text contains no SQL (if the input is an empty
+  /// string or a comment) then *ppStmt is set to NULL.
+  /// The calling procedure is responsible for deleting the compiled
+  /// SQL statement using [sqlite3_finalize] after it has finished with it.
+  /// ppStmt may not be NULL.
+  ///
+  /// ^On success, the sqlite3_prepare family of routines return [SQLITE_OK];
+  /// otherwise an error code is returned.
+  ///
+  /// The sqlite3_prepare_v2() and sqlite3_prepare16_v2() interfaces are
+  /// recommended for all new programs. The two older interfaces are retained
+  /// for backwards compatibility, but their use is discouraged.
+  /// ^In the "v2" interfaces, the prepared statement
+  /// that is returned (the sqlite3_stmt object) contains a copy of the
+  /// original SQL text. This causes the [sqlite3_step] interface to
+  /// behave differently in three ways:
+  int Function(
+      DatabasePointer database,
+      CString query,
+      int nbytes,
+      Pointer<StatementPointer> statementOut,
+      Pointer<CString> tail) sqlite3_prepare_v2;
+
+  /// Evaluate An SQL Statement
+  ///
+  /// After a prepared statement has been prepared using either
+  /// [sqlite3_prepare_v2] or sqlite3_prepare16_v2() or one of the legacy
+  /// interfaces sqlite3_prepare() or sqlite3_prepare16(), this function
+  /// must be called one or more times to evaluate the statement.
+  ///
+  /// The details of the behavior of the sqlite3_step() interface depend
+  /// on whether the statement was prepared using the newer "v2" interface
+  /// [sqlite3_prepare_v2] and sqlite3_prepare16_v2() or the older legacy
+  /// interface sqlite3_prepare() and sqlite3_prepare16().  The use of the
+  /// new "v2" interface is recommended for new applications but the legacy
+  /// interface will continue to be supported.
+  ///
+  /// ^In the legacy interface, the return value will be either [SQLITE_BUSY],
+  /// [SQLITE_DONE], [SQLITE_ROW], [SQLITE_ERROR], or [SQLITE_MISUSE].
+  /// ^With the "v2" interface, any of the other [result codes] or
+  /// [extended result codes] might be returned as well.
+  ///
+  /// ^[SQLITE_BUSY] means that the database engine was unable to acquire the
+  /// database locks it needs to do its job.  ^If the statement is a [COMMIT]
+  /// or occurs outside of an explicit transaction, then you can retry the
+  /// statement.  If the statement is not a [COMMIT] and occurs within an
+  /// explicit transaction then you should rollback the transaction before
+  /// continuing.
+  ///
+  /// ^[SQLITE_DONE] means that the statement has finished executing
+  /// successfully.  sqlite3_step() should not be called again on this virtual
+  /// machine without first calling [sqlite3_reset()] to reset the virtual
+  /// machine back to its initial state.
+  ///
+  /// ^If the SQL statement being executed returns any data, then [SQLITE_ROW]
+  /// is returned each time a new row of data is ready for processing by the
+  /// caller. The values may be accessed using the [column access functions].
+  /// sqlite3_step() is called again to retrieve the next row of data.
+  ///
+  /// ^[SQLITE_ERROR] means that a run-time error (such as a constraint
+  /// violation) has occurred.  sqlite3_step() should not be called again on
+  /// the VM. More information may be found by calling [sqlite3_errmsg()].
+  /// ^With the legacy interface, a more specific error code (for example,
+  /// [SQLITE_INTERRUPT], [SQLITE_SCHEMA], [SQLITE_CORRUPT], and so forth)
+  /// can be obtained by calling [sqlite3_reset()] on the
+  /// prepared statement.  ^In the "v2" interface,
+  /// the more specific error code is returned directly by sqlite3_step().
+  ///
+  /// [SQLITE_MISUSE] means that the this routine was called inappropriately.
+  /// Perhaps it was called on a prepared statement that has
+  /// already been [sqlite3_finalize | finalized] or on one that had
+  /// previously returned [SQLITE_ERROR] or [SQLITE_DONE].  Or it could
+  /// be the case that the same database connection is being used by two or
+  /// more threads at the same moment in time.
+  ///
+  /// For all versions of SQLite up to and including 3.6.23.1, a call to
+  /// [sqlite3_reset] was required after sqlite3_step() returned anything
+  /// other than [Errors.SQLITE_ROW] before any subsequent invocation of
+  /// sqlite3_step().  Failure to reset the prepared statement using
+  /// [sqlite3_reset()] would result in an [Errors.SQLITE_MISUSE] return from
+  /// sqlite3_step().  But after version 3.6.23.1, sqlite3_step() began
+  /// calling [sqlite3_reset] automatically in this circumstance rather
+  /// than returning [Errors.SQLITE_MISUSE]. This is not considered a
+  /// compatibility break because any application that ever receives an
+  /// [Errors.SQLITE_MISUSE] error is broken by definition.  The
+  /// [SQLITE_OMIT_AUTORESET] compile-time option
+  /// can be used to restore the legacy behavior.
+  ///
+  /// <b>Goofy Interface Alert:</b> In the legacy interface, the sqlite3_step()
+  /// API always returns a generic error code, [SQLITE_ERROR], following any
+  /// error other than [SQLITE_BUSY] and [SQLITE_MISUSE].  You must call
+  /// [sqlite3_reset()] or [sqlite3_finalize()] in order to find one of the
+  /// specific [error codes] that better describes the error.
+  /// We admit that this is a goofy design.  The problem has been fixed
+  /// with the "v2" interface.  If you prepare all of your SQL statements
+  /// using either [sqlite3_prepare_v2()] or [sqlite3_prepare16_v2()] instead
+  /// of the legacy [sqlite3_prepare()] and [sqlite3_prepare16()] interfaces,
+  /// then the more specific [error codes] are returned directly
+  /// by sqlite3_step().  The use of the "v2" interface is recommended.
+  int Function(StatementPointer statement) sqlite3_step;
+
+  /// CAPI3REF: Reset A Prepared Statement Object
+  ///
+  /// The sqlite3_reset() function is called to reset a prepared statement
+  /// object back to its initial state, ready to be re-executed.
+  /// ^Any SQL statement variables that had values bound to them using
+  /// the sqlite3_bind_blob | sqlite3_bind_*() API retain their values.
+  /// Use sqlite3_clear_bindings() to reset the bindings.
+  ///
+  /// ^The [sqlite3_reset] interface resets the prepared statement S
+  /// back to the beginning of its program.
+  ///
+  /// ^If the most recent call to [sqlite3_step] for the
+  /// prepared statement S returned [Errors.SQLITE_ROW] or [Errors.SQLITE_DONE],
+  /// or if [sqlite3_step] has never before been called on S,
+  /// then [sqlite3_reset] returns [Errors.SQLITE_OK].
+  ///
+  /// ^If the most recent call to [sqlite3_step(S)] for the
+  /// prepared statement S indicated an error, then
+  /// [sqlite3_reset] returns an appropriate [Errors].
+  ///
+  /// ^The [sqlite3_reset] interface does not change the values
+  int Function(StatementPointer statement) sqlite3_reset;
+
+  /// Destroy A Prepared Statement Object
+  ///
+  /// ^The sqlite3_finalize() function is called to delete a prepared statement.
+  /// ^If the most recent evaluation of the statement encountered no errors
+  /// or if the statement is never been evaluated, then sqlite3_finalize()
+  /// returns SQLITE_OK.  ^If the most recent evaluation of statement S failed,
+  /// then sqlite3_finalize(S) returns the appropriate error code or extended
+  /// error code.
+  ///
+  /// ^The sqlite3_finalize(S) routine can be called at any point during
+  /// the life cycle of prepared statement S:
+  /// before statement S is ever evaluated, after
+  /// one or more calls to [sqlite3_reset], or after any call
+  /// to [sqlite3_step] regardless of whether or not the statement has
+  /// completed execution.
+  ///
+  /// ^Invoking sqlite3_finalize() on a NULL pointer is a harmless no-op.
+  ///
+  /// The application must finalize every prepared statement in order to avoid
+  /// resource leaks.  It is a grievous error for the application to try to use
+  /// a prepared statement after it has been finalized.  Any use of a prepared
+  /// statement after it has been finalized can result in undefined and
+  /// undesirable behavior such as segfaults and heap corruption.
+  int Function(StatementPointer statement) sqlite3_finalize;
+
+  /// Number Of Columns In A Result Set
+  ///
+  /// ^Return the number of columns in the result set returned by the
+  /// prepared statement. ^This routine returns 0 if pStmt is an SQL
+  /// statement that does not return data (for example an [UPDATE]).
+  int Function(StatementPointer statement) sqlite3_column_count;
+
+  /// Column Names In A Result Set
+  ///
+  /// ^These routines return the name assigned to a particular column
+  /// in the result set of a SELECT statement.  ^The sqlite3_column_name()
+  /// interface returns a pointer to a zero-terminated UTF-8 string
+  /// and sqlite3_column_name16() returns a pointer to a zero-terminated
+  /// UTF-16 string.  ^The first parameter is the prepared statement
+  /// that implements the SELECT statement. ^The second parameter is the
+  /// column number.  ^The leftmost column is number 0.
+  ///
+  /// ^The returned string pointer is valid until either the prepared statement
+  /// is destroyed by [sqlite3_finalize] or until the statement is automatically
+  /// reprepared by the first call to [sqlite3_step] for a particular run
+  /// or until the next call to
+  /// sqlite3_column_name() or sqlite3_column_name16() on the same column.
+  ///
+  /// ^If sqlite3_malloc() fails during the processing of either routine
+  /// (for example during a conversion from UTF-8 to UTF-16) then a
+  /// NULL pointer is returned.
+  ///
+  /// ^The name of a result column is the value of the "AS" clause for
+  /// that column, if there is an AS clause.  If there is no AS clause
+  /// then the name of the column is unspecified and may change from
+  CString Function(StatementPointer statement, int columnIndex)
+      sqlite3_column_name;
+
+  /// CAPI3REF: Declared Datatype Of A Query Result
+  ///
+  /// ^(The first parameter is a prepared statement.
+  /// If this statement is a SELECT statement and the Nth column of the
+  /// returned result set of that SELECT is a table column (not an
+  /// expression or subquery) then the declared type of the table
+  /// column is returned.)^  ^If the Nth column of the result set is an
+  /// expression or subquery, then a NULL pointer is returned.
+  /// ^The returned string is always UTF-8 encoded.
+  ///
+  /// ^(For example, given the database schema:
+  ///
+  /// CREATE TABLE t1(c1 VARIANT);
+  ///
+  /// and the following statement to be compiled:
+  ///
+  /// SELECT c1 + 1, c1 FROM t1;
+  ///
+  /// this routine would return the string "VARIANT" for the second result
+  /// column (i==1), and a NULL pointer for the first result column (i==0).)^
+  ///
+  /// ^SQLite uses dynamic run-time typing.  ^So just because a column
+  /// is declared to contain a particular type does not mean that the
+  /// data stored in that column is of the declared type.  SQLite is
+  /// strongly typed, but the typing is dynamic not static.  ^Type
+  /// is associated with individual values, not with the containers
+  /// used to hold those values.
+  CString Function(StatementPointer statement, int columnIndex)
+      sqlite3_column_decltype;
+
+  int Function(StatementPointer statement, int columnIndex) sqlite3_column_type;
+
+  ValuePointer Function(StatementPointer statement, int columnIndex)
+      sqlite3_column_value;
+
+  double Function(StatementPointer statement, int columnIndex)
+      sqlite3_column_double;
+
+  int Function(StatementPointer statement, int columnIndex) sqlite3_column_int;
+
+  CString Function(StatementPointer statement, int columnIndex)
+      sqlite3_column_text;
+
+  /// The sqlite3_errstr() interface returns the English-language text that
+  /// describes the result code, as UTF-8. Memory to hold the error message
+  /// string is managed internally and must not be freed by the application.
+  CString Function(int code) sqlite3_errstr;
+
+  /// Error Codes And Messages
+  ///
+  /// ^The sqlite3_errcode() interface returns the numeric [result code] or
+  /// [extended result code] for the most recent failed sqlite3_* API call
+  /// associated with a [database connection]. If a prior API call failed
+  /// but the most recent API call succeeded, the return value from
+  /// sqlite3_errcode() is undefined.  ^The sqlite3_extended_errcode()
+  /// interface is the same except that it always returns the
+  /// [extended result code] even when extended result codes are
+  /// disabled.
+  ///
+  /// ^The sqlite3_errmsg() and sqlite3_errmsg16() return English-language
+  /// text that describes the error, as either UTF-8 or UTF-16 respectively.
+  /// ^(Memory to hold the error message string is managed internally.
+  /// The application does not need to worry about freeing the result.
+  /// However, the error string might be overwritten or deallocated by
+  /// subsequent calls to other SQLite interface functions.)^
+  ///
+  /// When the serialized [threading mode] is in use, it might be the
+  /// case that a second error occurs on a separate thread in between
+  /// the time of the first error and the call to these interfaces.
+  /// When that happens, the second error will be reported since these
+  /// interfaces always report the most recent result.  To avoid
+  /// this, each thread can obtain exclusive use of the [database connection] D
+  /// by invoking [sqlite3_mutex_enter]([sqlite3_db_mutex](D)) before beginning
+  /// to use D and invoking [sqlite3_mutex_leave]([sqlite3_db_mutex](D)) after
+  /// all calls to the interfaces listed here are completed.
+  ///
+  /// If an interface fails with SQLITE_MISUSE, that means the interface
+  /// was invoked incorrectly by the application.  In that case, the
+  /// error code and message may or may not be set.
+  CString Function(DatabasePointer database) sqlite3_errmsg;
+
+  _SQLiteBindings() {
+    sqlite = dlopenPlatformSpecific("sqlite3");
+    sqlite3_open_v2 = sqlite
+        .lookup<NativeFunction<sqlite3_open_v2_native_t>>("sqlite3_open_v2")
+        .asFunction();
+    sqlite3_close_v2 = sqlite
+        .lookup<NativeFunction<sqlite3_close_v2_native_t>>("sqlite3_close_v2")
+        .asFunction();
+    sqlite3_prepare_v2 = sqlite
+        .lookup<NativeFunction<sqlite3_prepare_v2_native_t>>(
+            "sqlite3_prepare_v2")
+        .asFunction();
+    sqlite3_step = sqlite
+        .lookup<NativeFunction<sqlite3_step_native_t>>("sqlite3_step")
+        .asFunction();
+    sqlite3_reset = sqlite
+        .lookup<NativeFunction<sqlite3_reset_native_t>>("sqlite3_reset")
+        .asFunction();
+    sqlite3_finalize = sqlite
+        .lookup<NativeFunction<sqlite3_finalize_native_t>>("sqlite3_finalize")
+        .asFunction();
+    sqlite3_errstr = sqlite
+        .lookup<NativeFunction<sqlite3_errstr_native_t>>("sqlite3_errstr")
+        .asFunction();
+    sqlite3_errmsg = sqlite
+        .lookup<NativeFunction<sqlite3_errmsg_native_t>>("sqlite3_errmsg")
+        .asFunction();
+    sqlite3_column_count = sqlite
+        .lookup<NativeFunction<sqlite3_column_count_native_t>>(
+            "sqlite3_column_count")
+        .asFunction();
+    sqlite3_column_name = sqlite
+        .lookup<NativeFunction<sqlite3_column_name_native_t>>(
+            "sqlite3_column_name")
+        .asFunction();
+    sqlite3_column_decltype = sqlite
+        .lookup<NativeFunction<sqlite3_column_decltype_native_t>>(
+            "sqlite3_column_decltype")
+        .asFunction();
+    sqlite3_column_type = sqlite
+        .lookup<NativeFunction<sqlite3_column_type_native_t>>(
+            "sqlite3_column_type")
+        .asFunction();
+    sqlite3_column_value = sqlite
+        .lookup<NativeFunction<sqlite3_column_value_native_t>>(
+            "sqlite3_column_value")
+        .asFunction();
+    sqlite3_column_double = sqlite
+        .lookup<NativeFunction<sqlite3_column_double_native_t>>(
+            "sqlite3_column_double")
+        .asFunction();
+    sqlite3_column_int = sqlite
+        .lookup<NativeFunction<sqlite3_column_int_native_t>>(
+            "sqlite3_column_int")
+        .asFunction();
+    sqlite3_column_text = sqlite
+        .lookup<NativeFunction<sqlite3_column_text_native_t>>(
+            "sqlite3_column_text")
+        .asFunction();
+  }
+}
+
+_SQLiteBindings _cachedBindings;
+_SQLiteBindings get bindings => _cachedBindings ??= _SQLiteBindings();
diff --git a/samples/ffi/sqlite/lib/src/bindings/constants.dart b/samples/ffi/sqlite/lib/src/bindings/constants.dart
new file mode 100644
index 0000000..71aa82e
--- /dev/null
+++ b/samples/ffi/sqlite/lib/src/bindings/constants.dart
@@ -0,0 +1,182 @@
+// Copyright (c) 2019, the Dart project authors.  Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+/// Result Codes
+///
+/// Many SQLite functions return an integer result code from the set shown
+/// here in order to indicates success or failure.
+///
+/// New error codes may be added in future versions of SQLite.
+///
+/// See also: SQLITE_IOERR_READ | extended result codes,
+/// sqlite3_vtab_on_conflict() SQLITE_ROLLBACK | result codes.
+class Errors {
+  /// Successful result
+  static const int SQLITE_OK = 0;
+
+  /// Generic error
+  static const int SQLITE_ERROR = 1;
+
+  /// Internal logic error in SQLite
+  static const int SQLITE_INTERNAL = 2;
+
+  /// Access permission denied
+  static const int SQLITE_PERM = 3;
+
+  /// Callback routine requested an abort
+  static const int SQLITE_ABORT = 4;
+
+  /// The database file is locked
+  static const int SQLITE_BUSY = 5;
+
+  /// A table in the database is locked
+  static const int SQLITE_LOCKED = 6;
+
+  /// A malloc() failed
+  static const int SQLITE_NOMEM = 7;
+
+  /// Attempt to write a readonly database
+  static const int SQLITE_READONLY = 8;
+
+  /// Operation terminated by sqlite3_interrupt()
+  static const int SQLITE_INTERRUPT = 9;
+
+  /// Some kind of disk I/O error occurred
+  static const int SQLITE_IOERR = 10;
+
+  /// The database disk image is malformed
+  static const int SQLITE_CORRUPT = 11;
+
+  /// Unknown opcode in sqlite3_file_control()
+  static const int SQLITE_NOTFOUND = 12;
+
+  /// Insertion failed because database is full
+  static const int SQLITE_FULL = 13;
+
+  /// Unable to open the database file
+  static const int SQLITE_CANTOPEN = 14;
+
+  /// Database lock protocol error
+  static const int SQLITE_PROTOCOL = 15;
+
+  /// Internal use only
+  static const int SQLITE_EMPTY = 16;
+
+  /// The database schema changed
+  static const int SQLITE_SCHEMA = 17;
+
+  /// String or BLOB exceeds size limit
+  static const int SQLITE_TOOBIG = 18;
+
+  /// Abort due to constraint violation
+  static const int SQLITE_CONSTRAINT = 19;
+
+  /// Data type mismatch
+  static const int SQLITE_MISMATCH = 20;
+
+  /// Library used incorrectly
+  static const int SQLITE_MISUSE = 21;
+
+  /// Uses OS features not supported on host
+  static const int SQLITE_NOLFS = 22;
+
+  /// Authorization denied
+  static const int SQLITE_AUTH = 23;
+
+  /// Not used
+  static const int SQLITE_FORMAT = 24;
+
+  /// 2nd parameter to sqlite3_bind out of range
+  static const int SQLITE_RANGE = 25;
+
+  /// File opened that is not a database file
+  static const int SQLITE_NOTADB = 26;
+
+  /// Notifications from sqlite3_log()
+  static const int SQLITE_NOTICE = 27;
+
+  /// Warnings from sqlite3_log()
+  static const int SQLITE_WARNING = 28;
+
+  /// sqlite3_step() has another row ready
+  static const int SQLITE_ROW = 100;
+
+  /// sqlite3_step() has finished executing
+  static const int SQLITE_DONE = 101;
+}
+
+/// Flags For File Open Operations
+///
+/// These bit values are intended for use in the
+/// 3rd parameter to the [sqlite3_open_v2()] interface and
+/// in the 4th parameter to the [sqlite3_vfs.xOpen] method.
+class Flags {
+  /// Ok for sqlite3_open_v2()
+  static const int SQLITE_OPEN_READONLY = 0x00000001;
+
+  /// Ok for sqlite3_open_v2()
+  static const int SQLITE_OPEN_READWRITE = 0x00000002;
+
+  /// Ok for sqlite3_open_v2()
+  static const int SQLITE_OPEN_CREATE = 0x00000004;
+
+  /// VFS only
+  static const int SQLITE_OPEN_DELETEONCLOSE = 0x00000008;
+
+  /// VFS only
+  static const int SQLITE_OPEN_EXCLUSIVE = 0x00000010;
+
+  /// VFS only
+  static const int SQLITE_OPEN_AUTOPROXY = 0x00000020;
+
+  /// Ok for sqlite3_open_v2()
+  static const int SQLITE_OPEN_URI = 0x00000040;
+
+  /// Ok for sqlite3_open_v2()
+  static const int SQLITE_OPEN_MEMORY = 0x00000080;
+
+  /// VFS only
+  static const int SQLITE_OPEN_MAIN_DB = 0x00000100;
+
+  /// VFS only
+  static const int SQLITE_OPEN_TEMP_DB = 0x00000200;
+
+  /// VFS only
+  static const int SQLITE_OPEN_TRANSIENT_DB = 0x00000400;
+
+  /// VFS only
+  static const int SQLITE_OPEN_MAIN_JOURNAL = 0x00000800;
+
+  /// VFS only
+  static const int SQLITE_OPEN_TEMP_JOURNAL = 0x00001000;
+
+  /// VFS only
+  static const int SQLITE_OPEN_SUBJOURNAL = 0x00002000;
+
+  /// VFS only
+  static const int SQLITE_OPEN_MASTER_JOURNAL = 0x00004000;
+
+  /// Ok for sqlite3_open_v2()
+  static const int SQLITE_OPEN_NOMUTEX = 0x00008000;
+
+  /// Ok for sqlite3_open_v2()
+  static const int SQLITE_OPEN_FULLMUTEX = 0x00010000;
+
+  /// Ok for sqlite3_open_v2()
+  static const int SQLITE_OPEN_SHAREDCACHE = 0x00020000;
+
+  /// Ok for sqlite3_open_v2()
+  static const int SQLITE_OPEN_PRIVATECACHE = 0x00040000;
+
+  /// VFS only
+  static const int SQLITE_OPEN_WAL = 0x00080000;
+}
+
+class Types {
+  static const int SQLITE_INTEGER = 1;
+  static const int SQLITE_FLOAT = 2;
+  static const int SQLITE_TEXT = 3;
+  static const int SQLITE_BLOB = 4;
+  static const int SQLITE_NULL = 5;
+}
diff --git a/samples/ffi/sqlite/lib/src/bindings/signatures.dart b/samples/ffi/sqlite/lib/src/bindings/signatures.dart
new file mode 100644
index 0000000..bb1b1e9
--- /dev/null
+++ b/samples/ffi/sqlite/lib/src/bindings/signatures.dart
@@ -0,0 +1,55 @@
+// Copyright (c) 2019, the Dart project authors.  Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+import "dart:ffi";
+
+import "../ffi/cstring.dart";
+
+import "types.dart";
+
+typedef sqlite3_open_v2_native_t = Int32 Function(
+    CString filename, Pointer<DatabasePointer> ppDb, Int32 flags, CString vfs);
+
+typedef sqlite3_close_v2_native_t = Int32 Function(DatabasePointer database);
+
+typedef sqlite3_prepare_v2_native_t = Int32 Function(
+    DatabasePointer database,
+    CString query,
+    Int32 nbytes,
+    Pointer<StatementPointer> statementOut,
+    Pointer<CString> tail);
+
+typedef sqlite3_step_native_t = Int32 Function(StatementPointer statement);
+
+typedef sqlite3_reset_native_t = Int32 Function(StatementPointer statement);
+
+typedef sqlite3_finalize_native_t = Int32 Function(StatementPointer statement);
+
+typedef sqlite3_errstr_native_t = CString Function(Int32 error);
+
+typedef sqlite3_errmsg_native_t = CString Function(DatabasePointer database);
+
+typedef sqlite3_column_count_native_t = Int32 Function(
+    StatementPointer statement);
+
+typedef sqlite3_column_name_native_t = CString Function(
+    StatementPointer statement, Int32 columnIndex);
+
+typedef sqlite3_column_decltype_native_t = CString Function(
+    StatementPointer statement, Int32 columnIndex);
+
+typedef sqlite3_column_type_native_t = Int32 Function(
+    StatementPointer statement, Int32 columnIndex);
+
+typedef sqlite3_column_value_native_t = ValuePointer Function(
+    StatementPointer statement, Int32 columnIndex);
+
+typedef sqlite3_column_double_native_t = Double Function(
+    StatementPointer statement, Int32 columnIndex);
+
+typedef sqlite3_column_int_native_t = Int32 Function(
+    StatementPointer statement, Int32 columnIndex);
+
+typedef sqlite3_column_text_native_t = CString Function(
+    StatementPointer statement, Int32 columnIndex);
diff --git a/samples/ffi/sqlite/lib/src/bindings/types.dart b/samples/ffi/sqlite/lib/src/bindings/types.dart
new file mode 100644
index 0000000..b843d74
--- /dev/null
+++ b/samples/ffi/sqlite/lib/src/bindings/types.dart
@@ -0,0 +1,77 @@
+// Copyright (c) 2019, the Dart project authors.  Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+import "dart:ffi";
+
+import "../ffi/cstring.dart";
+
+/// Database Connection Handle
+///
+/// Each open SQLite database is represented by a pointer to an instance of
+/// the opaque structure named "sqlite3".  It is useful to think of an sqlite3
+/// pointer as an object.  The [sqlite3_open()], [sqlite3_open16()], and
+/// [sqlite3_open_v2()] interfaces are its constructors, and [sqlite3_close()]
+/// is its destructor.  There are many other interfaces (such as
+/// [sqlite3_prepare_v2()], [sqlite3_create_function()], and
+/// [sqlite3_busy_timeout()] to name but three) that are methods on an
+class DatabasePointer extends Pointer<Void> {}
+
+/// SQL Statement Object
+///
+/// An instance of this object represents a single SQL statement.
+/// This object is variously known as a "prepared statement" or a
+/// "compiled SQL statement" or simply as a "statement".
+///
+/// The life of a statement object goes something like this:
+///
+/// <ol>
+/// <li> Create the object using [sqlite3_prepare_v2()] or a related
+///      function.
+/// <li> Bind values to [host parameters] using the sqlite3_bind_*()
+///      interfaces.
+/// <li> Run the SQL by calling [sqlite3_step()] one or more times.
+/// <li> Reset the statement using [sqlite3_reset()] then go back
+///      to step 2.  Do this zero or more times.
+/// <li> Destroy the object using [sqlite3_finalize()].
+/// </ol>
+///
+/// Refer to documentation on individual methods above for additional
+/// information.
+class StatementPointer extends Pointer<Void> {}
+
+/// Dynamically Typed Value Object
+///
+/// SQLite uses the sqlite3_value object to represent all values
+/// that can be stored in a database table. SQLite uses dynamic typing
+/// for the values it stores.  ^Values stored in sqlite3_value objects
+/// can be integers, floating point values, strings, BLOBs, or NULL.
+///
+/// An sqlite3_value object may be either "protected" or "unprotected".
+/// Some interfaces require a protected sqlite3_value.  Other interfaces
+/// will accept either a protected or an unprotected sqlite3_value.
+/// Every interface that accepts sqlite3_value arguments specifies
+/// whether or not it requires a protected sqlite3_value.
+///
+/// The terms "protected" and "unprotected" refer to whether or not
+/// a mutex is held.  An internal mutex is held for a protected
+/// sqlite3_value object but no mutex is held for an unprotected
+/// sqlite3_value object.  If SQLite is compiled to be single-threaded
+/// (with [SQLITE_THREADSAFE=0] and with [sqlite3_threadsafe()] returning 0)
+/// or if SQLite is run in one of reduced mutex modes
+/// [SQLITE_CONFIG_SINGLETHREAD] or [SQLITE_CONFIG_MULTITHREAD]
+/// then there is no distinction between protected and unprotected
+/// sqlite3_value objects and they can be used interchangeably.  However,
+/// for maximum code portability it is recommended that applications
+/// still make the distinction between protected and unprotected
+/// sqlite3_value objects even when not strictly required.
+///
+/// ^The sqlite3_value objects that are passed as parameters into the
+/// implementation of [application-defined SQL functions] are protected.
+/// ^The sqlite3_value object returned by
+/// [sqlite3_column_value()] is unprotected.
+/// Unprotected sqlite3_value objects may only be used with
+/// [sqlite3_result_value()] and [sqlite3_bind_value()].
+/// The [sqlite3_value_blob | sqlite3_value_type()] family of
+/// interfaces require protected sqlite3_value objects.
+class ValuePointer extends Pointer<Void> {}
diff --git a/samples/ffi/sqlite/lib/src/collections/closable_iterator.dart b/samples/ffi/sqlite/lib/src/collections/closable_iterator.dart
new file mode 100644
index 0000000..a86a58b
--- /dev/null
+++ b/samples/ffi/sqlite/lib/src/collections/closable_iterator.dart
@@ -0,0 +1,29 @@
+// Copyright (c) 2019, the Dart project authors.  Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+/// This iterator should be [close]d after use.
+///
+/// [ClosableIterator]s often use resources which should be freed after use.
+/// The consumer of the iterator can either manually [close] the iterator, or
+/// consume all elements on which the iterator will automatically be closed.
+abstract class ClosableIterator<T> extends Iterator<T> {
+  /// Close this iterator.
+  void close();
+
+  /// Moves to the next element and [close]s the iterator if it was the last
+  /// element.
+  bool moveNext();
+}
+
+/// This iterable's iterator should be [close]d after use.
+///
+/// Companion class of [ClosableIterator].
+abstract class ClosableIterable<T> extends Iterable<T> {
+  /// Close this iterables iterator.
+  void close();
+
+  /// Returns a [ClosableIterator] that allows iterating the elements of this
+  /// [ClosableIterable].
+  ClosableIterator<T> get iterator;
+}
diff --git a/samples/ffi/sqlite/lib/src/database.dart b/samples/ffi/sqlite/lib/src/database.dart
new file mode 100644
index 0000000..a20b7fc
--- /dev/null
+++ b/samples/ffi/sqlite/lib/src/database.dart
@@ -0,0 +1,307 @@
+// Copyright (c) 2019, the Dart project authors.  Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+import "dart:collection";
+import "dart:ffi";
+
+import "bindings/bindings.dart";
+import "bindings/types.dart";
+import "bindings/constants.dart";
+import "collections/closable_iterator.dart";
+import "ffi/cstring.dart";
+
+/// [Database] represents an open connection to a SQLite database.
+///
+/// All functions against a database may throw [SQLiteError].
+///
+/// This database interacts with SQLite synchonously.
+class Database {
+  DatabasePointer _database;
+  bool _open = false;
+
+  /// Open a database located at the file [path].
+  Database(String path,
+      [int flags = Flags.SQLITE_OPEN_READWRITE | Flags.SQLITE_OPEN_CREATE]) {
+    Pointer<DatabasePointer> dbOut = allocate();
+    CString pathC = CString.allocate(path);
+    final int resultCode =
+        bindings.sqlite3_open_v2(pathC, dbOut, flags, fromAddress(0));
+    _database = dbOut.load();
+    dbOut.free();
+    pathC.free();
+
+    if (resultCode == Errors.SQLITE_OK) {
+      _open = true;
+    } else {
+      // Even if "open" fails, sqlite3 will still create a database object. We
+      // can just destroy it.
+      SQLiteException exception = _loadError(resultCode);
+      close();
+      throw exception;
+    }
+  }
+
+  /// Close the database.
+  ///
+  /// This should only be called once on a database unless an exception is
+  /// thrown. It should be called at least once to finalize the database and
+  /// avoid resource leaks.
+  void close() {
+    assert(_open);
+    final int resultCode = bindings.sqlite3_close_v2(_database);
+    if (resultCode == Errors.SQLITE_OK) {
+      _open = false;
+    } else {
+      throw _loadError(resultCode);
+    }
+  }
+
+  /// Execute a query, discarding any returned rows.
+  void execute(String query) {
+    Pointer<StatementPointer> statementOut = allocate();
+    CString queryC = CString.allocate(query);
+    int resultCode = bindings.sqlite3_prepare_v2(
+        _database, queryC, -1, statementOut, fromAddress(0));
+    StatementPointer statement = statementOut.load();
+    statementOut.free();
+    queryC.free();
+
+    while (resultCode == Errors.SQLITE_ROW || resultCode == Errors.SQLITE_OK) {
+      resultCode = bindings.sqlite3_step(statement);
+    }
+    bindings.sqlite3_finalize(statement);
+    if (resultCode != Errors.SQLITE_DONE) {
+      throw _loadError(resultCode);
+    }
+  }
+
+  /// Evaluate a query and return the resulting rows as an iterable.
+  Result query(String query) {
+    Pointer<StatementPointer> statementOut = allocate();
+    CString queryC = CString.allocate(query);
+    int resultCode = bindings.sqlite3_prepare_v2(
+        _database, queryC, -1, statementOut, fromAddress(0));
+    StatementPointer statement = statementOut.load();
+    statementOut.free();
+    queryC.free();
+
+    if (resultCode != Errors.SQLITE_OK) {
+      bindings.sqlite3_finalize(statement);
+      throw _loadError(resultCode);
+    }
+
+    Map<String, int> columnIndices = {};
+    int columnCount = bindings.sqlite3_column_count(statement);
+    for (int i = 0; i < columnCount; i++) {
+      String columnName =
+          CString.fromUtf8(bindings.sqlite3_column_name(statement, i));
+      columnIndices[columnName] = i;
+    }
+
+    return Result._(this, statement, columnIndices);
+  }
+
+  SQLiteException _loadError([int errorCode]) {
+    String errorMessage = CString.fromUtf8(bindings.sqlite3_errmsg(_database));
+    if (errorCode == null) {
+      return SQLiteException(errorMessage);
+    }
+    String errorCodeExplanation =
+        CString.fromUtf8(bindings.sqlite3_errstr(errorCode));
+    return SQLiteException(
+        "$errorMessage (Code $errorCode: $errorCodeExplanation)");
+  }
+}
+
+/// [Result] represents a [Database.query]'s result and provides an [Iterable]
+/// interface for the results to be consumed.
+///
+/// Please note that this iterator should be [close]d manually if not all [Row]s
+/// are consumed.
+class Result extends IterableBase<Row> implements ClosableIterable<Row> {
+  final Database _database;
+  final ClosableIterator<Row> _iterator;
+  final StatementPointer _statement;
+  final Map<String, int> _columnIndices;
+
+  Row _currentRow = null;
+
+  Result._(
+    this._database,
+    this._statement,
+    this._columnIndices,
+  ) : _iterator = _ResultIterator(_statement, _columnIndices) {}
+
+  void close() => _iterator.close();
+
+  ClosableIterator<Row> get iterator => _iterator;
+}
+
+class _ResultIterator implements ClosableIterator<Row> {
+  final StatementPointer _statement;
+  final Map<String, int> _columnIndices;
+
+  Row _currentRow = null;
+  bool _closed = false;
+
+  _ResultIterator(this._statement, this._columnIndices) {}
+
+  bool moveNext() {
+    if (_closed) {
+      throw SQLiteException("The result has already been closed.");
+    }
+    _currentRow?._setNotCurrent();
+    int stepResult = bindings.sqlite3_step(_statement);
+    if (stepResult == Errors.SQLITE_ROW) {
+      _currentRow = Row._(_statement, _columnIndices);
+      return true;
+    } else {
+      close();
+      return false;
+    }
+  }
+
+  Row get current {
+    if (_closed) {
+      throw SQLiteException("The result has already been closed.");
+    }
+    return _currentRow;
+  }
+
+  void close() {
+    _currentRow?._setNotCurrent();
+    _closed = true;
+    bindings.sqlite3_finalize(_statement);
+  }
+}
+
+class Row {
+  final StatementPointer _statement;
+  final Map<String, int> _columnIndices;
+
+  bool _isCurrentRow = true;
+
+  Row._(this._statement, this._columnIndices) {}
+
+  /// Reads column [columnName].
+  ///
+  /// By default it returns a dynamically typed value. If [convert] is set to
+  /// [Convert.StaticType] the value is converted to the static type computed
+  /// for the column by the query compiler.
+  dynamic readColumn(String columnName,
+      {Convert convert = Convert.DynamicType}) {
+    return readColumnByIndex(_columnIndices[columnName], convert: convert);
+  }
+
+  /// Reads column [columnName].
+  ///
+  /// By default it returns a dynamically typed value. If [convert] is set to
+  /// [Convert.StaticType] the value is converted to the static type computed
+  /// for the column by the query compiler.
+  dynamic readColumnByIndex(int columnIndex,
+      {Convert convert = Convert.DynamicType}) {
+    _checkIsCurrentRow();
+
+    Type dynamicType;
+    if (convert == Convert.DynamicType) {
+      dynamicType =
+          _typeFromCode(bindings.sqlite3_column_type(_statement, columnIndex));
+    } else {
+      dynamicType = _typeFromText(CString.fromUtf8(
+          bindings.sqlite3_column_decltype(_statement, columnIndex)));
+    }
+
+    switch (dynamicType) {
+      case Type.Integer:
+        return readColumnByIndexAsInt(columnIndex);
+      case Type.Text:
+        return readColumnByIndexAsText(columnIndex);
+      case Type.Null:
+        return null;
+        break;
+      default:
+    }
+  }
+
+  /// Reads column [columnName] and converts to [Type.Integer] if not an
+  /// integer.
+  int readColumnAsInt(String columnName) {
+    return readColumnByIndexAsInt(_columnIndices[columnName]);
+  }
+
+  /// Reads column [columnIndex] and converts to [Type.Integer] if not an
+  /// integer.
+  int readColumnByIndexAsInt(int columnIndex) {
+    _checkIsCurrentRow();
+    return bindings.sqlite3_column_int(_statement, columnIndex);
+  }
+
+  /// Reads column [columnName] and converts to [Type.Text] if not text.
+  String readColumnAsText(String columnName) {
+    return readColumnByIndexAsText(_columnIndices[columnName]);
+  }
+
+  /// Reads column [columnIndex] and converts to [Type.Text] if not text.
+  String readColumnByIndexAsText(int columnIndex) {
+    _checkIsCurrentRow();
+    return CString.fromUtf8(
+        bindings.sqlite3_column_text(_statement, columnIndex));
+  }
+
+  void _checkIsCurrentRow() {
+    if (!_isCurrentRow) {
+      throw Exception(
+          "This row is not the current row, reading data from the non-current"
+          " row is not supported by sqlite.");
+    }
+  }
+
+  void _setNotCurrent() {
+    _isCurrentRow = false;
+  }
+}
+
+Type _typeFromCode(int code) {
+  switch (code) {
+    case Types.SQLITE_INTEGER:
+      return Type.Integer;
+    case Types.SQLITE_FLOAT:
+      return Type.Float;
+    case Types.SQLITE_TEXT:
+      return Type.Text;
+    case Types.SQLITE_BLOB:
+      return Type.Blob;
+    case Types.SQLITE_NULL:
+      return Type.Null;
+  }
+  throw Exception("Unknown type [$code]");
+}
+
+Type _typeFromText(String textRepresentation) {
+  switch (textRepresentation) {
+    case "integer":
+      return Type.Integer;
+    case "float":
+      return Type.Float;
+    case "text":
+      return Type.Text;
+    case "blob":
+      return Type.Blob;
+    case "null":
+      return Type.Null;
+  }
+  if (textRepresentation == null) return Type.Null;
+  throw Exception("Unknown type [$textRepresentation]");
+}
+
+enum Type { Integer, Float, Text, Blob, Null }
+
+enum Convert { DynamicType, StaticType }
+
+class SQLiteException {
+  final String message;
+  SQLiteException(this.message);
+
+  String toString() => message;
+}
diff --git a/samples/ffi/sqlite/lib/src/ffi/arena.dart b/samples/ffi/sqlite/lib/src/ffi/arena.dart
new file mode 100644
index 0000000..2e19d55
--- /dev/null
+++ b/samples/ffi/sqlite/lib/src/ffi/arena.dart
@@ -0,0 +1,57 @@
+// Copyright (c) 2019, the Dart project authors.  Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+import "dart:async";
+import "dart:ffi";
+
+/// [Arena] manages allocated C memory.
+///
+/// Arenas are zoned.
+class Arena {
+  Arena();
+
+  List<Pointer<Void>> _allocations = [];
+
+  /// Bound the lifetime of [ptr] to this [Arena].
+  T scoped<T extends Pointer>(T ptr) {
+    _allocations.add(ptr.cast());
+    return ptr;
+  }
+
+  /// Frees all memory pointed to by [Pointer]s in this arena.
+  void finalize() {
+    for (final ptr in _allocations) {
+      ptr.free();
+    }
+  }
+
+  /// The last [Arena] in the zone.
+  factory Arena.current() {
+    return Zone.current[#_currentArena];
+  }
+}
+
+/// Bound the lifetime of [ptr] to the current [Arena].
+T scoped<T extends Pointer>(T ptr) => Arena.current().scoped(ptr);
+
+class RethrownError {
+  dynamic original;
+  StackTrace originalStackTrace;
+  RethrownError(this.original, this.originalStackTrace);
+  toString() => """RethrownError(${original})
+${originalStackTrace}""";
+}
+
+/// Runs the [body] in an [Arena] freeing all memory which is [scoped] during
+/// execution of [body] at the end of the execution.
+R runArena<R>(R Function(Arena) body) {
+  Arena arena = Arena();
+  try {
+    return runZoned(() => body(arena),
+        zoneValues: {#_currentArena: arena},
+        onError: (error, st) => throw RethrownError(error, st));
+  } finally {
+    arena.finalize();
+  }
+}
diff --git a/samples/ffi/sqlite/lib/src/ffi/cstring.dart b/samples/ffi/sqlite/lib/src/ffi/cstring.dart
new file mode 100644
index 0000000..5b07085
--- /dev/null
+++ b/samples/ffi/sqlite/lib/src/ffi/cstring.dart
@@ -0,0 +1,43 @@
+// Copyright (c) 2019, the Dart project authors.  Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+import "dart:convert";
+import "dart:ffi";
+
+import "arena.dart";
+
+/// Represents a String in C memory, managed by an [Arena].
+class CString extends Pointer<Int8> {
+  /// Allocates a [CString] in the current [Arena] and populates it with
+  /// [dartStr].
+  factory CString(String dartStr) => CString.inArena(Arena.current(), dartStr);
+
+  /// Allocates a [CString] in [arena] and populates it with [dartStr].
+  factory CString.inArena(Arena arena, String dartStr) =>
+      arena.scoped(CString.allocate(dartStr));
+
+  /// Allocate a [CString] not managed in and populates it with [dartStr].
+  ///
+  /// This [CString] is not managed by an [Arena]. Please ensure to [free] the
+  /// memory manually!
+  factory CString.allocate(String dartStr) {
+    List<int> units = Utf8Encoder().convert(dartStr);
+    Pointer<Int8> str = allocate(count: units.length + 1);
+    for (int i = 0; i < units.length; ++i) {
+      str.elementAt(i).store(units[i]);
+    }
+    str.elementAt(units.length).store(0);
+    return str.cast();
+  }
+
+  /// Read the string for C memory into Dart.
+  static String fromUtf8(CString str) {
+    if (str == null) return null;
+    int len = 0;
+    while (str.elementAt(++len).load<int>() != 0);
+    List<int> units = List(len);
+    for (int i = 0; i < len; ++i) units[i] = str.elementAt(i).load();
+    return Utf8Decoder().convert(units);
+  }
+}
diff --git a/tests/standalone_2/ffi/dylib_utils.dart b/samples/ffi/sqlite/lib/src/ffi/dylib_utils.dart
similarity index 88%
rename from tests/standalone_2/ffi/dylib_utils.dart
rename to samples/ffi/sqlite/lib/src/ffi/dylib_utils.dart
index 1c924d4..fb8153a 100644
--- a/tests/standalone_2/ffi/dylib_utils.dart
+++ b/samples/ffi/sqlite/lib/src/ffi/dylib_utils.dart
@@ -7,7 +7,8 @@
 
 String _platformPath(String name, {String path}) {
   if (path == null) path = "";
-  if (Platform.isLinux) return path + "lib" + name + ".so";
+  if (Platform.isLinux || Platform.isAndroid)
+    return path + "lib" + name + ".so";
   if (Platform.isMacOS) return path + "lib" + name + ".dylib";
   if (Platform.isWindows) return path + name + ".dll";
   throw Exception("Platform not implemented");
diff --git a/samples/ffi/sqlite/pubspec.yaml b/samples/ffi/sqlite/pubspec.yaml
new file mode 100644
index 0000000..8b0136c
--- /dev/null
+++ b/samples/ffi/sqlite/pubspec.yaml
@@ -0,0 +1,9 @@
+name: sqlite3
+version: 0.0.1
+description: >-
+  Sqlite3 wrapper. Demo for dart:ffi.
+author: Daco Harkes <dacoharkes@google.com>, Samir Jindel <sjindel@google.com>
+environment:
+  sdk: '>=2.1.0 <3.0.0'
+dev_dependencies:
+  test: ^1.5.3
\ No newline at end of file
diff --git a/samples/ffi/sqlite/test/sqlite_test.dart b/samples/ffi/sqlite/test/sqlite_test.dart
new file mode 100644
index 0000000..95bbc6c
--- /dev/null
+++ b/samples/ffi/sqlite/test/sqlite_test.dart
@@ -0,0 +1,164 @@
+// Copyright (c) 2019, the Dart project authors.  Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+// VMOptions=--optimization-counter-threshold=5
+
+import "package:test/test.dart";
+
+import '../lib/sqlite.dart';
+
+void main() {
+  test("sqlite integration test", () {
+    Database d = Database("test.db");
+    d.execute("drop table if exists Cookies;");
+    d.execute("""
+      create table Cookies (
+        id integer primary key,
+        name text not null,
+        alternative_name text
+      );""");
+    d.execute("""
+      insert into Cookies (id, name, alternative_name)
+      values
+        (1,'Chocolade chip cookie', 'Chocolade cookie'),
+        (2,'Ginger cookie', null),
+        (3,'Cinnamon roll', null)
+      ;""");
+    Result result = d.query("""
+      select
+        id,
+        name,
+        alternative_name,
+        case
+          when id=1 then 'foo'
+          when id=2 then 42
+          when id=3 then null
+        end as multi_typed_column
+      from Cookies
+      ;""");
+    for (Row r in result) {
+      int id = r.readColumnAsInt("id");
+      expect(true, 1 <= id && id <= 3);
+      String name = r.readColumnByIndex(1);
+      expect(true, name is String);
+      String alternativeName = r.readColumn("alternative_name");
+      expect(true, alternativeName is String || alternativeName == null);
+      dynamic multiTypedValue = r.readColumn("multi_typed_column");
+      expect(
+          true,
+          multiTypedValue == 42 ||
+              multiTypedValue == 'foo' ||
+              multiTypedValue == null);
+      print("$id $name $alternativeName $multiTypedValue");
+    }
+    result = d.query("""
+      select
+        id,
+        name,
+        alternative_name,
+        case
+          when id=1 then 'foo'
+          when id=2 then 42
+          when id=3 then null
+        end as multi_typed_column
+      from Cookies
+      ;""");
+    for (Row r in result) {
+      int id = r.readColumnAsInt("id");
+      expect(true, 1 <= id && id <= 3);
+      String name = r.readColumnByIndex(1);
+      expect(true, name is String);
+      String alternativeName = r.readColumn("alternative_name");
+      expect(true, alternativeName is String || alternativeName == null);
+      dynamic multiTypedValue = r.readColumn("multi_typed_column");
+      expect(
+          true,
+          multiTypedValue == 42 ||
+              multiTypedValue == 'foo' ||
+              multiTypedValue == null);
+      print("$id $name $alternativeName $multiTypedValue");
+      if (id == 2) {
+        result.close();
+        break;
+      }
+    }
+    try {
+      result.iterator.moveNext();
+    } on SQLiteException catch (e) {
+      print("expected exception on accessing result data after close: $e");
+    }
+    try {
+      d.query("""
+      select
+        id,
+        non_existing_column
+      from Cookies
+      ;""");
+    } on SQLiteException catch (e) {
+      print("expected this query to fail: $e");
+    }
+    d.execute("drop table Cookies;");
+    d.close();
+  });
+
+  test("concurrent db open and queries", () {
+    Database d = Database("test.db");
+    Database d2 = Database("test.db");
+    d.execute("drop table if exists Cookies;");
+    d.execute("""
+      create table Cookies (
+        id integer primary key,
+        name text not null,
+        alternative_name text
+      );""");
+    d.execute("""
+      insert into Cookies (id, name, alternative_name)
+      values
+        (1,'Chocolade chip cookie', 'Chocolade cookie'),
+        (2,'Ginger cookie', null),
+        (3,'Cinnamon roll', null)
+      ;""");
+    Result r = d.query("select * from Cookies;");
+    Result r2 = d2.query("select * from Cookies;");
+    r.iterator..moveNext();
+    r2.iterator..moveNext();
+    r.iterator..moveNext();
+    Result r3 = d2.query("select * from Cookies;");
+    r3.iterator..moveNext();
+    expect(2, r.iterator.current.readColumn("id"));
+    expect(1, r2.iterator.current.readColumn("id"));
+    expect(1, r3.iterator.current.readColumn("id"));
+    r.close();
+    r2.close();
+    r3.close();
+    d.close();
+    d2.close();
+  });
+
+  test("stress test", () {
+    Database d = Database("test.db");
+    d.execute("drop table if exists Cookies;");
+    d.execute("""
+      create table Cookies (
+        id integer primary key,
+        name text not null,
+        alternative_name text
+      );""");
+    int repeats = 100;
+    for (int i = 0; i < repeats; i++) {
+      d.execute("""
+      insert into Cookies (name, alternative_name)
+      values
+        ('Chocolade chip cookie', 'Chocolade cookie'),
+        ('Ginger cookie', null),
+        ('Cinnamon roll', null)
+      ;""");
+    }
+    Result r = d.query("select count(*) from Cookies;");
+    int count = r.first.readColumnByIndexAsInt(0);
+    expect(count, 3 * repeats);
+    r.close();
+    d.close();
+  });
+}
diff --git a/samples/samples.status b/samples/samples.status
index 9ec1b23e..09ae4a3 100644
--- a/samples/samples.status
+++ b/samples/samples.status
@@ -33,3 +33,6 @@
 
 [ $hot_reload || $hot_reload_rollback ]
 sample_extension/test/sample_extension_app_snapshot_test: SkipByDesign # Cannot reload with URI pointing to app snapshot.
+
+[ $arch != x64 || $system != linux || $compiler != dartk || $hot_reload || $hot_reload_rollback ]
+ffi/sqlite/test/sqlite_test: Skip  # FFI not supported or libsqlite3.so not available.
diff --git a/sdk/lib/_internal/js_runtime/lib/convert_patch.dart b/sdk/lib/_internal/js_runtime/lib/convert_patch.dart
index a8dcc31..fa6a0b0 100644
--- a/sdk/lib/_internal/js_runtime/lib/convert_patch.dart
+++ b/sdk/lib/_internal/js_runtime/lib/convert_patch.dart
@@ -367,7 +367,7 @@
 /// The sink only creates one object, but its input can be chunked.
 // TODO(floitsch): don't accumulate everything before starting to decode.
 class _JsonDecoderSink extends _StringSinkConversionSink {
-  final _Reviver _reviver;
+  final Function(Object key, Object value) _reviver;
   final Sink<Object> _sink;
 
   _JsonDecoderSink(this._reviver, this._sink) : super(new StringBuffer(''));
diff --git a/sdk/lib/_internal/js_runtime/lib/isolate_patch.dart b/sdk/lib/_internal/js_runtime/lib/isolate_patch.dart
index 78cbf61..56bab4c 100644
--- a/sdk/lib/_internal/js_runtime/lib/isolate_patch.dart
+++ b/sdk/lib/_internal/js_runtime/lib/isolate_patch.dart
@@ -16,6 +16,11 @@
   }
 
   @patch
+  String get debugName {
+    throw new UnsupportedError("Isolate.debugName");
+  }
+
+  @patch
   static Future<Uri> get packageRoot {
     throw new UnsupportedError("Isolate.packageRoot");
   }
diff --git a/sdk/lib/_internal/js_runtime/lib/js_helper.dart b/sdk/lib/_internal/js_runtime/lib/js_helper.dart
index d60398c..9ad339a 100644
--- a/sdk/lib/_internal/js_runtime/lib/js_helper.dart
+++ b/sdk/lib/_internal/js_runtime/lib/js_helper.dart
@@ -45,7 +45,11 @@
 import 'dart:_interceptors';
 import 'dart:_internal' as _symbol_dev;
 import 'dart:_internal'
-    show EfficientLengthIterable, MappedIterable, IterableElementError;
+    show
+        EfficientLengthIterable,
+        MappedIterable,
+        IterableElementError,
+        SubListIterable;
 
 import 'dart:_native_typed_data';
 
diff --git a/sdk/lib/_internal/js_runtime/lib/js_number.dart b/sdk/lib/_internal/js_runtime/lib/js_number.dart
index 940bf26..8e5dde1 100644
--- a/sdk/lib/_internal/js_runtime/lib/js_number.dart
+++ b/sdk/lib/_internal/js_runtime/lib/js_number.dart
@@ -40,13 +40,19 @@
 
   bool get isNegative => (this == 0) ? (1 / this) < 0 : this < 0;
 
-  bool get isNaN => JS('bool', r'isNaN(#)', this);
+  bool get isNaN => JS(
+      'returns:bool;effects:none;depends:none;throws:never;gvn:true',
+      r'isNaN(#)',
+      this);
 
   bool get isInfinite {
     return JS('bool', r'# == (1/0)', this) || JS('bool', r'# == (-1/0)', this);
   }
 
-  bool get isFinite => JS('bool', r'isFinite(#)', this);
+  bool get isFinite => JS(
+      'returns:bool;effects:none;depends:none;throws:never;gvn:true',
+      r'isFinite(#)',
+      this);
 
   JSNumber remainder(num b) {
     if (b is! num) throw argumentErrorValue(b);
diff --git a/sdk/lib/_internal/js_runtime/lib/regexp_helper.dart b/sdk/lib/_internal/js_runtime/lib/regexp_helper.dart
index 77f746b..51b4bfb 100644
--- a/sdk/lib/_internal/js_runtime/lib/regexp_helper.dart
+++ b/sdk/lib/_internal/js_runtime/lib/regexp_helper.dart
@@ -155,10 +155,13 @@
   bool get isCaseSensitive => _isCaseSensitive;
 }
 
-class _MatchImplementation implements Match {
+class _MatchImplementation implements RegExpMatch {
   final Pattern pattern;
   // Contains a JS RegExp match object.
   // It is an Array of String values with extra 'index' and 'input' properties.
+  // If there were named capture groups, there will also be an extra 'groups'
+  // property containing an object with capture group names as keys and
+  // matched strings as values.
   // We didn't force it to be JSArray<String>, so it is JSArray<dynamic>, but
   // containing String or `undefined` values.
   final JSArray _match;
@@ -193,6 +196,27 @@
     }
     return out;
   }
+
+  String namedGroup(String name) {
+    var groups = JS('Object', '#.groups', _match);
+    if (groups != null) {
+      var result = JS('String|Null', '#[#]', groups, name);
+      if (result != null || JS('bool', '# in #', name, groups)) {
+        return result;
+      }
+    }
+    throw ArgumentError.value(name, "name", "Not a capture group name");
+  }
+
+  Iterable<String> get groupNames {
+    var groups = JS('Object', '#.groups', _match);
+    if (groups != null) {
+      var keys = new JSArray<String>.markGrowable(
+          JS('returns:JSExtendableArray;new:true', 'Object.keys(#)', groups));
+      return SubListIterable(keys, 0, null);
+    }
+    return Iterable.empty();
+  }
 }
 
 class _AllMatchesIterable extends IterableBase<Match> {
diff --git a/sdk/lib/convert/byte_conversion.dart b/sdk/lib/convert/byte_conversion.dart
index 1071b90..3d52d78 100644
--- a/sdk/lib/convert/byte_conversion.dart
+++ b/sdk/lib/convert/byte_conversion.dart
@@ -70,7 +70,7 @@
 class _ByteCallbackSink extends ByteConversionSinkBase {
   static const _INITIAL_BUFFER_SIZE = 1024;
 
-  final _ChunkedConversionCallback<List<int>> _callback;
+  final void Function(List<int>) _callback;
   List<int> _buffer = Uint8List(_INITIAL_BUFFER_SIZE);
   int _bufferIndex = 0;
 
diff --git a/sdk/lib/convert/chunked_conversion.dart b/sdk/lib/convert/chunked_conversion.dart
index 6a9479a..e946f97 100644
--- a/sdk/lib/convert/chunked_conversion.dart
+++ b/sdk/lib/convert/chunked_conversion.dart
@@ -4,8 +4,6 @@
 
 part of dart.convert;
 
-typedef void _ChunkedConversionCallback<T>(T accumulated);
-
 /// A [ChunkedConversionSink] is used to transmit data more efficiently between
 /// two converters during chunked conversions.
 ///
@@ -37,7 +35,7 @@
 ///
 /// This class can be used to terminate a chunked conversion.
 class _SimpleCallbackSink<T> extends ChunkedConversionSink<T> {
-  final _ChunkedConversionCallback<List<T>> _callback;
+  final void Function(List<T>) _callback;
   final List<T> _accumulated = <T>[];
 
   _SimpleCallbackSink(this._callback);
diff --git a/sdk/lib/convert/json.dart b/sdk/lib/convert/json.dart
index 35bc351..efd450d 100644
--- a/sdk/lib/convert/json.dart
+++ b/sdk/lib/convert/json.dart
@@ -88,9 +88,6 @@
 dynamic jsonDecode(String source, {Object reviver(Object key, Object value)}) =>
     json.decode(source, reviver: reviver);
 
-typedef _Reviver(Object key, Object value);
-typedef _ToEncodable(var o);
-
 /// A [JsonCodec] encodes JSON objects to strings and decodes strings to
 /// JSON objects.
 ///
@@ -99,8 +96,8 @@
 ///     var encoded = json.encode([1, 2, { "a": null }]);
 ///     var decoded = json.decode('["foo", { "bar": 499 }]');
 class JsonCodec extends Codec<Object, String> {
-  final _Reviver _reviver;
-  final _ToEncodable _toEncodable;
+  final Function(Object key, Object value) _reviver;
+  final Function(dynamic) _toEncodable;
 
   /// Creates a `JsonCodec` with the given reviver and encoding function.
   ///
@@ -188,7 +185,7 @@
 
   /// Function called on non-encodable objects to return a replacement
   /// encodable object that will be encoded in the orignal's place.
-  final _ToEncodable _toEncodable;
+  final Function(dynamic) _toEncodable;
 
   /// Creates a JSON encoder.
   ///
@@ -303,7 +300,7 @@
   final List<int> _indent;
 
   /// Function called with each un-encodable object encountered.
-  final _ToEncodable _toEncodable;
+  final Function(dynamic) _toEncodable;
 
   /// UTF-8 buffer size.
   final int _bufferSize;
@@ -408,7 +405,7 @@
 /// The sink only accepts one value, but will produce output in a chunked way.
 class _JsonEncoderSink extends ChunkedConversionSink<Object> {
   final String _indent;
-  final _ToEncodable _toEncodable;
+  final Function(dynamic) _toEncodable;
   final StringConversionSink _sink;
   bool _isDone = false;
 
@@ -437,7 +434,7 @@
   /// The byte sink receiveing the encoded chunks.
   final ByteConversionSink _sink;
   final List<int> _indent;
-  final _ToEncodable _toEncodable;
+  final Function(dynamic) _toEncodable;
   final int _bufferSize;
   bool _isDone = false;
   _JsonUtf8EncoderSink(
@@ -468,7 +465,7 @@
 
 /// This class parses JSON strings and builds the corresponding objects.
 class JsonDecoder extends Converter<String, Object> {
-  final _Reviver _reviver;
+  final Function(Object key, Object value) _reviver;
 
   /// Constructs a new JsonDecoder.
   ///
@@ -531,7 +528,7 @@
   final List _seen = [];
 
   /// Function called for each un-encodable object encountered.
-  final _ToEncodable _toEncodable;
+  final Function(dynamic) _toEncodable;
 
   _JsonStringifier(toEncodable(o))
       : _toEncodable = toEncodable ?? _defaultToEncodable;
@@ -863,15 +860,13 @@
   }
 }
 
-typedef void _AddChunk(Uint8List list, int start, int end);
-
 /// Specialization of [_JsonStringifier] that writes the JSON as UTF-8.
 ///
 /// The JSON text is UTF-8 encoded and written to [Uint8List] buffers.
 /// The buffers are then passed back to a user provided callback method.
 class _JsonUtf8Stringifier extends _JsonStringifier {
   final int bufferSize;
-  final _AddChunk addChunk;
+  final void Function(Uint8List list, int start, int end) addChunk;
   Uint8List buffer;
   int index = 0;
 
diff --git a/sdk/lib/convert/string_conversion.dart b/sdk/lib/convert/string_conversion.dart
index 6c2d31f..81e5621 100644
--- a/sdk/lib/convert/string_conversion.dart
+++ b/sdk/lib/convert/string_conversion.dart
@@ -63,12 +63,10 @@
   void close();
 }
 
-typedef void _StringSinkCloseCallback();
-
 /// This class wraps an existing [StringSink] and invokes a
 /// closure when [close] is invoked.
 class _ClosableStringSink implements ClosableStringSink {
-  final _StringSinkCloseCallback _callback;
+  final void Function() _callback;
   final StringSink _sink;
 
   _ClosableStringSink(this._sink, this._callback);
@@ -210,7 +208,7 @@
 ///
 /// This class can be used to terminate a chunked conversion.
 class _StringCallbackSink extends _StringSinkConversionSink<StringBuffer> {
-  final _ChunkedConversionCallback<String> _callback;
+  final void Function(String) _callback;
   _StringCallbackSink(this._callback) : super(StringBuffer());
 
   void close() {
diff --git a/sdk/lib/core/annotations.dart b/sdk/lib/core/annotations.dart
index 4034456..2d30f1c 100644
--- a/sdk/lib/core/annotations.dart
+++ b/sdk/lib/core/annotations.dart
@@ -80,7 +80,7 @@
 /**
  * Marks a feature as [Deprecated] until the next release.
  */
-const Deprecated deprecated = const Deprecated("next release");
+const Deprecated deprecated = Deprecated("next release");
 
 class _Override {
   const _Override();
@@ -111,7 +111,7 @@
  * For example, the annotation is intentionally not used in the Dart platform
  * libraries, since they only depend on themselves.
  */
-const Object override = const _Override();
+const Object override = _Override();
 
 /**
  * An annotation class that was used during development of Dart 2.
@@ -184,7 +184,7 @@
  * types.
  */
 @deprecated
-const Object proxy = const _Proxy();
+const Object proxy = _Proxy();
 
 /**
  * A hint to tools.
diff --git a/sdk/lib/core/bool.dart b/sdk/lib/core/bool.dart
index e3014bb..5ed1065 100644
--- a/sdk/lib/core/bool.dart
+++ b/sdk/lib/core/bool.dart
@@ -47,7 +47,7 @@
   //ignore: const_constructor_with_body
   //ignore: const_factory
   external const factory bool.fromEnvironment(String name,
-      {bool defaultValue: false});
+      {bool defaultValue = false});
 
   external int get hashCode;
 
diff --git a/sdk/lib/core/comparable.dart b/sdk/lib/core/comparable.dart
index bbb334f..835aa34 100644
--- a/sdk/lib/core/comparable.dart
+++ b/sdk/lib/core/comparable.dart
@@ -18,7 +18,7 @@
  * * zero if [a] is equal to [b], and
  * * a positive integer if [a] is greater than [b].
  */
-typedef int Comparator<T>(T a, T b);
+typedef Comparator<T> = int Function(T a, T b);
 
 /**
  * Interface used by types that have an intrinsic ordering.
diff --git a/sdk/lib/core/date_time.dart b/sdk/lib/core/date_time.dart
index 90608670..00ea5a4 100644
--- a/sdk/lib/core/date_time.dart
+++ b/sdk/lib/core/date_time.dart
@@ -329,11 +329,11 @@
       int value = _brokenDownDateToValue(years, month, day, hour, minute,
           second, millisecond, microsecond, isUtc);
       if (value == null) {
-        throw new FormatException("Time out of range", formattedString);
+        throw FormatException("Time out of range", formattedString);
       }
-      return new DateTime._withValue(value, isUtc: isUtc);
+      return DateTime._withValue(value, isUtc: isUtc);
     } else {
-      throw new FormatException("Invalid date format", formattedString);
+      throw FormatException("Invalid date format", formattedString);
     }
   }
 
@@ -365,7 +365,7 @@
    * time zone (local or UTC).
    */
   external DateTime.fromMillisecondsSinceEpoch(int millisecondsSinceEpoch,
-      {bool isUtc: false});
+      {bool isUtc = false});
 
   /**
    * Constructs a new [DateTime] instance
@@ -378,7 +378,7 @@
    * time zone (local or UTC).
    */
   external DateTime.fromMicrosecondsSinceEpoch(int microsecondsSinceEpoch,
-      {bool isUtc: false});
+      {bool isUtc = false});
 
   /**
    * Constructs a new [DateTime] instance with the given value.
@@ -389,11 +389,11 @@
     if (millisecondsSinceEpoch.abs() > _maxMillisecondsSinceEpoch ||
         (millisecondsSinceEpoch.abs() == _maxMillisecondsSinceEpoch &&
             microsecond != 0)) {
-      throw new ArgumentError(
+      throw ArgumentError(
           "DateTime is outside valid range: $millisecondsSinceEpoch");
     }
     if (isUtc == null) {
-      throw new ArgumentError("'isUtc' flag may not be 'null'");
+      throw ArgumentError("'isUtc' flag may not be 'null'");
     }
   }
 
@@ -505,7 +505,7 @@
    */
   DateTime toLocal() {
     if (isUtc) {
-      return new DateTime._withValue(_value, isUtc: false);
+      return DateTime._withValue(_value, isUtc: false);
     }
     return this;
   }
@@ -523,7 +523,7 @@
    */
   DateTime toUtc() {
     if (isUtc) return this;
-    return new DateTime._withValue(_value, isUtc: true);
+    return DateTime._withValue(_value, isUtc: true);
   }
 
   static String _fourDigits(int n) {
@@ -866,7 +866,7 @@
    * timezone ::= 'z' | 'Z' | sign digit{2} timezonemins_opt
    * timezonemins_opt ::= <empty> | colon_opt digit{2}
    */
-  static final RegExp _parseFormat = new RegExp(
+  static final RegExp _parseFormat = RegExp(
       r'^([+-]?\d{4,6})-?(\d\d)-?(\d\d)' // Day part.
       r'(?:[ T](\d\d)(?::?(\d\d)(?::?(\d\d)(?:[.,](\d{1,6}))?)?)?' // Time part.
       r'( ?[zZ]| ?([-+])(\d\d)(?::?(\d\d))?)?)?$'); // Timezone part.
diff --git a/sdk/lib/core/duration.dart b/sdk/lib/core/duration.dart
index 52bfc29..914f05a 100644
--- a/sdk/lib/core/duration.dart
+++ b/sdk/lib/core/duration.dart
@@ -73,7 +73,7 @@
 
   static const int minutesPerDay = minutesPerHour * hoursPerDay;
 
-  static const Duration zero = const Duration(seconds: 0);
+  static const Duration zero = Duration(seconds: 0);
 
   /*
    * The value of this Duration object in microseconds.
@@ -91,12 +91,12 @@
    * All arguments are 0 by default.
    */
   const Duration(
-      {int days: 0,
-      int hours: 0,
-      int minutes: 0,
-      int seconds: 0,
-      int milliseconds: 0,
-      int microseconds: 0})
+      {int days = 0,
+      int hours = 0,
+      int minutes = 0,
+      int seconds = 0,
+      int milliseconds = 0,
+      int microseconds = 0})
       : this._microseconds(microsecondsPerDay * days +
             microsecondsPerHour * hours +
             microsecondsPerMinute * minutes +
@@ -113,7 +113,7 @@
    * returns the sum as a new Duration object.
    */
   Duration operator +(Duration other) {
-    return new Duration._microseconds(_duration + other._duration);
+    return Duration._microseconds(_duration + other._duration);
   }
 
   /**
@@ -121,7 +121,7 @@
    * returns the difference as a new Duration object.
    */
   Duration operator -(Duration other) {
-    return new Duration._microseconds(_duration - other._duration);
+    return Duration._microseconds(_duration - other._duration);
   }
 
   /**
@@ -132,7 +132,7 @@
    * 53 bits, precision is lost because of double-precision arithmetic.
    */
   Duration operator *(num factor) {
-    return new Duration._microseconds((_duration * factor).round());
+    return Duration._microseconds((_duration * factor).round());
   }
 
   /**
@@ -144,8 +144,8 @@
   Duration operator ~/(int quotient) {
     // By doing the check here instead of relying on "~/" below we get the
     // exception even with dart2js.
-    if (quotient == 0) throw new IntegerDivisionByZeroException();
-    return new Duration._microseconds(_duration ~/ quotient);
+    if (quotient == 0) throw IntegerDivisionByZeroException();
+    return Duration._microseconds(_duration ~/ quotient);
   }
 
   /**
@@ -280,7 +280,7 @@
    * The returned `Duration` has the same length as this one, but is always
    * positive.
    */
-  Duration abs() => new Duration._microseconds(_duration.abs());
+  Duration abs() => Duration._microseconds(_duration.abs());
 
   /**
    * Returns a new `Duration` representing this `Duration` negated.
@@ -289,5 +289,5 @@
    * opposite sign of this one.
    */
   // Using subtraction helps dart2js avoid negative zeros.
-  Duration operator -() => new Duration._microseconds(0 - _duration);
+  Duration operator -() => Duration._microseconds(0 - _duration);
 }
diff --git a/sdk/lib/core/errors.dart b/sdk/lib/core/errors.dart
index 1bd829d..53f3d35 100644
--- a/sdk/lib/core/errors.dart
+++ b/sdk/lib/core/errors.dart
@@ -278,7 +278,7 @@
   static void checkValueInInterval(int value, int minValue, int maxValue,
       [String name, String message]) {
     if (value < minValue || value > maxValue) {
-      throw new RangeError.range(value, minValue, maxValue, name, message);
+      throw RangeError.range(value, minValue, maxValue, name, message);
     }
   }
 
@@ -299,7 +299,7 @@
     // Comparing with `0` as receiver produces better dart2js type inference.
     if (0 > index || index >= length) {
       name ??= "index";
-      throw new RangeError.index(index, indexable, name, message, length);
+      throw RangeError.index(index, indexable, name, message, length);
     }
   }
 
@@ -325,12 +325,12 @@
     // Ditto `start > end` below.
     if (0 > start || start > length) {
       startName ??= "start";
-      throw new RangeError.range(start, 0, length, startName, message);
+      throw RangeError.range(start, 0, length, startName, message);
     }
     if (end != null) {
       if (start > end || end > length) {
         endName ??= "end";
-        throw new RangeError.range(end, start, length, endName, message);
+        throw RangeError.range(end, start, length, endName, message);
       }
       return end;
     }
@@ -343,7 +343,7 @@
    * Throws if the value is negative.
    */
   static void checkNotNegative(int value, [String name, String message]) {
-    if (value < 0) throw new RangeError.range(value, 0, null, name, message);
+    if (value < 0) throw RangeError.range(value, 0, null, name, message);
   }
 
   String get _errorName => "RangeError";
diff --git a/sdk/lib/core/exceptions.dart b/sdk/lib/core/exceptions.dart
index 103940c..2e137e5 100644
--- a/sdk/lib/core/exceptions.dart
+++ b/sdk/lib/core/exceptions.dart
@@ -18,7 +18,7 @@
  * until the actual exceptions used by a library are done.
  */
 abstract class Exception {
-  factory Exception([var message]) => new _Exception(message);
+  factory Exception([var message]) => _Exception(message);
 }
 
 /** Default implementation of [Exception] which carries a message. */
diff --git a/sdk/lib/core/invocation.dart b/sdk/lib/core/invocation.dart
index 3cae040..e9ea57e 100644
--- a/sdk/lib/core/invocation.dart
+++ b/sdk/lib/core/invocation.dart
@@ -23,8 +23,7 @@
   factory Invocation.method(
           Symbol memberName, Iterable<Object> positionalArguments,
           [Map<Symbol, Object> namedArguments]) =>
-      new _Invocation.method(
-          memberName, null, positionalArguments, namedArguments);
+      _Invocation.method(memberName, null, positionalArguments, namedArguments);
 
   /**
    * Creates an invocation corresponding to a generic method invocation.
@@ -38,7 +37,7 @@
   factory Invocation.genericMethod(Symbol memberName,
           Iterable<Type> typeArguments, Iterable<Object> positionalArguments,
           [Map<Symbol, Object> namedArguments]) =>
-      new _Invocation.method(
+      _Invocation.method(
           memberName, typeArguments, positionalArguments, namedArguments);
 
   /**
@@ -123,7 +122,7 @@
         _positional = _makeUnmodifiable<Object>(positional) ?? const <Object>[],
         _named = (named == null || named.isEmpty)
             ? const <Symbol, Object>{}
-            : new Map<Symbol, Object>.unmodifiable(named);
+            : Map<Symbol, Object>.unmodifiable(named);
 
   _Invocation.getter(this.memberName)
       : typeArguments = const <Type>[],
@@ -132,7 +131,7 @@
 
   _Invocation.setter(this.memberName, Object argument)
       : typeArguments = const <Type>[],
-        _positional = new List<Object>.unmodifiable([argument]),
+        _positional = List<Object>.unmodifiable([argument]),
         _named = null;
 
   List<dynamic> get positionalArguments => _positional ?? const <Object>[];
@@ -149,7 +148,7 @@
     if (types == null) return const <Type>[];
     for (int i = 0; i < types.length; i++) {
       if (types[i] == null) {
-        throw new ArgumentError(
+        throw ArgumentError(
             "Type arguments must be non-null, was null at index $i.");
       }
     }
@@ -158,6 +157,6 @@
 
   static List<T> _makeUnmodifiable<T>(Iterable<T> elements) {
     if (elements == null) return null;
-    return new List<T>.unmodifiable(elements);
+    return List<T>.unmodifiable(elements);
   }
 }
diff --git a/sdk/lib/core/iterable.dart b/sdk/lib/core/iterable.dart
index 7283bd6..0744937 100644
--- a/sdk/lib/core/iterable.dart
+++ b/sdk/lib/core/iterable.dart
@@ -100,8 +100,8 @@
    * `const [0, ..., n - 1].map(generator)`.
    */
   factory Iterable.generate(int count, [E generator(int index)]) {
-    if (count <= 0) return new EmptyIterable<E>();
-    return new _GeneratorIterable<E>(count, generator);
+    if (count <= 0) return EmptyIterable<E>();
+    return _GeneratorIterable<E>(count, generator);
   }
 
   /**
@@ -121,7 +121,7 @@
    * are accessed, then the resulting iterable can be used as an `Iterable<T>`.
    */
   static Iterable<T> castFrom<S, T>(Iterable<S> source) =>
-      new CastIterable<S, T>(source);
+      CastIterable<S, T>(source);
 
   /**
    * Returns a new `Iterator` that allows iterating the elements of this
@@ -173,9 +173,9 @@
    */
   Iterable<E> followedBy(Iterable<E> other) {
     if (this is EfficientLengthIterable<E>) {
-      return new FollowedByIterable<E>.firstEfficient(this, other);
+      return FollowedByIterable<E>.firstEfficient(this, other);
     }
-    return new FollowedByIterable<E>(this, other);
+    return FollowedByIterable<E>(this, other);
   }
 
   /**
@@ -192,7 +192,7 @@
    * on any element where the result isn't needed.
    * For example, [elementAt] may call `f` only once.
    */
-  Iterable<T> map<T>(T f(E e)) => new MappedIterable<E, T>(this, f);
+  Iterable<T> map<T>(T f(E e)) => MappedIterable<E, T>(this, f);
 
   /**
    * Returns a new lazy [Iterable] with all elements that satisfy the
@@ -208,7 +208,7 @@
    * the returned [Iterable] may invoke the supplied
    * function [test] multiple times on the same element.
    */
-  Iterable<E> where(bool test(E element)) => new WhereIterable<E>(this, test);
+  Iterable<E> where(bool test(E element)) => WhereIterable<E>(this, test);
 
   /**
    * Returns a new lazy [Iterable] with all elements that have type [T].
@@ -221,7 +221,7 @@
    * the returned [Iterable] may yield different results,
    * if the underlying elements change between iterations.
    */
-  Iterable<T> whereType<T>() => new WhereTypeIterable<T>(this);
+  Iterable<T> whereType<T>() => WhereTypeIterable<T>(this);
 
   /**
    * Expands each element of this [Iterable] into zero or more elements.
@@ -244,7 +244,7 @@
    *
    */
   Iterable<T> expand<T>(Iterable<T> f(E element)) =>
-      new ExpandIterable<E, T>(this, f);
+      ExpandIterable<E, T>(this, f);
 
   /**
    * Returns true if the collection contains an element equal to [element].
@@ -360,7 +360,7 @@
   String join([String separator = ""]) {
     Iterator<E> iterator = this.iterator;
     if (!iterator.moveNext()) return "";
-    StringBuffer buffer = new StringBuffer();
+    StringBuffer buffer = StringBuffer();
     if (separator == null || separator == "") {
       do {
         buffer.write("${iterator.current}");
@@ -394,8 +394,8 @@
    * The elements are in iteration order.
    * The list is fixed-length if [growable] is false.
    */
-  List<E> toList({bool growable: true}) {
-    return new List<E>.from(this, growable: growable);
+  List<E> toList({bool growable = true}) {
+    return List<E>.from(this, growable: growable);
   }
 
   /**
@@ -407,7 +407,7 @@
    * The order of the elements in the set is not guaranteed to be the same
    * as for the iterable.
    */
-  Set<E> toSet() => new Set<E>.from(this);
+  Set<E> toSet() => Set<E>.from(this);
 
   /**
    * Returns the number of elements in [this].
@@ -452,7 +452,7 @@
    * The `count` must not be negative.
    */
   Iterable<E> take(int count) {
-    return new TakeIterable<E>(this, count);
+    return TakeIterable<E>(this, count);
   }
 
   /**
@@ -466,7 +466,7 @@
    * the returned iterable stops (its `moveNext()` returns false).
    */
   Iterable<E> takeWhile(bool test(E value)) {
-    return new TakeWhileIterable<E>(this, test);
+    return TakeWhileIterable<E>(this, test);
   }
 
   /**
@@ -486,7 +486,7 @@
    * The [count] must not be negative.
    */
   Iterable<E> skip(int count) {
-    return new SkipIterable<E>(this, count);
+    return SkipIterable<E>(this, count);
   }
 
   /**
@@ -502,7 +502,7 @@
    * starting with the first element for which `test(element)` returns `false`.
    */
   Iterable<E> skipWhile(bool test(E value)) {
-    return new SkipWhileIterable<E>(this, test);
+    return SkipWhileIterable<E>(this, test);
   }
 
   /**
@@ -645,7 +645,7 @@
       if (index == elementIndex) return element;
       elementIndex++;
     }
-    throw new RangeError.index(index, this, "index", null, elementIndex);
+    throw RangeError.index(index, this, "index", null, elementIndex);
   }
 
   /**
@@ -667,7 +667,7 @@
   String toString() => IterableBase.iterableToShortString(this, '(', ')');
 }
 
-typedef E _Generator<E>(int index);
+typedef _Generator<E> = E Function(int index);
 
 class _GeneratorIterable<E> extends ListIterable<E> {
   /// The length of the generated iterable.
diff --git a/sdk/lib/core/list.dart b/sdk/lib/core/list.dart
index 66de4e5..fff3d7a 100644
--- a/sdk/lib/core/list.dart
+++ b/sdk/lib/core/list.dart
@@ -108,7 +108,7 @@
    * print(unique); // => [[499], [], []]
    * ```
    */
-  external factory List.filled(int length, E fill, {bool growable: false});
+  external factory List.filled(int length, E fill, {bool growable = false});
 
   /**
    * Creates a list containing all [elements].
@@ -127,7 +127,7 @@
    * This constructor creates a growable list when [growable] is true;
    * otherwise, it returns a fixed-length list.
    */
-  external factory List.from(Iterable elements, {bool growable: true});
+  external factory List.from(Iterable elements, {bool growable = true});
 
   /**
    * Creates a list from [elements].
@@ -137,8 +137,8 @@
    * This constructor creates a growable list when [growable] is true;
    * otherwise, it returns a fixed-length list.
    */
-  factory List.of(Iterable<E> elements, {bool growable: true}) =>
-      new List<E>.from(elements, growable: growable);
+  factory List.of(Iterable<E> elements, {bool growable = true}) =>
+      List<E>.from(elements, growable: growable);
 
   /**
    * Generates a list of values.
@@ -152,12 +152,12 @@
    * The created list is fixed-length unless [growable] is true.
    */
   factory List.generate(int length, E generator(int index),
-      {bool growable: true}) {
+      {bool growable = true}) {
     List<E> result;
     if (growable) {
       result = <E>[]..length = length;
     } else {
-      result = new List<E>(length);
+      result = List<E>(length);
     }
     for (int i = 0; i < length; i++) {
       result[i] = generator(i);
@@ -190,7 +190,7 @@
    * of [S],
    * then the returned list can be used as a `List<T>`.
    */
-  static List<T> castFrom<S, T>(List<S> source) => new CastList<S, T>(source);
+  static List<T> castFrom<S, T>(List<S> source) => CastList<S, T>(source);
 
   /**
    * Copy a range of one list into another list.
@@ -214,7 +214,7 @@
     end = RangeError.checkValidRange(start, end, source.length);
     int length = end - start;
     if (target.length < at + length) {
-      throw new ArgumentError.value(target, "target",
+      throw ArgumentError.value(target, "target",
           "Not big enough to hold $length elements at position $at");
     }
     if (!identical(source, target) || start >= at) {
@@ -247,7 +247,7 @@
     int targetLength = target.length;
     for (var element in source) {
       if (index == targetLength) {
-        throw new IndexError(targetLength, target);
+        throw IndexError(targetLength, target);
       }
       target[index] = element;
       index++;
diff --git a/sdk/lib/core/map.dart b/sdk/lib/core/map.dart
index 0c2f586..f914fe1 100644
--- a/sdk/lib/core/map.dart
+++ b/sdk/lib/core/map.dart
@@ -170,7 +170,7 @@
    * then the returned map can be used as a `Map<K2, V2>`.
    */
   static Map<K2, V2> castFrom<K, V, K2, V2>(Map<K, V> source) =>
-      new CastMap<K, V, K2, V2>(source);
+      CastMap<K, V, K2, V2>(source);
 
   /**
    * Creates a new map and adds all entries.
diff --git a/sdk/lib/core/null.dart b/sdk/lib/core/null.dart
index 212fb47..af7d86d 100644
--- a/sdk/lib/core/null.dart
+++ b/sdk/lib/core/null.dart
@@ -14,7 +14,7 @@
 @pragma("vm:entry-point")
 class Null {
   factory Null._uninstantiable() {
-    throw new UnsupportedError('class Null cannot be instantiated');
+    throw UnsupportedError('class Null cannot be instantiated');
   }
 
   external int get hashCode;
diff --git a/sdk/lib/core/num.dart b/sdk/lib/core/num.dart
index 33b8177..e04112c 100644
--- a/sdk/lib/core/num.dart
+++ b/sdk/lib/core/num.dart
@@ -471,7 +471,7 @@
   static num parse(String input, [@deprecated num onError(String input)]) {
     num result = tryParse(input);
     if (result != null) return result;
-    if (onError == null) throw new FormatException(input);
+    if (onError == null) throw FormatException(input);
     return onError(input);
   }
 
diff --git a/sdk/lib/core/regexp.dart b/sdk/lib/core/regexp.dart
index 9164fb9..c0bd153 100644
--- a/sdk/lib/core/regexp.dart
+++ b/sdk/lib/core/regexp.dart
@@ -60,7 +60,7 @@
    * interpolation is required.
    */
   external factory RegExp(String source,
-      {bool multiLine: false, bool caseSensitive: true});
+      {bool multiLine = false, bool caseSensitive = true});
 
   /**
    * Returns a regular expression that matches [text].
@@ -121,3 +121,30 @@
    */
   bool get isCaseSensitive;
 }
+
+/**
+ * A regular expression match.
+ *
+ * Regular expression matches are [Match]es, but also include the ability
+ * to retrieve the names for any named capture groups and to retrieve
+ * matches for named capture groups by name instead of their index.
+ */
+abstract class RegExpMatch implements Match {
+  /**
+   * The string matched by the group named [name].
+   *
+   * Returns the string matched by the capture group named [name], or
+   * `null` if no string was matched by that capture group as part of
+   * this match.
+   *
+   * The [name] must be the name of a named capture group in the regular
+   * expression creating this match (that is, the name must be in
+   * [groupNames]).
+   */
+  String namedGroup(String name);
+
+  /**
+   * The names of the captured groups in the match.
+   */
+  Iterable<String> get groupNames;
+}
diff --git a/sdk/lib/core/set.dart b/sdk/lib/core/set.dart
index 7b477df..e57d974 100644
--- a/sdk/lib/core/set.dart
+++ b/sdk/lib/core/set.dart
@@ -111,7 +111,7 @@
    * then the returned set can be used as a `Set<T>`.
    */
   static Set<T> castFrom<S, T>(Set<S> source, {Set<R> Function<R>() newSet}) =>
-      new CastSet<S, T>(source, newSet);
+      CastSet<S, T>(source, newSet);
 
   /**
    * Provides a view of this set as a set of [R] instances.
diff --git a/sdk/lib/core/stopwatch.dart b/sdk/lib/core/stopwatch.dart
index cdecaca..45d71ca 100644
--- a/sdk/lib/core/stopwatch.dart
+++ b/sdk/lib/core/stopwatch.dart
@@ -96,7 +96,7 @@
    * The [elapsedTicks] counter converted to a [Duration].
    */
   Duration get elapsed {
-    return new Duration(microseconds: elapsedMicroseconds);
+    return Duration(microseconds: elapsedMicroseconds);
   }
 
   /**
diff --git a/sdk/lib/core/string.dart b/sdk/lib/core/string.dart
index 0c81f28..c611bd5 100644
--- a/sdk/lib/core/string.dart
+++ b/sdk/lib/core/string.dart
@@ -639,11 +639,11 @@
   final String string;
   Runes(this.string);
 
-  RuneIterator get iterator => new RuneIterator(string);
+  RuneIterator get iterator => RuneIterator(string);
 
   int get last {
     if (string.length == 0) {
-      throw new StateError('No elements.');
+      throw StateError('No elements.');
     }
     int length = string.length;
     int code = string.codeUnitAt(length - 1);
@@ -716,7 +716,7 @@
         index < string.length &&
         _isLeadSurrogate(string.codeUnitAt(index - 1)) &&
         _isTrailSurrogate(string.codeUnitAt(index))) {
-      throw new ArgumentError('Index inside surrogate pair: $index');
+      throw ArgumentError('Index inside surrogate pair: $index');
     }
   }
 
diff --git a/sdk/lib/core/symbol.dart b/sdk/lib/core/symbol.dart
index 025aa85..a46ec97 100644
--- a/sdk/lib/core/symbol.dart
+++ b/sdk/lib/core/symbol.dart
@@ -7,7 +7,7 @@
 /// Opaque name used by mirrors, invocations and [Function.apply].
 abstract class Symbol {
   /** The symbol corresponding to the name of the unary minus operator. */
-  static const Symbol unaryMinus = const Symbol("unary-");
+  static const Symbol unaryMinus = Symbol("unary-");
 
   /**
    * The empty symbol.
@@ -15,7 +15,7 @@
    * The empty symbol is the name of libraries with no library declaration,
    * and the base-name of the unnamed constructor.
    */
-  static const Symbol empty = const Symbol("");
+  static const Symbol empty = Symbol("");
 
   /**
    * Constructs a new [Symbol] representing the provided name.
diff --git a/sdk/lib/core/uri.dart b/sdk/lib/core/uri.dart
index 0c431b7..2c7d918 100644
--- a/sdk/lib/core/uri.dart
+++ b/sdk/lib/core/uri.dart
@@ -300,8 +300,8 @@
       {String mimeType,
       Encoding encoding,
       Map<String, String> parameters,
-      bool base64: false}) {
-    UriData data = new UriData.fromString(content,
+      bool base64 = false}) {
+    UriData data = UriData.fromString(content,
         mimeType: mimeType,
         encoding: encoding,
         parameters: parameters,
@@ -326,10 +326,10 @@
    * encoded.
    */
   factory Uri.dataFromBytes(List<int> bytes,
-      {mimeType: "application/octet-stream",
+      {mimeType = "application/octet-stream",
       Map<String, String> parameters,
-      percentEncoded: false}) {
-    UriData data = new UriData.fromBytes(bytes,
+      percentEncoded = false}) {
+    UriData data = UriData.fromBytes(bytes,
         mimeType: mimeType,
         parameters: parameters,
         percentEncoded: percentEncoded);
@@ -804,7 +804,7 @@
     // The following index-normalization belongs with the scanning, but is
     // easier to do here because we already have extracted variables from the
     // indices list.
-    var indices = new List<int>(8);
+    var indices = List<int>(8);
 
     // Set default values for each position.
     // The value will either be correct in some cases where it isn't set
@@ -1012,11 +1012,11 @@
         queryStart -= start;
         fragmentStart -= start;
       }
-      return new _SimpleUri(uri, schemeEnd, hostStart, portStart, pathStart,
+      return _SimpleUri(uri, schemeEnd, hostStart, portStart, pathStart,
           queryStart, fragmentStart, scheme);
     }
 
-    return new _Uri.notSimple(uri, start, end, schemeEnd, hostStart, portStart,
+    return _Uri.notSimple(uri, start, end, schemeEnd, hostStart, portStart,
         pathStart, queryStart, fragmentStart, scheme);
   }
 
@@ -1096,7 +1096,7 @@
    * details.
    */
   static String encodeQueryComponent(String component,
-      {Encoding encoding: utf8}) {
+      {Encoding encoding = utf8}) {
     return _Uri._uriEncode(_Uri._unreservedTable, component, encoding, true);
   }
 
@@ -1127,7 +1127,7 @@
    * UTF-8.
    */
   static String decodeQueryComponent(String encodedComponent,
-      {Encoding encoding: utf8}) {
+      {Encoding encoding = utf8}) {
     return _Uri._uriDecode(
         encodedComponent, 0, encodedComponent.length, encoding, true);
   }
@@ -1171,7 +1171,7 @@
    * is UTF-8.
    */
   static Map<String, String> splitQueryString(String query,
-      {Encoding encoding: utf8}) {
+      {Encoding encoding = utf8}) {
     return query.split("&").fold({}, (map, element) {
       int index = element.indexOf("=");
       if (index == -1) {
@@ -1201,10 +1201,10 @@
   /// Implementation of [parseIPv4Address] that can work on a substring.
   static List<int> _parseIPv4Address(String host, int start, int end) {
     void error(String msg, int position) {
-      throw new FormatException('Illegal IPv4 address, $msg', host, position);
+      throw FormatException('Illegal IPv4 address, $msg', host, position);
     }
 
-    var result = new Uint8List(4);
+    var result = Uint8List(4);
     int partIndex = 0;
     int partStart = start;
     for (int i = start; i < end; i++) {
@@ -1268,7 +1268,7 @@
 
     // Helper function for reporting a badly formatted IPv6 address.
     void error(String msg, [position]) {
-      throw new FormatException('Illegal IPv6 address, $msg', host, position);
+      throw FormatException('Illegal IPv6 address, $msg', host, position);
     }
 
     // Parse a hex block.
@@ -1339,7 +1339,7 @@
     } else if (parts.length != 8) {
       error('an address without a wildcard must contain exactly 8 parts');
     }
-    List<int> bytes = new Uint8List(16);
+    List<int> bytes = Uint8List(16);
     for (int i = 0, index = 0; i < parts.length; i++) {
       int value = parts[i];
       if (value == -1) {
@@ -1476,7 +1476,7 @@
       if (portStart + 1 < pathStart) {
         // Should throw because invalid.
         port = int.parse(uri.substring(portStart + 1, pathStart), onError: (_) {
-          throw new FormatException("Invalid port", uri, portStart + 1);
+          throw FormatException("Invalid port", uri, portStart + 1);
         });
         port = _makePort(port, scheme);
       }
@@ -1491,8 +1491,7 @@
     if (fragmentStart < end) {
       fragment = _makeFragment(uri, fragmentStart + 1, end);
     }
-    return new _Uri._internal(
-        scheme, userInfo, host, port, path, query, fragment);
+    return _Uri._internal(scheme, userInfo, host, port, path, query, fragment);
   }
 
   /// Implementation of [Uri.Uri].
@@ -1530,8 +1529,7 @@
     if (host == null && path.startsWith("//")) {
       host = "";
     }
-    return new _Uri._internal(
-        scheme, userInfo, host, port, path, query, fragment);
+    return _Uri._internal(scheme, userInfo, host, port, path, query, fragment);
   }
 
   /// Implementation of [Uri.http].
@@ -1548,7 +1546,7 @@
 
   String get authority {
     if (!hasAuthority) return "";
-    var sb = new StringBuffer();
+    var sb = StringBuffer();
     _writeAuthority(sb);
     return sb.toString();
   }
@@ -1619,7 +1617,7 @@
 
   // Report a parse failure.
   static void _fail(String uri, int index, String message) {
-    throw new FormatException(message, uri, index);
+    throw FormatException(message, uri, index);
   }
 
   static Uri _makeHttpUri(String scheme, String authority, String unencodedPath,
@@ -1649,15 +1647,14 @@
           if (authority.codeUnitAt(hostEnd) == _RIGHT_BRACKET) break;
         }
         if (hostEnd == authority.length) {
-          throw new FormatException(
+          throw FormatException(
               "Invalid IPv6 host entry.", authority, hostStart);
         }
         Uri.parseIPv6Address(authority, hostStart + 1, hostEnd);
         hostEnd++; // Skip the closing bracket.
         if (hostEnd != authority.length &&
             authority.codeUnitAt(hostEnd) != _COLON) {
-          throw new FormatException(
-              "Invalid end of authority", authority, hostEnd);
+          throw FormatException("Invalid end of authority", authority, hostEnd);
         }
       }
       // Split host and port.
@@ -1672,7 +1669,7 @@
       }
       host = authority.substring(hostStart, hostEnd);
     }
-    return new Uri(
+    return Uri(
         scheme: scheme,
         userInfo: userInfo,
         host: host,
@@ -1703,9 +1700,9 @@
     segments.forEach((segment) {
       if (segment.contains("/")) {
         if (argumentError) {
-          throw new ArgumentError("Illegal path character $segment");
+          throw ArgumentError("Illegal path character $segment");
         } else {
-          throw new UnsupportedError("Illegal path character $segment");
+          throw UnsupportedError("Illegal path character $segment");
         }
       }
     });
@@ -1715,11 +1712,11 @@
       List<String> segments, bool argumentError,
       [int firstSegment = 0]) {
     for (var segment in segments.skip(firstSegment)) {
-      if (segment.contains(new RegExp(r'["*/:<>?\\|]'))) {
+      if (segment.contains(RegExp(r'["*/:<>?\\|]'))) {
         if (argumentError) {
-          throw new ArgumentError("Illegal character in path");
+          throw ArgumentError("Illegal character in path");
         } else {
-          throw new UnsupportedError("Illegal character in path: $segment");
+          throw UnsupportedError("Illegal character in path: $segment");
         }
       }
     }
@@ -1731,11 +1728,11 @@
       return;
     }
     if (argumentError) {
-      throw new ArgumentError(
-          "Illegal drive letter " + new String.fromCharCode(charCode));
+      throw ArgumentError(
+          "Illegal drive letter " + String.fromCharCode(charCode));
     } else {
-      throw new UnsupportedError(
-          "Illegal drive letter " + new String.fromCharCode(charCode));
+      throw UnsupportedError(
+          "Illegal drive letter " + String.fromCharCode(charCode));
     }
   }
 
@@ -1747,10 +1744,10 @@
     }
     if (path.startsWith(sep)) {
       // Absolute file:// URI.
-      return new Uri(scheme: "file", pathSegments: segments);
+      return Uri(scheme: "file", pathSegments: segments);
     } else {
       // Relative URI.
-      return new Uri(pathSegments: segments);
+      return Uri(pathSegments: segments);
     }
   }
 
@@ -1763,7 +1760,7 @@
         if (path.length < 3 ||
             path.codeUnitAt(1) != _COLON ||
             path.codeUnitAt(2) != _BACKSLASH) {
-          throw new ArgumentError(
+          throw ArgumentError(
               r"Windows paths with \\?\ prefix must be absolute");
         }
       }
@@ -1774,8 +1771,7 @@
     if (path.length > 1 && path.codeUnitAt(1) == _COLON) {
       _checkWindowsDriveLetter(path.codeUnitAt(0), true);
       if (path.length == 2 || path.codeUnitAt(2) != _BACKSLASH) {
-        throw new ArgumentError(
-            "Windows paths with drive letter must be absolute");
+        throw ArgumentError("Windows paths with drive letter must be absolute");
       }
       // Absolute file://C:/ URI.
       var pathSegments = path.split(sep);
@@ -1783,7 +1779,7 @@
         pathSegments.add(""); // Extra separator at end.
       }
       _checkWindowsPathReservedCharacters(pathSegments, true, 1);
-      return new Uri(scheme: "file", pathSegments: pathSegments);
+      return Uri(scheme: "file", pathSegments: pathSegments);
     }
 
     if (path.startsWith(sep)) {
@@ -1798,8 +1794,7 @@
         if (slashTerminated && pathSegments.last.isNotEmpty) {
           pathSegments.add(""); // Extra separator at end.
         }
-        return new Uri(
-            scheme: "file", host: hostPart, pathSegments: pathSegments);
+        return Uri(scheme: "file", host: hostPart, pathSegments: pathSegments);
       } else {
         // Absolute file:// URI.
         var pathSegments = path.split(sep);
@@ -1807,7 +1802,7 @@
           pathSegments.add(""); // Extra separator at end.
         }
         _checkWindowsPathReservedCharacters(pathSegments, true);
-        return new Uri(scheme: "file", pathSegments: pathSegments);
+        return Uri(scheme: "file", pathSegments: pathSegments);
       }
     } else {
       // Relative URI.
@@ -1818,7 +1813,7 @@
           pathSegments.last.isNotEmpty) {
         pathSegments.add(""); // Extra separator at end.
       }
-      return new Uri(pathSegments: pathSegments);
+      return Uri(pathSegments: pathSegments);
     }
   }
 
@@ -1889,14 +1884,12 @@
       fragment = this._fragment;
     }
 
-    return new _Uri._internal(
-        scheme, userInfo, host, port, path, query, fragment);
+    return _Uri._internal(scheme, userInfo, host, port, path, query, fragment);
   }
 
   Uri removeFragment() {
     if (!this.hasFragment) return this;
-    return new _Uri._internal(
-        scheme, _userInfo, _host, _port, path, _query, null);
+    return _Uri._internal(scheme, _userInfo, _host, _port, path, _query, null);
   }
 
   List<String> get pathSegments {
@@ -1909,7 +1902,7 @@
     }
     result = (pathToSplit == "")
         ? const <String>[]
-        : new List<String>.unmodifiable(
+        : List<String>.unmodifiable(
             pathToSplit.split("/").map(Uri.decodeComponent));
     _pathSegments = result;
     return result;
@@ -1917,7 +1910,7 @@
 
   Map<String, String> get queryParameters {
     _queryParameters ??=
-        new UnmodifiableMapView<String, String>(Uri.splitQueryString(query));
+        UnmodifiableMapView<String, String>(Uri.splitQueryString(query));
     return _queryParameters;
   }
 
@@ -1926,10 +1919,10 @@
       Map queryParameterLists = _splitQueryStringAll(query);
       for (var key in queryParameterLists.keys) {
         queryParameterLists[key] =
-            new List<String>.unmodifiable(queryParameterLists[key]);
+            List<String>.unmodifiable(queryParameterLists[key]);
       }
       _queryParameterLists =
-          new Map<String, List<String>>.unmodifiable(queryParameterLists);
+          Map<String, List<String>>.unmodifiable(queryParameterLists);
     }
     return _queryParameterLists;
   }
@@ -2009,7 +2002,7 @@
           index += 3;
           continue;
         }
-        buffer ??= new StringBuffer();
+        buffer ??= StringBuffer();
         String slice = host.substring(sectionStart, index);
         if (!isNormalized) slice = slice.toLowerCase();
         buffer.write(slice);
@@ -2027,7 +2020,7 @@
       } else if (_isRegNameChar(char)) {
         if (isNormalized && _UPPER_CASE_A <= char && _UPPER_CASE_Z >= char) {
           // Put initial slice in buffer and continue in non-normalized mode
-          buffer ??= new StringBuffer();
+          buffer ??= StringBuffer();
           if (sectionStart < index) {
             buffer.write(host.substring(sectionStart, index));
             sectionStart = index;
@@ -2046,7 +2039,7 @@
             sourceLength = 2;
           }
         }
-        buffer ??= new StringBuffer();
+        buffer ??= StringBuffer();
         String slice = host.substring(sectionStart, index);
         if (!isNormalized) slice = slice.toLowerCase();
         buffer.write(slice);
@@ -2112,7 +2105,7 @@
     bool ensureLeadingSlash = isFile || hasAuthority;
     if (path == null && pathSegments == null) return isFile ? "/" : "";
     if (path != null && pathSegments != null) {
-      throw new ArgumentError('Both path and pathSegments specified');
+      throw ArgumentError('Both path and pathSegments specified');
     }
     String result;
     if (path != null) {
@@ -2148,14 +2141,14 @@
       Map<String, dynamic /*String|Iterable<String>*/ > queryParameters) {
     if (query != null) {
       if (queryParameters != null) {
-        throw new ArgumentError('Both query and queryParameters specified');
+        throw ArgumentError('Both query and queryParameters specified');
       }
       return _normalizeOrSubstring(query, start, end, _queryCharTable,
           escapeDelimiters: true);
     }
     if (queryParameters == null) return null;
 
-    var result = new StringBuffer();
+    var result = StringBuffer();
     var separator = "";
 
     void writeParameter(String key, String value) {
@@ -2217,7 +2210,7 @@
       if (lowerCase && _UPPER_CASE_A <= value && _UPPER_CASE_Z >= value) {
         value |= 0x20;
       }
-      return new String.fromCharCode(value);
+      return String.fromCharCode(value);
     }
     if (firstDigit >= _LOWER_CASE_A || secondDigit >= _LOWER_CASE_A) {
       // Either digit is lower case.
@@ -2233,7 +2226,7 @@
     List<int> codeUnits;
     if (char < 0x80) {
       // ASCII, a single percent encoded sequence.
-      codeUnits = new List(3);
+      codeUnits = List(3);
       codeUnits[0] = _PERCENT;
       codeUnits[1] = _hexDigits.codeUnitAt(char >> 4);
       codeUnits[2] = _hexDigits.codeUnitAt(char & 0xf);
@@ -2249,7 +2242,7 @@
           flag = 0xf0;
         }
       }
-      codeUnits = new List(3 * encodedBytes);
+      codeUnits = List(3 * encodedBytes);
       int index = 0;
       while (--encodedBytes >= 0) {
         int byte = ((char >> (6 * encodedBytes)) & 0x3f) | flag;
@@ -2260,7 +2253,7 @@
         flag = 0x80; // Following bytes have only high bit set.
       }
     }
-    return new String.fromCharCodes(codeUnits);
+    return String.fromCharCodes(codeUnits);
   }
 
   /**
@@ -2333,7 +2326,7 @@
           }
           replacement = _escapeChar(char);
         }
-        buffer ??= new StringBuffer();
+        buffer ??= StringBuffer();
         buffer.write(component.substring(sectionStart, index));
         buffer.write(replacement);
         index += sourceLength;
@@ -2578,8 +2571,8 @@
       }
     }
     String fragment = reference.hasFragment ? reference.fragment : null;
-    return new _Uri._internal(targetScheme, targetUserInfo, targetHost,
-        targetPort, targetPath, targetQuery, fragment);
+    return _Uri._internal(targetScheme, targetUserInfo, targetHost, targetPort,
+        targetPath, targetQuery, fragment);
   }
 
   bool get hasScheme => scheme.isNotEmpty;
@@ -2598,14 +2591,14 @@
 
   String get origin {
     if (scheme == "") {
-      throw new StateError("Cannot use origin without a scheme: $this");
+      throw StateError("Cannot use origin without a scheme: $this");
     }
     if (scheme != "http" && scheme != "https") {
-      throw new StateError(
+      throw StateError(
           "Origin is only applicable schemes http and https: $this");
     }
     if (_host == null || _host == "") {
-      throw new StateError(
+      throw StateError(
           "A $scheme: URI should have a non-empty host name: $this");
     }
     if (_port == null) return "$scheme://$_host";
@@ -2614,15 +2607,14 @@
 
   String toFilePath({bool windows}) {
     if (scheme != "" && scheme != "file") {
-      throw new UnsupportedError(
-          "Cannot extract a file path from a $scheme URI");
+      throw UnsupportedError("Cannot extract a file path from a $scheme URI");
     }
     if (query != "") {
-      throw new UnsupportedError(
+      throw UnsupportedError(
           "Cannot extract a file path from a URI with a query component");
     }
     if (fragment != "") {
-      throw new UnsupportedError(
+      throw UnsupportedError(
           "Cannot extract a file path from a URI with a fragment component");
     }
     windows ??= _isWindows;
@@ -2631,14 +2623,14 @@
 
   String _toFilePath() {
     if (hasAuthority && host != "") {
-      throw new UnsupportedError(
+      throw UnsupportedError(
           "Cannot extract a non-Windows file path from a file URI "
           "with an authority");
     }
     // Use path segments to have any escapes unescaped.
     var pathSegments = this.pathSegments;
     _checkNonWindowsPathReservedCharacters(pathSegments, false);
-    var result = new StringBuffer();
+    var result = StringBuffer();
     if (hasAbsolutePath) result.write("/");
     result.writeAll(pathSegments, "/");
     return result.toString();
@@ -2656,7 +2648,7 @@
     } else {
       _checkWindowsPathReservedCharacters(segments, false, 0);
     }
-    var result = new StringBuffer();
+    var result = StringBuffer();
     if (uri.hasAbsolutePath && !hasDriveLetter) result.write(r"\");
     if (uri.hasAuthority) {
       var host = uri.host;
@@ -2695,7 +2687,7 @@
    * The [UriData] object can be used to access the media type and data
    * of a `data:` URI.
    */
-  UriData get data => (scheme == "data") ? new UriData.fromUri(this) : null;
+  UriData get data => (scheme == "data") ? UriData.fromUri(this) : null;
 
   String toString() {
     return _text ??= _initializeText();
@@ -2703,7 +2695,7 @@
 
   String _initializeText() {
     assert(_text == null);
-    StringBuffer sb = new StringBuffer();
+    StringBuffer sb = StringBuffer();
     if (scheme.isNotEmpty) sb..write(scheme)..write(":");
     if (hasAuthority || (scheme == "file")) {
       // File URIS always have the authority, even if it is empty.
@@ -2739,7 +2731,7 @@
   static List<String> _createList() => <String>[];
 
   static Map<String, List<String>> _splitQueryStringAll(String query,
-      {Encoding encoding: utf8}) {
+      {Encoding encoding = utf8}) {
     var result = <String, List<String>>{};
     int i = 0;
     int start = 0;
@@ -2793,7 +2785,7 @@
         if (0x61 <= charCode && charCode <= 0x66) {
           byte = byte * 16 + charCode - 0x57;
         } else {
-          throw new ArgumentError("Invalid URL encoding");
+          throw ArgumentError("Invalid URL encoding");
         }
       }
     }
@@ -2837,15 +2829,15 @@
         bytes = text.substring(start, end).codeUnits;
       }
     } else {
-      bytes = new List();
+      bytes = List();
       for (int i = start; i < end; i++) {
         var codeUnit = text.codeUnitAt(i);
         if (codeUnit > 127) {
-          throw new ArgumentError("Illegal percent encoding in URI");
+          throw ArgumentError("Illegal percent encoding in URI");
         }
         if (codeUnit == _PERCENT) {
           if (i + 3 > text.length) {
-            throw new ArgumentError('Truncated URI');
+            throw ArgumentError('Truncated URI');
           }
           bytes.add(_hexCharPairToByte(text, i + 1));
           i += 2;
@@ -2874,7 +2866,7 @@
   // be escaped or not.
 
   // The unreserved characters of RFC 3986.
-  static const _unreservedTable = const <int>[
+  static const _unreservedTable = <int>[
     //                     LSB            MSB
     //                      |              |
     0x0000, // 0x00 - 0x0f  0000000000000000
@@ -2894,7 +2886,7 @@
   ];
 
   // The unreserved characters of RFC 2396.
-  static const _unreserved2396Table = const <int>[
+  static const _unreserved2396Table = <int>[
     //                     LSB            MSB
     //                      |              |
     0x0000, // 0x00 - 0x0f  0000000000000000
@@ -2914,7 +2906,7 @@
   ];
 
   // Table of reserved characters specified by ECMAScript 5.
-  static const _encodeFullTable = const <int>[
+  static const _encodeFullTable = <int>[
     //                     LSB            MSB
     //                      |              |
     0x0000, // 0x00 - 0x0f  0000000000000000
@@ -2934,7 +2926,7 @@
   ];
 
   // Characters allowed in the scheme.
-  static const _schemeTable = const <int>[
+  static const _schemeTable = <int>[
     //                     LSB            MSB
     //                      |              |
     0x0000, // 0x00 - 0x0f  0000000000000000
@@ -2954,7 +2946,7 @@
   ];
 
   // Characters allowed in scheme except for upper case letters.
-  static const _schemeLowerTable = const <int>[
+  static const _schemeLowerTable = <int>[
     //                     LSB            MSB
     //                      |              |
     0x0000, // 0x00 - 0x0f  0000000000000000
@@ -2978,7 +2970,7 @@
   //         / "*" / "+" / "," / ";" / "="
   // RFC 3986 section 2.3.
   // unreserved  = ALPHA / DIGIT / "-" / "." / "_" / "~"
-  static const _subDelimitersTable = const <int>[
+  static const _subDelimitersTable = <int>[
     //                     LSB            MSB
     //                      |              |
     0x0000, // 0x00 - 0x0f  0000000000000000
@@ -3000,7 +2992,7 @@
   // General delimiter characters, RFC 3986 section 2.2.
   // gen-delims  = ":" / "/" / "?" / "#" / "[" / "]" / "@"
   //
-  static const _genDelimitersTable = const <int>[
+  static const _genDelimitersTable = <int>[
     //                     LSB            MSB
     //                      |              |
     0x0000, // 0x00 - 0x0f  0000000000000000
@@ -3022,7 +3014,7 @@
   // Characters allowed in the userinfo as of RFC 3986.
   // RFC 3986 Appendix A
   // userinfo = *( unreserved / pct-encoded / sub-delims / ':')
-  static const _userinfoTable = const <int>[
+  static const _userinfoTable = <int>[
     //                     LSB            MSB
     //                      |              |
     0x0000, // 0x00 - 0x0f  0000000000000000
@@ -3044,7 +3036,7 @@
   // Characters allowed in the reg-name as of RFC 3986.
   // RFC 3986 Appendix A
   // reg-name = *( unreserved / pct-encoded / sub-delims )
-  static const _regNameTable = const <int>[
+  static const _regNameTable = <int>[
     //                     LSB            MSB
     //                      |              |
     0x0000, // 0x00 - 0x0f  0000000000000000
@@ -3066,7 +3058,7 @@
   // Characters allowed in the path as of RFC 3986.
   // RFC 3986 section 3.3.
   // pchar = unreserved / pct-encoded / sub-delims / ":" / "@"
-  static const _pathCharTable = const <int>[
+  static const _pathCharTable = <int>[
     //                     LSB            MSB
     //                      |              |
     0x0000, // 0x00 - 0x0f  0000000000000000
@@ -3087,7 +3079,7 @@
 
   // Characters allowed in the path as of RFC 3986.
   // RFC 3986 section 3.3 *and* slash.
-  static const _pathCharOrSlashTable = const [
+  static const _pathCharOrSlashTable = [
     //                     LSB            MSB
     //                      |              |
     0x0000, // 0x00 - 0x0f  0000000000000000
@@ -3110,7 +3102,7 @@
   // Characters allowed in the query as of RFC 3986.
   // RFC 3986 section 3.4.
   // query = *( pchar / "/" / "?" )
-  static const _queryCharTable = const [
+  static const _queryCharTable = [
     //                     LSB            MSB
     //                      |              |
     0x0000, // 0x00 - 0x0f  0000000000000000
@@ -3197,8 +3189,8 @@
       {String mimeType,
       Encoding encoding,
       Map<String, String> parameters,
-      bool base64: false}) {
-    StringBuffer buffer = new StringBuffer();
+      bool base64 = false}) {
+    StringBuffer buffer = StringBuffer();
     List<int> indices = [_noScheme];
     String charsetName;
     String encodingName;
@@ -3222,7 +3214,7 @@
       buffer.write(',');
       _uriEncodeBytes(_uricTable, encoding.encode(content), buffer);
     }
-    return new UriData._(buffer.toString(), indices, null);
+    return UriData._(buffer.toString(), indices, null);
   }
 
   /**
@@ -3232,10 +3224,10 @@
    * be more efficient if the [uri] itself isn't used.
    */
   factory UriData.fromBytes(List<int> bytes,
-      {mimeType: "application/octet-stream",
+      {mimeType = "application/octet-stream",
       Map<String, String> parameters,
-      percentEncoded: false}) {
-    StringBuffer buffer = new StringBuffer();
+      percentEncoded = false}) {
+    StringBuffer buffer = StringBuffer();
     List<int> indices = [_noScheme];
     _writeUri(mimeType, null, parameters, buffer, indices);
     indices.add(buffer.length);
@@ -3246,12 +3238,11 @@
       buffer.write(';base64,');
       indices.add(buffer.length - 1);
       _base64.encoder
-          .startChunkedConversion(
-              new StringConversionSink.fromStringSink(buffer))
+          .startChunkedConversion(StringConversionSink.fromStringSink(buffer))
           .addSlice(bytes, 0, bytes.length, true);
     }
 
-    return new UriData._(buffer.toString(), indices, null);
+    return UriData._(buffer.toString(), indices, null);
   }
 
   /**
@@ -3263,14 +3254,13 @@
    */
   factory UriData.fromUri(Uri uri) {
     if (uri.scheme != "data") {
-      throw new ArgumentError.value(uri, "uri", "Scheme must be 'data'");
+      throw ArgumentError.value(uri, "uri", "Scheme must be 'data'");
     }
     if (uri.hasAuthority) {
-      throw new ArgumentError.value(
-          uri, "uri", "Data uri must not have authority");
+      throw ArgumentError.value(uri, "uri", "Data uri must not have authority");
     }
     if (uri.hasFragment) {
-      throw new ArgumentError.value(
+      throw ArgumentError.value(
           uri, "uri", "Data uri must not have a fragment part");
     }
     if (!uri.hasQuery) {
@@ -3298,8 +3288,7 @@
     } else {
       int slashIndex = _validateMimeType(mimeType);
       if (slashIndex < 0) {
-        throw new ArgumentError.value(
-            mimeType, "mimeType", "Invalid MIME type");
+        throw ArgumentError.value(mimeType, "mimeType", "Invalid MIME type");
       }
       buffer.write(_Uri._uriEncode(
           _tokenCharTable, mimeType.substring(0, slashIndex), utf8, false));
@@ -3316,10 +3305,10 @@
     }
     parameters?.forEach((key, value) {
       if (key.isEmpty) {
-        throw new ArgumentError.value("", "Parameter names must not be empty");
+        throw ArgumentError.value("", "Parameter names must not be empty");
       }
       if (value.isEmpty) {
-        throw new ArgumentError.value(
+        throw ArgumentError.value(
             "", "Parameter values must not be empty", 'parameters["$key"]');
       }
       if (indices != null) indices.add(buffer.length);
@@ -3396,7 +3385,7 @@
         return _parse(uri.substring(5), 0, null);
       }
     }
-    throw new FormatException("Does not start with 'data:'", uri, 0);
+    throw FormatException("Does not start with 'data:'", uri, 0);
   }
 
   /**
@@ -3419,7 +3408,7 @@
     }
     path = _Uri._normalizeOrSubstring(
         _text, colonIndex + 1, end, _Uri._pathCharOrSlashTable);
-    _uriCache = new _DataUri(this, path, query);
+    _uriCache = _DataUri(this, path, query);
     return _uriCache;
   }
 
@@ -3519,7 +3508,7 @@
       }
     }
     // Fill result array.
-    Uint8List result = new Uint8List(length);
+    Uint8List result = Uint8List(length);
     if (length == text.length) {
       result.setRange(0, length, text.codeUnits, start);
       return result;
@@ -3538,7 +3527,7 @@
             continue;
           }
         }
-        throw new FormatException("Invalid percent escape", text, i);
+        throw FormatException("Invalid percent escape", text, i);
       }
     }
     assert(index == result.length);
@@ -3564,7 +3553,7 @@
       var charset = this.charset; // Returns "US-ASCII" if not present.
       encoding = Encoding.getByName(charset);
       if (encoding == null) {
-        throw new UnsupportedError("Unknown charset: $charset");
+        throw UnsupportedError("Unknown charset: $charset");
       }
     }
     String text = _text;
@@ -3624,13 +3613,13 @@
           slashIndex = i;
           continue;
         }
-        throw new FormatException("Invalid MIME type", text, i);
+        throw FormatException("Invalid MIME type", text, i);
       }
     }
     if (slashIndex < 0 && i > start) {
       // An empty MIME type is allowed, but if non-empty it must contain
       // exactly one slash.
-      throw new FormatException("Invalid MIME type", text, i);
+      throw FormatException("Invalid MIME type", text, i);
     }
     while (char != comma) {
       // Parse parameters and/or "base64".
@@ -3653,7 +3642,7 @@
         if (char != comma ||
             i != lastSeparator + 7 /* "base64,".length */ ||
             !text.startsWith("base64", lastSeparator + 1)) {
-          throw new FormatException("Expecting '='", text, i);
+          throw FormatException("Expecting '='", text, i);
         }
         break;
       }
@@ -3672,7 +3661,7 @@
         text = text.replaceRange(i + 1, text.length, data);
       }
     }
-    return new UriData._(text, indices, sourceUri);
+    return UriData._(text, indices, sourceUri);
   }
 
   /**
@@ -3701,7 +3690,7 @@
       for (int i = 0; i < bytes.length; i++) {
         var byte = bytes[i];
         if (byte < 0 || byte > 255) {
-          throw new ArgumentError.value(byte, "non-byte value");
+          throw ArgumentError.value(byte, "non-byte value");
         }
       }
     }
@@ -3717,7 +3706,7 @@
   // '(', ')', '<', '>', '@', ',', ';', ':', '\', '"', '/', '[, ']', '?', '='.
   //
   // In a data URI, we also need to escape '%' and '#' characters.
-  static const _tokenCharTable = const [
+  static const _tokenCharTable = [
     //                     LSB             MSB
     //                      |               |
     0x0000, // 0x00 - 0x0f  00000000 00000000
@@ -3747,7 +3736,7 @@
   static const _uricTable = _Uri._queryCharTable;
 
   // Characters allowed in base-64 encoding (alphanumeric, '/', '+' and '=').
-  static const _base64Table = const [
+  static const _base64Table = [
     //                     LSB             MSB
     //                      |               |
     0x0000, // 0x00 - 0x0f  00000000 00000000
@@ -3948,8 +3937,7 @@
   // excluding escapes.
   const pchar = "$unreserved$subDelims";
 
-  var tables =
-      new List<Uint8List>.generate(stateCount, (_) => new Uint8List(96));
+  var tables = List<Uint8List>.generate(stateCount, (_) => Uint8List(96));
 
   // Helper function which initialize the table for [state] with a default
   // transition and returns the table.
@@ -4251,14 +4239,14 @@
     // Check original behavior - W3C spec is wonky!
     bool isHttp = _isHttp;
     if (_schemeEnd < 0) {
-      throw new StateError("Cannot use origin without a scheme: $this");
+      throw StateError("Cannot use origin without a scheme: $this");
     }
     if (!isHttp && !_isHttps) {
-      throw new StateError(
+      throw StateError(
           "Origin is only applicable to schemes http and https: $this");
     }
     if (_hostStart == _portStart) {
-      throw new StateError(
+      throw StateError(
           "A $scheme: URI should have a non-empty host name: $this");
     }
     if (_hostStart == _schemeEnd + 3) {
@@ -4283,12 +4271,12 @@
       }
     }
     parts.add(_uri.substring(start, end));
-    return new List<String>.unmodifiable(parts);
+    return List<String>.unmodifiable(parts);
   }
 
   Map<String, String> get queryParameters {
     if (!hasQuery) return const <String, String>{};
-    return new UnmodifiableMapView<String, String>(Uri.splitQueryString(query));
+    return UnmodifiableMapView<String, String>(Uri.splitQueryString(query));
   }
 
   Map<String, List<String>> get queryParametersAll {
@@ -4296,9 +4284,9 @@
     Map queryParameterLists = _Uri._splitQueryStringAll(query);
     for (var key in queryParameterLists.keys) {
       queryParameterLists[key] =
-          new List<String>.unmodifiable(queryParameterLists[key]);
+          List<String>.unmodifiable(queryParameterLists[key]);
     }
-    return new Map<String, List<String>>.unmodifiable(queryParameterLists);
+    return Map<String, List<String>>.unmodifiable(queryParameterLists);
   }
 
   bool _isPort(String port) {
@@ -4311,15 +4299,8 @@
 
   Uri removeFragment() {
     if (!hasFragment) return this;
-    return new _SimpleUri(
-        _uri.substring(0, _fragmentStart),
-        _schemeEnd,
-        _hostStart,
-        _portStart,
-        _pathStart,
-        _queryStart,
-        _fragmentStart,
-        _schemeCache);
+    return _SimpleUri(_uri.substring(0, _fragmentStart), _schemeEnd, _hostStart,
+        _portStart, _pathStart, _queryStart, _fragmentStart, _schemeCache);
   }
 
   Uri replace(
@@ -4389,8 +4370,7 @@
       fragment = _uri.substring(_fragmentStart + 1);
     }
 
-    return new _Uri._internal(
-        scheme, userInfo, host, port, path, query, fragment);
+    return _Uri._internal(scheme, userInfo, host, port, path, query, fragment);
   }
 
   Uri resolve(String reference) {
@@ -4425,7 +4405,7 @@
         var delta = base._schemeEnd + 1;
         var newUri = base._uri.substring(0, base._schemeEnd + 1) +
             ref._uri.substring(ref._schemeEnd + 1);
-        return new _SimpleUri(
+        return _SimpleUri(
             newUri,
             base._schemeEnd,
             ref._hostStart + delta,
@@ -4444,7 +4424,7 @@
         int delta = base._queryStart - ref._queryStart;
         var newUri = base._uri.substring(0, base._queryStart) +
             ref._uri.substring(ref._queryStart);
-        return new _SimpleUri(
+        return _SimpleUri(
             newUri,
             base._schemeEnd,
             base._hostStart,
@@ -4458,7 +4438,7 @@
         int delta = base._fragmentStart - ref._fragmentStart;
         var newUri = base._uri.substring(0, base._fragmentStart) +
             ref._uri.substring(ref._fragmentStart);
-        return new _SimpleUri(
+        return _SimpleUri(
             newUri,
             base._schemeEnd,
             base._hostStart,
@@ -4474,7 +4454,7 @@
       var delta = base._pathStart - ref._pathStart;
       var newUri = base._uri.substring(0, base._pathStart) +
           ref._uri.substring(ref._pathStart);
-      return new _SimpleUri(
+      return _SimpleUri(
           newUri,
           base._schemeEnd,
           base._hostStart,
@@ -4494,7 +4474,7 @@
       var delta = base._pathStart - refStart + 1;
       var newUri = "${base._uri.substring(0, base._pathStart)}/"
           "${ref._uri.substring(refStart)}";
-      return new _SimpleUri(
+      return _SimpleUri(
           newUri,
           base._schemeEnd,
           base._hostStart,
@@ -4573,7 +4553,7 @@
     var newUri = "${base._uri.substring(0, baseEnd)}$insert"
         "${ref._uri.substring(refStart)}";
 
-    return new _SimpleUri(
+    return _SimpleUri(
         newUri,
         base._schemeEnd,
         base._hostStart,
@@ -4586,15 +4566,14 @@
 
   String toFilePath({bool windows}) {
     if (_schemeEnd >= 0 && !_isFile) {
-      throw new UnsupportedError(
-          "Cannot extract a file path from a $scheme URI");
+      throw UnsupportedError("Cannot extract a file path from a $scheme URI");
     }
     if (_queryStart < _uri.length) {
       if (_queryStart < _fragmentStart) {
-        throw new UnsupportedError(
+        throw UnsupportedError(
             "Cannot extract a file path from a URI with a query component");
       }
-      throw new UnsupportedError(
+      throw UnsupportedError(
           "Cannot extract a file path from a URI with a fragment component");
     }
     windows ??= _Uri._isWindows;
@@ -4604,7 +4583,7 @@
   String _toFilePath() {
     if (_hostStart < _portStart) {
       // Has authority and non-empty host.
-      throw new UnsupportedError(
+      throw UnsupportedError(
           "Cannot extract a non-Windows file path from a file URI "
           "with an authority");
     }
@@ -4624,7 +4603,7 @@
   }
 
   Uri _toNonSimple() {
-    return new _Uri._internal(
+    return _Uri._internal(
         this.scheme,
         this.userInfo,
         this.hasAuthority ? this.host : null,
diff --git a/sdk/lib/html/dart2js/html_dart2js.dart b/sdk/lib/html/dart2js/html_dart2js.dart
index 47f3ea9..656fa6b 100644
--- a/sdk/lib/html/dart2js/html_dart2js.dart
+++ b/sdk/lib/html/dart2js/html_dart2js.dart
@@ -10086,6 +10086,15 @@
   static const String TIMEOUT = 'TimeoutError';
   static const String INVALID_NODE_TYPE = 'InvalidNodeTypeError';
   static const String DATA_CLONE = 'DataCloneError';
+  static const String ENCODING = 'EncodingError';
+  static const String NOT_READABLE = 'NotReadableError';
+  static const String UNKNOWN = 'UnknownError';
+  static const String CONSTRAINT = 'ConstraintError';
+  static const String TRANSACTION_INACTIVE = 'TransactionInactiveError';
+  static const String READ_ONLY = 'ReadOnlyError';
+  static const String VERSION = 'VersionError';
+  static const String OPERATION = 'OperationError';
+  static const String NOT_ALLOWED = 'NotAllowedError';
   // Is TypeError class derived from DomException but name is 'TypeError'
   static const String TYPE_ERROR = 'TypeError';
 
diff --git a/sdk/lib/isolate/isolate.dart b/sdk/lib/isolate/isolate.dart
index 6a737fe..5c5883d 100644
--- a/sdk/lib/isolate/isolate.dart
+++ b/sdk/lib/isolate/isolate.dart
@@ -112,6 +112,20 @@
   final Capability terminateCapability;
 
   /**
+   * The name of the [Isolate] displayed for debug purposes.
+   *
+   * This can be set using the `debugName` parameter in [spawn] and [spawnUri].
+   *
+   * This name does not uniquely identify an isolate. Multiple isolates in the
+   * same process may have the same `debugName`.
+   *
+   * For a given isolate, this value will be the same as the values returned by
+   * `Dart_DebugName` in the C embedding API and the `debugName` property in
+   * [IsolateMirror].
+   */
+  external String get debugName;
+
+  /**
    * Create a new [Isolate] object with a restricted set of capabilities.
    *
    * The port should be a control port for an isolate, as taken from
@@ -215,6 +229,9 @@
    * corresponding parameter and was processed before the isolate starts
    * running.
    *
+   * If [debugName] is provided, the spawned [Isolate] will be identifiable by
+   * this name in debuggers and logging.
+   *
    * If [errorsAreFatal] is omitted, the platform may choose a default behavior
    * or inherit the current isolate's behavior.
    *
@@ -231,7 +248,8 @@
       {bool paused: false,
       bool errorsAreFatal,
       SendPort onExit,
-      SendPort onError});
+      SendPort onError,
+      String debugName});
 
   /**
    * Creates and spawns an isolate that runs the code from the library with
@@ -299,6 +317,9 @@
    * WARNING: The [environment] parameter is not implemented on all
    * platforms yet.
    *
+   * If [debugName] is provided, the spawned [Isolate] will be identifiable by
+   * this name in debuggers and logging.
+   *
    * Returns a future that will complete with an [Isolate] instance if the
    * spawning succeeded. It will complete with an error otherwise.
    */
@@ -315,7 +336,8 @@
       @Deprecated('The packages/ dir is not supported in Dart 2')
           Uri packageRoot,
       Uri packageConfig,
-      bool automaticPackageResolution: false});
+      bool automaticPackageResolution: false,
+      String debugName});
 
   /**
    * Requests the isolate to pause.
diff --git a/sdk/lib/js/dart2js/js_dart2js.dart b/sdk/lib/js/dart2js/js_dart2js.dart
index 5f39637..535227b 100644
--- a/sdk/lib/js/dart2js/js_dart2js.dart
+++ b/sdk/lib/js/dart2js/js_dart2js.dart
@@ -432,7 +432,7 @@
 
   // Methods required by ListMixin
 
-  E operator [](index) {
+  E operator [](dynamic index) {
     // TODO(justinfagnani): fix the semantics for non-ints
     // dartbug.com/14605
     if (index is num && index == index.toInt()) {
@@ -441,7 +441,7 @@
     return super[index];
   }
 
-  void operator []=(index, E value) {
+  void operator []=(dynamic index, E value) {
     // TODO(justinfagnani): fix the semantics for non-ints
     // dartbug.com/14605
     if (index is num && index == index.toInt()) {
diff --git a/sdk/lib/math/jenkins_smi_hash.dart b/sdk/lib/math/jenkins_smi_hash.dart
index 1fc7dda..d756b37 100644
--- a/sdk/lib/math/jenkins_smi_hash.dart
+++ b/sdk/lib/math/jenkins_smi_hash.dart
@@ -3,22 +3,20 @@
 // BSD-style license that can be found in the LICENSE file.
 part of dart.math;
 
-/**
- * This is the [Jenkins hash function][1] but using masking to keep
- * values in SMI range.
- *
- * [1]: http://en.wikipedia.org/wiki/Jenkins_hash_function
- *
- * Use:
- * Hash each value with the hash of the previous value, then get the final
- * hash by calling finish.
- *
- *     var hash = 0;
- *     for (var value in values) {
- *       hash = JenkinsSmiHash.combine(hash, value.hashCode);
- *     }
- *     hash = JenkinsSmiHash.finish(hash);
- */
+/// This is the [Jenkins hash function][1] but using masking to keep
+/// values in SMI range.
+///
+/// [1]: http://en.wikipedia.org/wiki/Jenkins_hash_function
+///
+/// Use:
+/// Hash each value with the hash of the previous value, then get the final
+/// hash by calling finish.
+///
+///     var hash = 0;
+///     for (var value in values) {
+///       hash = JenkinsSmiHash.combine(hash, value.hashCode);
+///     }
+///     hash = JenkinsSmiHash.finish(hash);
 class _JenkinsSmiHash {
   // TODO(11617): This class should be optimized and standardized elsewhere.
 
diff --git a/sdk/lib/math/math.dart b/sdk/lib/math/math.dart
index f33a7a8..548fb59 100644
--- a/sdk/lib/math/math.dart
+++ b/sdk/lib/math/math.dart
@@ -2,15 +2,13 @@
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
 
-/**
- * Mathematical constants and functions, plus a random number generator.
- *
- * To use this library in your code:
- *
- *     import 'dart:math';
- *
- * {@category Core}
- */
+/// Mathematical constants and functions, plus a random number generator.
+///
+/// To use this library in your code:
+///
+///     import 'dart:math';
+///
+/// {@category Core}
 library dart.math;
 
 part "jenkins_smi_hash.dart";
@@ -18,204 +16,164 @@
 part "random.dart";
 part "rectangle.dart";
 
-/**
- * Base of the natural logarithms.
- *
- * Typically written as "e".
- */
+/// Base of the natural logarithms.
+///
+/// Typically written as "e".
 const double e = 2.718281828459045;
 
-/**
- * Natural logarithm of 10.
- *
- * The natural logarithm of 10 is the number such that `pow(E, LN10) == 10`.
- * This value is not exact, but it is the closest representable double to the
- * exact mathematical value.
- */
+/// Natural logarithm of 10.
+///
+/// The natural logarithm of 10 is the number such that `pow(E, LN10) == 10`.
+/// This value is not exact, but it is the closest representable double to the
+/// exact mathematical value.
 const double ln10 = 2.302585092994046;
 
-/**
- * Natural logarithm of 2.
- *
- * The natural logarithm of 2 is the number such that `pow(E, LN2) == 2`.
- * This value is not exact, but it is the closest representable double to the
- * exact mathematical value.
- */
+/// Natural logarithm of 2.
+///
+/// The natural logarithm of 2 is the number such that `pow(E, LN2) == 2`.
+/// This value is not exact, but it is the closest representable double to the
+/// exact mathematical value.
 const double ln2 = 0.6931471805599453;
 
-/**
- * Base-2 logarithm of [e].
- */
+/// Base-2 logarithm of [e].
 const double log2e = 1.4426950408889634;
 
-/**
- * Base-10 logarithm of [e].
- */
+/// Base-10 logarithm of [e].
 const double log10e = 0.4342944819032518;
 
-/**
- * The PI constant.
- */
+/// The PI constant.
 const double pi = 3.1415926535897932;
 
-/**
- * Square root of 1/2.
- */
+/// Square root of 1/2.
 const double sqrt1_2 = 0.7071067811865476;
 
-/**
- * Square root of 2.
- */
+/// Square root of 2.
 const double sqrt2 = 1.4142135623730951;
 
-/**
-  * Returns the lesser of two numbers.
-  *
-  * Returns NaN if either argument is NaN.
-  * The lesser of `-0.0` and `0.0` is `-0.0`.
-  * If the arguments are otherwise equal (including int and doubles with the
-  * same mathematical value) then it is unspecified which of the two arguments
-  * is returned.
-  */
+/// Returns the lesser of two numbers.
+///
+/// Returns NaN if either argument is NaN.
+/// The lesser of `-0.0` and `0.0` is `-0.0`.
+/// If the arguments are otherwise equal (including int and doubles with the
+/// same mathematical value) then it is unspecified which of the two arguments
+/// is returned.
 external T min<T extends num>(T a, T b);
 
-/**
-  * Returns the larger of two numbers.
-  *
-  * Returns NaN if either argument is NaN.
-  * The larger of `-0.0` and `0.0` is `0.0`. If the arguments are
-  * otherwise equal (including int and doubles with the same mathematical value)
-  * then it is unspecified which of the two arguments is returned.
-  */
+/// Returns the larger of two numbers.
+///
+/// Returns NaN if either argument is NaN.
+/// The larger of `-0.0` and `0.0` is `0.0`. If the arguments are
+/// otherwise equal (including int and doubles with the same mathematical value)
+/// then it is unspecified which of the two arguments is returned.
 external T max<T extends num>(T a, T b);
 
-/**
- * A variant of [atan].
- *
- * Converts both arguments to [double]s.
- *
- * Returns the angle in radians between the positive x-axis
- * and the vector ([b],[a]).
- * The result is in the range -PI..PI.
- *
- * If [b] is positive, this is the same as `atan(b/a)`.
- *
- * The result is negative when [a] is negative (including when [a] is the
- * double -0.0).
- *
- * If [a] is equal to zero, the vector ([b],[a]) is considered parallel to
- * the x-axis, even if [b] is also equal to zero. The sign of [b] determines
- * the direction of the vector along the x-axis.
- *
- * Returns NaN if either argument is NaN.
- */
+/// A variant of [atan].
+///
+/// Converts both arguments to [double]s.
+///
+/// Returns the angle in radians between the positive x-axis
+/// and the vector ([b],[a]).
+/// The result is in the range -PI..PI.
+///
+/// If [b] is positive, this is the same as `atan(b/a)`.
+///
+/// The result is negative when [a] is negative (including when [a] is the
+/// double -0.0).
+///
+/// If [a] is equal to zero, the vector ([b],[a]) is considered parallel to
+/// the x-axis, even if [b] is also equal to zero. The sign of [b] determines
+/// the direction of the vector along the x-axis.
+///
+/// Returns NaN if either argument is NaN.
 external double atan2(num a, num b);
 
-/**
- * Returns [x] to the power of [exponent].
- *
- * If [x] is an [int] and [exponent] is a non-negative [int], the result is
- * an [int], otherwise both arguments are converted to doubles first, and the
- * result is a [double].
- *
- * For integers, the power is always equal to the mathematical result of `x` to
- * the power `exponent`, only limited by the available memory.
- *
- * For doubles, `pow(x, y)` handles edge cases as follows:
- *
- * - if `y` is zero (0.0 or -0.0), the result is always 1.0.
- * - if `x` is 1.0, the result is always 1.0.
- * - otherwise, if either `x` or `y` is NaN then the result is NaN.
- * - if `x` is negative (but not -0.0) and `y` is a finite non-integer, the
- *   result is NaN.
- * - if `x` is Infinity and `y` is negative, the result is 0.0.
- * - if `x` is Infinity and `y` is positive, the result is Infinity.
- * - if `x` is 0.0 and `y` is negative, the result is Infinity.
- * - if `x` is 0.0 and `y` is positive, the result is 0.0.
- * - if `x` is -Infinity or -0.0 and `y` is an odd integer, then the result is
- *   `-pow(-x ,y)`.
- * - if `x` is -Infinity or -0.0 and `y` is not an odd integer, then the result
- *   is the same as `pow(-x , y)`.
- * - if `y` is Infinity and the absolute value of `x` is less than 1, the
- *   result is 0.0.
- * - if `y` is Infinity and `x` is -1, the result is 1.0.
- * - if `y` is Infinity and the absolute value of `x` is greater than 1,
- *   the result is Infinity.
- * - if `y` is -Infinity, the result is `1/pow(x, Infinity)`.
- *
- * This corresponds to the `pow` function defined in the IEEE Standard 754-2008.
- *
- * Notice that the result may overflow. If integers are represented as 64-bit
- * numbers, an integer result may be truncated, and a double result may overflow 
- * to positive or negative [double.infinity].
- */
+/// Returns [x] to the power of [exponent].
+///
+/// If [x] is an [int] and [exponent] is a non-negative [int], the result is
+/// an [int], otherwise both arguments are converted to doubles first, and the
+/// result is a [double].
+///
+/// For integers, the power is always equal to the mathematical result of `x` to
+/// the power `exponent`, only limited by the available memory.
+///
+/// For doubles, `pow(x, y)` handles edge cases as follows:
+///
+/// - if `y` is zero (0.0 or -0.0), the result is always 1.0.
+/// - if `x` is 1.0, the result is always 1.0.
+/// - otherwise, if either `x` or `y` is NaN then the result is NaN.
+/// - if `x` is negative (but not -0.0) and `y` is a finite non-integer, the
+///   result is NaN.
+/// - if `x` is Infinity and `y` is negative, the result is 0.0.
+/// - if `x` is Infinity and `y` is positive, the result is Infinity.
+/// - if `x` is 0.0 and `y` is negative, the result is Infinity.
+/// - if `x` is 0.0 and `y` is positive, the result is 0.0.
+/// - if `x` is -Infinity or -0.0 and `y` is an odd integer, then the result is
+///   `-pow(-x ,y)`.
+/// - if `x` is -Infinity or -0.0 and `y` is not an odd integer, then the result
+///   is the same as `pow(-x , y)`.
+/// - if `y` is Infinity and the absolute value of `x` is less than 1, the
+///   result is 0.0.
+/// - if `y` is Infinity and `x` is -1, the result is 1.0.
+/// - if `y` is Infinity and the absolute value of `x` is greater than 1,
+///   the result is Infinity.
+/// - if `y` is -Infinity, the result is `1/pow(x, Infinity)`.
+///
+/// This corresponds to the `pow` function defined in the IEEE Standard
+/// 754-2008.
+///
+/// Notice that the result may overflow. If integers are represented as 64-bit
+/// numbers, an integer result may be truncated, and a double result may
+/// overflow to positive or negative [double.infinity].
 external num pow(num x, num exponent);
 
-/**
- * Converts [radians] to a [double] and returns the sine of the value.
- *
- * If [radians] is not a finite number, the result is NaN.
- */
+/// Converts [radians] to a [double] and returns the sine of the value.
+///
+/// If [radians] is not a finite number, the result is NaN.
 external double sin(num radians);
 
-/**
- * Converts [radians] to a [double] and returns the cosine of the value.
- *
- * If [radians] is not a finite number, the result is NaN.
- */
+/// Converts [radians] to a [double] and returns the cosine of the value.
+///
+/// If [radians] is not a finite number, the result is NaN.
 external double cos(num radians);
 
-/**
- * Converts [radians] to a [double] and returns the tangent of the value.
- *
- * The tangent function is equivalent to `sin(radians)/cos(radians)` and may be
- * infinite (positive or negative) when `cos(radians)` is equal to zero.
- * If [radians] is not a finite number, the result is NaN.
- */
+/// Converts [radians] to a [double] and returns the tangent of the value.
+///
+/// The tangent function is equivalent to `sin(radians)/cos(radians)` and may be
+/// infinite (positive or negative) when `cos(radians)` is equal to zero.
+/// If [radians] is not a finite number, the result is NaN.
 external double tan(num radians);
 
-/**
- * Converts [x] to a [double] and returns its arc cosine in radians.
- *
- * Returns a value in the range 0..PI, or NaN if [x] is outside
- * the range -1..1.
- */
+/// Converts [x] to a [double] and returns its arc cosine in radians.
+///
+/// Returns a value in the range 0..PI, or NaN if [x] is outside
+/// the range -1..1.
 external double acos(num x);
 
-/**
- * Converts [x] to a [double] and returns its arc sine in radians.
- *
- * Returns a value in the range -PI/2..PI/2, or NaN if [x] is outside
- * the range -1..1.
- */
+/// Converts [x] to a [double] and returns its arc sine in radians.
+///
+/// Returns a value in the range -PI/2..PI/2, or NaN if [x] is outside
+/// the range -1..1.
 external double asin(num x);
 
-/**
- * Converts [x] to a [double] and returns its arc tangent in radians.
- *
- * Returns a value in the range -PI/2..PI/2, or NaN if [x] is NaN.
- */
+/// Converts [x] to a [double] and returns its arc tangent in radians.
+///
+/// Returns a value in the range -PI/2..PI/2, or NaN if [x] is NaN.
 external double atan(num x);
 
-/**
- * Converts [x] to a [double] and returns the positive square root of the value.
- *
- * Returns -0.0 if [x] is -0.0, and NaN if [x] is otherwise negative or NaN.
- */
+/// Converts [x] to a [double] and returns the positive square root of the
+/// value.
+///
+/// Returns -0.0 if [x] is -0.0, and NaN if [x] is otherwise negative or NaN.
 external double sqrt(num x);
 
-/**
- * Converts [x] to a [double] and returns the natural exponent, [e],
- * to the power [x].
- *
- * Returns NaN if [x] is NaN.
- */
+/// Converts [x] to a [double] and returns the natural exponent, [e],
+/// to the power [x].
+///
+/// Returns NaN if [x] is NaN.
 external double exp(num x);
 
-/**
- * Converts [x] to a [double] and returns the natural logarithm of the value.
- *
- * Returns negative infinity if [x] is equal to zero.
- * Returns NaN if [x] is NaN or less than zero.
- */
+/// Converts [x] to a [double] and returns the natural logarithm of the value.
+///
+/// Returns negative infinity if [x] is equal to zero.
+/// Returns NaN if [x] is NaN or less than zero.
 external double log(num x);
diff --git a/sdk/lib/math/point.dart b/sdk/lib/math/point.dart
index f627dcf..1015e7b 100644
--- a/sdk/lib/math/point.dart
+++ b/sdk/lib/math/point.dart
@@ -3,9 +3,7 @@
 // BSD-style license that can be found in the LICENSE file.
 part of dart.math;
 
-/**
- * A utility class for representing two-dimensional positions.
- */
+/// A utility class for representing two-dimensional positions.
 class Point<T extends num> {
   final T x;
   final T y;
@@ -16,13 +14,11 @@
 
   String toString() => 'Point($x, $y)';
 
-  /**
-   * A `Point` is only equal to another `Point` with the same coordinates.
-   *
-   * This point is equal to `other` if, and only if,
-   * `other` is a `Point` with
-   * [x] equal to `other.x` and [y] equal to `other.y`.
-   */
+  /// A `Point` is only equal to another `Point` with the same coordinates.
+  ///
+  /// This point is equal to `other` if, and only if,
+  /// `other` is a `Point` with
+  /// [x] equal to `other.x` and [y] equal to `other.y`.
   bool operator ==(dynamic other) =>
       // Cannot change parameter type to `Object` in case some class
       // inherits the type and uses their argument dynamically.
@@ -30,58 +26,46 @@
 
   int get hashCode => _JenkinsSmiHash.hash2(x.hashCode, y.hashCode);
 
-  /**
-   * Add [other] to `this`, as if both points were vectors.
-   *
-   * Returns the resulting "vector" as a Point.
-   */
+  /// Add [other] to `this`, as if both points were vectors.
+  ///
+  /// Returns the resulting "vector" as a Point.
   Point<T> operator +(Point<T> other) {
-    return new Point<T>(x + other.x, y + other.y);
+    return Point<T>(x + other.x, y + other.y);
   }
 
-  /**
-   * Subtract [other] from `this`, as if both points were vectors.
-   *
-   * Returns the resulting "vector" as a Point.
-   */
+  /// Subtract [other] from `this`, as if both points were vectors.
+  ///
+  /// Returns the resulting "vector" as a Point.
   Point<T> operator -(Point<T> other) {
-    return new Point<T>(x - other.x, y - other.y);
+    return Point<T>(x - other.x, y - other.y);
   }
 
-  /**
-   * Scale this point by [factor] as if it were a vector.
-   *
-   * *Important* *Note*: This function accepts a `num` as its argument only so
-   * that you can scale Point<double> objects by an `int` factor. Because the
-   * star operator always returns the same type of Point that originally called
-   * it, passing in a double [factor] on a `Point<int>` _causes_ _a_
-   * _runtime_ _error_ in checked mode.
-   */
+  /// Scale this point by [factor] as if it were a vector.
+  ///
+  /// *Important* *Note*: This function accepts a `num` as its argument only so
+  /// that you can scale Point<double> objects by an `int` factor. Because the
+  /// star operator always returns the same type of Point that originally called
+  /// it, passing in a double [factor] on a `Point<int>` _causes_ _a_
+  /// _runtime_ _error_ in checked mode.
   Point<T> operator *(num /*T|int*/ factor) {
-    return new Point<T>((x * factor), (y * factor));
+    return Point<T>((x * factor), (y * factor));
   }
 
-  /**
-   * Get the straight line (Euclidean) distance between the origin (0, 0) and
-   * this point.
-   */
+  /// Get the straight line (Euclidean) distance between the origin (0, 0) and
+  /// this point.
   double get magnitude => sqrt(x * x + y * y);
 
-  /**
-   * Returns the distance between `this` and [other].
-   */
+  /// Returns the distance between `this` and [other].
   double distanceTo(Point<T> other) {
     var dx = x - other.x;
     var dy = y - other.y;
     return sqrt(dx * dx + dy * dy);
   }
 
-  /**
-   * Returns the squared distance between `this` and [other].
-   *
-   * Squared distances can be used for comparisons when the actual value is not
-   * required.
-   */
+  /// Returns the squared distance between `this` and [other].
+  ///
+  /// Squared distances can be used for comparisons when the actual value is not
+  /// required.
   T squaredDistanceTo(Point<T> other) {
     var dx = x - other.x;
     var dy = y - other.y;
diff --git a/sdk/lib/math/random.dart b/sdk/lib/math/random.dart
index 99906cd..80e588b 100644
--- a/sdk/lib/math/random.dart
+++ b/sdk/lib/math/random.dart
@@ -11,40 +11,30 @@
 ///
 /// Use the [Random.secure]() constructor for cryptographic purposes.
 abstract class Random {
-  /**
-   * Creates a random number generator.
-   *
-   * The optional parameter [seed] is used to initialize the
-   * internal state of the generator. The implementation of the
-   * random stream can change between releases of the library.
-   */
+  /// Creates a random number generator.
+  ///
+  /// The optional parameter [seed] is used to initialize the
+  /// internal state of the generator. The implementation of the
+  /// random stream can change between releases of the library.
   external factory Random([int seed]);
 
-  /**
-   * Creates a cryptographically secure random number generator.
-   *
-   * If the program cannot provide a cryptographically secure
-   * source of random numbers, it throws an [UnsupportedError].
-   */
+  /// Creates a cryptographically secure random number generator.
+  ///
+  /// If the program cannot provide a cryptographically secure
+  /// source of random numbers, it throws an [UnsupportedError].
   external factory Random.secure();
 
-  /**
-   * Generates a non-negative random integer uniformly distributed in the range
-   * from 0, inclusive, to [max], exclusive.
-   *
-   * Implementation note: The default implementation supports [max] values
-   * between 1 and (1<<32) inclusive.
-   */
+  /// Generates a non-negative random integer uniformly distributed in the range
+  /// from 0, inclusive, to [max], exclusive.
+  ///
+  /// Implementation note: The default implementation supports [max] values
+  /// between 1 and (1<<32) inclusive.
   int nextInt(int max);
 
-  /**
-   * Generates a non-negative random floating point value uniformly distributed
-   * in the range from 0.0, inclusive, to 1.0, exclusive.
-   */
+  /// Generates a non-negative random floating point value uniformly distributed
+  /// in the range from 0.0, inclusive, to 1.0, exclusive.
   double nextDouble();
 
-  /**
-   * Generates a random boolean value.
-   */
+  /// Generates a random boolean value.
   bool nextBool();
 }
diff --git a/sdk/lib/math/rectangle.dart b/sdk/lib/math/rectangle.dart
index 88e0eda..6e72036 100644
--- a/sdk/lib/math/rectangle.dart
+++ b/sdk/lib/math/rectangle.dart
@@ -3,35 +3,37 @@
 // BSD-style license that can be found in the LICENSE file.
 part of dart.math;
 
-/**
- * A base class for representing two-dimensional axis-aligned rectangles.
- *
- * This rectangle uses a left-handed Cartesian coordinate system, with x
- * directed to the right and y directed down, as per the convention in 2D
- * computer graphics.
- *
- * See also:
- *    [W3C Coordinate Systems Specification](http://www.w3.org/TR/SVG/coords.html#InitialCoordinateSystem).
- *
- * The rectangle is the set of points with representable coordinates greater
- * than or equal to left/top, and with distance to left/top no greater than
- * width/height (to the limit of the precision of the coordinates).
- */
+/// A base class for representing two-dimensional axis-aligned rectangles.
+///
+/// This rectangle uses a left-handed Cartesian coordinate system, with x
+/// directed to the right and y directed down, as per the convention in 2D
+/// computer graphics.
+///
+/// See also:
+///    [W3C Coordinate Systems Specification](http://www.w3.org/TR/SVG/coords.html#InitialCoordinateSystem).
+///
+/// The rectangle is the set of points with representable coordinates greater
+/// than or equal to left/top, and with distance to left/top no greater than
+/// width/height (to the limit of the precision of the coordinates).
 abstract class _RectangleBase<T extends num> {
   const _RectangleBase();
 
-  /** The x-coordinate of the left edge. */
+  /// The x-coordinate of the left edge.
   T get left;
-  /** The y-coordinate of the top edge. */
+
+  /// The y-coordinate of the top edge.
   T get top;
-  /** The width of the rectangle. */
+
+  /// The width of the rectangle.
   T get width;
-  /** The height of the rectangle. */
+
+  /// The height of the rectangle.
   T get height;
 
-  /** The x-coordinate of the right edge. */
+  /// The x-coordinate of the right edge.
   T get right => left + width;
-  /** The y-coordinate of the bottom edge. */
+
+  /// The y-coordinate of the bottom edge.
   T get bottom => top + height;
 
   String toString() {
@@ -50,15 +52,13 @@
   int get hashCode => _JenkinsSmiHash.hash4(
       left.hashCode, top.hashCode, right.hashCode, bottom.hashCode);
 
-  /**
-   * Computes the intersection of `this` and [other].
-   *
-   * The intersection of two axis-aligned rectangles, if any, is always another
-   * axis-aligned rectangle.
-   *
-   * Returns the intersection of this and `other`, or `null` if they don't
-   * intersect.
-   */
+  /// Computes the intersection of `this` and [other].
+  ///
+  /// The intersection of two axis-aligned rectangles, if any, is always another
+  /// axis-aligned rectangle.
+  ///
+  /// Returns the intersection of this and `other`, or `null` if they don't
+  /// intersect.
   Rectangle<T> intersection(Rectangle<T> other) {
     var x0 = max(left, other.left);
     var x1 = min(left + width, other.left + other.width);
@@ -68,15 +68,13 @@
       var y1 = min(top + height, other.top + other.height);
 
       if (y0 <= y1) {
-        return new Rectangle<T>(x0, y0, x1 - x0, y1 - y0);
+        return Rectangle<T>(x0, y0, x1 - x0, y1 - y0);
       }
     }
     return null;
   }
 
-  /**
-   * Returns true if `this` intersects [other].
-   */
+  /// Returns true if `this` intersects [other].
   bool intersects(Rectangle<num> other) {
     return (left <= other.left + other.width &&
         other.left <= left + width &&
@@ -84,9 +82,7 @@
         other.top <= top + height);
   }
 
-  /**
-   * Returns a new rectangle which completely contains `this` and [other].
-   */
+  /// Returns a new rectangle which completely contains `this` and [other].
   Rectangle<T> boundingBox(Rectangle<T> other) {
     var right = max(this.left + this.width, other.left + other.width);
     var bottom = max(this.top + this.height, other.top + other.height);
@@ -94,12 +90,10 @@
     var left = min(this.left, other.left);
     var top = min(this.top, other.top);
 
-    return new Rectangle<T>(left, top, right - left, bottom - top);
+    return Rectangle<T>(left, top, right - left, bottom - top);
   }
 
-  /**
-   * Tests whether `this` entirely contains [another].
-   */
+  /// Tests whether `this` entirely contains [another].
   bool containsRectangle(Rectangle<num> another) {
     return left <= another.left &&
         left + width >= another.left + another.width &&
@@ -107,9 +101,7 @@
         top + height >= another.top + another.height;
   }
 
-  /**
-   * Tests whether [another] is inside or along the edges of `this`.
-   */
+  /// Tests whether [another] is inside or along the edges of `this`.
   bool containsPoint(Point<num> another) {
     return another.x >= left &&
         another.x <= left + width &&
@@ -117,158 +109,138 @@
         another.y <= top + height;
   }
 
-  Point<T> get topLeft => new Point<T>(this.left, this.top);
-  Point<T> get topRight => new Point<T>(this.left + this.width, this.top);
+  Point<T> get topLeft => Point<T>(this.left, this.top);
+  Point<T> get topRight => Point<T>(this.left + this.width, this.top);
   Point<T> get bottomRight =>
-      new Point<T>(this.left + this.width, this.top + this.height);
-  Point<T> get bottomLeft => new Point<T>(this.left, this.top + this.height);
+      Point<T>(this.left + this.width, this.top + this.height);
+  Point<T> get bottomLeft => Point<T>(this.left, this.top + this.height);
 }
 
-/**
- * A class for representing two-dimensional rectangles whose properties are
- * immutable.
- */
+/// A class for representing two-dimensional rectangles whose properties are
+/// immutable.
 class Rectangle<T extends num> extends _RectangleBase<T> {
   final T left;
   final T top;
   final T width;
   final T height;
 
-  /**
-   * Create a rectangle spanned by `(left, top)` and `(left+width, top+height)`.
-   *
-   * The rectangle contains the points
-   * with x-coordinate between `left` and `left + width`, and
-   * with y-coordinate between `top` and `top + height`, both inclusive.
-   *
-   * The `width` and `height` should be non-negative.
-   * If `width` or `height` are negative, they are clamped to zero.
-   *
-   * If `width` and `height` are zero, the "rectangle" comprises only the single
-   * point `(left, top)`.
-   */
+  /// Create a rectangle spanned by `(left, top)` and
+  /// `(left+width, top+height)`.
+  ///
+  /// The rectangle contains the points
+  /// with x-coordinate between `left` and `left + width`, and
+  /// with y-coordinate between `top` and `top + height`, both inclusive.
+  ///
+  /// The `width` and `height` should be non-negative.
+  /// If `width` or `height` are negative, they are clamped to zero.
+  ///
+  /// If `width` and `height` are zero, the "rectangle" comprises only the
+  /// single point `(left, top)`.
   const Rectangle(this.left, this.top, T width, T height)
       : this.width = (width < 0) ? -width * 0 : width, // Inline _clampToZero.
         this.height = (height < 0) ? -height * 0 : height;
 
-  /**
-   * Create a rectangle spanned by the points [a] and [b];
-   *
-   * The rectangle contains the points
-   * with x-coordinate between `a.x` and `b.x`, and
-   * with y-coordinate between `a.y` and `b.y`, both inclusive.
-   *
-   * If the distance between `a.x` and `b.x` is not representable
-   * (which can happen if one or both is a double),
-   * the actual right edge might be slightly off from `max(a.x, b.x)`.
-   * Similar for the y-coordinates and the bottom edge.
-   */
+  /// Create a rectangle spanned by the points [a] and [b];
+  ///
+  /// The rectangle contains the points
+  /// with x-coordinate between `a.x` and `b.x`, and
+  /// with y-coordinate between `a.y` and `b.y`, both inclusive.
+  ///
+  /// If the distance between `a.x` and `b.x` is not representable
+  /// (which can happen if one or both is a double),
+  /// the actual right edge might be slightly off from `max(a.x, b.x)`.
+  /// Similar for the y-coordinates and the bottom edge.
   factory Rectangle.fromPoints(Point<T> a, Point<T> b) {
     T left = min(a.x, b.x);
     T width = max(a.x, b.x) - left;
     T top = min(a.y, b.y);
     T height = max(a.y, b.y) - top;
-    return new Rectangle<T>(left, top, width, height);
+    return Rectangle<T>(left, top, width, height);
   }
 }
 
-/**
- * A class for representing two-dimensional axis-aligned rectangles with mutable
- * properties.
- */
+/// A class for representing two-dimensional axis-aligned rectangles with
+/// mutable properties.
 class MutableRectangle<T extends num> extends _RectangleBase<T>
     implements Rectangle<T> {
-  /**
-   * The x-coordinate of the left edge.
-   *
-   * Setting the value will move the rectangle without changing its width.
-   */
+  /// The x-coordinate of the left edge.
+  ///
+  /// Setting the value will move the rectangle without changing its width.
   T left;
-  /**
-   * The y-coordinate of the left edge.
-   *
-   * Setting the value will move the rectangle without changing its height.
-   */
+
+  /// The y-coordinate of the left edge.
+  ///
+  /// Setting the value will move the rectangle without changing its height.
   T top;
   T _width;
   T _height;
 
-  /**
-   * Create a mutable rectangle spanned by `(left, top)` and
-   * `(left+width, top+height)`.
-   *
-   * The rectangle contains the points
-   * with x-coordinate between `left` and `left + width`, and
-   * with y-coordinate between `top` and `top + height`, both inclusive.
-   *
-   * The `width` and `height` should be non-negative.
-   * If `width` or `height` are negative, they are clamped to zero.
-   *
-   * If `width` and `height` are zero, the "rectangle" comprises only the single
-   * point `(left, top)`.
-   */
+  /// Create a mutable rectangle spanned by `(left, top)` and
+  /// `(left+width, top+height)`.
+  ///
+  /// The rectangle contains the points
+  /// with x-coordinate between `left` and `left + width`, and
+  /// with y-coordinate between `top` and `top + height`, both inclusive.
+  ///
+  /// The `width` and `height` should be non-negative.
+  /// If `width` or `height` are negative, they are clamped to zero.
+  ///
+  /// If `width` and `height` are zero, the "rectangle" comprises only the
+  /// single point `(left, top)`.
   MutableRectangle(this.left, this.top, T width, T height)
       : this._width = (width < 0) ? _clampToZero<T>(width) : width,
         this._height = (height < 0) ? _clampToZero<T>(height) : height;
 
-  /**
-   * Create a mutable rectangle spanned by the points [a] and [b];
-   *
-   * The rectangle contains the points
-   * with x-coordinate between `a.x` and `b.x`, and
-   * with y-coordinate between `a.y` and `b.y`, both inclusive.
-   *
-   * If the distance between `a.x` and `b.x` is not representable
-   * (which can happen if one or both is a double),
-   * the actual right edge might be slightly off from `max(a.x, b.x)`.
-   * Similar for the y-coordinates and the bottom edge.
-   */
+  /// Create a mutable rectangle spanned by the points [a] and [b];
+  ///
+  /// The rectangle contains the points
+  /// with x-coordinate between `a.x` and `b.x`, and
+  /// with y-coordinate between `a.y` and `b.y`, both inclusive.
+  ///
+  /// If the distance between `a.x` and `b.x` is not representable
+  /// (which can happen if one or both is a double),
+  /// the actual right edge might be slightly off from `max(a.x, b.x)`.
+  /// Similar for the y-coordinates and the bottom edge.
   factory MutableRectangle.fromPoints(Point<T> a, Point<T> b) {
     T left = min(a.x, b.x);
     T width = max(a.x, b.x) - left;
     T top = min(a.y, b.y);
     T height = max(a.y, b.y) - top;
-    return new MutableRectangle<T>(left, top, width, height);
+    return MutableRectangle<T>(left, top, width, height);
   }
 
   T get width => _width;
 
-  /**
-   * Sets the width of the rectangle.
-   *
-   * The width must be non-negative.
-   * If a negative width is supplied, it is clamped to zero.
-   *
-   * Setting the value will change the right edge of the rectangle,
-   * but will not change [left].
-   */
-  void set width(T width) {
+  /// Sets the width of the rectangle.
+  ///
+  /// The width must be non-negative.
+  /// If a negative width is supplied, it is clamped to zero.
+  ///
+  /// Setting the value will change the right edge of the rectangle,
+  /// but will not change [left].
+  set width(T width) {
     if (width < 0) width = _clampToZero<T>(width);
     _width = width;
   }
 
   T get height => _height;
 
-  /**
-   * Sets the height of the rectangle.
-   *
-   * The height must be non-negative.
-   * If a negative height is supplied, it is clamped to zero.
-   *
-   * Setting the value will change the bottom edge of the rectangle,
-   * but will not change [top].
-   */
-  void set height(T height) {
+  /// Sets the height of the rectangle.
+  ///
+  /// The height must be non-negative.
+  /// If a negative height is supplied, it is clamped to zero.
+  ///
+  /// Setting the value will change the bottom edge of the rectangle,
+  /// but will not change [top].
+  set height(T height) {
     if (height < 0) height = _clampToZero<T>(height);
     _height = height;
   }
 }
 
-/**
- * Converts a negative [int] or [double] to a zero-value of the same type.
- *
- * Returns `0` if value is int, `0.0` if value is double.
- */
+/// Converts a negative [int] or [double] to a zero-value of the same type.
+///
+/// Returns `0` if value is int, `0.0` if value is double.
 T _clampToZero<T extends num>(T value) {
   assert(value < 0);
   return -value * 0;
diff --git a/tests/co19_2/co19_2-dart2js.status b/tests/co19_2/co19_2-dart2js.status
index 25a153a..aefe426 100644
--- a/tests/co19_2/co19_2-dart2js.status
+++ b/tests/co19_2/co19_2-dart2js.status
@@ -2,12 +2,6 @@
 # for details. All rights reserved. Use of this source code is governed by a
 # BSD-style license that can be found in the LICENSE file.
 
-[ $compiler == dart2js ]
-Language/Expressions/Spawning_an_Isolate/new_isolate_t01: SkipByDesign
-LanguageFeatures/Control-flow-collections/*: Skip
-LibTest/io/*: SkipByDesign # dart:io not supported.
-LibTest/isolate/*: SkipByDesign # dart:isolate not supported.
-
 [ $compiler == dartdevk ]
 LanguageFeatures/Control-flow-collections/*: Skip
 
@@ -19,6 +13,11 @@
 LibTest/html/*: SkipByDesign # d8 is not a browser
 WebPlatformTest/*: SkipByDesign # d8 is not a browser
 
+[ $compiler == dart2js || $compiler == dartdevc || $compiler == dartdevk ]
+Language/Expressions/Spawning_an_Isolate/new_isolate_t01: SkipByDesign
+LibTest/io/*: SkipByDesign # dart:io not supported.
+LibTest/isolate/*: SkipByDesign # dart:isolate not supported.
+
 [ $compiler == dartdevc || $compiler == dartdevk ]
 Language/Classes/Constructors/Generative_Constructors/formal_parameter_t07: Skip # Times out
 Language/Classes/Constructors/Generative_Constructors/fresh_instance_t01: Skip # Times out
diff --git a/tests/co19_2/co19_2-kernel.status b/tests/co19_2/co19_2-kernel.status
index f732f93..2508fca 100644
--- a/tests/co19_2/co19_2-kernel.status
+++ b/tests/co19_2/co19_2-kernel.status
@@ -4,7 +4,6 @@
 
 [ $compiler == dartk ]
 LanguageFeatures/Control-flow-collections/*: Skip
-LanguageFeatures/Set-literals/semantics_A05_t02: RuntimeError
 LanguageFeatures/Set-literals/syntax_compatibility_A01_t02: RuntimeError
 LanguageFeatures/Spread-collections/ConstSpreads_A01_t01: CompileTimeError
 LanguageFeatures/Spread-collections/ConstSpreads_A06_t01: CompileTimeError
@@ -42,19 +41,7 @@
 Language/Statements/Yield_and_Yield_Each/Yield_Each/execution_async_t09: RuntimeError
 Language/Types/Interface_Types/subtype_t03: RuntimeError
 Language/Types/Interface_Types/subtype_t26: RuntimeError
-LanguageFeatures/Constant_update2018/CastOperator_A03_t01/none: RuntimeError
-LanguageFeatures/Constant_update2018/CastOperator_A03_t03/none: RuntimeError
-LanguageFeatures/Constant_update2018/EqualityOperator_A01_t01: RuntimeError
-LanguageFeatures/Constant_update2018/EqualityOperator_A01_t02: RuntimeError
-LanguageFeatures/Constant_update2018/NewOperators_A02_t03/none: RuntimeError
-LanguageFeatures/Constant_update2018/NewOperators_A02_t06/none: RuntimeError
-LanguageFeatures/Constant_update2018/NewOperators_A02_t09/none: RuntimeError
-LanguageFeatures/Constant_update2018/ShortCircuitOperators_A03_t02: RuntimeError
-LanguageFeatures/Constant_update2018/ShortCircuitOperators_A03_t04: RuntimeError
-LanguageFeatures/Constant_update2018/ShortCircuitOperators_A03_t05/none: RuntimeError
-LanguageFeatures/Constant_update2018/ShortCircuitOperators_A03_t06/none: RuntimeError
 LanguageFeatures/Control-flow-collections/*: Skip
-LanguageFeatures/Set-literals/semantics_A05_t02: RuntimeError
 LanguageFeatures/Set-literals/syntax_compatibility_A01_t02: RuntimeError
 LanguageFeatures/Spread-collections/ConstSpreads_A01_t01: DartkCrash
 LanguageFeatures/Spread-collections/ConstSpreads_A04_t01/02: MissingCompileTimeError
@@ -123,110 +110,33 @@
 LibTest/isolate/ReceivePort/lastWhere_A01_t01: RuntimeError
 
 [ $compiler == fasta ]
+Language/Expressions/Assignment/Compound_Assignment/expression_assignment_t12: CompileTimeError
+Language/Expressions/Assignment/Compound_Assignment/indexed_expression_assignment_t12: CompileTimeError
+Language/Expressions/Assignment/Compound_Assignment/null_aware_compound_assignment_static_t12: CompileTimeError
+Language/Expressions/Assignment/Compound_Assignment/null_aware_compound_assignment_t12: CompileTimeError
+Language/Expressions/Assignment/Compound_Assignment/setter_assignment_t12: CompileTimeError
+Language/Expressions/Assignment/Compound_Assignment/variable_assignment_t12: CompileTimeError
 Language/Statements/For/syntax_t13: Crash # Assertion error: kernel_shadow_ast.dart: 'receiver == null': is not true.
 Language/Statements/For/syntax_t20: Crash # Assertion error: kernel_shadow_ast.dart: 'receiver == null': is not true.
-LanguageFeatures/Constant_update2018/ShortCircuitOperators_A03_t03: Crash
-LanguageFeatures/Control-flow-collections/const_collections_A02_t03: CompileTimeError
-LanguageFeatures/Control-flow-collections/const_collections_A02_t04: CompileTimeError
-LanguageFeatures/Control-flow-collections/const_collections_A03_t02/01: MissingCompileTimeError
-LanguageFeatures/Control-flow-collections/const_collections_A03_t02/02: MissingCompileTimeError
-LanguageFeatures/Control-flow-collections/const_collections_A03_t02/03: MissingCompileTimeError
-LanguageFeatures/Control-flow-collections/const_collections_A03_t02/04: MissingCompileTimeError
-LanguageFeatures/Control-flow-collections/const_collections_A03_t02/05: MissingCompileTimeError
-LanguageFeatures/Control-flow-collections/const_collections_A03_t02/06: MissingCompileTimeError
-LanguageFeatures/Control-flow-collections/const_collections_A03_t02/07: MissingCompileTimeError
-LanguageFeatures/Control-flow-collections/const_collections_A03_t02/08: MissingCompileTimeError
-LanguageFeatures/Control-flow-collections/const_collections_A03_t02/09: MissingCompileTimeError
-LanguageFeatures/Control-flow-collections/const_collections_A03_t02/10: MissingCompileTimeError
-LanguageFeatures/Control-flow-collections/const_collections_A03_t02/11: MissingCompileTimeError
-LanguageFeatures/Control-flow-collections/const_collections_A03_t02/12: MissingCompileTimeError
-LanguageFeatures/Control-flow-collections/const_collections_A03_t02/14: MissingCompileTimeError
-LanguageFeatures/Control-flow-collections/const_collections_A04_t02: CompileTimeError
-LanguageFeatures/Control-flow-collections/const_collections_A05_t02: CompileTimeError
-LanguageFeatures/Control-flow-collections/const_collections_A06_t02: CompileTimeError
-LanguageFeatures/Control-flow-collections/const_collections_A07_t01: CompileTimeError
-LanguageFeatures/Control-flow-collections/const_collections_A07_t02: CompileTimeError
-LanguageFeatures/Control-flow-collections/dynamic_semantics_list_A02_t01: CompileTimeError
-LanguageFeatures/Control-flow-collections/dynamic_semantics_list_A03_t01: CompileTimeError
-LanguageFeatures/Control-flow-collections/dynamic_semantics_list_A03_t02: CompileTimeError
-LanguageFeatures/Control-flow-collections/dynamic_semantics_list_A04_t01: CompileTimeError
-LanguageFeatures/Control-flow-collections/dynamic_semantics_list_A04_t02: CompileTimeError
-LanguageFeatures/Control-flow-collections/dynamic_semantics_map_A02_t01: CompileTimeError
-LanguageFeatures/Control-flow-collections/dynamic_semantics_map_A02_t02: CompileTimeError
-LanguageFeatures/Control-flow-collections/dynamic_semantics_map_A03_t01: CompileTimeError
-LanguageFeatures/Control-flow-collections/dynamic_semantics_map_A03_t02: CompileTimeError
-LanguageFeatures/Control-flow-collections/dynamic_semantics_map_A04_t01: CompileTimeError
-LanguageFeatures/Control-flow-collections/dynamic_semantics_map_A04_t02: CompileTimeError
-LanguageFeatures/Control-flow-collections/dynamic_semantics_set_A02_t01: CompileTimeError
-LanguageFeatures/Control-flow-collections/dynamic_semantics_set_A03_t01: CompileTimeError
-LanguageFeatures/Control-flow-collections/dynamic_semantics_set_A03_t02: CompileTimeError
-LanguageFeatures/Control-flow-collections/dynamic_semantics_set_A04_t01: CompileTimeError
-LanguageFeatures/Control-flow-collections/dynamic_semantics_set_A04_t02: CompileTimeError
-LanguageFeatures/Control-flow-collections/scoping_A01_t01: CompileTimeError
-LanguageFeatures/Control-flow-collections/scoping_A02_t01: CompileTimeError
-LanguageFeatures/Control-flow-collections/static_errors_A01_t01/01: MissingCompileTimeError
-LanguageFeatures/Control-flow-collections/static_errors_A01_t01/02: MissingCompileTimeError
-LanguageFeatures/Control-flow-collections/static_errors_A01_t01/03: MissingCompileTimeError
-LanguageFeatures/Control-flow-collections/static_errors_A02_t01/01: MissingCompileTimeError
-LanguageFeatures/Control-flow-collections/static_errors_A02_t01/02: MissingCompileTimeError
-LanguageFeatures/Control-flow-collections/static_errors_A02_t01/03: MissingCompileTimeError
-LanguageFeatures/Control-flow-collections/static_errors_A03_t01/01: MissingCompileTimeError
-LanguageFeatures/Control-flow-collections/static_errors_A03_t01/02: MissingCompileTimeError
-LanguageFeatures/Control-flow-collections/static_errors_A03_t01/03: MissingCompileTimeError
+LanguageFeatures/Constant-update-2018/NewOperators_A01_t04/none: CompileTimeError
+LanguageFeatures/Constant-update-2018/NewOperators_A01_t06/none: CompileTimeError
+LanguageFeatures/Control-flow-collections/const_collections_A02_t02/01: MissingCompileTimeError
+LanguageFeatures/Control-flow-collections/const_collections_A02_t02/03: MissingCompileTimeError
+LanguageFeatures/Control-flow-collections/const_collections_A02_t02/04: MissingCompileTimeError
 LanguageFeatures/Control-flow-collections/static_errors_A04_t01/01: MissingCompileTimeError
 LanguageFeatures/Control-flow-collections/static_errors_A04_t01/02: MissingCompileTimeError
-LanguageFeatures/Control-flow-collections/static_errors_A04_t01/03: MissingCompileTimeError
-LanguageFeatures/Control-flow-collections/static_errors_A04_t01/04: MissingCompileTimeError
-LanguageFeatures/Control-flow-collections/static_semantics_A01_t01: CompileTimeError
-LanguageFeatures/Control-flow-collections/static_semantics_A01_t02/01: MissingCompileTimeError
-LanguageFeatures/Control-flow-collections/static_semantics_A01_t02/02: MissingCompileTimeError
-LanguageFeatures/Control-flow-collections/static_semantics_A01_t02/05: MissingCompileTimeError
-LanguageFeatures/Control-flow-collections/static_semantics_A01_t02/06: MissingCompileTimeError
-LanguageFeatures/Control-flow-collections/static_semantics_A01_t02/09: MissingCompileTimeError
-LanguageFeatures/Control-flow-collections/static_semantics_A01_t02/10: MissingCompileTimeError
-LanguageFeatures/Control-flow-collections/static_semantics_A01_t02/11: MissingCompileTimeError
-LanguageFeatures/Control-flow-collections/static_semantics_A01_t02/12: MissingCompileTimeError
-LanguageFeatures/Control-flow-collections/static_semantics_A02_t01: CompileTimeError
-LanguageFeatures/Control-flow-collections/static_semantics_A02_t02/17: MissingCompileTimeError
-LanguageFeatures/Control-flow-collections/static_semantics_A02_t02/18: MissingCompileTimeError
-LanguageFeatures/Control-flow-collections/static_semantics_A02_t02/19: MissingCompileTimeError
-LanguageFeatures/Control-flow-collections/static_semantics_A02_t02/20: MissingCompileTimeError
-LanguageFeatures/Control-flow-collections/static_semantics_A02_t02/21: MissingCompileTimeError
-LanguageFeatures/Control-flow-collections/static_semantics_A02_t02/22: MissingCompileTimeError
-LanguageFeatures/Control-flow-collections/static_semantics_A02_t02/23: MissingCompileTimeError
-LanguageFeatures/Control-flow-collections/static_semantics_A02_t02/24: MissingCompileTimeError
-LanguageFeatures/Control-flow-collections/syntax_A01_t01: CompileTimeError
-LanguageFeatures/Control-flow-collections/syntax_A01_t02: CompileTimeError
-LanguageFeatures/Control-flow-collections/syntax_A01_t03: CompileTimeError
-LanguageFeatures/Control-flow-collections/syntax_A02_t01: CompileTimeError
-LanguageFeatures/Control-flow-collections/syntax_A02_t02: CompileTimeError
-LanguageFeatures/Control-flow-collections/syntax_A03_t01/02: MissingCompileTimeError
-LanguageFeatures/Control-flow-collections/type_inference_A01_t01: CompileTimeError
-LanguageFeatures/Control-flow-collections/type_inference_A04_t01: CompileTimeError
-LanguageFeatures/Control-flow-collections/type_inference_A05_t01: CompileTimeError
-LanguageFeatures/Control-flow-collections/type_inference_A06_t01: CompileTimeError
-LanguageFeatures/Control-flow-collections/type_inference_A08_t01: CompileTimeError
-LanguageFeatures/Spread-collections/Ambiguity_A02_t02/01: MissingCompileTimeError
-LanguageFeatures/Spread-collections/Ambiguity_A02_t03: CompileTimeError
-LanguageFeatures/Spread-collections/ConstSpreads_A04_t01/01: MissingCompileTimeError
-LanguageFeatures/Spread-collections/ConstSpreads_A04_t01/02: MissingCompileTimeError
-LanguageFeatures/Spread-collections/ConstSpreads_A04_t01/03: MissingCompileTimeError
-LanguageFeatures/Spread-collections/ConstSpreads_A04_t01/04: MissingCompileTimeError
-LanguageFeatures/Spread-collections/ConstSpreads_A04_t01/05: MissingCompileTimeError
-LanguageFeatures/Spread-collections/ConstSpreads_A04_t01/06: MissingCompileTimeError
-LanguageFeatures/Spread-collections/ConstSpreads_A04_t01/07: MissingCompileTimeError
-LanguageFeatures/Spread-collections/ConstSpreads_A04_t01/08: MissingCompileTimeError
-LanguageFeatures/Spread-collections/DynamicSemantics_Map_A02_t01: CompileTimeError
-LanguageFeatures/Spread-collections/NullAware_A01_t01: CompileTimeError
-LanguageFeatures/Spread-collections/NullAware_A01_t02: CompileTimeError
-LanguageFeatures/Spread-collections/NullAware_A01_t03: CompileTimeError
-LanguageFeatures/Spread-collections/NullAware_A01_t04: CompileTimeError
-LanguageFeatures/Spread-collections/NullAware_A01_t05: CompileTimeError
-LanguageFeatures/Spread-collections/NullAware_A01_t06: CompileTimeError
-LanguageFeatures/Spread-collections/StaticSemantic_A04_t01/04: MissingCompileTimeError
-LanguageFeatures/Spread-collections/StaticSemantic_A04_t02/04: MissingCompileTimeError
-LanguageFeatures/Spread-collections/StaticSemantic_A06_t01/04: MissingCompileTimeError
-LanguageFeatures/Spread-collections/StaticSemantic_A08_t01/02: MissingCompileTimeError
+LanguageFeatures/Control-flow-collections/type_promotion_A01_t01: CompileTimeError
+LanguageFeatures/Set-literals/disambiguating_A06_t01/03: MissingCompileTimeError
+LanguageFeatures/Set-literals/disambiguating_A06_t01/06: MissingCompileTimeError
+LanguageFeatures/Set-literals/disambiguating_A06_t01/07: MissingCompileTimeError
+LanguageFeatures/Set-literals/type_inference_A01_t03: Crash
+LanguageFeatures/Set-literals/type_inference_A01_t04: Crash
+LanguageFeatures/Set-literals/type_inference_A04_t02/02: MissingCompileTimeError
+LanguageFeatures/Set-literals/type_inference_A04_t02/03: MissingCompileTimeError
+LanguageFeatures/Set-literals/type_inference_A06_t02/03: MissingCompileTimeError
+LanguageFeatures/Set-literals/type_inference_A06_t02/04: MissingCompileTimeError
+LanguageFeatures/Set-literals/type_inference_A06_t02/05: MissingCompileTimeError
+LanguageFeatures/Set-literals/type_inference_A06_t02/06: MissingCompileTimeError
 
 [ $runtime == vm ]
 LibTest/collection/ListBase/ListBase_class_A01_t02: Pass, Slow # Does many calls
@@ -249,6 +159,9 @@
 Language/Classes/Constructors/Generative_Constructors/initializers_t15: CompileTimeError
 Language/Classes/Getters/type_object_t01: CompileTimeError
 Language/Classes/Getters/type_object_t02: CompileTimeError
+Language/Classes/Instance_Methods/Operators/allowed_names_t01: Skip # triple-shift flag
+Language/Classes/Instance_Methods/Operators/allowed_names_t23: Skip # triple-shift flag
+Language/Classes/Instance_Methods/Operators/arity_1_t19: Skip # triple-shift flag
 Language/Classes/Instance_Methods/Operators/return_type_t01: MissingCompileTimeError
 Language/Classes/Setters/return_type_not_void_t01: MissingCompileTimeError
 Language/Classes/Setters/same_name_getter_different_type_t01: MissingCompileTimeError
@@ -261,6 +174,12 @@
 Language/Enums/syntax_t08: CompileTimeError
 Language/Enums/syntax_t09: CompileTimeError
 Language/Expressions/Assignable_Expressions/syntax_t01: CompileTimeError
+Language/Expressions/Assignment/Compound_Assignment/expression_assignment_t12: Skip # triple-shift flag
+Language/Expressions/Assignment/Compound_Assignment/indexed_expression_assignment_t12: Skip # triple-shift flag
+Language/Expressions/Assignment/Compound_Assignment/null_aware_compound_assignment_static_t12: Skip # triple-shift flag
+Language/Expressions/Assignment/Compound_Assignment/null_aware_compound_assignment_t12: Skip # triple-shift flag
+Language/Expressions/Assignment/Compound_Assignment/setter_assignment_t12: Skip # triple-shift flag
+Language/Expressions/Assignment/Compound_Assignment/variable_assignment_t12: Skip # triple-shift flag
 Language/Expressions/Assignment/expression_assignment_failed_t02: CompileTimeError
 Language/Expressions/Assignment/static_type_t02: CompileTimeError
 Language/Expressions/Assignment/static_type_t03: CompileTimeError
@@ -269,12 +188,15 @@
 Language/Expressions/Assignment/super_assignment_static_warning_t03: CompileTimeError
 Language/Expressions/Assignment/super_assignment_t06: CompileTimeError
 Language/Expressions/Assignment/super_assignment_value_t02: CompileTimeError
-Language/Expressions/Bitwise_Expressions/syntax_t01: CompileTimeError
+Language/Expressions/Bitwise_Expressions/syntax_t01: Skip # triple-shift flag
+Language/Expressions/Constants/bitwise_operators_t01: Skip # triple-shift flag
+Language/Expressions/Constants/bitwise_operators_t07: Skip # triple-shift flag
+Language/Expressions/Constants/bitwise_operators_t08: Skip # triple-shift flag
 Language/Expressions/Constants/constant_list_t02: MissingCompileTimeError # Legal because of implicit const
 Language/Expressions/Constants/constant_map_t02: MissingCompileTimeError # Legal because of implicit const
 Language/Expressions/Constants/depending_on_itself_t03: MissingCompileTimeError # Issue 34189
 Language/Expressions/Constants/equals_expression_t03: MissingCompileTimeError # Issue 34192
-Language/Expressions/Equality/syntax_t01: CompileTimeError
+Language/Expressions/Equality/syntax_t01: Skip # triple-shift flag
 Language/Expressions/Function_Expressions/syntax_t05: CompileTimeError
 Language/Expressions/Function_Invocation/async_cleanup_t01: CompileTimeError
 Language/Expressions/Function_Invocation/async_cleanup_t02: CompileTimeError
@@ -291,10 +213,13 @@
 Language/Expressions/Instance_Creation/New/type_t08: CompileTimeError
 Language/Expressions/Instance_Creation/New/type_t09: CompileTimeError
 Language/Expressions/Lists/constant_list_t01: CompileTimeError
+Language/Expressions/Lists/syntax_t01: Skip # triple-shift flag
 Language/Expressions/Maps/constant_map_t02: MissingCompileTimeError
 Language/Expressions/Maps/constant_map_type_t01: CompileTimeError
-Language/Expressions/Maps/equal_keys_t01: MissingCompileTimeError
+Language/Expressions/Maps/equal_keys_t01/01: MissingCompileTimeError
+Language/Expressions/Maps/equal_keys_t01/02: MissingCompileTimeError
 Language/Expressions/Maps/key_value_equals_operator_t01: MissingCompileTimeError # Issue 32557
+Language/Expressions/Maps/syntax_t01: Skip # triple-shift flag
 Language/Expressions/Method_Invocation/Ordinary_Invocation/accessible_instance_member_t04: CompileTimeError
 Language/Expressions/Method_Invocation/Super_Invocation/getter_lookup_failed_t02: CompileTimeError
 Language/Expressions/Multiplicative_Expressions/syntax_t01: CompileTimeError
@@ -306,10 +231,29 @@
 Language/Expressions/Property_Extraction/Super_Getter_Access_and_Method_Closurization/no_such_method_t01: CompileTimeError
 Language/Expressions/Property_Extraction/Super_Getter_Access_and_Method_Closurization/no_such_method_t02: CompileTimeError
 Language/Expressions/Property_Extraction/Super_Getter_Access_and_Method_Closurization/static_type_t03: CompileTimeError
-Language/Expressions/Relational_Expressions/syntax_t01: CompileTimeError
-Language/Expressions/Shift/syntax_t01: CompileTimeError
+Language/Expressions/Relational_Expressions/syntax_t01: Skip # triple-shift experiment flag
+Language/Expressions/Shift/allowed_characters_t02: Skip # triple-shift flag
+Language/Expressions/Shift/equivalent_super_t02: Skip # triple-shift flag
+Language/Expressions/Shift/equivalent_t02: Skip # triple-shift flag
+Language/Expressions/Shift/integer_t03: Skip # triple-shift flag
+Language/Expressions/Shift/syntax_t01: Skip # triple-shift experiment flag
+Language/Expressions/Shift/syntax_t15: Skip # triple-shift experiment flag
+Language/Expressions/Shift/syntax_t17: Skip # triple-shift experiment flag
+Language/Expressions/Shift/syntax_t18: Skip # triple-shift experiment flag
+Language/Expressions/Shift/syntax_t19: Skip # triple-shift experiment flag
+Language/Expressions/Shift/syntax_t21: Skip # triple-shift experiment flag
+Language/Expressions/Shift/syntax_t22: Skip # triple-shift experiment flag
+Language/Expressions/Shift/syntax_t23: Skip # triple-shift experiment flag
+Language/Expressions/Shift/syntax_t24: Skip # triple-shift experiment flag
+Language/Expressions/Shift/syntax_t25: Skip # triple-shift experiment flag
+Language/Expressions/Shift/syntax_t26: Skip # triple-shift experiment flag
+Language/Expressions/Shift/syntax_t27: Skip # triple-shift experiment flag
+Language/Expressions/Strings/String_Interpolation/syntax_t01: Skip # triple-shift experiment flag
+Language/Expressions/Symbols/syntax_t02: Skip # triple-shift experiment flag
 Language/Expressions/Unary_Expressions/syntax_t10: CompileTimeError
 Language/Expressions/Unary_Expressions/syntax_t27: CompileTimeError
+Language/Expressions/parentheses_t01: Skip # triple-shift experiment flag
+Language/Functions/syntax_t03: Skip # triple-shift experiment flag
 Language/Generics/syntax_t20: CompileTimeError
 Language/Generics/syntax_t22: CompileTimeError
 Language/Generics/syntax_t23: CompileTimeError
@@ -348,6 +292,9 @@
 Language/Mixins/declaring_constructor_t05: MissingCompileTimeError # Mixin constructor
 Language/Mixins/declaring_constructor_t06: MissingCompileTimeError # Mixin constructor
 Language/Overview/Privacy/private_and_public_t11: CompileTimeError
+Language/Reference/Operator_Precedence/precedence_01_assignment_t14: Skip # triple-shift experimental flag
+Language/Reference/Operator_Precedence/precedence_12_Shift_t04: Skip # triple-shift experimental flag
+Language/Reference/Operator_Precedence/precedence_t05: Skip # triple-shift experimental flag
 Language/Statements/Continue/async_loops_t01: CompileTimeError
 Language/Statements/Continue/async_loops_t02: CompileTimeError
 Language/Statements/Continue/async_loops_t03: CompileTimeError
@@ -361,6 +308,7 @@
 Language/Statements/Continue/control_transfer_t08: CompileTimeError
 Language/Statements/Continue/control_transfer_t09: CompileTimeError
 Language/Statements/Continue/label_t07: MissingCompileTimeError # Issue 34206
+Language/Statements/Expression_Statements/syntax_t06: Skip # triple-shift experimental flag
 Language/Statements/Try/catch_scope_t01: CompileTimeError
 Language/Types/Interface_Types/subtype_t30: CompileTimeError
 Language/Types/Type_Aliases/scope_t01: CompileTimeError
@@ -373,90 +321,11 @@
 Language/Types/Type_Aliases/syntax_t04: CompileTimeError
 Language/Types/Type_Aliases/syntax_t20: CompileTimeError
 Language/Types/Type_Aliases/syntax_t21: CompileTimeError
-LanguageFeatures/Constant-update-2018/CastOperator_A01_t01: CompileTimeError
-LanguageFeatures/Constant-update-2018/CastOperator_A02_t01: CompileTimeError
-LanguageFeatures/Constant-update-2018/CastOperator_A02_t02: CompileTimeError
-LanguageFeatures/Constant-update-2018/CastOperator_A04_t02/none: CompileTimeError
 LanguageFeatures/Constant-update-2018/EqualityOperator_A01_t09: MissingCompileTimeError
 LanguageFeatures/Constant-update-2018/EqualityOperator_A01_t10: MissingCompileTimeError
 LanguageFeatures/Constant-update-2018/NewOperators_A01_t01: CompileTimeError
 LanguageFeatures/Constant-update-2018/NewOperators_A01_t02: CompileTimeError
-LanguageFeatures/Constant-update-2018/NewOperators_A02_t01: CompileTimeError
-LanguageFeatures/Constant-update-2018/NewOperators_A02_t02: CompileTimeError
-LanguageFeatures/Constant-update-2018/NewOperators_A02_t05: CompileTimeError
-LanguageFeatures/Constant-update-2018/NewOperators_A02_t06: CompileTimeError
-LanguageFeatures/Constant-update-2018/NewOperators_A02_t09: CompileTimeError
-LanguageFeatures/Constant-update-2018/NewOperators_A02_t10: CompileTimeError
-LanguageFeatures/Constant-update-2018/ShortCircuitOperators_A01_t01: CompileTimeError
-LanguageFeatures/Constant-update-2018/ShortCircuitOperators_A01_t07: CompileTimeError
-LanguageFeatures/Constant-update-2018/ShortCircuitOperators_A02_t01: CompileTimeError
-LanguageFeatures/Constant-update-2018/ShortCircuitOperators_A02_t08: CompileTimeError
-LanguageFeatures/Constant-update-2018/ShortCircuitOperators_A03_t01: Crash
-LanguageFeatures/Constant-update-2018/ShortCircuitOperators_A03_t02: Crash
-LanguageFeatures/Constant-update-2018/ShortCircuitOperators_A03_t05: CompileTimeError
-LanguageFeatures/Constant-update-2018/ShortCircuitOperators_A03_t06: CompileTimeError
-
-LanguageFeatures/Constant-update-2018/ShortCircuitOperators_A04_t01: CompileTimeError
-LanguageFeatures/Constant-update-2018/ShortCircuitOperators_A04_t02: CompileTimeError
-LanguageFeatures/Constant-update-2018/ShortCircuitOperators_A04_t03: CompileTimeError
-LanguageFeatures/Constant-update-2018/ShortCircuitOperators_A04_t05: CompileTimeError
-LanguageFeatures/Constant-update-2018/ShortCircuitOperators_A04_t06: CompileTimeError
-LanguageFeatures/Constant-update-2018/ShortCircuitOperators_A04_t07: CompileTimeError
-LanguageFeatures/Constant-update-2018/TypeTestOperator_A01_t01: CompileTimeError
-LanguageFeatures/Constant-update-2018/TypeTestOperator_A01_t02: CompileTimeError
-LanguageFeatures/Constant-update-2018/TypeTestOperator_A02_t01: CompileTimeError
-LanguageFeatures/Constant-update-2018/TypeTestOperator_A02_t02: CompileTimeError
-LanguageFeatures/Constant_update2018/CastOperator_A01_t01: CompileTimeError
-LanguageFeatures/Constant_update2018/CastOperator_A02_t01: CompileTimeError
-LanguageFeatures/Constant_update2018/CastOperator_A02_t02: CompileTimeError
-LanguageFeatures/Constant_update2018/CastOperator_A03_t02/none: CompileTimeError
-LanguageFeatures/Constant_update2018/CastOperator_A04_t01/none: CompileTimeError
-LanguageFeatures/Constant_update2018/CastOperator_A04_t02/none: CompileTimeError
-LanguageFeatures/Constant_update2018/EqualityOperator_A01_t03/none: CompileTimeError
-LanguageFeatures/Constant_update2018/EqualityOperator_A01_t04/none: CompileTimeError
-LanguageFeatures/Constant_update2018/EqualityOperator_A01_t09: MissingCompileTimeError
-LanguageFeatures/Constant_update2018/EqualityOperator_A01_t10: MissingCompileTimeError
-LanguageFeatures/Constant_update2018/NewOperators_A01_t01: CompileTimeError
-LanguageFeatures/Constant_update2018/NewOperators_A01_t02: CompileTimeError
-LanguageFeatures/Constant_update2018/NewOperators_A02_t01: CompileTimeError
-LanguageFeatures/Constant_update2018/NewOperators_A02_t02: CompileTimeError
-LanguageFeatures/Constant_update2018/NewOperators_A02_t05: CompileTimeError
-LanguageFeatures/Constant_update2018/NewOperators_A02_t06: CompileTimeError
-LanguageFeatures/Constant_update2018/NewOperators_A02_t09: CompileTimeError
-LanguageFeatures/Constant_update2018/NewOperators_A02_t10: CompileTimeError
-LanguageFeatures/Constant_update2018/ShortCircuitOperators_A01_t01: CompileTimeError
-LanguageFeatures/Constant_update2018/ShortCircuitOperators_A01_t02/none: CompileTimeError
-LanguageFeatures/Constant_update2018/ShortCircuitOperators_A01_t05/none: CompileTimeError
-LanguageFeatures/Constant_update2018/ShortCircuitOperators_A01_t06/none: CompileTimeError
-LanguageFeatures/Constant_update2018/ShortCircuitOperators_A01_t07: CompileTimeError
-LanguageFeatures/Constant_update2018/ShortCircuitOperators_A02_t01: CompileTimeError
-LanguageFeatures/Constant_update2018/ShortCircuitOperators_A02_t02/none: CompileTimeError
-LanguageFeatures/Constant_update2018/ShortCircuitOperators_A02_t05/none: CompileTimeError
-LanguageFeatures/Constant_update2018/ShortCircuitOperators_A02_t08: CompileTimeError
-LanguageFeatures/Constant_update2018/ShortCircuitOperators_A03_t01: CompileTimeError
-LanguageFeatures/Constant_update2018/ShortCircuitOperators_A03_t05: CompileTimeError
-LanguageFeatures/Constant_update2018/ShortCircuitOperators_A03_t06: CompileTimeError
-LanguageFeatures/Constant_update2018/ShortCircuitOperators_A03_t06/01: MissingCompileTimeError
-LanguageFeatures/Constant_update2018/ShortCircuitOperators_A03_t07: MissingCompileTimeError
-LanguageFeatures/Constant_update2018/ShortCircuitOperators_A03_t07/none: CompileTimeError
-LanguageFeatures/Constant_update2018/ShortCircuitOperators_A04_t01: CompileTimeError
-LanguageFeatures/Constant_update2018/ShortCircuitOperators_A04_t02/none: CompileTimeError
-LanguageFeatures/Constant_update2018/ShortCircuitOperators_A04_t04/none: CompileTimeError
-LanguageFeatures/Constant_update2018/ShortCircuitOperators_A04_t05: CompileTimeError
-LanguageFeatures/Constant_update2018/ShortCircuitOperators_A04_t06/none: CompileTimeError
-LanguageFeatures/Constant_update2018/ShortCircuitOperators_A04_t08/none: CompileTimeError
-LanguageFeatures/Constant_update2018/ShortCircuitOperators_A04_t09: MissingCompileTimeError
-LanguageFeatures/Constant_update2018/ShortCircuitOperators_A04_t11: MissingCompileTimeError
-LanguageFeatures/Constant_update2018/TypeTestOperator_A01_t01: CompileTimeError
-LanguageFeatures/Constant_update2018/TypeTestOperator_A01_t02: CompileTimeError
-LanguageFeatures/Constant_update2018/TypeTestOperator_A02_t01: CompileTimeError
-LanguageFeatures/Constant_update2018/TypeTestOperator_A02_t02: CompileTimeError
-LanguageFeatures/Constant_update2018/TypeTestOperator_A03_t01/none: CompileTimeError
-LanguageFeatures/Constant_update2018/TypeTestOperator_A03_t02/none: CompileTimeError
-LanguageFeatures/Constant_update2018/TypeTestOperator_A03_t03/none: CompileTimeError
-LanguageFeatures/Constant_update2018/TypeTestOperator_A03_t04/none: CompileTimeError
-LanguageFeatures/Constant_update2018/TypeTestOperator_A04_t01/none: CompileTimeError
-LanguageFeatures/Constant_update2018/TypeTestOperator_A04_t02/none: CompileTimeError
+LanguageFeatures/Control-flow-collections/scoping_A01_t01: CompileTimeError # co19 test error.
 LanguageFeatures/Instantiate-to-bound/class/dynamic/class_FutureOr_l1_t01: Crash
 LanguageFeatures/Instantiate-to-bound/class/dynamic/class_FutureOr_l1_t02: CompileTimeError
 LanguageFeatures/Instantiate-to-bound/class/dynamic/class_FutureOr_l1_t03: Crash
@@ -716,7 +585,28 @@
 LanguageFeatures/Set-literals/constant_set_literals_A02_t03/01: MissingCompileTimeError
 LanguageFeatures/Set-literals/constant_set_literals_A02_t03/02: MissingCompileTimeError
 LanguageFeatures/Set-literals/constant_set_literals_A02_t03/03: MissingCompileTimeError
+LanguageFeatures/Set-literals/disambiguating_A02_t02: CompileTimeError
+LanguageFeatures/Set-literals/disambiguating_A02_t03: Crash
+LanguageFeatures/Set-literals/disambiguating_A04_t02: Crash
+LanguageFeatures/Set-literals/disambiguating_A05_t02: Crash
+LanguageFeatures/Set-literals/disambiguating_A06_t01/02: Crash, MissingCompileTimeError
+LanguageFeatures/Set-literals/disambiguating_A06_t01/04: MissingCompileTimeError
+LanguageFeatures/Set-literals/disambiguating_A06_t01/05: MissingCompileTimeError
+LanguageFeatures/Set-literals/disambiguating_A06_t02/01: Crash
+LanguageFeatures/Set-literals/disambiguating_A06_t02/02: Crash
+LanguageFeatures/Set-literals/disambiguating_A06_t02/03: Crash
+LanguageFeatures/Set-literals/disambiguating_A06_t02/04: Crash
+LanguageFeatures/Set-literals/disambiguating_A06_t02/05: Crash
+LanguageFeatures/Set-literals/disambiguating_A06_t02/06: Crash
+LanguageFeatures/Set-literals/disambiguating_A06_t02/07: Crash
+LanguageFeatures/Set-literals/disambiguating_A06_t02/none: Crash
 LanguageFeatures/Set-literals/exact_types_of_literals_A01_t03: RuntimeError
+LanguageFeatures/Set-literals/type_inference_A01_t02: Crash
+LanguageFeatures/Set-literals/type_inference_A07_t01: CompileTimeError
+LanguageFeatures/Set-literals/type_inference_A08_t01: CompileTimeError
+LanguageFeatures/Set-literals/type_inference_A09_t01: CompileTimeError
+LanguageFeatures/Set-literals/type_inference_A10_t01: CompileTimeError
+LanguageFeatures/Set-literals/type_inference_A10_t02: CompileTimeError
 LanguageFeatures/Simple-bounds/dynamic/class_FutureOr_l1_t02: CompileTimeError
 LanguageFeatures/Simple-bounds/static/class_FutureOr_l1_t02/none: CompileTimeError
 LanguageFeatures/Simple-bounds/static/typedef_FutureOr_l1_t02/none: CompileTimeError
@@ -725,14 +615,18 @@
 LanguageFeatures/Simple-bounds/static/typedef_typedef_l1_t04/01: MissingCompileTimeError
 LanguageFeatures/Simple-bounds/static/typedef_typedef_l1_t04/02: MissingCompileTimeError
 LanguageFeatures/Simple-bounds/static/typedef_typedef_l1_t10: CompileTimeError
-LanguageFeatures/Spread-collections/Ambiguity_A02_t01/01: MissingCompileTimeError
-LanguageFeatures/Spread-collections/ConstSpreads_A04_t01/02: MissingCompileTimeError
-LanguageFeatures/Spread-collections/ConstSpreads_A04_t01/06: MissingCompileTimeError
-LanguageFeatures/Spread-collections/ConstSpreads_A04_t01/07: MissingCompileTimeError
-LanguageFeatures/Spread-collections/ConstSpreads_A04_t01/08: MissingCompileTimeError
-LanguageFeatures/Spread-collections/StaticSemantic_A01_t05: CompileTimeError
-LanguageFeatures/Spread-collections/StaticSemantic_A06_t01/04: MissingCompileTimeError
-LanguageFeatures/Spread-collections/Syntax_A02_t08: CompileTimeError
+LanguageFeatures/Spread-collections/TypeInference_A01_t03/06: MissingCompileTimeError
+LanguageFeatures/Spread-collections/TypeInference_A01_t03/07: MissingCompileTimeError
+LanguageFeatures/Spread-collections/TypeInference_A01_t03/08: MissingCompileTimeError
+LanguageFeatures/Spread-collections/TypeInference_A01_t03/09: MissingCompileTimeError
+LanguageFeatures/Spread-collections/TypeInference_A01_t04/06: MissingCompileTimeError
+LanguageFeatures/Spread-collections/TypeInference_A01_t04/07: MissingCompileTimeError
+LanguageFeatures/Spread-collections/TypeInference_A01_t04/08: MissingCompileTimeError
+LanguageFeatures/Spread-collections/TypeInference_A01_t04/09: MissingCompileTimeError
+LanguageFeatures/Spread-collections/TypeInference_A03_t02/06: MissingCompileTimeError
+LanguageFeatures/Spread-collections/TypeInference_A03_t02/07: MissingCompileTimeError
+LanguageFeatures/Spread-collections/TypeInference_A03_t02/08: MissingCompileTimeError
+LanguageFeatures/Spread-collections/TypeInference_A03_t02/09: MissingCompileTimeError
 LanguageFeatures/Super-mixins/covariance_t03: MissingCompileTimeError # Issue 35111
 LanguageFeatures/Super-mixins/covariance_t06: MissingCompileTimeError # Issue 35111
 LanguageFeatures/Super-mixins/covariance_t07: MissingCompileTimeError # Issue 35111
@@ -745,10 +639,6 @@
 LanguageFeatures/regression/34803_t02: Crash
 
 [ $arch == simdbc64 && $compiler == dartk ]
-LanguageFeatures/Constant_update2018/NewOperators_A02_t01: Pass
-LanguageFeatures/Constant_update2018/NewOperators_A02_t02: Pass
-LanguageFeatures/Constant_update2018/NewOperators_A02_t04: Pass
-LanguageFeatures/Constant_update2018/NewOperators_A02_t05: Pass
 LibTest/collection/ListBase/ListBase_class_A01_t02: Crash # Issue http://dartbug.com/35242
 LibTest/collection/ListMixin/ListMixin_class_A01_t02: Crash # Issue http://dartbug.com/35242
 LibTest/core/List/List_class_A01_t02: Crash # Issue http://dartbug.com/35242
@@ -865,11 +755,6 @@
 LibTest/io/Stdin/readByteSync_A02_t01: RuntimeError, Pass
 LibTest/io/WebSocket/pingInterval_A01_t01: RuntimeError, Pass
 
-[ $runtime == none && $fasta ]
-LanguageFeatures/Constant_update2018/ShortCircuitOperators_A03_t01: Crash
-LanguageFeatures/Constant_update2018/ShortCircuitOperators_A03_t02: Crash
-LanguageFeatures/Constant_update2018/ShortCircuitOperators_A03_t03: Pass
-
 [ $runtime == vm && $system == linux && ($compiler == dartk || $compiler == dartkb) ]
 LibTest/io/Link/stat_A01_t01: RuntimeError
 LibTest/isolate/Isolate/spawn_A06_t03: Crash, Pass
@@ -1043,32 +928,6 @@
 Language/Expressions/Logical_Boolean_Expressions/syntax_t01: RuntimeError
 Language/Statements/Assert/execution_t08: RuntimeError
 Language/Types/Function_Types/call_t01: RuntimeError
-LanguageFeatures/Constant_update2018/CastOperator_A01_t01: DartkCrash
-LanguageFeatures/Constant_update2018/CastOperator_A02_t01: DartkCrash
-LanguageFeatures/Constant_update2018/CastOperator_A02_t02: DartkCrash
-LanguageFeatures/Constant_update2018/CastOperator_A03_t01/02: Pass
-LanguageFeatures/Constant_update2018/CastOperator_A03_t01/03: Pass
-LanguageFeatures/Constant_update2018/CastOperator_A04_t01: Pass
-LanguageFeatures/Constant_update2018/EqualityOperator_A01_t03: Pass
-LanguageFeatures/Constant_update2018/EqualityOperator_A01_t04: Pass
-LanguageFeatures/Constant_update2018/NewOperators_A01_t01: DartkCrash
-LanguageFeatures/Constant_update2018/NewOperators_A01_t02: DartkCrash
-LanguageFeatures/Constant_update2018/NewOperators_A02_t01: Fail
-LanguageFeatures/Constant_update2018/NewOperators_A02_t02: DartkCrash
-LanguageFeatures/Constant_update2018/NewOperators_A02_t04: Fail
-LanguageFeatures/Constant_update2018/NewOperators_A02_t05: DartkCrash
-LanguageFeatures/Constant_update2018/NewOperators_A02_t07: Fail
-LanguageFeatures/Constant_update2018/ShortCircuitOperators_A03_t05: Pass
-LanguageFeatures/Constant_update2018/TypeTestOperator_A01_t01: DartkCrash
-LanguageFeatures/Constant_update2018/TypeTestOperator_A01_t02: DartkCrash
-LanguageFeatures/Constant_update2018/TypeTestOperator_A02_t01: DartkCrash
-LanguageFeatures/Constant_update2018/TypeTestOperator_A02_t02: DartkCrash
-LanguageFeatures/Constant_update2018/TypeTestOperator_A03_t01: Pass
-LanguageFeatures/Constant_update2018/TypeTestOperator_A03_t02: Pass
-LanguageFeatures/Constant_update2018/TypeTestOperator_A03_t03/01: Pass
-LanguageFeatures/Constant_update2018/TypeTestOperator_A03_t04/01: Pass
-LanguageFeatures/Constant_update2018/TypeTestOperator_A04_t01: Pass
-LanguageFeatures/Constant_update2018/TypeTestOperator_A04_t02: Pass
 LanguageFeatures/Instantiate-to-bound/class/dynamic/class_typedef_l2_t06: RuntimeError
 LanguageFeatures/Instantiate-to-bound/class/static/class_FutureOr_l1_t04/none: CompileTimeError
 LanguageFeatures/Instantiate-to-bound/class/static/class_typedef_l1_t04/none: CompileTimeError
diff --git a/tests/compiler/dart2js/analyses/analysis_helper.dart b/tests/compiler/dart2js/analyses/analysis_helper.dart
index 6505445..1628c6b 100644
--- a/tests/compiler/dart2js/analyses/analysis_helper.dart
+++ b/tests/compiler/dart2js/analyses/analysis_helper.dart
@@ -15,11 +15,13 @@
 import 'package:compiler/src/ir/scope.dart';
 import 'package:compiler/src/ir/static_type.dart';
 import 'package:compiler/src/ir/util.dart';
+import 'package:compiler/src/kernel/dart2js_target.dart';
 import 'package:compiler/src/kernel/loader.dart';
 import 'package:compiler/src/util/uri_extras.dart';
 import 'package:expect/expect.dart';
 import 'package:front_end/src/api_unstable/dart2js.dart' as ir
     show RedirectingFactoryBody;
+import 'package:front_end/src/api_prototype/constant_evaluator.dart' as ir;
 import 'package:kernel/ast.dart' as ir;
 import 'package:kernel/class_hierarchy.dart' as ir;
 import 'package:kernel/core_types.dart' as ir;
@@ -72,11 +74,20 @@
   @override
   VariableScopeModel variableScopeModel;
 
+  ir.ConstantEvaluator _constantEvaluator;
+
   StaticTypeVisitorBase(
       ir.Component component, ir.ClassHierarchy classHierarchy)
       : super(
             new ir.TypeEnvironment(new ir.CoreTypes(component), classHierarchy),
-            classHierarchy);
+            classHierarchy) {
+    _constantEvaluator = new ir.ConstantEvaluator(
+        const Dart2jsConstantsBackend(),
+        const {},
+        typeEnvironment,
+        false,
+        const ir.SimpleErrorReporter());
+  }
 
   @override
   bool get useAsserts => false;
@@ -96,7 +107,8 @@
       // Skip synthetic .dill members.
       return;
     }
-    variableScopeModel = new ScopeModel.from(node).variableScopeModel;
+    variableScopeModel =
+        new ScopeModel.from(node, _constantEvaluator).variableScopeModel;
     super.visitProcedure(node);
     variableScopeModel = null;
   }
@@ -107,7 +119,8 @@
       // Skip synthetic .dill members.
       return;
     }
-    variableScopeModel = new ScopeModel.from(node).variableScopeModel;
+    variableScopeModel =
+        new ScopeModel.from(node, _constantEvaluator).variableScopeModel;
     super.visitField(node);
     variableScopeModel = null;
   }
@@ -118,7 +131,8 @@
       // Skip synthetic .dill members.
       return;
     }
-    variableScopeModel = new ScopeModel.from(node).variableScopeModel;
+    variableScopeModel =
+        new ScopeModel.from(node, _constantEvaluator).variableScopeModel;
     super.visitConstructor(node);
     variableScopeModel = null;
   }
diff --git a/tests/compiler/dart2js/codegen/model_data/constant_folding.dart b/tests/compiler/dart2js/codegen/model_data/constant_folding.dart
new file mode 100644
index 0000000..e93751d
--- /dev/null
+++ b/tests/compiler/dart2js/codegen/model_data/constant_folding.dart
@@ -0,0 +1,70 @@
+// Copyright (c) 2019, the Dart project authors.  Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+// Derived from dart2js_extra/constant_folding_test
+
+import "package:expect/expect.dart";
+
+/*element: main:calls=[checkAll$1(1),checkAll$1(1),checkAll$1(1),checkAll$1(1),checkAll$1(1),checkAll$1(1),checkAll$1(1)],params=0*/
+void main() {
+  const BitNot(42, 4294967253).check();
+  const BitNot(4294967253, 42).check();
+  const BitNot(-42, 41).check();
+  const BitNot(-1, 0).check();
+  const BitNot(0, 0xFFFFFFFF).check();
+  const BitNot(4294967295, 0).check();
+  const BitNot(0x12121212121212, 0xEDEDEDED).check();
+}
+
+/*element: jsEquals:calls=[Expect_equals(3),Expect_equals(3),get$isNegative(1),get$isNegative(1),toString$0(1),toString$0(1)],params=3*/
+void jsEquals(expected, actual, [String reason = null]) {
+  if (expected is num && actual is num) {
+    if (expected.isNaN && actual.isNaN) return;
+  }
+
+  Expect.equals(expected, actual, reason);
+
+  if (expected == 0 && actual == 0) {
+    Expect.equals(
+        expected.isNegative,
+        actual.isNegative,
+        (reason == null ? "" : "$reason ") +
+            "${expected.toString()} and "
+            "${actual.toString()} have different signs.");
+  }
+}
+
+abstract class TestOp {
+  final expected;
+
+  final result;
+
+  const TestOp(this.expected, this.result);
+
+  /*element: TestOp.checkAll:access=[arg,expected,result],calls=[jsEquals(3),jsEquals(3),jsEquals(3)],params=1*/
+  @pragma('dart2js:noInline')
+  checkAll(evalResult) {
+    jsEquals(expected, result,
+        "Frontend constant evaluation does not yield expected value.");
+    jsEquals(expected, evalResult,
+        "Backend constant evaluation does not yield expected value.");
+    jsEquals(expected, eval(), "eval() does not yield expected value.");
+  }
+
+  eval();
+}
+
+class BitNot extends TestOp {
+  /*element: BitNot.arg:emitted*/
+  final arg;
+
+  const BitNot(this.arg, expected) : super(expected, ~arg);
+
+  @pragma('dart2js:tryInline')
+  check() => checkAll(eval());
+
+  @override
+  @pragma('dart2js:tryInline')
+  eval() => ~arg;
+}
diff --git a/tests/compiler/dart2js/codegen/model_data/dynamic_set.dart b/tests/compiler/dart2js/codegen/model_data/dynamic_set.dart
index 8df2ee2..84e646c 100644
--- a/tests/compiler/dart2js/codegen/model_data/dynamic_set.dart
+++ b/tests/compiler/dart2js/codegen/model_data/dynamic_set.dart
@@ -26,11 +26,15 @@
 class Class2a<T> {
   /*strong.element: Class2a.field2:checked,elided*/
   /*omit.element: Class2a.field2:elided*/
+  /*strongConst.element: Class2a.field2:checked,elided*/
+  /*omitConst.element: Class2a.field2:elided*/
   T field2;
 }
 
 /*strong.element: method2:calls=[set$field2(1)],params=1*/
 /*omit.element: method2:params=1*/
+/*strongConst.element: method2:calls=[set$field2(1)],params=1*/
+/*omitConst.element: method2:params=1*/
 @pragma('dart2js:noInline')
 method2(dynamic c) {
   c.field2 = 42;
@@ -39,12 +43,16 @@
 class Class3a {
   /*strong.element: Class3a.field3:checked,elided*/
   /*omit.element: Class3a.field3:elided,set=simple*/
+  /*strongConst.element: Class3a.field3:checked,elided*/
+  /*omitConst.element: Class3a.field3:elided,set=simple*/
   int field3;
 }
 
 class Class3b {
   /*strong.element: Class3b.field3:checked,elided*/
   /*omit.element: Class3b.field3:elided,set=simple*/
+  /*strongConst.element: Class3b.field3:checked,elided*/
+  /*omitConst.element: Class3b.field3:elided,set=simple*/
   int field3;
 }
 
@@ -57,12 +65,17 @@
 class Class4a {
   /*strong.element: Class4a.field4:checked,elided*/
   /*omit.element: Class4a.field4:elided,set=simple*/
+  /*strongConst.element: Class4a.field4:checked,elided*/
+  /*omitConst.element: Class4a.field4:elided,set=simple*/
   int field4;
 }
 
 class Class4b implements Class4a {
   /*strong.element: Class4b.field4:checked,elided*/
   /*omit.element: Class4b.field4:elided,set=simple*/
+  /*strongConst.element: Class4b.field4:checked,elided*/
+  /*omitConst.element: Class4b.field4:elided,set=simple*/
+  @override
   int field4;
 }
 
diff --git a/tests/compiler/dart2js/codegen/model_test.dart b/tests/compiler/dart2js/codegen/model_test.dart
index af0b3c8..61f5c27 100644
--- a/tests/compiler/dart2js/codegen/model_test.dart
+++ b/tests/compiler/dart2js/codegen/model_test.dart
@@ -25,7 +25,8 @@
   asyncTest(() async {
     Directory dataDir =
         new Directory.fromUri(Platform.script.resolve('model_data'));
-    await checkTests(dataDir, const ModelDataComputer(), args: args);
+    await checkTests(dataDir, const ModelDataComputer(),
+        args: args, testCFEConstants: true);
   });
 }
 
diff --git a/tests/compiler/dart2js/deferred/constant_emission_test_helper.dart b/tests/compiler/dart2js/deferred/constant_emission_test_helper.dart
new file mode 100644
index 0000000..e8a0a7c
--- /dev/null
+++ b/tests/compiler/dart2js/deferred/constant_emission_test_helper.dart
@@ -0,0 +1,93 @@
+// Copyright (c) 2014, the Dart project authors.  Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+// Test that the additional runtime type support is output to the right
+// Files when using deferred loading.
+
+import 'package:compiler/compiler_new.dart';
+import 'package:compiler/src/commandline_options.dart';
+import 'package:compiler/src/compiler.dart';
+import 'package:compiler/src/constants/values.dart';
+import 'package:compiler/src/deferred_load.dart';
+import 'package:compiler/src/elements/entities.dart';
+import 'package:compiler/src/js_emitter/model.dart';
+import 'package:compiler/src/util/util.dart';
+import 'package:expect/expect.dart';
+import '../helpers/memory_compiler.dart';
+import '../helpers/output_collector.dart';
+import '../helpers/program_lookup.dart';
+
+class OutputUnitDescriptor {
+  final String uri;
+  final String member;
+  final String name;
+
+  const OutputUnitDescriptor(this.uri, this.member, this.name);
+}
+
+run(Map<String, String> sourceFiles, List<OutputUnitDescriptor> outputUnits,
+    Map<String, Set<String>> expectedOutputUnits,
+    {bool useCFEConstants: false}) async {
+  OutputCollector collector = new OutputCollector();
+  CompilationResult result = await runCompiler(
+      memorySourceFiles: sourceFiles,
+      outputProvider: collector,
+      options: useCFEConstants
+          ? ['${Flags.enableLanguageExperiments}=constant-update-2018']
+          : ['${Flags.enableLanguageExperiments}=no-constant-update-2018']);
+  Compiler compiler = result.compiler;
+  ProgramLookup lookup = new ProgramLookup(compiler);
+  var closedWorld = compiler.backendClosedWorldForTesting;
+  var elementEnvironment = closedWorld.elementEnvironment;
+
+  LibraryEntity lookupLibrary(name) {
+    return elementEnvironment.lookupLibrary(Uri.parse(name));
+  }
+
+  OutputUnit Function(MemberEntity) outputUnitForMember =
+      closedWorld.outputUnitData.outputUnitForMember;
+
+  Map<String, Fragment> fragments = {};
+  fragments['main'] = lookup.program.mainFragment;
+
+  for (OutputUnitDescriptor descriptor in outputUnits) {
+    LibraryEntity library = lookupLibrary(descriptor.uri);
+    MemberEntity member =
+        elementEnvironment.lookupLibraryMember(library, descriptor.member);
+    OutputUnit outputUnit = outputUnitForMember(member);
+    fragments[descriptor.name] = lookup.getFragment(outputUnit);
+  }
+
+  Map<String, Set<String>> actualOutputUnits = {};
+
+  bool errorsFound = false;
+
+  void processFragment(String fragmentName, Fragment fragment) {
+    for (Constant constant in fragment.constants) {
+      String text = constant.value.toStructuredText();
+      Set<String> expectedConstantUnit = expectedOutputUnits[text];
+      if (expectedConstantUnit == null) {
+        if (constant.value is DeferredGlobalConstantValue) {
+          print('ERROR: No expectancy for $constant found in $fragmentName');
+          errorsFound = true;
+        }
+      } else {
+        (actualOutputUnits[text] ??= <String>{}).add(fragmentName);
+      }
+    }
+  }
+
+  fragments.forEach(processFragment);
+
+  expectedOutputUnits.forEach((String constant, Set<String> expectedSet) {
+    Set<String> actualSet = actualOutputUnits[constant] ?? const <String>{};
+    if (!equalSets(expectedSet, actualSet)) {
+      print("ERROR: Constant $constant found in $actualSet, expected "
+          "$expectedSet");
+      errorsFound = true;
+    }
+  });
+
+  Expect.isFalse(errorsFound, "Errors found.");
+}
diff --git a/tests/compiler/dart2js/deferred/deferred_constant3_test.dart b/tests/compiler/dart2js/deferred/deferred_constant3_test.dart
new file mode 100644
index 0000000..239e4b0
--- /dev/null
+++ b/tests/compiler/dart2js/deferred/deferred_constant3_test.dart
@@ -0,0 +1,95 @@
+// Copyright (c) 2014, the Dart project authors.  Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+// Test that the additional runtime type support is output to the right
+// Files when using deferred loading.
+
+import 'package:async_helper/async_helper.dart';
+import 'constant_emission_test_helper.dart';
+
+void main() {
+  runTest({bool useCFEConstants: false}) async {
+    Map<String, Set<String>> expectedOutputUnits = {
+      'ConstructedConstant(C(x=IntConstant(1)))': {'main'},
+      'DeferredGlobalConstant(ConstructedConstant(C(x=IntConstant(1))))':
+          // With CFE constants, the references are inlined, so the constant
+          // only occurs in main.
+          useCFEConstants ? {} : {'lib2'},
+      'ConstructedConstant(C(x=IntConstant(2)))': {'lib1'},
+      'DeferredGlobalConstant(ConstructedConstant(C(x=IntConstant(2))))': {
+        'lib1'
+      },
+      'ConstructedConstant(C(x=IntConstant(3)))': {'lib1'},
+      'ConstructedConstant(C(x=IntConstant(4)))': {'lib2'},
+      'DeferredGlobalConstant(ConstructedConstant(C(x=IntConstant(4))))': {
+        'lib2'
+      },
+      'ConstructedConstant(C(x=IntConstant(5)))': {'lib2'},
+    };
+    await run(
+        MEMORY_SOURCE_FILES,
+        const [
+          OutputUnitDescriptor('memory:lib1.dart', 'm1', 'lib1'),
+          OutputUnitDescriptor('memory:lib2.dart', 'm2', 'lib2'),
+        ],
+        expectedOutputUnits,
+        useCFEConstants: useCFEConstants);
+  }
+
+  asyncTest(() async {
+    print('--test from kernel------------------------------------------------');
+    await runTest();
+    print('--test from kernel with CFE constants-----------------------------');
+    await runTest(useCFEConstants: true);
+  });
+}
+
+// Make sure that deferred constants are not inlined into the main hunk.
+const Map<String, String> MEMORY_SOURCE_FILES = const {
+  "main.dart": r"""
+import 'c.dart';
+import 'lib1.dart' deferred as l1;
+
+const c1 = const C(1);
+
+main() async {
+  print(c1.x);
+  await l1.loadLibrary();
+  l1.m1();
+  print(l1.c2);
+}
+""",
+  "lib1.dart": """
+import 'c.dart';
+import 'lib2.dart' deferred as l2;
+
+const c2 = const C(2);
+const c3 = const C(3);
+
+m1() async {
+  print(c2);
+  print(c3);
+  await l2.loadLibrary();
+  l2.m2();
+  print(l2.c3);
+  print(l2.c4);
+}
+""",
+  "lib2.dart": """
+import 'c.dart';
+
+const c3 = const C(1);
+const c4 = const C(4);
+const c5 = const C(5);
+
+m2() async {
+  print(c3);
+  print(c4);
+  print(c5);
+}
+""",
+  "c.dart": """
+class C { const C(this.x); final x; }
+""",
+};
diff --git a/tests/compiler/dart2js/deferred/dont_inline_deferred_constants_test.dart b/tests/compiler/dart2js/deferred/dont_inline_deferred_constants_test.dart
index 5c72752..5afdd4e 100644
--- a/tests/compiler/dart2js/deferred/dont_inline_deferred_constants_test.dart
+++ b/tests/compiler/dart2js/deferred/dont_inline_deferred_constants_test.dart
@@ -6,86 +6,53 @@
 // Files when using deferred loading.
 
 import 'package:async_helper/async_helper.dart';
-import 'package:compiler/compiler_new.dart';
-import 'package:compiler/src/compiler.dart';
-import 'package:expect/expect.dart';
-import '../helpers/memory_compiler.dart';
-import '../helpers/output_collector.dart';
+import 'constant_emission_test_helper.dart';
 
 void main() {
-  runTest() async {
-    OutputCollector collector = new OutputCollector();
-    CompilationResult result = await runCompiler(
-        memorySourceFiles: MEMORY_SOURCE_FILES, outputProvider: collector);
-    Compiler compiler = result.compiler;
-    var closedWorld = compiler.backendClosedWorldForTesting;
-    var elementEnvironment = closedWorld.elementEnvironment;
-
-    lookupLibrary(name) {
-      return elementEnvironment.lookupLibrary(Uri.parse(name));
-    }
-
-    var outputUnitForMember = closedWorld.outputUnitData.outputUnitForMember;
-
-    dynamic lib1 = lookupLibrary("memory:lib1.dart");
-    var foo1 = elementEnvironment.lookupLibraryMember(lib1, "foo");
-    var ou_lib1 = outputUnitForMember(foo1);
-
-    dynamic lib2 = lookupLibrary("memory:lib2.dart");
-    var foo2 = elementEnvironment.lookupLibraryMember(lib2, "foo");
-    var ou_lib2 = outputUnitForMember(foo2);
-
-    dynamic mainApp = elementEnvironment.mainLibrary;
-    var fooMain = elementEnvironment.lookupLibraryMember(mainApp, "foo");
-    var ou_lib1_lib2 = outputUnitForMember(fooMain);
-
-    String mainOutput = collector.getOutput("", OutputType.js);
-    String lib1Output =
-        collector.getOutput("out_${ou_lib1.name}", OutputType.jsPart);
-    String lib2Output =
-        collector.getOutput("out_${ou_lib2.name}", OutputType.jsPart);
-    String lib12Output =
-        collector.getOutput("out_${ou_lib1_lib2.name}", OutputType.jsPart);
-    // Test that the deferred constants are not inlined into the main file.
-    RegExp re1 = new RegExp(r"= .string1");
-    RegExp re2 = new RegExp(r"= .string2");
-    RegExp re3 = new RegExp(r"= 1010");
-    Expect.isTrue(re1.hasMatch(lib1Output));
-    Expect.isTrue(re2.hasMatch(lib1Output));
-    Expect.isTrue(re3.hasMatch(lib1Output));
-    Expect.isFalse(re1.hasMatch(mainOutput));
-    Expect.isFalse(re2.hasMatch(mainOutput));
-    Expect.isFalse(re3.hasMatch(mainOutput));
-    // Test that the non-deferred constant is inlined.
-    Expect.isTrue(new RegExp(r"print\(.string3.\)").hasMatch(mainOutput));
-    Expect.isFalse(new RegExp(r"= .string3").hasMatch(mainOutput));
-    Expect.isTrue(new RegExp(r"print\(.string4.\)").hasMatch(mainOutput));
-
-    // C(1) is shared between main, lib1 and lib2. Test that lib1 and lib2 each
-    // has a reference to it. It is defined in the main output file.
-    Expect.isTrue(new RegExp(r"C.C_1 =").hasMatch(mainOutput));
-    Expect.isFalse(new RegExp(r"= C.C_1").hasMatch(mainOutput));
-
-    Expect.isTrue(new RegExp(r"= C.C_1").hasMatch(lib1Output));
-    Expect.isTrue(new RegExp(r"= C.C_1").hasMatch(lib2Output));
-
-    // C(2) is shared between lib1 and lib2, each of them has their own
-    // reference to it.
-    Expect.isFalse(new RegExp(r"= C.C_2").hasMatch(mainOutput));
-
-    Expect.isTrue(new RegExp(r"= C.C_2").hasMatch(lib1Output));
-    Expect.isTrue(new RegExp(r"= C.C_2").hasMatch(lib2Output));
-    Expect.isTrue(new RegExp(r"C.C_2 =").hasMatch(lib12Output));
-
-    // "string4" is shared between lib1 and lib2, but it can be inlined.
-    Expect.isTrue(new RegExp(r"= .string4").hasMatch(lib1Output));
-    Expect.isTrue(new RegExp(r"= .string4").hasMatch(lib2Output));
-    Expect.isFalse(new RegExp(r"= .string4").hasMatch(lib12Output));
+  runTest({bool useCFEConstants: false}) async {
+    Map<String, Set<String>> expectedOutputUnits = {
+      // Test that the deferred constants are not inlined into the main file.
+      'DeferredGlobalConstant(IntConstant(1010))': {'lib1'},
+      'DeferredGlobalConstant(StringConstant("string1"))': {'lib1'},
+      'DeferredGlobalConstant(StringConstant("string2"))': {'lib1'},
+      // "string4" is shared between lib1 and lib2, but it can be inlined.
+      'DeferredGlobalConstant(StringConstant("string4"))':
+          // TODO(johnniwinther): Should we inline CFE constants within deferred
+          // library boundaries?
+          useCFEConstants ? {'lib12'} : {'lib1', 'lib2'},
+      // C(1) is shared between main, lib1 and lib2. Test that lib1 and lib2
+      // each has a reference to it. It is defined in the main output file.
+      'ConstructedConstant(C(p=IntConstant(1)))': {'main'},
+      'DeferredGlobalConstant(ConstructedConstant(C(p=IntConstant(1))))':
+          // With CFE constants, the references are inlined, so the constant
+          // only occurs in main.
+          useCFEConstants ? {} : {'lib1', 'lib2'},
+      // C(2) is shared between lib1 and lib2, each of them has their own
+      // reference to it.
+      'ConstructedConstant(C(p=IntConstant(2)))': {'lib12'},
+      'DeferredGlobalConstant(ConstructedConstant(C(p=IntConstant(2))))':
+          // With CFE constants, the references are inlined, so the constant
+          // occurs in lib12.
+          useCFEConstants ? {'lib12'} : {'lib1', 'lib2'},
+      // Test that the non-deferred constant is inlined.
+      'ConstructedConstant(C(p=IntConstant(5)))': {'main'},
+    };
+    await run(
+        MEMORY_SOURCE_FILES,
+        const [
+          OutputUnitDescriptor('memory:lib1.dart', 'foo', 'lib1'),
+          OutputUnitDescriptor('memory:lib2.dart', 'foo', 'lib2'),
+          OutputUnitDescriptor('memory:main.dart', 'foo', 'lib12')
+        ],
+        expectedOutputUnits,
+        useCFEConstants: useCFEConstants);
   }
 
   asyncTest(() async {
     print('--test from kernel------------------------------------------------');
     await runTest();
+    print('--test from kernel with CFE constants-----------------------------');
+    await runTest(useCFEConstants: true);
   });
 }
 
@@ -124,6 +91,7 @@
       print(lib1.C6);
       print(lib2.C6);
       print("string4");
+      print(const C(5));
       print(const C(1));
     });
   });
diff --git a/tests/compiler/dart2js/deferred/dont_inline_deferred_globals_test.dart b/tests/compiler/dart2js/deferred/dont_inline_deferred_globals_test.dart
index 4d24307..3c0ac93 100644
--- a/tests/compiler/dart2js/deferred/dont_inline_deferred_globals_test.dart
+++ b/tests/compiler/dart2js/deferred/dont_inline_deferred_globals_test.dart
@@ -6,46 +6,30 @@
 // Files when using deferred loading.
 
 import 'package:async_helper/async_helper.dart';
-import 'package:compiler/compiler_new.dart';
-import 'package:compiler/src/compiler.dart';
-import 'package:expect/expect.dart';
-import '../helpers/memory_compiler.dart';
-import '../helpers/output_collector.dart';
+import 'constant_emission_test_helper.dart';
 
 void main() {
-  runTest() async {
-    OutputCollector collector = new OutputCollector();
-    CompilationResult result = await runCompiler(
-        memorySourceFiles: MEMORY_SOURCE_FILES, outputProvider: collector);
-    Compiler compiler = result.compiler;
-    var closedWorld = compiler.backendClosedWorldForTesting;
-    var elementEnvironment = closedWorld.elementEnvironment;
+  runTest({bool useCFEConstants: false}) async {
+    Map<String, Set<String>> expectedOutputUnits = {
+      // Test that the deferred globals are not inlined into the main file.
+      'ConstructedConstant(C(field=StringConstant("string1")))': {'lib1'},
+      'ConstructedConstant(C(field=StringConstant("string2")))': {'lib1'},
+      'DeferredGlobalConstant(ConstructedConstant(C(field=StringConstant("string1"))))':
+          {'lib1'},
+    };
 
-    lookupLibrary(name) {
-      return elementEnvironment.lookupLibrary(Uri.parse(name));
-    }
-
-    var outputUnitForMember = closedWorld.outputUnitData.outputUnitForMember;
-
-    dynamic lib1 = lookupLibrary("memory:lib1.dart");
-    var foo1 = elementEnvironment.lookupLibraryMember(lib1, "finalVar");
-    var ou_lib1 = outputUnitForMember(foo1);
-
-    String mainOutput = collector.getOutput("", OutputType.js);
-    String lib1Output =
-        collector.getOutput("out_${ou_lib1.name}", OutputType.jsPart);
-    // Test that the deferred globals are not inlined into the main file.
-    RegExp re1 = new RegExp(r"= .string1");
-    RegExp re2 = new RegExp(r"= .string2");
-    Expect.isTrue(re1.hasMatch(lib1Output));
-    Expect.isTrue(re2.hasMatch(lib1Output));
-    Expect.isFalse(re1.hasMatch(mainOutput));
-    Expect.isFalse(re2.hasMatch(mainOutput));
+    await run(
+        MEMORY_SOURCE_FILES,
+        const [OutputUnitDescriptor('memory:lib1.dart', 'finalVar', 'lib1')],
+        expectedOutputUnits,
+        useCFEConstants: useCFEConstants);
   }
 
   asyncTest(() async {
     print('--test from kernel------------------------------------------------');
     await runTest();
+    print('--test from kernel with CFE constants-----------------------------');
+    await runTest(useCFEConstants: true);
   });
 }
 
@@ -67,7 +51,13 @@
 """,
   "lib1.dart": """
 import "main.dart" as main;
-final finalVar = "string1";
-var globalVar = "string2";
+
+class C {
+  final field;
+  const C(this.field);
+}
+
+final finalVar = const C("string1");
+dynamic globalVar = const C("string2");
 """
 };
diff --git a/tests/compiler/dart2js/deferred/follow_constant_dependencies_test.dart b/tests/compiler/dart2js/deferred/follow_constant_dependencies_test.dart
index ede4245..21bb4bc 100644
--- a/tests/compiler/dart2js/deferred/follow_constant_dependencies_test.dart
+++ b/tests/compiler/dart2js/deferred/follow_constant_dependencies_test.dart
@@ -5,15 +5,20 @@
 // Test that constants depended on by other constants are correctly deferred.
 
 import 'package:async_helper/async_helper.dart';
+import 'package:compiler/src/commandline_options.dart';
 import 'package:compiler/src/compiler.dart';
 import 'package:compiler/src/constants/values.dart';
 import 'package:expect/expect.dart';
 import '../helpers/memory_compiler.dart';
 
 void main() {
-  runTest() async {
-    CompilationResult result =
-        await runCompiler(memorySourceFiles: MEMORY_SOURCE_FILES);
+  runTest({bool useCFEConstants: false}) async {
+    CompilationResult result = await runCompiler(
+        memorySourceFiles: MEMORY_SOURCE_FILES,
+        options: useCFEConstants
+            ? ['${Flags.enableLanguageExperiments}=constant-update-2018']
+            : ['${Flags.enableLanguageExperiments}=no-constant-update-2018']);
+
     Compiler compiler = result.compiler;
     var closedWorld = compiler.backendClosedWorldForTesting;
     var outputUnitForConstant =
@@ -47,6 +52,8 @@
   asyncTest(() async {
     print('--test from kernel------------------------------------------------');
     await runTest();
+    print('--test from kernel with CFE constants-----------------------------');
+    await runTest(useCFEConstants: true);
   });
 }
 
diff --git a/tests/compiler/dart2js/deferred/not_in_main_test.dart b/tests/compiler/dart2js/deferred/not_in_main_test.dart
index 79f52b4..85d14e7 100644
--- a/tests/compiler/dart2js/deferred/not_in_main_test.dart
+++ b/tests/compiler/dart2js/deferred/not_in_main_test.dart
@@ -7,19 +7,29 @@
 // much be included in the initial download (loaded eagerly).
 
 import 'package:async_helper/async_helper.dart';
+import 'package:compiler/src/commandline_options.dart';
 import 'package:compiler/src/compiler.dart';
 import 'package:expect/expect.dart';
 import '../helpers/memory_compiler.dart';
 
 void main() {
   asyncTest(() async {
+    print('--test from kernel------------------------------------------------');
     await deferredTest1();
     await deferredTest2();
+    print('--test from kernel with CFE constants-----------------------------');
+    await deferredTest1(useCFEConstants: true);
+    await deferredTest2(useCFEConstants: true);
   });
 }
 
-deferredTest1() async {
-  CompilationResult result = await runCompiler(memorySourceFiles: TEST1);
+deferredTest1({bool useCFEConstants: false}) async {
+  CompilationResult result = await runCompiler(
+      memorySourceFiles: TEST1,
+      options: useCFEConstants
+          ? ['${Flags.enableLanguageExperiments}=constant-update-2018']
+          : ['${Flags.enableLanguageExperiments}=no-constant-update-2018']);
+
   Compiler compiler = result.compiler;
   var closedWorld = compiler.backendClosedWorldForTesting;
   var env = closedWorld.elementEnvironment;
@@ -34,8 +44,13 @@
   Expect.notEquals(mainOutputUnit, outputUnitForMember(foo2));
 }
 
-deferredTest2() async {
-  CompilationResult result = await runCompiler(memorySourceFiles: TEST2);
+deferredTest2({bool useCFEConstants: false}) async {
+  CompilationResult result = await runCompiler(
+      memorySourceFiles: TEST2,
+      options: useCFEConstants
+          ? ['${Flags.enableLanguageExperiments}=constant-update-2018']
+          : ['${Flags.enableLanguageExperiments}=no-constant-update-2018']);
+
   Compiler compiler = result.compiler;
   var closedWorld = compiler.backendClosedWorldForTesting;
   var env = closedWorld.elementEnvironment;
diff --git a/tests/compiler/dart2js/deferred_loading/data/basic_deferred.dart b/tests/compiler/dart2js/deferred_loading/data/basic_deferred.dart
index 2c0951c..c10e7bd 100644
--- a/tests/compiler/dart2js/deferred_loading/data/basic_deferred.dart
+++ b/tests/compiler/dart2js/deferred_loading/data/basic_deferred.dart
@@ -1,9 +1,14 @@
 // Copyright (c) 2017, the Dart project authors.  Please see the AUTHORS file
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
+
 import '../libs/basic_deferred_lib.dart' deferred as lib;
 
-/*element: main:OutputUnit(main, {})*/
+/*strong.element: main:OutputUnit(main, {})*/
+/*strongConst.element: main:
+ OutputUnit(main, {}),
+ constants=[FunctionConstant(funky)=OutputUnit(1, {lib})]
+*/
 main() => lib.loadLibrary().then(/*OutputUnit(main, {})*/ (_) {
       (lib.funky)();
     });
diff --git a/tests/compiler/dart2js/deferred_loading/data/deferred_constant1.dart b/tests/compiler/dart2js/deferred_loading/data/deferred_constant1.dart
index 99f8444..ccada1f 100644
--- a/tests/compiler/dart2js/deferred_loading/data/deferred_constant1.dart
+++ b/tests/compiler/dart2js/deferred_loading/data/deferred_constant1.dart
@@ -5,16 +5,25 @@
 import '../libs/deferred_constant1_lib1.dart';
 import '../libs/deferred_constant1_lib2.dart' deferred as lib2;
 
-/*element: main:OutputUnit(main, {})*/
+/*strong.element: main:OutputUnit(main, {})*/
+/*strongConst.element: main:
+ OutputUnit(main, {}),
+ constants=[
+  ConstructedConstant(C(value=ConstructedConstant(C(value=IntConstant(7)))))=OutputUnit(1, {lib2}),
+  ConstructedConstant(C(value=IntConstant(1)))=OutputUnit(main, {}),
+  ConstructedConstant(C(value=IntConstant(2)))=OutputUnit(1, {lib2}),
+  ConstructedConstant(C(value=IntConstant(4)))=OutputUnit(main, {}),
+  ConstructedConstant(C(value=IntConstant(5)))=OutputUnit(main, {})]
+*/
 main() async {
   C1.value;
   print(const C(4));
   /*OutputUnit(main, {})*/ () => print(const C(5));
   await lib2.loadLibrary();
-  lib2.C2.value;
-  lib2.C3.value;
-  lib2.C4.value;
-  lib2.C5.value;
-  lib2.C6;
-  lib2.C7.value;
+  print(lib2.C2.value);
+  print(lib2.C3.value);
+  print(lib2.C4.value);
+  print(lib2.C5.value);
+  print(lib2.C6);
+  print(lib2.C7.value);
 }
diff --git a/tests/compiler/dart2js/deferred_loading/data/deferred_constant2.dart b/tests/compiler/dart2js/deferred_loading/data/deferred_constant2.dart
index f8821ae..5a08d48 100644
--- a/tests/compiler/dart2js/deferred_loading/data/deferred_constant2.dart
+++ b/tests/compiler/dart2js/deferred_loading/data/deferred_constant2.dart
@@ -6,7 +6,12 @@
 
 import '../libs/deferred_constant2_lib.dart' deferred as lib;
 
-/*element: main:OutputUnit(main, {})*/
+/*strong.element: main:OutputUnit(main, {})*/
+/*strongConst.element: main:
+ OutputUnit(main, {}),
+ constants=[
+  ConstructedConstant(Constant(value=IntConstant(499)))=OutputUnit(1, {lib})]
+*/
 main() {
   lib.loadLibrary().then(/*OutputUnit(main, {})*/ (_) {
     Expect.equals(499, lib.C1.value);
diff --git a/tests/compiler/dart2js/deferred_loading/data/deferred_constant3.dart b/tests/compiler/dart2js/deferred_loading/data/deferred_constant3.dart
new file mode 100644
index 0000000..27c1129
--- /dev/null
+++ b/tests/compiler/dart2js/deferred_loading/data/deferred_constant3.dart
@@ -0,0 +1,23 @@
+// Copyright (c) 2019, the Dart project authors.  Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+import '../libs/deferred_constant3_shared.dart';
+import '../libs/deferred_constant3_lib1.dart' deferred as l1;
+
+/*strong.element: c1:OutputUnit(main, {})*/
+const c1 = /*strong.OutputUnit(main, {})*/ const C(1);
+
+/*strong.element: main:OutputUnit(main, {})*/
+/*strongConst.element: main:
+ OutputUnit(main, {}),
+ constants=[
+  ConstructedConstant(C(x=IntConstant(1)))=OutputUnit(main, {}),
+  ConstructedConstant(C(x=IntConstant(2)))=OutputUnit(1, {l1})]
+*/
+main() async {
+  print(c1.x);
+  await l1.loadLibrary();
+  l1.m1();
+  print(l1.c2);
+}
diff --git a/tests/compiler/dart2js/deferred_loading/data/deferred_function.dart b/tests/compiler/dart2js/deferred_loading/data/deferred_function.dart
index 6f809df..89cedc8 100644
--- a/tests/compiler/dart2js/deferred_loading/data/deferred_function.dart
+++ b/tests/compiler/dart2js/deferred_loading/data/deferred_function.dart
@@ -7,7 +7,11 @@
 
 import '../libs/deferred_function_lib.dart' deferred as lib;
 
-/*element: readFoo:OutputUnit(main, {})*/
+/*strong.element: readFoo:OutputUnit(main, {})*/
+/*strongConst.element: readFoo:
+ OutputUnit(main, {}),
+ constants=[FunctionConstant(foo)=OutputUnit(1, {lib})]
+*/
 readFoo() {
   return lib.foo;
 }
diff --git a/tests/compiler/dart2js/deferred_loading/data/deferred_typed_map.dart b/tests/compiler/dart2js/deferred_loading/data/deferred_typed_map.dart
index 0015e60..2aca8d8 100644
--- a/tests/compiler/dart2js/deferred_loading/data/deferred_typed_map.dart
+++ b/tests/compiler/dart2js/deferred_loading/data/deferred_typed_map.dart
@@ -4,7 +4,12 @@
 
 import '../libs/deferred_typed_map_lib1.dart' deferred as lib;
 
-/*element: main:OutputUnit(main, {})*/
+/*strong.element: main:OutputUnit(main, {})*/
+/*strongConst.element: main:
+ OutputUnit(main, {}),
+ constants=[
+  MapConstant(<int, dynamic Function({M b})>{IntConstant(1): FunctionConstant(f1), IntConstant(2): FunctionConstant(f2)})=OutputUnit(1, {lib})]
+*/
 main() async {
   await lib.loadLibrary();
   print(lib.table[1]);
diff --git a/tests/compiler/dart2js/deferred_loading/data/deferred_typedef.dart b/tests/compiler/dart2js/deferred_loading/data/deferred_typedef.dart
index 892f55e..90343e4 100644
--- a/tests/compiler/dart2js/deferred_loading/data/deferred_typedef.dart
+++ b/tests/compiler/dart2js/deferred_loading/data/deferred_typedef.dart
@@ -4,7 +4,13 @@
 
 import '../libs/deferred_typedef_lib1.dart' deferred as lib1;
 
-/*element: main:OutputUnit(main, {})*/
+/*strong.element: main:OutputUnit(main, {})*/
+/*strongConst.element: main:
+ OutputUnit(main, {}),
+ constants=[
+  ConstructedConstant(C(a=TypeConstant(void Function()),b=FunctionConstant(topLevelMethod)))=OutputUnit(1, {lib1}),
+  TypeConstant(void Function())=OutputUnit(1, {lib1})]
+*/
 main() async {
   await lib1.loadLibrary();
   print(lib1.cA);
diff --git a/tests/compiler/dart2js/deferred_loading/data/future_or.dart b/tests/compiler/dart2js/deferred_loading/data/future_or.dart
new file mode 100644
index 0000000..5927f8b
--- /dev/null
+++ b/tests/compiler/dart2js/deferred_loading/data/future_or.dart
@@ -0,0 +1,18 @@
+// Copyright (c) 2019, the Dart project authors.  Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+import 'dart:async';
+import '../libs/future_or_lib1.dart' deferred as lib1;
+import '../libs/future_or_lib2.dart' as lib2;
+
+/*strong.element: main:OutputUnit(main, {})*/
+/*strongConst.element: main:
+ OutputUnit(main, {}),
+ constants=[ConstructedConstant(A())=OutputUnit(1, {lib1})]
+*/
+main() async {
+  await lib1.loadLibrary();
+  lib1.field is FutureOr<lib2.A>;
+  lib1.field.method();
+}
diff --git a/tests/compiler/dart2js/deferred_loading/data/type_arguments.dart b/tests/compiler/dart2js/deferred_loading/data/type_arguments.dart
new file mode 100644
index 0000000..14f63696
--- /dev/null
+++ b/tests/compiler/dart2js/deferred_loading/data/type_arguments.dart
@@ -0,0 +1,24 @@
+// Copyright (c) 2019, the Dart project authors.  Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+import '../libs/type_arguments_lib1.dart' deferred as lib1;
+import '../libs/type_arguments_lib2.dart' as lib2;
+import '../libs/type_arguments_lib3.dart' deferred as lib3;
+
+/*strong.element: main:OutputUnit(main, {})*/
+/*strongConst.element: main:
+ OutputUnit(main, {}),
+ constants=[
+  ConstructedConstant(A<B>())=OutputUnit(1, {lib1}),
+  ConstructedConstant(A<F>())=OutputUnit(1, {lib1}),
+  ConstructedConstant(C<D>())=OutputUnit(main, {}),
+  ConstructedConstant(E<F>())=OutputUnit(3, {lib3})]
+*/
+main() async {
+  await lib1.loadLibrary();
+  lib1.field1;
+  lib1.field2;
+  lib2.field;
+  lib3.field;
+}
diff --git a/tests/compiler/dart2js/deferred_loading/deferred_loading_test.dart b/tests/compiler/dart2js/deferred_loading/deferred_loading_test.dart
index ea3fd84..e79853c 100644
--- a/tests/compiler/dart2js/deferred_loading/deferred_loading_test.dart
+++ b/tests/compiler/dart2js/deferred_loading/deferred_loading_test.dart
@@ -36,7 +36,7 @@
         options: compilerOptions,
         args: args, setUpFunction: () {
       importPrefixes.clear();
-    });
+    }, testOmit: false, testCFEConstants: true);
   });
 }
 
@@ -128,6 +128,8 @@
   final OutputUnitData _data;
   final ClosureData _closureDataLookup;
 
+  Set<String> _constants = {};
+
   OutputUnitIrComputer(
       DiagnosticReporter reporter,
       Map<Id, ActualData<String>> actualMap,
@@ -137,8 +139,14 @@
       this._closureDataLookup)
       : super(reporter, actualMap);
 
-  String getMemberValue(MemberEntity member) {
-    return outputUnitString(_data.outputUnitForMember(member));
+  String getMemberValue(MemberEntity member, Set<String> constants) {
+    StringBuffer sb = new StringBuffer();
+    sb.write(outputUnitString(_data.outputUnitForMember(member)));
+    if (constants.isNotEmpty) {
+      List<String> text = constants.toList()..sort();
+      sb.write(',constants=[${text.join(',')}]');
+    }
+    return sb.toString();
   }
 
   @override
@@ -166,14 +174,26 @@
       }
     }
 
-    return getMemberValue(_elementMap.getMember(node));
+    String value = getMemberValue(_elementMap.getMember(node), _constants);
+    _constants = {};
+    return value;
+  }
+
+  @override
+  visitConstantExpression(ir.ConstantExpression node) {
+    ConstantValue constant = _elementMap.getConstantValue(node);
+    if (!constant.isPrimitive) {
+      _constants.add('${constant.toStructuredText()}='
+          '${outputUnitString(_data.outputUnitForConstant(constant))}');
+    }
+    return super.visitConstantExpression(node);
   }
 
   @override
   String computeNodeValue(Id id, ir.TreeNode node) {
     if (node is ir.FunctionExpression || node is ir.FunctionDeclaration) {
       ClosureRepresentationInfo info = _closureDataLookup.getClosureInfo(node);
-      return getMemberValue(info.callMethod);
+      return getMemberValue(info.callMethod, const {});
     }
     return null;
   }
diff --git a/tests/compiler/dart2js/deferred_loading/libs/basic_deferred_lib.dart b/tests/compiler/dart2js/deferred_loading/libs/basic_deferred_lib.dart
index bbd9bae..0091deb 100644
--- a/tests/compiler/dart2js/deferred_loading/libs/basic_deferred_lib.dart
+++ b/tests/compiler/dart2js/deferred_loading/libs/basic_deferred_lib.dart
@@ -5,7 +5,11 @@
 /*element: defaultArg:OutputUnit(1, {lib})*/
 defaultArg() => "";
 
-/*element: funky:OutputUnit(1, {lib})*/
+/*strong.element: funky:OutputUnit(1, {lib})*/
+/*strongConst.element: funky:
+ OutputUnit(1, {lib}),
+ constants=[FunctionConstant(defaultArg)=OutputUnit(1, {lib})]
+*/
 funky([x = defaultArg]) => x();
 
 final int notUsed = 3;
diff --git a/tests/compiler/dart2js/deferred_loading/libs/deferred_constant1_lib3.dart b/tests/compiler/dart2js/deferred_loading/libs/deferred_constant1_lib3.dart
index 3935220..c304f13 100644
--- a/tests/compiler/dart2js/deferred_loading/libs/deferred_constant1_lib3.dart
+++ b/tests/compiler/dart2js/deferred_loading/libs/deferred_constant1_lib3.dart
@@ -8,7 +8,7 @@
 class C {
   /*element: C.value:OutputUnit(main, {})*/
   final value;
-  /*element: C.:OutputUnit(main, {})*/
+  /*strong.element: C.:OutputUnit(main, {})*/
   const C(this.value);
 }
 
@@ -16,40 +16,40 @@
 /// Constant used from main: not deferred.
 /// ---------------------------------------------------------------------------
 
-/*element: C1:OutputUnit(main, {})*/
-const C1 = /*OutputUnit(main, {})*/ const C(1);
+/*strong.element: C1:OutputUnit(main, {})*/
+const C1 = /*strong.OutputUnit(main, {})*/ const C(1);
 
 /// ---------------------------------------------------------------------------
 /// Constant completely deferred.
 /// ---------------------------------------------------------------------------
 
-/*element: C2:OutputUnit(1, {lib2})*/
-const C2 = /*OutputUnit(1, {lib2})*/ const C(2);
+/*strong.element: C2:OutputUnit(1, {lib2})*/
+const C2 = /*strong.OutputUnit(1, {lib2})*/ const C(2);
 
 /// ---------------------------------------------------------------------------
 /// Constant fields not used from main, but the constant value are: so the field
 /// and the constants are in different output units.
 /// ---------------------------------------------------------------------------
 
-/*element: C3:OutputUnit(1, {lib2})*/
-const C3 = /*OutputUnit(main, {})*/ const C(1);
+/*strong.element: C3:OutputUnit(1, {lib2})*/
+const C3 = /*strong.OutputUnit(main, {})*/ const C(1);
 
-/*element: C4:OutputUnit(1, {lib2})*/
-const C4 = /*OutputUnit(main, {})*/ const C(4);
+/*strong.element: C4:OutputUnit(1, {lib2})*/
+const C4 = /*strong.OutputUnit(main, {})*/ const C(4);
 
 /// ---------------------------------------------------------------------------
 /// Constant value used form a closure within main.
 /// ---------------------------------------------------------------------------
 
-/*element: C5:OutputUnit(1, {lib2})*/
-const C5 = /*OutputUnit(main, {})*/ const C(5);
+/*strong.element: C5:OutputUnit(1, {lib2})*/
+const C5 = /*strong.OutputUnit(main, {})*/ const C(5);
 
 /// ---------------------------------------------------------------------------
 /// Deferred constants, used after a deferred load.
 /// ---------------------------------------------------------------------------
 
-/*element: C6:OutputUnit(1, {lib2})*/
+/*strong.element: C6:OutputUnit(1, {lib2})*/
 const C6 = "string6";
 
-/*element: C7:OutputUnit(1, {lib2})*/
-const C7 = /*OutputUnit(1, {lib2})*/ const C(const C(7));
+/*strong.element: C7:OutputUnit(1, {lib2})*/
+const C7 = /*strong.OutputUnit(1, {lib2})*/ const C(const C(7));
diff --git a/tests/compiler/dart2js/deferred_loading/libs/deferred_constant2_lib.dart b/tests/compiler/dart2js/deferred_loading/libs/deferred_constant2_lib.dart
index 33b5017..12221777 100644
--- a/tests/compiler/dart2js/deferred_loading/libs/deferred_constant2_lib.dart
+++ b/tests/compiler/dart2js/deferred_loading/libs/deferred_constant2_lib.dart
@@ -8,7 +8,7 @@
 class Constant {
   /*element: Constant.value:OutputUnit(1, {lib})*/
   final value;
-  /*element: Constant.:OutputUnit(1, {lib})*/
+  /*strong.element: Constant.:OutputUnit(1, {lib})*/
   const Constant(this.value);
 
   /*element: Constant.==:OutputUnit(1, {lib})*/
@@ -17,5 +17,5 @@
   get hashCode => 0;
 }
 
-/*element: C1:OutputUnit(1, {lib})*/
-const C1 = /*OutputUnit(1, {lib})*/ const Constant(499);
+/*strong.element: C1:OutputUnit(1, {lib})*/
+const C1 = /*strong.OutputUnit(1, {lib})*/ const Constant(499);
diff --git a/tests/compiler/dart2js/deferred_loading/libs/deferred_constant3_lib1.dart b/tests/compiler/dart2js/deferred_loading/libs/deferred_constant3_lib1.dart
new file mode 100644
index 0000000..ad37207
--- /dev/null
+++ b/tests/compiler/dart2js/deferred_loading/libs/deferred_constant3_lib1.dart
@@ -0,0 +1,30 @@
+// Copyright (c) 2019, the Dart project authors.  Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+import 'deferred_constant3_shared.dart';
+import 'deferred_constant3_lib2.dart' deferred as l2;
+
+/*strong.element: c2:OutputUnit(1, {l1})*/
+const c2 = /*strong.OutputUnit(1, {l1})*/ const C(2);
+
+/*strong.element: c3:OutputUnit(1, {l1})*/
+const c3 = /*strong.OutputUnit(1, {l1})*/ const C(3);
+
+/*strong.element: m1:OutputUnit(1, {l1})*/
+/*strongConst.element: m1:
+ OutputUnit(1, {l1}),
+ constants=[
+  ConstructedConstant(C(x=IntConstant(1)))=OutputUnit(main, {}),
+  ConstructedConstant(C(x=IntConstant(2)))=OutputUnit(1, {l1}),
+  ConstructedConstant(C(x=IntConstant(3)))=OutputUnit(1, {l1}),
+  ConstructedConstant(C(x=IntConstant(4)))=OutputUnit(2, {l2})]
+*/
+m1() async {
+  print(c2);
+  print(c3);
+  await l2.loadLibrary();
+  l2.m2();
+  print(l2.c3);
+  print(l2.c4);
+}
diff --git a/tests/compiler/dart2js/deferred_loading/libs/deferred_constant3_lib2.dart b/tests/compiler/dart2js/deferred_loading/libs/deferred_constant3_lib2.dart
new file mode 100644
index 0000000..b834b48
--- /dev/null
+++ b/tests/compiler/dart2js/deferred_loading/libs/deferred_constant3_lib2.dart
@@ -0,0 +1,28 @@
+// Copyright (c) 2019, the Dart project authors.  Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+import 'deferred_constant3_shared.dart';
+
+/*strong.element: c3:OutputUnit(2, {l2})*/
+const c3 = /*strong.OutputUnit(main, {})*/ const C(1);
+
+/*strong.element: c4:OutputUnit(2, {l2})*/
+const c4 = /*strong.OutputUnit(2, {l2})*/ const C(4);
+
+/*strong.element: c5:OutputUnit(2, {l2})*/
+const c5 = /*strong.OutputUnit(2, {l2})*/ const C(5);
+
+/*strong.element: m2:OutputUnit(2, {l2})*/
+/*strongConst.element: m2:
+ OutputUnit(2, {l2}),
+ constants=[
+  ConstructedConstant(C(x=IntConstant(1)))=OutputUnit(main, {}),
+  ConstructedConstant(C(x=IntConstant(4)))=OutputUnit(2, {l2}),
+  ConstructedConstant(C(x=IntConstant(5)))=OutputUnit(2, {l2})]
+*/
+m2() async {
+  print(c3);
+  print(c4);
+  print(c5);
+}
diff --git a/tests/compiler/dart2js/deferred_loading/libs/deferred_constant3_shared.dart b/tests/compiler/dart2js/deferred_loading/libs/deferred_constant3_shared.dart
new file mode 100644
index 0000000..d4480d1
--- /dev/null
+++ b/tests/compiler/dart2js/deferred_loading/libs/deferred_constant3_shared.dart
@@ -0,0 +1,12 @@
+// Copyright (c) 2019, the Dart project authors.  Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+/*class: C:OutputUnit(main, {})*/
+class C {
+  /*strong.element: C.:OutputUnit(main, {})*/
+  const C(this.x);
+
+  /*element: C.x:OutputUnit(main, {})*/
+  final x;
+}
diff --git a/tests/compiler/dart2js/deferred_loading/libs/deferred_typed_map_lib1.dart b/tests/compiler/dart2js/deferred_loading/libs/deferred_typed_map_lib1.dart
index e5b0dc7..cec8198 100644
--- a/tests/compiler/dart2js/deferred_loading/libs/deferred_typed_map_lib1.dart
+++ b/tests/compiler/dart2js/deferred_loading/libs/deferred_typed_map_lib1.dart
@@ -7,9 +7,9 @@
 
 typedef dynamic FF({M b});
 
-/*element: table:OutputUnit(1, {lib})*/
+/*strong.element: table:OutputUnit(1, {lib})*/
 const table =
-/*OutputUnit(1, {lib})*/
+/*strong.OutputUnit(1, {lib})*/
     const <int, FF>{1: f1, 2: f2};
 
 /*element: f1:OutputUnit(1, {lib})*/
diff --git a/tests/compiler/dart2js/deferred_loading/libs/deferred_typedef_lib1.dart b/tests/compiler/dart2js/deferred_loading/libs/deferred_typedef_lib1.dart
index 9d6d26a..e8b71f2 100644
--- a/tests/compiler/dart2js/deferred_loading/libs/deferred_typedef_lib1.dart
+++ b/tests/compiler/dart2js/deferred_loading/libs/deferred_typedef_lib1.dart
@@ -12,7 +12,7 @@
   /*element: C.b:OutputUnit(1, {lib1})*/
   final b;
 
-  /*element: C.:OutputUnit(1, {lib1})*/
+  /*strong.element: C.:OutputUnit(1, {lib1})*/
   const C(this.a, this.b);
 }
 
@@ -23,8 +23,8 @@
 /*element: topLevelMethod:OutputUnit(1, {lib1})*/
 topLevelMethod() {}
 
-/*element: cA:OutputUnit(1, {lib1})*/
-const cA = /*OutputUnit(1, {lib1})*/ const C(MyF1, topLevelMethod);
+/*strong.element: cA:OutputUnit(1, {lib1})*/
+const cA = /*strong.OutputUnit(1, {lib1})*/ const C(MyF1, topLevelMethod);
 
-/*element: cB:OutputUnit(1, {lib1})*/
-const cB = /*OutputUnit(1, {lib1})*/ MyF2;
+/*strong.element: cB:OutputUnit(1, {lib1})*/
+const cB = /*strong.OutputUnit(1, {lib1})*/ MyF2;
diff --git a/tests/compiler/dart2js/deferred_loading/libs/dont_inline_deferred_constants_lib1.dart b/tests/compiler/dart2js/deferred_loading/libs/dont_inline_deferred_constants_lib1.dart
index 80c37a0..545c685 100644
--- a/tests/compiler/dart2js/deferred_loading/libs/dont_inline_deferred_constants_lib1.dart
+++ b/tests/compiler/dart2js/deferred_loading/libs/dont_inline_deferred_constants_lib1.dart
@@ -5,35 +5,35 @@
 import "dont_inline_deferred_constants_main.dart" show C;
 import "dont_inline_deferred_constants_main.dart" as main;
 
-/*element: C1:OutputUnit(1, {lib1})*/
+/*strong.element: C1:OutputUnit(1, {lib1})*/
 const C1 = "string1";
 
-/*element: C1b:OutputUnit(1, {lib1})*/
-const C1b = /*OutputUnit(1, {lib1})*/ const C("string1");
+/*strong.element: C1b:OutputUnit(1, {lib1})*/
+const C1b = /*strong.OutputUnit(1, {lib1})*/ const C("string1");
 
-/*element: C2:OutputUnit(1, {lib1})*/
+/*strong.element: C2:OutputUnit(1, {lib1})*/
 const C2 = 1010;
 
-/*element: C2b:OutputUnit(1, {lib1})*/
-const C2b = /*OutputUnit(1, {lib1})*/ const C(1010);
+/*strong.element: C2b:OutputUnit(1, {lib1})*/
+const C2b = /*strong.OutputUnit(1, {lib1})*/ const C(1010);
 
 /*class: D:OutputUnit(main, {})*/
 class D {
-  /*element: D.C3:OutputUnit(1, {lib1})*/
+  /*strong.element: D.C3:OutputUnit(1, {lib1})*/
   static const C3 = "string2";
 
-  /*element: D.C3b:OutputUnit(1, {lib1})*/
-  static const C3b = /*OutputUnit(1, {lib1})*/ const C("string2");
+  /*strong.element: D.C3b:OutputUnit(1, {lib1})*/
+  static const C3b = /*strong.OutputUnit(1, {lib1})*/ const C("string2");
 }
 
-/*element: C4:OutputUnit(1, {lib1})*/
+/*strong.element: C4:OutputUnit(1, {lib1})*/
 const C4 = "string4";
 
-/*element: C5:OutputUnit(1, {lib1})*/
-const C5 = /*OutputUnit(main, {})*/ const C(1);
+/*strong.element: C5:OutputUnit(1, {lib1})*/
+const C5 = /*strong.OutputUnit(main, {})*/ const C(1);
 
-/*element: C6:OutputUnit(1, {lib1})*/
-const C6 = /*OutputUnit(2, {lib1, lib2})*/ const C(2);
+/*strong.element: C6:OutputUnit(1, {lib1})*/
+const C6 = /*strong.OutputUnit(2, {lib1, lib2})*/ const C(2);
 
 /*element: foo:OutputUnit(1, {lib1})*/
 foo() {
diff --git a/tests/compiler/dart2js/deferred_loading/libs/dont_inline_deferred_constants_lib2.dart b/tests/compiler/dart2js/deferred_loading/libs/dont_inline_deferred_constants_lib2.dart
index c1d65c5..79948c6 100644
--- a/tests/compiler/dart2js/deferred_loading/libs/dont_inline_deferred_constants_lib2.dart
+++ b/tests/compiler/dart2js/deferred_loading/libs/dont_inline_deferred_constants_lib2.dart
@@ -5,14 +5,14 @@
 import "dont_inline_deferred_constants_main.dart" show C;
 import "dont_inline_deferred_constants_main.dart" as main;
 
-/*element: C4:OutputUnit(3, {lib2})*/
+/*strong.element: C4:OutputUnit(3, {lib2})*/
 const C4 = "string4";
 
-/*element: C5:OutputUnit(3, {lib2})*/
-const C5 = /*OutputUnit(main, {})*/ const C(1);
+/*strong.element: C5:OutputUnit(3, {lib2})*/
+const C5 = /*strong.OutputUnit(main, {})*/ const C(1);
 
-/*element: C6:OutputUnit(3, {lib2})*/
-const C6 = /*OutputUnit(2, {lib1, lib2})*/ const C(2);
+/*strong.element: C6:OutputUnit(3, {lib2})*/
+const C6 = /*strong.OutputUnit(2, {lib1, lib2})*/ const C(2);
 
 /*element: foo:OutputUnit(3, {lib2})*/
 foo() {
diff --git a/tests/compiler/dart2js/deferred_loading/libs/dont_inline_deferred_constants_main.dart b/tests/compiler/dart2js/deferred_loading/libs/dont_inline_deferred_constants_main.dart
index a8f56bd..ae08f33 100644
--- a/tests/compiler/dart2js/deferred_loading/libs/dont_inline_deferred_constants_main.dart
+++ b/tests/compiler/dart2js/deferred_loading/libs/dont_inline_deferred_constants_main.dart
@@ -5,7 +5,7 @@
 import 'dont_inline_deferred_constants_lib1.dart' deferred as lib1;
 import 'dont_inline_deferred_constants_lib2.dart' deferred as lib2;
 
-/*element: c:OutputUnit(main, {})*/
+/*strong.element: c:OutputUnit(main, {})*/
 const c = "string3";
 
 /*class: C:OutputUnit(main, {})*/
@@ -13,14 +13,23 @@
   /*element: C.p:OutputUnit(main, {})*/
   final p;
 
-  /*element: C.:OutputUnit(main, {})*/
+  /*strong.element: C.:OutputUnit(main, {})*/
   const C(this.p);
 }
 
 /*element: foo:OutputUnit(2, {lib1, lib2})*/
 foo() => print("main");
 
-/*element: main:OutputUnit(main, {})*/
+/*strong.element: main:OutputUnit(main, {})*/
+/*strongConst.element: main:
+ OutputUnit(main, {}),
+ constants=[
+  ConstructedConstant(C(p=IntConstant(1)))=OutputUnit(main, {}),
+  ConstructedConstant(C(p=IntConstant(1010)))=OutputUnit(1, {lib1}),
+  ConstructedConstant(C(p=IntConstant(2)))=OutputUnit(2, {lib1, lib2}),
+  ConstructedConstant(C(p=StringConstant("string1")))=OutputUnit(1, {lib1}),
+  ConstructedConstant(C(p=StringConstant("string2")))=OutputUnit(1, {lib1})]
+*/
 void main() {
   lib1.loadLibrary().then(/*OutputUnit(main, {})*/ (_) {
     lib2.loadLibrary().then(/*OutputUnit(main, {})*/ (_) {
diff --git a/tests/compiler/dart2js/deferred_loading/libs/future_or_lib1.dart b/tests/compiler/dart2js/deferred_loading/libs/future_or_lib1.dart
new file mode 100644
index 0000000..a5bf524
--- /dev/null
+++ b/tests/compiler/dart2js/deferred_loading/libs/future_or_lib1.dart
@@ -0,0 +1,8 @@
+// Copyright (c) 2019, the Dart project authors.  Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+import 'future_or_lib2.dart';
+
+/*strong.element: field:OutputUnit(1, {lib1})*/
+const dynamic field = /*strong.OutputUnit(1, {lib1})*/ const A();
diff --git a/tests/compiler/dart2js/deferred_loading/libs/future_or_lib2.dart b/tests/compiler/dart2js/deferred_loading/libs/future_or_lib2.dart
new file mode 100644
index 0000000..3c7fcbc
--- /dev/null
+++ b/tests/compiler/dart2js/deferred_loading/libs/future_or_lib2.dart
@@ -0,0 +1,12 @@
+// Copyright (c) 2019, the Dart project authors.  Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+/*class: A:OutputUnit(main, {})*/
+class A {
+  /*strong.element: A.:OutputUnit(1, {lib1})*/
+  const A();
+
+  /*element: A.method:OutputUnit(main, {})*/
+  method() {}
+}
diff --git a/tests/compiler/dart2js/deferred_loading/libs/instantiation0_strong_lib1.dart b/tests/compiler/dart2js/deferred_loading/libs/instantiation0_strong_lib1.dart
index fbcd7c2..67ababf 100644
--- a/tests/compiler/dart2js/deferred_loading/libs/instantiation0_strong_lib1.dart
+++ b/tests/compiler/dart2js/deferred_loading/libs/instantiation0_strong_lib1.dart
@@ -7,7 +7,11 @@
 
 typedef dynamic G<T>(T v);
 
-/*element: m:OutputUnit(1, {b})*/
+/*strong.element: m:OutputUnit(1, {b})*/
+/*strongConst.element: m:
+ OutputUnit(1, {b}),
+ constants=[InstantiationConstant([int],FunctionConstant(getFoo))=OutputUnit(1, {b})]
+*/
 m(int x, {G<int> f: getFoo}) {
   print(f(x));
 }
diff --git a/tests/compiler/dart2js/deferred_loading/libs/instantiation1_strong_lib1.dart b/tests/compiler/dart2js/deferred_loading/libs/instantiation1_strong_lib1.dart
index fbcd7c2..0124514 100644
--- a/tests/compiler/dart2js/deferred_loading/libs/instantiation1_strong_lib1.dart
+++ b/tests/compiler/dart2js/deferred_loading/libs/instantiation1_strong_lib1.dart
@@ -7,7 +7,12 @@
 
 typedef dynamic G<T>(T v);
 
-/*element: m:OutputUnit(1, {b})*/
+/*strong.element: m:OutputUnit(1, {b})*/
+/*strongConst.element: m:
+ OutputUnit(1, {b}),
+ constants=[
+  InstantiationConstant([int],FunctionConstant(getFoo))=OutputUnit(1, {b})]
+*/
 m(int x, {G<int> f: getFoo}) {
   print(f(x));
 }
diff --git a/tests/compiler/dart2js/deferred_loading/libs/instantiation1_strong_lib2.dart b/tests/compiler/dart2js/deferred_loading/libs/instantiation1_strong_lib2.dart
index ceeda93..4f60650 100644
--- a/tests/compiler/dart2js/deferred_loading/libs/instantiation1_strong_lib2.dart
+++ b/tests/compiler/dart2js/deferred_loading/libs/instantiation1_strong_lib2.dart
@@ -7,7 +7,12 @@
 
 typedef dynamic G<T, S>(T v, S w);
 
-/*element: m:OutputUnit(3, {c})*/
+/*strong.element: m:OutputUnit(3, {c})*/
+/*strongConst.element: m:
+ OutputUnit(3, {c}),
+ constants=[
+  InstantiationConstant([int, int],FunctionConstant(getFoo))=OutputUnit(3, {c})]
+*/
 m(int x, int y, {G<int, int> f: getFoo}) {
   print(f(x, y));
 }
diff --git a/tests/compiler/dart2js/deferred_loading/libs/instantiation2_strong_lib1.dart b/tests/compiler/dart2js/deferred_loading/libs/instantiation2_strong_lib1.dart
index dde24fe..4a7f401 100644
--- a/tests/compiler/dart2js/deferred_loading/libs/instantiation2_strong_lib1.dart
+++ b/tests/compiler/dart2js/deferred_loading/libs/instantiation2_strong_lib1.dart
@@ -7,7 +7,12 @@
 
 typedef dynamic G<T>(T v);
 
-/*element: m:OutputUnit(2, {b})*/
+/*strong.element: m:OutputUnit(2, {b})*/
+/*strongConst.element: m:
+ OutputUnit(2, {b}),
+ constants=[
+  InstantiationConstant([int],FunctionConstant(getFoo))=OutputUnit(2, {b})]
+*/
 m(int x, {G<int> f: getFoo}) {
   print(f(x));
 }
diff --git a/tests/compiler/dart2js/deferred_loading/libs/instantiation2_strong_lib2.dart b/tests/compiler/dart2js/deferred_loading/libs/instantiation2_strong_lib2.dart
index 3dbce0d..6b47d58 100644
--- a/tests/compiler/dart2js/deferred_loading/libs/instantiation2_strong_lib2.dart
+++ b/tests/compiler/dart2js/deferred_loading/libs/instantiation2_strong_lib2.dart
@@ -7,7 +7,12 @@
 
 typedef dynamic G<T>(T v);
 
-/*element: m:OutputUnit(3, {c})*/
+/*strong.element: m:OutputUnit(3, {c})*/
+/*strongConst.element: m:
+ OutputUnit(3, {c}),
+ constants=[
+  InstantiationConstant([int],FunctionConstant(getFoo))=OutputUnit(3, {c})]
+*/
 m(int x, {G<int> f: getFoo}) {
   print(f(x));
 }
diff --git a/tests/compiler/dart2js/deferred_loading/libs/instantiation3_strong_lib1.dart b/tests/compiler/dart2js/deferred_loading/libs/instantiation3_strong_lib1.dart
index a8d70d0..89af87b 100644
--- a/tests/compiler/dart2js/deferred_loading/libs/instantiation3_strong_lib1.dart
+++ b/tests/compiler/dart2js/deferred_loading/libs/instantiation3_strong_lib1.dart
@@ -7,7 +7,11 @@
 
 typedef dynamic G<T>(T v);
 
-/*element: m:OutputUnit(1, {b})*/
+/*strong.element: m:OutputUnit(1, {b})*/
+/*strongConst.element: m:
+ OutputUnit(1, {b}),
+ constants=[FunctionConstant(getFoo)=OutputUnit(1, {b})]
+*/
 m(int x, {G<int> f}) {
   f ??= getFoo;
   print(f(x));
diff --git a/tests/compiler/dart2js/deferred_loading/libs/instantiation4_strong_lib1.dart b/tests/compiler/dart2js/deferred_loading/libs/instantiation4_strong_lib1.dart
index a8d70d0..89af87b 100644
--- a/tests/compiler/dart2js/deferred_loading/libs/instantiation4_strong_lib1.dart
+++ b/tests/compiler/dart2js/deferred_loading/libs/instantiation4_strong_lib1.dart
@@ -7,7 +7,11 @@
 
 typedef dynamic G<T>(T v);
 
-/*element: m:OutputUnit(1, {b})*/
+/*strong.element: m:OutputUnit(1, {b})*/
+/*strongConst.element: m:
+ OutputUnit(1, {b}),
+ constants=[FunctionConstant(getFoo)=OutputUnit(1, {b})]
+*/
 m(int x, {G<int> f}) {
   f ??= getFoo;
   print(f(x));
diff --git a/tests/compiler/dart2js/deferred_loading/libs/instantiation4_strong_lib2.dart b/tests/compiler/dart2js/deferred_loading/libs/instantiation4_strong_lib2.dart
index d70d8a9..3d0891b 100644
--- a/tests/compiler/dart2js/deferred_loading/libs/instantiation4_strong_lib2.dart
+++ b/tests/compiler/dart2js/deferred_loading/libs/instantiation4_strong_lib2.dart
@@ -7,7 +7,11 @@
 
 typedef dynamic G<T, S>(T v, S w);
 
-/*element: m:OutputUnit(3, {c})*/
+/*strong.element: m:OutputUnit(3, {c})*/
+/*strongConst.element: m:
+ OutputUnit(3, {c}),
+ constants=[FunctionConstant(getFoo)=OutputUnit(3, {c})]
+*/
 m(int x, int y, {G<int, int> f}) {
   f ??= getFoo;
   print(f(x, y));
diff --git a/tests/compiler/dart2js/deferred_loading/libs/instantiation5_strong_lib1.dart b/tests/compiler/dart2js/deferred_loading/libs/instantiation5_strong_lib1.dart
index 43ca63d..dd75082 100644
--- a/tests/compiler/dart2js/deferred_loading/libs/instantiation5_strong_lib1.dart
+++ b/tests/compiler/dart2js/deferred_loading/libs/instantiation5_strong_lib1.dart
@@ -7,7 +7,11 @@
 
 typedef dynamic G<T>(T v);
 
-/*element: m:OutputUnit(2, {b})*/
+/*strong.element: m:OutputUnit(2, {b})*/
+/*strongConst.element: m:
+ OutputUnit(2, {b}),
+ constants=[FunctionConstant(getFoo)=OutputUnit(2, {b})]
+*/
 m(int x, {G<int> f}) {
   f ??= getFoo;
   print(f(x));
diff --git a/tests/compiler/dart2js/deferred_loading/libs/instantiation5_strong_lib2.dart b/tests/compiler/dart2js/deferred_loading/libs/instantiation5_strong_lib2.dart
index 31a0995..17a6fdc 100644
--- a/tests/compiler/dart2js/deferred_loading/libs/instantiation5_strong_lib2.dart
+++ b/tests/compiler/dart2js/deferred_loading/libs/instantiation5_strong_lib2.dart
@@ -7,7 +7,11 @@
 
 typedef dynamic G<T>(T v);
 
-/*element: m:OutputUnit(3, {c})*/
+/*strong.element: m:OutputUnit(3, {c})*/
+/*strongConst.element: m:
+ OutputUnit(3, {c}),
+ constants=[FunctionConstant(getFoo)=OutputUnit(3, {c})]
+*/
 m(int x, {G<int> f}) {
   f ??= getFoo;
   print(f(x));
diff --git a/tests/compiler/dart2js/deferred_loading/libs/shared_constant_a.dart b/tests/compiler/dart2js/deferred_loading/libs/shared_constant_a.dart
index 8821616..dc47eae 100644
--- a/tests/compiler/dart2js/deferred_loading/libs/shared_constant_a.dart
+++ b/tests/compiler/dart2js/deferred_loading/libs/shared_constant_a.dart
@@ -4,7 +4,11 @@
 
 import 'shared_constant_shared.dart' deferred as s1;
 
-/*element: doA:OutputUnit(main, {})*/
+/*strong.element: doA:OutputUnit(main, {})*/
+/*strongConst.element: doA:
+ OutputUnit(main, {}),
+ constants=[ConstructedConstant(C())=OutputUnit(1, {s1, s2})]
+*/
 doA() async {
   await s1.loadLibrary();
   return s1.constant;
diff --git a/tests/compiler/dart2js/deferred_loading/libs/shared_constant_b.dart b/tests/compiler/dart2js/deferred_loading/libs/shared_constant_b.dart
index 3e87532..8ec4363 100644
--- a/tests/compiler/dart2js/deferred_loading/libs/shared_constant_b.dart
+++ b/tests/compiler/dart2js/deferred_loading/libs/shared_constant_b.dart
@@ -4,7 +4,11 @@
 
 import 'shared_constant_shared.dart' deferred as s2;
 
-/*element: doB:OutputUnit(main, {})*/
+/*strong.element: doB:OutputUnit(main, {})*/
+/*strongConst.element: doB:
+ OutputUnit(main, {}),
+ constants=[ConstructedConstant(C())=OutputUnit(1, {s1, s2})]
+*/
 doB() async {
   await s2.loadLibrary();
   return s2.constant;
diff --git a/tests/compiler/dart2js/deferred_loading/libs/shared_constant_c.dart b/tests/compiler/dart2js/deferred_loading/libs/shared_constant_c.dart
index b6ce057..5c7759a 100644
--- a/tests/compiler/dart2js/deferred_loading/libs/shared_constant_c.dart
+++ b/tests/compiler/dart2js/deferred_loading/libs/shared_constant_c.dart
@@ -4,7 +4,7 @@
 
 /*class: C:OutputUnit(1, {s1, s2})*/
 class C {
-  /*element: C.:OutputUnit(1, {s1, s2})*/
+  /*strong.element: C.:OutputUnit(1, {s1, s2})*/
   const C();
 
   /*element: C.method:OutputUnit(1, {s1, s2})*/
diff --git a/tests/compiler/dart2js/deferred_loading/libs/shared_constant_shared.dart b/tests/compiler/dart2js/deferred_loading/libs/shared_constant_shared.dart
index c309a75..b29aeba 100644
--- a/tests/compiler/dart2js/deferred_loading/libs/shared_constant_shared.dart
+++ b/tests/compiler/dart2js/deferred_loading/libs/shared_constant_shared.dart
@@ -4,6 +4,6 @@
 
 import 'shared_constant_c.dart';
 
-/*element: constant:OutputUnit(1, {s1, s2})*/
+/*strong.element: constant:OutputUnit(1, {s1, s2})*/
 const constant =
-    /*OutputUnit(1, {s1, s2})*/ const C();
+    /*strong.OutputUnit(1, {s1, s2})*/ const C();
diff --git a/tests/compiler/dart2js/deferred_loading/libs/static_separate_lib1.dart b/tests/compiler/dart2js/deferred_loading/libs/static_separate_lib1.dart
index d95536e..18f9ec3 100644
--- a/tests/compiler/dart2js/deferred_loading/libs/static_separate_lib1.dart
+++ b/tests/compiler/dart2js/deferred_loading/libs/static_separate_lib1.dart
@@ -9,11 +9,15 @@
   /*element: ConstClass.x:OutputUnit(2, {lib1, lib2})*/
   final x;
 
-  /*element: ConstClass.:OutputUnit(2, {lib1, lib2})*/
+  /*strong.element: ConstClass.:OutputUnit(2, {lib1, lib2})*/
   const ConstClass(this.x);
 }
 
-/*element: x:OutputUnit(2, {lib1, lib2})*/
+/*strong.element: x:OutputUnit(2, {lib1, lib2})*/
+/*strongConst.element: x:
+ OutputUnit(2, {lib1, lib2}),
+ constants=[ConstructedConstant(ConstClass(x=ConstructedConstant(ConstClass(x=IntConstant(1)))))=OutputUnit(2, {lib1, lib2})]
+*/
 var x = const ConstClass(const ConstClass(1));
 
 /*class: C:OutputUnit(1, {lib1})*/
@@ -36,7 +40,11 @@
 
 /*class: C1:OutputUnit(main, {})*/
 class C1 {
-  /*element: C1.foo:OutputUnit(3, {lib2})*/
+  /*strong.element: C1.foo:OutputUnit(3, {lib2})*/
+  /*strongConst.element: C1.foo:
+   OutputUnit(3, {lib2}),
+   constants=[MapConstant({})=OutputUnit(3, {lib2})]
+  */
   static var foo = const {};
   var bar = const {};
 }
@@ -55,10 +63,18 @@
 
 /*class: C3:OutputUnit(1, {lib1})*/
 class C3 {
-  /*element: C3.foo:OutputUnit(3, {lib2})*/
+  /*strong.element: C3.foo:OutputUnit(3, {lib2})*/
+  /*strongConst.element: C3.foo:
+   OutputUnit(3, {lib2}),
+   constants=[ConstructedConstant(ConstClass(x=ConstructedConstant(ConstClass(x=IntConstant(1)))))=OutputUnit(2, {lib1, lib2})]
+  */
   static final foo = const ConstClass(const ConstClass(1));
 
-  /*element: C3.bar:OutputUnit(1, {lib1})*/
+  /*strong.element: C3.bar:OutputUnit(1, {lib1})*/
+  /*strongConst.element: C3.bar:
+   OutputUnit(1, {lib1}),
+   constants=[ConstructedConstant(ConstClass(x=ConstructedConstant(ConstClass(x=IntConstant(1)))))=OutputUnit(2, {lib1, lib2})]
+  */
   final bar = const ConstClass(const ConstClass(1));
 
   /*element: C3.:OutputUnit(1, {lib1})*/
@@ -79,8 +95,8 @@
 
 /*class: C5:OutputUnit(1, {lib1})*/
 class C5 {
-  /*element: C5.foo:OutputUnit(3, {lib2})*/
-  static const foo = /*OutputUnit(3, {lib2})*/ const [
+  /*strong.element: C5.foo:OutputUnit(3, {lib2})*/
+  static const foo = /*strong.OutputUnit(3, {lib2})*/ const [
     const {1: 3}
   ];
 
diff --git a/tests/compiler/dart2js/deferred_loading/libs/static_separate_lib2.dart b/tests/compiler/dart2js/deferred_loading/libs/static_separate_lib2.dart
index 4358474..bb0ca27 100644
--- a/tests/compiler/dart2js/deferred_loading/libs/static_separate_lib2.dart
+++ b/tests/compiler/dart2js/deferred_loading/libs/static_separate_lib2.dart
@@ -7,7 +7,13 @@
 import "package:expect/expect.dart";
 import "static_separate_lib1.dart";
 
-/*element: foo:OutputUnit(3, {lib2})*/
+/*strong.element: foo:OutputUnit(3, {lib2})*/
+/*strongConst.element: foo:
+ OutputUnit(3, {lib2}),
+ constants=[
+  ListConstant(<Map<int,int>>[MapConstant(<int, int>{IntConstant(1): IntConstant(3)})])=OutputUnit(3, {lib2}),
+  MapConstant(<int, int>{IntConstant(1): IntConstant(3)})=OutputUnit(3, {lib2})]
+*/
 foo() {
   Expect.equals(1, C.foo());
   Expect.mapEquals({}, C1.foo);
diff --git a/tests/compiler/dart2js/deferred_loading/libs/type_argument_dependency_lib2.dart b/tests/compiler/dart2js/deferred_loading/libs/type_argument_dependency_lib2.dart
index 81e799e..4ed198d 100644
--- a/tests/compiler/dart2js/deferred_loading/libs/type_argument_dependency_lib2.dart
+++ b/tests/compiler/dart2js/deferred_loading/libs/type_argument_dependency_lib2.dart
@@ -2,8 +2,7 @@
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
 
-/*strong.class: A:OutputUnit(main, {})*/
-/*omit.class: A:OutputUnit(main, {})*/
+/*class: A:OutputUnit(main, {})*/
 class A {
   /*element: A.:OutputUnit(1, {c})*/
   A();
diff --git a/tests/compiler/dart2js/deferred_loading/libs/type_arguments_lib1.dart b/tests/compiler/dart2js/deferred_loading/libs/type_arguments_lib1.dart
new file mode 100644
index 0000000..b66d8d2
--- /dev/null
+++ b/tests/compiler/dart2js/deferred_loading/libs/type_arguments_lib1.dart
@@ -0,0 +1,20 @@
+// Copyright (c) 2019, the Dart project authors.  Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+import 'type_arguments_lib3.dart';
+
+/*class: A:OutputUnit(1, {lib1})*/
+class A<T> {
+  /*strong.element: A.:OutputUnit(1, {lib1})*/
+  const A();
+}
+
+/*class: B:OutputUnit(1, {lib1})*/
+class B {}
+
+/*strong.element: field1:OutputUnit(1, {lib1})*/
+const dynamic field1 = /*strong.OutputUnit(1, {lib1})*/ const A<B>();
+
+/*strong.element: field2:OutputUnit(1, {lib1})*/
+const dynamic field2 = /*strong.OutputUnit(1, {lib1})*/ const A<F>();
diff --git a/tests/compiler/dart2js/deferred_loading/libs/type_arguments_lib2.dart b/tests/compiler/dart2js/deferred_loading/libs/type_arguments_lib2.dart
new file mode 100644
index 0000000..12b8c62
--- /dev/null
+++ b/tests/compiler/dart2js/deferred_loading/libs/type_arguments_lib2.dart
@@ -0,0 +1,15 @@
+// Copyright (c) 2019, the Dart project authors.  Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+/*class: C:OutputUnit(main, {})*/
+class C<T> {
+  /*strong.element: C.:OutputUnit(main, {})*/
+  const C();
+}
+
+/*class: D:OutputUnit(main, {})*/
+class D {}
+
+/*strong.element: field:OutputUnit(main, {})*/
+const dynamic field = /*strong.OutputUnit(main, {})*/ const C<D>();
diff --git a/tests/compiler/dart2js/deferred_loading/libs/type_arguments_lib3.dart b/tests/compiler/dart2js/deferred_loading/libs/type_arguments_lib3.dart
new file mode 100644
index 0000000..c280a53
--- /dev/null
+++ b/tests/compiler/dart2js/deferred_loading/libs/type_arguments_lib3.dart
@@ -0,0 +1,15 @@
+// Copyright (c) 2019, the Dart project authors.  Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+/*class: E:OutputUnit(3, {lib3})*/
+class E<T> {
+  /*strong.element: E.:OutputUnit(3, {lib3})*/
+  const E();
+}
+
+/*class: F:OutputUnit(2, {lib1, lib3})*/
+class F {}
+
+/*strong.element: field:OutputUnit(3, {lib3})*/
+const dynamic field = /*strong.OutputUnit(3, {lib3})*/ const E<F>();
diff --git a/tests/compiler/dart2js/end_to_end/data/hello_world.dart b/tests/compiler/dart2js/end_to_end/data/hello_world.dart
new file mode 100644
index 0000000..3e3c4d4
--- /dev/null
+++ b/tests/compiler/dart2js/end_to_end/data/hello_world.dart
@@ -0,0 +1,7 @@
+// Copyright (c) 2019, the Dart project authors.  Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+main() {
+  print("Hello World!");
+}
diff --git a/tests/compiler/dart2js/end_to_end/modular_loader_test.dart b/tests/compiler/dart2js/end_to_end/modular_loader_test.dart
new file mode 100644
index 0000000..b1a1d98
--- /dev/null
+++ b/tests/compiler/dart2js/end_to_end/modular_loader_test.dart
@@ -0,0 +1,136 @@
+// Copyright (c) 2019, the Dart project authors.  Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+import '../helpers/memory_compiler.dart';
+import 'package:async_helper/async_helper.dart';
+import 'package:compiler/src/apiimpl.dart' show CompilerImpl;
+import 'package:compiler/src/common_elements.dart';
+import 'package:compiler/src/elements/entities.dart'
+    show LibraryEntity, ClassEntity;
+import 'package:compiler/src/kernel/dart2js_target.dart';
+import 'package:compiler/src/kernel/loader.dart';
+import 'package:expect/expect.dart';
+import 'package:front_end/src/api_prototype/front_end.dart';
+import 'package:front_end/src/api_prototype/memory_file_system.dart';
+import 'package:front_end/src/api_prototype/standard_file_system.dart';
+import 'package:front_end/src/compute_platform_binaries_location.dart'
+    show computePlatformBinariesLocation;
+import 'package:front_end/src/fasta/kernel/utils.dart' show serializeComponent;
+import 'package:kernel/ast.dart';
+import 'package:kernel/target/targets.dart' show TargetFlags;
+
+/// Test that the compiler can load kernel in modular fragments.
+main() {
+  asyncTest(() async {
+    var aDill = await compileUnit(['a0.dart'], {'a0.dart': sourceA});
+    var bDill = await compileUnit(
+        ['b1.dart'], {'b1.dart': sourceB, 'a.dill': aDill},
+        deps: ['a.dill']);
+    var cDill = await compileUnit(
+        ['c2.dart'], {'c2.dart': sourceC, 'a.dill': aDill, 'b.dill': bDill},
+        deps: ['a.dill', 'b.dill']);
+
+    DiagnosticCollector diagnostics = new DiagnosticCollector();
+    OutputCollector output = new OutputCollector();
+    Uri entryPoint = Uri.parse('memory:c.dill');
+    CompilerImpl compiler = compilerFor(
+        entryPoint: entryPoint,
+        options: ['--dill-dependencies=memory:a.dill,memory:b.dill'],
+        memorySourceFiles: {'a.dill': aDill, 'b.dill': bDill, 'c.dill': cDill},
+        diagnosticHandler: diagnostics,
+        outputProvider: output);
+    await compiler.setupSdk();
+    KernelResult result = await compiler.kernelLoader.load(entryPoint);
+    compiler.frontendStrategy.registerLoadedLibraries(result);
+
+    Expect.equals(0, diagnostics.errors.length);
+    Expect.equals(0, diagnostics.warnings.length);
+
+    ElementEnvironment environment =
+        compiler.frontendStrategy.elementEnvironment;
+    LibraryEntity library = environment.lookupLibrary(toTestUri('b1.dart'));
+    Expect.isNotNull(library);
+    ClassEntity clss = environment.lookupClass(library, 'B1');
+    Expect.isNotNull(clss);
+    var member = environment.lookupClassMember(clss, 'foo');
+    Expect.isNotNull(member);
+  });
+}
+
+/// Generate a component for a modular complation unit.
+Future<List<int>> compileUnit(List<String> inputs, Map<String, dynamic> sources,
+    {List<String> deps: const []}) async {
+  var fs = new MemoryFileSystem(_defaultDir);
+  sources.forEach((name, data) {
+    var entity = fs.entityForUri(toTestUri(name));
+    if (data is String) {
+      entity.writeAsStringSync(data);
+    } else {
+      entity.writeAsBytesSync(data);
+    }
+  });
+  List<Uri> linkedDependencies = [
+    computePlatformBinariesLocation().resolve("dart2js_platform.dill"),
+  ]..addAll(deps.map(toTestUri));
+  fs.entityForUri(toTestUri('.packages')).writeAsStringSync('');
+  var options = new CompilerOptions()
+    ..target = new Dart2jsTarget("dart2js", new TargetFlags())
+    ..fileSystem = new TestFileSystem(fs)
+    ..linkedDependencies = linkedDependencies
+    ..packagesFileUri = toTestUri('.packages');
+  var inputUris = inputs.map(toTestUri).toList();
+  var inputUriSet = inputUris.toSet();
+  var component = await kernelForComponent(inputUris, options);
+  for (var lib in component.libraries) {
+    if (!inputUriSet.contains(lib.importUri)) {
+      component.root.getChildFromUri(lib.importUri).bindTo(lib.reference);
+      lib.computeCanonicalNames();
+    }
+  }
+  return serializeComponent(component,
+      filter: (Library lib) => inputUriSet.contains(lib.importUri));
+}
+
+Uri _defaultDir = Uri.parse('org-dartlang-test:///');
+
+Uri toTestUri(String relativePath) => _defaultDir.resolve(relativePath);
+
+class TestFileSystem implements FileSystem {
+  final MemoryFileSystem memory;
+  final FileSystem physical = StandardFileSystem.instance;
+
+  TestFileSystem(this.memory);
+
+  @override
+  FileSystemEntity entityForUri(Uri uri) {
+    if (uri.scheme == 'file') return physical.entityForUri(uri);
+    return memory.entityForUri(uri);
+  }
+}
+
+const sourceA = '''
+class A0 {
+  StringBuffer buffer = new StringBuffer();
+}
+''';
+
+const sourceB = '''
+import 'a0.dart';
+
+class B1 extends A0 {
+  A0 get foo => null;
+}
+
+A0 createA0() => new A0();
+''';
+
+const sourceC = '''
+import 'b1.dart';
+
+class C2 extends B1 {
+  final foo = createA0();
+}
+
+main() => print(new C2().foo.buffer.toString());
+''';
diff --git a/tests/compiler/dart2js/end_to_end/no_platform_test.dart b/tests/compiler/dart2js/end_to_end/no_platform_test.dart
new file mode 100644
index 0000000..c6c11da
--- /dev/null
+++ b/tests/compiler/dart2js/end_to_end/no_platform_test.dart
@@ -0,0 +1,42 @@
+// Copyright (c) 2019, the Dart project authors.  Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+import 'package:async_helper/async_helper.dart';
+import 'package:expect/expect.dart';
+import 'package:compiler/src/kernel/dart2js_target.dart' show Dart2jsTarget;
+import 'package:kernel/ast.dart' as ir;
+import 'package:kernel/core_types.dart' as ir;
+import 'package:kernel/target/targets.dart' hide DiagnosticReporter;
+import 'package:front_end/src/api_prototype/standard_file_system.dart' as fe;
+import 'package:front_end/src/api_unstable/dart2js.dart' as fe;
+
+main() {
+  runTest(Map<fe.ExperimentalFlag, bool> experimentalFlags) async {
+    fe.InitializedCompilerState initializedCompilerState =
+        fe.initializeCompiler(
+            null,
+            new Dart2jsTarget('dart2js', new TargetFlags()),
+            Uri.base
+                .resolve('sdk/lib/libraries.json'), // librariesSpecificationUri
+            [], // linkedDependencies
+            Uri.base.resolve('.packages'), // packagesFileUri
+            experimentalFlags: experimentalFlags,
+            verify: true);
+    ir.Component component = await fe.compile(
+        initializedCompilerState, false, fe.StandardFileSystem.instance,
+        (fe.DiagnosticMessage message) {
+      message.plainTextFormatted.forEach(print);
+      Expect.notEquals(fe.Severity.error, message.severity);
+    },
+        Uri.base.resolve(
+            'tests/compiler/dart2js/end_to_end/data/hello_world.dart'));
+    Expect.isNotNull(new ir.CoreTypes(component).futureClass);
+  }
+
+  asyncTest(() async {
+    await runTest(const {});
+    await runTest(const {fe.ExperimentalFlag.constantUpdate2018: true});
+    await runTest(const {fe.ExperimentalFlag.spreadCollections: true});
+  });
+}
diff --git a/tests/compiler/dart2js/equivalence/id_equivalence.dart b/tests/compiler/dart2js/equivalence/id_equivalence.dart
index d664020..c6beb4da 100644
--- a/tests/compiler/dart2js/equivalence/id_equivalence.dart
+++ b/tests/compiler/dart2js/equivalence/id_equivalence.dart
@@ -383,8 +383,8 @@
 
   @override
   defaultMember(ir.Member node) {
-    computeForMember(node);
     super.defaultMember(node);
+    computeForMember(node);
   }
 
   @override
diff --git a/tests/compiler/dart2js/equivalence/id_equivalence_helper.dart b/tests/compiler/dart2js/equivalence/id_equivalence_helper.dart
index ba5118a..75f2163 100644
--- a/tests/compiler/dart2js/equivalence/id_equivalence_helper.dart
+++ b/tests/compiler/dart2js/equivalence/id_equivalence_helper.dart
@@ -129,15 +129,12 @@
       .reportErrorMessage(spannable, MessageKind.GENERIC, {'text': message});
 }
 
-/// Display name used for compilation using the new common frontend.
-const String kernelName = 'kernel';
-
 /// Display name used for strong mode compilation using the new common frontend.
 const String strongName = 'strong mode';
 
 /// Display name used for strong mode compilation without implicit checks using
 /// the new common frontend.
-const String trustName = 'strong mode without implicit checks';
+const String omitName = 'strong mode without implicit checks';
 
 /// Compute actual data for all members defined in the program with the
 /// [entryPoint] and [memorySourceFiles].
@@ -421,21 +418,25 @@
         String expected = expectedValue?.toString() ?? '';
         String actual = dataValidator.getText(actualValue);
         int offset = getOffsetFromId(id, uri);
-        String value1 = '${expected}';
-        String value2 = IdValue.idToString(id, '${actual}');
-        annotations
-            .putIfAbsent(offset, () => [])
-            .add(colorizeDiff(value1, ' | ', value2));
+        if (offset != null) {
+          String value1 = '${expected}';
+          String value2 = IdValue.idToString(id, '${actual}');
+          annotations
+              .putIfAbsent(offset, () => [])
+              .add(colorizeDiff(value1, ' | ', value2));
+        }
       }
     });
     expectedMaps[uri].forEach((Id id, IdValue expected) {
       if (!actualMaps[uri].containsKey(id)) {
         int offset = getOffsetFromId(id, uri);
-        String value1 = '${expected}';
-        String value2 = '---';
-        annotations
-            .putIfAbsent(offset, () => [])
-            .add(colorizeDiff(value1, ' | ', value2));
+        if (offset != null) {
+          String value1 = '${expected}';
+          String value2 = '---';
+          annotations
+              .putIfAbsent(offset, () => [])
+              .add(colorizeDiff(value1, ' | ', value2));
+        }
       }
     });
     return withAnnotations(code[uri].sourceCode, annotations);
@@ -444,7 +445,7 @@
   int getOffsetFromId(Id id, Uri uri) {
     return compiler.reporter
         .spanFromSpannable(computeSpannable(elementEnvironment, uri, id))
-        .begin;
+        ?.begin;
   }
 }
 
@@ -530,6 +531,7 @@
     int shards: 1,
     int shardIndex: 0,
     bool testOmit: true,
+    bool testCFEConstants: false,
     void onTest(Uri uri)}) async {
   dataComputer.setup();
 
@@ -579,6 +581,8 @@
     Map<String, MemberAnnotations<IdValue>> expectedMaps = {
       strongMarker: new MemberAnnotations<IdValue>(),
       omitMarker: new MemberAnnotations<IdValue>(),
+      strongConstMarker: new MemberAnnotations<IdValue>(),
+      omitConstMarker: new MemberAnnotations<IdValue>(),
     };
     computeExpectedMap(entryPoint, code[entryPoint], expectedMaps);
     Map<String, String> memorySourceFiles = {
@@ -607,51 +611,79 @@
 
     if (setUpFunction != null) setUpFunction();
 
-    if (skipForStrong.contains(name)) {
-      print('--skipped for kernel (strong mode)----------------------------');
-    } else {
-      print('--from kernel (strong mode)-----------------------------------');
-      List<String> options = new List<String>.from(testOptions);
-      MemberAnnotations<IdValue> annotations = expectedMaps[strongMarker];
-      CompiledData<T> compiledData2 = await computeData(
-          entryPoint, memorySourceFiles, dataComputer,
-          options: options,
-          verbose: verbose,
-          printCode: printCode,
-          testFrontend: testFrontend,
-          forUserLibrariesOnly: forUserLibrariesOnly,
-          globalIds: annotations.globalData.keys);
-      if (await checkCode(strongName, entity.uri, code, annotations,
-          compiledData2, dataComputer.dataValidator,
-          filterActualData: filterActualData,
-          fatalErrors: !testAfterFailures)) {
-        hasFailures = true;
-      }
-    }
-    if (testOmit) {
+    Future runTests({bool useCFEConstants: false}) async {
       if (skipForStrong.contains(name)) {
-        print('--skipped for kernel (strong mode, omit-implicit-checks)------');
+        print('--skipped for kernel (strong mode)----------------------------');
       } else {
-        print('--from kernel (strong mode, omit-implicit-checks)-------------');
-        List<String> options = [
-          Flags.omitImplicitChecks,
-          Flags.laxRuntimeTypeToString
-        ]..addAll(testOptions);
-        MemberAnnotations<IdValue> annotations = expectedMaps[omitMarker];
+        print('--from kernel (strong mode)-----------------------------------');
+        List<String> options = new List<String>.from(testOptions);
+        String marker = strongMarker;
+        if (useCFEConstants) {
+          marker = strongConstMarker;
+          options
+              .add('${Flags.enableLanguageExperiments}=constant-update-2018');
+        } else {
+          options.add(
+              '${Flags.enableLanguageExperiments}=no-constant-update-2018');
+        }
+        MemberAnnotations<IdValue> annotations = expectedMaps[marker];
         CompiledData<T> compiledData2 = await computeData(
             entryPoint, memorySourceFiles, dataComputer,
             options: options,
             verbose: verbose,
+            printCode: printCode,
             testFrontend: testFrontend,
             forUserLibrariesOnly: forUserLibrariesOnly,
             globalIds: annotations.globalData.keys);
-        if (await checkCode(trustName, entity.uri, code, annotations,
+        if (await checkCode(strongName, entity.uri, code, annotations,
             compiledData2, dataComputer.dataValidator,
             filterActualData: filterActualData,
             fatalErrors: !testAfterFailures)) {
           hasFailures = true;
         }
       }
+      if (testOmit) {
+        if (skipForStrong.contains(name)) {
+          print(
+              '--skipped for kernel (strong mode, omit-implicit-checks)------');
+        } else {
+          print(
+              '--from kernel (strong mode, omit-implicit-checks)-------------');
+          List<String> options = [
+            Flags.omitImplicitChecks,
+            Flags.laxRuntimeTypeToString
+          ]..addAll(testOptions);
+          String marker = omitMarker;
+          if (useCFEConstants) {
+            marker = omitConstMarker;
+            options
+                .add('${Flags.enableLanguageExperiments}=constant-update-2018');
+          } else {
+            options.add(
+                '${Flags.enableLanguageExperiments}=no-constant-update-2018');
+          }
+          MemberAnnotations<IdValue> annotations = expectedMaps[marker];
+          CompiledData<T> compiledData2 = await computeData(
+              entryPoint, memorySourceFiles, dataComputer,
+              options: options,
+              verbose: verbose,
+              testFrontend: testFrontend,
+              forUserLibrariesOnly: forUserLibrariesOnly,
+              globalIds: annotations.globalData.keys);
+          if (await checkCode(omitName, entity.uri, code, annotations,
+              compiledData2, dataComputer.dataValidator,
+              filterActualData: filterActualData,
+              fatalErrors: !testAfterFailures)) {
+            hasFailures = true;
+          }
+        }
+      }
+    }
+
+    await runTests();
+    if (testCFEConstants) {
+      print('--use cfe constants---------------------------------------------');
+      await runTests(useCFEConstants: true);
     }
   }
   Expect.isFalse(hasFailures, 'Errors found.');
@@ -926,10 +958,11 @@
     }
     LibraryEntity library = elementEnvironment.lookupLibrary(mainUri);
     if (id.className != null) {
-      ClassEntity cls =
-          elementEnvironment.lookupClass(library, id.className, required: true);
+      ClassEntity cls = elementEnvironment.lookupClass(library, id.className);
       if (cls == null) {
-        throw new ArgumentError("No class '${id.className}' in $mainUri.");
+        // Constant expression in CFE might remove inlined parts of sources.
+        print("No class '${id.className}' in $mainUri.");
+        return NO_LOCATION_SPANNABLE;
       }
       MemberEntity member = elementEnvironment
           .lookupClassMember(cls, memberName, setter: isSetter);
@@ -937,7 +970,9 @@
         ConstructorEntity constructor =
             elementEnvironment.lookupConstructor(cls, memberName);
         if (constructor == null) {
-          throw new ArgumentError("No class member '${memberName}' in $cls.");
+          // Constant expression in CFE might remove inlined parts of sources.
+          print("No class member '${memberName}' in $cls.");
+          return NO_LOCATION_SPANNABLE;
         }
         return constructor;
       }
@@ -946,16 +981,19 @@
       MemberEntity member = elementEnvironment
           .lookupLibraryMember(library, memberName, setter: isSetter);
       if (member == null) {
-        throw new ArgumentError("No member '${memberName}' in $mainUri.");
+        // Constant expression in CFE might remove inlined parts of sources.
+        print("No member '${memberName}' in $mainUri.");
+        return NO_LOCATION_SPANNABLE;
       }
       return member;
     }
   } else if (id is ClassId) {
     LibraryEntity library = elementEnvironment.lookupLibrary(mainUri);
-    ClassEntity cls =
-        elementEnvironment.lookupClass(library, id.className, required: true);
+    ClassEntity cls = elementEnvironment.lookupClass(library, id.className);
     if (cls == null) {
-      throw new ArgumentError("No class '${id.className}' in $mainUri.");
+      // Constant expression in CFE might remove inlined parts of sources.
+      print("No class '${id.className}' in $mainUri.");
+      return NO_LOCATION_SPANNABLE;
     }
     return cls;
   }
@@ -964,6 +1002,8 @@
 
 const String strongMarker = 'strong.';
 const String omitMarker = 'omit.';
+const String strongConstMarker = 'strongConst.';
+const String omitConstMarker = 'omitConst.';
 
 /// Compute three [MemberAnnotations] objects from [code] specifying the
 /// expected annotations we anticipate encountering; one corresponding to the
@@ -980,7 +1020,7 @@
 /// annotations without prefixes.
 void computeExpectedMap(Uri sourceUri, AnnotatedCode code,
     Map<String, MemberAnnotations<IdValue>> maps) {
-  List<String> mapKeys = [strongMarker, omitMarker];
+  List<String> mapKeys = maps.keys.toList();
   Map<String, AnnotatedCode> split = splitByPrefixes(code, mapKeys);
 
   split.forEach((String marker, AnnotatedCode code) {
diff --git a/tests/compiler/dart2js/field_analysis/jdata/effectively_constant_state.dart b/tests/compiler/dart2js/field_analysis/jdata/effectively_constant_state.dart
index b2eb74d..27a4a61 100644
--- a/tests/compiler/dart2js/field_analysis/jdata/effectively_constant_state.dart
+++ b/tests/compiler/dart2js/field_analysis/jdata/effectively_constant_state.dart
@@ -3,13 +3,13 @@
 // BSD-style license that can be found in the LICENSE file.
 
 enum Enum {
-  /*element: Enum.a:constant=ConstructedConstant(Enum(_name=StringConstant("Enum.a"),index=IntConstant(0)))*/
+  /*strong.element: Enum.a:constant=ConstructedConstant(Enum(_name=StringConstant("Enum.a"),index=IntConstant(0)))*/
   a,
 
-  /*element: Enum.b:constant=ConstructedConstant(Enum(_name=StringConstant("Enum.b"),index=IntConstant(1)))*/
+  /*strong.element: Enum.b:constant=ConstructedConstant(Enum(_name=StringConstant("Enum.b"),index=IntConstant(1)))*/
   b,
 
-  /*element: Enum.c:constant=ConstructedConstant(Enum(_name=StringConstant("Enum.c"),index=IntConstant(2)))*/
+  /*strong.element: Enum.c:constant=ConstructedConstant(Enum(_name=StringConstant("Enum.c"),index=IntConstant(2)))*/
   c,
 }
 
diff --git a/tests/compiler/dart2js/field_analysis/jdata/simple_initializers.dart b/tests/compiler/dart2js/field_analysis/jdata/simple_initializers.dart
index f7fd886..a04f242 100644
--- a/tests/compiler/dart2js/field_analysis/jdata/simple_initializers.dart
+++ b/tests/compiler/dart2js/field_analysis/jdata/simple_initializers.dart
@@ -113,7 +113,7 @@
   use(c2.field13b);
 }
 
-/*element: const1:constant=BoolConstant(true)*/
+/*strong.element: const1:constant=BoolConstant(true)*/
 const bool const1 = true;
 
 class Class1 {
diff --git a/tests/compiler/dart2js/field_analysis/jdata/static_initializers.dart b/tests/compiler/dart2js/field_analysis/jdata/static_initializers.dart
index 4e0c97f..deb273c 100644
--- a/tests/compiler/dart2js/field_analysis/jdata/static_initializers.dart
+++ b/tests/compiler/dart2js/field_analysis/jdata/static_initializers.dart
@@ -134,7 +134,7 @@
 /*element: field4b:constant=IntConstant(5)*/
 var field4b = 2 + 3;
 
-/*element: field4c:constant=IntConstant(5)*/
+/*strong.element: field4c:constant=IntConstant(5)*/
 const field4c = 2 + 3;
 
 /*element: field5a:constant=FunctionConstant(method)*/
@@ -143,7 +143,7 @@
 /*element: field5b:constant=FunctionConstant(method)*/
 var field5b = method;
 
-/*element: field5c:constant=FunctionConstant(method)*/
+/*strong.element: field5c:constant=FunctionConstant(method)*/
 const field5c = method;
 
 /*element: field6a:constant=ConstructedConstant(Class())*/
diff --git a/tests/compiler/dart2js/field_analysis/jfield_analysis_test.dart b/tests/compiler/dart2js/field_analysis/jfield_analysis_test.dart
index 09870a6..79b4cb0 100644
--- a/tests/compiler/dart2js/field_analysis/jfield_analysis_test.dart
+++ b/tests/compiler/dart2js/field_analysis/jfield_analysis_test.dart
@@ -18,7 +18,7 @@
   asyncTest(() async {
     Directory dataDir = new Directory.fromUri(Platform.script.resolve('jdata'));
     await checkTests(dataDir, const JAllocatorAnalysisDataComputer(),
-        args: args, testOmit: false);
+        args: args, testOmit: false, testCFEConstants: true);
   });
 }
 
diff --git a/tests/compiler/dart2js/field_analysis/kdata/simple_initializers.dart b/tests/compiler/dart2js/field_analysis/kdata/simple_initializers.dart
index 8bf8e47..f6bff5f 100644
--- a/tests/compiler/dart2js/field_analysis/kdata/simple_initializers.dart
+++ b/tests/compiler/dart2js/field_analysis/kdata/simple_initializers.dart
@@ -7,7 +7,7 @@
   new Class2();
 }
 
-/*element: const1:complexity=constant,initial=BoolConstant(true)*/
+/*strong.element: const1:complexity=constant,initial=BoolConstant(true)*/
 const bool const1 = true;
 
 class Class1 {
diff --git a/tests/compiler/dart2js/field_analysis/kdata/static_initializers.dart b/tests/compiler/dart2js/field_analysis/kdata/static_initializers.dart
index 6f393ef..4096f9e 100644
--- a/tests/compiler/dart2js/field_analysis/kdata/static_initializers.dart
+++ b/tests/compiler/dart2js/field_analysis/kdata/static_initializers.dart
@@ -65,7 +65,7 @@
 /*element: field1b:complexity=constant,initial=IntConstant(0)*/
 var field1b = 0;
 
-/*element: field1c:complexity=constant,initial=IntConstant(0)*/
+/*strong.element: field1c:complexity=constant,initial=IntConstant(0)*/
 const field1c = 0;
 
 /*element: field2a:complexity=constant,initial=ListConstant([])*/
@@ -74,7 +74,7 @@
 /*element: field2b:complexity=constant,initial=ListConstant([])*/
 var field2b = const [];
 
-/*element: field2c:complexity=constant,initial=ListConstant([])*/
+/*strong.element: field2c:complexity=constant,initial=ListConstant([])*/
 const field2c = const [];
 
 /*element: field3a:complexity=eager*/
@@ -125,7 +125,7 @@
 /*element: field4b:complexity=lazy,initial=IntConstant(5)*/
 var field4b = 2 + 3;
 
-/*element: field4c:complexity=lazy,initial=IntConstant(5)*/
+/*strong.element: field4c:complexity=lazy,initial=IntConstant(5)*/
 const field4c = 2 + 3;
 
 /*element: field5a:complexity=constant,initial=FunctionConstant(method)*/
@@ -134,7 +134,7 @@
 /*element: field5b:complexity=constant,initial=FunctionConstant(method)*/
 var field5b = method;
 
-/*element: field5c:complexity=constant,initial=FunctionConstant(method)*/
+/*strong.element: field5c:complexity=constant,initial=FunctionConstant(method)*/
 const field5c = method;
 
 /*element: field6a:complexity=constant,initial=ConstructedConstant(Class())*/
diff --git a/tests/compiler/dart2js/field_analysis/kfield_analysis_test.dart b/tests/compiler/dart2js/field_analysis/kfield_analysis_test.dart
index dbcfcfd..559810d 100644
--- a/tests/compiler/dart2js/field_analysis/kfield_analysis_test.dart
+++ b/tests/compiler/dart2js/field_analysis/kfield_analysis_test.dart
@@ -18,7 +18,10 @@
   asyncTest(() async {
     Directory dataDir = new Directory.fromUri(Platform.script.resolve('kdata'));
     await checkTests(dataDir, const KAllocatorAnalysisDataComputer(),
-        args: args, testOmit: false, testFrontend: true);
+        args: args,
+        testOmit: false,
+        testFrontend: true,
+        testCFEConstants: true);
   });
 }
 
diff --git a/tests/compiler/dart2js/helpers/memory_compiler.dart b/tests/compiler/dart2js/helpers/memory_compiler.dart
index ce4eda7..4f7b01f 100644
--- a/tests/compiler/dart2js/helpers/memory_compiler.dart
+++ b/tests/compiler/dart2js/helpers/memory_compiler.dart
@@ -15,8 +15,6 @@
 import 'package:compiler/src/options.dart' show CompilerOptions;
 
 import 'package:front_end/src/api_unstable/dart2js.dart' as fe;
-import 'package:front_end/src/compute_platform_binaries_location.dart'
-    show computePlatformBinariesLocation;
 
 import 'memory_source_file_helper.dart';
 
@@ -111,7 +109,6 @@
     Uri packageConfig}) {
   retainDataForTesting = true;
   librariesSpecificationUri ??= Uri.base.resolve('sdk/lib/libraries.json');
-  Uri platformBinaries = computePlatformBinariesLocation();
 
   if (packageRoot == null && packageConfig == null) {
     if (Platform.packageConfig != null) {
@@ -134,8 +131,7 @@
   }
 
   CompilerOptions compilerOptions = CompilerOptions.parse(options,
-      librariesSpecificationUri: librariesSpecificationUri,
-      platformBinaries: platformBinaries)
+      librariesSpecificationUri: librariesSpecificationUri)
     ..entryPoint = entryPoint
     ..packageRoot = packageRoot
     ..environment = {}
diff --git a/tests/compiler/dart2js/helpers/program_lookup.dart b/tests/compiler/dart2js/helpers/program_lookup.dart
index 18d8e84..f4ce6d9e 100644
--- a/tests/compiler/dart2js/helpers/program_lookup.dart
+++ b/tests/compiler/dart2js/helpers/program_lookup.dart
@@ -5,6 +5,7 @@
 import 'package:expect/expect.dart';
 import 'package:compiler/src/common_elements.dart';
 import 'package:compiler/src/compiler.dart';
+import 'package:compiler/src/deferred_load.dart';
 import 'package:compiler/src/elements/entities.dart';
 import 'package:compiler/src/js_backend/namer.dart';
 import 'package:compiler/src/js_emitter/model.dart';
@@ -45,6 +46,15 @@
       : this.program = compiler.backend.emitter.emitter.programForTesting,
         this.namer = compiler.backend.namer;
 
+  Fragment getFragment(OutputUnit outputUnit) {
+    for (Fragment fragment in program.fragments) {
+      if (fragment.outputUnit == outputUnit) {
+        return fragment;
+      }
+    }
+    return null;
+  }
+
   Map<LibraryEntity, LibraryData> libraryMap;
 
   LibraryData getLibraryData(LibraryEntity element) {
diff --git a/tests/compiler/dart2js/impact/data/async.dart b/tests/compiler/dart2js/impact/data/async.dart
index b8cb04a..69792ef 100644
--- a/tests/compiler/dart2js/impact/data/async.dart
+++ b/tests/compiler/dart2js/impact/data/async.dart
@@ -64,7 +64,7 @@
 */
 testAsyncStar() async* {}
 
-/*strong.element: testLocalSyncStar:
+/*element: testLocalSyncStar:
  static=[
   _IterationMarker.endOfIteration(0),
   _IterationMarker.uncaughtError(1),
@@ -88,7 +88,7 @@
   return local;
 }
 
-/*strong.element: testLocalAsync:
+/*element: testLocalAsync:
  static=[
   StreamIterator.(1),
   _asyncAwait(2),
@@ -115,7 +115,7 @@
   return local;
 }
 
-/*strong.element: testLocalAsyncStar:
+/*element: testLocalAsyncStar:
  static=[
   StreamIterator.(1),
   _IterationMarker.yieldSingle(1),
@@ -142,7 +142,7 @@
   return local;
 }
 
-/*strong.element: testAnonymousSyncStar:
+/*element: testAnonymousSyncStar:
  static=[
   _IterationMarker.endOfIteration(0),
   _IterationMarker.uncaughtError(1),
@@ -165,7 +165,7 @@
   return () sync* {};
 }
 
-/*strong.element: testAnonymousAsync:
+/*element: testAnonymousAsync:
  static=[
   StreamIterator.(1),
   _asyncAwait(2),
@@ -191,7 +191,7 @@
   return () async {};
 }
 
-/*strong.element: testAnonymousAsyncStar:
+/*element: testAnonymousAsyncStar:
  static=[
   StreamIterator.(1),
   _IterationMarker.yieldSingle(1),
@@ -217,7 +217,7 @@
   return () async* {};
 }
 
-/*strong.element: testAsyncForIn:
+/*element: testAsyncForIn:
  dynamic=[
   cancel(0),
   current,
@@ -241,7 +241,7 @@
   await for (var e in o) {}
 }
 
-/*strong.element: testAsyncForInTyped:
+/*element: testAsyncForInTyped:
  dynamic=[
   cancel(0),
   current,
diff --git a/tests/compiler/dart2js/impact/data/classes.dart b/tests/compiler/dart2js/impact/data/classes.dart
index ca5fc71..c7f1e97 100644
--- a/tests/compiler/dart2js/impact/data/classes.dart
+++ b/tests/compiler/dart2js/impact/data/classes.dart
@@ -137,7 +137,7 @@
 testForwardingConstructor() => new ForwardingConstructorClass(null);
 
 class ForwardingConstructorTypedSuperClass {
-  /*strong.element: ForwardingConstructorTypedSuperClass.:
+  /*element: ForwardingConstructorTypedSuperClass.:
    static=[Object.(0)],
    type=[inst:JSBool,param:int]
   */
@@ -154,7 +154,7 @@
 testForwardingConstructorTyped() => new ForwardingConstructorTypedClass(null);
 
 class ForwardingConstructorGenericSuperClass<T> {
-  /*strong.element: ForwardingConstructorGenericSuperClass.:
+  /*element: ForwardingConstructorGenericSuperClass.:
    static=[
     Object.(0),
     checkSubtype(4),
@@ -206,10 +206,11 @@
   A
 }
 
-/*element: testEnum:static=[Enum.A]*/
+/*strong.element: testEnum:static=[Enum.A]*/
+/*strongConst.element: testEnum:static=[init:Enum._name,init:Enum.index],type=[const:Enum,inst:JSDouble,inst:JSInt,inst:JSNumber,inst:JSPositiveInt,inst:JSString,inst:JSUInt31,inst:JSUInt32]*/
 testEnum() => Enum.A;
 
-/*strong.element: staticGenericMethod:
+/*element: staticGenericMethod:
  static=[
   checkSubtype(4),
   checkSubtypeOfRuntimeType(2),
@@ -231,7 +232,7 @@
 */
 List<T> staticGenericMethod<T>(T arg) => [arg];
 
-/*strong.element: testStaticGenericMethod:
+/*element: testStaticGenericMethod:
   static=[staticGenericMethod<bool>(1)],
   type=[inst:JSBool]
 */
@@ -239,7 +240,7 @@
   staticGenericMethod<bool>(true);
 }
 
-/*strong.element: testInstanceGenericMethod:
+/*element: testInstanceGenericMethod:
  dynamic=[exact:GenericClass.genericMethod<bool>(1)],
  static=[
   GenericClass.generative(0),
@@ -255,7 +256,7 @@
   // ignore: UNUSED_FIELD
   final _field;
 
-  /*strong.element: AbstractClass.:type=[inst:JSNull]*/
+  /*element: AbstractClass.:type=[inst:JSNull]*/
   factory AbstractClass() => null;
 }
 
@@ -292,7 +293,7 @@
 class GenericClass<X, Y> {
   const GenericClass.generative();
 
-  /*strong.element: GenericClass.genericMethod:
+  /*element: GenericClass.genericMethod:
    static=[
     checkSubtype(4),
     checkSubtypeOfRuntimeType(2),
diff --git a/tests/compiler/dart2js/impact/data/constants.dart b/tests/compiler/dart2js/impact/data/constants.dart
new file mode 100644
index 0000000..91feb99
--- /dev/null
+++ b/tests/compiler/dart2js/impact/data/constants.dart
@@ -0,0 +1,255 @@
+// Copyright (c) 2019, the Dart project authors.  Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+import '../libs/constants_lib.dart';
+import '../libs/constants_lib.dart' deferred as defer;
+
+/*element: main:static=**/
+main() {
+  nullLiteral();
+  boolLiteral();
+  intLiteral();
+  doubleLiteral();
+  stringLiteral();
+  symbolLiteral();
+  listLiteral();
+  mapLiteral();
+  stringMapLiteral();
+  setLiteral();
+  instanceConstant();
+  typeLiteral();
+  instantiation();
+  topLevelTearOff();
+  staticTearOff();
+
+  nullLiteralRef();
+  boolLiteralRef();
+  intLiteralRef();
+  doubleLiteralRef();
+  stringLiteralRef();
+  symbolLiteralRef();
+  listLiteralRef();
+  mapLiteralRef();
+  stringMapLiteralRef();
+  setLiteralRef();
+  instanceConstantRef();
+  typeLiteralRef();
+  instantiationRef();
+  topLevelTearOffRef();
+  staticTearOffRef();
+
+  nullLiteralDeferred();
+  boolLiteralDeferred();
+  intLiteralDeferred();
+  doubleLiteralDeferred();
+  stringLiteralDeferred();
+  symbolLiteralDeferred();
+  listLiteralDeferred();
+  mapLiteralDeferred();
+  stringMapLiteralDeferred();
+  setLiteralDeferred();
+  instanceConstantDeferred();
+  typeLiteralDeferred();
+  instantiationDeferred();
+  topLevelTearOffDeferred();
+  staticTearOffDeferred();
+}
+
+/*element: nullLiteral:type=[inst:JSNull]*/
+nullLiteral() {
+  const dynamic local = null;
+  return local;
+}
+
+/*element: boolLiteral:type=[inst:JSBool]*/
+boolLiteral() {
+  const dynamic local = true;
+  return local;
+}
+
+/*element: intLiteral:type=[inst:JSDouble,inst:JSInt,inst:JSNumber,inst:JSPositiveInt,inst:JSUInt31,inst:JSUInt32]*/
+intLiteral() {
+  const dynamic local = 42;
+  return local;
+}
+
+/*element: doubleLiteral:type=[inst:JSDouble,inst:JSInt,inst:JSNumber,inst:JSPositiveInt,inst:JSUInt31,inst:JSUInt32]*/
+doubleLiteral() {
+  const dynamic local = 0.5;
+  return local;
+}
+
+/*element: stringLiteral:type=[inst:JSString]*/
+stringLiteral() {
+  const dynamic local = "foo";
+  return local;
+}
+
+/*element: symbolLiteral:static=[Symbol.(1)],type=[inst:Symbol]*/
+symbolLiteral() => #foo;
+
+/*element: listLiteral:type=[inst:JSBool,inst:List<bool>]*/
+listLiteral() => const [true, false];
+
+/*element: mapLiteral:type=[inst:ConstantMap<dynamic,dynamic>,inst:ConstantProtoMap<dynamic,dynamic>,inst:ConstantStringMap<dynamic,dynamic>,inst:GeneralConstantMap<dynamic,dynamic>,inst:JSBool]*/
+mapLiteral() => const {true: false};
+
+/*element: stringMapLiteral:type=[inst:ConstantMap<dynamic,dynamic>,inst:ConstantProtoMap<dynamic,dynamic>,inst:ConstantStringMap<dynamic,dynamic>,inst:GeneralConstantMap<dynamic,dynamic>,inst:JSBool,inst:JSString]*/
+stringMapLiteral() => const {'foo': false};
+
+/*element: setLiteral:type=[inst:ConstantMap<dynamic,dynamic>,inst:ConstantProtoMap<dynamic,dynamic>,inst:ConstantStringMap<dynamic,dynamic>,inst:GeneralConstantMap<dynamic,dynamic>,inst:JSBool,inst:_UnmodifiableSet<dynamic>]*/
+setLiteral() => const {true, false};
+
+/*strong.element: instanceConstant:static=[Class.(2)],type=[inst:JSBool]*/
+/*strongConst.element: instanceConstant:static=[init:Class.field2,init:SuperClass.field1],type=[const:Class,inst:JSBool]*/
+instanceConstant() => const Class(true, false);
+
+/*element: typeLiteral:static=[createRuntimeType(1)],type=[inst:Type,inst:TypeImpl,lit:String]*/
+typeLiteral() {
+  const dynamic local = String;
+  return local;
+}
+
+/*element: instantiation:static=[extractFunctionTypeObjectFromInternal(1),id,instantiate1(1),instantiatedGenericFunctionType(2)],type=[inst:Instantiation1<dynamic>]*/
+instantiation() {
+  const int Function(int) local = id;
+  return local;
+}
+
+/*element: topLevelTearOff:static=[topLevelMethod]*/
+topLevelTearOff() {
+  const dynamic local = topLevelMethod;
+  return local;
+}
+
+/*element: staticTearOff:static=[Class.staticMethodField]*/
+staticTearOff() {
+  const dynamic local = Class.staticMethodField;
+  return local;
+}
+
+/*strong.element: nullLiteralRef:static=[nullLiteralField]*/
+/*strongConst.element: nullLiteralRef:type=[inst:JSNull]*/
+nullLiteralRef() => nullLiteralField;
+
+/*strong.element: boolLiteralRef:static=[boolLiteralField]*/
+/*strongConst.element: boolLiteralRef:type=[inst:JSBool]*/
+boolLiteralRef() => boolLiteralField;
+
+/*strong.element: intLiteralRef:static=[intLiteralField]*/
+/*strongConst.element: intLiteralRef:type=[inst:JSDouble,inst:JSInt,inst:JSNumber,inst:JSPositiveInt,inst:JSUInt31,inst:JSUInt32]*/
+intLiteralRef() => intLiteralField;
+
+/*strong.element: doubleLiteralRef:static=[doubleLiteralField]*/
+/*strongConst.element: doubleLiteralRef:type=[inst:JSDouble,inst:JSInt,inst:JSNumber,inst:JSPositiveInt,inst:JSUInt31,inst:JSUInt32]*/
+doubleLiteralRef() => doubleLiteralField;
+
+/*strong.element: stringLiteralRef:static=[stringLiteralField]*/
+/*strongConst.element: stringLiteralRef:type=[inst:JSString]*/
+stringLiteralRef() => stringLiteralField;
+
+/*strong.element: symbolLiteralRef:static=[symbolLiteralField]*/
+/*strongConst.element: symbolLiteralRef:static=[Symbol.(1)],type=[inst:Symbol]*/
+symbolLiteralRef() => symbolLiteralField;
+
+/*strong.element: listLiteralRef:static=[listLiteralField]*/
+/*strongConst.element: listLiteralRef:type=[inst:JSBool,inst:List<bool>]*/
+listLiteralRef() => listLiteralField;
+
+/*strong.element: mapLiteralRef:static=[mapLiteralField]*/
+/*strongConst.element: mapLiteralRef:type=[inst:ConstantMap<dynamic,dynamic>,inst:ConstantProtoMap<dynamic,dynamic>,inst:ConstantStringMap<dynamic,dynamic>,inst:GeneralConstantMap<dynamic,dynamic>,inst:JSBool]*/
+mapLiteralRef() => mapLiteralField;
+
+/*strong.element: stringMapLiteralRef:static=[stringMapLiteralField]*/
+/*strongConst.element: stringMapLiteralRef:type=[inst:ConstantMap<dynamic,dynamic>,inst:ConstantProtoMap<dynamic,dynamic>,inst:ConstantStringMap<dynamic,dynamic>,inst:GeneralConstantMap<dynamic,dynamic>,inst:JSBool,inst:JSString]*/
+stringMapLiteralRef() => stringMapLiteralField;
+
+/*strong.element: setLiteralRef:static=[setLiteralField]*/
+/*strongConst.element: setLiteralRef:type=[inst:ConstantMap<dynamic,dynamic>,inst:ConstantProtoMap<dynamic,dynamic>,inst:ConstantStringMap<dynamic,dynamic>,inst:GeneralConstantMap<dynamic,dynamic>,inst:JSBool,inst:_UnmodifiableSet<dynamic>]*/
+setLiteralRef() => setLiteralField;
+
+/*strong.element: instanceConstantRef:static=[instanceConstantField]*/
+/*strongConst.element: instanceConstantRef:static=[init:Class.field2,init:SuperClass.field1],type=[const:Class,inst:JSBool]*/
+instanceConstantRef() => instanceConstantField;
+
+/*strong.element: typeLiteralRef:static=[typeLiteralField]*/
+/*strongConst.element: typeLiteralRef:static=[createRuntimeType(1)],type=[inst:Type,inst:TypeImpl,lit:String]*/
+typeLiteralRef() => typeLiteralField;
+
+/*strong.element: instantiationRef:static=[instantiationField]*/
+/*strongConst.element: instantiationRef:static=[extractFunctionTypeObjectFromInternal(1),id,instantiate1(1),instantiatedGenericFunctionType(2)],type=[inst:Instantiation1<dynamic>]*/
+instantiationRef() => instantiationField;
+
+/*strong.element: topLevelTearOffRef:static=[topLevelTearOffField]*/
+/*strongConst.element: topLevelTearOffRef:static=[topLevelMethod]*/
+topLevelTearOffRef() => topLevelTearOffField;
+
+/*strong.element: staticTearOffRef:static=[staticTearOffField]*/
+/*strongConst.element: staticTearOffRef:static=[Class.staticMethodField]*/
+staticTearOffRef() => staticTearOffField;
+
+/*strong.element: nullLiteralDeferred:static=[nullLiteralField{defer}]*/
+/*strongConst.element: nullLiteralDeferred:type=[inst:JSNull]*/
+nullLiteralDeferred() => defer.nullLiteralField;
+
+/*strong.element: boolLiteralDeferred:static=[boolLiteralField{defer}]*/
+/*strongConst.element: boolLiteralDeferred:type=[inst:JSBool]*/
+boolLiteralDeferred() => defer.boolLiteralField;
+
+/*strong.element: intLiteralDeferred:static=[intLiteralField{defer}]*/
+/*strongConst.element: intLiteralDeferred:type=[inst:JSDouble,inst:JSInt,inst:JSNumber,inst:JSPositiveInt,inst:JSUInt31,inst:JSUInt32]*/
+intLiteralDeferred() => defer.intLiteralField;
+
+/*strong.element: doubleLiteralDeferred:static=[doubleLiteralField{defer}]*/
+/*strongConst.element: doubleLiteralDeferred:type=[inst:JSDouble,inst:JSInt,inst:JSNumber,inst:JSPositiveInt,inst:JSUInt31,inst:JSUInt32]*/
+doubleLiteralDeferred() => defer.doubleLiteralField;
+
+/*strong.element: stringLiteralDeferred:static=[stringLiteralField{defer}]*/
+/*strongConst.element: stringLiteralDeferred:type=[inst:JSString]*/
+stringLiteralDeferred() => defer.stringLiteralField;
+
+/*strong.element: symbolLiteralDeferred:static=[symbolLiteralField{defer}]*/
+// TODO(johnniwinther): Should we record that this is deferred?
+/*strongConst.element: symbolLiteralDeferred:static=[Symbol.(1)],type=[inst:Symbol]*/
+symbolLiteralDeferred() => defer.symbolLiteralField;
+
+/*strong.element: listLiteralDeferred:static=[listLiteralField{defer}]*/
+// TODO(johnniwinther): Should we record that this is deferred?
+/*strongConst.element: listLiteralDeferred:type=[inst:JSBool,inst:List<bool>]*/
+listLiteralDeferred() => defer.listLiteralField;
+
+/*strong.element: mapLiteralDeferred:static=[mapLiteralField{defer}]*/
+// TODO(johnniwinther): Should we record that this is deferred?
+/*strongConst.element: mapLiteralDeferred:type=[inst:ConstantMap<dynamic,dynamic>,inst:ConstantProtoMap<dynamic,dynamic>,inst:ConstantStringMap<dynamic,dynamic>,inst:GeneralConstantMap<dynamic,dynamic>,inst:JSBool]*/
+mapLiteralDeferred() => defer.mapLiteralField;
+
+/*strong.element: stringMapLiteralDeferred:static=[stringMapLiteralField{defer}]*/
+// TODO(johnniwinther): Should we record that this is deferred?
+/*strongConst.element: stringMapLiteralDeferred:type=[inst:ConstantMap<dynamic,dynamic>,inst:ConstantProtoMap<dynamic,dynamic>,inst:ConstantStringMap<dynamic,dynamic>,inst:GeneralConstantMap<dynamic,dynamic>,inst:JSBool,inst:JSString]*/
+stringMapLiteralDeferred() => defer.stringMapLiteralField;
+
+/*strong.element: setLiteralDeferred:static=[setLiteralField{defer}]*/
+// TODO(johnniwinther): Should we record that this is deferred?
+/*strongConst.element: setLiteralDeferred:type=[inst:ConstantMap<dynamic,dynamic>,inst:ConstantProtoMap<dynamic,dynamic>,inst:ConstantStringMap<dynamic,dynamic>,inst:GeneralConstantMap<dynamic,dynamic>,inst:JSBool,inst:_UnmodifiableSet<dynamic>]*/
+setLiteralDeferred() => defer.setLiteralField;
+
+/*strong.element: instanceConstantDeferred:static=[instanceConstantField{defer}]*/
+/*strongConst.element: instanceConstantDeferred:static=[init:Class.field2,init:SuperClass.field1],type=[const:Class{defer},inst:JSBool]*/
+instanceConstantDeferred() => defer.instanceConstantField;
+
+/*strong.element: typeLiteralDeferred:static=[typeLiteralField{defer}]*/
+/*strongConst.element: typeLiteralDeferred:static=[createRuntimeType(1)],type=[inst:Type,inst:TypeImpl,lit:String{defer}]*/
+typeLiteralDeferred() => defer.typeLiteralField;
+
+/*strong.element: instantiationDeferred:static=[instantiationField{defer}]*/
+/*strongConst.element: instantiationDeferred:static=[extractFunctionTypeObjectFromInternal(1),id{defer},instantiate1(1),instantiatedGenericFunctionType(2)],type=[inst:Instantiation1<dynamic>]*/
+instantiationDeferred() => defer.instantiationField;
+
+/*strong.element: topLevelTearOffDeferred:static=[topLevelTearOffField{defer}]*/
+/*strongConst.element: topLevelTearOffDeferred:static=[topLevelMethod{defer}]*/
+topLevelTearOffDeferred() => defer.topLevelTearOffField;
+
+/*strong.element: staticTearOffDeferred:static=[staticTearOffField{defer}]*/
+/*strongConst.element: staticTearOffDeferred:static=[Class.staticMethodField{defer}]*/
+staticTearOffDeferred() => defer.staticTearOffField;
diff --git a/tests/compiler/dart2js/impact/data/constructors.dart b/tests/compiler/dart2js/impact/data/constructors.dart
index 60fb2ae..6f98595 100644
--- a/tests/compiler/dart2js/impact/data/constructors.dart
+++ b/tests/compiler/dart2js/impact/data/constructors.dart
@@ -104,22 +104,26 @@
   new GenericClass<dynamic, dynamic>.redirect();
 }
 
-/*element: testConstRedirectingFactoryInvoke:static=[Class.generative(0)]*/
+/*strong.element: testConstRedirectingFactoryInvoke:static=[Class.generative(0)]*/
+/*strongConst.element: testConstRedirectingFactoryInvoke:type=[const:Class]*/
 testConstRedirectingFactoryInvoke() {
   const Class.redirect();
 }
 
-/*element: testConstRedirectingFactoryInvokeGeneric:static=[GenericClass.generative(0),assertIsSubtype(5),throwTypeError(1)]*/
+/*strong.element: testConstRedirectingFactoryInvokeGeneric:static=[GenericClass.generative(0),assertIsSubtype(5),throwTypeError(1)]*/
+/*strongConst.element: testConstRedirectingFactoryInvokeGeneric:type=[const:GenericClass<int,String>]*/
 testConstRedirectingFactoryInvokeGeneric() {
   const GenericClass<int, String>.redirect();
 }
 
-/*element: testConstRedirectingFactoryInvokeGenericRaw:static=[GenericClass.generative(0)]*/
+/*strong.element: testConstRedirectingFactoryInvokeGenericRaw:static=[GenericClass.generative(0)]*/
+/*strongConst.element: testConstRedirectingFactoryInvokeGenericRaw:type=[const:GenericClass<dynamic,dynamic>]*/
 testConstRedirectingFactoryInvokeGenericRaw() {
   const GenericClass.redirect();
 }
 
-/*element: testConstRedirectingFactoryInvokeGenericDynamic:static=[GenericClass.generative(0)]*/
+/*strong.element: testConstRedirectingFactoryInvokeGenericDynamic:static=[GenericClass.generative(0)]*/
+/*strongConst.element: testConstRedirectingFactoryInvokeGenericDynamic:type=[const:GenericClass<dynamic,dynamic>]*/
 testConstRedirectingFactoryInvokeGenericDynamic() {
   const GenericClass<dynamic, dynamic>.redirect();
 }
@@ -131,7 +135,7 @@
 testImplicitConstructor() => new ClassImplicitConstructor();
 
 class ClassFactoryConstructor {
-  /*strong.element: ClassFactoryConstructor.:type=[inst:JSNull]*/
+  /*element: ClassFactoryConstructor.:type=[inst:JSNull]*/
   factory ClassFactoryConstructor() => null;
 }
 
@@ -142,7 +146,7 @@
   /*element: Class.generative:static=[Object.(0)]*/
   const Class.generative();
 
-  /*strong.element: Class.fact:type=[inst:JSNull]*/
+  /*element: Class.fact:type=[inst:JSNull]*/
   factory Class.fact() => null;
 
   const factory Class.redirect() = Class.generative;
@@ -152,7 +156,7 @@
   /*element: GenericClass.generative:static=[Object.(0)]*/
   const GenericClass.generative();
 
-  /*strong.element: GenericClass.fact:type=[inst:JSBool,inst:JSNull,param:Object]*/
+  /*element: GenericClass.fact:type=[inst:JSBool,inst:JSNull,param:Object]*/
   factory GenericClass.fact() => null;
 
   const factory GenericClass.redirect() = GenericClass<X, Y>.generative;
diff --git a/tests/compiler/dart2js/impact/data/initializers.dart b/tests/compiler/dart2js/impact/data/initializers.dart
index d8e2fd5..3f954f9 100644
--- a/tests/compiler/dart2js/impact/data/initializers.dart
+++ b/tests/compiler/dart2js/impact/data/initializers.dart
@@ -29,9 +29,11 @@
 }
 
 /*strong.element: testDefaultValuesPositional:type=[inst:JSBool,param:bool]*/
+/*strongConst.element: testDefaultValuesPositional:type=[inst:JSBool,param:bool]*/
 testDefaultValuesPositional([bool value = false]) {}
 
 /*strong.element: testDefaultValuesNamed:type=[inst:JSBool,param:bool]*/
+/*strongConst.element: testDefaultValuesNamed:type=[inst:JSBool,param:bool]*/
 testDefaultValuesNamed({bool value: false}) {}
 
 class ClassFieldInitializer1 {
@@ -84,7 +86,7 @@
 
 /*element: ClassInstanceFieldWithInitializer.:static=[Object.(0)]*/
 class ClassInstanceFieldWithInitializer {
-  /*strong.element: ClassInstanceFieldWithInitializer.field:type=[inst:JSBool,param:bool]*/
+  /*element: ClassInstanceFieldWithInitializer.field:type=[inst:JSBool,param:bool]*/
   var field = false;
 }
 
@@ -93,7 +95,7 @@
 
 /*element: ClassInstanceFieldTyped.:static=[Object.(0)]*/
 class ClassInstanceFieldTyped {
-  /*strong.element: ClassInstanceFieldTyped.field:type=[inst:JSBool,inst:JSNull,param:int]*/
+  /*element: ClassInstanceFieldTyped.field:type=[inst:JSBool,inst:JSNull,param:int]*/
   int field;
 }
 
@@ -120,7 +122,7 @@
 testSuperInitializer() => new ClassSuperInitializer();
 
 class ClassGeneric<T> {
-  /*strong.element: ClassGeneric.:
+  /*element: ClassGeneric.:
    static=[
     Object.(0),
     checkSubtype(4),
diff --git a/tests/compiler/dart2js/impact/data/invokes.dart b/tests/compiler/dart2js/impact/data/invokes.dart
index aa2b472..8a2c534 100644
--- a/tests/compiler/dart2js/impact/data/invokes.dart
+++ b/tests/compiler/dart2js/impact/data/invokes.dart
@@ -115,10 +115,10 @@
   topLevelFunction3(15, c: 16, b: 17);
 }
 
-/*strong.element: topLevelFunction1Typed:type=[inst:JSBool,param:int]*/
+/*element: topLevelFunction1Typed:type=[inst:JSBool,param:int]*/
 void topLevelFunction1Typed(int a) {}
 
-/*strong.element: topLevelFunction2Typed:
+/*element: topLevelFunction2Typed:
  type=[
   inst:JSBool,
   inst:JSNull,
@@ -128,7 +128,7 @@
 */
 int topLevelFunction2Typed(String a, [num b, double c]) => null;
 
-/*strong.element: topLevelFunction3Typed:
+/*element: topLevelFunction3Typed:
  static=[
   checkSubtype(4),
   getRuntimeTypeArgument(3),
@@ -152,7 +152,7 @@
   return null;
 }
 
-/*strong.element: testTopLevelInvokeTyped:
+/*element: testTopLevelInvokeTyped:
  static=[
   topLevelFunction1Typed(1),
   topLevelFunction2Typed(1),
@@ -188,7 +188,7 @@
   topLevelFunction3Typed(false, c: {'16': false}, b: [17]);
 }
 
-/*strong.element: topLevelFunctionTyped1:
+/*element: topLevelFunctionTyped1:
  static=[
   checkSubtype(4),
   getRuntimeTypeArgument(3),
@@ -207,7 +207,7 @@
 */
 topLevelFunctionTyped1(void a(num b)) {}
 
-/*strong.element: topLevelFunctionTyped2:
+/*element: topLevelFunctionTyped2:
  static=[
   checkSubtype(4),
   getRuntimeTypeArgument(3),
@@ -226,7 +226,7 @@
 */
 topLevelFunctionTyped2(void a(num b, [String c])) {}
 
-/*strong.element: topLevelFunctionTyped3:
+/*element: topLevelFunctionTyped3:
  static=[
   checkSubtype(4),
   getRuntimeTypeArgument(3),
@@ -245,7 +245,7 @@
 */
 topLevelFunctionTyped3(void a(num b, {String c, int d})) {}
 
-/*strong.element: topLevelFunctionTyped4:
+/*element: topLevelFunctionTyped4:
  static=[
   checkSubtype(4),
   getRuntimeTypeArgument(3),
@@ -288,7 +288,7 @@
 /*element: testTopLevelGetterGet:static=[topLevelGetter]*/
 testTopLevelGetterGet() => topLevelGetter;
 
-/*strong.element: topLevelGetterTyped:type=[inst:JSNull]*/
+/*element: topLevelGetterTyped:type=[inst:JSNull]*/
 int get topLevelGetterTyped => null;
 
 /*element: testTopLevelGetterGetTyped:static=[topLevelGetterTyped]*/
@@ -300,7 +300,7 @@
 /*element: testTopLevelSetterSet:static=[set:topLevelSetter],type=[inst:JSNull]*/
 testTopLevelSetterSet() => topLevelSetter = null;
 
-/*strong.element: topLevelSetterTyped=:type=[inst:JSBool,param:int]*/
+/*element: topLevelSetterTyped=:type=[inst:JSBool,param:int]*/
 void set topLevelSetterTyped(int value) {}
 
 /*element: testTopLevelSetterSetTyped:static=[set:topLevelSetterTyped],type=[inst:JSNull]*/
@@ -318,10 +318,11 @@
 /*element: testTopLevelFieldLazy:static=[topLevelFieldLazy]*/
 testTopLevelFieldLazy() => topLevelFieldLazy;
 
-/*element: topLevelFieldConst:type=[inst:JSNull]*/
+/*strong.element: topLevelFieldConst:type=[inst:JSNull]*/
 const topLevelFieldConst = null;
 
-/*element: testTopLevelFieldConst:static=[topLevelFieldConst]*/
+/*strong.element: testTopLevelFieldConst:static=[topLevelFieldConst]*/
+/*strongConst.element: testTopLevelFieldConst:type=[inst:JSNull]*/
 testTopLevelFieldConst() => topLevelFieldConst;
 
 /*element: topLevelFieldFinal:static=[throwCyclicInit(1),topLevelFunction1(1)],type=[inst:JSNull]*/
@@ -330,25 +331,25 @@
 /*element: testTopLevelFieldFinal:static=[topLevelFieldFinal]*/
 testTopLevelFieldFinal() => topLevelFieldFinal;
 
-/*strong.element: topLevelFieldTyped:type=[inst:JSBool,inst:JSNull,param:int]*/
+/*element: topLevelFieldTyped:type=[inst:JSBool,inst:JSNull,param:int]*/
 int topLevelFieldTyped;
 
 /*element: testTopLevelFieldTyped:static=[topLevelFieldTyped]*/
 testTopLevelFieldTyped() => topLevelFieldTyped;
 
-/*strong.element: topLevelFieldGeneric1:type=[inst:JSBool,inst:JSNull,param:GenericClass<dynamic,dynamic>]*/
+/*element: topLevelFieldGeneric1:type=[inst:JSBool,inst:JSNull,param:GenericClass<dynamic,dynamic>]*/
 GenericClass topLevelFieldGeneric1;
 
 /*element: testTopLevelFieldGeneric1:static=[topLevelFieldGeneric1]*/
 testTopLevelFieldGeneric1() => topLevelFieldGeneric1;
 
-/*strong.element: topLevelFieldGeneric2:type=[inst:JSBool,inst:JSNull,param:GenericClass<dynamic,dynamic>]*/
+/*element: topLevelFieldGeneric2:type=[inst:JSBool,inst:JSNull,param:GenericClass<dynamic,dynamic>]*/
 GenericClass<dynamic, dynamic> topLevelFieldGeneric2;
 
 /*element: testTopLevelFieldGeneric2:static=[topLevelFieldGeneric2]*/
 testTopLevelFieldGeneric2() => topLevelFieldGeneric2;
 
-/*strong.element: topLevelFieldGeneric3:
+/*element: topLevelFieldGeneric3:
  static=[
   checkSubtype(4),
   getRuntimeTypeArgument(3),
@@ -456,7 +457,7 @@
   var l = 42;
 }
 
-/*strong.element: testLocalWithInitializerTyped:
+/*element: testLocalWithInitializerTyped:
  type=[
   inst:JSDouble,
   inst:JSInt,
@@ -470,7 +471,7 @@
   int l = 42;
 }
 
-/*strong.element: testLocalFunction:
+/*element: testLocalFunction:
  static=[
   computeSignature(3),
   def:localFunction,
@@ -490,7 +491,7 @@
   localFunction() {}
 }
 
-/*strong.element: testLocalFunctionTyped:
+/*element: testLocalFunctionTyped:
  static=[
   computeSignature(3),
   def:localFunction,
@@ -511,7 +512,7 @@
   int localFunction(String a) => null;
 }
 
-/*strong.element: testLocalFunctionInvoke:
+/*element: testLocalFunctionInvoke:
  dynamic=[call(0)],
  static=[computeSignature(3),
   def:localFunction,
@@ -530,7 +531,7 @@
   localFunction();
 }
 
-/*strong.element: testLocalFunctionGet:static=[computeSignature(3),
+/*element: testLocalFunctionGet:static=[computeSignature(3),
   def:localFunction,
   getRuntimeTypeArguments(3),
   getRuntimeTypeInfo(1),
@@ -546,7 +547,7 @@
   localFunction;
 }
 
-/*strong.element: testClosure:static=[computeSignature(3),
+/*element: testClosure:static=[computeSignature(3),
   def:<anonymous>,
   getRuntimeTypeArguments(3),
   getRuntimeTypeInfo(1),
@@ -561,7 +562,7 @@
   () {};
 }
 
-/*strong.element: testClosureInvoke:
+/*element: testClosureInvoke:
  dynamic=[call(0)],
  static=[computeSignature(3),
   def:<anonymous>,
diff --git a/tests/compiler/dart2js/impact/data/jsinterop.dart b/tests/compiler/dart2js/impact/data/jsinterop.dart
index 8e77d6ac..4eccd23 100644
--- a/tests/compiler/dart2js/impact/data/jsinterop.dart
+++ b/tests/compiler/dart2js/impact/data/jsinterop.dart
@@ -7,14 +7,19 @@
 
 import 'package:js/js.dart';
 
-/*element: main:static=[testJsInteropClass(0),testJsInteropMethod(0),testOptionalGenericFunctionTypeArgument(0)]*/
+/*element: main:
+ static=[
+  testJsInteropClass(0),
+  testJsInteropMethod(0),
+  testOptionalGenericFunctionTypeArgument(0)]
+*/
 main() {
   testOptionalGenericFunctionTypeArgument();
   testJsInteropMethod();
   testJsInteropClass();
 }
 
-/*strong.element: testJsInteropMethod:*/
+/*element: testJsInteropMethod:*/
 @JS()
 external int testJsInteropMethod();
 
@@ -23,7 +28,7 @@
   /*element: JsInteropClass.:static=[JavaScriptObject.(0)]*/
   external JsInteropClass();
 
-  /*strong.element: JsInteropClass.method:
+  /*element: JsInteropClass.method:
    type=[
     native:ApplicationCacheErrorEvent,
     native:DomError,
@@ -43,7 +48,7 @@
   external double method();
 }
 
-/*strong.element: testJsInteropClass:
+/*element: testJsInteropClass:
  dynamic=[JavaScriptObject.method(0)],
  static=[JsInteropClass.(0)]
 */
@@ -54,7 +59,7 @@
 /*element: GenericClass.:static=[JavaScriptObject.(0)]*/
 @JS()
 class GenericClass<T> {
-  /*strong.element: GenericClass.method:
+  /*element: GenericClass.method:
    static=[
     checkSubtype(4),
     getRuntimeTypeArgument(3),
@@ -75,7 +80,7 @@
   external GenericClass method([Callback<T> callback]);
 }
 
-/*strong.element: testOptionalGenericFunctionTypeArgument:
+/*element: testOptionalGenericFunctionTypeArgument:
  dynamic=[JavaScriptObject.method(0)],
  static=[GenericClass.(0)]
 */
diff --git a/tests/compiler/dart2js/impact/data/literals.dart b/tests/compiler/dart2js/impact/data/literals.dart
index 925896a0..c0e5f7d 100644
--- a/tests/compiler/dart2js/impact/data/literals.dart
+++ b/tests/compiler/dart2js/impact/data/literals.dart
@@ -86,10 +86,11 @@
 */
 testStringInterpolation() => '${true}';
 
-/*element: testStringInterpolationConst:
+/*strong.element: testStringInterpolationConst:
  dynamic=[toString(0)],
  static=[S(1)],type=[inst:JSBool,inst:JSString]
 */
+/*strongConst.element: testStringInterpolationConst:type=[inst:JSString]*/
 testStringInterpolationConst() {
   const b = '${true}';
   return b;
@@ -105,10 +106,11 @@
 /*element: testSymbol:static=[Symbol.(1)],type=[inst:Symbol]*/
 testSymbol() => #main;
 
-/*element: testConstSymbol:
+/*strong.element: testConstSymbol:
  static=[Symbol.(1),Symbol.(1),Symbol.validated(1)],
  type=[inst:JSString,inst:Symbol]
 */
+/*strongConst.element: testConstSymbol:static=[Symbol.(1)],type=[inst:Symbol]*/
 testConstSymbol() => const Symbol('main');
 
 /*strong.element: complexSymbolField1:
@@ -190,13 +192,15 @@
  static=[Symbol.(1),Symbol.(1),Symbol.validated(1),complexSymbolField],
  type=[impl:String,inst:JSBool,inst:Symbol]
 */
+/*strongConst.element: testComplexConstSymbol:static=[Symbol.(1)],type=[inst:Symbol]*/
 testComplexConstSymbol() => const Symbol(complexSymbolField);
 
-/*element: testIfNullConstSymbol:
+/*strong.element: testIfNullConstSymbol:
  dynamic=[Null.==],
  static=[Symbol.(1),Symbol.(1),Symbol.validated(1)],
  type=[inst:JSNull,inst:JSString,inst:Symbol]
 */
+/*strongConst.element: testIfNullConstSymbol:static=[Symbol.(1)],type=[inst:Symbol]*/
 testIfNullConstSymbol() => const Symbol(null ?? 'foo');
 
 /*element: testTypeLiteral:
@@ -205,7 +209,8 @@
 */
 testTypeLiteral() => Object;
 
-/*element: testBoolFromEnvironment:static=[bool.fromEnvironment(1)],type=[inst:JSString]*/
+/*strong.element: testBoolFromEnvironment:static=[bool.fromEnvironment(1)],type=[inst:JSString]*/
+/*strongConst.element: testBoolFromEnvironment:type=[inst:JSBool]*/
 testBoolFromEnvironment() => const bool.fromEnvironment('FOO');
 
 /*element: testEmptyListLiteral:type=[inst:List<dynamic>]*/
@@ -214,13 +219,13 @@
 /*element: testEmptyListLiteralDynamic:type=[inst:List<dynamic>]*/
 testEmptyListLiteralDynamic() => <dynamic>[];
 
-/*strong.element: testEmptyListLiteralTyped:type=[inst:List<String>]*/
+/*element: testEmptyListLiteralTyped:type=[inst:List<String>]*/
 testEmptyListLiteralTyped() => <String>[];
 
 /*element: testEmptyListLiteralConstant:type=[inst:List<dynamic>]*/
 testEmptyListLiteralConstant() => const [];
 
-/*strong.element: testNonEmptyListLiteral:type=[inst:JSBool,inst:List<bool>]*/
+/*element: testNonEmptyListLiteral:type=[inst:JSBool,inst:List<bool>]*/
 testNonEmptyListLiteral() => [true];
 
 /*element: testEmptyMapLiteral:type=[inst:Map<dynamic,dynamic>]*/
@@ -229,7 +234,7 @@
 /*element: testEmptyMapLiteralDynamic:type=[inst:Map<dynamic,dynamic>]*/
 testEmptyMapLiteralDynamic() => <dynamic, dynamic>{};
 
-/*strong.element: testEmptyMapLiteralTyped:type=[inst:Map<String,int>]*/
+/*element: testEmptyMapLiteralTyped:type=[inst:Map<String,int>]*/
 testEmptyMapLiteralTyped() => <String, int>{};
 
 /*element: testEmptyMapLiteralConstant:
@@ -237,13 +242,14 @@
  inst:ConstantMap<dynamic,dynamic>,
  inst:ConstantProtoMap<dynamic,dynamic>,
  inst:ConstantStringMap<dynamic,dynamic>,
- inst:GeneralConstantMap<dynamic,dynamic>]*/
+ inst:GeneralConstantMap<dynamic,dynamic>]
+*/
 testEmptyMapLiteralConstant() => const {};
 
-/*strong.element: testNonEmptyMapLiteral:type=[inst:JSBool,inst:JSNull,inst:Map<Null,bool>]*/
+/*element: testNonEmptyMapLiteral:type=[inst:JSBool,inst:JSNull,inst:Map<Null,bool>]*/
 testNonEmptyMapLiteral() => {null: true};
 
 class GenericClass<X, Y> {
-  /*element: GenericClass.generative:static=[Object.(0)]*/
+  /*strong.element: GenericClass.generative:static=[Object.(0)]*/
   const GenericClass.generative();
 }
diff --git a/tests/compiler/dart2js/impact/data/native.dart b/tests/compiler/dart2js/impact/data/native.dart
index b314794..2f9884d 100644
--- a/tests/compiler/dart2js/impact/data/native.dart
+++ b/tests/compiler/dart2js/impact/data/native.dart
@@ -22,7 +22,7 @@
   testNativeMethodReturns();
 }
 
-/*strong.element: testJSCall:
+/*element: testJSCall:
  static=[JS<dynamic>(3)],
  type=[inst:JSNull,inst:JSString,native:bool,native:int]
 */
@@ -56,7 +56,7 @@
 
 @Native("NativeClass")
 class NativeClass {
-  /*strong.element: NativeClass.field:
+  /*element: NativeClass.field:
    type=[
     inst:JSBool,
     inst:JSNull,
@@ -76,7 +76,7 @@
   }
 }
 
-/*strong.element: testNativeField:
+/*element: testNativeField:
  dynamic=[NativeClass.field],
  static=[defineProperty(3)],
  type=[inst:JSBool,param:NativeClass]
diff --git a/tests/compiler/dart2js/impact/data/statements.dart b/tests/compiler/dart2js/impact/data/statements.dart
index 4603006..3b5e240 100644
--- a/tests/compiler/dart2js/impact/data/statements.dart
+++ b/tests/compiler/dart2js/impact/data/statements.dart
@@ -65,7 +65,7 @@
     return 1;
 }
 
-/*strong.element: testForIn:
+/*element: testForIn:
  dynamic=[
   current,
   iterator,
@@ -82,7 +82,7 @@
   for (var e in o) {}
 }
 
-/*strong.element: testForInTyped:
+/*element: testForInTyped:
  dynamic=[
   current,
   iterator,
diff --git a/tests/compiler/dart2js/impact/impact_test.dart b/tests/compiler/dart2js/impact/impact_test.dart
index 1237e4c..27f2ea9 100644
--- a/tests/compiler/dart2js/impact/impact_test.dart
+++ b/tests/compiler/dart2js/impact/impact_test.dart
@@ -20,17 +20,26 @@
 main(List<String> args) {
   asyncTest(() async {
     Directory dataDir = new Directory.fromUri(Platform.script.resolve('data'));
+    Directory libDirectory =
+        new Directory.fromUri(Platform.script.resolve('libs'));
     print('Testing direct computation of ResolutionImpact');
     print('==================================================================');
     useImpactDataForTesting = false;
     await checkTests(dataDir, const ImpactDataComputer(),
-        args: args, testOmit: false, testFrontend: true);
+        libDirectory: libDirectory,
+        args: args,
+        testOmit: false,
+        testFrontend: true);
 
     print('Testing computation of ResolutionImpact through ImpactData');
     print('==================================================================');
     useImpactDataForTesting = true;
     await checkTests(dataDir, const ImpactDataComputer(),
-        args: args, testOmit: false, testFrontend: true);
+        libDirectory: libDirectory,
+        args: args,
+        testOmit: false,
+        testFrontend: true,
+        testCFEConstants: true);
   });
 }
 
diff --git a/tests/compiler/dart2js/impact/libs/constants_lib.dart b/tests/compiler/dart2js/impact/libs/constants_lib.dart
new file mode 100644
index 0000000..051cbea
--- /dev/null
+++ b/tests/compiler/dart2js/impact/libs/constants_lib.dart
@@ -0,0 +1,94 @@
+// Copyright (c) 2019, the Dart project authors.  Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+/*strong.element: nullLiteralField:type=[inst:JSNull]*/
+const dynamic nullLiteralField = null;
+
+/*strong.element: boolLiteralField:type=[inst:JSBool]*/
+const dynamic boolLiteralField = true;
+
+/*strong.element: intLiteralField:type=[inst:JSDouble,inst:JSInt,inst:JSNumber,inst:JSPositiveInt,inst:JSUInt31,inst:JSUInt32]*/
+const dynamic intLiteralField = 42;
+
+/*strong.element: doubleLiteralField:type=[inst:JSDouble,inst:JSInt,inst:JSNumber,inst:JSPositiveInt,inst:JSUInt31,inst:JSUInt32]*/
+const dynamic doubleLiteralField = 0.5;
+
+/*strong.element: stringLiteralField:type=[inst:JSString]*/
+const dynamic stringLiteralField = "foo";
+
+/*strong.element: symbolLiteralField:static=[Symbol.(1)],type=[inst:Symbol]*/
+const dynamic symbolLiteralField = #foo;
+
+/*strong.element: listLiteralField:type=[inst:JSBool,inst:List<bool>]*/
+const dynamic listLiteralField = [true, false];
+
+/*strong.element: mapLiteralField:type=[inst:ConstantMap<dynamic,dynamic>,inst:ConstantProtoMap<dynamic,dynamic>,inst:ConstantStringMap<dynamic,dynamic>,inst:GeneralConstantMap<dynamic,dynamic>,inst:JSBool]*/
+const dynamic mapLiteralField = {true: false};
+
+/*strong.element: stringMapLiteralField:type=[inst:ConstantMap<dynamic,dynamic>,inst:ConstantProtoMap<dynamic,dynamic>,inst:ConstantStringMap<dynamic,dynamic>,inst:GeneralConstantMap<dynamic,dynamic>,inst:JSBool,inst:JSString]*/
+const dynamic stringMapLiteralField = {'foo': false};
+
+/*strong.element: setLiteralField:type=[inst:ConstantMap<dynamic,dynamic>,inst:ConstantProtoMap<dynamic,dynamic>,inst:ConstantStringMap<dynamic,dynamic>,inst:GeneralConstantMap<dynamic,dynamic>,inst:JSBool,inst:_UnmodifiableSet<dynamic>]*/
+const dynamic setLiteralField = {true, false};
+
+class SuperClass {
+  /*element: SuperClass.field1:type=[inst:JSNull]*/
+  final field1;
+
+  /*strong.element: SuperClass.:static=[Object.(0),init:SuperClass.field1]*/
+  const SuperClass(this.field1);
+}
+
+class Class extends SuperClass {
+  /*element: Class.field2:type=[inst:JSNull]*/
+  final field2;
+
+  /*strong.element: Class.:static=[SuperClass.(1),init:Class.field2]*/
+  const Class(field1, this.field2) : super(field1);
+
+  static staticMethodField() {}
+}
+
+/*strong.element: instanceConstantField:static=[Class.(2)],type=[inst:JSBool,param:Class]*/
+const instanceConstantField = const Class(true, false);
+
+/*strong.element: typeLiteralField:static=[createRuntimeType(1)],type=[inst:JSBool,inst:Type,inst:TypeImpl,lit:String,param:Type]*/
+const typeLiteralField = String;
+
+/*element: id:static=[checkSubtype(4),checkSubtypeOfRuntimeType(2),getRuntimeTypeArgument(3),getRuntimeTypeArgumentIntercepted(4),getRuntimeTypeInfo(1),getTypeArgumentByIndex(2),setRuntimeTypeInfo(2)],type=[inst:JSArray<dynamic>,inst:JSBool,inst:JSExtendableArray<dynamic>,inst:JSFixedArray<dynamic>,inst:JSMutableArray<dynamic>,inst:JSUnmodifiableArray<dynamic>,param:Object,param:id.T]*/
+T id<T>(T t) => t;
+
+/*strong.element: _instantiation:
+ static=[
+  checkSubtype(4),
+  extractFunctionTypeObjectFromInternal(1),
+  getRuntimeTypeArgument(3),
+  getRuntimeTypeArgumentIntercepted(4),
+  getRuntimeTypeInfo(1),
+  getTypeArgumentByIndex(2),
+  id,instantiate1(1),
+  instantiatedGenericFunctionType(2),
+  setRuntimeTypeInfo(2)],
+ type=[
+  inst:Instantiation1<dynamic>,
+  inst:JSArray<dynamic>,
+  inst:JSBool,
+  inst:JSExtendableArray<dynamic>,
+  inst:JSFixedArray<dynamic>,
+  inst:JSMutableArray<dynamic>,
+  inst:JSUnmodifiableArray<dynamic>,
+  param:int Function(int)]
+*/
+const int Function(int) _instantiation = id;
+
+/*strong.element: instantiationField:static=[_instantiation]*/
+const dynamic instantiationField = _instantiation;
+
+topLevelMethod() {}
+
+/*strong.element: topLevelTearOffField:static=[topLevelMethod]*/
+const dynamic topLevelTearOffField = topLevelMethod;
+
+/*strong.element: staticTearOffField:static=[Class.staticMethodField]*/
+const dynamic staticTearOffField = Class.staticMethodField;
diff --git a/tests/compiler/dart2js/inference/data/call_method_function_typed_value.dart b/tests/compiler/dart2js/inference/data/call_method_function_typed_value.dart
index a70e567..9fc9e74 100644
--- a/tests/compiler/dart2js/inference/data/call_method_function_typed_value.dart
+++ b/tests/compiler/dart2js/inference/data/call_method_function_typed_value.dart
@@ -11,6 +11,8 @@
         int
             /*strong.[null|subclass=Object]*/
             /*omit.[null|subclass=JSInt]*/
+            /*strongConst.[null|subclass=Object]*/
+            /*omitConst.[null|subclass=JSInt]*/
             i) =>
     2 /*invoke: [exact=JSUInt31]*/ * i;
 
diff --git a/tests/compiler/dart2js/inference/data/catch.dart b/tests/compiler/dart2js/inference/data/catch.dart
index 4d84e87..46a150a 100644
--- a/tests/compiler/dart2js/inference/data/catch.dart
+++ b/tests/compiler/dart2js/inference/data/catch.dart
@@ -39,7 +39,7 @@
 /// Catch clause with stack trace.
 ////////////////////////////////////////////////////////////////////////////////
 
-/*element: catchStackTrace:[subclass=Object]*/
+/*element: catchStackTrace:[null|subclass=Object]*/
 catchStackTrace() {
   dynamic local = 0;
   try {} catch (_, s) {
diff --git a/tests/compiler/dart2js/inference/data/closure_tracer_28919.dart b/tests/compiler/dart2js/inference/data/closure_tracer_28919.dart
index 7f88ade..6bc222f 100644
--- a/tests/compiler/dart2js/inference/data/closure_tracer_28919.dart
+++ b/tests/compiler/dart2js/inference/data/closure_tracer_28919.dart
@@ -57,6 +57,8 @@
         /*[null]*/ (int
             /*strong.[null|subclass=Object]*/
             /*omit.[null|subclass=JSInt]*/
+            /*strongConst.[null|subclass=Object]*/
+            /*omitConst.[null|subclass=JSInt]*/
             x) {
       res = x;
       sum = x /*invoke: [null|subclass=JSInt]*/ + i;
diff --git a/tests/compiler/dart2js/inference/data/const_closure.dart b/tests/compiler/dart2js/inference/data/const_closure.dart
index 137c2b7..8425f4d 100644
--- a/tests/compiler/dart2js/inference/data/const_closure.dart
+++ b/tests/compiler/dart2js/inference/data/const_closure.dart
@@ -13,10 +13,12 @@
   return a;
 }
 
-/*element: foo1:[subclass=Closure]*/
+/*strong.element: foo1:[subclass=Closure]*/
+/*omit.element: foo1:[subclass=Closure]*/
 const foo1 = method1;
 
-/*element: foo2:[subclass=Closure]*/
+/*strong.element: foo2:[subclass=Closure]*/
+/*omit.element: foo2:[subclass=Closure]*/
 const foo2 = method2;
 
 /*element: returnInt1:[null|subclass=Object]*/
diff --git a/tests/compiler/dart2js/inference/data/const_closure2.dart b/tests/compiler/dart2js/inference/data/const_closure2.dart
index 26b76ff..207a431 100644
--- a/tests/compiler/dart2js/inference/data/const_closure2.dart
+++ b/tests/compiler/dart2js/inference/data/const_closure2.dart
@@ -8,7 +8,8 @@
   return a;
 }
 
-/*element: foo:[subclass=Closure]*/
+/*strong.element: foo:[subclass=Closure]*/
+/*omit.element: foo:[subclass=Closure]*/
 const foo = method;
 
 /*element: returnNum:[null|subclass=Object]*/
diff --git a/tests/compiler/dart2js/inference/data/const_closure3.dart b/tests/compiler/dart2js/inference/data/const_closure3.dart
index 74b97a0..79a36f0 100644
--- a/tests/compiler/dart2js/inference/data/const_closure3.dart
+++ b/tests/compiler/dart2js/inference/data/const_closure3.dart
@@ -8,7 +8,8 @@
   return a;
 }
 
-/*element: foo:[subclass=Closure]*/
+/*strong.element: foo:[subclass=Closure]*/
+/*omit.element: foo:[subclass=Closure]*/
 const foo = method;
 
 /*element: returnInt:[null|subclass=Object]*/
diff --git a/tests/compiler/dart2js/inference/data/const_closure4.dart b/tests/compiler/dart2js/inference/data/const_closure4.dart
index 26b76ff..207a431 100644
--- a/tests/compiler/dart2js/inference/data/const_closure4.dart
+++ b/tests/compiler/dart2js/inference/data/const_closure4.dart
@@ -8,7 +8,8 @@
   return a;
 }
 
-/*element: foo:[subclass=Closure]*/
+/*strong.element: foo:[subclass=Closure]*/
+/*omit.element: foo:[subclass=Closure]*/
 const foo = method;
 
 /*element: returnNum:[null|subclass=Object]*/
diff --git a/tests/compiler/dart2js/inference/data/const_closure5.dart b/tests/compiler/dart2js/inference/data/const_closure5.dart
index 3055295..89a3abf 100644
--- a/tests/compiler/dart2js/inference/data/const_closure5.dart
+++ b/tests/compiler/dart2js/inference/data/const_closure5.dart
@@ -8,7 +8,8 @@
   return a;
 }
 
-/*element: foo:[subclass=Closure]*/
+/*strong.element: foo:[subclass=Closure]*/
+/*omit.element: foo:[subclass=Closure]*/
 const foo = method;
 
 /*element: returnInt:[null|subclass=Object]*/
diff --git a/tests/compiler/dart2js/inference/data/enum.dart b/tests/compiler/dart2js/inference/data/enum.dart
index 1fc823b..79b6d84 100644
--- a/tests/compiler/dart2js/inference/data/enum.dart
+++ b/tests/compiler/dart2js/inference/data/enum.dart
@@ -16,7 +16,8 @@
 ////////////////////////////////////////////////////////////////////////////////
 
 enum Enum1 {
-  /*element: Enum1.a:[exact=Enum1]*/
+  /*strong.element: Enum1.a:[exact=Enum1]*/
+  /*omit.element: Enum1.a:[exact=Enum1]*/
   a,
 }
 
@@ -28,7 +29,8 @@
 ////////////////////////////////////////////////////////////////////////////////
 
 enum Enum2 {
-  /*element: Enum2.a:[exact=Enum2]*/
+  /*strong.element: Enum2.a:[exact=Enum2]*/
+  /*omit.element: Enum2.a:[exact=Enum2]*/
   a,
 }
 
@@ -40,9 +42,11 @@
 ////////////////////////////////////////////////////////////////////////////////
 
 enum Enum3 {
-  /*element: Enum3.a:[exact=Enum3]*/
+  /*strong.element: Enum3.a:[exact=Enum3]*/
+  /*omit.element: Enum3.a:[exact=Enum3]*/
   a,
-  /*element: Enum3.b:[exact=Enum3]*/
+  /*strong.element: Enum3.b:[exact=Enum3]*/
+  /*omit.element: Enum3.b:[exact=Enum3]*/
   b,
 }
 
@@ -54,7 +58,8 @@
 ////////////////////////////////////////////////////////////////////////////////
 
 enum Enum4 {
-  /*element: Enum4.a:[exact=Enum4]*/
+  /*strong.element: Enum4.a:[exact=Enum4]*/
+  /*omit.element: Enum4.a:[exact=Enum4]*/
   a,
 }
 
@@ -68,9 +73,11 @@
 ////////////////////////////////////////////////////////////////////////////////
 
 enum Enum5 {
-  /*element: Enum5.a:[exact=Enum5]*/
+  /*strong.element: Enum5.a:[exact=Enum5]*/
+  /*omit.element: Enum5.a:[exact=Enum5]*/
   a,
-  /*element: Enum5.b:[exact=Enum5]*/
+  /*strong.element: Enum5.b:[exact=Enum5]*/
+  /*omit.element: Enum5.b:[exact=Enum5]*/
   b,
 }
 
diff --git a/tests/compiler/dart2js/inference/data/global_field_closure.dart b/tests/compiler/dart2js/inference/data/global_field_closure.dart
index d2fd3bc..d40bfaab 100644
--- a/tests/compiler/dart2js/inference/data/global_field_closure.dart
+++ b/tests/compiler/dart2js/inference/data/global_field_closure.dart
@@ -13,10 +13,16 @@
   return a;
 }
 
-/*element: foo1:[null|subclass=Closure]*/
+/*strong.element: foo1:[null|subclass=Closure]*/
+/*omit.element: foo1:[null|subclass=Closure]*/
+/*strongConst.element: foo1:[subclass=Closure]*/
+/*omitConst.element: foo1:[subclass=Closure]*/
 var foo1 = method1;
 
-/*element: foo2:[null|subclass=Closure]*/
+/*strong.element: foo2:[null|subclass=Closure]*/
+/*omit.element: foo2:[null|subclass=Closure]*/
+/*strongConst.element: foo2:[subclass=Closure]*/
+/*omitConst.element: foo2:[subclass=Closure]*/
 var foo2 = method2;
 
 /*element: returnInt1:[null|subclass=Object]*/
diff --git a/tests/compiler/dart2js/inference/data/global_field_closure2.dart b/tests/compiler/dart2js/inference/data/global_field_closure2.dart
index 765913e..f4199e9 100644
--- a/tests/compiler/dart2js/inference/data/global_field_closure2.dart
+++ b/tests/compiler/dart2js/inference/data/global_field_closure2.dart
@@ -8,7 +8,10 @@
   return a;
 }
 
-/*element: foo:[null|subclass=Closure]*/
+/*strong.element: foo:[null|subclass=Closure]*/
+/*omit.element: foo:[null|subclass=Closure]*/
+/*strongConst.element: foo:[subclass=Closure]*/
+/*omitConst.element: foo:[subclass=Closure]*/
 var foo = method;
 
 /*element: returnInt:[null|subclass=Object]*/
diff --git a/tests/compiler/dart2js/inference/data/list.dart b/tests/compiler/dart2js/inference/data/list.dart
index 85919b2..967ed10 100644
--- a/tests/compiler/dart2js/inference/data/list.dart
+++ b/tests/compiler/dart2js/inference/data/list.dart
@@ -108,7 +108,8 @@
 // Create a Uint16List using a const top-level field as length.
 ////////////////////////////////////////////////////////////////////////////////
 
-/*element: _field3:[exact=JSUInt31]*/
+/*strong.element: _field3:[exact=JSUInt31]*/
+/*omit.element: _field3:[exact=JSUInt31]*/
 const _field3 = 12;
 
 /*element: newUint16List:Container([exact=NativeUint16List], element: [exact=JSUInt31], length: 12)*/
@@ -134,7 +135,8 @@
 ////////////////////////////////////////////////////////////////////////////////
 
 abstract class Class1 {
-  /*element: Class1.field:[exact=JSUInt31]*/
+  /*strong.element: Class1.field:[exact=JSUInt31]*/
+  /*omit.element: Class1.field:[exact=JSUInt31]*/
   static const field = 15;
 }
 
diff --git a/tests/compiler/dart2js/inference/data/map_tracer_const.dart b/tests/compiler/dart2js/inference/data/map_tracer_const.dart
index ab50dff..3ee2393 100644
--- a/tests/compiler/dart2js/inference/data/map_tracer_const.dart
+++ b/tests/compiler/dart2js/inference/data/map_tracer_const.dart
@@ -7,12 +7,15 @@
     int
         /*strong.Union([exact=JSDouble], [exact=JSUInt31])*/
         /*omit.[exact=JSUInt31]*/
+        /*strongConst.Union([exact=JSDouble], [exact=JSUInt31])*/
+        /*omitConst.[exact=JSUInt31]*/
         x) {
   return x;
 }
 
 class A {
-  /*element: A.DEFAULT:Dictionary([subclass=ConstantMap], key: Value([exact=JSString], value: "fun"), value: [null|subclass=Closure], map: {fun: [subclass=Closure]})*/
+  /*strong.element: A.DEFAULT:Dictionary([subclass=ConstantMap], key: Value([exact=JSString], value: "fun"), value: [null|subclass=Closure], map: {fun: [subclass=Closure]})*/
+  /*omit.element: A.DEFAULT:Dictionary([subclass=ConstantMap], key: Value([exact=JSString], value: "fun"), value: [null|subclass=Closure], map: {fun: [subclass=Closure]})*/
   static const DEFAULT = const {'fun': closure};
 
   /*element: A.map:Dictionary([subclass=ConstantMap], key: Value([exact=JSString], value: "fun"), value: [null|subclass=Closure], map: {fun: [subclass=Closure]})*/
diff --git a/tests/compiler/dart2js/inference/data/no_such_method.dart b/tests/compiler/dart2js/inference/data/no_such_method.dart
index 16f5358..2803433 100644
--- a/tests/compiler/dart2js/inference/data/no_such_method.dart
+++ b/tests/compiler/dart2js/inference/data/no_such_method.dart
@@ -17,6 +17,8 @@
           Invocation
               /*strong.[null|subclass=Object]*/
               /*omit.[null|exact=JSInvocationMirror]*/
+              /*strongConst.[null|subclass=Object]*/
+              /*omitConst.[null|exact=JSInvocationMirror]*/
               _) =>
       42;
 
@@ -41,6 +43,8 @@
           Invocation
               /*strong.[null|subclass=Object]*/
               /*omit.[null|exact=JSInvocationMirror]*/
+              /*strongConst.[null|subclass=Object]*/
+              /*omitConst.[null|exact=JSInvocationMirror]*/
               _) =>
       42;
 
@@ -65,6 +69,8 @@
       Invocation
           /*strong.[null|subclass=Object]*/
           /*omit.[null|exact=JSInvocationMirror]*/
+          /*strongConst.[null|subclass=Object]*/
+          /*omitConst.[null|exact=JSInvocationMirror]*/
           invocation) {
     return invocation
         .
@@ -101,6 +107,8 @@
       Invocation
           /*strong.[null|subclass=Object]*/
           /*omit.[null|exact=JSInvocationMirror]*/
+          /*strongConst.[null|subclass=Object]*/
+          /*omitConst.[null|exact=JSInvocationMirror]*/
           invocation) {
     this. /*update: [exact=Class4]*/ field = invocation
         .
diff --git a/tests/compiler/dart2js/inference/data/no_such_method1.dart b/tests/compiler/dart2js/inference/data/no_such_method1.dart
index 2e9aadb..eeaed0e 100644
--- a/tests/compiler/dart2js/inference/data/no_such_method1.dart
+++ b/tests/compiler/dart2js/inference/data/no_such_method1.dart
@@ -8,6 +8,8 @@
   noSuchMethod(
           /*strong.[null|subclass=Object]*/
           /*omit.[null|exact=JSInvocationMirror]*/
+          /*strongConst.[null|subclass=Object]*/
+          /*omitConst.[null|exact=JSInvocationMirror]*/
           im) =>
       42;
 }
diff --git a/tests/compiler/dart2js/inference/data/no_such_method2.dart b/tests/compiler/dart2js/inference/data/no_such_method2.dart
index 2f0741b..3bce145 100644
--- a/tests/compiler/dart2js/inference/data/no_such_method2.dart
+++ b/tests/compiler/dart2js/inference/data/no_such_method2.dart
@@ -8,6 +8,8 @@
   noSuchMethod(
           /*strong.[null|subclass=Object]*/
           /*omit.[null|exact=JSInvocationMirror]*/
+          /*strongConst.[null|subclass=Object]*/
+          /*omitConst.[null|exact=JSInvocationMirror]*/
           im) =>
       42;
 }
@@ -33,6 +35,8 @@
   noSuchMethod(
           /*strong.[null|subclass=Object]*/
           /*omit.[null|exact=JSInvocationMirror]*/
+          /*strongConst.[null|subclass=Object]*/
+          /*omitConst.[null|exact=JSInvocationMirror]*/
           im) =>
       42.5;
 }
diff --git a/tests/compiler/dart2js/inference/data/no_such_method3.dart b/tests/compiler/dart2js/inference/data/no_such_method3.dart
index c89382c..07c56bd 100644
--- a/tests/compiler/dart2js/inference/data/no_such_method3.dart
+++ b/tests/compiler/dart2js/inference/data/no_such_method3.dart
@@ -10,6 +10,8 @@
   noSuchMethod(
           /*strong.[null|subclass=Object]*/
           /*omit.[null|exact=JSInvocationMirror]*/
+          /*strongConst.[null|subclass=Object]*/
+          /*omitConst.[null|exact=JSInvocationMirror]*/
           im) =>
       throw 'foo';
 }
diff --git a/tests/compiler/dart2js/inference/data/parameters_trust.dart b/tests/compiler/dart2js/inference/data/parameters_trust.dart
index fae5e390..27b45a3 100644
--- a/tests/compiler/dart2js/inference/data/parameters_trust.dart
+++ b/tests/compiler/dart2js/inference/data/parameters_trust.dart
@@ -18,6 +18,8 @@
     int
         /*strong.Union([exact=JSString], [exact=JSUInt31])*/
         /*omit.[exact=JSUInt31]*/
+        /*strongConst.Union([exact=JSString], [exact=JSUInt31])*/
+        /*omitConst.[exact=JSUInt31]*/
         i) {
   return i;
 }
diff --git a/tests/compiler/dart2js/inference/data/static.dart b/tests/compiler/dart2js/inference/data/static.dart
index 04fa7c3..4b65a4c 100644
--- a/tests/compiler/dart2js/inference/data/static.dart
+++ b/tests/compiler/dart2js/inference/data/static.dart
@@ -189,7 +189,10 @@
 /*element: _method1:[exact=JSUInt31]*/
 _method1() => 42;
 
-/*element: _field2:[null|subclass=Closure]*/
+/*strong.element: _field2:[null|subclass=Closure]*/
+/*omit.element: _field2:[null|subclass=Closure]*/
+/*strongConst.element: _field2:[subclass=Closure]*/
+/*omitConst.element: _field2:[subclass=Closure]*/
 dynamic _field2 = _method1;
 
 /*element: invokeStaticFieldTearOff:[null|subclass=Object]*/
@@ -202,7 +205,10 @@
 /*element: _method5:Value([exact=JSString], value: "")*/
 String _method5() => '';
 
-/*element: _field5:[null|subclass=Closure]*/
+/*strong.element: _field5:[null|subclass=Closure]*/
+/*omit.element: _field5:[null|subclass=Closure]*/
+/*strongConst.element: _field5:[subclass=Closure]*/
+/*omitConst.element: _field5:[subclass=Closure]*/
 String Function() _field5 = _method5;
 
 /*element: invokeStaticTypedFieldTearOff:[null|exact=JSString]*/
@@ -216,7 +222,10 @@
 /*element: _method2:[exact=JSUInt31]*/
 _method2(/*[exact=JSUInt31]*/ o) => 42;
 
-/*element: _field3:[null|subclass=Closure]*/
+/*strong.element: _field3:[null|subclass=Closure]*/
+/*omit.element: _field3:[null|subclass=Closure]*/
+/*strongConst.element: _field3:[subclass=Closure]*/
+/*omitConst.element: _field3:[subclass=Closure]*/
 dynamic _field3 = _method2;
 
 /*element: invokeStaticFieldTearOffParameters:[null|subclass=Object]*/
@@ -242,10 +251,16 @@
 /*element: _method6:[exact=JSUInt31]*/
 int _method6() => 0;
 
-/*element: _field7:[null|subclass=Closure]*/
+/*strong.element: _field7:[null|subclass=Closure]*/
+/*omit.element: _field7:[null|subclass=Closure]*/
+/*strongConst.element: _field7:[subclass=Closure]*/
+/*omitConst.element: _field7:[subclass=Closure]*/
 int Function() _field7 = _method6;
 
-/*element: _getter3:[null|subclass=Closure]*/
+/*strong.element: _getter3:[null|subclass=Closure]*/
+/*omit.element: _getter3:[null|subclass=Closure]*/
+/*strongConst.element: _getter3:[subclass=Closure]*/
+/*omitConst.element: _getter3:[subclass=Closure]*/
 int Function() get _getter3 => _field7;
 
 /*element: invokeStaticTypedGetterTearOff:[null|subclass=JSInt]*/
@@ -284,7 +299,10 @@
 /// arguments.
 ////////////////////////////////////////////////////////////////////////////////
 
-/*element: _field4:[null|subclass=Closure]*/
+/*strong.element: _field4:[null|subclass=Closure]*/
+/*omit.element: _field4:[null|subclass=Closure]*/
+/*strongConst.element: _field4:[subclass=Closure]*/
+/*omitConst.element: _field4:[subclass=Closure]*/
 T Function<T>(T) _field4 = _method4;
 
 /*element: invokeStaticGenericField1:[null|subclass=JSInt]*/
diff --git a/tests/compiler/dart2js/inference/inference_test_helper.dart b/tests/compiler/dart2js/inference/inference_test_helper.dart
index 5b5eb7f..9259adb 100644
--- a/tests/compiler/dart2js/inference/inference_test_helper.dart
+++ b/tests/compiler/dart2js/inference/inference_test_helper.dart
@@ -35,6 +35,7 @@
         forUserLibrariesOnly: true,
         args: args,
         options: [stopAfterTypeInference],
+        testCFEConstants: true,
         skipForStrong: skipForStrong,
         shardIndex: shardIndex ?? 0,
         shards: shardIndex != null ? 2 : 1);
diff --git a/tests/compiler/dart2js/inlining/data/external.dart b/tests/compiler/dart2js/inlining/data/external.dart
index 2680f31..b656ff4 100644
--- a/tests/compiler/dart2js/inlining/data/external.dart
+++ b/tests/compiler/dart2js/inlining/data/external.dart
@@ -2,6 +2,11 @@
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
 
+@JS()
+library lib;
+
+import 'package:js/js.dart';
+
 /*element: main:[]*/
 main() {
   externalFunction();
@@ -14,4 +19,5 @@
 }
 
 /*element: _externalFunction:[]*/
+@JS('externalFunction')
 external _externalFunction();
diff --git a/tests/compiler/dart2js/member_usage/data/constant_folding.dart b/tests/compiler/dart2js/member_usage/data/constant_folding.dart
new file mode 100644
index 0000000..4fa09bb
--- /dev/null
+++ b/tests/compiler/dart2js/member_usage/data/constant_folding.dart
@@ -0,0 +1,76 @@
+// Copyright (c) 2019, the Dart project authors.  Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+// Derived from dart2js_extra/constant_folding_test
+
+import "package:expect/expect.dart";
+
+/*element: main:invoke*/
+void main() {
+  const BitNot(42, 4294967253).check();
+  const BitNot(4294967253, 42).check();
+  const BitNot(-42, 41).check();
+  const BitNot(-1, 0).check();
+  const BitNot(0, 0xFFFFFFFF).check();
+  const BitNot(4294967295, 0).check();
+  const BitNot(0x12121212121212, 0xEDEDEDED).check();
+}
+
+/*element: jsEquals:invoke*/
+void jsEquals(expected, actual, [String reason = null]) {
+  if (expected is num && actual is num) {
+    if (expected.isNaN && actual.isNaN) return;
+  }
+
+  Expect.equals(expected, actual, reason);
+
+  if (expected == 0 && actual == 0) {
+    Expect.equals(
+        expected.isNegative,
+        actual.isNegative,
+        (reason == null ? "" : "$reason ") +
+            "${expected.toString()} and "
+            "${actual.toString()} have different signs.");
+  }
+}
+
+abstract class TestOp {
+  /*element: TestOp.expected:init,read*/
+  final expected;
+
+  /*element: TestOp.result:init,read*/
+  final result;
+
+  /*strong.element: TestOp.:invoke*/
+  const TestOp(this.expected, this.result);
+
+  /*element: TestOp.checkAll:invoke*/
+  @pragma('dart2js:noInline')
+  checkAll(evalResult) {
+    jsEquals(expected, result,
+        "Frontend constant evaluation does not yield expected value.");
+    jsEquals(expected, evalResult,
+        "Backend constant evaluation does not yield expected value.");
+    jsEquals(expected, eval(), "eval() does not yield expected value.");
+  }
+
+  eval();
+}
+
+class BitNot extends TestOp {
+  /*element: BitNot.arg:init,read*/
+  final arg;
+
+  /*strong.element: BitNot.:invoke*/
+  const BitNot(this.arg, expected) : super(expected, ~arg);
+
+  /*element: BitNot.check:invoke*/
+  @pragma('dart2js:tryInline')
+  check() => checkAll(eval());
+
+  /*element: BitNot.eval:invoke*/
+  @override
+  @pragma('dart2js:tryInline')
+  eval() => ~arg;
+}
diff --git a/tests/compiler/dart2js/member_usage/member_usage_test.dart b/tests/compiler/dart2js/member_usage/member_usage_test.dart
index b7e95ee..9767dc5 100644
--- a/tests/compiler/dart2js/member_usage/member_usage_test.dart
+++ b/tests/compiler/dart2js/member_usage/member_usage_test.dart
@@ -23,12 +23,18 @@
     print(' Test with enqueuer checks');
     print('------------------------------------------------------------------');
     await checkTests(dataDir, const ClosedWorldDataComputer(false),
-        args: args, testOmit: false, testFrontend: true);
+        args: args,
+        testOmit: false,
+        testFrontend: true,
+        testCFEConstants: true);
     print('------------------------------------------------------------------');
     print(' Test without enqueuer checks');
     print('------------------------------------------------------------------');
     await checkTests(dataDir, const ClosedWorldDataComputer(true),
-        args: args, testOmit: false, testFrontend: true);
+        args: args,
+        testOmit: false,
+        testFrontend: true,
+        testCFEConstants: true);
   });
 }
 
diff --git a/tests/compiler/dart2js/model/cfe_annotations_test.dart b/tests/compiler/dart2js/model/cfe_annotations_test.dart
index 4f8c619..d1ea655 100644
--- a/tests/compiler/dart2js/model/cfe_annotations_test.dart
+++ b/tests/compiler/dart2js/model/cfe_annotations_test.dart
@@ -86,6 +86,8 @@
 
 @JS('jsInteropMethod3')
 external jsMethod3();
+
+external jsMethod4();
 ''',
   '$pathPrefix/nativelib.dart': '''
 library lib3; 
@@ -184,7 +186,6 @@
     List<String> options = getOptions(argResults);
 
     runTest({bool useIr}) async {
-      useIrAnnotationsDataForTesting = useIr;
       CompilationResult result = await runCompiler(
           entryPoint: Uri.parse('memory:$pathPrefix/main.dart'),
           memorySourceFiles: source,
@@ -198,246 +199,258 @@
       Compiler compiler = result.compiler;
       KernelFrontEndStrategy frontendStrategy = compiler.frontendStrategy;
       KernelToElementMapImpl elementMap = frontendStrategy.elementMap;
-      NativeData nativeData =
-          compiler.resolutionWorldBuilder.closedWorldForTesting.nativeData;
       ir.Component component = elementMap.env.mainComponent;
       IrAnnotationData annotationData =
           frontendStrategy.irAnnotationDataForTesting;
 
-      void testMember(String idPrefix, ir.Member member,
-          {bool implicitJsInteropMember, bool implicitNativeMember}) {
-        String memberId = '$idPrefix::${member.name.name}';
-        MemberEntity memberEntity = elementMap.getMember(member);
+      void testAll(NativeData nativeData) {
+        void testMember(String idPrefix, ir.Member member,
+            {bool implicitJsInteropMember, bool implicitNativeMember}) {
+          String memberId = '$idPrefix::${member.name.name}';
+          MemberEntity memberEntity = elementMap.getMember(member);
 
-        String expectedJsInteropMemberName =
-            expectedJsInteropMemberNames[memberId];
-        String expectedNativeMemberName = expectedNativeMemberNames[memberId];
-        Set<String> expectedPragmaNames = {};
-        if (expectedNoInlineMethods.contains(memberId)) {
-          expectedPragmaNames.add('dart2js:noInline');
-        }
-        if (expectedTryInlineMethods.contains(memberId)) {
-          expectedPragmaNames.add('dart2js:tryInline');
-        }
-
-        String expectedCreatesText = expectedCreates[memberId];
-        String expectedReturnsText = expectedReturns[memberId];
-
-        if (useIr) {
-          Expect.equals(
-              expectedJsInteropMemberName,
-              annotationData.getJsInteropMemberName(member),
-              "Unexpected js interop member name from IR for $member, "
-              "id: $memberId");
-
-          Expect.equals(
-              expectedNativeMemberName,
-              annotationData.getNativeMemberName(member),
-              "Unexpected js interop member name from IR for $member, "
-              "id: $memberId");
-
-          List<PragmaAnnotationData> pragmaAnnotations =
-              annotationData.getMemberPragmaAnnotationData(member);
-          Set<String> pragmaNames =
-              pragmaAnnotations.map((d) => d.name).toSet();
-          Expect.setEquals(expectedPragmaNames, pragmaNames,
-              "Unexpected pragmas from IR for $member, " "id: $memberId");
-
-          List<String> createsAnnotations =
-              annotationData.getCreatesAnnotations(member);
-          Expect.equals(
-              expectedCreatesText,
-              createsAnnotations.isEmpty ? null : createsAnnotations.join(','),
-              "Unexpected create annotations from IR for $member, "
-              "id: $memberId");
-
-          List<String> returnsAnnotations =
-              annotationData.getReturnsAnnotations(member);
-          Expect.equals(
-              expectedReturnsText,
-              returnsAnnotations.isEmpty ? null : returnsAnnotations.join(','),
-              "Unexpected returns annotations from IR for $member, "
-              "id: $memberId");
-        }
-        bool isJsInteropMember =
-            (implicitJsInteropMember && member.isExternal) ||
-                expectedJsInteropMemberName != null;
-        Expect.equals(
-            isJsInteropMember,
-            nativeData.isJsInteropMember(memberEntity),
-            "Unexpected js interop member result from native data for $member, "
-            "id: $memberId");
-        Expect.equals(
-            isJsInteropMember
-                ? expectedJsInteropMemberName ?? memberEntity.name
-                : null,
-            nativeData.getJsInteropMemberName(memberEntity),
-            "Unexpected js interop member name from native data for $member, "
-            "id: $memberId");
-
-        bool isNativeMember =
-            implicitNativeMember || expectedNativeMemberName != null;
-        Expect.equals(
-            isNativeMember || isJsInteropMember,
-            nativeData.isNativeMember(memberEntity),
-            "Unexpected native member result from native data for $member, "
-            "id: $memberId");
-        Expect.equals(
-            isNativeMember
-                ? expectedNativeMemberName ?? memberEntity.name
-                : (isJsInteropMember
-                    ? expectedJsInteropMemberName ?? memberEntity.name
-                    : null),
-            nativeData.getFixedBackendName(memberEntity),
-            "Unexpected fixed backend name from native data for $member, "
-            "id: $memberId");
-
-        if (expectedCreatesText != null) {
-          String createsText;
-          if (memberEntity.isField) {
-            createsText = nativeData
-                .getNativeFieldLoadBehavior(memberEntity)
-                .typesInstantiated
-                .join(',');
-          } else {
-            createsText = nativeData
-                .getNativeMethodBehavior(memberEntity)
-                .typesInstantiated
-                .join(',');
+          String expectedJsInteropMemberName =
+              expectedJsInteropMemberNames[memberId];
+          String expectedNativeMemberName = expectedNativeMemberNames[memberId];
+          Set<String> expectedPragmaNames = {};
+          if (expectedNoInlineMethods.contains(memberId)) {
+            expectedPragmaNames.add('dart2js:noInline');
           }
-          Expect.equals(
-              expectedCreatesText,
-              createsText,
-              "Unexpected create annotations from native data for $member, "
-              "id: $memberId");
-        }
-
-        if (expectedReturnsText != null) {
-          String returnsText;
-          if (memberEntity.isField) {
-            returnsText = nativeData
-                .getNativeFieldLoadBehavior(memberEntity)
-                .typesReturned
-                .join(',');
-          } else {
-            returnsText = nativeData
-                .getNativeMethodBehavior(memberEntity)
-                .typesReturned
-                .join(',');
+          if (expectedTryInlineMethods.contains(memberId)) {
+            expectedPragmaNames.add('dart2js:tryInline');
           }
-          Expect.equals(
-              expectedReturnsText,
-              returnsText,
-              "Unexpected returns annotations from native data for $member, "
-              "id: $memberId");
-        }
 
-        List<PragmaAnnotationData> pragmaAnnotations = frontendStrategy
-            .modularStrategyForTesting
-            .getPragmaAnnotationData(member);
-        Set<String> pragmaNames = pragmaAnnotations.map((d) => d.name).toSet();
-        Expect.setEquals(
-            expectedPragmaNames,
-            pragmaNames,
-            "Unexpected pragmas from modular strategy for $member, "
-            "id: $memberId");
-      }
+          String expectedCreatesText = expectedCreates[memberId];
+          String expectedReturnsText = expectedReturns[memberId];
 
-      for (ir.Library library in component.libraries) {
-        if (library.importUri.scheme == 'memory') {
-          String libraryId = library.importUri.path;
-          LibraryEntity libraryEntity = elementMap.getLibrary(library);
-
-          String expectedJsInteropLibraryName =
-              expectedJsInteropLibraryNames[libraryId];
           if (useIr) {
             Expect.equals(
-                expectedJsInteropLibraryName,
-                annotationData.getJsInteropLibraryName(library),
-                "Unexpected js library name from IR for $library");
+                expectedJsInteropMemberName,
+                annotationData.getJsInteropMemberName(member),
+                "Unexpected js interop member name from IR for $member, "
+                "id: $memberId");
+
+            Expect.equals(
+                expectedNativeMemberName,
+                annotationData.getNativeMemberName(member),
+                "Unexpected js interop member name from IR for $member, "
+                "id: $memberId");
+
+            List<PragmaAnnotationData> pragmaAnnotations =
+                annotationData.getMemberPragmaAnnotationData(member);
+            Set<String> pragmaNames =
+                pragmaAnnotations.map((d) => d.name).toSet();
+            Expect.setEquals(expectedPragmaNames, pragmaNames,
+                "Unexpected pragmas from IR for $member, " "id: $memberId");
+
+            List<String> createsAnnotations =
+                annotationData.getCreatesAnnotations(member);
+            Expect.equals(
+                expectedCreatesText,
+                createsAnnotations.isEmpty
+                    ? null
+                    : createsAnnotations.join(','),
+                "Unexpected create annotations from IR for $member, "
+                "id: $memberId");
+
+            List<String> returnsAnnotations =
+                annotationData.getReturnsAnnotations(member);
+            Expect.equals(
+                expectedReturnsText,
+                returnsAnnotations.isEmpty
+                    ? null
+                    : returnsAnnotations.join(','),
+                "Unexpected returns annotations from IR for $member, "
+                "id: $memberId");
           }
-          Expect.equals(
-              expectedJsInteropLibraryName != null,
-              nativeData.isJsInteropLibrary(libraryEntity),
-              "Unexpected js library result from native data for $library");
-          Expect.equals(
-              expectedJsInteropLibraryName,
-              nativeData.getJsInteropLibraryName(libraryEntity),
-              "Unexpected js library name from native data for $library");
 
-          for (ir.Class cls in library.classes) {
-            String clsId = '$libraryId::${cls.name}';
-            ClassEntity classEntity = elementMap.getClass(cls);
+          bool isJsInteropMember =
+              (implicitJsInteropMember && member.isExternal) ||
+                  expectedJsInteropMemberName != null;
+          Expect.equals(
+              isJsInteropMember,
+              nativeData.isJsInteropMember(memberEntity),
+              "Unexpected js interop member result from native data for $member, "
+              "id: $memberId");
+          Expect.equals(
+              isJsInteropMember
+                  ? expectedJsInteropMemberName ?? memberEntity.name
+                  : null,
+              nativeData.getJsInteropMemberName(memberEntity),
+              "Unexpected js interop member name from native data for $member, "
+              "id: $memberId");
 
-            String expectedNativeClassName = expectedNativeClassNames[clsId];
+          bool isNativeMember =
+              implicitNativeMember || expectedNativeMemberName != null;
+          Expect.equals(
+              isNativeMember || isJsInteropMember,
+              nativeData.isNativeMember(memberEntity),
+              "Unexpected native member result from native data for $member, "
+              "id: $memberId");
+          Expect.equals(
+              isNativeMember
+                  ? expectedNativeMemberName ?? memberEntity.name
+                  : (isJsInteropMember
+                      ? expectedJsInteropMemberName ?? memberEntity.name
+                      : null),
+              nativeData.getFixedBackendName(memberEntity),
+              "Unexpected fixed backend name from native data for $member, "
+              "id: $memberId");
+
+          if (expectedCreatesText != null) {
+            String createsText;
+            if (memberEntity.isField) {
+              createsText = nativeData
+                  .getNativeFieldLoadBehavior(memberEntity)
+                  .typesInstantiated
+                  .join(',');
+            } else {
+              createsText = nativeData
+                  .getNativeMethodBehavior(memberEntity)
+                  .typesInstantiated
+                  .join(',');
+            }
+            Expect.equals(
+                expectedCreatesText,
+                createsText,
+                "Unexpected create annotations from native data for $member, "
+                "id: $memberId");
+          }
+
+          if (expectedReturnsText != null) {
+            String returnsText;
+            if (memberEntity.isField) {
+              returnsText = nativeData
+                  .getNativeFieldLoadBehavior(memberEntity)
+                  .typesReturned
+                  .join(',');
+            } else {
+              returnsText = nativeData
+                  .getNativeMethodBehavior(memberEntity)
+                  .typesReturned
+                  .join(',');
+            }
+            Expect.equals(
+                expectedReturnsText,
+                returnsText,
+                "Unexpected returns annotations from native data for $member, "
+                "id: $memberId");
+          }
+
+          List<PragmaAnnotationData> pragmaAnnotations = frontendStrategy
+              .modularStrategyForTesting
+              .getPragmaAnnotationData(member);
+          Set<String> pragmaNames =
+              pragmaAnnotations.map((d) => d.name).toSet();
+          Expect.setEquals(
+              expectedPragmaNames,
+              pragmaNames,
+              "Unexpected pragmas from modular strategy for $member, "
+              "id: $memberId");
+        }
+
+        for (ir.Library library in component.libraries) {
+          if (library.importUri.scheme == 'memory') {
+            String libraryId = library.importUri.path;
+            LibraryEntity libraryEntity = elementMap.getLibrary(library);
+
+            String expectedJsInteropLibraryName =
+                expectedJsInteropLibraryNames[libraryId];
             if (useIr) {
               Expect.equals(
-                  expectedNativeClassName,
-                  annotationData.getNativeClassName(cls),
-                  "Unexpected native class name from IR for $cls");
+                  expectedJsInteropLibraryName,
+                  annotationData.getJsInteropLibraryName(library),
+                  "Unexpected js library name from IR for $library");
             }
-            bool isNativeClass = nativeData.isNativeClass(classEntity) &&
-                !nativeData.isJsInteropClass(classEntity);
-            String nativeDataClassName;
-            if (isNativeClass) {
-              nativeDataClassName =
-                  nativeData.getNativeTagsOfClass(classEntity).join(',');
-              if (nativeData.hasNativeTagsForcedNonLeaf(classEntity)) {
-                nativeDataClassName += ',!nonleaf';
+            Expect.equals(
+                expectedJsInteropLibraryName != null,
+                nativeData.isJsInteropLibrary(libraryEntity),
+                "Unexpected js library result from native data for $library");
+            Expect.equals(
+                expectedJsInteropLibraryName,
+                nativeData.getJsInteropLibraryName(libraryEntity),
+                "Unexpected js library name from native data for $library");
+
+            for (ir.Class cls in library.classes) {
+              String clsId = '$libraryId::${cls.name}';
+              ClassEntity classEntity = elementMap.getClass(cls);
+
+              String expectedNativeClassName = expectedNativeClassNames[clsId];
+              if (useIr) {
+                Expect.equals(
+                    expectedNativeClassName,
+                    annotationData.getNativeClassName(cls),
+                    "Unexpected native class name from IR for $cls");
               }
-            }
-            Expect.equals(expectedNativeClassName != null, isNativeClass,
-                "Unexpected native class result from native data for $cls");
+              bool isNativeClass = nativeData.isNativeClass(classEntity) &&
+                  !nativeData.isJsInteropClass(classEntity);
+              String nativeDataClassName;
+              if (isNativeClass) {
+                nativeDataClassName =
+                    nativeData.getNativeTagsOfClass(classEntity).join(',');
+                if (nativeData.hasNativeTagsForcedNonLeaf(classEntity)) {
+                  nativeDataClassName += ',!nonleaf';
+                }
+              }
+              Expect.equals(expectedNativeClassName != null, isNativeClass,
+                  "Unexpected native class result from native data for $cls");
 
-            Expect.equals(expectedNativeClassName, nativeDataClassName,
-                "Unexpected native class name from native data for $cls");
+              Expect.equals(expectedNativeClassName, nativeDataClassName,
+                  "Unexpected native class name from native data for $cls");
 
-            String expectedJsInteropClassName =
-                expectedJsInteropClassNames[clsId];
-            if (useIr) {
+              String expectedJsInteropClassName =
+                  expectedJsInteropClassNames[clsId];
+              if (useIr) {
+                Expect.equals(
+                    expectedJsInteropClassName,
+                    annotationData.getJsInteropClassName(cls),
+                    "Unexpected js class name from IR for $cls");
+              }
+              Expect.equals(
+                  expectedJsInteropClassName != null,
+                  nativeData.isJsInteropClass(classEntity),
+                  "Unexpected js class result from native data for $cls");
               Expect.equals(
                   expectedJsInteropClassName,
-                  annotationData.getJsInteropClassName(cls),
-                  "Unexpected js class name from IR for $cls");
-            }
-            Expect.equals(
-                expectedJsInteropClassName != null,
-                nativeData.isJsInteropClass(classEntity),
-                "Unexpected js class result from native data for $cls");
-            Expect.equals(
-                expectedJsInteropClassName,
-                nativeData.getJsInteropClassName(classEntity),
-                "Unexpected js class name from native data for $cls");
+                  nativeData.getJsInteropClassName(classEntity),
+                  "Unexpected js class name from native data for $cls");
 
-            bool expectedAnonymousJsInteropClass =
-                expectedAnonymousJsInteropClasses.contains(clsId);
-            if (useIr) {
+              bool expectedAnonymousJsInteropClass =
+                  expectedAnonymousJsInteropClasses.contains(clsId);
+              if (useIr) {
+                Expect.equals(
+                    expectedAnonymousJsInteropClass,
+                    annotationData.isAnonymousJsInteropClass(cls),
+                    "Unexpected js anonymous class result from IR for $cls");
+              }
               Expect.equals(
                   expectedAnonymousJsInteropClass,
-                  annotationData.isAnonymousJsInteropClass(cls),
-                  "Unexpected js anonymous class result from IR for $cls");
-            }
-            Expect.equals(
-                expectedAnonymousJsInteropClass,
-                nativeData.isAnonymousJsInteropClass(classEntity),
-                "Unexpected js anonymousclass result from native data for "
-                "$cls");
+                  nativeData.isAnonymousJsInteropClass(classEntity),
+                  "Unexpected js anonymousclass result from native data for "
+                  "$cls");
 
-            for (ir.Member member in cls.members) {
-              testMember(clsId, member,
-                  implicitJsInteropMember:
-                      nativeData.isJsInteropClass(classEntity),
-                  implicitNativeMember: member is! ir.Constructor &&
-                      nativeData.isNativeClass(classEntity) &&
-                      !nativeData.isJsInteropClass(classEntity));
+              for (ir.Member member in cls.members) {
+                testMember(clsId, member,
+                    implicitJsInteropMember:
+                        nativeData.isJsInteropClass(classEntity),
+                    implicitNativeMember: member is! ir.Constructor &&
+                        nativeData.isNativeClass(classEntity) &&
+                        !nativeData.isJsInteropClass(classEntity));
+              }
             }
-          }
-          for (ir.Member member in library.members) {
-            testMember(libraryId, member,
-                implicitJsInteropMember: false, implicitNativeMember: false);
+            for (ir.Member member in library.members) {
+              testMember(libraryId, member,
+                  implicitJsInteropMember: expectedJsInteropLibraryName != null,
+                  implicitNativeMember: false);
+            }
           }
         }
       }
+
+      testAll(compiler.resolutionWorldBuilder.closedWorldForTesting.nativeData);
+      if (useIr) {
+        testAll(new NativeDataImpl.fromIr(elementMap, annotationData));
+      }
     }
 
     print('test annotations from K-model');
diff --git a/tests/compiler/dart2js/model/cfe_constant_evaluation_test.dart b/tests/compiler/dart2js/model/cfe_constant_evaluation_test.dart
new file mode 100644
index 0000000..1c553b0
--- /dev/null
+++ b/tests/compiler/dart2js/model/cfe_constant_evaluation_test.dart
@@ -0,0 +1,579 @@
+// Copyright (c) 2019, the Dart project authors.  Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+library dart2js.constants.expressions.evaluate_test;
+
+import 'dart:async';
+import 'package:async_helper/async_helper.dart';
+import 'package:expect/expect.dart';
+import 'package:compiler/src/commandline_options.dart';
+import 'package:compiler/src/common_elements.dart';
+import 'package:compiler/src/compiler.dart';
+import 'package:compiler/src/constants/values.dart';
+import 'package:compiler/src/elements/entities.dart';
+import 'package:compiler/src/elements/indexed.dart';
+import 'package:compiler/src/ir/constants.dart';
+import 'package:compiler/src/ir/visitors.dart';
+import 'package:compiler/src/kernel/kernel_strategy.dart';
+import 'package:compiler/src/kernel/element_map_impl.dart';
+import 'package:front_end/src/api_unstable/dart2js.dart' as ir;
+import 'package:kernel/ast.dart' as ir;
+import '../helpers/memory_compiler.dart';
+
+class TestData {
+  final String name;
+
+  /// Declarations needed for the [constants].
+  final String declarations;
+
+  /// Tested constants.
+  final List<ConstantData> constants;
+
+  const TestData(this.name, this.declarations, this.constants);
+}
+
+class ConstantData {
+  /// Source code for the constant expression.
+  final String code;
+
+  /// Constant value as structured text for the empty environment or a map from
+  /// environment to either the expected constant value as structured text or
+  /// a [ConstantResult].
+  final expectedResults;
+
+  /// A [String] or a list of [String]s containing the code names for the error
+  /// messages expected as the result of evaluating the constant under the empty
+  /// environment.
+  final expectedErrors;
+
+  const ConstantData(this.code, this.expectedResults, {this.expectedErrors});
+}
+
+const List<TestData> DATA = const [
+  const TestData('simple', '', const [
+    const ConstantData('null', 'NullConstant'),
+    const ConstantData('false', 'BoolConstant(false)'),
+    const ConstantData('true', 'BoolConstant(true)'),
+    const ConstantData('0', 'IntConstant(0)'),
+    const ConstantData('0.0', 'IntConstant(0)'),
+    const ConstantData('"foo"', 'StringConstant("foo")'),
+    const ConstantData('1 + 2', 'IntConstant(3)'),
+    const ConstantData('-(1)', 'IntConstant(-1)'),
+    const ConstantData('1 == 2', 'BoolConstant(false)'),
+    const ConstantData('1 != 2', 'BoolConstant(true)'),
+    const ConstantData('1 / 0', 'DoubleConstant(Infinity)'),
+    const ConstantData('0 / 0', 'DoubleConstant(NaN)'),
+    const ConstantData('1 << 0', 'IntConstant(1)'),
+    const ConstantData('1 >> 0', 'IntConstant(1)'),
+    const ConstantData('"foo".length', 'IntConstant(3)'),
+    const ConstantData('identical(0, 1)', 'BoolConstant(false)'),
+    const ConstantData('"a" "b"', 'StringConstant("ab")'),
+    const ConstantData(r'"${null}"', 'StringConstant("null")'),
+    const ConstantData('identical', 'FunctionConstant(identical)'),
+    const ConstantData('true ? 0 : 1', 'IntConstant(0)'),
+    const ConstantData('proxy', 'ConstructedConstant(_Proxy())'),
+    const ConstantData('const [] == null', 'BoolConstant(false)'),
+    const ConstantData('proxy == null', 'BoolConstant(false)'),
+    const ConstantData('Object', 'TypeConstant(Object)'),
+    const ConstantData('null ?? 0', 'IntConstant(0)'),
+    const ConstantData(
+        'const [0, 1]', 'ListConstant(<int>[IntConstant(0), IntConstant(1)])'),
+    const ConstantData('const <int>[0, 1]',
+        'ListConstant(<int>[IntConstant(0), IntConstant(1)])'),
+    const ConstantData(
+        'const {0, 1}', 'SetConstant(<int>{IntConstant(0), IntConstant(1)})'),
+    const ConstantData('const <int>{0, 1}',
+        'SetConstant(<int>{IntConstant(0), IntConstant(1)})'),
+    const ConstantData(
+        'const {0: 1, 2: 3}',
+        'MapConstant(<int, int>{IntConstant(0): IntConstant(1), '
+        'IntConstant(2): IntConstant(3)})'),
+    const ConstantData(
+        'const <int, int>{0: 1, 2: 3}',
+        'MapConstant(<int, int>{IntConstant(0): IntConstant(1), '
+        'IntConstant(2): IntConstant(3)})'),
+    const ConstantData('const <int, int>{0: 1, 0: 2}', 'NonConstant',
+        expectedErrors: 'ConstEvalDuplicateKey'),
+    const ConstantData(
+        'const bool.fromEnvironment("foo", defaultValue: false)',
+        const <Map<String, String>, String>{
+          const {}: 'BoolConstant(false)',
+          const {'foo': 'true'}: 'BoolConstant(true)'
+        }),
+    const ConstantData(
+        'const int.fromEnvironment("foo", defaultValue: 42)',
+        const <Map<String, String>, String>{
+          const {}: 'IntConstant(42)',
+          const {'foo': '87'}: 'IntConstant(87)'
+        }),
+    const ConstantData(
+        'const String.fromEnvironment("foo", defaultValue: "bar")',
+        const <Map<String, String>, String>{
+          const {}: 'StringConstant("bar")',
+          const {'foo': 'foo'}: 'StringConstant("foo")'
+        }),
+  ]),
+  const TestData('env', '''
+const a = const bool.fromEnvironment("foo", defaultValue: true);
+const b = const int.fromEnvironment("bar", defaultValue: 42);
+
+class A {
+  const A();
+}
+class B {
+  final field1;
+  const B(this.field1);
+}
+class C extends B {
+  final field2;
+  const C({field1: 42, this.field2: false}) : super(field1);
+  const C.named([field = false]) : this(field1: field, field2: field);
+}
+class D extends C {
+  final field3 = 99;
+  const D(a, b) : super(field2: a, field1: b);
+}
+''', const [
+    const ConstantData('const Object()', 'ConstructedConstant(Object())'),
+    const ConstantData('const A()', 'ConstructedConstant(A())'),
+    const ConstantData(
+        'const B(0)', 'ConstructedConstant(B(field1=IntConstant(0)))'),
+    const ConstantData('const B(const A())',
+        'ConstructedConstant(B(field1=ConstructedConstant(A())))'),
+    const ConstantData(
+        'const C()',
+        'ConstructedConstant(C(field1=IntConstant(42),'
+        'field2=BoolConstant(false)))'),
+    const ConstantData(
+        'const C(field1: 87)',
+        'ConstructedConstant(C(field1=IntConstant(87),'
+        'field2=BoolConstant(false)))'),
+    const ConstantData(
+        'const C(field2: true)',
+        'ConstructedConstant(C(field1=IntConstant(42),'
+        'field2=BoolConstant(true)))'),
+    const ConstantData(
+        'const C.named()',
+        'ConstructedConstant(C(field1=BoolConstant(false),'
+        'field2=BoolConstant(false)))'),
+    const ConstantData(
+        'const C.named(87)',
+        'ConstructedConstant(C(field1=IntConstant(87),'
+        'field2=IntConstant(87)))'),
+    const ConstantData(
+        'const C(field1: a, field2: b)', const <Map<String, String>, String>{
+      const {}: 'ConstructedConstant(C(field1=BoolConstant(true),'
+          'field2=IntConstant(42)))',
+      const {'foo': 'false', 'bar': '87'}:
+          'ConstructedConstant(C(field1=BoolConstant(false),'
+          'field2=IntConstant(87)))',
+    }),
+    const ConstantData(
+        'const D(42, 87)',
+        'ConstructedConstant(D(field1=IntConstant(87),'
+        'field2=IntConstant(42),'
+        'field3=IntConstant(99)))'),
+  ]),
+  const TestData('redirect', '''
+class A<T> implements B<Null> {
+  final field1;
+  const A({this.field1:42});
+}
+class B<S> implements C<Null> {
+  const factory B({field1}) = A<B<S>>;
+  const factory B.named() = A<S>;
+}
+class C<U> {
+  const factory C({field1}) = A<B<double>>;
+}
+''', const [
+    const ConstantData(
+        'const A()', 'ConstructedConstant(A<dynamic>(field1=IntConstant(42)))'),
+    const ConstantData('const A<int>(field1: 87)',
+        'ConstructedConstant(A<int>(field1=IntConstant(87)))'),
+    const ConstantData('const B()',
+        'ConstructedConstant(A<B<dynamic>>(field1=IntConstant(42)))'),
+    const ConstantData('const B<int>()',
+        'ConstructedConstant(A<B<int>>(field1=IntConstant(42)))'),
+    const ConstantData('const B<int>(field1: 87)',
+        'ConstructedConstant(A<B<int>>(field1=IntConstant(87)))'),
+    const ConstantData('const C<int>(field1: 87)',
+        'ConstructedConstant(A<B<double>>(field1=IntConstant(87)))'),
+    const ConstantData('const B<int>.named()',
+        'ConstructedConstant(A<int>(field1=IntConstant(42)))'),
+  ]),
+  const TestData('env2', '''
+const c = const int.fromEnvironment("foo", defaultValue: 5);
+const d = const int.fromEnvironment("bar", defaultValue: 10);
+
+class A {
+  final field;
+  const A(a, b) : field = a + b;
+}
+
+class B extends A {
+  const B(a) : super(a, a * 2);
+}
+''', const [
+    const ConstantData('const A(c, d)', const <Map<String, String>, String>{
+      const {}: 'ConstructedConstant(A(field=IntConstant(15)))',
+      const {'foo': '7', 'bar': '11'}:
+          'ConstructedConstant(A(field=IntConstant(18)))',
+    }),
+    const ConstantData('const B(d)', const <Map<String, String>, String>{
+      const {}: 'ConstructedConstant(B(field=IntConstant(30)))',
+      const {'bar': '42'}: 'ConstructedConstant(B(field=IntConstant(126)))',
+    }),
+  ]),
+  const TestData('construct', '''
+ class A {
+   final x;
+   final y;
+   final z;
+   final t;
+   final u = 42;
+   const A(this.z, tt) : y = 499, t = tt, x = 3;
+   const A.named(z, this.t) : y = 400 + z, this.z = z, x = 3;
+   const A.named2(t, z, y, x) : x = t, y = z, z = y, t = x;
+ }
+ ''', const [
+    const ConstantData(
+        'const A.named(99, 100)',
+        'ConstructedConstant(A('
+        't=IntConstant(100),'
+        'u=IntConstant(42),'
+        'x=IntConstant(3),'
+        'y=IntConstant(499),'
+        'z=IntConstant(99)))'),
+    const ConstantData(
+        'const A(99, 100)',
+        'ConstructedConstant(A('
+        't=IntConstant(100),'
+        'u=IntConstant(42),'
+        'x=IntConstant(3),'
+        'y=IntConstant(499),'
+        'z=IntConstant(99)))'),
+  ]),
+  const TestData('errors', r'''
+ const dynamic null_ = const bool.fromEnvironment('x') ? null : null;
+ const dynamic zero = const bool.fromEnvironment('x') ? null : 0;
+ const dynamic minus_one = const bool.fromEnvironment('x') ? null : -1;
+ const dynamic false_ = const bool.fromEnvironment('x') ? null : false;
+ const dynamic integer = const int.fromEnvironment("foo", defaultValue: 5);
+ const dynamic string = const String.fromEnvironment("bar", defaultValue: "baz");
+ const dynamic boolean = const bool.fromEnvironment("baz", defaultValue: false);
+ const dynamic not_string =
+    const bool.fromEnvironment("not_string", defaultValue: false) ? '' : 0;
+ class Class1 {
+    final field;
+    const Class1() : field = not_string.length;
+ }
+ class Class2 implements Class3 {
+    const Class2() : assert(false_);
+    const Class2.redirect() : this();
+ }
+ class Class3 {
+    const Class3() : assert(false_, "Message");
+    const factory Class3.fact() = Class2;
+ }
+ class Class4 extends Class2 {
+    const Class4();
+ }
+ class Class5 {
+    const Class5(a) : assert(a > 0, "$a <= 0");
+ }
+ class Class6 extends Class5 {
+    const Class6(a) : super(a - 1);
+ }
+ class Class7 {
+    const Class7();
+ }
+ class Class8 {
+    final field;
+    const Class8(this.field);
+ }
+ class Class9 {
+    final field = null_;
+    const Class9();
+ }
+ class Class10 {
+    final int field = string;
+    const Class10();
+ }
+ ''', const [
+    const ConstantData(
+        r'"$integer $string $boolean"', 'StringConstant("5 baz false")'),
+    const ConstantData('integer ? true : false', 'NonConstant',
+        expectedErrors: 'ConstEvalInvalidType'),
+    const ConstantData(r'"${proxy}"', 'NonConstant',
+        expectedErrors: 'ConstEvalInvalidStringInterpolationOperand'),
+    const ConstantData('0 + string', 'NonConstant',
+        expectedErrors: 'ConstEvalInvalidType'),
+    const ConstantData('string + 0', 'NonConstant',
+        expectedErrors: 'ConstEvalInvalidBinaryOperandType'),
+    const ConstantData('boolean + string', 'NonConstant',
+        expectedErrors: 'ConstEvalInvalidMethodInvocation'),
+    const ConstantData('boolean + false', 'NonConstant',
+        expectedErrors: 'ConstEvalInvalidMethodInvocation'),
+    const ConstantData('0 * string', 'NonConstant',
+        expectedErrors: 'ConstEvalInvalidType'),
+    const ConstantData('0 % string', 'NonConstant',
+        expectedErrors: 'ConstEvalInvalidType'),
+    const ConstantData('0 << string', 'NonConstant',
+        expectedErrors: 'ConstEvalInvalidType'),
+    const ConstantData('1 ~/ zero', 'NonConstant',
+        expectedErrors: 'ConstEvalZeroDivisor'),
+    const ConstantData('1 % zero', 'NonConstant',
+        expectedErrors: 'ConstEvalZeroDivisor'),
+    const ConstantData('1 << minus_one', 'NonConstant',
+        expectedErrors: 'ConstEvalNegativeShift'),
+    const ConstantData('1 >> minus_one', 'NonConstant',
+        expectedErrors: 'ConstEvalNegativeShift'),
+    const ConstantData('const bool.fromEnvironment(integer)', 'NonConstant',
+        expectedErrors: 'ConstEvalInvalidType'),
+    const ConstantData(
+        'const bool.fromEnvironment("baz", defaultValue: integer)',
+        'NonConstant',
+        expectedErrors: 'ConstEvalInvalidType'),
+    const ConstantData('const int.fromEnvironment(integer)', 'NonConstant',
+        expectedErrors: 'ConstEvalInvalidType'),
+    const ConstantData(
+        'const int.fromEnvironment("baz", defaultValue: string)', 'NonConstant',
+        expectedErrors: 'ConstEvalInvalidType'),
+    const ConstantData('const String.fromEnvironment(integer)', 'NonConstant',
+        expectedErrors: 'ConstEvalInvalidType'),
+    const ConstantData(
+        'const String.fromEnvironment("baz", defaultValue: integer)',
+        'NonConstant',
+        expectedErrors: 'ConstEvalInvalidType'),
+    const ConstantData('false || integer', 'NonConstant',
+        expectedErrors: 'ConstEvalInvalidType'),
+    const ConstantData('integer || true', 'NonConstant',
+        expectedErrors: 'ConstEvalInvalidType'),
+    const ConstantData('integer && true', 'NonConstant',
+        expectedErrors: 'ConstEvalInvalidType'),
+    const ConstantData('!integer', 'NonConstant',
+        expectedErrors: 'ConstEvalInvalidType'),
+    const ConstantData('!string', 'NonConstant',
+        expectedErrors: 'ConstEvalInvalidType'),
+    const ConstantData('-(string)', 'NonConstant',
+        expectedErrors: 'ConstEvalInvalidMethodInvocation'),
+    const ConstantData('not_string.length', 'NonConstant',
+        expectedErrors: 'ConstEvalInvalidPropertyGet'),
+    const ConstantData('const Class1()', 'NonConstant',
+        expectedErrors: 'ConstEvalInvalidPropertyGet'),
+    const ConstantData('const Class2()', 'NonConstant',
+        expectedErrors: 'ConstEvalFailedAssertion'),
+    const ConstantData('const Class2.redirect()', 'NonConstant',
+        expectedErrors: 'ConstEvalFailedAssertion'),
+    const ConstantData('const Class3()', 'NonConstant',
+        expectedErrors: 'ConstEvalFailedAssertionWithMessage'),
+    const ConstantData('const Class3.fact()', 'NonConstant',
+        expectedErrors: 'ConstEvalFailedAssertion'),
+    const ConstantData('const Class4()', 'NonConstant',
+        expectedErrors: 'ConstEvalFailedAssertion'),
+    const ConstantData('const Class5(0)', 'NonConstant',
+        expectedErrors: 'ConstEvalFailedAssertionWithMessage'),
+    const ConstantData('const Class5(1)', 'ConstructedConstant(Class5())'),
+    const ConstantData('const Class6(1)', 'NonConstant',
+        expectedErrors: 'ConstEvalFailedAssertionWithMessage'),
+    const ConstantData('const Class6(2)', 'ConstructedConstant(Class6())'),
+    const ConstantData('const Class7()', 'ConstructedConstant(Class7())'),
+    // TODO(johnniwinther): Expect a NonConstant and errors when 31799 is fixed.
+    const ConstantData(
+      'const Class7() == const Class7()',
+      'BoolConstant(true)',
+    ),
+    const ConstantData('const Class8(not_string.length)', 'NonConstant',
+        expectedErrors: 'ConstEvalInvalidPropertyGet'),
+    const ConstantData(
+        'const Class9()', 'ConstructedConstant(Class9(field=NullConstant))'),
+    const ConstantData('const Class10()', 'NonConstant',
+        expectedErrors: 'ConstEvalInvalidType'),
+  ]),
+  const TestData('assert', '''
+    const true_ = const bool.fromEnvironment('x') ? null : true;
+    class A {
+      const A() : assert(true);
+    }
+    class B {
+      const B() : assert(true, "Message");
+    }
+    class C {
+      final a;
+      const C(this.a);
+    }
+    class D extends C {
+      final b;
+      const D(c) : b = c + 2, super(c + 1);
+    }
+    class E {
+      const E() : assert(true_);
+    }
+  ''', const [
+    const ConstantData(r'const A()', 'ConstructedConstant(A())'),
+    const ConstantData(r'const B()', 'ConstructedConstant(B())'),
+    const ConstantData(r'const D(0)',
+        'ConstructedConstant(D(a=IntConstant(1),b=IntConstant(2)))'),
+    const ConstantData(r'const E()', 'ConstructedConstant(E())'),
+  ]),
+  const TestData('instantiations', '''
+T identity<T>(T t) => t;
+class C<T> {
+  final T defaultValue;
+  final T Function(T t) identityFunction;
+
+  const C(this.defaultValue, this.identityFunction);
+}
+  ''', const <ConstantData>[
+    const ConstantData('identity', 'FunctionConstant(identity)'),
+    const ConstantData(
+        'const C<int>(0, identity)',
+        'ConstructedConstant(C<int>(defaultValue=IntConstant(0),'
+        'identityFunction=InstantiationConstant([int],'
+        'FunctionConstant(identity))))'),
+    const ConstantData(
+        'const C<double>(0.5, identity)',
+        'ConstructedConstant(C<double>(defaultValue=DoubleConstant(0.5),'
+        'identityFunction=InstantiationConstant([double],'
+        'FunctionConstant(identity))))'),
+  ]),
+  const TestData('generic class', '''
+class C<T> {
+  const C.generative();
+  const C.redirect() : this.generative();
+}
+  ''', const <ConstantData>[
+    const ConstantData(
+        'const C<int>.generative()', 'ConstructedConstant(C<int>())'),
+    const ConstantData(
+        'const C<int>.redirect()', 'ConstructedConstant(C<int>())'),
+  ]),
+  const TestData('instance', '''
+const dynamic zero_ = const bool.fromEnvironment("x") ? null : 0;
+class Class9 {
+  final field = zero_;
+  const Class9();
+}
+''', const <ConstantData>[
+    const ConstantData(
+        'const Class9()', 'ConstructedConstant(Class9(field=IntConstant(0)))'),
+  ]),
+];
+
+main(List<String> args) {
+  asyncTest(() async {
+    for (TestData data in DATA) {
+      if (args.isNotEmpty && !args.contains(data.name)) continue;
+      await testData(data);
+    }
+  });
+}
+
+Future testData(TestData data) async {
+  StringBuffer sb = new StringBuffer();
+  sb.writeln('${data.declarations}');
+  Map<String, ConstantData> constants = {};
+  List<String> names = <String>[];
+  data.constants.forEach((ConstantData constantData) {
+    String name = 'c${constants.length}';
+    names.add(name);
+    // Encode the constants as part of a from-environment conditional to force
+    // CFE to create unevaluated constants.
+    sb.writeln('const $name = const bool.fromEnvironment("x") ? '
+        'null : ${constantData.code};');
+    constants[name] = constantData;
+  });
+  sb.writeln('main() {');
+  for (String name in names) {
+    sb.writeln('  print($name);');
+  }
+  sb.writeln('}');
+  String source = sb.toString();
+  print("--source '${data.name}'---------------------------------------------");
+  print(source);
+
+  Future runTest() async {
+    CompilationResult result = await runCompiler(memorySourceFiles: {
+      'main.dart': source
+    }, options: [
+      '${Flags.enableLanguageExperiments}=constant-update-2018',
+      Flags.enableAsserts,
+    ]);
+    Compiler compiler = result.compiler;
+    KernelFrontEndStrategy frontEndStrategy = compiler.frontendStrategy;
+    KernelToElementMapImpl elementMap = frontEndStrategy.elementMap;
+    KElementEnvironment elementEnvironment =
+        compiler.frontendStrategy.elementEnvironment;
+    LibraryEntity library = elementEnvironment.mainLibrary;
+    constants.forEach((String name, ConstantData data) {
+      IndexedField field =
+          elementEnvironment.lookupLibraryMember(library, name);
+      compiler.reporter.withCurrentElement(field, () {
+        var expectedResults = data.expectedResults;
+        if (expectedResults is String) {
+          expectedResults = <Map<String, String>, String>{
+            const <String, String>{}: expectedResults
+          };
+        }
+        ir.Field node = elementMap.getMemberNode(field);
+        ir.ConstantExpression initializer = node.initializer;
+        print('-- testing $field = ${data.code} --');
+        expectedResults
+            .forEach((Map<String, String> environment, String expectedText) {
+          List<String> errors = [];
+          Dart2jsConstantEvaluator evaluator =
+              new Dart2jsConstantEvaluator(elementMap.typeEnvironment,
+                  (ir.LocatedMessage message, List<ir.LocatedMessage> context) {
+            // TODO(johnniwinther): Assert that `message.uri != null`. Currently
+            // all unevaluated constants have no uri.
+            errors.add(message.code.name);
+            reportLocatedMessage(elementMap.reporter, message, context);
+          },
+                  enableAsserts: true,
+                  environment: environment,
+                  supportReevaluationForTesting: true);
+          ir.Constant evaluatedConstant = evaluator.evaluate(initializer);
+
+          ConstantValue value = evaluatedConstant is! ir.UnevaluatedConstant
+              ? evaluatedConstant.accept(new ConstantValuefier(elementMap))
+              : new NonConstantValue();
+
+          Expect.isNotNull(
+              value,
+              "Expected non-null value from evaluation of "
+              "`${data.code}`.");
+
+          String valueText = value.toStructuredText();
+          Expect.equals(
+              expectedText,
+              valueText,
+              "Unexpected value '${valueText}' for field $field = "
+              "`${data.code}` in env $environment, "
+              "expected '${expectedText}'.");
+
+          var expectedErrors = data.expectedErrors;
+          if (expectedErrors != null) {
+            if (expectedErrors is! List) {
+              expectedErrors = [expectedErrors];
+            }
+            Expect.listEquals(
+                expectedErrors,
+                errors,
+                "Error mismatch for `$field = ${data.code}`:\n"
+                "Expected: ${data.expectedErrors},\n"
+                "Found: ${errors}.");
+          } else {
+            Expect.isTrue(
+                errors.isEmpty,
+                "Unexpected errors for `$field = ${data.code}`:\n"
+                "Found: ${errors}.");
+          }
+        });
+      });
+    });
+  }
+
+  await runTest();
+}
diff --git a/tests/compiler/dart2js/model/native_test.dart b/tests/compiler/dart2js/model/native_test.dart
index c281c63f..6ae4e32 100644
--- a/tests/compiler/dart2js/model/native_test.dart
+++ b/tests/compiler/dart2js/model/native_test.dart
@@ -139,7 +139,71 @@
       '53',
       '54',
     ]);
-    // TODO(johnniwinther): Add similar test for native declarations.
+
+    await runTest('tests/compiler/dart2js_native/native_test.dart',
+        'tests/compiler/dart2js_native/', {
+      'Class': Kind.regular,
+      'NativeClass': Kind.native,
+      'topLevelField': Kind.regular,
+      'topLevelGetter': Kind.regular,
+      'topLevelSetter': Kind.regular,
+      'topLevelFunction': Kind.regular,
+      'nativeTopLevelGetter': Kind.native,
+      'nativeTopLevelSetter': Kind.native,
+      'nativeTopLevelFunction': Kind.native,
+      'Class.generative': Kind.regular,
+      'Class.fact': Kind.regular,
+      'Class.instanceField': Kind.regular,
+      'Class.instanceGetter': Kind.regular,
+      'Class.instanceSetter': Kind.regular,
+      'Class.instanceMethod': Kind.regular,
+      'Class.staticField': Kind.regular,
+      'Class.staticGetter': Kind.regular,
+      'Class.staticSetter': Kind.regular,
+      'Class.staticMethod': Kind.regular,
+      'Class.nativeInstanceGetter': Kind.native,
+      'Class.nativeInstanceSetter': Kind.native,
+      'Class.nativeInstanceMethod': Kind.native,
+      'NativeClass.generative': Kind.regular,
+      'NativeClass.fact': Kind.regular,
+      'NativeClass.nativeGenerative': Kind.native,
+      'NativeClass.nativeFact': Kind.native,
+      'NativeClass.instanceField': Kind.native,
+      'NativeClass.instanceGetter': Kind.regular,
+      'NativeClass.instanceSetter': Kind.regular,
+      'NativeClass.instanceMethod': Kind.regular,
+      'NativeClass.staticField': Kind.regular,
+      'NativeClass.staticGetter': Kind.regular,
+      'NativeClass.staticSetter': Kind.regular,
+      'NativeClass.staticMethod': Kind.regular,
+      'NativeClass.nativeInstanceGetter': Kind.native,
+      'NativeClass.nativeInstanceSetter': Kind.native,
+      'NativeClass.nativeInstanceMethod': Kind.native,
+      'NativeClass.nativeStaticGetter': Kind.native,
+      'NativeClass.nativeStaticSetter': Kind.native,
+      'NativeClass.nativeStaticMethod': Kind.native,
+    },
+        skipList: [
+          // External constructors in non-native class
+          //'08',
+          //'09',
+          // External instance members in non-native class
+          //'22',
+          //'23',
+          //'24',
+          // External static members in non-native class
+          //'25',
+          //'26',
+          //'27',
+          // External instance members in native class
+          //'36',
+          //'37',
+          //'38',
+          // External static members in native class
+          //'39',
+          //'40',
+          //'41',
+        ]);
   });
 }
 
diff --git a/tests/compiler/dart2js/model/no_such_method_enabled_test.dart b/tests/compiler/dart2js/model/no_such_method_enabled_test.dart
index 6410edf..58d85b9 100644
--- a/tests/compiler/dart2js/model/no_such_method_enabled_test.dart
+++ b/tests/compiler/dart2js/model/no_such_method_enabled_test.dart
@@ -3,6 +3,7 @@
 // BSD-style license that can be found in the LICENSE file.
 
 import 'package:async_helper/async_helper.dart';
+import 'package:compiler/src/commandline_options.dart';
 import 'package:compiler/src/common_elements.dart';
 import 'package:compiler/src/compiler.dart';
 import 'package:compiler/src/elements/entities.dart';
@@ -234,12 +235,15 @@
 ];
 
 main() {
-  runTests() async {
+  runTests({bool useCFEConstants: false}) async {
     for (NoSuchMethodTest test in TESTS) {
       print('---- testing -------------------------------------------------');
       print(test.code);
-      CompilationResult result =
-          await runCompiler(memorySourceFiles: {'main.dart': test.code});
+      CompilationResult result = await runCompiler(
+          memorySourceFiles: {'main.dart': test.code},
+          options: useCFEConstants
+              ? ['${Flags.enableLanguageExperiments}=constant-update-2018']
+              : []);
       Expect.isTrue(result.isSuccess);
       Compiler compiler = result.compiler;
       checkTest(compiler, test);
@@ -249,6 +253,8 @@
   asyncTest(() async {
     print('--test from kernel------------------------------------------------');
     await runTests();
+    print('--test from kernel with CFE constants-----------------------------');
+    await runTests(useCFEConstants: true);
   });
 }
 
diff --git a/tests/compiler/dart2js/serialization/data/const_literals.dart b/tests/compiler/dart2js/serialization/data/const_literals.dart
new file mode 100644
index 0000000..fb8128a
--- /dev/null
+++ b/tests/compiler/dart2js/serialization/data/const_literals.dart
@@ -0,0 +1,18 @@
+// Copyright (c) 2019, the Dart project authors.  Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+main() {
+  mapConstLiteral();
+  dictionaryConstLiteral();
+  listConstLiteral();
+  setConstLiteral();
+}
+
+mapConstLiteral() => const {0: 1};
+
+dictionaryConstLiteral() => const {'foo': 'bar'};
+
+listConstLiteral() => const ['foo', 'bar'];
+
+setConstLiteral() => const {'foo', 'bar'};
diff --git a/tests/compiler/dart2js/serialization/serialization_test.dart b/tests/compiler/dart2js/serialization/serialization_test.dart
index 6c5a1cb..496787d 100644
--- a/tests/compiler/dart2js/serialization/serialization_test.dart
+++ b/tests/compiler/dart2js/serialization/serialization_test.dart
@@ -13,12 +13,16 @@
   asyncTest(() async {
     Directory dataDir = new Directory.fromUri(Platform.script.resolve('data'));
     Directory libDir = new Directory.fromUri(Platform.script.resolve('libs'));
+    print('--testing without CFE constants-----------------------------------');
     await checkTests(dataDir, options: [], args: args, libDirectory: libDir);
+    print('--testing with CFE constants--------------------------------------');
+    await checkTests(dataDir,
+        options: [], args: args, libDirectory: libDir, testCFEConstants: true);
   });
 }
 
 Future checkTests(Directory dataDir,
-    {bool testStrongMode: true,
+    {bool testCFEConstants: false,
     List<String> options: const <String>[],
     List<String> args: const <String>[],
     Directory libDirectory: null,
@@ -50,6 +54,10 @@
     if (shouldContinue) continued = true;
     testCount++;
     List<String> testOptions = options.toList();
+    if (testCFEConstants) {
+      testOptions
+          .add('${Flags.enableLanguageExperiments}=constant-update-2018');
+    }
     testOptions.add(Flags.dumpInfo);
     testOptions.add('--out=out.js');
     if (onTest != null) {
diff --git a/tests/compiler/dart2js_extra/cfe_instance_constant_test.dart b/tests/compiler/dart2js_extra/cfe_instance_constant_test.dart
new file mode 100644
index 0000000..6fbd051
--- /dev/null
+++ b/tests/compiler/dart2js_extra/cfe_instance_constant_test.dart
@@ -0,0 +1,23 @@
+// Copyright (c) 2019, the Dart project authors.  Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+// dart2jsOptions=--enable-experiment=constant-update-2018
+
+// Regression test for CFE constant evaluation. The evaluation of [Class9.field]
+// assumed that its initializer did not hold an unevaluated constant.
+
+import 'package:expect/expect.dart';
+
+const dynamic zero_ = const bool.fromEnvironment("x") ? null : 0;
+
+class Class9 {
+  final field = zero_;
+  const Class9();
+}
+
+const c0 = const bool.fromEnvironment("x") ? null : const Class9();
+
+main() {
+  Expect.equals(0, c0.field);
+}
diff --git a/tests/compiler/dart2js_extra/null_stacktrace_test.dart b/tests/compiler/dart2js_extra/null_stacktrace_test.dart
new file mode 100644
index 0000000..6e95443
--- /dev/null
+++ b/tests/compiler/dart2js_extra/null_stacktrace_test.dart
@@ -0,0 +1,42 @@
+// Copyright (c) 2019, the Dart project authors.  Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+/// Regression test: stack trace can be null when using async-await.
+import 'dart:async';
+
+import 'package:expect/expect.dart';
+
+main() async {
+  C value = await test();
+  Expect.equals("[[null]]", "$value");
+}
+
+Future<C> test() async {
+  try {
+    await throwInFuture();
+    return C(StackTrace.fromString("no-throw"));
+  } on MyException catch (e, s) {
+    return C(s); // Note: s is null
+  }
+}
+
+Future<int> throwInFuture() {
+  var completer = new Completer<int>();
+  var future = completer.future;
+  new Future(() {}).then((_) {
+    StackTrace.fromString("hi");
+    completer.completeError(new MyException());
+  });
+  return future;
+}
+
+class MyException {}
+
+class C {
+  final StackTrace _s; // Global inference used to infer this field as non-null
+  C(this._s);
+
+  @override
+  String toString() => '[[$_s]]';
+}
diff --git a/tests/compiler/dart2js_native/native_test.dart b/tests/compiler/dart2js_native/native_test.dart
new file mode 100644
index 0000000..0eb52d6
--- /dev/null
+++ b/tests/compiler/dart2js_native/native_test.dart
@@ -0,0 +1,211 @@
+// Copyright (c) 2018, the Dart project authors.  Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+// Test for positive and negative uses of named declarations. This file is
+// also used in tests/compiler/dart2js/model/native_test.dart.
+
+import 'dart:_js_helper';
+
+var topLevelField;
+
+get topLevelGetter => null;
+
+set topLevelSetter(_) {}
+
+topLevelFunction() {}
+
+// NON_NATIVE_EXTERNAL               //# 01: compile-time error
+external get externalTopLevelGetter; //# 01: continued
+
+// NON_NATIVE_EXTERNAL                  //# 02: compile-time error
+external set externalTopLevelSetter(_); //# 02: continued
+
+// NON_NATIVE_EXTERNAL               //# 03: compile-time error
+external externalTopLevelFunction(); //# 03: continued
+
+get nativeTopLevelGetter native;
+
+set nativeTopLevelSetter(_) native;
+
+nativeTopLevelFunction() native;
+
+class Class {
+  Class.generative();
+  factory Class.fact() => null;
+
+  // NON_NATIVE_EXTERNAL               //# 08: compile-time error
+  external Class.externalGenerative(); //# 08: continued
+
+  // NON_NATIVE_EXTERNAL                 //# 09: compile-time error
+  external factory Class.externalFact(); //# 09: continued
+
+  // NATIVE_NON_INSTANCE_IN_NON_NATIVE_CLASS //# 10: compile-time error
+  Class.nativeGenerative() native; //# 10: continued
+
+  // NATIVE_NON_INSTANCE_IN_NON_NATIVE_CLASS //# 11: compile-time error
+  factory Class.nativeFact() native; //# 11: continued
+
+  var instanceField;
+  get instanceGetter => null;
+  set instanceSetter(_) {}
+  instanceMethod() {}
+
+  static var staticField;
+  static get staticGetter => null;
+  static set staticSetter(_) {}
+  static staticMethod() {}
+
+  // NON_NATIVE_EXTERNAL               //# 22: compile-time error
+  external get externalInstanceGetter; //# 22: continued
+
+  // NON_NATIVE_EXTERNAL                  //# 23: compile-time error
+  external set externalInstanceSetter(_); //# 23: continued
+
+  // NON_NATIVE_EXTERNAL             //# 24: compile-time error
+  external externalInstanceMethod(); //# 24: continued
+
+  // NON_NATIVE_EXTERNAL                    //# 25: compile-time error
+  external static get externalStaticGetter; //# 25: continued
+
+  // NON_NATIVE_EXTERNAL                       //# 26: compile-time error
+  external static set externalStaticSetter(_); //# 26: continued
+
+  // NON_NATIVE_EXTERNAL                  //# 27: compile-time error
+  external static externalStaticMethod(); //# 27: continued
+
+  get nativeInstanceGetter native;
+  set nativeInstanceSetter(_) native;
+  nativeInstanceMethod() native;
+
+  // NATIVE_NON_INSTANCE_IN_NON_NATIVE_CLASS //# 28: compile-time error
+  static get nativeStaticGetter native; //# 28: continued
+
+  // NATIVE_NON_INSTANCE_IN_NON_NATIVE_CLASS //# 29: compile-time error
+  static set nativeStaticSetter(_) native; //# 29: continued
+
+  // NATIVE_NON_INSTANCE_IN_NON_NATIVE_CLASS //# 30: compile-time error
+  static nativeStaticMethod() native; //# 30: continued
+}
+
+@Native('d')
+class NativeClass {
+  NativeClass.generative();
+
+  factory NativeClass.fact() => null;
+
+  // NON_NATIVE_EXTERNAL                     //# 31: compile-time error
+  external NativeClass.externalGenerative(); //# 31: continued
+  // NON_NATIVE_EXTERNAL                       //# 32: compile-time error
+  external factory NativeClass.externalFact(); //# 32: continued
+
+  NativeClass.nativeGenerative() native;
+  factory NativeClass.nativeFact() native;
+
+  var instanceField;
+  get instanceGetter => null;
+  set instanceSetter(_) {}
+  instanceMethod() {}
+
+  static var staticField;
+  static get staticGetter => null;
+  static set staticSetter(_) {}
+  static staticMethod() {}
+
+  var instanceNamedField;
+
+  // NON_NATIVE_EXTERNAL               //# 36: compile-time error
+  external get externalInstanceGetter; //# 36: continued
+
+  // NON_NATIVE_EXTERNAL                  //# 37: compile-time error
+  external set externalInstanceSetter(_); //# 37: continued
+
+  // NON_NATIVE_EXTERNAL             //# 38: compile-time error
+  external externalInstanceMethod(); //# 38: continued
+
+  // NON_NATIVE_EXTERNAL                    //# 39: compile-time error
+  external static get externalStaticGetter; //# 39: continued
+
+  // NON_NATIVE_EXTERNAL                       //# 40: compile-time error
+  external static set externalStaticSetter(_); //# 40: continued
+
+  // NON_NATIVE_EXTERNAL                  //# 41: compile-time error
+  external static externalStaticMethod(); //# 41: continued
+
+  get nativeInstanceGetter native;
+  set nativeInstanceSetter(_) native;
+  nativeInstanceMethod() native;
+
+  static get nativeStaticGetter native;
+  static set nativeStaticSetter(_) native;
+  static nativeStaticMethod() native;
+}
+
+main() {
+  if (true) return;
+
+  topLevelField;
+  topLevelGetter;
+  topLevelSetter = null;
+  topLevelFunction();
+  externalTopLevelGetter; //# 01: continued
+  externalTopLevelSetter = null; //# 02: continued
+  externalTopLevelFunction(); //# 03: continued
+  nativeTopLevelGetter;
+  nativeTopLevelSetter = null;
+  nativeTopLevelFunction();
+
+  var c1 = new Class.generative();
+  new Class.fact();
+  new Class.externalGenerative(); //# 08: continued
+  new Class.externalFact(); //# 09: continued
+  new Class.nativeGenerative(); //# 10: continued
+  new Class.nativeFact(); //# 11: continued
+  c1.instanceField;
+  c1.instanceGetter;
+  c1.instanceSetter = null;
+  c1.instanceMethod();
+  Class.staticField;
+  Class.staticGetter;
+  Class.staticSetter = null;
+  Class.staticMethod();
+  c1.externalInstanceGetter; //# 22: continued
+  c1.externalInstanceSetter = null; //# 23: continued
+  c1.externalInstanceMethod(); //# 24: continued
+  Class.externalStaticGetter; //# 25: continued
+  Class.externalStaticSetter = null; //# 26: continued
+  Class.externalStaticMethod(); //# 27: continued
+  c1.nativeInstanceGetter;
+  c1.nativeInstanceSetter = null;
+  c1.nativeInstanceMethod();
+  Class.nativeStaticGetter; //# 28: continued
+  Class.nativeStaticSetter = null; //# 29: continued
+  Class.nativeStaticMethod(); //# 30: continued
+
+  var c2 = new NativeClass.generative();
+  new NativeClass.fact();
+  new NativeClass.externalGenerative(); //# 31: continued
+  new NativeClass.externalFact(); //# 32: continued
+  new NativeClass.nativeGenerative();
+  new NativeClass.nativeFact();
+  c2.instanceField;
+  c2.instanceGetter;
+  c2.instanceSetter = null;
+  c2.instanceMethod();
+  NativeClass.staticField;
+  NativeClass.staticGetter;
+  NativeClass.staticSetter = null;
+  NativeClass.staticMethod();
+  c2.externalInstanceGetter; //# 36: continued
+  c2.externalInstanceSetter = null; //# 37: continued
+  c2.externalInstanceMethod(); //# 38: continued
+  NativeClass.externalStaticGetter; //# 39: continued
+  NativeClass.externalStaticSetter = null; //# 40: continued
+  NativeClass.externalStaticMethod(); //# 41: continued
+  c2.nativeInstanceGetter;
+  c2.nativeInstanceSetter = null;
+  c2.nativeInstanceMethod();
+  NativeClass.nativeStaticGetter;
+  NativeClass.nativeStaticSetter = null;
+  NativeClass.nativeStaticMethod();
+}
diff --git a/tests/corelib_2/corelib_2.status b/tests/corelib_2/corelib_2.status
index eed9d49..45e2873 100644
--- a/tests/corelib_2/corelib_2.status
+++ b/tests/corelib_2/corelib_2.status
@@ -56,6 +56,7 @@
 bool_from_environment2_test/03: MissingCompileTimeError
 int_modulo_arith_test/modPow: RuntimeError
 int_modulo_arith_test/none: RuntimeError
+regexp/lookbehind_test/01: Skip # Flaky in uncatchable way.  Issue 36280
 string_from_environment3_test/03: MissingCompileTimeError
 
 [ $compiler == fasta ]
diff --git a/tests/corelib_2/regexp/named-captures_test.dart b/tests/corelib_2/regexp/named-captures_test.dart
new file mode 100644
index 0000000..aff61b8
--- /dev/null
+++ b/tests/corelib_2/regexp/named-captures_test.dart
@@ -0,0 +1,107 @@
+// Copyright (c) 2019, the Dart project authors. All rights reserved.
+// Copyright 2017 the V8 project authors. All rights reserved.
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions are
+// met:
+//
+//     * Redistributions of source code must retain the above copyright
+//       notice, this list of conditions and the following disclaimer.
+//     * Redistributions in binary form must reproduce the above
+//       copyright notice, this list of conditions and the following
+//       disclaimer in the documentation and/or other materials provided
+//       with the distribution.
+//     * Neither the name of Google Inc. nor the names of its
+//       contributors may be used to endorse or promote products derived
+//       from this software without specific prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+import 'package:expect/expect.dart';
+
+import 'v8_regexp_utils.dart';
+
+void main() {
+  void testRE(RegExp re, String input, bool expectedResult) {
+    if (expectedResult) {
+      assertTrue(re.hasMatch(input));
+    } else {
+      assertFalse(re.hasMatch(input));
+    }
+  }
+
+  void execRE(RegExp re, String input, List<String> expectedResult) {
+    assertTrue(re.hasMatch(input));
+    shouldBe(re.firstMatch(input), expectedResult);
+  }
+
+  void namedRE(RegExp re, String input, Map<String, String> expectedResults) {
+    assertTrue(re.hasMatch(input));
+    var match = re.firstMatch(input) as RegExpMatch;
+    for (var s in expectedResults.keys) {
+      assertEquals(match.namedGroup(s), expectedResults[s]);
+    }
+  }
+
+  void hasNames(RegExp re, String input, List<String> expectedResults) {
+    assertTrue(re.hasMatch(input));
+    var match = re.firstMatch(input) as RegExpMatch;
+    for (var s in match.groupNames) {
+      assertTrue(expectedResults.contains(s));
+    }
+  }
+
+  // Behavior in non-unicode mode.
+  assertThrows(() => RegExp(r"(?<>a)"));
+  assertThrows(() => RegExp(r"(?<aa)"));
+  assertThrows(() => RegExp(r"(?<42a>a)"));
+  assertThrows(() => RegExp(r"(?<:a>a)"));
+  assertThrows(() => RegExp(r"(?<a:>a)"));
+  assertThrows(() => RegExp(r"(?<a>a)(?<a>a)"));
+  assertThrows(() => RegExp(r"(?<a>a)(?<b>b)(?<a>a)"));
+  assertTrue(RegExp(r"\k<a>").hasMatch("k<a>"));
+  assertTrue(RegExp(r"\k<4>").hasMatch("k<4>"));
+  assertTrue(RegExp(r"\k<a").hasMatch("k<a"));
+  assertTrue(RegExp(r"\k").hasMatch("k"));
+  assertThrows(() => RegExp(r"(?<a>.)\k"));
+  assertThrows(() => RegExp(r"(?<a>.)\k<a"));
+  assertThrows(() => RegExp(r"(?<a>.)\k<b>"));
+  assertThrows(() => RegExp(r"(?<a>a)\k<ab>"));
+  assertThrows(() => RegExp(r"(?<ab>a)\k<a>"));
+  assertThrows(() => RegExp(r"\k<a>(?<ab>a)"));
+  assertThrows(() => RegExp(r"\k<a(?<a>a)"));
+  assertTrue(RegExp(r"(?<a>\a)").hasMatch("a"));
+
+  var re = RegExp(r"\k<a>");
+  execRE(re, "xxxk<a>xxx", ["k<a>"]);
+
+  re = RegExp(r"\k<a");
+  execRE(re, "xxxk<a>xxx", ["k<a"]);
+
+  re = RegExp(r"(?<a>.)(?<b>.)(?<c>.)\k<c>\k<b>\k<a>");
+  execRE(re, "abccba", ["abccba", "a", "b", "c"]);
+  namedRE(re, "abccba", {"a": "a", "b": "b", "c": "c"});
+  hasNames(re, "abccba", ["a", "b", "c"]);
+
+  // A couple of corner cases around '\k' as named back-references vs. identity
+  // escapes.
+  assertTrue(RegExp(r"\k<a>(?<=>)a").hasMatch("k<a>a"));
+  assertTrue(RegExp(r"\k<a>(?<!a)a").hasMatch("k<a>a"));
+  assertTrue(RegExp(r"\k<a>(<a>x)").hasMatch("k<a><a>x"));
+  assertTrue(RegExp(r"\k<a>(?<a>x)").hasMatch("x"));
+  assertThrows(() => RegExp(r"\k<a>(?<b>x)"));
+  assertThrows(() => RegExp(r"\k<a(?<a>.)"));
+  assertThrows(() => RegExp(r"\k(?<a>.)"));
+
+  // TODO(sstrickl): Add more tests when unicode flag support is in.
+  // https://github.com/dart-lang/sdk/issues/36170
+}
diff --git a/tests/standalone_2/ffi/coordinate.dart b/tests/ffi/coordinate.dart
similarity index 100%
rename from tests/standalone_2/ffi/coordinate.dart
rename to tests/ffi/coordinate.dart
diff --git a/tests/standalone_2/ffi/coordinate_bare.dart b/tests/ffi/coordinate_bare.dart
similarity index 100%
rename from tests/standalone_2/ffi/coordinate_bare.dart
rename to tests/ffi/coordinate_bare.dart
diff --git a/tests/standalone_2/ffi/coordinate_manual.dart b/tests/ffi/coordinate_manual.dart
similarity index 100%
rename from tests/standalone_2/ffi/coordinate_manual.dart
rename to tests/ffi/coordinate_manual.dart
diff --git a/tests/standalone_2/ffi/cstring.dart b/tests/ffi/cstring.dart
similarity index 100%
rename from tests/standalone_2/ffi/cstring.dart
rename to tests/ffi/cstring.dart
diff --git a/tests/standalone_2/ffi/data_not_asan_test.dart b/tests/ffi/data_not_asan_test.dart
similarity index 100%
rename from tests/standalone_2/ffi/data_not_asan_test.dart
rename to tests/ffi/data_not_asan_test.dart
diff --git a/tests/standalone_2/ffi/data_test.dart b/tests/ffi/data_test.dart
similarity index 99%
rename from tests/standalone_2/ffi/data_test.dart
rename to tests/ffi/data_test.dart
index 27a3790..4cdc79b 100644
--- a/tests/standalone_2/ffi/data_test.dart
+++ b/tests/ffi/data_test.dart
@@ -461,7 +461,7 @@
   }
 
   int size = generic<ffi.Pointer<ffi.Int64>>();
-  Expect.equals(8, size);
+  Expect.isTrue(size == 8 || size == 4);
 }
 
 void testSizeOfVoid() {
diff --git a/tests/standalone_2/ffi/dylib_utils.dart b/tests/ffi/dylib_utils.dart
similarity index 88%
copy from tests/standalone_2/ffi/dylib_utils.dart
copy to tests/ffi/dylib_utils.dart
index 1c924d4..fb8153a 100644
--- a/tests/standalone_2/ffi/dylib_utils.dart
+++ b/tests/ffi/dylib_utils.dart
@@ -7,7 +7,8 @@
 
 String _platformPath(String name, {String path}) {
   if (path == null) path = "";
-  if (Platform.isLinux) return path + "lib" + name + ".so";
+  if (Platform.isLinux || Platform.isAndroid)
+    return path + "lib" + name + ".so";
   if (Platform.isMacOS) return path + "lib" + name + ".dylib";
   if (Platform.isWindows) return path + name + ".dll";
   throw Exception("Platform not implemented");
diff --git a/tests/standalone_2/ffi/dynamic_library_test.dart b/tests/ffi/dynamic_library_test.dart
similarity index 96%
rename from tests/standalone_2/ffi/dynamic_library_test.dart
rename to tests/ffi/dynamic_library_test.dart
index 0a38e9a..3282f4c 100644
--- a/tests/standalone_2/ffi/dynamic_library_test.dart
+++ b/tests/ffi/dynamic_library_test.dart
@@ -3,6 +3,8 @@
 // BSD-style license that can be found in the LICENSE file.
 //
 // Dart test program for testing dart:ffi dynamic library loading.
+//
+// SharedObjects=ffi_test_dynamic_library ffi_test_functions
 
 library FfiTest;
 
diff --git a/tests/standalone_2/ffi/enable_ffi_test.dart b/tests/ffi/enable_ffi_test.dart
similarity index 100%
rename from tests/standalone_2/ffi/enable_ffi_test.dart
rename to tests/ffi/enable_ffi_test.dart
diff --git a/tests/ffi/enable_structs_test.dart b/tests/ffi/enable_structs_test.dart
new file mode 100644
index 0000000..ed8655b
--- /dev/null
+++ b/tests/ffi/enable_structs_test.dart
@@ -0,0 +1,25 @@
+// Copyright (c) 2019, the Dart project authors.  Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+//
+// Dart test program for testing that structs are locked out on 32-bit platforms.
+
+library FfiTest;
+
+import 'dart:ffi' as ffi;
+
+import "package:expect/expect.dart";
+
+@ffi.struct
+class C extends ffi.Pointer<ffi.Void> {
+  @ffi.IntPtr()
+  int x;
+  external static int sizeOf();
+}
+
+void main() {
+  final C c = ffi.fromAddress<C>(1);
+  Expect.throws<UnimplementedError>(() => c.x);
+  Expect.throws<UnimplementedError>(() => c.x = 0);
+  Expect.throws<UnimplementedError>(() => C.sizeOf());
+}
diff --git a/tests/ffi/ffi.status b/tests/ffi/ffi.status
new file mode 100644
index 0000000..f56725a
--- /dev/null
+++ b/tests/ffi/ffi.status
@@ -0,0 +1,35 @@
+# Copyright (c) 2019, the Dart project authors.  Please see the AUTHORS file
+# for details. All rights reserved. Use of this source code is governed by a
+# BSD-style license that can be found in the LICENSE file.
+
+[ $runtime != dart_precompiled && $runtime != vm ]
+*: SkipByDesign # FFI is a VM-only feature. (This test suite is part of the default set.)
+
+[ $builder_tag == asan ]
+data_not_asan_test: SkipByDesign # This test tries to allocate too much memory on purpose.
+
+# dartbug.com/35768: Structs not supported on 32-bit.
+[ $arch == ia32 || $arch == arm ]
+function_structs_test: Skip
+function_callbacks_test: Skip
+structs_test: Skip
+
+# dartbug.com/35934
+[ $compiler == app_jitk ]
+dynamic_library_test: Skip
+function_callbacks_test: Skip
+function_structs_test: Skip
+function_test: Skip
+negative_function_test: Skip
+
+[ $arch == x64 || $arch == arm64 ]
+enable_structs_test: SkipByDesign  # Tests that structs don't work on 32-bit systems.
+
+[ $runtime == dart_precompiled ]
+*: Skip # AOT is not yet supported: dartbug.com/35765
+
+[ $arch != arm64 && $arch != ia32 && $arch != x64 ]
+*: Skip # FFI not yet supported on other architectures.
+
+[ $system != android && $system != linux && $system != macos && $system != windows ]
+*: Skip # FFI not yet supported on other OSes.
diff --git a/tests/standalone_2/ffi/function_callbacks_test.dart b/tests/ffi/function_callbacks_test.dart
similarity index 83%
rename from tests/standalone_2/ffi/function_callbacks_test.dart
rename to tests/ffi/function_callbacks_test.dart
index 9817182..0ad50a9 100644
--- a/tests/standalone_2/ffi/function_callbacks_test.dart
+++ b/tests/ffi/function_callbacks_test.dart
@@ -3,6 +3,8 @@
 // BSD-style license that can be found in the LICENSE file.
 //
 // Dart test program for testing dart:ffi function pointers with callbacks.
+//
+// SharedObjects=ffi_test_functions
 
 library FfiTest;
 
@@ -22,7 +24,6 @@
 void main() {
   testFunctionWithFunctionPointer();
   testNativeFunctionWithFunctionPointer();
-  testFromFunction();
 }
 
 ffi.DynamicLibrary ffiTestFunctions =
@@ -75,18 +76,3 @@
 
 typedef ApplyTo42And74Type = int Function(
     ffi.Pointer<ffi.NativeFunction<NativeIntptrBinOp>>);
-
-void testFromFunction() {
-  ffi.Pointer<ffi.NativeFunction<NativeIntptrBinOp>> pointer =
-      ffi.fromFunction(myPlus);
-  Expect.isNotNull(pointer);
-
-  ffi.Pointer<ffi.NativeFunction<NativeApplyTo42And74Type>> p17 =
-      ffiTestFunctions.lookup("ApplyTo42And74");
-  ApplyTo42And74Type applyTo42And74 = p17.asFunction();
-
-  // TODO(dacoharkes): implement this
-
-  // int result = applyTo42And74(pointer);
-  // print(result);
-}
diff --git a/tests/standalone_2/ffi/function_stress_test.dart b/tests/ffi/function_stress_test.dart
similarity index 82%
rename from tests/standalone_2/ffi/function_stress_test.dart
rename to tests/ffi/function_stress_test.dart
index fd3f0ec..1c0d9f4 100644
--- a/tests/standalone_2/ffi/function_stress_test.dart
+++ b/tests/ffi/function_stress_test.dart
@@ -10,6 +10,8 @@
 //
 // NOTE: This test does not produce useful stderr when it fails because the
 // stderr is redirected to a file for reflection.
+//
+// SharedObjects=ffi_test_functions
 
 import 'dart:ffi' as ffi;
 import 'dylib_utils.dart';
@@ -41,8 +43,7 @@
     // Smi.
     await test(watcher, testBoxInt32, mustTriggerGC: false);
     await test(watcher, testBoxDouble);
-    await test(watcher, testBoxSmallPointer);
-    await test(watcher, testBoxLargePointer);
+    await test(watcher, testBoxPointer);
   } finally {
     watcher.dispose();
   }
@@ -85,19 +86,17 @@
   Expect.equals(0x80000000 * -1.0, smallDouble());
 }
 
-final smallPointer = ffiTestFunctions
-    .lookupFunction<NativeNullaryOpPtr, NullaryOpPtr>("SmallPointer");
-
-// Forces boxing into ffi.Pointer. On 32-bit platforms, also forces boxing into
-// Mint inside of ffi.Pointer.
-void testBoxSmallPointer() {
-  Expect.equals(-0x80000000, smallPointer().address);
-}
-
 final largePointer = ffiTestFunctions
     .lookupFunction<NativeNullaryOpPtr, NullaryOpPtr>("LargePointer");
 
-// Forces boxing into ffi.Pointer and ffi.Mint on all platforms.
-void testBoxLargePointer() {
-  Expect.equals(-0x8000000000000000, largePointer().address);
+// Forces boxing into ffi.Pointer and ffi.Mint.
+void testBoxPointer() {
+  ffi.Pointer pointer = largePointer();
+  if (pointer != null) {
+    if (ffi.sizeOf<ffi.Pointer>() == 4) {
+      Expect.equals(0x82000000, pointer.address);
+    } else {
+      Expect.equals(0x8100000082000000, pointer.address);
+    }
+  }
 }
diff --git a/tests/standalone_2/ffi/function_structs_test.dart b/tests/ffi/function_structs_test.dart
similarity index 98%
rename from tests/standalone_2/ffi/function_structs_test.dart
rename to tests/ffi/function_structs_test.dart
index ce7bd11..6f1f906 100644
--- a/tests/standalone_2/ffi/function_structs_test.dart
+++ b/tests/ffi/function_structs_test.dart
@@ -4,6 +4,8 @@
 //
 // Dart test program for testing dart:ffi function pointers with struct
 // arguments.
+//
+// SharedObjects=ffi_test_functions
 
 library FfiTest;
 
diff --git a/tests/standalone_2/ffi/function_test.dart b/tests/ffi/function_test.dart
similarity index 73%
rename from tests/standalone_2/ffi/function_test.dart
rename to tests/ffi/function_test.dart
index d22f771..07f8fc2 100644
--- a/tests/standalone_2/ffi/function_test.dart
+++ b/tests/ffi/function_test.dart
@@ -6,6 +6,7 @@
 //
 // VMOptions=
 // VMOptions=--deterministic --optimization-counter-threshold=10
+// SharedObjects=ffi_test_functions
 
 library FfiTest;
 
@@ -55,10 +56,10 @@
 }
 
 typedef NativeQuadOpSigned = ffi.Int64 Function(
-    ffi.Int64, ffi.Int32, ffi.Int16, ffi.Int8);
+    ffi.Int8, ffi.Int16, ffi.Int32, ffi.Int64);
 typedef QuadOp = int Function(int, int, int, int);
 typedef NativeQuadOpUnsigned = ffi.Uint64 Function(
-    ffi.Uint64, ffi.Uint32, ffi.Uint16, ffi.Uint8);
+    ffi.Uint8, ffi.Uint16, ffi.Uint32, ffi.Uint64);
 
 BinaryOp sumPlus42 =
     ffiTestFunctions.lookupFunction<NativeBinaryOp, BinaryOp>("SumPlus42");
@@ -77,23 +78,92 @@
       -0x8000000000000000, intComputation(0, 0, 0, -0x8000000000000000));
 }
 
-typedef NativeNullaryOpSigned = ffi.Int32 Function();
-typedef NativeNullaryOpUnsigned = ffi.Uint32 Function();
-
-int Function() unsignedOp = ffiTestFunctions
-    .lookup("TestExtension")
-    .cast<ffi.Pointer<ffi.NativeFunction<NativeNullaryOpUnsigned>>>()
+typedef NativeReturnMaxUint8 = ffi.Uint8 Function();
+int Function() returnMaxUint8 = ffiTestFunctions
+    .lookup("ReturnMaxUint8")
+    .cast<ffi.Pointer<ffi.NativeFunction<NativeReturnMaxUint8>>>()
     .asFunction();
 
-int Function() signedOp = ffiTestFunctions
-    .lookup("TestExtension")
-    .cast<ffi.Pointer<ffi.NativeFunction<NativeNullaryOpSigned>>>()
+typedef NativeReturnMaxUint16 = ffi.Uint16 Function();
+int Function() returnMaxUint16 = ffiTestFunctions
+    .lookup("ReturnMaxUint16")
+    .cast<ffi.Pointer<ffi.NativeFunction<NativeReturnMaxUint16>>>()
     .asFunction();
 
-// Test 32-bit (int32_t) -> 64-bit (Dart int) sign extension and truncation.
+typedef NativeReturnMaxUint32 = ffi.Uint32 Function();
+int Function() returnMaxUint32 = ffiTestFunctions
+    .lookup("ReturnMaxUint32")
+    .cast<ffi.Pointer<ffi.NativeFunction<NativeReturnMaxUint32>>>()
+    .asFunction();
+
+typedef NativeReturnMinInt8 = ffi.Int8 Function();
+int Function() returnMinInt8 = ffiTestFunctions
+    .lookup("ReturnMinInt8")
+    .cast<ffi.Pointer<ffi.NativeFunction<NativeReturnMinInt8>>>()
+    .asFunction();
+
+typedef NativeReturnMinInt16 = ffi.Int16 Function();
+int Function() returnMinInt16 = ffiTestFunctions
+    .lookup("ReturnMinInt16")
+    .cast<ffi.Pointer<ffi.NativeFunction<NativeReturnMinInt16>>>()
+    .asFunction();
+
+typedef NativeReturnMinInt32 = ffi.Int32 Function();
+int Function() returnMinInt32 = ffiTestFunctions
+    .lookup("ReturnMinInt32")
+    .cast<ffi.Pointer<ffi.NativeFunction<NativeReturnMinInt32>>>()
+    .asFunction();
+
+typedef NativeTakeMaxUint8 = ffi.IntPtr Function(ffi.Uint8);
+int Function(int) takeMaxUint8 = ffiTestFunctions
+    .lookup("TakeMaxUint8")
+    .cast<ffi.Pointer<ffi.NativeFunction<NativeTakeMaxUint8>>>()
+    .asFunction();
+
+typedef NativeTakeMaxUint16 = ffi.IntPtr Function(ffi.Uint16);
+int Function(int) takeMaxUint16 = ffiTestFunctions
+    .lookup("TakeMaxUint16")
+    .cast<ffi.Pointer<ffi.NativeFunction<NativeTakeMaxUint16>>>()
+    .asFunction();
+
+typedef NativeTakeMaxUint32 = ffi.IntPtr Function(ffi.Uint32);
+int Function(int) takeMaxUint32 = ffiTestFunctions
+    .lookup("TakeMaxUint32")
+    .cast<ffi.Pointer<ffi.NativeFunction<NativeTakeMaxUint32>>>()
+    .asFunction();
+
+typedef NativeTakeMinInt8 = ffi.IntPtr Function(ffi.Int8);
+int Function(int) takeMinInt8 = ffiTestFunctions
+    .lookup("TakeMinInt8")
+    .cast<ffi.Pointer<ffi.NativeFunction<NativeTakeMinInt8>>>()
+    .asFunction();
+
+typedef NativeTakeMinInt16 = ffi.IntPtr Function(ffi.Int16);
+int Function(int) takeMinInt16 = ffiTestFunctions
+    .lookup("TakeMinInt16")
+    .cast<ffi.Pointer<ffi.NativeFunction<NativeTakeMinInt16>>>()
+    .asFunction();
+
+typedef NativeTakeMinInt32 = ffi.IntPtr Function(ffi.Int32);
+int Function(int) takeMinInt32 = ffiTestFunctions
+    .lookup("TakeMinInt32")
+    .cast<ffi.Pointer<ffi.NativeFunction<NativeTakeMinInt32>>>()
+    .asFunction();
+
 void testExtension() {
-  Expect.equals(unsignedOp(), 0x80000000);
-  Expect.equals(signedOp(), 0xffffffff80000000);
+  Expect.equals(returnMaxUint8(), 0xff);
+  Expect.equals(returnMaxUint16(), 0xffff);
+  Expect.equals(returnMaxUint32(), 0xffffffff);
+  Expect.equals(returnMinInt8(), -0x80);
+  Expect.equals(returnMinInt16(), -0x8000);
+  Expect.equals(returnMinInt32(), -0x80000000);
+
+  Expect.equals(takeMaxUint8(0xff), 1);
+  Expect.equals(takeMaxUint16(0xffff), 1);
+  Expect.equals(takeMaxUint32(0xffffffff), 1);
+  Expect.equals(takeMinInt8(0x80), 1);
+  Expect.equals(takeMinInt16(0x8000), 1);
+  Expect.equals(takeMinInt32(0x80000000), 1);
 }
 
 QuadOp uintComputation = ffiTestFunctions
@@ -118,8 +188,6 @@
     .lookupFunction<NativeSenaryOp, SenaryOp>("SumSmallNumbers");
 
 void testTruncation() {
-  // TODO(dacoharkes): implement truncation and sign extension in trampolines
-  // for values smaller than 32 bits.
   sumSmallNumbers(128, 0, 0, 0, 0, 0);
   sumSmallNumbers(-129, 0, 0, 0, 0, 0);
   sumSmallNumbers(0, 0, 0, 256, 0, 0);
diff --git a/tests/standalone_2/ffi/gc_helper.dart b/tests/ffi/gc_helper.dart
similarity index 86%
rename from tests/standalone_2/ffi/gc_helper.dart
rename to tests/ffi/gc_helper.dart
index 5e9431d..abe0454 100644
--- a/tests/standalone_2/ffi/gc_helper.dart
+++ b/tests/ffi/gc_helper.dart
@@ -9,11 +9,15 @@
 
 DynamicLibrary ffiTestFunctions = dlopenPlatformSpecific("ffi_test_functions");
 
+const bool isProduct = const bool.fromEnvironment("dart.vm.product");
+
 abstract class GCWatcher {
   factory GCWatcher() => _GCWatcherImpl();
   factory GCWatcher.dummy() => _MockGCWatcher();
   factory GCWatcher.ifAvailable() =>
-      Platform.isWindows ? GCWatcher.dummy() : GCWatcher();
+      (Platform.isWindows || Platform.isAndroid || isProduct)
+          ? GCWatcher.dummy()
+          : GCWatcher();
 
   Future<int> size();
   void dispose();
diff --git a/tests/standalone_2/ffi/negative_function_test.dart b/tests/ffi/negative_function_test.dart
similarity index 97%
rename from tests/standalone_2/ffi/negative_function_test.dart
rename to tests/ffi/negative_function_test.dart
index a529d67..f851728 100644
--- a/tests/standalone_2/ffi/negative_function_test.dart
+++ b/tests/ffi/negative_function_test.dart
@@ -3,6 +3,8 @@
 // BSD-style license that can be found in the LICENSE file.
 //
 // Dart test program for testing error handling with dart:ffi functions.
+//
+// SharedObjects=ffi_test_functions
 
 import 'dart:ffi' as ffi;
 import 'dylib_utils.dart';
diff --git a/tests/standalone_2/ffi/static_checks_test.dart b/tests/ffi/static_checks_test.dart
similarity index 99%
rename from tests/standalone_2/ffi/static_checks_test.dart
rename to tests/ffi/static_checks_test.dart
index 15e162a..e0ab94c 100644
--- a/tests/standalone_2/ffi/static_checks_test.dart
+++ b/tests/ffi/static_checks_test.dart
@@ -3,6 +3,8 @@
 // BSD-style license that can be found in the LICENSE file.
 //
 // Dart test program for testing dart:ffi extra checks
+//
+// SharedObjects=ffi_test_dynamic_library
 
 library FfiTest;
 
diff --git a/tests/standalone_2/ffi/structs_test.dart b/tests/ffi/structs_test.dart
similarity index 100%
rename from tests/standalone_2/ffi/structs_test.dart
rename to tests/ffi/structs_test.dart
diff --git a/tests/standalone_2/ffi/subtype_test.dart b/tests/ffi/subtype_test.dart
similarity index 100%
rename from tests/standalone_2/ffi/subtype_test.dart
rename to tests/ffi/subtype_test.dart
diff --git a/tests/standalone_2/ffi/very_large_struct.dart b/tests/ffi/very_large_struct.dart
similarity index 100%
rename from tests/standalone_2/ffi/very_large_struct.dart
rename to tests/ffi/very_large_struct.dart
diff --git a/tests/language_2/async_star/async_star_invalid_test.dart b/tests/language_2/async_star/async_star_invalid_test.dart
index 529cf25..0c5199f 100644
--- a/tests/language_2/async_star/async_star_invalid_test.dart
+++ b/tests/language_2/async_star/async_star_invalid_test.dart
@@ -14,8 +14,8 @@
   asyncStart();
   Stream<String> f() async* {
     // Invalid syntax.
-    yield ("a", "b"); //# 01: compile-time error
-    yield yield "twice"; //# 02: compile-time error
+    yield ("a", "b"); //# 01: syntax error
+    yield yield "twice"; //# 02: syntax error
 
     // Valid but curious syntax.
     yield throw "throw"; //# 03: runtime error
diff --git a/tests/language_2/const_factory_with_body_test.dart b/tests/language_2/const_factory_with_body_test.dart
index 709b8d5..eb6cdbf 100644
--- a/tests/language_2/const_factory_with_body_test.dart
+++ b/tests/language_2/const_factory_with_body_test.dart
@@ -5,7 +5,7 @@
 // Tests that a "const factory" with body produces a compile-time error.
 
 class ConstFactoryWithBody {
-  const factory ConstFactoryWithBody.one() { } //# 01: syntax error
+  const factory ConstFactoryWithBody.one() { } //# 01: compile-time error
 }
 
 main() {
diff --git a/tests/language_2/constants_2018/const_type_test.dart b/tests/language_2/constants_2018/const_type_test.dart
new file mode 100644
index 0000000..14a9bf9
--- /dev/null
+++ b/tests/language_2/constants_2018/const_type_test.dart
@@ -0,0 +1,102 @@
+// Copyright (c) 2019, the Dart project authors.  Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+// SharedOptions=--enable-experiment=constant-update-2018
+
+// Tests that types do matter when an expression is evaluated as constant.
+
+main() {
+  const C c = C();
+  const T.test01(c); //# 01: compile-time error
+  const T.test02(c, c); //# 02: compile-time error
+  const T.test03(c, c); //# 03: compile-time error
+  const T.test04(c, c); //# 04: compile-time error
+  const T.test05(c, c); //# 05: compile-time error
+  const T.test06(c, c); //# 06: compile-time error
+  const T.test07(c, c); //# 07: compile-time error
+  const T.test08(c, c); //# 08: compile-time error
+  const T.test09(c, c); //# 09: compile-time error
+  const T.test10(c, c); //# 10: compile-time error
+  const T.test11(c, c); //# 11: compile-time error
+  const T.test12(c, c); //# 12: compile-time error
+  const T.test13(c, c); //# 13: compile-time error
+  const T.test14(c); //# 14: compile-time error
+  const T.test15(c, c); //# 15: compile-time error
+  const T.test16(c, c); //# 16: compile-time error
+  const T.test17(c, c); //# 17: compile-time error
+  const T.test18(c, c); //# 18: compile-time error
+  const T.test19(c); //# 19: compile-time error
+
+  const v01 = false ? c : -c; //# 20: compile-time error
+  const v02 = false ? c : c + c; //# 21: compile-time error
+  const v03 = false ? c : c - c; //# 22: compile-time error
+  const v04 = false ? c : c * c; //# 23: compile-time error
+  const v05 = false ? c : c / c; //# 24: compile-time error
+  const v06 = false ? c : c ~/ c; //# 25: compile-time error
+  const v07 = false ? c : c % c; //# 26: compile-time error
+  const v08 = false ? c : c << c; //# 27: compile-time error
+  const v09 = false ? c : c >> c; //# 28: compile-time error
+  const v10 = false ? c : c >>> c; //# 29: compile-time error
+  const v11 = false ? c : c & c; //# 30: compile-time error
+  const v12 = false ? c : c | c; //# 31: compile-time error
+  const v13 = false ? c : c ^ c; //# 32: compile-time error
+  const v14 = false ? c : ~c; //# 33: compile-time error
+  const v15 = false ? c : c < c; //# 34: compile-time error
+  const v16 = false ? c : c > c; //# 35: compile-time error
+  const v17 = false ? c : c <= c; //# 36: compile-time error
+  const v18 = false ? c : c >= c; //# 37: compile-time error
+  const v19 = false ? c : c.length; //# 38: compile-time error
+}
+
+// Each expression in the forwarding generative constructors must be
+// potentially constant. They are only checked for being actually
+// constant when the constructor is invoked.
+class T {
+  const T(C o);
+  const T.test01(C x) : this(-x);
+  const T.test02(C x, C y) : this(x + y);
+  const T.test03(C x, C y) : this(x - y);
+  const T.test04(C x, C y) : this(x * y);
+  const T.test05(C x, C y) : this(x / y);
+  const T.test06(C x, C y) : this(x ~/ y);
+  const T.test07(C x, C y) : this(x % y);
+  const T.test08(C x, C y) : this(x << y);
+  const T.test09(C x, C y) : this(x >> y);
+  const T.test10(C x, C y) : this(x >>> y); //# 10: continued
+  const T.test11(C x, C y) : this(x & y);
+  const T.test12(C x, C y) : this(x | y);
+  const T.test13(C x, C y) : this(x ^ y);
+  const T.test14(C x) : this(~x);
+  const T.test15(C x, C y) : this(x < y);
+  const T.test16(C x, C y) : this(x > y);
+  const T.test17(C x, C y) : this(x <= y);
+  const T.test18(C x, C y) : this(x >= y);
+  const T.test19(C x) : this(x.length);
+}
+
+class C {
+  const C();
+  C operator -() => this;
+  C operator +(C other) => this;
+  C operator -(C other) => this;
+  C operator *(C other) => this;
+  C operator /(C other) => this;
+  C operator ~/(C other) => this;
+  C operator %(C other) => this;
+  C operator <<(C other) => this;
+  C operator >>(C other) => this;
+  // Remove the multi-test markers and one of the lines below,
+  // when `>>>` is implemented.
+  C operator >>>(C other) => this;  //# 10: continued
+  C operator >>>(C other) => this;  //# 29: continued
+  C operator &(C other) => this;
+  C operator |(C other) => this;
+  C operator ^(C other) => this;
+  C operator ~() => this;
+  C operator <(C other) => this;
+  C operator >(C other) => this;
+  C operator <=(C other) => this;
+  C operator >=(C other) => this;
+  C get length => this;
+}
\ No newline at end of file
diff --git a/tests/language_2/constants_2018/constant_type_literal_test.dart b/tests/language_2/constants_2018/constant_type_literal_test.dart
new file mode 100644
index 0000000..717825a
--- /dev/null
+++ b/tests/language_2/constants_2018/constant_type_literal_test.dart
@@ -0,0 +1,35 @@
+// Copyright (c) 2019, the Dart project authors.  Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+// SharedOptions=--enable-experiment=constant-update-2018
+
+// Tests that non-deferred type literals are constant expressions.
+
+import "dart:core";
+import "dart:core" as core;
+import "dart:core" deferred as dcore;
+
+// Declares F function type alias, M mixin and C class.
+import "constant_type_literal_types.dart";
+import "constant_type_literal_types.dart" as p;
+import "constant_type_literal_types.dart" deferred as d;
+
+main() {
+  const Test(int, core.int);
+  const Test(C, p.C);
+  const Test(M, p.M);
+  const Test(F, p.F);
+  const c1 = //
+      dcore. //# 01: compile-time error
+          int;
+  const Test(c1, int);
+  const c2 = //
+      d. //# 02: compile-time error
+          C;
+  const Test(c2, C);
+}
+
+class Test {
+  const Test(Type t1, Type t2) : assert(identical(t1, t2));
+}
diff --git a/tests/language_2/constants_2018/constant_type_literal_types.dart b/tests/language_2/constants_2018/constant_type_literal_types.dart
new file mode 100644
index 0000000..d3f5f2c
--- /dev/null
+++ b/tests/language_2/constants_2018/constant_type_literal_types.dart
@@ -0,0 +1,12 @@
+// Copyright (c) 2019, the Dart project authors.  Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+// Helper file for constant_type_literal_test.dart.
+// Tests that non-deferred type literals are constant expressions.
+
+typedef F = void Function();
+
+class C {}
+
+mixin M {}
diff --git a/tests/language_2/constants_2018/constant_types_test.dart b/tests/language_2/constants_2018/constant_types_test.dart
new file mode 100644
index 0000000..5262729
--- /dev/null
+++ b/tests/language_2/constants_2018/constant_types_test.dart
@@ -0,0 +1,49 @@
+// Copyright (c) 2019, the Dart project authors.  Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+// SharedOptions=--enable-experiment=constant-update-2018
+
+// Tests that only constant types are allowed in some positions,
+// not type parameters.
+
+import "package:expect/expect.dart";
+
+class T<X> {
+  final Object value;
+  const T.test1()
+      : value = const //
+            <X> //# 01: compile-time error
+            [];
+  const T.test2(Object o)
+      : value = o //
+            as X //# 02: compile-time error
+  ;
+  const T.test3(Object o)
+      : value = o //
+            is X //# 03: compile-time error
+  ;
+  const T.test4()
+      : value = null //
+            ?? X //# 04: compile-time error
+  ;
+}
+
+class T2 {
+  final Object value;
+  const T2.test1() : value = const <int>[];
+  const T2.test2(Object o) : value = o as int;
+  const T2.test3(Object o) : value = o is int;
+  const T2.test4() : value = int;
+}
+
+main() {
+  // The errors in class T are errors independently of whether the
+  // constructor is invoked or not.
+
+  // Constant type expressions are allowed.
+  Expect.equals(const <int>[], const T2.test1().value);
+  Expect.equals(2, const T2.test2(2).value);
+  Expect.isTrue(const T2.test3(2).value);
+  Expect.equals(int, const T2.test4().value);
+}
diff --git a/tests/language_2/constants_2018/equals_test.dart b/tests/language_2/constants_2018/equals_test.dart
new file mode 100644
index 0000000..fbbc876
--- /dev/null
+++ b/tests/language_2/constants_2018/equals_test.dart
@@ -0,0 +1,65 @@
+// Copyright (c) 2019, the Dart project authors.  Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+// SharedOptions=--enable-experiment=constant-update-2018
+
+// Tests that equality is allowed for receivers of specific types.
+
+import "package:expect/expect.dart";
+
+main() {
+  const c = C(); // Does not override operator==.
+  const d = D(); // Overrides operator==.
+
+  // Allowed if receiver is int, double, String, bool or Null, ...
+  Expect.isTrue(const T.eq(1, 1).value);
+  Expect.isTrue(const T.eq(1.5, 1.5).value);
+  Expect.isTrue(const T.eq("", "").value);
+  Expect.isTrue(const T.eq(true, true).value);
+  Expect.isTrue(const T.eq(null, null).value);
+
+  Expect.isFalse(const T.eq(1, c).value);
+  Expect.isFalse(const T.eq(1.5, c).value);
+  Expect.isFalse(const T.eq("", c).value);
+  Expect.isFalse(const T.eq(true, c).value);
+  Expect.isFalse(const T.eq(null, c).value);
+
+  Expect.isFalse(const T.eq(1, d).value);
+  Expect.isFalse(const T.eq(1.5, d).value);
+  Expect.isFalse(const T.eq("", d).value);
+  Expect.isFalse(const T.eq(true, d).value);
+  Expect.isFalse(const T.eq(null, d).value);
+
+  // ... or if second operand is Null.
+  Expect.isFalse(const T.eq(1, null).value);
+  Expect.isFalse(const T.eq(1.5, null).value);
+  Expect.isFalse(const T.eq("", null).value);
+  Expect.isFalse(const T.eq(false, null).value);
+  Expect.isFalse(const T.eq(c, null).value);
+  Expect.isFalse(const T.eq(d, null).value);
+
+  // Otherwise not allowed.
+  const T.eq(c, c); //# 01: compile-time error
+  const T.eq(c, 1); //# 02: compile-time error
+  const T.eq(c, ""); //# 03: compile-time error
+  const T.eq(E.value1, E.value2); //# 04: compile-time error
+}
+
+class T {
+  final Object value;
+  const T.eq(Object o1, Object o2) : value = o1 == o2;
+}
+
+/// Class that does not override operator==.
+class C {
+  const C();
+}
+
+/// Class that overrides operator==.
+class D {
+  const D();
+  bool operator ==(Object other) => identical(this, other);
+}
+
+enum E { value1, value2 }
diff --git a/tests/language_2/constants_2018/potential_const_dynamic_test.dart b/tests/language_2/constants_2018/potential_const_dynamic_test.dart
new file mode 100644
index 0000000..d16f5e4
--- /dev/null
+++ b/tests/language_2/constants_2018/potential_const_dynamic_test.dart
@@ -0,0 +1,78 @@
+// Copyright (c) 2019, the Dart project authors.  Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+// SharedOptions=--enable-experiment=constant-update-2018
+
+// Tests that a dynamic type does not affect whether an expression is
+// potentially constant, the actual type of the value of an experssion
+// only matters if the expression is evaluated as a constant.
+
+main() {
+  Object c = C();
+  T.test01(c);
+  T.test02(c, c);
+  T.test03(c, c);
+  T.test04(c, c);
+  T.test05(c, c);
+  T.test06(c, c);
+  T.test07(c, c);
+  T.test08(c, c);
+  T.test09(c, c);
+  T.test10(c, c); //# sh3: ok
+  T.test11(c, c);
+  T.test12(c, c);
+  T .test13(c, c);
+  T.test14(c);
+  T.test15(c, c);
+  T.test16(c, c);
+  T.test17(c, c);
+  T.test18(c, c);
+  T.test19(c);
+}
+
+class T {
+  const T(Object o);
+  const T.test01(dynamic x) : this(-x);
+  const T.test02(dynamic x, dynamic y) : this(x + y);
+  const T.test03(dynamic x, dynamic y) : this(x - y);
+  const T.test04(dynamic x, dynamic y) : this(x * y);
+  const T.test05(dynamic x, dynamic y) : this(x / y);
+  const T.test06(dynamic x, dynamic y) : this(x ~/ y);
+  const T.test07(dynamic x, dynamic y) : this(x % y);
+  const T.test08(dynamic x, dynamic y) : this(x << y);
+  const T.test09(dynamic x, dynamic y) : this(x >> y);
+  const T.test10(dynamic x, dynamic y) : this(x >>> y); //# sh3: continued
+  const T.test11(dynamic x, dynamic y) : this(x & y);
+  const T.test12(dynamic x, dynamic y) : this(x | y);
+  const T.test13(dynamic x, dynamic y) : this(x ^ y);
+  const T.test14(dynamic x) : this(~x);
+  const T.test15(dynamic x, dynamic y) : this(x < y);
+  const T.test16(dynamic x, dynamic y) : this(x > y);
+  const T.test17(dynamic x, dynamic y) : this(x <= y);
+  const T.test18(dynamic x, dynamic y) : this(x >= y);
+  const T.test19(dynamic x) : this(x.length);
+}
+
+class C {
+  const C();
+  dynamic operator -() => this;
+  dynamic operator +(dynamic other) => this;
+  dynamic operator -(dynamic other) => this;
+  dynamic operator *(dynamic other) => this;
+  dynamic operator /(dynamic other) => this;
+  dynamic operator ~/(dynamic other) => this;
+  dynamic operator %(dynamic other) => this;
+  dynamic operator <<(dynamic other) => this;
+  dynamic operator >>(dynamic other) => this;
+  dynamic operator >>>(dynamic other) => this; //# sh3: continued
+  dynamic operator &(dynamic other) => this;
+  dynamic operator |(dynamic other) => this;
+  dynamic operator ^(dynamic other) => this;
+  dynamic operator ~() => this;
+  dynamic operator <(dynamic other) => this;
+  dynamic operator >(dynamic other) => this;
+  dynamic operator <=(dynamic other) => this;
+  dynamic operator >=(dynamic other) => this;
+  dynamic get length => this;
+}
\ No newline at end of file
diff --git a/tests/language_2/constants_2018/potential_const_shortcircuit_test.dart b/tests/language_2/constants_2018/potential_const_shortcircuit_test.dart
new file mode 100644
index 0000000..680ffee
--- /dev/null
+++ b/tests/language_2/constants_2018/potential_const_shortcircuit_test.dart
@@ -0,0 +1,59 @@
+// Copyright (c) 2019, the Dart project authors.  Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+// SharedOptions=--enable-experiment=constant-update-2018
+
+// Tests that short-circuit operators do not care about the unevaluated part.
+
+import "package:expect/expect.dart";
+
+main() {
+  const C c = C();
+  // Short-circuited operations.
+  // Non-taken branch of ?:.
+  const c1 = true ? c : c + c;
+  const c2 = false ? c + c : c;
+  // Non-taken part of &&, ||, ??.
+  const c3 = (c != null) || c < c;
+  const c4 = (c == null) && c < c;
+  const c5 = c ?? c + c;
+  Expect.identical(c, c1);
+  Expect.identical(c, c2);
+  Expect.isTrue(c3);
+  Expect.isFalse(c4);
+  Expect.identical(c, c5);
+  // Nested short-circuiting.
+  const c6 = true ? c == null && c + c : c < c;
+  Expect.isFalse(c6);
+
+  // Concrete use-case.
+  Expect.equals(1, const T.length("a").value);
+  Expect.equals(0, const T.length("").value);
+  Expect.equals(0, const T.length(null).value);
+  Expect.equals(1, T.length([1]).value);
+  Expect.equals(0, T.length([]).value);
+  Expect.equals(0, T.length(null).value);
+
+  Expect.equals(1, const T.asserts("a").value);
+  Expect.equals(0, const T.asserts("").value);
+  Expect.equals(0, const T.asserts(null).value);
+  Expect.equals(1, T.asserts([1]).value);
+  Expect.equals(0, T.asserts([]).value);
+  Expect.equals(0, T.asserts(null).value);
+}
+
+class T {
+  final Object value;
+  const T(this.value);
+  const T.length(dynamic l) : value = (l == null ? 0 : l.length);
+  const T.asserts(dynamic l)
+      : assert(l == null || l.length < 2),
+        value = (l ?? "").length;
+}
+
+class C {
+  const C();
+  dynamic operator +(dynamic other) => throw "Never";
+  bool operator <(dynamic other) => throw "Never";
+}
diff --git a/tests/language_2/constants_2018/potential_const_type_test.dart b/tests/language_2/constants_2018/potential_const_type_test.dart
new file mode 100644
index 0000000..6438e8b
--- /dev/null
+++ b/tests/language_2/constants_2018/potential_const_type_test.dart
@@ -0,0 +1,97 @@
+// Copyright (c) 2019, the Dart project authors.  Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+// SharedOptions=--enable-experiment=constant-update-2018
+
+// Tests that types do not affect whether an expression is potentially
+// constant, they only matter if the expression is evaluated as a constant.
+
+main() {
+  const C c = C();
+  T.test01(c);
+  T.test02(c, c);
+  T.test03(c, c);
+  T.test04(c, c);
+  T.test05(c, c);
+  T.test06(c, c);
+  T.test07(c, c);
+  T.test08(c, c);
+  T.test09(c, c);
+  T.test10(c, c); //# sh3: ok
+  T.test11(c, c);
+  T.test12(c, c);
+  T.test13(c, c);
+  T.test14(c);
+  T.test15(c, c);
+  T.test16(c, c);
+  T.test17(c, c);
+  T.test18(c, c);
+  T.test19(c);
+
+  const v01 = true ? c : -c;
+  const v02 = true ? c : c + c;
+  const v03 = true ? c : c - c;
+  const v04 = true ? c : c * c;
+  const v05 = true ? c : c / c;
+  const v06 = true ? c : c ~/ c;
+  const v07 = true ? c : c % c;
+  const v08 = true ? c : c << c;
+  const v09 = true ? c : c >> c;
+  const v10 = true ? c : c >>> c; //# sh3: continued
+  const v11 = true ? c : c & c;
+  const v12 = true ? c : c | c;
+  const v13 = true ? c : c ^ c;
+  const v14 = true ? c : ~c;
+  const v15 = true ? c : c < c;
+  const v16 = true ? c : c > c;
+  const v17 = true ? c : c <= c;
+  const v18 = true ? c : c >= c;
+  const v19 = true ? c : c.length;
+}
+
+class T {
+  const T(C o);
+  const T.test01(C x) : this(-x);
+  const T.test02(C x, C y) : this(x + y);
+  const T.test03(C x, C y) : this(x - y);
+  const T.test04(C x, C y) : this(x * y);
+  const T.test05(C x, C y) : this(x / y);
+  const T.test06(C x, C y) : this(x ~/ y);
+  const T.test07(C x, C y) : this(x % y);
+  const T.test08(C x, C y) : this(x << y);
+  const T.test09(C x, C y) : this(x >> y);
+  const T.test10(C x, C y) : this(x >>> y); //# sh3: continued
+  const T.test11(C x, C y) : this(x & y);
+  const T.test12(C x, C y) : this(x | y);
+  const T.test13(C x, C y) : this(x ^ y);
+  const T.test14(C x) : this(~x);
+  const T.test15(C x, C y) : this(x < y);
+  const T.test16(C x, C y) : this(x > y);
+  const T.test17(C x, C y) : this(x <= y);
+  const T.test18(C x, C y) : this(x >= y);
+  const T.test19(C x) : this(x.length);
+}
+
+class C {
+  const C();
+  C operator -() => this;
+  C operator +(C other) => this;
+  C operator -(C other) => this;
+  C operator *(C other) => this;
+  C operator /(C other) => this;
+  C operator ~/(C other) => this;
+  C operator %(C other) => this;
+  C operator <<(C other) => this;
+  C operator >>(C other) => this;
+  C operator >>>(C other) => this; //# sh3: continued
+  C operator &(C other) => this;
+  C operator |(C other) => this;
+  C operator ^(C other) => this;
+  C operator ~() => this;
+  C operator <(C other) => this;
+  C operator >(C other) => this;
+  C operator <=(C other) => this;
+  C operator >=(C other) => this;
+  C get length => this;
+}
\ No newline at end of file
diff --git a/tests/language_2/constants_2018/type_cast_test.dart b/tests/language_2/constants_2018/type_cast_test.dart
new file mode 100644
index 0000000..3171204
--- /dev/null
+++ b/tests/language_2/constants_2018/type_cast_test.dart
@@ -0,0 +1,32 @@
+// Copyright (c) 2019, the Dart project authors.  Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+// SharedOptions=--enable-experiment=constant-update-2018
+
+// Tests that type casts (as) are allowed.
+
+main() {
+  const t1 = T.implicit(Sub());
+  const t2 = T.explicit(Sub());
+  const t3 = T.implicit(null);
+  const t4 = T.explicit(null);
+
+  // Inline.
+  const Object o = "";
+  const len = (o as String).length;
+}
+
+class Super {
+  const Super();
+}
+
+class Sub extends Super {
+  const Sub();
+}
+
+class T {
+  final Sub value;
+  const T.implicit(Super s) : value = s;
+  const T.explicit(Super s) : value = s as Sub;
+}
diff --git a/tests/language_2/constants_2018/type_check_test.dart b/tests/language_2/constants_2018/type_check_test.dart
new file mode 100644
index 0000000..c5ca055
--- /dev/null
+++ b/tests/language_2/constants_2018/type_check_test.dart
@@ -0,0 +1,43 @@
+// Copyright (c) 2019, the Dart project authors.  Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+// SharedOptions=--enable-experiment=constant-update-2018
+
+// Tests that type checks (is) are allowed.
+
+import "package:expect/expect.dart";
+
+main() {
+  const c = C();
+  const l = [1];
+  const s = "a";
+
+  Expect.equals(1, const T.length(s, 42).value);
+  Expect.equals(42, const T.length(l, 42).value);
+  Expect.equals(1, const T.length2(s, 42).value);
+  Expect.equals(42, const T.length2(l, 42).value);
+
+  Expect.equals(3, const T.sum(1, 2).value);
+  Expect.equals(3.7, const T.sum(1.5, 2.2).value);
+  Expect.equals("abc", const T.sum("a", "bc").value);
+  Expect.equals("a", const T.sum("a", 2).value);
+}
+
+class T {
+  final Object value;
+  const T.length(dynamic l, int defaultValue)
+      : value = l is String ? l.length : defaultValue;
+  const T.length2(dynamic l, int defaultValue)
+      : value = l is! String ? defaultValue : l.length;
+  const T.sum(dynamic o1, dynamic o2)
+      : value = ((o1 is num) & (o2 is num)) | ((o1 is String) & (o2 is String))
+            ? o1 + o2
+            : o1;
+}
+
+class C {
+  const C();
+  dynamic operator +(dynamic other) => throw "Never";
+  bool operator <(dynamic other) => throw "Never";
+}
diff --git a/tests/language_2/constructor_reference_test.dart b/tests/language_2/constructor_reference_test.dart
index 1dae4a2..173320c 100644
--- a/tests/language_2/constructor_reference_test.dart
+++ b/tests/language_2/constructor_reference_test.dart
@@ -14,27 +14,27 @@
   new Foo.bar.baz(); //# 03: compile-time error
   new Foo<int>(); //# 04: ok
   new Foo<int>.bar(); //# 05: ok
-  new Foo<int>.bar.baz(); //# 06: compile-time error
+  new Foo<int>.bar.baz(); //# 06: syntax error
   new Foo.bar<int>(); //# 07: compile-time error
   new Foo.bar<int>.baz(); //# 08: compile-time error
-  new Foo.bar.baz<int>(); //# 09: compile-time error
+  new Foo.bar.baz<int>(); //# 09: syntax error
 
   const Foo(); //# 11: ok
   const Foo.bar(); //# 12: ok
   const Foo.bar.baz(); //# 13: compile-time error
   const Foo<int>(); //# 14: ok
   const Foo<int>.bar(); //# 15: ok
-  const Foo<int>.bar.baz(); //# 16: compile-time error
+  const Foo<int>.bar.baz(); //# 16: syntax error
   const Foo.bar<int>(); //# 17: compile-time error
   const Foo.bar<int>.baz(); //# 18: compile-time error
-  const Foo.bar.baz<int>(); //# 19: compile-time error
+  const Foo.bar.baz<int>(); //# 19: syntax error
 
   Foo(); //# 21: ok
   Foo.bar(); //# 22: ok
   Foo.bar.baz(); //# 23: compile-time error
   Foo<int>(); //# 24: ok
   Foo<int>.bar(); //# 25: ok
-  Foo<int>.bar.baz(); //# 26: compile-time error
+  Foo<int>.bar.baz(); //# 26: syntax error
   Foo.bar<int>(); //# 27: compile-time error
   Foo.bar<int>.baz(); //# 28: compile-time error
   Foo.bar.baz<int>(); //# 29: compile-time error
diff --git a/tests/language_2/constructor_with_type_parameters_test.dart b/tests/language_2/constructor_with_type_parameters_test.dart
index 203e2ce..8df1733 100644
--- a/tests/language_2/constructor_with_type_parameters_test.dart
+++ b/tests/language_2/constructor_with_type_parameters_test.dart
@@ -6,23 +6,23 @@
   Bar() {} //# 01: ok
   Bar.boo() {} //# 02: ok
   Bar<E>() {} //# 03: compile-time error
-  Bar<E>.boo() {} //# 04: compile-time error
-  Bar.boo<E>() {} //# 05: compile-time error
-  Bar.boo<E>.baz() {} //# 06: compile-time error
+  Bar<E>.boo() {} //# 04: syntax error
+  Bar.boo<E>() {} //# 05: syntax error
+  Bar.boo<E>.baz() {} //# 06: syntax error
 
   Bar(); //# 07: ok
   Bar.boo(); //# 08: ok
   Bar<E>(); //# 09: compile-time error
-  Bar<E>.boo(); //# 10: compile-time error
-  Bar.boo<E>(); //# 11: compile-time error
-  Bar.boo<E>.baz(); //# 12: compile-time error
+  Bar<E>.boo(); //# 10: syntax error
+  Bar.boo<E>(); //# 11: syntax error
+  Bar.boo<E>.baz(); //# 12: syntax error
 
   const Bar(); //# 13: ok
   const Bar.boo(); //# 14: ok
-  const Bar<E>(); //# 15: compile-time error
-  const Bar<E>.boo(); //# 16: compile-time error
-  const Bar.boo<E>(); //# 17: compile-time error
-  const Bar.boo<E>.baz(); //# 18: compile-time error
+  const Bar<E>(); //# 15: syntax error
+  const Bar<E>.boo(); //# 16: syntax error
+  const Bar.boo<E>(); //# 17: syntax error
+  const Bar.boo<E>.baz(); //# 18: syntax error
 }
 
 main() {}
diff --git a/tests/language_2/control_flow_collections/await_for_inference_test.dart b/tests/language_2/control_flow_collections/await_for_inference_test.dart
new file mode 100644
index 0000000..d4d4bb8
--- /dev/null
+++ b/tests/language_2/control_flow_collections/await_for_inference_test.dart
@@ -0,0 +1,112 @@
+// Copyright (c) 2019, the Dart project authors.  Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+// SharedOptions=--enable-experiment=control-flow-collections,spread-collections,constant-update-2018
+
+// Test how await for interacts with inference.
+import "package:async_helper/async_helper.dart";
+import 'package:expect/expect.dart';
+
+import 'utils.dart';
+
+Stream<int> stream() => Stream.fromIterable([1]);
+
+void main() {
+  asyncTest(() async {
+    await testBottomUpInference();
+    await testLoopVariableInference();
+    await testTopDownInference();
+  });
+}
+
+Future<void> testBottomUpInference() async {
+  // Lists.
+  Expect.type<List<int>>([await for (var i in stream()) 1]);
+  Expect.type<List<int>>(
+      [await for (var i in stream()) 1, await for (var i in stream()) 2]);
+  Expect.type<List<num>>(
+      [await for (var i in stream()) 1, await for (var i in stream()) 0.2]);
+  Expect.type<List<int>>([await for (var i in stream()) 1, 2]);
+  Expect.type<List<num>>([await for (var i in stream()) 1, 0.2]);
+  Expect.type<List<dynamic>>([await for (var i in stream()) ...[]]);
+  Expect.type<List<int>>([await for (var i in stream()) ...<int>[]]);
+
+  // Maps.
+  Expect.type<Map<int, int>>({await for (var i in stream()) 1: 1});
+  Expect.type<Map<int, int>>(
+      {await for (var i in stream()) 1: 1, await for (var i in stream()) 2: 2});
+  Expect.type<Map<num, num>>({
+    await for (var i in stream()) 1: 0.1,
+    await for (var i in stream()) 0.2: 2
+  });
+  Expect.type<Map<int, int>>({await for (var i in stream()) 1: 1, 2: 2});
+  Expect.type<Map<num, num>>({await for (var i in stream()) 1: 0.1, 0.2: 2});
+  Expect.type<Map<dynamic, dynamic>>({await for (var i in stream()) ...{}});
+  Expect.type<Map<int, int>>({await for (var i in stream()) ...<int, int>{}});
+
+  // Sets.
+  Expect.type<Set<int>>({await for (var i in stream()) 1});
+  Expect.type<Set<int>>(
+      {await for (var i in stream()) 1, await for (var i in stream()) 2});
+  Expect.type<Set<num>>(
+      {await for (var i in stream()) 1, await for (var i in stream()) 0.2});
+  Expect.type<Set<int>>({await for (var i in stream()) 1, 2});
+  Expect.type<Set<num>>({await for (var i in stream()) 1, 0.2});
+  Expect.type<Set<dynamic>>({await for (var i in stream()) ...[]});
+  Expect.type<Set<int>>({await for (var i in stream()) ...<int>[]});
+
+  // If a nested iterable's type is dynamic, the element type is dynamic.
+  Expect.type<List<dynamic>>(
+      [1, await for (var i in stream()) ...([] as dynamic)]);
+  Expect.type<Set<dynamic>>(
+      {1, await for (var i in stream()) ...([] as dynamic)});
+
+  // If a nested maps's type is dynamic, the key and value types are dynamic.
+  Expect.type<Map<dynamic, dynamic>>(
+      {1: 1, await for (var i in stream()) ...({} as dynamic)});
+}
+
+Future<void> testLoopVariableInference() async {
+  // Infers loop variable from stream.
+  Expect.type<List<int>>([await for (var i in stream()) i]);
+  Expect.type<List<String>>(
+      [await for (var i in stream()) i.toRadixString(10)]);
+
+  // Loop variable type is pushed into stream.
+  Expect.listEquals(<int>[1], [await for (int i in expectIntStream([1])) i]);
+}
+
+Future<void> testTopDownInference() async {
+  // Lists.
+
+  // The context element type is pushed into the body.
+  Expect.listEquals(<int>[1],
+      <int>[await for (var i in stream()) expectInt(1)]);
+
+  // Bottom up-inference from elements is not pushed back down into the body.
+  Expect.listEquals(<int>[1, 2],
+      [1, await for (var i in stream()) expectDynamic(2)]);
+
+  // Maps.
+
+  // The context element type is pushed into the body.
+  Expect.mapEquals(<int, String>{1: "s"}, <int, String>{
+    await for (var i in stream()) expectInt(1): expectString("s")
+  });
+
+  // Bottom up-inference from elements is not pushed back down into the body.
+  Expect.mapEquals(<int, String>{1: "s", 2: "t"}, {
+    1: "s",
+    await for (var i in stream()) expectDynamic(2): expectDynamic("t")
+  });
+
+  // Sets.
+
+  // The context element type is pushed into the body.
+  Expect.setEquals(<int>{1}, <int>{await for (var i in stream()) expectInt(1)});
+
+  // Bottom up-inference from elements is not pushed back down into the body.
+  Expect.setEquals(<int>{1, 2},
+      {1, await for (var i in stream()) expectDynamic(2)});
+}
diff --git a/tests/language_2/control_flow_collections/await_for_null_test.dart b/tests/language_2/control_flow_collections/await_for_null_test.dart
new file mode 100644
index 0000000..d040e92
--- /dev/null
+++ b/tests/language_2/control_flow_collections/await_for_null_test.dart
@@ -0,0 +1,21 @@
+// Copyright (c) 2019, the Dart project authors.  Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+// SharedOptions=--enable-experiment=control-flow-collections,spread-collections,constant-update-2018
+
+// Test that a null stream expression procudes a runtime error.
+import 'package:async_helper/async_helper.dart';
+
+void main() {
+  asyncTest(() async {
+    // Null stream.
+    Stream<int> nullStream = null;
+    asyncExpectThrows<NoSuchMethodError>(
+        () async => <int>[await for (var i in nullStream) 1]);
+    asyncExpectThrows<NoSuchMethodError>(
+        () async => <int, int>{await for (var i in nullStream) 1: 1});
+    asyncExpectThrows<NoSuchMethodError>(
+        () async => <int>{await for (var i in nullStream) 1});
+  });
+}
diff --git a/tests/language_2/control_flow_collections/await_for_syntax_error_test.dart b/tests/language_2/control_flow_collections/await_for_syntax_error_test.dart
new file mode 100644
index 0000000..0b7c20a
--- /dev/null
+++ b/tests/language_2/control_flow_collections/await_for_syntax_error_test.dart
@@ -0,0 +1,18 @@
+// Copyright (c) 2019, the Dart project authors.  Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+// SharedOptions=--enable-experiment=control-flow-collections,constant-update-2018
+
+void main() {
+  // Use await for in non-async function.
+  var _ = [await for (var i in Stream<int>.empty()) i]; //# 01: compile-time error
+
+  () async {
+    // Use await for variable out of scope.
+    var _ = [await for (var i in Stream<int>.empty()) 1, i]; //# 02: compile-time error
+
+    // Use await for variable in own initializer.
+    var _ = [await for (var i in Stream<Object>.fromIterable([i])) 1]; //# 03: compile-time error
+  }();
+}
diff --git a/tests/language_2/control_flow_collections/await_for_test.dart b/tests/language_2/control_flow_collections/await_for_test.dart
new file mode 100644
index 0000000..032084e
--- /dev/null
+++ b/tests/language_2/control_flow_collections/await_for_test.dart
@@ -0,0 +1,270 @@
+// Copyright (c) 2019, the Dart project authors.  Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+// SharedOptions=--enable-experiment=control-flow-collections,spread-collections,constant-update-2018
+
+import 'package:async_helper/async_helper.dart';
+import 'package:expect/expect.dart';
+
+import 'utils.dart';
+
+final list = [1, 2, 3, 4];
+final map = {1: 1, 2: 2, 3: 3, 4: 4};
+final set = {1, 2, 3, 4};
+
+Stream<int> stream(List<int> values) => Stream.fromIterable(values);
+Stream<num> numStream(List<num> values) => Stream.fromIterable(values);
+
+void main() {
+  asyncTest(() async {
+    await testList();
+    await testMap();
+    await testSet();
+    await testDuplicateKeys();
+    await testKeyOrder();
+    await testRuntimeErrors();
+  });
+}
+
+Future<void> testList() async {
+  // Only await for.
+  Expect.listEquals(list, <int>[await for (var i in stream(list)) i]);
+
+  // Await for at beginning.
+  Expect.listEquals(list, <int>[await for (var i in stream([1, 2])) i, 3, 4]);
+
+  // Await for in middle.
+  Expect.listEquals(list, <int>[1, await for (var i in stream([2, 3])) i, 4]);
+
+  // Await for at end.
+  Expect.listEquals(list, <int>[1, 2, await for (var i in stream([3, 4])) i]);
+
+  // Empty await for.
+  Expect.listEquals(list,
+      <int>[1, 2, await for (var i in stream([])) i, 3, 4]);
+
+  // Multiple await fors.
+  Expect.listEquals(list, <int>[
+    await for (var i in stream([1])) i,
+    2,
+    await for (var i in stream([3, 4])) i
+  ]);
+
+  // Spread inside await for.
+  Expect.listEquals(list,
+      <int>[await for (var i in stream([0, 2])) ...<int>[1 + i, 2 + i]]);
+
+  // If inside await for.
+  Expect.listEquals(list,
+      <int>[await for (var i in stream([1, 9, 2, 3, 9, 4])) if (i != 9) i]);
+
+  // Else inside await for.
+  Expect.listEquals(list,
+      <int>[await for (var i in stream([1, -2, 3, -4])) if (i < 0) -i else i]);
+
+  // For inside await for.
+  Expect.listEquals(list, <int>[
+    await for (var i in stream([0, 2])) for (var j = 1; j <= 2; j++) i + j
+  ]);
+
+  // Does not flatten nested collection literal.
+  Expect.listEquals([1], [await for (var i in stream([1])) [i]].first);
+  Expect.mapEquals({1: 1}, [await for (var i in stream([1])) {i: i}].first);
+  Expect.setEquals({1}, [await for (var i in stream([1])) {i}].first);
+
+  // Downcast stream.
+  Object obj = stream([1, 2, 3, 4]);
+  Expect.listEquals(list, <int>[await for (var n in obj) n]);
+
+  // Downcast variable.
+  Expect.listEquals(list,
+      <int>[await for (int n in numStream([1, 2, 3, 4])) n]);
+
+  // Downcast element.
+  Expect.listEquals(list,
+      <int>[await for (num n in numStream([1, 2, 3, 4])) n]);
+}
+
+Future<void> testMap() async {
+  // Only for.
+  Expect.mapEquals(map, <int, int>{await for (var i in stream(list)) i: i});
+
+  // Await for at beginning.
+  Expect.mapEquals(map,
+      <int, int>{await for (var i in stream([1, 2])) i: i, 3: 3, 4: 4});
+
+  // Await for in middle.
+  Expect.mapEquals(map,
+      <int, int>{1: 1, await for (var i in stream([2, 3])) i: i, 4: 4});
+
+  // Await for at end.
+  Expect.mapEquals(map,
+      <int, int>{1: 1, 2: 2, await for (var i in stream([3, 4])) i: i});
+
+  // Empty await for.
+  Expect.mapEquals(map, <int, int>{
+    1: 1,
+    await for (var i in stream([])) i: i,
+    2: 2,
+    3: 3,
+    4: 4
+  });
+
+  // Multiple await fors.
+  Expect.mapEquals(map, <int, int>{
+    await for (var i in stream([1])) i: i,
+    2: 2,
+    await for (var i in stream([3, 4])) i: i
+  });
+
+  // Spread inside await for.
+  Expect.mapEquals(map, <int, int>{
+    await for (var i in stream([0, 2]))
+      ...<int, int>{1 + i: 1 + i, 2 + i: 2 + i}
+  });
+
+  // If inside await for.
+  Expect.mapEquals(map, <int, int>{
+    await for (var i in stream([1, 9, 2, 3, 9, 4])) if (i != 9) i: i
+  });
+
+  // Else inside await for.
+  Expect.mapEquals(map, <int, int>{
+    await for (var i in stream([1, -2, 3, -4])) if (i < 0) -i: -i else i: i
+  });
+
+  // For inside await for.
+  Expect.mapEquals(map, <int, int>{
+    await for (var i in stream([0, 2]))
+      for (var j = 1; j <= 2; j++) i + j: i + j
+  });
+
+  // Downcast stream.
+  Object obj = stream([1, 2, 3, 4]);
+  Expect.mapEquals(map, <int, int>{await for (var n in obj) n: n});
+
+  // Downcast variable.
+  Expect.mapEquals(map,
+      <int, int>{await for (int n in numStream([1, 2, 3, 4])) n: n});
+
+  // Downcast element.
+  Expect.mapEquals(map,
+      <int, int>{await for (num n in numStream([1, 2, 3, 4])) n: n});
+}
+
+Future<void> testSet() async {
+  // Only await for.
+  Expect.setEquals(set, <int>{await for (var i in stream(list)) i});
+
+  // Await for at beginning.
+  Expect.setEquals(set, <int>{await for (var i in stream([1, 2])) i, 3, 4});
+
+  // Await for in middle.
+  Expect.setEquals(set, <int>{1, await for (var i in stream([2, 3])) i, 4});
+
+  // Await for at end.
+  Expect.setEquals(set, <int>{1, 2, await for (var i in stream([3, 4])) i});
+
+  // Empty await for.
+  Expect.setEquals(set,
+      <int>{1, await for (var i in stream([])) i, 2, 3, 4});
+
+  // Multiple await fors.
+  Expect.setEquals(set, <int>{
+    await for (var i in stream([1])) i,
+    2,
+    await for (var i in stream([3, 4])) i
+  });
+
+  // Spread inside await for.
+  Expect.setEquals(set,
+      <int>{await for (var i in stream([0, 2])) ...<int>[1 + i, 2 + i]});
+
+  // If inside await for.
+  Expect.setEquals(set,
+      <int>{await for (var i in stream([1, 9, 2, 3, 9, 4])) if (i != 9) i});
+
+  // Else inside await for.
+  Expect.setEquals(set,
+      <int>{await for (var i in stream([1, -2, 3, -4])) if (i < 0) -i else i});
+
+  // For inside await for.
+  Expect.setEquals(set, <int>{
+    await for (var i in stream([0, 2])) for (var j = 1; j <= 2; j++) i + j
+  });
+
+  // Does not flatten nested collection literal.
+  Expect.listEquals([1], {await for (var i in stream([1])) [i]}.first);
+  Expect.mapEquals({1: 1}, {await for (var i in stream([1])) {i: i}}.first);
+  Expect.setEquals({1}, {await for (var i in stream([1])) {i}}.first);
+
+  // Downcast stream.
+  Object obj = stream([1, 2, 3, 4]);
+  Expect.setEquals(set, <int>{await for (var n in obj) n});
+
+  // Downcast variable.
+  Expect.setEquals(set, <int>{await for (int n in numStream([1, 2, 3, 4])) n});
+
+  // Downcast element.
+  Expect.setEquals(set, <int>{await for (num n in numStream([1, 2, 3, 4])) n});
+}
+
+Future<void> testDuplicateKeys() async {
+  Expect.mapEquals(map, <int, int>{
+    1: 1,
+    await for (var i in stream([1, 2, 3])) i: i,
+    await for (var i in stream([2, 3])) i: i,
+    3: 3,
+    4: 4
+  });
+  Expect.setEquals(set, <int>{
+    1,
+    await for (var i in stream([1, 2, 3])) i,
+    await for (var i in stream([2, 3])) i,
+    3,
+    4
+  });
+}
+
+Future<void> testKeyOrder() async {
+  // First equal key wins.
+  var e1a = Equality(1, "a");
+  var e1b = Equality(1, "b");
+  var e2a = Equality(2, "a");
+  var e2b = Equality(2, "b");
+  var keys = [e1b, e2a, e2b];
+  var values = [2, 3, 4];
+
+  var map = <Equality, int>{
+    e1a: 1,
+    await for (var i in stream([0, 1, 2])) keys[i]: values[i]
+  };
+  Expect.equals("1:a,2:a", map.keys.join(","));
+  Expect.equals("2,4", map.values.join(","));
+
+  var set = <Equality>{e1a, await for (var i in stream([0, 1, 2])) keys[i]};
+  Expect.equals("1:a,2:a", set.join(","));
+}
+
+Future<void> testRuntimeErrors() async {
+  // Cast variable.
+  dynamic nonStream = 3;
+  asyncExpectThrows<TypeError>(
+      () async => <int>[await for (int i in nonStream) 1]);
+  asyncExpectThrows<TypeError>(
+      () async => <int, int>{await for (int i in nonStream) 1: 1});
+  asyncExpectThrows<TypeError>(
+      () async => <int>{await for (int i in nonStream) 1});
+
+  // Wrong element type.
+  dynamic nonInt = "string";
+  asyncExpectThrows<TypeError>(
+      () async => <int>[await for (var i in stream([1])) nonInt]);
+  asyncExpectThrows<TypeError>(
+      () async => <int, int>{await for (var i in stream([1])) nonInt: 1});
+  asyncExpectThrows<TypeError>(
+      () async => <int, int>{await for (var i in stream([1])) 1: nonInt});
+  asyncExpectThrows<TypeError>(
+      () async => <int>{await for (var i in stream([1])) nonInt});
+}
diff --git a/tests/language_2/control_flow_collections/await_for_type_error_test.dart b/tests/language_2/control_flow_collections/await_for_type_error_test.dart
new file mode 100644
index 0000000..7090cee
--- /dev/null
+++ b/tests/language_2/control_flow_collections/await_for_type_error_test.dart
@@ -0,0 +1,27 @@
+// Copyright (c) 2019, the Dart project authors.  Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+// SharedOptions=--enable-experiment=control-flow-collections,constant-update-2018
+
+void main() {
+  () async {
+    // Non-Stream type.
+    int nonStream = 3;
+    var _ = <int>[await for (var i in nonStream) 1]; //# 01: compile-time error
+    var _ = <int, int>{await for (var i in nonStream) 1: 1}; //# 02: compile-time error
+    var _ = <int>{await for (var i in nonStream) 1}; //# 03: compile-time error
+
+    // Wrong element type.
+    Stream<String> s = Stream.fromIterable(["s"]);
+    var _ = <int>[await for (int i in s) 1]; //# 07: compile-time error
+    var _ = <int, int>{await for (int i in s) 1: 1}; //# 08: compile-time error
+    var _ = <int>{await for (int i in s) 1}; //# 09: compile-time error
+
+    // Wrong body element type.
+    var _ = <int>[await for (var i in s) "s"]; //# 10: compile-time error
+    var _ = <int, int>{await for (var i in s) "s": 1}; //# 11: compile-time error
+    var _ = <int, int>{await for (var i in s) 1: "s"}; //# 12: compile-time error
+    var _ = <int>{await for (var i in s) "s"}; //# 13: compile-time error
+  }();
+}
diff --git a/tests/language_2/control_flow_collections/for_await_test.dart b/tests/language_2/control_flow_collections/for_await_test.dart
index 55d24ae..81b0a3f 100644
--- a/tests/language_2/control_flow_collections/for_await_test.dart
+++ b/tests/language_2/control_flow_collections/for_await_test.dart
@@ -2,7 +2,7 @@
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
 
-// SharedOptions=--enable-experiment=control-flow-collections
+// SharedOptions=--enable-experiment=control-flow-collections,constant-update-2018
 
 import "package:async_helper/async_helper.dart";
 import 'package:expect/expect.dart';
diff --git a/tests/language_2/control_flow_collections/for_const_test.dart b/tests/language_2/control_flow_collections/for_const_test.dart
index 3ba2d91..32f7e51 100644
--- a/tests/language_2/control_flow_collections/for_const_test.dart
+++ b/tests/language_2/control_flow_collections/for_const_test.dart
@@ -2,7 +2,7 @@
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
 
-// SharedOptions=--enable-experiment=control-flow-collections
+// SharedOptions=--enable-experiment=control-flow-collections,constant-update-2018
 
 void main() {
   // For cannot be used in a const collection.
diff --git a/tests/language_2/control_flow_collections/for_inference_test.dart b/tests/language_2/control_flow_collections/for_inference_test.dart
index 9c462262..7835d7a 100644
--- a/tests/language_2/control_flow_collections/for_inference_test.dart
+++ b/tests/language_2/control_flow_collections/for_inference_test.dart
@@ -2,7 +2,7 @@
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
 
-// SharedOptions=--enable-experiment=control-flow-collections,spread-collections
+// SharedOptions=--enable-experiment=control-flow-collections,spread-collections,constant-update-2018
 
 // Test how control flow interacts with inference.
 import 'package:expect/expect.dart';
@@ -40,8 +40,8 @@
   Expect.type<Set<num>>({for (; false;) 1, for (; false;) 0.2});
   Expect.type<Set<int>>({for (; false;) 1, 2});
   Expect.type<Set<num>>({for (; false;) 1, 0.2});
-  Expect.type<Set<dynamic>>({if (true) ...[]});
-  Expect.type<Set<int>>({if (true) ...<int>[]});
+  Expect.type<Set<dynamic>>({for (; false;) ...[]});
+  Expect.type<Set<int>>({for (; false;) ...<int>[]});
 
   // If a nested iterable's type is dynamic, the element type is dynamic.
   Expect.type<List<dynamic>>([for (; false;) ...([] as dynamic)]);
@@ -60,8 +60,8 @@
   Expect.type<List<int>>([for (var i = 1; i < 2; i++) i]);
   Expect.type<List<String>>([for (var i = 1; i < 2; i++) i.toRadixString(10)]);
 
-  // Loop variable type is not pushed into iterable.
-  Expect.listEquals(<int>[1], [for (int i in expectDynamic([1])) i]);
+  // Loop variable type is pushed into sequence.
+  Expect.listEquals(<int>[1], [for (int i in expectIntIterable([1])) i]);
 
   // Loop variable type is pushed into initializer.
   Expect.listEquals(<int>[1], [for (int i = expectInt(1); i < 2; i++) i]);
@@ -71,26 +71,31 @@
   // Lists.
 
   // The context element type is pushed into the body.
-  Expect.listEquals(<int>[1], <int>[for (; false;) expectInt(1)]);
+  Expect.listEquals(<int>[1], <int>[for (var i = 0; i < 1; i++) expectInt(1)]);
 
   // Bottom up-inference from elements is not pushed back down into the body.
-  Expect.listEquals(<int>[1, 2], [1, for (; false;) expectDynamic(2)]);
+  Expect.listEquals(<int>[1, 2],
+      [1, for (var i = 0; i < 1; i++) expectDynamic(2)]);
 
   // Maps.
 
   // The context element type is pushed into the body.
-  Expect.mapEquals(<int, String>{1: "s"},
-      <int, String>{for (; false;) expectInt(1): expectString("s")});
+  Expect.mapEquals(<int, String>{1: "s"}, <int, String>{
+    for (var i = 0; i < 1; i++) expectInt(1): expectString("s")
+  });
 
   // Bottom up-inference from elements is not pushed back down into the body.
-  Expect.mapEquals(<int, String>{1: "s", 2: "t"},
-      {1: "s", for (; false;) expectDynamic(2): expectDynamic("t")});
+  Expect.mapEquals(<int, String>{1: "s", 2: "t"}, {
+    1: "s",
+    for (var i = 0; i < 1; i++) expectDynamic(2): expectDynamic("t")
+  });
 
   // Sets.
 
   // The context element type is pushed into the body.
-  Expect.setEquals(<int>{1}, <int>{for (; false;) expectInt(1)});
+  Expect.setEquals(<int>{1}, <int>{for (var i = 0; i < 1; i++) expectInt(1)});
 
   // Bottom up-inference from elements is not pushed back down into the body.
-  Expect.setEquals(<int>{1, 2}, {1, for (; false;) expectDynamic(2)});
+  Expect.setEquals(<int>{1, 2},
+      {1, for (var i = 0; i < 1; i++) expectDynamic(2)});
 }
diff --git a/tests/language_2/control_flow_collections/for_test.dart b/tests/language_2/control_flow_collections/for_test.dart
index f9aee00..17730bc 100644
--- a/tests/language_2/control_flow_collections/for_test.dart
+++ b/tests/language_2/control_flow_collections/for_test.dart
@@ -2,7 +2,7 @@
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
 
-// SharedOptions=--enable-experiment=control-flow-collections,spread-collections
+// SharedOptions=--enable-experiment=control-flow-collections,spread-collections,constant-update-2018
 
 import 'package:expect/expect.dart';
 
@@ -63,6 +63,10 @@
   Expect.mapEquals({1: 1}, [for (var i = 1; i < 2; i++) {i: i}].first);
   Expect.setEquals({1}, [for (var i = 1; i < 2; i++) {i}].first);
 
+  // Downcast iterable.
+  Object obj = <int>[1, 2, 3, 4];
+  Expect.listEquals(list, <int>[for (var n in obj) n]);
+
   // Downcast variable.
   Expect.listEquals(list, <int>[for (int n in <num>[1, 2, 3, 4]) n]);
 
@@ -125,6 +129,10 @@
     for (var i in <int>[0, 2]) for (var j = 1; j <= 2; j++) i + j: i + j
   });
 
+  // Downcast iterable.
+  Object obj = <int>[1, 2, 3, 4];
+  Expect.mapEquals(map, <int, int>{for (var n in obj) n: n});
+
   // Downcast variable.
   Expect.mapEquals(map, <int, int>{for (int n in <num>[1, 2, 3, 4]) n: n});
 
@@ -180,6 +188,10 @@
   Expect.mapEquals({1: 1}, {for (var i = 1; i < 2; i++) {i: i}}.first);
   Expect.setEquals({1}, {for (var i = 1; i < 2; i++) {i}}.first);
 
+  // Downcast iterable.
+  Object obj = <int>[1, 2, 3, 4];
+  Expect.setEquals(set, <int>{for (var n in obj) n});
+
   // Downcast variable.
   Expect.setEquals(set, <int>{for (int n in <num>[1, 2, 3, 4]) n});
 
@@ -203,7 +215,7 @@
     1,
     for (var i in <int>[1, 2, 3]) i,
     for (var i = 2; i <= 3; i++) i,
-    3, 
+    3,
     4
   });
 }
@@ -222,6 +234,7 @@
     for (var i = 0; i < keys.length; i++) keys[i]: values[i]
   };
   Expect.equals("1:a,2:a", map.keys.join(","));
+  Expect.equals("2,4", map.values.join(","));
 
   var set = <Equality>{e1a, for (var i = 0; i < keys.length; i++) keys[i]};
   Expect.equals("1:a,2:a", set.join(","));
diff --git a/tests/language_2/control_flow_collections/for_variable_test.dart b/tests/language_2/control_flow_collections/for_variable_test.dart
index f866daf..69d0b3f 100644
--- a/tests/language_2/control_flow_collections/for_variable_test.dart
+++ b/tests/language_2/control_flow_collections/for_variable_test.dart
@@ -2,7 +2,7 @@
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
 
-// SharedOptions=--enable-experiment=control-flow-collections,spread-collections
+// SharedOptions=--enable-experiment=control-flow-collections,spread-collections,constant-update-2018
 
 /// Tests for how variables and scoping work with for elements.
 import 'package:expect/expect.dart';
diff --git a/tests/language_2/control_flow_collections/if_await_test.dart b/tests/language_2/control_flow_collections/if_await_test.dart
index 2db3f62..a0e8bad 100644
--- a/tests/language_2/control_flow_collections/if_await_test.dart
+++ b/tests/language_2/control_flow_collections/if_await_test.dart
@@ -2,7 +2,7 @@
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
 
-// SharedOptions=--enable-experiment=control-flow-collections
+// SharedOptions=--enable-experiment=control-flow-collections,constant-update-2018
 
 import "package:async_helper/async_helper.dart";
 import 'package:expect/expect.dart';
diff --git a/tests/language_2/control_flow_collections/if_const_error_test.dart b/tests/language_2/control_flow_collections/if_const_error_test.dart
index 8f6acf9..c644acf 100644
--- a/tests/language_2/control_flow_collections/if_const_error_test.dart
+++ b/tests/language_2/control_flow_collections/if_const_error_test.dart
@@ -2,7 +2,7 @@
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
 
-// SharedOptions=--enable-experiment=control-flow-collections
+// SharedOptions=--enable-experiment=control-flow-collections,constant-update-2018
 
 import 'dart:collection';
 
@@ -131,9 +131,9 @@
   const dynamic nil = null;
 
   // With no else.
-  const _ = [if (true) nil + 1]); //# 40: compile-time error
+  const _ = [if (true) nil + 1]; //# 40: compile-time error
 
   // With else.
-  const _ = [if (true) nil + 1 else 1]); //# 41: compile-time error
-  const _ = [if (false) 1 else nil + 1]); //# 42: compile-time error
+  const _ = [if (true) nil + 1 else 1]; //# 41: compile-time error
+  const _ = [if (false) 1 else nil + 1]; //# 42: compile-time error
 }
diff --git a/tests/language_2/control_flow_collections/if_const_test.dart b/tests/language_2/control_flow_collections/if_const_test.dart
index 258a889..db38174 100644
--- a/tests/language_2/control_flow_collections/if_const_test.dart
+++ b/tests/language_2/control_flow_collections/if_const_test.dart
@@ -2,7 +2,7 @@
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
 
-// SharedOptions=--enable-experiment=control-flow-collections,spread-collections
+// SharedOptions=--enable-experiment=control-flow-collections,spread-collections,constant-update-2018
 
 import 'package:expect/expect.dart';
 
diff --git a/tests/language_2/control_flow_collections/if_inference_test.dart b/tests/language_2/control_flow_collections/if_inference_test.dart
index 0c73618..454c903 100644
--- a/tests/language_2/control_flow_collections/if_inference_test.dart
+++ b/tests/language_2/control_flow_collections/if_inference_test.dart
@@ -2,7 +2,7 @@
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
 
-// SharedOptions=--enable-experiment=control-flow-collections,spread-collections
+// SharedOptions=--enable-experiment=control-flow-collections,spread-collections,constant-update-2018
 
 // Test how control flow interacts with inference.
 import 'package:expect/expect.dart';
diff --git a/tests/language_2/control_flow_collections/if_promotion_test.dart b/tests/language_2/control_flow_collections/if_promotion_test.dart
index 5622a47..152d225 100644
--- a/tests/language_2/control_flow_collections/if_promotion_test.dart
+++ b/tests/language_2/control_flow_collections/if_promotion_test.dart
@@ -2,7 +2,7 @@
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
 
-// SharedOptions=--enable-experiment=control-flow-collections
+// SharedOptions=--enable-experiment=control-flow-collections,constant-update-2018
 
 class A {
   var a = "a";
diff --git a/tests/language_2/control_flow_collections/if_test.dart b/tests/language_2/control_flow_collections/if_test.dart
index 4ffd515..99b3d39 100644
--- a/tests/language_2/control_flow_collections/if_test.dart
+++ b/tests/language_2/control_flow_collections/if_test.dart
@@ -2,7 +2,7 @@
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
 
-// SharedOptions=--enable-experiment=control-flow-collections,spread-collections
+// SharedOptions=--enable-experiment=control-flow-collections,spread-collections,constant-update-2018
 
 import 'package:expect/expect.dart';
 
diff --git a/tests/language_2/control_flow_collections/map_set_ambiguity_error_test.dart b/tests/language_2/control_flow_collections/map_set_ambiguity_error_test.dart
index 452ac9b..0c4073e 100644
--- a/tests/language_2/control_flow_collections/map_set_ambiguity_error_test.dart
+++ b/tests/language_2/control_flow_collections/map_set_ambiguity_error_test.dart
@@ -2,7 +2,7 @@
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
 
-// SharedOptions=--enable-experiment=control-flow-collections,spread-collections
+// SharedOptions=--enable-experiment=control-flow-collections,spread-collections,constant-update-2018
 
 // Test cases where the syntax is ambiguous between maps and sets when control
 // flow elements contain spreads.
diff --git a/tests/language_2/control_flow_collections/map_set_ambiguity_test.dart b/tests/language_2/control_flow_collections/map_set_ambiguity_test.dart
index 271bb09..3331770 100644
--- a/tests/language_2/control_flow_collections/map_set_ambiguity_test.dart
+++ b/tests/language_2/control_flow_collections/map_set_ambiguity_test.dart
@@ -2,7 +2,7 @@
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
 
-// SharedOptions=--enable-experiment=control-flow-collections,spread-collections
+// SharedOptions=--enable-experiment=control-flow-collections,spread-collections,constant-update-2018
 
 // Test cases where the syntax is ambiguous between maps and sets because of
 // spreads inside control flow.
@@ -18,7 +18,8 @@
 void testBottomUpInference() {
   Map<int, int> map = {};
   Set<int> set = Set();
-  dynamic dyn = map;
+  dynamic dynMap = map;
+  dynamic dynSet = set;
   Iterable<int> iterable = [];
   CustomSet customSet = CustomSet();
   CustomMap customMap = CustomMap();
@@ -30,25 +31,25 @@
   // expect___Of<...>({if (true) ...dyn});
   expectSetOf<int>({if (true) ...iterable});
   expectSetOf<int>({if (true) ...customSet});
-  expectMapOf<int, int>({if (true) ...customMap});
+  expectMapOf<int, String>({if (true) ...customMap});
 
   expectMapOf<int, int>({if (true) ...map else ...map});
   // expect___Of<...>({if (true) ...map else ...set});
-  expectMapOf<dynamic, dynamic>({if (true) ...map else ...dyn});
+  expectMapOf<dynamic, dynamic>({if (true) ...map else ...dynMap});
   // expect___Of<...>({if (true) ...map else ...iterable});
   // expect___Of<...>({if (true) ...map else ...customSet});
-  expectMapOf<int, int>({if (true) ...map else ...customMap});
+  expectMapOf<int, Object>({if (true) ...map else ...customMap});
 
   expectSetOf<int>({if (true) ...set else ...set});
-  expectSetOf<dynamic>({if (true) ...set else ...dyn});
+  expectSetOf<dynamic>({if (true) ...set else ...dynSet});
   expectSetOf<int>({if (true) ...set else ...iterable});
   expectSetOf<int>({if (true) ...set else ...customSet});
   // expect___Of<...>({if (true) ...set else ...customMap});
 
   // expect___Of<...>({if (true) ...dyn else ...dyn});
-  expectSetOf<dynamic>({if (true) ...dyn else ...iterable});
-  expectSetOf<dynamic>({if (true) ...dyn else ...customSet});
-  expectMapOf<dynamic, dynamic>({if (true) ...dyn else ...customMap});
+  expectSetOf<dynamic>({if (true) ...dynSet else ...iterable});
+  expectSetOf<dynamic>({if (true) ...dynSet else ...customSet});
+  expectMapOf<dynamic, dynamic>({if (true) ...dynMap else ...customMap});
 
   expectSetOf<int>({if (true) ...iterable else ...iterable});
   expectSetOf<int>({if (true) ...iterable else ...customSet});
@@ -57,7 +58,7 @@
   expectSetOf<int>({if (true) ...customSet else ...customSet});
   // expect___Of<...>({if (true) ...customSet else ...customMap});
 
-  expectMapOf<int, int>({if (true) ...customMap else ...customMap});
+  expectMapOf<int, String>({if (true) ...customMap else ...customMap});
 
   // Note: The commented out cases are the error cases. They are shown here for
   // completeness and tested in map_set_ambiguity_error_test.dart.
@@ -66,30 +67,30 @@
   // expect___Of<...>({for (; false;) ...dyn});
   expectSetOf<int>({for (; false;) ...iterable});
   expectSetOf<int>({for (; false;) ...customSet});
-  expectMapOf<int, int>({for (; false;) ...customMap});
+  expectMapOf<int, String>({for (; false;) ...customMap});
 
   expectMapOf<int, int>({for (; false;) ...map, for (; false;) ...map});
   // expect___Of<...>({for (; false;) ...map, for (; false;) ...set});
   expectMapOf<dynamic, dynamic>(
-      {for (; false;) ...map, for (; false;) ...dyn});
+      {for (; false;) ...map, for (; false;) ...dynMap});
   // expect___Of<...>({for (; false;) ...map, for (; false;) ...iterable});
   // expect___Of<...>({for (; false;) ...map, for (; false;) ...customSet});
-  expectMapOf<int, int>(
+  expectMapOf<int, Object>(
       {for (; false;) ...map, for (; false;) ...customMap});
 
   expectSetOf<int>({for (; false;) ...set, for (; false;) ...set});
-  expectSetOf<dynamic>({for (; false;) ...set, for (; false;) ...dyn});
+  expectSetOf<dynamic>({for (; false;) ...set, for (; false;) ...dynSet});
   expectSetOf<int>({for (; false;) ...set, for (; false;) ...iterable});
   expectSetOf<int>({for (; false;) ...set, for (; false;) ...customSet});
   // expect___Of<...>({for (; false;) ...set, for (; false;) ...customMap});
 
   // expect___Of<...>({for (; false;) ...dyn, for (; false;) ...dyn});
   expectSetOf<dynamic>(
-      {for (; false;) ...dyn, for (; false;) ...iterable});
+      {for (; false;) ...dynSet, for (; false;) ...iterable});
   expectSetOf<dynamic>(
-      {for (; false;) ...dyn, for (; false;) ...customSet});
+      {for (; false;) ...dynSet, for (; false;) ...customSet});
   expectMapOf<dynamic, dynamic>(
-      {for (; false;) ...dyn, for (; false;) ...customMap});
+      {for (; false;) ...dynMap, for (; false;) ...customMap});
 
   expectSetOf<int>(
       {for (; false;) ...iterable, for (; false;) ...iterable});
@@ -103,7 +104,7 @@
   // expect___Of<...>(
   //     {for (; false;) ...customSet, for (; false;) ...customMap});
 
-  expectMapOf<int, int>(
+  expectMapOf<int, String>(
       {for (; false;) ...customMap, for (; false;) ...customMap});
 }
 
diff --git a/tests/language_2/control_flow_collections/syntax_error_test.dart b/tests/language_2/control_flow_collections/syntax_error_test.dart
index 6e070df..25bff6b 100644
--- a/tests/language_2/control_flow_collections/syntax_error_test.dart
+++ b/tests/language_2/control_flow_collections/syntax_error_test.dart
@@ -2,37 +2,37 @@
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
 
-// SharedOptions=--enable-experiment=control-flow-collections,spread-collections
+// SharedOptions=--enable-experiment=control-flow-collections,spread-collections,constant-update-2018
 
 void main() {
   // No then element.
-  var _ = [if (true)]; //# 00: compile-time error
+  var _ = [if (true)]; //# 00: syntax error
 
   // No then element with else.
-  var _ = [if (true) else 0]; //# 01: compile-time error
+  var _ = [if (true) else 0]; //# 01: syntax error
 
   // No else element.
-  var _ = [if (true) 0 else]; //# 02: compile-time error
+  var _ = [if (true) 0 else]; //# 02: syntax error
 
   // Spread if.
-  var _ = [...if (true) 0]; //# 03: compile-time error
+  var _ = [...if (true) 0]; //# 03: syntax error
 
   // Spread for.
-  var _ = [...for (; false;) 0]; //# 04: compile-time error
+  var _ = [...for (; false;) 0]; //# 04: syntax error
 
   // Use if in map entry.
-  var _ = {if (true) 1: 1: 2}; //# 05: compile-time error
-  var _ = {1: if (true) 2: 2}; //# 06: compile-time error
+  var _ = {if (true) 1: 1: 2}; //# 05: syntax error
+  var _ = {1: if (true) 2: 2}; //# 06: syntax error
 
   // Use for in map entry.
-  var _ = {for (; false;) 1: 1: 2}; //# 07: compile-time error
-  var _ = {1: for (; false;) 2: 2}; //# 08: compile-time error
+  var _ = {for (; false;) 1: 1: 2}; //# 07: syntax error
+  var _ = {1: for (; false;) 2: 2}; //# 08: syntax error
 
   // Use for variable out of scope.
   var _ = [for (var i = 0; false;) 1, i]; //# 09: compile-time error
 
   // Use for-in variable out of scope.
-  var _ = [for (var i in [1]; false;) 1, i]; //# 10: compile-time error
+  var _ = [for (var i in [1]; false;) 1, i]; //# 10: syntax error
 
   // Use for variable in own initializer.
   var _ = [for (var i = i; false;) 1]; //# 11: compile-time error
diff --git a/tests/language_2/control_flow_collections/syntax_test.dart b/tests/language_2/control_flow_collections/syntax_test.dart
index 0810aec..71c3f62 100644
--- a/tests/language_2/control_flow_collections/syntax_test.dart
+++ b/tests/language_2/control_flow_collections/syntax_test.dart
@@ -2,7 +2,7 @@
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
 
-// SharedOptions=--enable-experiment=control-flow-collections
+// SharedOptions=--enable-experiment=control-flow-collections,constant-update-2018
 
 // Tests syntax edge cases.
 import 'package:expect/expect.dart';
diff --git a/tests/language_2/control_flow_collections/type_error_test.dart b/tests/language_2/control_flow_collections/type_error_test.dart
index 2656b7f..4e98549 100644
--- a/tests/language_2/control_flow_collections/type_error_test.dart
+++ b/tests/language_2/control_flow_collections/type_error_test.dart
@@ -2,11 +2,9 @@
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
 
-// SharedOptions=--enable-experiment=control-flow-collections
+// SharedOptions=--enable-experiment=control-flow-collections,constant-update-2018
 
 void main() {
-  Object obj = true;
-
   // Non-Boolean if condition.
   var _ = <int>[if (1) 2]; //# 00: compile-time error
   var _ = <int, int>{if (1) 2: 2}; //# 01: compile-time error
@@ -32,12 +30,12 @@
   // Wrong for-in element type.
   List<String> s = ["s"];
   var _ = <int>[for (int i in s) 1]; //# 20: compile-time error
-  var _ = <int, int>[for (int i in s) 1: 1]; //# 21: compile-time error
+  var _ = <int, int>{for (int i in s) 1: 1}; //# 21: compile-time error
   var _ = <int>{for (int i in s) 1}; //# 22: compile-time error
 
   // Wrong for declaration element type.
   var _ = <int>[for (int i = "s";;) 1]; //# 23: compile-time error
-  var _ = <int, int>[for (int i = "s";;) 1: 1]; //# 24: compile-time error
+  var _ = <int, int>{for (int i = "s";;) 1: 1}; //# 24: compile-time error
   var _ = <int>{for (int i = "s";;) 1}; //# 25: compile-time error
 
   // Wrong for body element type.
@@ -45,4 +43,10 @@
   var _ = <int, int>{for (; false;) "s": 1}; //# 27: compile-time error
   var _ = <int, int>{for (; false;) 1: "s"}; //# 28: compile-time error
   var _ = <int>{for (; false;) "s"}; //# 29: compile-time error
+
+  // Non-iterable sequence type.
+  int nonIterable = 3;
+  var _ = <int>[for (int i in nonIterable) 1]; //# 30: compile-time error
+  var _ = <int, int>{for (int i in nonIterable) 1: 1}; //# 31: compile-time error
+  var _ = <int>{for (int i in nonIterable) 1}; //# 32: compile-time error
 }
diff --git a/tests/language_2/control_flow_collections/utils.dart b/tests/language_2/control_flow_collections/utils.dart
index 9684b3d..b240e24 100644
--- a/tests/language_2/control_flow_collections/utils.dart
+++ b/tests/language_2/control_flow_collections/utils.dart
@@ -48,11 +48,21 @@
   return value;
 }
 
+Iterable<T> expectIntIterable<T>(dynamic value) {
+  Expect.identical(int, T);
+  return value;
+}
+
 Set<T> expectIntSet<T>() {
   Expect.identical(int, T);
   return Set();
 }
 
+Stream<T> expectIntStream<T>(dynamic elements) {
+  Expect.identical(int, T);
+  return Stream<T>.fromIterable(elements);
+}
+
 Set<T> expectDynamicSet<T>() {
   Expect.identical(dynamic, T);
   return Set();
diff --git a/tests/language_2/covariant_return_type_test.dart b/tests/language_2/covariant_return_type_test.dart
new file mode 100644
index 0000000..121c3bb
--- /dev/null
+++ b/tests/language_2/covariant_return_type_test.dart
@@ -0,0 +1,59 @@
+// Copyright (c) 2019, the Dart project authors.  Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+import 'package:expect/expect.dart';
+
+void main() {
+  Expect.throwsTypeError(() {
+    List<int> l = [1, 2, 3].where((x) => x.isEven).map((x) => x + 1);
+  }, 'Iterable<int> should fail implicit cast to List<int>');
+
+  Iterable<int> l = [1, 2, 3].where((x) => x.isEven).map((x) => x + 1);
+  Expect.isFalse(l is List<int>, 'Iterable<int> is not a subtype of List<int>');
+
+  C<Object> c = C<Object>(1);
+  Iterable<bool Function(Object)> myList = c.f(); // works
+
+  Expect.throwsTypeError(() {
+    C<Object> c = C<Object>(1);
+    List<bool Function(Object)> myList = c.f();
+  }, "f() returns an Iterable, not a List");
+
+  Expect.throwsTypeError(() {
+    C<Object> c = C<int>(1);
+    List<bool Function(Object)> myList = c.f();
+  }, "f() returns an Iterable, not a List");
+
+  Expect.throwsTypeError(() {
+    C<Object> c = C<int>(1);
+    Iterable<bool Function(Object)> myList = c.f();
+  }, "f() returns functions accepting int, not Object");
+
+  {
+    C<Iterable<Object>> c = D<Object>([1]);
+    Iterable<bool Function(Iterable<Object>)> myList = c.f();
+  }
+
+  Expect.throwsTypeError(() {
+    C<Iterable<Object>> c = D<Object>([1]);
+    List<bool Function(Iterable<Object>)> myList = c.f();
+  }, "D.f() returns an Iterable, not a List");
+
+  Expect.throwsTypeError(() {
+    C<Iterable<Object>> c = D<int>([1]);
+    Iterable<bool Function(Iterable<Object>)> myList = c.f();
+  }, "D.f() returns functions accepting Iterable<int>, not Iterable<Object>");
+}
+
+class C<T> {
+  final T t;
+  C(this.t);
+  Iterable<bool Function(T)> f() sync* {
+    yield (T x) => x == t;
+  }
+}
+
+class D<S> extends C<Iterable<S>> {
+  D(Iterable<S> s) : super(s);
+}
diff --git a/tests/language_2/factory3_test.dart b/tests/language_2/factory3_test.dart
index ad7f97c..fe15ad9 100644
--- a/tests/language_2/factory3_test.dart
+++ b/tests/language_2/factory3_test.dart
@@ -1,7 +1,6 @@
 // Copyright (c) 2012, the Dart project authors.  Please see the AUTHORS file
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
-// VMOptions=--enable_checked_mode
 
 import "dart:collection";
 
diff --git a/tests/language_2/factory_with_type_parameters_test.dart b/tests/language_2/factory_with_type_parameters_test.dart
index 5ebba7d..e0c1583 100644
--- a/tests/language_2/factory_with_type_parameters_test.dart
+++ b/tests/language_2/factory_with_type_parameters_test.dart
@@ -6,18 +6,18 @@
   Foo._();
 
   factory Foo
-             <X> //# 01: compile-time error
-             <X extends T> //# 02: compile-time error
+             <X> //# 01: syntax error
+             <X extends T> //# 02: syntax error
              () => new Bar<T>();
 
   factory Foo
-             <X> //# 03: compile-time error
-             <X extends T> //# 04: compile-time error
+             <X> //# 03: syntax error
+             <X extends T> //# 04: syntax error
              .far
-                 <X> //# 05: compile-time error
-                 <X extends T> //# 06: compile-time error
-                 <X>.fip //# 07: compile-time error
-                 <X extends T>.fip //# 08: compile-time error
+                 <X> //# 05: syntax error
+                 <X extends T> //# 06: syntax error
+                 <X>.fip //# 07: syntax error
+                 <X extends T>.fip //# 08: syntax error
                  () => new Bar<T>();
 }
 
diff --git a/tests/language_2/invalid_assignment_to_postfix_increment_test.dart b/tests/language_2/invalid_assignment_to_postfix_increment_test.dart
index 329ea3c..eda617b 100644
--- a/tests/language_2/invalid_assignment_to_postfix_increment_test.dart
+++ b/tests/language_2/invalid_assignment_to_postfix_increment_test.dart
@@ -3,9 +3,9 @@
 // BSD-style license that can be found in the LICENSE file.
 
 void f(int x, int y) {
-  x++ = y; //# 01: compile-time error
-  x++ += y; //# 02: compile-time error
-  x++ ??= y; //# 03: compile-time error
+  x++ = y; //# 01: syntax error
+  x++ += y; //# 02: syntax error
+  x++ ??= y; //# 03: syntax error
 }
 
 main() {
diff --git a/tests/language_2/label8_test.dart b/tests/language_2/label8_test.dart
index 751d35b..866fcc7 100644
--- a/tests/language_2/label8_test.dart
+++ b/tests/language_2/label8_test.dart
@@ -6,7 +6,7 @@
   int i;
   // Grammar doesn't allow label on block for switch statement.
   switch(i)
-    L: //# 01: compile-time error
+    L: //# 01: syntax error
   {
     case 111:
       while (false) {
diff --git a/tests/language_2/language_2.status b/tests/language_2/language_2.status
index 23788e5..2f8711e 100644
--- a/tests/language_2/language_2.status
+++ b/tests/language_2/language_2.status
@@ -21,7 +21,7 @@
 mixin_class_from_core_library_test: Fail # Issue 34488
 nested_generic_closure_test: Fail # Issue 28515
 
-[ $compiler != compare_analyzer_cfe ]
+[ $compiler != compare_analyzer_cfe && $compiler != spec_parser ]
 mixin_constructor_forwarding/const_constructor_test/none: CompileTimeError # Issue 32223
 mixin_constructor_forwarding/const_constructor_with_field_test/none: CompileTimeError # Issue 32223
 mixin_constructor_forwarding/optional_named_parameters_test/none: CompileTimeError # Issue 31543
@@ -67,10 +67,7 @@
 [ $compiler != app_jitk && $compiler != dartk && $compiler != dartkb && $compiler != dartkp && $mode == debug && $runtime == vm ]
 built_in_identifier_type_annotation_test/set: Crash # Not supported by legacy VM front-end.
 
-[ $compiler != compare_analyzer_cfe && $compiler != dart2analyzer && $compiler != dart2js && $compiler != dartdevc && !$fasta && $strong ]
-type_promotion_functions_test: CompileTimeError # Issue 30895: This test requires a complete rewrite for 2.0.
-
-[ $compiler != compare_analyzer_cfe && $compiler != dart2js && !$fasta && $strong ]
+[ $compiler != compare_analyzer_cfe && $compiler != dart2js && $compiler != spec_parser && !$fasta && $strong ]
 compile_time_constant_static5_test/11: CompileTimeError # Issue 30546
 compile_time_constant_static5_test/16: CompileTimeError # Issue 30546
 compile_time_constant_static5_test/21: CompileTimeError # Issue 30546
diff --git a/tests/language_2/language_2_analyzer.status b/tests/language_2/language_2_analyzer.status
index 2ceb689..d7c1115 100644
--- a/tests/language_2/language_2_analyzer.status
+++ b/tests/language_2/language_2_analyzer.status
@@ -101,15 +101,6 @@
 try_catch_on_syntax_test/10: MissingCompileTimeError
 try_catch_on_syntax_test/11: MissingCompileTimeError
 type_inference_inconsistent_inheritance_test: MissingCompileTimeError
-type_promotion_functions_test/02: CompileTimeError
-type_promotion_functions_test/03: CompileTimeError
-type_promotion_functions_test/04: CompileTimeError
-type_promotion_functions_test/09: CompileTimeError
-type_promotion_functions_test/11: CompileTimeError
-type_promotion_functions_test/12: CompileTimeError
-type_promotion_functions_test/13: CompileTimeError
-type_promotion_functions_test/14: CompileTimeError
-type_promotion_functions_test/none: CompileTimeError
 type_variable_static_context_negative_test: Fail # Issue 12161
 vm/debug_break_enabled_vm_test: Skip
 vm/debug_break_vm_test/*: Skip
diff --git a/tests/language_2/language_2_dart2js.status b/tests/language_2/language_2_dart2js.status
index 804ad39..851a895 100644
--- a/tests/language_2/language_2_dart2js.status
+++ b/tests/language_2/language_2_dart2js.status
@@ -590,15 +590,6 @@
 truncdiv_test: RuntimeError # non JS number semantics - Issue 15246
 type_error_test: RuntimeError
 type_literal_test: RuntimeError
-type_promotion_functions_test/02: CompileTimeError
-type_promotion_functions_test/03: CompileTimeError
-type_promotion_functions_test/04: CompileTimeError
-type_promotion_functions_test/09: CompileTimeError
-type_promotion_functions_test/11: CompileTimeError
-type_promotion_functions_test/12: CompileTimeError
-type_promotion_functions_test/13: CompileTimeError
-type_promotion_functions_test/14: CompileTimeError
-type_promotion_functions_test/none: CompileTimeError
 type_promotion_more_specific_test/04: CompileTimeError
 
 [ $compiler == dart2js && !$strong ]
diff --git a/tests/language_2/language_2_dartdevc.status b/tests/language_2/language_2_dartdevc.status
index b3372d6..f6296b7 100644
--- a/tests/language_2/language_2_dartdevc.status
+++ b/tests/language_2/language_2_dartdevc.status
@@ -137,15 +137,6 @@
 try_catch_on_syntax_test/10: MissingCompileTimeError
 try_catch_on_syntax_test/11: MissingCompileTimeError
 type_inference_inconsistent_inheritance_test: MissingCompileTimeError
-type_promotion_functions_test/02: CompileTimeError # Issue 30895
-type_promotion_functions_test/03: CompileTimeError # Issue 30895
-type_promotion_functions_test/04: CompileTimeError # Issue 30895
-type_promotion_functions_test/09: CompileTimeError # Issue 30895
-type_promotion_functions_test/11: CompileTimeError # Issue 30895
-type_promotion_functions_test/12: CompileTimeError # Issue 30895
-type_promotion_functions_test/13: CompileTimeError # Issue 30895
-type_promotion_functions_test/14: CompileTimeError # Issue 30895
-type_promotion_functions_test/none: CompileTimeError # Issue 30895
 void/return_future_future_or_void_async_error1_test/none: CompileTimeError # issue #34319
 void/return_future_or_future_or_void_sync_error2_test/none: CompileTimeError # issue #34319
 void/return_future_or_void_sync_error4_test/none: CompileTimeError # issue #34319
@@ -283,15 +274,6 @@
 syncstar_yield_test/capturing: RuntimeError
 syncstar_yield_test/copyParameters: RuntimeError # Expect.equals(expected: <2>, actual: <3>) fails.
 try_catch_test/01: MissingCompileTimeError
-type_promotion_functions_test/02: CompileTimeError # Issue 31537
-type_promotion_functions_test/03: CompileTimeError # Issue 31537
-type_promotion_functions_test/04: CompileTimeError # Issue 31537
-type_promotion_functions_test/09: CompileTimeError # Issue 31537
-type_promotion_functions_test/11: CompileTimeError # Issue 31537
-type_promotion_functions_test/12: CompileTimeError # Issue 31537
-type_promotion_functions_test/13: CompileTimeError # Issue 31537
-type_promotion_functions_test/14: CompileTimeError # Issue 31537
-type_promotion_functions_test/none: CompileTimeError # Issue 31537
 type_promotion_logical_and_test/01: MissingCompileTimeError
 type_promotion_more_specific_test/04: CompileTimeError # Issue 31533
 
@@ -402,6 +384,7 @@
 stacktrace_test: RuntimeError # Issue 29920; Expect.isTrue(false) fails.
 string_literals_test: RuntimeError # Expect.equals(expected: <\x00\x0A\x0D\x7F\xFF\u{FFFF}\u{D800}\u{DC00}\u{DBFF}\u{DFFF}>, actual: <\x00\x0A\x0D\x7F\xFF\u{FFFF}\u{FFFD}\u{FFFD}\u{FFFD}\u{FFFD}\u{FFFD}\u{FFFD}\u{FFFD}\u{FFFD}\u{FFFD}\u{FFFD}\u{FFFD}\u{FFFD}>) fails.
 super_test: RuntimeError # Expect.equals(expected: <0>, actual: <2>) fails.
+superinterface_variance/*: Skip # Issue dart-lang/language#113
 switch_label2_test: RuntimeError # Issue 29920; UnimplementedError: node <ShadowContinueSwitchStatement> see https://github.com/dart-lang/sdk/issues/29352 `continue #L1;
 switch_label_test: RuntimeError # Issue 29920; UnimplementedError: node <ShadowContinueSwitchStatement> see https://github.com/dart-lang/sdk/issues/29352 `continue #L1;
 switch_try_catch_test: RuntimeError # Issue 29920; Expect.throws: Unexpected 'UnimplementedError: node <ShadowContinueSwitchStatement> see https://github.com/dart-lang/sdk/issues/29352 `continue #L1;
diff --git a/tests/language_2/language_2_kernel.status b/tests/language_2/language_2_kernel.status
index d20e287..53267cd 100644
--- a/tests/language_2/language_2_kernel.status
+++ b/tests/language_2/language_2_kernel.status
@@ -136,15 +136,6 @@
 type_alias_equality_test/03: RuntimeError # Issue 32783
 type_alias_equality_test/04: RuntimeError # Issue 32783
 type_error_test: RuntimeError
-type_promotion_functions_test/02: CompileTimeError
-type_promotion_functions_test/03: CompileTimeError
-type_promotion_functions_test/04: CompileTimeError
-type_promotion_functions_test/09: CompileTimeError
-type_promotion_functions_test/11: CompileTimeError
-type_promotion_functions_test/12: CompileTimeError
-type_promotion_functions_test/13: CompileTimeError
-type_promotion_functions_test/14: CompileTimeError
-type_promotion_functions_test/none: CompileTimeError
 type_promotion_more_specific_test/04: CompileTimeError
 vm/bool_check_stack_traces_test/02: RuntimeError # Issue 33584
 vm/regress_27671_test: SkipByDesign # Relies on string comparison of exception message which may return '<optimized out>'
@@ -200,47 +191,24 @@
 const_constructor_nonconst_param_test/01: MissingCompileTimeError
 constructor5_test: CompileTimeError # Verification error
 constructor6_test: CompileTimeError # Verification error
-control_flow_collections/for_await_test: CompileTimeError
-control_flow_collections/for_inference_test: CompileTimeError
-control_flow_collections/for_test: CompileTimeError
-control_flow_collections/for_variable_test: CompileTimeError
-control_flow_collections/if_const_error_test/02: MissingCompileTimeError
-control_flow_collections/if_const_error_test/07: MissingCompileTimeError
-control_flow_collections/if_const_error_test/08: MissingCompileTimeError
-control_flow_collections/if_const_error_test/10: MissingCompileTimeError
-control_flow_collections/if_const_error_test/19: MissingCompileTimeError
-control_flow_collections/if_const_error_test/20: MissingCompileTimeError
+control_flow_collections/await_for_inference_test: CompileTimeError
+control_flow_collections/await_for_test: CompileTimeError
 control_flow_collections/if_const_error_test/21: MissingCompileTimeError
 control_flow_collections/if_const_error_test/22: MissingCompileTimeError
-control_flow_collections/if_const_error_test/26: MissingCompileTimeError
-control_flow_collections/if_const_error_test/28: MissingCompileTimeError
-control_flow_collections/if_const_error_test/33: MissingCompileTimeError
-control_flow_collections/if_const_error_test/34: MissingCompileTimeError
-control_flow_collections/if_const_error_test/38: MissingCompileTimeError
-control_flow_collections/if_const_error_test/39: MissingCompileTimeError
-control_flow_collections/if_const_test: CompileTimeError
-control_flow_collections/if_inference_test: CompileTimeError
-control_flow_collections/if_promotion_test/04: MissingCompileTimeError
-control_flow_collections/if_promotion_test/05: MissingCompileTimeError
-control_flow_collections/if_promotion_test/06: MissingCompileTimeError
-control_flow_collections/if_promotion_test/07: MissingCompileTimeError
-control_flow_collections/if_promotion_test/08: MissingCompileTimeError
-control_flow_collections/if_test: CompileTimeError
-control_flow_collections/map_set_ambiguity_test: CompileTimeError
-control_flow_collections/syntax_error_test/09: Crash
-control_flow_collections/syntax_error_test/10: Crash
-control_flow_collections/syntax_test: CompileTimeError
+control_flow_collections/if_const_error_test/23: MissingCompileTimeError
+control_flow_collections/if_const_error_test/24: MissingCompileTimeError
+control_flow_collections/if_const_error_test/35: MissingCompileTimeError
+control_flow_collections/if_const_error_test/36: MissingCompileTimeError
+control_flow_collections/if_const_error_test/37: MissingCompileTimeError
+control_flow_collections/if_promotion_test/none: CompileTimeError
 control_flow_collections/type_error_test/00: MissingCompileTimeError
 control_flow_collections/type_error_test/01: MissingCompileTimeError
 control_flow_collections/type_error_test/02: MissingCompileTimeError
-control_flow_collections/type_error_test/06: MissingCompileTimeError
-control_flow_collections/type_error_test/07: MissingCompileTimeError
-control_flow_collections/type_error_test/08: MissingCompileTimeError
-control_flow_collections/type_error_test/09: MissingCompileTimeError
 control_flow_collections/type_error_test/10: MissingCompileTimeError
-control_flow_collections/type_error_test/11: MissingCompileTimeError
-control_flow_collections/type_error_test/12: MissingCompileTimeError
 control_flow_collections/type_error_test/13: MissingCompileTimeError
+control_flow_collections/type_error_test/23: MissingCompileTimeError
+control_flow_collections/type_error_test/24: MissingCompileTimeError
+control_flow_collections/type_error_test/25: MissingCompileTimeError
 implicit_creation/implicit_const_not_default_values_test/e1: MissingCompileTimeError
 implicit_creation/implicit_const_not_default_values_test/e10: MissingCompileTimeError
 implicit_creation/implicit_const_not_default_values_test/e11: MissingCompileTimeError
@@ -262,20 +230,10 @@
 implicit_creation/implicit_const_not_default_values_test/e7: MissingCompileTimeError
 implicit_creation/implicit_const_not_default_values_test/e8: MissingCompileTimeError
 mixin_method_override_test/G4: Crash # Assertion error: mixin_full_resolution.dart': 'src.typeParameters.length == dst.typeParameters.length': is not true.
-spread_collections/await_test: Crash
-spread_collections/const_error_test/02: MissingCompileTimeError
-spread_collections/const_error_test/03: MissingCompileTimeError
-spread_collections/const_error_test/05: MissingCompileTimeError
-spread_collections/const_error_test/06: MissingCompileTimeError
-spread_collections/const_error_test/07: MissingCompileTimeError
-spread_collections/const_error_test/08: MissingCompileTimeError
-spread_collections/const_error_test/10: MissingCompileTimeError
-spread_collections/const_error_test/11: MissingCompileTimeError
 spread_collections/const_error_test/12: MissingCompileTimeError
 spread_collections/const_error_test/13: Crash
+spread_collections/const_error_test/13: MissingCompileTimeError
 spread_collections/const_error_test/14: MissingCompileTimeError
-spread_collections/const_error_test/15: MissingCompileTimeError
-spread_collections/const_error_test/16: MissingCompileTimeError
 vm/regress_33469_test/01: MissingCompileTimeError
 vm/regress_33469_test/02: MissingCompileTimeError
 vm/regress_33469_test/03: MissingCompileTimeError
@@ -289,6 +247,12 @@
 async_return_types_test/nestedFuture: MissingCompileTimeError # Issue 33068
 const_cast2_test/01: CompileTimeError # Issue 32517
 const_cast2_test/none: CompileTimeError # Issue 32517
+constants_2018/equals_test/01: MissingCompileTimeError # New test introduced in https://dart-review.googlesource.com/c/sdk/+/97510
+constants_2018/equals_test/02: MissingCompileTimeError # New test introduced in https://dart-review.googlesource.com/c/sdk/+/97510
+constants_2018/equals_test/03: MissingCompileTimeError # New test introduced in https://dart-review.googlesource.com/c/sdk/+/97510
+constants_2018/equals_test/04: MissingCompileTimeError # New test introduced in https://dart-review.googlesource.com/c/sdk/+/97510
+constants_2018/potential_const_dynamic_test/sh3: CompileTimeError # New test introduced in https://dart-review.googlesource.com/c/sdk/+/97510
+constants_2018/potential_const_type_test/sh3: CompileTimeError # New test introduced in https://dart-review.googlesource.com/c/sdk/+/97510
 deferred_inheritance_constraints_test/extends: MissingCompileTimeError # Fasta/KernelVM bug: Deferred loading kernel issue 30273.
 deferred_inheritance_constraints_test/implements: MissingCompileTimeError # Fasta/KernelVM bug: Deferred loading kernel issue 30273.
 deferred_inheritance_constraints_test/mixin: MissingCompileTimeError # Fasta/KernelVM bug: Deferred loading kernel issue 30273.
@@ -309,6 +273,7 @@
 mixin_declaration/mixin_declaration_superinvocation_application_test/07: MissingCompileTimeError
 mixin_declaration/mixin_declaration_superinvocation_application_test/08: MissingCompileTimeError
 mixin_method_override_test/G5: Crash # Issue 34354
+override_inheritance_field_test/42: MissingCompileTimeError
 regress_22976_test/*: CompileTimeError # Issue 31935
 set_literals/invalid_set_literal_test/08: MissingCompileTimeError # Requires constant evaluation
 set_literals/invalid_set_literal_test/09: MissingCompileTimeError # Requires constant evaluation
@@ -319,6 +284,156 @@
 set_literals/invalid_set_literal_test/32: MissingCompileTimeError # Requires constant evaluation
 set_literals/invalid_set_literal_test/33: MissingCompileTimeError # Requires constant evaluation
 set_literals/invalid_set_literal_test/34: MissingCompileTimeError # Requires constant evaluation
+superinterface_variance/abstract_class_error_test/01: MissingCompileTimeError # Issue dart-lang/language#113
+superinterface_variance/abstract_class_error_test/02: MissingCompileTimeError # Issue dart-lang/language#113
+superinterface_variance/abstract_class_error_test/04: MissingCompileTimeError # Issue dart-lang/language#113
+superinterface_variance/abstract_class_error_test/05: MissingCompileTimeError # Issue dart-lang/language#113
+superinterface_variance/abstract_class_error_test/06: MissingCompileTimeError # Issue dart-lang/language#113
+superinterface_variance/abstract_class_error_test/07: MissingCompileTimeError # Issue dart-lang/language#113
+superinterface_variance/abstract_class_error_test/08: MissingCompileTimeError # Issue dart-lang/language#113
+superinterface_variance/abstract_class_error_test/10: MissingCompileTimeError # Issue dart-lang/language#113
+superinterface_variance/abstract_class_error_test/11: MissingCompileTimeError # Issue dart-lang/language#113
+superinterface_variance/abstract_class_error_test/12: MissingCompileTimeError # Issue dart-lang/language#113
+superinterface_variance/abstract_class_error_test/13: MissingCompileTimeError # Issue dart-lang/language#113
+superinterface_variance/abstract_class_error_test/14: MissingCompileTimeError # Issue dart-lang/language#113
+superinterface_variance/abstract_class_error_test/16: MissingCompileTimeError # Issue dart-lang/language#113
+superinterface_variance/abstract_class_error_test/17: MissingCompileTimeError # Issue dart-lang/language#113
+superinterface_variance/abstract_class_error_test/18: MissingCompileTimeError # Issue dart-lang/language#113
+superinterface_variance/abstract_class_error_test/19: MissingCompileTimeError # Issue dart-lang/language#113
+superinterface_variance/abstract_class_error_test/20: MissingCompileTimeError # Issue dart-lang/language#113
+superinterface_variance/abstract_class_error_test/22: MissingCompileTimeError # Issue dart-lang/language#113
+superinterface_variance/abstract_class_error_test/23: MissingCompileTimeError # Issue dart-lang/language#113
+superinterface_variance/abstract_class_error_test/24: MissingCompileTimeError # Issue dart-lang/language#113
+superinterface_variance/abstract_class_error_test/26: MissingCompileTimeError # Issue dart-lang/language#113
+superinterface_variance/abstract_class_error_test/27: Crash # Issue dart-lang/language#113
+superinterface_variance/abstract_class_error_test/29: MissingCompileTimeError # Issue dart-lang/language#113
+superinterface_variance/abstract_class_error_test/30: MissingCompileTimeError # Issue dart-lang/language#113
+superinterface_variance/abstract_class_error_test/31: MissingCompileTimeError # Issue dart-lang/language#113
+superinterface_variance/abstract_class_error_test/32: MissingCompileTimeError # Issue dart-lang/language#113
+superinterface_variance/abstract_class_error_test/34: MissingCompileTimeError # Issue dart-lang/language#113
+superinterface_variance/abstract_class_error_test/35: MissingCompileTimeError # Issue dart-lang/language#113
+superinterface_variance/abstract_class_error_test/36: MissingCompileTimeError # Issue dart-lang/language#113
+superinterface_variance/abstract_mixin_application_error_test/01: MissingCompileTimeError # Issue dart-lang/language#113
+superinterface_variance/abstract_mixin_application_error_test/02: MissingCompileTimeError # Issue dart-lang/language#113
+superinterface_variance/abstract_mixin_application_error_test/04: MissingCompileTimeError # Issue dart-lang/language#113
+superinterface_variance/abstract_mixin_application_error_test/05: MissingCompileTimeError # Issue dart-lang/language#113
+superinterface_variance/abstract_mixin_application_error_test/06: MissingCompileTimeError # Issue dart-lang/language#113
+superinterface_variance/abstract_mixin_application_error_test/07: MissingCompileTimeError # Issue dart-lang/language#113
+superinterface_variance/abstract_mixin_application_error_test/08: MissingCompileTimeError # Issue dart-lang/language#113
+superinterface_variance/abstract_mixin_application_error_test/10: MissingCompileTimeError # Issue dart-lang/language#113
+superinterface_variance/abstract_mixin_application_error_test/11: MissingCompileTimeError # Issue dart-lang/language#113
+superinterface_variance/abstract_mixin_application_error_test/12: MissingCompileTimeError # Issue dart-lang/language#113
+superinterface_variance/abstract_mixin_application_error_test/13: MissingCompileTimeError # Issue dart-lang/language#113
+superinterface_variance/abstract_mixin_application_error_test/14: MissingCompileTimeError # Issue dart-lang/language#113
+superinterface_variance/abstract_mixin_application_error_test/16: MissingCompileTimeError # Issue dart-lang/language#113
+superinterface_variance/abstract_mixin_application_error_test/17: MissingCompileTimeError # Issue dart-lang/language#113
+superinterface_variance/abstract_mixin_application_error_test/18: MissingCompileTimeError # Issue dart-lang/language#113
+superinterface_variance/abstract_mixin_application_error_test/19: MissingCompileTimeError # Issue dart-lang/language#113
+superinterface_variance/abstract_mixin_application_error_test/20: MissingCompileTimeError # Issue dart-lang/language#113
+superinterface_variance/abstract_mixin_application_error_test/22: MissingCompileTimeError # Issue dart-lang/language#113
+superinterface_variance/abstract_mixin_application_error_test/23: MissingCompileTimeError # Issue dart-lang/language#113
+superinterface_variance/abstract_mixin_application_error_test/24: MissingCompileTimeError # Issue dart-lang/language#113
+superinterface_variance/abstract_mixin_application_error_test/25: MissingCompileTimeError # Issue dart-lang/language#113
+superinterface_variance/abstract_mixin_application_error_test/26: MissingCompileTimeError # Issue dart-lang/language#113
+superinterface_variance/abstract_mixin_application_error_test/28: MissingCompileTimeError # Issue dart-lang/language#113
+superinterface_variance/abstract_mixin_application_error_test/29: MissingCompileTimeError # Issue dart-lang/language#113
+superinterface_variance/abstract_mixin_application_error_test/30: MissingCompileTimeError # Issue dart-lang/language#113
+superinterface_variance/abstract_mixin_application_error_test/31: MissingCompileTimeError # Issue dart-lang/language#113
+superinterface_variance/abstract_mixin_application_error_test/32: MissingCompileTimeError # Issue dart-lang/language#113
+superinterface_variance/abstract_mixin_application_error_test/34: MissingCompileTimeError # Issue dart-lang/language#113
+superinterface_variance/abstract_mixin_application_error_test/35: MissingCompileTimeError # Issue dart-lang/language#113
+superinterface_variance/abstract_mixin_application_error_test/36: MissingCompileTimeError # Issue dart-lang/language#113
+superinterface_variance/concrete_class_error_test/01: MissingCompileTimeError # Issue dart-lang/language#113
+superinterface_variance/concrete_class_error_test/02: MissingCompileTimeError # Issue dart-lang/language#113
+superinterface_variance/concrete_class_error_test/04: MissingCompileTimeError # Issue dart-lang/language#113
+superinterface_variance/concrete_class_error_test/05: MissingCompileTimeError # Issue dart-lang/language#113
+superinterface_variance/concrete_class_error_test/06: MissingCompileTimeError # Issue dart-lang/language#113
+superinterface_variance/concrete_class_error_test/07: MissingCompileTimeError # Issue dart-lang/language#113
+superinterface_variance/concrete_class_error_test/08: MissingCompileTimeError # Issue dart-lang/language#113
+superinterface_variance/concrete_class_error_test/10: MissingCompileTimeError # Issue dart-lang/language#113
+superinterface_variance/concrete_class_error_test/11: MissingCompileTimeError # Issue dart-lang/language#113
+superinterface_variance/concrete_class_error_test/12: MissingCompileTimeError # Issue dart-lang/language#113
+superinterface_variance/concrete_class_error_test/13: MissingCompileTimeError # Issue dart-lang/language#113
+superinterface_variance/concrete_class_error_test/14: MissingCompileTimeError # Issue dart-lang/language#113
+superinterface_variance/concrete_class_error_test/16: MissingCompileTimeError # Issue dart-lang/language#113
+superinterface_variance/concrete_class_error_test/17: MissingCompileTimeError # Issue dart-lang/language#113
+superinterface_variance/concrete_class_error_test/18: MissingCompileTimeError # Issue dart-lang/language#113
+superinterface_variance/concrete_class_error_test/19: MissingCompileTimeError # Issue dart-lang/language#113
+superinterface_variance/concrete_class_error_test/20: MissingCompileTimeError # Issue dart-lang/language#113
+superinterface_variance/concrete_class_error_test/22: MissingCompileTimeError # Issue dart-lang/language#113
+superinterface_variance/concrete_class_error_test/23: MissingCompileTimeError # Issue dart-lang/language#113
+superinterface_variance/concrete_class_error_test/24: MissingCompileTimeError # Issue dart-lang/language#113
+superinterface_variance/concrete_class_error_test/26: MissingCompileTimeError # Issue dart-lang/language#113
+superinterface_variance/concrete_class_error_test/27: Crash # Issue dart-lang/language#113
+superinterface_variance/concrete_class_error_test/29: MissingCompileTimeError # Issue dart-lang/language#113
+superinterface_variance/concrete_class_error_test/30: MissingCompileTimeError # Issue dart-lang/language#113
+superinterface_variance/concrete_class_error_test/31: MissingCompileTimeError # Issue dart-lang/language#113
+superinterface_variance/concrete_class_error_test/32: MissingCompileTimeError # Issue dart-lang/language#113
+superinterface_variance/concrete_class_error_test/34: MissingCompileTimeError # Issue dart-lang/language#113
+superinterface_variance/concrete_class_error_test/35: MissingCompileTimeError # Issue dart-lang/language#113
+superinterface_variance/concrete_class_error_test/36: MissingCompileTimeError # Issue dart-lang/language#113
+superinterface_variance/concrete_mixin_application_error_test/01: MissingCompileTimeError # Issue dart-lang/language#113
+superinterface_variance/concrete_mixin_application_error_test/02: MissingCompileTimeError # Issue dart-lang/language#113
+superinterface_variance/concrete_mixin_application_error_test/04: MissingCompileTimeError # Issue dart-lang/language#113
+superinterface_variance/concrete_mixin_application_error_test/05: MissingCompileTimeError # Issue dart-lang/language#113
+superinterface_variance/concrete_mixin_application_error_test/06: MissingCompileTimeError # Issue dart-lang/language#113
+superinterface_variance/concrete_mixin_application_error_test/07: MissingCompileTimeError # Issue dart-lang/language#113
+superinterface_variance/concrete_mixin_application_error_test/08: MissingCompileTimeError # Issue dart-lang/language#113
+superinterface_variance/concrete_mixin_application_error_test/10: MissingCompileTimeError # Issue dart-lang/language#113
+superinterface_variance/concrete_mixin_application_error_test/11: MissingCompileTimeError # Issue dart-lang/language#113
+superinterface_variance/concrete_mixin_application_error_test/12: MissingCompileTimeError # Issue dart-lang/language#113
+superinterface_variance/concrete_mixin_application_error_test/13: MissingCompileTimeError # Issue dart-lang/language#113
+superinterface_variance/concrete_mixin_application_error_test/14: MissingCompileTimeError # Issue dart-lang/language#113
+superinterface_variance/concrete_mixin_application_error_test/16: MissingCompileTimeError # Issue dart-lang/language#113
+superinterface_variance/concrete_mixin_application_error_test/17: MissingCompileTimeError # Issue dart-lang/language#113
+superinterface_variance/concrete_mixin_application_error_test/18: MissingCompileTimeError # Issue dart-lang/language#113
+superinterface_variance/concrete_mixin_application_error_test/19: MissingCompileTimeError # Issue dart-lang/language#113
+superinterface_variance/concrete_mixin_application_error_test/20: MissingCompileTimeError # Issue dart-lang/language#113
+superinterface_variance/concrete_mixin_application_error_test/22: MissingCompileTimeError # Issue dart-lang/language#113
+superinterface_variance/concrete_mixin_application_error_test/23: MissingCompileTimeError # Issue dart-lang/language#113
+superinterface_variance/concrete_mixin_application_error_test/24: MissingCompileTimeError # Issue dart-lang/language#113
+superinterface_variance/concrete_mixin_application_error_test/25: MissingCompileTimeError # Issue dart-lang/language#113
+superinterface_variance/concrete_mixin_application_error_test/26: MissingCompileTimeError # Issue dart-lang/language#113
+superinterface_variance/concrete_mixin_application_error_test/28: MissingCompileTimeError # Issue dart-lang/language#113
+superinterface_variance/concrete_mixin_application_error_test/29: MissingCompileTimeError # Issue dart-lang/language#113
+superinterface_variance/concrete_mixin_application_error_test/30: MissingCompileTimeError # Issue dart-lang/language#113
+superinterface_variance/concrete_mixin_application_error_test/31: MissingCompileTimeError # Issue dart-lang/language#113
+superinterface_variance/concrete_mixin_application_error_test/32: MissingCompileTimeError # Issue dart-lang/language#113
+superinterface_variance/concrete_mixin_application_error_test/34: MissingCompileTimeError # Issue dart-lang/language#113
+superinterface_variance/concrete_mixin_application_error_test/35: MissingCompileTimeError # Issue dart-lang/language#113
+superinterface_variance/concrete_mixin_application_error_test/36: MissingCompileTimeError # Issue dart-lang/language#113
+superinterface_variance/covariance_test: CompileTimeError # Issue dart-lang/language#113
+superinterface_variance/mixin_error_test/01: MissingCompileTimeError # Issue dart-lang/language#113
+superinterface_variance/mixin_error_test/02: MissingCompileTimeError # Issue dart-lang/language#113
+superinterface_variance/mixin_error_test/04: MissingCompileTimeError # Issue dart-lang/language#113
+superinterface_variance/mixin_error_test/05: MissingCompileTimeError # Issue dart-lang/language#113
+superinterface_variance/mixin_error_test/06: MissingCompileTimeError # Issue dart-lang/language#113
+superinterface_variance/mixin_error_test/13: MissingCompileTimeError # Issue dart-lang/language#113
+superinterface_variance/mixin_error_test/14: MissingCompileTimeError # Issue dart-lang/language#113
+superinterface_variance/mixin_error_test/16: MissingCompileTimeError # Issue dart-lang/language#113
+superinterface_variance/mixin_error_test/17: MissingCompileTimeError # Issue dart-lang/language#113
+superinterface_variance/mixin_error_test/18: MissingCompileTimeError # Issue dart-lang/language#113
+superinterface_variance/mixin_error_test/19: MissingCompileTimeError # Issue dart-lang/language#113
+superinterface_variance/mixin_error_test/20: MissingCompileTimeError # Issue dart-lang/language#113
+superinterface_variance/mixin_error_test/22: MissingCompileTimeError # Issue dart-lang/language#113
+superinterface_variance/mixin_error_test/23: MissingCompileTimeError # Issue dart-lang/language#113
+superinterface_variance/mixin_error_test/24: MissingCompileTimeError # Issue dart-lang/language#113
+superinterface_variance/mixin_error_test/27: Crash # Issue dart-lang/language#113
+superinterface_variance/mixin_error_test/31: MissingCompileTimeError # Issue dart-lang/language#113
+superinterface_variance/mixin_error_test/32: MissingCompileTimeError # Issue dart-lang/language#113
+superinterface_variance/mixin_error_test/34: MissingCompileTimeError # Issue dart-lang/language#113
+superinterface_variance/mixin_error_test/35: MissingCompileTimeError # Issue dart-lang/language#113
+superinterface_variance/mixin_error_test/36: MissingCompileTimeError # Issue dart-lang/language#113
+superinterface_variance/mixin_error_test/37: Crash # Issue dart-lang/language#113
+superinterface_variance/mixin_error_test/38: Crash # Issue dart-lang/language#113
+superinterface_variance/mixin_error_test/40: Crash # Issue dart-lang/language#113
+superinterface_variance/mixin_error_test/41: Crash # Issue dart-lang/language#113
+superinterface_variance/mixin_error_test/42: Crash # Issue dart-lang/language#113
+superinterface_variance/mixin_error_test/43: Crash # Issue dart-lang/language#113
+superinterface_variance/mixin_error_test/44: Crash # Issue dart-lang/language#113
+superinterface_variance/mixin_error_test/46: Crash # Issue dart-lang/language#113
+superinterface_variance/mixin_error_test/47: Crash # Issue dart-lang/language#113
+superinterface_variance/mixin_error_test/48: Crash # Issue dart-lang/language#113
 syntax_test/28: MissingCompileTimeError # Issue 29763 - low priority
 syntax_test/29: MissingCompileTimeError # Issue 29763 - low priority
 syntax_test/30: MissingCompileTimeError # Issue 29763 - low priority
@@ -467,8 +582,6 @@
 spread_collections/type_error_test/02: DartkCrash
 spread_collections/type_error_test/03: DartkCrash
 spread_collections/type_error_test/05: DartkCrash
-spread_collections/type_error_test/06: DartkCrash
-spread_collections/type_error_test/09: DartkCrash
 vm/bool_check_stack_traces_test/02: Pass
 vm/causal_async_exception_stack2_test: RuntimeError # Please triage
 vm/causal_async_exception_stack_test: RuntimeError # Please triage
@@ -479,11 +592,6 @@
 
 [ $compiler == dartkp && $mode == debug && $runtime == dart_precompiled && $strong ]
 external_test/13: Crash
-type_promotion_functions_test/05: Pass
-type_promotion_functions_test/06: Pass
-type_promotion_functions_test/07: Pass
-type_promotion_functions_test/08: Pass
-type_promotion_functions_test/10: Pass
 vm/precompiled_static_initializer_test: Pass, Slow
 
 [ $compiler == dartkp && $mode == product && $runtime == dart_precompiled && $strong ]
@@ -655,9 +763,9 @@
 function_subtype_inline2_test: RuntimeError
 generic_instanceof2_test: RuntimeError
 generic_is_check_test: RuntimeError
-generic_methods_recursive_bound_test/03: Crash, Pass
-generic_methods_recursive_bound_test/03: MissingRuntimeError
 generic_methods_recursive_bound_test/03: Pass
+generic_methods_recursive_bound_test/03: MissingRuntimeError
+generic_methods_recursive_bound_test/03: Crash, Pass
 generic_methods_reuse_type_variables_test: Pass
 generic_no_such_method_dispatcher_simple_test: CompileTimeError # Issue 31533
 generic_no_such_method_dispatcher_test: CompileTimeError # Issue 31533
@@ -742,15 +850,6 @@
 super_bound_closure_test/none: CompileTimeError # Issue 31533
 super_test: Fail, OK
 syntax_test/00: MissingCompileTimeError
-type_promotion_functions_test/02: CompileTimeError # Issue 31537
-type_promotion_functions_test/03: CompileTimeError # Issue 31537
-type_promotion_functions_test/04: CompileTimeError # Issue 31537
-type_promotion_functions_test/09: CompileTimeError # Issue 31537
-type_promotion_functions_test/11: CompileTimeError # Issue 31537
-type_promotion_functions_test/12: CompileTimeError # Issue 31537
-type_promotion_functions_test/13: CompileTimeError # Issue 31537
-type_promotion_functions_test/14: CompileTimeError # Issue 31537
-type_promotion_functions_test/none: CompileTimeError # Issue 31537
 type_promotion_logical_and_test/01: MissingCompileTimeError
 type_promotion_more_specific_test/04: CompileTimeError # Issue 31533
 vm/causal_async_exception_stack2_test: SkipByDesign
@@ -861,15 +960,6 @@
 setter_no_getter_test/01: CompileTimeError
 super_bound_closure_test/none: CompileTimeError
 try_catch_test/01: MissingCompileTimeError
-type_promotion_functions_test/02: CompileTimeError
-type_promotion_functions_test/03: CompileTimeError
-type_promotion_functions_test/04: CompileTimeError
-type_promotion_functions_test/09: CompileTimeError
-type_promotion_functions_test/11: CompileTimeError
-type_promotion_functions_test/12: CompileTimeError
-type_promotion_functions_test/13: CompileTimeError
-type_promotion_functions_test/14: CompileTimeError
-type_promotion_functions_test/none: CompileTimeError
 type_promotion_more_specific_test/04: CompileTimeError
 
 [ $compiler == fasta && !$strong ]
@@ -1261,15 +1351,6 @@
 super_bound_closure_test/none: CompileTimeError # Issue 31533
 super_call4_test/01: MissingCompileTimeError
 super_test: Fail, OK
-type_promotion_functions_test/02: CompileTimeError # Issue 31537
-type_promotion_functions_test/03: CompileTimeError # Issue 31537
-type_promotion_functions_test/04: CompileTimeError # Issue 31537
-type_promotion_functions_test/09: CompileTimeError # Issue 31537
-type_promotion_functions_test/11: CompileTimeError # Issue 31537
-type_promotion_functions_test/12: CompileTimeError # Issue 31537
-type_promotion_functions_test/13: CompileTimeError # Issue 31537
-type_promotion_functions_test/14: CompileTimeError # Issue 31537
-type_promotion_functions_test/none: CompileTimeError # Issue 31537
 type_promotion_logical_and_test/01: MissingCompileTimeError
 type_promotion_more_specific_test/04: CompileTimeError # Issue 31533
 vm/bool_check_stack_traces_test/02: RuntimeError # Issue 33584
@@ -1996,12 +2077,6 @@
 type_inference_accessor_ref_test/06: MissingCompileTimeError
 type_inference_circularity_test: MissingCompileTimeError
 type_inference_inconsistent_inheritance_test: MissingCompileTimeError
-type_promotion_functions_test/01: MissingCompileTimeError
-type_promotion_functions_test/05: MissingCompileTimeError
-type_promotion_functions_test/06: MissingCompileTimeError
-type_promotion_functions_test/07: MissingCompileTimeError
-type_promotion_functions_test/08: MissingCompileTimeError
-type_promotion_functions_test/10: MissingCompileTimeError
 type_promotion_parameter_test/01: MissingCompileTimeError
 type_promotion_parameter_test/02: MissingCompileTimeError
 type_promotion_parameter_test/03: MissingCompileTimeError
diff --git a/tests/language_2/language_2_spec_parser.status b/tests/language_2/language_2_spec_parser.status
index 3692117..c8867ce 100644
--- a/tests/language_2/language_2_spec_parser.status
+++ b/tests/language_2/language_2_spec_parser.status
@@ -10,6 +10,8 @@
 config_import_corelib_test: Fail # Uses conditional import.
 config_import_test: Fail # Uses conditional import.
 const_native_factory_test: Skip # Uses `native`.
+deep_nesting_expression_test: Skip # JVM stack overflow.
+deep_nesting_statement_test: Skip # JVM stack overflow.
 double_invalid_test: Skip # Contains illegaly formatted double.
 external_test/21: Fail # Test expects `runtime error`, it is a syntax error.
 getter_declaration_negative_test: Fail # Negative, uses getter with parameter.
@@ -24,6 +26,7 @@
 is_not_class4_negative_test: Fail # Negative, uses `a is A is A`.
 issue1578_negative_test: Fail # Negative, is line noise.
 issue_1751477_test: Skip # Times out: 9 levels, exponential blowup => 430 secs.
+large_class_declaration_test: Skip # JVM stack overflow.
 list_literal2_negative_test: Skip # Negative, not syntax.
 list_literal_negative_test: Fail # Negative, uses `new List<int>[1, 2]`.
 map_literal2_negative_test: Skip # Negative, not syntax.
diff --git a/tests/language_2/language_2_vm.status b/tests/language_2/language_2_vm.status
index 68980e7..fef4d22 100644
--- a/tests/language_2/language_2_vm.status
+++ b/tests/language_2/language_2_vm.status
@@ -30,3 +30,6 @@
 
 [ !$strong && ($runtime == dart_precompiled || $runtime == vm) ]
 *: SkipByDesign # tests/language has the non-strong mode versions of these tests.
+
+[ $runtime == dart_precompiled || $runtime == vm ]
+superinterface_variance/*: Skip # Issue dart-lang/language#113
diff --git a/tests/language_2/override_inheritance_field_test.dart b/tests/language_2/override_inheritance_field_test.dart
index b752b5d..d9430e1 100644
--- a/tests/language_2/override_inheritance_field_test.dart
+++ b/tests/language_2/override_inheritance_field_test.dart
@@ -27,7 +27,7 @@
   set setter11(int _) => null; //# 31: compile-time error
 
   @virtual int field1; //# 41: ok
-  num field2; //# 42: ok
+  num field2; //# 42: compile-time error
   int field3; //# 43: compile-time error
   int field4; //# 44: compile-time error
   int field5; //# 45: compile-time error
diff --git a/tests/language_2/prefix_invalid_name_test.dart b/tests/language_2/prefix_invalid_name_test.dart
index 6b10189..4d9b406 100644
--- a/tests/language_2/prefix_invalid_name_test.dart
+++ b/tests/language_2/prefix_invalid_name_test.dart
@@ -4,7 +4,7 @@
 
 // Prefix must be a valid identifier.
 import "library1.dart"
-    as lib1.invalid //# 01: compile-time error
+    as lib1.invalid //# 01: syntax error
     ;
 
 main() {}
diff --git a/tests/language_2/regress_36084_test.dart b/tests/language_2/regress_36084_test.dart
new file mode 100644
index 0000000..d16706e
--- /dev/null
+++ b/tests/language_2/regress_36084_test.dart
@@ -0,0 +1,62 @@
+// Copyright (c) 2019, the Dart project authors.  Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+import "package:expect/expect.dart";
+
+class A {
+  void call(int a, [int b]) {}
+}
+
+class A1 {
+  void call(int a, [int b]) {}
+  int noSuchMethod(Invocation invocation) {
+    return 42;
+  }
+}
+
+class A2 {
+  // Same as A1 but without a call method.
+  int noSuchMethod(Invocation invocation) {
+    return 42;
+  }
+}
+
+class B {
+  dynamic foo;
+  dynamic get bar => foo;
+}
+
+class B1 {
+  dynamic foo;
+  dynamic get bar => foo;
+
+  int noSuchMethod(Invocation invocation) {
+    Expect.fail('B1.noSuchMethod should not be called.');
+  }
+}
+
+main() {
+  B b = new B();
+  b.foo = new A();
+  Expect.throwsNoSuchMethodError(() => b.foo(1, 2, 3));
+  Expect.throwsNoSuchMethodError(() => b.bar(1, 2, 3));
+  b.foo = new A1();
+  Expect.equals(42, b.foo(1, 2, 3));
+  Expect.equals(42, b.bar(1, 2, 3));
+  b.foo = new A2();
+  Expect.equals(42, b.foo(1, 2, 3));
+  Expect.equals(42, b.bar(1, 2, 3));
+
+  // Same test but with B1, which has its own `noSuchMethod()` handler.
+  B1 b1 = new B1();
+  b1.foo = new A();
+  Expect.throwsNoSuchMethodError(() => b1.foo(1, 2, 3));
+  Expect.throwsNoSuchMethodError(() => b1.bar(1, 2, 3));
+  b1.foo = new A1();
+  Expect.equals(42, b1.foo(1, 2, 3));
+  Expect.equals(42, b1.bar(1, 2, 3));
+  b1.foo = new A2();
+  Expect.equals(42, b1.foo(1, 2, 3));
+  Expect.equals(42, b1.bar(1, 2, 3));
+}
diff --git a/tests/language_2/set_literals/invalid_set_literal_test.dart b/tests/language_2/set_literals/invalid_set_literal_test.dart
index 912e65e..5a891e0 100644
--- a/tests/language_2/set_literals/invalid_set_literal_test.dart
+++ b/tests/language_2/set_literals/invalid_set_literal_test.dart
@@ -20,9 +20,9 @@
       = const {Duration(seconds: 0)} // Overrides ==. //# 08: compile-time error
       = const {4.2} // Overrides ==. //# 09: compile-time error
       = const {d} // Overrides ==. //# 10: compile-time error
-      = {,} //# 11: compile-time error
-      = {1,,} //# 12: compile-time error
-      = {1,,1} //# 13: compile-time error
+      = {,} //# 11: syntax error
+      = {1,,} //# 12: syntax error
+      = {1,,1} //# 13: syntax error
       ;
   Expect.isNull(o); // Should be unreachable with a value.
 
diff --git a/tests/language_2/spread_collections/await_test.dart b/tests/language_2/spread_collections/await_test.dart
index 886a94a..839cfc9 100644
--- a/tests/language_2/spread_collections/await_test.dart
+++ b/tests/language_2/spread_collections/await_test.dart
@@ -2,7 +2,7 @@
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
 
-// SharedOptions=--enable-experiment=spread-collections
+// SharedOptions=--enable-experiment=spread-collections,constant-update-2018
 
 import "package:async_helper/async_helper.dart";
 import 'package:expect/expect.dart';
diff --git a/tests/language_2/spread_collections/const_error_test.dart b/tests/language_2/spread_collections/const_error_test.dart
index c15f791..7b4bb94 100644
--- a/tests/language_2/spread_collections/const_error_test.dart
+++ b/tests/language_2/spread_collections/const_error_test.dart
@@ -2,7 +2,7 @@
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
 
-// SharedOptions=--enable-experiment=spread-collections
+// SharedOptions=--enable-experiment=spread-collections,constant-update-2018
 
 import 'dart:collection';
 
diff --git a/tests/language_2/spread_collections/const_test.dart b/tests/language_2/spread_collections/const_test.dart
index b36dff9..dccfab2 100644
--- a/tests/language_2/spread_collections/const_test.dart
+++ b/tests/language_2/spread_collections/const_test.dart
@@ -2,7 +2,7 @@
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
 
-// SharedOptions=--enable-experiment=spread-collections
+// SharedOptions=--enable-experiment=spread-collections,constant-update-2018
 
 import 'package:expect/expect.dart';
 
diff --git a/tests/language_2/spread_collections/inference_test.dart b/tests/language_2/spread_collections/inference_test.dart
index 42e5686..7d0ffef 100644
--- a/tests/language_2/spread_collections/inference_test.dart
+++ b/tests/language_2/spread_collections/inference_test.dart
@@ -2,7 +2,7 @@
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
 
-// SharedOptions=--enable-experiment=spread-collections
+// SharedOptions=--enable-experiment=spread-collections,constant-update-2018
 
 // Test how spread interacts with inference.
 import 'package:expect/expect.dart';
@@ -60,12 +60,12 @@
 void testTopDownInference() {
   // Lists.
   Iterable<T> expectIntIterable<T>() {
-    Expect.identical(int, T);
+    Expect.equals(int, T);
     return [];
   }
 
   Iterable<T> expectDynamicIterable<T>() {
-    Expect.identical(dynamic, T);
+    Expect.equals(dynamic, T);
     return [];
   }
 
@@ -78,14 +78,14 @@
 
   // Maps.
   Map<K, V> expectIntStringMap<K, V>() {
-    Expect.identical(int, K);
-    Expect.identical(String, V);
+    Expect.equals(int, K);
+    Expect.equals(String, V);
     return {};
   }
 
   Map<K, V> expectDynamicDynamicMap<K, V>() {
-    Expect.identical(dynamic, K);
-    Expect.identical(dynamic, V);
+    Expect.equals(dynamic, K);
+    Expect.equals(dynamic, V);
     return {};
   }
 
@@ -99,12 +99,12 @@
 
   // Sets.
   Set<T> expectIntSet<T>() {
-    Expect.identical(int, T);
+    Expect.equals(int, T);
     return Set();
   }
 
   Set<T> expectDynamicSet<T>() {
-    Expect.identical(dynamic, T);
+    Expect.equals(dynamic, T);
     return Set();
   }
 
diff --git a/tests/language_2/spread_collections/map_set_ambiguity_error_test.dart b/tests/language_2/spread_collections/map_set_ambiguity_error_test.dart
index 5f6576d..458f264 100644
--- a/tests/language_2/spread_collections/map_set_ambiguity_error_test.dart
+++ b/tests/language_2/spread_collections/map_set_ambiguity_error_test.dart
@@ -2,7 +2,7 @@
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
 
-// SharedOptions=--enable-experiment=spread-collections
+// SharedOptions=--enable-experiment=spread-collections,constant-update-2018
 
 // Test cases where the syntax is ambiguous between maps and sets.
 import 'dart:collection';
diff --git a/tests/language_2/spread_collections/map_set_ambiguity_test.dart b/tests/language_2/spread_collections/map_set_ambiguity_test.dart
index 9b3d537..4b11ccf 100644
--- a/tests/language_2/spread_collections/map_set_ambiguity_test.dart
+++ b/tests/language_2/spread_collections/map_set_ambiguity_test.dart
@@ -2,7 +2,7 @@
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
 
-// SharedOptions=--enable-experiment=spread-collections
+// SharedOptions=--enable-experiment=spread-collections,constant-update-2018
 
 // Test cases where the syntax is ambiguous between maps and sets.
 import 'dart:collection';
diff --git a/tests/language_2/spread_collections/runtime_error_test.dart b/tests/language_2/spread_collections/runtime_error_test.dart
new file mode 100644
index 0000000..095e77b
--- /dev/null
+++ b/tests/language_2/spread_collections/runtime_error_test.dart
@@ -0,0 +1,36 @@
+// Copyright (c) 2019, the Dart project authors.  Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+// SharedOptions=--enable-experiment=spread-collections,constant-update-2018
+
+import 'package:expect/expect.dart';
+
+// Typed as dynamic to also test spreading a value of type dynamic.
+final dynamic list = [1, 2, 3, 4];
+final dynamic map = {1: 1, 2: 2, 3: 3, 4: 4};
+final dynamic set = {1, 2, 3, 4};
+
+void main() {
+  dynamic nonIterable = 3;
+  Expect.throwsTypeError(() => <int>[...nonIterable]);
+  Expect.throwsTypeError(() => <int>{...nonIterable});
+
+  dynamic nonMap = 3;
+  Expect.throwsTypeError(() => <int, int>{...nonMap});
+
+  dynamic wrongIterableType = <String>["s"];
+  Expect.throwsTypeError(() => <int>[...wrongIterableType]);
+  Expect.throwsTypeError(() => <int>{...wrongIterableType});
+
+  dynamic wrongKeyType = <String, int>{"s": 1};
+  dynamic wrongValueType = <int, String>{1: "s"};
+  Expect.throwsTypeError(() => <int, int>{...wrongKeyType});
+  Expect.throwsTypeError(() => <int, int>{...wrongValueType});
+
+  // Mismatched collection types.
+  Expect.throwsTypeError(() => <int>[...map]);
+  Expect.throwsTypeError(() => <int, int>{...list});
+  Expect.throwsTypeError(() => <int, int>{...set});
+  Expect.throwsTypeError(() => <int>{...map});
+}
diff --git a/tests/language_2/spread_collections/spread_test.dart b/tests/language_2/spread_collections/spread_test.dart
index bd88880..bb2e166 100644
--- a/tests/language_2/spread_collections/spread_test.dart
+++ b/tests/language_2/spread_collections/spread_test.dart
@@ -2,7 +2,7 @@
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
 
-// SharedOptions=--enable-experiment=spread-collections
+// SharedOptions=--enable-experiment=spread-collections,constant-update-2018
 
 import 'package:expect/expect.dart';
 
@@ -19,7 +19,6 @@
   testSet();
   testDuplicateKeys();
   testKeyOrder();
-  testCastFailures();
 }
 
 void testList() {
@@ -197,27 +196,3 @@
   set = <Equality>{log(e1a), ...<Equality>[log(e1b), log(e2a), log(e2b)]};
   Expect.equals("1:a,1:b,2:a,2:b", transcript.join(","));
 }
-
-void testCastFailures() {
-  dynamic nonIterable = 3;
-  Expect.throwsTypeError(() => <int>[...nonIterable]);
-  Expect.throwsTypeError(() => <int>{...nonIterable});
-
-  dynamic nonMap = 3;
-  Expect.throwsTypeError(() => <int, int>{...nonMap});
-
-  dynamic wrongIterableType = <String>["s"];
-  Expect.throwsTypeError(() => <int>[...wrongIterableType]);
-  Expect.throwsTypeError(() => <int>{...wrongIterableType});
-
-  dynamic wrongKeyType = <String, int>{"s": 1};
-  dynamic wrongValueType = <int, String>{1: "s"};
-  Expect.throwsTypeError(() => <int, int>{...wrongKeyType});
-  Expect.throwsTypeError(() => <int, int>{...wrongValueType});
-
-  // Mismatched collection types.
-  Expect.throwsTypeError(() => <int>[...map]);
-  Expect.throwsTypeError(() => <int, int>{...list});
-  Expect.throwsTypeError(() => <int, int>{...set});
-  Expect.throwsTypeError(() => <int>{...map});
-}
diff --git a/tests/language_2/spread_collections/syntax_error_test.dart b/tests/language_2/spread_collections/syntax_error_test.dart
index 1ccea11..96802da 100644
--- a/tests/language_2/spread_collections/syntax_error_test.dart
+++ b/tests/language_2/spread_collections/syntax_error_test.dart
@@ -2,21 +2,21 @@
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
 
-// SharedOptions=--enable-experiment=spread-collections
+// SharedOptions=--enable-experiment=spread-collections,constant-update-2018
 
 void main() {
   // Spread nothing.
-  var _ = [...]; //# 00: compile-time error
-  var _ = [...?]; //# 01: compile-time error
-  var _ = [...,]; //# 02: compile-time error
+  var _ = [...]; //# 00: syntax error
+  var _ = [...?]; //# 01: syntax error
+  var _ = [...,]; //# 02: syntax error
 
   // Use `...` in map entry.
-  var _ = {"a": ...{}}; //# 03: compile-time error
-  var _ = {...{}: "b"}; //# 04: compile-time error
-  var _ = {"a": ...?{}}; //# 05: compile-time error
-  var _ = {...?{}: "b"}; //# 06: compile-time error
+  var _ = {"a": ...{}}; //# 03: syntax error
+  var _ = {...{}: "b"}; //# 04: syntax error
+  var _ = {"a": ...?{}}; //# 05: syntax error
+  var _ = {...?{}: "b"}; //# 06: syntax error
 
   // Treats `...?` as single token.
-  var _ = [... ?null]; //# 07: compile-time error
-  var _ = {1: 2, ... ?null}; //# 08: compile-time error
+  var _ = [... ?null]; //# 07: syntax error
+  var _ = {1: 2, ... ?null}; //# 08: syntax error
 }
diff --git a/tests/language_2/spread_collections/syntax_test.dart b/tests/language_2/spread_collections/syntax_test.dart
index 7100394..716ec22 100644
--- a/tests/language_2/spread_collections/syntax_test.dart
+++ b/tests/language_2/spread_collections/syntax_test.dart
@@ -2,7 +2,7 @@
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
 
-// SharedOptions=--enable-experiment=spread-collections
+// SharedOptions=--enable-experiment=spread-collections,constant-update-2018
 
 // Tests syntax edge cases.
 import 'package:expect/expect.dart';
diff --git a/tests/language_2/spread_collections/type_error_test.dart b/tests/language_2/spread_collections/type_error_test.dart
index 68cf98c..4c7a338 100644
--- a/tests/language_2/spread_collections/type_error_test.dart
+++ b/tests/language_2/spread_collections/type_error_test.dart
@@ -2,7 +2,7 @@
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
 
-// SharedOptions=--enable-experiment=spread-collections
+// SharedOptions=--enable-experiment=spread-collections,constant-update-2018
 
 void main() {
   // Spread non-iterable or non-map.
diff --git a/tests/language_2/superinterface_variance/abstract_class_error_test.dart b/tests/language_2/superinterface_variance/abstract_class_error_test.dart
new file mode 100644
index 0000000..47367d1
--- /dev/null
+++ b/tests/language_2/superinterface_variance/abstract_class_error_test.dart
@@ -0,0 +1,132 @@
+// Copyright (c) 2019, the Dart project authors.  Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+typedef F1<X> = void Function(X);
+typedef F2<X> = X Function(X);
+typedef F3<X> = void Function<Y extends X>();
+typedef F4<X> = X Function(X Function(void));
+typedef F5<X, Y> = Y Function(X);
+typedef F6<X, Y> = X Function(Y);
+
+class A<X> {}
+
+abstract class B<X> extends A<A<F1<X>>> {} //# 01: compile-time error
+
+abstract class B<X> extends A<A<F2<X>>> {} //# 02: compile-time error
+
+abstract class B<X> extends A<A<F3<X>>> {} //# 03: compile-time error
+
+abstract class B<X> extends A<A<F4<X>>> {} //# 04: compile-time error
+
+abstract class B<X, Y> extends A<A<F5<X, Y>>> {} //# 05: compile-time error
+
+abstract class B<X, Y> extends A<A<F6<X, Y>>> {} //# 06: compile-time error
+
+abstract class B<X> extends Object //# 07: compile-time error
+    with //# 07: continued
+        A<A<F1<X>>> {} //# 07: continued
+
+abstract class B<X> extends Object //# 08: compile-time error
+    with //# 08: continued
+        A<A<F2<X>>> {} //# 08: continued
+
+abstract class B<X> extends Object //# 09: compile-time error
+    with //# 09: continued
+        A<A<F3<X>>> {} //# 09: continued
+
+abstract class B<X> extends Object //# 10: compile-time error
+    with //# 10: continued
+        A<A<F4<X>>> {} //# 10: continued
+
+abstract class B<X, Y> extends Object //# 11: compile-time error
+    with //# 11: continued
+        A<A<F5<X, Y>>> {} //# 11: continued
+
+abstract class B<X, Y> extends Object //# 12: compile-time error
+    with //# 12: continued
+        A<A<F6<X, Y>>> {} //# 12: continued
+
+abstract class B<X> implements A<A<F1<X>>> {} //# 13: compile-time error
+
+abstract class B<X> implements A<A<F2<X>>> {} //# 14: compile-time error
+
+abstract class B<X> implements A<A<F3<X>>> {} //# 15: compile-time error
+
+abstract class B<X> implements A<A<F4<X>>> {} //# 16: compile-time error
+
+abstract class B<X, Y> implements A<A<F5<X, Y>>> {} //# 17: compile-time error
+
+abstract class B<X, Y> implements A<A<F6<X, Y>>> {} //# 18: compile-time error
+
+abstract class B<X> extends A<A<void Function(X)>> {} //# 19: compile-time error
+
+abstract class B<X> extends A<A<X Function(X)>> {} //# 20: compile-time error
+
+// Two errors here: Invariance in superinterface and
+// generic function type used as actual type argument.
+abstract class B<X> extends //# 21: compile-time error
+    A<A<void Function<Y extends X>()>> {} //# 21: continued
+
+abstract class B<X> extends //# 22: compile-time error
+    A<A<X Function(X Function(void))>> {} //# 22: continued
+
+abstract class B<X, Y> extends A<A<Y Function(X)>> {} //# 23: compile-time error
+
+abstract class B<X, Y> extends A<A<X Function(Y)>> {} //# 24: compile-time error
+
+abstract class B<X> extends Object //# 25: compile-time error
+    with //# 25: continued
+        A<A<void Function(X)>> {} //# 25: continued
+
+abstract class B<X> extends Object //# 26: compile-time error
+    with //# 26: continued
+        A<A<X Function(X)>> {} //# 26: continued
+
+// Two errors here: Invariance in superinterface and
+// generic function type used as actual type argument.
+abstract class B<X> extends Object //# 27: compile-time error
+    with //# 27: continued
+        A<A<void Function<Y extends X>()>> {} //# 27: continued
+
+abstract class B<X> extends Object //# 28: compile-time error
+    with //# 28: continued
+        A<A<X Function(X Function(void))>> {} //# 28: continued
+
+abstract class B<X, Y> extends Object //# 29: compile-time error
+    with //# 29: continued
+        A<A<Y Function(X)>> {} //# 29: continued
+
+abstract class B<X, Y> extends Object //# 30: compile-time error
+    with //# 30: continued
+        A<A<X Function(Y)>> {} //# 30: continued
+
+abstract class B<X> //# 31: compile-time error
+    implements //# 31: continued
+        A<A<void Function(X)>> {} //# 31: continued
+
+abstract class B<X> //# 32: compile-time error
+    implements //# 32: continued
+        A<A<X Function(X)>> {} //# 32: continued
+
+// Two errors here: Invariance in superinterface and
+// generic function type used as actual type argument.
+abstract class B<X> //# 33: compile-time error
+    implements //# 33: continued
+        A<A<void Function<Y extends X>()>> {} //# 33: continued
+
+abstract class B<X> //# 34: compile-time error
+    implements //# 34: continued
+        A<A<X Function(X Function(void))>> {} //# 34: continued
+
+abstract class B<X, Y> //# 35: compile-time error
+    implements //# 35: continued
+        A<A<Y Function(X)>> {} //# 35: continued
+
+abstract class B<X, Y> //# 36: compile-time error
+    implements //# 36: continued
+        A<A<X Function(Y)>> {} //# 36: continued
+
+main() {
+  A();
+}
diff --git a/tests/language_2/superinterface_variance/abstract_mixin_application_error_test.dart b/tests/language_2/superinterface_variance/abstract_mixin_application_error_test.dart
new file mode 100644
index 0000000..0362eab
--- /dev/null
+++ b/tests/language_2/superinterface_variance/abstract_mixin_application_error_test.dart
@@ -0,0 +1,161 @@
+// Copyright (c) 2019, the Dart project authors.  Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+typedef F1<X> = void Function(X);
+typedef F2<X> = X Function(X);
+typedef F3<X> = void Function<Y extends X>();
+typedef F4<X> = X Function(X Function(void));
+typedef F5<X, Y> = Y Function(X);
+typedef F6<X, Y> = X Function(Y);
+
+class A<X> {}
+
+mixin B {}
+
+class C0 = Object with B;
+
+abstract class C<X> = A<F1<X>> with B; //# 01: compile-time error
+
+abstract class C<X> = A<F2<X>> with B; //# 02: compile-time error
+
+abstract class C<X> = A<F3<X>> with B; //# 03: compile-time error
+
+abstract class C<X> = A<F4<X>> with B; //# 04: compile-time error
+
+abstract class C<X, Y> = A<F5<X, Y>> with B; //# 05: compile-time error
+
+abstract class C<X, Y> = A<F6<X, Y>> with B; //# 06: compile-time error
+
+abstract class C<X> = Object with A<F1<X>>; //# 07: compile-time error
+
+abstract class C<X> = Object with A<F2<X>>; //# 08: compile-time error
+
+abstract class C<X> = Object with A<F3<X>>; //# 09: compile-time error
+
+abstract class C<X> = Object with A<F4<X>>; //# 10: compile-time error
+
+abstract class C<X, Y> = Object with A<F5<X, Y>>; //# 11: compile-time error
+
+abstract class C<X, Y> = Object with A<F6<X, Y>>; //# 12: compile-time error
+
+abstract class C<X> = Object //# 13: compile-time error
+    with //# 13: continued
+        B //# 13: continued
+    implements //# 13: continued
+        A<F1<X>>; //# 13: continued
+
+abstract class C<X> = Object //# 14: compile-time error
+    with //# 14: continued
+        B //# 14: continued
+    implements //# 14: continued
+        A<F2<X>>; //# 14: continued
+
+abstract class C<X> = Object //# 15: compile-time error
+    with //# 15: continued
+        B //# 15: continued
+    implements //# 15: continued
+        A<F3<X>>; //# 15: continued
+
+abstract class C<X> = Object //# 16: compile-time error
+    with //# 16: continued
+        B //# 16: continued
+    implements //# 16: continued
+        A<F4<X>>; //# 16: continued
+
+abstract class C<X, Y> = Object //# 17: compile-time error
+    with //# 17: continued
+        B //# 17: continued
+    implements //# 17: continued
+        A<F5<X, Y>>; //# 17: continued
+
+abstract class C<X, Y> = Object //# 18: compile-time error
+    with //# 18: continued
+        B //# 18: continued
+    implements //# 18: continued
+        A<F6<X, Y>>; //# 18: continued
+
+abstract class C<X> = A<void Function(X)> with B; //# 19: compile-time error
+
+abstract class C<X> = A<X Function(X)> with B; //# 20: compile-time error
+
+// Two errors here: Invariance in superinterface and
+// generic function type used as actual type argument.
+abstract class C<X> = A<void Function<Y extends X>()> //# 21: compile-time error
+    with //# 21: continued
+        B; //# 21: continued
+
+abstract class C<X> = A<X Function(X Function(void))> //# 22: compile-time error
+    with //# 22: continued
+        B; //# 22: continued
+
+abstract class C<X, Y> = A<Y Function(X)> with B; //# 23: compile-time error
+
+abstract class C<X, Y> = A<X Function(Y)> with B; //# 24: compile-time error
+
+abstract class C<X> = Object //# 25: compile-time error
+    with //# 25: continued
+        A<void Function(X)>; //# 25: continued
+
+abstract class C<X> = Object with A<X Function(X)>; //# 26: compile-time error
+
+// Two errors here: Invariance in superinterface and
+// generic function type used as actual type argument.
+abstract class C<X> = Object //# 27: compile-time error
+    with //# 27: continued
+        A<void Function<Y extends X>()>; //# 27: continued
+
+abstract class C<X> = Object //# 28: compile-time error
+    with //# 28: continued
+        A<X Function(X Function(void))>; //# 28: continued
+
+abstract class C<X, Y> = Object //# 29: compile-time error
+    with //# 29: continued
+        A<Y Function(X)>; //# 29: continued
+
+abstract class C<X, Y> = Object //# 30: compile-time error
+    with //# 30: continued
+        A<X Function(Y)>; //# 30: continued
+
+abstract class C<X> = Object //# 31: compile-time error
+    with //# 31: continued
+        B //# 31: continued
+    implements //# 31: continued
+        A<void Function(X)>; //# 31: continued
+
+abstract class C<X> = Object //# 32: compile-time error
+    with //# 32: continued
+        B //# 32: continued
+    implements //# 32: continued
+        A<X Function(X)>; //# 32: continued
+
+// Two errors here: Invariance in superinterface and
+// generic function type used as actual type argument.
+abstract class C<X> = Object //# 33: compile-time error
+    with //# 33: continued
+        B //# 33: continued
+    implements //# 33: continued
+        A<void Function<Y extends X>()>; //# 33: continued
+
+abstract class C<X> = Object //# 34: compile-time error
+    with //# 34: continued
+        B //# 34: continued
+    implements //# 34: continued
+        A<X Function(X Function(void))>; //# 34: continued
+
+abstract class C<X, Y> = Object //# 35: compile-time error
+    with //# 35: continued
+        B //# 35: continued
+    implements //# 35: continued
+        A<Y Function(X)>; //# 35: continued
+
+abstract class C<X, Y> = Object //# 36: compile-time error
+    with //# 36: continued
+        B //# 36: continued
+    implements //# 36: continued
+        A<X Function(Y)>; //# 36: continued
+
+main() {
+  A();
+  C0();
+}
diff --git a/tests/language_2/superinterface_variance/concrete_class_error_test.dart b/tests/language_2/superinterface_variance/concrete_class_error_test.dart
new file mode 100644
index 0000000..3d8ac1e
--- /dev/null
+++ b/tests/language_2/superinterface_variance/concrete_class_error_test.dart
@@ -0,0 +1,102 @@
+// Copyright (c) 2019, the Dart project authors.  Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+typedef F1<X> = void Function(X);
+typedef F2<X> = X Function(X);
+typedef F3<X> = void Function<Y extends X>();
+typedef F4<X> = X Function(X Function(void));
+typedef F5<X, Y> = Y Function(X);
+typedef F6<X, Y> = X Function(Y);
+
+class A<X> {}
+
+class B<X> extends A<F1<X>> {} //# 01: compile-time error
+
+class B<X> extends A<F2<X>> {} //# 02: compile-time error
+
+class B<X> extends A<F3<X>> {} //# 03: compile-time error
+
+class B<X> extends A<F4<X>> {} //# 04: compile-time error
+
+class B<X, Y> extends A<F5<X, Y>> {} //# 05: compile-time error
+
+class B<X, Y> extends A<F6<X, Y>> {} //# 06: compile-time error
+
+class B<X> extends Object with A<F1<X>> {} //# 07: compile-time error
+
+class B<X> extends Object with A<F2<X>> {} //# 08: compile-time error
+
+class B<X> extends Object with A<F3<X>> {} //# 09: compile-time error
+
+class B<X> extends Object with A<F4<X>> {} //# 10: compile-time error
+
+class B<X, Y> extends Object with A<F5<X, Y>> {} //# 11: compile-time error
+
+class B<X, Y> extends Object with A<F6<X, Y>> {} //# 12: compile-time error
+
+class B<X> implements A<F1<X>> {} //# 13: compile-time error
+
+class B<X> implements A<F2<X>> {} //# 14: compile-time error
+
+class B<X> implements A<F3<X>> {} //# 15: compile-time error
+
+class B<X> implements A<F4<X>> {} //# 16: compile-time error
+
+class B<X, Y> implements A<F5<X, Y>> {} //# 17: compile-time error
+
+class B<X, Y> implements A<F6<X, Y>> {} //# 18: compile-time error
+
+class B<X> extends A<void Function(X)> {} //# 19: compile-time error
+
+class B<X> extends A<X Function(X)> {} //# 20: compile-time error
+
+// Two errors here: Invariance in superinterface and
+// generic function type used as actual type argument.
+class B<X> extends A<void Function<Y extends X>()> {} //# 21: compile-time error
+
+class B<X> extends A<X Function(X Function(void))> {} //# 22: compile-time error
+
+class B<X, Y> extends A<Y Function(X)> {} //# 23: compile-time error
+
+class B<X, Y> extends A<X Function(Y)> {} //# 24: compile-time error
+
+class B<X> extends Object with A<void Function(X)> {} //# 25: compile-time error
+
+class B<X> extends Object with A<X Function(X)> {} //# 26: compile-time error
+
+// Two errors here: Invariance in superinterface and
+// generic function type used as actual type argument.
+class B<X> extends Object //# 27: compile-time error
+    with //# 27: continued
+        A<void Function<Y extends X>()> {} //# 27: continued
+
+class B<X> extends Object //# 28: compile-time error
+    with //# 28: continued
+        A<X Function(X Function(void))> {} //# 28: continued
+
+class B<X, Y> extends Object with A<Y Function(X)> {} //# 29: compile-time error
+
+class B<X, Y> extends Object with A<X Function(Y)> {} //# 30: compile-time error
+
+class B<X> implements A<void Function(X)> {} //# 31: compile-time error
+
+class B<X> implements A<X Function(X)> {} //# 32: compile-time error
+
+// Two errors here: Invariance in superinterface and
+// generic function type used as actual type argument.
+class B<X> //# 33: compile-time error
+    implements //# 33: continued
+        A<void Function<Y extends X>()> {} //# 33: continued
+
+class B<X> //# 34: compile-time error
+    implements //# 34: continued
+        A<X Function(X Function(void))> {} //# 34: continued
+
+class B<X, Y> implements A<Y Function(X)> {} //# 35: compile-time error
+
+class B<X, Y> implements A<X Function(Y)> {} //# 36: compile-time error
+
+main() {
+  A();
+}
diff --git a/tests/language_2/superinterface_variance/concrete_mixin_application_error_test.dart b/tests/language_2/superinterface_variance/concrete_mixin_application_error_test.dart
new file mode 100644
index 0000000..b9b658d
--- /dev/null
+++ b/tests/language_2/superinterface_variance/concrete_mixin_application_error_test.dart
@@ -0,0 +1,127 @@
+// Copyright (c) 2019, the Dart project authors.  Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+typedef F1<X> = void Function(X);
+typedef F2<X> = X Function(X);
+typedef F3<X> = void Function<Y extends X>();
+typedef F4<X> = X Function(X Function(void));
+typedef F5<X, Y> = Y Function(X);
+typedef F6<X, Y> = X Function(Y);
+
+class A<X> {}
+
+mixin B {}
+
+class C0 = Object with B;
+
+class C<X> = A<F1<X>> with B; //# 01: compile-time error
+
+class C<X> = A<F2<X>> with B; //# 02: compile-time error
+
+class C<X> = A<F3<X>> with B; //# 03: compile-time error
+
+class C<X> = A<F4<X>> with B; //# 04: compile-time error
+
+class C<X, Y> = A<F5<X, Y>> with B; //# 05: compile-time error
+
+class C<X, Y> = A<F6<X, Y>> with B; //# 06: compile-time error
+
+class C<X> = Object with A<F1<X>>; //# 07: compile-time error
+
+class C<X> = Object with A<F2<X>>; //# 08: compile-time error
+
+class C<X> = Object with A<F3<X>>; //# 09: compile-time error
+
+class C<X> = Object with A<F4<X>>; //# 10: compile-time error
+
+class C<X, Y> = Object with A<F5<X, Y>>; //# 11: compile-time error
+
+class C<X, Y> = Object with A<F6<X, Y>>; //# 12: compile-time error
+
+class C<X> = Object with B implements A<F1<X>>; //# 13: compile-time error
+
+class C<X> = Object with B implements A<F2<X>>; //# 14: compile-time error
+
+class C<X> = Object with B implements A<F3<X>>; //# 15: compile-time error
+
+class C<X> = Object with B implements A<F4<X>>; //# 16: compile-time error
+
+class C<X, Y> = Object with B implements A<F5<X, Y>>; //# 17: compile-time error
+
+class C<X, Y> = Object with B implements A<F6<X, Y>>; //# 18: compile-time error
+
+class C<X> = A<void Function(X)> with B; //# 19: compile-time error
+
+class C<X> = A<X Function(X)> with B; //# 20: compile-time error
+
+// Two errors here: Invariance in superinterface and
+// generic function type used as actual type argument.
+class C<X> = A<void Function<Y extends X>()> with B; //# 21: compile-time error
+
+class C<X> = A<X Function(X Function(void))> with B; //# 22: compile-time error
+
+class C<X, Y> = A<Y Function(X)> with B; //# 23: compile-time error
+
+class C<X, Y> = A<X Function(Y)> with B; //# 24: compile-time error
+
+class C<X> = Object with A<void Function(X)>; //# 25: compile-time error
+
+class C<X> = Object with A<X Function(X)>; //# 26: compile-time error
+
+// Two errors here: Invariance in superinterface and
+// generic function type used as actual type argument.
+class C<X> = Object //# 27: compile-time error
+    with //# 27: continued
+        A<void Function<Y extends X>()>; //# 27: continued
+
+class C<X> = Object //# 28: compile-time error
+    with //# 28: continued
+        A<X Function(X Function(void))>; //# 28: continued
+
+class C<X, Y> = Object with A<Y Function(X)>; //# 29: compile-time error
+
+class C<X, Y> = Object with A<X Function(Y)>; //# 30: compile-time error
+
+class C<X> = Object //# 31: compile-time error
+    with //# 31: continued
+        B //# 31: continued
+    implements //# 31: continued
+        A<void Function(X)>; //# 31: continued
+
+class C<X> = Object //# 32: compile-time error
+    with //# 32: continued
+        B //# 32: continued
+    implements //# 32: continued
+        A<X Function(X)>; //# 32: continued
+
+// Two errors here: Invariance in superinterface and
+// generic function type used as actual type argument.
+class C<X> = Object //# 33: compile-time error
+    with //# 33: continued
+        B //# 33: continued
+    implements //# 33: continued
+        A<void Function<Y extends X>()>; //# 33: continued
+
+class C<X> = Object //# 34: compile-time error
+    with //# 34: continued
+        B //# 34: continued
+    implements //# 34: continued
+        A<X Function(X Function(void))>; //# 34: continued
+
+class C<X, Y> = Object //# 35: compile-time error
+    with //# 35: continued
+        B //# 35: continued
+    implements //# 35: continued
+        A<Y Function(X)>; //# 35: continued
+
+class C<X, Y> = Object //# 36: compile-time error
+    with //# 36: continued
+        B //# 36: continued
+    implements //# 36: continued
+        A<X Function(Y)>; //# 36: continued
+
+main() {
+  A();
+  C0();
+}
diff --git a/tests/language_2/superinterface_variance/covariance_test.dart b/tests/language_2/superinterface_variance/covariance_test.dart
new file mode 100644
index 0000000..11bb198
--- /dev/null
+++ b/tests/language_2/superinterface_variance/covariance_test.dart
@@ -0,0 +1,87 @@
+// Copyright (c) 2019, the Dart project authors.  Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+typedef F<X> = X Function();
+typedef G<X> = void Function(void Function(X));
+
+class A<X> {}
+
+class B01<X> extends A<F<X>> {}
+
+class B02<X> extends A<G<X>> {}
+
+class B03<X> extends A<X Function()> {}
+
+class B04<X> extends A<void Function(void Function(X))> {}
+
+class B05<X> extends Object with A<F<X>> {}
+
+class B06<X> extends Object with A<G<X>> {}
+
+class B07<X> extends Object with A<X Function()> {}
+
+class B08<X> extends Object with A<void Function(void Function(X))> {}
+
+class B09<X> implements A<F<X>> {}
+
+class B10<X> implements A<G<X>> {}
+
+class B11<X> implements A<X Function()> {}
+
+class B12<X> implements A<void Function(void Function(X))> {}
+
+abstract class B13<X> extends A<A<F<X>>> {}
+
+abstract class B14<X> extends A<A<G<X>>> {}
+
+abstract class B15<X> extends A<A<X Function()>> {}
+
+abstract class B16<X> extends A<A<void Function(void Function(X))>> {}
+
+abstract class B17<X> extends Object with A<A<F<X>>> {}
+
+abstract class B18<X> extends Object with A<A<G<X>>> {}
+
+abstract class B19<X> extends Object with A<A<X Function()>> {}
+
+abstract class B20<X> extends Object
+    with A<A<void Function(void Function(X))>> {}
+
+abstract class B21<X> implements A<A<F<X>>> {}
+
+abstract class B22<X> implements A<A<G<X>>> {}
+
+abstract class B23<X> implements A<A<X Function()>> {}
+
+abstract class B24<X> implements A<A<void Function(void Function(X))>> {}
+
+main() {
+  A();
+
+  B01();
+  B02();
+  B03();
+  B04();
+  B05();
+  B06();
+  B07();
+  B08();
+  B09();
+  B10();
+  B11();
+  B12();
+
+  B13 b13;
+  B14 b14;
+  B15 b15;
+  B16 b16;
+  B17 b17;
+  B18 b18;
+  B19 b19;
+  B20 b20;
+  B21 b21;
+  B22 b22;
+  B23 b23;
+  B24 b24;
+}
diff --git a/tests/language_2/superinterface_variance/mixin_error_test.dart b/tests/language_2/superinterface_variance/mixin_error_test.dart
new file mode 100644
index 0000000..14963f3
--- /dev/null
+++ b/tests/language_2/superinterface_variance/mixin_error_test.dart
@@ -0,0 +1,162 @@
+// Copyright (c) 2019, the Dart project authors.  Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+typedef F1<X> = void Function(X);
+typedef F2<X> = X Function(X);
+typedef F3<X> = void Function<Y extends X>();
+typedef F4<X> = X Function(X Function(void));
+typedef F5<X, Y> = Y Function(X);
+typedef F6<X, Y> = X Function(Y);
+
+class A<X> {}
+
+mixin B<X> on A<F1<X>> {} //# 01: compile-time error
+
+mixin B<X> on A<F2<X>> {} //# 02: compile-time error
+
+mixin B<X> on A<F3<X>> {} //# 03: compile-time error
+
+mixin B<X> on A<F4<X>> {} //# 04: compile-time error
+
+mixin B<X, Y> on A<F5<X, Y>> {} //# 05: compile-time error
+
+mixin B<X, Y> on A<F6<X, Y>> {} //# 06: compile-time error
+
+mixin B<X> on Object, A<F1<X>> {} //# 07: compile-time error
+
+mixin B<X> on Object, A<F2<X>> {} //# 08: compile-time error
+
+mixin B<X> on Object, A<F3<X>> {} //# 09: compile-time error
+
+mixin B<X> on Object, A<F4<X>> {} //# 10: compile-time error
+
+mixin B<X, Y> on Object, A<F5<X, Y>> {} //# 11: compile-time error
+
+mixin B<X, Y> on Object, A<F6<X, Y>> {} //# 12: compile-time error
+
+mixin B<X> implements A<F1<X>> {} //# 13: compile-time error
+
+mixin B<X> implements A<F2<X>> {} //# 14: compile-time error
+
+mixin B<X> implements A<F3<X>> {} //# 15: compile-time error
+
+mixin B<X> implements A<F4<X>> {} //# 16: compile-time error
+
+mixin B<X, Y> implements A<F5<X, Y>> {} //# 17: compile-time error
+
+mixin B<X, Y> implements A<F6<X, Y>> {} //# 18: compile-time error
+
+mixin B<X> on A<void Function(X)> {} //# 19: compile-time error
+
+mixin B<X> on A<X Function(X)> {} //# 20: compile-time error
+
+// Two errors here: Invariance in `on` clause and
+// generic function type used as actual type argument.
+mixin B<X> on A<void Function<Y extends X>()> {} //# 21: compile-time error
+
+mixin B<X> on A<X Function(X Function(void))> {} //# 22: compile-time error
+
+mixin B<X, Y> on A<Y Function(X)> {} //# 23: compile-time error
+
+mixin B<X, Y> on A<X Function(Y)> {} //# 24: compile-time error
+
+mixin B<X> on Object, A<void Function(X)> {} //# 25: compile-time error
+
+mixin B<X> on Object, A<X Function(X)> {} //# 26: compile-time error
+
+// Two errors here: Invariance in `on` clause and
+// generic function type used as actual type argument.
+mixin B<X> //# 27: compile-time error
+    on //# 27: continued
+        Object, //# 27: continued
+        A<void Function<Y extends X>()> {} //# 27: continued
+
+mixin B<X> //# 28: compile-time error
+    on //# 28: continued
+        Object, //# 28: continued
+        A<X Function(X Function(void))> {} //# 28: continued
+
+mixin B<X, Y> on Object, A<Y Function(X)> {} //# 29: compile-time error
+
+mixin B<X, Y> on Object, A<X Function(Y)> {} //# 30: compile-time error
+
+mixin B<X> implements A<void Function(X)> {} //# 31: compile-time error
+
+mixin B<X> implements A<X Function(X)> {} //# 32: compile-time error
+
+// Two errors here: Invariance in superinterface and
+// generic function type used as actual type argument.
+mixin B<X> //# 33: compile-time error
+    implements //# 33: continued
+        A<void Function<Y extends X>()> {} //# 33: continued
+
+mixin B<X> //# 34: compile-time error
+    implements //# 34: continued
+        A<X Function(X Function(void))> {} //# 34: continued
+
+mixin B<X, Y> implements A<Y Function(X)> {} //# 35: compile-time error
+
+mixin B<X, Y> implements A<X Function(Y)> {} //# 36: compile-time error
+
+// A superinterface variance error can arise for an inferred type. For
+// instance, mixin inference and instantiation to bound transforms `B` to
+// `B<X, F1<X>>` in subtest 37.
+
+class C<X> extends A<X> with B {} //# 37: compile-time error
+
+mixin B<X, Y extends F1<X>> on A<X> {} //# 37: continued
+
+class C<X> extends A<X> with B {} //# 38: compile-time error
+
+mixin B<X, Y extends F2<X>> on A<X> {} //# 38: continued
+
+class C<X> extends A<X> with B {} //# 39: compile-time error
+
+mixin B<X, Y extends F3<X>> on A<X> {} //# 39: continued
+
+class C<X> extends A<X> with B {} //# 40: compile-time error
+
+mixin B<X, Y extends F4<X>> on A<X> {} //# 40: continued
+
+class C<X> extends A<X> with B {} //# 41: compile-time error
+
+mixin B<X, Y extends F5<X, Y>> on A<X> {} //# 41: continued
+
+// Different kind of error here: I2b binds `Y` to `Null` which yields the
+// correct super-bounded type `B<X, F6<X, Null>>`. But it is still an error
+// for `C`, because a superinterface cannot be a super-bounded type.
+class C<X> extends A<X> with B {} //# 42: compile-time error
+
+mixin B<X, Y extends F6<X, Y>> on A<X> {} //# 42: continued
+
+class C<X> extends A<X> with B {} //# 43: compile-time error
+
+mixin B<X, Y extends void Function(X)> on A<X> {} //# 43: continued
+
+class C<X> extends A<X> with B {} //# 44: compile-time error
+
+mixin B<X, Y extends X Function(X)> on A<X> {} //# 44: continued
+
+// Two errors here: Invariance in inferred superinterface of `C` and
+// generic function type used as bound.
+class C<X> extends A<X> with B {} //# 45: compile-time error
+
+mixin B<X, Y extends void Function<Z extends X>()> on A<X> {} //# 45: continued
+
+class C<X> extends A<X> with B {} //# 46: compile-time error
+
+mixin B<X, Y extends X Function(X Function(void))> on A<X> {} //# 46: continued
+
+class C<X> extends A<X> with B {} //# 47: compile-time error
+
+mixin B<X, Y extends Y Function(X)> on A<X> {} //# 47: continued
+
+// Similar to subtest 42.
+class C<X> extends A<X> with B {} //# 48: compile-time error
+
+mixin B<X, Y extends X Function(Y)> on A<X> {} //# 48: continued
+
+main() {
+  A();
+}
diff --git a/tests/language_2/type_checks_in_factory_method_test.dart b/tests/language_2/type_checks_in_factory_method_test.dart
index 687264e..f0d116d 100644
--- a/tests/language_2/type_checks_in_factory_method_test.dart
+++ b/tests/language_2/type_checks_in_factory_method_test.dart
@@ -1,7 +1,6 @@
 // Copyright (c) 2012, the Dart project authors.  Please see the AUTHORS file
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
-// VMOptions=--enable_checked_mode
 // Tests the type checking when passing code into closure from inside a factory method
 
 import "package:expect/expect.dart";
diff --git a/tests/language_2/type_promotion_functions_test.dart b/tests/language_2/type_promotion_functions_test.dart
index 62a21c8..841d119 100644
--- a/tests/language_2/type_promotion_functions_test.dart
+++ b/tests/language_2/type_promotion_functions_test.dart
@@ -10,17 +10,21 @@
 
 class C {}
 
-// We have the following more specific (<<) relations between these typedefs:
+// Subtype relations:
 //
-//  FuncDynToDyn << FuncAtoDyn
-//  FuncDynToDyn << FuncDynToA << FuncDynToVoid
+//   FuncDynToA    == A       Function(dynamic) <:
+//   FuncDynToDyn  == dynamic Function(dynamic) <:> // "void == dynamic"
+//   FuncDynToVoid == void    Function(dynamic) <:
+//   FuncAtoDyn    == dynamic Function(A).
+//
+// Declarations ordered by "super before sub", as is common for classes:
 
 typedef FuncAtoDyn(A a);
-typedef FuncDynToDyn(x);
 typedef void FuncDynToVoid(x);
+typedef FuncDynToDyn(x);
 typedef A FuncDynToA(x);
 
-func(x) => x;
+A func(x) => null;
 
 A a;
 B b;
@@ -40,10 +44,10 @@
   c = funcAtoDyn(new C()); //# 01: compile-time error
 
   if (funcAtoDyn is FuncDynToDyn) {
-    // No promotion: FuncDynToDyn !<< FuncAtoDyn.
+    // Promotion: FuncDynToDyn <: FuncAtoDyn.
     a = funcAtoDyn(new A());
     b = funcAtoDyn(new B());
-    c = funcAtoDyn(new C()); //# 11: static type warning
+    c = funcAtoDyn(new C());
   }
 }
 
@@ -54,21 +58,23 @@
   c = funcDynToDyn(new C());
 
   if (funcDynToDyn is FuncAtoDyn) {
-    // Promotion: FuncAtoDyn << FuncDynToDyn.
+    // No promotion: FuncAtoDyn <\: FuncDynToDyn.
     a = funcDynToDyn(new A());
     b = funcDynToDyn(new B());
-    c = funcDynToDyn(new C()); //# 09: static type warning
+    c = funcDynToDyn(new C());
   }
 
   if (funcDynToDyn is FuncDynToVoid) {
-    // Promotion: FuncDynToVoid << FuncDynToDyn.
-    a = funcDynToDyn(new A()); //# 12: static type warning
-    b = funcDynToDyn(new B()); //# 13: static type warning
-    c = funcDynToDyn(new C()); //# 14: static type warning
+    // Promotion: FuncDynToVoid <: FuncDynToDyn.
+    funcDynToDyn(new A());
+    funcDynToDyn(new B());
+    funcDynToDyn(new C());
+    // Returned value has type `void`, usage is restricted.
+    Object o = funcDynToDyn(null); //# 12: compile-time error
   }
 
   if (funcDynToDyn is FuncDynToA) {
-    // Promotion: FuncDynToA << FuncDynToDyn.
+    // Promotion: FuncDynToA <: FuncDynToDyn.
     a = funcDynToDyn(new A());
     b = funcDynToDyn(new B());
     c = funcDynToDyn(new C()); //# 10: compile-time error
@@ -77,19 +83,19 @@
 
 testFuncDynToVoid() {
   FuncDynToVoid funcDynToVoid = func;
-  a = funcDynToVoid(new A()); //# 02: static type warning
-  b = funcDynToVoid(new B()); //# 03: static type warning
-  c = funcDynToVoid(new C()); //# 04: static type warning
+  a = funcDynToVoid(new A()); //# 02: compile-time error
+  b = funcDynToVoid(new B()); //# 03: compile-time error
+  c = funcDynToVoid(new C()); //# 04: compile-time error
 
   if (funcDynToVoid is FuncDynToDyn) {
-    // Promotion: FuncDynToDyn << FuncDynToVoid.
+    // Promotion: FuncDynToDyn <:> FuncDynToVoid.
     a = funcDynToVoid(new A());
     b = funcDynToVoid(new B());
     c = funcDynToVoid(new C());
   }
 
   if (funcDynToVoid is FuncDynToA) {
-    // Promotion: FuncDynToA << FuncDynToVoid.
+    // Promotion: FuncDynToA <: FuncDynToVoid.
     a = funcDynToVoid(new A());
     b = funcDynToVoid(new B());
     c = funcDynToVoid(new C()); //# 05: compile-time error
@@ -103,14 +109,14 @@
   c = funcDynToA(new C()); //# 06: compile-time error
 
   if (funcDynToA is FuncDynToDyn) {
-    // No promotion: FuncDynToDyn !<< FuncDynToA.
+    // No promotion: FuncDynToDyn <\: FuncDynToA.
     a = funcDynToA(new A());
     b = funcDynToA(new B());
     c = funcDynToA(new C()); //# 08: compile-time error
   }
 
   if (funcDynToA is FuncDynToVoid) {
-    // No promotion: FuncDynToVoid !<< FuncDynToA.
+    // No promotion: FuncDynToVoid <\: FuncDynToA.
     a = funcDynToA(new A());
     b = funcDynToA(new B());
     c = funcDynToA(new C()); //# 07: compile-time error
diff --git a/tests/lib_2/isolate/spawn_function_test.dart b/tests/lib_2/isolate/spawn_function_test.dart
index eba1bfa..7a2a193 100644
--- a/tests/lib_2/isolate/spawn_function_test.dart
+++ b/tests/lib_2/isolate/spawn_function_test.dart
@@ -17,12 +17,15 @@
 
 void main([args, port]) {
   if (testRemote(main, port)) return;
-  test('message - reply chain', () {
+  test('message - reply chain', () async {
     ReceivePort port = new ReceivePort();
-    Isolate.spawn(child, ['hi', port.sendPort]);
     port.listen(expectAsync((msg) {
       port.close();
       expect(msg, equals('re: hi'));
     }));
+    const String debugName = 'spawnedIsolate';
+    final i =
+        await Isolate.spawn(child, ['hi', port.sendPort], debugName: debugName);
+    expect(i.debugName, debugName);
   });
 }
diff --git a/tests/lib_2/isolate/spawn_uri_test.dart b/tests/lib_2/isolate/spawn_uri_test.dart
index 650bafa..a4d89c3 100644
--- a/tests/lib_2/isolate/spawn_uri_test.dart
+++ b/tests/lib_2/isolate/spawn_uri_test.dart
@@ -12,14 +12,17 @@
 import 'package:expect/async_minitest.dart';
 
 main() {
-  test('isolate fromUri - send and reply', () {
+  test('isolate fromUri - send and reply', () async {
     ReceivePort port = new ReceivePort();
     port.listen(expectAsync((msg) {
       expect(msg, equals('re: hi'));
       port.close();
     }));
 
-    Isolate.spawnUri(
-        Uri.parse('spawn_uri_child_isolate.dart'), ['hi'], port.sendPort);
+    const String debugName = 'spawnedIsolate';
+    final i = await Isolate.spawnUri(
+        Uri.parse('spawn_uri_child_isolate.dart'), ['hi'], port.sendPort,
+        debugName: debugName);
+    expect(i.debugName, debugName);
   });
 }
diff --git a/tests/standalone_2/fragmentation_typed_data_test.dart b/tests/standalone_2/fragmentation_typed_data_test.dart
new file mode 100644
index 0000000..470aaad
--- /dev/null
+++ b/tests/standalone_2/fragmentation_typed_data_test.dart
@@ -0,0 +1,33 @@
+// Copyright (c) 2019, the Dart project authors.  Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+// See fragmentation_test.dart for more information.
+//
+// VMOptions=--no_concurrent_mark --no_concurrent_sweep
+// VMOptions=--no_concurrent_mark --concurrent_sweep
+// VMOptions=--no_concurrent_mark --use_compactor
+// VMOptions=--no_concurrent_mark --use_compactor --force_evacuation
+// VMOptions=--concurrent_mark --no_concurrent_sweep
+// VMOptions=--concurrent_mark --concurrent_sweep
+// VMOptions=--concurrent_mark --use_compactor
+// VMOptions=--concurrent_mark --use_compactor --force_evacuation
+
+import 'dart:typed_data';
+
+main() {
+  final List<List> arrays = [];
+  // Fill up heap with alternate large-small items.
+  for (int i = 0; i < 500000; i++) {
+    arrays.add(new Uint32List(260));
+    arrays.add(new Uint32List(1));
+  }
+  // Clear the large items so the heap has large gaps.
+  for (int i = 0; i < arrays.length; i += 2) {
+    arrays[i] = null;
+  }
+  // Allocate a lot of large items which don't fit in the gaps created above.
+  for (int i = 0; i < 600000; i++) {
+    arrays.add(new Uint32List(300));
+  }
+}
diff --git a/tests/standalone_2/http_launch_test.dart b/tests/standalone_2/http_launch_test.dart
index 9717974..cb97f84 100644
--- a/tests/standalone_2/http_launch_test.dart
+++ b/tests/standalone_2/http_launch_test.dart
@@ -24,6 +24,9 @@
 import 'package:expect/expect.dart';
 
 String pathToExecutable = Platform.executable;
+List<String> executableArguments = Platform.executableArguments
+    .where((arg) => !arg.startsWith('--packages='))
+    .toList();
 Uri pathOfData = Platform.script.resolve('http_launch_data/');
 int port;
 
@@ -50,16 +53,29 @@
 serverRunning(HttpServer server) {
   port = server.port;
   server.listen(handleRequest);
-  Future<ProcessResult> no_http_run = Process.run(pathToExecutable,
-      [pathOfData.resolve('http_launch_main.dart').toFilePath()]);
-  Future<ProcessResult> http_run = Process
-      .run(pathToExecutable, ['http://127.0.0.1:$port/http_launch_main.dart']);
-  Future<ProcessResult> http_pkg_root_run = Process.run(pathToExecutable, [
-    '--package-root=http://127.0.0.1:$port/the_packages/',
-    'http://127.0.0.1:$port/http_launch_main.dart'
-  ]);
-  Future<ProcessResult> isolate_run = Process.run(pathToExecutable,
-      ['http://127.0.0.1:$port/http_spawn_main.dart', '$port']);
+  Future<ProcessResult> no_http_run = Process.run(
+      pathToExecutable,
+      []
+        ..addAll(executableArguments)
+        ..add(pathOfData.resolve('http_launch_main.dart').toFilePath()));
+  Future<ProcessResult> http_run = Process.run(
+      pathToExecutable,
+      []
+        ..addAll(executableArguments)
+        ..add('http://127.0.0.1:$port/http_launch_main.dart'));
+  Future<ProcessResult> http_pkg_root_run = Process.run(
+      pathToExecutable,
+      []
+        ..addAll(executableArguments)
+        ..addAll([
+          '--package-root=http://127.0.0.1:$port/the_packages/',
+          'http://127.0.0.1:$port/http_launch_main.dart'
+        ]));
+  Future<ProcessResult> isolate_run = Process.run(
+      pathToExecutable,
+      []
+        ..addAll(executableArguments)
+        ..addAll(['http://127.0.0.1:$port/http_spawn_main.dart', '$port']));
   Future<List<ProcessResult>> results =
       Future.wait([no_http_run, http_run, http_pkg_root_run, isolate_run]);
   results.then((results) {
diff --git a/tests/standalone_2/io/addlatexhash_test.dart b/tests/standalone_2/io/addlatexhash_test.dart
index 6465852..fe8c166 100755
--- a/tests/standalone_2/io/addlatexhash_test.dart
+++ b/tests/standalone_2/io/addlatexhash_test.dart
@@ -92,7 +92,7 @@
 
   // actions to take
   runAddHash() {
-    var args = packageOptions();
+    var args = <String>[]..addAll(Platform.executableArguments);
     args.addAll([
       path.join(dartRootPath, "tools", "addlatexhash.dart"),
       tmpPar8timesPath,
diff --git a/tests/standalone_2/io/dart_std_io_pipe_test.dart b/tests/standalone_2/io/dart_std_io_pipe_test.dart
index 474e5a8..82ffa31 100644
--- a/tests/standalone_2/io/dart_std_io_pipe_test.dart
+++ b/tests/standalone_2/io/dart_std_io_pipe_test.dart
@@ -39,7 +39,7 @@
   String redirectOutFile = "${dir.path}/redirect";
   String executable = Platform.executable;
   List<String> args = [
-    executable,
+    ([executable]..addAll(Platform.executableArguments)).join(' '),
     dartScript,
     type,
     pipeOutFile,
diff --git a/tests/standalone_2/io/file_read_special_device_test.dart b/tests/standalone_2/io/file_read_special_device_test.dart
index ca6b870..fcfd9cb 100644
--- a/tests/standalone_2/io/file_read_special_device_test.dart
+++ b/tests/standalone_2/io/file_read_special_device_test.dart
@@ -12,7 +12,10 @@
   script = Platform.script.resolve(script).toFilePath();
   var executable = Platform.executable;
   var file = script; // Use script as file.
-  Process.start("bash", ["-c", "$executable $script < $file"]).then((process) {
+  Process.start("bash", [
+    "-c",
+    "$executable ${Platform.executableArguments.join(' ')} $script < $file"
+  ]).then((process) {
     process.exitCode.then((exitCode) {
       Expect.equals(0, exitCode);
     });
diff --git a/tests/standalone_2/io/http_client_stays_alive_test.dart b/tests/standalone_2/io/http_client_stays_alive_test.dart
index 8666bb8..37af33a 100644
--- a/tests/standalone_2/io/http_client_stays_alive_test.dart
+++ b/tests/standalone_2/io/http_client_stays_alive_test.dart
@@ -20,16 +20,6 @@
 const SECONDS = 4;
 const SLACK = 60;
 
-List<String> packageOptions() {
-  if (Platform.packageRoot != null) {
-    return <String>['--package-root=${Platform.packageRoot}'];
-  } else if (Platform.packageConfig != null) {
-    return <String>['--packages=${Platform.packageConfig}'];
-  } else {
-    return <String>[];
-  }
-}
-
 void runServerProcess() {
   asyncStart();
   HttpServer.bind('127.0.0.1', 0).then((server) {
@@ -47,7 +37,10 @@
     var script = Platform.script
         .resolve('http_client_stays_alive_test.dart')
         .toFilePath();
-    var arguments = packageOptions()..add(script)..add(url);
+    var arguments = <String>[]
+      ..addAll(Platform.executableArguments)
+      ..add(script)
+      ..add(url);
     Process.run(Platform.executable, arguments).then((res) {
       subscription.cancel();
       if (res.exitCode != 0) {
diff --git a/tests/standalone_2/io/http_server_close_response_after_error_test.dart b/tests/standalone_2/io/http_server_close_response_after_error_test.dart
index 9230177..eb45423a 100644
--- a/tests/standalone_2/io/http_server_close_response_after_error_test.dart
+++ b/tests/standalone_2/io/http_server_close_response_after_error_test.dart
@@ -20,10 +20,15 @@
         request.response.close();
       });
     });
-    Process.run(Platform.executable, [
-      Platform.script.resolve(CLIENT_SCRIPT).toString(),
-      server.port.toString()
-    ]).then((result) {
+    Process.run(
+            Platform.executable,
+            []
+              ..addAll(Platform.executableArguments)
+              ..addAll([
+                Platform.script.resolve(CLIENT_SCRIPT).toString(),
+                server.port.toString()
+              ]))
+        .then((result) {
       if (result.exitCode != 0) throw "Bad exit code";
       server.close();
     });
diff --git a/tests/standalone_2/io/https_unauthorized_test.dart b/tests/standalone_2/io/https_unauthorized_test.dart
index 2952afd..ea172be 100644
--- a/tests/standalone_2/io/https_unauthorized_test.dart
+++ b/tests/standalone_2/io/https_unauthorized_test.dart
@@ -31,8 +31,7 @@
   ..setTrustedCertificates(localFile('certificates/trusted_certs.pem'));
 
 Future<HttpServer> runServer() {
-  return HttpServer
-      .bindSecure(HOST_NAME, 0, untrustedServerContext, backlog: 5)
+  return HttpServer.bindSecure(HOST_NAME, 0, untrustedServerContext, backlog: 5)
       .then((server) {
     server.listen((HttpRequest request) {
       request.listen((_) {}, onDone: () {
@@ -48,9 +47,12 @@
 void main() {
   var clientScript = localFile('https_unauthorized_client.dart');
   Future clientProcess(int port) {
-    return Process
-        .run(Platform.executable, [clientScript, port.toString()]).then(
-            (ProcessResult result) {
+    return Process.run(
+            Platform.executable,
+            []
+              ..addAll(Platform.executableArguments)
+              ..addAll([clientScript, port.toString()]))
+        .then((ProcessResult result) {
       if (result.exitCode != 0 || !result.stdout.contains('SUCCESS')) {
         print("Client failed");
         print("  stdout:");
diff --git a/tests/standalone_2/io/named_pipe_script_test.dart b/tests/standalone_2/io/named_pipe_script_test.dart
index 8232581..932b46c 100644
--- a/tests/standalone_2/io/named_pipe_script_test.dart
+++ b/tests/standalone_2/io/named_pipe_script_test.dart
@@ -30,7 +30,11 @@
   }
 
   StringBuffer output = new StringBuffer();
-  Process process = await Process.start(Platform.executable, [stdinPipePath]);
+  Process process = await Process.start(
+      Platform.executable,
+      []
+        ..addAll(Platform.executableArguments)
+        ..add(stdinPipePath));
   bool stdinWriteFailed = false;
   process.stdout.transform(utf8.decoder).listen(output.write);
   process.stderr.transform(utf8.decoder).listen((data) {
diff --git a/tests/standalone_2/io/namespace_test.dart b/tests/standalone_2/io/namespace_test.dart
index 73ab607..601278f 100644
--- a/tests/standalone_2/io/namespace_test.dart
+++ b/tests/standalone_2/io/namespace_test.dart
@@ -180,16 +180,6 @@
   Expect.equals(FileSystemEntityType.directory, dirstat.type);
 }
 
-List<String> packageOptions() {
-  if (Platform.packageRoot != null) {
-    return <String>["--package-root=${Platform.packageRoot}"];
-  } else if (Platform.packageConfig != null) {
-    return <String>["--packages=${Platform.packageConfig}"];
-  } else {
-    return <String>[];
-  }
-}
-
 void setupTest() {
   // Create a namespace in /tmp.
   Directory namespace = Directory.systemTemp.createTempSync("namespace");
@@ -202,7 +192,7 @@
       ..writeAsStringSync(file1str);
 
     // Run the test and capture stdout.
-    var args = packageOptions();
+    var args = <String>[]..addAll(Platform.executableArguments);
     args.addAll([
       "--namespace=${namespace.path}",
       Platform.script.toFilePath(),
diff --git a/tests/standalone_2/io/print_sync_test.dart b/tests/standalone_2/io/print_sync_test.dart
index c195431..c23df59 100644
--- a/tests/standalone_2/io/print_sync_test.dart
+++ b/tests/standalone_2/io/print_sync_test.dart
@@ -11,9 +11,13 @@
 
 void main() {
   asyncStart();
-  Process.run(Platform.executable, [
-    Platform.script.resolve('print_sync_script.dart').toFilePath()
-  ]).then((out) {
+  Process.run(
+          Platform.executable,
+          []
+            ..addAll(Platform.executableArguments)
+            ..add(
+                Platform.script.resolve('print_sync_script.dart').toFilePath()))
+      .then((out) {
     asyncEnd();
     Expect.equals(1002, out.stdout.split('\n').length);
   });
diff --git a/tests/standalone_2/io/process_check_arguments_test.dart b/tests/standalone_2/io/process_check_arguments_test.dart
index d0e2c9b..c79c00e 100644
--- a/tests/standalone_2/io/process_check_arguments_test.dart
+++ b/tests/standalone_2/io/process_check_arguments_test.dart
@@ -7,7 +7,8 @@
 import "process_test_util.dart";
 
 test(args) {
-  var future = Process.start(Platform.executable, args);
+  var future = Process.start(Platform.executable,
+      []..addAll(Platform.executableArguments)..addAll(args));
   future.then((process) {
     process.exitCode.then((exitCode) {
       Expect.equals(0, exitCode);
diff --git a/tests/standalone_2/io/process_detached_test.dart b/tests/standalone_2/io/process_detached_test.dart
index ee093b3..b6b59e7 100644
--- a/tests/standalone_2/io/process_detached_test.dart
+++ b/tests/standalone_2/io/process_detached_test.dart
@@ -18,7 +18,11 @@
   asyncStart();
   var script =
       Platform.script.resolve('process_detached_script.dart').toFilePath();
-  var future = Process.start(Platform.executable, [script],
+  var future = Process.start(
+      Platform.executable,
+      []
+        ..addAll(Platform.executableArguments)
+        ..add(script),
       mode: ProcessStartMode.detached);
   future.then((process) {
     Expect.isNotNull(process.pid);
@@ -37,7 +41,8 @@
   asyncStart();
   var script =
       Platform.script.resolve('process_detached_script.dart').toFilePath();
-  var future = Process.start(Platform.executable, [script, 'echo'],
+  var future = Process.start(Platform.executable,
+      []..addAll(Platform.executableArguments)..addAll([script, 'echo']),
       mode: ProcessStartMode.detachedWithStdio);
   future.then((process) {
     Expect.isNotNull(process.pid);
diff --git a/tests/standalone_2/io/process_environment_test.dart b/tests/standalone_2/io/process_environment_test.dart
index dd656b2..ca56130 100644
--- a/tests/standalone_2/io/process_environment_test.dart
+++ b/tests/standalone_2/io/process_environment_test.dart
@@ -16,8 +16,8 @@
   if (!new File(printEnv).existsSync()) {
     printEnv = '../$printEnv';
   }
-  Process
-      .run(dartExecutable, [printEnv, name],
+  Process.run(dartExecutable,
+          []..addAll(Platform.executableArguments)..addAll([printEnv, name]),
           environment: environment, includeParentEnvironment: includeParent)
       .then((result) {
     if (result.exitCode != 0) {
diff --git a/tests/standalone_2/io/process_inherit_stdio_script.dart b/tests/standalone_2/io/process_inherit_stdio_script.dart
index 0fa1e0b..c771dab 100644
--- a/tests/standalone_2/io/process_inherit_stdio_script.dart
+++ b/tests/standalone_2/io/process_inherit_stdio_script.dart
@@ -17,7 +17,11 @@
   asyncStart();
   var script =
       Platform.script.resolve('process_inherit_stdio_script.dart').toFilePath();
-  var future = Process.start(Platform.executable, [script, "--child", "foo"],
+  var future = Process.start(
+      Platform.executable,
+      []
+        ..addAll(Platform.executableArguments)
+        ..addAll([script, "--child", "foo"]),
       mode: ProcessStartMode.inheritStdio);
   future.then((process) {
     process.exitCode.then((c) {
diff --git a/tests/standalone_2/io/process_inherit_stdio_test.dart b/tests/standalone_2/io/process_inherit_stdio_test.dart
index 090132a..964440f 100644
--- a/tests/standalone_2/io/process_inherit_stdio_test.dart
+++ b/tests/standalone_2/io/process_inherit_stdio_test.dart
@@ -22,7 +22,8 @@
   // of the process spawned here, we should see it.
   var script =
       Platform.script.resolve('process_inherit_stdio_script.dart').toFilePath();
-  var future = Process.start(Platform.executable, [script, "foo"]);
+  var future = Process.start(Platform.executable,
+      []..addAll(Platform.executableArguments)..addAll([script, "foo"]));
   Completer<String> s = new Completer();
   future.then((process) {
     StringBuffer buf = new StringBuffer();
diff --git a/tests/standalone_2/io/process_non_ascii_test.dart b/tests/standalone_2/io/process_non_ascii_test.dart
index 0f1a592..fd08f06 100644
--- a/tests/standalone_2/io/process_non_ascii_test.dart
+++ b/tests/standalone_2/io/process_non_ascii_test.dart
@@ -28,7 +28,11 @@
   var script = nonAsciiFile.path;
   // Note: we prevent this child process from using Crashpad handler because
   // this introduces an issue with deleting the temporary directory.
-  Process.run(executable, [script],
+  Process.run(
+      executable,
+      []
+        ..addAll(Platform.executableArguments)
+        ..add(script),
       workingDirectory: nonAsciiDir.path,
       environment: {'DART_CRASHPAD_HANDLER': ''}).then((result) {
     Expect.equals(0, result.exitCode);
diff --git a/tests/standalone_2/io/process_run_output_test.dart b/tests/standalone_2/io/process_run_output_test.dart
index e5466c2..11b111a 100644
--- a/tests/standalone_2/io/process_run_output_test.dart
+++ b/tests/standalone_2/io/process_run_output_test.dart
@@ -35,20 +35,18 @@
     enc = null;
   }
 
+  var args = <String>[]
+    ..addAll(Platform.executableArguments)
+    ..addAll([scriptFile, encoding, stream]);
+
   if (stream == 'stdout') {
-    Process
-        .run(Platform.executable, [scriptFile, encoding, stream],
-            stdoutEncoding: enc)
-        .then((result) {
+    Process.run(Platform.executable, args, stdoutEncoding: enc).then((result) {
       Expect.equals(result.exitCode, 0);
       Expect.equals(result.stderr, '');
       checkOutput(encoding, result.stdout);
     });
   } else {
-    Process
-        .run(Platform.executable, [scriptFile, encoding, stream],
-            stderrEncoding: enc)
-        .then((result) {
+    Process.run(Platform.executable, args, stderrEncoding: enc).then((result) {
       Expect.equals(result.exitCode, 0);
       Expect.equals(result.stdout, '');
       checkOutput(encoding, result.stderr);
diff --git a/tests/standalone_2/io/process_set_exit_code_test.dart b/tests/standalone_2/io/process_set_exit_code_test.dart
index e8d9e45..b8c7e12 100644
--- a/tests/standalone_2/io/process_set_exit_code_test.dart
+++ b/tests/standalone_2/io/process_set_exit_code_test.dart
@@ -16,7 +16,12 @@
   var executable = Platform.executable;
   var exitCodeScript =
       Platform.script.resolve('process_set_exit_code_script.dart').toFilePath();
-  Process.run(executable, [exitCodeScript]).then((result) {
+  Process.run(
+          executable,
+          []
+            ..addAll(Platform.executableArguments)
+            ..add(exitCodeScript))
+      .then((result) {
     Expect.equals("standard out", result.stdout);
     Expect.equals("standard error", result.stderr);
     Expect.equals(25, result.exitCode);
diff --git a/tests/standalone_2/io/process_shell_test.dart b/tests/standalone_2/io/process_shell_test.dart
index e9113d8..5c766b0 100644
--- a/tests/standalone_2/io/process_shell_test.dart
+++ b/tests/standalone_2/io/process_shell_test.dart
@@ -14,8 +14,13 @@
   test(args) {
     asyncStart();
     var script = Platform.script.resolve("process_echo_util.dart").toFilePath();
-    Process
-        .run(Platform.executable, [script]..addAll(args), runInShell: true)
+    Process.run(
+            Platform.executable,
+            []
+              ..addAll(Platform.executableArguments)
+              ..add(script)
+              ..addAll(args),
+            runInShell: true)
         .then((process_result) {
       var result;
       if (Platform.operatingSystem == "windows") {
diff --git a/tests/standalone_2/io/process_stderr_test.dart b/tests/standalone_2/io/process_stderr_test.dart
index 3ea157a..0492fe2 100644
--- a/tests/standalone_2/io/process_stderr_test.dart
+++ b/tests/standalone_2/io/process_stderr_test.dart
@@ -67,5 +67,11 @@
         new File("../tests/standalone_2/io/process_std_io_script.dart");
   }
   Expect.isTrue(scriptFile.existsSync());
-  test(Process.start(Platform.executable, [scriptFile.path, "1"]), 0);
+  test(
+      Process.start(
+          Platform.executable,
+          []
+            ..addAll(Platform.executableArguments)
+            ..addAll([scriptFile.path, "1"])),
+      0);
 }
diff --git a/tests/standalone_2/io/process_stdin_transform_unsubscribe_test.dart b/tests/standalone_2/io/process_stdin_transform_unsubscribe_test.dart
index f52f9e0..fa36a06 100644
--- a/tests/standalone_2/io/process_stdin_transform_unsubscribe_test.dart
+++ b/tests/standalone_2/io/process_stdin_transform_unsubscribe_test.dart
@@ -38,5 +38,11 @@
     scriptFile = new File("../tests/standalone_2/io/$scriptName");
   }
   Expect.isTrue(scriptFile.existsSync());
-  test(Process.start(Platform.executable, [scriptFile.path]), 0);
+  test(
+      Process.start(
+          Platform.executable,
+          []
+            ..addAll(Platform.executableArguments)
+            ..add(scriptFile.path)),
+      0);
 }
diff --git a/tests/standalone_2/io/process_stdout_test.dart b/tests/standalone_2/io/process_stdout_test.dart
index d492996..7d3bc7f 100644
--- a/tests/standalone_2/io/process_stdout_test.dart
+++ b/tests/standalone_2/io/process_stdout_test.dart
@@ -65,5 +65,11 @@
         new File("../tests/standalone_2/io/process_std_io_script.dart");
   }
   Expect.isTrue(scriptFile.existsSync());
-  test(Process.start(Platform.executable, [scriptFile.path, "0"]), 0);
+  test(
+      Process.start(
+          Platform.executable,
+          []
+            ..addAll(Platform.executableArguments)
+            ..addAll([scriptFile.path, "0"])),
+      0);
 }
diff --git a/tests/standalone_2/io/process_sync_test.dart b/tests/standalone_2/io/process_sync_test.dart
index e4fc82a..1d91dfc 100644
--- a/tests/standalone_2/io/process_sync_test.dart
+++ b/tests/standalone_2/io/process_sync_test.dart
@@ -13,13 +13,15 @@
   // Get the Dart script file that generates output.
   var scriptFile = new File(
       Platform.script.resolve("process_sync_script.dart").toFilePath());
-  var args = [
-    scriptFile.path,
-    blockCount.toString(),
-    stdoutBlockSize.toString(),
-    stderrBlockSize.toString(),
-    exitCode.toString()
-  ];
+  var args = <String>[]
+    ..addAll(Platform.executableArguments)
+    ..addAll([
+      scriptFile.path,
+      blockCount.toString(),
+      stdoutBlockSize.toString(),
+      stderrBlockSize.toString(),
+      exitCode.toString()
+    ]);
   ProcessResult syncResult = Process.runSync(Platform.executable, args);
   Expect.equals(blockCount * stdoutBlockSize, syncResult.stdout.length);
   Expect.equals(blockCount * stderrBlockSize, syncResult.stderr.length);
diff --git a/tests/standalone_2/io/regress_7191_test.dart b/tests/standalone_2/io/regress_7191_test.dart
index a68a800..8477956 100644
--- a/tests/standalone_2/io/regress_7191_test.dart
+++ b/tests/standalone_2/io/regress_7191_test.dart
@@ -21,7 +21,12 @@
   asyncStart();
   var executable = Platform.executable;
   var script = Platform.script.resolve('regress_7191_script.dart').toFilePath();
-  Process.start(executable, [script]).then((process) {
+  Process.start(
+          executable,
+          []
+            ..addAll(Platform.executableArguments)
+            ..add(script))
+      .then((process) {
     process.stdin.add([0]);
     process.stdout.listen((_) {}, onDone: () {
       process.stdin.add([0]);
diff --git a/tests/standalone_2/io/regress_7679_test.dart b/tests/standalone_2/io/regress_7679_test.dart
index 3577a8b..720e607 100644
--- a/tests/standalone_2/io/regress_7679_test.dart
+++ b/tests/standalone_2/io/regress_7679_test.dart
@@ -37,7 +37,11 @@
   String executable = new File(Platform.executable).resolveSymbolicLinksSync();
   // Note: we prevent this child process from using Crashpad handler because
   // this introduces an issue with deleting the temporary directory.
-  Process.run(executable, ['script.dart'],
+  Process.run(
+      executable,
+      []
+        ..addAll(Platform.executableArguments)
+        ..add('script.dart'),
       workingDirectory: temp.path,
       environment: {'DART_CRASHPAD_HANDLER': ''}).then((result) {
     temp.deleteSync(recursive: true);
diff --git a/tests/standalone_2/io/signals_test.dart b/tests/standalone_2/io/signals_test.dart
index 79e0ddf..13e0448 100644
--- a/tests/standalone_2/io/signals_test.dart
+++ b/tests/standalone_2/io/signals_test.dart
@@ -16,11 +16,16 @@
   if (usr1Send == null) usr1Send = usr1Expect;
   if (usr2Send == null) usr2Send = usr2Expect;
   asyncStart();
-  Process.start(Platform.executable, [
-    Platform.script.resolve('signals_test_script.dart').toFilePath(),
-    usr1Expect.toString(),
-    usr2Expect.toString()
-  ]).then((process) {
+  Process.start(
+          Platform.executable,
+          []
+            ..addAll(Platform.executableArguments)
+            ..addAll([
+              Platform.script.resolve('signals_test_script.dart').toFilePath(),
+              usr1Expect.toString(),
+              usr2Expect.toString()
+            ]))
+      .then((process) {
     process.stdin.close();
     process.stderr.drain();
     int v = 0;
@@ -45,10 +50,15 @@
 
 void testSignal(ProcessSignal signal) {
   asyncStart();
-  Process.start(Platform.executable, [
-    Platform.script.resolve('signal_test_script.dart').toFilePath(),
-    signal.toString()
-  ]).then((process) {
+  Process.start(
+          Platform.executable,
+          []
+            ..addAll(Platform.executableArguments)
+            ..addAll([
+              Platform.script.resolve('signal_test_script.dart').toFilePath(),
+              signal.toString()
+            ]))
+      .then((process) {
     process.stdin.close();
     process.stderr.drain();
 
@@ -71,10 +81,13 @@
 void testMultipleSignals(List<ProcessSignal> signals) {
   for (var signal in signals) {
     asyncStart();
-    Process
-        .start(
+    Process.start(
             Platform.executable,
-            [Platform.script.resolve('signal_test_script.dart').toFilePath()]
+            []
+              ..addAll(Platform.executableArguments)
+              ..add(Platform.script
+                  .resolve('signal_test_script.dart')
+                  .toFilePath())
               ..addAll(signals.map((s) => s.toString())))
         .then((process) {
       process.stdin.close();
diff --git a/tests/standalone_2/io/skipping_dart2js_compilations_test.dart b/tests/standalone_2/io/skipping_dart2js_compilations_test.dart
index 96649d1..4ddd934 100644
--- a/tests/standalone_2/io/skipping_dart2js_compilations_test.dart
+++ b/tests/standalone_2/io/skipping_dart2js_compilations_test.dart
@@ -148,7 +148,10 @@
       .resolve('skipping_dart2js_compilations_helper.dart')
       .toFilePath();
   var executable = Platform.executable;
-  var arguments = [createFileScript, fileUtils.scriptOutputPath.toNativePath()];
+  var arguments = <String>[]
+    ..addAll(Platform.executableArguments)
+    ..add(createFileScript)
+    ..add(fileUtils.scriptOutputPath.toNativePath());
   var bootstrapDeps = [Uri.parse("file://${fileUtils.testSnapshotFilePath}")];
   return Command.compilation('dart2js', fileUtils.testJsFilePath.toNativePath(),
       bootstrapDeps, executable, arguments, {},
diff --git a/tests/standalone_2/io/stdin_sync_test.dart b/tests/standalone_2/io/stdin_sync_test.dart
index 431f735..30f1e33 100644
--- a/tests/standalone_2/io/stdin_sync_test.dart
+++ b/tests/standalone_2/io/stdin_sync_test.dart
@@ -13,8 +13,12 @@
 void testReadByte() {
   void test(String line, List<String> expected) {
     var script = Platform.script.resolve("stdin_sync_script.dart").toFilePath();
-    Process
-        .start(Platform.executable, [script]..addAll(expected.map(json.encode)))
+    Process.start(
+            Platform.executable,
+            []
+              ..addAll(Platform.executableArguments)
+              ..add(script)
+              ..addAll(expected.map(json.encode)))
         .then((process) {
       process.stdin.write(line);
       process.stdin.flush().then((_) => process.stdin.close());
diff --git a/tests/standalone_2/io/stdio_implicit_close_test.dart b/tests/standalone_2/io/stdio_implicit_close_test.dart
index 0df0e04..f283417 100644
--- a/tests/standalone_2/io/stdio_implicit_close_test.dart
+++ b/tests/standalone_2/io/stdio_implicit_close_test.dart
@@ -13,15 +13,14 @@
   var scriptFile = "stdio_implicit_close_script.dart";
   var script = Platform.script.resolve(scriptFile).toFilePath();
 
-  var arguments = [
-    script,
-  ];
+  var arguments = <String>[]
+    ..addAll(Platform.executableArguments)
+    ..add(script);
   if (closeStdout) arguments.add("stdout");
   if (closeStderr) arguments.add("stderr");
 
   asyncStart();
-  Process
-      .run(Platform.executable, arguments,
+  Process.run(Platform.executable, arguments,
           stdoutEncoding: ascii, stderrEncoding: ascii)
       .then((result) {
     print(result.stdout);
diff --git a/tests/standalone_2/io/stdio_nonblocking_test.dart b/tests/standalone_2/io/stdio_nonblocking_test.dart
index b344a0c..1eab14e 100644
--- a/tests/standalone_2/io/stdio_nonblocking_test.dart
+++ b/tests/standalone_2/io/stdio_nonblocking_test.dart
@@ -12,9 +12,13 @@
 void main() {
   var script =
       Platform.script.resolve("stdio_nonblocking_script.dart").toFilePath();
-  Process
-      .run(Platform.executable, [script],
-          stdoutEncoding: ascii, stderrEncoding: ascii)
+  Process.run(
+          Platform.executable,
+          []
+            ..addAll(Platform.executableArguments)
+            ..add(script),
+          stdoutEncoding: ascii,
+          stderrEncoding: ascii)
       .then((result) {
     print(result.stdout);
     print(result.stderr);
diff --git a/tests/standalone_2/standalone_2_kernel.status b/tests/standalone_2/standalone_2_kernel.status
index 2e1dc6a..ceb859a 100644
--- a/tests/standalone_2/standalone_2_kernel.status
+++ b/tests/standalone_2/standalone_2_kernel.status
@@ -8,7 +8,6 @@
 io/process_sync_test: Pass, Slow # Spawns synchronously subprocesses in sequence.
 
 [ $builder_tag == asan ]
-ffi/data_not_asan_test: Skip # this test tries to allocate too much memory on purpose
 io/file_test: Fail # Issue 34724
 io/http_server_response_test: Fail # Issue 34724
 io/process_sync_test: Pass, Fail # https://github.com/dart-lang/sdk/issues/34724
@@ -16,11 +15,6 @@
 io/test_extension_fail_test: Fail # Issue 32187
 
 [ $compiler == app_jitk ]
-ffi/dynamic_library_test: Skip # https://github.com/dart-lang/sdk/issues/35934
-ffi/function_callbacks_test: Skip # https://github.com/dart-lang/sdk/issues/35934
-ffi/function_structs_test: Skip # https://github.com/dart-lang/sdk/issues/35934
-ffi/function_test: Skip # https://github.com/dart-lang/sdk/issues/35934
-ffi/negative_function_test: Skip # https://github.com/dart-lang/sdk/issues/35934
 io/file_error_test: RuntimeError
 io/file_test: RuntimeError
 io/http_auth_digest_test: RuntimeError
@@ -48,9 +42,6 @@
 io/arguments_test: Fail # Test harness passes runtime arguments to the compiler
 io/test_runner_test: SkipByDesign # Is not relevant for AOT.
 
-[ $runtime == dart_precompiled ]
-ffi: Skip # https://github.com/dart-lang/sdk/issues/35765
-
 [ $system == android ]
 entrypoints_verification_test: Skip # Requires shared objects which the test script doesn't "adb push".
 
@@ -166,9 +157,6 @@
 [ $mode == debug && $hot_reload && ($compiler == dartk || $compiler == dartkb) ]
 io/web_socket_ping_test: Crash, Pass
 
-[ $runtime != dart_precompiled && $runtime != vm ]
-ffi: SkipByDesign # ffi is only supported on vm
-
 [ $runtime == vm && $strong && ($compiler == dartk || $compiler == dartkb) ]
 io/http_client_request_test: Pass, Timeout
 io/secure_builtin_roots_test: Pass, Timeout
@@ -241,12 +229,6 @@
 io/web_socket_compression_test: Skip # Timeout
 io/web_socket_test: Skip # Timeout
 
-[ $arch != x64 || $compiler != dartk || $mode == product || $system != linux && $system != macos && $system != windows ]
-ffi/function_stress_test: SkipByDesign # FFI must be supported. Also requires --verbose-gc, which isn't included in product.
-ffi/subtype_test: SkipByDesign # FFI must be supported. Also requires --verbose-gc, which isn't included in product.
-
-[ $arch != x64 || $system != linux && $system != macos && $system != windows ]
-ffi: Skip # ffi not yet supported on other systems than linux/macos/windows x64
 
 [ $compiler != dartk && $compiler != dartkb && $compiler != dartkp || $compiler == dartkp && $system == windows ]
 entrypoints_verification_test: SkipByDesign # Requires VM to run. Cannot run in precompiled Windows because the DLL is linked against dart.exe instead of dart_precompiled_runtime.exe.
diff --git a/tools/VERSION b/tools/VERSION
index d646102..46b49af 100644
--- a/tools/VERSION
+++ b/tools/VERSION
@@ -33,7 +33,7 @@
 MAJOR 2
 MINOR 2
 PATCH 1
-PRERELEASE 2
-PRERELEASE_PATCH 1
-ABI_VERSION 0
+PRERELEASE 3
+PRERELEASE_PATCH 0
+ABI_VERSION 1
 OLDEST_SUPPORTED_ABI_VERSION 0
diff --git a/tools/approve_results.dart b/tools/approve_results.dart
index 9d11f48..5912f3b 100755
--- a/tools/approve_results.dart
+++ b/tools/approve_results.dart
@@ -18,6 +18,37 @@
 
 import 'bots/results.dart';
 
+/// Returns whether two decoded JSON objects are identical.
+bool isIdenticalJson(dynamic a, dynamic b) {
+  if (a is Map<String, dynamic> && b is Map<String, dynamic>) {
+    if (a.length != b.length) return false;
+    for (final key in a.keys) {
+      if (!b.containsKey(key)) return false;
+      if (!isIdenticalJson(a[key], b[key])) return false;
+    }
+    return true;
+  } else if (a is List<dynamic> && b is List<dynamic>) {
+    if (a.length != b.length) return false;
+    for (int i = 0; i < a.length; i++) {
+      if (!isIdenticalJson(a[i], b[i])) return false;
+    }
+    return true;
+  } else {
+    return a == b;
+  }
+}
+
+/// Returns whether two sets of approvals are identical.
+bool isIdenticalApprovals(
+    Map<String, Map<String, dynamic>> a, Map<String, Map<String, dynamic>> b) {
+  if (a.length != b.length) return false;
+  for (final key in a.keys) {
+    if (!b.containsKey(key)) return false;
+    if (!isIdenticalJson(a[key], b[key])) return false;
+  }
+  return true;
+}
+
 /// The bot names and named configurations are highly redundant if both are
 /// listed. This function returns a simplified named configuration that doesn't
 /// contain any aspects that's part of the bots name. This is used to get a more
@@ -30,16 +61,16 @@
       .join("-");
 }
 
-/// Represents a test on a bot with the current result, the current approved
-/// result, and flakiness data.
+/// Represents a test on a bot with the baseline results (if tryrun), the
+/// current result, the current approved result, and flakiness data.
 class Test implements Comparable {
   final String bot;
-  final String name;
+  final Map<String, dynamic> baselineData;
   final Map<String, dynamic> resultData;
   final Map<String, dynamic> approvedResultData;
   final Map<String, dynamic> flakinessData;
 
-  Test(this.bot, this.name, this.resultData, this.approvedResultData,
+  Test(this.bot, this.baselineData, this.resultData, this.approvedResultData,
       this.flakinessData);
 
   int compareTo(Object other) {
@@ -54,13 +85,18 @@
     return 0;
   }
 
-  String get configuration => resultData["configuration"];
-  String get result => resultData["result"];
-  String get expected => resultData["expected"];
-  bool get matches => resultData["matches"];
-  String get approvedResult =>
-      approvedResultData != null ? approvedResultData["result"] : null;
-  bool get isApproved => result == approvedResult;
+  Map<String, dynamic> get _sharedData =>
+      resultData ?? baselineData ?? approvedResultData;
+  String get name => _sharedData["name"];
+  String get configuration => _sharedData["configuration"];
+  String get key => "$configuration:$name";
+  String get expected => _sharedData["expected"];
+  String get result => (resultData ?? const {})["result"];
+  bool get matches => _sharedData["matches"];
+  String get baselineResult => (baselineData ?? const {})["result"];
+  String get approvedResult => (approvedResultData ?? const {})["result"];
+  bool get isDifferent => result != null && result != baselineResult;
+  bool get isApproved => result == null || result == approvedResult;
   List<String> get flakyModes =>
       flakinessData != null ? flakinessData["outcomes"].cast<String>() : null;
   bool get isFlake => flakinessData != null && flakyModes.contains(result);
@@ -133,7 +169,7 @@
 
 /// Loads the results from the bot.
 Future<List<Test>> loadResultsFromBot(String bot, ArgResults options,
-    Map<String, dynamic> changelistBuild) async {
+    String changeId, Map<String, dynamic> changelistBuild) async {
   if (options["verbose"]) {
     print("Loading $bot...");
   }
@@ -146,7 +182,7 @@
     /// TODO(https://github.com/dart-lang/sdk/issues/36015): The step name
     /// changed incompatibly, allow both temporarily to reduce the user
     /// breakage. Remove this 2019-03-25.
-    final build = (changelistBuild != null
+    final build = (changeId != null
             ? await todoFallbackLoadLog(
                 changelistBuild["id"],
                 "download_previous_results/0/steps/gsutil_find_latest_build/0/logs/"
@@ -164,7 +200,7 @@
           "$approvedResultsStoragePath/$bot/approved_results.json",
           "${tmpdir.path}/approved_results.json"),
       new Future(() async {
-        if (changelistBuild != null) {
+        if (changeId != null) {
           tryResults.addAll(parseResultsMap(await loadLog(
               changelistBuild["id"], "test_results/0/logs/results.json/0")));
         }
@@ -193,71 +229,32 @@
     final approvedResults =
         await loadResultsMapIfExists("${tmpdir.path}/approved_results.json");
 
+    // TODO: Remove 2019-04-08: Discard any invalid pre-approvals made with a
+    // version of approve_results between 065910f0 and a13ac1b4. Pre-approving
+    // a new test could add pre-approvals with null configuration and null name.
+    approvedResults.remove("null:null");
+
     // Construct an object for every test containing its current result,
     // what the last approved result was, and whether it's flaky.
     final tests = <Test>[];
-    for (final key in results.keys) {
-      final result = results[key];
+    final testResults = changeId != null ? tryResults : results;
+    for (final key in testResults.keys) {
+      final baselineResult = changeId != null ? results[key] : null;
+      final testResult = testResults[key];
       final approvedResult = approvedResults[key];
       final flakiness = flaky[key];
-      // If preapproving results, allow new non-matching results that are
-      // different from the baseline. The approved results will be the current
-      // approved results, plus the difference between the tryrun's baseline and
-      // the tryrun's results.
-      if (tryResults.containsKey(key)) {
-        final tryResult = tryResults[key];
-        final wasFlake = flakiness != null &&
-            (flakiness["outcomes"] as List<dynamic>)
-                .contains(tryResult["result"]);
-        // Pick the try run result if the try result was not a flake and it's a
-        // non-matching result that's different than the approved result. If
-        // there is no approved result yet, use the latest result from the
-        // builder instead.
-        final baseResult = approvedResult ?? result;
-        if (!wasFlake &&
-            !tryResult["matches"] &&
-            tryResult["result"] != result["result"]) {
-          // The approved_results.json format currently does not natively
-          // support preapproval, so preapproving turning one failure into
-          // another will turn the builder in question red until the CL lands.
-          if (!baseResult["matches"] &&
-              tryResult["result"] != baseResult["result"]) {
-            print("Warning: Preapproving changed failure modes will turn the "
-                "CI red until the CL is submitted: $bot: $key: "
-                "${baseResult["result"]} -> ${tryResult["result"]}");
-          }
-          result.clear();
-          result.addAll(tryResult);
-        } else {
-          if (approvedResult != null) {
-            result.clear();
-            result.addAll(approvedResult);
-          }
-        }
-      } else if (tryResults.isNotEmpty && approvedResult != null) {
-        result.clear();
-        result.addAll(approvedResult);
-      }
-      final name = result["name"];
-      final test = new Test(bot, name, result, approvedResult, flakiness);
-      final dropApproval =
-          test.matches ? options["failures-only"] : options["successes-only"];
-      if (dropApproval && !test.isApproved) {
-        if (approvedResult == null) continue;
-        result.clear();
-        result.addAll(approvedResult);
-      }
+      final test =
+          new Test(bot, baselineResult, testResult, approvedResult, flakiness);
       tests.add(test);
     }
-    // If preapproving and the CL has introduced new tests, add the new tests
-    // as well to the approved data.
-    final newTestKeys = new Set<String>.from(tryResults.keys)
-        .difference(new Set<String>.from(results.keys));
-    for (final key in newTestKeys) {
-      final result = tryResults[key];
+    // Add in approvals whose test was no longer in the results.
+    for (final key in approvedResults.keys) {
+      if (testResults.containsKey(key)) continue;
+      final baselineResult = changeId != null ? results[key] : null;
+      final approvedResult = approvedResults[key];
       final flakiness = flaky[key];
-      final name = result["name"];
-      final test = new Test(bot, name, result, null, flakiness);
+      final test =
+          new Test(bot, baselineResult, null, approvedResult, flakiness);
       tests.add(test);
     }
     if (options["verbose"]) {
@@ -270,6 +267,33 @@
   }
 }
 
+Future<Map<String, dynamic>> loadJsonPrefixedAPI(String url) async {
+  final client = new HttpClient();
+  try {
+    final request = await client
+        .getUrl(Uri.parse(url))
+        .timeout(const Duration(seconds: 30));
+    final response = await request.close().timeout(const Duration(seconds: 30));
+    if (response.statusCode != HttpStatus.ok) {
+      throw new Exception("Failed to request $url: ${response.statusCode}");
+    }
+    final text = await response
+        .transform(utf8.decoder)
+        .join()
+        .timeout(const Duration(seconds: 30));
+    return jsonDecode(text.substring(5 /* ")]}'\n" */));
+  } finally {
+    client.close();
+  }
+}
+
+Future<Map<String, dynamic>> loadChangelistDetails(
+    String gerritHost, String changeId) async {
+  // ?O=516714 requests the revisions field.
+  final url = "https://$gerritHost/changes/$changeId/detail?O=516714";
+  return await loadJsonPrefixedAPI(url);
+}
+
 main(List<String> args) async {
   final parser = new ArgParser();
   parser.addFlag("automated-approver",
@@ -382,9 +406,11 @@
 
   // Determine which builders have run for the changelist.
   final changelistBuilds = <String, Map<String, dynamic>>{};
-  if (options["preapprove"] != null) {
+  final isPreapproval = options["preapprove"] != null;
+  String changeId;
+  if (isPreapproval) {
     if (options["verbose"]) {
-      print("Loading list of try runs...");
+      print("Loading changelist details...");
     }
     final gerritHost = "dart-review.googlesource.com";
     final gerritProject = "sdk";
@@ -396,16 +422,30 @@
       return;
     }
     final components = gerrit.substring(prefix.length).split("/");
-    if (components.length != 2 ||
-        int.tryParse(components[0]) == null ||
-        int.tryParse(components[1]) == null) {
+    if (!((components.length == 1 && int.tryParse(components[0]) != null) ||
+        (components.length == 2 &&
+            int.tryParse(components[0]) != null &&
+            int.tryParse(components[1]) != null))) {
       stderr.writeln("error: $gerrit must be in the form of "
-          "$prefix<changelist>/<patchset>");
+          "$prefix<changelist> or $prefix<changelist>/<patchset>");
       exitCode = 1;
       return;
     }
     final changelist = int.parse(components[0]);
-    final patchset = int.parse(components[1]);
+    final details =
+        await loadChangelistDetails(gerritHost, changelist.toString());
+    changeId = details["change_id"];
+    final patchset = 2 <= components.length
+        ? int.parse(components[1])
+        : details["revisions"][details["current_revision"]]["_number"];
+    if (2 <= components.length) {
+      print("Using Change-Id $changeId patchset $patchset");
+    } else {
+      print("Using Change-Id $changeId with the latest patchset $patchset");
+    }
+    if (options["verbose"]) {
+      print("Loading list of try runs...");
+    }
     final buildset = "buildset:patch/gerrit/$gerritHost/$changelist/$patchset";
     final url = Uri.parse(
         "https://cr-buildbucket.appspot.com/_ah/api/buildbucket/v1/search"
@@ -519,7 +559,8 @@
   for (final String bot in bots) {
     testListFutures.add(new Future(() async {
       try {
-        return await loadResultsFromBot(bot, options, changelistBuilds[bot]);
+        return await loadResultsFromBot(
+            bot, options, changeId, changelistBuilds[bot]);
       } on NoResultsException catch (e) {
         print(
             "Error: Failed to find results for $bot build <${e.buildUrl}>: $e");
@@ -538,19 +579,28 @@
   print("");
 
   // Compute statistics and the set of interesting tests.
-  final flakyTestsCount = tests.where((test) => test.isFlake).length;
-  final failingTestsCount =
-      tests.where((test) => !test.isFlake && !test.matches).length;
-  final unapprovedTests =
-      tests.where((test) => !test.isFlake && !test.isApproved).toList();
-  final fixedTests = unapprovedTests.where((test) => test.matches).toList();
-  final brokenTests = unapprovedTests.where((test) => !test.matches).toList();
+  final flakyTestsCount =
+      tests.where((test) => test.resultData != null && test.isFlake).length;
+  final failingTestsCount = tests
+      .where(
+          (test) => test.resultData != null && !test.isFlake && !test.matches)
+      .length;
+  final differentTests = tests
+      .where((test) =>
+          (isPreapproval ? test.isDifferent : !test.isApproved) &&
+          !test.isFlake)
+      .toList();
+  final selectedTests = differentTests
+      .where((test) => !(test.matches
+          ? options["failures-only"]
+          : options["successes-only"]))
+      .toList();
+  final fixedTests = selectedTests.where((test) => test.matches).toList();
+  final brokenTests = selectedTests.where((test) => !test.matches).toList();
 
   // Find out which bots have multiple configurations.
-  final outcomes = new Set<String>();
   final configurationsForBots = <String, Set<String>>{};
   for (final test in tests) {
-    outcomes.add(test.result);
     var configurationSet = configurationsForBots[test.bot];
     if (configurationSet == null) {
       configurationsForBots[test.bot] = configurationSet = new Set<String>();
@@ -577,7 +627,7 @@
   int longestTest = "TEST".length;
   int longestResult = "RESULT".length;
   int longestExpected = "EXPECTED".length;
-  for (final test in unapprovedTests) {
+  for (final test in selectedTests) {
     unapprovedBots.add(test.bot);
     final botDisplayName = getBotDisplayName(test.bot, test.configuration);
     longestBot = max(longestBot, botDisplayName.length);
@@ -680,10 +730,10 @@
 
   // Stop if this is a dry run.
   if (options["no"]) {
-    if (unapprovedTests.length == 1) {
+    if (selectedTests.length == 1) {
       print("1 test has a changed result and needs approval");
     } else {
-      print("${unapprovedTests.length} "
+      print("${selectedTests.length} "
           "tests have changed results and need approval");
     }
     return;
@@ -695,16 +745,15 @@
     print("Note: It is assumed bugs have been filed about the above failures "
         "before they are approved here.");
     if (brokenTests.isNotEmpty) {
-      final botPlural = bots.length == 1 ? "bot" : "bots";
+      final builderPlural = bots.length == 1 ? "builder" : "builders";
+      final tryBuilders = isPreapproval ? "try$builderPlural" : builderPlural;
+      final tryCommit = isPreapproval ? "tryrun" : "commit";
       print("Note: Approving the failures will turn the "
-          "$botPlural green on the next commit.");
-    }
-    if (options["preapprove"] != null) {
-      print("Warning: Preapproval is currently not sticky and somebody else "
-          "approving before your CL has landed will undo your preapproval.");
+          "$tryBuilders green on the next $tryCommit.");
     }
     while (true) {
-      stdout.write("Do you want to approve? (yes/no) [yes] ");
+      final approve = isPreapproval ? "pre-approve" : "approve";
+      stdout.write("Do you want to $approve? (yes/no) [yes] ");
       final line = stdin.readLineSync();
       // End of file condition is considered no.
       if (line == null) {
@@ -737,47 +786,199 @@
     exitCode = 1;
     return;
   }
-  final now = new DateTime.now().toUtc().toIso8601String();
+  final nowDate = new DateTime.now().toUtc();
+  final now = nowDate.toIso8601String();
 
-  // Update approved_results.json for each bot with unapproved changes.
+  // Deep clones a decoded json object.
+  dynamic deepClone(dynamic object) {
+    if (object is Map<String, dynamic>) {
+      final result = <String, dynamic>{};
+      for (final key in object.keys) {
+        result[key] = deepClone(object[key]);
+      }
+      return result;
+    } else if (object is List<dynamic>) {
+      final result = <dynamic>[];
+      for (final value in object) {
+        result.add(deepClone(value));
+      }
+      return result;
+    } else {
+      return object;
+    }
+  }
+
+  // Build the new approval data with the changes in test results applied.
+  final newApprovalsForBuilders = <String, Map<String, Map<String, dynamic>>>{};
+
+  if (isPreapproval) {
+    // Import all the existing approval data, keeping tests that don't exist
+    // anymore.
+    for (final test in tests) {
+      if (test.approvedResultData == null) continue;
+      final approvalData = deepClone(test.approvedResultData);
+      // TODO(https://github.com/dart-lang/sdk/issues/36279): Remove needless
+      // fields that shouldn't be in the approvals data. Remove this 2019-04-03.
+      approvalData.remove("bot_name");
+      approvalData.remove("builder_name");
+      approvalData.remove("build_number");
+      approvalData.remove("changed");
+      approvalData.remove("commit_hash");
+      approvalData.remove("commit_time");
+      approvalData.remove("commit_hash");
+      approvalData.remove("flaky");
+      approvalData.remove("previous_build_number");
+      approvalData.remove("previous_commit_hash");
+      approvalData.remove("previous_commit_time");
+      approvalData.remove("previous_flaky");
+      approvalData.remove("previous_result");
+      approvalData.remove("time_ms");
+      // Discard all the existing pre-approvals for this changelist.
+      final preapprovals =
+          approvalData.putIfAbsent("preapprovals", () => <String, dynamic>{});
+      preapprovals.remove(changeId);
+      final newApprovals = newApprovalsForBuilders.putIfAbsent(
+          test.bot, () => new SplayTreeMap<String, Map<String, dynamic>>());
+      newApprovals[test.key] = approvalData;
+    }
+
+    // Pre-approve all the regressions (no need to pre-approve fixed tests).
+    for (final test in brokenTests) {
+      final newApprovals = newApprovalsForBuilders.putIfAbsent(
+          test.bot, () => new SplayTreeMap<String, Map<String, dynamic>>());
+      final approvalData =
+          newApprovals.putIfAbsent(test.key, () => <String, dynamic>{});
+      approvalData["name"] = test.name;
+      approvalData["configuration"] = test.configuration;
+      approvalData["suite"] = test.resultData["suite"];
+      approvalData["test_name"] = test.resultData["test_name"];
+      final preapprovals =
+          approvalData.putIfAbsent("preapprovals", () => <String, dynamic>{});
+      final preapproval =
+          preapprovals.putIfAbsent(changeId, () => <String, dynamic>{});
+      preapproval["from"] = test.approvedResult;
+      preapproval["result"] = test.result;
+      preapproval["matches"] = test.matches;
+      preapproval["expected"] = test.expected;
+      preapproval["preapprover"] = username;
+      preapproval["preapproved_at"] = now;
+      preapproval["expires"] =
+          nowDate.add(const Duration(days: 30)).toIso8601String();
+    }
+  } else {
+    // Import all the existing approval data for tests, removing tests that
+    // don't exist anymore unless they have pre-approvals.
+    for (final test in tests) {
+      if (test.approvedResultData == null) continue;
+      if (test.result == null &&
+          (test.approvedResultData["preapprovals"] ?? <dynamic>[]).isEmpty) {
+        continue;
+      }
+      final approvalData = deepClone(test.approvedResultData);
+      // TODO(https://github.com/dart-lang/sdk/issues/36279): Remove needless
+      // fields that shouldn't be in the approvals data. Remove this 2019-04-03.
+      approvalData.remove("bot_name");
+      approvalData.remove("builder_name");
+      approvalData.remove("build_number");
+      approvalData.remove("changed");
+      approvalData.remove("commit_hash");
+      approvalData.remove("commit_time");
+      approvalData.remove("commit_hash");
+      approvalData.remove("flaky");
+      approvalData.remove("previous_build_number");
+      approvalData.remove("previous_commit_hash");
+      approvalData.remove("previous_commit_time");
+      approvalData.remove("previous_flaky");
+      approvalData.remove("previous_result");
+      approvalData.remove("time_ms");
+      approvalData.putIfAbsent("preapprovals", () => <String, dynamic>{});
+      final newApprovals = newApprovalsForBuilders.putIfAbsent(
+          test.bot, () => new SplayTreeMap<String, Map<String, dynamic>>());
+      newApprovals[test.key] = approvalData;
+    }
+
+    // Approve the changes in test results.
+    for (final test in selectedTests) {
+      final newApprovals = newApprovalsForBuilders.putIfAbsent(
+          test.bot, () => new SplayTreeMap<String, Map<String, dynamic>>());
+      final approvalData =
+          newApprovals.putIfAbsent(test.key, () => <String, dynamic>{});
+      approvalData["name"] = test.name;
+      approvalData["configuration"] = test.configuration;
+      approvalData["suite"] = test.resultData["suite"];
+      approvalData["test_name"] = test.resultData["test_name"];
+      approvalData["result"] = test.result;
+      approvalData["expected"] = test.expected;
+      approvalData["matches"] = test.matches;
+      approvalData["approver"] = username;
+      approvalData["approved_at"] = now;
+      approvalData.putIfAbsent("preapprovals", () => <String, dynamic>{});
+    }
+  }
+
+  // Reconstruct the old approvals so we can double check there was no race
+  // condition when uploading.
+  final oldApprovalsForBuilders = <String, Map<String, Map<String, dynamic>>>{};
+  for (final test in tests) {
+    if (test.approvedResultData == null) continue;
+    final oldApprovals = oldApprovalsForBuilders.putIfAbsent(
+        test.bot, () => new SplayTreeMap<String, Map<String, dynamic>>());
+    oldApprovals[test.key] = test.approvedResultData;
+  }
+  for (final builder in newApprovalsForBuilders.keys) {
+    oldApprovalsForBuilders.putIfAbsent(
+        builder, () => <String, Map<String, dynamic>>{});
+  }
+
+  // Update approved_results.json for each builder with unapproved changes.
   final outDirectory =
       await Directory.systemTemp.createTemp("approved_results.");
+  bool raceCondition = false;
   try {
-    final testsForBots = <String, List<Test>>{};
-    for (final test in tests) {
-      if (!testsForBots.containsKey(test.bot)) {
-        testsForBots[test.bot] = <Test>[test];
-      } else {
-        testsForBots[test.bot].add(test);
-      }
-    }
     print("Uploading approved results...");
     final futures = <Future>[];
-    for (final String bot in unapprovedBots) {
-      Map<String, dynamic> approveData(Test test) {
-        if (test.isApproved) {
-          return test.approvedResultData;
-        } else {
-          final data = new Map<String, dynamic>.from(test.resultData);
-          data["approver"] = username;
-          data["approved_at"] = now;
-          return data;
-        }
-      }
-
-      final dataList = testsForBots[bot].map(approveData).toList();
-      final localPath = "${outDirectory.path}/$bot.json";
+    for (final String builder in newApprovalsForBuilders.keys) {
+      final approvals = newApprovalsForBuilders[builder].values;
+      final localPath = "${outDirectory.path}/$builder.json";
       await new File(localPath).writeAsString(
-          dataList.map((data) => jsonEncode(data) + "\n").join(""));
+          approvals.map((approval) => jsonEncode(approval) + "\n").join(""));
       final remotePath =
-          "$approvedResultsStoragePath/$bot/approved_results.json";
-      futures.add(cpGsutil(localPath, remotePath)
-          .then((_) => print("Uploaded approved results for $bot")));
+          "$approvedResultsStoragePath/$builder/approved_results.json";
+      futures.add(new Future(() async {
+        if (!options["yes"]) {
+          if (options["verbose"]) {
+            print("Checking for race condition on $builder...");
+          }
+          final oldApprovedResults = oldApprovalsForBuilders[builder];
+          final oldApprovalPath = "${outDirectory.path}/$builder.json.old";
+          await cpGsutil(remotePath, oldApprovalPath);
+          final checkApprovedResults =
+              await loadResultsMapIfExists(oldApprovalPath);
+          if (!isIdenticalApprovals(oldApprovedResults, checkApprovedResults)) {
+            print("error: Race condition: "
+                "$builder approvals have changed, please try again.");
+            raceCondition = true;
+            return;
+          }
+        }
+        if (options["verbose"]) {
+          print("Uploading approved results for $builder...");
+        }
+        await cpGsutil(localPath, remotePath);
+        print("Uploaded approved results for $builder");
+      }));
     }
     await Future.wait(futures);
+    if (raceCondition) {
+      exitCode = 1;
+      print("error: Somebody else has approved, please try again");
+      return;
+    }
     if (brokenTests.isNotEmpty) {
-      print(
-          "Successfully approved results, the next commit will turn bots green");
+      final approved = isPreapproval ? "pre-approved" : "approved";
+      final commit = isPreapproval ? "tryrun" : "commit";
+      print("Successfully $approved results, the next $commit "
+          "will turn builders green");
     } else {
       print("Successfully approved results");
     }
diff --git a/tools/bots/apply_preapprovals.dart b/tools/bots/apply_preapprovals.dart
new file mode 100755
index 0000000..3b2bcef
--- /dev/null
+++ b/tools/bots/apply_preapprovals.dart
@@ -0,0 +1,247 @@
+#!/usr/bin/env dart
+// Copyright (c) 2018, the Dart project authors.  Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+// Applies pending pre-approvals for any changelists that have landed according
+// to the git history of HEAD.
+
+import 'dart:convert';
+import 'dart:io';
+
+import 'package:args/args.dart';
+
+import 'results.dart';
+
+main(List<String> args) async {
+  final parser = new ArgParser();
+  parser.addFlag("dry",
+      abbr: "n",
+      help: "Don't write out the updated approvals.",
+      negatable: false);
+  parser.addMultiOption("apply-changelist",
+      abbr: "A",
+      help: "Apply this changelist even if it hasn't landed",
+      splitCommas: false);
+  parser.addFlag("help", help: "Show the program usage.", negatable: false);
+  parser.addOption("upload",
+      abbr: "u",
+      help: "Upload the updated results to this cloud storage location");
+
+  final options = parser.parse(args);
+  if (options["help"]) {
+    print("""
+Usage: apply_preapprovals.dart [OPTION]... APPROVALS
+Applies pending pre-approvals for any changelists that have landed according to
+the git history of HEAD.
+
+The options are as follows:
+
+${parser.usage}""");
+    return;
+  }
+
+  final parameters = options.rest;
+  if (parameters.length != 1) {
+    print("error: Expected one parameter");
+    exitCode = 2;
+    return;
+  }
+
+  // Locate gsutil.py.
+  gsutilPy = Platform.script
+      .resolve("../../third_party/gsutil/gsutil.py")
+      .toFilePath();
+
+  final approvalsPath = parameters[0];
+  final approvals = await loadResultsMap(approvalsPath);
+
+  // Find the changelists with pre-approvals.
+  final allChangelists = <String>{};
+  for (final key in approvals.keys) {
+    final record = approvals[key];
+    final preapprovals =
+        record.putIfAbsent("preapprovals", () => <String, dynamic>{});
+    allChangelists.addAll(preapprovals.keys);
+  }
+  if (allChangelists.isEmpty) {
+    print("No pre-approvals are pending");
+  }
+
+  // Find the order the pre-approved changelists landed in.
+  final joinedChangelistsPattern = allChangelists.join("\\|");
+  final pattern = "^Change-Id: \\($joinedChangelistsPattern\\)\$";
+  final arguments = [
+    "rev-list",
+    "--pretty=medium",
+    "--grep=$pattern",
+    "--reverse",
+    "HEAD"
+  ];
+  final processOutput = await Process.run("git", arguments, runInShell: true);
+  if (processOutput.exitCode != 0) {
+    throw new Exception("Failed to run git $arguments\n"
+        "exitCode: ${processOutput.exitCode}\n"
+        "stdout: ${processOutput.stdout}\n"
+        "stderr: ${processOutput.stderr}");
+  }
+  final landedChangelists = <String>[];
+  final commitOfChangelist = <String, String>{};
+  String currentCommit;
+  for (final line in LineSplitter.split(processOutput.stdout)) {
+    if (line.startsWith("commit ")) {
+      currentCommit = line.substring("commit ".length);
+    } else if (line.startsWith("    Change-Id: ")) {
+      final changeId = line.substring("    Change-Id: ".length);
+      if (allChangelists.contains(changeId)) {
+        landedChangelists.add(changeId);
+        commitOfChangelist[changeId] = currentCommit;
+      }
+    }
+  }
+  if (processOutput.stdout != "") {
+    print(processOutput.stdout);
+  }
+
+  // Report the status of each of the pre-approved changelists.
+  final unlandedChangelists =
+      allChangelists.difference(landedChangelists.toSet());
+  for (final changelist in unlandedChangelists) {
+    final changelistUrl = "https://dart-review.googlesource.com/q/$changelist";
+    print("Pending: Changelist $changelistUrl hasn't landed yet");
+  }
+  if (allChangelists.isNotEmpty && landedChangelists.isEmpty) {
+    print("No pre-approved changelists have landed.");
+  }
+  for (final changelist in landedChangelists) {
+    final changelistUrl = "https://dart-review.googlesource.com/q/$changelist";
+    final commit = commitOfChangelist[changelist];
+    print("Landed: Changelist $changelistUrl landed in commit $commit");
+  }
+  for (final changelist in options["apply-changelist"]) {
+    final changelistUrl = "https://dart-review.googlesource.com/q/$changelist";
+    print("Force applying: Pretending $changelistUrl has landed");
+    landedChangelists.add(changelist);
+  }
+
+  // Apply the pre-approvals for landed changes.
+  bool updated = false;
+  final conflictsForKey = <String, List<String>>{};
+  final changelistsWithMergeConflicts = <String>{};
+  int totalNumberOfPreapprovals = 0;
+  int totalNumberOfMergeConflicts = 0;
+  for (final changelist in landedChangelists) {
+    final changelistUrl = "https://dart-review.googlesource.com/q/$changelist";
+    final commit = commitOfChangelist[changelist];
+    print("\nApplying pre-approvals for changelist "
+        "$changelistUrl landed in commit $commit");
+    int numberOfPreapprovals = 0;
+    int numberOfMergeConflicts = 0;
+    for (final key in approvals.keys) {
+      final record = approvals[key];
+      final preapprovals = record["preapprovals"];
+      final preapproval = preapprovals.remove(changelist);
+      if (preapproval == null) continue;
+      updated = true;
+      final conflicts = conflictsForKey.putIfAbsent(key, () => <String>[]);
+      if (record["result"] == preapproval["from"]) {
+        print("$changelist: $key: "
+            "${record["result"]} -> ${preapproval["result"]}");
+        conflicts.add("$changelist/$commit had changed approval from "
+            "${record["result"]} to ${preapproval["result"]}");
+        record["result"] = preapproval["result"];
+        record["matches"] = preapproval["matches"];
+        record["expected"] = preapproval["expected"];
+        record["approver"] = preapproval["preapprover"];
+        record["approved_at"] = preapproval["preapproved_at"];
+        numberOfPreapprovals++;
+        totalNumberOfPreapprovals++;
+      } else {
+        print("$changelist: $key: MERGE CONFLICT:");
+        for (final conflict in conflicts) {
+          print(" * $conflict");
+        }
+        print(" * MERGE CONFLICT: Cannot change approval from "
+            "${preapproval["from"]} to ${preapproval["result"]} "
+            "because it's currently ${record["result"]}");
+        changelistsWithMergeConflicts.add(changelist);
+        numberOfMergeConflicts++;
+        totalNumberOfMergeConflicts++;
+      }
+    }
+    if (0 < numberOfPreapprovals) {
+      print("$numberOfPreapprovals "
+          "pre-approvals applied from $changelistUrl commit $commit");
+    }
+    if (0 < numberOfMergeConflicts) {
+      print("Warning: $numberOfMergeConflicts "
+          "merge conflicts in pre-approvals for $changelistUrl commit $commit");
+    }
+  }
+
+  // Expire old pre-approvals.
+  final now = new DateTime.now().toUtc();
+  final expiredChangelists = <String>{};
+  for (final record in approvals.values) {
+    final preapprovals = record["preapprovals"];
+    final changelists = preapprovals.keys.toList();
+    for (final changelist in changelists) {
+      final preapproval = preapprovals[changelist];
+      final expires = DateTime.parse(preapproval["expires"]);
+      if (expires.isBefore(now)) {
+        updated = true;
+        preapprovals.remove(changelist);
+        expiredChangelists.add(changelist);
+      }
+    }
+  }
+  if (expiredChangelists.isNotEmpty) {
+    print("");
+  }
+  for (final changelist in expiredChangelists) {
+    final changelistUrl = "https://dart-review.googlesource.com/q/$changelist";
+    print("Expired: Pre-approvals for changelist $changelistUrl have expired");
+  }
+
+  // Format a final report.
+  print("");
+  final landedChangelistsCount = landedChangelists.length;
+  if (0 < landedChangelistsCount) {
+    print("$landedChangelistsCount changelists have landed");
+  }
+  final expiredChangelistsCount = expiredChangelists.length;
+  if (0 < expiredChangelistsCount) {
+    print("$expiredChangelistsCount changelists have expired");
+  }
+  final unlandedChangelistsCount =
+      unlandedChangelists.length - expiredChangelistsCount;
+  if (0 < unlandedChangelistsCount) {
+    print("$unlandedChangelistsCount changelists are pending");
+  }
+  if (0 < totalNumberOfPreapprovals) {
+    print("$totalNumberOfPreapprovals pre-approvals applied");
+  }
+  if (0 < totalNumberOfPreapprovals) {
+    print("Warning: $totalNumberOfMergeConflicts "
+        "pre-approvals had merge conflicts");
+  }
+
+  // Save the updated approvals and upload them to cloud storage.
+  print("");
+  if (!updated) {
+    print("Approvals are unchanged");
+    return;
+  }
+  if (options["dry"]) {
+    print("Dry run, not saving the updated approvals");
+    return;
+  }
+  await new File(approvalsPath).writeAsString(
+      approvals.values.map((data) => jsonEncode(data) + "\n").join(""));
+  print("Wrote updated approvals to $approvalsPath");
+  if (options["upload"] != null) {
+    print("Uploading updated approvals to ${options["upload"]}...");
+    await cpGsutil(approvalsPath, options["upload"]);
+    print("Uploaded updated approvals to ${options["upload"]}");
+  }
+}
diff --git a/tools/bots/compare_results.dart b/tools/bots/compare_results.dart
index c3820a0..792a473 100755
--- a/tools/bots/compare_results.dart
+++ b/tools/bots/compare_results.dart
@@ -273,7 +273,7 @@
         ? new Result.fromMap(mapBefore, flakinessData[name])
         : null;
     final resultAfter = new Result.fromMap(mapAfter, flakinessData[name]);
-    final resultApproved = mapApproved != null
+    final resultApproved = mapApproved != null && mapApproved["result"] != null
         ? new Result.fromMap(mapApproved, flakinessData[name])
         : null;
     final event = new Event(resultBefore, resultAfter, resultApproved);
diff --git a/tools/bots/test_matrix.json b/tools/bots/test_matrix.json
index bcf66e7..07e3cf0 100644
--- a/tools/bots/test_matrix.json
+++ b/tools/bots/test_matrix.json
@@ -42,6 +42,7 @@
       "tests/search/",
       "tests/standalone/",
       "tests/standalone_2/",
+      "tests/ffi/",
       "third_party/d8/",
       "third_party/observatory_pub_packages/packages/web_components/",
       "third_party/pkg/",
@@ -80,6 +81,7 @@
       "tests/search/",
       "tests/standalone/",
       "tests/standalone_2/",
+      "tests/ffi/",
       "third_party/d8/",
       "third_party/pkg/",
       "third_party/pkg_tested/",
@@ -126,18 +128,27 @@
     ],
     "vm-kernel": [
       "out/DebugIA32/",
+      "out/DebugX64/",
       "out/DebugSIMARM/",
       "out/DebugSIMARM64/",
       "out/DebugSIMDBC64/",
-      "out/DebugX64/",
-      "out/ProductX64/",
-      "out/ReleaseAndroidARM/",
+      "out/DebugAndroidARM/",
+      "out/DebugAndroidARM64/",
       "out/ReleaseIA32/",
+      "out/ReleaseX64/",
       "out/ReleaseSIMARM/",
       "out/ReleaseSIMARM64/",
-      "out/ReleaseXARM64/",
       "out/ReleaseSIMDBC64/",
-      "out/ReleaseX64/",
+      "out/ReleaseAndroidARM/",
+      "out/ReleaseAndroidARM64/",
+      "out/ReleaseXARM64/",
+      "out/ProductIA32/",
+      "out/ProductX64/",
+      "out/ProductSIMARM/",
+      "out/ProductSIMARM64/",
+      "out/ProductSIMDBC64/",
+      "out/ProductAndroidARM/",
+      "out/ProductAndroidARM64/",
       "xcodebuild/DebugIA32/",
       "xcodebuild/DebugSIMDBC64/",
       "xcodebuild/DebugX64/",
@@ -168,6 +179,7 @@
       "tests/search/",
       "tests/standalone/",
       "tests/standalone_2/",
+      "tests/ffi/",
       "pkg/async_helper/",
       "pkg/build_integration/",
       "pkg/dart_internal/",
@@ -265,6 +277,7 @@
       "options": {
         "use-blobs": true
     }},
+    "dartk-android-(debug|product|release)-(arm|arm64)": {},
     "dartkp-linux-(debug|product|release)-(simarm|simarm64)": {
       "options": {
         "use-blobs": true
@@ -304,7 +317,7 @@
     "dartk-(linux|mac|win)-(debug|product|release)-(ia32|x64)": { },
     "dartk-checked-(linux|mac|win)-(debug|product|release)-(ia32|x64)": {
       "options": {
-        "checked": true
+	"enable-asserts": true
     }},
     "dartk-(linux|mac|win)-(debug|product|release)-(arm64|simarm|simarm64|simdbc64)": { },
     "dartk-optcounter-(linux|mac|win)-(debug|product|release)-(ia32|x64)": {
@@ -325,15 +338,15 @@
         "hot-reload-rollback": true
     }},
     "app_jitk-(linux|mac|win)-(debug|product|release)-(ia32|x64)": { },
-    "dartkb-interpret-(linux|mac|win)-(debug|product|release)-(ia32|x64)": {
+    "dartkb-interpret-(linux|mac|win)-(debug|product|release)-(ia32|x64|arm|arm64|simarm|simarm64)": {
       "options": {
         "vm-options": ["--enable_interpreter", "--compilation-counter-threshold=-1"]
     }},
-    "dartkb-mixed-(linux|mac|win)-(debug|product|release)-(ia32|x64)": {
+    "dartkb-mixed-(linux|mac|win)-(debug|product|release)-(ia32|x64|arm|arm64|simarm|simarm64)": {
       "options": {
         "vm-options": ["--enable_interpreter"]
     }},
-    "dartkb-compile-(linux|mac|win)-(debug|product|release)-(ia32|x64)": {
+    "dartkb-compile-(linux|mac|win)-(debug|product|release)-(ia32|x64|arm|arm64|simarm|simarm64)": {
       "options": {
         "vm-options": ["--use_bytecode_compiler"]
     }},
@@ -399,7 +412,11 @@
     {
       "builders": [
         "vm-dartkb-linux-debug-x64",
-        "vm-dartkb-linux-release-x64"
+        "vm-dartkb-linux-release-x64",
+        "vm-dartkb-linux-product-x64",
+        "vm-dartkb-linux-debug-simarm64",
+        "vm-dartkb-linux-release-simarm64",
+        "vm-dartkb-linux-product-simarm64"
       ],
       "meta": {
         "description": "This configuration is used by the vm kbc builders."
@@ -409,8 +426,8 @@
           "name": "configure dart",
           "script": "tools/gn.py",
           "arguments": [
-            "--mode=debug,release",
-            "--arch=x64",
+            "--mode=${mode}",
+            "--arch=${arch}",
             "--bytecode"
           ]
         },
@@ -424,11 +441,12 @@
         {
           "name": "vm mixed mode tests",
           "arguments": [
-            "-ndartkb-mixed-linux-${mode}-x64",
+            "-ndartkb-mixed-linux-${mode}-${arch}",
             "language_2",
             "corelib_2",
             "lib_2",
-            "standalone_2"
+            "standalone_2",
+            "ffi"
           ],
           "fileset": "vm-kernel",
           "shards": 10
@@ -436,11 +454,12 @@
         {
           "name": "vm bytecode compiler tests",
           "arguments": [
-            "-ndartkb-compile-linux-${mode}-x64",
+            "-ndartkb-compile-linux-${mode}-${arch}",
             "language_2",
             "corelib_2",
             "lib_2",
-            "standalone_2"
+            "standalone_2",
+            "ffi"
           ],
           "fileset": "vm-kernel",
           "shards": 10
@@ -448,11 +467,12 @@
         {
           "name": "vm interpreter tests",
           "arguments": [
-            "-ndartkb-interpret-linux-${mode}-x64",
+            "-ndartkb-interpret-linux-${mode}-${arch}",
             "language_2",
             "corelib_2",
             "lib_2",
-            "standalone_2"
+            "standalone_2",
+            "ffi"
           ],
           "fileset": "vm-kernel",
           "shards": 10
@@ -516,6 +536,38 @@
     },
     {
       "builders": [
+        "vm-ffi-android-debug-arm64",
+        "vm-ffi-android-debug-arm",
+        "vm-ffi-android-release-arm64",
+        "vm-ffi-android-release-arm",
+        "vm-ffi-android-product-arm64",
+        "vm-ffi-android-product-arm"
+      ],
+      "meta": {
+        "description": "This configuration is used for running FFI tests in JIT-mode on Android."
+      },
+      "steps": [
+        {
+          "name": "build dart",
+          "script": "tools/build.py",
+          "arguments": [
+            "runtime_kernel",
+            "--os=android"
+          ]
+        },
+        {
+          "name": "ffi tests",
+          "arguments": [
+            "-ndartk-android-${mode}-${arch}",
+            "ffi"
+          ],
+          "fileset": "vm-kernel",
+          "shards": 1
+        }
+      ]
+    },
+    {
+      "builders": [
         "vm-kernel-precomp-linux-debug-x64",
         "vm-kernel-precomp-linux-product-x64",
         "vm-kernel-precomp-linux-release-simarm",
@@ -1598,7 +1650,7 @@
           "name": "package unit tests",
           "arguments": [
             "-nunittest-asserts-${mode}-${system}",
-            "pkg"
+            "pkg/pkg/(?!front_end/|kernel/)"
           ]
         },
         {
@@ -1632,7 +1684,7 @@
           "name": "package unit tests",
           "arguments": [
             "-nunittest-asserts-${mode}-${system}",
-            "pkg"
+            "pkg/pkg/(?!front_end/|kernel/)"
           ]
         },
         {
diff --git a/tools/bots/try_benchmarks.sh b/tools/bots/try_benchmarks.sh
index 59a7971..5f0aa28 100755
--- a/tools/bots/try_benchmarks.sh
+++ b/tools/bots/try_benchmarks.sh
@@ -353,6 +353,11 @@
     out/ReleaseX64/dart --profile-period=10000 --packages=.packages hello.dart
     DART_CONFIGURATION=ReleaseX64 pkg/vm/tool/precompiler2 --packages=.packages hello.dart blob.bin
     DART_CONFIGURATION=ReleaseX64 pkg/vm/tool/dart_precompiled_runtime2 --profile-period=10000 blob.bin
+    out/ReleaseX64/dart --profile-period=10000 --packages=.packages --optimization-counter-threshold=-1 hello.dart
+    out/ReleaseX64/dart --profile-period=10000 --packages=.packages --enable-interpreter hello.dart
+    out/ReleaseX64/dart --profile-period=10000 --packages=.packages --enable-interpreter --compilation-counter-threshold=-1 hello.dart
+    out/ReleaseX64/dart --profile-period=10000 --packages=.packages --use-bytecode-compiler hello.dart
+    out/ReleaseX64/dart --profile-period=10000 --packages=.packages --use-bytecode-compiler --optimization-counter-threshold=-1 hello.dart
     out/ReleaseSIMDBC64/dart --profile-period=10000 --packages=.packages hello.dart
     out/ReleaseX64/dart pkg/front_end/tool/perf.dart parse hello.dart
     out/ReleaseX64/dart pkg/front_end/tool/perf.dart scan hello.dart
diff --git a/tools/dom/templates/html/impl/impl_DOMException.darttemplate b/tools/dom/templates/html/impl/impl_DOMException.darttemplate
index 4eddc81..cf127fa 100644
--- a/tools/dom/templates/html/impl/impl_DOMException.darttemplate
+++ b/tools/dom/templates/html/impl/impl_DOMException.darttemplate
@@ -27,6 +27,15 @@
   static const String TIMEOUT = 'TimeoutError';
   static const String INVALID_NODE_TYPE = 'InvalidNodeTypeError';
   static const String DATA_CLONE = 'DataCloneError';
+  static const String ENCODING = 'EncodingError';
+  static const String NOT_READABLE = 'NotReadableError';
+  static const String UNKNOWN = 'UnknownError';
+  static const String CONSTRAINT = 'ConstraintError';
+  static const String TRANSACTION_INACTIVE = 'TransactionInactiveError';
+  static const String READ_ONLY = 'ReadOnlyError';
+  static const String VERSION = 'VersionError';
+  static const String OPERATION = 'OperationError';
+  static const String NOT_ALLOWED = 'NotAllowedError';
   // Is TypeError class derived from DomException but name is 'TypeError'
   static const String TYPE_ERROR = 'TypeError';
 
diff --git a/tools/patches/flutter-engine/7418238239f885ba92093c44a1768f8ec93b121f.patch b/tools/patches/flutter-engine/7418238239f885ba92093c44a1768f8ec93b121f.patch
deleted file mode 100644
index 69336e8..0000000
--- a/tools/patches/flutter-engine/7418238239f885ba92093c44a1768f8ec93b121f.patch
+++ /dev/null
@@ -1,31 +0,0 @@
-diff --git a/DEPS b/DEPS
-index 442e2d912..cb079bde9 100644
---- a/DEPS
-+++ b/DEPS
-@@ -37,7 +37,7 @@ vars = {
-   # The lines between blank lines above and below are generated by a script. See create_updated_flutter_deps.py
-   'dart_args_tag': '1.4.4',
-   'dart_async_tag': '2.0.8',
--  'dart_bazel_worker_tag': '0.1.14',
-+  'dart_bazel_worker_tag': 'bazel_worker-v0.1.20',
-   'dart_boolean_selector_tag': '1.0.4',
-   'dart_boringssl_gen_rev': 'bbf52f18f425e29b1185f2f6753bec02ed8c5880',
-   'dart_boringssl_rev': '702e2b6d3831486535e958f262a05c75a5cb312e',
-@@ -48,7 +48,7 @@ vars = {
-   'dart_crypto_tag': '2.0.6',
-   'dart_csslib_tag': '0.14.4+1',
-   'dart_dart2js_info_tag': '0.6.0',
--  'dart_dart_style_tag': '1.2.2',
-+  'dart_dart_style_tag': '1.2.4',
-   'dart_dartdoc_tag': 'v0.28.2',
-   'dart_fixnum_tag': '0.10.9',
-   'dart_glob_tag': '1.1.7',
-@@ -74,7 +74,7 @@ vars = {
-   'dart_path_tag': '1.6.2',
-   'dart_plugin_tag': 'f5b4b0e32d1406d62daccea030ba6457d14b1c47',
-   'dart_pool_tag': '1.3.6',
--  'dart_protobuf_tag': '0.9.0',
-+  'dart_protobuf_tag': '0c77167b16d00b561a6055bfe26690af7f26ae88',
-   'dart_pub_rev': '3c060aae47985e9a248b850f1d0450304a5c97e3',
-   'dart_pub_semver_tag': '1.4.2',
-   'dart_quiver_tag': '2.0.0+1',
diff --git a/tools/patches/flutter-engine/75b2f9f919e5728902aff39a09223d1cc9402585.patch b/tools/patches/flutter-engine/75b2f9f919e5728902aff39a09223d1cc9402585.patch
new file mode 100644
index 0000000..9d4241f
--- /dev/null
+++ b/tools/patches/flutter-engine/75b2f9f919e5728902aff39a09223d1cc9402585.patch
@@ -0,0 +1,28 @@
+diff --git a/BUILD.gn b/BUILD.gn
+index 2766d1b98..828196f8d 100644
+--- a/BUILD.gn
++++ b/BUILD.gn
+@@ -60,8 +60,8 @@ group("flutter") {
+ 
+     if (is_linux) {
+       public_deps += [
+-        "$flutter_root/shell/platform/common/cpp/client_wrapper:client_wrapper_unittests",
+-        "$flutter_root/shell/platform/glfw/client_wrapper:client_wrapper_glfw_unittests",
++#        "$flutter_root/shell/platform/common/cpp/client_wrapper:client_wrapper_unittests",
++#        "$flutter_root/shell/platform/glfw/client_wrapper:client_wrapper_glfw_unittests",
+       ]
+     }
+   }
+diff --git a/shell/platform/BUILD.gn b/shell/platform/BUILD.gn
+index c3bd7569c..30abe167a 100644
+--- a/shell/platform/BUILD.gn
++++ b/shell/platform/BUILD.gn
+@@ -13,7 +13,7 @@ group("platform") {
+     ]
+   } else if (is_linux) {
+     deps = [
+-      "linux",
++#      "linux",
+     ]
+   } else if (is_win) {
+     deps = [
diff --git a/tools/patches/flutter-flutter/cad97fe7467c60de645d47acffd0e00cd83178ab.patch b/tools/patches/flutter-flutter/cad97fe7467c60de645d47acffd0e00cd83178ab.patch
deleted file mode 100644
index 6cc2a6b..0000000
--- a/tools/patches/flutter-flutter/cad97fe7467c60de645d47acffd0e00cd83178ab.patch
+++ /dev/null
@@ -1,190 +0,0 @@
-diff --git a/packages/flutter_tools/lib/src/compile.dart b/packages/flutter_tools/lib/src/compile.dart
-index 12c0770ab..7787bd4ca 100644
---- a/packages/flutter_tools/lib/src/compile.dart
-+++ b/packages/flutter_tools/lib/src/compile.dart
-@@ -57,12 +57,15 @@ class TargetModel {
- }
- 
- class CompilerOutput {
--  const CompilerOutput(this.outputFilename, this.errorCount);
-+  const CompilerOutput(this.outputFilename, this.errorCount, this.sources);
- 
-   final String outputFilename;
-   final int errorCount;
-+  final List<Uri> sources;
- }
- 
-+enum StdoutState { CollectDiagnostic, CollectDependencies }
-+
- /// Handles stdin/stdout communication with the frontend server.
- class StdoutHandler {
-   StdoutHandler({this.consumer = printError}) {
-@@ -72,30 +75,54 @@ class StdoutHandler {
-   bool compilerMessageReceived = false;
-   final CompilerMessageConsumer consumer;
-   String boundaryKey;
-+  StdoutState state = StdoutState.CollectDiagnostic;
-   Completer<CompilerOutput> compilerOutput;
-+  final List<Uri> sources = <Uri>[];
- 
-   bool _suppressCompilerMessages;
- 
-   void handler(String message) {
-+    printTrace('-> $message');
-     const String kResultPrefix = 'result ';
-     if (boundaryKey == null && message.startsWith(kResultPrefix)) {
-       boundaryKey = message.substring(kResultPrefix.length);
-     } else if (message.startsWith(boundaryKey)) {
--      if (message.length <= boundaryKey.length) {
--        compilerOutput.complete(null);
--        return;
-+      if (state == StdoutState.CollectDiagnostic) {
-+        state = StdoutState.CollectDependencies;
-+      } else {
-+        if (message.length <= boundaryKey.length) {
-+          compilerOutput.complete(null);
-+          return;
-+        }
-+        final int spaceDelimiter = message.lastIndexOf(' ');
-+        compilerOutput.complete(
-+            CompilerOutput(
-+                message.substring(boundaryKey.length + 1, spaceDelimiter),
-+                int.parse(message.substring(spaceDelimiter + 1).trim()),
-+                sources));
-       }
--      final int spaceDelimiter = message.lastIndexOf(' ');
--      compilerOutput.complete(
--        CompilerOutput(
--          message.substring(boundaryKey.length + 1, spaceDelimiter),
--          int.parse(message.substring(spaceDelimiter + 1).trim())));
--    } else if (!_suppressCompilerMessages) {
--      if (compilerMessageReceived == false) {
--        consumer('\nCompiler message:');
--        compilerMessageReceived = true;
-+    } else {
-+      if (state == StdoutState.CollectDiagnostic) {
-+        if (!_suppressCompilerMessages) {
-+          if (compilerMessageReceived == false) {
-+            consumer('\nCompiler message:');
-+            compilerMessageReceived = true;
-+          }
-+          consumer(message);
-+        }
-+      } else {
-+        assert(state == StdoutState.CollectDependencies);
-+        switch (message[0]) {
-+          case '+':
-+            sources.add(Uri.parse(message.substring(1)));
-+            break;
-+          case '-':
-+            sources.remove(Uri.parse(message.substring(1)));
-+            break;
-+          default:
-+            printTrace('Unexpected prefix for $message uri - ignoring');
-+        }
-       }
--      consumer(message);
-     }
-   }
- 
-@@ -106,6 +133,7 @@ class StdoutHandler {
-     compilerMessageReceived = false;
-     compilerOutput = Completer<CompilerOutput>();
-     _suppressCompilerMessages = suppressCompilerMessages;
-+    state = StdoutState.CollectDiagnostic;
-   }
- }
- 
-@@ -200,7 +228,7 @@ class KernelCompiler {
- 
-       if (await fingerprinter.doesFingerprintMatch()) {
-         printTrace('Skipping kernel compilation. Fingerprint match.');
--        return CompilerOutput(outputFilePath, 0);
-+        return CompilerOutput(outputFilePath, 0, /* sources */ null);
-       }
-     }
- 
-@@ -453,10 +481,13 @@ class ResidentCompiler {
-         ? _mapFilename(request.mainPath, packageUriMapper) + ' '
-         : '';
-     _server.stdin.writeln('recompile $mainUri$inputKey');
-+    printTrace('<- recompile $mainUri$inputKey');
-     for (String fileUri in request.invalidatedFiles) {
-       _server.stdin.writeln(_mapFileUri(fileUri, packageUriMapper));
-+      printTrace('<- ${_mapFileUri(fileUri, packageUriMapper)}');
-     }
-     _server.stdin.writeln(inputKey);
-+    printTrace('<- $inputKey');
- 
-     return _stdoutHandler.compilerOutput.future;
-   }
-@@ -545,6 +576,7 @@ class ResidentCompiler {
-       .listen((String message) { printError(message); });
- 
-     _server.stdin.writeln('compile $scriptUri');
-+    printTrace('<- compile $scriptUri');
- 
-     return _stdoutHandler.compilerOutput.future;
-   }
-@@ -597,6 +629,7 @@ class ResidentCompiler {
-   void accept() {
-     if (_compileRequestNeedsConfirmation) {
-       _server.stdin.writeln('accept');
-+      printTrace('<- accept');
-     }
-     _compileRequestNeedsConfirmation = false;
-   }
-@@ -620,6 +653,7 @@ class ResidentCompiler {
-     }
-     _stdoutHandler.reset();
-     _server.stdin.writeln('reject');
-+    printTrace('<- reject');
-     _compileRequestNeedsConfirmation = false;
-     return _stdoutHandler.compilerOutput.future;
-   }
-@@ -629,6 +663,7 @@ class ResidentCompiler {
-   /// kernel file.
-   void reset() {
-     _server?.stdin?.writeln('reset');
-+    printTrace('<- reset');
-   }
- 
-   String _mapFilename(String filename, PackageUriMapper packageUriMapper) {
-diff --git a/packages/flutter_tools/lib/src/devfs.dart b/packages/flutter_tools/lib/src/devfs.dart
-index 7940e8bb0..9e8b9bd45 100644
---- a/packages/flutter_tools/lib/src/devfs.dart
-+++ b/packages/flutter_tools/lib/src/devfs.dart
-@@ -557,6 +557,8 @@ class DevFS {
-       outputPath:  dillOutputPath ?? getDefaultApplicationKernelPath(trackWidgetCreation: trackWidgetCreation),
-       packagesFilePath : _packagesFilePath,
-     );
-+    // list of sources that needs to be monitored are in [compilerOutput.sources]
-+    //
-     // Don't send full kernel file that would overwrite what VM already
-     // started loading from.
-     if (!bundleFirstUpload) {
-diff --git a/packages/flutter_tools/test/src/mocks.dart b/packages/flutter_tools/test/src/mocks.dart
-index 52c5fc907..36d63f2d5 100644
---- a/packages/flutter_tools/test/src/mocks.dart
-+++ b/packages/flutter_tools/test/src/mocks.dart
-@@ -496,6 +496,6 @@ class MockResidentCompiler extends BasicMock implements ResidentCompiler {
-   Future<CompilerOutput> recompile(String mainPath, List<String> invalidatedFiles, { String outputPath, String packagesFilePath }) async {
-     fs.file(outputPath).createSync(recursive: true);
-     fs.file(outputPath).writeAsStringSync('compiled_kernel_output');
--    return CompilerOutput(outputPath, 0);
-+    return CompilerOutput(outputPath, 0, <Uri>[]);
-   }
- }
-diff --git a/packages/flutter_tools/test/tester/flutter_tester_test.dart b/packages/flutter_tools/test/tester/flutter_tester_test.dart
-index a78f70f4f..b6524bd5d 100644
---- a/packages/flutter_tools/test/tester/flutter_tester_test.dart
-+++ b/packages/flutter_tools/test/tester/flutter_tester_test.dart
-@@ -177,7 +177,7 @@ Hello!
-           packagesPath: anyNamed('packagesPath'),
-         )).thenAnswer((_) async {
-           fs.file('$mainPath.dill').createSync(recursive: true);
--          return CompilerOutput('$mainPath.dill', 0);
-+          return CompilerOutput('$mainPath.dill', 0, <Uri>[]);
-         });
- 
-         final LaunchResult result = await device.startApp(null,
diff --git a/tools/run_debian_build.sh b/tools/run_debian_build.sh
index 66e7d5d..e0d54a1 100755
--- a/tools/run_debian_build.sh
+++ b/tools/run_debian_build.sh
@@ -6,7 +6,8 @@
 
 ninja=$(which ninja)
 depot_tools=$(dirname $ninja)
-cmd="apt-get update && apt-get -y install build-essential debhelper git python\
+cmd="sed -i /jessie-updates/d /etc/apt/sources.list\
+    && apt-get update && apt-get -y install build-essential debhelper git python\
     && PATH=\"$depot_tools:\$PATH\"\
     python tools/bots/linux_distribution_support.py"
 image="launcher.gcr.io/google/debian8:latest"
diff --git a/tools/spec_parse.py b/tools/spec_parse.py
index 79ba306..ba87ff8 100755
--- a/tools/spec_parse.py
+++ b/tools/spec_parse.py
@@ -4,14 +4,14 @@
 # for details. All rights reserved. Use of this source code is governed by a
 # BSD-style license that can be found in the LICENSE file.
 
-# This script runs the parser which is generated using ANTLR 3 from
+# This script runs the parser which is generated using ANTLR 4 from
 # docs/language/Dart.g. It relies on a certain environment and is hence
 # usable locally where this environment can be obtained, but it may not be
 # possible to run it, e.g., on build bots. The requirements are as follows:
 #
 #   - `make parser` in spec_parser has been executed successfully.
 #   - A suitable JVM is in the PATH and may be executed as 'java'.
-#   - the ANTLR3 jar is available as /usr/share/java/antlr3-runtime.jar.
+#   - the ANTLR3 jar is available as /usr/share/java/antlr4-runtime.jar.
 
 import os
 import string
@@ -32,7 +32,7 @@
   tools_dir = os.path.dirname(os.path.realpath(__file__))
   spec_parser_dir = os.path.join(tools_dir, 'spec_parser')
   spec_parser_file = os.path.join(spec_parser_dir, 'SpecParser.class')
-  antlr_jar = '/usr/share/java/antlr3-runtime.jar'
+  antlr_jar = '/usr/share/java/antlr4-runtime.jar'
   class_path = string.join([spec_parser_dir, antlr_jar], ':')
   command = ['java', '-cp', class_path, 'SpecParser'] + args
 
diff --git a/tools/spec_parser/.gitignore b/tools/spec_parser/.gitignore
index 5810652..8f983c7 100644
--- a/tools/spec_parser/.gitignore
+++ b/tools/spec_parser/.gitignore
@@ -1,5 +1,6 @@
 *Lexer.java
 *Parser.java
+*Listener.java
 *.tokens
 *.class
 *.dot
diff --git a/docs/language/Dart.g b/tools/spec_parser/Dart.g
similarity index 77%
rename from docs/language/Dart.g
rename to tools/spec_parser/Dart.g
index f586c96..0a95229 100644
--- a/docs/language/Dart.g
+++ b/tools/spec_parser/Dart.g
@@ -2,10 +2,13 @@
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
 
-// *** This grammar is under development and it contains known bugs. ***
-//
 // CHANGES:
 //
+// v0.4 Added support for 'unified collections' (spreads and control flow
+// in collection literals).
+//
+// v0.3 Updated to use ANTLR v4 rather than antlr3.
+//
 // v0.2 Changed top level variable declarations to avoid redundant and
 // misleading occurrence of (FINAL|CONST).
 //
@@ -43,29 +46,6 @@
     return !errorHasOccurred;
   }
 
-  /// Produce grammar debugging friendly output, as described in 'The
-  /// Definitive ANTLR Reference', p247.
-  public String getErrorMessage(RecognitionException e, String[] tokenNames) {
-    List stack = getRuleInvocationStack(e, this.getClass().getName());
-    String msg = null;
-    if (e instanceof NoViableAltException) {
-      NoViableAltException nvae = (NoViableAltException)e;
-      msg = "no viable alt; token=" + e.token +
-          " (decision=" + nvae.decisionNumber +
-          " state " + nvae.stateNumber + ")" +
-          " decision=<<" + nvae.grammarDecisionDescription + ">>";
-    }
-    else {
-      msg = super.getErrorMessage(e, tokenNames);
-    }
-    if (!errorHasOccurred) prepareForErrors();
-    return stack + " " + msg;
-  }
-
-  public String getTokenErrorDisplay(Token t) {
-    return t.toString();
-  }
-
   // Enable the parser to treat ASYNC/AWAIT/YIELD as keywords in the body of an
   // `async`, `async*`, or `sync*` function. Access via methods below.
   private Stack<Boolean> asyncEtcAreKeywords = new Stack<Boolean>();
@@ -89,20 +69,6 @@
     }
     return false;
   }
-
-  // Debugging support methods.
-  void dp(int indent, String method, String sep) {
-    for (int i = 0; i < indent; i++) {
-      System.out.print("  ");
-    }
-    System.out.println(method + sep + " " + input.LT(1) + " " + state.failed);
-  }
-
-  void dpBegin(int indent, String method) { dp(indent, method, ":"); }
-  void dpEnd(int indent, String method) { dp(indent, method, " END:"); }
-  void dpCall(int indent, String method) { dp(indent, method, "?"); }
-  void dpCalled(int indent, String method) { dp(indent, method, ".."); }
-  void dpResult(int indent, String method) { dp(indent, method, "!"); }
 }
 
 @lexer::members{
@@ -112,13 +78,6 @@
   public static final int BRACE_THREE_SINGLE = 4;
   public static final int BRACE_THREE_DOUBLE = 5;
 
-  /// This override ensures that lexer errors are recognized as errors,
-  /// but does not change the format of the reported error.
-  public String getErrorMessage(RecognitionException e, String[] tokenNames) {
-    if (!DartParser.errorHasOccurred) DartParser.prepareForErrors();
-    return super.getErrorMessage(e, tokenNames);
-  }
-
   // Enable the parser to handle string interpolations via brace matching.
   // The top of the `braceLevels` stack describes the most recent unmatched
   // '{'. This is needed in order to enable/disable certain lexer rules.
@@ -171,26 +130,24 @@
 
 libraryDefinition
     :    FEFF? SCRIPT_TAG?
-         ((metadata LIBRARY) => libraryName)?
-         ((metadata (IMPORT | EXPORT)) => importOrExport)*
-         ((metadata PART) => partDirective)*
+         libraryName?
+         importOrExport*
+         partDirective*
          (metadata topLevelDefinition)*
          EOF
     ;
 
 topLevelDefinition
-    :    classDefinition
+    :    classDeclaration
+    |    mixinDeclaration
     |    enumType
-    |    (TYPEDEF typeIdentifier typeParameters? '=') => typeAlias
-    |    (TYPEDEF functionPrefix ('<' | '(')) => typeAlias
-    |    (EXTERNAL functionSignature ';') => EXTERNAL functionSignature ';'
-    |    (EXTERNAL getterSignature) => EXTERNAL getterSignature ';'
-    |    (EXTERNAL type? SET identifier '(') =>
-         EXTERNAL setterSignature ';'
-    |    (getterSignature functionBodyPrefix) => getterSignature functionBody
-    |    (type? SET identifier '(') => setterSignature functionBody
-    |    (type? identifierNotFUNCTION typeParameters? '(') =>
-         functionSignature functionBody
+    |    typeAlias
+    |    EXTERNAL functionSignature ';'
+    |    EXTERNAL getterSignature ';'
+    |    EXTERNAL setterSignature ';'
+    |    getterSignature functionBody
+    |    setterSignature functionBody
+    |    functionSignature functionBody
     |    (FINAL | CONST) type? staticFinalDeclarationList ';'
     |    topLevelVariableDeclaration ';'
     ;
@@ -276,9 +233,8 @@
     ;
 
 normalFormalParameterNoMetadata
-    :    (COVARIANT? type? identifierNotFUNCTION formalParameterPart) =>
-         functionFormalParameter
-    |    (finalConstVarOrType? THIS) => fieldFormalParameter
+    :    functionFormalParameter
+    |    fieldFormalParameter
     |    simpleFormalParameter
     ;
 
@@ -309,12 +265,16 @@
     :    typeIdentifier typeParameters?
     ;
 
-classDefinition
-    :    (ABSTRACT? CLASS typeApplication (EXTENDS|IMPLEMENTS|LBRACE)) =>
-         ABSTRACT? CLASS typeApplication (superclass mixins?)? interfaces?
+classDeclaration
+    :    ABSTRACT? CLASS typeApplication (superclass mixins?)? interfaces?
          LBRACE (metadata classMemberDefinition)* RBRACE
-    |    (ABSTRACT? CLASS typeApplication '=') =>
-         ABSTRACT? CLASS mixinApplicationClass
+    |    ABSTRACT? CLASS mixinApplicationClass
+    ;
+
+mixinDeclaration
+    :    MIXIN typeIdentifier typeParameters?
+         (ON typeNotVoidNotFunctionList)? interfaces?
+         LBRACE (metadata mixinMemberDefinition)* RBRACE
     ;
 
 mixins
@@ -322,18 +282,22 @@
     ;
 
 classMemberDefinition
-    :    (methodSignature functionBodyPrefix) => methodSignature functionBody
+    :    methodSignature functionBody
     |    declaration ';'
     ;
 
+// TODO: We will probably want to make this more strict.
+mixinMemberDefinition
+    :    classMemberDefinition
+    ;
+
 methodSignature
-    :    (constructorSignature ':') => constructorSignature initializers
-    |    (FACTORY constructorName '(') => factoryConstructorSignature
-    |    (STATIC? type? identifierNotFUNCTION typeParameters? '(') =>
-         STATIC? functionSignature
-    |    (STATIC? type? GET) => STATIC? getterSignature
-    |    (STATIC? type? SET) => STATIC? setterSignature
-    |    (type? OPERATOR operator '(') => operatorSignature
+    :    constructorSignature initializers
+    |    factoryConstructorSignature
+    |    STATIC? functionSignature
+    |    STATIC? getterSignature
+    |    STATIC? setterSignature
+    |    operatorSignature
     |    constructorSignature
     ;
 
@@ -355,25 +319,17 @@
 // check.
 
 declaration
-    :    (EXTERNAL CONST? FACTORY constructorName '(') =>
-         EXTERNAL factoryConstructorSignature
-    |    (EXTERNAL CONST constructorName '(') =>
-         EXTERNAL constantConstructorSignature
-    |    (EXTERNAL constructorName '(') => EXTERNAL constructorSignature
-    |    ((EXTERNAL STATIC?)? type? GET identifier) =>
-         (EXTERNAL STATIC?)? getterSignature
-    |    ((EXTERNAL STATIC?)? type? SET identifier) =>
-         (EXTERNAL STATIC?)? setterSignature
-    |    (EXTERNAL? type? OPERATOR) => EXTERNAL? operatorSignature
-    |    (STATIC (FINAL | CONST)) =>
-         STATIC (FINAL | CONST) type? staticFinalDeclarationList
+    :    EXTERNAL factoryConstructorSignature
+    |    EXTERNAL constantConstructorSignature
+    |    EXTERNAL constructorSignature
+    |    (EXTERNAL STATIC?)? getterSignature
+    |    (EXTERNAL STATIC?)? setterSignature
+    |    EXTERNAL? operatorSignature
+    |    STATIC (FINAL | CONST) type? staticFinalDeclarationList
     |    FINAL type? initializedIdentifierList
-    |    ((STATIC | COVARIANT)? (VAR | type) identifier ('=' | ',' | ';')) =>
-         (STATIC | COVARIANT)? (VAR | type) initializedIdentifierList
-    |    (EXTERNAL? STATIC? functionSignature ';') =>
-         EXTERNAL? STATIC? functionSignature
-    |    (CONST? FACTORY constructorName formalParameterList '=') =>
-         redirectingFactoryConstructorSignature
+    |    (STATIC | COVARIANT)? (VAR | type) initializedIdentifierList
+    |    EXTERNAL? STATIC? functionSignature
+    |    redirectingFactoryConstructorSignature
     |    constantConstructorSignature (redirection | initializers)?
     |    constructorSignature (redirection | initializers)?
     ;
@@ -400,7 +356,7 @@
 binaryOperator
     :    multiplicativeOperator
     |    additiveOperator
-    |    (shiftOperator) => shiftOperator
+    |    shiftOperator
     |    relationalOperator
     |    '=='
     |    bitwiseOperator
@@ -496,20 +452,16 @@
     ;
 
 expression
-    :    (formalParameterPart functionExpressionBodyPrefix) =>
-         functionExpression
+    :    functionExpression
     |    throwExpression
-    |    (assignableExpression assignmentOperator) =>
-         assignableExpression assignmentOperator expression
+    |    assignableExpression assignmentOperator expression
     |    conditionalExpression cascadeSection*
     ;
 
 expressionWithoutCascade
-    :    (formalParameterPart functionExpressionBodyPrefix) =>
-         functionExpressionWithoutCascade
+    :    functionExpressionWithoutCascade
     |    throwExpressionWithoutCascade
-    |    (assignableExpression assignmentOperator) =>
-         assignableExpression assignmentOperator expressionWithoutCascade
+    |    assignableExpression assignmentOperator expressionWithoutCascade
     |    conditionalExpression
     ;
 
@@ -520,9 +472,9 @@
 primary
     :    thisExpression
     |    SUPER unconditionalAssignableSelector
-    |    (CONST constructorDesignation) => constObjectExpression
+    |    constObjectExpression
     |    newExpression
-    |    (formalParameterPart functionPrimaryBodyPrefix) => functionPrimary
+    |    functionPrimary
     |    '(' expression ')'
     |    literal
     |    identifier
@@ -534,7 +486,7 @@
     |    numericLiteral
     |    stringLiteral
     |    symbolLiteral
-    |    (CONST? typeArguments? LBRACE) => mapLiteral
+    |    setOrMapLiteral
     |    listLiteral
     ;
 
@@ -560,17 +512,44 @@
     :    singleLineStringWithoutInterpolation+
     ;
 
+setOrMapLiteral
+    : CONST? typeArguments? LBRACE elements? RBRACE
+    ;
+
 listLiteral
-    :    CONST? typeArguments? '[' (expressionList ','?)? ']'
+    : CONST? typeArguments? '[' elements? ']'
     ;
 
-mapLiteral
-    :    CONST? typeArguments?
-         LBRACE (mapLiteralEntry (',' mapLiteralEntry)* ','?)? RBRACE
+elements
+    : element (',' element)* ','?
     ;
 
-mapLiteralEntry
-    :    expression ':' expression
+element
+    : expressionElement
+    | mapEntry
+    | spreadElement
+    | ifElement
+    | forElement
+    ;
+
+expressionElement
+    : expression
+    ;
+
+mapEntry
+    : expression ':' expression
+    ;
+
+spreadElement
+    : ('...' | '...?') expression
+    ;
+
+ifElement
+    : IF '(' expression ')' element ('else' element)?
+    ;
+
+forElement
+    : AWAIT? FOR '(' forLoopParts ')' element
     ;
 
 throwExpression
@@ -770,8 +749,8 @@
     ;
 
 unaryExpression
-    :    (prefixOperator ~SUPER) => prefixOperator unaryExpression
-    |    (awaitExpression) => awaitExpression
+    :    prefixOperator unaryExpression
+    |    awaitExpression
     |    postfixExpression
     |    (minusOperator | tildeOperator) SUPER
     |    incrementOperator assignableExpression
@@ -804,11 +783,9 @@
 // sequence of two relational expressions.
 
 postfixExpression
-    :    (assignableExpression postfixOperator) =>
-         assignableExpression postfixOperator
-    |    (typeName typeArguments '.') =>
-         constructorInvocation ((selector) => selector)*
-    |    primary ((selector) => selector)*
+    :    assignableExpression postfixOperator
+    |    constructorInvocation selector*
+    |    primary selector*
     ;
 
 constructorInvocation
@@ -841,15 +818,10 @@
 // relationalOperator, not the beginning of typeArguments.
 
 assignableExpression
-    :    (SUPER unconditionalAssignableSelector
-            ~('<' | '(' | '[' | '.' | '?.')) =>
-         SUPER unconditionalAssignableSelector
-    |    (typeName typeArguments '.' identifier '(') =>
-         constructorInvocation
-         ((assignableSelectorPart) => assignableSelectorPart)+
-    |    (identifier ~('<' | '(' | '[' | '.' | '?.')) => identifier
-    |    (primary assignableSelectorPart) =>
-         primary ((assignableSelectorPart) => assignableSelectorPart)+
+    :    SUPER unconditionalAssignableSelector
+    |    constructorInvocation assignableSelectorPart+
+    |    identifier
+    |    primary assignableSelectorPart+
     |    identifier
     ;
 
@@ -880,7 +852,9 @@
     |    GET // Built-in identifier.
     |    IMPLEMENTS // Built-in identifier.
     |    IMPORT // Built-in identifier.
+    |    INTERFACE // Built-in identifier.
     |    LIBRARY // Built-in identifier.
+    |    MIXIN // Built-in identifier.
     |    OPERATOR // Built-in identifier.
     |    PART // Built-in identifier.
     |    SET // Built-in identifier.
@@ -891,7 +865,7 @@
     |    ON // Not a built-in identifier.
     |    SHOW // Not a built-in identifier.
     |    SYNC // Not a built-in identifier.
-    |    { asyncEtcPredicate(input.LA(1)) }? (ASYNC|AWAIT|YIELD)
+    |    { asyncEtcPredicate(getCurrentToken().getType()) }? (ASYNC|AWAIT|YIELD)
     ;
 
 identifier
@@ -913,7 +887,7 @@
     |    ON // Not a built-in identifier.
     |    SHOW // Not a built-in identifier.
     |    SYNC // Not a built-in identifier.
-    |    { asyncEtcPredicate(input.LA(1)) }? (ASYNC|AWAIT|YIELD)
+    |    { asyncEtcPredicate(getCurrentToken().getType()) }? (ASYNC|AWAIT|YIELD)
     ;
 
 typeTest
@@ -947,10 +921,9 @@
 // add another statement which can start with LBRACE we must adjust this
 // check.
 nonLabelledStatement
-    :    (LBRACE) => block
-    |    (metadata declaredIdentifier ('='|','|';')) =>
-         localVariableDeclaration
-    |    (AWAIT? FOR) => forStatement
+    :    block
+    |    localVariableDeclaration
+    |    forStatement
     |    whileStatement
     |    doStatement
     |    switchStatement
@@ -960,10 +933,9 @@
     |    breakStatement
     |    continueStatement
     |    returnStatement
-    |    (metadata functionSignature functionBodyPrefix) =>
-         localFunctionDeclaration
+    |    localFunctionDeclaration
     |    assertStatement
-    |    (YIELD ~'*') => yieldStatement
+    |    yieldStatement
     |    yieldEachStatement
     |    expressionStatement
     ;
@@ -985,7 +957,7 @@
     ;
 
 ifStatement
-    :    IF '(' expression ')' statement ((ELSE) => ELSE statement | ())
+    :    IF '(' expression ')' statement (ELSE statement | ())
     ;
 
 forStatement
@@ -993,16 +965,15 @@
     ;
 
 forLoopParts
-    :    (metadata declaredIdentifier IN) =>
-         metadata declaredIdentifier IN expression
-    |    (metadata identifier IN) => metadata identifier IN expression
+    :    metadata declaredIdentifier IN expression
+    |    metadata identifier IN expression
     |    forInitializerStatement expression? ';' expressionList?
     ;
 
 // The localVariableDeclaration cannot be CONST, but that can
 // be enforced in a later phase, and the grammar allows it.
 forInitializerStatement
-    :    (localVariableDeclaration) => localVariableDeclaration
+    :    localVariableDeclaration
     |    expression? ';'
     ;
 
@@ -1040,7 +1011,7 @@
     ;
 
 onParts
-    :    (onPart (ON|CATCH)) => onPart onParts
+    :    onPart onParts
     |    onPart
     ;
 
@@ -1089,8 +1060,8 @@
     ;
 
 importOrExport
-    :    (metadata IMPORT) => libraryImport
-    |    (metadata EXPORT) => libraryExport
+    :    libraryImport
+    |    libraryExport
     ;
 
 libraryImport
@@ -1132,9 +1103,8 @@
     ;
 
 type
-    :    (FUNCTION ('('|'<')) => functionTypeTails
-    |    (typeNotFunction FUNCTION ('('|'<')) =>
-         typeNotFunction functionTypeTails
+    :    functionTypeTails
+    |    typeNotFunction functionTypeTails
     |    typeNotFunction
     ;
 
@@ -1144,7 +1114,7 @@
     ;
 
 typeNotVoid
-    :    (typeNotFunction? FUNCTION ('('|'<')) => functionType
+    :    functionType
     |    typeNotVoidNotFunction
     ;
 
@@ -1170,8 +1140,7 @@
     ;
 
 typeAlias
-    :    (TYPEDEF typeIdentifier typeParameters? '=') =>
-         TYPEDEF typeIdentifier typeParameters? '=' functionType ';'
+    :    TYPEDEF typeIdentifier typeParameters? '=' functionType ';'
     |    TYPEDEF functionTypeAlias
     ;
 
@@ -1180,7 +1149,7 @@
     ;
 
 functionPrefix
-    :    (type identifier) => type identifier
+    :    type identifier
     |    identifier
     ;
 
@@ -1189,22 +1158,19 @@
     ;
 
 functionTypeTails
-    :    (functionTypeTail FUNCTION ('<'|'(')) =>
-         functionTypeTail functionTypeTails
+    :    functionTypeTail functionTypeTails
     |    functionTypeTail
     ;
 
 functionType
-    :    (FUNCTION ('<'|'(')) => functionTypeTails
+    :    functionTypeTails
     |    typeNotFunction functionTypeTails
     ;
 
 parameterTypeList
-    :    ('(' ')') => '(' ')'
-    |    ('(' normalParameterTypes ',' ('['|'{')) =>
-         '(' normalParameterTypes ',' optionalParameterTypes ')'
-    |    ('(' normalParameterTypes ','? ')') =>
-         '(' normalParameterTypes ','? ')'
+    :    '(' ')'
+    |    '(' normalParameterTypes ',' optionalParameterTypes ')'
+    |    '(' normalParameterTypes ','? ')'
     |    '(' optionalParameterTypes ')'
     ;
 
@@ -1213,7 +1179,7 @@
     ;
 
 normalParameterType
-    :    (typedIdentifier) => typedIdentifier
+    :    typedIdentifier
     |    type
     ;
 
@@ -1239,9 +1205,8 @@
     |    typeName typeArguments ('.' identifier)?
     ;
 
-// Predicate: Force resolution as composite symbolLiteral as far as possible.
 symbolLiteral
-    :    '#' (operator | (identifier (('.' identifier) => '.' identifier)*))
+    :    '#' (operator | (identifier ('.' identifier)*))
     ;
 
 singleLineStringWithoutInterpolation
@@ -1423,10 +1388,18 @@
     :    'import'
     ;
 
+INTERFACE
+    :    'interface'
+    ;
+
 LIBRARY
     :    'library'
     ;
 
+MIXIN
+    :    'mixin'
+    ;
+
 PART
     :    'part'
     ;
@@ -1536,7 +1509,7 @@
     ;
 
 NUMBER
-    :    (DIGIT+ '.' DIGIT) => DIGIT+ '.' DIGIT+ EXPONENT?
+    :    DIGIT+ '.' DIGIT+ EXPONENT?
     |    DIGIT+ EXPONENT?
     |    '.' DIGIT+ EXPONENT?
     ;
@@ -1552,8 +1525,8 @@
     ;
 
 RAW_MULTI_LINE_STRING
-    :    'r' '"""' (options {greedy=false;} : .)* '"""'
-    |    'r' '\'\'\'' (options {greedy=false;} : .)* '\'\'\''
+    :    'r' '"""' (.)*? '"""'
+    |    'r' '\'\'\'' (.)*? '\'\'\''
     ;
 
 fragment
@@ -1577,15 +1550,13 @@
     ;
 
 SINGLE_LINE_STRING_SQ_MID_MID
-    :    { currentBraceLevel(BRACE_SINGLE) }? =>
-         ('}' STRING_CONTENT_SQ* '${') =>
+    :    { currentBraceLevel(BRACE_SINGLE) }?
          { exitBrace(); } '}' STRING_CONTENT_SQ* '${'
          { enterBraceSingleQuote(); }
     ;
 
 SINGLE_LINE_STRING_SQ_MID_END
-    :    { currentBraceLevel(BRACE_SINGLE) }? =>
-         ('}' STRING_CONTENT_SQ* '\'') =>
+    :    { currentBraceLevel(BRACE_SINGLE) }?
          { exitBrace(); } '}' STRING_CONTENT_SQ* '\''
     ;
 
@@ -1605,15 +1576,13 @@
     ;
 
 SINGLE_LINE_STRING_DQ_MID_MID
-    :    { currentBraceLevel(BRACE_DOUBLE) }? =>
-         ('}' STRING_CONTENT_DQ* '${') =>
+    :    { currentBraceLevel(BRACE_DOUBLE) }?
          { exitBrace(); } '}' STRING_CONTENT_DQ* '${'
          { enterBraceDoubleQuote(); }
     ;
 
 SINGLE_LINE_STRING_DQ_MID_END
-    :    { currentBraceLevel(BRACE_DOUBLE) }? =>
-         ('}' STRING_CONTENT_DQ* '"') =>
+    :    { currentBraceLevel(BRACE_DOUBLE) }?
          { exitBrace(); } '}' STRING_CONTENT_DQ* '"'
     ;
 
@@ -1644,15 +1613,13 @@
     ;
 
 MULTI_LINE_STRING_SQ_MID_MID
-    :    { currentBraceLevel(BRACE_THREE_SINGLE) }? =>
-         ('}' STRING_CONTENT_TSQ* QUOTES_SQ '${') =>
+    :    { currentBraceLevel(BRACE_THREE_SINGLE) }?
          { exitBrace(); } '}' STRING_CONTENT_TSQ* QUOTES_SQ '${'
          { enterBraceThreeSingleQuotes(); }
     ;
 
 MULTI_LINE_STRING_SQ_MID_END
-    :    { currentBraceLevel(BRACE_THREE_SINGLE) }? =>
-         ('}' STRING_CONTENT_TSQ* '\'\'\'') =>
+    :    { currentBraceLevel(BRACE_THREE_SINGLE) }?
          { exitBrace(); } '}' STRING_CONTENT_TSQ* '\'\'\''
     ;
 
@@ -1682,15 +1649,13 @@
     ;
 
 MULTI_LINE_STRING_DQ_MID_MID
-    :    { currentBraceLevel(BRACE_THREE_DOUBLE) }? =>
-         ('}' STRING_CONTENT_TDQ* QUOTES_DQ '${') =>
+    :    { currentBraceLevel(BRACE_THREE_DOUBLE) }?
          { exitBrace(); } '}' STRING_CONTENT_TDQ* QUOTES_DQ '${'
          { enterBraceThreeDoubleQuotes(); }
     ;
 
 MULTI_LINE_STRING_DQ_MID_END
-    :    { currentBraceLevel(BRACE_THREE_DOUBLE) }? =>
-         ('}' STRING_CONTENT_TDQ* '"""') =>
+    :    { currentBraceLevel(BRACE_THREE_DOUBLE) }?
          { exitBrace(); } '}' STRING_CONTENT_TDQ* '"""'
     ;
 
@@ -1699,7 +1664,7 @@
     ;
 
 RBRACE
-    :    { currentBraceLevel(BRACE_NORMAL) }? => ('}') => { exitBrace(); } '}'
+    :    { currentBraceLevel(BRACE_NORMAL) }? { exitBrace(); } '}'
     ;
 
 fragment
@@ -1745,7 +1710,7 @@
     ;
 
 MULTI_LINE_COMMENT
-    :    '/*' (options {greedy=false;} : (MULTI_LINE_COMMENT | .))* '*/'
+    :    '/*' (MULTI_LINE_COMMENT | .)*? '*/'
          { skip(); }
     ;
 
diff --git a/tools/spec_parser/Makefile b/tools/spec_parser/Makefile
index f91e7d3..fe0f239 100644
--- a/tools/spec_parser/Makefile
+++ b/tools/spec_parser/Makefile
@@ -6,29 +6,28 @@
 JAVA_PATH=/usr/lib/jvm/java-7-openjdk-amd64/bin
 JAVA=$(JAVA_PATH)/java
 JAVAC=javac
-ANTLR_JAR=/usr/share/java/antlr3-runtime.jar
-ANTLR_FILES=DartLexer.java DartParser.java Dart.tokens
-ANTLR_CMD=PATH=$(JAVA_PATH):$(PATH) antlr3 -dfa -fo . $<
-JAVA_FILES=DartLexer.java DartParser.java
-CLASS_FILES=SpecParser.class SpecParserRunner.class DartLexer.class DartParser.class
+ANTLR_JAR=/usr/share/java/antlr4-runtime.jar
+ANTLR_FILES=DartLexer.java DartParser.java DartLexer.tokens
+ANTLR_CMD=PATH=$(JAVA_PATH):$(PATH) antlr4 $<
+GENERATED_JAVA_FILES=DartLexer.java DartParser.java
 
 .PHONY: default parser clean touch parse_hello
 
-default: $(JAVA_FILES)
+default: $(GENERATED_JAVA_FILES) compile
 
-parser: SpecParser.class
+compile: SpecParser.class
 
 SpecParser.class: $(ANTLR_FILES) SpecParser.java
 	$(JAVAC) -cp .:$(ANTLR_JAR) SpecParser.java
 
-%Lexer.java: ../../docs/language/%.g Makefile ; $(ANTLR_CMD)
+%Lexer.java: %.g Makefile ; $(ANTLR_CMD)
 
-%Parser.java: ../../docs/language/%.g Makefile ; $(ANTLR_CMD)
+%Parser.java: %.g Makefile ; $(ANTLR_CMD)
 
-%.tokens: ../../docs/language/%.g Makefile ; $(ANTLR_CMD)
+%.tokens: %.g Makefile ; $(ANTLR_CMD)
 
 clean:
-	rm -f $(CLASS_FILES) $(ANTLR_FILES)
+	rm -f *.class $(ANTLR_FILES)
 
 touch:
 	touch $(GRAMMAR)
diff --git a/tools/spec_parser/SpecParser.java b/tools/spec_parser/SpecParser.java
index 0f6ba68..cc9d1ea 100644
--- a/tools/spec_parser/SpecParser.java
+++ b/tools/spec_parser/SpecParser.java
@@ -4,13 +4,52 @@
 
 import java.io.*;
 import java.util.*;
-import org.antlr.runtime.*;
+import org.antlr.v4.runtime.*;
+import org.antlr.v4.runtime.dfa.*;
+import org.antlr.v4.runtime.atn.*;
 
 class ParsingResult {
   public int numberOfFileArguments;
   public int numberOfFailures;
 }
 
+class DartErrorListener implements ANTLRErrorListener {
+  public void reportAmbiguity(
+      Parser recognizer,
+      DFA dfa,
+      int startIndex,
+      int stopIndex,
+      boolean exact,
+      BitSet ambigAlts,
+      ATNConfigSet configs) {}
+
+  public void reportAttemptingFullContext(
+      Parser recognizer,
+      DFA dfa,
+      int startIndex,
+      int stopIndex,
+      BitSet conflictingAlts,
+      ATNConfigSet configs) {}
+
+  public void reportContextSensitivity(
+      Parser recognizer,
+      DFA dfa,
+      int startIndex,
+      int stopIndex,
+      int prediction,
+      ATNConfigSet configs) {}
+
+  public void syntaxError(
+      Recognizer<?,?> recognizer,
+      Object offendingSymbol,
+      int line,
+      int charPositionInLine,
+      String msg,
+      RecognitionException e) {
+    if (!DartParser.errorHasOccurred) DartParser.prepareForErrors();
+  }
+}
+
 /// Class for `main` which will parse files given as command line arguments.
 public class SpecParser {
   private static void normalExit() {
@@ -83,8 +122,11 @@
         continue;
       }
       if (verbose) System.err.println("Parsing file: " + filePath);
-      DartParser parser = new DartParser(new CommonTokenStream(
-          new DartLexer(new ANTLRFileStream(filePath))));
+      DartLexer lexer = new DartLexer(new ANTLRFileStream(filePath));
+      DartParser parser = new DartParser(new CommonTokenStream(lexer));
+      ANTLRErrorListener errorListener = new DartErrorListener();
+      lexer.addErrorListener(errorListener);
+      parser.addErrorListener(errorListener);
       if (!parser.parseLibrary(filePath)) result.numberOfFailures++;
     }
     return result;
diff --git a/tools/testing/dart/command.dart b/tools/testing/dart/command.dart
index b91201d..9b41d64 100644
--- a/tools/testing/dart/command.dart
+++ b/tools/testing/dart/command.dart
@@ -81,6 +81,12 @@
         precompiledRunner, processTest, testDirectory, arguments, useBlobs);
   }
 
+  static Command adbDartk(String precompiledRunner, String processTest,
+      String script, List<String> arguments, List<String> extraLibraries) {
+    return new AdbDartkCommand._(
+        precompiledRunner, processTest, script, arguments, extraLibraries);
+  }
+
   static Command jsCommandLine(
       String displayName, String executable, List<String> arguments,
       [Map<String, String> environment]) {
@@ -604,6 +610,40 @@
       'to an attached device. Uses (and requires) adb.';
 }
 
+class AdbDartkCommand extends Command {
+  final String buildPath;
+  final String processTestFilename;
+  final String kernelFile;
+  final List<String> arguments;
+  final List<String> extraLibraries;
+
+  AdbDartkCommand._(this.buildPath, this.processTestFilename, this.kernelFile,
+      this.arguments, this.extraLibraries,
+      {int index = 0})
+      : super._("adb_precompilation", index: index);
+
+  AdbDartkCommand indexedCopy(int index) => AdbDartkCommand._(
+      buildPath, processTestFilename, kernelFile, arguments, extraLibraries,
+      index: index);
+  _buildHashCode(HashCodeBuilder builder) {
+    super._buildHashCode(builder);
+    builder.add(buildPath);
+    builder.add(kernelFile);
+    builder.add(arguments);
+    builder.add(extraLibraries);
+  }
+
+  bool _equal(AdbDartkCommand other) =>
+      super._equal(other) &&
+      buildPath == other.buildPath &&
+      arguments == other.arguments &&
+      extraLibraries == other.extraLibraries &&
+      kernelFile == other.kernelFile;
+
+  String toString() => 'Steps to push Dart VM and Dill file '
+      'to an attached device. Uses (and requires) adb.';
+}
+
 class JSCommandlineCommand extends ProcessCommand {
   JSCommandlineCommand._(
       String displayName, String executable, List<String> arguments,
diff --git a/tools/testing/dart/compiler_configuration.dart b/tools/testing/dart/compiler_configuration.dart
index 85c6336..852f8e7 100644
--- a/tools/testing/dart/compiler_configuration.dart
+++ b/tools/testing/dart/compiler_configuration.dart
@@ -81,7 +81,8 @@
       case Compiler.dartk:
         if (configuration.architecture == Architecture.simdbc64 ||
             configuration.architecture == Architecture.simarm ||
-            configuration.architecture == Architecture.simarm64) {
+            configuration.architecture == Architecture.simarm64 ||
+            configuration.system == System.android) {
           return new VMKernelCompilerConfiguration(configuration);
         }
         return new NoneCompilerConfiguration(configuration);
@@ -143,6 +144,7 @@
   List<String> computeCompilerArguments(
       List<String> vmOptions,
       List<String> sharedOptions,
+      List<String> dartOptions,
       List<String> dart2jsOptions,
       List<String> ddcOptions,
       List<String> args) {
@@ -156,6 +158,7 @@
       TestInformation info,
       List<String> vmOptions,
       List<String> sharedOptions,
+      List<String> dartOptions,
       List<String> originalArguments,
       CommandArtifact artifact) {
     return [artifact.filename];
@@ -174,24 +177,14 @@
       TestInformation info,
       List<String> vmOptions,
       List<String> sharedOptions,
+      List<String> dartOptions,
       List<String> originalArguments,
       CommandArtifact artifact) {
     var args = <String>[];
-    if (previewDart2) {
-      if (_isDebug) {
-        // Temporarily disable background compilation to avoid flaky crashes
-        // (see http://dartbug.com/30016 for details).
-        args.add('--no-background-compilation');
-      }
-      if (_isChecked) {
-        args.add('--enable_asserts');
-      }
-    } else {
-      args.add('--no-preview-dart-2');
-      if (_isChecked) {
-        args.add('--enable_asserts');
-        args.add('--enable_type_checks');
-      }
+    if (_isDebug) {
+      // Temporarily disable background compilation to avoid flaky crashes
+      // (see http://dartbug.com/30016 for details).
+      args.add('--no-background-compilation');
     }
     if (_useEnableAsserts) {
       args.add('--enable_asserts');
@@ -205,7 +198,8 @@
       ..addAll(vmOptions)
       ..addAll(sharedOptions)
       ..addAll(_configuration.sharedOptions)
-      ..addAll(originalArguments);
+      ..addAll(originalArguments)
+      ..addAll(dartOptions);
   }
 }
 
@@ -242,6 +236,7 @@
   List<String> computeCompilerArguments(
       List<String> vmOptions,
       List<String> sharedOptions,
+      List<String> dartOptions,
       List<String> dart2jsOptions,
       List<String> ddcOptions,
       List<String> args) {
@@ -256,10 +251,11 @@
       TestInformation info,
       List<String> vmOptions,
       List<String> sharedOptions,
+      List<String> dartOptions,
       List<String> originalArguments,
       CommandArtifact artifact) {
     var args = <String>[];
-    if (_isChecked || _useEnableAsserts) {
+    if (_useEnableAsserts) {
       args.add('--enable_asserts');
     }
     if (_configuration.hotReload) {
@@ -267,11 +263,18 @@
     } else if (_configuration.hotReloadRollback) {
       args.add('--hot-reload-rollback-test-mode');
     }
+    var filename = artifact.filename;
+    if (runtimeConfiguration is DartkAdbRuntimeConfiguration) {
+      // On Android the Dill file will be pushed to a different directory on the
+      // device. Use that one instead.
+      filename = "${DartkAdbRuntimeConfiguration.DeviceTestDir}/out.dill";
+    }
     return args
       ..addAll(vmOptions)
       ..addAll(sharedOptions)
       ..addAll(_configuration.sharedOptions)
-      ..addAll(_replaceDartFiles(originalArguments, artifact.filename));
+      ..addAll(_replaceDartFiles(originalArguments, filename))
+      ..addAll(dartOptions);
   }
 }
 
@@ -355,7 +358,12 @@
   }
 
   List<String> computeCompilerArguments(
-      vmOptions, sharedOptions, dart2jsOptions, ddcOptions, args) {
+      List<String> vmOptions,
+      List<String> sharedOptions,
+      List<String> dartOptions,
+      List<String> dart2jsOptions,
+      List<String> ddcOptions,
+      List<String> args) {
     // The result will be passed as an input to [extractArguments]
     // (i.e. the arguments to the [PipelineCommand]).
     return <String>[]
@@ -370,6 +378,7 @@
       TestInformation info,
       List<String> vmOptions,
       List<String> sharedOptions,
+      List<String> dartOptions,
       List<String> originalArguments,
       CommandArtifact artifact) {
     CompilerConfiguration lastCompilerConfiguration =
@@ -379,6 +388,7 @@
         info,
         vmOptions,
         sharedOptions,
+        dartOptions,
         originalArguments,
         artifact);
   }
@@ -454,6 +464,7 @@
   List<String> computeCompilerArguments(
       List<String> vmOptions,
       List<String> sharedOptions,
+      List<String> dartOptions,
       List<String> dart2jsOptions,
       List<String> ddcOptions,
       List<String> args) {
@@ -479,6 +490,7 @@
       TestInformation info,
       List<String> vmOptions,
       List<String> sharedOptions,
+      List<String> dartOptions,
       List<String> originalArguments,
       CommandArtifact artifact) {
     Uri sdk = _useSdk
@@ -505,6 +517,7 @@
   List<String> computeCompilerArguments(
       List<String> vmOptions,
       List<String> sharedOptions,
+      List<String> dartOptions,
       List<String> dart2jsOptions,
       List<String> ddcOptions,
       List<String> args) {
@@ -621,7 +634,7 @@
   int get timeoutMultiplier {
     var multiplier = 2;
     if (_isDebug) multiplier *= 4;
-    if (_isChecked) multiplier *= 2;
+    if (_useEnableAsserts) multiplier *= 2;
     return multiplier;
   }
 
@@ -629,15 +642,13 @@
       List<String> arguments, Map<String, String> environmentOverrides) {
     var commands = <Command>[];
 
-    if (previewDart2) {
-      commands.add(computeCompileToKernelCommand(
-          tempDir, arguments, environmentOverrides));
-    }
+    commands.add(computeCompileToKernelCommand(
+        tempDir, arguments, environmentOverrides));
 
     commands.add(
         computeDartBootstrapCommand(tempDir, arguments, environmentOverrides));
 
-    if (previewDart2 && !_configuration.keepGeneratedFiles) {
+    if (!_configuration.keepGeneratedFiles) {
       commands.add(computeRemoveKernelFileCommand(
           tempDir, arguments, environmentOverrides));
     }
@@ -709,12 +720,7 @@
       args.add('--obfuscate');
     }
 
-    if (previewDart2) {
-      args.addAll(_replaceDartFiles(arguments, tempKernelFile(tempDir)));
-    } else {
-      args.add('--no-preview-dart-2');
-      args.addAll(arguments);
-    }
+    args.addAll(_replaceDartFiles(arguments, tempKernelFile(tempDir)));
 
     return Command.compilation('precompiler', tempDir, bootstrapDependencies(),
         exec, args, environmentOverrides,
@@ -812,13 +818,13 @@
   List<String> computeCompilerArguments(
       List<String> vmOptions,
       List<String> sharedOptions,
+      List<String> dartOptions,
       List<String> dart2jsOptions,
       List<String> ddcOptions,
       List<String> originalArguments) {
     List<String> args = [];
-    if (_isChecked) {
+    if (_useEnableAsserts) {
       args.add('--enable_asserts');
-      args.add('--enable_type_checks');
     }
     return args
       ..addAll(filterVmOptions(vmOptions))
@@ -832,20 +838,10 @@
       TestInformation info,
       List<String> vmOptions,
       List<String> sharedOptions,
+      List<String> dartOptions,
       List<String> originalArguments,
       CommandArtifact artifact) {
     var args = <String>[];
-    if (previewDart2) {
-      if (_isChecked) {
-        args.add('--enable_asserts');
-      }
-    } else {
-      args.add('--no-preview-dart-2');
-      if (_isChecked) {
-        args.add('--enable_asserts');
-        args.add('--enable_type_checks');
-      }
-    }
     if (_useEnableAsserts) {
       args.add('--enable_asserts');
     }
@@ -862,7 +858,8 @@
       ..addAll(vmOptions)
       ..addAll(sharedOptions)
       ..addAll(_configuration.sharedOptions)
-      ..addAll(originalArguments);
+      ..addAll(originalArguments)
+      ..addAll(dartOptions);
   }
 }
 
@@ -876,7 +873,7 @@
   int get timeoutMultiplier {
     var multiplier = 1;
     if (_isDebug) multiplier *= 2;
-    if (_isChecked) multiplier *= 2;
+    if (_useEnableAsserts) multiplier *= 2;
     return multiplier;
   }
 
@@ -894,9 +891,6 @@
     var exec = "${_configuration.buildDirectory}/dart";
     var snapshot = "$tempDir/out.jitsnapshot";
     var args = ["--snapshot=$snapshot", "--snapshot-kind=app-jit"];
-    if (!previewDart2) {
-      args.add("--no-preview-dart-2");
-    }
     args.addAll(arguments);
 
     return Command.compilation('app_jit', tempDir, bootstrapDependencies(),
@@ -905,17 +899,22 @@
   }
 
   List<String> computeCompilerArguments(
-      vmOptions, sharedOptions, dart2jsOptions, ddcOptions, originalArguments) {
+      List<String> vmOptions,
+      List<String> sharedOptions,
+      List<String> dartOptions,
+      List<String> dart2jsOptions,
+      List<String> ddcOptions,
+      List<String> originalArguments) {
     var args = <String>[];
-    if (_isChecked) {
+    if (_useEnableAsserts) {
       args.add('--enable_asserts');
-      args.add('--enable_type_checks');
     }
     return args
       ..addAll(vmOptions)
       ..addAll(sharedOptions)
       ..addAll(_configuration.sharedOptions)
-      ..addAll(originalArguments);
+      ..addAll(originalArguments)
+      ..addAll(dartOptions);
   }
 
   List<String> computeRuntimeArguments(
@@ -923,29 +922,19 @@
       TestInformation info,
       List<String> vmOptions,
       List<String> sharedOptions,
+      List<String> dartOptions,
       List<String> originalArguments,
       CommandArtifact artifact) {
     var args = <String>[];
-    if (previewDart2) {
-      if (_isChecked) {
-        args.add('--enable_asserts');
-      }
-    } else {
-      args.add("--no-preview-dart-2");
-      if (_isChecked) {
-        args.add('--enable_asserts');
-        args.add('--enable_type_checks');
-      }
-    }
     if (_useEnableAsserts) {
       args.add('--enable_asserts');
     }
-    args
+    return args
       ..addAll(vmOptions)
       ..addAll(sharedOptions)
       ..addAll(_configuration.sharedOptions)
-      ..addAll(_replaceDartFiles(originalArguments, artifact.filename));
-    return args;
+      ..addAll(_replaceDartFiles(originalArguments, artifact.filename))
+      ..addAll(dartOptions);
   }
 }
 
@@ -998,6 +987,7 @@
       TestInformation info,
       List<String> vmOptions,
       List<String> sharedOptions,
+      List<String> dartOptions,
       List<String> originalArguments,
       CommandArtifact artifact) {
     return <String>[];
@@ -1038,6 +1028,7 @@
       TestInformation info,
       List<String> vmOptions,
       List<String> sharedOptions,
+      List<String> dartOptions,
       List<String> originalArguments,
       CommandArtifact artifact) {
     return <String>[];
@@ -1066,6 +1057,7 @@
       TestInformation info,
       List<String> vmOptions,
       List<String> sharedOptions,
+      List<String> dartOptions,
       List<String> originalArguments,
       CommandArtifact artifact) {
     return <String>[];
@@ -1082,8 +1074,6 @@
 
   bool get _isAot;
 
-  bool get _isChecked;
-
   bool get _useEnableAsserts;
 
   String get executableScriptSuffix;
@@ -1124,7 +1114,7 @@
         !arguments.any((String arg) => noCausalAsyncStacksRegExp.hasMatch(arg));
     args.add('-Ddart.developer.causal_async_stacks=$causalAsyncStacks');
 
-    if (_isChecked || _useEnableAsserts) {
+    if (_useEnableAsserts) {
       args.add('--enable_asserts');
     }
 
@@ -1215,6 +1205,7 @@
   List<String> computeCompilerArguments(
       List<String> vmOptions,
       List<String> sharedOptions,
+      List<String> dartOptions,
       List<String> dart2jsOptions,
       List<String> ddcOptions,
       List<String> args) {
@@ -1239,6 +1230,7 @@
       TestInformation info,
       List<String> vmOptions,
       List<String> sharedOptions,
+      List<String> dartOptions,
       List<String> originalArguments,
       CommandArtifact artifact) {
     if (runtimeConfiguration is! NoneRuntimeConfiguration) {
diff --git a/tools/testing/dart/configuration.dart b/tools/testing/dart/configuration.dart
index 59399f3a..85a0433 100644
--- a/tools/testing/dart/configuration.dart
+++ b/tools/testing/dart/configuration.dart
@@ -234,7 +234,6 @@
     }
 
     var args = ['--test-mode'];
-    if (isChecked) args.add('--enable-checked-mode');
 
     if (isMinified) args.add("--minify");
     if (isCsp) args.add("--csp");
diff --git a/tools/testing/dart/options.dart b/tools/testing/dart/options.dart
index cafab24..67f5b27 100644
--- a/tools/testing/dart/options.dart
+++ b/tools/testing/dart/options.dart
@@ -25,7 +25,8 @@
   'analyze_library',
   'service',
   'kernel',
-  'observatory_ui'
+  'observatory_ui',
+  'ffi'
 ];
 
 /// Specifies a single command line option.
@@ -150,7 +151,6 @@
 test options, specifying how tests should be run.''',
         abbr: 'n',
         hide: true),
-    new _Option.bool('checked', 'Run tests in checked mode.'),
     new _Option.bool('strong', 'Deprecated, no-op.', hide: true),
     // TODO(sigmund): rename flag once we migrate all dart2js bots to the test
     // matrix.
@@ -690,7 +690,6 @@
                     useSdk: data["use_sdk"] as bool,
                     useHotReload: data["hot_reload"] as bool,
                     useHotReloadRollback: data["hot_reload_rollback"] as bool,
-                    isChecked: data["checked"] as bool,
                     isHostChecked: data["host_checked"] as bool,
                     isCsp: data["csp"] as bool,
                     isMinified: data["minified"] as bool,
@@ -755,11 +754,6 @@
         }
       }
     }
-
-    if (result.length > 1 && data["named_configuration"] != null) {
-      _fail("Named configuration cannot be used with multiple values for "
-          "arch, compiler, mode, or runtime");
-    }
     return result;
   }
 
diff --git a/tools/testing/dart/runtime_configuration.dart b/tools/testing/dart/runtime_configuration.dart
index af21399..c523839 100644
--- a/tools/testing/dart/runtime_configuration.dart
+++ b/tools/testing/dart/runtime_configuration.dart
@@ -42,6 +42,9 @@
         return new NoneRuntimeConfiguration();
 
       case Runtime.vm:
+        if (configuration.system == System.android) {
+          return new DartkAdbRuntimeConfiguration();
+        }
         return new StandaloneDartRuntimeConfiguration();
 
       case Runtime.dartPrecompiled:
@@ -79,6 +82,7 @@
       CommandArtifact artifact,
       List<String> arguments,
       Map<String, String> environmentOverrides,
+      List<String> extraLibs,
       bool isCrashExpected) {
     // TODO(ahe): Make this method abstract.
     throw "Unimplemented runtime '$runtimeType'";
@@ -98,6 +102,7 @@
       CommandArtifact artifact,
       List<String> arguments,
       Map<String, String> environmentOverrides,
+      List<String> extraLibs,
       bool isCrashExpected) {
     return <Command>[];
   }
@@ -125,6 +130,7 @@
       CommandArtifact artifact,
       List<String> arguments,
       Map<String, String> environmentOverrides,
+      List<String> extraLibs,
       bool isCrashExpected) {
     // TODO(ahe): Avoid duplication of this method between d8 and jsshell.
     checkArtifact(artifact);
@@ -148,6 +154,7 @@
       CommandArtifact artifact,
       List<String> arguments,
       Map<String, String> environmentOverrides,
+      List<String> extraLibs,
       bool isCrashExpected) {
     checkArtifact(artifact);
     return [
@@ -207,6 +214,7 @@
       CommandArtifact artifact,
       List<String> arguments,
       Map<String, String> environmentOverrides,
+      List<String> extraLibs,
       bool isCrashExpected) {
     String script = artifact.filename;
     String type = artifact.mimeType;
@@ -237,6 +245,7 @@
       CommandArtifact artifact,
       List<String> arguments,
       Map<String, String> environmentOverrides,
+      List<String> extraLibs,
       bool isCrashExpected) {
     String script = artifact.filename;
     String type = artifact.mimeType;
@@ -251,6 +260,31 @@
   }
 }
 
+class DartkAdbRuntimeConfiguration extends DartVmRuntimeConfiguration {
+  static const String DeviceDir = '/data/local/tmp/testing';
+  static const String DeviceTestDir = '/data/local/tmp/testing/test';
+
+  List<Command> computeRuntimeCommands(
+      TestSuite suite,
+      CommandArtifact artifact,
+      List<String> arguments,
+      Map<String, String> environmentOverrides,
+      List<String> extraLibs,
+      bool isCrashExpected) {
+    final String script = artifact.filename;
+    final String type = artifact.mimeType;
+    if (script != null && type != 'application/kernel-ir-fully-linked') {
+      throw "dart cannot run files of type '$type'.";
+    }
+
+    final String buildPath = suite.buildDir;
+    final String processTest = suite.processTestBinaryFileName;
+    return [
+      Command.adbDartk(buildPath, processTest, script, arguments, extraLibs)
+    ];
+  }
+}
+
 class DartPrecompiledAdbRuntimeConfiguration
     extends DartVmRuntimeConfiguration {
   static const String DeviceDir = '/data/local/tmp/precompilation-testing';
@@ -265,6 +299,7 @@
       CommandArtifact artifact,
       List<String> arguments,
       Map<String, String> environmentOverrides,
+      List<String> extraLibs,
       bool isCrashExpected) {
     String script = artifact.filename;
     String type = artifact.mimeType;
@@ -302,6 +337,7 @@
       CommandArtifact artifact,
       List<String> arguments,
       Map<String, String> environmentOverrides,
+      List<String> extraLibs,
       bool isCrashExpected) {
     String executable = suite.dartVmBinaryFileName;
     return selfCheckers
@@ -324,6 +360,7 @@
       CommandArtifact artifact,
       List<String> arguments,
       Map<String, String> environmentOverrides,
+      List<String> extraLibs,
       bool isCrashExpected) {
     throw "Unimplemented runtime '$runtimeType'";
   }
diff --git a/tools/testing/dart/test_configurations.dart b/tools/testing/dart/test_configurations.dart
index d20f969..32b9559 100644
--- a/tools/testing/dart/test_configurations.dart
+++ b/tools/testing/dart/test_configurations.dart
@@ -41,6 +41,7 @@
   new Path('tests/lib_2'),
   new Path('tests/standalone'),
   new Path('tests/standalone_2'),
+  new Path('tests/ffi'),
   new Path('utils/tests/peg'),
 ];
 
@@ -235,8 +236,7 @@
   // make a pool of all available adb devices.
   AdbDevicePool adbDevicePool;
   var needsAdbDevicePool = configurations.any((conf) {
-    return conf.runtime == Runtime.dartPrecompiled &&
-        conf.system == System.android;
+    return conf.system == System.android;
   });
   if (needsAdbDevicePool) {
     adbDevicePool = await AdbDevicePool.create();
diff --git a/tools/testing/dart/test_runner.dart b/tools/testing/dart/test_runner.dart
index 1b1d03a..6deb34a 100644
--- a/tools/testing/dart/test_runner.dart
+++ b/tools/testing/dart/test_runner.dart
@@ -1217,13 +1217,20 @@
           .runCommand(command.displayName, command, timeout, command.arguments);
     } else if (command is ScriptCommand) {
       return command.run();
-    } else if (command is AdbPrecompilationCommand) {
+    } else if (command is AdbPrecompilationCommand ||
+        command is AdbDartkCommand) {
       assert(adbDevicePool != null);
-      return adbDevicePool.acquireDevice().then((AdbDevice device) {
-        return _runAdbPrecompilationCommand(device, command, timeout)
-            .whenComplete(() {
-          adbDevicePool.releaseDevice(device);
-        });
+      return adbDevicePool.acquireDevice().then((AdbDevice device) async {
+        try {
+          if (command is AdbPrecompilationCommand) {
+            return await _runAdbPrecompilationCommand(device, command, timeout);
+          } else {
+            return await _runAdbDartkCommand(
+                device, command as AdbDartkCommand, timeout);
+          }
+        } finally {
+          await adbDevicePool.releaseDevice(device);
+        }
       });
     } else if (command is VmBatchCommand) {
       var name = command.displayName;
@@ -1313,6 +1320,70 @@
         utf8.encode('$writer'), [], stopwatch.elapsed, false);
   }
 
+  Future<CommandOutput> _runAdbDartkCommand(
+      AdbDevice device, AdbDartkCommand command, int timeout) async {
+    final String buildPath = command.buildPath;
+    final String processTest = command.processTestFilename;
+    final String hostKernelFile = command.kernelFile;
+    final List<String> arguments = command.arguments;
+    final String devicedir = DartkAdbRuntimeConfiguration.DeviceDir;
+    final String deviceTestDir = DartkAdbRuntimeConfiguration.DeviceTestDir;
+
+    final timeoutDuration = new Duration(seconds: timeout);
+
+    final steps = <StepFunction>[];
+
+    steps.add(() => device.runAdbShellCommand(['rm', '-Rf', deviceTestDir]));
+    steps.add(() => device.runAdbShellCommand(['mkdir', '-p', deviceTestDir]));
+    steps.add(
+        () => device.pushCachedData("${buildPath}/dart", '$devicedir/dart'));
+    steps.add(() => device
+        .runAdbCommand(['push', hostKernelFile, '$deviceTestDir/out.dill']));
+
+    for (final String lib in command.extraLibraries) {
+      final String libname = "lib${lib}.so";
+      steps.add(() => device.runAdbCommand(
+          ['push', '${buildPath}/$libname', '$deviceTestDir/$libname']));
+    }
+
+    steps.add(() => device.runAdbShellCommand(
+        [
+          'export LD_LIBRARY_PATH=\$LD_LIBRARY_PATH:$deviceTestDir;'
+              '$devicedir/dart',
+        ]..addAll(arguments),
+        timeout: timeoutDuration));
+
+    final stopwatch = new Stopwatch()..start();
+    final writer = new StringBuffer();
+
+    await device.waitForBootCompleted();
+    await device.waitForDevice();
+
+    AdbCommandResult result;
+    for (var i = 0; i < steps.length; i++) {
+      var step = steps[i];
+      var commandStopwatch = new Stopwatch()..start();
+      result = await step();
+
+      writer.writeln("Executing ${result.command}");
+      if (result.stdout.length > 0) {
+        writer.writeln("Stdout:\n${result.stdout.trim()}");
+      }
+      if (result.stderr.length > 0) {
+        writer.writeln("Stderr:\n${result.stderr.trim()}");
+      }
+      writer.writeln("ExitCode: ${result.exitCode}");
+      writer.writeln("Time: ${commandStopwatch.elapsed}");
+      writer.writeln("");
+
+      // If one command fails, we stop processing the others and return
+      // immediately.
+      if (result.exitCode != 0) break;
+    }
+    return createCommandOutput(command, result.exitCode, result.timedOut,
+        utf8.encode('$writer'), [], stopwatch.elapsed, false);
+  }
+
   BatchRunnerProcess _getBatchRunner(String identifier) {
     // Start batch processes if needed
     var runners = _batchProcesses[identifier];
diff --git a/tools/testing/dart/test_suite.dart b/tools/testing/dart/test_suite.dart
index 2bf1708..db2ceb1 100644
--- a/tools/testing/dart/test_suite.dart
+++ b/tools/testing/dart/test_suite.dart
@@ -565,10 +565,14 @@
           _testListPossibleFilenames
               .add(suiteDir.append('$s.dart').toNativePath());
           // If the test is a multitest, the filename doesn't include the label.
-          if (s.lastIndexOf('/') != -1) {
-            s = s.substring(0, s.lastIndexOf('/'));
-            _testListPossibleFilenames
-                .add(suiteDir.append('$s.dart').toNativePath());
+          // Also if it has multiple VMOptions.  If both, remove two labels.
+          for (var i in [1, 2]) {
+            // Twice
+            if (s.lastIndexOf('/') != -1) {
+              s = s.substring(0, s.lastIndexOf('/'));
+              _testListPossibleFilenames
+                  .add(suiteDir.append('$s.dart').toNativePath());
+            }
           }
         }
       }
@@ -804,7 +808,11 @@
       var isCrashExpected = expectations.contains(Expectation.crash);
       var commands = makeCommands(info, vmOptionsVariant, allVmOptions,
           commonArguments, isCrashExpected);
-      enqueueNewTestCase(testName, commands, expectations, info);
+      var variantTestName = testName;
+      if (vmOptionsList.length > 1) {
+        variantTestName = "$testName/$vmOptionsVariant";
+      }
+      enqueueNewTestCase(variantTestName, commands, expectations, info);
     }
   }
 
@@ -813,14 +821,23 @@
     var commands = <Command>[];
     var compilerConfiguration = configuration.compilerConfiguration;
     var sharedOptions = info.optionsFromFile['sharedOptions'] as List<String>;
+    var dartOptions = info.optionsFromFile['dartOptions'] as List<String>;
     var dart2jsOptions = info.optionsFromFile['dart2jsOptions'] as List<String>;
     var ddcOptions = info.optionsFromFile['ddcOptions'] as List<String>;
 
+    var isMultitest = info.optionsFromFile["isMultitest"] as bool;
+    assert(!isMultitest || dartOptions.isEmpty);
+
     var compileTimeArguments = <String>[];
     String tempDir;
     if (compilerConfiguration.hasCompiler) {
       compileTimeArguments = compilerConfiguration.computeCompilerArguments(
-          vmOptions, sharedOptions, dart2jsOptions, ddcOptions, args);
+          vmOptions,
+          sharedOptions,
+          dartOptions,
+          dart2jsOptions,
+          ddcOptions,
+          args);
       // Avoid doing this for analyzer.
       var path = info.filePath;
       if (vmOptionsVariant != 0) {
@@ -860,6 +877,7 @@
             info,
             vmOptions,
             sharedOptions,
+            dartOptions,
             args,
             compilationArtifact);
 
@@ -870,8 +888,13 @@
     }
 
     return commands
-      ..addAll(configuration.runtimeConfiguration.computeRuntimeCommands(this,
-          compilationArtifact, runtimeArguments, environment, isCrashExpected));
+      ..addAll(configuration.runtimeConfiguration.computeRuntimeCommands(
+          this,
+          compilationArtifact,
+          runtimeArguments,
+          environment,
+          info.optionsFromFile["sharedObjects"] as List<String>,
+          isCrashExpected));
   }
 
   CreateTest makeTestCaseCreator(Map<String, dynamic> optionsFromFile) {
@@ -1126,18 +1149,7 @@
       }
     }
 
-    var isMultitest = optionsFromFile["isMultitest"] as bool;
-    var dartOptions = optionsFromFile["dartOptions"] as List<String>;
-
-    assert(!isMultitest || dartOptions == null);
     args.add(filePath.toNativePath());
-    if (dartOptions != null) {
-      // TODO(ahe): Because we add [dartOptions] here,
-      // [CompilerConfiguration.computeCompilerArguments] has to discard them
-      // later. Perhaps it would be simpler to pass [dartOptions] to
-      // [CompilerConfiguration.computeRuntimeArguments].
-      args.addAll(dartOptions);
-    }
 
     return args;
   }
@@ -1198,6 +1210,11 @@
    *   .html instead of .dart exists, the test was intended to be a web test
    *   and no wrapping is necessary.
    *
+   *     // SharedObjects=foobar
+   *
+   *   - This test requires libfoobar.so, libfoobar.dylib or foobar.dll to be
+   *   in the system linker path of the VM.
+   *
    *   - 'test.dart' assumes tests fail if
    *   the process returns a non-zero exit code (in the case of web tests, we
    *   check for PASS/FAIL indications in the test output).
@@ -1213,6 +1230,7 @@
     RegExp environmentRegExp = new RegExp(r"// Environment=(.*)");
     RegExp otherScriptsRegExp = new RegExp(r"// OtherScripts=(.*)");
     RegExp otherResourcesRegExp = new RegExp(r"// OtherResources=(.*)");
+    RegExp sharedObjectsRegExp = new RegExp(r"// SharedObjects=(.*)");
     RegExp packageRootRegExp = new RegExp(r"// PackageRoot=(.*)");
     RegExp packagesRegExp = new RegExp(r"// Packages=(.*)");
     RegExp isolateStubsRegExp = new RegExp(r"// IsolateStubs=(.*)");
@@ -1315,6 +1333,12 @@
       otherResources.addAll(wordSplit(match[1]));
     }
 
+    var sharedObjects = <String>[];
+    matches = sharedObjectsRegExp.allMatches(contents);
+    for (var match in matches) {
+      sharedObjects.addAll(wordSplit(match[1]));
+    }
+
     var isMultitest = multiTestRegExp.hasMatch(contents);
     var isMultiHtmlTest = multiHtmlTestRegExp.hasMatch(contents);
     var isolateMatch = isolateStubsRegExp.firstMatch(contents);
@@ -1362,7 +1386,7 @@
       "sharedOptions": sharedOptions ?? <String>[],
       "dart2jsOptions": dart2jsOptions ?? <String>[],
       "ddcOptions": ddcOptions ?? <String>[],
-      "dartOptions": dartOptions,
+      "dartOptions": dartOptions ?? <String>[],
       "environment": environment,
       "packageRoot": packageRoot,
       "packages": packages,
@@ -1372,6 +1396,7 @@
       "hasStaticWarning": hasStaticWarning,
       "otherScripts": otherScripts,
       "otherResources": otherResources,
+      "sharedObjects": sharedObjects,
       "isMultitest": isMultitest,
       "isMultiHtmlTest": isMultiHtmlTest,
       "subtestNames": subtestNames,
@@ -1385,7 +1410,7 @@
       "vmOptions": const [const <String>[]],
       "sharedOptions": const <String>[],
       "dart2jsOptions": const <String>[],
-      "dartOptions": null,
+      "dartOptions": const <String>[],
       "packageRoot": null,
       "packages": null,
       "hasSyntaxError": false,
diff --git a/tools/upload_abi_dills.sh b/tools/upload_abi_dills.sh
index 166acc1..dad280a 100755
--- a/tools/upload_abi_dills.sh
+++ b/tools/upload_abi_dills.sh
@@ -46,6 +46,7 @@
 mkdir abiversions
 cp "$sdk_dir/$2/vm_platform_strong.dill" "abiversions/vm_platform_strong.dill"
 cp "$sdk_dir/$2/gen/kernel_service.dill" "abiversions/kernel_service.dill"
+cp "$sdk_dir/$2/gen_kernel_bytecode.dill" "abiversions/gen_kernel_bytecode.dill"
 
 cipd create \
   -name dart/abiversions/$abi_version \
diff --git a/utils/bazel/kernel_worker.dart b/utils/bazel/kernel_worker.dart
index 86a2eb8..c97152e 100644
--- a/utils/bazel/kernel_worker.dart
+++ b/utils/bazel/kernel_worker.dart
@@ -32,8 +32,8 @@
     }
     await new KernelWorker().run();
   } else {
-    var succeeded = await computeKernel(args);
-    if (!succeeded) {
+    var result = await computeKernel(args);
+    if (!result.succeeded) {
       exitCode = 15;
     }
   }
@@ -41,13 +41,25 @@
 
 /// A bazel worker loop that can compute full or summary kernel files.
 class KernelWorker extends AsyncWorkerLoop {
+  fe.InitializedCompilerState previousState;
+
   Future<WorkResponse> performRequest(WorkRequest request) async {
     var outputBuffer = new StringBuffer();
     var response = new WorkResponse()..exitCode = 0;
     try {
-      var succeeded = await computeKernel(request.arguments,
-          isWorker: true, outputBuffer: outputBuffer);
-      if (!succeeded) {
+      fe.InitializedCompilerState previousStateToPass;
+      if (request.arguments.contains("--reuse-compiler-result")) {
+        previousStateToPass = previousState;
+      } else {
+        previousState = null;
+      }
+      var result = await computeKernel(request.arguments,
+          isWorker: true,
+          outputBuffer: outputBuffer,
+          inputs: request.inputs,
+          previousState: previousStateToPass);
+      previousState = result.previousState;
+      if (!result.succeeded) {
         response.exitCode = 15;
       }
     } catch (e, s) {
@@ -105,7 +117,16 @@
   ..addOption('libraries-file')
   ..addOption('packages-file')
   ..addMultiOption('source')
-  ..addOption('output');
+  ..addOption('output')
+  ..addFlag('reuse-compiler-result', defaultsTo: false)
+  ..addFlag('use-incremental-compiler', defaultsTo: false);
+
+class ComputeKernelResult {
+  final bool succeeded;
+  final fe.InitializedCompilerState previousState;
+
+  ComputeKernelResult(this.succeeded, this.previousState);
+}
 
 /// Computes a kernel file based on [args].
 ///
@@ -115,8 +136,11 @@
 /// instead of printed to the console.
 ///
 /// Returns whether or not the summary was successfully output.
-Future<bool> computeKernel(List<String> args,
-    {bool isWorker: false, StringBuffer outputBuffer}) async {
+Future<ComputeKernelResult> computeKernel(List<String> args,
+    {bool isWorker: false,
+    StringBuffer outputBuffer,
+    Iterable<Input> inputs,
+    fe.InitializedCompilerState previousState}) async {
   dynamic out = outputBuffer ?? stderr;
   bool succeeded = true;
   var parsedArgs = summaryArgsParser.parse(args);
@@ -124,7 +148,7 @@
   if (parsedArgs['help']) {
     out.writeln(summaryArgsParser.usage);
     if (!isWorker) exit(0);
-    return false;
+    return new ComputeKernelResult(false, previousState);
   }
 
   // Bazel creates an overlay file system where some files may be located in the
@@ -177,28 +201,75 @@
   var librariesSpec = parsedArgs['libraries-file'] == null
       ? null
       : Uri.base.resolve(parsedArgs['libraries-file']);
-  var state = await fe.initializeCompiler(
-      // TODO(sigmund): pass an old state once we can make use of it.
-      null,
-      Uri.base.resolve(parsedArgs['dart-sdk-summary']),
-      librariesSpec,
-      Uri.base.resolve(parsedArgs['packages-file']),
-      (parsedArgs['input-summary'] as List<String>)
-          .map(Uri.base.resolve)
-          .toList(),
-      (parsedArgs['input-linked'] as List<String>)
-          .map(Uri.base.resolve)
-          .toList(),
-      target,
-      fileSystem);
+
+  List<Uri> linkedInputs = (parsedArgs['input-linked'] as List<String>)
+      .map(Uri.base.resolve)
+      .toList();
+
+  List<Uri> summaryInputs = (parsedArgs['input-summary'] as List<String>)
+      .map(Uri.base.resolve)
+      .toList();
+
+  fe.InitializedCompilerState state;
+  bool usingIncrementalCompiler = false;
+  if (parsedArgs['use-incremental-compiler'] && linkedInputs.isEmpty) {
+    usingIncrementalCompiler = true;
+
+    /// Build a map of uris to digests.
+    final inputDigests = <Uri, List<int>>{};
+    for (var input in inputs) {
+      var uri = Uri.parse(input.path);
+      if (uri.scheme.isEmpty) {
+        uri = Uri.parse('file://${input.path}');
+      }
+      inputDigests[uri] = input.digest;
+    }
+
+    state = await fe.initializeIncrementalCompiler(
+        previousState,
+        Uri.base.resolve(parsedArgs['dart-sdk-summary']),
+        Uri.base.resolve(parsedArgs['packages-file']),
+        librariesSpec,
+        summaryInputs,
+        inputDigests,
+        target,
+        fileSystem,
+        summaryOnly);
+  } else {
+    state = await fe.initializeCompiler(
+        // TODO(sigmund): pass an old state once we can make use of it.
+        null,
+        Uri.base.resolve(parsedArgs['dart-sdk-summary']),
+        librariesSpec,
+        Uri.base.resolve(parsedArgs['packages-file']),
+        summaryInputs,
+        linkedInputs,
+        target,
+        fileSystem);
+  }
 
   void onDiagnostic(fe.DiagnosticMessage message) {
     fe.printDiagnosticMessage(message, out.writeln);
     succeeded = false;
   }
 
-  var kernel =
-      await fe.compile(state, sources, onDiagnostic, summaryOnly: summaryOnly);
+  List<int> kernel;
+  if (usingIncrementalCompiler) {
+    state.options.onDiagnostic = onDiagnostic;
+    Component incrementalComponent = await state.incrementalCompiler
+        .computeDelta(entryPoints: sources, fullComponent: true);
+    if (summaryOnly) {
+      incrementalComponent.uriToSource.clear();
+      incrementalComponent.problemsAsJson = null;
+      incrementalComponent.mainMethod = null;
+      target.performOutlineTransformations(incrementalComponent);
+    }
+
+    kernel = fe.serializeComponent(incrementalComponent);
+  } else {
+    kernel = await fe.compile(state, sources, onDiagnostic,
+        summaryOnly: summaryOnly);
+  }
 
   if (kernel != null) {
     var outputFile = new File(parsedArgs['output']);
@@ -208,7 +279,7 @@
     assert(!succeeded);
   }
 
-  return succeeded;
+  return new ComputeKernelResult(succeeded, state);
 }
 
 /// Extends the DevCompilerTarget to transform outlines to meet the requirements
diff --git a/utils/kernel-service/BUILD.gn b/utils/kernel-service/BUILD.gn
index e20ade7..846640b 100644
--- a/utils/kernel-service/BUILD.gn
+++ b/utils/kernel-service/BUILD.gn
@@ -60,40 +60,51 @@
   output = "$root_out_dir/frontend_server.dart.snapshot"
 }
 
-prebuilt_dart_action("kernel_service_dill") {
-  deps = [
-    "../../runtime/vm:kernel_platform_files($dart_host_toolchain)",
-    "../../runtime/vm:vm_platform",
-  ]
-  kernel_service_script = "../../pkg/vm/bin/kernel_service.dart"
-  gen_kernel_script = "../../pkg/vm/bin/gen_kernel.dart"
+template("kernel_service_dill") {
+  prebuilt_dart_action("kernel_service" + target_name + "_dill") {
+    deps = [
+      "../../runtime/vm:kernel_platform_files($dart_host_toolchain)",
+      "../../runtime/vm:vm_platform",
+    ]
+    kernel_service_script = "../../pkg/vm/bin/kernel_service.dart"
+    gen_kernel_script = "../../pkg/vm/bin/gen_kernel.dart"
 
-  inputs = [
-    gen_kernel_script,
-    kernel_service_script,
-    "$root_out_dir/vm_platform_strong.dill",
-  ]
-  output = "$root_gen_dir/kernel_service.dill"
-  outputs = [
-    output,
-  ]
+    inputs = [
+      gen_kernel_script,
+      kernel_service_script,
+      "$root_out_dir/vm_platform_strong.dill",
+    ]
+    output = "$root_gen_dir/kernel_service" + invoker.target_name + ".dill"
+    outputs = [
+      output,
+    ]
 
-  depfile = "$root_gen_dir/kernel_service_dill.d"
-  abs_depfile = rebase_path(depfile)
-  rebased_output = rebase_path(output, root_build_dir)
-  vm_args = [
-    "--depfile=$abs_depfile",
-    "--depfile_output_filename=$rebased_output",
-  ]
+    depfile = "$root_gen_dir/kernel_service" + invoker.target_name + "_dill.d"
+    abs_depfile = rebase_path(depfile)
+    rebased_output = rebase_path(output, root_build_dir)
+    vm_args = [
+      "--depfile=$abs_depfile",
+      "--depfile_output_filename=$rebased_output",
+    ]
 
-  script = gen_kernel_script
+    script = gen_kernel_script
 
-  args = [
-    "--packages=" + rebase_path("../../.packages"),
-    "--platform=" + rebase_path("$root_out_dir/vm_platform_strong.dill"),
-    "--no-aot",
-    "--no-embed-sources",
-    "--output=" + rebase_path("$root_gen_dir/kernel_service.dill"),
-    rebase_path(kernel_service_script),
-  ]
+    args =
+        invoker.extra_args + [
+          "--packages=" + rebase_path("../../.packages"),
+          "--platform=" + rebase_path("$root_out_dir/vm_platform_strong.dill"),
+          "--no-aot",
+          "--no-embed-sources",
+          "--output=" + rebase_path(output),
+          rebase_path(kernel_service_script),
+        ]
+  }
+}
+
+kernel_service_dill("") {
+  extra_args = []
+}
+
+kernel_service_dill("_bytecode") {
+  extra_args = [ "--gen-bytecode" ]
 }