Version 2.3.3-dev.0.0

Merge commit 'a4f7bad12efd9c3a272e87cd95b6ef19036823ec' into dev
diff --git a/.packages b/.packages
index db0e7d7..37c475e 100644
--- a/.packages
+++ b/.packages
@@ -61,6 +61,7 @@
 mockito:third_party/pkg/mockito/lib
 modular_test:pkg/modular_test/lib
 mustache:third_party/pkg/mustache/lib
+nnbd_migration:pkg/nnbd_migration/lib
 oauth2:third_party/pkg/oauth2/lib
 observatory:runtime/observatory/lib
 observatory_test_package:runtime/observatory/tests/service/observatory_test_package
diff --git a/CHANGELOG.md b/CHANGELOG.md
index 4221276..448c196 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -1,6 +1,22 @@
+## 2.3.3-dev.0.0
+
+### Core libraries
+
+#### `dart:isolate`
+
+* `TransferableTypedData` class was added to facilitate faster cross-isolate
+communication of `Uint8List` data.
+
+#### Linter
+
+The Linter was updated to `0.1.91`, which includes the following changes:
+
+* fixed missed cases in `prefer_const_constructors`
+* fixed `prefer_initializing_formals` to no longer suggest API breaking changes
+* updated `omit_local_variable_types` to allow explicit `dynamic`s
+* (internal) migration from deprecated analyzer APIs
+
 ## 2.3.2-dev.0.1
-(Add new changes here, and they will be copied to the change section for the
- next dev version)
 
 ### Language
 
@@ -48,6 +64,17 @@
     interface, this is a breaking change, as implementing classes will need to
     implement the new getter.
 
+#### `dart:isolate`
+
+* **Breaking change**: `Isolate.resolvePackageUri` will always throw an
+  `UnsupportedError` when compiled with dart2js or DDC. This was the only
+  remaining API in `dart:isolate` that didn't automatically throw since we
+  dropped support for this library in [Dart 2.0.0][1]. Note that the API already
+  throws in dart2js if the API is used directly without setting up manually a
+  `defaultPackagesBase` hook.
+
+[1]: https://github.com/dart-lang/sdk/blob/master/CHANGELOG.md#200---2018-08-07
+
 ### Dart VM
 
 ### Tools
@@ -115,6 +142,37 @@
 * **Breaking change:** The `await for` allowed `null` as a stream due to a bug
   in `StreamIterator` class. This bug has now been fixed.
 
+## 2.3.2 - 2019-06-11
+
+This is a patch version release with a security improvement.
+
+### Security vulnerability
+
+*  **Security improvement:** On Linux and Android, starting a process with
+   `Process.run`, `Process.runSync`, or `Process.start` would first search the
+   current directory before searching `PATH` (Issue [37101][]). This behavior
+   effectively put the current working directory in the front of `PATH`, even if
+   it wasn't in the `PATH`. This release changes that behavior to only searching
+   the directories in the `PATH` environment variable. Operating systems other
+   than Linux and Android didn't have this behavior and aren't affected by this
+   vulnerability.
+
+   This vulnerability could result in execution of untrusted code if a command
+   without a slash in its name was run inside an untrusted directory containing
+   an executable file with that name:
+
+   ```dart
+   Process.run("ls", workingDirectory: "/untrusted/directory")
+   ```
+
+   This would attempt to run `/untrusted/directory/ls` if it existed, even
+   though it is not in the `PATH`. It was always safe to instead use an absolute
+   path or a path containing a slash.
+
+   This vulnerability was introduced in Dart 2.0.0.
+
+[37101]: https://github.com/dart-lang/sdk/issues/37101
+
 ## 2.3.1 - 2019-05-21
 
 This is a patch version release with bug fixes.
diff --git a/DEPS b/DEPS
index efa5353..81897b0 100644
--- a/DEPS
+++ b/DEPS
@@ -36,7 +36,7 @@
   "chromium_git": "https://chromium.googlesource.com",
   "fuchsia_git": "https://fuchsia.googlesource.com",
 
-  "co19_2_rev": "7bd9873fceb872aeb8c6ee69f14de7f7e7605e4e",
+  "co19_2_rev": "c4a8862775188ecb25991b815e2f1f700b19d0cc",
 
   # 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.
@@ -79,7 +79,7 @@
   #     and land the review.
   #
   # For more details, see https://github.com/dart-lang/sdk/issues/30164
-  "dart_style_tag": "1.2.7",  # Please see the note above before updating.
+  "dart_style_tag": "1.2.8",  # Please see the note above before updating.
 
   "dartdoc_tag" : "v0.28.2",
   "fixnum_tag": "0.10.9",
@@ -96,7 +96,7 @@
   "intl_tag": "0.15.7",
   "jinja2_rev": "2222b31554f03e62600cd7e383376a7c187967a1",
   "json_rpc_2_tag": "2.0.9",
-  "linter_tag": "0.1.90",
+  "linter_tag": "0.1.91",
   "logging_tag": "0.11.3+2",
   "markupsafe_rev": "8f45f5cfa0009d2a70589bcda0349b8cb2b72783",
   "markdown_tag": "2.0.3",
diff --git a/build/executable_suffix.gni b/build/executable_suffix.gni
index e2b0dd8..ca69d39 100644
--- a/build/executable_suffix.gni
+++ b/build/executable_suffix.gni
@@ -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.
 
-if (defined(is_win) && is_win) {
+if (host_os == "win") {
   executable_suffix = ".exe"
 } else {
   executable_suffix = ""
diff --git a/pkg/analysis_server/doc/api.html b/pkg/analysis_server/doc/api.html
index 9a5386a..2635ca1 100644
--- a/pkg/analysis_server/doc/api.html
+++ b/pkg/analysis_server/doc/api.html
@@ -109,7 +109,7 @@
 <body>
 <h1>Analysis Server API Specification</h1>
 <h1 style="color:#999999">Version
-  1.27.0
+  1.27.1
 </h1>
 <p>
   This document contains a specification of the API provided by the
@@ -3077,6 +3077,13 @@
         <p>
           The identifier to present to the user for code completion.
         </p>
+      </dd><dt class="field"><b>declaringLibraryUri: String</b></dt><dd>
+        
+        <p>
+          The URI of the library that declares the element being suggested,
+          not the URI of the library associated with the enclosing
+          <tt>AvailableSuggestionSet</tt>.
+        </p>
       </dd><dt class="field"><b>element: <a href="#type_Element">Element</a></b></dt><dd>
         
         <p>
diff --git a/pkg/analysis_server/lib/lsp_protocol/protocol_custom_generated.dart b/pkg/analysis_server/lib/lsp_protocol/protocol_custom_generated.dart
index bfa8c77..deb8901 100644
--- a/pkg/analysis_server/lib/lsp_protocol/protocol_custom_generated.dart
+++ b/pkg/analysis_server/lib/lsp_protocol/protocol_custom_generated.dart
@@ -10,11 +10,12 @@
 // ignore_for_file: deprecated_member_use_from_same_package
 // ignore_for_file: unnecessary_brace_in_string_interps
 // ignore_for_file: unused_import
+// ignore_for_file: unused_shown_name
 
 import 'dart:core' hide deprecated;
 import 'dart:core' as core show deprecated;
 import 'dart:convert' show JsonEncoder;
-
+import 'package:analysis_server/lsp_protocol/protocol_generated.dart';
 import 'package:analysis_server/lsp_protocol/protocol_special.dart';
 import 'package:analysis_server/src/protocol/protocol_internal.dart'
     show listEqual, mapEqual;
@@ -70,48 +71,117 @@
   String toString() => jsonEncoder.convert(toJson());
 }
 
+class ClosingLabel implements ToJsonable {
+  static const jsonHandler =
+      const LspJsonHandler(ClosingLabel.canParse, ClosingLabel.fromJson);
+
+  ClosingLabel(this.range, this.label) {
+    if (range == null) {
+      throw 'range is required but was not provided';
+    }
+    if (label == null) {
+      throw 'label is required but was not provided';
+    }
+  }
+  static ClosingLabel fromJson(Map<String, dynamic> json) {
+    final range = json['range'] != null ? Range.fromJson(json['range']) : null;
+    final label = json['label'];
+    return new ClosingLabel(range, label);
+  }
+
+  final String label;
+  final Range range;
+
+  Map<String, dynamic> toJson() {
+    Map<String, dynamic> __result = {};
+    __result['range'] = range ?? (throw 'range is required but was not set');
+    __result['label'] = label ?? (throw 'label is required but was not set');
+    return __result;
+  }
+
+  static bool canParse(Object obj) {
+    return obj is Map<String, dynamic> &&
+        obj.containsKey('range') &&
+        Range.canParse(obj['range']) &&
+        obj.containsKey('label') &&
+        obj['label'] is String;
+  }
+
+  @override
+  bool operator ==(other) {
+    if (other is ClosingLabel) {
+      return range == other.range && label == other.label && true;
+    }
+    return false;
+  }
+
+  @override
+  int get hashCode {
+    int hash = 0;
+    hash = JenkinsSmiHash.combine(hash, range.hashCode);
+    hash = JenkinsSmiHash.combine(hash, label.hashCode);
+    return JenkinsSmiHash.finish(hash);
+  }
+
+  @override
+  String toString() => jsonEncoder.convert(toJson());
+}
+
 class CompletionItemResolutionInfo implements ToJsonable {
   static const jsonHandler = const LspJsonHandler(
       CompletionItemResolutionInfo.canParse,
       CompletionItemResolutionInfo.fromJson);
 
-  CompletionItemResolutionInfo(
-      this.file, this.offset, this.libraryId, this.autoImportDisplayUri) {
+  CompletionItemResolutionInfo(this.file, this.offset, this.libId,
+      this.displayUri, this.rOffset, this.rLength) {
     if (file == null) {
       throw 'file is required but was not provided';
     }
     if (offset == null) {
       throw 'offset is required but was not provided';
     }
-    if (libraryId == null) {
-      throw 'libraryId is required but was not provided';
+    if (libId == null) {
+      throw 'libId is required but was not provided';
     }
-    if (autoImportDisplayUri == null) {
-      throw 'autoImportDisplayUri is required but was not provided';
+    if (displayUri == null) {
+      throw 'displayUri is required but was not provided';
+    }
+    if (rOffset == null) {
+      throw 'rOffset is required but was not provided';
+    }
+    if (rLength == null) {
+      throw 'rLength is required but was not provided';
     }
   }
   static CompletionItemResolutionInfo fromJson(Map<String, dynamic> json) {
     final file = json['file'];
     final offset = json['offset'];
-    final libraryId = json['libraryId'];
-    final autoImportDisplayUri = json['autoImportDisplayUri'];
+    final libId = json['libId'];
+    final displayUri = json['displayUri'];
+    final rOffset = json['rOffset'];
+    final rLength = json['rLength'];
     return new CompletionItemResolutionInfo(
-        file, offset, libraryId, autoImportDisplayUri);
+        file, offset, libId, displayUri, rOffset, rLength);
   }
 
-  final String autoImportDisplayUri;
+  final String displayUri;
   final String file;
-  final num libraryId;
+  final num libId;
   final num offset;
+  final num rLength;
+  final num rOffset;
 
   Map<String, dynamic> toJson() {
     Map<String, dynamic> __result = {};
     __result['file'] = file ?? (throw 'file is required but was not set');
     __result['offset'] = offset ?? (throw 'offset is required but was not set');
-    __result['libraryId'] =
-        libraryId ?? (throw 'libraryId is required but was not set');
-    __result['autoImportDisplayUri'] = autoImportDisplayUri ??
-        (throw 'autoImportDisplayUri is required but was not set');
+    __result['libId'] = libId ?? (throw 'libId is required but was not set');
+    __result['displayUri'] =
+        displayUri ?? (throw 'displayUri is required but was not set');
+    __result['rOffset'] =
+        rOffset ?? (throw 'rOffset is required but was not set');
+    __result['rLength'] =
+        rLength ?? (throw 'rLength is required but was not set');
     return __result;
   }
 
@@ -121,10 +191,14 @@
         obj['file'] is String &&
         obj.containsKey('offset') &&
         obj['offset'] is num &&
-        obj.containsKey('libraryId') &&
-        obj['libraryId'] is num &&
-        obj.containsKey('autoImportDisplayUri') &&
-        obj['autoImportDisplayUri'] is String;
+        obj.containsKey('libId') &&
+        obj['libId'] is num &&
+        obj.containsKey('displayUri') &&
+        obj['displayUri'] is String &&
+        obj.containsKey('rOffset') &&
+        obj['rOffset'] is num &&
+        obj.containsKey('rLength') &&
+        obj['rLength'] is num;
   }
 
   @override
@@ -132,8 +206,10 @@
     if (other is CompletionItemResolutionInfo) {
       return file == other.file &&
           offset == other.offset &&
-          libraryId == other.libraryId &&
-          autoImportDisplayUri == other.autoImportDisplayUri &&
+          libId == other.libId &&
+          displayUri == other.displayUri &&
+          rOffset == other.rOffset &&
+          rLength == other.rLength &&
           true;
     }
     return false;
@@ -144,8 +220,10 @@
     int hash = 0;
     hash = JenkinsSmiHash.combine(hash, file.hashCode);
     hash = JenkinsSmiHash.combine(hash, offset.hashCode);
-    hash = JenkinsSmiHash.combine(hash, libraryId.hashCode);
-    hash = JenkinsSmiHash.combine(hash, autoImportDisplayUri.hashCode);
+    hash = JenkinsSmiHash.combine(hash, libId.hashCode);
+    hash = JenkinsSmiHash.combine(hash, displayUri.hashCode);
+    hash = JenkinsSmiHash.combine(hash, rOffset.hashCode);
+    hash = JenkinsSmiHash.combine(hash, rLength.hashCode);
     return JenkinsSmiHash.finish(hash);
   }
 
@@ -199,3 +277,66 @@
   @override
   String toString() => jsonEncoder.convert(toJson());
 }
+
+class PublishClosingLabelsParams implements ToJsonable {
+  static const jsonHandler = const LspJsonHandler(
+      PublishClosingLabelsParams.canParse, PublishClosingLabelsParams.fromJson);
+
+  PublishClosingLabelsParams(this.uri, this.labels) {
+    if (uri == null) {
+      throw 'uri is required but was not provided';
+    }
+    if (labels == null) {
+      throw 'labels is required but was not provided';
+    }
+  }
+  static PublishClosingLabelsParams fromJson(Map<String, dynamic> json) {
+    final uri = json['uri'];
+    final labels = json['labels']
+        ?.map((item) => item != null ? ClosingLabel.fromJson(item) : null)
+        ?.cast<ClosingLabel>()
+        ?.toList();
+    return new PublishClosingLabelsParams(uri, labels);
+  }
+
+  final List<ClosingLabel> labels;
+  final String uri;
+
+  Map<String, dynamic> toJson() {
+    Map<String, dynamic> __result = {};
+    __result['uri'] = uri ?? (throw 'uri is required but was not set');
+    __result['labels'] = labels ?? (throw 'labels is required but was not set');
+    return __result;
+  }
+
+  static bool canParse(Object obj) {
+    return obj is Map<String, dynamic> &&
+        obj.containsKey('uri') &&
+        obj['uri'] is String &&
+        obj.containsKey('labels') &&
+        (obj['labels'] is List &&
+            (obj['labels'].every((item) => ClosingLabel.canParse(item))));
+  }
+
+  @override
+  bool operator ==(other) {
+    if (other is PublishClosingLabelsParams) {
+      return uri == other.uri &&
+          listEqual(labels, other.labels,
+              (ClosingLabel a, ClosingLabel b) => a == b) &&
+          true;
+    }
+    return false;
+  }
+
+  @override
+  int get hashCode {
+    int hash = 0;
+    hash = JenkinsSmiHash.combine(hash, uri.hashCode);
+    hash = JenkinsSmiHash.combine(hash, labels.hashCode);
+    return JenkinsSmiHash.finish(hash);
+  }
+
+  @override
+  String toString() => jsonEncoder.convert(toJson());
+}
diff --git a/pkg/analysis_server/lib/lsp_protocol/protocol_generated.dart b/pkg/analysis_server/lib/lsp_protocol/protocol_generated.dart
index de7720a2..af4a262 100644
--- a/pkg/analysis_server/lib/lsp_protocol/protocol_generated.dart
+++ b/pkg/analysis_server/lib/lsp_protocol/protocol_generated.dart
@@ -10,6 +10,7 @@
 // ignore_for_file: deprecated_member_use_from_same_package
 // ignore_for_file: unnecessary_brace_in_string_interps
 // ignore_for_file: unused_import
+// ignore_for_file: unused_shown_name
 
 import 'dart:core' hide deprecated;
 import 'dart:core' as core show deprecated;
diff --git a/pkg/analysis_server/lib/protocol/protocol_constants.dart b/pkg/analysis_server/lib/protocol/protocol_constants.dart
index b944f0f..2d93ddb 100644
--- a/pkg/analysis_server/lib/protocol/protocol_constants.dart
+++ b/pkg/analysis_server/lib/protocol/protocol_constants.dart
@@ -6,7 +6,7 @@
 // To regenerate the file, use the script
 // "pkg/analysis_server/tool/spec/generate_files".
 
-const String PROTOCOL_VERSION = '1.27.0';
+const String PROTOCOL_VERSION = '1.27.1';
 
 const String ANALYSIS_NOTIFICATION_ANALYZED_FILES = 'analysis.analyzedFiles';
 const String ANALYSIS_NOTIFICATION_ANALYZED_FILES_DIRECTORIES = 'directories';
@@ -218,6 +218,7 @@
 const String EDIT_REQUEST_ORGANIZE_DIRECTIVES_FILE = 'file';
 const String EDIT_REQUEST_SORT_MEMBERS = 'edit.sortMembers';
 const String EDIT_REQUEST_SORT_MEMBERS_FILE = 'file';
+const String EDIT_RESPONSE_DARTFIX_DETAILS = 'details';
 const String EDIT_RESPONSE_DARTFIX_EDITS = 'edits';
 const String EDIT_RESPONSE_DARTFIX_HAS_ERRORS = 'hasErrors';
 const String EDIT_RESPONSE_DARTFIX_OTHER_SUGGESTIONS = 'otherSuggestions';
diff --git a/pkg/analysis_server/lib/protocol/protocol_generated.dart b/pkg/analysis_server/lib/protocol/protocol_generated.dart
index fbaaf97..45a219f 100644
--- a/pkg/analysis_server/lib/protocol/protocol_generated.dart
+++ b/pkg/analysis_server/lib/protocol/protocol_generated.dart
@@ -5075,6 +5075,7 @@
  *
  * {
  *   "label": String
+ *   "declaringLibraryUri": String
  *   "element": Element
  *   "defaultArgumentListString": optional String
  *   "defaultArgumentListTextRanges": optional List<int>
@@ -5091,6 +5092,8 @@
 class AvailableSuggestion implements HasToJson {
   String _label;
 
+  String _declaringLibraryUri;
+
   Element _element;
 
   String _defaultArgumentListString;
@@ -5123,6 +5126,21 @@
   }
 
   /**
+   * The URI of the library that declares the element being suggested, not the
+   * URI of the library associated with the enclosing AvailableSuggestionSet.
+   */
+  String get declaringLibraryUri => _declaringLibraryUri;
+
+  /**
+   * The URI of the library that declares the element being suggested, not the
+   * URI of the library associated with the enclosing AvailableSuggestionSet.
+   */
+  void set declaringLibraryUri(String value) {
+    assert(value != null);
+    this._declaringLibraryUri = value;
+  }
+
+  /**
    * Information about the element reference being suggested.
    */
   Element get element => _element;
@@ -5255,7 +5273,7 @@
     this._requiredParameterCount = value;
   }
 
-  AvailableSuggestion(String label, Element element,
+  AvailableSuggestion(String label, String declaringLibraryUri, Element element,
       {String defaultArgumentListString,
       List<int> defaultArgumentListTextRanges,
       String docComplete,
@@ -5265,6 +5283,7 @@
       List<String> relevanceTags,
       int requiredParameterCount}) {
     this.label = label;
+    this.declaringLibraryUri = declaringLibraryUri;
     this.element = element;
     this.defaultArgumentListString = defaultArgumentListString;
     this.defaultArgumentListTextRanges = defaultArgumentListTextRanges;
@@ -5288,6 +5307,13 @@
       } else {
         throw jsonDecoder.mismatch(jsonPath, "label");
       }
+      String declaringLibraryUri;
+      if (json.containsKey("declaringLibraryUri")) {
+        declaringLibraryUri = jsonDecoder.decodeString(
+            jsonPath + ".declaringLibraryUri", json["declaringLibraryUri"]);
+      } else {
+        throw jsonDecoder.mismatch(jsonPath, "declaringLibraryUri");
+      }
       Element element;
       if (json.containsKey("element")) {
         element = new Element.fromJson(
@@ -5339,7 +5365,7 @@
             jsonPath + ".requiredParameterCount",
             json["requiredParameterCount"]);
       }
-      return new AvailableSuggestion(label, element,
+      return new AvailableSuggestion(label, declaringLibraryUri, element,
           defaultArgumentListString: defaultArgumentListString,
           defaultArgumentListTextRanges: defaultArgumentListTextRanges,
           docComplete: docComplete,
@@ -5357,6 +5383,7 @@
   Map<String, dynamic> toJson() {
     Map<String, dynamic> result = {};
     result["label"] = label;
+    result["declaringLibraryUri"] = declaringLibraryUri;
     result["element"] = element.toJson();
     if (defaultArgumentListString != null) {
       result["defaultArgumentListString"] = defaultArgumentListString;
@@ -5392,6 +5419,7 @@
   bool operator ==(other) {
     if (other is AvailableSuggestion) {
       return label == other.label &&
+          declaringLibraryUri == other.declaringLibraryUri &&
           element == other.element &&
           defaultArgumentListString == other.defaultArgumentListString &&
           listEqual(defaultArgumentListTextRanges,
@@ -5413,6 +5441,7 @@
   int get hashCode {
     int hash = 0;
     hash = JenkinsSmiHash.combine(hash, label.hashCode);
+    hash = JenkinsSmiHash.combine(hash, declaringLibraryUri.hashCode);
     hash = JenkinsSmiHash.combine(hash, element.hashCode);
     hash = JenkinsSmiHash.combine(hash, defaultArgumentListString.hashCode);
     hash = JenkinsSmiHash.combine(hash, defaultArgumentListTextRanges.hashCode);
@@ -8193,6 +8222,7 @@
  *   "otherSuggestions": List<DartFixSuggestion>
  *   "hasErrors": bool
  *   "edits": List<SourceFileEdit>
+ *   "details": optional List<String>
  * }
  *
  * Clients may not extend, implement or mix-in this class.
@@ -8206,6 +8236,8 @@
 
   List<SourceFileEdit> _edits;
 
+  List<String> _details;
+
   /**
    * A list of recommended changes that can be automatically made by applying
    * the 'edits' included in this response.
@@ -8262,15 +8294,37 @@
     this._edits = value;
   }
 
+  /**
+   * Messages that should be displayed to the user that describe details of the
+   * fix generation. For example, the messages might (a) point out details that
+   * users might want to explore before committing the changes or (b) describe
+   * exceptions that were thrown but that did not stop the fixes from being
+   * produced. The list will be omitted if it is empty.
+   */
+  List<String> get details => _details;
+
+  /**
+   * Messages that should be displayed to the user that describe details of the
+   * fix generation. For example, the messages might (a) point out details that
+   * users might want to explore before committing the changes or (b) describe
+   * exceptions that were thrown but that did not stop the fixes from being
+   * produced. The list will be omitted if it is empty.
+   */
+  void set details(List<String> value) {
+    this._details = value;
+  }
+
   EditDartfixResult(
       List<DartFixSuggestion> suggestions,
       List<DartFixSuggestion> otherSuggestions,
       bool hasErrors,
-      List<SourceFileEdit> edits) {
+      List<SourceFileEdit> edits,
+      {List<String> details}) {
     this.suggestions = suggestions;
     this.otherSuggestions = otherSuggestions;
     this.hasErrors = hasErrors;
     this.edits = edits;
+    this.details = details;
   }
 
   factory EditDartfixResult.fromJson(
@@ -8316,8 +8370,14 @@
       } else {
         throw jsonDecoder.mismatch(jsonPath, "edits");
       }
+      List<String> details;
+      if (json.containsKey("details")) {
+        details = jsonDecoder.decodeList(
+            jsonPath + ".details", json["details"], jsonDecoder.decodeString);
+      }
       return new EditDartfixResult(
-          suggestions, otherSuggestions, hasErrors, edits);
+          suggestions, otherSuggestions, hasErrors, edits,
+          details: details);
     } else {
       throw jsonDecoder.mismatch(jsonPath, "edit.dartfix result", json);
     }
@@ -8341,6 +8401,9 @@
     result["hasErrors"] = hasErrors;
     result["edits"] =
         edits.map((SourceFileEdit value) => value.toJson()).toList();
+    if (details != null) {
+      result["details"] = details;
+    }
     return result;
   }
 
@@ -8361,7 +8424,8 @@
               (DartFixSuggestion a, DartFixSuggestion b) => a == b) &&
           hasErrors == other.hasErrors &&
           listEqual(edits, other.edits,
-              (SourceFileEdit a, SourceFileEdit b) => a == b);
+              (SourceFileEdit a, SourceFileEdit b) => a == b) &&
+          listEqual(details, other.details, (String a, String b) => a == b);
     }
     return false;
   }
@@ -8373,6 +8437,7 @@
     hash = JenkinsSmiHash.combine(hash, otherSuggestions.hashCode);
     hash = JenkinsSmiHash.combine(hash, hasErrors.hashCode);
     hash = JenkinsSmiHash.combine(hash, edits.hashCode);
+    hash = JenkinsSmiHash.combine(hash, details.hashCode);
     return JenkinsSmiHash.finish(hash);
   }
 }
diff --git a/pkg/analysis_server/lib/src/computer/computer_hover.dart b/pkg/analysis_server/lib/src/computer/computer_hover.dart
index c4e1f34..102a46f 100644
--- a/pkg/analysis_server/lib/src/computer/computer_hover.dart
+++ b/pkg/analysis_server/lib/src/computer/computer_hover.dart
@@ -5,12 +5,14 @@
 import 'package:analysis_server/protocol/protocol_generated.dart'
     show HoverInformation;
 import 'package:analysis_server/src/computer/computer_overrides.dart';
+import 'package:analyzer/dart/analysis/session.dart';
 import 'package:analyzer/dart/ast/ast.dart';
 import 'package:analyzer/dart/element/element.dart';
 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/dartdoc/dartdoc_directive_info.dart';
+import 'package:path/path.dart' as path;
 
 /**
  * A computer for the hover at the specified offset of a Dart [CompilationUnit].
@@ -74,10 +76,20 @@
           if (library != null) {
             Uri uri = library.source.uri;
             if (uri.scheme != '' && uri.scheme == 'file') {
-              // for 'file:' URIs, use the path (contents after 'file:///')
-              hover.containingLibraryName = _unit
-                  .declaredElement.session.resourceProvider.pathContext
-                  .fromUri(uri);
+              // for 'file:' URIs, use the path after the project root
+              AnalysisSession analysisSession = _unit.declaredElement.session;
+              path.Context context =
+                  analysisSession.resourceProvider.pathContext;
+              String projectRootDir =
+                  analysisSession.analysisContext.contextRoot.root.path;
+              String relativePath =
+                  context.relative(context.fromUri(uri), from: projectRootDir);
+              if (context.style == path.Style.windows) {
+                List<String> pathList = context.split(relativePath);
+                hover.containingLibraryName = pathList.join('/');
+              } else {
+                hover.containingLibraryName = relativePath;
+              }
             } else {
               hover.containingLibraryName = uri.toString();
             }
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 305907c..0d1e4df 100644
--- a/pkg/analysis_server/lib/src/domains/completion/available_suggestions.dart
+++ b/pkg/analysis_server/lib/src/domains/completion/available_suggestions.dart
@@ -184,6 +184,13 @@
     label = '${declaration.parent.name}.${declaration.name}';
   }
 
+  String declaringLibraryUri;
+  if (declaration.parent == null) {
+    declaringLibraryUri = '${declaration.locationLibraryUri}';
+  } else {
+    declaringLibraryUri = '${declaration.parent.locationLibraryUri}';
+  }
+
   List<String> relevanceTags;
   if (declaration.relevanceTags == null) {
     relevanceTags = null;
@@ -194,6 +201,7 @@
 
   return protocol.AvailableSuggestion(
     label,
+    declaringLibraryUri,
     _protocolElement(declaration),
     defaultArgumentListString: declaration.defaultArgumentListString,
     defaultArgumentListTextRanges: declaration.defaultArgumentListTextRanges,
diff --git a/pkg/analysis_server/lib/src/edit/edit_dartfix.dart b/pkg/analysis_server/lib/src/edit/edit_dartfix.dart
index 0525b77..d14c29a 100644
--- a/pkg/analysis_server/lib/src/edit/edit_dartfix.dart
+++ b/pkg/analysis_server/lib/src/edit/edit_dartfix.dart
@@ -132,6 +132,7 @@
         listener.otherSuggestions,
         hasErrors,
         listener.sourceChange.edits,
+        details: listener.details,
       ).toResponse(request.id);
     } finally {
       server.contextManager.driverMap.values
@@ -143,6 +144,7 @@
       listener.otherSuggestions,
       hasErrors,
       listener.sourceChange.edits,
+      details: listener.details,
     ).toResponse(request.id);
   }
 
diff --git a/pkg/analysis_server/lib/src/edit/fix/dartfix_info.dart b/pkg/analysis_server/lib/src/edit/fix/dartfix_info.dart
index c6a3ef7..421b8cc 100644
--- a/pkg/analysis_server/lib/src/edit/fix/dartfix_info.dart
+++ b/pkg/analysis_server/lib/src/edit/fix/dartfix_info.dart
@@ -16,44 +16,94 @@
 
 const allFixes = <DartFixInfo>[
   //
-  // Required fixes
+  // Fixes enabled by default
   //
   const DartFixInfo(
     'fix-named-constructor-type-arguments',
-    'Move named constructor type arguments from the name to the type.',
+    '''
+Move named constructor type arguments from the name to the type.
+
+For example, this
+  new List.filled<String>(20, 'value');
+
+will be converted to
+  new List<String>.filled(20, 'value');''',
     FixErrorTask.fixNamedConstructorTypeArgs,
     isRequired: true,
   ),
   const DartFixInfo(
     'use-mixin',
-    'Convert classes used as a mixin to the new mixin syntax.',
+    '''
+Convert classes used as a mixin to the new mixin syntax.
+
+For example, this
+  class C with M { }
+  class M { }
+
+will be converted to
+  class C with M { }
+  mixin M { }
+
+There are several situations where a class cannot be automatically converted
+to a mixin such as when the class contains a constructor. In that situation
+a message is displayed and the class is not converted to a mixin.''',
     PreferMixinFix.task,
     isRequired: true,
   ),
   //
-  // Suggested fixes
+  // Fixes that may be explicitly enabled
   //
   const DartFixInfo(
     'double-to-int',
-    'Find double literals ending in .0 and remove the .0 '
-    'wherever double context can be inferred.',
+    '''
+Find double literals ending in .0 and remove the .0
+wherever double context can be inferred.
+
+For example, this
+  const double myDouble = 8.0;
+
+will be converted to
+  const double myDouble = 8;''',
     PreferIntLiteralsFix.task,
   ),
   const DartFixInfo(
     'use-spread-collections',
-    'Convert to using collection spread operators.',
+    '''
+Convert to using collection spread operators.
+
+For example, this
+  var l1 = ['b'];
+  var l2 = ['a']..addAll(l1);
+
+will be converted to
+  var l1 = ['b'];
+  var l2 = ['a', ...l1];''',
     PreferSpreadCollectionsFix.task,
     isDefault: false,
   ),
   const DartFixInfo(
     'collection-if-elements',
-    'Convert to using if elements when building collections.',
+    '''
+Convert to using if elements when building collections.
+
+For example, this
+  f(bool b) => ['a', b ? 'c' : 'd', 'e'];
+
+will be converted to
+  f(bool b) => ['a', if (b) 'c' else 'd', 'e'];''',
     PreferIfElementsToConditionalExpressionsFix.task,
     isDefault: false,
   ),
   const DartFixInfo(
     'map-for-elements',
-    'Convert to for elements when building maps from iterables.',
+    '''
+Convert to for elements when building maps from iterables.
+
+For example, this
+  Map<int, int>.fromIterable([1, 2, 3], key: (i) => i, value: (i) => i * 2)
+
+will be converted to
+  <int, int>{ for(int i in [1, 2, 3]) i : i * 2, }''',
     PreferForElementsToMapFromIterableFix.task,
     isDefault: false,
   ),
@@ -64,8 +114,10 @@
     'non-nullable',
     // TODO(danrubel) update description and make default/required
     // when NNBD fix is ready
-    'Experimental: Update sources to be non-nullable by default.\n'
-    'This requires the experimental non-nullable flag to be enabled.',
+    '''
+EXPERIMENTAL: Update sources to be non-nullable by default.
+This requires the experimental non-nullable flag to be enabled
+when running the updated application.''',
     NonNullableFix.task,
     isDefault: false,
   ),
diff --git a/pkg/analysis_server/lib/src/edit/fix/dartfix_listener.dart b/pkg/analysis_server/lib/src/edit/fix/dartfix_listener.dart
index c1e9639..58657c0 100644
--- a/pkg/analysis_server/lib/src/edit/fix/dartfix_listener.dart
+++ b/pkg/analysis_server/lib/src/edit/fix/dartfix_listener.dart
@@ -17,8 +17,19 @@
   final List<DartFixSuggestion> otherSuggestions = <DartFixSuggestion>[];
   final SourceChange sourceChange = new SourceChange('dartfix');
 
+  /// The details to be returned to the client.
+  List<String> details = [];
+
   DartFixListener(this.server);
 
+  /// Add the given [detail] to the list of details to be returned to the
+  /// client.
+  void addDetail(String detail) {
+    if (details.length < 200) {
+      details.add(detail);
+    }
+  }
+
   /// Record an edit to be sent to the client.
   ///
   /// The associated suggestion should be separately added by calling
diff --git a/pkg/analysis_server/lib/src/edit/fix/non_nullable_fix.dart b/pkg/analysis_server/lib/src/edit/fix/non_nullable_fix.dart
index 62161e4..ae1db3e 100644
--- a/pkg/analysis_server/lib/src/edit/fix/non_nullable_fix.dart
+++ b/pkg/analysis_server/lib/src/edit/fix/non_nullable_fix.dart
@@ -5,14 +5,14 @@
 import 'package:analysis_server/src/edit/fix/dartfix_listener.dart';
 import 'package:analysis_server/src/edit/fix/dartfix_registrar.dart';
 import 'package:analysis_server/src/edit/fix/fix_code_task.dart';
-import 'package:analysis_server/src/nullability/provisional_api.dart';
+import 'package:nnbd_migration/nnbd_migration.dart';
 import 'package:analyzer/dart/analysis/results.dart';
 import 'package:analyzer/file_system/file_system.dart';
 import 'package:analyzer/src/dart/analysis/experiments.dart';
 import 'package:analyzer/src/task/options.dart';
 import 'package:analyzer_plugin/protocol/protocol_common.dart';
-import 'package:yaml/yaml.dart';
 import 'package:source_span/source_span.dart';
+import 'package:yaml/yaml.dart';
 
 /// [NonNullableFix] visits each named type in a resolved compilation unit
 /// and determines whether the associated variable or parameter can be null
@@ -143,20 +143,6 @@
     }
   }
 
-  void processYamlException(String action, String optionsFilePath, error) {
-    listener.addRecommendation('''Failed to $action options file
-  $optionsFilePath
-  $error
-
-  Manually update this file to enable non-nullable by adding:
-
-    analyzer:
-      enable-experiment:
-        - non-nullable
-''');
-    _packageIsNNBD = false;
-  }
-
   @override
   Future<void> processUnit(int phase, ResolvedUnitResult result) async {
     if (!_packageIsNNBD) {
@@ -174,6 +160,20 @@
     }
   }
 
+  void processYamlException(String action, String optionsFilePath, error) {
+    listener.addRecommendation('''Failed to $action options file
+  $optionsFilePath
+  $error
+
+  Manually update this file to enable non-nullable by adding:
+
+    analyzer:
+      enable-experiment:
+        - non-nullable
+''');
+    _packageIsNNBD = false;
+  }
+
   static void task(DartFixRegistrar registrar, DartFixListener listener) {
     registrar.registerCodeTask(new NonNullableFix(listener));
   }
@@ -185,6 +185,11 @@
   NullabilityMigrationAdapter(this.listener);
 
   @override
+  void addDetail(String detail) {
+    listener.addDetail(detail);
+  }
+
+  @override
   void addEdit(SingleNullabilityFix fix, SourceEdit edit) {
     listener.addEditWithoutSuggestion(fix.source, edit);
   }
diff --git a/pkg/analysis_server/lib/src/lsp/constants.dart b/pkg/analysis_server/lib/src/lsp/constants.dart
index 54b1805..1801317 100644
--- a/pkg/analysis_server/lib/src/lsp/constants.dart
+++ b/pkg/analysis_server/lib/src/lsp/constants.dart
@@ -51,6 +51,9 @@
 
 abstract class CustomMethods {
   static const DiagnosticServer = const Method('dart/diagnosticServer');
+  static const PublishClosingLabels =
+      const Method('dart/textDocument/publishClosingLabels');
+  static const Super = const Method('dart/textDocument/super');
   static const AnalyzerStatus = const Method(r'$/analyzerStatus');
 }
 
diff --git a/pkg/analysis_server/lib/src/lsp/handlers/custom/handler_super.dart b/pkg/analysis_server/lib/src/lsp/handlers/custom/handler_super.dart
new file mode 100644
index 0000000..ab45764
--- /dev/null
+++ b/pkg/analysis_server/lib/src/lsp/handlers/custom/handler_super.dart
@@ -0,0 +1,83 @@
+// 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 'package:analysis_server/lsp_protocol/protocol_generated.dart';
+import 'package:analysis_server/lsp_protocol/protocol_special.dart';
+import 'package:analysis_server/src/lsp/constants.dart';
+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:analysis_server/src/search/type_hierarchy.dart';
+
+class SuperHandler
+    extends MessageHandler<TextDocumentPositionParams, Location> {
+  SuperHandler(LspAnalysisServer server) : super(server);
+  Method get handlesMessage => CustomMethods.Super;
+
+  @override
+  LspJsonHandler<TextDocumentPositionParams> get jsonHandler =>
+      TextDocumentPositionParams.jsonHandler;
+
+  @override
+  Future<ErrorOr<Location>> handle(
+      TextDocumentPositionParams params, CancellationToken token) async {
+    if (!isDartDocument(params.textDocument)) {
+      return success(null);
+    }
+
+    final pos = params.position;
+    final path = pathOfDoc(params.textDocument);
+    final unit = await path.mapResult(requireResolvedUnit);
+    final offset = await unit.mapResult((unit) => toOffset(unit.lineInfo, pos));
+
+    return offset.mapResult((offset) async {
+      var node = await server.getNodeAtOffset(path.result, offset);
+      if (node == null) {
+        return success(null);
+      }
+
+      // Walk up the nodes until we find one that has an element so we can support
+      // finding supers even if the cursor location was inside a method or on its
+      // return type.
+      var element = server.getElementOfNode(node);
+      while (element == null && node.parent != null) {
+        node = node.parent;
+        element = server.getElementOfNode(node);
+      }
+      if (element == null) {
+        return success(null);
+      }
+
+      final computer = TypeHierarchyComputer(server.searchEngine, element);
+      final items = computer.computeSuper();
+
+      // We expect to get at least two items back - the first will be the input
+      // element so we start looking from the second.
+      if (items == null || items.length < 2) {
+        return success(null);
+      }
+
+      // The class will have a memberElement if we were searching for an element
+      // otherwise we're looking for a class.
+      final isMember = items.first.memberElement != null;
+      final superItem = items.skip(1).firstWhere(
+            (elm) =>
+                isMember ? elm.memberElement != null : elm.classElement != null,
+            orElse: () => null,
+          );
+
+      if (superItem == null) {
+        return success(null);
+      }
+
+      final location = isMember
+          ? superItem.memberElement.location
+          : superItem.classElement.location;
+
+      return success(toLocation(location, server.getLineInfo(location.file)));
+    });
+  }
+}
diff --git a/pkg/analysis_server/lib/src/lsp/handlers/handler_completion_resolve.dart b/pkg/analysis_server/lib/src/lsp/handlers/handler_completion_resolve.dart
index c4b764c..aa54dae 100644
--- a/pkg/analysis_server/lib/src/lsp/handlers/handler_completion_resolve.dart
+++ b/pkg/analysis_server/lib/src/lsp/handlers/handler_completion_resolve.dart
@@ -12,6 +12,7 @@
 import 'package:analysis_server/src/lsp/mapping.dart';
 import 'package:analyzer/dart/analysis/session.dart';
 import 'package:analyzer/dart/element/element.dart' as analyzer;
+import 'package:analyzer/src/util/comment.dart' as analyzer;
 import 'package:analyzer_plugin/utilities/change_builder/change_builder_dart.dart';
 
 class CompletionResolveHandler
@@ -50,12 +51,12 @@
     // extracting (with support for the different types of responses between
     // the servers). Where is an appropriate place to put it?
 
-    var library = server.declarationsTracker.getLibrary(data.libraryId);
+    var library = server.declarationsTracker.getLibrary(data.libId);
     if (library == null) {
       return error(
         ErrorCodes.InvalidParams,
-        'Library ID is not valid: ${data.libraryId}',
-        data.libraryId.toString(),
+        'Library ID is not valid: ${data.libId}',
+        data.libId.toString(),
       );
     }
 
@@ -146,21 +147,33 @@
               'Add import', Commands.sendWorkspaceEdit, [workspaceEdit]);
         }
 
+        // Documentation is added on during resolve for LSP.
+        final formats = server.clientCapabilities?.textDocument?.completion
+            ?.completionItem?.documentationFormat;
+        final dartDoc =
+            analyzer.getDartDocPlainText(requestedElement.documentationComment);
+        final documentation = asStringOrMarkupContent(formats, dartDoc);
+
         return success(CompletionItem(
           newLabel,
           item.kind,
-          data.autoImportDisplayUri != null
-              ? "Auto import from '${data.autoImportDisplayUri}'\n\n${item.detail ?? ''}"
+          data.displayUri != null
+              ? "Auto import from '${data.displayUri}'\n\n${item.detail ?? ''}"
                   .trim()
               : item.detail,
-          item.documentation,
+          documentation,
           item.deprecated,
           item.preselect,
           item.sortText,
           item.filterText,
           newLabel,
           item.insertTextFormat,
-          item.textEdit,
+          new TextEdit(
+            // TODO(dantup): If `clientSupportsSnippets == true` then we should map
+            // `selection` in to a snippet (see how Dart Code does this).
+            toRange(lineInfo, item.data.rOffset, item.data.rLength),
+            newLabel,
+          ),
           thisFilesChanges
               .expand((change) =>
                   change.edits.map((edit) => toTextEdit(lineInfo, edit)))
diff --git a/pkg/analysis_server/lib/src/lsp/handlers/handler_initialize.dart b/pkg/analysis_server/lib/src/lsp/handlers/handler_initialize.dart
index 5b104b8..1aa7293 100644
--- a/pkg/analysis_server/lib/src/lsp/handlers/handler_initialize.dart
+++ b/pkg/analysis_server/lib/src/lsp/handlers/handler_initialize.dart
@@ -21,25 +21,16 @@
 
   ErrorOr<InitializeResult> handle(
       InitializeParams params, CancellationToken token) {
-    final openWorkspacePaths = <String>[];
+    server.handleClientConnection(
+      params.capabilities,
+      params.initializationOptions,
+    );
 
+    final openWorkspacePaths = <String>[];
     // The onlyAnalyzeProjectsWithOpenFiles flag allows opening huge folders
     // without setting them as analysis roots. Instead, analysis roots will be
     // based only on the open files.
-    final onlyAnalyzeProjectsWithOpenFiles = params.initializationOptions !=
-            null
-        ? params.initializationOptions['onlyAnalyzeProjectsWithOpenFiles'] ==
-            true
-        : false;
-
-    // The suggestFromUnimportedLibraries flag allows clients to opt-out of
-    // behaviour of including suggestions that are not imported. Defaults to true,
-    // so must be explicitly passed as false to disable.
-    final suggestFromUnimportedLibraries = params.initializationOptions ==
-            null ||
-        params.initializationOptions['suggestFromUnimportedLibraries'] != false;
-
-    if (!onlyAnalyzeProjectsWithOpenFiles) {
+    if (!server.initializationOptions.onlyAnalyzeProjectsWithOpenFiles) {
       if (params.workspaceFolders != null) {
         params.workspaceFolders.forEach((wf) {
           openWorkspacePaths.add(Uri.parse(wf.uri).toFilePath());
@@ -56,12 +47,9 @@
       }
     }
 
-    server.handleClientConnection(params.capabilities);
     server.messageHandler = new InitializingStateMessageHandler(
       server,
       openWorkspacePaths,
-      onlyAnalyzeProjectsWithOpenFiles,
-      suggestFromUnimportedLibraries,
     );
 
     final codeActionLiteralSupport =
diff --git a/pkg/analysis_server/lib/src/lsp/handlers/handler_initialized.dart b/pkg/analysis_server/lib/src/lsp/handlers/handler_initialized.dart
index 27cf61a..eeb698c 100644
--- a/pkg/analysis_server/lib/src/lsp/handlers/handler_initialized.dart
+++ b/pkg/analysis_server/lib/src/lsp/handlers/handler_initialized.dart
@@ -11,12 +11,9 @@
 
 class IntializedMessageHandler extends MessageHandler<InitializedParams, void> {
   final List<String> openWorkspacePaths;
-  final bool onlyAnalyzeProjectsWithOpenFiles, suggestFromUnimportedLibraries;
   IntializedMessageHandler(
     LspAnalysisServer server,
     this.openWorkspacePaths,
-    this.onlyAnalyzeProjectsWithOpenFiles,
-    this.suggestFromUnimportedLibraries,
   ) : super(server);
   Method get handlesMessage => Method.initialized;
 
@@ -27,13 +24,11 @@
   ErrorOr<void> handle(InitializedParams params, CancellationToken token) {
     server.messageHandler = new InitializedStateMessageHandler(
       server,
-      onlyAnalyzeProjectsWithOpenFiles,
-      suggestFromUnimportedLibraries,
     );
 
     _performDynamicRegistration();
 
-    if (!onlyAnalyzeProjectsWithOpenFiles) {
+    if (!server.initializationOptions.onlyAnalyzeProjectsWithOpenFiles) {
       server.setAnalysisRoots(openWorkspacePaths);
     }
 
diff --git a/pkg/analysis_server/lib/src/lsp/handlers/handler_states.dart b/pkg/analysis_server/lib/src/lsp/handlers/handler_states.dart
index 3bcf9fd..a0e1d15 100644
--- a/pkg/analysis_server/lib/src/lsp/handlers/handler_states.dart
+++ b/pkg/analysis_server/lib/src/lsp/handlers/handler_states.dart
@@ -8,6 +8,7 @@
 import 'package:analysis_server/lsp_protocol/protocol_special.dart';
 import 'package:analysis_server/src/lsp/constants.dart';
 import 'package:analysis_server/src/lsp/handlers/custom/handler_diagnostic_server.dart';
+import 'package:analysis_server/src/lsp/handlers/custom/handler_super.dart';
 import 'package:analysis_server/src/lsp/handlers/handler_code_actions.dart';
 import 'package:analysis_server/src/lsp/handlers/handler_completion.dart';
 import 'package:analysis_server/src/lsp/handlers/handler_completion_resolve.dart';
@@ -51,8 +52,6 @@
 class InitializedStateMessageHandler extends ServerStateMessageHandler {
   InitializedStateMessageHandler(
     LspAnalysisServer server,
-    bool onlyAnalyzeProjectsWithOpenFiles,
-    bool suggestFromUnimportedLibraries,
   ) : super(server) {
     reject(Method.initialize, ServerErrorCodes.ServerAlreadyInitialized,
         'Server already initialized');
@@ -61,18 +60,27 @@
     registerHandler(new ShutdownMessageHandler(server));
     registerHandler(new ExitMessageHandler(server));
     registerHandler(
-      new TextDocumentOpenHandler(server, onlyAnalyzeProjectsWithOpenFiles),
+      new TextDocumentOpenHandler(
+        server,
+        server.initializationOptions.onlyAnalyzeProjectsWithOpenFiles,
+      ),
     );
     registerHandler(new TextDocumentChangeHandler(server));
     registerHandler(
-      new TextDocumentCloseHandler(server, onlyAnalyzeProjectsWithOpenFiles),
+      new TextDocumentCloseHandler(
+        server,
+        server.initializationOptions.onlyAnalyzeProjectsWithOpenFiles,
+      ),
     );
     registerHandler(new HoverHandler(server));
-    registerHandler(
-        new CompletionHandler(server, suggestFromUnimportedLibraries));
+    registerHandler(new CompletionHandler(
+      server,
+      server.initializationOptions.suggestFromUnimportedLibraries,
+    ));
     registerHandler(new CompletionResolveHandler(server));
     registerHandler(new SignatureHelpHandler(server));
     registerHandler(new DefinitionHandler(server));
+    registerHandler(new SuperHandler(server));
     registerHandler(new ReferencesHandler(server));
     registerHandler(new ImplementationHandler(server));
     registerHandler(new FormattingHandler(server));
@@ -82,7 +90,10 @@
     registerHandler(new CodeActionHandler(server));
     registerHandler(new ExecuteCommandHandler(server));
     registerHandler(
-      new WorkspaceFoldersHandler(server, !onlyAnalyzeProjectsWithOpenFiles),
+      new WorkspaceFoldersHandler(
+        server,
+        !server.initializationOptions.onlyAnalyzeProjectsWithOpenFiles,
+      ),
     );
     registerHandler(new PrepareRenameHandler(server));
     registerHandler(new RenameHandler(server));
@@ -96,8 +107,6 @@
   InitializingStateMessageHandler(
     LspAnalysisServer server,
     List<String> openWorkspacePaths,
-    bool onlyAnalyzeProjectsWithOpenFiles,
-    bool suggestFromUnimportedLibraries,
   ) : super(server) {
     reject(Method.initialize, ServerErrorCodes.ServerAlreadyInitialized,
         'Server already initialized');
@@ -106,8 +115,6 @@
     registerHandler(new IntializedMessageHandler(
       server,
       openWorkspacePaths,
-      onlyAnalyzeProjectsWithOpenFiles,
-      suggestFromUnimportedLibraries,
     ));
   }
 
diff --git a/pkg/analysis_server/lib/src/lsp/lsp_analysis_server.dart b/pkg/analysis_server/lib/src/lsp/lsp_analysis_server.dart
index 7fff986..301e631 100644
--- a/pkg/analysis_server/lib/src/lsp/lsp_analysis_server.dart
+++ b/pkg/analysis_server/lib/src/lsp/lsp_analysis_server.dart
@@ -13,6 +13,7 @@
 import 'package:analysis_server/src/analysis_server.dart';
 import 'package:analysis_server/src/analysis_server_abstract.dart';
 import 'package:analysis_server/src/collections.dart';
+import 'package:analysis_server/src/computer/computer_closingLabels.dart';
 import 'package:analysis_server/src/context_manager.dart';
 import 'package:analysis_server/src/domain_completion.dart'
     show CompletionDomainHandler;
@@ -55,6 +56,10 @@
   /// The capabilities of the LSP client. Will be null prior to initialization.
   ClientCapabilities _clientCapabilities;
 
+  /// Initialization options provided by the LSP client. Allows opting in/out of
+  /// specific server functionality. Will be null prior to initialization.
+  LspInitializationOptions _initializationOptions;
+
   /**
    * The channel from which messages are received and to which responses should
    * be sent.
@@ -196,6 +201,10 @@
 
   Future<void> get exited => channel.closed;
 
+  /// Initialization options provided by the LSP client. Allows opting in/out of
+  /// specific server functionality. Will be null prior to initialization.
+  LspInitializationOptions get initializationOptions => _initializationOptions;
+
   RefactoringWorkspace get refactoringWorkspace => _refactoringWorkspace ??=
       new RefactoringWorkspace(driverMap.values, searchEngine);
 
@@ -240,8 +249,10 @@
             null, new Uri.file(path).toString());
   }
 
-  void handleClientConnection(ClientCapabilities capabilities) {
+  void handleClientConnection(
+      ClientCapabilities capabilities, dynamic initializationOptions) {
     _clientCapabilities = capabilities;
+    _initializationOptions = LspInitializationOptions(initializationOptions);
 
     performanceAfterStartup = new ServerPerformance();
     performance = performanceAfterStartup;
@@ -333,6 +344,9 @@
   void logException(String message, exception, stackTrace) {
     if (exception is CaughtException) {
       stackTrace ??= exception.stackTrace;
+      message = '$message: ${exception.exception}';
+    } else if (exception != null) {
+      message = '$message: $exception';
     }
 
     final fullError = stackTrace == null ? message : '$message\n$stackTrace';
@@ -350,6 +364,17 @@
     ));
   }
 
+  void publishClosingLabels(String path, List<ClosingLabel> labels) {
+    final params =
+        new PublishClosingLabelsParams(Uri.file(path).toString(), labels);
+    final message = new NotificationMessage(
+      CustomMethods.PublishClosingLabels,
+      params,
+      jsonRpcVersion,
+    );
+    sendNotification(message);
+  }
+
   void publishDiagnostics(String path, List<Diagnostic> errors) {
     final params =
         new PublishDiagnosticsParams(Uri.file(path).toString(), errors);
@@ -455,6 +480,15 @@
     addContextsToDeclarationsTracker();
   }
 
+  /// Returns `true` if closing labels should be sent for [file] with the given
+  /// absolute path.
+  bool shouldSendClosingLabelsFor(String file) {
+    // Closing labels should only be sent for open (priority) files in the workspace.
+    return initializationOptions.closingLabels &&
+        priorityFiles.contains(file) &&
+        contextManager.isInAnalysisRoot(file);
+  }
+
   /**
    * Returns `true` if errors should be reported for [file] with the given
    * absolute path.
@@ -518,6 +552,20 @@
   }
 }
 
+class LspInitializationOptions {
+  final bool onlyAnalyzeProjectsWithOpenFiles;
+  final bool suggestFromUnimportedLibraries;
+  final bool closingLabels;
+  LspInitializationOptions(dynamic options)
+      : onlyAnalyzeProjectsWithOpenFiles = options != null &&
+            options['onlyAnalyzeProjectsWithOpenFiles'] == true,
+        // suggestFromUnimportedLibraries defaults to true, so must be
+        // explicitly passed as false to disable.
+        suggestFromUnimportedLibraries = options == null ||
+            options['suggestFromUnimportedLibraries'] != false,
+        closingLabels = options != null && options['closingLabels'] == true;
+}
+
 class LspPerformance {
   /// A list of code completion performance measurements for the latest
   /// completion operation up to [performanceListMaxLength] measurements.
@@ -558,6 +606,17 @@
 
         analysisServer.publishDiagnostics(result.path, serverErrors);
       }
+      if (result.unit != null) {
+        if (analysisServer.shouldSendClosingLabelsFor(path)) {
+          final labels =
+              new DartUnitClosingLabelsComputer(result.lineInfo, result.unit)
+                  .compute()
+                  .map((l) => toClosingLabel(result.lineInfo, l))
+                  .toList();
+
+          analysisServer.publishClosingLabels(result.path, labels);
+        }
+      }
     });
     analysisDriver.exceptions.listen((nd.ExceptionResult result) {
       String message = 'Analysis failed: ${result.path}';
diff --git a/pkg/analysis_server/lib/src/lsp/mapping.dart b/pkg/analysis_server/lib/src/lsp/mapping.dart
index 5963258d..469f150 100644
--- a/pkg/analysis_server/lib/src/lsp/mapping.dart
+++ b/pkg/analysis_server/lib/src/lsp/mapping.dart
@@ -3,6 +3,7 @@
 // BSD-style license that can be found in the LICENSE file.
 
 import 'dart:collection';
+import 'dart:math';
 
 import 'package:analysis_server/lsp_protocol/protocol_custom_generated.dart'
     as lsp;
@@ -155,23 +156,26 @@
 
   final useDeprecated =
       completionCapabilities?.completionItem?.deprecatedSupport == true;
-  final formats = completionCapabilities?.completionItem?.documentationFormat;
 
   final completionKind = declarationKindToCompletionItemKind(
       supportedCompletionItemKinds, declaration.kind);
 
-  var itemRelevance = includedSuggestionSet.relevance;
+  var relevanceBoost = 0;
   if (declaration.relevanceTags != null)
-    declaration.relevanceTags
-        .forEach((t) => itemRelevance += (tagBoosts[t] ?? 0));
+    declaration.relevanceTags.forEach(
+        (t) => relevanceBoost = max(relevanceBoost, tagBoosts[t] ?? 0));
+  final itemRelevance = includedSuggestionSet.relevance + relevanceBoost;
 
+  // Because we potentially send thousands of these items, we should minimise
+  // the generated JSON as much as possible - for example using nulls in place
+  // of empty lists/false where possible.
   return new lsp.CompletionItem(
     label,
     completionKind,
     getDeclarationCompletionDetail(declaration, completionKind, useDeprecated),
-    asStringOrMarkupContent(formats, cleanDartdoc(declaration.docComplete)),
-    useDeprecated ? declaration.isDeprecated : null,
-    false, // preselect
+    null, // documentation - will be added during resolve.
+    useDeprecated && declaration.isDeprecated ? true : null,
+    null, // preselect
     // Relevance is a number, highest being best. LSP does text sort so subtract
     // from a large number so that a text sort will result in the correct order.
     // 555 -> 999455
@@ -180,24 +184,19 @@
     (1000000 - itemRelevance).toString(),
     null, // filterText uses label if not set
     null, // insertText is deprecated, but also uses label if not set
-    // We don't have completions that use snippets, so we always return PlainText.
-    lsp.InsertTextFormat.PlainText,
-    new lsp.TextEdit(
-      // TODO(dantup): If `clientSupportsSnippets == true` then we should map
-      // `selection` in to a snippet (see how Dart Code does this).
-      toRange(lineInfo, replacementOffset, replacementLength),
-      label,
-    ),
-    [], // additionalTextEdits, used for adding imports, etc.
-    [], // commitCharacters
+    null, // insertTextFormat (we always use plain text so can ommit this)
+    null, // textEdit - added on during resolve
+    null, // additionalTextEdits, used for adding imports, etc.
+    null, // commitCharacters
     null, // command
     // data, used for completionItem/resolve.
     new lsp.CompletionItemResolutionInfo(
-      file,
-      offset,
-      includedSuggestionSet.id,
-      includedSuggestionSet.displayUri ?? library.uri?.toString(),
-    ),
+        file,
+        offset,
+        includedSuggestionSet.id,
+        includedSuggestionSet.displayUri ?? library.uri?.toString(),
+        replacementOffset,
+        replacementLength),
   );
 }
 
@@ -375,7 +374,7 @@
   } else if (hasParameterType) {
     return '$prefix${suggestion.parameterType}';
   } else {
-    return prefix;
+    return prefix.isNotEmpty ? prefix : null;
   }
 }
 
@@ -414,7 +413,7 @@
   } else if (hasReturnType) {
     return '$prefix${declaration.returnType}';
   } else {
-    return prefix;
+    return prefix.isNotEmpty ? prefix : null;
   }
 }
 
@@ -528,6 +527,11 @@
   return getKindPreferences().firstWhere(isSupported, orElse: () => null);
 }
 
+lsp.ClosingLabel toClosingLabel(
+        server.LineInfo lineInfo, server.ClosingLabel label) =>
+    lsp.ClosingLabel(
+        toRange(lineInfo, label.offset, label.length), label.label);
+
 lsp.CompletionItem toCompletionItem(
   lsp.TextDocumentClientCapabilitiesCompletion completionCapabilities,
   HashSet<lsp.CompletionItemKind> supportedCompletionItemKinds,
@@ -550,13 +554,16 @@
       : suggestionKindToCompletionItemKind(
           supportedCompletionItemKinds, suggestion.kind, label);
 
+  // Because we potentially send thousands of these items, we should minimise
+  // the generated JSON as much as possible - for example using nulls in place
+  // of empty lists/false where possible.
   return new lsp.CompletionItem(
     label,
     completionKind,
     getCompletionDetail(suggestion, completionKind, useDeprecated),
     asStringOrMarkupContent(formats, cleanDartdoc(suggestion.docComplete)),
-    useDeprecated ? suggestion.isDeprecated : null,
-    false, // preselect
+    useDeprecated && suggestion.isDeprecated ? true : null,
+    null, // preselect
     // Relevance is a number, highest being best. LSP does text sort so subtract
     // from a large number so that a text sort will result in the correct order.
     // 555 -> 999455
@@ -565,16 +572,15 @@
     (1000000 - suggestion.relevance).toString(),
     null, // filterText uses label if not set
     null, // insertText is deprecated, but also uses label if not set
-    // We don't have completions that use snippets, so we always return PlainText.
-    lsp.InsertTextFormat.PlainText,
+    null, // insertTextFormat (we always use plain text so can ommit this)
     new lsp.TextEdit(
       // TODO(dantup): If `clientSupportsSnippets == true` then we should map
       // `selection` in to a snippet (see how Dart Code does this).
       toRange(lineInfo, replacementOffset, replacementLength),
       suggestion.completion,
     ),
-    [], // additionalTextEdits, used for adding imports, etc.
-    [], // commitCharacters
+    null, // additionalTextEdits, used for adding imports, etc.
+    null, // commitCharacters
     null, // command
     null, // data, useful for if using lazy resolve, this comes back to us
   );
@@ -645,6 +651,16 @@
       .toList();
 }
 
+lsp.Location toLocation(server.Location location, server.LineInfo lineInfo) =>
+    lsp.Location(
+      Uri.file(location.file).toString(),
+      toRange(
+        lineInfo,
+        location.offset,
+        location.length,
+      ),
+    );
+
 ErrorOr<int> toOffset(
   server.LineInfo lineInfo,
   lsp.Position pos, {
diff --git a/pkg/analysis_server/lib/src/nullability/provisional_api.dart b/pkg/analysis_server/lib/src/nullability/provisional_api.dart
deleted file mode 100644
index 02b8921..0000000
--- a/pkg/analysis_server/lib/src/nullability/provisional_api.dart
+++ /dev/null
@@ -1,162 +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:analysis_server/src/nullability/decorated_type.dart'
-    as analyzer;
-import 'package:analysis_server/src/nullability/expression_checks.dart'
-    as analyzer;
-import 'package:analysis_server/src/nullability/transitional_api.dart'
-    as analyzer;
-import 'package:analysis_server/src/protocol_server.dart';
-import 'package:analyzer/dart/analysis/results.dart';
-import 'package:analyzer/src/generated/source.dart';
-import 'package:meta/meta.dart';
-
-/// Kinds of fixes that might be performed by nullability migration.
-class NullabilityFixKind {
-  /// An import needs to be added.
-  static const addImport =
-      const NullabilityFixKind._(appliedMessage: 'Add an import');
-
-  /// A formal parameter needs to have a required annotation added.
-  static const addRequired =
-      const NullabilityFixKind._(appliedMessage: 'Add a required annotation');
-
-  /// An expression's value needs to be null-checked.
-  static const checkExpression = const NullabilityFixKind._(
-    appliedMessage: 'Added a null check to an expression',
-  );
-
-  /// An explicit type mentioned in the source program needs to be made
-  /// nullable.
-  static const makeTypeNullable = const NullabilityFixKind._(
-    appliedMessage: 'Changed a type to be nullable',
-  );
-
-  /// An if-test or conditional expression needs to have its "then" branch
-  /// discarded.
-  static const discardThen = const NullabilityFixKind._(
-    appliedMessage: 'Discarded an unreachable conditional then branch',
-  );
-
-  /// An if-test or conditional expression needs to have its "else" branch
-  /// discarded.
-  static const discardElse = const NullabilityFixKind._(
-    appliedMessage: 'Discarded an unreachable conditional else branch',
-  );
-
-  /// A message used by dartfix to indicate a fix has been applied.
-  final String appliedMessage;
-
-  const NullabilityFixKind._({@required this.appliedMessage});
-}
-
-/// Provisional API for DartFix to perform nullability migration.
-///
-/// Usage: pass each input source file to [prepareInput].  Then pass each input
-/// source file to [processInput].  Then call [finish] to obtain the
-/// modifications that need to be made to each source file.
-///
-/// TODO(paulberry): figure out whether this API is what we want, and figure out
-/// what file/folder it belongs in.
-class NullabilityMigration {
-  final analyzer.NullabilityMigration _analyzerMigration;
-  final NullabilityMigrationListener listener;
-
-  /// Prepares to perform nullability migration.
-  ///
-  /// If [permissive] is `true`, exception handling logic will try to proceed
-  /// as far as possible even though the migration algorithm is not yet
-  /// complete.  TODO(paulberry): remove this mode once the migration algorithm
-  /// is fully implemented.
-  NullabilityMigration(this.listener, {bool permissive: false})
-      : _analyzerMigration =
-            analyzer.NullabilityMigration(permissive: permissive);
-
-  void finish() {
-    for (var entry in _analyzerMigration.finish().entries) {
-      var source = entry.key;
-      for (var potentialModification in entry.value) {
-        var fix = _SingleNullabilityFix(source, potentialModification);
-        listener.addFix(fix);
-        for (var edit in potentialModification.modifications) {
-          listener.addEdit(fix, edit);
-        }
-      }
-    }
-  }
-
-  void prepareInput(ResolvedUnitResult result) {
-    _analyzerMigration.prepareInput(result.unit, result.typeProvider);
-  }
-
-  void processInput(ResolvedUnitResult result) {
-    _analyzerMigration.processInput(result.unit, result.typeProvider);
-  }
-}
-
-/// [NullabilityMigrationListener] is used by [NullabilityMigration]
-/// to communicate source changes or "fixes" to the client.
-abstract class NullabilityMigrationListener {
-  /// [addEdit] is called once for each source edit, in the order in which they
-  /// appear in the source file.
-  void addEdit(SingleNullabilityFix fix, SourceEdit edit);
-
-  /// [addFix] is called once for each source change.
-  void addFix(SingleNullabilityFix fix);
-}
-
-/// Representation of a single conceptual change made by the nullability
-/// migration algorithm.  This change might require multiple source edits to
-/// achieve.
-abstract class SingleNullabilityFix {
-  /// What kind of fix this is.
-  NullabilityFixKind get kind;
-
-  /// Location of the change, for reporting to the user.
-  Location get location;
-
-  /// File to change.
-  Source get source;
-}
-
-/// Implementation of [SingleNullabilityFix] used internally by
-/// [NullabilityMigration].
-class _SingleNullabilityFix extends SingleNullabilityFix {
-  @override
-  final Source source;
-
-  @override
-  final NullabilityFixKind kind;
-
-  factory _SingleNullabilityFix(
-      Source source, analyzer.PotentialModification potentialModification) {
-    // TODO(paulberry): once everything is migrated into the analysis server,
-    // the migration engine can just create SingleNullabilityFix objects
-    // directly and set their kind appropriately; we won't need to translate the
-    // kinds using a bunch of `is` checks.
-    NullabilityFixKind kind;
-    if (potentialModification is analyzer.ExpressionChecks) {
-      kind = NullabilityFixKind.checkExpression;
-    } else if (potentialModification is analyzer.DecoratedTypeAnnotation) {
-      kind = NullabilityFixKind.makeTypeNullable;
-    } else if (potentialModification is analyzer.ConditionalModification) {
-      kind = potentialModification.discard.keepFalse
-          ? NullabilityFixKind.discardThen
-          : NullabilityFixKind.discardElse;
-    } else if (potentialModification is analyzer.PotentiallyAddImport) {
-      kind = NullabilityFixKind.addImport;
-    } else if (potentialModification is analyzer.PotentiallyAddRequired) {
-      kind = NullabilityFixKind.addRequired;
-    } else {
-      throw new UnimplementedError('TODO(paulberry)');
-    }
-    return _SingleNullabilityFix._(source, kind);
-  }
-
-  _SingleNullabilityFix._(this.source, this.kind);
-
-  /// TODO(paulberry): do something better
-  Location get location => null;
-}
diff --git a/pkg/analysis_server/lib/src/nullability/transitional_api.dart b/pkg/analysis_server/lib/src/nullability/transitional_api.dart
deleted file mode 100644
index 69b4d89..0000000
--- a/pkg/analysis_server/lib/src/nullability/transitional_api.dart
+++ /dev/null
@@ -1,338 +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:analysis_server/src/nullability/conditional_discard.dart';
-import 'package:analysis_server/src/nullability/decorated_type.dart';
-import 'package:analysis_server/src/nullability/expression_checks.dart';
-import 'package:analysis_server/src/nullability/graph_builder.dart';
-import 'package:analysis_server/src/nullability/node_builder.dart';
-import 'package:analysis_server/src/nullability/nullability_node.dart';
-import 'package:analyzer/dart/ast/ast.dart';
-import 'package:analyzer/dart/element/element.dart';
-import 'package:analyzer/src/generated/resolver.dart';
-import 'package:analyzer/src/generated/source.dart';
-import 'package:analyzer_plugin/protocol/protocol_common.dart' show SourceEdit;
-
-/// Records information about how a conditional expression or statement might
-/// need to be modified.
-class ConditionalModification extends PotentialModification {
-  final int offset;
-
-  final int end;
-
-  final bool isStatement;
-
-  final ConditionalDiscard discard;
-
-  final _KeepNode condition;
-
-  final _KeepNode thenStatement;
-
-  final _KeepNode elseStatement;
-
-  factory ConditionalModification(AstNode node, ConditionalDiscard discard) {
-    if (node is IfStatement) {
-      return ConditionalModification._(
-          node.offset,
-          node.end,
-          node is Statement,
-          discard,
-          _KeepNode(node.condition),
-          _KeepNode(node.thenStatement),
-          _KeepNode(node.elseStatement));
-    } else {
-      throw new UnimplementedError('TODO(paulberry)');
-    }
-  }
-
-  ConditionalModification._(this.offset, this.end, this.isStatement,
-      this.discard, this.condition, this.thenStatement, this.elseStatement);
-
-  @override
-  bool get isEmpty => discard.keepTrue && discard.keepFalse;
-
-  @override
-  Iterable<SourceEdit> get modifications {
-    if (isEmpty) return const [];
-    // TODO(paulberry): move the following logic into DartEditBuilder (see
-    // dartbug.com/35872).
-    var result = <SourceEdit>[];
-    var keepNodes = <_KeepNode>[];
-    if (!discard.pureCondition) {
-      keepNodes.add(condition); // TODO(paulberry): test
-    }
-    if (discard.keepTrue) {
-      keepNodes.add(thenStatement); // TODO(paulberry): test
-    }
-    if (discard.keepFalse) {
-      keepNodes.add(elseStatement); // TODO(paulberry): test
-    }
-    // TODO(paulberry): test thoroughly
-    for (int i = 0; i < keepNodes.length; i++) {
-      var keepNode = keepNodes[i];
-      if (i == 0 && keepNode.offset != offset) {
-        result.add(SourceEdit(offset, 0, '/* '));
-      }
-      if (i != 0 || keepNode.offset != offset) {
-        result.add(SourceEdit(keepNode.offset, 0, '*/ '));
-      }
-      if (i != keepNodes.length - 1 || keepNode.end != end) {
-        result.add(SourceEdit(keepNode.end, 0,
-            keepNode.isExpression && isStatement ? '; /*' : ' /*'));
-      }
-      if (i == keepNodes.length - 1 && keepNode.end != end) {
-        result.add(SourceEdit(end, 0, ' */'));
-      }
-    }
-    return result;
-  }
-}
-
-/// Transitional migration API.
-///
-/// Usage: pass each input source file to [prepareInput].  Then pass each input
-/// source file to [processInput].  Then call [finish] to obtain the
-/// modifications that need to be made to each source file.
-///
-/// TODO(paulberry): this implementation keeps a lot of CompilationUnit objects
-/// around.  Can we do better?
-class NullabilityMigration {
-  final bool _permissive;
-
-  final Variables _variables;
-
-  final NullabilityGraph _graph;
-
-  /// Prepares to perform nullability migration.
-  ///
-  /// If [permissive] is `true`, exception handling logic will try to proceed
-  /// as far as possible even though the migration algorithm is not yet
-  /// complete.  TODO(paulberry): remove this mode once the migration algorithm
-  /// is fully implemented.
-  NullabilityMigration({bool permissive: false})
-      : this._(permissive, NullabilityGraph());
-
-  NullabilityMigration._(this._permissive, this._graph)
-      : _variables = Variables(_graph);
-
-  Map<Source, List<PotentialModification>> finish() {
-    _graph.propagate();
-    return _variables.getPotentialModifications();
-  }
-
-  void prepareInput(CompilationUnit unit, TypeProvider typeProvider) {
-    unit.accept(NodeBuilder(_variables, unit.declaredElement.source,
-        _permissive, _graph, typeProvider));
-  }
-
-  void processInput(CompilationUnit unit, TypeProvider typeProvider) {
-    unit.accept(GraphBuilder(typeProvider, _variables, _graph,
-        unit.declaredElement.source, _permissive));
-  }
-}
-
-/// Records information about the possible addition of an import
-/// to the source code.
-class PotentiallyAddImport extends PotentialModification {
-  final _usages = <PotentialModification>[];
-
-  final int _offset;
-  final String _importPath;
-
-  PotentiallyAddImport(
-      AstNode beforeNode, this._importPath, PotentialModification usage)
-      : _offset = beforeNode.offset {
-    _usages.add(usage);
-  }
-
-  get importPath => _importPath;
-
-  @override
-  bool get isEmpty {
-    for (PotentialModification usage in _usages) {
-      if (!usage.isEmpty) {
-        return false;
-      }
-    }
-    return true;
-  }
-
-  // TODO(danrubel): change all of dartfix NNBD to use DartChangeBuilder
-  @override
-  Iterable<SourceEdit> get modifications =>
-      isEmpty ? const [] : [SourceEdit(_offset, 0, "import '$_importPath';\n")];
-
-  void addUsage(PotentialModification usage) {
-    _usages.add(usage);
-  }
-}
-
-/// Records information about the possible addition of a `@required` annotation
-/// to the source code.
-class PotentiallyAddRequired extends PotentialModification {
-  final NullabilityNode _node;
-
-  final int _offset;
-
-  PotentiallyAddRequired(DefaultFormalParameter parameter, this._node)
-      : _offset = parameter.offset;
-
-  @override
-  bool get isEmpty => _node.isNullable;
-
-  @override
-  Iterable<SourceEdit> get modifications =>
-      isEmpty ? const [] : [SourceEdit(_offset, 0, '@required ')];
-}
-
-/// Interface used by data structures representing potential modifications to
-/// the code being migrated.
-abstract class PotentialModification {
-  bool get isEmpty;
-
-  /// Gets the individual migrations that need to be done, considering the
-  /// solution to the constraint equations.
-  Iterable<SourceEdit> get modifications;
-}
-
-class Variables implements VariableRecorder, VariableRepository {
-  final _decoratedElementTypes = <Element, DecoratedType>{};
-
-  final _decoratedTypeAnnotations =
-      <Source, Map<int, DecoratedTypeAnnotation>>{};
-
-  final _potentialModifications = <Source, List<PotentialModification>>{};
-
-  final NullabilityGraph _graph;
-
-  Variables(this._graph);
-
-  @override
-  DecoratedType decoratedElementType(Element element, {bool create: false}) =>
-      _decoratedElementTypes[element] ??= create
-          ? DecoratedType.forElement(element)
-          : throw StateError('No element found');
-
-  @override
-  DecoratedType decoratedTypeAnnotation(
-      Source source, TypeAnnotation typeAnnotation) {
-    return _decoratedTypeAnnotations[source]
-        [_uniqueOffsetForTypeAnnotation(typeAnnotation)];
-  }
-
-  Map<Source, List<PotentialModification>> getPotentialModifications() =>
-      _potentialModifications;
-
-  @override
-  void recordConditionalDiscard(
-      Source source, AstNode node, ConditionalDiscard conditionalDiscard) {
-    _addPotentialModification(
-        source, ConditionalModification(node, conditionalDiscard));
-  }
-
-  void recordDecoratedElementType(Element element, DecoratedType type) {
-    _decoratedElementTypes[element] = type;
-  }
-
-  void recordDecoratedExpressionType(Expression node, DecoratedType type) {}
-
-  void recordDecoratedTypeAnnotation(
-      Source source, TypeAnnotation node, DecoratedTypeAnnotation type) {
-    _addPotentialModification(source, type);
-    (_decoratedTypeAnnotations[source] ??=
-        {})[_uniqueOffsetForTypeAnnotation(node)] = type;
-  }
-
-  @override
-  void recordExpressionChecks(
-      Source source, Expression expression, ExpressionChecks checks) {
-    _addPotentialModification(source, checks);
-  }
-
-  @override
-  void recordPossiblyOptional(
-      Source source, DefaultFormalParameter parameter, NullabilityNode node) {
-    var modification = PotentiallyAddRequired(parameter, node);
-    _addPotentialModification(source, modification);
-    _addPotentialImport(
-        source, parameter, modification, 'package:meta/meta.dart');
-  }
-
-  void _addPotentialImport(Source source, AstNode node,
-      PotentialModification usage, String importPath) {
-    // Get the compilation unit - assume not null
-    while (node is! CompilationUnit) {
-      node = node.parent;
-    }
-    var unit = node as CompilationUnit;
-
-    // Find an existing import
-    for (var directive in unit.directives) {
-      if (directive is ImportDirective) {
-        if (directive.uri.stringValue == importPath) {
-          return;
-        }
-      }
-    }
-
-    // Add the usage to an existing modification if possible
-    for (var modification in (_potentialModifications[source] ??= [])) {
-      if (modification is PotentiallyAddImport) {
-        if (modification.importPath == importPath) {
-          modification.addUsage(usage);
-          return;
-        }
-      }
-    }
-
-    // Create a new import modification
-    AstNode beforeNode;
-    for (var directive in unit.directives) {
-      if (directive is ImportDirective || directive is ExportDirective) {
-        beforeNode = directive;
-        break;
-      }
-    }
-    if (beforeNode == null) {
-      for (var declaration in unit.declarations) {
-        beforeNode = declaration;
-        break;
-      }
-    }
-    _addPotentialModification(
-        source, PotentiallyAddImport(beforeNode, importPath, usage));
-  }
-
-  void _addPotentialModification(
-      Source source, PotentialModification potentialModification) {
-    (_potentialModifications[source] ??= []).add(potentialModification);
-  }
-
-  int _uniqueOffsetForTypeAnnotation(TypeAnnotation typeAnnotation) =>
-      typeAnnotation is GenericFunctionType
-          ? typeAnnotation.functionKeyword.offset
-          : typeAnnotation.offset;
-}
-
-/// Helper object used by [ConditionalModification] to keep track of AST nodes
-/// within the conditional expression.
-class _KeepNode {
-  final int offset;
-
-  final int end;
-
-  final bool isExpression;
-
-  factory _KeepNode(AstNode node) {
-    int offset = node.offset;
-    int end = node.end;
-    if (node is Block && node.statements.isNotEmpty) {
-      offset = node.statements.beginToken.offset;
-      end = node.statements.endToken.end;
-    }
-    return _KeepNode._(offset, end, node is Expression);
-  }
-
-  _KeepNode._(this.offset, this.end, this.isExpression);
-}
diff --git a/pkg/analysis_server/lib/src/protocol_server.dart b/pkg/analysis_server/lib/src/protocol_server.dart
index e24d2db..07fcdd8 100644
--- a/pkg/analysis_server/lib/src/protocol_server.dart
+++ b/pkg/analysis_server/lib/src/protocol_server.dart
@@ -141,10 +141,6 @@
   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, url: url);
 }
diff --git a/pkg/analysis_server/lib/src/server/driver.dart b/pkg/analysis_server/lib/src/server/driver.dart
index 4aad023..af93a95 100644
--- a/pkg/analysis_server/lib/src/server/driver.dart
+++ b/pkg/analysis_server/lib/src/server/driver.dart
@@ -25,6 +25,7 @@
 import 'package:analyzer/file_system/physical_file_system.dart';
 import 'package:analyzer/instrumentation/file_instrumentation.dart';
 import 'package:analyzer/instrumentation/instrumentation.dart';
+import 'package:analyzer/src/dart/analysis/driver.dart';
 import 'package:analyzer/src/dart/sdk/sdk.dart';
 import 'package:analyzer/src/generated/engine.dart';
 import 'package:analyzer/src/generated/sdk.dart';
@@ -284,6 +285,11 @@
   static const String USE_LSP = "lsp";
 
   /**
+   * The name of the flag to use summary2.
+   */
+  static const String USE_SUMMARY2 = "use-summary2";
+
+  /**
    * A directory to analyze in order to train an analysis server snapshot.
    */
   static const String TRAIN_USING = "train-using";
@@ -333,6 +339,7 @@
     analysisServerOptions.cacheFolder = results[CACHE_FOLDER];
     analysisServerOptions.useFastaParser = results[USE_FASTA_PARSER];
     analysisServerOptions.useLanguageServerProtocol = results[USE_LSP];
+    AnalysisDriver.useSummary2 = results[USE_SUMMARY2];
 
     bool disableAnalyticsForSession = results[SUPPRESS_ANALYTICS_FLAG];
     if (results.wasParsed(TRAIN_USING)) {
@@ -715,6 +722,8 @@
         help: "Whether to enable parsing via the Fasta parser");
     parser.addFlag(USE_LSP,
         defaultsTo: false, help: "Whether to use the Language Server Protocol");
+    parser.addFlag(USE_SUMMARY2,
+        defaultsTo: false, help: "Whether to use summary2");
     parser.addOption(TRAIN_USING,
         help: "Pass in a directory to analyze for purposes of training an "
             "analysis server snapshot.");
diff --git a/pkg/analysis_server/lib/src/utilities/flutter.dart b/pkg/analysis_server/lib/src/utilities/flutter.dart
index 867a30b..f18247a 100644
--- a/pkg/analysis_server/lib/src/utilities/flutter.dart
+++ b/pkg/analysis_server/lib/src/utilities/flutter.dart
@@ -283,6 +283,17 @@
     for (; node != null; node = node.parent) {
       if (isWidgetExpression(node)) {
         var parent = node.parent;
+
+        if (node is AssignmentExpression) {
+          return null;
+        }
+        if (parent is AssignmentExpression) {
+          if (parent.rightHandSide == node) {
+            return node;
+          }
+          return null;
+        }
+
         if (parent is ArgumentList ||
             parent is ExpressionFunctionBody && parent.expression == node ||
             parent is ListLiteral ||
diff --git a/pkg/analysis_server/pubspec.yaml b/pkg/analysis_server/pubspec.yaml
index d9f2c93..c542415 100644
--- a/pkg/analysis_server/pubspec.yaml
+++ b/pkg/analysis_server/pubspec.yaml
@@ -15,6 +15,7 @@
   linter: any
   logging: any
   meta: any
+  nnbd_migration: any
   source_span: any
   package_config: any
   path: any
diff --git a/pkg/analysis_server/test/abstract_single_unit.dart b/pkg/analysis_server/test/abstract_single_unit.dart
index 798bedb..0dbadd0 100644
--- a/pkg/analysis_server/test/abstract_single_unit.dart
+++ b/pkg/analysis_server/test/abstract_single_unit.dart
@@ -10,6 +10,7 @@
 import 'package:analyzer/dart/element/element.dart';
 import 'package:analyzer/error/error.dart';
 import 'package:analyzer/src/dart/ast/element_locator.dart';
+import 'package:analyzer/src/test_utilities/find_node.dart';
 import 'package:analyzer/src/dart/ast/utilities.dart';
 import 'package:analyzer/src/dart/error/hint_codes.dart';
 import 'package:analyzer/src/generated/java_engine.dart';
@@ -28,6 +29,7 @@
   CompilationUnit testUnit;
   CompilationUnitElement testUnitElement;
   LibraryElement testLibraryElement;
+  FindNode findNode;
 
   void addTestSource(String code, [Uri uri]) {
     testCode = code;
@@ -128,6 +130,7 @@
     }
     testUnitElement = testUnit.declaredElement;
     testLibraryElement = testUnitElement.library;
+    findNode = FindNode(code, testUnit);
   }
 
   @override
diff --git a/pkg/analysis_server/test/analysis/get_hover_test.dart b/pkg/analysis_server/test/analysis/get_hover_test.dart
index be52e27..3c1219a 100644
--- a/pkg/analysis_server/test/analysis/get_hover_test.dart
+++ b/pkg/analysis_server/test/analysis/get_hover_test.dart
@@ -3,11 +3,9 @@
 // BSD-style license that can be found in the LICENSE file.
 
 import 'dart:async';
-import 'dart:io';
 
 import 'package:analysis_server/protocol/protocol.dart';
 import 'package:analysis_server/protocol/protocol_generated.dart';
-import 'package:path/path.dart';
 import 'package:test/test.dart';
 import 'package:test_reflective_loader/test_reflective_loader.dart';
 
@@ -22,9 +20,6 @@
 
 @reflectiveTest
 class AnalysisHoverTest extends AbstractAnalysisTest {
-  /// If windows, return 'C:', otherwise return the empty string
-  String get windowsCColon => Platform.isWindows ? 'C:' : '';
-
   Future<HoverInformation> prepareHover(String search) {
     int offset = findOffset(search);
     return prepareHoverAt(offset);
@@ -121,8 +116,7 @@
     expect(hover.offset, findOffset('A(0)'));
     expect(hover.length, 'A(0)'.length);
     // element
-    expect(hover.containingLibraryName,
-        normalize('$windowsCColon/project/bin/test.dart'));
+    expect(hover.containingLibraryName, 'bin/test.dart');
     expect(hover.containingLibraryPath, testFile);
     expect(hover.dartdoc, isNull);
     expect(hover.elementDescription, '(const) A A(int i)');
@@ -147,8 +141,7 @@
     expect(hover.offset, findOffset('A()'));
     expect(hover.length, 'A()'.length);
     // element
-    expect(hover.containingLibraryName,
-        normalize('$windowsCColon/project/bin/test.dart'));
+    expect(hover.containingLibraryName, 'bin/test.dart');
     expect(hover.containingLibraryPath, testFile);
     expect(hover.dartdoc, isNull);
     expect(hover.elementDescription, '(new) A A()');
@@ -174,8 +167,7 @@
     expect(hover.offset, findOffset('new A'));
     expect(hover.length, 'new A()'.length);
     // element
-    expect(hover.containingLibraryName,
-        normalize('$windowsCColon/project/bin/test.dart'));
+    expect(hover.containingLibraryName, 'bin/test.dart');
     expect(hover.containingLibraryPath, testFile);
     expect(hover.dartdoc, isNull);
     expect(hover.elementDescription, 'A A()');
@@ -200,8 +192,7 @@
       expect(hover.offset, findOffset('new A<String>'));
       expect(hover.length, 'new A<String>()'.length);
       // element
-      expect(hover.containingLibraryName,
-          normalize('$windowsCColon/project/bin/test.dart'));
+      expect(hover.containingLibraryName, 'bin/test.dart');
       expect(hover.containingLibraryPath, testFile);
       expect(hover.dartdoc, isNull);
       expect(hover.elementDescription, 'A<String> A()');
@@ -339,8 +330,7 @@
 ''');
     HoverInformation hover = await prepareHover('fff(int a');
     // element
-    expect(hover.containingLibraryName,
-        normalize('$windowsCColon/project/bin/test.dart'));
+    expect(hover.containingLibraryName, 'bin/test.dart');
     expect(hover.containingLibraryPath, testFile);
     expect(hover.containingClassDescription, isNull);
     expect(hover.dartdoc, '''doc aaa\ndoc bbb''');
@@ -367,8 +357,7 @@
 ''');
     HoverInformation hover = await prepareHover('fff);');
     // element
-    expect(hover.containingLibraryName,
-        normalize('$windowsCColon/project/bin/test.dart'));
+    expect(hover.containingLibraryName, 'bin/test.dart');
     expect(hover.containingLibraryPath, testFile);
     expect(hover.containingClassDescription, 'A');
     expect(hover.dartdoc, '''doc aaa\ndoc bbb''');
@@ -506,8 +495,7 @@
 ''');
     HoverInformation hover = await prepareHover('mmm(int a');
     // element
-    expect(hover.containingLibraryName,
-        normalize('$windowsCColon/project/bin/test.dart'));
+    expect(hover.containingLibraryName, 'bin/test.dart');
     expect(hover.containingLibraryPath, testFile);
     expect(hover.containingClassDescription, 'A');
     expect(hover.dartdoc, '''doc aaa\ndoc bbb''');
@@ -536,8 +524,7 @@
     expect(hover.offset, findOffset('mmm(42, '));
     expect(hover.length, 'mmm'.length);
     // element
-    expect(hover.containingLibraryName,
-        normalize('$windowsCColon/project/bin/test.dart'));
+    expect(hover.containingLibraryName, 'bin/test.dart');
     expect(hover.containingLibraryPath, testFile);
     expect(hover.elementDescription, 'List<String> mmm(int a, String b)');
     expect(hover.elementKind, 'method');
@@ -585,8 +572,7 @@
     expect(hover.offset, findOffset('transform(n'));
     expect(hover.length, 'transform'.length);
     // element
-    expect(hover.containingLibraryName,
-        normalize('$windowsCColon/project/bin/test.dart'));
+    expect(hover.containingLibraryName, 'bin/test.dart');
     expect(hover.containingLibraryPath, testFile);
     expect(hover.elementDescription,
         'Stream<S> Stream.transform<S>(StreamTransformer<int, S> streamTransformer)');
diff --git a/pkg/analysis_server/test/integration/support/integration_test_methods.dart b/pkg/analysis_server/test/integration/support/integration_test_methods.dart
index 65c2ca5..cd4df3d 100644
--- a/pkg/analysis_server/test/integration/support/integration_test_methods.dart
+++ b/pkg/analysis_server/test/integration/support/integration_test_methods.dart
@@ -1775,6 +1775,14 @@
    * edits: List<SourceFileEdit>
    *
    *   A list of source edits to apply the recommended changes.
+   *
+   * details: List<String> (optional)
+   *
+   *   Messages that should be displayed to the user that describe details of
+   *   the fix generation. For example, the messages might (a) point out
+   *   details that users might want to explore before committing the changes
+   *   or (b) describe exceptions that were thrown but that did not stop the
+   *   fixes from being produced. The list will be omitted if it is empty.
    */
   Future<EditDartfixResult> sendEditDartfix(List<String> included,
       {List<String> includedFixes,
diff --git a/pkg/analysis_server/test/integration/support/protocol_matchers.dart b/pkg/analysis_server/test/integration/support/protocol_matchers.dart
index 70dc041..2dc3198 100644
--- a/pkg/analysis_server/test/integration/support/protocol_matchers.dart
+++ b/pkg/analysis_server/test/integration/support/protocol_matchers.dart
@@ -172,6 +172,7 @@
  *
  * {
  *   "label": String
+ *   "declaringLibraryUri": String
  *   "element": Element
  *   "defaultArgumentListString": optional String
  *   "defaultArgumentListTextRanges": optional List<int>
@@ -186,6 +187,7 @@
 final Matcher isAvailableSuggestion =
     new LazyMatcher(() => new MatchesJsonObject("AvailableSuggestion", {
           "label": isString,
+          "declaringLibraryUri": isString,
           "element": isElement
         }, optionalFields: {
           "defaultArgumentListString": isString,
@@ -2454,6 +2456,7 @@
  *   "otherSuggestions": List<DartFixSuggestion>
  *   "hasErrors": bool
  *   "edits": List<SourceFileEdit>
+ *   "details": optional List<String>
  * }
  */
 final Matcher isEditDartfixResult =
@@ -2462,6 +2465,8 @@
           "otherSuggestions": isListOf(isDartFixSuggestion),
           "hasErrors": isBool,
           "edits": isListOf(isSourceFileEdit)
+        }, optionalFields: {
+          "details": isListOf(isString)
         }));
 
 /**
diff --git a/pkg/analysis_server/test/lsp/closing_labels_test.dart b/pkg/analysis_server/test/lsp/closing_labels_test.dart
new file mode 100644
index 0000000..0732276
--- /dev/null
+++ b/pkg/analysis_server/test/lsp/closing_labels_test.dart
@@ -0,0 +1,92 @@
+// 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 'package:test_reflective_loader/test_reflective_loader.dart';
+
+import 'server_abstract.dart';
+
+main() {
+  defineReflectiveSuite(() {
+    defineReflectiveTests(ClosingLabelsTest);
+  });
+}
+
+@reflectiveTest
+class ClosingLabelsTest extends AbstractLspAnalysisServerTest {
+  test_afterChange() async {
+    final initialContent = 'main() {}';
+    final updatedContent = '''
+Widget build(BuildContext context) {
+  return new Row(         // Row       1:9
+    children: <Widget>[   // Widget[]  2:14
+      new Text('a'),
+      new Text('b'),
+    ],                    // /Widget[] 5:5
+  );                      // /Row      6:3
+}
+''';
+    await initialize(initializationOptions: {'closingLabels': true});
+
+    final labelsUpdateBeforeChange = waitForClosingLabels(mainFileUri);
+    openFile(mainFileUri, initialContent);
+    final labelsBeforeChange = await labelsUpdateBeforeChange;
+
+    final labelsUpdateAfterChange = waitForClosingLabels(mainFileUri);
+    replaceFile(1, mainFileUri, updatedContent);
+    final labelsAfterChange = await labelsUpdateAfterChange;
+
+    expect(labelsBeforeChange, isEmpty);
+    expect(labelsAfterChange, hasLength(2));
+
+    final first = labelsAfterChange.first;
+    final second = labelsAfterChange.last;
+
+    expect(first.label, equals('Row'));
+    expect(first.range.start.line, equals(1));
+    expect(first.range.start.character, equals(9));
+    expect(first.range.end.line, equals(6));
+    expect(first.range.end.character, equals(3));
+
+    expect(second.label, equals('<Widget>[]'));
+    expect(second.range.start.line, equals(2));
+    expect(second.range.start.character, equals(14));
+    expect(second.range.end.line, equals(5));
+    expect(second.range.end.character, equals(5));
+  }
+
+  test_initial() async {
+    final content = '''
+Widget build(BuildContext context) {
+  return new Row(         // Row       1:9
+    children: <Widget>[   // Widget[]  2:14
+      new Text('a'),
+      new Text('b'),
+    ],                    // /Widget[] 5:5
+  );                      // /Row      6:3
+}
+''';
+    await initialize(initializationOptions: {'closingLabels': true});
+
+    final closingLabelsUpdate = waitForClosingLabels(mainFileUri);
+    openFile(mainFileUri, content);
+    final labels = await closingLabelsUpdate;
+
+    expect(labels, hasLength(2));
+    final first = labels.first;
+    final second = labels.last;
+
+    expect(first.label, equals('Row'));
+    expect(first.range.start.line, equals(1));
+    expect(first.range.start.character, equals(9));
+    expect(first.range.end.line, equals(6));
+    expect(first.range.end.character, equals(3));
+
+    expect(second.label, equals('<Widget>[]'));
+    expect(second.range.start.line, equals(2));
+    expect(second.range.start.character, equals(14));
+    expect(second.range.end.line, equals(5));
+    expect(second.range.end.character, equals(5));
+  }
+}
diff --git a/pkg/analysis_server/test/lsp/completion_test.dart b/pkg/analysis_server/test/lsp/completion_test.dart
index 8a378f4..4e7b84b 100644
--- a/pkg/analysis_server/test/lsp/completion_test.dart
+++ b/pkg/analysis_server/test/lsp/completion_test.dart
@@ -217,7 +217,8 @@
     final res = await getCompletion(mainFileUri, positionFromMarker(content));
     expect(res.any((c) => c.label == 'abcdefghij'), isTrue);
     final item = res.singleWhere((c) => c.label == 'abcdefghij');
-    expect(item.insertTextFormat, equals(InsertTextFormat.PlainText));
+    expect(item.insertTextFormat,
+        anyOf(equals(InsertTextFormat.PlainText), isNull));
     // ignore: deprecated_member_use_from_same_package
     expect(item.insertText, anyOf(equals('abcdefghij'), isNull));
     final updated = applyTextEdits(withoutMarkers(content), [item.textEdit]);
@@ -227,7 +228,10 @@
   test_suggestionSets() async {
     newFile(
       join(projectFolderPath, 'other_file.dart'),
-      content: 'class InOtherFile {}',
+      content: '''
+      /// This class is in another file.
+      class InOtherFile {}
+      ''',
     );
 
     final content = '''
@@ -248,6 +252,10 @@
     final completion = res.singleWhere((c) => c.label == 'InOtherFile');
     expect(completion, isNotNull);
 
+    // Expect no docs or text edit, since these are added during resolve.
+    expect(completion.documentation, isNull);
+    expect(completion.textEdit, isNull);
+
     // Resolve the completion item (via server) to get its edits. This is the
     // LSP's equiv of getSuggestionDetails() and is invoked by LSP clients to
     // populate additional info (in our case, the additional edits for inserting
@@ -259,6 +267,15 @@
     expect(
         resolved.detail, startsWith("Auto import from '../other_file.dart'"));
 
+    // Ensure the doc comment was added.
+    expect(
+      resolved.documentation.valueEquals('This class is in another file.'),
+      isTrue,
+    );
+
+    // Ensure the edit was added on.
+    expect(resolved.textEdit, isNotNull);
+
     // There should be no command for this item because it doesn't need imports
     // in other files. Same-file completions are in additionalEdits.
     expect(resolved.command, isNull);
@@ -445,7 +462,8 @@
     final res = await getCompletion(mainFileUri, positionFromMarker(content));
     expect(res.any((c) => c.label == 'abcdefghij'), isTrue);
     final item = res.singleWhere((c) => c.label == 'abcdefghij');
-    expect(item.insertTextFormat, equals(InsertTextFormat.PlainText));
+    expect(item.insertTextFormat,
+        anyOf(equals(InsertTextFormat.PlainText), isNull));
     // ignore: deprecated_member_use_from_same_package
     expect(item.insertText, anyOf(equals('abcdefghij'), isNull));
     final updated = applyTextEdits(withoutMarkers(content), [item.textEdit]);
diff --git a/pkg/analysis_server/test/lsp/hover_test.dart b/pkg/analysis_server/test/lsp/hover_test.dart
index 7f06e69..957b16f 100644
--- a/pkg/analysis_server/test/lsp/hover_test.dart
+++ b/pkg/analysis_server/test/lsp/hover_test.dart
@@ -2,11 +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 'dart:io';
-
 import 'package:analysis_server/lsp_protocol/protocol_generated.dart';
 import 'package:analysis_server/src/lsp/constants.dart';
-import 'package:path/path.dart' as path;
 import 'package:test/test.dart';
 import 'package:test_reflective_loader/test_reflective_loader.dart';
 
@@ -21,9 +18,6 @@
 
 @reflectiveTest
 class HoverTest extends AbstractLspAnalysisServerTest {
-  /// If windows, return 'C:/', otherwise return the empty string
-  String get windowsCColon => Platform.isWindows ? 'C:/' : '';
-
   test_dartDoc_macros() async {
     final content = '''
     /// {@template template_name}
@@ -69,14 +63,11 @@
     String [[a^bc]];
     ''';
 
-    final containingLibraryName =
-        path.normalize("$windowsCColon/project/lib/main.dart");
-
     final expectedHoverContent = '''
 ```dart
 String abc
 ```
-*$containingLibraryName*
+*lib/main.dart*
 
 ---
 This is a string.
@@ -172,14 +163,11 @@
     String [[a^bc]];
     ''';
 
-    final containingLibraryName =
-        path.normalize("$windowsCColon/project/lib/main.dart");
-
     final expectedHoverContent = '''
 ```dart
 String abc
 ```
-*$containingLibraryName*
+*lib/main.dart*
     '''
         .trim();
 
diff --git a/pkg/analysis_server/test/lsp/server_abstract.dart b/pkg/analysis_server/test/lsp/server_abstract.dart
index d2e229f..a531618 100644
--- a/pkg/analysis_server/test/lsp/server_abstract.dart
+++ b/pkg/analysis_server/test/lsp/server_abstract.dart
@@ -486,6 +486,20 @@
     return expectSuccessfulResponseTo<SignatureHelp>(request);
   }
 
+  Future<Location> getSuper(
+    Uri uri,
+    Position pos,
+  ) {
+    final request = makeRequest(
+      CustomMethods.Super,
+      new TextDocumentPositionParams(
+        new TextDocumentIdentifier(uri.toString()),
+        pos,
+      ),
+    );
+    return expectSuccessfulResponseTo<Location>(request);
+  }
+
   /// Executes [f] then waits for a request of type [method] from the server which
   /// is passed to [handler] to process, then waits for (and returns) the
   /// response to the original request.
@@ -739,14 +753,8 @@
     await serverToClient.firstWhere((message) {
       if (message is NotificationMessage &&
           message.method == Method.textDocument_publishDiagnostics) {
-        // This helper method is used both in in-process tests where we'll get
-        // the real type back, and out-of-process integration tests where
-        // params is `Map<String, dynamic>` so for convenience just
-        // handle either here.
-        diagnosticParams = message.params is PublishDiagnosticsParams
-            ? message.params
-            : PublishDiagnosticsParams.fromJson(message.params);
-
+        diagnosticParams =
+            _convertParams(message, PublishDiagnosticsParams.fromJson);
         return diagnosticParams.uri == uri.toString();
       }
       return false;
@@ -754,6 +762,31 @@
     return diagnosticParams.diagnostics;
   }
 
+  /// A helper to simplify processing of results for both in-process tests (where
+  /// we'll get the real type back), and out-of-process integration tests (where
+  /// params is `Map<String, dynamic>` and needs to be fromJson'd).
+  T _convertParams<T>(
+    IncomingMessage message,
+    T Function(Map<String, dynamic>) fromJson,
+  ) {
+    return message.params is T ? message.params : fromJson(message.params);
+  }
+
+  Future<List<ClosingLabel>> waitForClosingLabels(Uri uri) async {
+    PublishClosingLabelsParams closingLabelsParams;
+    await serverToClient.firstWhere((message) {
+      if (message is NotificationMessage &&
+          message.method == CustomMethods.PublishClosingLabels) {
+        closingLabelsParams =
+            _convertParams(message, PublishClosingLabelsParams.fromJson);
+
+        return closingLabelsParams.uri == uri.toString();
+      }
+      return false;
+    });
+    return closingLabelsParams.labels;
+  }
+
   Future<AnalyzerStatusParams> waitForAnalysisStart() =>
       waitForAnalysisStatus(true);
 
@@ -765,13 +798,7 @@
     await serverToClient.firstWhere((message) {
       if (message is NotificationMessage &&
           message.method == CustomMethods.AnalyzerStatus) {
-        // This helper method is used both in in-process tests where we'll get
-        // the real type back, and out-of-process integration tests where
-        // params is `Map<String, dynamic>` so for convenience just
-        // handle either here.
-        params = message.params is AnalyzerStatusParams
-            ? message.params
-            : AnalyzerStatusParams.fromJson(message.params);
+        params = _convertParams(message, AnalyzerStatusParams.fromJson);
         return params.isAnalyzing == analyzing;
       }
       return false;
diff --git a/pkg/analysis_server/test/lsp/super_test.dart b/pkg/analysis_server/test/lsp/super_test.dart
new file mode 100644
index 0000000..d1bc684
--- /dev/null
+++ b/pkg/analysis_server/test/lsp/super_test.dart
@@ -0,0 +1,146 @@
+// 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/lsp_protocol/protocol_generated.dart';
+import 'package:test/test.dart';
+import 'package:test_reflective_loader/test_reflective_loader.dart';
+
+import 'server_abstract.dart';
+
+main() {
+  defineReflectiveSuite(() {
+    defineReflectiveTests(SuperTest);
+  });
+}
+
+@reflectiveTest
+class SuperTest extends AbstractLspAnalysisServerTest {
+  test_className() async {
+    final content = '''
+class A {}
+
+class [[B]] extends A {}
+
+class C^ extends B {}
+''';
+    await initialize();
+    await openFile(mainFileUri, withoutMarkers(content));
+    final res = await getSuper(
+      mainFileUri,
+      positionFromMarker(content),
+    );
+
+    expect(
+        res,
+        equals(
+            new Location(mainFileUri.toString(), rangeFromMarkers(content))));
+  }
+
+  test_insideClass() async {
+    final content = '''
+class A {}
+
+class [[B]] extends A {}
+
+class C extends B {
+  ^
+}
+''';
+    await initialize();
+    await openFile(mainFileUri, withoutMarkers(content));
+    final res = await getSuper(
+      mainFileUri,
+      positionFromMarker(content),
+    );
+
+    expect(
+        res,
+        equals(
+            new Location(mainFileUri.toString(), rangeFromMarkers(content))));
+  }
+
+  test_insideMethod() async {
+    final content = '''
+class A {
+  void [[foo]]() {}
+}
+
+class B extends A {}
+
+class C extends B {
+  @override
+  void foo() {
+    // fo^oC
+  }
+}
+''';
+    await initialize();
+    await openFile(mainFileUri, withoutMarkers(content));
+    final res = await getSuper(
+      mainFileUri,
+      positionFromMarker(content),
+    );
+
+    expect(
+        res,
+        equals(
+            new Location(mainFileUri.toString(), rangeFromMarkers(content))));
+  }
+
+  test_methodName() async {
+    final content = '''
+class A {
+  void [[foo]]() {}
+}
+
+class B extends A {}
+
+class C extends B {
+  @override
+  void fo^o() {
+    // fooC
+  }
+}
+''';
+    await initialize();
+    await openFile(mainFileUri, withoutMarkers(content));
+    final res = await getSuper(
+      mainFileUri,
+      positionFromMarker(content),
+    );
+
+    expect(
+        res,
+        equals(
+            new Location(mainFileUri.toString(), rangeFromMarkers(content))));
+  }
+
+  test_methodReturnType() async {
+    final content = '''
+class A {
+  void [[foo]]() {}
+}
+
+class B extends A {}
+
+class C extends B {
+  @override
+  vo^id foo() {
+    // fooC
+  }
+}
+''';
+    await initialize();
+    await openFile(mainFileUri, withoutMarkers(content));
+    final res = await getSuper(
+      mainFileUri,
+      positionFromMarker(content),
+    );
+
+    expect(
+        res,
+        equals(
+            new Location(mainFileUri.toString(), rangeFromMarkers(content))));
+  }
+}
diff --git a/pkg/analysis_server/test/lsp/test_all.dart b/pkg/analysis_server/test/lsp/test_all.dart
index 7973bac..f1cc08c 100644
--- a/pkg/analysis_server/test/lsp/test_all.dart
+++ b/pkg/analysis_server/test/lsp/test_all.dart
@@ -9,6 +9,7 @@
 import 'cancel_request_test.dart' as cancel_request;
 import 'change_workspace_folders_test.dart' as change_workspace_folders;
 import 'code_actions_assists_test.dart' as code_actions_assists;
+import 'closing_labels_test.dart' as closing_labels;
 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;
@@ -19,6 +20,7 @@
 import 'file_modification_test.dart' as file_modification;
 import 'folding_test.dart' as folding;
 import 'format_test.dart' as format;
+import 'super_test.dart' as get_super;
 import 'hover_test.dart' as hover;
 import 'implementation_test.dart' as implementation;
 import 'initialization_test.dart' as initialization;
@@ -35,6 +37,7 @@
     analyzer_status.main();
     cancel_request.main();
     change_workspace_folders.main();
+    closing_labels.main();
     code_actions_assists.main();
     code_actions_fixes.main();
     code_actions_source.main();
@@ -46,6 +49,7 @@
     file_modification.main();
     folding.main();
     format.main();
+    get_super.main();
     hover.main();
     implementation.main();
     initialization.main();
diff --git a/pkg/analysis_server/test/protocol_server_test.dart b/pkg/analysis_server/test/protocol_server_test.dart
index 7bc7663..07e7073 100644
--- a/pkg/analysis_server/test/protocol_server_test.dart
+++ b/pkg/analysis_server/test/protocol_server_test.dart
@@ -304,6 +304,9 @@
   }
 
   @override
+  bool get hasPublishedDocs => false;
+
+  @override
   bool get isUnresolvedIdentifier => false;
 
   @override
diff --git a/pkg/analysis_server/test/src/domains/completion/available_suggestion_sets_test.dart b/pkg/analysis_server/test/src/domains/completion/available_suggestion_sets_test.dart
index d94ac33..a6f62cf 100644
--- a/pkg/analysis_server/test/src/domains/completion/available_suggestion_sets_test.dart
+++ b/pkg/analysis_server/test/src/domains/completion/available_suggestion_sets_test.dart
@@ -61,6 +61,7 @@
     assertJsonText(_getSuggestion(set, 'A'), '''
 {
   "label": "A",
+  "declaringLibraryUri": "package:test/a.dart",
   "element": {
     "kind": "CLASS",
     "name": "A",
@@ -82,6 +83,7 @@
     assertJsonText(_getSuggestion(set, 'A.a'), '''
 {
   "label": "A.a",
+  "declaringLibraryUri": "package:test/a.dart",
   "element": {
     "kind": "CONSTRUCTOR",
     "name": "a",
@@ -118,6 +120,7 @@
     assertJsonText(_getSuggestion(set, 'MyEnum'), '''
 {
   "label": "MyEnum",
+  "declaringLibraryUri": "package:test/a.dart",
   "element": {
     "kind": "ENUM",
     "name": "MyEnum",
@@ -139,6 +142,7 @@
     assertJsonText(_getSuggestion(set, 'MyEnum.aaa'), '''
 {
   "label": "MyEnum.aaa",
+  "declaringLibraryUri": "package:test/a.dart",
   "element": {
     "kind": "ENUM_CONSTANT",
     "name": "aaa",
@@ -160,6 +164,7 @@
     assertJsonText(_getSuggestion(set, 'MyEnum.bbb'), '''
 {
   "label": "MyEnum.bbb",
+  "declaringLibraryUri": "package:test/a.dart",
   "element": {
     "kind": "ENUM_CONSTANT",
     "name": "bbb",
@@ -195,6 +200,7 @@
     assertJsonText(_getSuggestion(set, 'boolV'), '''
 {
   "label": "boolV",
+  "declaringLibraryUri": "package:test/a.dart",
   "element": {
     "kind": "TOP_LEVEL_VARIABLE",
     "name": "boolV",
@@ -217,6 +223,7 @@
     assertJsonText(_getSuggestion(set, 'intV'), '''
 {
   "label": "intV",
+  "declaringLibraryUri": "package:test/a.dart",
   "element": {
     "kind": "TOP_LEVEL_VARIABLE",
     "name": "intV",
@@ -239,6 +246,7 @@
     assertJsonText(_getSuggestion(set, 'doubleV'), '''
 {
   "label": "doubleV",
+  "declaringLibraryUri": "package:test/a.dart",
   "element": {
     "kind": "TOP_LEVEL_VARIABLE",
     "name": "doubleV",
@@ -261,6 +269,7 @@
     assertJsonText(_getSuggestion(set, 'stringV'), '''
 {
   "label": "stringV",
+  "declaringLibraryUri": "package:test/a.dart",
   "element": {
     "kind": "TOP_LEVEL_VARIABLE",
     "name": "stringV",
diff --git a/pkg/analysis_server/test/src/services/correction/assist/flutter_wrap_center_test.dart b/pkg/analysis_server/test/src/services/correction/assist/flutter_wrap_center_test.dart
index 4e1af86..caca61e 100644
--- a/pkg/analysis_server/test/src/services/correction/assist/flutter_wrap_center_test.dart
+++ b/pkg/analysis_server/test/src/services/correction/assist/flutter_wrap_center_test.dart
@@ -82,6 +82,26 @@
 ''');
   }
 
+  test_assignment() async {
+    addFlutterPackage();
+    await resolveTestUnit('''
+import 'package:flutter/widgets.dart';
+
+main() {
+  Widget w;
+  w = /*caret*/Container();
+}
+''');
+    await assertHasAssist('''
+import 'package:flutter/widgets.dart';
+
+main() {
+  Widget w;
+  w = Center(child: Container());
+}
+''');
+  }
+
   test_expressionFunctionBody() async {
     addFlutterPackage();
     await resolveTestUnit('''
diff --git a/pkg/analysis_server/test/src/test_all.dart b/pkg/analysis_server/test/src/test_all.dart
index 86eb450..a45add5 100644
--- a/pkg/analysis_server/test/src/test_all.dart
+++ b/pkg/analysis_server/test/src/test_all.dart
@@ -9,7 +9,6 @@
 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;
@@ -25,7 +24,6 @@
     domains.main();
     flutter.main();
     lsp.main();
-    nullability.main();
     plugin.main();
     services.main();
     utilities.main();
diff --git a/pkg/analysis_server/test/src/utilities/flutter_test.dart b/pkg/analysis_server/test/src/utilities/flutter_test.dart
index 5a558ac..cad467a 100644
--- a/pkg/analysis_server/test/src/utilities/flutter_test.dart
+++ b/pkg/analysis_server/test/src/utilities/flutter_test.dart
@@ -279,6 +279,36 @@
     expect(flutter.identifyWidgetExpression(expression), expression);
   }
 
+  test_identifyWidgetExpression_parent_assignmentExpression() async {
+    await resolveTestUnit('''
+import 'package:flutter/widgets.dart';
+
+main() {
+  Widget text;
+  text = Text('abc');
+}
+
+void useWidget(Widget w) {}
+''');
+    // Assignment itself.
+    {
+      var expression = findNode.simple('text =');
+      expect(flutter.identifyWidgetExpression(expression), isNull);
+    }
+
+    // Left hand side.
+    {
+      var expression = findNode.assignment('text =');
+      expect(flutter.identifyWidgetExpression(expression), isNull);
+    }
+
+    // Right hand side.
+    {
+      var expression = findNode.instanceCreation('Text(');
+      expect(flutter.identifyWidgetExpression(expression), expression);
+    }
+  }
+
   test_identifyWidgetExpression_parent_expressionFunctionBody() async {
     await resolveTestUnit('''
 import 'package:flutter/widgets.dart';
diff --git a/pkg/analysis_server/tool/lsp_spec/README.md b/pkg/analysis_server/tool/lsp_spec/README.md
index f44d5ea..d0cd4be 100644
--- a/pkg/analysis_server/tool/lsp_spec/README.md
+++ b/pkg/analysis_server/tool/lsp_spec/README.md
@@ -20,6 +20,7 @@
 
 - `onlyAnalyzeProjectsWithOpenFiles`: When set to `true`, analysis will only be performed for projects that have open files rather than the root workspace folder. Defaults to `false`.
 - `suggestFromUnimportedLibraries`: When set to `false`, completion will not include synbols that are not already imported into the current file. Defaults to `true`, though the client must additionally support `workspace/applyEdit` for these completions to be included.
+- `closingLabels`: When set to `true`, `dart/textDocument/publishClosingLabels` notifications will be sent with information to render editor closing labels.
 
 ## Method Status
 
@@ -98,9 +99,24 @@
 
 Starts the analzyer diagnostics server (if not already running) and returns the port number it's listening on.
 
+### dart/textDocument/super Method
+
+Direction: Client -> Server
+Params: `TextDocumentPositionParams`
+Returns: `Location | null`
+
+Returns the location of the super definition of the class or method at the provided position or `null` if there isn't one.
+
 ### $/analyzerStatus Notification
 
 Direction: Server -> Client
 Params: `{ isAnalyzing: boolean }`
 
 Notifies the client when analysis starts/completes.
+
+### dart/textDocument/publishClosingLabels Notification
+
+Direction: Server -> Client
+Params: `{ uri: string, abels: { label: string, range: Range }[] }`
+
+Notifies the client when closing label information is available (or updated) for a file.
diff --git a/pkg/analysis_server/tool/lsp_spec/codegen_dart.dart b/pkg/analysis_server/tool/lsp_spec/codegen_dart.dart
index 2967651..cbaec69 100644
--- a/pkg/analysis_server/tool/lsp_spec/codegen_dart.dart
+++ b/pkg/analysis_server/tool/lsp_spec/codegen_dart.dart
@@ -34,8 +34,7 @@
       name != 'ResourceOperationKind';
 }
 
-String generateDartForTypes(List<AstNode> types) {
-  // Keep maps of items we may need to look up quickly later.
+void recordTypes(List<AstNode> types) {
   types
       .whereType<TypeAlias>()
       .forEach((alias) => _typeAliases[alias.name] = alias);
@@ -51,6 +50,9 @@
   types
       .whereType<Namespace>()
       .forEach((namespace) => _namespaces[namespace.name] = namespace);
+}
+
+String generateDartForTypes(List<AstNode> types) {
   final buffer = new IndentableStringBuffer();
   _getSorted(types).forEach((t) => _writeType(buffer, t));
   final formattedCode = _formatCode(buffer.toString());
diff --git a/pkg/analysis_server/tool/lsp_spec/generate_all.dart b/pkg/analysis_server/tool/lsp_spec/generate_all.dart
index 00cd091..08a111d 100644
--- a/pkg/analysis_server/tool/lsp_spec/generate_all.dart
+++ b/pkg/analysis_server/tool/lsp_spec/generate_all.dart
@@ -6,9 +6,8 @@
 import 'dart:io';
 
 import 'package:analysis_server/src/services/correction/strings.dart';
-import 'package:http/http.dart' as http;
-
 import 'package:args/args.dart';
+import 'package:http/http.dart' as http;
 import 'package:path/path.dart' as path;
 
 import 'codegen_dart.dart';
@@ -40,11 +39,27 @@
   final String outFolder = path.join(packageFolder, 'lib', 'lsp_protocol');
   new Directory(outFolder).createSync();
 
-  await writeCustomClasses(args, outFolder);
-  await writeSpecClasses(args, outFolder);
+  // Collect definitions for types in the spec and our custom extensions.
+  final specTypes = await getSpecClasses(args);
+  final customTypes = getCustomClasses();
+
+  // Record both sets of types in dictionaries for faster lookups, but also so
+  // they can reference each other and we can find the definitions during
+  // codegen.
+  recordTypes(specTypes);
+  recordTypes(customTypes);
+
+  // Generate formatted Dart code (as a string) for each set of types.
+  final String specTypesOutput = generateDartForTypes(specTypes);
+  final String customTypesOutput = generateDartForTypes(customTypes);
+
+  new File(path.join(outFolder, 'protocol_generated.dart')).writeAsStringSync(
+      generatedFileHeader(2018, importCustom: true) + specTypesOutput);
+  new File(path.join(outFolder, 'protocol_custom_generated.dart'))
+      .writeAsStringSync(generatedFileHeader(2019) + customTypesOutput);
 }
 
-Future writeSpecClasses(ArgResults args, String outFolder) async {
+Future<List<AstNode>> getSpecClasses(ArgResults args) async {
   if (args[argDownload]) {
     await downloadSpec();
   }
@@ -63,42 +78,45 @@
   // Extract additional inline types that are specificed online in the `results`
   // section of the doc.
   types.addAll(extractResultsInlineTypes(spec));
-
-  final String output = generateDartForTypes(types);
-
-  new File(path.join(outFolder, 'protocol_generated.dart')).writeAsStringSync(
-      generatedFileHeader(2018, importCustom: true) + output);
+  return types;
 }
 
-/// Writes classes used by Dart's custom LSP methods.
-Future writeCustomClasses(ArgResults args, String outFolder) async {
+List<AstNode> getCustomClasses() {
   interface(String name, List<Member> fields) {
     return new Interface(null, Token.identifier(name), [], [], fields);
   }
 
-  field(String name, {String type, canBeNull: false, canBeUndefined: false}) {
-    return new Field(null, Token.identifier(name), Type.identifier(type),
-        canBeNull, canBeUndefined);
+  field(String name,
+      {String type, array: false, canBeNull: false, canBeUndefined: false}) {
+    var fieldType =
+        array ? ArrayType(Type.identifier(type)) : Type.identifier(type);
+
+    return new Field(
+        null, Token.identifier(name), fieldType, canBeNull, canBeUndefined);
   }
 
   final List<AstNode> customTypes = [
     interface('DartDiagnosticServer', [field('port', type: 'number')]),
     interface('AnalyzerStatusParams', [field('isAnalyzing', type: 'boolean')]),
+    interface('PublishClosingLabelsParams', [
+      field('uri', type: 'string'),
+      field('labels', type: 'ClosingLabel', array: true)
+    ]),
+    interface('ClosingLabel',
+        [field('range', type: 'Range'), field('label', type: 'string')]),
     interface(
       'CompletionItemResolutionInfo',
       [
         field('file', type: 'string'),
         field('offset', type: 'number'),
-        field('libraryId', type: 'number'),
-        field('autoImportDisplayUri', type: 'string')
+        field('libId', type: 'number'),
+        field('displayUri', type: 'string'),
+        field('rOffset', type: 'number'),
+        field('rLength', type: 'number')
       ],
     ),
   ];
-
-  final String output = generateDartForTypes(customTypes);
-
-  new File(path.join(outFolder, 'protocol_custom_generated.dart'))
-      .writeAsStringSync(generatedFileHeader(2019) + output);
+  return customTypes;
 }
 
 Namespace extractMethodsEnum(String spec) {
@@ -140,11 +158,12 @@
 // ignore_for_file: deprecated_member_use_from_same_package
 // ignore_for_file: unnecessary_brace_in_string_interps
 // ignore_for_file: unused_import
+// ignore_for_file: unused_shown_name
 
 import 'dart:core' hide deprecated;
 import 'dart:core' as core show deprecated;
 import 'dart:convert' show JsonEncoder;
-${importCustom ? "import 'package:analysis_server/lsp_protocol/protocol_custom_generated.dart';" : ''}
+import 'package:analysis_server/lsp_protocol/protocol${importCustom ? '_custom' : ''}_generated.dart';
 import 'package:analysis_server/lsp_protocol/protocol_special.dart';
 import 'package:analysis_server/src/protocol/protocol_internal.dart'
     show listEqual, mapEqual;
diff --git a/pkg/analysis_server/tool/spec/generated/java/types/AvailableSuggestion.java b/pkg/analysis_server/tool/spec/generated/java/types/AvailableSuggestion.java
index 488d3c9..fb4704b 100644
--- a/pkg/analysis_server/tool/spec/generated/java/types/AvailableSuggestion.java
+++ b/pkg/analysis_server/tool/spec/generated/java/types/AvailableSuggestion.java
@@ -42,6 +42,12 @@
   private final String label;
 
   /**
+   * The URI of the library that declares the element being suggested, not the URI of the library
+   * associated with the enclosing AvailableSuggestionSet.
+   */
+  private final String declaringLibraryUri;
+
+  /**
    * Information about the element reference being suggested.
    */
   private final Element element;
@@ -96,8 +102,9 @@
   /**
    * Constructor for {@link AvailableSuggestion}.
    */
-  public AvailableSuggestion(String label, Element element, String defaultArgumentListString, int[] defaultArgumentListTextRanges, String docComplete, String docSummary, List<String> parameterNames, List<String> parameterTypes, List<String> relevanceTags, Integer requiredParameterCount) {
+  public AvailableSuggestion(String label, String declaringLibraryUri, Element element, String defaultArgumentListString, int[] defaultArgumentListTextRanges, String docComplete, String docSummary, List<String> parameterNames, List<String> parameterTypes, List<String> relevanceTags, Integer requiredParameterCount) {
     this.label = label;
+    this.declaringLibraryUri = declaringLibraryUri;
     this.element = element;
     this.defaultArgumentListString = defaultArgumentListString;
     this.defaultArgumentListTextRanges = defaultArgumentListTextRanges;
@@ -115,6 +122,7 @@
       AvailableSuggestion other = (AvailableSuggestion) obj;
       return
         ObjectUtilities.equals(other.label, label) &&
+        ObjectUtilities.equals(other.declaringLibraryUri, declaringLibraryUri) &&
         ObjectUtilities.equals(other.element, element) &&
         ObjectUtilities.equals(other.defaultArgumentListString, defaultArgumentListString) &&
         Arrays.equals(other.defaultArgumentListTextRanges, defaultArgumentListTextRanges) &&
@@ -130,6 +138,7 @@
 
   public static AvailableSuggestion fromJson(JsonObject jsonObject) {
     String label = jsonObject.get("label").getAsString();
+    String declaringLibraryUri = jsonObject.get("declaringLibraryUri").getAsString();
     Element element = Element.fromJson(jsonObject.get("element").getAsJsonObject());
     String defaultArgumentListString = jsonObject.get("defaultArgumentListString") == null ? null : jsonObject.get("defaultArgumentListString").getAsString();
     int[] defaultArgumentListTextRanges = jsonObject.get("defaultArgumentListTextRanges") == null ? null : JsonUtilities.decodeIntArray(jsonObject.get("defaultArgumentListTextRanges").getAsJsonArray());
@@ -139,7 +148,7 @@
     List<String> parameterTypes = jsonObject.get("parameterTypes") == null ? null : JsonUtilities.decodeStringList(jsonObject.get("parameterTypes").getAsJsonArray());
     List<String> relevanceTags = jsonObject.get("relevanceTags") == null ? null : JsonUtilities.decodeStringList(jsonObject.get("relevanceTags").getAsJsonArray());
     Integer requiredParameterCount = jsonObject.get("requiredParameterCount") == null ? null : jsonObject.get("requiredParameterCount").getAsInt();
-    return new AvailableSuggestion(label, element, defaultArgumentListString, defaultArgumentListTextRanges, docComplete, docSummary, parameterNames, parameterTypes, relevanceTags, requiredParameterCount);
+    return new AvailableSuggestion(label, declaringLibraryUri, element, defaultArgumentListString, defaultArgumentListTextRanges, docComplete, docSummary, parameterNames, parameterTypes, relevanceTags, requiredParameterCount);
   }
 
   public static List<AvailableSuggestion> fromJsonArray(JsonArray jsonArray) {
@@ -155,6 +164,14 @@
   }
 
   /**
+   * The URI of the library that declares the element being suggested, not the URI of the library
+   * associated with the enclosing AvailableSuggestionSet.
+   */
+  public String getDeclaringLibraryUri() {
+    return declaringLibraryUri;
+  }
+
+  /**
    * A default String for use in generating argument list source contents on the client side.
    */
   public String getDefaultArgumentListString() {
@@ -235,6 +252,7 @@
   public int hashCode() {
     HashCodeBuilder builder = new HashCodeBuilder();
     builder.append(label);
+    builder.append(declaringLibraryUri);
     builder.append(element);
     builder.append(defaultArgumentListString);
     builder.append(defaultArgumentListTextRanges);
@@ -250,6 +268,7 @@
   public JsonObject toJson() {
     JsonObject jsonObject = new JsonObject();
     jsonObject.addProperty("label", label);
+    jsonObject.addProperty("declaringLibraryUri", declaringLibraryUri);
     jsonObject.add("element", element.toJson());
     if (defaultArgumentListString != null) {
       jsonObject.addProperty("defaultArgumentListString", defaultArgumentListString);
@@ -300,6 +319,8 @@
     builder.append("[");
     builder.append("label=");
     builder.append(label + ", ");
+    builder.append("declaringLibraryUri=");
+    builder.append(declaringLibraryUri + ", ");
     builder.append("element=");
     builder.append(element + ", ");
     builder.append("defaultArgumentListString=");
diff --git a/pkg/analysis_server/tool/spec/spec_input.html b/pkg/analysis_server/tool/spec/spec_input.html
index e49442e..14ed664 100644
--- a/pkg/analysis_server/tool/spec/spec_input.html
+++ b/pkg/analysis_server/tool/spec/spec_input.html
@@ -7,7 +7,7 @@
 <body>
 <h1>Analysis Server API Specification</h1>
 <h1 style="color:#999999">Version
-  <version>1.27.0</version>
+  <version>1.27.1</version>
 </h1>
 <p>
   This document contains a specification of the API provided by the
@@ -2253,6 +2253,18 @@
           A list of source edits to apply the recommended changes.
         </p>
       </field>
+      <field name="details" optional="true">
+        <list>
+          <ref>String</ref>
+        </list>
+        <p>
+          Messages that should be displayed to the user that describe details of
+          the fix generation. For example, the messages might (a) point out
+          details that users might want to explore before committing the changes
+          or (b) describe exceptions that were thrown but that did not stop the
+          fixes from being produced. The list will be omitted if it is empty.
+        </p>
+      </field>
     </result>
   </request>
   <request method="getFixes">
@@ -3598,6 +3610,14 @@
           The identifier to present to the user for code completion.
         </p>
       </field>
+      <field name="declaringLibraryUri">
+        <ref>String</ref>
+        <p>
+          The URI of the library that declares the element being suggested,
+          not the URI of the library associated with the enclosing
+          <tt>AvailableSuggestionSet</tt>.
+        </p>
+      </field>
       <field name="element">
         <ref>Element</ref>
         <p>
diff --git a/pkg/analysis_server_client/lib/src/protocol/protocol_constants.dart b/pkg/analysis_server_client/lib/src/protocol/protocol_constants.dart
index b944f0f..2d93ddb 100644
--- a/pkg/analysis_server_client/lib/src/protocol/protocol_constants.dart
+++ b/pkg/analysis_server_client/lib/src/protocol/protocol_constants.dart
@@ -6,7 +6,7 @@
 // To regenerate the file, use the script
 // "pkg/analysis_server/tool/spec/generate_files".
 
-const String PROTOCOL_VERSION = '1.27.0';
+const String PROTOCOL_VERSION = '1.27.1';
 
 const String ANALYSIS_NOTIFICATION_ANALYZED_FILES = 'analysis.analyzedFiles';
 const String ANALYSIS_NOTIFICATION_ANALYZED_FILES_DIRECTORIES = 'directories';
@@ -218,6 +218,7 @@
 const String EDIT_REQUEST_ORGANIZE_DIRECTIVES_FILE = 'file';
 const String EDIT_REQUEST_SORT_MEMBERS = 'edit.sortMembers';
 const String EDIT_REQUEST_SORT_MEMBERS_FILE = 'file';
+const String EDIT_RESPONSE_DARTFIX_DETAILS = 'details';
 const String EDIT_RESPONSE_DARTFIX_EDITS = 'edits';
 const String EDIT_RESPONSE_DARTFIX_HAS_ERRORS = 'hasErrors';
 const String EDIT_RESPONSE_DARTFIX_OTHER_SUGGESTIONS = 'otherSuggestions';
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 44ef533e..23f7303 100644
--- a/pkg/analysis_server_client/lib/src/protocol/protocol_generated.dart
+++ b/pkg/analysis_server_client/lib/src/protocol/protocol_generated.dart
@@ -5075,6 +5075,7 @@
  *
  * {
  *   "label": String
+ *   "declaringLibraryUri": String
  *   "element": Element
  *   "defaultArgumentListString": optional String
  *   "defaultArgumentListTextRanges": optional List<int>
@@ -5091,6 +5092,8 @@
 class AvailableSuggestion implements HasToJson {
   String _label;
 
+  String _declaringLibraryUri;
+
   Element _element;
 
   String _defaultArgumentListString;
@@ -5123,6 +5126,21 @@
   }
 
   /**
+   * The URI of the library that declares the element being suggested, not the
+   * URI of the library associated with the enclosing AvailableSuggestionSet.
+   */
+  String get declaringLibraryUri => _declaringLibraryUri;
+
+  /**
+   * The URI of the library that declares the element being suggested, not the
+   * URI of the library associated with the enclosing AvailableSuggestionSet.
+   */
+  void set declaringLibraryUri(String value) {
+    assert(value != null);
+    this._declaringLibraryUri = value;
+  }
+
+  /**
    * Information about the element reference being suggested.
    */
   Element get element => _element;
@@ -5255,7 +5273,7 @@
     this._requiredParameterCount = value;
   }
 
-  AvailableSuggestion(String label, Element element,
+  AvailableSuggestion(String label, String declaringLibraryUri, Element element,
       {String defaultArgumentListString,
       List<int> defaultArgumentListTextRanges,
       String docComplete,
@@ -5265,6 +5283,7 @@
       List<String> relevanceTags,
       int requiredParameterCount}) {
     this.label = label;
+    this.declaringLibraryUri = declaringLibraryUri;
     this.element = element;
     this.defaultArgumentListString = defaultArgumentListString;
     this.defaultArgumentListTextRanges = defaultArgumentListTextRanges;
@@ -5288,6 +5307,13 @@
       } else {
         throw jsonDecoder.mismatch(jsonPath, "label");
       }
+      String declaringLibraryUri;
+      if (json.containsKey("declaringLibraryUri")) {
+        declaringLibraryUri = jsonDecoder.decodeString(
+            jsonPath + ".declaringLibraryUri", json["declaringLibraryUri"]);
+      } else {
+        throw jsonDecoder.mismatch(jsonPath, "declaringLibraryUri");
+      }
       Element element;
       if (json.containsKey("element")) {
         element = new Element.fromJson(
@@ -5339,7 +5365,7 @@
             jsonPath + ".requiredParameterCount",
             json["requiredParameterCount"]);
       }
-      return new AvailableSuggestion(label, element,
+      return new AvailableSuggestion(label, declaringLibraryUri, element,
           defaultArgumentListString: defaultArgumentListString,
           defaultArgumentListTextRanges: defaultArgumentListTextRanges,
           docComplete: docComplete,
@@ -5357,6 +5383,7 @@
   Map<String, dynamic> toJson() {
     Map<String, dynamic> result = {};
     result["label"] = label;
+    result["declaringLibraryUri"] = declaringLibraryUri;
     result["element"] = element.toJson();
     if (defaultArgumentListString != null) {
       result["defaultArgumentListString"] = defaultArgumentListString;
@@ -5392,6 +5419,7 @@
   bool operator ==(other) {
     if (other is AvailableSuggestion) {
       return label == other.label &&
+          declaringLibraryUri == other.declaringLibraryUri &&
           element == other.element &&
           defaultArgumentListString == other.defaultArgumentListString &&
           listEqual(defaultArgumentListTextRanges,
@@ -5413,6 +5441,7 @@
   int get hashCode {
     int hash = 0;
     hash = JenkinsSmiHash.combine(hash, label.hashCode);
+    hash = JenkinsSmiHash.combine(hash, declaringLibraryUri.hashCode);
     hash = JenkinsSmiHash.combine(hash, element.hashCode);
     hash = JenkinsSmiHash.combine(hash, defaultArgumentListString.hashCode);
     hash = JenkinsSmiHash.combine(hash, defaultArgumentListTextRanges.hashCode);
@@ -8193,6 +8222,7 @@
  *   "otherSuggestions": List<DartFixSuggestion>
  *   "hasErrors": bool
  *   "edits": List<SourceFileEdit>
+ *   "details": optional List<String>
  * }
  *
  * Clients may not extend, implement or mix-in this class.
@@ -8206,6 +8236,8 @@
 
   List<SourceFileEdit> _edits;
 
+  List<String> _details;
+
   /**
    * A list of recommended changes that can be automatically made by applying
    * the 'edits' included in this response.
@@ -8262,15 +8294,37 @@
     this._edits = value;
   }
 
+  /**
+   * Messages that should be displayed to the user that describe details of the
+   * fix generation. For example, the messages might (a) point out details that
+   * users might want to explore before committing the changes or (b) describe
+   * exceptions that were thrown but that did not stop the fixes from being
+   * produced. The list will be omitted if it is empty.
+   */
+  List<String> get details => _details;
+
+  /**
+   * Messages that should be displayed to the user that describe details of the
+   * fix generation. For example, the messages might (a) point out details that
+   * users might want to explore before committing the changes or (b) describe
+   * exceptions that were thrown but that did not stop the fixes from being
+   * produced. The list will be omitted if it is empty.
+   */
+  void set details(List<String> value) {
+    this._details = value;
+  }
+
   EditDartfixResult(
       List<DartFixSuggestion> suggestions,
       List<DartFixSuggestion> otherSuggestions,
       bool hasErrors,
-      List<SourceFileEdit> edits) {
+      List<SourceFileEdit> edits,
+      {List<String> details}) {
     this.suggestions = suggestions;
     this.otherSuggestions = otherSuggestions;
     this.hasErrors = hasErrors;
     this.edits = edits;
+    this.details = details;
   }
 
   factory EditDartfixResult.fromJson(
@@ -8316,8 +8370,14 @@
       } else {
         throw jsonDecoder.mismatch(jsonPath, "edits");
       }
+      List<String> details;
+      if (json.containsKey("details")) {
+        details = jsonDecoder.decodeList(
+            jsonPath + ".details", json["details"], jsonDecoder.decodeString);
+      }
       return new EditDartfixResult(
-          suggestions, otherSuggestions, hasErrors, edits);
+          suggestions, otherSuggestions, hasErrors, edits,
+          details: details);
     } else {
       throw jsonDecoder.mismatch(jsonPath, "edit.dartfix result", json);
     }
@@ -8341,6 +8401,9 @@
     result["hasErrors"] = hasErrors;
     result["edits"] =
         edits.map((SourceFileEdit value) => value.toJson()).toList();
+    if (details != null) {
+      result["details"] = details;
+    }
     return result;
   }
 
@@ -8361,7 +8424,8 @@
               (DartFixSuggestion a, DartFixSuggestion b) => a == b) &&
           hasErrors == other.hasErrors &&
           listEqual(edits, other.edits,
-              (SourceFileEdit a, SourceFileEdit b) => a == b);
+              (SourceFileEdit a, SourceFileEdit b) => a == b) &&
+          listEqual(details, other.details, (String a, String b) => a == b);
     }
     return false;
   }
@@ -8373,6 +8437,7 @@
     hash = JenkinsSmiHash.combine(hash, otherSuggestions.hashCode);
     hash = JenkinsSmiHash.combine(hash, hasErrors.hashCode);
     hash = JenkinsSmiHash.combine(hash, edits.hashCode);
+    hash = JenkinsSmiHash.combine(hash, details.hashCode);
     return JenkinsSmiHash.finish(hash);
   }
 }
diff --git a/pkg/analyzer/lib/dart/ast/ast.dart b/pkg/analyzer/lib/dart/ast/ast.dart
index a34b97c..14df41a 100644
--- a/pkg/analyzer/lib/dart/ast/ast.dart
+++ b/pkg/analyzer/lib/dart/ast/ast.dart
@@ -2694,7 +2694,8 @@
   /// Set the element associated with the function to the given [element].
   void set element(ExecutableElement element);
 
-  /// Return the parameters associated with the function.
+  /// Return the parameters associated with the function, or `null` if the
+  /// function is part of a top-level getter.
   FormalParameterList get parameters;
 
   /// Set the parameters associated with the function to the given list of
diff --git a/pkg/analyzer/lib/dart/element/element.dart b/pkg/analyzer/lib/dart/element/element.dart
index 61cc2fc..ba10def 100644
--- a/pkg/analyzer/lib/dart/element/element.dart
+++ b/pkg/analyzer/lib/dart/element/element.dart
@@ -941,7 +941,7 @@
 ///
 /// Clients may not extend, implement or mix-in this class. There are classes
 /// that implement this interface that provide useful default behaviors in
-/// `package:analyzer/dart/ast/visitor.dart`. A couple of the most useful
+/// `package:analyzer/dart/element/visitor.dart`. A couple of the most useful
 /// include
 /// * SimpleElementVisitor which implements every visit method by doing nothing,
 /// * RecursiveElementVisitor which will cause every node in a structure to be
diff --git a/pkg/analyzer/lib/src/command_line/arguments.dart b/pkg/analyzer/lib/src/command_line/arguments.dart
index c39ec25..91a13f0 100644
--- a/pkg/analyzer/lib/src/command_line/arguments.dart
+++ b/pkg/analyzer/lib/src/command_line/arguments.dart
@@ -128,7 +128,7 @@
         return !context.isWithin(sdkPath, sourcePath);
       });
   return new DartSdkManager(
-      sdkPath ?? FolderBasedDartSdk.defaultSdkDirectory(resourceProvider),
+      sdkPath ?? FolderBasedDartSdk.defaultSdkDirectory(resourceProvider)?.path,
       canUseSummaries);
 }
 
diff --git a/pkg/analyzer/lib/src/dart/analysis/driver.dart b/pkg/analyzer/lib/src/dart/analysis/driver.dart
index 94d0216..0620474 100644
--- a/pkg/analyzer/lib/src/dart/analysis/driver.dart
+++ b/pkg/analyzer/lib/src/dart/analysis/driver.dart
@@ -93,7 +93,7 @@
   /**
    * The version of data format, should be incremented on every format change.
    */
-  static const int DATA_VERSION = 80;
+  static const int DATA_VERSION = 81;
 
   /**
    * The number of exception contexts allowed to write. Once this field is
@@ -172,13 +172,13 @@
    * The salt to mix into all hashes used as keys for unlinked data.
    */
   final Uint32List _unlinkedSalt =
-      new Uint32List(2 + AnalysisOptionsImpl.unlinkedSignatureLength);
+      new Uint32List(3 + AnalysisOptionsImpl.unlinkedSignatureLength);
 
   /**
    * The salt to mix into all hashes used as keys for linked data.
    */
   final Uint32List _linkedSalt =
-      new Uint32List(2 + AnalysisOptions.signatureLength);
+      new Uint32List(3 + AnalysisOptions.signatureLength);
 
   /**
    * The set of priority files, that should be analyzed sooner.
@@ -1635,11 +1635,13 @@
   void _fillSalt() {
     _unlinkedSalt[0] = DATA_VERSION;
     _unlinkedSalt[1] = enableIndex ? 1 : 0;
-    _unlinkedSalt.setAll(2, _analysisOptions.unlinkedSignature);
+    _unlinkedSalt[2] = useSummary2 ? 1 : 0;
+    _unlinkedSalt.setAll(3, _analysisOptions.unlinkedSignature);
 
     _linkedSalt[0] = DATA_VERSION;
     _linkedSalt[1] = enableIndex ? 1 : 0;
-    _linkedSalt.setAll(2, _analysisOptions.signature);
+    _linkedSalt[2] = useSummary2 ? 1 : 0;
+    _linkedSalt.setAll(3, _analysisOptions.signature);
   }
 
   /**
diff --git a/pkg/analyzer/lib/src/dart/analysis/experiments.dart b/pkg/analyzer/lib/src/dart/analysis/experiments.dart
index c26eb6f..cb17efa 100644
--- a/pkg/analyzer/lib/src/dart/analysis/experiments.dart
+++ b/pkg/analyzer/lib/src/dart/analysis/experiments.dart
@@ -18,153 +18,25 @@
         validateFlags,
         ValidationResult;
 
+part 'experiments.g.dart';
+
 /// Gets access to the private list of boolean flags in an [Experiments] object.
 /// For testing use only.
 @visibleForTesting
 List<bool> getExperimentalFlags_forTesting(ExperimentStatus status) =>
     status._enableFlags;
 
-/// Constant strings for enabling each of the currently known experimental
-/// flags.
-class EnableString {
-  /// String to enable the experiment "constant-update"
-  static const String constant_update_2018 = 'constant-update-2018';
-
-  /// String to enable the experiment "control-flow-collections"
-  static const String control_flow_collections = 'control-flow-collections';
-
-  /// String to enable the experiment "extension-methods"
-  static const String extension_methods = 'extension-methods';
-
-  /// String to enable the experiment "non-nullable"
-  static const String non_nullable = 'non-nullable';
-
-  /// String to enable the experiment "set-literals"
-  static const String set_literals = 'set-literals';
-
-  /// 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';
-
-  /// String to enable the experiment "bogus-enabled"
-  static const String bogus_enabled = 'bogus-enabled';
-}
-
-class ExperimentalFeatures {
-  static const constant_update_2018 = const ExperimentalFeature(
-      0,
-      EnableString.constant_update_2018,
-      IsEnabledByDefault.constant_update_2018,
-      IsExpired.constant_update_2018,
-      'Q4 2018 Constant Update');
-
-  static const non_nullable = const ExperimentalFeature(
-      1,
-      EnableString.non_nullable,
-      IsEnabledByDefault.non_nullable,
-      IsExpired.non_nullable,
-      'Non Nullable');
-
-  static const control_flow_collections = const ExperimentalFeature(
-      2,
-      EnableString.control_flow_collections,
-      IsEnabledByDefault.control_flow_collections,
-      IsExpired.control_flow_collections,
-      'Control Flow Collections',
-      firstSupportedVersion: '2.2.2');
-
-  static const spread_collections = const ExperimentalFeature(
-      3,
-      EnableString.spread_collections,
-      IsEnabledByDefault.spread_collections,
-      IsExpired.spread_collections,
-      'Spread Collections',
-      firstSupportedVersion: '2.2.2');
-
-  static const set_literals = const ExperimentalFeature(
-      4,
-      EnableString.set_literals,
-      IsEnabledByDefault.set_literals,
-      IsExpired.set_literals,
-      'Set Literals',
-      firstSupportedVersion: '2.2.0');
-
-  static const triple_shift = const ExperimentalFeature(
-      5,
-      EnableString.triple_shift,
-      IsEnabledByDefault.triple_shift,
-      IsExpired.triple_shift,
-      'Triple-shift operator');
-
-  static const extension_methods = const ExperimentalFeature(
-      6,
-      EnableString.extension_methods,
-      IsEnabledByDefault.extension_methods,
-      IsExpired.extension_methods,
-      'Extension Methods');
-
-  static const bogus_disabled = const ExperimentalFeature(
-      7,
-      EnableString.bogus_disabled,
-      IsEnabledByDefault.bogus_disabled,
-      IsExpired.bogus_disabled,
-      null);
-
-  static const bogus_enabled = const ExperimentalFeature(
-      8,
-      EnableString.bogus_enabled,
-      IsEnabledByDefault.bogus_enabled,
-      IsExpired.bogus_enabled,
-      null,
-      firstSupportedVersion: '1.0.0');
-}
-
 /// A representation of the set of experiments that are active and whether they
 /// are enabled.
-class ExperimentStatus implements FeatureSet {
+class ExperimentStatus with _CurrentState implements FeatureSet {
   /// A map containing information about all known experimental flags.
-  static const knownFeatures = <String, ExperimentalFeature>{
-    EnableString.constant_update_2018:
-        ExperimentalFeatures.constant_update_2018,
-    EnableString.control_flow_collections:
-        ExperimentalFeatures.control_flow_collections,
-    EnableString.extension_methods: ExperimentalFeatures.extension_methods,
-    EnableString.non_nullable: ExperimentalFeatures.non_nullable,
-    EnableString.set_literals: ExperimentalFeatures.set_literals,
-    EnableString.spread_collections: ExperimentalFeatures.spread_collections,
-    EnableString.triple_shift: ExperimentalFeatures.triple_shift,
-    EnableString.bogus_disabled: ExperimentalFeatures.bogus_disabled,
-    EnableString.bogus_enabled: ExperimentalFeatures.bogus_enabled,
-  };
+  static const knownFeatures = _knownFeatures;
 
   final List<bool> _enableFlags;
 
   /// Initializes a newly created set of experiments based on optional
   /// arguments.
-  ExperimentStatus(
-      {bool constant_update_2018,
-      bool control_flow_collections,
-      bool extension_methods,
-      bool non_nullable,
-      bool set_literals,
-      bool spread_collections,
-      bool triple_shift})
-      : _enableFlags = <bool>[
-          constant_update_2018 ?? IsEnabledByDefault.constant_update_2018,
-          non_nullable ?? IsEnabledByDefault.non_nullable,
-          true, // control-flow-collections
-          true, // spread-collections
-          true, // set-literals
-          triple_shift ?? IsEnabledByDefault.triple_shift,
-          extension_methods ?? IsEnabledByDefault.extension_methods,
-          false, // bogus-disabled
-          true, // bogus-enabled
-        ];
+  ExperimentStatus() : _enableFlags = _buildExperimentalFlagsArray();
 
   /// Computes a set of features for use in a unit test.  Computes the set of
   /// features enabled in [sdkVersion], plus any specified [additionalFeatures].
@@ -187,24 +59,6 @@
 
   ExperimentStatus._(this._enableFlags);
 
-  /// Current state for the flag "bogus_disabled"
-  bool get bogus_disabled => isEnabled(ExperimentalFeatures.bogus_disabled);
-
-  /// Current state for the flag "bogus_enabled"
-  bool get bogus_enabled => isEnabled(ExperimentalFeatures.bogus_enabled);
-
-  /// Current state for the flag "constant-update-2018"
-  bool get constant_update_2018 =>
-      isEnabled(ExperimentalFeatures.constant_update_2018);
-
-  /// Current state for the flag "control_flow_collections"
-  bool get control_flow_collections =>
-      isEnabled(ExperimentalFeatures.control_flow_collections);
-
-  /// Current state for the flag "extension_methods"
-  bool get extension_methods =>
-      isEnabled(ExperimentalFeatures.extension_methods);
-
   @override
   int get hashCode {
     int hash = 0;
@@ -214,19 +68,6 @@
     return JenkinsSmiHash.finish(hash);
   }
 
-  /// Current state for the flag "non-nullable"
-  bool get non_nullable => isEnabled(ExperimentalFeatures.non_nullable);
-
-  /// Current state for the flag "set-literals"
-  bool get set_literals => isEnabled(ExperimentalFeatures.set_literals);
-
-  /// Current state for the flag "spread_collections"
-  bool get spread_collections =>
-      isEnabled(ExperimentalFeatures.spread_collections);
-
-  /// Current state for the flag "triple_shift"
-  bool get triple_shift => isEnabled(ExperimentalFeatures.triple_shift);
-
   @override
   operator ==(Object other) {
     if (other is ExperimentStatus) {
@@ -255,66 +96,3 @@
   /// [ExperimentStatus.fromStrings].
   List<String> toStringList() => experimentStatusToStringList(this);
 }
-
-/// Constant bools indicating whether each experimental flag is currently
-/// enabled by default.
-class IsEnabledByDefault {
-  /// Default state of the experiment "constant-update"
-  static const bool constant_update_2018 = false;
-
-  /// Default state of the experiment "control-flow-collections"
-  static const bool control_flow_collections = true;
-
-  /// Default state of the experiment "extension-methods"
-  static const bool extension_methods = false;
-
-  /// Default state of the experiment "non-nullable"
-  static const bool non_nullable = false;
-
-  /// Default state of the experiment "set-literals"
-  static const bool set_literals = true;
-
-  /// Default state of the experiment "spread-collections"
-  static const bool spread_collections = true;
-
-  /// 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;
-
-  /// Default state of the experiment "bogus-enabled"
-  static const bool bogus_enabled = true;
-}
-
-/// Constant bools indicating whether each experimental flag is currently
-/// expired (meaning its enable/disable status can no longer be altered from the
-/// value in [IsEnabledByDefault]).
-class IsExpired {
-  /// Expiration status of the experiment "constant-update"
-  static const bool constant_update_2018 = false;
-
-  /// Expiration status of the experiment "control-flow-collections"
-  static const bool control_flow_collections = true;
-
-  /// Expiration status of the experiment "extension-methods"
-  static const bool extension_methods = false;
-
-  /// Expiration status of the experiment "non-nullable"
-  static const bool non_nullable = false;
-
-  /// Expiration status of the experiment "set-literals"
-  static const bool set_literals = true;
-
-  /// Expiration status of the experiment "spread-collections"
-  static const bool spread_collections = true;
-
-  /// 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;
-
-  /// Expiration status of the experiment "bogus-enabled"
-  static const bool bogus_enabled = true;
-}
diff --git a/pkg/analyzer/lib/src/dart/analysis/experiments.g.dart b/pkg/analyzer/lib/src/dart/analysis/experiments.g.dart
new file mode 100644
index 0000000..3d782f0
--- /dev/null
+++ b/pkg/analyzer/lib/src/dart/analysis/experiments.g.dart
@@ -0,0 +1,231 @@
+//
+// THIS FILE IS GENERATED. DO NOT EDIT.
+//
+// Instead modify 'tools/experimental_features.yaml' and run
+// 'dart pkg/analyzer/tool/experiments/generate.dart' to update.
+
+part of 'experiments.dart';
+
+/// A map containing information about all known experimental flags.
+const _knownFeatures = <String, ExperimentalFeature>{
+  EnableString.constant_update_2018: ExperimentalFeatures.constant_update_2018,
+  EnableString.control_flow_collections:
+      ExperimentalFeatures.control_flow_collections,
+  EnableString.extension_methods: ExperimentalFeatures.extension_methods,
+  EnableString.non_nullable: ExperimentalFeatures.non_nullable,
+  EnableString.set_literals: ExperimentalFeatures.set_literals,
+  EnableString.spread_collections: ExperimentalFeatures.spread_collections,
+  EnableString.triple_shift: ExperimentalFeatures.triple_shift,
+  EnableString.bogus_disabled: ExperimentalFeatures.bogus_disabled,
+  EnableString.bogus_enabled: ExperimentalFeatures.bogus_enabled,
+};
+
+List<bool> _buildExperimentalFlagsArray() => <bool>[
+      IsEnabledByDefault.constant_update_2018,
+      true, // control-flow-collections
+      IsEnabledByDefault.extension_methods,
+      IsEnabledByDefault.non_nullable,
+      true, // set-literals
+      true, // spread-collections
+      IsEnabledByDefault.triple_shift,
+      false, // bogus-disabled
+      true, // bogus-enabled
+    ];
+
+/// Constant strings for enabling each of the currently known experimental
+/// flags.
+class EnableString {
+  /// String to enable the experiment "constant-update-2018"
+  static const String constant_update_2018 = 'constant-update-2018';
+
+  /// String to enable the experiment "control-flow-collections"
+  static const String control_flow_collections = 'control-flow-collections';
+
+  /// String to enable the experiment "extension-methods"
+  static const String extension_methods = 'extension-methods';
+
+  /// String to enable the experiment "non-nullable"
+  static const String non_nullable = 'non-nullable';
+
+  /// String to enable the experiment "set-literals"
+  static const String set_literals = 'set-literals';
+
+  /// 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';
+
+  /// String to enable the experiment "bogus-enabled"
+  static const String bogus_enabled = 'bogus-enabled';
+}
+
+class ExperimentalFeatures {
+  static const constant_update_2018 = const ExperimentalFeature(
+      0,
+      EnableString.constant_update_2018,
+      IsEnabledByDefault.constant_update_2018,
+      IsExpired.constant_update_2018,
+      'Enhanced constant expressions');
+
+  static const control_flow_collections = const ExperimentalFeature(
+      1,
+      EnableString.control_flow_collections,
+      IsEnabledByDefault.control_flow_collections,
+      IsExpired.control_flow_collections,
+      'Control Flow Collections',
+      firstSupportedVersion: '2.2.2');
+
+  static const extension_methods = const ExperimentalFeature(
+      2,
+      EnableString.extension_methods,
+      IsEnabledByDefault.extension_methods,
+      IsExpired.extension_methods,
+      'Extension Methods');
+
+  static const non_nullable = const ExperimentalFeature(
+      3,
+      EnableString.non_nullable,
+      IsEnabledByDefault.non_nullable,
+      IsExpired.non_nullable,
+      'Non Nullable by default');
+
+  static const set_literals = const ExperimentalFeature(
+      4,
+      EnableString.set_literals,
+      IsEnabledByDefault.set_literals,
+      IsExpired.set_literals,
+      'Set Literals',
+      firstSupportedVersion: '2.2.0');
+
+  static const spread_collections = const ExperimentalFeature(
+      5,
+      EnableString.spread_collections,
+      IsEnabledByDefault.spread_collections,
+      IsExpired.spread_collections,
+      'Spread Collections',
+      firstSupportedVersion: '2.2.2');
+
+  static const triple_shift = const ExperimentalFeature(
+      6,
+      EnableString.triple_shift,
+      IsEnabledByDefault.triple_shift,
+      IsExpired.triple_shift,
+      'Triple-shift operator');
+
+  static const bogus_disabled = const ExperimentalFeature(
+      7,
+      EnableString.bogus_disabled,
+      IsEnabledByDefault.bogus_disabled,
+      IsExpired.bogus_disabled,
+      null);
+
+  static const bogus_enabled = const ExperimentalFeature(
+      8,
+      EnableString.bogus_enabled,
+      IsEnabledByDefault.bogus_enabled,
+      IsExpired.bogus_enabled,
+      null,
+      firstSupportedVersion: '1.0.0');
+}
+
+/// Constant bools indicating whether each experimental flag is currently
+/// enabled by default.
+class IsEnabledByDefault {
+  /// Default state of the experiment "constant-update-2018"
+  static const bool constant_update_2018 = false;
+
+  /// Default state of the experiment "control-flow-collections"
+  static const bool control_flow_collections = true;
+
+  /// Default state of the experiment "extension-methods"
+  static const bool extension_methods = false;
+
+  /// Default state of the experiment "non-nullable"
+  static const bool non_nullable = false;
+
+  /// Default state of the experiment "set-literals"
+  static const bool set_literals = true;
+
+  /// Default state of the experiment "spread-collections"
+  static const bool spread_collections = true;
+
+  /// 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;
+
+  /// Default state of the experiment "bogus-enabled"
+  static const bool bogus_enabled = true;
+}
+
+/// Constant bools indicating whether each experimental flag is currently
+/// expired (meaning its enable/disable status can no longer be altered from the
+/// value in [IsEnabledByDefault]).
+class IsExpired {
+  /// Expiration status of the experiment "constant-update-2018"
+  static const bool constant_update_2018 = false;
+
+  /// Expiration status of the experiment "control-flow-collections"
+  static const bool control_flow_collections = true;
+
+  /// Expiration status of the experiment "extension-methods"
+  static const bool extension_methods = false;
+
+  /// Expiration status of the experiment "non-nullable"
+  static const bool non_nullable = false;
+
+  /// Expiration status of the experiment "set-literals"
+  static const bool set_literals = true;
+
+  /// Expiration status of the experiment "spread-collections"
+  static const bool spread_collections = true;
+
+  /// 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;
+
+  /// Expiration status of the experiment "bogus-enabled"
+  static const bool bogus_enabled = true;
+}
+
+mixin _CurrentState {
+  /// Current state for the flag "bogus-disabled"
+  bool get bogus_disabled => isEnabled(ExperimentalFeatures.bogus_disabled);
+
+  /// Current state for the flag "bogus-enabled"
+  bool get bogus_enabled => isEnabled(ExperimentalFeatures.bogus_enabled);
+
+  /// Current state for the flag "constant-update-2018"
+  bool get constant_update_2018 =>
+      isEnabled(ExperimentalFeatures.constant_update_2018);
+
+  /// Current state for the flag "control-flow-collections"
+  bool get control_flow_collections =>
+      isEnabled(ExperimentalFeatures.control_flow_collections);
+
+  /// Current state for the flag "extension-methods"
+  bool get extension_methods =>
+      isEnabled(ExperimentalFeatures.extension_methods);
+
+  /// Current state for the flag "non-nullable"
+  bool get non_nullable => isEnabled(ExperimentalFeatures.non_nullable);
+
+  /// Current state for the flag "set-literals"
+  bool get set_literals => isEnabled(ExperimentalFeatures.set_literals);
+
+  /// Current state for the flag "spread-collections"
+  bool get spread_collections =>
+      isEnabled(ExperimentalFeatures.spread_collections);
+
+  /// Current state for the flag "triple-shift"
+  bool get triple_shift => isEnabled(ExperimentalFeatures.triple_shift);
+
+  bool isEnabled(covariant ExperimentalFeature feature);
+}
diff --git a/pkg/analyzer/lib/src/dart/analysis/file_state.dart b/pkg/analyzer/lib/src/dart/analysis/file_state.dart
index a0e0eb6..252c1e4 100644
--- a/pkg/analyzer/lib/src/dart/analysis/file_state.dart
+++ b/pkg/analyzer/lib/src/dart/analysis/file_state.dart
@@ -16,6 +16,7 @@
 import 'package:analyzer/src/dart/analysis/library_graph.dart';
 import 'package:analyzer/src/dart/analysis/performance_logger.dart';
 import 'package:analyzer/src/dart/analysis/referenced_names.dart';
+import 'package:analyzer/src/dart/analysis/unlinked_api_signature.dart';
 import 'package:analyzer/src/dart/scanner/reader.dart';
 import 'package:analyzer/src/dart/scanner/scanner.dart';
 import 'package:analyzer/src/generated/engine.dart';
@@ -29,6 +30,7 @@
 import 'package:analyzer/src/summary/name_filter.dart';
 import 'package:analyzer/src/summary/package_bundle_reader.dart';
 import 'package:analyzer/src/summary/summarize_ast.dart';
+import 'package:analyzer/src/summary2/informative_data.dart';
 import 'package:convert/convert.dart';
 import 'package:crypto/crypto.dart';
 import 'package:front_end/src/fasta/scanner/token.dart';
@@ -119,7 +121,6 @@
   List<int> _apiSignature;
 
   UnlinkedUnit2 _unlinked2;
-  CompilationUnit _unitForLinking;
 
   List<FileState> _importedFiles;
   List<FileState> _exportedFiles;
@@ -340,6 +341,11 @@
   UnlinkedUnit get unlinked => _unlinked;
 
   /**
+   * The [UnlinkedUnit2] of the file.
+   */
+  UnlinkedUnit2 get unlinked2 => _unlinked2;
+
+  /**
    * Return the [uri] string.
    */
   String get uriStr => uri.toString();
@@ -528,18 +534,6 @@
     return apiSignatureChanged;
   }
 
-  /// If the file has a parsed unit from computing unlinked data, return it.
-  /// Otherwise, parse it afresh now.
-  CompilationUnit takeUnitForLinking() {
-    if (_unitForLinking != null) {
-      var result = _unitForLinking;
-      _unitForLinking = null;
-      return result;
-    } else {
-      return parse();
-    }
-  }
-
   @override
   String toString() => path ?? '<unresolved>';
 
@@ -651,9 +645,8 @@
       bytes = _fsState._byteStore.get(_unlinkedKey);
       if (bytes == null || bytes.isEmpty) {
         CompilationUnit unit = parse();
-        _unitForLinking = unit;
         _fsState._logger.run('Create unlinked for $path', () {
-          var unlinkedUnit = serializeAstUnlinked2(contentSignature, unit);
+          var unlinkedUnit = serializeAstUnlinked2(unit);
           var definedNames = computeDefinedNames(unit);
           var referencedNames = computeReferencedNames(unit).toList();
           var subtypedNames = computeSubtypedNames(unit).toList();
@@ -753,8 +746,7 @@
     return apiSignatureChanged;
   }
 
-  static UnlinkedUnit2Builder serializeAstUnlinked2(
-      List<int> contentSignature, CompilationUnit unit) {
+  static UnlinkedUnit2Builder serializeAstUnlinked2(CompilationUnit unit) {
     var exports = <String>[];
     var imports = <String>['dart:core'];
     var parts = <String>[];
@@ -776,14 +768,16 @@
         hasPartOfDirective = true;
       }
     }
+    var informativeData = createInformativeData(unit);
     return UnlinkedUnit2Builder(
-      apiSignature: contentSignature,
+      apiSignature: computeUnlinkedApiSignature(unit),
       exports: exports,
       imports: imports,
       parts: parts,
       hasLibraryDirective: hasLibraryDirective,
       hasPartOfDirective: hasPartOfDirective,
       lineStarts: unit.lineInfo.lineStarts,
+      informativeData: informativeData,
     );
   }
 
diff --git a/pkg/analyzer/lib/src/dart/analysis/library_analyzer.dart b/pkg/analyzer/lib/src/dart/analysis/library_analyzer.dart
index 699c335..f3b0f77 100644
--- a/pkg/analyzer/lib/src/dart/analysis/library_analyzer.dart
+++ b/pkg/analyzer/lib/src/dart/analysis/library_analyzer.dart
@@ -3,6 +3,7 @@
 // BSD-style license that can be found in the LICENSE file.
 
 import 'package:analyzer/dart/analysis/declared_variables.dart';
+import 'package:analyzer/dart/analysis/features.dart';
 import 'package:analyzer/dart/ast/ast.dart';
 import 'package:analyzer/dart/ast/visitor.dart';
 import 'package:analyzer/dart/element/element.dart';
@@ -62,7 +63,7 @@
   final AnalysisContext _context;
   final ElementResynthesizer _resynthesizer;
   final LinkedElementFactory _elementFactory;
-  final TypeProvider _typeProvider;
+  TypeProvider _typeProvider;
 
   final TypeSystem _typeSystem;
   LibraryElement _libraryElement;
@@ -97,8 +98,7 @@
       this._inheritance,
       this._library,
       this._resourceProvider)
-      : _typeProvider = _context.typeProvider,
-        _typeSystem = _context.typeSystem;
+      : _typeSystem = _context.typeSystem;
 
   /**
    * Compute analysis results for all units of the library.
@@ -124,7 +124,19 @@
     timerLibraryAnalyzerFreshUnit.stop();
 
     // Resolve URIs in directives to corresponding sources.
+    FeatureSet featureSet = units[_library].featureSet;
+    _typeProvider = _context.typeProvider;
+    if (featureSet.isEnabled(Feature.non_nullable)) {
+      if (_typeProvider is! NonNullableTypeProvider) {
+        _typeProvider = NonNullableTypeProvider.from(_typeProvider);
+      }
+    } else {
+      if (_typeProvider is NonNullableTypeProvider) {
+        _typeProvider = TypeProviderImpl.from(_typeProvider);
+      }
+    }
     units.forEach((file, unit) {
+      _validateFeatureSet(unit, featureSet);
       _resolveUriBasedDirectives(file, unit);
     });
 
@@ -724,6 +736,15 @@
     }
   }
 
+  /// Validate that the feature set associated with the compilation [unit] is
+  /// the same as the [expectedSet] of features supported by the library.
+  void _validateFeatureSet(CompilationUnit unit, FeatureSet expectedSet) {
+    FeatureSet actualSet = unit.featureSet;
+    if (actualSet != expectedSet) {
+      // TODO(brianwilkerson) Generate a diagnostic.
+    }
+  }
+
   /**
    * Check the given [directive] to see if the referenced source exists and
    * report an error if it does not.
diff --git a/pkg/analyzer/lib/src/dart/analysis/library_context.dart b/pkg/analyzer/lib/src/dart/analysis/library_context.dart
index 89066af..8f90231 100644
--- a/pkg/analyzer/lib/src/dart/analysis/library_context.dart
+++ b/pkg/analyzer/lib/src/dart/analysis/library_context.dart
@@ -31,7 +31,6 @@
 import 'package:analyzer/src/summary2/reference.dart';
 import 'package:meta/meta.dart';
 
-var counterInputLibrariesFiles = 0;
 var counterLinkedLibraries = 0;
 var counterLoadedLibraries = 0;
 var timerBundleToBytes = Stopwatch();
@@ -255,88 +254,115 @@
     timerLoad2.start();
     var inputBundles = <LinkedNodeBundle>[];
 
+    var librariesTotal = 0;
+    var librariesLoaded = 0;
+    var librariesLinked = 0;
+    var librariesLinkedTimer = Stopwatch();
+    var inputsTimer = Stopwatch();
+    var bytesGet = 0;
+    var bytesPut = 0;
+
     void loadBundle(LibraryCycle cycle) {
       if (!loadedBundles.add(cycle)) return;
 
-      logger.run('Prepare linked bundle', () {
-        logger.writeln('Libraries: ${cycle.libraries}');
-        cycle.directDependencies.forEach(loadBundle);
+      librariesTotal += cycle.libraries.length;
 
-        var key = cycle.transitiveSignature + '.linked_bundle';
-        var bytes = byteStore.get(key);
+      cycle.directDependencies.forEach(loadBundle);
 
-        if (bytes == null) {
-          timerInputLibraries.start();
-          var inputLibraries = <link2.LinkInputLibrary>[];
-          logger.run('Prepare input libraries', () {
-            for (var libraryFile in cycle.libraries) {
-              counterInputLibrariesFiles++;
-              var librarySource = libraryFile.source;
-              if (librarySource == null) continue;
+      var key = cycle.transitiveSignature + '.linked_bundle';
+      var bytes = byteStore.get(key);
 
-              var inputUnits = <link2.LinkInputUnit>[];
-              for (var file in libraryFile.libraryFiles) {
-                var isSynthetic = !file.exists;
-                var unit = file.takeUnitForLinking();
-                inputUnits.add(
-                  link2.LinkInputUnit(file.source, isSynthetic, unit),
-                );
-              }
+      if (bytes == null) {
+        librariesLinkedTimer.start();
 
-              inputLibraries.add(
-                link2.LinkInputLibrary(librarySource, inputUnits),
-              );
-            }
-            logger.writeln('Prepared ${inputLibraries.length} libraries.');
-          });
-          timerInputLibraries.stop();
+        timerInputLibraries.start();
+        inputsTimer.start();
+        var inputLibraries = <link2.LinkInputLibrary>[];
+        for (var libraryFile in cycle.libraries) {
+          var librarySource = libraryFile.source;
+          if (librarySource == null) continue;
 
-          timerLinking.start();
-          link2.LinkResult linkResult;
-          logger.run('Link libraries', () {
-            linkResult = link2.link(elementFactory, inputLibraries);
-            logger.writeln('Linked ${inputLibraries.length} libraries.');
-          });
-          timerLinking.stop();
-          counterLinkedLibraries += linkResult.bundle.libraries.length;
+          var inputUnits = <link2.LinkInputUnit>[];
+          for (var file in libraryFile.libraryFiles) {
+            var isSynthetic = !file.exists;
+            var unit = file.parse();
+            inputUnits.add(
+              link2.LinkInputUnit(file.source, isSynthetic, unit),
+            );
+          }
 
-          timerBundleToBytes.start();
-          bytes = linkResult.bundle.toBuffer();
-          timerBundleToBytes.stop();
-          byteStore.put(key, bytes);
-          logger.writeln('Stored ${bytes.length} bytes.');
-          counterUnlinkedLinkedBytes += bytes.length;
-        } else {
-          // TODO(scheglov) Take / clear parsed units in files.
-          logger.writeln('Loaded ${bytes.length} bytes.');
+          inputLibraries.add(
+            link2.LinkInputLibrary(librarySource, inputUnits),
+          );
         }
+        inputsTimer.stop();
+        timerInputLibraries.stop();
 
-        // We are about to load dart:core, but if we have just linked it, the
-        // linker might have set the type provider. So, clear it, and recreate
-        // the element factory - it is empty anyway.
-        var hasDartCoreBeforeBundle = elementFactory.hasDartCore;
-        if (!hasDartCoreBeforeBundle) {
-          analysisContext.clearTypeProvider();
-          _createElementFactory();
+        timerLinking.start();
+        var linkResult = link2.link(elementFactory, inputLibraries);
+        librariesLinked += cycle.libraries.length;
+        counterLinkedLibraries += linkResult.bundle.libraries.length;
+        timerLinking.stop();
+
+        timerBundleToBytes.start();
+        bytes = linkResult.bundle.toBuffer();
+        timerBundleToBytes.stop();
+
+        byteStore.put(key, bytes);
+        bytesPut += bytes.length;
+        counterUnlinkedLinkedBytes += bytes.length;
+
+        librariesLinkedTimer.stop();
+      } else {
+        // TODO(scheglov) Take / clear parsed units in files.
+        bytesGet += bytes.length;
+        librariesLoaded += cycle.libraries.length;
+      }
+
+      // We are about to load dart:core, but if we have just linked it, the
+      // linker might have set the type provider. So, clear it, and recreate
+      // the element factory - it is empty anyway.
+      var hasDartCoreBeforeBundle = elementFactory.hasDartCore;
+      if (!hasDartCoreBeforeBundle) {
+        analysisContext.clearTypeProvider();
+        _createElementFactory();
+      }
+
+      var bundle = LinkedNodeBundle.fromBuffer(bytes);
+      inputBundles.add(bundle);
+      elementFactory.addBundle(
+        LinkedBundleContext(elementFactory, bundle),
+      );
+      counterLoadedLibraries += bundle.libraries.length;
+
+      // Set informative data.
+      for (var libraryFile in cycle.libraries) {
+        for (var unitFile in libraryFile.libraryFiles) {
+          elementFactory.setInformativeData(
+            libraryFile.uriStr,
+            unitFile.uriStr,
+            unitFile.unlinked2.informativeData,
+          );
         }
+      }
 
-        var bundle = LinkedNodeBundle.fromBuffer(bytes);
-        inputBundles.add(bundle);
-        elementFactory.addBundle(
-          LinkedBundleContext(elementFactory, bundle),
-        );
-        counterLoadedLibraries += bundle.libraries.length;
-
-        // If the first bundle, with dart:core, create the type provider.
-        if (!hasDartCoreBeforeBundle && elementFactory.hasDartCore) {
-          _createElementFactoryTypeProvider();
-        }
-      });
+      // If the first bundle, with dart:core, create the type provider.
+      if (!hasDartCoreBeforeBundle && elementFactory.hasDartCore) {
+        _createElementFactoryTypeProvider();
+      }
     }
 
     logger.run('Prepare linked bundles', () {
       var libraryCycle = targetLibrary.libraryCycle;
       loadBundle(libraryCycle);
+      logger.writeln(
+        '[librariesTotal: $librariesTotal]'
+        '[librariesLoaded: $librariesLoaded]'
+        '[inputsTimer: ${inputsTimer.elapsedMilliseconds} ms]'
+        '[librariesLinked: $librariesLinked]'
+        '[librariesLinkedTimer: ${librariesLinkedTimer.elapsedMilliseconds} ms]'
+        '[bytesGet: $bytesGet][bytesPut: $bytesPut]',
+      );
     });
 
     timerLoad2.stop();
diff --git a/pkg/analyzer/lib/src/dart/analysis/unlinked_api_signature.dart b/pkg/analyzer/lib/src/dart/analysis/unlinked_api_signature.dart
new file mode 100644
index 0000000..dfbaf6a
--- /dev/null
+++ b/pkg/analyzer/lib/src/dart/analysis/unlinked_api_signature.dart
@@ -0,0 +1,134 @@
+// 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/src/dart/ast/token.dart';
+import 'package:analyzer/src/summary/api_signature.dart';
+
+/// Return the bytes of the unlinked API signature of the given [unit].
+///
+/// If API signatures of two units are different, they may have different APIs.
+List<int> computeUnlinkedApiSignature(CompilationUnit unit) {
+  var computer = new _UnitApiSignatureComputer();
+  computer.compute(unit);
+  return computer.signature.toByteList();
+}
+
+class _UnitApiSignatureComputer {
+  final signature = new ApiSignature();
+
+  void addClassOrMixin(ClassOrMixinDeclaration node) {
+    addTokens(node.beginToken, node.leftBracket);
+
+    bool hasConstConstructor = node.members
+        .any((m) => m is ConstructorDeclaration && m.constKeyword != null);
+
+    signature.addInt(node.members.length);
+    for (var member in node.members) {
+      if (member is ConstructorDeclaration) {
+        var lastInitializer = member.constKeyword != null &&
+                member.initializers != null &&
+                member.initializers.isNotEmpty
+            ? member.initializers.last
+            : null;
+        addTokens(
+          member.beginToken,
+          (lastInitializer ?? member.parameters ?? member.name).endToken,
+        );
+      } else if (member is FieldDeclaration) {
+        var variableList = member.fields;
+        addVariables(
+          member,
+          variableList,
+          !member.isStatic && variableList.isFinal && hasConstConstructor,
+        );
+      } else if (member is MethodDeclaration) {
+        addTokens(
+          member.beginToken,
+          (member.parameters ?? member.name).endToken,
+        );
+      } else {
+        addNode(member);
+      }
+    }
+
+    addToken(node.rightBracket);
+  }
+
+  void addNode(AstNode node) {
+    addTokens(node.beginToken, node.endToken);
+  }
+
+  void addToken(Token token) {
+    signature.addString(token.lexeme);
+  }
+
+  /// Appends tokens from [begin] (including), to [end] (also including).
+  void addTokens(Token begin, Token end) {
+    if (begin is CommentToken) {
+      begin = (begin as CommentToken).parent;
+    }
+
+    Token token = begin;
+    while (token != null) {
+      addToken(token);
+
+      if (token == end) {
+        break;
+      }
+
+      var nextToken = token.next;
+
+      // Stop if EOF.
+      if (nextToken == token) {
+        break;
+      }
+
+      token = nextToken;
+    }
+  }
+
+  void addVariables(
+    AstNode node,
+    VariableDeclarationList variableList,
+    bool includeInitializers,
+  ) {
+    if (variableList.type == null ||
+        variableList.isConst ||
+        includeInitializers) {
+      addTokens(node.beginToken, node.endToken);
+    } else {
+      addTokens(node.beginToken, variableList.type.endToken);
+
+      signature.addInt(variableList.variables.length);
+      for (var variable in variableList.variables) {
+        addTokens(variable.beginToken, variable.name.endToken);
+        addToken(variable.endToken.next); // `,` or `;`
+      }
+    }
+  }
+
+  void compute(CompilationUnit unit) {
+    signature.addInt(unit.directives.length);
+    unit.directives.forEach(addNode);
+
+    signature.addInt(unit.declarations.length);
+    for (var declaration in unit.declarations) {
+      if (declaration is ClassOrMixinDeclaration) {
+        addClassOrMixin(declaration);
+      } else if (declaration is FunctionDeclaration) {
+        var parameters = declaration.functionExpression.parameters;
+        addTokens(
+          declaration.beginToken,
+          (parameters ?? declaration.name).endToken,
+        );
+      } else if (declaration is TopLevelVariableDeclaration) {
+        addVariables(declaration, declaration.variables, false);
+      } else {
+        addNode(declaration);
+      }
+    }
+  }
+}
diff --git a/pkg/analyzer/lib/src/dart/ast/ast.dart b/pkg/analyzer/lib/src/dart/ast/ast.dart
index 8a79218..1d17498 100644
--- a/pkg/analyzer/lib/src/dart/ast/ast.dart
+++ b/pkg/analyzer/lib/src/dart/ast/ast.dart
@@ -4910,7 +4910,8 @@
   /// not a generic method.
   TypeParameterListImpl _typeParameters;
 
-  /// The parameters associated with the function.
+  /// The parameters associated with the function, or `null` if the function is
+  /// part of a top-level getter.
   FormalParameterListImpl _parameters;
 
   /// The body of the function, or `null` if this is an external function.
@@ -5172,7 +5173,7 @@
 ///
 ///    functionSignature ::=
 ///        [TypeName]? [SimpleIdentifier] [TypeParameterList]?
-///        [FormalParameterList]
+///        [FormalParameterList] '?'?
 class FunctionTypedFormalParameterImpl extends NormalFormalParameterImpl
     implements FunctionTypedFormalParameter {
   /// The return type of the function, or `null` if the function does not have a
diff --git a/pkg/analyzer/lib/src/dart/element/element.dart b/pkg/analyzer/lib/src/dart/element/element.dart
index 53cd4f7..cf5423c 100644
--- a/pkg/analyzer/lib/src/dart/element/element.dart
+++ b/pkg/analyzer/lib/src/dart/element/element.dart
@@ -2725,12 +2725,12 @@
   @override
   void appendTo(StringBuffer buffer) {
     String name;
+    String constructorName = displayName;
     if (enclosingElement == null) {
       String message;
-      String name = displayName;
-      if (name != null && !name.isEmpty) {
+      if (constructorName != null && !constructorName.isEmpty) {
         message =
-            'Found constructor element named $name with no enclosing element';
+            'Found constructor element named $constructorName with no enclosing element';
       } else {
         message = 'Found unnamed constructor element with no enclosing element';
       }
@@ -2739,7 +2739,6 @@
     } else {
       name = enclosingElement.displayName;
     }
-    String constructorName = displayName;
     if (constructorName != null && !constructorName.isEmpty) {
       name = '$name.$constructorName';
     }
diff --git a/pkg/analyzer/lib/src/dart/element/type.dart b/pkg/analyzer/lib/src/dart/element/type.dart
index de53916..8da95fd 100644
--- a/pkg/analyzer/lib/src/dart/element/type.dart
+++ b/pkg/analyzer/lib/src/dart/element/type.dart
@@ -68,6 +68,18 @@
       new BottomTypeImpl._(NullabilitySuffix.question);
 
   /**
+   * The unique instance of this class, starred.
+   *
+   * This behaves like a version of the Null* type that could be conceivably
+   * migrated to be of type Never. Therefore, it's the bottom of all legacy
+   * types, and also assignable to the true bottom. Note that Never? and Never*
+   * are not the same type, as Never* is a subtype of Never, while Never? is
+   * not.
+   */
+  static final BottomTypeImpl instanceLegacy =
+      new BottomTypeImpl._(NullabilitySuffix.star);
+
+  /**
    * The unique instance of this class, non-nullable.
    */
   static final BottomTypeImpl instance =
@@ -145,14 +157,7 @@
       case NullabilitySuffix.question:
         return instanceNullable;
       case NullabilitySuffix.star:
-        // This should never happen.  Converting `Never` to a legacy type should
-        // yield `Null`, because prior to NNBD, `Null` was at the bottom of the
-        // type hierarchy.
-        //
-        // However, due to bugs elsewhere in the analyzer, this does still
-        // happen sometimes, so for now just coerce to `Never?`.
-        // TODO(paulberry): change this to throw an exception.
-        return instanceNullable;
+        return instanceLegacy;
       case NullabilitySuffix.none:
         return instance;
     }
diff --git a/pkg/analyzer/lib/src/dart/error/hint_codes.dart b/pkg/analyzer/lib/src/dart/error/hint_codes.dart
index 0b16500..651d581 100644
--- a/pkg/analyzer/lib/src/dart/error/hint_codes.dart
+++ b/pkg/analyzer/lib/src/dart/error/hint_codes.dart
@@ -57,11 +57,30 @@
           "removing the unreachable catch clause.");
 
   /**
-   * Deprecated members should not be invoked or used.
-   *
    * Parameters:
    * 0: the name of the member
    */
+  // #### Description
+  //
+  // The analyzer produces this diagnostic when a deprecated library or class
+  // member is used in a different package.
+  //
+  // #### Example
+  //
+  // If the method `m` in the class `C` is annotated with `@deprecated`, then
+  // the following code produces this diagnostic:
+  //
+  // ```dart
+  // void f(C c) {
+  //   c.!m!();
+  // }
+  // ```
+  //
+  // #### Common fixes
+  //
+  // The documentation for declarations that are annotated with `@deprecated`
+  // should have documentation to indicate what code to use in place of the
+  // deprecated code.
   static const HintCode DEPRECATED_MEMBER_USE = const HintCode(
       'DEPRECATED_MEMBER_USE', "'{0}' is deprecated and shouldn't be used.",
       correction:
@@ -244,12 +263,32 @@
       "Only classes can be annotated as being immutable.");
 
   /**
-   * This hint is generated anywhere a @literal annotation is associated with
-   * anything other than a const constructor.
+   * No parameters.
    */
+  // #### Description
+  //
+  // The meaning of the `@literal` annotation is only defined when it's applied
+  // to a const constructor.
+  //
+  // #### Example
+  //
+  // The following code produces this diagnostic:
+  //
+  // ```dart
+  // !@literal!
+  // var x;
+  // ```
+  //
+  // #### Common fixes
+  //
+  // Remove the annotation:
+  //
+  // ```dart
+  // var x;
+  // ```
   static const HintCode INVALID_LITERAL_ANNOTATION = const HintCode(
       'INVALID_LITERAL_ANNOTATION',
-      "Only const constructors can be annotated as being literal.");
+      "Only const constructors can have the `@literal` annotation.");
 
   /**
    * This hint is generated anywhere where `@required` annotates a non named
@@ -618,13 +657,51 @@
       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.
+   * No parameters.
    */
+  // #### Description
+  //
+  // The analyzer produces this diagnostic when a set literal is found in code
+  // that has an SDK constraint whose lower bound is less than 2.2. Set literals
+  // were not supported in earlier versions, so this code won't be able to run
+  // against earlier versions of the SDK.
+  //
+  // #### Example
+  //
+  // In a package that defines SDK constraints in the `pubspec.yaml` file that
+  // have a lower bound that's less than 2.2:
+  //
+  // ```yaml
+  // environment:
+  //   sdk: '>=2.1.0 <2.4.0'
+  // ```
+  //
+  // The following code generates this diagnostic:
+  //
+  // ```dart
+  // var s = !<int>{}!;
+  // ```
+  //
+  // #### Common fixes
+  //
+  // If you don't need to support older versions of the SDK, then you can
+  // increase the SDK constraint to allow the syntax to be used:
+  //
+  // ```yaml
+  // environment:
+  //   sdk: '>=2.2.0 <2.4.0'
+  // ```
+  //
+  // If you do need to support older versions of the SDK, then replace the set
+  // literal with code that creates the set without the use of a literal:
+  //
+  // ```dart
+  // var s = new Set<int>();
+  // ```
   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.",
+      "Set literals weren't supported until version 2.2, "
+          "but this code must be able to run on earlier versions.",
       correction: "Try updating the SDK constraints.");
 
   /**
@@ -824,8 +901,10 @@
    * template. The correction associated with the error will be created from the
    * given [correction] template.
    */
-  const HintCode(String name, String message, {String correction})
-      : super.temporary(name, message, correction: correction);
+  const HintCode(String name, String message,
+      {String correction, bool hasPublishedDocs})
+      : super.temporary(name, message,
+            correction: correction, hasPublishedDocs: hasPublishedDocs);
 
   @override
   ErrorSeverity get errorSeverity => ErrorType.HINT.severity;
diff --git a/pkg/analyzer/lib/src/dart/error/lint_codes.dart b/pkg/analyzer/lib/src/dart/error/lint_codes.dart
index d83e4a9..8d61ae3 100644
--- a/pkg/analyzer/lib/src/dart/error/lint_codes.dart
+++ b/pkg/analyzer/lib/src/dart/error/lint_codes.dart
@@ -27,4 +27,8 @@
    * subclass the lint's code is defined in.
    */
   String get uniqueName => "LintCode.$name";
+
+  @override
+  String get url =>
+      'https://dart-lang.github.io/linter/lints/${name.toLowerCase()}.html';
 }
diff --git a/pkg/analyzer/lib/src/error/codes.dart b/pkg/analyzer/lib/src/error/codes.dart
index 5b05f7a..1b304fd 100644
--- a/pkg/analyzer/lib/src/error/codes.dart
+++ b/pkg/analyzer/lib/src/error/codes.dart
@@ -83,8 +83,9 @@
    * given [correction] template.
    */
   const CheckedModeCompileTimeErrorCode(String name, String message,
-      {String correction})
-      : super.temporary(name, message, correction: correction);
+      {String correction, bool hasPublishedDocs})
+      : super.temporary(name, message,
+            correction: correction, hasPublishedDocs: hasPublishedDocs);
 
   @override
   ErrorSeverity get errorSeverity =>
@@ -141,22 +142,142 @@
           correction: "Try removing the export of one of the libraries, or "
               "explicitly hiding the name in one of the export directives.");
 
+  /**
+   * No parameters.
+   */
+  // #### Description
+  //
+  // Because map and set literals use the same delimiters (`{` and `}`), the
+  // analyzer looks at the type arguments and the elements to determine which
+  // kind of literal you meant. When there are no type arguments and all of the
+  // elements are spread elements (which are allowed in both kinds of literals),
+  // then the analyzer uses the types of the expressions that are being spread.
+  // If all of the expressions have the type `Iterable`, then it's a set
+  // literal; if they all have the type `Map`, then it's a map literal.
+  //
+  // The analyzer produces this diagnostic when some of the expressions being
+  // spread have the type `Iterable` and others have the type `Map`, making it
+  // impossible for the analyzer to determine whether you are writing a map
+  // literal or a set literal.
+  //
+  // #### Example
+  //
+  // The following code produces this diagnostic:
+  //
+  // ```dart
+  // union(Map<String, String> a, List<String> b, Map<String, String> c) =>
+  //     {...a, ...b, ...c};
+  // ```
+  //
+  // The list `b` can only be spread into a set, and the maps `a` and `c` can
+  // only be spread into a map, and the literal can't be both.
+  //
+  // #### Common fixes
+  //
+  // There are two common ways to fix this problem. The first is to remove all
+  // of the spread elements of one kind or the other, so that the elements are
+  // consistent. In this case, that likely means removing the list (and
+  // deciding what to do about the now unused parameter):
+  //
+  // ```dart
+  // union(Map<String, String> a, List<String> b, Map<String, String> c) =>
+  //     {...a, ...c};
+  // ```
+  //
+  // The second fix is to change the elements of one kind into elements that are
+  // consistent with the other elements. For example, you could add the elements
+  // of the list as keys that map to themselves:
+  //
+  // ```dart
+  // union(Map<String, String> a, List<String> b, Map<String, String> c) =>
+  //     {...a, for (String s in b) s: s, ...c};
+  // ```
   static const CompileTimeErrorCode AMBIGUOUS_SET_OR_MAP_LITERAL_BOTH =
       const CompileTimeErrorCode(
           'AMBIGUOUS_SET_OR_MAP_LITERAL_BOTH',
-          "This literal must be both a map and a set, because some elements "
-              "spread a 'Map' and others spread an 'Iterable', but that isn't "
-              "allowed.",
+          "This literal contains both 'Map' and 'Iterable' spreads, "
+              "which makes it impossible to determine whether the literal is "
+              "a map or a set.",
           correction:
               "Try removing or changing some of the elements so that all of "
               "the elements are consistent.");
 
+  /**
+   * No parameters.
+   */
+  // #### Description
+  //
+  // Because map and set literals use the same delimiters (`‘{` and `}`), the
+  // analyzer looks at the type arguments and the elements to determine which
+  // kind of literal you meant. When there are no type arguments and all of the
+  // elements are spread elements (which are allowed in both kinds of literals)
+  // then the analyzer uses the types of the expressions that are being spread
+  // to decide. If all of the expressions have the type `Iterable`, then it's a
+  // set literal, if they all have the type `Map`, then it's a map literal.
+  //
+  // This diagnostic is produced when none of the expressions being spread has a
+  // type that allows the analyzer to decide whether you were writing a map
+  // literal or a set literal.
+  //
+  // #### Example
+  //
+  // The following code produces this diagnostic:
+  //
+  // ```dart
+  // union(a, b) => !{...a, ...b}!;
+  // ```
+  //
+  // The problem occurs because there are no type arguments, and there is no
+  // information about the type of either `a` or `b`.
+  //
+  // #### Common fixes
+  //
+  // There are three common ways to fix this problem. The first is to add type
+  // arguments to the literal. For example, if the literal is intended to be a
+  // map literal, you might write something like this:
+  //
+  // ```dart
+  // union(a, b) => <String, String>{...a, ...b};
+  // ```
+  //
+  // The second fix is to add type information so that the expressions have
+  // either the type `Iterable` or the type `Map`. You could add an explicit
+  // cast or, in this case, add types to the declarations of the two parameters:
+  //
+  // ```dart
+  // union(List<int> a, List<int> b) => {...a, ...b};
+  // ```
+  //
+  // The third fix is to add context information. In this case, that means
+  // adding a return type to the function:
+  //
+  // ```dart
+  // Set<String> union(a, b) => {...a, ...b};
+  // ```
+  //
+  // In other cases, you might add a type somewhere else. For example, say the
+  // original code looks like this:
+  //
+  // ```dart
+  // union(a, b) {
+  //   var x = {...a, ...b};
+  //   return x;
+  // }
+  // ```
+  //
+  // You might add a type annotation on `x`, like this:
+  //
+  // ```dart
+  // union(a, b) {
+  //   Map<String, String> x = {...a, ...b};
+  //   return x;
+  // }
+  // ```
   static const CompileTimeErrorCode AMBIGUOUS_SET_OR_MAP_LITERAL_EITHER =
       const CompileTimeErrorCode(
           'AMBIGUOUS_SET_OR_MAP_LITERAL_EITHER',
-          "This literal must be either a map or a set, but none of the "
-              "elements have enough type information to know which, and that isn't "
-              "allowed.",
+          "This literal must be either a map or a set, but the elements don't "
+              "have enough type information for type inference to work.",
           correction:
               "Try adding type arguments to the literal (one for sets, two "
               "for maps).");
@@ -819,11 +940,40 @@
           correction: "Try removing the default value.");
 
   /**
-   * It is an error if a required named parameter has a default value.
+   * No parameters.
    */
+  // #### Description
+  //
+  // The analyzer produces this diagnostic when a named parameter has both the
+  // `required` modifier and a default value. If the parameter is required, then
+  // a value for the parameter is always provided at the call sites, so the
+  // default value can never be used.
+  //
+  // #### Example
+  //
+  // The following code generates this diagnostic:
+  //
+  // ```dart
+  // void log({required String !message! = 'no message'}) {}
+  // ```
+  //
+  // #### Common fixes
+  //
+  // If the parameter is really required, then remove the default value:
+  //
+  // ```dart
+  // void log({required String message}) {}
+  // ```
+  //
+  // If the parameter isn't always required, then remove the `required`
+  // modifier:
+  //
+  // ```dart
+  // void log({String message = 'no message'}) {}
+  // ```
   static const CompileTimeErrorCode DEFAULT_VALUE_ON_REQUIRED_PARAMETER =
       const CompileTimeErrorCode('DEFAULT_VALUE_ON_REQUIRED_PARAMETER',
-          "Required named parameters cannot have a default value.",
+          "Required named parameters can't have a default value.",
           correction: "Try removing either the default value or the 'required' "
               "modifier.");
 
@@ -931,9 +1081,33 @@
           "The exported library '{0}' can't have a part-of directive.",
           correction: "Try exporting the library that the part is a part of.");
 
+  /**
+   * No parameters.
+   */
+  // #### Description
+  //
+  // The analyzer produces this diagnostic when the analyzer finds an
+  // expression, rather than a map entry, in what appears to be a map literal.
+  //
+  // #### Example
+  //
+  // The following code generates this diagnostic:
+  //
+  // ```dart
+  // var map = <String, int>{'a': 0, 'b': 1, !'c'!};
+  // ```
+  //
+  // #### Common fixes
+  //
+  // If the expression is intended to compute either a key or a value in an
+  // entry, fix the issue by completing the code:
+  //
+  // ```dart
+  // var map = <String, int>{'a': 0, 'b': 1, 'c': 2};
+  // ```
   static const CompileTimeErrorCode EXPRESSION_IN_MAP =
       const CompileTimeErrorCode(
-          'EXPRESSION_IN_MAP', "Expressions cannot be used in a map literal.",
+          'EXPRESSION_IN_MAP', "Expressions can't be used in a map literal.",
           correction:
               "Try removing the expression or converting it to be a map entry.");
 
@@ -1706,13 +1880,50 @@
           correction: "Check your Dart SDK installation for completeness.");
 
   /**
-   * It is an error if an optional parameter (named or otherwise) with no
-   * default value has a potentially non-nullable type.
+   * No parameters.
    */
+  // #### Description
+  //
+  // The analyzer produces this diagnostic when an optional parameter doesn't
+  // have a default value, but has a
+  // <a href=”#potentially-non-nullable”>potentially non-nullable</a> type.
+  // Optional parameters that have no explicit default value have an implicit
+  // default value of `null`. If the type of the parameter doesn't allow the
+  // parameter to have a value of null, then the implicit default value is not
+  // valid.
+  //
+  // #### Example
+  //
+  // The following code generates this diagnostic:
+  //
+  // ```dart
+  // void log({String !message!}) {}
+  // ```
+  //
+  // #### Common fixes
+  //
+  // If the parameter can have the value `null`, then add a question mark after
+  // the type annotation:
+  //
+  // ```dart
+  // void log({String? message}) {}
+  // ```
+  //
+  // If the parameter can't be null, then either provide a default value:
+  //
+  // ```dart
+  // void log({String message = ''}) {}
+  // ```
+  //
+  // or add the `required` modifier to the parameter:
+  //
+  // ```dart
+  // void log({required String message}) {}
+  // ```
   static const CompileTimeErrorCode MISSING_DEFAULT_VALUE_FOR_PARAMETER =
       const CompileTimeErrorCode(
           'MISSING_DEFAULT_VALUE_FOR_PARAMETER',
-          "The parameter '{0}' cannot have a value of 'null' because of its "
+          "The parameter '{0}' can't have a value of 'null' because of its "
               "type, so it must either be a required parameter or have a "
               "default value.",
           correction:
@@ -2240,6 +2451,33 @@
           "{0} required argument(s) expected, but {1} found.",
           correction: "Try adding the missing arguments.");
 
+  /**
+   * No parameters.
+   */
+  // #### Description
+  //
+  // The analyzer produces this diagnostic when the static type of the
+  // expression of a spread element that appears in either a list literal or a
+  // set literal doesn't implement the type `Iterable`.
+  //
+  // #### Example
+  //
+  // The following code generates this diagnostic:
+  //
+  // ```dart
+  // var m = <String, int>{'a': 0, 'b': 1};
+  // var s = <String>{...m};
+  // ```
+  //
+  // #### Common fixes
+  //
+  // The most common fix is to replace the expression with one that produces an
+  // iterable object:
+  //
+  // ```dart
+  // var m = <String, int>{'a': 0, 'b': 1};
+  // var s = <String>{...m.keys};
+  // ```
   static const CompileTimeErrorCode NOT_ITERABLE_SPREAD =
       const CompileTimeErrorCode('NOT_ITERABLE_SPREAD',
           "Spread elements in list or set literals must implement 'Iterable'.");
@@ -2278,12 +2516,39 @@
           correction: "Try removing the question mark.");
 
   /**
-   * It is a compile-time error for a class to extend, implement, or mixin a
-   * type of the form T? for any T.
+   * No parameters.
    */
+  // #### Description
+  //
+  // The analyzer produces this diagnostic when a class declaration uses an
+  // extends clause to specify a superclass, and the type that's specified is a
+  // nullable type.
+  //
+  // The reason the supertype is a _type_ rather than a class name is to allow
+  // you to control the signatures of the members to be inherited from the
+  // supertype, such as by specifying type arguments. However, the nullability
+  // of a type doesn't change the signatures of any members, so there isn't any
+  // reason to allow the nullability to be specified when used in the extends
+  // clause.
+  //
+  // #### Example
+  //
+  // The following code generates this diagnostic:
+  //
+  // ```dart
+  // class Invalid extends !Duration?! {}
+  // ```
+  //
+  // #### Common fixes
+  //
+  // The most common fix is to remove the question mark:
+  //
+  // ```dart
+  // class Invalid extends Duration {}
+  // ```
   static const CompileTimeErrorCode NULLABLE_TYPE_IN_EXTENDS_CLAUSE =
       const CompileTimeErrorCode('NULLABLE_TYPE_IN_EXTENDS_CLAUSE',
-          "A class cannot extend a nullable type.",
+          "A class can't extend a nullable type.",
           correction: "Try removing the question mark.");
 
   /**
@@ -2924,9 +3189,12 @@
    * given [correction] template.
    */
   const CompileTimeErrorCode(String name, String message,
-      {String correction, bool isUnresolvedIdentifier: false})
+      {String correction,
+      bool hasPublishedDocs,
+      bool isUnresolvedIdentifier: false})
       : super.temporary(name, message,
             correction: correction,
+            hasPublishedDocs: hasPublishedDocs,
             isUnresolvedIdentifier: isUnresolvedIdentifier);
 
   @override
@@ -3556,9 +3824,12 @@
    * given [correction] template.
    */
   const StaticTypeWarningCode(String name, String message,
-      {String correction, bool isUnresolvedIdentifier: false})
+      {String correction,
+      bool hasPublishedDocs,
+      bool isUnresolvedIdentifier: false})
       : super.temporary(name, message,
             correction: correction,
+            hasPublishedDocs: hasPublishedDocs,
             isUnresolvedIdentifier: isUnresolvedIdentifier);
 
   @override
@@ -4632,10 +4903,12 @@
    */
   const StaticWarningCode(String name, String message,
       {String correction,
-      this.errorSeverity: ErrorSeverity.ERROR,
+      this.errorSeverity = ErrorSeverity.ERROR,
+      bool hasPublishedDocs,
       bool isUnresolvedIdentifier: false})
       : super.temporary(name, message,
             correction: correction,
+            hasPublishedDocs: hasPublishedDocs,
             isUnresolvedIdentifier: isUnresolvedIdentifier);
 
   @override
@@ -4904,9 +5177,10 @@
    * created from the optional [correction] template.
    */
   const StrongModeCode(ErrorType type, String name, String message,
-      {String correction})
+      {String correction, bool hasPublishedDocs})
       : type = type,
-        super.temporary('STRONG_MODE_$name', message, correction: correction);
+        super.temporary('STRONG_MODE_$name', message,
+            correction: correction, hasPublishedDocs: hasPublishedDocs);
 
   @override
   ErrorSeverity get errorSeverity => type.severity;
diff --git a/pkg/analyzer/lib/src/fasta/ast_builder.dart b/pkg/analyzer/lib/src/fasta/ast_builder.dart
index 2d4fad3..73b6a7c 100644
--- a/pkg/analyzer/lib/src/fasta/ast_builder.dart
+++ b/pkg/analyzer/lib/src/fasta/ast_builder.dart
@@ -908,7 +908,8 @@
             requiredKeyword: requiredKeyword,
             returnType: typeOrFunctionTypedParameter.returnType,
             typeParameters: typeOrFunctionTypedParameter.typeParameters,
-            parameters: typeOrFunctionTypedParameter.parameters);
+            parameters: typeOrFunctionTypedParameter.parameters,
+            question: typeOrFunctionTypedParameter.question);
       } else {
         node = ast.fieldFormalParameter2(
             identifier: name,
@@ -1089,7 +1090,7 @@
   }
 
   @override
-  void endFunctionTypedFormalParameter(Token nameToken) {
+  void endFunctionTypedFormalParameter(Token nameToken, Token question) {
     debugEvent("FunctionTypedFormalParameter");
 
     FormalParameterList formalParameters = pop();
@@ -1102,7 +1103,8 @@
         identifier: null,
         returnType: returnType,
         typeParameters: typeParameters,
-        parameters: formalParameters));
+        parameters: formalParameters,
+        question: question));
   }
 
   @override
diff --git a/pkg/analyzer/lib/src/generated/declaration_resolver.dart b/pkg/analyzer/lib/src/generated/declaration_resolver.dart
index e336eb9..d8abec8 100644
--- a/pkg/analyzer/lib/src/generated/declaration_resolver.dart
+++ b/pkg/analyzer/lib/src/generated/declaration_resolver.dart
@@ -32,13 +32,6 @@
   /// element model.
   ElementWalker _walker;
 
-  /// Is `true` if the current [ClassDeclaration] has a const constructor.
-  bool _hasConstConstructor = false;
-
-  /// The number of [GenericFunctionType] nodes that we encountered so far.
-  /// We use it to request the corresponding resolved node.
-  int _nextGenericFunctionTypeId = 0;
-
   DeclarationResolver();
 
   /// Resolve the declarations within the given compilation [unit] to the
@@ -86,14 +79,6 @@
 
   @override
   void visitClassDeclaration(ClassDeclaration node) {
-    _hasConstConstructor = false;
-    for (var member in node.members) {
-      if (member is ConstructorDeclaration && member.constKeyword != null) {
-        _hasConstConstructor = true;
-        break;
-      }
-    }
-
     ClassElement element = _match(node.name, _walker.getClass());
     _walk(new ElementWalker.forClass(element), () {
       super.visitClassDeclaration(node);
@@ -203,10 +188,6 @@
     super.visitFieldDeclaration(node);
     FieldElement firstFieldElement = node.fields.variables[0].declaredElement;
     resolveMetadata(node, node.metadata, firstFieldElement);
-    if (node.fields.isConst ||
-        !node.isStatic && node.fields.isFinal && _hasConstConstructor) {
-      _consumeGenericFunctionTypeIds(node.fields);
-    }
   }
 
   @override
@@ -289,19 +270,20 @@
 
   @override
   void visitGenericFunctionType(GenericFunctionType node) {
+    if (AnalysisDriver.useSummary2 && _enclosingUnit.linkedContext != null) {
+      var builder = new LocalElementBuilder(ElementHolder(), _enclosingUnit);
+      node.accept(builder);
+
+      var nodeImpl = node as GenericFunctionTypeImpl;
+      _enclosingUnit.encloseElement(
+        nodeImpl.declaredElement as GenericFunctionTypeElementImpl,
+      );
+      return;
+    }
     if (_walker.elementBuilder != null) {
       _walker.elementBuilder.visitGenericFunctionType(node);
     } else {
-      Element element;
-      if (AnalysisDriver.useSummary2 && _enclosingUnit.linkedContext != null) {
-        var id = _nextGenericFunctionTypeId++;
-        var context = _enclosingUnit.linkedContext;
-        var linkedNode = context.getGenericFunctionType(id);
-        element = linkedNode.declaredElement;
-        (node as GenericFunctionTypeImpl).declaredElement = element;
-      } else {
-        element = node.type?.element;
-      }
+      var element = node.type?.element;
       if (element is GenericFunctionTypeElement) {
         _setGenericFunctionType(node.returnType, element.returnType);
         _walk(new ElementWalker.forGenericFunctionType(element), () {
@@ -454,9 +436,6 @@
     super.visitTopLevelVariableDeclaration(node);
     VariableElement firstElement = node.variables.variables[0].declaredElement;
     resolveMetadata(node, node.metadata, firstElement);
-    if (node.variables.isConst) {
-      _consumeGenericFunctionTypeIds(node.variables);
-    }
   }
 
   @override
@@ -508,14 +487,6 @@
     }
   }
 
-  /// See [_ConsumeGenericFunctionTypeIdsVisitor].
-  void _consumeGenericFunctionTypeIds(VariableDeclarationList node) {
-    if (AnalysisDriver.useSummary2) {
-      var visitor = _ConsumeGenericFunctionTypeIdsVisitor(this);
-      node.variables.accept(visitor);
-    }
-  }
-
   /// Updates [identifier] to point to [element], after ensuring that the
   /// element has the expected name.
   ///
@@ -991,24 +962,6 @@
   static bool _isNotSynthetic(Element e) => !e.isSynthetic;
 }
 
-/// For consistency we set identifiers for [GenericFunctionType]s in constant
-/// variable initializers, and instance final fields of classes with constant
-/// constructors. However [DeclarationResolver] does not visit these
-/// initializers, in builds separate local elements. We still need to consume
-/// them to ensure that identifiers expected by the element model, and by
-/// [DeclarationResolver] match.
-class _ConsumeGenericFunctionTypeIdsVisitor extends RecursiveAstVisitor<void> {
-  final DeclarationResolver resolver;
-
-  _ConsumeGenericFunctionTypeIdsVisitor(this.resolver);
-
-  @override
-  void visitGenericFunctionType(GenericFunctionType node) {
-    resolver._nextGenericFunctionTypeId++;
-    super.visitGenericFunctionType(node);
-  }
-}
-
 class _ElementMismatchException extends AnalysisException {
   /// Creates an exception to refer to the given [compilationUnit], [element],
   /// and [cause].
diff --git a/pkg/analyzer/lib/src/generated/error_verifier.dart b/pkg/analyzer/lib/src/generated/error_verifier.dart
index 3791919..93bc24d 100644
--- a/pkg/analyzer/lib/src/generated/error_verifier.dart
+++ b/pkg/analyzer/lib/src/generated/error_verifier.dart
@@ -2340,7 +2340,12 @@
         featureSet: _featureSet)) {
       return;
     }
-    _errorReporter.reportErrorForNode(errorCode, expression, arguments);
+    if (expressionType.element == type.element) {
+      _errorReporter.reportErrorForNode(
+          StaticWarningCode.UNCHECKED_USE_OF_NULLABLE_VALUE, expression);
+    } else {
+      _errorReporter.reportErrorForNode(errorCode, expression, arguments);
+    }
   }
 
   bool _checkForAssignableExpression(
@@ -4438,7 +4443,7 @@
   }
 
   void _checkForMustCallSuper(MethodDeclaration node) {
-    if (node.isStatic) {
+    if (node.isStatic || node.isAbstract) {
       return;
     }
     MethodElement element = _findOverriddenMemberThatMustCallSuper(node);
@@ -4570,8 +4575,6 @@
   /**
    * Verify that the given [assertion] has either a 'bool' or '() -> bool'
    * condition.
-   *
-   * See [StaticTypeWarningCode.NON_BOOL_EXPRESSION].
    */
   void _checkForNonBoolExpression(Assertion assertion) {
     Expression expression = assertion.condition;
@@ -4579,8 +4582,13 @@
     if (type is InterfaceType) {
       if (!_typeSystem.isAssignableTo(type, _boolType,
           featureSet: _featureSet)) {
-        _errorReporter.reportErrorForNode(
-            StaticTypeWarningCode.NON_BOOL_EXPRESSION, expression);
+        if (type.element == _boolType.element) {
+          _errorReporter.reportErrorForNode(
+              StaticWarningCode.UNCHECKED_USE_OF_NULLABLE_VALUE, expression);
+        } else {
+          _errorReporter.reportErrorForNode(
+              StaticTypeWarningCode.NON_BOOL_EXPRESSION, expression);
+        }
       }
     } else if (type is FunctionType) {
       _errorReporter.reportErrorForNode(
@@ -4590,16 +4598,19 @@
 
   /**
    * Checks to ensure that the given [expression] is assignable to bool.
-   *
-   * See [StaticTypeWarningCode.NON_BOOL_NEGATION_EXPRESSION].
    */
   void _checkForNonBoolNegationExpression(Expression expression) {
     DartType conditionType = getStaticType(expression);
     if (conditionType != null &&
         !_typeSystem.isAssignableTo(conditionType, _boolType,
             featureSet: _featureSet)) {
-      _errorReporter.reportErrorForNode(
-          StaticTypeWarningCode.NON_BOOL_NEGATION_EXPRESSION, expression);
+      if (conditionType.element == _boolType.element) {
+        _errorReporter.reportErrorForNode(
+            StaticWarningCode.UNCHECKED_USE_OF_NULLABLE_VALUE, expression);
+      } else {
+        _errorReporter.reportErrorForNode(
+            StaticTypeWarningCode.NON_BOOL_NEGATION_EXPRESSION, expression);
+      }
     }
   }
 
@@ -4677,8 +4688,6 @@
    * Check for illegal derefences of nullables, ie, "unchecked" usages of
    * nullable values. Note that *any* usage of a null value is an "unchecked"
    * usage, because proper checks will promote the type to a non-nullable value.
-   *
-   * See [StaticWarningCode.UNCHECKED_USE_OF_NULLABLE_VALUE]
    */
   bool _checkForNullableDereference(Expression expression) {
     if (expression == null ||
diff --git a/pkg/analyzer/lib/src/generated/resolver.dart b/pkg/analyzer/lib/src/generated/resolver.dart
index 91657b9..b5b6b72 100644
--- a/pkg/analyzer/lib/src/generated/resolver.dart
+++ b/pkg/analyzer/lib/src/generated/resolver.dart
@@ -475,7 +475,7 @@
   @override
   void visitFunctionExpression(FunctionExpression node) {
     if (node.parent is! FunctionDeclaration) {
-      _checkForMissingReturn(null, node.body, node.element, node);
+      _checkForMissingReturn(null, node.body, node.declaredElement, node);
     }
     super.visitFunctionExpression(node);
   }
@@ -3396,6 +3396,16 @@
       LibraryElement coreLibrary, LibraryElement asyncLibrary)
       : super(coreLibrary, asyncLibrary);
 
+  /// Return a type provider initialized from the same library elements as the
+  /// [baseProvider].
+  factory NonNullableTypeProvider.from(TypeProvider baseProvider) {
+    return NonNullableTypeProvider(baseProvider.boolType.element.library,
+        baseProvider.streamType.element.library);
+  }
+
+  @override
+  DartType get bottomType => BottomTypeImpl.instance;
+
   @override
   InterfaceType _getType(Namespace namespace, String typeName) {
     InterfaceType type = super._getType(namespace, typeName);
@@ -3652,8 +3662,10 @@
   /// 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 ResolverErrorCode(String name, String message, {String correction})
-      : super.temporary(name, message, correction: correction);
+  const ResolverErrorCode(String name, String message,
+      {String correction, bool hasPublishedDocs})
+      : super.temporary(name, message,
+            correction: correction, hasPublishedDocs: hasPublishedDocs);
 
   @override
   ErrorSeverity get errorSeverity => type.severity;
@@ -6907,7 +6919,11 @@
       if (node.question != null) {
         _reportInvalidNullableType(node);
       }
-      nullabilitySuffix = NullabilitySuffix.none;
+      if (isNonNullableUnit) {
+        nullabilitySuffix = NullabilitySuffix.none;
+      } else {
+        nullabilitySuffix = NullabilitySuffix.star;
+      }
     } else {
       nullabilitySuffix = _getNullability(node.question != null);
     }
@@ -7413,11 +7429,18 @@
     _initializeFrom(coreLibrary, asyncLibrary);
   }
 
+  /// Return a type provider initialized from the same library elements as the
+  /// [baseProvider].
+  factory TypeProviderImpl.from(TypeProvider baseProvider) {
+    return TypeProviderImpl(baseProvider.boolType.element.library,
+        baseProvider.streamType.element.library);
+  }
+
   @override
   InterfaceType get boolType => _boolType;
 
   @override
-  DartType get bottomType => BottomTypeImpl.instance;
+  DartType get bottomType => BottomTypeImpl.instanceLegacy;
 
   @override
   InterfaceType get deprecatedType => _deprecatedType;
diff --git a/pkg/analyzer/lib/src/generated/testing/test_type_provider.dart b/pkg/analyzer/lib/src/generated/testing/test_type_provider.dart
index 82a7821..8ea7304 100644
--- a/pkg/analyzer/lib/src/generated/testing/test_type_provider.dart
+++ b/pkg/analyzer/lib/src/generated/testing/test_type_provider.dart
@@ -481,7 +481,8 @@
           _isNonNullableByDefault);
       var unit = new CompilationUnitElementImpl();
       library.definingCompilationUnit = unit;
-      unit.librarySource = unit.source = new StringSource('', null);
+      unit.librarySource =
+          unit.source = new StringSource('', null, uri: Uri.parse('dart:core'));
 
       nullElement.enclosingElement = library;
       _nullType = nullElement.type;
diff --git a/pkg/analyzer/lib/src/generated/type_system.dart b/pkg/analyzer/lib/src/generated/type_system.dart
index f3dce0d..7b41701 100644
--- a/pkg/analyzer/lib/src/generated/type_system.dart
+++ b/pkg/analyzer/lib/src/generated/type_system.dart
@@ -170,7 +170,8 @@
     }
 
     // No subtype relation, so no known GLB.
-    return typeProvider.bottomType;
+    // TODO(mfairhurst): implement fully NNBD GLB, and return Never (non-legacy)
+    return BottomTypeImpl.instanceLegacy;
   }
 
   /**
@@ -2153,7 +2154,7 @@
   /// Returns a non-nullable version of [type].  This is equivalent to the
   /// operation `NonNull` defined in the spec.
   DartType promoteToNonNull(TypeImpl type) {
-    if (type.isDartCoreNull) return typeProvider.bottomType;
+    if (type.isDartCoreNull) return BottomTypeImpl.instance;
     // TODO(mfairhurst): handle type parameter types
     return type.withNullability(NullabilitySuffix.none);
   }
diff --git a/pkg/analyzer/lib/src/string_source.dart b/pkg/analyzer/lib/src/string_source.dart
index c2f5f1f..7663db4 100644
--- a/pkg/analyzer/lib/src/string_source.dart
+++ b/pkg/analyzer/lib/src/string_source.dart
@@ -23,9 +23,9 @@
   @override
   final int modificationStamp;
 
-  StringSource(this._contents, String fullName)
+  StringSource(this._contents, String fullName, {Uri uri})
       : this.fullName = fullName,
-        uri = fullName == null ? null : new Uri.file(fullName),
+        uri = uri ?? (fullName == null ? null : new Uri.file(fullName)),
         modificationStamp = new DateTime.now().millisecondsSinceEpoch;
 
   @override
diff --git a/pkg/analyzer/lib/src/summary/format.dart b/pkg/analyzer/lib/src/summary/format.dart
index 2b5c069..c9f3506 100644
--- a/pkg/analyzer/lib/src/summary/format.dart
+++ b/pkg/analyzer/lib/src/summary/format.dart
@@ -4723,7 +4723,6 @@
     implements idl.LinkedNode {
   LinkedNodeTypeBuilder _variantField_24;
   List<LinkedNodeBuilder> _variantField_2;
-  LinkedNodeBuilder _variantField_11;
   List<LinkedNodeBuilder> _variantField_4;
   LinkedNodeBuilder _variantField_6;
   LinkedNodeBuilder _variantField_7;
@@ -4737,28 +4736,29 @@
   LinkedNodeBuilder _variantField_12;
   List<LinkedNodeBuilder> _variantField_5;
   LinkedNodeBuilder _variantField_13;
-  int _variantField_33;
-  int _variantField_32;
-  List<String> _variantField_35;
+  List<String> _variantField_33;
   idl.LinkedNodeCommentType _variantField_29;
   List<LinkedNodeBuilder> _variantField_3;
-  int _variantField_19;
   LinkedNodeBuilder _variantField_10;
   idl.LinkedNodeFormalParameterKind _variantField_26;
   double _variantField_21;
   LinkedNodeTypeBuilder _variantField_25;
   int _flags;
   String _variantField_1;
+  int _variantField_36;
   int _variantField_16;
   String _variantField_30;
   LinkedNodeBuilder _variantField_14;
   idl.LinkedNodeKind _kind;
-  List<String> _variantField_36;
+  List<String> _variantField_34;
+  String _name;
   String _variantField_20;
   bool _variantField_31;
-  idl.UnlinkedTokenType _variantField_37;
-  TopLevelInferenceErrorBuilder _variantField_34;
+  idl.UnlinkedTokenType _variantField_35;
+  TopLevelInferenceErrorBuilder _variantField_32;
+  LinkedNodeBuilder _variantField_11;
   String _variantField_22;
+  int _variantField_19;
 
   @override
   LinkedNodeTypeBuilder get actualReturnType {
@@ -5101,57 +5101,6 @@
   }
 
   @override
-  LinkedNodeBuilder get annotatedNode_comment {
-    assert(kind == idl.LinkedNodeKind.classDeclaration ||
-        kind == idl.LinkedNodeKind.classTypeAlias ||
-        kind == idl.LinkedNodeKind.constructorDeclaration ||
-        kind == idl.LinkedNodeKind.declaredIdentifier ||
-        kind == idl.LinkedNodeKind.enumDeclaration ||
-        kind == idl.LinkedNodeKind.enumConstantDeclaration ||
-        kind == idl.LinkedNodeKind.exportDirective ||
-        kind == idl.LinkedNodeKind.fieldDeclaration ||
-        kind == idl.LinkedNodeKind.functionDeclaration ||
-        kind == idl.LinkedNodeKind.functionTypeAlias ||
-        kind == idl.LinkedNodeKind.genericTypeAlias ||
-        kind == idl.LinkedNodeKind.importDirective ||
-        kind == idl.LinkedNodeKind.libraryDirective ||
-        kind == idl.LinkedNodeKind.methodDeclaration ||
-        kind == idl.LinkedNodeKind.mixinDeclaration ||
-        kind == idl.LinkedNodeKind.partDirective ||
-        kind == idl.LinkedNodeKind.partOfDirective ||
-        kind == idl.LinkedNodeKind.topLevelVariableDeclaration ||
-        kind == idl.LinkedNodeKind.typeParameter ||
-        kind == idl.LinkedNodeKind.variableDeclaration ||
-        kind == idl.LinkedNodeKind.variableDeclarationList);
-    return _variantField_11;
-  }
-
-  set annotatedNode_comment(LinkedNodeBuilder value) {
-    assert(kind == idl.LinkedNodeKind.classDeclaration ||
-        kind == idl.LinkedNodeKind.classTypeAlias ||
-        kind == idl.LinkedNodeKind.constructorDeclaration ||
-        kind == idl.LinkedNodeKind.declaredIdentifier ||
-        kind == idl.LinkedNodeKind.enumDeclaration ||
-        kind == idl.LinkedNodeKind.enumConstantDeclaration ||
-        kind == idl.LinkedNodeKind.exportDirective ||
-        kind == idl.LinkedNodeKind.fieldDeclaration ||
-        kind == idl.LinkedNodeKind.functionDeclaration ||
-        kind == idl.LinkedNodeKind.functionTypeAlias ||
-        kind == idl.LinkedNodeKind.genericTypeAlias ||
-        kind == idl.LinkedNodeKind.importDirective ||
-        kind == idl.LinkedNodeKind.libraryDirective ||
-        kind == idl.LinkedNodeKind.methodDeclaration ||
-        kind == idl.LinkedNodeKind.mixinDeclaration ||
-        kind == idl.LinkedNodeKind.partDirective ||
-        kind == idl.LinkedNodeKind.partOfDirective ||
-        kind == idl.LinkedNodeKind.topLevelVariableDeclaration ||
-        kind == idl.LinkedNodeKind.typeParameter ||
-        kind == idl.LinkedNodeKind.variableDeclaration ||
-        kind == idl.LinkedNodeKind.variableDeclarationList);
-    _variantField_11 = value;
-  }
-
-  @override
   List<LinkedNodeBuilder> get annotatedNode_metadata {
     assert(kind == idl.LinkedNodeKind.classDeclaration ||
         kind == idl.LinkedNodeKind.classTypeAlias ||
@@ -5375,12 +5324,6 @@
   }
 
   @override
-  LinkedNodeBuilder get enumConstantDeclaration_name {
-    assert(kind == idl.LinkedNodeKind.enumConstantDeclaration);
-    return _variantField_6;
-  }
-
-  @override
   LinkedNodeBuilder get expressionFunctionBody_expression {
     assert(kind == idl.LinkedNodeKind.expressionFunctionBody);
     return _variantField_6;
@@ -5816,11 +5759,6 @@
     _variantField_6 = value;
   }
 
-  set enumConstantDeclaration_name(LinkedNodeBuilder value) {
-    assert(kind == idl.LinkedNodeKind.enumConstantDeclaration);
-    _variantField_6 = value;
-  }
-
   set expressionFunctionBody_expression(LinkedNodeBuilder value) {
     assert(kind == idl.LinkedNodeKind.expressionFunctionBody);
     _variantField_6 = value;
@@ -6153,12 +6091,6 @@
   }
 
   @override
-  LinkedNodeBuilder get constructorDeclaration_name {
-    assert(kind == idl.LinkedNodeKind.constructorDeclaration);
-    return _variantField_7;
-  }
-
-  @override
   LinkedNodeBuilder get constructorFieldInitializer_fieldName {
     assert(kind == idl.LinkedNodeKind.constructorFieldInitializer);
     return _variantField_7;
@@ -6357,18 +6289,6 @@
   }
 
   @override
-  LinkedNodeBuilder get typeParameter_name {
-    assert(kind == idl.LinkedNodeKind.typeParameter);
-    return _variantField_7;
-  }
-
-  @override
-  LinkedNodeBuilder get variableDeclaration_name {
-    assert(kind == idl.LinkedNodeKind.variableDeclaration);
-    return _variantField_7;
-  }
-
-  @override
   LinkedNodeBuilder get whileStatement_condition {
     assert(kind == idl.LinkedNodeKind.whileStatement);
     return _variantField_7;
@@ -6429,11 +6349,6 @@
     _variantField_7 = value;
   }
 
-  set constructorDeclaration_name(LinkedNodeBuilder value) {
-    assert(kind == idl.LinkedNodeKind.constructorDeclaration);
-    _variantField_7 = value;
-  }
-
   set constructorFieldInitializer_fieldName(LinkedNodeBuilder value) {
     assert(kind == idl.LinkedNodeKind.constructorFieldInitializer);
     _variantField_7 = value;
@@ -6600,16 +6515,6 @@
     _variantField_7 = value;
   }
 
-  set typeParameter_name(LinkedNodeBuilder value) {
-    assert(kind == idl.LinkedNodeKind.typeParameter);
-    _variantField_7 = value;
-  }
-
-  set variableDeclaration_name(LinkedNodeBuilder value) {
-    assert(kind == idl.LinkedNodeKind.variableDeclaration);
-    _variantField_7 = value;
-  }
-
   set whileStatement_condition(LinkedNodeBuilder value) {
     assert(kind == idl.LinkedNodeKind.whileStatement);
     _variantField_7 = value;
@@ -6622,16 +6527,6 @@
   }
 
   @override
-  int get directive_keywordOffset {
-    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 genericFunctionType_id {
     assert(kind == idl.LinkedNodeKind.genericFunctionType);
     return _variantField_17 ??= 0;
@@ -6643,16 +6538,6 @@
     _variantField_17 = value;
   }
 
-  set directive_keywordOffset(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;
-  }
-
   set genericFunctionType_id(int value) {
     assert(kind == idl.LinkedNodeKind.genericFunctionType);
     assert(value == null || value >= 0);
@@ -7261,14 +7146,6 @@
     return _variantField_9;
   }
 
-  @override
-  LinkedNodeBuilder get normalFormalParameter_identifier {
-    assert(kind == idl.LinkedNodeKind.fieldFormalParameter ||
-        kind == idl.LinkedNodeKind.functionTypedFormalParameter ||
-        kind == idl.LinkedNodeKind.simpleFormalParameter);
-    return _variantField_9;
-  }
-
   set catchClause_stackTraceParameter(LinkedNodeBuilder value) {
     assert(kind == idl.LinkedNodeKind.catchClause);
     _variantField_9 = value;
@@ -7294,13 +7171,6 @@
     _variantField_9 = value;
   }
 
-  set normalFormalParameter_identifier(LinkedNodeBuilder value) {
-    assert(kind == idl.LinkedNodeKind.fieldFormalParameter ||
-        kind == idl.LinkedNodeKind.functionTypedFormalParameter ||
-        kind == idl.LinkedNodeKind.simpleFormalParameter);
-    _variantField_9 = value;
-  }
-
   @override
   LinkedNodeBuilder get classOrMixinDeclaration_implementsClause {
     assert(kind == idl.LinkedNodeKind.classDeclaration ||
@@ -7367,98 +7237,14 @@
   }
 
   @override
-  int get codeLength {
-    assert(kind == idl.LinkedNodeKind.classDeclaration ||
-        kind == idl.LinkedNodeKind.classTypeAlias ||
-        kind == idl.LinkedNodeKind.compilationUnit ||
-        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;
-  }
-
-  set codeLength(int value) {
-    assert(kind == idl.LinkedNodeKind.classDeclaration ||
-        kind == idl.LinkedNodeKind.classTypeAlias ||
-        kind == idl.LinkedNodeKind.compilationUnit ||
-        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;
-  }
-
-  @override
-  int get codeOffset {
-    assert(kind == idl.LinkedNodeKind.classDeclaration ||
-        kind == idl.LinkedNodeKind.classTypeAlias ||
-        kind == idl.LinkedNodeKind.compilationUnit ||
-        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_32 ??= 0;
-  }
-
-  set codeOffset(int value) {
-    assert(kind == idl.LinkedNodeKind.classDeclaration ||
-        kind == idl.LinkedNodeKind.classTypeAlias ||
-        kind == idl.LinkedNodeKind.compilationUnit ||
-        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_32 = value;
-  }
-
-  @override
   List<String> get comment_tokens {
     assert(kind == idl.LinkedNodeKind.comment);
-    return _variantField_35 ??= <String>[];
+    return _variantField_33 ??= <String>[];
   }
 
   set comment_tokens(List<String> value) {
     assert(kind == idl.LinkedNodeKind.comment);
-    _variantField_35 = value;
+    _variantField_33 = value;
   }
 
   @override
@@ -7532,78 +7318,16 @@
   }
 
   @override
-  int get constructorDeclaration_periodOffset {
-    assert(kind == idl.LinkedNodeKind.constructorDeclaration);
-    return _variantField_19 ??= 0;
-  }
-
-  @override
-  int get uriBasedDirective_uriElement {
-    assert(kind == idl.LinkedNodeKind.exportDirective ||
-        kind == idl.LinkedNodeKind.importDirective ||
-        kind == idl.LinkedNodeKind.partDirective);
-    return _variantField_19 ??= 0;
-  }
-
-  set constructorDeclaration_periodOffset(int value) {
-    assert(kind == idl.LinkedNodeKind.constructorDeclaration);
-    assert(value == null || value >= 0);
-    _variantField_19 = value;
-  }
-
-  set uriBasedDirective_uriElement(int value) {
-    assert(kind == idl.LinkedNodeKind.exportDirective ||
-        kind == idl.LinkedNodeKind.importDirective ||
-        kind == idl.LinkedNodeKind.partDirective);
-    assert(value == null || value >= 0);
-    _variantField_19 = value;
-  }
-
-  @override
   LinkedNodeBuilder get constructorDeclaration_returnType {
     assert(kind == idl.LinkedNodeKind.constructorDeclaration);
     return _variantField_10;
   }
 
-  @override
-  LinkedNodeBuilder get methodDeclaration_name {
-    assert(kind == idl.LinkedNodeKind.methodDeclaration);
-    return _variantField_10;
-  }
-
-  @override
-  LinkedNodeBuilder get namedCompilationUnitMember_name {
-    assert(kind == idl.LinkedNodeKind.classDeclaration ||
-        kind == idl.LinkedNodeKind.classTypeAlias ||
-        kind == idl.LinkedNodeKind.enumDeclaration ||
-        kind == idl.LinkedNodeKind.functionDeclaration ||
-        kind == idl.LinkedNodeKind.functionTypeAlias ||
-        kind == idl.LinkedNodeKind.genericTypeAlias ||
-        kind == idl.LinkedNodeKind.mixinDeclaration);
-    return _variantField_10;
-  }
-
   set constructorDeclaration_returnType(LinkedNodeBuilder value) {
     assert(kind == idl.LinkedNodeKind.constructorDeclaration);
     _variantField_10 = value;
   }
 
-  set methodDeclaration_name(LinkedNodeBuilder value) {
-    assert(kind == idl.LinkedNodeKind.methodDeclaration);
-    _variantField_10 = value;
-  }
-
-  set namedCompilationUnitMember_name(LinkedNodeBuilder value) {
-    assert(kind == idl.LinkedNodeKind.classDeclaration ||
-        kind == idl.LinkedNodeKind.classTypeAlias ||
-        kind == idl.LinkedNodeKind.enumDeclaration ||
-        kind == idl.LinkedNodeKind.functionDeclaration ||
-        kind == idl.LinkedNodeKind.functionTypeAlias ||
-        kind == idl.LinkedNodeKind.genericTypeAlias ||
-        kind == idl.LinkedNodeKind.mixinDeclaration);
-    _variantField_10 = value;
-  }
-
   @override
   idl.LinkedNodeFormalParameterKind get defaultFormalParameter_kind {
     assert(kind == idl.LinkedNodeKind.defaultFormalParameter);
@@ -7715,29 +7439,79 @@
   }
 
   @override
+  int get informativeId {
+    assert(kind == idl.LinkedNodeKind.classDeclaration ||
+        kind == idl.LinkedNodeKind.classTypeAlias ||
+        kind == idl.LinkedNodeKind.compilationUnit ||
+        kind == idl.LinkedNodeKind.compilationUnit ||
+        kind == idl.LinkedNodeKind.constructorDeclaration ||
+        kind == idl.LinkedNodeKind.defaultFormalParameter ||
+        kind == idl.LinkedNodeKind.enumConstantDeclaration ||
+        kind == idl.LinkedNodeKind.enumDeclaration ||
+        kind == idl.LinkedNodeKind.exportDirective ||
+        kind == idl.LinkedNodeKind.fieldDeclaration ||
+        kind == idl.LinkedNodeKind.fieldFormalParameter ||
+        kind == idl.LinkedNodeKind.functionDeclaration ||
+        kind == idl.LinkedNodeKind.functionTypedFormalParameter ||
+        kind == idl.LinkedNodeKind.functionTypeAlias ||
+        kind == idl.LinkedNodeKind.genericTypeAlias ||
+        kind == idl.LinkedNodeKind.importDirective ||
+        kind == idl.LinkedNodeKind.libraryDirective ||
+        kind == idl.LinkedNodeKind.methodDeclaration ||
+        kind == idl.LinkedNodeKind.mixinDeclaration ||
+        kind == idl.LinkedNodeKind.partDirective ||
+        kind == idl.LinkedNodeKind.partOfDirective ||
+        kind == idl.LinkedNodeKind.simpleFormalParameter ||
+        kind == idl.LinkedNodeKind.topLevelVariableDeclaration ||
+        kind == idl.LinkedNodeKind.typeParameter ||
+        kind == idl.LinkedNodeKind.variableDeclaration ||
+        kind == idl.LinkedNodeKind.variableDeclarationList);
+    return _variantField_36 ??= 0;
+  }
+
+  set informativeId(int value) {
+    assert(kind == idl.LinkedNodeKind.classDeclaration ||
+        kind == idl.LinkedNodeKind.classTypeAlias ||
+        kind == idl.LinkedNodeKind.compilationUnit ||
+        kind == idl.LinkedNodeKind.compilationUnit ||
+        kind == idl.LinkedNodeKind.constructorDeclaration ||
+        kind == idl.LinkedNodeKind.defaultFormalParameter ||
+        kind == idl.LinkedNodeKind.enumConstantDeclaration ||
+        kind == idl.LinkedNodeKind.enumDeclaration ||
+        kind == idl.LinkedNodeKind.exportDirective ||
+        kind == idl.LinkedNodeKind.fieldDeclaration ||
+        kind == idl.LinkedNodeKind.fieldFormalParameter ||
+        kind == idl.LinkedNodeKind.functionDeclaration ||
+        kind == idl.LinkedNodeKind.functionTypedFormalParameter ||
+        kind == idl.LinkedNodeKind.functionTypeAlias ||
+        kind == idl.LinkedNodeKind.genericTypeAlias ||
+        kind == idl.LinkedNodeKind.importDirective ||
+        kind == idl.LinkedNodeKind.libraryDirective ||
+        kind == idl.LinkedNodeKind.methodDeclaration ||
+        kind == idl.LinkedNodeKind.mixinDeclaration ||
+        kind == idl.LinkedNodeKind.partDirective ||
+        kind == idl.LinkedNodeKind.partOfDirective ||
+        kind == idl.LinkedNodeKind.simpleFormalParameter ||
+        kind == idl.LinkedNodeKind.topLevelVariableDeclaration ||
+        kind == idl.LinkedNodeKind.typeParameter ||
+        kind == idl.LinkedNodeKind.variableDeclaration ||
+        kind == idl.LinkedNodeKind.variableDeclarationList);
+    assert(value == null || value >= 0);
+    _variantField_36 = value;
+  }
+
+  @override
   int get integerLiteral_value {
     assert(kind == idl.LinkedNodeKind.integerLiteral);
     return _variantField_16 ??= 0;
   }
 
-  @override
-  int get simpleIdentifier_offset {
-    assert(kind == idl.LinkedNodeKind.simpleIdentifier);
-    return _variantField_16 ??= 0;
-  }
-
   set integerLiteral_value(int value) {
     assert(kind == idl.LinkedNodeKind.integerLiteral);
     assert(value == null || value >= 0);
     _variantField_16 = value;
   }
 
-  set simpleIdentifier_offset(int value) {
-    assert(kind == idl.LinkedNodeKind.simpleIdentifier);
-    assert(value == null || value >= 0);
-    _variantField_16 = value;
-  }
-
   @override
   String get interpolationString_value {
     assert(kind == idl.LinkedNodeKind.interpolationString);
@@ -7757,14 +7531,6 @@
   }
 
   @override
-  LinkedNodeBuilder get normalFormalParameter_comment {
-    assert(kind == idl.LinkedNodeKind.fieldFormalParameter ||
-        kind == idl.LinkedNodeKind.functionTypedFormalParameter ||
-        kind == idl.LinkedNodeKind.simpleFormalParameter);
-    return _variantField_14;
-  }
-
-  @override
   LinkedNodeBuilder get uriBasedDirective_uri {
     assert(kind == idl.LinkedNodeKind.exportDirective ||
         kind == idl.LinkedNodeKind.importDirective ||
@@ -7778,13 +7544,6 @@
     _variantField_14 = value;
   }
 
-  set normalFormalParameter_comment(LinkedNodeBuilder value) {
-    assert(kind == idl.LinkedNodeKind.fieldFormalParameter ||
-        kind == idl.LinkedNodeKind.functionTypedFormalParameter ||
-        kind == idl.LinkedNodeKind.simpleFormalParameter);
-    _variantField_14 = value;
-  }
-
   set uriBasedDirective_uri(LinkedNodeBuilder value) {
     assert(kind == idl.LinkedNodeKind.exportDirective ||
         kind == idl.LinkedNodeKind.importDirective ||
@@ -7802,7 +7561,7 @@
   @override
   List<String> get mixinDeclaration_superInvokedNames {
     assert(kind == idl.LinkedNodeKind.mixinDeclaration);
-    return _variantField_36 ??= <String>[];
+    return _variantField_34 ??= <String>[];
   }
 
   @override
@@ -7810,19 +7569,26 @@
     assert(kind == idl.LinkedNodeKind.hideCombinator ||
         kind == idl.LinkedNodeKind.showCombinator ||
         kind == idl.LinkedNodeKind.symbolLiteral);
-    return _variantField_36 ??= <String>[];
+    return _variantField_34 ??= <String>[];
   }
 
   set mixinDeclaration_superInvokedNames(List<String> value) {
     assert(kind == idl.LinkedNodeKind.mixinDeclaration);
-    _variantField_36 = value;
+    _variantField_34 = value;
   }
 
   set names(List<String> value) {
     assert(kind == idl.LinkedNodeKind.hideCombinator ||
         kind == idl.LinkedNodeKind.showCombinator ||
         kind == idl.LinkedNodeKind.symbolLiteral);
-    _variantField_36 = value;
+    _variantField_34 = value;
+  }
+
+  @override
+  String get name => _name ??= '';
+
+  set name(String value) {
+    this._name = value;
   }
 
   @override
@@ -7833,12 +7599,6 @@
   }
 
   @override
-  String get simpleIdentifier_name {
-    assert(kind == idl.LinkedNodeKind.simpleIdentifier);
-    return _variantField_20 ??= '';
-  }
-
-  @override
   String get simpleStringLiteral_value {
     assert(kind == idl.LinkedNodeKind.simpleStringLiteral);
     return _variantField_20 ??= '';
@@ -7850,11 +7610,6 @@
     _variantField_20 = value;
   }
 
-  set simpleIdentifier_name(String value) {
-    assert(kind == idl.LinkedNodeKind.simpleIdentifier);
-    _variantField_20 = value;
-  }
-
   set simpleStringLiteral_value(String value) {
     assert(kind == idl.LinkedNodeKind.simpleStringLiteral);
     _variantField_20 = value;
@@ -7882,25 +7637,36 @@
   @override
   idl.UnlinkedTokenType get spreadElement_spreadOperator {
     assert(kind == idl.LinkedNodeKind.spreadElement);
-    return _variantField_37 ??= idl.UnlinkedTokenType.NOTHING;
+    return _variantField_35 ??= idl.UnlinkedTokenType.NOTHING;
   }
 
   set spreadElement_spreadOperator(idl.UnlinkedTokenType value) {
     assert(kind == idl.LinkedNodeKind.spreadElement);
-    _variantField_37 = value;
+    _variantField_35 = value;
   }
 
   @override
   TopLevelInferenceErrorBuilder get topLevelTypeInferenceError {
     assert(kind == idl.LinkedNodeKind.simpleFormalParameter ||
         kind == idl.LinkedNodeKind.variableDeclaration);
-    return _variantField_34;
+    return _variantField_32;
   }
 
   set topLevelTypeInferenceError(TopLevelInferenceErrorBuilder value) {
     assert(kind == idl.LinkedNodeKind.simpleFormalParameter ||
         kind == idl.LinkedNodeKind.variableDeclaration);
-    _variantField_34 = value;
+    _variantField_32 = value;
+  }
+
+  @override
+  LinkedNodeBuilder get unused11 {
+    assert(kind == idl.LinkedNodeKind.classDeclaration);
+    return _variantField_11;
+  }
+
+  set unused11(LinkedNodeBuilder value) {
+    assert(kind == idl.LinkedNodeKind.classDeclaration);
+    _variantField_11 = value;
   }
 
   @override
@@ -7918,6 +7684,22 @@
     _variantField_22 = value;
   }
 
+  @override
+  int get uriBasedDirective_uriElement {
+    assert(kind == idl.LinkedNodeKind.exportDirective ||
+        kind == idl.LinkedNodeKind.importDirective ||
+        kind == idl.LinkedNodeKind.partDirective);
+    return _variantField_19 ??= 0;
+  }
+
+  set uriBasedDirective_uriElement(int value) {
+    assert(kind == idl.LinkedNodeKind.exportDirective ||
+        kind == idl.LinkedNodeKind.importDirective ||
+        kind == idl.LinkedNodeKind.partDirective);
+    assert(value == null || value >= 0);
+    _variantField_19 = value;
+  }
+
   LinkedNodeBuilder.adjacentStrings({
     List<LinkedNodeBuilder> adjacentStrings_strings,
   })  : _kind = idl.LinkedNodeKind.adjacentStrings,
@@ -8044,7 +7826,6 @@
         _variantField_9 = catchClause_stackTraceParameter;
 
   LinkedNodeBuilder.classDeclaration({
-    LinkedNodeBuilder annotatedNode_comment,
     List<LinkedNodeBuilder> annotatedNode_metadata,
     LinkedNodeBuilder classDeclaration_extendsClause,
     LinkedNodeBuilder classDeclaration_withClause,
@@ -8053,12 +7834,10 @@
     LinkedNodeBuilder classOrMixinDeclaration_implementsClause,
     List<LinkedNodeBuilder> classOrMixinDeclaration_members,
     LinkedNodeBuilder classOrMixinDeclaration_typeParameters,
-    int codeLength,
-    int codeOffset,
-    LinkedNodeBuilder namedCompilationUnitMember_name,
+    int informativeId,
     bool simplyBoundable_isSimplyBounded,
+    LinkedNodeBuilder unused11,
   })  : _kind = idl.LinkedNodeKind.classDeclaration,
-        _variantField_11 = annotatedNode_comment,
         _variantField_4 = annotatedNode_metadata,
         _variantField_6 = classDeclaration_extendsClause,
         _variantField_7 = classDeclaration_withClause,
@@ -8067,32 +7846,25 @@
         _variantField_12 = classOrMixinDeclaration_implementsClause,
         _variantField_5 = classOrMixinDeclaration_members,
         _variantField_13 = classOrMixinDeclaration_typeParameters,
-        _variantField_33 = codeLength,
-        _variantField_32 = codeOffset,
-        _variantField_10 = namedCompilationUnitMember_name,
-        _variantField_31 = simplyBoundable_isSimplyBounded;
+        _variantField_36 = informativeId,
+        _variantField_31 = simplyBoundable_isSimplyBounded,
+        _variantField_11 = unused11;
 
   LinkedNodeBuilder.classTypeAlias({
-    LinkedNodeBuilder annotatedNode_comment,
     List<LinkedNodeBuilder> annotatedNode_metadata,
     LinkedNodeBuilder classTypeAlias_typeParameters,
     LinkedNodeBuilder classTypeAlias_superclass,
     LinkedNodeBuilder classTypeAlias_withClause,
     LinkedNodeBuilder classTypeAlias_implementsClause,
-    int codeLength,
-    int codeOffset,
-    LinkedNodeBuilder namedCompilationUnitMember_name,
+    int informativeId,
     bool simplyBoundable_isSimplyBounded,
   })  : _kind = idl.LinkedNodeKind.classTypeAlias,
-        _variantField_11 = annotatedNode_comment,
         _variantField_4 = annotatedNode_metadata,
         _variantField_6 = classTypeAlias_typeParameters,
         _variantField_7 = classTypeAlias_superclass,
         _variantField_8 = classTypeAlias_withClause,
         _variantField_9 = classTypeAlias_implementsClause,
-        _variantField_33 = codeLength,
-        _variantField_32 = codeOffset,
-        _variantField_10 = namedCompilationUnitMember_name,
+        _variantField_36 = informativeId,
         _variantField_31 = simplyBoundable_isSimplyBounded;
 
   LinkedNodeBuilder.comment({
@@ -8101,7 +7873,7 @@
     idl.LinkedNodeCommentType comment_type,
   })  : _kind = idl.LinkedNodeKind.comment,
         _variantField_2 = comment_references,
-        _variantField_35 = comment_tokens,
+        _variantField_33 = comment_tokens,
         _variantField_29 = comment_type;
 
   LinkedNodeBuilder.commentReference({
@@ -8112,15 +7884,13 @@
   LinkedNodeBuilder.compilationUnit({
     List<LinkedNodeBuilder> compilationUnit_declarations,
     LinkedNodeBuilder compilationUnit_scriptTag,
-    int codeLength,
-    int codeOffset,
     List<LinkedNodeBuilder> compilationUnit_directives,
+    int informativeId,
   })  : _kind = idl.LinkedNodeKind.compilationUnit,
         _variantField_2 = compilationUnit_declarations,
         _variantField_6 = compilationUnit_scriptTag,
-        _variantField_33 = codeLength,
-        _variantField_32 = codeOffset,
-        _variantField_3 = compilationUnit_directives;
+        _variantField_3 = compilationUnit_directives,
+        _variantField_36 = informativeId;
 
   LinkedNodeBuilder.conditionalExpression({
     LinkedNodeBuilder conditionalExpression_condition,
@@ -8144,28 +7914,20 @@
 
   LinkedNodeBuilder.constructorDeclaration({
     List<LinkedNodeBuilder> constructorDeclaration_initializers,
-    LinkedNodeBuilder annotatedNode_comment,
     List<LinkedNodeBuilder> annotatedNode_metadata,
     LinkedNodeBuilder constructorDeclaration_body,
-    LinkedNodeBuilder constructorDeclaration_name,
     LinkedNodeBuilder constructorDeclaration_parameters,
     LinkedNodeBuilder constructorDeclaration_redirectedConstructor,
-    int codeLength,
-    int codeOffset,
-    int constructorDeclaration_periodOffset,
     LinkedNodeBuilder constructorDeclaration_returnType,
+    int informativeId,
   })  : _kind = idl.LinkedNodeKind.constructorDeclaration,
         _variantField_2 = constructorDeclaration_initializers,
-        _variantField_11 = annotatedNode_comment,
         _variantField_4 = annotatedNode_metadata,
         _variantField_6 = constructorDeclaration_body,
-        _variantField_7 = constructorDeclaration_name,
         _variantField_8 = constructorDeclaration_parameters,
         _variantField_9 = constructorDeclaration_redirectedConstructor,
-        _variantField_33 = codeLength,
-        _variantField_32 = codeOffset,
-        _variantField_19 = constructorDeclaration_periodOffset,
-        _variantField_10 = constructorDeclaration_returnType;
+        _variantField_10 = constructorDeclaration_returnType,
+        _variantField_36 = informativeId;
 
   LinkedNodeBuilder.constructorFieldInitializer({
     LinkedNodeBuilder constructorFieldInitializer_expression,
@@ -8191,12 +7953,10 @@
         _variantField_6 = continueStatement_label;
 
   LinkedNodeBuilder.declaredIdentifier({
-    LinkedNodeBuilder annotatedNode_comment,
     List<LinkedNodeBuilder> annotatedNode_metadata,
     LinkedNodeBuilder declaredIdentifier_identifier,
     LinkedNodeBuilder declaredIdentifier_type,
   })  : _kind = idl.LinkedNodeKind.declaredIdentifier,
-        _variantField_11 = annotatedNode_comment,
         _variantField_4 = annotatedNode_metadata,
         _variantField_6 = declaredIdentifier_identifier,
         _variantField_7 = declaredIdentifier_type;
@@ -8204,15 +7964,13 @@
   LinkedNodeBuilder.defaultFormalParameter({
     LinkedNodeBuilder defaultFormalParameter_defaultValue,
     LinkedNodeBuilder defaultFormalParameter_parameter,
-    int codeLength,
-    int codeOffset,
     idl.LinkedNodeFormalParameterKind defaultFormalParameter_kind,
+    int informativeId,
   })  : _kind = idl.LinkedNodeKind.defaultFormalParameter,
         _variantField_6 = defaultFormalParameter_defaultValue,
         _variantField_7 = defaultFormalParameter_parameter,
-        _variantField_33 = codeLength,
-        _variantField_32 = codeOffset,
-        _variantField_26 = defaultFormalParameter_kind;
+        _variantField_26 = defaultFormalParameter_kind,
+        _variantField_36 = informativeId;
 
   LinkedNodeBuilder.doStatement({
     LinkedNodeBuilder doStatement_body,
@@ -8242,49 +8000,39 @@
         _variantField_15 = emptyStatement_fake;
 
   LinkedNodeBuilder.enumConstantDeclaration({
-    LinkedNodeBuilder annotatedNode_comment,
     List<LinkedNodeBuilder> annotatedNode_metadata,
-    LinkedNodeBuilder enumConstantDeclaration_name,
+    int informativeId,
   })  : _kind = idl.LinkedNodeKind.enumConstantDeclaration,
-        _variantField_11 = annotatedNode_comment,
         _variantField_4 = annotatedNode_metadata,
-        _variantField_6 = enumConstantDeclaration_name;
+        _variantField_36 = informativeId;
 
   LinkedNodeBuilder.enumDeclaration({
     List<LinkedNodeBuilder> enumDeclaration_constants,
-    LinkedNodeBuilder annotatedNode_comment,
     List<LinkedNodeBuilder> annotatedNode_metadata,
-    int codeLength,
-    int codeOffset,
-    LinkedNodeBuilder namedCompilationUnitMember_name,
+    int informativeId,
   })  : _kind = idl.LinkedNodeKind.enumDeclaration,
         _variantField_2 = enumDeclaration_constants,
-        _variantField_11 = annotatedNode_comment,
         _variantField_4 = annotatedNode_metadata,
-        _variantField_33 = codeLength,
-        _variantField_32 = codeOffset,
-        _variantField_10 = namedCompilationUnitMember_name;
+        _variantField_36 = informativeId;
 
   LinkedNodeBuilder.exportDirective({
     List<LinkedNodeBuilder> namespaceDirective_combinators,
-    LinkedNodeBuilder annotatedNode_comment,
     List<LinkedNodeBuilder> annotatedNode_metadata,
-    int directive_keywordOffset,
     List<LinkedNodeBuilder> namespaceDirective_configurations,
-    int uriBasedDirective_uriElement,
+    int informativeId,
     LinkedNodeBuilder uriBasedDirective_uri,
     String namespaceDirective_selectedUri,
     String uriBasedDirective_uriContent,
+    int uriBasedDirective_uriElement,
   })  : _kind = idl.LinkedNodeKind.exportDirective,
         _variantField_2 = namespaceDirective_combinators,
-        _variantField_11 = annotatedNode_comment,
         _variantField_4 = annotatedNode_metadata,
-        _variantField_17 = directive_keywordOffset,
         _variantField_3 = namespaceDirective_configurations,
-        _variantField_19 = uriBasedDirective_uriElement,
+        _variantField_36 = informativeId,
         _variantField_14 = uriBasedDirective_uri,
         _variantField_20 = namespaceDirective_selectedUri,
-        _variantField_22 = uriBasedDirective_uriContent;
+        _variantField_22 = uriBasedDirective_uriContent,
+        _variantField_19 = uriBasedDirective_uriElement;
 
   LinkedNodeBuilder.expressionFunctionBody({
     LinkedNodeBuilder expressionFunctionBody_expression,
@@ -8302,13 +8050,13 @@
         _variantField_6 = extendsClause_superclass;
 
   LinkedNodeBuilder.fieldDeclaration({
-    LinkedNodeBuilder annotatedNode_comment,
     List<LinkedNodeBuilder> annotatedNode_metadata,
     LinkedNodeBuilder fieldDeclaration_fields,
+    int informativeId,
   })  : _kind = idl.LinkedNodeKind.fieldDeclaration,
-        _variantField_11 = annotatedNode_comment,
         _variantField_4 = annotatedNode_metadata,
-        _variantField_6 = fieldDeclaration_fields;
+        _variantField_6 = fieldDeclaration_fields,
+        _variantField_36 = informativeId;
 
   LinkedNodeBuilder.fieldFormalParameter({
     LinkedNodeTypeBuilder actualType,
@@ -8317,10 +8065,7 @@
     LinkedNodeBuilder fieldFormalParameter_typeParameters,
     LinkedNodeBuilder fieldFormalParameter_formalParameters,
     bool inheritsCovariant,
-    LinkedNodeBuilder normalFormalParameter_identifier,
-    int codeLength,
-    int codeOffset,
-    LinkedNodeBuilder normalFormalParameter_comment,
+    int informativeId,
   })  : _kind = idl.LinkedNodeKind.fieldFormalParameter,
         _variantField_24 = actualType,
         _variantField_4 = normalFormalParameter_metadata,
@@ -8328,10 +8073,7 @@
         _variantField_7 = fieldFormalParameter_typeParameters,
         _variantField_8 = fieldFormalParameter_formalParameters,
         _variantField_27 = inheritsCovariant,
-        _variantField_9 = normalFormalParameter_identifier,
-        _variantField_33 = codeLength,
-        _variantField_32 = codeOffset,
-        _variantField_14 = normalFormalParameter_comment;
+        _variantField_36 = informativeId;
 
   LinkedNodeBuilder.forEachPartsWithDeclaration({
     LinkedNodeBuilder forEachParts_iterable,
@@ -8386,22 +8128,16 @@
 
   LinkedNodeBuilder.functionDeclaration({
     LinkedNodeTypeBuilder actualReturnType,
-    LinkedNodeBuilder annotatedNode_comment,
     List<LinkedNodeBuilder> annotatedNode_metadata,
     LinkedNodeBuilder functionDeclaration_functionExpression,
     LinkedNodeBuilder functionDeclaration_returnType,
-    int codeLength,
-    int codeOffset,
-    LinkedNodeBuilder namedCompilationUnitMember_name,
+    int informativeId,
   })  : _kind = idl.LinkedNodeKind.functionDeclaration,
         _variantField_24 = actualReturnType,
-        _variantField_11 = annotatedNode_comment,
         _variantField_4 = annotatedNode_metadata,
         _variantField_6 = functionDeclaration_functionExpression,
         _variantField_7 = functionDeclaration_returnType,
-        _variantField_33 = codeLength,
-        _variantField_32 = codeOffset,
-        _variantField_10 = namedCompilationUnitMember_name;
+        _variantField_36 = informativeId;
 
   LinkedNodeBuilder.functionDeclarationStatement({
     LinkedNodeBuilder functionDeclarationStatement_functionDeclaration,
@@ -8434,27 +8170,21 @@
 
   LinkedNodeBuilder.functionTypeAlias({
     LinkedNodeTypeBuilder actualReturnType,
-    LinkedNodeBuilder annotatedNode_comment,
     List<LinkedNodeBuilder> annotatedNode_metadata,
     LinkedNodeBuilder functionTypeAlias_formalParameters,
     LinkedNodeBuilder functionTypeAlias_returnType,
     LinkedNodeBuilder functionTypeAlias_typeParameters,
     bool typeAlias_hasSelfReference,
-    int codeLength,
-    int codeOffset,
-    LinkedNodeBuilder namedCompilationUnitMember_name,
+    int informativeId,
     bool simplyBoundable_isSimplyBounded,
   })  : _kind = idl.LinkedNodeKind.functionTypeAlias,
         _variantField_24 = actualReturnType,
-        _variantField_11 = annotatedNode_comment,
         _variantField_4 = annotatedNode_metadata,
         _variantField_6 = functionTypeAlias_formalParameters,
         _variantField_7 = functionTypeAlias_returnType,
         _variantField_8 = functionTypeAlias_typeParameters,
         _variantField_27 = typeAlias_hasSelfReference,
-        _variantField_33 = codeLength,
-        _variantField_32 = codeOffset,
-        _variantField_10 = namedCompilationUnitMember_name,
+        _variantField_36 = informativeId,
         _variantField_31 = simplyBoundable_isSimplyBounded;
 
   LinkedNodeBuilder.functionTypedFormalParameter({
@@ -8464,10 +8194,7 @@
     LinkedNodeBuilder functionTypedFormalParameter_returnType,
     LinkedNodeBuilder functionTypedFormalParameter_typeParameters,
     bool inheritsCovariant,
-    LinkedNodeBuilder normalFormalParameter_identifier,
-    int codeLength,
-    int codeOffset,
-    LinkedNodeBuilder normalFormalParameter_comment,
+    int informativeId,
   })  : _kind = idl.LinkedNodeKind.functionTypedFormalParameter,
         _variantField_24 = actualType,
         _variantField_4 = normalFormalParameter_metadata,
@@ -8475,10 +8202,7 @@
         _variantField_7 = functionTypedFormalParameter_returnType,
         _variantField_8 = functionTypedFormalParameter_typeParameters,
         _variantField_27 = inheritsCovariant,
-        _variantField_9 = normalFormalParameter_identifier,
-        _variantField_33 = codeLength,
-        _variantField_32 = codeOffset,
-        _variantField_14 = normalFormalParameter_comment;
+        _variantField_36 = informativeId;
 
   LinkedNodeBuilder.genericFunctionType({
     LinkedNodeTypeBuilder actualReturnType,
@@ -8496,30 +8220,24 @@
         _variantField_25 = genericFunctionType_type;
 
   LinkedNodeBuilder.genericTypeAlias({
-    LinkedNodeBuilder annotatedNode_comment,
     List<LinkedNodeBuilder> annotatedNode_metadata,
     LinkedNodeBuilder genericTypeAlias_typeParameters,
     LinkedNodeBuilder genericTypeAlias_functionType,
     bool typeAlias_hasSelfReference,
-    int codeLength,
-    int codeOffset,
-    LinkedNodeBuilder namedCompilationUnitMember_name,
+    int informativeId,
     bool simplyBoundable_isSimplyBounded,
   })  : _kind = idl.LinkedNodeKind.genericTypeAlias,
-        _variantField_11 = annotatedNode_comment,
         _variantField_4 = annotatedNode_metadata,
         _variantField_6 = genericTypeAlias_typeParameters,
         _variantField_7 = genericTypeAlias_functionType,
         _variantField_27 = typeAlias_hasSelfReference,
-        _variantField_33 = codeLength,
-        _variantField_32 = codeOffset,
-        _variantField_10 = namedCompilationUnitMember_name,
+        _variantField_36 = informativeId,
         _variantField_31 = simplyBoundable_isSimplyBounded;
 
   LinkedNodeBuilder.hideCombinator({
     List<String> names,
   })  : _kind = idl.LinkedNodeKind.hideCombinator,
-        _variantField_36 = names;
+        _variantField_34 = names;
 
   LinkedNodeBuilder.ifElement({
     LinkedNodeBuilder ifMixin_condition,
@@ -8546,28 +8264,26 @@
 
   LinkedNodeBuilder.importDirective({
     List<LinkedNodeBuilder> namespaceDirective_combinators,
-    LinkedNodeBuilder annotatedNode_comment,
     List<LinkedNodeBuilder> annotatedNode_metadata,
-    int directive_keywordOffset,
     int importDirective_prefixOffset,
     List<LinkedNodeBuilder> namespaceDirective_configurations,
-    int uriBasedDirective_uriElement,
     String importDirective_prefix,
+    int informativeId,
     LinkedNodeBuilder uriBasedDirective_uri,
     String namespaceDirective_selectedUri,
     String uriBasedDirective_uriContent,
+    int uriBasedDirective_uriElement,
   })  : _kind = idl.LinkedNodeKind.importDirective,
         _variantField_2 = namespaceDirective_combinators,
-        _variantField_11 = annotatedNode_comment,
         _variantField_4 = annotatedNode_metadata,
-        _variantField_17 = directive_keywordOffset,
         _variantField_15 = importDirective_prefixOffset,
         _variantField_3 = namespaceDirective_configurations,
-        _variantField_19 = uriBasedDirective_uriElement,
         _variantField_1 = importDirective_prefix,
+        _variantField_36 = informativeId,
         _variantField_14 = uriBasedDirective_uri,
         _variantField_20 = namespaceDirective_selectedUri,
-        _variantField_22 = uriBasedDirective_uriContent;
+        _variantField_22 = uriBasedDirective_uriContent,
+        _variantField_19 = uriBasedDirective_uriElement;
 
   LinkedNodeBuilder.indexExpression({
     LinkedNodeBuilder indexExpression_index,
@@ -8628,15 +8344,13 @@
         _variantField_6 = labeledStatement_statement;
 
   LinkedNodeBuilder.libraryDirective({
-    LinkedNodeBuilder annotatedNode_comment,
     List<LinkedNodeBuilder> annotatedNode_metadata,
     LinkedNodeBuilder libraryDirective_name,
-    int directive_keywordOffset,
+    int informativeId,
   })  : _kind = idl.LinkedNodeKind.libraryDirective,
-        _variantField_11 = annotatedNode_comment,
         _variantField_4 = annotatedNode_metadata,
         _variantField_6 = libraryDirective_name,
-        _variantField_17 = directive_keywordOffset;
+        _variantField_36 = informativeId;
 
   LinkedNodeBuilder.libraryIdentifier({
     List<LinkedNodeBuilder> libraryIdentifier_components,
@@ -8661,26 +8375,20 @@
 
   LinkedNodeBuilder.methodDeclaration({
     LinkedNodeTypeBuilder actualReturnType,
-    LinkedNodeBuilder annotatedNode_comment,
     List<LinkedNodeBuilder> annotatedNode_metadata,
     LinkedNodeBuilder methodDeclaration_body,
     LinkedNodeBuilder methodDeclaration_formalParameters,
     LinkedNodeBuilder methodDeclaration_returnType,
     LinkedNodeBuilder methodDeclaration_typeParameters,
-    int codeLength,
-    int codeOffset,
-    LinkedNodeBuilder methodDeclaration_name,
+    int informativeId,
   })  : _kind = idl.LinkedNodeKind.methodDeclaration,
         _variantField_24 = actualReturnType,
-        _variantField_11 = annotatedNode_comment,
         _variantField_4 = annotatedNode_metadata,
         _variantField_6 = methodDeclaration_body,
         _variantField_7 = methodDeclaration_formalParameters,
         _variantField_8 = methodDeclaration_returnType,
         _variantField_9 = methodDeclaration_typeParameters,
-        _variantField_33 = codeLength,
-        _variantField_32 = codeOffset,
-        _variantField_10 = methodDeclaration_name;
+        _variantField_36 = informativeId;
 
   LinkedNodeBuilder.methodInvocation({
     LinkedNodeTypeBuilder invocationExpression_invokeType,
@@ -8698,28 +8406,22 @@
         _variantField_14 = invocationExpression_arguments;
 
   LinkedNodeBuilder.mixinDeclaration({
-    LinkedNodeBuilder annotatedNode_comment,
     List<LinkedNodeBuilder> annotatedNode_metadata,
     LinkedNodeBuilder mixinDeclaration_onClause,
     LinkedNodeBuilder classOrMixinDeclaration_implementsClause,
     List<LinkedNodeBuilder> classOrMixinDeclaration_members,
     LinkedNodeBuilder classOrMixinDeclaration_typeParameters,
-    int codeLength,
-    int codeOffset,
-    LinkedNodeBuilder namedCompilationUnitMember_name,
+    int informativeId,
     List<String> mixinDeclaration_superInvokedNames,
     bool simplyBoundable_isSimplyBounded,
   })  : _kind = idl.LinkedNodeKind.mixinDeclaration,
-        _variantField_11 = annotatedNode_comment,
         _variantField_4 = annotatedNode_metadata,
         _variantField_6 = mixinDeclaration_onClause,
         _variantField_12 = classOrMixinDeclaration_implementsClause,
         _variantField_5 = classOrMixinDeclaration_members,
         _variantField_13 = classOrMixinDeclaration_typeParameters,
-        _variantField_33 = codeLength,
-        _variantField_32 = codeOffset,
-        _variantField_10 = namedCompilationUnitMember_name,
-        _variantField_36 = mixinDeclaration_superInvokedNames,
+        _variantField_36 = informativeId,
+        _variantField_34 = mixinDeclaration_superInvokedNames,
         _variantField_31 = simplyBoundable_isSimplyBounded;
 
   LinkedNodeBuilder.namedExpression({
@@ -8759,32 +8461,28 @@
         _variantField_25 = expression_type;
 
   LinkedNodeBuilder.partDirective({
-    LinkedNodeBuilder annotatedNode_comment,
     List<LinkedNodeBuilder> annotatedNode_metadata,
-    int directive_keywordOffset,
-    int uriBasedDirective_uriElement,
+    int informativeId,
     LinkedNodeBuilder uriBasedDirective_uri,
     String uriBasedDirective_uriContent,
+    int uriBasedDirective_uriElement,
   })  : _kind = idl.LinkedNodeKind.partDirective,
-        _variantField_11 = annotatedNode_comment,
         _variantField_4 = annotatedNode_metadata,
-        _variantField_17 = directive_keywordOffset,
-        _variantField_19 = uriBasedDirective_uriElement,
+        _variantField_36 = informativeId,
         _variantField_14 = uriBasedDirective_uri,
-        _variantField_22 = uriBasedDirective_uriContent;
+        _variantField_22 = uriBasedDirective_uriContent,
+        _variantField_19 = uriBasedDirective_uriElement;
 
   LinkedNodeBuilder.partOfDirective({
-    LinkedNodeBuilder annotatedNode_comment,
     List<LinkedNodeBuilder> annotatedNode_metadata,
     LinkedNodeBuilder partOfDirective_libraryName,
     LinkedNodeBuilder partOfDirective_uri,
-    int directive_keywordOffset,
+    int informativeId,
   })  : _kind = idl.LinkedNodeKind.partOfDirective,
-        _variantField_11 = annotatedNode_comment,
         _variantField_4 = annotatedNode_metadata,
         _variantField_6 = partOfDirective_libraryName,
         _variantField_7 = partOfDirective_uri,
-        _variantField_17 = directive_keywordOffset;
+        _variantField_36 = informativeId;
 
   LinkedNodeBuilder.postfixExpression({
     LinkedNodeBuilder postfixExpression_operand,
@@ -8865,41 +8563,31 @@
   LinkedNodeBuilder.showCombinator({
     List<String> names,
   })  : _kind = idl.LinkedNodeKind.showCombinator,
-        _variantField_36 = names;
+        _variantField_34 = names;
 
   LinkedNodeBuilder.simpleFormalParameter({
     LinkedNodeTypeBuilder actualType,
     List<LinkedNodeBuilder> normalFormalParameter_metadata,
     LinkedNodeBuilder simpleFormalParameter_type,
     bool inheritsCovariant,
-    LinkedNodeBuilder normalFormalParameter_identifier,
-    int codeLength,
-    int codeOffset,
-    LinkedNodeBuilder normalFormalParameter_comment,
+    int informativeId,
     TopLevelInferenceErrorBuilder topLevelTypeInferenceError,
   })  : _kind = idl.LinkedNodeKind.simpleFormalParameter,
         _variantField_24 = actualType,
         _variantField_4 = normalFormalParameter_metadata,
         _variantField_6 = simpleFormalParameter_type,
         _variantField_27 = inheritsCovariant,
-        _variantField_9 = normalFormalParameter_identifier,
-        _variantField_33 = codeLength,
-        _variantField_32 = codeOffset,
-        _variantField_14 = normalFormalParameter_comment,
-        _variantField_34 = topLevelTypeInferenceError;
+        _variantField_36 = informativeId,
+        _variantField_32 = topLevelTypeInferenceError;
 
   LinkedNodeBuilder.simpleIdentifier({
     LinkedNodeTypeBuilder simpleIdentifier_elementType,
     int simpleIdentifier_element,
     LinkedNodeTypeBuilder expression_type,
-    int simpleIdentifier_offset,
-    String simpleIdentifier_name,
   })  : _kind = idl.LinkedNodeKind.simpleIdentifier,
         _variantField_23 = simpleIdentifier_elementType,
         _variantField_15 = simpleIdentifier_element,
-        _variantField_25 = expression_type,
-        _variantField_16 = simpleIdentifier_offset,
-        _variantField_20 = simpleIdentifier_name;
+        _variantField_25 = expression_type;
 
   LinkedNodeBuilder.simpleStringLiteral({
     String simpleStringLiteral_value,
@@ -8911,7 +8599,7 @@
     idl.UnlinkedTokenType spreadElement_spreadOperator,
   })  : _kind = idl.LinkedNodeKind.spreadElement,
         _variantField_6 = spreadElement_expression,
-        _variantField_37 = spreadElement_spreadOperator;
+        _variantField_35 = spreadElement_spreadOperator;
 
   LinkedNodeBuilder.stringInterpolation({
     List<LinkedNodeBuilder> stringInterpolation_elements,
@@ -8962,7 +8650,7 @@
     List<String> names,
   })  : _kind = idl.LinkedNodeKind.symbolLiteral,
         _variantField_25 = expression_type,
-        _variantField_36 = names;
+        _variantField_34 = names;
 
   LinkedNodeBuilder.thisExpression({
     LinkedNodeTypeBuilder expression_type,
@@ -8977,13 +8665,13 @@
         _variantField_25 = expression_type;
 
   LinkedNodeBuilder.topLevelVariableDeclaration({
-    LinkedNodeBuilder annotatedNode_comment,
     List<LinkedNodeBuilder> annotatedNode_metadata,
     LinkedNodeBuilder topLevelVariableDeclaration_variableList,
+    int informativeId,
   })  : _kind = idl.LinkedNodeKind.topLevelVariableDeclaration,
-        _variantField_11 = annotatedNode_comment,
         _variantField_4 = annotatedNode_metadata,
-        _variantField_6 = topLevelVariableDeclaration_variableList;
+        _variantField_6 = topLevelVariableDeclaration_variableList,
+        _variantField_36 = informativeId;
 
   LinkedNodeBuilder.tryStatement({
     List<LinkedNodeBuilder> tryStatement_catchClauses,
@@ -9009,21 +8697,15 @@
         _variantField_23 = typeName_type;
 
   LinkedNodeBuilder.typeParameter({
-    LinkedNodeBuilder annotatedNode_comment,
     List<LinkedNodeBuilder> annotatedNode_metadata,
     LinkedNodeBuilder typeParameter_bound,
-    LinkedNodeBuilder typeParameter_name,
     LinkedNodeTypeBuilder typeParameter_defaultType,
-    int codeLength,
-    int codeOffset,
+    int informativeId,
   })  : _kind = idl.LinkedNodeKind.typeParameter,
-        _variantField_11 = annotatedNode_comment,
         _variantField_4 = annotatedNode_metadata,
         _variantField_6 = typeParameter_bound,
-        _variantField_7 = typeParameter_name,
         _variantField_23 = typeParameter_defaultType,
-        _variantField_33 = codeLength,
-        _variantField_32 = codeOffset;
+        _variantField_36 = informativeId;
 
   LinkedNodeBuilder.typeParameterList({
     List<LinkedNodeBuilder> typeParameterList_typeParameters,
@@ -9032,35 +8714,29 @@
 
   LinkedNodeBuilder.variableDeclaration({
     LinkedNodeTypeBuilder actualType,
-    LinkedNodeBuilder annotatedNode_comment,
     List<LinkedNodeBuilder> annotatedNode_metadata,
     LinkedNodeBuilder variableDeclaration_initializer,
-    LinkedNodeBuilder variableDeclaration_name,
     bool inheritsCovariant,
-    int codeLength,
-    int codeOffset,
+    int informativeId,
     TopLevelInferenceErrorBuilder topLevelTypeInferenceError,
   })  : _kind = idl.LinkedNodeKind.variableDeclaration,
         _variantField_24 = actualType,
-        _variantField_11 = annotatedNode_comment,
         _variantField_4 = annotatedNode_metadata,
         _variantField_6 = variableDeclaration_initializer,
-        _variantField_7 = variableDeclaration_name,
         _variantField_27 = inheritsCovariant,
-        _variantField_33 = codeLength,
-        _variantField_32 = codeOffset,
-        _variantField_34 = topLevelTypeInferenceError;
+        _variantField_36 = informativeId,
+        _variantField_32 = topLevelTypeInferenceError;
 
   LinkedNodeBuilder.variableDeclarationList({
     List<LinkedNodeBuilder> variableDeclarationList_variables,
-    LinkedNodeBuilder annotatedNode_comment,
     List<LinkedNodeBuilder> annotatedNode_metadata,
     LinkedNodeBuilder variableDeclarationList_type,
+    int informativeId,
   })  : _kind = idl.LinkedNodeKind.variableDeclarationList,
         _variantField_2 = variableDeclarationList_variables,
-        _variantField_11 = annotatedNode_comment,
         _variantField_4 = annotatedNode_metadata,
-        _variantField_6 = variableDeclarationList_type;
+        _variantField_6 = variableDeclarationList_type,
+        _variantField_36 = informativeId;
 
   LinkedNodeBuilder.variableDeclarationStatement({
     LinkedNodeBuilder variableDeclarationStatement_variables,
@@ -9136,7 +8812,6 @@
       catchClause_exceptionType?.flushInformative();
       catchClause_stackTraceParameter?.flushInformative();
     } else if (kind == idl.LinkedNodeKind.classDeclaration) {
-      annotatedNode_comment = null;
       annotatedNode_metadata?.forEach((b) => b.flushInformative());
       classDeclaration_extendsClause?.flushInformative();
       classDeclaration_withClause?.flushInformative();
@@ -9144,19 +8819,15 @@
       classOrMixinDeclaration_implementsClause?.flushInformative();
       classOrMixinDeclaration_members?.forEach((b) => b.flushInformative());
       classOrMixinDeclaration_typeParameters?.flushInformative();
-      codeLength = null;
-      codeOffset = null;
-      namedCompilationUnitMember_name?.flushInformative();
+      informativeId = null;
+      unused11?.flushInformative();
     } else if (kind == idl.LinkedNodeKind.classTypeAlias) {
-      annotatedNode_comment = null;
       annotatedNode_metadata?.forEach((b) => b.flushInformative());
       classTypeAlias_typeParameters?.flushInformative();
       classTypeAlias_superclass?.flushInformative();
       classTypeAlias_withClause?.flushInformative();
       classTypeAlias_implementsClause?.flushInformative();
-      codeLength = null;
-      codeOffset = null;
-      namedCompilationUnitMember_name?.flushInformative();
+      informativeId = null;
     } else if (kind == idl.LinkedNodeKind.comment) {
       comment_references?.forEach((b) => b.flushInformative());
     } else if (kind == idl.LinkedNodeKind.commentReference) {
@@ -9164,9 +8835,8 @@
     } else if (kind == idl.LinkedNodeKind.compilationUnit) {
       compilationUnit_declarations?.forEach((b) => b.flushInformative());
       compilationUnit_scriptTag?.flushInformative();
-      codeLength = null;
-      codeOffset = null;
       compilationUnit_directives?.forEach((b) => b.flushInformative());
+      informativeId = null;
     } else if (kind == idl.LinkedNodeKind.conditionalExpression) {
       conditionalExpression_condition?.flushInformative();
       conditionalExpression_elseExpression?.flushInformative();
@@ -9178,16 +8848,12 @@
       configuration_uri?.flushInformative();
     } else if (kind == idl.LinkedNodeKind.constructorDeclaration) {
       constructorDeclaration_initializers?.forEach((b) => b.flushInformative());
-      annotatedNode_comment = null;
       annotatedNode_metadata?.forEach((b) => b.flushInformative());
       constructorDeclaration_body?.flushInformative();
-      constructorDeclaration_name?.flushInformative();
       constructorDeclaration_parameters?.flushInformative();
       constructorDeclaration_redirectedConstructor?.flushInformative();
-      codeLength = null;
-      codeOffset = null;
-      constructorDeclaration_periodOffset = null;
       constructorDeclaration_returnType?.flushInformative();
+      informativeId = null;
     } else if (kind == idl.LinkedNodeKind.constructorFieldInitializer) {
       constructorFieldInitializer_expression?.flushInformative();
       constructorFieldInitializer_fieldName?.flushInformative();
@@ -9198,15 +8864,13 @@
     } else if (kind == idl.LinkedNodeKind.continueStatement) {
       continueStatement_label?.flushInformative();
     } else if (kind == idl.LinkedNodeKind.declaredIdentifier) {
-      annotatedNode_comment = null;
       annotatedNode_metadata?.forEach((b) => b.flushInformative());
       declaredIdentifier_identifier?.flushInformative();
       declaredIdentifier_type?.flushInformative();
     } else if (kind == idl.LinkedNodeKind.defaultFormalParameter) {
       defaultFormalParameter_defaultValue?.flushInformative();
       defaultFormalParameter_parameter?.flushInformative();
-      codeLength = null;
-      codeOffset = null;
+      informativeId = null;
     } else if (kind == idl.LinkedNodeKind.doStatement) {
       doStatement_body?.flushInformative();
       doStatement_condition?.flushInformative();
@@ -9216,22 +8880,17 @@
     } else if (kind == idl.LinkedNodeKind.emptyFunctionBody) {
     } else if (kind == idl.LinkedNodeKind.emptyStatement) {
     } else if (kind == idl.LinkedNodeKind.enumConstantDeclaration) {
-      annotatedNode_comment = null;
       annotatedNode_metadata?.forEach((b) => b.flushInformative());
-      enumConstantDeclaration_name?.flushInformative();
+      informativeId = null;
     } else if (kind == idl.LinkedNodeKind.enumDeclaration) {
       enumDeclaration_constants?.forEach((b) => b.flushInformative());
-      annotatedNode_comment = null;
       annotatedNode_metadata?.forEach((b) => b.flushInformative());
-      codeLength = null;
-      codeOffset = null;
-      namedCompilationUnitMember_name?.flushInformative();
+      informativeId = null;
     } else if (kind == idl.LinkedNodeKind.exportDirective) {
       namespaceDirective_combinators?.forEach((b) => b.flushInformative());
-      annotatedNode_comment = null;
       annotatedNode_metadata?.forEach((b) => b.flushInformative());
-      directive_keywordOffset = null;
       namespaceDirective_configurations?.forEach((b) => b.flushInformative());
+      informativeId = null;
       uriBasedDirective_uri?.flushInformative();
     } else if (kind == idl.LinkedNodeKind.expressionFunctionBody) {
       expressionFunctionBody_expression?.flushInformative();
@@ -9240,19 +8899,16 @@
     } else if (kind == idl.LinkedNodeKind.extendsClause) {
       extendsClause_superclass?.flushInformative();
     } else if (kind == idl.LinkedNodeKind.fieldDeclaration) {
-      annotatedNode_comment = null;
       annotatedNode_metadata?.forEach((b) => b.flushInformative());
       fieldDeclaration_fields?.flushInformative();
+      informativeId = null;
     } else if (kind == idl.LinkedNodeKind.fieldFormalParameter) {
       actualType?.flushInformative();
       normalFormalParameter_metadata?.forEach((b) => b.flushInformative());
       fieldFormalParameter_type?.flushInformative();
       fieldFormalParameter_typeParameters?.flushInformative();
       fieldFormalParameter_formalParameters?.flushInformative();
-      normalFormalParameter_identifier?.flushInformative();
-      codeLength = null;
-      codeOffset = null;
-      normalFormalParameter_comment = null;
+      informativeId = null;
     } else if (kind == idl.LinkedNodeKind.forEachPartsWithDeclaration) {
       forEachParts_iterable?.flushInformative();
       forEachPartsWithDeclaration_loopVariable?.flushInformative();
@@ -9277,13 +8933,10 @@
       formalParameterList_parameters?.forEach((b) => b.flushInformative());
     } else if (kind == idl.LinkedNodeKind.functionDeclaration) {
       actualReturnType?.flushInformative();
-      annotatedNode_comment = null;
       annotatedNode_metadata?.forEach((b) => b.flushInformative());
       functionDeclaration_functionExpression?.flushInformative();
       functionDeclaration_returnType?.flushInformative();
-      codeLength = null;
-      codeOffset = null;
-      namedCompilationUnitMember_name?.flushInformative();
+      informativeId = null;
     } else if (kind == idl.LinkedNodeKind.functionDeclarationStatement) {
       functionDeclarationStatement_functionDeclaration?.flushInformative();
     } else if (kind == idl.LinkedNodeKind.functionExpression) {
@@ -9299,24 +8952,18 @@
       invocationExpression_arguments?.flushInformative();
     } else if (kind == idl.LinkedNodeKind.functionTypeAlias) {
       actualReturnType?.flushInformative();
-      annotatedNode_comment = null;
       annotatedNode_metadata?.forEach((b) => b.flushInformative());
       functionTypeAlias_formalParameters?.flushInformative();
       functionTypeAlias_returnType?.flushInformative();
       functionTypeAlias_typeParameters?.flushInformative();
-      codeLength = null;
-      codeOffset = null;
-      namedCompilationUnitMember_name?.flushInformative();
+      informativeId = null;
     } else if (kind == idl.LinkedNodeKind.functionTypedFormalParameter) {
       actualType?.flushInformative();
       normalFormalParameter_metadata?.forEach((b) => b.flushInformative());
       functionTypedFormalParameter_formalParameters?.flushInformative();
       functionTypedFormalParameter_returnType?.flushInformative();
       functionTypedFormalParameter_typeParameters?.flushInformative();
-      normalFormalParameter_identifier?.flushInformative();
-      codeLength = null;
-      codeOffset = null;
-      normalFormalParameter_comment = null;
+      informativeId = null;
     } else if (kind == idl.LinkedNodeKind.genericFunctionType) {
       actualReturnType?.flushInformative();
       genericFunctionType_typeParameters?.flushInformative();
@@ -9324,13 +8971,10 @@
       genericFunctionType_formalParameters?.flushInformative();
       genericFunctionType_type?.flushInformative();
     } else if (kind == idl.LinkedNodeKind.genericTypeAlias) {
-      annotatedNode_comment = null;
       annotatedNode_metadata?.forEach((b) => b.flushInformative());
       genericTypeAlias_typeParameters?.flushInformative();
       genericTypeAlias_functionType?.flushInformative();
-      codeLength = null;
-      codeOffset = null;
-      namedCompilationUnitMember_name?.flushInformative();
+      informativeId = null;
     } else if (kind == idl.LinkedNodeKind.hideCombinator) {
     } else if (kind == idl.LinkedNodeKind.ifElement) {
       ifMixin_condition?.flushInformative();
@@ -9344,10 +8988,9 @@
       implementsClause_interfaces?.forEach((b) => b.flushInformative());
     } else if (kind == idl.LinkedNodeKind.importDirective) {
       namespaceDirective_combinators?.forEach((b) => b.flushInformative());
-      annotatedNode_comment = null;
       annotatedNode_metadata?.forEach((b) => b.flushInformative());
-      directive_keywordOffset = null;
       namespaceDirective_configurations?.forEach((b) => b.flushInformative());
+      informativeId = null;
       uriBasedDirective_uri?.flushInformative();
     } else if (kind == idl.LinkedNodeKind.indexExpression) {
       indexExpression_index?.flushInformative();
@@ -9373,10 +9016,9 @@
       labeledStatement_labels?.forEach((b) => b.flushInformative());
       labeledStatement_statement?.flushInformative();
     } else if (kind == idl.LinkedNodeKind.libraryDirective) {
-      annotatedNode_comment = null;
       annotatedNode_metadata?.forEach((b) => b.flushInformative());
       libraryDirective_name?.flushInformative();
-      directive_keywordOffset = null;
+      informativeId = null;
     } else if (kind == idl.LinkedNodeKind.libraryIdentifier) {
       libraryIdentifier_components?.forEach((b) => b.flushInformative());
     } else if (kind == idl.LinkedNodeKind.listLiteral) {
@@ -9388,15 +9030,12 @@
       mapLiteralEntry_value?.flushInformative();
     } else if (kind == idl.LinkedNodeKind.methodDeclaration) {
       actualReturnType?.flushInformative();
-      annotatedNode_comment = null;
       annotatedNode_metadata?.forEach((b) => b.flushInformative());
       methodDeclaration_body?.flushInformative();
       methodDeclaration_formalParameters?.flushInformative();
       methodDeclaration_returnType?.flushInformative();
       methodDeclaration_typeParameters?.flushInformative();
-      codeLength = null;
-      codeOffset = null;
-      methodDeclaration_name?.flushInformative();
+      informativeId = null;
     } else if (kind == idl.LinkedNodeKind.methodInvocation) {
       invocationExpression_invokeType?.flushInformative();
       methodInvocation_methodName?.flushInformative();
@@ -9405,15 +9044,12 @@
       expression_type?.flushInformative();
       invocationExpression_arguments?.flushInformative();
     } else if (kind == idl.LinkedNodeKind.mixinDeclaration) {
-      annotatedNode_comment = null;
       annotatedNode_metadata?.forEach((b) => b.flushInformative());
       mixinDeclaration_onClause?.flushInformative();
       classOrMixinDeclaration_implementsClause?.flushInformative();
       classOrMixinDeclaration_members?.forEach((b) => b.flushInformative());
       classOrMixinDeclaration_typeParameters?.flushInformative();
-      codeLength = null;
-      codeOffset = null;
-      namedCompilationUnitMember_name?.flushInformative();
+      informativeId = null;
     } else if (kind == idl.LinkedNodeKind.namedExpression) {
       namedExpression_expression?.flushInformative();
       namedExpression_name?.flushInformative();
@@ -9429,16 +9065,14 @@
       parenthesizedExpression_expression?.flushInformative();
       expression_type?.flushInformative();
     } else if (kind == idl.LinkedNodeKind.partDirective) {
-      annotatedNode_comment = null;
       annotatedNode_metadata?.forEach((b) => b.flushInformative());
-      directive_keywordOffset = null;
+      informativeId = null;
       uriBasedDirective_uri?.flushInformative();
     } else if (kind == idl.LinkedNodeKind.partOfDirective) {
-      annotatedNode_comment = null;
       annotatedNode_metadata?.forEach((b) => b.flushInformative());
       partOfDirective_libraryName?.flushInformative();
       partOfDirective_uri?.flushInformative();
-      directive_keywordOffset = null;
+      informativeId = null;
     } else if (kind == idl.LinkedNodeKind.postfixExpression) {
       postfixExpression_operand?.flushInformative();
       postfixExpression_elementType?.flushInformative();
@@ -9472,15 +9106,11 @@
       actualType?.flushInformative();
       normalFormalParameter_metadata?.forEach((b) => b.flushInformative());
       simpleFormalParameter_type?.flushInformative();
-      normalFormalParameter_identifier?.flushInformative();
-      codeLength = null;
-      codeOffset = null;
-      normalFormalParameter_comment = null;
+      informativeId = null;
       topLevelTypeInferenceError?.flushInformative();
     } else if (kind == idl.LinkedNodeKind.simpleIdentifier) {
       simpleIdentifier_elementType?.flushInformative();
       expression_type?.flushInformative();
-      simpleIdentifier_offset = null;
     } else if (kind == idl.LinkedNodeKind.simpleStringLiteral) {
     } else if (kind == idl.LinkedNodeKind.spreadElement) {
       spreadElement_expression?.flushInformative();
@@ -9510,9 +9140,9 @@
       throwExpression_expression?.flushInformative();
       expression_type?.flushInformative();
     } else if (kind == idl.LinkedNodeKind.topLevelVariableDeclaration) {
-      annotatedNode_comment = null;
       annotatedNode_metadata?.forEach((b) => b.flushInformative());
       topLevelVariableDeclaration_variableList?.flushInformative();
+      informativeId = null;
     } else if (kind == idl.LinkedNodeKind.tryStatement) {
       tryStatement_catchClauses?.forEach((b) => b.flushInformative());
       tryStatement_body?.flushInformative();
@@ -9524,29 +9154,23 @@
       typeName_name?.flushInformative();
       typeName_type?.flushInformative();
     } else if (kind == idl.LinkedNodeKind.typeParameter) {
-      annotatedNode_comment = null;
       annotatedNode_metadata?.forEach((b) => b.flushInformative());
       typeParameter_bound?.flushInformative();
-      typeParameter_name?.flushInformative();
       typeParameter_defaultType?.flushInformative();
-      codeLength = null;
-      codeOffset = null;
+      informativeId = null;
     } else if (kind == idl.LinkedNodeKind.typeParameterList) {
       typeParameterList_typeParameters?.forEach((b) => b.flushInformative());
     } else if (kind == idl.LinkedNodeKind.variableDeclaration) {
       actualType?.flushInformative();
-      annotatedNode_comment = null;
       annotatedNode_metadata?.forEach((b) => b.flushInformative());
       variableDeclaration_initializer?.flushInformative();
-      variableDeclaration_name?.flushInformative();
-      codeLength = null;
-      codeOffset = null;
+      informativeId = null;
       topLevelTypeInferenceError?.flushInformative();
     } else if (kind == idl.LinkedNodeKind.variableDeclarationList) {
       variableDeclarationList_variables?.forEach((b) => b.flushInformative());
-      annotatedNode_comment = null;
       annotatedNode_metadata?.forEach((b) => b.flushInformative());
       variableDeclarationList_type?.flushInformative();
+      informativeId = null;
     } else if (kind == idl.LinkedNodeKind.variableDeclarationStatement) {
       variableDeclarationStatement_variables?.flushInformative();
     } else if (kind == idl.LinkedNodeKind.whileStatement) {
@@ -9572,6 +9196,7 @@
         }
       }
       signature.addInt(this.flags ?? 0);
+      signature.addString(this.name ?? '');
     } else if (kind == idl.LinkedNodeKind.annotation) {
       signature.addInt(this.kind == null ? 0 : this.kind.index);
       signature.addBool(this.annotation_arguments != null);
@@ -9584,6 +9209,7 @@
       signature.addInt(this.flags ?? 0);
       signature.addBool(this.annotation_elementType != null);
       this.annotation_elementType?.collectApiSignature(signature);
+      signature.addString(this.name ?? '');
     } else if (kind == idl.LinkedNodeKind.argumentList) {
       signature.addInt(this.kind == null ? 0 : this.kind.index);
       if (this.argumentList_arguments == null) {
@@ -9595,6 +9221,7 @@
         }
       }
       signature.addInt(this.flags ?? 0);
+      signature.addString(this.name ?? '');
     } else if (kind == idl.LinkedNodeKind.asExpression) {
       signature.addInt(this.kind == null ? 0 : this.kind.index);
       signature.addBool(this.asExpression_expression != null);
@@ -9604,6 +9231,7 @@
       signature.addInt(this.flags ?? 0);
       signature.addBool(this.expression_type != null);
       this.expression_type?.collectApiSignature(signature);
+      signature.addString(this.name ?? '');
     } else if (kind == idl.LinkedNodeKind.assertInitializer) {
       signature.addInt(this.kind == null ? 0 : this.kind.index);
       signature.addBool(this.assertInitializer_condition != null);
@@ -9611,6 +9239,7 @@
       signature.addBool(this.assertInitializer_message != null);
       this.assertInitializer_message?.collectApiSignature(signature);
       signature.addInt(this.flags ?? 0);
+      signature.addString(this.name ?? '');
     } else if (kind == idl.LinkedNodeKind.assertStatement) {
       signature.addInt(this.kind == null ? 0 : this.kind.index);
       signature.addBool(this.assertStatement_condition != null);
@@ -9618,6 +9247,7 @@
       signature.addBool(this.assertStatement_message != null);
       this.assertStatement_message?.collectApiSignature(signature);
       signature.addInt(this.flags ?? 0);
+      signature.addString(this.name ?? '');
     } else if (kind == idl.LinkedNodeKind.assignmentExpression) {
       signature.addInt(this.kind == null ? 0 : this.kind.index);
       signature.addBool(this.assignmentExpression_leftHandSide != null);
@@ -9633,6 +9263,7 @@
       signature.addInt(this.assignmentExpression_operator == null
           ? 0
           : this.assignmentExpression_operator.index);
+      signature.addString(this.name ?? '');
     } else if (kind == idl.LinkedNodeKind.awaitExpression) {
       signature.addInt(this.kind == null ? 0 : this.kind.index);
       signature.addBool(this.awaitExpression_expression != null);
@@ -9640,6 +9271,7 @@
       signature.addInt(this.flags ?? 0);
       signature.addBool(this.expression_type != null);
       this.expression_type?.collectApiSignature(signature);
+      signature.addString(this.name ?? '');
     } else if (kind == idl.LinkedNodeKind.binaryExpression) {
       signature.addInt(this.kind == null ? 0 : this.kind.index);
       signature.addBool(this.binaryExpression_leftOperand != null);
@@ -9657,6 +9289,7 @@
       signature.addInt(this.binaryExpression_operator == null
           ? 0
           : this.binaryExpression_operator.index);
+      signature.addString(this.name ?? '');
     } else if (kind == idl.LinkedNodeKind.block) {
       signature.addInt(this.kind == null ? 0 : this.kind.index);
       if (this.block_statements == null) {
@@ -9668,20 +9301,24 @@
         }
       }
       signature.addInt(this.flags ?? 0);
+      signature.addString(this.name ?? '');
     } else if (kind == idl.LinkedNodeKind.blockFunctionBody) {
       signature.addInt(this.kind == null ? 0 : this.kind.index);
       signature.addBool(this.blockFunctionBody_block != null);
       this.blockFunctionBody_block?.collectApiSignature(signature);
       signature.addInt(this.flags ?? 0);
+      signature.addString(this.name ?? '');
     } else if (kind == idl.LinkedNodeKind.booleanLiteral) {
       signature.addInt(this.kind == null ? 0 : this.kind.index);
       signature.addInt(this.flags ?? 0);
       signature.addBool(this.booleanLiteral_value == true);
+      signature.addString(this.name ?? '');
     } else if (kind == idl.LinkedNodeKind.breakStatement) {
       signature.addInt(this.kind == null ? 0 : this.kind.index);
       signature.addBool(this.breakStatement_label != null);
       this.breakStatement_label?.collectApiSignature(signature);
       signature.addInt(this.flags ?? 0);
+      signature.addString(this.name ?? '');
     } else if (kind == idl.LinkedNodeKind.cascadeExpression) {
       signature.addInt(this.kind == null ? 0 : this.kind.index);
       if (this.cascadeExpression_sections == null) {
@@ -9697,6 +9334,7 @@
       signature.addInt(this.flags ?? 0);
       signature.addBool(this.expression_type != null);
       this.expression_type?.collectApiSignature(signature);
+      signature.addString(this.name ?? '');
     } else if (kind == idl.LinkedNodeKind.catchClause) {
       signature.addInt(this.kind == null ? 0 : this.kind.index);
       signature.addBool(this.catchClause_body != null);
@@ -9708,6 +9346,7 @@
       signature.addBool(this.catchClause_stackTraceParameter != null);
       this.catchClause_stackTraceParameter?.collectApiSignature(signature);
       signature.addInt(this.flags ?? 0);
+      signature.addString(this.name ?? '');
     } else if (kind == idl.LinkedNodeKind.classDeclaration) {
       signature.addInt(this.kind == null ? 0 : this.kind.index);
       if (this.annotatedNode_metadata == null) {
@@ -9732,8 +9371,8 @@
       this.classDeclaration_withClause?.collectApiSignature(signature);
       signature.addBool(this.classDeclaration_nativeClause != null);
       this.classDeclaration_nativeClause?.collectApiSignature(signature);
-      signature.addBool(this.namedCompilationUnitMember_name != null);
-      this.namedCompilationUnitMember_name?.collectApiSignature(signature);
+      signature.addBool(this.unused11 != null);
+      this.unused11?.collectApiSignature(signature);
       signature.addBool(this.classOrMixinDeclaration_implementsClause != null);
       this
           .classOrMixinDeclaration_implementsClause
@@ -9745,6 +9384,7 @@
       signature.addInt(this.flags ?? 0);
       signature.addBool(this.classDeclaration_isDartObject == true);
       signature.addBool(this.simplyBoundable_isSimplyBounded == true);
+      signature.addString(this.name ?? '');
     } else if (kind == idl.LinkedNodeKind.classTypeAlias) {
       signature.addInt(this.kind == null ? 0 : this.kind.index);
       if (this.annotatedNode_metadata == null) {
@@ -9763,10 +9403,9 @@
       this.classTypeAlias_withClause?.collectApiSignature(signature);
       signature.addBool(this.classTypeAlias_implementsClause != null);
       this.classTypeAlias_implementsClause?.collectApiSignature(signature);
-      signature.addBool(this.namedCompilationUnitMember_name != null);
-      this.namedCompilationUnitMember_name?.collectApiSignature(signature);
       signature.addInt(this.flags ?? 0);
       signature.addBool(this.simplyBoundable_isSimplyBounded == true);
+      signature.addString(this.name ?? '');
     } else if (kind == idl.LinkedNodeKind.comment) {
       signature.addInt(this.kind == null ? 0 : this.kind.index);
       if (this.comment_references == null) {
@@ -9787,11 +9426,13 @@
           signature.addString(x);
         }
       }
+      signature.addString(this.name ?? '');
     } else if (kind == idl.LinkedNodeKind.commentReference) {
       signature.addInt(this.kind == null ? 0 : this.kind.index);
       signature.addBool(this.commentReference_identifier != null);
       this.commentReference_identifier?.collectApiSignature(signature);
       signature.addInt(this.flags ?? 0);
+      signature.addString(this.name ?? '');
     } else if (kind == idl.LinkedNodeKind.compilationUnit) {
       signature.addInt(this.kind == null ? 0 : this.kind.index);
       if (this.compilationUnit_declarations == null) {
@@ -9813,6 +9454,7 @@
       signature.addBool(this.compilationUnit_scriptTag != null);
       this.compilationUnit_scriptTag?.collectApiSignature(signature);
       signature.addInt(this.flags ?? 0);
+      signature.addString(this.name ?? '');
     } else if (kind == idl.LinkedNodeKind.conditionalExpression) {
       signature.addInt(this.kind == null ? 0 : this.kind.index);
       signature.addBool(this.conditionalExpression_condition != null);
@@ -9824,6 +9466,7 @@
       signature.addInt(this.flags ?? 0);
       signature.addBool(this.expression_type != null);
       this.expression_type?.collectApiSignature(signature);
+      signature.addString(this.name ?? '');
     } else if (kind == idl.LinkedNodeKind.configuration) {
       signature.addInt(this.kind == null ? 0 : this.kind.index);
       signature.addBool(this.configuration_name != null);
@@ -9833,6 +9476,7 @@
       signature.addBool(this.configuration_uri != null);
       this.configuration_uri?.collectApiSignature(signature);
       signature.addInt(this.flags ?? 0);
+      signature.addString(this.name ?? '');
     } else if (kind == idl.LinkedNodeKind.constructorDeclaration) {
       signature.addInt(this.kind == null ? 0 : this.kind.index);
       if (this.constructorDeclaration_initializers == null) {
@@ -9853,8 +9497,6 @@
       }
       signature.addBool(this.constructorDeclaration_body != null);
       this.constructorDeclaration_body?.collectApiSignature(signature);
-      signature.addBool(this.constructorDeclaration_name != null);
-      this.constructorDeclaration_name?.collectApiSignature(signature);
       signature.addBool(this.constructorDeclaration_parameters != null);
       this.constructorDeclaration_parameters?.collectApiSignature(signature);
       signature
@@ -9865,6 +9507,7 @@
       signature.addBool(this.constructorDeclaration_returnType != null);
       this.constructorDeclaration_returnType?.collectApiSignature(signature);
       signature.addInt(this.flags ?? 0);
+      signature.addString(this.name ?? '');
     } else if (kind == idl.LinkedNodeKind.constructorFieldInitializer) {
       signature.addInt(this.kind == null ? 0 : this.kind.index);
       signature.addBool(this.constructorFieldInitializer_expression != null);
@@ -9876,6 +9519,7 @@
           .constructorFieldInitializer_fieldName
           ?.collectApiSignature(signature);
       signature.addInt(this.flags ?? 0);
+      signature.addString(this.name ?? '');
     } else if (kind == idl.LinkedNodeKind.constructorName) {
       signature.addInt(this.kind == null ? 0 : this.kind.index);
       signature.addBool(this.constructorName_name != null);
@@ -9886,11 +9530,13 @@
       signature.addInt(this.flags ?? 0);
       signature.addBool(this.constructorName_elementType != null);
       this.constructorName_elementType?.collectApiSignature(signature);
+      signature.addString(this.name ?? '');
     } else if (kind == idl.LinkedNodeKind.continueStatement) {
       signature.addInt(this.kind == null ? 0 : this.kind.index);
       signature.addBool(this.continueStatement_label != null);
       this.continueStatement_label?.collectApiSignature(signature);
       signature.addInt(this.flags ?? 0);
+      signature.addString(this.name ?? '');
     } else if (kind == idl.LinkedNodeKind.declaredIdentifier) {
       signature.addInt(this.kind == null ? 0 : this.kind.index);
       if (this.annotatedNode_metadata == null) {
@@ -9906,6 +9552,7 @@
       signature.addBool(this.declaredIdentifier_type != null);
       this.declaredIdentifier_type?.collectApiSignature(signature);
       signature.addInt(this.flags ?? 0);
+      signature.addString(this.name ?? '');
     } else if (kind == idl.LinkedNodeKind.defaultFormalParameter) {
       signature.addInt(this.kind == null ? 0 : this.kind.index);
       signature.addBool(this.defaultFormalParameter_defaultValue != null);
@@ -9916,6 +9563,7 @@
       signature.addInt(this.defaultFormalParameter_kind == null
           ? 0
           : this.defaultFormalParameter_kind.index);
+      signature.addString(this.name ?? '');
     } else if (kind == idl.LinkedNodeKind.doStatement) {
       signature.addInt(this.kind == null ? 0 : this.kind.index);
       signature.addBool(this.doStatement_body != null);
@@ -9923,6 +9571,7 @@
       signature.addBool(this.doStatement_condition != null);
       this.doStatement_condition?.collectApiSignature(signature);
       signature.addInt(this.flags ?? 0);
+      signature.addString(this.name ?? '');
     } else if (kind == idl.LinkedNodeKind.dottedName) {
       signature.addInt(this.kind == null ? 0 : this.kind.index);
       if (this.dottedName_components == null) {
@@ -9934,18 +9583,22 @@
         }
       }
       signature.addInt(this.flags ?? 0);
+      signature.addString(this.name ?? '');
     } else if (kind == idl.LinkedNodeKind.doubleLiteral) {
       signature.addInt(this.kind == null ? 0 : this.kind.index);
       signature.addInt(this.flags ?? 0);
       signature.addDouble(this.doubleLiteral_value ?? 0.0);
+      signature.addString(this.name ?? '');
     } else if (kind == idl.LinkedNodeKind.emptyFunctionBody) {
       signature.addInt(this.kind == null ? 0 : this.kind.index);
       signature.addInt(this.emptyFunctionBody_fake ?? 0);
       signature.addInt(this.flags ?? 0);
+      signature.addString(this.name ?? '');
     } else if (kind == idl.LinkedNodeKind.emptyStatement) {
       signature.addInt(this.kind == null ? 0 : this.kind.index);
       signature.addInt(this.emptyStatement_fake ?? 0);
       signature.addInt(this.flags ?? 0);
+      signature.addString(this.name ?? '');
     } else if (kind == idl.LinkedNodeKind.enumConstantDeclaration) {
       signature.addInt(this.kind == null ? 0 : this.kind.index);
       if (this.annotatedNode_metadata == null) {
@@ -9956,9 +9609,8 @@
           x?.collectApiSignature(signature);
         }
       }
-      signature.addBool(this.enumConstantDeclaration_name != null);
-      this.enumConstantDeclaration_name?.collectApiSignature(signature);
       signature.addInt(this.flags ?? 0);
+      signature.addString(this.name ?? '');
     } else if (kind == idl.LinkedNodeKind.enumDeclaration) {
       signature.addInt(this.kind == null ? 0 : this.kind.index);
       if (this.enumDeclaration_constants == null) {
@@ -9977,9 +9629,8 @@
           x?.collectApiSignature(signature);
         }
       }
-      signature.addBool(this.namedCompilationUnitMember_name != null);
-      this.namedCompilationUnitMember_name?.collectApiSignature(signature);
       signature.addInt(this.flags ?? 0);
+      signature.addString(this.name ?? '');
     } else if (kind == idl.LinkedNodeKind.exportDirective) {
       signature.addInt(this.kind == null ? 0 : this.kind.index);
       if (this.namespaceDirective_combinators == null) {
@@ -10012,21 +9663,25 @@
       signature.addInt(this.uriBasedDirective_uriElement ?? 0);
       signature.addString(this.namespaceDirective_selectedUri ?? '');
       signature.addString(this.uriBasedDirective_uriContent ?? '');
+      signature.addString(this.name ?? '');
     } else if (kind == idl.LinkedNodeKind.expressionFunctionBody) {
       signature.addInt(this.kind == null ? 0 : this.kind.index);
       signature.addBool(this.expressionFunctionBody_expression != null);
       this.expressionFunctionBody_expression?.collectApiSignature(signature);
       signature.addInt(this.flags ?? 0);
+      signature.addString(this.name ?? '');
     } else if (kind == idl.LinkedNodeKind.expressionStatement) {
       signature.addInt(this.kind == null ? 0 : this.kind.index);
       signature.addBool(this.expressionStatement_expression != null);
       this.expressionStatement_expression?.collectApiSignature(signature);
       signature.addInt(this.flags ?? 0);
+      signature.addString(this.name ?? '');
     } else if (kind == idl.LinkedNodeKind.extendsClause) {
       signature.addInt(this.kind == null ? 0 : this.kind.index);
       signature.addBool(this.extendsClause_superclass != null);
       this.extendsClause_superclass?.collectApiSignature(signature);
       signature.addInt(this.flags ?? 0);
+      signature.addString(this.name ?? '');
     } else if (kind == idl.LinkedNodeKind.fieldDeclaration) {
       signature.addInt(this.kind == null ? 0 : this.kind.index);
       if (this.annotatedNode_metadata == null) {
@@ -10040,6 +9695,7 @@
       signature.addBool(this.fieldDeclaration_fields != null);
       this.fieldDeclaration_fields?.collectApiSignature(signature);
       signature.addInt(this.flags ?? 0);
+      signature.addString(this.name ?? '');
     } else if (kind == idl.LinkedNodeKind.fieldFormalParameter) {
       signature.addInt(this.kind == null ? 0 : this.kind.index);
       if (this.normalFormalParameter_metadata == null) {
@@ -10058,12 +9714,11 @@
       this
           .fieldFormalParameter_formalParameters
           ?.collectApiSignature(signature);
-      signature.addBool(this.normalFormalParameter_identifier != null);
-      this.normalFormalParameter_identifier?.collectApiSignature(signature);
       signature.addInt(this.flags ?? 0);
       signature.addBool(this.actualType != null);
       this.actualType?.collectApiSignature(signature);
       signature.addBool(this.inheritsCovariant == true);
+      signature.addString(this.name ?? '');
     } else if (kind == idl.LinkedNodeKind.forEachPartsWithDeclaration) {
       signature.addInt(this.kind == null ? 0 : this.kind.index);
       signature.addBool(this.forEachParts_iterable != null);
@@ -10073,6 +9728,7 @@
           .forEachPartsWithDeclaration_loopVariable
           ?.collectApiSignature(signature);
       signature.addInt(this.flags ?? 0);
+      signature.addString(this.name ?? '');
     } else if (kind == idl.LinkedNodeKind.forEachPartsWithIdentifier) {
       signature.addInt(this.kind == null ? 0 : this.kind.index);
       signature.addBool(this.forEachParts_iterable != null);
@@ -10082,6 +9738,7 @@
           .forEachPartsWithIdentifier_identifier
           ?.collectApiSignature(signature);
       signature.addInt(this.flags ?? 0);
+      signature.addString(this.name ?? '');
     } else if (kind == idl.LinkedNodeKind.forElement) {
       signature.addInt(this.kind == null ? 0 : this.kind.index);
       signature.addBool(this.forMixin_forLoopParts != null);
@@ -10089,6 +9746,7 @@
       signature.addBool(this.forElement_body != null);
       this.forElement_body?.collectApiSignature(signature);
       signature.addInt(this.flags ?? 0);
+      signature.addString(this.name ?? '');
     } else if (kind == idl.LinkedNodeKind.forPartsWithDeclarations) {
       signature.addInt(this.kind == null ? 0 : this.kind.index);
       if (this.forParts_updaters == null) {
@@ -10104,6 +9762,7 @@
       signature.addBool(this.forPartsWithDeclarations_variables != null);
       this.forPartsWithDeclarations_variables?.collectApiSignature(signature);
       signature.addInt(this.flags ?? 0);
+      signature.addString(this.name ?? '');
     } else if (kind == idl.LinkedNodeKind.forPartsWithExpression) {
       signature.addInt(this.kind == null ? 0 : this.kind.index);
       if (this.forParts_updaters == null) {
@@ -10121,6 +9780,7 @@
           .forPartsWithExpression_initialization
           ?.collectApiSignature(signature);
       signature.addInt(this.flags ?? 0);
+      signature.addString(this.name ?? '');
     } else if (kind == idl.LinkedNodeKind.forStatement) {
       signature.addInt(this.kind == null ? 0 : this.kind.index);
       signature.addBool(this.forMixin_forLoopParts != null);
@@ -10128,6 +9788,7 @@
       signature.addBool(this.forStatement_body != null);
       this.forStatement_body?.collectApiSignature(signature);
       signature.addInt(this.flags ?? 0);
+      signature.addString(this.name ?? '');
     } else if (kind == idl.LinkedNodeKind.formalParameterList) {
       signature.addInt(this.kind == null ? 0 : this.kind.index);
       if (this.formalParameterList_parameters == null) {
@@ -10139,6 +9800,7 @@
         }
       }
       signature.addInt(this.flags ?? 0);
+      signature.addString(this.name ?? '');
     } else if (kind == idl.LinkedNodeKind.functionDeclaration) {
       signature.addInt(this.kind == null ? 0 : this.kind.index);
       if (this.annotatedNode_metadata == null) {
@@ -10155,11 +9817,10 @@
           ?.collectApiSignature(signature);
       signature.addBool(this.functionDeclaration_returnType != null);
       this.functionDeclaration_returnType?.collectApiSignature(signature);
-      signature.addBool(this.namedCompilationUnitMember_name != null);
-      this.namedCompilationUnitMember_name?.collectApiSignature(signature);
       signature.addInt(this.flags ?? 0);
       signature.addBool(this.actualReturnType != null);
       this.actualReturnType?.collectApiSignature(signature);
+      signature.addString(this.name ?? '');
     } else if (kind == idl.LinkedNodeKind.functionDeclarationStatement) {
       signature.addInt(this.kind == null ? 0 : this.kind.index);
       signature.addBool(
@@ -10168,6 +9829,7 @@
           .functionDeclarationStatement_functionDeclaration
           ?.collectApiSignature(signature);
       signature.addInt(this.flags ?? 0);
+      signature.addString(this.name ?? '');
     } else if (kind == idl.LinkedNodeKind.functionExpression) {
       signature.addInt(this.kind == null ? 0 : this.kind.index);
       signature.addBool(this.functionExpression_body != null);
@@ -10179,6 +9841,7 @@
       signature.addInt(this.flags ?? 0);
       signature.addBool(this.actualReturnType != null);
       this.actualReturnType?.collectApiSignature(signature);
+      signature.addString(this.name ?? '');
     } else if (kind == idl.LinkedNodeKind.functionExpressionInvocation) {
       signature.addInt(this.kind == null ? 0 : this.kind.index);
       signature.addBool(this.functionExpressionInvocation_function != null);
@@ -10194,6 +9857,7 @@
       this.invocationExpression_invokeType?.collectApiSignature(signature);
       signature.addBool(this.expression_type != null);
       this.expression_type?.collectApiSignature(signature);
+      signature.addString(this.name ?? '');
     } else if (kind == idl.LinkedNodeKind.functionTypeAlias) {
       signature.addInt(this.kind == null ? 0 : this.kind.index);
       if (this.annotatedNode_metadata == null) {
@@ -10210,13 +9874,12 @@
       this.functionTypeAlias_returnType?.collectApiSignature(signature);
       signature.addBool(this.functionTypeAlias_typeParameters != null);
       this.functionTypeAlias_typeParameters?.collectApiSignature(signature);
-      signature.addBool(this.namedCompilationUnitMember_name != null);
-      this.namedCompilationUnitMember_name?.collectApiSignature(signature);
       signature.addInt(this.flags ?? 0);
       signature.addBool(this.actualReturnType != null);
       this.actualReturnType?.collectApiSignature(signature);
       signature.addBool(this.typeAlias_hasSelfReference == true);
       signature.addBool(this.simplyBoundable_isSimplyBounded == true);
+      signature.addString(this.name ?? '');
     } else if (kind == idl.LinkedNodeKind.functionTypedFormalParameter) {
       signature.addInt(this.kind == null ? 0 : this.kind.index);
       if (this.normalFormalParameter_metadata == null) {
@@ -10241,12 +9904,11 @@
       this
           .functionTypedFormalParameter_typeParameters
           ?.collectApiSignature(signature);
-      signature.addBool(this.normalFormalParameter_identifier != null);
-      this.normalFormalParameter_identifier?.collectApiSignature(signature);
       signature.addInt(this.flags ?? 0);
       signature.addBool(this.actualType != null);
       this.actualType?.collectApiSignature(signature);
       signature.addBool(this.inheritsCovariant == true);
+      signature.addString(this.name ?? '');
     } else if (kind == idl.LinkedNodeKind.genericFunctionType) {
       signature.addInt(this.kind == null ? 0 : this.kind.index);
       signature.addBool(this.genericFunctionType_typeParameters != null);
@@ -10261,6 +9923,7 @@
       this.actualReturnType?.collectApiSignature(signature);
       signature.addBool(this.genericFunctionType_type != null);
       this.genericFunctionType_type?.collectApiSignature(signature);
+      signature.addString(this.name ?? '');
     } else if (kind == idl.LinkedNodeKind.genericTypeAlias) {
       signature.addInt(this.kind == null ? 0 : this.kind.index);
       if (this.annotatedNode_metadata == null) {
@@ -10275,11 +9938,10 @@
       this.genericTypeAlias_typeParameters?.collectApiSignature(signature);
       signature.addBool(this.genericTypeAlias_functionType != null);
       this.genericTypeAlias_functionType?.collectApiSignature(signature);
-      signature.addBool(this.namedCompilationUnitMember_name != null);
-      this.namedCompilationUnitMember_name?.collectApiSignature(signature);
       signature.addInt(this.flags ?? 0);
       signature.addBool(this.typeAlias_hasSelfReference == true);
       signature.addBool(this.simplyBoundable_isSimplyBounded == true);
+      signature.addString(this.name ?? '');
     } else if (kind == idl.LinkedNodeKind.hideCombinator) {
       signature.addInt(this.kind == null ? 0 : this.kind.index);
       signature.addInt(this.flags ?? 0);
@@ -10291,6 +9953,7 @@
           signature.addString(x);
         }
       }
+      signature.addString(this.name ?? '');
     } else if (kind == idl.LinkedNodeKind.ifElement) {
       signature.addInt(this.kind == null ? 0 : this.kind.index);
       signature.addBool(this.ifMixin_condition != null);
@@ -10300,6 +9963,7 @@
       signature.addBool(this.ifElement_elseElement != null);
       this.ifElement_elseElement?.collectApiSignature(signature);
       signature.addInt(this.flags ?? 0);
+      signature.addString(this.name ?? '');
     } else if (kind == idl.LinkedNodeKind.ifStatement) {
       signature.addInt(this.kind == null ? 0 : this.kind.index);
       signature.addBool(this.ifMixin_condition != null);
@@ -10309,6 +9973,7 @@
       signature.addBool(this.ifStatement_thenStatement != null);
       this.ifStatement_thenStatement?.collectApiSignature(signature);
       signature.addInt(this.flags ?? 0);
+      signature.addString(this.name ?? '');
     } else if (kind == idl.LinkedNodeKind.implementsClause) {
       signature.addInt(this.kind == null ? 0 : this.kind.index);
       if (this.implementsClause_interfaces == null) {
@@ -10320,6 +9985,7 @@
         }
       }
       signature.addInt(this.flags ?? 0);
+      signature.addString(this.name ?? '');
     } else if (kind == idl.LinkedNodeKind.importDirective) {
       signature.addInt(this.kind == null ? 0 : this.kind.index);
       signature.addString(this.importDirective_prefix ?? '');
@@ -10354,6 +10020,7 @@
       signature.addInt(this.uriBasedDirective_uriElement ?? 0);
       signature.addString(this.namespaceDirective_selectedUri ?? '');
       signature.addString(this.uriBasedDirective_uriContent ?? '');
+      signature.addString(this.name ?? '');
     } else if (kind == idl.LinkedNodeKind.indexExpression) {
       signature.addInt(this.kind == null ? 0 : this.kind.index);
       signature.addBool(this.indexExpression_index != null);
@@ -10366,6 +10033,7 @@
       this.indexExpression_elementType?.collectApiSignature(signature);
       signature.addBool(this.expression_type != null);
       this.expression_type?.collectApiSignature(signature);
+      signature.addString(this.name ?? '');
     } else if (kind == idl.LinkedNodeKind.instanceCreationExpression) {
       signature.addInt(this.kind == null ? 0 : this.kind.index);
       if (this.instanceCreationExpression_arguments == null) {
@@ -10388,19 +10056,23 @@
       signature.addInt(this.flags ?? 0);
       signature.addBool(this.expression_type != null);
       this.expression_type?.collectApiSignature(signature);
+      signature.addString(this.name ?? '');
     } else if (kind == idl.LinkedNodeKind.integerLiteral) {
       signature.addInt(this.kind == null ? 0 : this.kind.index);
       signature.addInt(this.integerLiteral_value ?? 0);
       signature.addInt(this.flags ?? 0);
+      signature.addString(this.name ?? '');
     } else if (kind == idl.LinkedNodeKind.interpolationExpression) {
       signature.addInt(this.kind == null ? 0 : this.kind.index);
       signature.addBool(this.interpolationExpression_expression != null);
       this.interpolationExpression_expression?.collectApiSignature(signature);
       signature.addInt(this.flags ?? 0);
+      signature.addString(this.name ?? '');
     } else if (kind == idl.LinkedNodeKind.interpolationString) {
       signature.addInt(this.kind == null ? 0 : this.kind.index);
       signature.addInt(this.flags ?? 0);
       signature.addString(this.interpolationString_value ?? '');
+      signature.addString(this.name ?? '');
     } else if (kind == idl.LinkedNodeKind.isExpression) {
       signature.addInt(this.kind == null ? 0 : this.kind.index);
       signature.addBool(this.isExpression_expression != null);
@@ -10408,11 +10080,13 @@
       signature.addBool(this.isExpression_type != null);
       this.isExpression_type?.collectApiSignature(signature);
       signature.addInt(this.flags ?? 0);
+      signature.addString(this.name ?? '');
     } else if (kind == idl.LinkedNodeKind.label) {
       signature.addInt(this.kind == null ? 0 : this.kind.index);
       signature.addBool(this.label_label != null);
       this.label_label?.collectApiSignature(signature);
       signature.addInt(this.flags ?? 0);
+      signature.addString(this.name ?? '');
     } else if (kind == idl.LinkedNodeKind.labeledStatement) {
       signature.addInt(this.kind == null ? 0 : this.kind.index);
       if (this.labeledStatement_labels == null) {
@@ -10426,6 +10100,7 @@
       signature.addBool(this.labeledStatement_statement != null);
       this.labeledStatement_statement?.collectApiSignature(signature);
       signature.addInt(this.flags ?? 0);
+      signature.addString(this.name ?? '');
     } else if (kind == idl.LinkedNodeKind.libraryDirective) {
       signature.addInt(this.kind == null ? 0 : this.kind.index);
       if (this.annotatedNode_metadata == null) {
@@ -10439,6 +10114,7 @@
       signature.addBool(this.libraryDirective_name != null);
       this.libraryDirective_name?.collectApiSignature(signature);
       signature.addInt(this.flags ?? 0);
+      signature.addString(this.name ?? '');
     } else if (kind == idl.LinkedNodeKind.libraryIdentifier) {
       signature.addInt(this.kind == null ? 0 : this.kind.index);
       if (this.libraryIdentifier_components == null) {
@@ -10450,6 +10126,7 @@
         }
       }
       signature.addInt(this.flags ?? 0);
+      signature.addString(this.name ?? '');
     } else if (kind == idl.LinkedNodeKind.listLiteral) {
       signature.addInt(this.kind == null ? 0 : this.kind.index);
       if (this.typedLiteral_typeArguments == null) {
@@ -10471,6 +10148,7 @@
       signature.addInt(this.flags ?? 0);
       signature.addBool(this.expression_type != null);
       this.expression_type?.collectApiSignature(signature);
+      signature.addString(this.name ?? '');
     } else if (kind == idl.LinkedNodeKind.mapLiteralEntry) {
       signature.addInt(this.kind == null ? 0 : this.kind.index);
       signature.addBool(this.mapLiteralEntry_key != null);
@@ -10478,6 +10156,7 @@
       signature.addBool(this.mapLiteralEntry_value != null);
       this.mapLiteralEntry_value?.collectApiSignature(signature);
       signature.addInt(this.flags ?? 0);
+      signature.addString(this.name ?? '');
     } else if (kind == idl.LinkedNodeKind.methodDeclaration) {
       signature.addInt(this.kind == null ? 0 : this.kind.index);
       if (this.annotatedNode_metadata == null) {
@@ -10496,11 +10175,10 @@
       this.methodDeclaration_returnType?.collectApiSignature(signature);
       signature.addBool(this.methodDeclaration_typeParameters != null);
       this.methodDeclaration_typeParameters?.collectApiSignature(signature);
-      signature.addBool(this.methodDeclaration_name != null);
-      this.methodDeclaration_name?.collectApiSignature(signature);
       signature.addInt(this.flags ?? 0);
       signature.addBool(this.actualReturnType != null);
       this.actualReturnType?.collectApiSignature(signature);
+      signature.addString(this.name ?? '');
     } else if (kind == idl.LinkedNodeKind.methodInvocation) {
       signature.addInt(this.kind == null ? 0 : this.kind.index);
       signature.addBool(this.methodInvocation_methodName != null);
@@ -10516,6 +10194,7 @@
       this.invocationExpression_invokeType?.collectApiSignature(signature);
       signature.addBool(this.expression_type != null);
       this.expression_type?.collectApiSignature(signature);
+      signature.addString(this.name ?? '');
     } else if (kind == idl.LinkedNodeKind.mixinDeclaration) {
       signature.addInt(this.kind == null ? 0 : this.kind.index);
       if (this.annotatedNode_metadata == null) {
@@ -10536,8 +10215,6 @@
       }
       signature.addBool(this.mixinDeclaration_onClause != null);
       this.mixinDeclaration_onClause?.collectApiSignature(signature);
-      signature.addBool(this.namedCompilationUnitMember_name != null);
-      this.namedCompilationUnitMember_name?.collectApiSignature(signature);
       signature.addBool(this.classOrMixinDeclaration_implementsClause != null);
       this
           .classOrMixinDeclaration_implementsClause
@@ -10556,6 +10233,7 @@
           signature.addString(x);
         }
       }
+      signature.addString(this.name ?? '');
     } else if (kind == idl.LinkedNodeKind.namedExpression) {
       signature.addInt(this.kind == null ? 0 : this.kind.index);
       signature.addBool(this.namedExpression_expression != null);
@@ -10563,22 +10241,26 @@
       signature.addBool(this.namedExpression_name != null);
       this.namedExpression_name?.collectApiSignature(signature);
       signature.addInt(this.flags ?? 0);
+      signature.addString(this.name ?? '');
     } else if (kind == idl.LinkedNodeKind.nativeClause) {
       signature.addInt(this.kind == null ? 0 : this.kind.index);
       signature.addBool(this.nativeClause_name != null);
       this.nativeClause_name?.collectApiSignature(signature);
       signature.addInt(this.flags ?? 0);
+      signature.addString(this.name ?? '');
     } else if (kind == idl.LinkedNodeKind.nativeFunctionBody) {
       signature.addInt(this.kind == null ? 0 : this.kind.index);
       signature.addBool(this.nativeFunctionBody_stringLiteral != null);
       this.nativeFunctionBody_stringLiteral?.collectApiSignature(signature);
       signature.addInt(this.flags ?? 0);
+      signature.addString(this.name ?? '');
     } else if (kind == idl.LinkedNodeKind.nullLiteral) {
       signature.addInt(this.kind == null ? 0 : this.kind.index);
       signature.addInt(this.nullLiteral_fake ?? 0);
       signature.addInt(this.flags ?? 0);
       signature.addBool(this.expression_type != null);
       this.expression_type?.collectApiSignature(signature);
+      signature.addString(this.name ?? '');
     } else if (kind == idl.LinkedNodeKind.onClause) {
       signature.addInt(this.kind == null ? 0 : this.kind.index);
       if (this.onClause_superclassConstraints == null) {
@@ -10590,6 +10272,7 @@
         }
       }
       signature.addInt(this.flags ?? 0);
+      signature.addString(this.name ?? '');
     } else if (kind == idl.LinkedNodeKind.parenthesizedExpression) {
       signature.addInt(this.kind == null ? 0 : this.kind.index);
       signature.addBool(this.parenthesizedExpression_expression != null);
@@ -10597,6 +10280,7 @@
       signature.addInt(this.flags ?? 0);
       signature.addBool(this.expression_type != null);
       this.expression_type?.collectApiSignature(signature);
+      signature.addString(this.name ?? '');
     } else if (kind == idl.LinkedNodeKind.partDirective) {
       signature.addInt(this.kind == null ? 0 : this.kind.index);
       if (this.annotatedNode_metadata == null) {
@@ -10612,6 +10296,7 @@
       signature.addInt(this.flags ?? 0);
       signature.addInt(this.uriBasedDirective_uriElement ?? 0);
       signature.addString(this.uriBasedDirective_uriContent ?? '');
+      signature.addString(this.name ?? '');
     } else if (kind == idl.LinkedNodeKind.partOfDirective) {
       signature.addInt(this.kind == null ? 0 : this.kind.index);
       if (this.annotatedNode_metadata == null) {
@@ -10627,6 +10312,7 @@
       signature.addBool(this.partOfDirective_uri != null);
       this.partOfDirective_uri?.collectApiSignature(signature);
       signature.addInt(this.flags ?? 0);
+      signature.addString(this.name ?? '');
     } else if (kind == idl.LinkedNodeKind.postfixExpression) {
       signature.addInt(this.kind == null ? 0 : this.kind.index);
       signature.addBool(this.postfixExpression_operand != null);
@@ -10640,6 +10326,7 @@
       signature.addInt(this.postfixExpression_operator == null
           ? 0
           : this.postfixExpression_operator.index);
+      signature.addString(this.name ?? '');
     } else if (kind == idl.LinkedNodeKind.prefixExpression) {
       signature.addInt(this.kind == null ? 0 : this.kind.index);
       signature.addBool(this.prefixExpression_operand != null);
@@ -10653,6 +10340,7 @@
       signature.addInt(this.prefixExpression_operator == null
           ? 0
           : this.prefixExpression_operator.index);
+      signature.addString(this.name ?? '');
     } else if (kind == idl.LinkedNodeKind.prefixedIdentifier) {
       signature.addInt(this.kind == null ? 0 : this.kind.index);
       signature.addBool(this.prefixedIdentifier_identifier != null);
@@ -10662,6 +10350,7 @@
       signature.addInt(this.flags ?? 0);
       signature.addBool(this.expression_type != null);
       this.expression_type?.collectApiSignature(signature);
+      signature.addString(this.name ?? '');
     } else if (kind == idl.LinkedNodeKind.propertyAccess) {
       signature.addInt(this.kind == null ? 0 : this.kind.index);
       signature.addBool(this.propertyAccess_propertyName != null);
@@ -10674,6 +10363,7 @@
       signature.addInt(this.propertyAccess_operator == null
           ? 0
           : this.propertyAccess_operator.index);
+      signature.addString(this.name ?? '');
     } else if (kind == idl.LinkedNodeKind.redirectingConstructorInvocation) {
       signature.addInt(this.kind == null ? 0 : this.kind.index);
       signature
@@ -10693,16 +10383,19 @@
       this
           .redirectingConstructorInvocation_elementType
           ?.collectApiSignature(signature);
+      signature.addString(this.name ?? '');
     } else if (kind == idl.LinkedNodeKind.rethrowExpression) {
       signature.addInt(this.kind == null ? 0 : this.kind.index);
       signature.addInt(this.flags ?? 0);
       signature.addBool(this.expression_type != null);
       this.expression_type?.collectApiSignature(signature);
+      signature.addString(this.name ?? '');
     } else if (kind == idl.LinkedNodeKind.returnStatement) {
       signature.addInt(this.kind == null ? 0 : this.kind.index);
       signature.addBool(this.returnStatement_expression != null);
       this.returnStatement_expression?.collectApiSignature(signature);
       signature.addInt(this.flags ?? 0);
+      signature.addString(this.name ?? '');
     } else if (kind == idl.LinkedNodeKind.setOrMapLiteral) {
       signature.addInt(this.kind == null ? 0 : this.kind.index);
       if (this.typedLiteral_typeArguments == null) {
@@ -10724,6 +10417,7 @@
       signature.addInt(this.flags ?? 0);
       signature.addBool(this.expression_type != null);
       this.expression_type?.collectApiSignature(signature);
+      signature.addString(this.name ?? '');
     } else if (kind == idl.LinkedNodeKind.showCombinator) {
       signature.addInt(this.kind == null ? 0 : this.kind.index);
       signature.addInt(this.flags ?? 0);
@@ -10735,6 +10429,7 @@
           signature.addString(x);
         }
       }
+      signature.addString(this.name ?? '');
     } else if (kind == idl.LinkedNodeKind.simpleFormalParameter) {
       signature.addInt(this.kind == null ? 0 : this.kind.index);
       if (this.normalFormalParameter_metadata == null) {
@@ -10747,27 +10442,27 @@
       }
       signature.addBool(this.simpleFormalParameter_type != null);
       this.simpleFormalParameter_type?.collectApiSignature(signature);
-      signature.addBool(this.normalFormalParameter_identifier != null);
-      this.normalFormalParameter_identifier?.collectApiSignature(signature);
       signature.addInt(this.flags ?? 0);
       signature.addBool(this.actualType != null);
       this.actualType?.collectApiSignature(signature);
       signature.addBool(this.inheritsCovariant == true);
       signature.addBool(this.topLevelTypeInferenceError != null);
       this.topLevelTypeInferenceError?.collectApiSignature(signature);
+      signature.addString(this.name ?? '');
     } else if (kind == idl.LinkedNodeKind.simpleIdentifier) {
       signature.addInt(this.kind == null ? 0 : this.kind.index);
       signature.addInt(this.simpleIdentifier_element ?? 0);
       signature.addInt(this.flags ?? 0);
-      signature.addString(this.simpleIdentifier_name ?? '');
       signature.addBool(this.simpleIdentifier_elementType != null);
       this.simpleIdentifier_elementType?.collectApiSignature(signature);
       signature.addBool(this.expression_type != null);
       this.expression_type?.collectApiSignature(signature);
+      signature.addString(this.name ?? '');
     } else if (kind == idl.LinkedNodeKind.simpleStringLiteral) {
       signature.addInt(this.kind == null ? 0 : this.kind.index);
       signature.addInt(this.flags ?? 0);
       signature.addString(this.simpleStringLiteral_value ?? '');
+      signature.addString(this.name ?? '');
     } else if (kind == idl.LinkedNodeKind.spreadElement) {
       signature.addInt(this.kind == null ? 0 : this.kind.index);
       signature.addBool(this.spreadElement_expression != null);
@@ -10776,6 +10471,7 @@
       signature.addInt(this.spreadElement_spreadOperator == null
           ? 0
           : this.spreadElement_spreadOperator.index);
+      signature.addString(this.name ?? '');
     } else if (kind == idl.LinkedNodeKind.stringInterpolation) {
       signature.addInt(this.kind == null ? 0 : this.kind.index);
       if (this.stringInterpolation_elements == null) {
@@ -10787,6 +10483,7 @@
         }
       }
       signature.addInt(this.flags ?? 0);
+      signature.addString(this.name ?? '');
     } else if (kind == idl.LinkedNodeKind.superConstructorInvocation) {
       signature.addInt(this.kind == null ? 0 : this.kind.index);
       signature.addBool(this.superConstructorInvocation_arguments != null);
@@ -10802,11 +10499,13 @@
       this
           .superConstructorInvocation_elementType
           ?.collectApiSignature(signature);
+      signature.addString(this.name ?? '');
     } else if (kind == idl.LinkedNodeKind.superExpression) {
       signature.addInt(this.kind == null ? 0 : this.kind.index);
       signature.addInt(this.flags ?? 0);
       signature.addBool(this.expression_type != null);
       this.expression_type?.collectApiSignature(signature);
+      signature.addString(this.name ?? '');
     } else if (kind == idl.LinkedNodeKind.switchCase) {
       signature.addInt(this.kind == null ? 0 : this.kind.index);
       if (this.switchMember_labels == null) {
@@ -10828,6 +10527,7 @@
       signature.addBool(this.switchCase_expression != null);
       this.switchCase_expression?.collectApiSignature(signature);
       signature.addInt(this.flags ?? 0);
+      signature.addString(this.name ?? '');
     } else if (kind == idl.LinkedNodeKind.switchDefault) {
       signature.addInt(this.kind == null ? 0 : this.kind.index);
       if (this.switchMember_labels == null) {
@@ -10847,6 +10547,7 @@
         }
       }
       signature.addInt(this.flags ?? 0);
+      signature.addString(this.name ?? '');
     } else if (kind == idl.LinkedNodeKind.switchStatement) {
       signature.addInt(this.kind == null ? 0 : this.kind.index);
       if (this.switchStatement_members == null) {
@@ -10860,6 +10561,7 @@
       signature.addBool(this.switchStatement_expression != null);
       this.switchStatement_expression?.collectApiSignature(signature);
       signature.addInt(this.flags ?? 0);
+      signature.addString(this.name ?? '');
     } else if (kind == idl.LinkedNodeKind.symbolLiteral) {
       signature.addInt(this.kind == null ? 0 : this.kind.index);
       signature.addInt(this.flags ?? 0);
@@ -10873,11 +10575,13 @@
           signature.addString(x);
         }
       }
+      signature.addString(this.name ?? '');
     } else if (kind == idl.LinkedNodeKind.thisExpression) {
       signature.addInt(this.kind == null ? 0 : this.kind.index);
       signature.addInt(this.flags ?? 0);
       signature.addBool(this.expression_type != null);
       this.expression_type?.collectApiSignature(signature);
+      signature.addString(this.name ?? '');
     } else if (kind == idl.LinkedNodeKind.throwExpression) {
       signature.addInt(this.kind == null ? 0 : this.kind.index);
       signature.addBool(this.throwExpression_expression != null);
@@ -10885,6 +10589,7 @@
       signature.addInt(this.flags ?? 0);
       signature.addBool(this.expression_type != null);
       this.expression_type?.collectApiSignature(signature);
+      signature.addString(this.name ?? '');
     } else if (kind == idl.LinkedNodeKind.topLevelVariableDeclaration) {
       signature.addInt(this.kind == null ? 0 : this.kind.index);
       if (this.annotatedNode_metadata == null) {
@@ -10900,6 +10605,7 @@
           .topLevelVariableDeclaration_variableList
           ?.collectApiSignature(signature);
       signature.addInt(this.flags ?? 0);
+      signature.addString(this.name ?? '');
     } else if (kind == idl.LinkedNodeKind.tryStatement) {
       signature.addInt(this.kind == null ? 0 : this.kind.index);
       if (this.tryStatement_catchClauses == null) {
@@ -10915,6 +10621,7 @@
       signature.addBool(this.tryStatement_finallyBlock != null);
       this.tryStatement_finallyBlock?.collectApiSignature(signature);
       signature.addInt(this.flags ?? 0);
+      signature.addString(this.name ?? '');
     } else if (kind == idl.LinkedNodeKind.typeArgumentList) {
       signature.addInt(this.kind == null ? 0 : this.kind.index);
       if (this.typeArgumentList_arguments == null) {
@@ -10926,6 +10633,7 @@
         }
       }
       signature.addInt(this.flags ?? 0);
+      signature.addString(this.name ?? '');
     } else if (kind == idl.LinkedNodeKind.typeName) {
       signature.addInt(this.kind == null ? 0 : this.kind.index);
       if (this.typeName_typeArguments == null) {
@@ -10941,6 +10649,7 @@
       signature.addInt(this.flags ?? 0);
       signature.addBool(this.typeName_type != null);
       this.typeName_type?.collectApiSignature(signature);
+      signature.addString(this.name ?? '');
     } else if (kind == idl.LinkedNodeKind.typeParameter) {
       signature.addInt(this.kind == null ? 0 : this.kind.index);
       if (this.annotatedNode_metadata == null) {
@@ -10953,11 +10662,10 @@
       }
       signature.addBool(this.typeParameter_bound != null);
       this.typeParameter_bound?.collectApiSignature(signature);
-      signature.addBool(this.typeParameter_name != null);
-      this.typeParameter_name?.collectApiSignature(signature);
       signature.addInt(this.flags ?? 0);
       signature.addBool(this.typeParameter_defaultType != null);
       this.typeParameter_defaultType?.collectApiSignature(signature);
+      signature.addString(this.name ?? '');
     } else if (kind == idl.LinkedNodeKind.typeParameterList) {
       signature.addInt(this.kind == null ? 0 : this.kind.index);
       if (this.typeParameterList_typeParameters == null) {
@@ -10969,6 +10677,7 @@
         }
       }
       signature.addInt(this.flags ?? 0);
+      signature.addString(this.name ?? '');
     } else if (kind == idl.LinkedNodeKind.variableDeclaration) {
       signature.addInt(this.kind == null ? 0 : this.kind.index);
       if (this.annotatedNode_metadata == null) {
@@ -10981,14 +10690,13 @@
       }
       signature.addBool(this.variableDeclaration_initializer != null);
       this.variableDeclaration_initializer?.collectApiSignature(signature);
-      signature.addBool(this.variableDeclaration_name != null);
-      this.variableDeclaration_name?.collectApiSignature(signature);
       signature.addInt(this.flags ?? 0);
       signature.addBool(this.actualType != null);
       this.actualType?.collectApiSignature(signature);
       signature.addBool(this.inheritsCovariant == true);
       signature.addBool(this.topLevelTypeInferenceError != null);
       this.topLevelTypeInferenceError?.collectApiSignature(signature);
+      signature.addString(this.name ?? '');
     } else if (kind == idl.LinkedNodeKind.variableDeclarationList) {
       signature.addInt(this.kind == null ? 0 : this.kind.index);
       if (this.variableDeclarationList_variables == null) {
@@ -11010,6 +10718,7 @@
       signature.addBool(this.variableDeclarationList_type != null);
       this.variableDeclarationList_type?.collectApiSignature(signature);
       signature.addInt(this.flags ?? 0);
+      signature.addString(this.name ?? '');
     } else if (kind == idl.LinkedNodeKind.variableDeclarationStatement) {
       signature.addInt(this.kind == null ? 0 : this.kind.index);
       signature.addBool(this.variableDeclarationStatement_variables != null);
@@ -11017,6 +10726,7 @@
           .variableDeclarationStatement_variables
           ?.collectApiSignature(signature);
       signature.addInt(this.flags ?? 0);
+      signature.addString(this.name ?? '');
     } else if (kind == idl.LinkedNodeKind.whileStatement) {
       signature.addInt(this.kind == null ? 0 : this.kind.index);
       signature.addBool(this.whileStatement_body != null);
@@ -11024,6 +10734,7 @@
       signature.addBool(this.whileStatement_condition != null);
       this.whileStatement_condition?.collectApiSignature(signature);
       signature.addInt(this.flags ?? 0);
+      signature.addString(this.name ?? '');
     } else if (kind == idl.LinkedNodeKind.withClause) {
       signature.addInt(this.kind == null ? 0 : this.kind.index);
       if (this.withClause_mixinTypes == null) {
@@ -11035,18 +10746,19 @@
         }
       }
       signature.addInt(this.flags ?? 0);
+      signature.addString(this.name ?? '');
     } else if (kind == idl.LinkedNodeKind.yieldStatement) {
       signature.addInt(this.kind == null ? 0 : this.kind.index);
       signature.addBool(this.yieldStatement_expression != null);
       this.yieldStatement_expression?.collectApiSignature(signature);
       signature.addInt(this.flags ?? 0);
+      signature.addString(this.name ?? '');
     }
   }
 
   fb.Offset finish(fb.Builder fbBuilder) {
     fb.Offset offset_variantField_24;
     fb.Offset offset_variantField_2;
-    fb.Offset offset_variantField_11;
     fb.Offset offset_variantField_4;
     fb.Offset offset_variantField_6;
     fb.Offset offset_variantField_7;
@@ -11056,16 +10768,18 @@
     fb.Offset offset_variantField_12;
     fb.Offset offset_variantField_5;
     fb.Offset offset_variantField_13;
-    fb.Offset offset_variantField_35;
+    fb.Offset offset_variantField_33;
     fb.Offset offset_variantField_3;
     fb.Offset offset_variantField_10;
     fb.Offset offset_variantField_25;
     fb.Offset offset_variantField_1;
     fb.Offset offset_variantField_30;
     fb.Offset offset_variantField_14;
-    fb.Offset offset_variantField_36;
-    fb.Offset offset_variantField_20;
     fb.Offset offset_variantField_34;
+    fb.Offset offset_name;
+    fb.Offset offset_variantField_20;
+    fb.Offset offset_variantField_32;
+    fb.Offset offset_variantField_11;
     fb.Offset offset_variantField_22;
     if (_variantField_24 != null) {
       offset_variantField_24 = _variantField_24.finish(fbBuilder);
@@ -11074,9 +10788,6 @@
       offset_variantField_2 = fbBuilder
           .writeList(_variantField_2.map((b) => b.finish(fbBuilder)).toList());
     }
-    if (_variantField_11 != null) {
-      offset_variantField_11 = _variantField_11.finish(fbBuilder);
-    }
     if (!(_variantField_4 == null || _variantField_4.isEmpty)) {
       offset_variantField_4 = fbBuilder
           .writeList(_variantField_4.map((b) => b.finish(fbBuilder)).toList());
@@ -11106,9 +10817,9 @@
     if (_variantField_13 != null) {
       offset_variantField_13 = _variantField_13.finish(fbBuilder);
     }
-    if (!(_variantField_35 == null || _variantField_35.isEmpty)) {
-      offset_variantField_35 = fbBuilder.writeList(
-          _variantField_35.map((b) => fbBuilder.writeString(b)).toList());
+    if (!(_variantField_33 == null || _variantField_33.isEmpty)) {
+      offset_variantField_33 = fbBuilder.writeList(
+          _variantField_33.map((b) => fbBuilder.writeString(b)).toList());
     }
     if (!(_variantField_3 == null || _variantField_3.isEmpty)) {
       offset_variantField_3 = fbBuilder
@@ -11129,15 +10840,21 @@
     if (_variantField_14 != null) {
       offset_variantField_14 = _variantField_14.finish(fbBuilder);
     }
-    if (!(_variantField_36 == null || _variantField_36.isEmpty)) {
-      offset_variantField_36 = fbBuilder.writeList(
-          _variantField_36.map((b) => fbBuilder.writeString(b)).toList());
+    if (!(_variantField_34 == null || _variantField_34.isEmpty)) {
+      offset_variantField_34 = fbBuilder.writeList(
+          _variantField_34.map((b) => fbBuilder.writeString(b)).toList());
+    }
+    if (_name != null) {
+      offset_name = fbBuilder.writeString(_name);
     }
     if (_variantField_20 != null) {
       offset_variantField_20 = fbBuilder.writeString(_variantField_20);
     }
-    if (_variantField_34 != null) {
-      offset_variantField_34 = _variantField_34.finish(fbBuilder);
+    if (_variantField_32 != null) {
+      offset_variantField_32 = _variantField_32.finish(fbBuilder);
+    }
+    if (_variantField_11 != null) {
+      offset_variantField_11 = _variantField_11.finish(fbBuilder);
     }
     if (_variantField_22 != null) {
       offset_variantField_22 = fbBuilder.writeString(_variantField_22);
@@ -11149,9 +10866,6 @@
     if (offset_variantField_2 != null) {
       fbBuilder.addOffset(2, offset_variantField_2);
     }
-    if (offset_variantField_11 != null) {
-      fbBuilder.addOffset(11, offset_variantField_11);
-    }
     if (offset_variantField_4 != null) {
       fbBuilder.addOffset(4, offset_variantField_4);
     }
@@ -11192,14 +10906,8 @@
     if (offset_variantField_13 != null) {
       fbBuilder.addOffset(13, offset_variantField_13);
     }
-    if (_variantField_33 != null && _variantField_33 != 0) {
-      fbBuilder.addUint32(33, _variantField_33);
-    }
-    if (_variantField_32 != null && _variantField_32 != 0) {
-      fbBuilder.addUint32(32, _variantField_32);
-    }
-    if (offset_variantField_35 != null) {
-      fbBuilder.addOffset(35, offset_variantField_35);
+    if (offset_variantField_33 != null) {
+      fbBuilder.addOffset(33, offset_variantField_33);
     }
     if (_variantField_29 != null &&
         _variantField_29 != idl.LinkedNodeCommentType.block) {
@@ -11208,9 +10916,6 @@
     if (offset_variantField_3 != null) {
       fbBuilder.addOffset(3, offset_variantField_3);
     }
-    if (_variantField_19 != null && _variantField_19 != 0) {
-      fbBuilder.addUint32(19, _variantField_19);
-    }
     if (offset_variantField_10 != null) {
       fbBuilder.addOffset(10, offset_variantField_10);
     }
@@ -11231,6 +10936,9 @@
     if (offset_variantField_1 != null) {
       fbBuilder.addOffset(1, offset_variantField_1);
     }
+    if (_variantField_36 != null && _variantField_36 != 0) {
+      fbBuilder.addUint32(36, _variantField_36);
+    }
     if (_variantField_16 != null && _variantField_16 != 0) {
       fbBuilder.addUint32(16, _variantField_16);
     }
@@ -11243,8 +10951,11 @@
     if (_kind != null && _kind != idl.LinkedNodeKind.adjacentStrings) {
       fbBuilder.addUint8(0, _kind.index);
     }
-    if (offset_variantField_36 != null) {
-      fbBuilder.addOffset(36, offset_variantField_36);
+    if (offset_variantField_34 != null) {
+      fbBuilder.addOffset(34, offset_variantField_34);
+    }
+    if (offset_name != null) {
+      fbBuilder.addOffset(37, offset_name);
     }
     if (offset_variantField_20 != null) {
       fbBuilder.addOffset(20, offset_variantField_20);
@@ -11252,16 +10963,22 @@
     if (_variantField_31 == true) {
       fbBuilder.addBool(31, true);
     }
-    if (_variantField_37 != null &&
-        _variantField_37 != idl.UnlinkedTokenType.NOTHING) {
-      fbBuilder.addUint8(37, _variantField_37.index);
+    if (_variantField_35 != null &&
+        _variantField_35 != idl.UnlinkedTokenType.NOTHING) {
+      fbBuilder.addUint8(35, _variantField_35.index);
     }
-    if (offset_variantField_34 != null) {
-      fbBuilder.addOffset(34, offset_variantField_34);
+    if (offset_variantField_32 != null) {
+      fbBuilder.addOffset(32, offset_variantField_32);
+    }
+    if (offset_variantField_11 != null) {
+      fbBuilder.addOffset(11, offset_variantField_11);
     }
     if (offset_variantField_22 != null) {
       fbBuilder.addOffset(22, offset_variantField_22);
     }
+    if (_variantField_19 != null && _variantField_19 != 0) {
+      fbBuilder.addUint32(19, _variantField_19);
+    }
     return fbBuilder.endTable();
   }
 }
@@ -11284,7 +11001,6 @@
 
   idl.LinkedNodeType _variantField_24;
   List<idl.LinkedNode> _variantField_2;
-  idl.LinkedNode _variantField_11;
   List<idl.LinkedNode> _variantField_4;
   idl.LinkedNode _variantField_6;
   idl.LinkedNode _variantField_7;
@@ -11298,28 +11014,29 @@
   idl.LinkedNode _variantField_12;
   List<idl.LinkedNode> _variantField_5;
   idl.LinkedNode _variantField_13;
-  int _variantField_33;
-  int _variantField_32;
-  List<String> _variantField_35;
+  List<String> _variantField_33;
   idl.LinkedNodeCommentType _variantField_29;
   List<idl.LinkedNode> _variantField_3;
-  int _variantField_19;
   idl.LinkedNode _variantField_10;
   idl.LinkedNodeFormalParameterKind _variantField_26;
   double _variantField_21;
   idl.LinkedNodeType _variantField_25;
   int _flags;
   String _variantField_1;
+  int _variantField_36;
   int _variantField_16;
   String _variantField_30;
   idl.LinkedNode _variantField_14;
   idl.LinkedNodeKind _kind;
-  List<String> _variantField_36;
+  List<String> _variantField_34;
+  String _name;
   String _variantField_20;
   bool _variantField_31;
-  idl.UnlinkedTokenType _variantField_37;
-  idl.TopLevelInferenceError _variantField_34;
+  idl.UnlinkedTokenType _variantField_35;
+  idl.TopLevelInferenceError _variantField_32;
+  idl.LinkedNode _variantField_11;
   String _variantField_22;
+  int _variantField_19;
 
   @override
   idl.LinkedNodeType get actualReturnType {
@@ -11589,34 +11306,6 @@
   }
 
   @override
-  idl.LinkedNode get annotatedNode_comment {
-    assert(kind == idl.LinkedNodeKind.classDeclaration ||
-        kind == idl.LinkedNodeKind.classTypeAlias ||
-        kind == idl.LinkedNodeKind.constructorDeclaration ||
-        kind == idl.LinkedNodeKind.declaredIdentifier ||
-        kind == idl.LinkedNodeKind.enumDeclaration ||
-        kind == idl.LinkedNodeKind.enumConstantDeclaration ||
-        kind == idl.LinkedNodeKind.exportDirective ||
-        kind == idl.LinkedNodeKind.fieldDeclaration ||
-        kind == idl.LinkedNodeKind.functionDeclaration ||
-        kind == idl.LinkedNodeKind.functionTypeAlias ||
-        kind == idl.LinkedNodeKind.genericTypeAlias ||
-        kind == idl.LinkedNodeKind.importDirective ||
-        kind == idl.LinkedNodeKind.libraryDirective ||
-        kind == idl.LinkedNodeKind.methodDeclaration ||
-        kind == idl.LinkedNodeKind.mixinDeclaration ||
-        kind == idl.LinkedNodeKind.partDirective ||
-        kind == idl.LinkedNodeKind.partOfDirective ||
-        kind == idl.LinkedNodeKind.topLevelVariableDeclaration ||
-        kind == idl.LinkedNodeKind.typeParameter ||
-        kind == idl.LinkedNodeKind.variableDeclaration ||
-        kind == idl.LinkedNodeKind.variableDeclarationList);
-    _variantField_11 ??=
-        const _LinkedNodeReader().vTableGet(_bc, _bcOffset, 11, null);
-    return _variantField_11;
-  }
-
-  @override
   List<idl.LinkedNode> get annotatedNode_metadata {
     assert(kind == idl.LinkedNodeKind.classDeclaration ||
         kind == idl.LinkedNodeKind.classTypeAlias ||
@@ -11859,14 +11548,6 @@
   }
 
   @override
-  idl.LinkedNode get enumConstantDeclaration_name {
-    assert(kind == idl.LinkedNodeKind.enumConstantDeclaration);
-    _variantField_6 ??=
-        const _LinkedNodeReader().vTableGet(_bc, _bcOffset, 6, null);
-    return _variantField_6;
-  }
-
-  @override
   idl.LinkedNode get expressionFunctionBody_expression {
     assert(kind == idl.LinkedNodeKind.expressionFunctionBody);
     _variantField_6 ??=
@@ -12375,14 +12056,6 @@
   }
 
   @override
-  idl.LinkedNode get constructorDeclaration_name {
-    assert(kind == idl.LinkedNodeKind.constructorDeclaration);
-    _variantField_7 ??=
-        const _LinkedNodeReader().vTableGet(_bc, _bcOffset, 7, null);
-    return _variantField_7;
-  }
-
-  @override
   idl.LinkedNode get constructorFieldInitializer_fieldName {
     assert(kind == idl.LinkedNodeKind.constructorFieldInitializer);
     _variantField_7 ??=
@@ -12647,22 +12320,6 @@
   }
 
   @override
-  idl.LinkedNode get typeParameter_name {
-    assert(kind == idl.LinkedNodeKind.typeParameter);
-    _variantField_7 ??=
-        const _LinkedNodeReader().vTableGet(_bc, _bcOffset, 7, null);
-    return _variantField_7;
-  }
-
-  @override
-  idl.LinkedNode get variableDeclaration_name {
-    assert(kind == idl.LinkedNodeKind.variableDeclaration);
-    _variantField_7 ??=
-        const _LinkedNodeReader().vTableGet(_bc, _bcOffset, 7, null);
-    return _variantField_7;
-  }
-
-  @override
   idl.LinkedNode get whileStatement_condition {
     assert(kind == idl.LinkedNodeKind.whileStatement);
     _variantField_7 ??=
@@ -12679,18 +12336,6 @@
   }
 
   @override
-  int get directive_keywordOffset {
-    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 genericFunctionType_id {
     assert(kind == idl.LinkedNodeKind.genericFunctionType);
     _variantField_17 ??=
@@ -13143,16 +12788,6 @@
   }
 
   @override
-  idl.LinkedNode get normalFormalParameter_identifier {
-    assert(kind == idl.LinkedNodeKind.fieldFormalParameter ||
-        kind == idl.LinkedNodeKind.functionTypedFormalParameter ||
-        kind == idl.LinkedNodeKind.simpleFormalParameter);
-    _variantField_9 ??=
-        const _LinkedNodeReader().vTableGet(_bc, _bcOffset, 9, null);
-    return _variantField_9;
-  }
-
-  @override
   idl.LinkedNode get classOrMixinDeclaration_implementsClause {
     assert(kind == idl.LinkedNodeKind.classDeclaration ||
         kind == idl.LinkedNodeKind.mixinDeclaration);
@@ -13200,57 +12835,11 @@
   }
 
   @override
-  int get codeLength {
-    assert(kind == idl.LinkedNodeKind.classDeclaration ||
-        kind == idl.LinkedNodeKind.classTypeAlias ||
-        kind == idl.LinkedNodeKind.compilationUnit ||
-        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 codeOffset {
-    assert(kind == idl.LinkedNodeKind.classDeclaration ||
-        kind == idl.LinkedNodeKind.classTypeAlias ||
-        kind == idl.LinkedNodeKind.compilationUnit ||
-        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_32 ??=
-        const fb.Uint32Reader().vTableGet(_bc, _bcOffset, 32, 0);
-    return _variantField_32;
-  }
-
-  @override
   List<String> get comment_tokens {
     assert(kind == idl.LinkedNodeKind.comment);
-    _variantField_35 ??= const fb.ListReader<String>(const fb.StringReader())
-        .vTableGet(_bc, _bcOffset, 35, const <String>[]);
-    return _variantField_35;
+    _variantField_33 ??= const fb.ListReader<String>(const fb.StringReader())
+        .vTableGet(_bc, _bcOffset, 33, const <String>[]);
+    return _variantField_33;
   }
 
   @override
@@ -13309,24 +12898,6 @@
   }
 
   @override
-  int get constructorDeclaration_periodOffset {
-    assert(kind == idl.LinkedNodeKind.constructorDeclaration);
-    _variantField_19 ??=
-        const fb.Uint32Reader().vTableGet(_bc, _bcOffset, 19, 0);
-    return _variantField_19;
-  }
-
-  @override
-  int get uriBasedDirective_uriElement {
-    assert(kind == idl.LinkedNodeKind.exportDirective ||
-        kind == idl.LinkedNodeKind.importDirective ||
-        kind == idl.LinkedNodeKind.partDirective);
-    _variantField_19 ??=
-        const fb.Uint32Reader().vTableGet(_bc, _bcOffset, 19, 0);
-    return _variantField_19;
-  }
-
-  @override
   idl.LinkedNode get constructorDeclaration_returnType {
     assert(kind == idl.LinkedNodeKind.constructorDeclaration);
     _variantField_10 ??=
@@ -13335,28 +12906,6 @@
   }
 
   @override
-  idl.LinkedNode get methodDeclaration_name {
-    assert(kind == idl.LinkedNodeKind.methodDeclaration);
-    _variantField_10 ??=
-        const _LinkedNodeReader().vTableGet(_bc, _bcOffset, 10, null);
-    return _variantField_10;
-  }
-
-  @override
-  idl.LinkedNode get namedCompilationUnitMember_name {
-    assert(kind == idl.LinkedNodeKind.classDeclaration ||
-        kind == idl.LinkedNodeKind.classTypeAlias ||
-        kind == idl.LinkedNodeKind.enumDeclaration ||
-        kind == idl.LinkedNodeKind.functionDeclaration ||
-        kind == idl.LinkedNodeKind.functionTypeAlias ||
-        kind == idl.LinkedNodeKind.genericTypeAlias ||
-        kind == idl.LinkedNodeKind.mixinDeclaration);
-    _variantField_10 ??=
-        const _LinkedNodeReader().vTableGet(_bc, _bcOffset, 10, null);
-    return _variantField_10;
-  }
-
-  @override
   idl.LinkedNodeFormalParameterKind get defaultFormalParameter_kind {
     assert(kind == idl.LinkedNodeKind.defaultFormalParameter);
     _variantField_26 ??= const _LinkedNodeFormalParameterKindReader().vTableGet(
@@ -13429,16 +12978,41 @@
   }
 
   @override
-  int get integerLiteral_value {
-    assert(kind == idl.LinkedNodeKind.integerLiteral);
-    _variantField_16 ??=
-        const fb.Uint32Reader().vTableGet(_bc, _bcOffset, 16, 0);
-    return _variantField_16;
+  int get informativeId {
+    assert(kind == idl.LinkedNodeKind.classDeclaration ||
+        kind == idl.LinkedNodeKind.classTypeAlias ||
+        kind == idl.LinkedNodeKind.compilationUnit ||
+        kind == idl.LinkedNodeKind.compilationUnit ||
+        kind == idl.LinkedNodeKind.constructorDeclaration ||
+        kind == idl.LinkedNodeKind.defaultFormalParameter ||
+        kind == idl.LinkedNodeKind.enumConstantDeclaration ||
+        kind == idl.LinkedNodeKind.enumDeclaration ||
+        kind == idl.LinkedNodeKind.exportDirective ||
+        kind == idl.LinkedNodeKind.fieldDeclaration ||
+        kind == idl.LinkedNodeKind.fieldFormalParameter ||
+        kind == idl.LinkedNodeKind.functionDeclaration ||
+        kind == idl.LinkedNodeKind.functionTypedFormalParameter ||
+        kind == idl.LinkedNodeKind.functionTypeAlias ||
+        kind == idl.LinkedNodeKind.genericTypeAlias ||
+        kind == idl.LinkedNodeKind.importDirective ||
+        kind == idl.LinkedNodeKind.libraryDirective ||
+        kind == idl.LinkedNodeKind.methodDeclaration ||
+        kind == idl.LinkedNodeKind.mixinDeclaration ||
+        kind == idl.LinkedNodeKind.partDirective ||
+        kind == idl.LinkedNodeKind.partOfDirective ||
+        kind == idl.LinkedNodeKind.simpleFormalParameter ||
+        kind == idl.LinkedNodeKind.topLevelVariableDeclaration ||
+        kind == idl.LinkedNodeKind.typeParameter ||
+        kind == idl.LinkedNodeKind.variableDeclaration ||
+        kind == idl.LinkedNodeKind.variableDeclarationList);
+    _variantField_36 ??=
+        const fb.Uint32Reader().vTableGet(_bc, _bcOffset, 36, 0);
+    return _variantField_36;
   }
 
   @override
-  int get simpleIdentifier_offset {
-    assert(kind == idl.LinkedNodeKind.simpleIdentifier);
+  int get integerLiteral_value {
+    assert(kind == idl.LinkedNodeKind.integerLiteral);
     _variantField_16 ??=
         const fb.Uint32Reader().vTableGet(_bc, _bcOffset, 16, 0);
     return _variantField_16;
@@ -13462,16 +13036,6 @@
   }
 
   @override
-  idl.LinkedNode get normalFormalParameter_comment {
-    assert(kind == idl.LinkedNodeKind.fieldFormalParameter ||
-        kind == idl.LinkedNodeKind.functionTypedFormalParameter ||
-        kind == idl.LinkedNodeKind.simpleFormalParameter);
-    _variantField_14 ??=
-        const _LinkedNodeReader().vTableGet(_bc, _bcOffset, 14, null);
-    return _variantField_14;
-  }
-
-  @override
   idl.LinkedNode get uriBasedDirective_uri {
     assert(kind == idl.LinkedNodeKind.exportDirective ||
         kind == idl.LinkedNodeKind.importDirective ||
@@ -13491,9 +13055,9 @@
   @override
   List<String> get mixinDeclaration_superInvokedNames {
     assert(kind == idl.LinkedNodeKind.mixinDeclaration);
-    _variantField_36 ??= const fb.ListReader<String>(const fb.StringReader())
-        .vTableGet(_bc, _bcOffset, 36, const <String>[]);
-    return _variantField_36;
+    _variantField_34 ??= const fb.ListReader<String>(const fb.StringReader())
+        .vTableGet(_bc, _bcOffset, 34, const <String>[]);
+    return _variantField_34;
   }
 
   @override
@@ -13501,9 +13065,15 @@
     assert(kind == idl.LinkedNodeKind.hideCombinator ||
         kind == idl.LinkedNodeKind.showCombinator ||
         kind == idl.LinkedNodeKind.symbolLiteral);
-    _variantField_36 ??= const fb.ListReader<String>(const fb.StringReader())
-        .vTableGet(_bc, _bcOffset, 36, const <String>[]);
-    return _variantField_36;
+    _variantField_34 ??= const fb.ListReader<String>(const fb.StringReader())
+        .vTableGet(_bc, _bcOffset, 34, const <String>[]);
+    return _variantField_34;
+  }
+
+  @override
+  String get name {
+    _name ??= const fb.StringReader().vTableGet(_bc, _bcOffset, 37, '');
+    return _name;
   }
 
   @override
@@ -13516,14 +13086,6 @@
   }
 
   @override
-  String get simpleIdentifier_name {
-    assert(kind == idl.LinkedNodeKind.simpleIdentifier);
-    _variantField_20 ??=
-        const fb.StringReader().vTableGet(_bc, _bcOffset, 20, '');
-    return _variantField_20;
-  }
-
-  @override
   String get simpleStringLiteral_value {
     assert(kind == idl.LinkedNodeKind.simpleStringLiteral);
     _variantField_20 ??=
@@ -13546,18 +13108,26 @@
   @override
   idl.UnlinkedTokenType get spreadElement_spreadOperator {
     assert(kind == idl.LinkedNodeKind.spreadElement);
-    _variantField_37 ??= const _UnlinkedTokenTypeReader()
-        .vTableGet(_bc, _bcOffset, 37, idl.UnlinkedTokenType.NOTHING);
-    return _variantField_37;
+    _variantField_35 ??= const _UnlinkedTokenTypeReader()
+        .vTableGet(_bc, _bcOffset, 35, idl.UnlinkedTokenType.NOTHING);
+    return _variantField_35;
   }
 
   @override
   idl.TopLevelInferenceError get topLevelTypeInferenceError {
     assert(kind == idl.LinkedNodeKind.simpleFormalParameter ||
         kind == idl.LinkedNodeKind.variableDeclaration);
-    _variantField_34 ??= const _TopLevelInferenceErrorReader()
-        .vTableGet(_bc, _bcOffset, 34, null);
-    return _variantField_34;
+    _variantField_32 ??= const _TopLevelInferenceErrorReader()
+        .vTableGet(_bc, _bcOffset, 32, null);
+    return _variantField_32;
+  }
+
+  @override
+  idl.LinkedNode get unused11 {
+    assert(kind == idl.LinkedNodeKind.classDeclaration);
+    _variantField_11 ??=
+        const _LinkedNodeReader().vTableGet(_bc, _bcOffset, 11, null);
+    return _variantField_11;
   }
 
   @override
@@ -13569,6 +13139,16 @@
         const fb.StringReader().vTableGet(_bc, _bcOffset, 22, '');
     return _variantField_22;
   }
+
+  @override
+  int get uriBasedDirective_uriElement {
+    assert(kind == idl.LinkedNodeKind.exportDirective ||
+        kind == idl.LinkedNodeKind.importDirective ||
+        kind == idl.LinkedNodeKind.partDirective);
+    _variantField_19 ??=
+        const fb.Uint32Reader().vTableGet(_bc, _bcOffset, 19, 0);
+    return _variantField_19;
+  }
 }
 
 abstract class _LinkedNodeMixin implements idl.LinkedNode {
@@ -13578,6 +13158,7 @@
     if (flags != 0) _result["flags"] = flags;
     if (kind != idl.LinkedNodeKind.adjacentStrings)
       _result["kind"] = kind.toString().split('.')[1];
+    if (name != '') _result["name"] = name;
     if (kind == idl.LinkedNodeKind.adjacentStrings) {
       if (adjacentStrings_strings.isNotEmpty)
         _result["adjacentStrings_strings"] =
@@ -13711,8 +13292,6 @@
             catchClause_stackTraceParameter.toJson();
     }
     if (kind == idl.LinkedNodeKind.classDeclaration) {
-      if (annotatedNode_comment != null)
-        _result["annotatedNode_comment"] = annotatedNode_comment.toJson();
       if (annotatedNode_metadata.isNotEmpty)
         _result["annotatedNode_metadata"] =
             annotatedNode_metadata.map((_value) => _value.toJson()).toList();
@@ -13739,18 +13318,13 @@
       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();
+      if (informativeId != 0) _result["informativeId"] = informativeId;
       if (simplyBoundable_isSimplyBounded != false)
         _result["simplyBoundable_isSimplyBounded"] =
             simplyBoundable_isSimplyBounded;
+      if (unused11 != null) _result["unused11"] = unused11.toJson();
     }
     if (kind == idl.LinkedNodeKind.classTypeAlias) {
-      if (annotatedNode_comment != null)
-        _result["annotatedNode_comment"] = annotatedNode_comment.toJson();
       if (annotatedNode_metadata.isNotEmpty)
         _result["annotatedNode_metadata"] =
             annotatedNode_metadata.map((_value) => _value.toJson()).toList();
@@ -13766,11 +13340,7 @@
       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();
+      if (informativeId != 0) _result["informativeId"] = informativeId;
       if (simplyBoundable_isSimplyBounded != false)
         _result["simplyBoundable_isSimplyBounded"] =
             simplyBoundable_isSimplyBounded;
@@ -13796,12 +13366,11 @@
       if (compilationUnit_scriptTag != null)
         _result["compilationUnit_scriptTag"] =
             compilationUnit_scriptTag.toJson();
-      if (codeLength != 0) _result["codeLength"] = codeLength;
-      if (codeOffset != 0) _result["codeOffset"] = codeOffset;
       if (compilationUnit_directives.isNotEmpty)
         _result["compilationUnit_directives"] = compilationUnit_directives
             .map((_value) => _value.toJson())
             .toList();
+      if (informativeId != 0) _result["informativeId"] = informativeId;
     }
     if (kind == idl.LinkedNodeKind.conditionalExpression) {
       if (conditionalExpression_condition != null)
@@ -13830,31 +13399,22 @@
             constructorDeclaration_initializers
                 .map((_value) => _value.toJson())
                 .toList();
-      if (annotatedNode_comment != null)
-        _result["annotatedNode_comment"] = annotatedNode_comment.toJson();
       if (annotatedNode_metadata.isNotEmpty)
         _result["annotatedNode_metadata"] =
             annotatedNode_metadata.map((_value) => _value.toJson()).toList();
       if (constructorDeclaration_body != null)
         _result["constructorDeclaration_body"] =
             constructorDeclaration_body.toJson();
-      if (constructorDeclaration_name != null)
-        _result["constructorDeclaration_name"] =
-            constructorDeclaration_name.toJson();
       if (constructorDeclaration_parameters != null)
         _result["constructorDeclaration_parameters"] =
             constructorDeclaration_parameters.toJson();
       if (constructorDeclaration_redirectedConstructor != null)
         _result["constructorDeclaration_redirectedConstructor"] =
             constructorDeclaration_redirectedConstructor.toJson();
-      if (codeLength != 0) _result["codeLength"] = codeLength;
-      if (codeOffset != 0) _result["codeOffset"] = codeOffset;
-      if (constructorDeclaration_periodOffset != 0)
-        _result["constructorDeclaration_periodOffset"] =
-            constructorDeclaration_periodOffset;
       if (constructorDeclaration_returnType != null)
         _result["constructorDeclaration_returnType"] =
             constructorDeclaration_returnType.toJson();
+      if (informativeId != 0) _result["informativeId"] = informativeId;
     }
     if (kind == idl.LinkedNodeKind.constructorFieldInitializer) {
       if (constructorFieldInitializer_expression != null)
@@ -13880,8 +13440,6 @@
         _result["continueStatement_label"] = continueStatement_label.toJson();
     }
     if (kind == idl.LinkedNodeKind.declaredIdentifier) {
-      if (annotatedNode_comment != null)
-        _result["annotatedNode_comment"] = annotatedNode_comment.toJson();
       if (annotatedNode_metadata.isNotEmpty)
         _result["annotatedNode_metadata"] =
             annotatedNode_metadata.map((_value) => _value.toJson()).toList();
@@ -13898,12 +13456,11 @@
       if (defaultFormalParameter_parameter != null)
         _result["defaultFormalParameter_parameter"] =
             defaultFormalParameter_parameter.toJson();
-      if (codeLength != 0) _result["codeLength"] = codeLength;
-      if (codeOffset != 0) _result["codeOffset"] = codeOffset;
       if (defaultFormalParameter_kind !=
           idl.LinkedNodeFormalParameterKind.requiredPositional)
         _result["defaultFormalParameter_kind"] =
             defaultFormalParameter_kind.toString().split('.')[1];
+      if (informativeId != 0) _result["informativeId"] = informativeId;
     }
     if (kind == idl.LinkedNodeKind.doStatement) {
       if (doStatement_body != null)
@@ -13931,29 +13488,19 @@
         _result["emptyStatement_fake"] = emptyStatement_fake;
     }
     if (kind == idl.LinkedNodeKind.enumConstantDeclaration) {
-      if (annotatedNode_comment != null)
-        _result["annotatedNode_comment"] = annotatedNode_comment.toJson();
       if (annotatedNode_metadata.isNotEmpty)
         _result["annotatedNode_metadata"] =
             annotatedNode_metadata.map((_value) => _value.toJson()).toList();
-      if (enumConstantDeclaration_name != null)
-        _result["enumConstantDeclaration_name"] =
-            enumConstantDeclaration_name.toJson();
+      if (informativeId != 0) _result["informativeId"] = informativeId;
     }
     if (kind == idl.LinkedNodeKind.enumDeclaration) {
       if (enumDeclaration_constants.isNotEmpty)
         _result["enumDeclaration_constants"] =
             enumDeclaration_constants.map((_value) => _value.toJson()).toList();
-      if (annotatedNode_comment != null)
-        _result["annotatedNode_comment"] = annotatedNode_comment.toJson();
       if (annotatedNode_metadata.isNotEmpty)
         _result["annotatedNode_metadata"] =
             annotatedNode_metadata.map((_value) => _value.toJson()).toList();
-      if (codeLength != 0) _result["codeLength"] = codeLength;
-      if (codeOffset != 0) _result["codeOffset"] = codeOffset;
-      if (namedCompilationUnitMember_name != null)
-        _result["namedCompilationUnitMember_name"] =
-            namedCompilationUnitMember_name.toJson();
+      if (informativeId != 0) _result["informativeId"] = informativeId;
     }
     if (kind == idl.LinkedNodeKind.exportDirective) {
       if (namespaceDirective_combinators.isNotEmpty)
@@ -13961,20 +13508,15 @@
             namespaceDirective_combinators
                 .map((_value) => _value.toJson())
                 .toList();
-      if (annotatedNode_comment != null)
-        _result["annotatedNode_comment"] = annotatedNode_comment.toJson();
       if (annotatedNode_metadata.isNotEmpty)
         _result["annotatedNode_metadata"] =
             annotatedNode_metadata.map((_value) => _value.toJson()).toList();
-      if (directive_keywordOffset != 0)
-        _result["directive_keywordOffset"] = directive_keywordOffset;
       if (namespaceDirective_configurations.isNotEmpty)
         _result["namespaceDirective_configurations"] =
             namespaceDirective_configurations
                 .map((_value) => _value.toJson())
                 .toList();
-      if (uriBasedDirective_uriElement != 0)
-        _result["uriBasedDirective_uriElement"] = uriBasedDirective_uriElement;
+      if (informativeId != 0) _result["informativeId"] = informativeId;
       if (uriBasedDirective_uri != null)
         _result["uriBasedDirective_uri"] = uriBasedDirective_uri.toJson();
       if (namespaceDirective_selectedUri != '')
@@ -13982,6 +13524,8 @@
             namespaceDirective_selectedUri;
       if (uriBasedDirective_uriContent != '')
         _result["uriBasedDirective_uriContent"] = uriBasedDirective_uriContent;
+      if (uriBasedDirective_uriElement != 0)
+        _result["uriBasedDirective_uriElement"] = uriBasedDirective_uriElement;
     }
     if (kind == idl.LinkedNodeKind.expressionFunctionBody) {
       if (expressionFunctionBody_expression != null)
@@ -13998,13 +13542,12 @@
         _result["extendsClause_superclass"] = extendsClause_superclass.toJson();
     }
     if (kind == idl.LinkedNodeKind.fieldDeclaration) {
-      if (annotatedNode_comment != null)
-        _result["annotatedNode_comment"] = annotatedNode_comment.toJson();
       if (annotatedNode_metadata.isNotEmpty)
         _result["annotatedNode_metadata"] =
             annotatedNode_metadata.map((_value) => _value.toJson()).toList();
       if (fieldDeclaration_fields != null)
         _result["fieldDeclaration_fields"] = fieldDeclaration_fields.toJson();
+      if (informativeId != 0) _result["informativeId"] = informativeId;
     }
     if (kind == idl.LinkedNodeKind.fieldFormalParameter) {
       if (actualType != null) _result["actualType"] = actualType.toJson();
@@ -14024,14 +13567,7 @@
             fieldFormalParameter_formalParameters.toJson();
       if (inheritsCovariant != false)
         _result["inheritsCovariant"] = inheritsCovariant;
-      if (normalFormalParameter_identifier != null)
-        _result["normalFormalParameter_identifier"] =
-            normalFormalParameter_identifier.toJson();
-      if (codeLength != 0) _result["codeLength"] = codeLength;
-      if (codeOffset != 0) _result["codeOffset"] = codeOffset;
-      if (normalFormalParameter_comment != null)
-        _result["normalFormalParameter_comment"] =
-            normalFormalParameter_comment.toJson();
+      if (informativeId != 0) _result["informativeId"] = informativeId;
     }
     if (kind == idl.LinkedNodeKind.forEachPartsWithDeclaration) {
       if (forEachParts_iterable != null)
@@ -14089,8 +13625,6 @@
     if (kind == idl.LinkedNodeKind.functionDeclaration) {
       if (actualReturnType != null)
         _result["actualReturnType"] = actualReturnType.toJson();
-      if (annotatedNode_comment != null)
-        _result["annotatedNode_comment"] = annotatedNode_comment.toJson();
       if (annotatedNode_metadata.isNotEmpty)
         _result["annotatedNode_metadata"] =
             annotatedNode_metadata.map((_value) => _value.toJson()).toList();
@@ -14100,11 +13634,7 @@
       if (functionDeclaration_returnType != null)
         _result["functionDeclaration_returnType"] =
             functionDeclaration_returnType.toJson();
-      if (codeLength != 0) _result["codeLength"] = codeLength;
-      if (codeOffset != 0) _result["codeOffset"] = codeOffset;
-      if (namedCompilationUnitMember_name != null)
-        _result["namedCompilationUnitMember_name"] =
-            namedCompilationUnitMember_name.toJson();
+      if (informativeId != 0) _result["informativeId"] = informativeId;
     }
     if (kind == idl.LinkedNodeKind.functionDeclarationStatement) {
       if (functionDeclarationStatement_functionDeclaration != null)
@@ -14142,8 +13672,6 @@
     if (kind == idl.LinkedNodeKind.functionTypeAlias) {
       if (actualReturnType != null)
         _result["actualReturnType"] = actualReturnType.toJson();
-      if (annotatedNode_comment != null)
-        _result["annotatedNode_comment"] = annotatedNode_comment.toJson();
       if (annotatedNode_metadata.isNotEmpty)
         _result["annotatedNode_metadata"] =
             annotatedNode_metadata.map((_value) => _value.toJson()).toList();
@@ -14158,11 +13686,7 @@
             functionTypeAlias_typeParameters.toJson();
       if (typeAlias_hasSelfReference != false)
         _result["typeAlias_hasSelfReference"] = typeAlias_hasSelfReference;
-      if (codeLength != 0) _result["codeLength"] = codeLength;
-      if (codeOffset != 0) _result["codeOffset"] = codeOffset;
-      if (namedCompilationUnitMember_name != null)
-        _result["namedCompilationUnitMember_name"] =
-            namedCompilationUnitMember_name.toJson();
+      if (informativeId != 0) _result["informativeId"] = informativeId;
       if (simplyBoundable_isSimplyBounded != false)
         _result["simplyBoundable_isSimplyBounded"] =
             simplyBoundable_isSimplyBounded;
@@ -14185,14 +13709,7 @@
             functionTypedFormalParameter_typeParameters.toJson();
       if (inheritsCovariant != false)
         _result["inheritsCovariant"] = inheritsCovariant;
-      if (normalFormalParameter_identifier != null)
-        _result["normalFormalParameter_identifier"] =
-            normalFormalParameter_identifier.toJson();
-      if (codeLength != 0) _result["codeLength"] = codeLength;
-      if (codeOffset != 0) _result["codeOffset"] = codeOffset;
-      if (normalFormalParameter_comment != null)
-        _result["normalFormalParameter_comment"] =
-            normalFormalParameter_comment.toJson();
+      if (informativeId != 0) _result["informativeId"] = informativeId;
     }
     if (kind == idl.LinkedNodeKind.genericFunctionType) {
       if (actualReturnType != null)
@@ -14212,8 +13729,6 @@
         _result["genericFunctionType_type"] = genericFunctionType_type.toJson();
     }
     if (kind == idl.LinkedNodeKind.genericTypeAlias) {
-      if (annotatedNode_comment != null)
-        _result["annotatedNode_comment"] = annotatedNode_comment.toJson();
       if (annotatedNode_metadata.isNotEmpty)
         _result["annotatedNode_metadata"] =
             annotatedNode_metadata.map((_value) => _value.toJson()).toList();
@@ -14225,11 +13740,7 @@
             genericTypeAlias_functionType.toJson();
       if (typeAlias_hasSelfReference != false)
         _result["typeAlias_hasSelfReference"] = typeAlias_hasSelfReference;
-      if (codeLength != 0) _result["codeLength"] = codeLength;
-      if (codeOffset != 0) _result["codeOffset"] = codeOffset;
-      if (namedCompilationUnitMember_name != null)
-        _result["namedCompilationUnitMember_name"] =
-            namedCompilationUnitMember_name.toJson();
+      if (informativeId != 0) _result["informativeId"] = informativeId;
       if (simplyBoundable_isSimplyBounded != false)
         _result["simplyBoundable_isSimplyBounded"] =
             simplyBoundable_isSimplyBounded;
@@ -14267,13 +13778,9 @@
             namespaceDirective_combinators
                 .map((_value) => _value.toJson())
                 .toList();
-      if (annotatedNode_comment != null)
-        _result["annotatedNode_comment"] = annotatedNode_comment.toJson();
       if (annotatedNode_metadata.isNotEmpty)
         _result["annotatedNode_metadata"] =
             annotatedNode_metadata.map((_value) => _value.toJson()).toList();
-      if (directive_keywordOffset != 0)
-        _result["directive_keywordOffset"] = directive_keywordOffset;
       if (importDirective_prefixOffset != 0)
         _result["importDirective_prefixOffset"] = importDirective_prefixOffset;
       if (namespaceDirective_configurations.isNotEmpty)
@@ -14281,10 +13788,9 @@
             namespaceDirective_configurations
                 .map((_value) => _value.toJson())
                 .toList();
-      if (uriBasedDirective_uriElement != 0)
-        _result["uriBasedDirective_uriElement"] = uriBasedDirective_uriElement;
       if (importDirective_prefix != '')
         _result["importDirective_prefix"] = importDirective_prefix;
+      if (informativeId != 0) _result["informativeId"] = informativeId;
       if (uriBasedDirective_uri != null)
         _result["uriBasedDirective_uri"] = uriBasedDirective_uri.toJson();
       if (namespaceDirective_selectedUri != '')
@@ -14292,6 +13798,8 @@
             namespaceDirective_selectedUri;
       if (uriBasedDirective_uriContent != '')
         _result["uriBasedDirective_uriContent"] = uriBasedDirective_uriContent;
+      if (uriBasedDirective_uriElement != 0)
+        _result["uriBasedDirective_uriElement"] = uriBasedDirective_uriElement;
     }
     if (kind == idl.LinkedNodeKind.indexExpression) {
       if (indexExpression_index != null)
@@ -14352,15 +13860,12 @@
             labeledStatement_statement.toJson();
     }
     if (kind == idl.LinkedNodeKind.libraryDirective) {
-      if (annotatedNode_comment != null)
-        _result["annotatedNode_comment"] = annotatedNode_comment.toJson();
       if (annotatedNode_metadata.isNotEmpty)
         _result["annotatedNode_metadata"] =
             annotatedNode_metadata.map((_value) => _value.toJson()).toList();
       if (libraryDirective_name != null)
         _result["libraryDirective_name"] = libraryDirective_name.toJson();
-      if (directive_keywordOffset != 0)
-        _result["directive_keywordOffset"] = directive_keywordOffset;
+      if (informativeId != 0) _result["informativeId"] = informativeId;
     }
     if (kind == idl.LinkedNodeKind.libraryIdentifier) {
       if (libraryIdentifier_components.isNotEmpty)
@@ -14388,8 +13893,6 @@
     if (kind == idl.LinkedNodeKind.methodDeclaration) {
       if (actualReturnType != null)
         _result["actualReturnType"] = actualReturnType.toJson();
-      if (annotatedNode_comment != null)
-        _result["annotatedNode_comment"] = annotatedNode_comment.toJson();
       if (annotatedNode_metadata.isNotEmpty)
         _result["annotatedNode_metadata"] =
             annotatedNode_metadata.map((_value) => _value.toJson()).toList();
@@ -14404,10 +13907,7 @@
       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();
+      if (informativeId != 0) _result["informativeId"] = informativeId;
     }
     if (kind == idl.LinkedNodeKind.methodInvocation) {
       if (invocationExpression_invokeType != null)
@@ -14428,8 +13928,6 @@
             invocationExpression_arguments.toJson();
     }
     if (kind == idl.LinkedNodeKind.mixinDeclaration) {
-      if (annotatedNode_comment != null)
-        _result["annotatedNode_comment"] = annotatedNode_comment.toJson();
       if (annotatedNode_metadata.isNotEmpty)
         _result["annotatedNode_metadata"] =
             annotatedNode_metadata.map((_value) => _value.toJson()).toList();
@@ -14447,11 +13945,7 @@
       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();
+      if (informativeId != 0) _result["informativeId"] = informativeId;
       if (mixinDeclaration_superInvokedNames.isNotEmpty)
         _result["mixinDeclaration_superInvokedNames"] =
             mixinDeclaration_superInvokedNames;
@@ -14495,23 +13989,18 @@
         _result["expression_type"] = expression_type.toJson();
     }
     if (kind == idl.LinkedNodeKind.partDirective) {
-      if (annotatedNode_comment != null)
-        _result["annotatedNode_comment"] = annotatedNode_comment.toJson();
       if (annotatedNode_metadata.isNotEmpty)
         _result["annotatedNode_metadata"] =
             annotatedNode_metadata.map((_value) => _value.toJson()).toList();
-      if (directive_keywordOffset != 0)
-        _result["directive_keywordOffset"] = directive_keywordOffset;
-      if (uriBasedDirective_uriElement != 0)
-        _result["uriBasedDirective_uriElement"] = uriBasedDirective_uriElement;
+      if (informativeId != 0) _result["informativeId"] = informativeId;
       if (uriBasedDirective_uri != null)
         _result["uriBasedDirective_uri"] = uriBasedDirective_uri.toJson();
       if (uriBasedDirective_uriContent != '')
         _result["uriBasedDirective_uriContent"] = uriBasedDirective_uriContent;
+      if (uriBasedDirective_uriElement != 0)
+        _result["uriBasedDirective_uriElement"] = uriBasedDirective_uriElement;
     }
     if (kind == idl.LinkedNodeKind.partOfDirective) {
-      if (annotatedNode_comment != null)
-        _result["annotatedNode_comment"] = annotatedNode_comment.toJson();
       if (annotatedNode_metadata.isNotEmpty)
         _result["annotatedNode_metadata"] =
             annotatedNode_metadata.map((_value) => _value.toJson()).toList();
@@ -14520,8 +14009,7 @@
             partOfDirective_libraryName.toJson();
       if (partOfDirective_uri != null)
         _result["partOfDirective_uri"] = partOfDirective_uri.toJson();
-      if (directive_keywordOffset != 0)
-        _result["directive_keywordOffset"] = directive_keywordOffset;
+      if (informativeId != 0) _result["informativeId"] = informativeId;
     }
     if (kind == idl.LinkedNodeKind.postfixExpression) {
       if (postfixExpression_operand != null)
@@ -14623,14 +14111,7 @@
             simpleFormalParameter_type.toJson();
       if (inheritsCovariant != false)
         _result["inheritsCovariant"] = inheritsCovariant;
-      if (normalFormalParameter_identifier != null)
-        _result["normalFormalParameter_identifier"] =
-            normalFormalParameter_identifier.toJson();
-      if (codeLength != 0) _result["codeLength"] = codeLength;
-      if (codeOffset != 0) _result["codeOffset"] = codeOffset;
-      if (normalFormalParameter_comment != null)
-        _result["normalFormalParameter_comment"] =
-            normalFormalParameter_comment.toJson();
+      if (informativeId != 0) _result["informativeId"] = informativeId;
       if (topLevelTypeInferenceError != null)
         _result["topLevelTypeInferenceError"] =
             topLevelTypeInferenceError.toJson();
@@ -14643,10 +14124,6 @@
         _result["simpleIdentifier_element"] = simpleIdentifier_element;
       if (expression_type != null)
         _result["expression_type"] = expression_type.toJson();
-      if (simpleIdentifier_offset != 0)
-        _result["simpleIdentifier_offset"] = simpleIdentifier_offset;
-      if (simpleIdentifier_name != '')
-        _result["simpleIdentifier_name"] = simpleIdentifier_name;
     }
     if (kind == idl.LinkedNodeKind.simpleStringLiteral) {
       if (simpleStringLiteral_value != '')
@@ -14726,14 +14203,13 @@
         _result["expression_type"] = expression_type.toJson();
     }
     if (kind == idl.LinkedNodeKind.topLevelVariableDeclaration) {
-      if (annotatedNode_comment != null)
-        _result["annotatedNode_comment"] = annotatedNode_comment.toJson();
       if (annotatedNode_metadata.isNotEmpty)
         _result["annotatedNode_metadata"] =
             annotatedNode_metadata.map((_value) => _value.toJson()).toList();
       if (topLevelVariableDeclaration_variableList != null)
         _result["topLevelVariableDeclaration_variableList"] =
             topLevelVariableDeclaration_variableList.toJson();
+      if (informativeId != 0) _result["informativeId"] = informativeId;
     }
     if (kind == idl.LinkedNodeKind.tryStatement) {
       if (tryStatement_catchClauses.isNotEmpty)
@@ -14761,20 +14237,15 @@
         _result["typeName_type"] = typeName_type.toJson();
     }
     if (kind == idl.LinkedNodeKind.typeParameter) {
-      if (annotatedNode_comment != null)
-        _result["annotatedNode_comment"] = annotatedNode_comment.toJson();
       if (annotatedNode_metadata.isNotEmpty)
         _result["annotatedNode_metadata"] =
             annotatedNode_metadata.map((_value) => _value.toJson()).toList();
       if (typeParameter_bound != null)
         _result["typeParameter_bound"] = typeParameter_bound.toJson();
-      if (typeParameter_name != null)
-        _result["typeParameter_name"] = typeParameter_name.toJson();
       if (typeParameter_defaultType != null)
         _result["typeParameter_defaultType"] =
             typeParameter_defaultType.toJson();
-      if (codeLength != 0) _result["codeLength"] = codeLength;
-      if (codeOffset != 0) _result["codeOffset"] = codeOffset;
+      if (informativeId != 0) _result["informativeId"] = informativeId;
     }
     if (kind == idl.LinkedNodeKind.typeParameterList) {
       if (typeParameterList_typeParameters.isNotEmpty)
@@ -14785,20 +14256,15 @@
     }
     if (kind == idl.LinkedNodeKind.variableDeclaration) {
       if (actualType != null) _result["actualType"] = actualType.toJson();
-      if (annotatedNode_comment != null)
-        _result["annotatedNode_comment"] = annotatedNode_comment.toJson();
       if (annotatedNode_metadata.isNotEmpty)
         _result["annotatedNode_metadata"] =
             annotatedNode_metadata.map((_value) => _value.toJson()).toList();
       if (variableDeclaration_initializer != null)
         _result["variableDeclaration_initializer"] =
             variableDeclaration_initializer.toJson();
-      if (variableDeclaration_name != null)
-        _result["variableDeclaration_name"] = variableDeclaration_name.toJson();
       if (inheritsCovariant != false)
         _result["inheritsCovariant"] = inheritsCovariant;
-      if (codeLength != 0) _result["codeLength"] = codeLength;
-      if (codeOffset != 0) _result["codeOffset"] = codeOffset;
+      if (informativeId != 0) _result["informativeId"] = informativeId;
       if (topLevelTypeInferenceError != null)
         _result["topLevelTypeInferenceError"] =
             topLevelTypeInferenceError.toJson();
@@ -14809,14 +14275,13 @@
             variableDeclarationList_variables
                 .map((_value) => _value.toJson())
                 .toList();
-      if (annotatedNode_comment != null)
-        _result["annotatedNode_comment"] = annotatedNode_comment.toJson();
       if (annotatedNode_metadata.isNotEmpty)
         _result["annotatedNode_metadata"] =
             annotatedNode_metadata.map((_value) => _value.toJson()).toList();
       if (variableDeclarationList_type != null)
         _result["variableDeclarationList_type"] =
             variableDeclarationList_type.toJson();
+      if (informativeId != 0) _result["informativeId"] = informativeId;
     }
     if (kind == idl.LinkedNodeKind.variableDeclarationStatement) {
       if (variableDeclarationStatement_variables != null)
@@ -14849,6 +14314,7 @@
         "adjacentStrings_strings": adjacentStrings_strings,
         "flags": flags,
         "kind": kind,
+        "name": name,
       };
     }
     if (kind == idl.LinkedNodeKind.annotation) {
@@ -14860,6 +14326,7 @@
         "annotation_name": annotation_name,
         "flags": flags,
         "kind": kind,
+        "name": name,
       };
     }
     if (kind == idl.LinkedNodeKind.argumentList) {
@@ -14867,6 +14334,7 @@
         "argumentList_arguments": argumentList_arguments,
         "flags": flags,
         "kind": kind,
+        "name": name,
       };
     }
     if (kind == idl.LinkedNodeKind.asExpression) {
@@ -14876,6 +14344,7 @@
         "expression_type": expression_type,
         "flags": flags,
         "kind": kind,
+        "name": name,
       };
     }
     if (kind == idl.LinkedNodeKind.assertInitializer) {
@@ -14884,6 +14353,7 @@
         "assertInitializer_message": assertInitializer_message,
         "flags": flags,
         "kind": kind,
+        "name": name,
       };
     }
     if (kind == idl.LinkedNodeKind.assertStatement) {
@@ -14892,6 +14362,7 @@
         "assertStatement_message": assertStatement_message,
         "flags": flags,
         "kind": kind,
+        "name": name,
       };
     }
     if (kind == idl.LinkedNodeKind.assignmentExpression) {
@@ -14905,6 +14376,7 @@
         "expression_type": expression_type,
         "flags": flags,
         "kind": kind,
+        "name": name,
       };
     }
     if (kind == idl.LinkedNodeKind.awaitExpression) {
@@ -14913,6 +14385,7 @@
         "expression_type": expression_type,
         "flags": flags,
         "kind": kind,
+        "name": name,
       };
     }
     if (kind == idl.LinkedNodeKind.binaryExpression) {
@@ -14926,6 +14399,7 @@
         "expression_type": expression_type,
         "flags": flags,
         "kind": kind,
+        "name": name,
       };
     }
     if (kind == idl.LinkedNodeKind.block) {
@@ -14933,6 +14407,7 @@
         "block_statements": block_statements,
         "flags": flags,
         "kind": kind,
+        "name": name,
       };
     }
     if (kind == idl.LinkedNodeKind.blockFunctionBody) {
@@ -14940,6 +14415,7 @@
         "blockFunctionBody_block": blockFunctionBody_block,
         "flags": flags,
         "kind": kind,
+        "name": name,
       };
     }
     if (kind == idl.LinkedNodeKind.booleanLiteral) {
@@ -14947,6 +14423,7 @@
         "booleanLiteral_value": booleanLiteral_value,
         "flags": flags,
         "kind": kind,
+        "name": name,
       };
     }
     if (kind == idl.LinkedNodeKind.breakStatement) {
@@ -14954,6 +14431,7 @@
         "breakStatement_label": breakStatement_label,
         "flags": flags,
         "kind": kind,
+        "name": name,
       };
     }
     if (kind == idl.LinkedNodeKind.cascadeExpression) {
@@ -14963,6 +14441,7 @@
         "expression_type": expression_type,
         "flags": flags,
         "kind": kind,
+        "name": name,
       };
     }
     if (kind == idl.LinkedNodeKind.catchClause) {
@@ -14973,11 +14452,11 @@
         "catchClause_stackTraceParameter": catchClause_stackTraceParameter,
         "flags": flags,
         "kind": kind,
+        "name": name,
       };
     }
     if (kind == idl.LinkedNodeKind.classDeclaration) {
       return {
-        "annotatedNode_comment": annotatedNode_comment,
         "annotatedNode_metadata": annotatedNode_metadata,
         "classDeclaration_extendsClause": classDeclaration_extendsClause,
         "classDeclaration_withClause": classDeclaration_withClause,
@@ -14988,27 +14467,25 @@
         "classOrMixinDeclaration_members": classOrMixinDeclaration_members,
         "classOrMixinDeclaration_typeParameters":
             classOrMixinDeclaration_typeParameters,
-        "codeLength": codeLength,
-        "codeOffset": codeOffset,
-        "namedCompilationUnitMember_name": namedCompilationUnitMember_name,
         "flags": flags,
+        "informativeId": informativeId,
         "kind": kind,
+        "name": name,
         "simplyBoundable_isSimplyBounded": simplyBoundable_isSimplyBounded,
+        "unused11": unused11,
       };
     }
     if (kind == idl.LinkedNodeKind.classTypeAlias) {
       return {
-        "annotatedNode_comment": annotatedNode_comment,
         "annotatedNode_metadata": annotatedNode_metadata,
         "classTypeAlias_typeParameters": classTypeAlias_typeParameters,
         "classTypeAlias_superclass": classTypeAlias_superclass,
         "classTypeAlias_withClause": classTypeAlias_withClause,
         "classTypeAlias_implementsClause": classTypeAlias_implementsClause,
-        "codeLength": codeLength,
-        "codeOffset": codeOffset,
-        "namedCompilationUnitMember_name": namedCompilationUnitMember_name,
         "flags": flags,
+        "informativeId": informativeId,
         "kind": kind,
+        "name": name,
         "simplyBoundable_isSimplyBounded": simplyBoundable_isSimplyBounded,
       };
     }
@@ -15019,6 +14496,7 @@
         "comment_type": comment_type,
         "flags": flags,
         "kind": kind,
+        "name": name,
       };
     }
     if (kind == idl.LinkedNodeKind.commentReference) {
@@ -15026,17 +14504,18 @@
         "commentReference_identifier": commentReference_identifier,
         "flags": flags,
         "kind": kind,
+        "name": name,
       };
     }
     if (kind == idl.LinkedNodeKind.compilationUnit) {
       return {
         "compilationUnit_declarations": compilationUnit_declarations,
         "compilationUnit_scriptTag": compilationUnit_scriptTag,
-        "codeLength": codeLength,
-        "codeOffset": codeOffset,
         "compilationUnit_directives": compilationUnit_directives,
         "flags": flags,
+        "informativeId": informativeId,
         "kind": kind,
+        "name": name,
       };
     }
     if (kind == idl.LinkedNodeKind.conditionalExpression) {
@@ -15049,6 +14528,7 @@
         "expression_type": expression_type,
         "flags": flags,
         "kind": kind,
+        "name": name,
       };
     }
     if (kind == idl.LinkedNodeKind.configuration) {
@@ -15058,26 +14538,23 @@
         "configuration_uri": configuration_uri,
         "flags": flags,
         "kind": kind,
+        "name": name,
       };
     }
     if (kind == idl.LinkedNodeKind.constructorDeclaration) {
       return {
         "constructorDeclaration_initializers":
             constructorDeclaration_initializers,
-        "annotatedNode_comment": annotatedNode_comment,
         "annotatedNode_metadata": annotatedNode_metadata,
         "constructorDeclaration_body": constructorDeclaration_body,
-        "constructorDeclaration_name": constructorDeclaration_name,
         "constructorDeclaration_parameters": constructorDeclaration_parameters,
         "constructorDeclaration_redirectedConstructor":
             constructorDeclaration_redirectedConstructor,
-        "codeLength": codeLength,
-        "codeOffset": codeOffset,
-        "constructorDeclaration_periodOffset":
-            constructorDeclaration_periodOffset,
         "constructorDeclaration_returnType": constructorDeclaration_returnType,
         "flags": flags,
+        "informativeId": informativeId,
         "kind": kind,
+        "name": name,
       };
     }
     if (kind == idl.LinkedNodeKind.constructorFieldInitializer) {
@@ -15088,6 +14565,7 @@
             constructorFieldInitializer_fieldName,
         "flags": flags,
         "kind": kind,
+        "name": name,
       };
     }
     if (kind == idl.LinkedNodeKind.constructorName) {
@@ -15098,6 +14576,7 @@
         "constructorName_element": constructorName_element,
         "flags": flags,
         "kind": kind,
+        "name": name,
       };
     }
     if (kind == idl.LinkedNodeKind.continueStatement) {
@@ -15105,16 +14584,17 @@
         "continueStatement_label": continueStatement_label,
         "flags": flags,
         "kind": kind,
+        "name": name,
       };
     }
     if (kind == idl.LinkedNodeKind.declaredIdentifier) {
       return {
-        "annotatedNode_comment": annotatedNode_comment,
         "annotatedNode_metadata": annotatedNode_metadata,
         "declaredIdentifier_identifier": declaredIdentifier_identifier,
         "declaredIdentifier_type": declaredIdentifier_type,
         "flags": flags,
         "kind": kind,
+        "name": name,
       };
     }
     if (kind == idl.LinkedNodeKind.defaultFormalParameter) {
@@ -15122,11 +14602,11 @@
         "defaultFormalParameter_defaultValue":
             defaultFormalParameter_defaultValue,
         "defaultFormalParameter_parameter": defaultFormalParameter_parameter,
-        "codeLength": codeLength,
-        "codeOffset": codeOffset,
         "defaultFormalParameter_kind": defaultFormalParameter_kind,
         "flags": flags,
+        "informativeId": informativeId,
         "kind": kind,
+        "name": name,
       };
     }
     if (kind == idl.LinkedNodeKind.doStatement) {
@@ -15135,6 +14615,7 @@
         "doStatement_condition": doStatement_condition,
         "flags": flags,
         "kind": kind,
+        "name": name,
       };
     }
     if (kind == idl.LinkedNodeKind.dottedName) {
@@ -15142,6 +14623,7 @@
         "dottedName_components": dottedName_components,
         "flags": flags,
         "kind": kind,
+        "name": name,
       };
     }
     if (kind == idl.LinkedNodeKind.doubleLiteral) {
@@ -15149,6 +14631,7 @@
         "doubleLiteral_value": doubleLiteral_value,
         "flags": flags,
         "kind": kind,
+        "name": name,
       };
     }
     if (kind == idl.LinkedNodeKind.emptyFunctionBody) {
@@ -15156,6 +14639,7 @@
         "emptyFunctionBody_fake": emptyFunctionBody_fake,
         "flags": flags,
         "kind": kind,
+        "name": name,
       };
     }
     if (kind == idl.LinkedNodeKind.emptyStatement) {
@@ -15163,42 +14647,41 @@
         "emptyStatement_fake": emptyStatement_fake,
         "flags": flags,
         "kind": kind,
+        "name": name,
       };
     }
     if (kind == idl.LinkedNodeKind.enumConstantDeclaration) {
       return {
-        "annotatedNode_comment": annotatedNode_comment,
         "annotatedNode_metadata": annotatedNode_metadata,
-        "enumConstantDeclaration_name": enumConstantDeclaration_name,
         "flags": flags,
+        "informativeId": informativeId,
         "kind": kind,
+        "name": name,
       };
     }
     if (kind == idl.LinkedNodeKind.enumDeclaration) {
       return {
         "enumDeclaration_constants": enumDeclaration_constants,
-        "annotatedNode_comment": annotatedNode_comment,
         "annotatedNode_metadata": annotatedNode_metadata,
-        "codeLength": codeLength,
-        "codeOffset": codeOffset,
-        "namedCompilationUnitMember_name": namedCompilationUnitMember_name,
         "flags": flags,
+        "informativeId": informativeId,
         "kind": kind,
+        "name": name,
       };
     }
     if (kind == idl.LinkedNodeKind.exportDirective) {
       return {
         "namespaceDirective_combinators": namespaceDirective_combinators,
-        "annotatedNode_comment": annotatedNode_comment,
         "annotatedNode_metadata": annotatedNode_metadata,
-        "directive_keywordOffset": directive_keywordOffset,
         "namespaceDirective_configurations": namespaceDirective_configurations,
-        "uriBasedDirective_uriElement": uriBasedDirective_uriElement,
         "flags": flags,
+        "informativeId": informativeId,
         "uriBasedDirective_uri": uriBasedDirective_uri,
         "kind": kind,
+        "name": name,
         "namespaceDirective_selectedUri": namespaceDirective_selectedUri,
         "uriBasedDirective_uriContent": uriBasedDirective_uriContent,
+        "uriBasedDirective_uriElement": uriBasedDirective_uriElement,
       };
     }
     if (kind == idl.LinkedNodeKind.expressionFunctionBody) {
@@ -15206,6 +14689,7 @@
         "expressionFunctionBody_expression": expressionFunctionBody_expression,
         "flags": flags,
         "kind": kind,
+        "name": name,
       };
     }
     if (kind == idl.LinkedNodeKind.expressionStatement) {
@@ -15213,6 +14697,7 @@
         "expressionStatement_expression": expressionStatement_expression,
         "flags": flags,
         "kind": kind,
+        "name": name,
       };
     }
     if (kind == idl.LinkedNodeKind.extendsClause) {
@@ -15220,15 +14705,17 @@
         "extendsClause_superclass": extendsClause_superclass,
         "flags": flags,
         "kind": kind,
+        "name": name,
       };
     }
     if (kind == idl.LinkedNodeKind.fieldDeclaration) {
       return {
-        "annotatedNode_comment": annotatedNode_comment,
         "annotatedNode_metadata": annotatedNode_metadata,
         "fieldDeclaration_fields": fieldDeclaration_fields,
         "flags": flags,
+        "informativeId": informativeId,
         "kind": kind,
+        "name": name,
       };
     }
     if (kind == idl.LinkedNodeKind.fieldFormalParameter) {
@@ -15241,12 +14728,10 @@
         "fieldFormalParameter_formalParameters":
             fieldFormalParameter_formalParameters,
         "inheritsCovariant": inheritsCovariant,
-        "normalFormalParameter_identifier": normalFormalParameter_identifier,
-        "codeLength": codeLength,
-        "codeOffset": codeOffset,
         "flags": flags,
-        "normalFormalParameter_comment": normalFormalParameter_comment,
+        "informativeId": informativeId,
         "kind": kind,
+        "name": name,
       };
     }
     if (kind == idl.LinkedNodeKind.forEachPartsWithDeclaration) {
@@ -15256,6 +14741,7 @@
             forEachPartsWithDeclaration_loopVariable,
         "flags": flags,
         "kind": kind,
+        "name": name,
       };
     }
     if (kind == idl.LinkedNodeKind.forEachPartsWithIdentifier) {
@@ -15265,6 +14751,7 @@
             forEachPartsWithIdentifier_identifier,
         "flags": flags,
         "kind": kind,
+        "name": name,
       };
     }
     if (kind == idl.LinkedNodeKind.forElement) {
@@ -15273,6 +14760,7 @@
         "forElement_body": forElement_body,
         "flags": flags,
         "kind": kind,
+        "name": name,
       };
     }
     if (kind == idl.LinkedNodeKind.forPartsWithDeclarations) {
@@ -15283,6 +14771,7 @@
         "forParts_updaters": forParts_updaters,
         "flags": flags,
         "kind": kind,
+        "name": name,
       };
     }
     if (kind == idl.LinkedNodeKind.forPartsWithExpression) {
@@ -15293,6 +14782,7 @@
         "forParts_updaters": forParts_updaters,
         "flags": flags,
         "kind": kind,
+        "name": name,
       };
     }
     if (kind == idl.LinkedNodeKind.forStatement) {
@@ -15301,6 +14791,7 @@
         "forStatement_body": forStatement_body,
         "flags": flags,
         "kind": kind,
+        "name": name,
       };
     }
     if (kind == idl.LinkedNodeKind.formalParameterList) {
@@ -15308,21 +14799,20 @@
         "formalParameterList_parameters": formalParameterList_parameters,
         "flags": flags,
         "kind": kind,
+        "name": name,
       };
     }
     if (kind == idl.LinkedNodeKind.functionDeclaration) {
       return {
         "actualReturnType": actualReturnType,
-        "annotatedNode_comment": annotatedNode_comment,
         "annotatedNode_metadata": annotatedNode_metadata,
         "functionDeclaration_functionExpression":
             functionDeclaration_functionExpression,
         "functionDeclaration_returnType": functionDeclaration_returnType,
-        "codeLength": codeLength,
-        "codeOffset": codeOffset,
-        "namedCompilationUnitMember_name": namedCompilationUnitMember_name,
         "flags": flags,
+        "informativeId": informativeId,
         "kind": kind,
+        "name": name,
       };
     }
     if (kind == idl.LinkedNodeKind.functionDeclarationStatement) {
@@ -15331,6 +14821,7 @@
             functionDeclarationStatement_functionDeclaration,
         "flags": flags,
         "kind": kind,
+        "name": name,
       };
     }
     if (kind == idl.LinkedNodeKind.functionExpression) {
@@ -15342,6 +14833,7 @@
         "functionExpression_typeParameters": functionExpression_typeParameters,
         "flags": flags,
         "kind": kind,
+        "name": name,
       };
     }
     if (kind == idl.LinkedNodeKind.functionExpressionInvocation) {
@@ -15355,23 +14847,22 @@
         "flags": flags,
         "invocationExpression_arguments": invocationExpression_arguments,
         "kind": kind,
+        "name": name,
       };
     }
     if (kind == idl.LinkedNodeKind.functionTypeAlias) {
       return {
         "actualReturnType": actualReturnType,
-        "annotatedNode_comment": annotatedNode_comment,
         "annotatedNode_metadata": annotatedNode_metadata,
         "functionTypeAlias_formalParameters":
             functionTypeAlias_formalParameters,
         "functionTypeAlias_returnType": functionTypeAlias_returnType,
         "functionTypeAlias_typeParameters": functionTypeAlias_typeParameters,
         "typeAlias_hasSelfReference": typeAlias_hasSelfReference,
-        "codeLength": codeLength,
-        "codeOffset": codeOffset,
-        "namedCompilationUnitMember_name": namedCompilationUnitMember_name,
         "flags": flags,
+        "informativeId": informativeId,
         "kind": kind,
+        "name": name,
         "simplyBoundable_isSimplyBounded": simplyBoundable_isSimplyBounded,
       };
     }
@@ -15386,12 +14877,10 @@
         "functionTypedFormalParameter_typeParameters":
             functionTypedFormalParameter_typeParameters,
         "inheritsCovariant": inheritsCovariant,
-        "normalFormalParameter_identifier": normalFormalParameter_identifier,
-        "codeLength": codeLength,
-        "codeOffset": codeOffset,
         "flags": flags,
-        "normalFormalParameter_comment": normalFormalParameter_comment,
+        "informativeId": informativeId,
         "kind": kind,
+        "name": name,
       };
     }
     if (kind == idl.LinkedNodeKind.genericFunctionType) {
@@ -15406,20 +14895,19 @@
         "genericFunctionType_type": genericFunctionType_type,
         "flags": flags,
         "kind": kind,
+        "name": name,
       };
     }
     if (kind == idl.LinkedNodeKind.genericTypeAlias) {
       return {
-        "annotatedNode_comment": annotatedNode_comment,
         "annotatedNode_metadata": annotatedNode_metadata,
         "genericTypeAlias_typeParameters": genericTypeAlias_typeParameters,
         "genericTypeAlias_functionType": genericTypeAlias_functionType,
         "typeAlias_hasSelfReference": typeAlias_hasSelfReference,
-        "codeLength": codeLength,
-        "codeOffset": codeOffset,
-        "namedCompilationUnitMember_name": namedCompilationUnitMember_name,
         "flags": flags,
+        "informativeId": informativeId,
         "kind": kind,
+        "name": name,
         "simplyBoundable_isSimplyBounded": simplyBoundable_isSimplyBounded,
       };
     }
@@ -15428,6 +14916,7 @@
         "flags": flags,
         "kind": kind,
         "names": names,
+        "name": name,
       };
     }
     if (kind == idl.LinkedNodeKind.ifElement) {
@@ -15437,6 +14926,7 @@
         "ifElement_elseElement": ifElement_elseElement,
         "flags": flags,
         "kind": kind,
+        "name": name,
       };
     }
     if (kind == idl.LinkedNodeKind.ifStatement) {
@@ -15446,6 +14936,7 @@
         "ifStatement_thenStatement": ifStatement_thenStatement,
         "flags": flags,
         "kind": kind,
+        "name": name,
       };
     }
     if (kind == idl.LinkedNodeKind.implementsClause) {
@@ -15453,23 +14944,24 @@
         "implementsClause_interfaces": implementsClause_interfaces,
         "flags": flags,
         "kind": kind,
+        "name": name,
       };
     }
     if (kind == idl.LinkedNodeKind.importDirective) {
       return {
         "namespaceDirective_combinators": namespaceDirective_combinators,
-        "annotatedNode_comment": annotatedNode_comment,
         "annotatedNode_metadata": annotatedNode_metadata,
-        "directive_keywordOffset": directive_keywordOffset,
         "importDirective_prefixOffset": importDirective_prefixOffset,
         "namespaceDirective_configurations": namespaceDirective_configurations,
-        "uriBasedDirective_uriElement": uriBasedDirective_uriElement,
         "flags": flags,
         "importDirective_prefix": importDirective_prefix,
+        "informativeId": informativeId,
         "uriBasedDirective_uri": uriBasedDirective_uri,
         "kind": kind,
+        "name": name,
         "namespaceDirective_selectedUri": namespaceDirective_selectedUri,
         "uriBasedDirective_uriContent": uriBasedDirective_uriContent,
+        "uriBasedDirective_uriElement": uriBasedDirective_uriElement,
       };
     }
     if (kind == idl.LinkedNodeKind.indexExpression) {
@@ -15481,6 +14973,7 @@
         "expression_type": expression_type,
         "flags": flags,
         "kind": kind,
+        "name": name,
       };
     }
     if (kind == idl.LinkedNodeKind.instanceCreationExpression) {
@@ -15494,6 +14987,7 @@
         "expression_type": expression_type,
         "flags": flags,
         "kind": kind,
+        "name": name,
       };
     }
     if (kind == idl.LinkedNodeKind.integerLiteral) {
@@ -15501,6 +14995,7 @@
         "flags": flags,
         "integerLiteral_value": integerLiteral_value,
         "kind": kind,
+        "name": name,
       };
     }
     if (kind == idl.LinkedNodeKind.interpolationExpression) {
@@ -15509,6 +15004,7 @@
             interpolationExpression_expression,
         "flags": flags,
         "kind": kind,
+        "name": name,
       };
     }
     if (kind == idl.LinkedNodeKind.interpolationString) {
@@ -15516,6 +15012,7 @@
         "flags": flags,
         "interpolationString_value": interpolationString_value,
         "kind": kind,
+        "name": name,
       };
     }
     if (kind == idl.LinkedNodeKind.isExpression) {
@@ -15524,6 +15021,7 @@
         "isExpression_type": isExpression_type,
         "flags": flags,
         "kind": kind,
+        "name": name,
       };
     }
     if (kind == idl.LinkedNodeKind.label) {
@@ -15531,6 +15029,7 @@
         "label_label": label_label,
         "flags": flags,
         "kind": kind,
+        "name": name,
       };
     }
     if (kind == idl.LinkedNodeKind.labeledStatement) {
@@ -15539,16 +15038,17 @@
         "labeledStatement_statement": labeledStatement_statement,
         "flags": flags,
         "kind": kind,
+        "name": name,
       };
     }
     if (kind == idl.LinkedNodeKind.libraryDirective) {
       return {
-        "annotatedNode_comment": annotatedNode_comment,
         "annotatedNode_metadata": annotatedNode_metadata,
         "libraryDirective_name": libraryDirective_name,
-        "directive_keywordOffset": directive_keywordOffset,
         "flags": flags,
+        "informativeId": informativeId,
         "kind": kind,
+        "name": name,
       };
     }
     if (kind == idl.LinkedNodeKind.libraryIdentifier) {
@@ -15556,6 +15056,7 @@
         "libraryIdentifier_components": libraryIdentifier_components,
         "flags": flags,
         "kind": kind,
+        "name": name,
       };
     }
     if (kind == idl.LinkedNodeKind.listLiteral) {
@@ -15565,6 +15066,7 @@
         "expression_type": expression_type,
         "flags": flags,
         "kind": kind,
+        "name": name,
       };
     }
     if (kind == idl.LinkedNodeKind.mapLiteralEntry) {
@@ -15573,23 +15075,22 @@
         "mapLiteralEntry_value": mapLiteralEntry_value,
         "flags": flags,
         "kind": kind,
+        "name": name,
       };
     }
     if (kind == idl.LinkedNodeKind.methodDeclaration) {
       return {
         "actualReturnType": actualReturnType,
-        "annotatedNode_comment": annotatedNode_comment,
         "annotatedNode_metadata": annotatedNode_metadata,
         "methodDeclaration_body": methodDeclaration_body,
         "methodDeclaration_formalParameters":
             methodDeclaration_formalParameters,
         "methodDeclaration_returnType": methodDeclaration_returnType,
         "methodDeclaration_typeParameters": methodDeclaration_typeParameters,
-        "codeLength": codeLength,
-        "codeOffset": codeOffset,
-        "methodDeclaration_name": methodDeclaration_name,
         "flags": flags,
+        "informativeId": informativeId,
         "kind": kind,
+        "name": name,
       };
     }
     if (kind == idl.LinkedNodeKind.methodInvocation) {
@@ -15603,11 +15104,11 @@
         "flags": flags,
         "invocationExpression_arguments": invocationExpression_arguments,
         "kind": kind,
+        "name": name,
       };
     }
     if (kind == idl.LinkedNodeKind.mixinDeclaration) {
       return {
-        "annotatedNode_comment": annotatedNode_comment,
         "annotatedNode_metadata": annotatedNode_metadata,
         "mixinDeclaration_onClause": mixinDeclaration_onClause,
         "classOrMixinDeclaration_implementsClause":
@@ -15615,13 +15116,12 @@
         "classOrMixinDeclaration_members": classOrMixinDeclaration_members,
         "classOrMixinDeclaration_typeParameters":
             classOrMixinDeclaration_typeParameters,
-        "codeLength": codeLength,
-        "codeOffset": codeOffset,
-        "namedCompilationUnitMember_name": namedCompilationUnitMember_name,
         "flags": flags,
+        "informativeId": informativeId,
         "kind": kind,
         "mixinDeclaration_superInvokedNames":
             mixinDeclaration_superInvokedNames,
+        "name": name,
         "simplyBoundable_isSimplyBounded": simplyBoundable_isSimplyBounded,
       };
     }
@@ -15631,6 +15131,7 @@
         "namedExpression_name": namedExpression_name,
         "flags": flags,
         "kind": kind,
+        "name": name,
       };
     }
     if (kind == idl.LinkedNodeKind.nativeClause) {
@@ -15638,6 +15139,7 @@
         "nativeClause_name": nativeClause_name,
         "flags": flags,
         "kind": kind,
+        "name": name,
       };
     }
     if (kind == idl.LinkedNodeKind.nativeFunctionBody) {
@@ -15645,6 +15147,7 @@
         "nativeFunctionBody_stringLiteral": nativeFunctionBody_stringLiteral,
         "flags": flags,
         "kind": kind,
+        "name": name,
       };
     }
     if (kind == idl.LinkedNodeKind.nullLiteral) {
@@ -15653,6 +15156,7 @@
         "expression_type": expression_type,
         "flags": flags,
         "kind": kind,
+        "name": name,
       };
     }
     if (kind == idl.LinkedNodeKind.onClause) {
@@ -15660,6 +15164,7 @@
         "onClause_superclassConstraints": onClause_superclassConstraints,
         "flags": flags,
         "kind": kind,
+        "name": name,
       };
     }
     if (kind == idl.LinkedNodeKind.parenthesizedExpression) {
@@ -15669,29 +15174,30 @@
         "expression_type": expression_type,
         "flags": flags,
         "kind": kind,
+        "name": name,
       };
     }
     if (kind == idl.LinkedNodeKind.partDirective) {
       return {
-        "annotatedNode_comment": annotatedNode_comment,
         "annotatedNode_metadata": annotatedNode_metadata,
-        "directive_keywordOffset": directive_keywordOffset,
-        "uriBasedDirective_uriElement": uriBasedDirective_uriElement,
         "flags": flags,
+        "informativeId": informativeId,
         "uriBasedDirective_uri": uriBasedDirective_uri,
         "kind": kind,
+        "name": name,
         "uriBasedDirective_uriContent": uriBasedDirective_uriContent,
+        "uriBasedDirective_uriElement": uriBasedDirective_uriElement,
       };
     }
     if (kind == idl.LinkedNodeKind.partOfDirective) {
       return {
-        "annotatedNode_comment": annotatedNode_comment,
         "annotatedNode_metadata": annotatedNode_metadata,
         "partOfDirective_libraryName": partOfDirective_libraryName,
         "partOfDirective_uri": partOfDirective_uri,
-        "directive_keywordOffset": directive_keywordOffset,
         "flags": flags,
+        "informativeId": informativeId,
         "kind": kind,
+        "name": name,
       };
     }
     if (kind == idl.LinkedNodeKind.postfixExpression) {
@@ -15703,6 +15209,7 @@
         "expression_type": expression_type,
         "flags": flags,
         "kind": kind,
+        "name": name,
       };
     }
     if (kind == idl.LinkedNodeKind.prefixExpression) {
@@ -15714,6 +15221,7 @@
         "expression_type": expression_type,
         "flags": flags,
         "kind": kind,
+        "name": name,
       };
     }
     if (kind == idl.LinkedNodeKind.prefixedIdentifier) {
@@ -15723,6 +15231,7 @@
         "expression_type": expression_type,
         "flags": flags,
         "kind": kind,
+        "name": name,
       };
     }
     if (kind == idl.LinkedNodeKind.propertyAccess) {
@@ -15733,6 +15242,7 @@
         "expression_type": expression_type,
         "flags": flags,
         "kind": kind,
+        "name": name,
       };
     }
     if (kind == idl.LinkedNodeKind.redirectingConstructorInvocation) {
@@ -15747,6 +15257,7 @@
             redirectingConstructorInvocation_element,
         "flags": flags,
         "kind": kind,
+        "name": name,
       };
     }
     if (kind == idl.LinkedNodeKind.rethrowExpression) {
@@ -15754,6 +15265,7 @@
         "expression_type": expression_type,
         "flags": flags,
         "kind": kind,
+        "name": name,
       };
     }
     if (kind == idl.LinkedNodeKind.returnStatement) {
@@ -15761,6 +15273,7 @@
         "returnStatement_expression": returnStatement_expression,
         "flags": flags,
         "kind": kind,
+        "name": name,
       };
     }
     if (kind == idl.LinkedNodeKind.setOrMapLiteral) {
@@ -15770,6 +15283,7 @@
         "expression_type": expression_type,
         "flags": flags,
         "kind": kind,
+        "name": name,
       };
     }
     if (kind == idl.LinkedNodeKind.showCombinator) {
@@ -15777,6 +15291,7 @@
         "flags": flags,
         "kind": kind,
         "names": names,
+        "name": name,
       };
     }
     if (kind == idl.LinkedNodeKind.simpleFormalParameter) {
@@ -15785,12 +15300,10 @@
         "normalFormalParameter_metadata": normalFormalParameter_metadata,
         "simpleFormalParameter_type": simpleFormalParameter_type,
         "inheritsCovariant": inheritsCovariant,
-        "normalFormalParameter_identifier": normalFormalParameter_identifier,
-        "codeLength": codeLength,
-        "codeOffset": codeOffset,
         "flags": flags,
-        "normalFormalParameter_comment": normalFormalParameter_comment,
+        "informativeId": informativeId,
         "kind": kind,
+        "name": name,
         "topLevelTypeInferenceError": topLevelTypeInferenceError,
       };
     }
@@ -15800,15 +15313,15 @@
         "simpleIdentifier_element": simpleIdentifier_element,
         "expression_type": expression_type,
         "flags": flags,
-        "simpleIdentifier_offset": simpleIdentifier_offset,
         "kind": kind,
-        "simpleIdentifier_name": simpleIdentifier_name,
+        "name": name,
       };
     }
     if (kind == idl.LinkedNodeKind.simpleStringLiteral) {
       return {
         "flags": flags,
         "kind": kind,
+        "name": name,
         "simpleStringLiteral_value": simpleStringLiteral_value,
       };
     }
@@ -15817,6 +15330,7 @@
         "spreadElement_expression": spreadElement_expression,
         "flags": flags,
         "kind": kind,
+        "name": name,
         "spreadElement_spreadOperator": spreadElement_spreadOperator,
       };
     }
@@ -15825,6 +15339,7 @@
         "stringInterpolation_elements": stringInterpolation_elements,
         "flags": flags,
         "kind": kind,
+        "name": name,
       };
     }
     if (kind == idl.LinkedNodeKind.superConstructorInvocation) {
@@ -15839,6 +15354,7 @@
             superConstructorInvocation_element,
         "flags": flags,
         "kind": kind,
+        "name": name,
       };
     }
     if (kind == idl.LinkedNodeKind.superExpression) {
@@ -15846,6 +15362,7 @@
         "expression_type": expression_type,
         "flags": flags,
         "kind": kind,
+        "name": name,
       };
     }
     if (kind == idl.LinkedNodeKind.switchCase) {
@@ -15855,6 +15372,7 @@
         "switchMember_labels": switchMember_labels,
         "flags": flags,
         "kind": kind,
+        "name": name,
       };
     }
     if (kind == idl.LinkedNodeKind.switchDefault) {
@@ -15863,6 +15381,7 @@
         "switchMember_labels": switchMember_labels,
         "flags": flags,
         "kind": kind,
+        "name": name,
       };
     }
     if (kind == idl.LinkedNodeKind.switchStatement) {
@@ -15871,6 +15390,7 @@
         "switchStatement_expression": switchStatement_expression,
         "flags": flags,
         "kind": kind,
+        "name": name,
       };
     }
     if (kind == idl.LinkedNodeKind.symbolLiteral) {
@@ -15879,6 +15399,7 @@
         "flags": flags,
         "kind": kind,
         "names": names,
+        "name": name,
       };
     }
     if (kind == idl.LinkedNodeKind.thisExpression) {
@@ -15886,6 +15407,7 @@
         "expression_type": expression_type,
         "flags": flags,
         "kind": kind,
+        "name": name,
       };
     }
     if (kind == idl.LinkedNodeKind.throwExpression) {
@@ -15894,16 +15416,18 @@
         "expression_type": expression_type,
         "flags": flags,
         "kind": kind,
+        "name": name,
       };
     }
     if (kind == idl.LinkedNodeKind.topLevelVariableDeclaration) {
       return {
-        "annotatedNode_comment": annotatedNode_comment,
         "annotatedNode_metadata": annotatedNode_metadata,
         "topLevelVariableDeclaration_variableList":
             topLevelVariableDeclaration_variableList,
         "flags": flags,
+        "informativeId": informativeId,
         "kind": kind,
+        "name": name,
       };
     }
     if (kind == idl.LinkedNodeKind.tryStatement) {
@@ -15913,6 +15437,7 @@
         "tryStatement_finallyBlock": tryStatement_finallyBlock,
         "flags": flags,
         "kind": kind,
+        "name": name,
       };
     }
     if (kind == idl.LinkedNodeKind.typeArgumentList) {
@@ -15920,6 +15445,7 @@
         "typeArgumentList_arguments": typeArgumentList_arguments,
         "flags": flags,
         "kind": kind,
+        "name": name,
       };
     }
     if (kind == idl.LinkedNodeKind.typeName) {
@@ -15929,19 +15455,18 @@
         "typeName_type": typeName_type,
         "flags": flags,
         "kind": kind,
+        "name": name,
       };
     }
     if (kind == idl.LinkedNodeKind.typeParameter) {
       return {
-        "annotatedNode_comment": annotatedNode_comment,
         "annotatedNode_metadata": annotatedNode_metadata,
         "typeParameter_bound": typeParameter_bound,
-        "typeParameter_name": typeParameter_name,
         "typeParameter_defaultType": typeParameter_defaultType,
-        "codeLength": codeLength,
-        "codeOffset": codeOffset,
         "flags": flags,
+        "informativeId": informativeId,
         "kind": kind,
+        "name": name,
       };
     }
     if (kind == idl.LinkedNodeKind.typeParameterList) {
@@ -15949,31 +15474,31 @@
         "typeParameterList_typeParameters": typeParameterList_typeParameters,
         "flags": flags,
         "kind": kind,
+        "name": name,
       };
     }
     if (kind == idl.LinkedNodeKind.variableDeclaration) {
       return {
         "actualType": actualType,
-        "annotatedNode_comment": annotatedNode_comment,
         "annotatedNode_metadata": annotatedNode_metadata,
         "variableDeclaration_initializer": variableDeclaration_initializer,
-        "variableDeclaration_name": variableDeclaration_name,
         "inheritsCovariant": inheritsCovariant,
-        "codeLength": codeLength,
-        "codeOffset": codeOffset,
         "flags": flags,
+        "informativeId": informativeId,
         "kind": kind,
+        "name": name,
         "topLevelTypeInferenceError": topLevelTypeInferenceError,
       };
     }
     if (kind == idl.LinkedNodeKind.variableDeclarationList) {
       return {
         "variableDeclarationList_variables": variableDeclarationList_variables,
-        "annotatedNode_comment": annotatedNode_comment,
         "annotatedNode_metadata": annotatedNode_metadata,
         "variableDeclarationList_type": variableDeclarationList_type,
         "flags": flags,
+        "informativeId": informativeId,
         "kind": kind,
+        "name": name,
       };
     }
     if (kind == idl.LinkedNodeKind.variableDeclarationStatement) {
@@ -15982,6 +15507,7 @@
             variableDeclarationStatement_variables,
         "flags": flags,
         "kind": kind,
+        "name": name,
       };
     }
     if (kind == idl.LinkedNodeKind.whileStatement) {
@@ -15990,6 +15516,7 @@
         "whileStatement_condition": whileStatement_condition,
         "flags": flags,
         "kind": kind,
+        "name": name,
       };
     }
     if (kind == idl.LinkedNodeKind.withClause) {
@@ -15997,6 +15524,7 @@
         "withClause_mixinTypes": withClause_mixinTypes,
         "flags": flags,
         "kind": kind,
+        "name": name,
       };
     }
     if (kind == idl.LinkedNodeKind.yieldStatement) {
@@ -16004,6 +15532,7 @@
         "yieldStatement_expression": yieldStatement_expression,
         "flags": flags,
         "kind": kind,
+        "name": name,
       };
     }
     throw StateError("Unexpected $kind");
@@ -17166,29 +16695,13 @@
 class LinkedNodeUnitBuilder extends Object
     with _LinkedNodeUnitMixin
     implements idl.LinkedNodeUnit {
-  List<LinkedNodeBuilder> _genericFunctionTypes;
   bool _isNNBD;
   bool _isSynthetic;
-  List<int> _lineStarts;
   LinkedNodeBuilder _node;
   UnlinkedTokensBuilder _tokens;
   String _uriStr;
 
   @override
-  List<LinkedNodeBuilder> get genericFunctionTypes =>
-      _genericFunctionTypes ??= <LinkedNodeBuilder>[];
-
-  /// All generic function types in the unit - in generic type aliases, or used
-  /// directly as type annotations.
-  ///
-  /// They are requested in two cases: when we are reading a node that contains
-  /// them (e.g. a return type of a method), or when we run over unresolved
-  /// AST in declaration resolver.
-  set genericFunctionTypes(List<LinkedNodeBuilder> value) {
-    this._genericFunctionTypes = value;
-  }
-
-  @override
   bool get isNNBD => _isNNBD ??= false;
 
   set isNNBD(bool value) {
@@ -17203,15 +16716,6 @@
   }
 
   @override
-  List<int> get lineStarts => _lineStarts ??= <int>[];
-
-  /// Offsets of the first character of each line in the source code.
-  set lineStarts(List<int> value) {
-    assert(value == null || value.every((e) => e >= 0));
-    this._lineStarts = value;
-  }
-
-  @override
   LinkedNodeBuilder get node => _node;
 
   set node(LinkedNodeBuilder value) {
@@ -17233,25 +16737,19 @@
   }
 
   LinkedNodeUnitBuilder(
-      {List<LinkedNodeBuilder> genericFunctionTypes,
-      bool isNNBD,
+      {bool isNNBD,
       bool isSynthetic,
-      List<int> lineStarts,
       LinkedNodeBuilder node,
       UnlinkedTokensBuilder tokens,
       String uriStr})
-      : _genericFunctionTypes = genericFunctionTypes,
-        _isNNBD = isNNBD,
+      : _isNNBD = isNNBD,
         _isSynthetic = isSynthetic,
-        _lineStarts = lineStarts,
         _node = node,
         _tokens = tokens,
         _uriStr = uriStr;
 
   /// Flush [informative] data recursively.
   void flushInformative() {
-    _genericFunctionTypes?.forEach((b) => b.flushInformative());
-    _lineStarts = null;
     _node?.flushInformative();
     _tokens?.flushInformative();
   }
@@ -17264,30 +16762,13 @@
     signature.addBool(this._node != null);
     this._node?.collectApiSignature(signature);
     signature.addBool(this._isSynthetic == true);
-    if (this._genericFunctionTypes == null) {
-      signature.addInt(0);
-    } else {
-      signature.addInt(this._genericFunctionTypes.length);
-      for (var x in this._genericFunctionTypes) {
-        x?.collectApiSignature(signature);
-      }
-    }
     signature.addBool(this._isNNBD == true);
   }
 
   fb.Offset finish(fb.Builder fbBuilder) {
-    fb.Offset offset_genericFunctionTypes;
-    fb.Offset offset_lineStarts;
     fb.Offset offset_node;
     fb.Offset offset_tokens;
     fb.Offset offset_uriStr;
-    if (!(_genericFunctionTypes == null || _genericFunctionTypes.isEmpty)) {
-      offset_genericFunctionTypes = fbBuilder.writeList(
-          _genericFunctionTypes.map((b) => b.finish(fbBuilder)).toList());
-    }
-    if (!(_lineStarts == null || _lineStarts.isEmpty)) {
-      offset_lineStarts = fbBuilder.writeListUint32(_lineStarts);
-    }
     if (_node != null) {
       offset_node = _node.finish(fbBuilder);
     }
@@ -17298,18 +16779,12 @@
       offset_uriStr = fbBuilder.writeString(_uriStr);
     }
     fbBuilder.startTable();
-    if (offset_genericFunctionTypes != null) {
-      fbBuilder.addOffset(5, offset_genericFunctionTypes);
-    }
     if (_isNNBD == true) {
-      fbBuilder.addBool(6, true);
+      fbBuilder.addBool(4, true);
     }
     if (_isSynthetic == true) {
       fbBuilder.addBool(3, true);
     }
-    if (offset_lineStarts != null) {
-      fbBuilder.addOffset(4, offset_lineStarts);
-    }
     if (offset_node != null) {
       fbBuilder.addOffset(2, offset_node);
     }
@@ -17339,25 +16814,15 @@
 
   _LinkedNodeUnitImpl(this._bc, this._bcOffset);
 
-  List<idl.LinkedNode> _genericFunctionTypes;
   bool _isNNBD;
   bool _isSynthetic;
-  List<int> _lineStarts;
   idl.LinkedNode _node;
   idl.UnlinkedTokens _tokens;
   String _uriStr;
 
   @override
-  List<idl.LinkedNode> get genericFunctionTypes {
-    _genericFunctionTypes ??=
-        const fb.ListReader<idl.LinkedNode>(const _LinkedNodeReader())
-            .vTableGet(_bc, _bcOffset, 5, const <idl.LinkedNode>[]);
-    return _genericFunctionTypes;
-  }
-
-  @override
   bool get isNNBD {
-    _isNNBD ??= const fb.BoolReader().vTableGet(_bc, _bcOffset, 6, false);
+    _isNNBD ??= const fb.BoolReader().vTableGet(_bc, _bcOffset, 4, false);
     return _isNNBD;
   }
 
@@ -17368,13 +16833,6 @@
   }
 
   @override
-  List<int> get lineStarts {
-    _lineStarts ??=
-        const fb.Uint32ListReader().vTableGet(_bc, _bcOffset, 4, const <int>[]);
-    return _lineStarts;
-  }
-
-  @override
   idl.LinkedNode get node {
     _node ??= const _LinkedNodeReader().vTableGet(_bc, _bcOffset, 2, null);
     return _node;
@@ -17398,12 +16856,8 @@
   @override
   Map<String, Object> toJson() {
     Map<String, Object> _result = <String, Object>{};
-    if (genericFunctionTypes.isNotEmpty)
-      _result["genericFunctionTypes"] =
-          genericFunctionTypes.map((_value) => _value.toJson()).toList();
     if (isNNBD != false) _result["isNNBD"] = isNNBD;
     if (isSynthetic != false) _result["isSynthetic"] = isSynthetic;
-    if (lineStarts.isNotEmpty) _result["lineStarts"] = lineStarts;
     if (node != null) _result["node"] = node.toJson();
     if (tokens != null) _result["tokens"] = tokens.toJson();
     if (uriStr != '') _result["uriStr"] = uriStr;
@@ -17412,10 +16866,8 @@
 
   @override
   Map<String, Object> toMap() => {
-        "genericFunctionTypes": genericFunctionTypes,
         "isNNBD": isNNBD,
         "isSynthetic": isSynthetic,
-        "lineStarts": lineStarts,
         "node": node,
         "tokens": tokens,
         "uriStr": uriStr,
@@ -23164,6 +22616,1236 @@
   String toString() => convert.json.encode(toJson());
 }
 
+class UnlinkedInformativeDataBuilder extends Object
+    with _UnlinkedInformativeDataMixin
+    implements idl.UnlinkedInformativeData {
+  int _variantField_2;
+  int _variantField_3;
+  int _variantField_1;
+  List<String> _variantField_4;
+  idl.LinkedNodeKind _kind;
+  int _variantField_5;
+  int _variantField_6;
+  List<int> _variantField_7;
+
+  @override
+  int get codeLength {
+    assert(kind == idl.LinkedNodeKind.classDeclaration ||
+        kind == idl.LinkedNodeKind.classTypeAlias ||
+        kind == idl.LinkedNodeKind.compilationUnit ||
+        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_2 ??= 0;
+  }
+
+  set codeLength(int value) {
+    assert(kind == idl.LinkedNodeKind.classDeclaration ||
+        kind == idl.LinkedNodeKind.classTypeAlias ||
+        kind == idl.LinkedNodeKind.compilationUnit ||
+        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_2 = value;
+  }
+
+  @override
+  int get codeOffset {
+    assert(kind == idl.LinkedNodeKind.classDeclaration ||
+        kind == idl.LinkedNodeKind.classTypeAlias ||
+        kind == idl.LinkedNodeKind.compilationUnit ||
+        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_3 ??= 0;
+  }
+
+  set codeOffset(int value) {
+    assert(kind == idl.LinkedNodeKind.classDeclaration ||
+        kind == idl.LinkedNodeKind.classTypeAlias ||
+        kind == idl.LinkedNodeKind.compilationUnit ||
+        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_3 = value;
+  }
+
+  @override
+  int get directiveKeywordOffset {
+    assert(kind == idl.LinkedNodeKind.exportDirective ||
+        kind == idl.LinkedNodeKind.importDirective ||
+        kind == idl.LinkedNodeKind.libraryDirective ||
+        kind == idl.LinkedNodeKind.partDirective ||
+        kind == idl.LinkedNodeKind.partOfDirective);
+    return _variantField_1 ??= 0;
+  }
+
+  @override
+  int get nameOffset {
+    assert(kind == idl.LinkedNodeKind.classDeclaration ||
+        kind == idl.LinkedNodeKind.classTypeAlias ||
+        kind == idl.LinkedNodeKind.constructorDeclaration ||
+        kind == idl.LinkedNodeKind.enumConstantDeclaration ||
+        kind == idl.LinkedNodeKind.enumDeclaration ||
+        kind == idl.LinkedNodeKind.fieldFormalParameter ||
+        kind == idl.LinkedNodeKind.functionDeclaration ||
+        kind == idl.LinkedNodeKind.functionTypedFormalParameter ||
+        kind == idl.LinkedNodeKind.functionTypeAlias ||
+        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_1 ??= 0;
+  }
+
+  set directiveKeywordOffset(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_1 = value;
+  }
+
+  set nameOffset(int value) {
+    assert(kind == idl.LinkedNodeKind.classDeclaration ||
+        kind == idl.LinkedNodeKind.classTypeAlias ||
+        kind == idl.LinkedNodeKind.constructorDeclaration ||
+        kind == idl.LinkedNodeKind.enumConstantDeclaration ||
+        kind == idl.LinkedNodeKind.enumDeclaration ||
+        kind == idl.LinkedNodeKind.fieldFormalParameter ||
+        kind == idl.LinkedNodeKind.functionDeclaration ||
+        kind == idl.LinkedNodeKind.functionTypedFormalParameter ||
+        kind == idl.LinkedNodeKind.functionTypeAlias ||
+        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_1 = value;
+  }
+
+  @override
+  List<String> get documentationComment_tokens {
+    assert(kind == idl.LinkedNodeKind.classDeclaration ||
+        kind == idl.LinkedNodeKind.classTypeAlias ||
+        kind == idl.LinkedNodeKind.constructorDeclaration ||
+        kind == idl.LinkedNodeKind.enumDeclaration ||
+        kind == idl.LinkedNodeKind.enumConstantDeclaration ||
+        kind == idl.LinkedNodeKind.fieldDeclaration ||
+        kind == idl.LinkedNodeKind.functionDeclaration ||
+        kind == idl.LinkedNodeKind.functionTypeAlias ||
+        kind == idl.LinkedNodeKind.genericTypeAlias ||
+        kind == idl.LinkedNodeKind.libraryDirective ||
+        kind == idl.LinkedNodeKind.methodDeclaration ||
+        kind == idl.LinkedNodeKind.mixinDeclaration ||
+        kind == idl.LinkedNodeKind.topLevelVariableDeclaration);
+    return _variantField_4 ??= <String>[];
+  }
+
+  set documentationComment_tokens(List<String> value) {
+    assert(kind == idl.LinkedNodeKind.classDeclaration ||
+        kind == idl.LinkedNodeKind.classTypeAlias ||
+        kind == idl.LinkedNodeKind.constructorDeclaration ||
+        kind == idl.LinkedNodeKind.enumDeclaration ||
+        kind == idl.LinkedNodeKind.enumConstantDeclaration ||
+        kind == idl.LinkedNodeKind.fieldDeclaration ||
+        kind == idl.LinkedNodeKind.functionDeclaration ||
+        kind == idl.LinkedNodeKind.functionTypeAlias ||
+        kind == idl.LinkedNodeKind.genericTypeAlias ||
+        kind == idl.LinkedNodeKind.libraryDirective ||
+        kind == idl.LinkedNodeKind.methodDeclaration ||
+        kind == idl.LinkedNodeKind.mixinDeclaration ||
+        kind == idl.LinkedNodeKind.topLevelVariableDeclaration);
+    _variantField_4 = value;
+  }
+
+  @override
+  idl.LinkedNodeKind get kind => _kind ??= idl.LinkedNodeKind.adjacentStrings;
+
+  /// The kind of the node.
+  set kind(idl.LinkedNodeKind value) {
+    this._kind = value;
+  }
+
+  @override
+  int get constructorDeclaration_returnTypeOffset {
+    assert(kind == idl.LinkedNodeKind.constructorDeclaration);
+    return _variantField_5 ??= 0;
+  }
+
+  set constructorDeclaration_returnTypeOffset(int value) {
+    assert(kind == idl.LinkedNodeKind.constructorDeclaration);
+    assert(value == null || value >= 0);
+    _variantField_5 = value;
+  }
+
+  @override
+  int get constructorDeclaration_periodOffset {
+    assert(kind == idl.LinkedNodeKind.constructorDeclaration);
+    return _variantField_6 ??= 0;
+  }
+
+  set constructorDeclaration_periodOffset(int value) {
+    assert(kind == idl.LinkedNodeKind.constructorDeclaration);
+    assert(value == null || value >= 0);
+    _variantField_6 = value;
+  }
+
+  @override
+  List<int> get compilationUnit_lineStarts {
+    assert(kind == idl.LinkedNodeKind.compilationUnit);
+    return _variantField_7 ??= <int>[];
+  }
+
+  /// Offsets of the first character of each line in the source code.
+  set compilationUnit_lineStarts(List<int> value) {
+    assert(kind == idl.LinkedNodeKind.compilationUnit);
+    assert(value == null || value.every((e) => e >= 0));
+    _variantField_7 = value;
+  }
+
+  UnlinkedInformativeDataBuilder.classDeclaration({
+    int codeLength,
+    int codeOffset,
+    int nameOffset,
+    List<String> documentationComment_tokens,
+  })  : _kind = idl.LinkedNodeKind.classDeclaration,
+        _variantField_2 = codeLength,
+        _variantField_3 = codeOffset,
+        _variantField_1 = nameOffset,
+        _variantField_4 = documentationComment_tokens;
+
+  UnlinkedInformativeDataBuilder.classTypeAlias({
+    int codeLength,
+    int codeOffset,
+    int nameOffset,
+    List<String> documentationComment_tokens,
+  })  : _kind = idl.LinkedNodeKind.classTypeAlias,
+        _variantField_2 = codeLength,
+        _variantField_3 = codeOffset,
+        _variantField_1 = nameOffset,
+        _variantField_4 = documentationComment_tokens;
+
+  UnlinkedInformativeDataBuilder.compilationUnit({
+    int codeLength,
+    int codeOffset,
+    List<int> compilationUnit_lineStarts,
+  })  : _kind = idl.LinkedNodeKind.compilationUnit,
+        _variantField_2 = codeLength,
+        _variantField_3 = codeOffset,
+        _variantField_7 = compilationUnit_lineStarts;
+
+  UnlinkedInformativeDataBuilder.constructorDeclaration({
+    int codeLength,
+    int codeOffset,
+    int nameOffset,
+    List<String> documentationComment_tokens,
+    int constructorDeclaration_returnTypeOffset,
+    int constructorDeclaration_periodOffset,
+  })  : _kind = idl.LinkedNodeKind.constructorDeclaration,
+        _variantField_2 = codeLength,
+        _variantField_3 = codeOffset,
+        _variantField_1 = nameOffset,
+        _variantField_4 = documentationComment_tokens,
+        _variantField_5 = constructorDeclaration_returnTypeOffset,
+        _variantField_6 = constructorDeclaration_periodOffset;
+
+  UnlinkedInformativeDataBuilder.defaultFormalParameter({
+    int codeLength,
+    int codeOffset,
+  })  : _kind = idl.LinkedNodeKind.defaultFormalParameter,
+        _variantField_2 = codeLength,
+        _variantField_3 = codeOffset;
+
+  UnlinkedInformativeDataBuilder.enumConstantDeclaration({
+    int nameOffset,
+    List<String> documentationComment_tokens,
+  })  : _kind = idl.LinkedNodeKind.enumConstantDeclaration,
+        _variantField_1 = nameOffset,
+        _variantField_4 = documentationComment_tokens;
+
+  UnlinkedInformativeDataBuilder.enumDeclaration({
+    int codeLength,
+    int codeOffset,
+    int nameOffset,
+    List<String> documentationComment_tokens,
+  })  : _kind = idl.LinkedNodeKind.enumDeclaration,
+        _variantField_2 = codeLength,
+        _variantField_3 = codeOffset,
+        _variantField_1 = nameOffset,
+        _variantField_4 = documentationComment_tokens;
+
+  UnlinkedInformativeDataBuilder.exportDirective({
+    int directiveKeywordOffset,
+  })  : _kind = idl.LinkedNodeKind.exportDirective,
+        _variantField_1 = directiveKeywordOffset;
+
+  UnlinkedInformativeDataBuilder.fieldDeclaration({
+    List<String> documentationComment_tokens,
+  })  : _kind = idl.LinkedNodeKind.fieldDeclaration,
+        _variantField_4 = documentationComment_tokens;
+
+  UnlinkedInformativeDataBuilder.fieldFormalParameter({
+    int codeLength,
+    int codeOffset,
+    int nameOffset,
+  })  : _kind = idl.LinkedNodeKind.fieldFormalParameter,
+        _variantField_2 = codeLength,
+        _variantField_3 = codeOffset,
+        _variantField_1 = nameOffset;
+
+  UnlinkedInformativeDataBuilder.functionDeclaration({
+    int codeLength,
+    int codeOffset,
+    int nameOffset,
+    List<String> documentationComment_tokens,
+  })  : _kind = idl.LinkedNodeKind.functionDeclaration,
+        _variantField_2 = codeLength,
+        _variantField_3 = codeOffset,
+        _variantField_1 = nameOffset,
+        _variantField_4 = documentationComment_tokens;
+
+  UnlinkedInformativeDataBuilder.functionTypeAlias({
+    int codeLength,
+    int codeOffset,
+    int nameOffset,
+    List<String> documentationComment_tokens,
+  })  : _kind = idl.LinkedNodeKind.functionTypeAlias,
+        _variantField_2 = codeLength,
+        _variantField_3 = codeOffset,
+        _variantField_1 = nameOffset,
+        _variantField_4 = documentationComment_tokens;
+
+  UnlinkedInformativeDataBuilder.functionTypedFormalParameter({
+    int codeLength,
+    int codeOffset,
+    int nameOffset,
+  })  : _kind = idl.LinkedNodeKind.functionTypedFormalParameter,
+        _variantField_2 = codeLength,
+        _variantField_3 = codeOffset,
+        _variantField_1 = nameOffset;
+
+  UnlinkedInformativeDataBuilder.genericTypeAlias({
+    int codeLength,
+    int codeOffset,
+    int nameOffset,
+    List<String> documentationComment_tokens,
+  })  : _kind = idl.LinkedNodeKind.genericTypeAlias,
+        _variantField_2 = codeLength,
+        _variantField_3 = codeOffset,
+        _variantField_1 = nameOffset,
+        _variantField_4 = documentationComment_tokens;
+
+  UnlinkedInformativeDataBuilder.importDirective({
+    int directiveKeywordOffset,
+  })  : _kind = idl.LinkedNodeKind.importDirective,
+        _variantField_1 = directiveKeywordOffset;
+
+  UnlinkedInformativeDataBuilder.libraryDirective({
+    int directiveKeywordOffset,
+    List<String> documentationComment_tokens,
+  })  : _kind = idl.LinkedNodeKind.libraryDirective,
+        _variantField_1 = directiveKeywordOffset,
+        _variantField_4 = documentationComment_tokens;
+
+  UnlinkedInformativeDataBuilder.methodDeclaration({
+    int codeLength,
+    int codeOffset,
+    int nameOffset,
+    List<String> documentationComment_tokens,
+  })  : _kind = idl.LinkedNodeKind.methodDeclaration,
+        _variantField_2 = codeLength,
+        _variantField_3 = codeOffset,
+        _variantField_1 = nameOffset,
+        _variantField_4 = documentationComment_tokens;
+
+  UnlinkedInformativeDataBuilder.mixinDeclaration({
+    int codeLength,
+    int codeOffset,
+    int nameOffset,
+    List<String> documentationComment_tokens,
+  })  : _kind = idl.LinkedNodeKind.mixinDeclaration,
+        _variantField_2 = codeLength,
+        _variantField_3 = codeOffset,
+        _variantField_1 = nameOffset,
+        _variantField_4 = documentationComment_tokens;
+
+  UnlinkedInformativeDataBuilder.partDirective({
+    int directiveKeywordOffset,
+  })  : _kind = idl.LinkedNodeKind.partDirective,
+        _variantField_1 = directiveKeywordOffset;
+
+  UnlinkedInformativeDataBuilder.partOfDirective({
+    int directiveKeywordOffset,
+  })  : _kind = idl.LinkedNodeKind.partOfDirective,
+        _variantField_1 = directiveKeywordOffset;
+
+  UnlinkedInformativeDataBuilder.simpleFormalParameter({
+    int codeLength,
+    int codeOffset,
+    int nameOffset,
+  })  : _kind = idl.LinkedNodeKind.simpleFormalParameter,
+        _variantField_2 = codeLength,
+        _variantField_3 = codeOffset,
+        _variantField_1 = nameOffset;
+
+  UnlinkedInformativeDataBuilder.topLevelVariableDeclaration({
+    List<String> documentationComment_tokens,
+  })  : _kind = idl.LinkedNodeKind.topLevelVariableDeclaration,
+        _variantField_4 = documentationComment_tokens;
+
+  UnlinkedInformativeDataBuilder.typeParameter({
+    int codeLength,
+    int codeOffset,
+    int nameOffset,
+  })  : _kind = idl.LinkedNodeKind.typeParameter,
+        _variantField_2 = codeLength,
+        _variantField_3 = codeOffset,
+        _variantField_1 = nameOffset;
+
+  UnlinkedInformativeDataBuilder.variableDeclaration({
+    int codeLength,
+    int codeOffset,
+    int nameOffset,
+  })  : _kind = idl.LinkedNodeKind.variableDeclaration,
+        _variantField_2 = codeLength,
+        _variantField_3 = codeOffset,
+        _variantField_1 = nameOffset;
+
+  /// Flush [informative] data recursively.
+  void flushInformative() {
+    if (kind == idl.LinkedNodeKind.classDeclaration) {
+    } else if (kind == idl.LinkedNodeKind.classTypeAlias) {
+    } else if (kind == idl.LinkedNodeKind.compilationUnit) {
+    } else if (kind == idl.LinkedNodeKind.constructorDeclaration) {
+    } else if (kind == idl.LinkedNodeKind.defaultFormalParameter) {
+    } else if (kind == idl.LinkedNodeKind.enumConstantDeclaration) {
+    } else if (kind == idl.LinkedNodeKind.enumDeclaration) {
+    } else if (kind == idl.LinkedNodeKind.exportDirective) {
+    } else if (kind == idl.LinkedNodeKind.fieldDeclaration) {
+    } else if (kind == idl.LinkedNodeKind.fieldFormalParameter) {
+    } else if (kind == idl.LinkedNodeKind.functionDeclaration) {
+    } else if (kind == idl.LinkedNodeKind.functionTypeAlias) {
+    } else if (kind == idl.LinkedNodeKind.functionTypedFormalParameter) {
+    } else if (kind == idl.LinkedNodeKind.genericTypeAlias) {
+    } else if (kind == idl.LinkedNodeKind.importDirective) {
+    } else if (kind == idl.LinkedNodeKind.libraryDirective) {
+    } else if (kind == idl.LinkedNodeKind.methodDeclaration) {
+    } else if (kind == idl.LinkedNodeKind.mixinDeclaration) {
+    } else if (kind == idl.LinkedNodeKind.partDirective) {
+    } else if (kind == idl.LinkedNodeKind.partOfDirective) {
+    } else if (kind == idl.LinkedNodeKind.simpleFormalParameter) {
+    } else if (kind == idl.LinkedNodeKind.topLevelVariableDeclaration) {
+    } else if (kind == idl.LinkedNodeKind.typeParameter) {
+    } else if (kind == idl.LinkedNodeKind.variableDeclaration) {}
+  }
+
+  /// Accumulate non-[informative] data into [signature].
+  void collectApiSignature(api_sig.ApiSignature signature) {
+    if (kind == idl.LinkedNodeKind.classDeclaration) {
+      signature.addInt(this.kind == null ? 0 : this.kind.index);
+      signature.addInt(this.nameOffset ?? 0);
+      signature.addInt(this.codeLength ?? 0);
+      signature.addInt(this.codeOffset ?? 0);
+      if (this.documentationComment_tokens == null) {
+        signature.addInt(0);
+      } else {
+        signature.addInt(this.documentationComment_tokens.length);
+        for (var x in this.documentationComment_tokens) {
+          signature.addString(x);
+        }
+      }
+    } else if (kind == idl.LinkedNodeKind.classTypeAlias) {
+      signature.addInt(this.kind == null ? 0 : this.kind.index);
+      signature.addInt(this.nameOffset ?? 0);
+      signature.addInt(this.codeLength ?? 0);
+      signature.addInt(this.codeOffset ?? 0);
+      if (this.documentationComment_tokens == null) {
+        signature.addInt(0);
+      } else {
+        signature.addInt(this.documentationComment_tokens.length);
+        for (var x in this.documentationComment_tokens) {
+          signature.addString(x);
+        }
+      }
+    } else if (kind == idl.LinkedNodeKind.compilationUnit) {
+      signature.addInt(this.kind == null ? 0 : this.kind.index);
+      signature.addInt(this.codeLength ?? 0);
+      signature.addInt(this.codeOffset ?? 0);
+      if (this.compilationUnit_lineStarts == null) {
+        signature.addInt(0);
+      } else {
+        signature.addInt(this.compilationUnit_lineStarts.length);
+        for (var x in this.compilationUnit_lineStarts) {
+          signature.addInt(x);
+        }
+      }
+    } else if (kind == idl.LinkedNodeKind.constructorDeclaration) {
+      signature.addInt(this.kind == null ? 0 : this.kind.index);
+      signature.addInt(this.nameOffset ?? 0);
+      signature.addInt(this.codeLength ?? 0);
+      signature.addInt(this.codeOffset ?? 0);
+      if (this.documentationComment_tokens == null) {
+        signature.addInt(0);
+      } else {
+        signature.addInt(this.documentationComment_tokens.length);
+        for (var x in this.documentationComment_tokens) {
+          signature.addString(x);
+        }
+      }
+      signature.addInt(this.constructorDeclaration_returnTypeOffset ?? 0);
+      signature.addInt(this.constructorDeclaration_periodOffset ?? 0);
+    } else if (kind == idl.LinkedNodeKind.defaultFormalParameter) {
+      signature.addInt(this.kind == null ? 0 : this.kind.index);
+      signature.addInt(this.codeLength ?? 0);
+      signature.addInt(this.codeOffset ?? 0);
+    } else if (kind == idl.LinkedNodeKind.enumConstantDeclaration) {
+      signature.addInt(this.kind == null ? 0 : this.kind.index);
+      signature.addInt(this.nameOffset ?? 0);
+      if (this.documentationComment_tokens == null) {
+        signature.addInt(0);
+      } else {
+        signature.addInt(this.documentationComment_tokens.length);
+        for (var x in this.documentationComment_tokens) {
+          signature.addString(x);
+        }
+      }
+    } else if (kind == idl.LinkedNodeKind.enumDeclaration) {
+      signature.addInt(this.kind == null ? 0 : this.kind.index);
+      signature.addInt(this.nameOffset ?? 0);
+      signature.addInt(this.codeLength ?? 0);
+      signature.addInt(this.codeOffset ?? 0);
+      if (this.documentationComment_tokens == null) {
+        signature.addInt(0);
+      } else {
+        signature.addInt(this.documentationComment_tokens.length);
+        for (var x in this.documentationComment_tokens) {
+          signature.addString(x);
+        }
+      }
+    } else if (kind == idl.LinkedNodeKind.exportDirective) {
+      signature.addInt(this.kind == null ? 0 : this.kind.index);
+      signature.addInt(this.directiveKeywordOffset ?? 0);
+    } else if (kind == idl.LinkedNodeKind.fieldDeclaration) {
+      signature.addInt(this.kind == null ? 0 : this.kind.index);
+      if (this.documentationComment_tokens == null) {
+        signature.addInt(0);
+      } else {
+        signature.addInt(this.documentationComment_tokens.length);
+        for (var x in this.documentationComment_tokens) {
+          signature.addString(x);
+        }
+      }
+    } else if (kind == idl.LinkedNodeKind.fieldFormalParameter) {
+      signature.addInt(this.kind == null ? 0 : this.kind.index);
+      signature.addInt(this.nameOffset ?? 0);
+      signature.addInt(this.codeLength ?? 0);
+      signature.addInt(this.codeOffset ?? 0);
+    } else if (kind == idl.LinkedNodeKind.functionDeclaration) {
+      signature.addInt(this.kind == null ? 0 : this.kind.index);
+      signature.addInt(this.nameOffset ?? 0);
+      signature.addInt(this.codeLength ?? 0);
+      signature.addInt(this.codeOffset ?? 0);
+      if (this.documentationComment_tokens == null) {
+        signature.addInt(0);
+      } else {
+        signature.addInt(this.documentationComment_tokens.length);
+        for (var x in this.documentationComment_tokens) {
+          signature.addString(x);
+        }
+      }
+    } else if (kind == idl.LinkedNodeKind.functionTypeAlias) {
+      signature.addInt(this.kind == null ? 0 : this.kind.index);
+      signature.addInt(this.nameOffset ?? 0);
+      signature.addInt(this.codeLength ?? 0);
+      signature.addInt(this.codeOffset ?? 0);
+      if (this.documentationComment_tokens == null) {
+        signature.addInt(0);
+      } else {
+        signature.addInt(this.documentationComment_tokens.length);
+        for (var x in this.documentationComment_tokens) {
+          signature.addString(x);
+        }
+      }
+    } else if (kind == idl.LinkedNodeKind.functionTypedFormalParameter) {
+      signature.addInt(this.kind == null ? 0 : this.kind.index);
+      signature.addInt(this.nameOffset ?? 0);
+      signature.addInt(this.codeLength ?? 0);
+      signature.addInt(this.codeOffset ?? 0);
+    } else if (kind == idl.LinkedNodeKind.genericTypeAlias) {
+      signature.addInt(this.kind == null ? 0 : this.kind.index);
+      signature.addInt(this.nameOffset ?? 0);
+      signature.addInt(this.codeLength ?? 0);
+      signature.addInt(this.codeOffset ?? 0);
+      if (this.documentationComment_tokens == null) {
+        signature.addInt(0);
+      } else {
+        signature.addInt(this.documentationComment_tokens.length);
+        for (var x in this.documentationComment_tokens) {
+          signature.addString(x);
+        }
+      }
+    } else if (kind == idl.LinkedNodeKind.importDirective) {
+      signature.addInt(this.kind == null ? 0 : this.kind.index);
+      signature.addInt(this.directiveKeywordOffset ?? 0);
+    } else if (kind == idl.LinkedNodeKind.libraryDirective) {
+      signature.addInt(this.kind == null ? 0 : this.kind.index);
+      signature.addInt(this.directiveKeywordOffset ?? 0);
+      if (this.documentationComment_tokens == null) {
+        signature.addInt(0);
+      } else {
+        signature.addInt(this.documentationComment_tokens.length);
+        for (var x in this.documentationComment_tokens) {
+          signature.addString(x);
+        }
+      }
+    } else if (kind == idl.LinkedNodeKind.methodDeclaration) {
+      signature.addInt(this.kind == null ? 0 : this.kind.index);
+      signature.addInt(this.nameOffset ?? 0);
+      signature.addInt(this.codeLength ?? 0);
+      signature.addInt(this.codeOffset ?? 0);
+      if (this.documentationComment_tokens == null) {
+        signature.addInt(0);
+      } else {
+        signature.addInt(this.documentationComment_tokens.length);
+        for (var x in this.documentationComment_tokens) {
+          signature.addString(x);
+        }
+      }
+    } else if (kind == idl.LinkedNodeKind.mixinDeclaration) {
+      signature.addInt(this.kind == null ? 0 : this.kind.index);
+      signature.addInt(this.nameOffset ?? 0);
+      signature.addInt(this.codeLength ?? 0);
+      signature.addInt(this.codeOffset ?? 0);
+      if (this.documentationComment_tokens == null) {
+        signature.addInt(0);
+      } else {
+        signature.addInt(this.documentationComment_tokens.length);
+        for (var x in this.documentationComment_tokens) {
+          signature.addString(x);
+        }
+      }
+    } else if (kind == idl.LinkedNodeKind.partDirective) {
+      signature.addInt(this.kind == null ? 0 : this.kind.index);
+      signature.addInt(this.directiveKeywordOffset ?? 0);
+    } else if (kind == idl.LinkedNodeKind.partOfDirective) {
+      signature.addInt(this.kind == null ? 0 : this.kind.index);
+      signature.addInt(this.directiveKeywordOffset ?? 0);
+    } else if (kind == idl.LinkedNodeKind.simpleFormalParameter) {
+      signature.addInt(this.kind == null ? 0 : this.kind.index);
+      signature.addInt(this.nameOffset ?? 0);
+      signature.addInt(this.codeLength ?? 0);
+      signature.addInt(this.codeOffset ?? 0);
+    } else if (kind == idl.LinkedNodeKind.topLevelVariableDeclaration) {
+      signature.addInt(this.kind == null ? 0 : this.kind.index);
+      if (this.documentationComment_tokens == null) {
+        signature.addInt(0);
+      } else {
+        signature.addInt(this.documentationComment_tokens.length);
+        for (var x in this.documentationComment_tokens) {
+          signature.addString(x);
+        }
+      }
+    } else if (kind == idl.LinkedNodeKind.typeParameter) {
+      signature.addInt(this.kind == null ? 0 : this.kind.index);
+      signature.addInt(this.nameOffset ?? 0);
+      signature.addInt(this.codeLength ?? 0);
+      signature.addInt(this.codeOffset ?? 0);
+    } else if (kind == idl.LinkedNodeKind.variableDeclaration) {
+      signature.addInt(this.kind == null ? 0 : this.kind.index);
+      signature.addInt(this.nameOffset ?? 0);
+      signature.addInt(this.codeLength ?? 0);
+      signature.addInt(this.codeOffset ?? 0);
+    }
+  }
+
+  fb.Offset finish(fb.Builder fbBuilder) {
+    fb.Offset offset_variantField_4;
+    fb.Offset offset_variantField_7;
+    if (!(_variantField_4 == null || _variantField_4.isEmpty)) {
+      offset_variantField_4 = fbBuilder.writeList(
+          _variantField_4.map((b) => fbBuilder.writeString(b)).toList());
+    }
+    if (!(_variantField_7 == null || _variantField_7.isEmpty)) {
+      offset_variantField_7 = fbBuilder.writeListUint32(_variantField_7);
+    }
+    fbBuilder.startTable();
+    if (_variantField_2 != null && _variantField_2 != 0) {
+      fbBuilder.addUint32(2, _variantField_2);
+    }
+    if (_variantField_3 != null && _variantField_3 != 0) {
+      fbBuilder.addUint32(3, _variantField_3);
+    }
+    if (_variantField_1 != null && _variantField_1 != 0) {
+      fbBuilder.addUint32(1, _variantField_1);
+    }
+    if (offset_variantField_4 != null) {
+      fbBuilder.addOffset(4, offset_variantField_4);
+    }
+    if (_kind != null && _kind != idl.LinkedNodeKind.adjacentStrings) {
+      fbBuilder.addUint8(0, _kind.index);
+    }
+    if (_variantField_5 != null && _variantField_5 != 0) {
+      fbBuilder.addUint32(5, _variantField_5);
+    }
+    if (_variantField_6 != null && _variantField_6 != 0) {
+      fbBuilder.addUint32(6, _variantField_6);
+    }
+    if (offset_variantField_7 != null) {
+      fbBuilder.addOffset(7, offset_variantField_7);
+    }
+    return fbBuilder.endTable();
+  }
+}
+
+class _UnlinkedInformativeDataReader
+    extends fb.TableReader<_UnlinkedInformativeDataImpl> {
+  const _UnlinkedInformativeDataReader();
+
+  @override
+  _UnlinkedInformativeDataImpl createObject(fb.BufferContext bc, int offset) =>
+      new _UnlinkedInformativeDataImpl(bc, offset);
+}
+
+class _UnlinkedInformativeDataImpl extends Object
+    with _UnlinkedInformativeDataMixin
+    implements idl.UnlinkedInformativeData {
+  final fb.BufferContext _bc;
+  final int _bcOffset;
+
+  _UnlinkedInformativeDataImpl(this._bc, this._bcOffset);
+
+  int _variantField_2;
+  int _variantField_3;
+  int _variantField_1;
+  List<String> _variantField_4;
+  idl.LinkedNodeKind _kind;
+  int _variantField_5;
+  int _variantField_6;
+  List<int> _variantField_7;
+
+  @override
+  int get codeLength {
+    assert(kind == idl.LinkedNodeKind.classDeclaration ||
+        kind == idl.LinkedNodeKind.classTypeAlias ||
+        kind == idl.LinkedNodeKind.compilationUnit ||
+        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_2 ??= const fb.Uint32Reader().vTableGet(_bc, _bcOffset, 2, 0);
+    return _variantField_2;
+  }
+
+  @override
+  int get codeOffset {
+    assert(kind == idl.LinkedNodeKind.classDeclaration ||
+        kind == idl.LinkedNodeKind.classTypeAlias ||
+        kind == idl.LinkedNodeKind.compilationUnit ||
+        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_3 ??= const fb.Uint32Reader().vTableGet(_bc, _bcOffset, 3, 0);
+    return _variantField_3;
+  }
+
+  @override
+  int get directiveKeywordOffset {
+    assert(kind == idl.LinkedNodeKind.exportDirective ||
+        kind == idl.LinkedNodeKind.importDirective ||
+        kind == idl.LinkedNodeKind.libraryDirective ||
+        kind == idl.LinkedNodeKind.partDirective ||
+        kind == idl.LinkedNodeKind.partOfDirective);
+    _variantField_1 ??= const fb.Uint32Reader().vTableGet(_bc, _bcOffset, 1, 0);
+    return _variantField_1;
+  }
+
+  @override
+  int get nameOffset {
+    assert(kind == idl.LinkedNodeKind.classDeclaration ||
+        kind == idl.LinkedNodeKind.classTypeAlias ||
+        kind == idl.LinkedNodeKind.constructorDeclaration ||
+        kind == idl.LinkedNodeKind.enumConstantDeclaration ||
+        kind == idl.LinkedNodeKind.enumDeclaration ||
+        kind == idl.LinkedNodeKind.fieldFormalParameter ||
+        kind == idl.LinkedNodeKind.functionDeclaration ||
+        kind == idl.LinkedNodeKind.functionTypedFormalParameter ||
+        kind == idl.LinkedNodeKind.functionTypeAlias ||
+        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_1 ??= const fb.Uint32Reader().vTableGet(_bc, _bcOffset, 1, 0);
+    return _variantField_1;
+  }
+
+  @override
+  List<String> get documentationComment_tokens {
+    assert(kind == idl.LinkedNodeKind.classDeclaration ||
+        kind == idl.LinkedNodeKind.classTypeAlias ||
+        kind == idl.LinkedNodeKind.constructorDeclaration ||
+        kind == idl.LinkedNodeKind.enumDeclaration ||
+        kind == idl.LinkedNodeKind.enumConstantDeclaration ||
+        kind == idl.LinkedNodeKind.fieldDeclaration ||
+        kind == idl.LinkedNodeKind.functionDeclaration ||
+        kind == idl.LinkedNodeKind.functionTypeAlias ||
+        kind == idl.LinkedNodeKind.genericTypeAlias ||
+        kind == idl.LinkedNodeKind.libraryDirective ||
+        kind == idl.LinkedNodeKind.methodDeclaration ||
+        kind == idl.LinkedNodeKind.mixinDeclaration ||
+        kind == idl.LinkedNodeKind.topLevelVariableDeclaration);
+    _variantField_4 ??= const fb.ListReader<String>(const fb.StringReader())
+        .vTableGet(_bc, _bcOffset, 4, const <String>[]);
+    return _variantField_4;
+  }
+
+  @override
+  idl.LinkedNodeKind get kind {
+    _kind ??= const _LinkedNodeKindReader()
+        .vTableGet(_bc, _bcOffset, 0, idl.LinkedNodeKind.adjacentStrings);
+    return _kind;
+  }
+
+  @override
+  int get constructorDeclaration_returnTypeOffset {
+    assert(kind == idl.LinkedNodeKind.constructorDeclaration);
+    _variantField_5 ??= const fb.Uint32Reader().vTableGet(_bc, _bcOffset, 5, 0);
+    return _variantField_5;
+  }
+
+  @override
+  int get constructorDeclaration_periodOffset {
+    assert(kind == idl.LinkedNodeKind.constructorDeclaration);
+    _variantField_6 ??= const fb.Uint32Reader().vTableGet(_bc, _bcOffset, 6, 0);
+    return _variantField_6;
+  }
+
+  @override
+  List<int> get compilationUnit_lineStarts {
+    assert(kind == idl.LinkedNodeKind.compilationUnit);
+    _variantField_7 ??=
+        const fb.Uint32ListReader().vTableGet(_bc, _bcOffset, 7, const <int>[]);
+    return _variantField_7;
+  }
+}
+
+abstract class _UnlinkedInformativeDataMixin
+    implements idl.UnlinkedInformativeData {
+  @override
+  Map<String, Object> toJson() {
+    Map<String, Object> _result = <String, Object>{};
+    if (kind != idl.LinkedNodeKind.adjacentStrings)
+      _result["kind"] = kind.toString().split('.')[1];
+    if (kind == idl.LinkedNodeKind.classDeclaration) {
+      if (codeLength != 0) _result["codeLength"] = codeLength;
+      if (codeOffset != 0) _result["codeOffset"] = codeOffset;
+      if (nameOffset != 0) _result["nameOffset"] = nameOffset;
+      if (documentationComment_tokens.isNotEmpty)
+        _result["documentationComment_tokens"] = documentationComment_tokens;
+    }
+    if (kind == idl.LinkedNodeKind.classTypeAlias) {
+      if (codeLength != 0) _result["codeLength"] = codeLength;
+      if (codeOffset != 0) _result["codeOffset"] = codeOffset;
+      if (nameOffset != 0) _result["nameOffset"] = nameOffset;
+      if (documentationComment_tokens.isNotEmpty)
+        _result["documentationComment_tokens"] = documentationComment_tokens;
+    }
+    if (kind == idl.LinkedNodeKind.compilationUnit) {
+      if (codeLength != 0) _result["codeLength"] = codeLength;
+      if (codeOffset != 0) _result["codeOffset"] = codeOffset;
+      if (compilationUnit_lineStarts.isNotEmpty)
+        _result["compilationUnit_lineStarts"] = compilationUnit_lineStarts;
+    }
+    if (kind == idl.LinkedNodeKind.constructorDeclaration) {
+      if (codeLength != 0) _result["codeLength"] = codeLength;
+      if (codeOffset != 0) _result["codeOffset"] = codeOffset;
+      if (nameOffset != 0) _result["nameOffset"] = nameOffset;
+      if (documentationComment_tokens.isNotEmpty)
+        _result["documentationComment_tokens"] = documentationComment_tokens;
+      if (constructorDeclaration_returnTypeOffset != 0)
+        _result["constructorDeclaration_returnTypeOffset"] =
+            constructorDeclaration_returnTypeOffset;
+      if (constructorDeclaration_periodOffset != 0)
+        _result["constructorDeclaration_periodOffset"] =
+            constructorDeclaration_periodOffset;
+    }
+    if (kind == idl.LinkedNodeKind.defaultFormalParameter) {
+      if (codeLength != 0) _result["codeLength"] = codeLength;
+      if (codeOffset != 0) _result["codeOffset"] = codeOffset;
+    }
+    if (kind == idl.LinkedNodeKind.enumConstantDeclaration) {
+      if (nameOffset != 0) _result["nameOffset"] = nameOffset;
+      if (documentationComment_tokens.isNotEmpty)
+        _result["documentationComment_tokens"] = documentationComment_tokens;
+    }
+    if (kind == idl.LinkedNodeKind.enumDeclaration) {
+      if (codeLength != 0) _result["codeLength"] = codeLength;
+      if (codeOffset != 0) _result["codeOffset"] = codeOffset;
+      if (nameOffset != 0) _result["nameOffset"] = nameOffset;
+      if (documentationComment_tokens.isNotEmpty)
+        _result["documentationComment_tokens"] = documentationComment_tokens;
+    }
+    if (kind == idl.LinkedNodeKind.exportDirective) {
+      if (directiveKeywordOffset != 0)
+        _result["directiveKeywordOffset"] = directiveKeywordOffset;
+    }
+    if (kind == idl.LinkedNodeKind.fieldDeclaration) {
+      if (documentationComment_tokens.isNotEmpty)
+        _result["documentationComment_tokens"] = documentationComment_tokens;
+    }
+    if (kind == idl.LinkedNodeKind.fieldFormalParameter) {
+      if (codeLength != 0) _result["codeLength"] = codeLength;
+      if (codeOffset != 0) _result["codeOffset"] = codeOffset;
+      if (nameOffset != 0) _result["nameOffset"] = nameOffset;
+    }
+    if (kind == idl.LinkedNodeKind.functionDeclaration) {
+      if (codeLength != 0) _result["codeLength"] = codeLength;
+      if (codeOffset != 0) _result["codeOffset"] = codeOffset;
+      if (nameOffset != 0) _result["nameOffset"] = nameOffset;
+      if (documentationComment_tokens.isNotEmpty)
+        _result["documentationComment_tokens"] = documentationComment_tokens;
+    }
+    if (kind == idl.LinkedNodeKind.functionTypeAlias) {
+      if (codeLength != 0) _result["codeLength"] = codeLength;
+      if (codeOffset != 0) _result["codeOffset"] = codeOffset;
+      if (nameOffset != 0) _result["nameOffset"] = nameOffset;
+      if (documentationComment_tokens.isNotEmpty)
+        _result["documentationComment_tokens"] = documentationComment_tokens;
+    }
+    if (kind == idl.LinkedNodeKind.functionTypedFormalParameter) {
+      if (codeLength != 0) _result["codeLength"] = codeLength;
+      if (codeOffset != 0) _result["codeOffset"] = codeOffset;
+      if (nameOffset != 0) _result["nameOffset"] = nameOffset;
+    }
+    if (kind == idl.LinkedNodeKind.genericTypeAlias) {
+      if (codeLength != 0) _result["codeLength"] = codeLength;
+      if (codeOffset != 0) _result["codeOffset"] = codeOffset;
+      if (nameOffset != 0) _result["nameOffset"] = nameOffset;
+      if (documentationComment_tokens.isNotEmpty)
+        _result["documentationComment_tokens"] = documentationComment_tokens;
+    }
+    if (kind == idl.LinkedNodeKind.importDirective) {
+      if (directiveKeywordOffset != 0)
+        _result["directiveKeywordOffset"] = directiveKeywordOffset;
+    }
+    if (kind == idl.LinkedNodeKind.libraryDirective) {
+      if (directiveKeywordOffset != 0)
+        _result["directiveKeywordOffset"] = directiveKeywordOffset;
+      if (documentationComment_tokens.isNotEmpty)
+        _result["documentationComment_tokens"] = documentationComment_tokens;
+    }
+    if (kind == idl.LinkedNodeKind.methodDeclaration) {
+      if (codeLength != 0) _result["codeLength"] = codeLength;
+      if (codeOffset != 0) _result["codeOffset"] = codeOffset;
+      if (nameOffset != 0) _result["nameOffset"] = nameOffset;
+      if (documentationComment_tokens.isNotEmpty)
+        _result["documentationComment_tokens"] = documentationComment_tokens;
+    }
+    if (kind == idl.LinkedNodeKind.mixinDeclaration) {
+      if (codeLength != 0) _result["codeLength"] = codeLength;
+      if (codeOffset != 0) _result["codeOffset"] = codeOffset;
+      if (nameOffset != 0) _result["nameOffset"] = nameOffset;
+      if (documentationComment_tokens.isNotEmpty)
+        _result["documentationComment_tokens"] = documentationComment_tokens;
+    }
+    if (kind == idl.LinkedNodeKind.partDirective) {
+      if (directiveKeywordOffset != 0)
+        _result["directiveKeywordOffset"] = directiveKeywordOffset;
+    }
+    if (kind == idl.LinkedNodeKind.partOfDirective) {
+      if (directiveKeywordOffset != 0)
+        _result["directiveKeywordOffset"] = directiveKeywordOffset;
+    }
+    if (kind == idl.LinkedNodeKind.simpleFormalParameter) {
+      if (codeLength != 0) _result["codeLength"] = codeLength;
+      if (codeOffset != 0) _result["codeOffset"] = codeOffset;
+      if (nameOffset != 0) _result["nameOffset"] = nameOffset;
+    }
+    if (kind == idl.LinkedNodeKind.topLevelVariableDeclaration) {
+      if (documentationComment_tokens.isNotEmpty)
+        _result["documentationComment_tokens"] = documentationComment_tokens;
+    }
+    if (kind == idl.LinkedNodeKind.typeParameter) {
+      if (codeLength != 0) _result["codeLength"] = codeLength;
+      if (codeOffset != 0) _result["codeOffset"] = codeOffset;
+      if (nameOffset != 0) _result["nameOffset"] = nameOffset;
+    }
+    if (kind == idl.LinkedNodeKind.variableDeclaration) {
+      if (codeLength != 0) _result["codeLength"] = codeLength;
+      if (codeOffset != 0) _result["codeOffset"] = codeOffset;
+      if (nameOffset != 0) _result["nameOffset"] = nameOffset;
+    }
+    return _result;
+  }
+
+  @override
+  Map<String, Object> toMap() {
+    if (kind == idl.LinkedNodeKind.classDeclaration) {
+      return {
+        "codeLength": codeLength,
+        "codeOffset": codeOffset,
+        "nameOffset": nameOffset,
+        "documentationComment_tokens": documentationComment_tokens,
+        "kind": kind,
+      };
+    }
+    if (kind == idl.LinkedNodeKind.classTypeAlias) {
+      return {
+        "codeLength": codeLength,
+        "codeOffset": codeOffset,
+        "nameOffset": nameOffset,
+        "documentationComment_tokens": documentationComment_tokens,
+        "kind": kind,
+      };
+    }
+    if (kind == idl.LinkedNodeKind.compilationUnit) {
+      return {
+        "codeLength": codeLength,
+        "codeOffset": codeOffset,
+        "kind": kind,
+        "compilationUnit_lineStarts": compilationUnit_lineStarts,
+      };
+    }
+    if (kind == idl.LinkedNodeKind.constructorDeclaration) {
+      return {
+        "codeLength": codeLength,
+        "codeOffset": codeOffset,
+        "nameOffset": nameOffset,
+        "documentationComment_tokens": documentationComment_tokens,
+        "kind": kind,
+        "constructorDeclaration_returnTypeOffset":
+            constructorDeclaration_returnTypeOffset,
+        "constructorDeclaration_periodOffset":
+            constructorDeclaration_periodOffset,
+      };
+    }
+    if (kind == idl.LinkedNodeKind.defaultFormalParameter) {
+      return {
+        "codeLength": codeLength,
+        "codeOffset": codeOffset,
+        "kind": kind,
+      };
+    }
+    if (kind == idl.LinkedNodeKind.enumConstantDeclaration) {
+      return {
+        "nameOffset": nameOffset,
+        "documentationComment_tokens": documentationComment_tokens,
+        "kind": kind,
+      };
+    }
+    if (kind == idl.LinkedNodeKind.enumDeclaration) {
+      return {
+        "codeLength": codeLength,
+        "codeOffset": codeOffset,
+        "nameOffset": nameOffset,
+        "documentationComment_tokens": documentationComment_tokens,
+        "kind": kind,
+      };
+    }
+    if (kind == idl.LinkedNodeKind.exportDirective) {
+      return {
+        "directiveKeywordOffset": directiveKeywordOffset,
+        "kind": kind,
+      };
+    }
+    if (kind == idl.LinkedNodeKind.fieldDeclaration) {
+      return {
+        "documentationComment_tokens": documentationComment_tokens,
+        "kind": kind,
+      };
+    }
+    if (kind == idl.LinkedNodeKind.fieldFormalParameter) {
+      return {
+        "codeLength": codeLength,
+        "codeOffset": codeOffset,
+        "nameOffset": nameOffset,
+        "kind": kind,
+      };
+    }
+    if (kind == idl.LinkedNodeKind.functionDeclaration) {
+      return {
+        "codeLength": codeLength,
+        "codeOffset": codeOffset,
+        "nameOffset": nameOffset,
+        "documentationComment_tokens": documentationComment_tokens,
+        "kind": kind,
+      };
+    }
+    if (kind == idl.LinkedNodeKind.functionTypeAlias) {
+      return {
+        "codeLength": codeLength,
+        "codeOffset": codeOffset,
+        "nameOffset": nameOffset,
+        "documentationComment_tokens": documentationComment_tokens,
+        "kind": kind,
+      };
+    }
+    if (kind == idl.LinkedNodeKind.functionTypedFormalParameter) {
+      return {
+        "codeLength": codeLength,
+        "codeOffset": codeOffset,
+        "nameOffset": nameOffset,
+        "kind": kind,
+      };
+    }
+    if (kind == idl.LinkedNodeKind.genericTypeAlias) {
+      return {
+        "codeLength": codeLength,
+        "codeOffset": codeOffset,
+        "nameOffset": nameOffset,
+        "documentationComment_tokens": documentationComment_tokens,
+        "kind": kind,
+      };
+    }
+    if (kind == idl.LinkedNodeKind.importDirective) {
+      return {
+        "directiveKeywordOffset": directiveKeywordOffset,
+        "kind": kind,
+      };
+    }
+    if (kind == idl.LinkedNodeKind.libraryDirective) {
+      return {
+        "directiveKeywordOffset": directiveKeywordOffset,
+        "documentationComment_tokens": documentationComment_tokens,
+        "kind": kind,
+      };
+    }
+    if (kind == idl.LinkedNodeKind.methodDeclaration) {
+      return {
+        "codeLength": codeLength,
+        "codeOffset": codeOffset,
+        "nameOffset": nameOffset,
+        "documentationComment_tokens": documentationComment_tokens,
+        "kind": kind,
+      };
+    }
+    if (kind == idl.LinkedNodeKind.mixinDeclaration) {
+      return {
+        "codeLength": codeLength,
+        "codeOffset": codeOffset,
+        "nameOffset": nameOffset,
+        "documentationComment_tokens": documentationComment_tokens,
+        "kind": kind,
+      };
+    }
+    if (kind == idl.LinkedNodeKind.partDirective) {
+      return {
+        "directiveKeywordOffset": directiveKeywordOffset,
+        "kind": kind,
+      };
+    }
+    if (kind == idl.LinkedNodeKind.partOfDirective) {
+      return {
+        "directiveKeywordOffset": directiveKeywordOffset,
+        "kind": kind,
+      };
+    }
+    if (kind == idl.LinkedNodeKind.simpleFormalParameter) {
+      return {
+        "codeLength": codeLength,
+        "codeOffset": codeOffset,
+        "nameOffset": nameOffset,
+        "kind": kind,
+      };
+    }
+    if (kind == idl.LinkedNodeKind.topLevelVariableDeclaration) {
+      return {
+        "documentationComment_tokens": documentationComment_tokens,
+        "kind": kind,
+      };
+    }
+    if (kind == idl.LinkedNodeKind.typeParameter) {
+      return {
+        "codeLength": codeLength,
+        "codeOffset": codeOffset,
+        "nameOffset": nameOffset,
+        "kind": kind,
+      };
+    }
+    if (kind == idl.LinkedNodeKind.variableDeclaration) {
+      return {
+        "codeLength": codeLength,
+        "codeOffset": codeOffset,
+        "nameOffset": nameOffset,
+        "kind": kind,
+      };
+    }
+    throw StateError("Unexpected $kind");
+  }
+
+  @override
+  String toString() => convert.json.encode(toJson());
+}
+
 class UnlinkedParamBuilder extends Object
     with _UnlinkedParamMixin
     implements idl.UnlinkedParam {
@@ -26168,6 +26850,7 @@
   bool _hasLibraryDirective;
   bool _hasPartOfDirective;
   List<String> _imports;
+  List<UnlinkedInformativeDataBuilder> _informativeData;
   List<int> _lineStarts;
   List<String> _parts;
 
@@ -26214,6 +26897,14 @@
   }
 
   @override
+  List<UnlinkedInformativeDataBuilder> get informativeData =>
+      _informativeData ??= <UnlinkedInformativeDataBuilder>[];
+
+  set informativeData(List<UnlinkedInformativeDataBuilder> value) {
+    this._informativeData = value;
+  }
+
+  @override
   List<int> get lineStarts => _lineStarts ??= <int>[];
 
   /// Offsets of the first character of each line in the source code.
@@ -26236,6 +26927,7 @@
       bool hasLibraryDirective,
       bool hasPartOfDirective,
       List<String> imports,
+      List<UnlinkedInformativeDataBuilder> informativeData,
       List<int> lineStarts,
       List<String> parts})
       : _apiSignature = apiSignature,
@@ -26243,11 +26935,13 @@
         _hasLibraryDirective = hasLibraryDirective,
         _hasPartOfDirective = hasPartOfDirective,
         _imports = imports,
+        _informativeData = informativeData,
         _lineStarts = lineStarts,
         _parts = parts;
 
   /// Flush [informative] data recursively.
   void flushInformative() {
+    _informativeData?.forEach((b) => b.flushInformative());
     _lineStarts = null;
   }
 
@@ -26287,6 +26981,14 @@
       }
     }
     signature.addBool(this._hasLibraryDirective == true);
+    if (this._informativeData == null) {
+      signature.addInt(0);
+    } else {
+      signature.addInt(this._informativeData.length);
+      for (var x in this._informativeData) {
+        x?.collectApiSignature(signature);
+      }
+    }
   }
 
   List<int> toBuffer() {
@@ -26298,6 +27000,7 @@
     fb.Offset offset_apiSignature;
     fb.Offset offset_exports;
     fb.Offset offset_imports;
+    fb.Offset offset_informativeData;
     fb.Offset offset_lineStarts;
     fb.Offset offset_parts;
     if (!(_apiSignature == null || _apiSignature.isEmpty)) {
@@ -26311,6 +27014,10 @@
       offset_imports = fbBuilder
           .writeList(_imports.map((b) => fbBuilder.writeString(b)).toList());
     }
+    if (!(_informativeData == null || _informativeData.isEmpty)) {
+      offset_informativeData = fbBuilder
+          .writeList(_informativeData.map((b) => b.finish(fbBuilder)).toList());
+    }
     if (!(_lineStarts == null || _lineStarts.isEmpty)) {
       offset_lineStarts = fbBuilder.writeListUint32(_lineStarts);
     }
@@ -26334,6 +27041,9 @@
     if (offset_imports != null) {
       fbBuilder.addOffset(2, offset_imports);
     }
+    if (offset_informativeData != null) {
+      fbBuilder.addOffset(7, offset_informativeData);
+    }
     if (offset_lineStarts != null) {
       fbBuilder.addOffset(5, offset_lineStarts);
     }
@@ -26370,6 +27080,7 @@
   bool _hasLibraryDirective;
   bool _hasPartOfDirective;
   List<String> _imports;
+  List<idl.UnlinkedInformativeData> _informativeData;
   List<int> _lineStarts;
   List<String> _parts;
 
@@ -26409,6 +27120,14 @@
   }
 
   @override
+  List<idl.UnlinkedInformativeData> get informativeData {
+    _informativeData ??= const fb.ListReader<idl.UnlinkedInformativeData>(
+            const _UnlinkedInformativeDataReader())
+        .vTableGet(_bc, _bcOffset, 7, const <idl.UnlinkedInformativeData>[]);
+    return _informativeData;
+  }
+
+  @override
   List<int> get lineStarts {
     _lineStarts ??=
         const fb.Uint32ListReader().vTableGet(_bc, _bcOffset, 5, const <int>[]);
@@ -26434,6 +27153,9 @@
     if (hasPartOfDirective != false)
       _result["hasPartOfDirective"] = hasPartOfDirective;
     if (imports.isNotEmpty) _result["imports"] = imports;
+    if (informativeData.isNotEmpty)
+      _result["informativeData"] =
+          informativeData.map((_value) => _value.toJson()).toList();
     if (lineStarts.isNotEmpty) _result["lineStarts"] = lineStarts;
     if (parts.isNotEmpty) _result["parts"] = parts;
     return _result;
@@ -26446,6 +27168,7 @@
         "hasLibraryDirective": hasLibraryDirective,
         "hasPartOfDirective": hasPartOfDirective,
         "imports": imports,
+        "informativeData": informativeData,
         "lineStarts": lineStarts,
         "parts": parts,
       };
diff --git a/pkg/analyzer/lib/src/summary/format.fbs b/pkg/analyzer/lib/src/summary/format.fbs
index 1230c79..d68ae09 100644
--- a/pkg/analyzer/lib/src/summary/format.fbs
+++ b/pkg/analyzer/lib/src/summary/format.fbs
@@ -1886,8 +1886,6 @@
 
   variantField_2:[LinkedNode] (id: 2);
 
-  variantField_11:LinkedNode (id: 11);
-
   variantField_4:[LinkedNode] (id: 4);
 
   variantField_6:LinkedNode (id: 6);
@@ -1914,18 +1912,12 @@
 
   variantField_13:LinkedNode (id: 13);
 
-  variantField_33:uint (id: 33);
-
-  variantField_32:uint (id: 32);
-
-  variantField_35:[string] (id: 35);
+  variantField_33:[string] (id: 33);
 
   variantField_29:LinkedNodeCommentType (id: 29);
 
   variantField_3:[LinkedNode] (id: 3);
 
-  variantField_19:uint (id: 19);
-
   variantField_10:LinkedNode (id: 10);
 
   variantField_26:LinkedNodeFormalParameterKind (id: 26);
@@ -1938,6 +1930,8 @@
 
   variantField_1:string (id: 1);
 
+  variantField_36:uint (id: 36);
+
   variantField_16:uint (id: 16);
 
   variantField_30:string (id: 30);
@@ -1946,17 +1940,23 @@
 
   kind:LinkedNodeKind (id: 0);
 
-  variantField_36:[string] (id: 36);
+  variantField_34:[string] (id: 34);
+
+  name:string (id: 37);
 
   variantField_20:string (id: 20);
 
   variantField_31:bool (id: 31);
 
-  variantField_37:UnlinkedTokenType (id: 37);
+  variantField_35:UnlinkedTokenType (id: 35);
 
-  variantField_34:TopLevelInferenceError (id: 34);
+  variantField_32:TopLevelInferenceError (id: 32);
+
+  variantField_11:LinkedNode (id: 11);
 
   variantField_22:string (id: 22);
+
+  variantField_19:uint (id: 19);
 }
 
 /// Information about a group of libraries linked together, for example because
@@ -2034,21 +2034,10 @@
 
 /// Information about a single library in a [LinkedNodeLibrary].
 table LinkedNodeUnit {
-  /// All generic function types in the unit - in generic type aliases, or used
-  /// directly as type annotations.
-  ///
-  /// They are requested in two cases: when we are reading a node that contains
-  /// them (e.g. a return type of a method), or when we run over unresolved
-  /// AST in declaration resolver.
-  genericFunctionTypes:[LinkedNode] (id: 5);
-
-  isNNBD:bool (id: 6);
+  isNNBD:bool (id: 4);
 
   isSynthetic:bool (id: 3);
 
-  /// Offsets of the first character of each line in the source code.
-  lineStarts:[uint] (id: 4);
-
   node:LinkedNode (id: 2);
 
   tokens:UnlinkedTokens (id: 1);
@@ -2751,6 +2740,26 @@
   uriOffset:uint (id: 3);
 }
 
+table UnlinkedInformativeData {
+  variantField_2:uint (id: 2);
+
+  variantField_3:uint (id: 3);
+
+  variantField_1:uint (id: 1);
+
+  variantField_4:[string] (id: 4);
+
+  /// The kind of the node.
+  kind:LinkedNodeKind (id: 0);
+
+  variantField_5:uint (id: 5);
+
+  variantField_6:uint (id: 6);
+
+  /// Offsets of the first character of each line in the source code.
+  variantField_7:[uint] (id: 7);
+}
+
 /// Unlinked summary information about a function parameter.
 table UnlinkedParam {
   /// Annotations for this parameter.
@@ -3099,6 +3108,8 @@
   /// URIs of `import` directives.
   imports:[string] (id: 2);
 
+  informativeData:[UnlinkedInformativeData] (id: 7);
+
   /// Offsets of the first character of each line in the source code.
   lineStarts:[uint] (id: 5);
 
diff --git a/pkg/analyzer/lib/src/summary/idl.dart b/pkg/analyzer/lib/src/summary/idl.dart
index 3a60a94..6590b07 100644
--- a/pkg/analyzer/lib/src/summary/idl.dart
+++ b/pkg/analyzer/lib/src/summary/idl.dart
@@ -822,32 +822,6 @@
   @VariantId(2, variant: LinkedNodeKind.adjacentStrings)
   List<LinkedNode> get adjacentStrings_strings;
 
-  @VariantId(11, variantList: [
-    LinkedNodeKind.classDeclaration,
-    LinkedNodeKind.classTypeAlias,
-    LinkedNodeKind.constructorDeclaration,
-    LinkedNodeKind.declaredIdentifier,
-    LinkedNodeKind.enumDeclaration,
-    LinkedNodeKind.enumConstantDeclaration,
-    LinkedNodeKind.exportDirective,
-    LinkedNodeKind.fieldDeclaration,
-    LinkedNodeKind.functionDeclaration,
-    LinkedNodeKind.functionTypeAlias,
-    LinkedNodeKind.genericTypeAlias,
-    LinkedNodeKind.importDirective,
-    LinkedNodeKind.libraryDirective,
-    LinkedNodeKind.methodDeclaration,
-    LinkedNodeKind.mixinDeclaration,
-    LinkedNodeKind.partDirective,
-    LinkedNodeKind.partOfDirective,
-    LinkedNodeKind.topLevelVariableDeclaration,
-    LinkedNodeKind.typeParameter,
-    LinkedNodeKind.variableDeclaration,
-    LinkedNodeKind.variableDeclarationList,
-  ])
-  @informative
-  LinkedNode get annotatedNode_comment;
-
   @VariantId(4, variantList: [
     LinkedNodeKind.classDeclaration,
     LinkedNodeKind.classTypeAlias,
@@ -1017,52 +991,10 @@
   @VariantId(8, variant: LinkedNodeKind.classTypeAlias)
   LinkedNode get classTypeAlias_withClause;
 
-  @VariantId(33, variantList: [
-    LinkedNodeKind.classDeclaration,
-    LinkedNodeKind.classTypeAlias,
-    LinkedNodeKind.compilationUnit,
-    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,
-  ])
-  @informative
-  int get codeLength;
-
-  @VariantId(32, variantList: [
-    LinkedNodeKind.classDeclaration,
-    LinkedNodeKind.classTypeAlias,
-    LinkedNodeKind.compilationUnit,
-    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,
-  ])
-  @informative
-  int get codeOffset;
-
   @VariantId(2, variant: LinkedNodeKind.comment)
   List<LinkedNode> get comment_references;
 
-  @VariantId(35, variant: LinkedNodeKind.comment)
+  @VariantId(33, variant: LinkedNodeKind.comment)
   List<String> get comment_tokens;
 
   @VariantId(29, variant: LinkedNodeKind.comment)
@@ -1104,16 +1036,9 @@
   @VariantId(2, variant: LinkedNodeKind.constructorDeclaration)
   List<LinkedNode> get constructorDeclaration_initializers;
 
-  @VariantId(7, variant: LinkedNodeKind.constructorDeclaration)
-  LinkedNode get constructorDeclaration_name;
-
   @VariantId(8, variant: LinkedNodeKind.constructorDeclaration)
   LinkedNode get constructorDeclaration_parameters;
 
-  @VariantId(19, variant: LinkedNodeKind.constructorDeclaration)
-  @informative
-  int get constructorDeclaration_periodOffset;
-
   @VariantId(9, variant: LinkedNodeKind.constructorDeclaration)
   LinkedNode get constructorDeclaration_redirectedConstructor;
 
@@ -1156,16 +1081,6 @@
   @VariantId(7, variant: LinkedNodeKind.defaultFormalParameter)
   LinkedNode get defaultFormalParameter_parameter;
 
-  @VariantId(17, variantList: [
-    LinkedNodeKind.exportDirective,
-    LinkedNodeKind.importDirective,
-    LinkedNodeKind.libraryDirective,
-    LinkedNodeKind.partDirective,
-    LinkedNodeKind.partOfDirective,
-  ])
-  @informative
-  int get directive_keywordOffset;
-
   @VariantId(6, variant: LinkedNodeKind.doStatement)
   LinkedNode get doStatement_body;
 
@@ -1184,9 +1099,6 @@
   @VariantId(15, variant: LinkedNodeKind.emptyStatement)
   int get emptyStatement_fake;
 
-  @VariantId(6, variant: LinkedNodeKind.enumConstantDeclaration)
-  LinkedNode get enumConstantDeclaration_name;
-
   @VariantId(2, variant: LinkedNodeKind.enumDeclaration)
   List<LinkedNode> get enumDeclaration_constants;
 
@@ -1386,6 +1298,37 @@
   @VariantId(7, variant: LinkedNodeKind.indexExpression)
   LinkedNode get indexExpression_target;
 
+  @VariantId(36, variantList: [
+    LinkedNodeKind.classDeclaration,
+    LinkedNodeKind.classTypeAlias,
+    LinkedNodeKind.compilationUnit,
+    LinkedNodeKind.compilationUnit,
+    LinkedNodeKind.constructorDeclaration,
+    LinkedNodeKind.defaultFormalParameter,
+    LinkedNodeKind.enumConstantDeclaration,
+    LinkedNodeKind.enumDeclaration,
+    LinkedNodeKind.exportDirective,
+    LinkedNodeKind.fieldDeclaration,
+    LinkedNodeKind.fieldFormalParameter,
+    LinkedNodeKind.functionDeclaration,
+    LinkedNodeKind.functionTypedFormalParameter,
+    LinkedNodeKind.functionTypeAlias,
+    LinkedNodeKind.genericTypeAlias,
+    LinkedNodeKind.importDirective,
+    LinkedNodeKind.libraryDirective,
+    LinkedNodeKind.methodDeclaration,
+    LinkedNodeKind.mixinDeclaration,
+    LinkedNodeKind.partDirective,
+    LinkedNodeKind.partOfDirective,
+    LinkedNodeKind.simpleFormalParameter,
+    LinkedNodeKind.topLevelVariableDeclaration,
+    LinkedNodeKind.typeParameter,
+    LinkedNodeKind.variableDeclaration,
+    LinkedNodeKind.variableDeclarationList,
+  ])
+  @informative
+  int get informativeId;
+
   @VariantId(27, variantList: [
     LinkedNodeKind.fieldFormalParameter,
     LinkedNodeKind.functionTypedFormalParameter,
@@ -1469,9 +1412,6 @@
   @VariantId(7, variant: LinkedNodeKind.methodDeclaration)
   LinkedNode get methodDeclaration_formalParameters;
 
-  @VariantId(10, variant: LinkedNodeKind.methodDeclaration)
-  LinkedNode get methodDeclaration_name;
-
   @VariantId(8, variant: LinkedNodeKind.methodDeclaration)
   LinkedNode get methodDeclaration_returnType;
 
@@ -1487,19 +1427,11 @@
   @VariantId(6, variant: LinkedNodeKind.mixinDeclaration)
   LinkedNode get mixinDeclaration_onClause;
 
-  @VariantId(36, variant: LinkedNodeKind.mixinDeclaration)
+  @VariantId(34, variant: LinkedNodeKind.mixinDeclaration)
   List<String> get mixinDeclaration_superInvokedNames;
 
-  @VariantId(10, variantList: [
-    LinkedNodeKind.classDeclaration,
-    LinkedNodeKind.classTypeAlias,
-    LinkedNodeKind.enumDeclaration,
-    LinkedNodeKind.functionDeclaration,
-    LinkedNodeKind.functionTypeAlias,
-    LinkedNodeKind.genericTypeAlias,
-    LinkedNodeKind.mixinDeclaration,
-  ])
-  LinkedNode get namedCompilationUnitMember_name;
+  @Id(37)
+  String get name;
 
   @VariantId(6, variant: LinkedNodeKind.namedExpression)
   LinkedNode get namedExpression_expression;
@@ -1507,7 +1439,7 @@
   @VariantId(7, variant: LinkedNodeKind.namedExpression)
   LinkedNode get namedExpression_name;
 
-  @VariantId(36, variantList: [
+  @VariantId(34, variantList: [
     LinkedNodeKind.hideCombinator,
     LinkedNodeKind.showCombinator,
     LinkedNodeKind.symbolLiteral,
@@ -1538,21 +1470,6 @@
   @VariantId(6, variant: LinkedNodeKind.nativeFunctionBody)
   LinkedNode get nativeFunctionBody_stringLiteral;
 
-  @VariantId(14, variantList: [
-    LinkedNodeKind.fieldFormalParameter,
-    LinkedNodeKind.functionTypedFormalParameter,
-    LinkedNodeKind.simpleFormalParameter,
-  ])
-  @informative
-  LinkedNode get normalFormalParameter_comment;
-
-  @VariantId(9, variantList: [
-    LinkedNodeKind.fieldFormalParameter,
-    LinkedNodeKind.functionTypedFormalParameter,
-    LinkedNodeKind.simpleFormalParameter,
-  ])
-  LinkedNode get normalFormalParameter_identifier;
-
   @VariantId(4, variantList: [
     LinkedNodeKind.fieldFormalParameter,
     LinkedNodeKind.functionTypedFormalParameter,
@@ -1641,13 +1558,6 @@
   @VariantId(23, variant: LinkedNodeKind.simpleIdentifier)
   LinkedNodeType get simpleIdentifier_elementType;
 
-  @VariantId(20, variant: LinkedNodeKind.simpleIdentifier)
-  String get simpleIdentifier_name;
-
-  @VariantId(16, variant: LinkedNodeKind.simpleIdentifier)
-  @informative
-  int get simpleIdentifier_offset;
-
   @VariantId(20, variant: LinkedNodeKind.simpleStringLiteral)
   String get simpleStringLiteral_value;
 
@@ -1663,7 +1573,7 @@
   @VariantId(6, variant: LinkedNodeKind.spreadElement)
   LinkedNode get spreadElement_expression;
 
-  @VariantId(37, variant: LinkedNodeKind.spreadElement)
+  @VariantId(35, variant: LinkedNodeKind.spreadElement)
   UnlinkedTokenType get spreadElement_spreadOperator;
 
   @VariantId(2, variant: LinkedNodeKind.stringInterpolation)
@@ -1705,7 +1615,7 @@
   @VariantId(6, variant: LinkedNodeKind.throwExpression)
   LinkedNode get throwExpression_expression;
 
-  @VariantId(34, variantList: [
+  @VariantId(32, variantList: [
     LinkedNodeKind.simpleFormalParameter,
     LinkedNodeKind.variableDeclaration,
   ])
@@ -1753,12 +1663,14 @@
   @VariantId(23, variant: LinkedNodeKind.typeParameter)
   LinkedNodeType get typeParameter_defaultType;
 
-  @VariantId(7, variant: LinkedNodeKind.typeParameter)
-  LinkedNode get typeParameter_name;
-
   @VariantId(2, variant: LinkedNodeKind.typeParameterList)
   List<LinkedNode> get typeParameterList_typeParameters;
 
+  @VariantId(11, variantList: [
+    LinkedNodeKind.classDeclaration,
+  ])
+  LinkedNode get unused11;
+
   @VariantId(14, variantList: [
     LinkedNodeKind.exportDirective,
     LinkedNodeKind.importDirective,
@@ -1783,9 +1695,6 @@
   @VariantId(6, variant: LinkedNodeKind.variableDeclaration)
   LinkedNode get variableDeclaration_initializer;
 
-  @VariantId(7, variant: LinkedNodeKind.variableDeclaration)
-  LinkedNode get variableDeclaration_name;
-
   @VariantId(6, variant: LinkedNodeKind.variableDeclarationList)
   LinkedNode get variableDeclarationList_type;
 
@@ -2056,26 +1965,12 @@
 
 /// Information about a single library in a [LinkedNodeLibrary].
 abstract class LinkedNodeUnit extends base.SummaryClass {
-  /// All generic function types in the unit - in generic type aliases, or used
-  /// directly as type annotations.
-  ///
-  /// They are requested in two cases: when we are reading a node that contains
-  /// them (e.g. a return type of a method), or when we run over unresolved
-  /// AST in declaration resolver.
-  @Id(5)
-  List<LinkedNode> get genericFunctionTypes;
-
-  @Id(6)
+  @Id(4)
   bool get isNNBD;
 
   @Id(3)
   bool get isSynthetic;
 
-  /// Offsets of the first character of each line in the source code.
-  @informative
-  @Id(4)
-  List<int> get lineStarts;
-
   @Id(2)
   LinkedNode get node;
 
@@ -3630,6 +3525,108 @@
   int get uriOffset;
 }
 
+@Variant('kind')
+abstract class UnlinkedInformativeData extends base.SummaryClass {
+  @VariantId(2, variantList: [
+    LinkedNodeKind.classDeclaration,
+    LinkedNodeKind.classTypeAlias,
+    LinkedNodeKind.compilationUnit,
+    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(3, variantList: [
+    LinkedNodeKind.classDeclaration,
+    LinkedNodeKind.classTypeAlias,
+    LinkedNodeKind.compilationUnit,
+    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(1, variantList: [
+    LinkedNodeKind.exportDirective,
+    LinkedNodeKind.importDirective,
+    LinkedNodeKind.libraryDirective,
+    LinkedNodeKind.partDirective,
+    LinkedNodeKind.partOfDirective,
+  ])
+  int get directiveKeywordOffset;
+
+  @VariantId(4, variantList: [
+    LinkedNodeKind.classDeclaration,
+    LinkedNodeKind.classTypeAlias,
+    LinkedNodeKind.constructorDeclaration,
+    LinkedNodeKind.enumDeclaration,
+    LinkedNodeKind.enumConstantDeclaration,
+    LinkedNodeKind.fieldDeclaration,
+    LinkedNodeKind.functionDeclaration,
+    LinkedNodeKind.functionTypeAlias,
+    LinkedNodeKind.genericTypeAlias,
+    LinkedNodeKind.libraryDirective,
+    LinkedNodeKind.methodDeclaration,
+    LinkedNodeKind.mixinDeclaration,
+    LinkedNodeKind.topLevelVariableDeclaration,
+  ])
+  List<String> get documentationComment_tokens;
+
+  /// The kind of the node.
+  @Id(0)
+  LinkedNodeKind get kind;
+
+  @VariantId(1, variantList: [
+    LinkedNodeKind.classDeclaration,
+    LinkedNodeKind.classTypeAlias,
+    LinkedNodeKind.constructorDeclaration,
+    LinkedNodeKind.enumConstantDeclaration,
+    LinkedNodeKind.enumDeclaration,
+    LinkedNodeKind.fieldFormalParameter,
+    LinkedNodeKind.functionDeclaration,
+    LinkedNodeKind.functionTypedFormalParameter,
+    LinkedNodeKind.functionTypeAlias,
+    LinkedNodeKind.genericTypeAlias,
+    LinkedNodeKind.methodDeclaration,
+    LinkedNodeKind.mixinDeclaration,
+    LinkedNodeKind.simpleFormalParameter,
+    LinkedNodeKind.typeParameter,
+    LinkedNodeKind.variableDeclaration,
+  ])
+  int get nameOffset;
+
+  @VariantId(5, variant: LinkedNodeKind.constructorDeclaration)
+  int get constructorDeclaration_returnTypeOffset;
+
+  @VariantId(6, variant: LinkedNodeKind.constructorDeclaration)
+  int get constructorDeclaration_periodOffset;
+
+  /// Offsets of the first character of each line in the source code.
+  @VariantId(7, variant: LinkedNodeKind.compilationUnit)
+  List<int> get compilationUnit_lineStarts;
+}
+
 /// Unlinked summary information about a function parameter.
 abstract class UnlinkedParam extends base.SummaryClass {
   /// Annotations for this parameter.
@@ -4251,6 +4248,9 @@
   @Id(2)
   List<String> get imports;
 
+  @Id(7)
+  List<UnlinkedInformativeData> get informativeData;
+
   /// Offsets of the first character of each line in the source code.
   @informative
   @Id(5)
diff --git a/pkg/analyzer/lib/src/summary/summary_sdk.dart b/pkg/analyzer/lib/src/summary/summary_sdk.dart
index 516ca6b..e54f587 100644
--- a/pkg/analyzer/lib/src/summary/summary_sdk.dart
+++ b/pkg/analyzer/lib/src/summary/summary_sdk.dart
@@ -148,7 +148,7 @@
   }
 
   @override
-  DartType get bottomType => BottomTypeImpl.instance;
+  DartType get bottomType => BottomTypeImpl.instanceLegacy;
 
   @override
   InterfaceType get deprecatedType {
diff --git a/pkg/analyzer/lib/src/summary2/ast_binary_reader.dart b/pkg/analyzer/lib/src/summary2/ast_binary_reader.dart
index 21464da..44b9e83 100644
--- a/pkg/analyzer/lib/src/summary2/ast_binary_reader.dart
+++ b/pkg/analyzer/lib/src/summary2/ast_binary_reader.dart
@@ -52,67 +52,6 @@
 
   InterfaceType get _stringType => _unitContext.typeProvider.stringType;
 
-  /// This method is invoked by [LinkedUnitContext] to finish reading.
-  void readGenericFunctionTypeFinish(
-    LinkedNode data,
-    GenericFunctionType node,
-  ) {
-    var typeParameterListData = data.genericFunctionType_typeParameters;
-    if (typeParameterListData != null) {
-      var dataList = typeParameterListData.typeParameterList_typeParameters;
-      var typeParameters = node.typeParameters.typeParameters;
-      for (var i = 0; i < dataList.length; ++i) {
-        var data = dataList[i];
-        var node = typeParameters[i];
-        node.bound = _readNode(data.typeParameter_bound);
-      }
-    }
-    node.returnType = readNode(data.genericFunctionType_returnType);
-    node.parameters = _readNode(data.genericFunctionType_formalParameters);
-  }
-
-  /// This method is invoked by [LinkedUnitContext] to perform shallow reading.
-  ///
-  /// It reads [TypeParameter] names, and creates [GenericFunctionType] node,
-  /// so that [LinkedUnitContext] can create elements for these nodes.
-  ///
-  /// But we cannot read the return type and formal parameters yet, until the
-  /// corresponding elements are created.
-  GenericFunctionType readGenericFunctionTypeShallow(LinkedNode data) {
-    TypeParameterList typeParameterList;
-    var typeParameterListData = data.genericFunctionType_typeParameters;
-    if (typeParameterListData != null) {
-      var dataList = typeParameterListData.typeParameterList_typeParameters;
-      var typeParameters = List<TypeParameter>(dataList.length);
-      for (var i = 0; i < dataList.length; ++i) {
-        var data = dataList[i];
-        typeParameters[i] = astFactory.typeParameter(
-          _readNode(data.annotatedNode_comment),
-          _readNodeList(data.annotatedNode_metadata),
-          _readNode(data.typeParameter_name),
-          data.typeParameter_bound != null ? _Tokens.EXTENDS : null,
-          null,
-        );
-      }
-      typeParameterList = astFactory.typeParameterList(
-        _Tokens.LT,
-        typeParameters,
-        _Tokens.GT,
-      );
-    }
-
-    GenericFunctionTypeImpl node = astFactory.genericFunctionType(
-      null,
-      _Tokens.FUNCTION,
-      typeParameterList,
-      null,
-      question:
-          AstBinaryFlags.hasQuestion(data.flags) ? _Tokens.QUESTION : null,
-    );
-    node.type = _readType(data.genericFunctionType_type);
-    return node;
-  }
-
   AstNode readNode(LinkedNode data) {
     timerAstBinaryReader.start();
     try {
@@ -126,6 +65,24 @@
     return _readType(data);
   }
 
+  SimpleIdentifier _declaredIdentifier(LinkedNode data) {
+    var informativeData = _unitContext.getInformativeData(data);
+    var offset = informativeData?.nameOffset ?? 0;
+    return astFactory.simpleIdentifier(
+      TokenFactory.tokenFromString(data.name)..offset = offset,
+      isDeclaration: true,
+    );
+  }
+
+  Token _directiveKeyword(LinkedNode data, Keyword keyword, Token def) {
+    var informativeData = _unitContext.getInformativeData(data);
+    if (informativeData != null) {
+      return TokenFactory.tokenFromKeyword(keyword)
+        ..offset = informativeData.directiveKeywordOffset;
+    }
+    return def;
+  }
+
   Element _elementOfComponents(
     int rawElementIndex,
     LinkedNodeType definingTypeNode,
@@ -312,11 +269,11 @@
     timerAstBinaryReaderClass.start();
     try {
       var node = astFactory.classDeclaration(
-        _readNodeLazy(data.annotatedNode_comment),
+        _readDocumentationComment(data),
         _readNodeListLazy(data.annotatedNode_metadata),
         AstBinaryFlags.isAbstract(data.flags) ? _Tokens.ABSTRACT : null,
         _Tokens.CLASS,
-        _readNode(data.namedCompilationUnitMember_name),
+        _declaredIdentifier(data),
         _readNode(data.classOrMixinDeclaration_typeParameters),
         _readNodeLazy(data.classDeclaration_extendsClause),
         _readNodeLazy(data.classDeclaration_withClause),
@@ -337,10 +294,10 @@
     timerAstBinaryReaderClass.start();
     try {
       var node = astFactory.classTypeAlias(
-        _readNodeLazy(data.annotatedNode_comment),
+        _readDocumentationComment(data),
         _readNodeListLazy(data.annotatedNode_metadata),
         _Tokens.CLASS,
-        _readNode(data.namedCompilationUnitMember_name),
+        _declaredIdentifier(data),
         _readNode(data.classTypeAlias_typeParameters),
         _Tokens.EQ,
         AstBinaryFlags.isAbstract(data.flags) ? _Tokens.ABSTRACT : null,
@@ -419,18 +376,28 @@
   }
 
   ConstructorDeclaration _read_constructorDeclaration(LinkedNode data) {
-    var name = _readNode(data.constructorDeclaration_name);
+    SimpleIdentifier returnType = _readNode(
+      data.constructorDeclaration_returnType,
+    );
+
+    var informativeData = _unitContext.getInformativeData(data);
+    returnType.token.offset =
+        informativeData?.constructorDeclaration_returnTypeOffset ?? 0;
+
     var node = astFactory.constructorDeclaration(
-      _readNodeLazy(data.annotatedNode_comment),
+      _readDocumentationComment(data),
       _readNodeListLazy(data.annotatedNode_metadata),
       AstBinaryFlags.isExternal(data.flags) ? _Tokens.EXTERNAL : null,
       AstBinaryFlags.isConst(data.flags) ? _Tokens.CONST : null,
       AstBinaryFlags.isFactory(data.flags) ? _Tokens.FACTORY : null,
-      _readNode(data.constructorDeclaration_returnType),
-      name != null
-          ? Token(TokenType.PERIOD, data.constructorDeclaration_periodOffset)
+      returnType,
+      data.name.isNotEmpty
+          ? Token(
+              TokenType.PERIOD,
+              informativeData?.constructorDeclaration_periodOffset ?? 0,
+            )
           : null,
-      name,
+      data.name.isNotEmpty ? _declaredIdentifier(data) : null,
       _readNodeLazy(data.constructorDeclaration_parameters),
       _Tokens.choose(
         AstBinaryFlags.hasSeparatorColon(data.flags),
@@ -479,7 +446,7 @@
 
   DeclaredIdentifier _read_declaredIdentifier(LinkedNode data) {
     return astFactory.declaredIdentifier(
-      _readNode(data.annotatedNode_comment),
+      _readDocumentationComment(data),
       _readNodeList(data.annotatedNode_metadata),
       _Tokens.choose(
         AstBinaryFlags.isConst(data.flags),
@@ -542,9 +509,9 @@
 
   EnumConstantDeclaration _read_enumConstantDeclaration(LinkedNode data) {
     var node = astFactory.enumConstantDeclaration(
-      _readNodeLazy(data.annotatedNode_comment),
+      _readDocumentationComment(data),
       _readNodeListLazy(data.annotatedNode_metadata),
-      _readNode(data.enumConstantDeclaration_name),
+      _declaredIdentifier(data),
     );
     LazyEnumConstantDeclaration.setData(node, data);
     return node;
@@ -552,10 +519,10 @@
 
   EnumDeclaration _read_enumDeclaration(LinkedNode data) {
     var node = astFactory.enumDeclaration(
-      _readNodeLazy(data.annotatedNode_comment),
+      _readDocumentationComment(data),
       _readNodeListLazy(data.annotatedNode_metadata),
       _Tokens.ENUM,
-      _readNode(data.namedCompilationUnitMember_name),
+      _declaredIdentifier(data),
       _Tokens.OPEN_CURLY_BRACKET,
       _readNodeListLazy(data.enumDeclaration_constants),
       _Tokens.CLOSE_CURLY_BRACKET,
@@ -569,9 +536,9 @@
     _isReadingDirective = true;
     try {
       var node = astFactory.exportDirective(
-        _readNode(data.annotatedNode_comment),
+        _readDocumentationComment(data),
         _readNodeListLazy(data.annotatedNode_metadata),
-        _Tokens.EXPORT,
+        _directiveKeyword(data, Keyword.EXPORT, _Tokens.EXPORT),
         _readNode(data.uriBasedDirective_uri),
         _readNodeList(data.namespaceDirective_configurations),
         _readNodeList(data.namespaceDirective_combinators),
@@ -620,7 +587,7 @@
 
   FieldDeclaration _read_fieldDeclaration(LinkedNode data) {
     var node = astFactory.fieldDeclaration2(
-      comment: _readNodeLazy(data.annotatedNode_comment),
+      comment: _readDocumentationComment(data),
       covariantKeyword:
           AstBinaryFlags.isCovariant(data.flags) ? _Tokens.COVARIANT : null,
       fieldList: _readNode(data.fieldDeclaration_fields),
@@ -635,7 +602,7 @@
 
   FieldFormalParameter _read_fieldFormalParameter(LinkedNode data) {
     var node = astFactory.fieldFormalParameter2(
-      identifier: _readNode(data.normalFormalParameter_identifier),
+      identifier: _declaredIdentifier(data),
       period: _Tokens.PERIOD,
       thisKeyword: _Tokens.THIS,
       covariantKeyword:
@@ -650,7 +617,7 @@
         _Tokens.VAR,
       ),
       metadata: _readNodeList(data.normalFormalParameter_metadata),
-      comment: _readNode(data.normalFormalParameter_comment),
+      comment: _readDocumentationComment(data),
       type: _readNode(data.fieldFormalParameter_type),
       parameters: _readNode(data.fieldFormalParameter_formalParameters),
       requiredKeyword:
@@ -743,7 +710,7 @@
     timerAstBinaryReaderFunctionDeclaration.start();
     try {
       var node = astFactory.functionDeclaration(
-        _readNodeLazy(data.annotatedNode_comment),
+        _readDocumentationComment(data),
         _readNodeListLazy(data.annotatedNode_metadata),
         AstBinaryFlags.isExternal(data.flags) ? _Tokens.EXTERNAL : null,
         _readNodeLazy(data.functionDeclaration_returnType),
@@ -753,7 +720,7 @@
           AstBinaryFlags.isSet(data.flags),
           _Tokens.SET,
         ),
-        _readNode(data.namedCompilationUnitMember_name),
+        _declaredIdentifier(data),
         _readNodeLazy(data.functionDeclaration_functionExpression),
       );
       LazyFunctionDeclaration.setData(node, data);
@@ -791,11 +758,11 @@
 
   FunctionTypeAlias _read_functionTypeAlias(LinkedNode data) {
     var node = astFactory.functionTypeAlias(
-      _readNodeLazy(data.annotatedNode_comment),
+      _readDocumentationComment(data),
       _readNodeListLazy(data.annotatedNode_metadata),
       _Tokens.TYPEDEF,
       _readNodeLazy(data.functionTypeAlias_returnType),
-      _readNode(data.namedCompilationUnitMember_name),
+      _declaredIdentifier(data),
       _readNode(data.functionTypeAlias_typeParameters),
       _readNodeLazy(data.functionTypeAlias_formalParameters),
       _Tokens.SEMICOLON,
@@ -811,10 +778,10 @@
   FunctionTypedFormalParameter _read_functionTypedFormalParameter(
       LinkedNode data) {
     var node = astFactory.functionTypedFormalParameter2(
-      comment: _readNodeLazy(data.normalFormalParameter_comment),
+      comment: _readDocumentationComment(data),
       covariantKeyword:
           AstBinaryFlags.isCovariant(data.flags) ? _Tokens.COVARIANT : null,
-      identifier: _readNode(data.normalFormalParameter_identifier),
+      identifier: _declaredIdentifier(data),
       metadata: _readNodeListLazy(data.normalFormalParameter_metadata),
       parameters: _readNodeLazy(
         data.functionTypedFormalParameter_formalParameters,
@@ -832,15 +799,66 @@
 
   GenericFunctionType _read_genericFunctionType(LinkedNode data) {
     var id = data.genericFunctionType_id;
-    return _unitContext.getGenericFunctionType(id);
+
+    // Read type parameters, without bounds, to avoid forward references.
+    TypeParameterList typeParameterList;
+    var typeParameterListData = data.genericFunctionType_typeParameters;
+    if (typeParameterListData != null) {
+      var dataList = typeParameterListData.typeParameterList_typeParameters;
+      var typeParameters = List<TypeParameter>(dataList.length);
+      for (var i = 0; i < dataList.length; ++i) {
+        var data = dataList[i];
+        typeParameters[i] = astFactory.typeParameter(
+          _readDocumentationComment(data),
+          _readNodeList(data.annotatedNode_metadata),
+          _declaredIdentifier(data),
+          data.typeParameter_bound != null ? _Tokens.EXTENDS : null,
+          null,
+        );
+      }
+      typeParameterList = astFactory.typeParameterList(
+        _Tokens.LT,
+        typeParameters,
+        _Tokens.GT,
+      );
+    }
+
+    GenericFunctionTypeImpl node = astFactory.genericFunctionType(
+      null,
+      _Tokens.FUNCTION,
+      typeParameterList,
+      null,
+      question:
+          AstBinaryFlags.hasQuestion(data.flags) ? _Tokens.QUESTION : null,
+    );
+    node.type = _readType(data.genericFunctionType_type);
+
+    // Create the node element, so now type parameter elements are available.
+    LazyAst.setGenericFunctionTypeId(node, id);
+    _unitContext.createGenericFunctionTypeElement(id, node);
+
+    // Finish reading.
+    if (typeParameterListData != null) {
+      var dataList = typeParameterListData.typeParameterList_typeParameters;
+      var typeParameters = typeParameterList.typeParameters;
+      for (var i = 0; i < dataList.length; ++i) {
+        var data = dataList[i];
+        var node = typeParameters[i];
+        node.bound = _readNode(data.typeParameter_bound);
+      }
+    }
+    node.returnType = readNode(data.genericFunctionType_returnType);
+    node.parameters = _readNode(data.genericFunctionType_formalParameters);
+
+    return node;
   }
 
   GenericTypeAlias _read_genericTypeAlias(LinkedNode data) {
     var node = astFactory.genericTypeAlias(
-      _readNodeLazy(data.annotatedNode_comment),
+      _readDocumentationComment(data),
       _readNodeListLazy(data.annotatedNode_metadata),
       _Tokens.TYPEDEF,
-      _readNode(data.namedCompilationUnitMember_name),
+      _declaredIdentifier(data),
       _readNode(data.genericTypeAlias_typeParameters),
       _Tokens.EQ,
       _readNodeLazy(data.genericTypeAlias_functionType),
@@ -907,9 +925,9 @@
       }
 
       var node = astFactory.importDirective(
-        _readNode(data.annotatedNode_comment),
+        _readDocumentationComment(data),
         _readNodeListLazy(data.annotatedNode_metadata),
-        _Tokens.IMPORT,
+        _directiveKeyword(data, Keyword.IMPORT, _Tokens.IMPORT),
         _readNode(data.uriBasedDirective_uri),
         _readNodeList(data.namespaceDirective_configurations),
         AstBinaryFlags.isDeferred(data.flags) ? _Tokens.DEFERRED : null,
@@ -1017,7 +1035,7 @@
     _isReadingDirective = true;
     try {
       var node = astFactory.libraryDirective(
-        _readNode(data.annotatedNode_comment),
+        _unitContext.createComment(data),
         _readNodeListLazy(data.annotatedNode_metadata),
         _Tokens.LIBRARY,
         _readNode(data.libraryDirective_name),
@@ -1063,7 +1081,7 @@
 
   MethodDeclaration _read_methodDeclaration(LinkedNode data) {
     var node = astFactory.methodDeclaration(
-      _readNodeLazy(data.annotatedNode_comment),
+      _readDocumentationComment(data),
       _readNodeListLazy(data.annotatedNode_metadata),
       AstBinaryFlags.isExternal(data.flags) ? _Tokens.EXTERNAL : null,
       AstBinaryFlags.isStatic(data.flags) ? _Tokens.STATIC : null,
@@ -1075,7 +1093,7 @@
         _Tokens.SET,
       ),
       AstBinaryFlags.isOperator(data.flags) ? _Tokens.OPERATOR : null,
-      _readNode(data.methodDeclaration_name),
+      _declaredIdentifier(data),
       _readNode(data.methodDeclaration_typeParameters),
       _readNodeLazy(data.methodDeclaration_formalParameters),
       AstBinaryFlags.isAbstract(data.flags)
@@ -1105,10 +1123,10 @@
     timerAstBinaryReaderMixin.start();
     try {
       var node = astFactory.mixinDeclaration(
-        _readNodeLazy(data.annotatedNode_comment),
+        _readDocumentationComment(data),
         _readNodeListLazy(data.annotatedNode_metadata),
         _Tokens.MIXIN,
-        _readNode(data.namedCompilationUnitMember_name),
+        _declaredIdentifier(data),
         _readNode(data.classOrMixinDeclaration_typeParameters),
         _readNodeLazy(data.mixinDeclaration_onClause),
         _readNodeLazy(data.classOrMixinDeclaration_implementsClause),
@@ -1172,7 +1190,7 @@
     _isReadingDirective = true;
     try {
       var node = astFactory.partDirective(
-        _readNode(data.annotatedNode_comment),
+        _readDocumentationComment(data),
         _readNodeListLazy(data.annotatedNode_metadata),
         _Tokens.PART,
         _readNode(data.uriBasedDirective_uri),
@@ -1191,7 +1209,7 @@
     _isReadingDirective = true;
     try {
       var node = astFactory.partOfDirective(
-        _readNode(data.annotatedNode_comment),
+        _readDocumentationComment(data),
         _readNodeListLazy(data.annotatedNode_metadata),
         _Tokens.PART,
         _Tokens.OF,
@@ -1306,11 +1324,11 @@
 
   SimpleFormalParameter _read_simpleFormalParameter(LinkedNode data) {
     SimpleFormalParameterImpl node = astFactory.simpleFormalParameter2(
-      identifier: _readNode(data.normalFormalParameter_identifier),
+      identifier: _declaredIdentifier(data),
       type: _readNode(data.simpleFormalParameter_type),
       covariantKeyword:
           AstBinaryFlags.isCovariant(data.flags) ? _Tokens.COVARIANT : null,
-      comment: _readNode(data.normalFormalParameter_comment),
+      comment: _readDocumentationComment(data),
       metadata: _readNodeList(data.normalFormalParameter_metadata),
       keyword: _Tokens.choose(
         AstBinaryFlags.isConst(data.flags),
@@ -1330,8 +1348,7 @@
 
   SimpleIdentifier _read_simpleIdentifier(LinkedNode data) {
     return astFactory.simpleIdentifier(
-      TokenFactory.tokenFromString(data.simpleIdentifier_name)
-        ..offset = data.simpleIdentifier_offset,
+      TokenFactory.tokenFromString(data.name),
       isDeclaration: AstBinaryFlags.isDeclaration(data.flags),
     )
       ..staticElement = _elementOfComponents(
@@ -1436,7 +1453,7 @@
     timerAstBinaryReaderTopLevelVar.start();
     try {
       var node = astFactory.topLevelVariableDeclaration(
-        _readNodeLazy(data.annotatedNode_comment),
+        _readDocumentationComment(data),
         _readNodeListLazy(data.annotatedNode_metadata),
         _readNode(data.topLevelVariableDeclaration_variableList),
         _Tokens.SEMICOLON,
@@ -1483,9 +1500,9 @@
 
   TypeParameter _read_typeParameter(LinkedNode data) {
     var node = astFactory.typeParameter(
-      _readNodeLazy(data.annotatedNode_comment),
+      _readDocumentationComment(data),
       _readNodeListLazy(data.annotatedNode_metadata),
-      _readNode(data.typeParameter_name),
+      _declaredIdentifier(data),
       _Tokens.EXTENDS,
       _readNodeLazy(data.typeParameter_bound),
     );
@@ -1503,7 +1520,7 @@
 
   VariableDeclaration _read_variableDeclaration(LinkedNode data) {
     var node = astFactory.variableDeclaration(
-      _readNode(data.variableDeclaration_name),
+      _declaredIdentifier(data),
       _Tokens.EQ,
       _readNodeLazy(data.variableDeclaration_initializer),
     );
@@ -1514,7 +1531,7 @@
 
   VariableDeclarationList _read_variableDeclarationList(LinkedNode data) {
     var node = astFactory.variableDeclarationList2(
-      comment: _readNodeLazy(data.annotatedNode_comment),
+      comment: _readDocumentationComment(data),
       keyword: _Tokens.choose(
         AstBinaryFlags.isConst(data.flags),
         _Tokens.CONST,
@@ -1566,6 +1583,10 @@
     );
   }
 
+  Comment _readDocumentationComment(LinkedNode data) {
+    return null;
+  }
+
   AstNode _readNode(LinkedNode data) {
     if (data == null) return null;
 
diff --git a/pkg/analyzer/lib/src/summary2/ast_binary_writer.dart b/pkg/analyzer/lib/src/summary2/ast_binary_writer.dart
index 1b7c7d6..5d3ce26 100644
--- a/pkg/analyzer/lib/src/summary2/ast_binary_writer.dart
+++ b/pkg/analyzer/lib/src/summary2/ast_binary_writer.dart
@@ -12,6 +12,7 @@
 import 'package:analyzer/src/summary/format.dart';
 import 'package:analyzer/src/summary/idl.dart';
 import 'package:analyzer/src/summary2/ast_binary_flags.dart';
+import 'package:analyzer/src/summary2/informative_data.dart';
 import 'package:analyzer/src/summary2/lazy_ast.dart';
 import 'package:analyzer/src/summary2/linking_bundle_context.dart';
 import 'package:analyzer/src/summary2/tokens_writer.dart';
@@ -28,9 +29,6 @@
 class AstBinaryWriter extends ThrowingAstVisitor<LinkedNodeBuilder> {
   final LinkingBundleContext _linkingContext;
 
-  /// The list stored [GenericFunctionType]s, as visited in depth-first order.
-  final List<LinkedNodeBuilder> genericFunctionTypes = [];
-
   /// Is `true` if the current [ClassDeclaration] has a const constructor,
   /// so initializers of final fields should be written.
   bool _hasConstConstructor = false;
@@ -277,8 +275,8 @@
       compilationUnit_declarations: _writeNodeList(node.declarations),
       compilationUnit_directives: _writeNodeList(node.directives),
       compilationUnit_scriptTag: node.scriptTag?.accept(this),
+      informativeId: getInformativeId(node),
     );
-    _storeCodeOffsetLength(builder, node);
     return builder;
   }
 
@@ -310,11 +308,11 @@
   LinkedNodeBuilder visitConstructorDeclaration(ConstructorDeclaration node) {
     var builder = LinkedNodeBuilder.constructorDeclaration(
       constructorDeclaration_initializers: _writeNodeList(node.initializers),
-      constructorDeclaration_name: node.name?.accept(this),
       constructorDeclaration_parameters: node.parameters.accept(this),
       constructorDeclaration_redirectedConstructor:
           node.redirectedConstructor?.accept(this),
       constructorDeclaration_returnType: node.returnType.accept(this),
+      informativeId: getInformativeId(node),
     );
     builder.flags = AstBinaryFlags.encode(
       hasSeparatorColon: node.separator?.type == TokenType.COLON,
@@ -324,11 +322,8 @@
       isExternal: node.externalKeyword != null,
       isFactory: node.factoryKeyword != null,
     );
-    if (node.name != null) {
-      builder..constructorDeclaration_periodOffset = node.period.offset;
-    }
+    builder.name = node.name?.name;
     _storeClassMember(builder, node);
-    _storeCodeOffsetLength(builder, node);
     return builder;
   }
 
@@ -383,15 +378,20 @@
 
   @override
   LinkedNodeBuilder visitDefaultFormalParameter(DefaultFormalParameter node) {
+    var defaultValue = node.defaultValue;
+    if (!_isSerializableExpression(defaultValue)) {
+      defaultValue = null;
+    }
+
     var builder = LinkedNodeBuilder.defaultFormalParameter(
-      defaultFormalParameter_defaultValue: node.defaultValue?.accept(this),
+      defaultFormalParameter_defaultValue: defaultValue?.accept(this),
       defaultFormalParameter_kind: _toParameterKind(node),
       defaultFormalParameter_parameter: node.parameter.accept(this),
+      informativeId: getInformativeId(node),
     );
     builder.flags = AstBinaryFlags.encode(
       hasInitializer: node.defaultValue != null,
     );
-    _storeCodeOffsetLength(builder, node);
     return builder;
   }
 
@@ -432,8 +432,9 @@
   @override
   LinkedNodeBuilder visitEnumConstantDeclaration(EnumConstantDeclaration node) {
     var builder = LinkedNodeBuilder.enumConstantDeclaration(
-      enumConstantDeclaration_name: node.name.accept(this),
+      informativeId: getInformativeId(node),
     );
+    builder..name = node.name.name;
     _storeDeclaration(builder, node);
     return builder;
   }
@@ -494,6 +495,7 @@
   LinkedNodeBuilder visitFieldDeclaration(FieldDeclaration node) {
     var builder = LinkedNodeBuilder.fieldDeclaration(
       fieldDeclaration_fields: node.fields.accept(this),
+      informativeId: getInformativeId(node),
     );
     builder.flags = AstBinaryFlags.encode(
       isCovariant: node.covariantKeyword != null,
@@ -678,10 +680,9 @@
   LinkedNodeBuilder visitGenericFunctionType(GenericFunctionType node) {
     var id = LazyAst.getGenericFunctionTypeId(node);
     assert(id != null);
-    assert(genericFunctionTypes.length == id);
-    genericFunctionTypes.add(null);
 
     var builder = LinkedNodeBuilder.genericFunctionType(
+      genericFunctionType_id: id,
       genericFunctionType_returnType: node.returnType?.accept(this),
       genericFunctionType_typeParameters: node.typeParameters?.accept(this),
       genericFunctionType_formalParameters: node.parameters.accept(this),
@@ -692,12 +693,7 @@
     );
     _writeActualReturnType(builder, node);
 
-    builder.genericFunctionType_id = id;
-    genericFunctionTypes[id] = builder;
-
-    return LinkedNodeBuilder.genericFunctionType(
-      genericFunctionType_id: id,
-    );
+    return builder;
   }
 
   @override
@@ -864,6 +860,7 @@
     timerAstBinaryWriterDirective.start();
     try {
       var builder = LinkedNodeBuilder.libraryDirective(
+        informativeId: getInformativeId(node),
         libraryDirective_name: node.name.accept(this),
       );
       _storeDirective(builder, node);
@@ -903,8 +900,8 @@
       methodDeclaration_returnType: node.returnType?.accept(this),
       methodDeclaration_typeParameters: node.typeParameters?.accept(this),
       methodDeclaration_formalParameters: node.parameters?.accept(this),
-      methodDeclaration_name: node.name.accept(this),
     );
+    builder.name = node.name.name;
     builder.flags = AstBinaryFlags.encode(
       isAbstract: node.body is EmptyFunctionBody,
       isAsync: node.body?.isAsynchronous ?? false,
@@ -916,7 +913,7 @@
       isStatic: node.isStatic,
     );
     _storeClassMember(builder, node);
-    _storeCodeOffsetLength(builder, node);
+    _storeInformativeId(builder, node);
     _writeActualReturnType(builder, node);
     return builder;
   }
@@ -1152,13 +1149,12 @@
     var builder = LinkedNodeBuilder.simpleIdentifier(
       simpleIdentifier_element: elementComponents.rawElement,
       simpleIdentifier_elementType: elementComponents.definingType,
-      simpleIdentifier_name: node.name,
-      simpleIdentifier_offset: node.offset,
       expression_type: _writeType(node.staticType),
     );
     builder.flags = AstBinaryFlags.encode(
       isDeclaration: node is DeclaredSimpleIdentifier,
     );
+    builder.name = node.name;
     return builder;
   }
 
@@ -1263,6 +1259,7 @@
     timerAstBinaryWriterTopVar.start();
     try {
       var builder = LinkedNodeBuilder.topLevelVariableDeclaration(
+        informativeId: getInformativeId(node),
         topLevelVariableDeclaration_variableList: node.variables?.accept(this),
       );
       _storeCompilationUnitMember(builder, node);
@@ -1308,10 +1305,10 @@
     var builder = LinkedNodeBuilder.typeParameter(
       typeParameter_bound: node.bound?.accept(this),
       typeParameter_defaultType: _writeType(LazyAst.getDefaultType(node)),
-      typeParameter_name: node.name.accept(this),
+      informativeId: getInformativeId(node),
     );
+    builder.name = node.name.name;
     _storeDeclaration(builder, node);
-    _storeCodeOffsetLength(builder, node);
     return builder;
   }
 
@@ -1341,12 +1338,13 @@
     }
 
     var builder = LinkedNodeBuilder.variableDeclaration(
-      variableDeclaration_name: node.name.accept(this),
+      informativeId: getInformativeId(node),
       variableDeclaration_initializer: initializer?.accept(this),
     );
     builder.flags = AstBinaryFlags.encode(
       hasInitializer: node.initializer != null,
     );
+    builder.name = node.name.name;
     builder.topLevelTypeInferenceError = LazyAst.getTypeInferenceError(node);
     _writeActualType(builder, node);
     _storeInheritsCovariant(builder, node);
@@ -1366,7 +1364,6 @@
       isVar: node.keyword?.keyword == Keyword.VAR,
     );
     _storeAnnotatedNode(builder, node);
-    _storeCodeOffsetLengthVariables(builder, node);
     return builder;
   }
 
@@ -1434,9 +1431,7 @@
   }
 
   void _storeAnnotatedNode(LinkedNodeBuilder builder, AnnotatedNode node) {
-    builder
-      ..annotatedNode_comment = node.documentationComment?.accept(this)
-      ..annotatedNode_metadata = _writeNodeList(node.metadata);
+    builder.annotatedNode_metadata = _writeNodeList(node.metadata);
   }
 
   void _storeClassMember(LinkedNodeBuilder builder, ClassMember node) {
@@ -1455,23 +1450,6 @@
     _storeIsSimpleBounded(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 _storeCompilationUnitMember(
       LinkedNodeBuilder builder, CompilationUnitMember node) {
     _storeDeclaration(builder, node);
@@ -1486,7 +1464,7 @@
 
   void _storeDirective(LinkedNodeBuilder builder, Directive node) {
     _storeAnnotatedNode(builder, node);
-    builder..directive_keywordOffset = node.keyword.offset;
+    _storeInformativeId(builder, node);
   }
 
   void _storeExpression(LinkedNodeBuilder builder, Expression node) {
@@ -1501,7 +1479,6 @@
   void _storeForLoopParts(LinkedNodeBuilder builder, ForLoopParts node) {}
 
   void _storeFormalParameter(LinkedNodeBuilder builder, FormalParameter node) {
-    _storeCodeOffsetLength(builder, node);
     _writeActualType(builder, node);
   }
 
@@ -1521,6 +1498,10 @@
 
   void _storeFunctionBody(LinkedNodeBuilder builder, FunctionBody node) {}
 
+  void _storeInformativeId(LinkedNodeBuilder builder, AstNode node) {
+    builder.informativeId = getInformativeId(node);
+  }
+
   void _storeInheritsCovariant(LinkedNodeBuilder builder, AstNode node) {
     var value = LazyAst.getInheritsCovariant(node);
     builder.inheritsCovariant = value;
@@ -1544,8 +1525,8 @@
   void _storeNamedCompilationUnitMember(
       LinkedNodeBuilder builder, NamedCompilationUnitMember node) {
     _storeCompilationUnitMember(builder, node);
-    _storeCodeOffsetLength(builder, node);
-    builder.namedCompilationUnitMember_name = node.name.accept(this);
+    _storeInformativeId(builder, node);
+    builder.name = node.name.name;
   }
 
   void _storeNamespaceDirective(
@@ -1561,7 +1542,6 @@
       LinkedNodeBuilder builder, NormalFormalParameter node, Token keyword) {
     _storeFormalParameter(builder, node);
     builder
-      ..normalFormalParameter_comment = node.documentationComment?.accept(this)
       ..flags = AstBinaryFlags.encode(
         isConst: keyword?.type == Keyword.CONST,
         isCovariant: node.covariantKeyword != null,
@@ -1569,8 +1549,9 @@
         isRequired: node.requiredKeyword != null,
         isVar: keyword?.type == Keyword.VAR,
       )
-      ..normalFormalParameter_metadata = _writeNodeList(node.metadata)
-      ..normalFormalParameter_identifier = node.identifier?.accept(this);
+      ..informativeId = getInformativeId(node)
+      ..name = node.identifier?.name
+      ..normalFormalParameter_metadata = _writeNodeList(node.metadata);
   }
 
   void _storeStatement(LinkedNodeBuilder builder, Statement node) {}
@@ -1640,6 +1621,20 @@
     return _linkingContext.writeType(type);
   }
 
+  /// Return `true` if the expression might be successfully serialized.
+  ///
+  /// This does not mean that the expression is constant, it just means that
+  /// we know that it might be serialized and deserialized. For example
+  /// function expressions are problematic, and are not necessary to
+  /// deserialize, so we choose not to do this.
+  static bool _isSerializableExpression(Expression node) {
+    if (node == null) return false;
+
+    var visitor = _IsSerializableExpressionVisitor();
+    node.accept(visitor);
+    return visitor.result;
+  }
+
   static LinkedNodeFormalParameterKind _toParameterKind(FormalParameter node) {
     if (node.isRequiredPositional) {
       return LinkedNodeFormalParameterKind.requiredPositional;
@@ -1662,3 +1657,12 @@
 
   _ElementComponents(this.rawElement, this.definingType);
 }
+
+class _IsSerializableExpressionVisitor extends RecursiveAstVisitor<void> {
+  bool result = true;
+
+  @override
+  void visitFunctionExpression(FunctionExpression node) {
+    result = false;
+  }
+}
diff --git a/pkg/analyzer/lib/src/summary2/ast_text_printer.dart b/pkg/analyzer/lib/src/summary2/ast_text_printer.dart
index eefebe8..586123a 100644
--- a/pkg/analyzer/lib/src/summary2/ast_text_printer.dart
+++ b/pkg/analyzer/lib/src/summary2/ast_text_printer.dart
@@ -478,6 +478,7 @@
     node.identifier.accept(this);
     node.typeParameters?.accept(this);
     node.parameters.accept(this);
+    _token(node.question);
   }
 
   @override
diff --git a/pkg/analyzer/lib/src/summary2/default_value_resolver.dart b/pkg/analyzer/lib/src/summary2/default_value_resolver.dart
index 9fa79b02..fbdeaea 100644
--- a/pkg/analyzer/lib/src/summary2/default_value_resolver.dart
+++ b/pkg/analyzer/lib/src/summary2/default_value_resolver.dart
@@ -5,6 +5,7 @@
 import 'package:analyzer/dart/ast/ast.dart';
 import 'package:analyzer/dart/element/element.dart';
 import 'package:analyzer/dart/element/type.dart';
+import 'package:analyzer/src/dart/element/builder.dart';
 import 'package:analyzer/src/dart/element/element.dart';
 import 'package:analyzer/src/dart/element/type_algebra.dart';
 import 'package:analyzer/src/dart/resolver/scope.dart';
@@ -90,6 +91,8 @@
     }
     if (defaultValue == null) return;
 
+    defaultValue.accept(LocalElementBuilder(ElementHolder(), null));
+
     var contextType = TypeVariableEliminator(_linker.typeProvider)
         .substituteType(parameter.type);
     InferenceContext.setType(defaultValue, contextType);
diff --git a/pkg/analyzer/lib/src/summary2/informative_data.dart b/pkg/analyzer/lib/src/summary2/informative_data.dart
new file mode 100644
index 0000000..a09494f
--- /dev/null
+++ b/pkg/analyzer/lib/src/summary2/informative_data.dart
@@ -0,0 +1,391 @@
+// 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/visitor.dart';
+import 'package:analyzer/src/summary/format.dart';
+
+/// Create informative data for nodes that need it, and set IDs of this
+/// data to the nodes.
+List<UnlinkedInformativeDataBuilder> createInformativeData(
+    CompilationUnit unit) {
+  var visitor = _SetInformativeId();
+  unit.accept(visitor);
+  return visitor.dataList;
+}
+
+/// If [createInformativeData] set the informative data identifier for the
+/// [node], return it, otherwise return zero.
+int getInformativeId(AstNode node) {
+  int id = node.getProperty(_SetInformativeId.ID);
+  return id ?? 0;
+}
+
+class _SetInformativeId extends SimpleAstVisitor<void> {
+  static final String ID = 'informativeId';
+
+  final List<UnlinkedInformativeDataBuilder> dataList = [];
+
+  void setData(AstNode node, UnlinkedInformativeDataBuilder data) {
+    var id = 1 + dataList.length;
+    node.setProperty(ID, id);
+    dataList.add(data);
+  }
+
+  @override
+  void visitClassDeclaration(ClassDeclaration node) {
+    setData(
+      node,
+      UnlinkedInformativeDataBuilder.classDeclaration(
+        codeOffset: node.offset,
+        codeLength: node.length,
+        documentationComment_tokens: _nodeCommentTokens(node),
+        nameOffset: node.name.offset,
+      ),
+    );
+
+    node.typeParameters?.accept(this);
+    node.members.accept(this);
+  }
+
+  @override
+  void visitClassTypeAlias(ClassTypeAlias node) {
+    setData(
+      node,
+      UnlinkedInformativeDataBuilder.classTypeAlias(
+        codeOffset: node.offset,
+        codeLength: node.length,
+        documentationComment_tokens: _nodeCommentTokens(node),
+        nameOffset: node.name.offset,
+      ),
+    );
+
+    node.typeParameters?.accept(this);
+  }
+
+  @override
+  void visitCompilationUnit(CompilationUnit node) {
+    setData(
+      node,
+      UnlinkedInformativeDataBuilder.compilationUnit(
+        codeOffset: node.offset,
+        codeLength: node.length,
+        compilationUnit_lineStarts: node.lineInfo.lineStarts,
+      ),
+    );
+
+    node.directives.accept(this);
+    node.declarations.accept(this);
+  }
+
+  @override
+  void visitConstructorDeclaration(ConstructorDeclaration node) {
+    setData(
+      node,
+      UnlinkedInformativeDataBuilder.constructorDeclaration(
+        codeOffset: node.offset,
+        codeLength: node.length,
+        documentationComment_tokens: _nodeCommentTokens(node),
+        nameOffset: node.name?.offset ?? 0,
+        constructorDeclaration_periodOffset: node.period?.offset ?? 0,
+        constructorDeclaration_returnTypeOffset: node.returnType.offset,
+      ),
+    );
+
+    node.parameters?.accept(this);
+  }
+
+  @override
+  void visitDefaultFormalParameter(DefaultFormalParameter node) {
+    setData(
+      node,
+      UnlinkedInformativeDataBuilder.defaultFormalParameter(
+        codeOffset: node.offset,
+        codeLength: node.length,
+      ),
+    );
+
+    node.parameter.accept(this);
+  }
+
+  @override
+  void visitEnumConstantDeclaration(EnumConstantDeclaration node) {
+    setData(
+      node,
+      UnlinkedInformativeDataBuilder.enumConstantDeclaration(
+        documentationComment_tokens: _nodeCommentTokens(node),
+        nameOffset: node.name.offset,
+      ),
+    );
+  }
+
+  @override
+  void visitEnumDeclaration(EnumDeclaration node) {
+    setData(
+      node,
+      UnlinkedInformativeDataBuilder.enumDeclaration(
+        codeOffset: node.offset,
+        codeLength: node.length,
+        documentationComment_tokens: _nodeCommentTokens(node),
+        nameOffset: node.name.offset,
+      ),
+    );
+
+    node.constants.accept(this);
+  }
+
+  @override
+  void visitExportDirective(ExportDirective node) {
+    setData(
+      node,
+      UnlinkedInformativeDataBuilder.exportDirective(
+        directiveKeywordOffset: node.keyword.offset,
+      ),
+    );
+  }
+
+  @override
+  void visitFieldDeclaration(FieldDeclaration node) {
+    setData(
+      node,
+      UnlinkedInformativeDataBuilder.fieldDeclaration(
+        documentationComment_tokens: _nodeCommentTokens(node),
+      ),
+    );
+
+    node.fields.accept(this);
+  }
+
+  @override
+  void visitFieldFormalParameter(FieldFormalParameter node) {
+    setData(
+      node,
+      UnlinkedInformativeDataBuilder.fieldFormalParameter(
+        codeOffset: node.offset,
+        codeLength: node.length,
+        nameOffset: node.identifier.offset,
+      ),
+    );
+  }
+
+  @override
+  void visitFormalParameterList(FormalParameterList node) {
+    node.parameters.accept(this);
+  }
+
+  @override
+  void visitFunctionDeclaration(FunctionDeclaration node) {
+    setData(
+      node,
+      UnlinkedInformativeDataBuilder.functionDeclaration(
+        codeOffset: node.offset,
+        codeLength: node.length,
+        documentationComment_tokens: _nodeCommentTokens(node),
+        nameOffset: node.name.offset,
+      ),
+    );
+
+    node.functionExpression.accept(this);
+  }
+
+  @override
+  void visitFunctionExpression(FunctionExpression node) {
+    node.typeParameters?.accept(this);
+    node.parameters?.accept(this);
+  }
+
+  @override
+  void visitFunctionTypeAlias(FunctionTypeAlias node) {
+    setData(
+      node,
+      UnlinkedInformativeDataBuilder.functionTypeAlias(
+        codeOffset: node.offset,
+        codeLength: node.length,
+        documentationComment_tokens: _nodeCommentTokens(node),
+        nameOffset: node.name.offset,
+      ),
+    );
+
+    node.typeParameters?.accept(this);
+    node.parameters.accept(this);
+  }
+
+  @override
+  void visitFunctionTypedFormalParameter(FunctionTypedFormalParameter node) {
+    setData(
+      node,
+      UnlinkedInformativeDataBuilder.functionTypedFormalParameter(
+        codeOffset: node.offset,
+        codeLength: node.length,
+        nameOffset: node.identifier.offset,
+      ),
+    );
+  }
+
+  @override
+  void visitGenericFunctionType(GenericFunctionType node) {
+    node.typeParameters?.accept(this);
+    node.parameters.accept(this);
+  }
+
+  @override
+  void visitGenericTypeAlias(GenericTypeAlias node) {
+    setData(
+      node,
+      UnlinkedInformativeDataBuilder.genericTypeAlias(
+        codeOffset: node.offset,
+        codeLength: node.length,
+        documentationComment_tokens: _nodeCommentTokens(node),
+        nameOffset: node.name.offset,
+      ),
+    );
+
+    node.typeParameters?.accept(this);
+    node.functionType?.accept(this);
+  }
+
+  @override
+  void visitImportDirective(ImportDirective node) {
+    setData(
+      node,
+      UnlinkedInformativeDataBuilder.importDirective(
+        directiveKeywordOffset: node.keyword.offset,
+      ),
+    );
+  }
+
+  @override
+  void visitLibraryDirective(LibraryDirective node) {
+    setData(
+      node,
+      UnlinkedInformativeDataBuilder.libraryDirective(
+        documentationComment_tokens: _nodeCommentTokens(node),
+      ),
+    );
+  }
+
+  @override
+  void visitMethodDeclaration(MethodDeclaration node) {
+    setData(
+      node,
+      UnlinkedInformativeDataBuilder.methodDeclaration(
+        codeOffset: node.offset,
+        codeLength: node.length,
+        documentationComment_tokens: _nodeCommentTokens(node),
+        nameOffset: node.name.offset,
+      ),
+    );
+
+    node.typeParameters?.accept(this);
+    node.parameters?.accept(this);
+  }
+
+  @override
+  void visitMixinDeclaration(MixinDeclaration node) {
+    setData(
+      node,
+      UnlinkedInformativeDataBuilder.mixinDeclaration(
+        codeOffset: node.offset,
+        codeLength: node.length,
+        documentationComment_tokens: _nodeCommentTokens(node),
+        nameOffset: node.name.offset,
+      ),
+    );
+
+    node.typeParameters?.accept(this);
+    node.members.accept(this);
+  }
+
+  @override
+  void visitPartDirective(PartDirective node) {
+    setData(
+      node,
+      UnlinkedInformativeDataBuilder.partDirective(
+        directiveKeywordOffset: node.keyword.offset,
+      ),
+    );
+  }
+
+  @override
+  void visitPartOfDirective(PartOfDirective node) {
+    setData(
+      node,
+      UnlinkedInformativeDataBuilder.partDirective(
+        directiveKeywordOffset: node.keyword.offset,
+      ),
+    );
+  }
+
+  @override
+  void visitSimpleFormalParameter(SimpleFormalParameter node) {
+    setData(
+      node,
+      UnlinkedInformativeDataBuilder.simpleFormalParameter(
+        codeOffset: node.offset,
+        codeLength: node.length,
+        nameOffset: node.identifier?.offset ?? 0,
+      ),
+    );
+  }
+
+  @override
+  void visitTopLevelVariableDeclaration(TopLevelVariableDeclaration node) {
+    setData(
+      node,
+      UnlinkedInformativeDataBuilder.topLevelVariableDeclaration(
+        documentationComment_tokens: _nodeCommentTokens(node),
+      ),
+    );
+
+    node.variables.accept(this);
+  }
+
+  @override
+  void visitTypeParameter(TypeParameter node) {
+    setData(
+      node,
+      UnlinkedInformativeDataBuilder.typeParameter(
+        codeOffset: node.offset,
+        codeLength: node.length,
+        nameOffset: node.name.offset,
+      ),
+    );
+  }
+
+  @override
+  void visitTypeParameterList(TypeParameterList node) {
+    node.typeParameters.accept(this);
+  }
+
+  @override
+  void visitVariableDeclaration(VariableDeclaration node) {
+    var variableList = node.parent as VariableDeclarationList;
+    var isFirst = identical(variableList.variables[0], node);
+    var codeOffset = (isFirst ? variableList.parent : node).offset;
+    var codeLength = node.end - codeOffset;
+
+    setData(
+      node,
+      UnlinkedInformativeDataBuilder.variableDeclaration(
+        codeOffset: codeOffset,
+        codeLength: codeLength,
+        nameOffset: node.name.offset,
+      ),
+    );
+  }
+
+  @override
+  void visitVariableDeclarationList(VariableDeclarationList node) {
+    node.variables.accept(this);
+  }
+
+  static List<String> _commentTokens(Comment comment) {
+    if (comment == null) return null;
+    return comment.tokens.map((token) => token.lexeme).toList();
+  }
+
+  static List<String> _nodeCommentTokens(AnnotatedNode node) {
+    return _commentTokens(node.documentationComment);
+  }
+}
diff --git a/pkg/analyzer/lib/src/summary2/lazy_ast.dart b/pkg/analyzer/lib/src/summary2/lazy_ast.dart
index b8d1771..9537838 100644
--- a/pkg/analyzer/lib/src/summary2/lazy_ast.dart
+++ b/pkg/analyzer/lib/src/summary2/lazy_ast.dart
@@ -9,6 +9,7 @@
 import 'package:analyzer/src/summary/idl.dart';
 import 'package:analyzer/src/summary2/ast_binary_flags.dart';
 import 'package:analyzer/src/summary2/ast_binary_reader.dart';
+import 'package:analyzer/src/summary2/linked_unit_context.dart';
 
 /// Accessor for reading AST lazily, or read data that is stored in IDL, but
 /// cannot be stored in AST, like inferred types.
@@ -111,36 +112,34 @@
   }
 
   static int getCodeLength(
-    AstBinaryReader reader,
+    LinkedUnitContext context,
     ClassDeclaration node,
   ) {
-    if (reader.isLazy) {
-      var lazy = get(node);
-      return lazy.data.codeLength;
+    var lazy = get(node);
+    if (lazy != null) {
+      return context.getInformativeData(lazy.data)?.codeLength ?? 0;
     }
     return node.length;
   }
 
   static int getCodeOffset(
-    AstBinaryReader reader,
+    LinkedUnitContext context,
     ClassDeclaration node,
   ) {
-    if (reader.isLazy) {
-      var lazy = get(node);
-      return lazy.data.codeOffset;
+    var lazy = get(node);
+    if (lazy != null) {
+      return context.getInformativeData(lazy.data)?.codeOffset ?? 0;
     }
     return node.offset;
   }
 
   static void readDocumentationComment(
-    AstBinaryReader reader,
+    LinkedUnitContext context,
     ClassDeclaration node,
   ) {
-    var lazy = LazyClassDeclaration.get(node);
+    var lazy = get(node);
     if (lazy != null && !lazy._hasDocumentationComment) {
-      node.documentationComment = reader.readNode(
-        lazy.data.annotatedNode_comment,
-      );
+      node.documentationComment = context.createComment(lazy.data);
       lazy._hasDocumentationComment = true;
     }
   }
@@ -162,7 +161,7 @@
     AstBinaryReader reader,
     ClassDeclaration node,
   ) {
-    var lazy = LazyClassDeclaration.get(node);
+    var lazy = get(node);
     if (lazy != null && !lazy._hasImplementsClause) {
       node.implementsClause = reader.readNode(
         lazy.data.classOrMixinDeclaration_implementsClause,
@@ -175,7 +174,7 @@
     AstBinaryReader reader,
     ClassDeclaration node,
   ) {
-    var lazy = LazyClassDeclaration.get(node);
+    var lazy = get(node);
     if (lazy != null && !lazy._hasMembers) {
       var dataList = lazy.data.classOrMixinDeclaration_members;
       for (var i = 0; i < dataList.length; ++i) {
@@ -190,7 +189,7 @@
     AstBinaryReader reader,
     ClassDeclaration node,
   ) {
-    var lazy = LazyClassDeclaration.get(node);
+    var lazy = get(node);
     if (lazy != null && !lazy._hasMetadata) {
       var dataList = lazy.data.annotatedNode_metadata;
       for (var i = 0; i < dataList.length; ++i) {
@@ -205,7 +204,7 @@
     AstBinaryReader reader,
     ClassDeclaration node,
   ) {
-    var lazy = LazyClassDeclaration.get(node);
+    var lazy = get(node);
     if (lazy != null && !lazy._hasWithClause) {
       node.withClause = reader.readNode(
         lazy.data.classDeclaration_withClause,
@@ -238,36 +237,34 @@
   }
 
   static int getCodeLength(
-    AstBinaryReader reader,
+    LinkedUnitContext context,
     ClassTypeAlias node,
   ) {
-    if (reader.isLazy) {
-      var lazy = get(node);
-      return lazy.data.codeLength;
+    var lazy = get(node);
+    if (lazy != null) {
+      return context.getInformativeData(lazy.data)?.codeLength ?? 0;
     }
     return node.length;
   }
 
   static int getCodeOffset(
-    AstBinaryReader reader,
+    LinkedUnitContext context,
     ClassTypeAlias node,
   ) {
-    if (reader.isLazy) {
-      var lazy = get(node);
-      return lazy.data.codeOffset;
+    var lazy = get(node);
+    if (lazy != null) {
+      return context.getInformativeData(lazy.data)?.codeOffset ?? 0;
     }
     return node.offset;
   }
 
   static void readDocumentationComment(
-    AstBinaryReader reader,
+    LinkedUnitContext context,
     ClassTypeAlias node,
   ) {
-    var lazy = LazyClassTypeAlias.get(node);
+    var lazy = get(node);
     if (lazy != null && !lazy._hasDocumentationComment) {
-      node.documentationComment = reader.readNode(
-        lazy.data.annotatedNode_comment,
-      );
+      node.documentationComment = context.createComment(lazy.data);
       lazy._hasDocumentationComment = true;
     }
   }
@@ -276,7 +273,7 @@
     AstBinaryReader reader,
     ClassTypeAlias node,
   ) {
-    var lazy = LazyClassTypeAlias.get(node);
+    var lazy = get(node);
     if (lazy != null && !lazy._hasImplementsClause) {
       node.implementsClause = reader.readNode(
         lazy.data.classTypeAlias_implementsClause,
@@ -304,14 +301,12 @@
     AstBinaryReader reader,
     ClassTypeAlias node,
   ) {
-    if (reader.isLazy) {
-      var lazy = get(node);
-      if (!lazy._hasSuperclass) {
-        node.superclass = reader.readNode(
-          lazy.data.classTypeAlias_superclass,
-        );
-        lazy._hasSuperclass = true;
-      }
+    var lazy = get(node);
+    if (lazy != null && !lazy._hasSuperclass) {
+      node.superclass = reader.readNode(
+        lazy.data.classTypeAlias_superclass,
+      );
+      lazy._hasSuperclass = true;
     }
   }
 
@@ -319,7 +314,7 @@
     AstBinaryReader reader,
     ClassTypeAlias node,
   ) {
-    var lazy = LazyClassTypeAlias.get(node);
+    var lazy = get(node);
     if (lazy != null && !lazy._hasWithClause) {
       node.withClause = reader.readNode(
         lazy.data.classTypeAlias_withClause,
@@ -346,23 +341,23 @@
   }
 
   static int getCodeLength(
-    AstBinaryReader reader,
+    LinkedUnitContext context,
     CompilationUnit node,
   ) {
-    if (reader.isLazy) {
-      var lazy = get(node);
-      return lazy.data.codeLength;
+    var lazy = get(node);
+    if (lazy != null) {
+      return context.getInformativeData(lazy.data)?.codeLength ?? 0;
     }
     return node.length;
   }
 
   static int getCodeOffset(
-    AstBinaryReader reader,
+    LinkedUnitContext context,
     CompilationUnit node,
   ) {
-    if (reader.isLazy) {
-      var lazy = get(node);
-      return lazy.data.codeOffset;
+    var lazy = get(node);
+    if (lazy != null) {
+      return context.getInformativeData(lazy.data)?.codeOffset ?? 0;
     }
     return node.offset;
   }
@@ -391,23 +386,23 @@
   }
 
   static int getCodeLength(
-    AstBinaryReader reader,
+    LinkedUnitContext context,
     ConstructorDeclaration node,
   ) {
-    if (reader.isLazy) {
-      var lazy = get(node);
-      return lazy.data.codeLength;
+    var lazy = get(node);
+    if (lazy != null) {
+      return context.getInformativeData(lazy.data)?.codeLength ?? 0;
     }
     return node.length;
   }
 
   static int getCodeOffset(
-    AstBinaryReader reader,
+    LinkedUnitContext context,
     ConstructorDeclaration node,
   ) {
-    if (reader.isLazy) {
-      var lazy = get(node);
-      return lazy.data.codeOffset;
+    var lazy = get(node);
+    if (lazy != null) {
+      return context.getInformativeData(lazy.data)?.codeOffset ?? 0;
     }
     return node.offset;
   }
@@ -426,14 +421,12 @@
   }
 
   static void readDocumentationComment(
-    AstBinaryReader reader,
+    LinkedUnitContext context,
     ConstructorDeclaration node,
   ) {
-    var lazy = LazyConstructorDeclaration.get(node);
+    var lazy = get(node);
     if (lazy != null && !lazy._hasDocumentationComment) {
-      node.documentationComment = reader.readNode(
-        lazy.data.annotatedNode_comment,
-      );
+      node.documentationComment = context.createComment(lazy.data);
       lazy._hasDocumentationComment = true;
     }
   }
@@ -442,7 +435,7 @@
     AstBinaryReader reader,
     ConstructorDeclaration node,
   ) {
-    var lazy = LazyConstructorDeclaration.get(node);
+    var lazy = get(node);
     if (lazy != null && !lazy._hasFormalParameters) {
       node.parameters = reader.readNode(
         lazy.data.constructorDeclaration_parameters,
@@ -513,15 +506,6 @@
     return node.getProperty(_key);
   }
 
-  static int getKeywordOffset(Directive node) {
-    var lazy = get(node);
-    if (lazy != null) {
-      return lazy.data.directive_keywordOffset;
-    } else {
-      return node.keyword.offset;
-    }
-  }
-
   static String getSelectedUri(UriBasedDirective node) {
     return node.getProperty(_uriKey);
   }
@@ -565,14 +549,12 @@
   }
 
   static void readDocumentationComment(
-    AstBinaryReader reader,
+    LinkedUnitContext context,
     EnumConstantDeclaration node,
   ) {
     var lazy = get(node);
     if (lazy != null && !lazy._hasDocumentationComment) {
-      node.documentationComment = reader.readNode(
-        lazy.data.annotatedNode_comment,
-      );
+      node.documentationComment = context.createComment(lazy.data);
       lazy._hasDocumentationComment = true;
     }
   }
@@ -613,23 +595,23 @@
   }
 
   static int getCodeLength(
-    AstBinaryReader reader,
+    LinkedUnitContext context,
     EnumDeclaration node,
   ) {
-    if (reader.isLazy) {
-      var lazy = get(node);
-      return lazy.data.codeLength;
+    var lazy = get(node);
+    if (lazy != null) {
+      return context.getInformativeData(lazy.data)?.codeLength ?? 0;
     }
     return node.length;
   }
 
   static int getCodeOffset(
-    AstBinaryReader reader,
+    LinkedUnitContext context,
     EnumDeclaration node,
   ) {
-    if (reader.isLazy) {
-      var lazy = get(node);
-      return lazy.data.codeOffset;
+    var lazy = get(node);
+    if (lazy != null) {
+      return context.getInformativeData(lazy.data)?.codeOffset ?? 0;
     }
     return node.offset;
   }
@@ -650,14 +632,12 @@
   }
 
   static void readDocumentationComment(
-    AstBinaryReader reader,
+    LinkedUnitContext context,
     EnumDeclaration node,
   ) {
     var lazy = get(node);
     if (lazy != null && !lazy._hasDocumentationComment) {
-      node.documentationComment = reader.readNode(
-        lazy.data.annotatedNode_comment,
-      );
+      node.documentationComment = context.createComment(lazy.data);
       lazy._hasDocumentationComment = true;
     }
   }
@@ -697,14 +677,12 @@
   }
 
   static void readDocumentationComment(
-    AstBinaryReader reader,
+    LinkedUnitContext context,
     FieldDeclaration node,
   ) {
     var lazy = get(node);
     if (lazy != null && !lazy._hasDocumentationComment) {
-      node.documentationComment = reader.readNode(
-        lazy.data.annotatedNode_comment,
-      );
+      node.documentationComment = context.createComment(lazy.data);
       lazy._hasDocumentationComment = true;
     }
   }
@@ -748,23 +726,23 @@
   }
 
   static int getCodeLength(
-    AstBinaryReader reader,
+    LinkedUnitContext context,
     FormalParameter node,
   ) {
-    if (reader.isLazy) {
-      var lazy = get(node);
-      return lazy.data.codeLength;
+    var lazy = get(node);
+    if (lazy != null) {
+      return context.getInformativeData(lazy.data)?.codeLength ?? 0;
     }
     return node.length;
   }
 
   static int getCodeOffset(
-    AstBinaryReader reader,
+    LinkedUnitContext context,
     FormalParameter node,
   ) {
-    if (reader.isLazy) {
-      var lazy = get(node);
-      return lazy.data.codeOffset;
+    var lazy = get(node);
+    if (lazy != null) {
+      return context.getInformativeData(lazy.data)?.codeOffset ?? 0;
     }
     return node.offset;
   }
@@ -773,13 +751,11 @@
     AstBinaryReader reader,
     FormalParameter node,
   ) {
-    if (reader.isLazy) {
-      var lazy = get(node);
-      if (!lazy._hasType) {
-        var type = reader.readType(lazy.data.actualType);
-        LazyAst.setType(node, type);
-        lazy._hasType = true;
-      }
+    var lazy = get(node);
+    if (lazy != null && !lazy._hasType) {
+      var type = reader.readType(lazy.data.actualType);
+      LazyAst.setType(node, type);
+      lazy._hasType = true;
     }
     return LazyAst.getType(node);
   }
@@ -795,7 +771,7 @@
   }
 
   static bool hasDefaultValue(DefaultFormalParameter node) {
-    var lazy = LazyFormalParameter.get(node);
+    var lazy = get(node);
     if (lazy != null) {
       return AstBinaryFlags.hasInitializer(lazy.data.flags);
     } else {
@@ -807,14 +783,12 @@
     AstBinaryReader reader,
     DefaultFormalParameter node,
   ) {
-    if (reader.isLazy) {
-      var lazy = LazyFormalParameter.get(node);
-      if (lazy != null && !lazy._hasDefaultValue) {
-        node.defaultValue = reader.readNode(
-          lazy.data.defaultFormalParameter_defaultValue,
-        );
-        lazy._hasDefaultValue = true;
-      }
+    var lazy = get(node);
+    if (lazy != null && !lazy._hasDefaultValue) {
+      node.defaultValue = reader.readNode(
+        lazy.data.defaultFormalParameter_defaultValue,
+      );
+      lazy._hasDefaultValue = true;
     }
   }
 
@@ -856,16 +830,14 @@
     AstBinaryReader reader,
     FormalParameter node,
   ) {
-    if (reader.isLazy) {
-      var lazy = get(node);
-      if (lazy != null && !lazy._hasTypeNode) {
-        if (node is SimpleFormalParameter) {
-          node.type = reader.readNode(
-            lazy.data.simpleFormalParameter_type,
-          );
-        }
-        lazy._hasTypeNode = true;
+    var lazy = get(node);
+    if (lazy != null && !lazy._hasTypeNode) {
+      if (node is SimpleFormalParameter) {
+        node.type = reader.readNode(
+          lazy.data.simpleFormalParameter_type,
+        );
       }
+      lazy._hasTypeNode = true;
     }
   }
 
@@ -891,23 +863,23 @@
   }
 
   static int getCodeLength(
-    AstBinaryReader reader,
+    LinkedUnitContext context,
     FunctionDeclaration node,
   ) {
-    if (reader.isLazy) {
-      var lazy = get(node);
-      return lazy.data.codeLength;
+    var lazy = get(node);
+    if (lazy != null) {
+      return context.getInformativeData(lazy.data)?.codeLength ?? 0;
     }
     return node.length;
   }
 
   static int getCodeOffset(
-    AstBinaryReader reader,
+    LinkedUnitContext context,
     FunctionDeclaration node,
   ) {
-    if (reader.isLazy) {
-      var lazy = get(node);
-      return lazy.data.codeOffset;
+    var lazy = get(node);
+    if (lazy != null) {
+      return context.getInformativeData(lazy.data)?.codeOffset ?? 0;
     }
     return node.offset;
   }
@@ -917,26 +889,24 @@
     FunctionDeclaration node,
   ) {
     readFunctionExpression(reader, node);
-    if (reader.isLazy) {
-      var lazy = get(node);
-      if (!lazy._hasReturnType) {
-        var type = reader.readType(lazy.data.actualReturnType);
-        LazyAst.setReturnType(node, type);
-        lazy._hasReturnType = true;
-      }
+
+    var lazy = get(node);
+    if (lazy != null && !lazy._hasReturnType) {
+      var type = reader.readType(lazy.data.actualReturnType);
+      LazyAst.setReturnType(node, type);
+      lazy._hasReturnType = true;
     }
+
     return LazyAst.getReturnType(node);
   }
 
   static void readDocumentationComment(
-    AstBinaryReader reader,
+    LinkedUnitContext context,
     FunctionDeclaration node,
   ) {
-    var lazy = LazyFunctionDeclaration.get(node);
+    var lazy = get(node);
     if (lazy != null && !lazy._hasDocumentationComment) {
-      node.documentationComment = reader.readNode(
-        lazy.data.annotatedNode_comment,
-      );
+      node.documentationComment = context.createComment(lazy.data);
       lazy._hasDocumentationComment = true;
     }
   }
@@ -946,7 +916,7 @@
     FunctionDeclaration node,
   ) {
     if (node.functionExpression == null) {
-      var lazy = LazyFunctionDeclaration.get(node);
+      var lazy = get(node);
       node.functionExpression = reader.readNode(
         lazy.data.functionDeclaration_functionExpression,
       );
@@ -1068,23 +1038,23 @@
   }
 
   static int getCodeLength(
-    AstBinaryReader reader,
+    LinkedUnitContext context,
     FunctionTypeAlias node,
   ) {
-    if (reader.isLazy) {
-      var lazy = get(node);
-      return lazy.data.codeLength;
+    var lazy = get(node);
+    if (lazy != null) {
+      return context.getInformativeData(lazy.data)?.codeLength ?? 0;
     }
     return node.length;
   }
 
   static int getCodeOffset(
-    AstBinaryReader reader,
+    LinkedUnitContext context,
     FunctionTypeAlias node,
   ) {
-    if (reader.isLazy) {
-      var lazy = get(node);
-      return lazy.data.codeOffset;
+    var lazy = get(node);
+    if (lazy != null) {
+      return context.getInformativeData(lazy.data)?.codeOffset ?? 0;
     }
     return node.offset;
   }
@@ -1097,26 +1067,22 @@
     AstBinaryReader reader,
     FunctionTypeAlias node,
   ) {
-    if (reader.isLazy) {
-      var lazy = get(node);
-      if (!lazy._hasReturnType) {
-        var type = reader.readType(lazy.data.actualReturnType);
-        LazyAst.setReturnType(node, type);
-        lazy._hasReturnType = true;
-      }
+    var lazy = get(node);
+    if (lazy != null && !lazy._hasReturnType) {
+      var type = reader.readType(lazy.data.actualReturnType);
+      LazyAst.setReturnType(node, type);
+      lazy._hasReturnType = true;
     }
     return LazyAst.getReturnType(node);
   }
 
   static void readDocumentationComment(
-    AstBinaryReader reader,
+    LinkedUnitContext context,
     FunctionTypeAlias node,
   ) {
     var lazy = get(node);
     if (lazy != null && !lazy._hasDocumentationComment) {
-      node.documentationComment = reader.readNode(
-        lazy.data.annotatedNode_comment,
-      );
+      node.documentationComment = context.createComment(lazy.data);
       lazy._hasDocumentationComment = true;
     }
   }
@@ -1125,7 +1091,7 @@
     AstBinaryReader reader,
     FunctionTypeAlias node,
   ) {
-    var lazy = LazyFunctionTypeAlias.get(node);
+    var lazy = get(node);
     if (lazy != null && !lazy._hasFormalParameters) {
       node.parameters = reader.readNode(
         lazy.data.functionTypeAlias_formalParameters,
@@ -1189,23 +1155,23 @@
   }
 
   static int getCodeLength(
-    AstBinaryReader reader,
+    LinkedUnitContext context,
     GenericTypeAlias node,
   ) {
-    if (reader.isLazy) {
-      var lazy = get(node);
-      return lazy.data.codeLength;
+    var lazy = get(node);
+    if (lazy != null) {
+      return context.getInformativeData(lazy.data)?.codeLength ?? 0;
     }
     return node.length;
   }
 
   static int getCodeOffset(
-    AstBinaryReader reader,
+    LinkedUnitContext context,
     GenericTypeAlias node,
   ) {
-    if (reader.isLazy) {
-      var lazy = get(node);
-      return lazy.data.codeOffset;
+    var lazy = get(node);
+    if (lazy != null) {
+      return context.getInformativeData(lazy.data)?.codeOffset ?? 0;
     }
     return node.offset;
   }
@@ -1215,14 +1181,12 @@
   }
 
   static void readDocumentationComment(
-    AstBinaryReader reader,
+    LinkedUnitContext context,
     GenericTypeAlias node,
   ) {
     var lazy = get(node);
     if (lazy != null && !lazy._hasDocumentationComment) {
-      node.documentationComment = reader.readNode(
-        lazy.data.annotatedNode_comment,
-      );
+      node.documentationComment = context.createComment(lazy.data);
       lazy._hasDocumentationComment = true;
     }
   }
@@ -1284,23 +1248,23 @@
   }
 
   static int getCodeLength(
-    AstBinaryReader reader,
+    LinkedUnitContext context,
     MethodDeclaration node,
   ) {
-    if (reader.isLazy) {
-      var lazy = get(node);
-      return lazy.data.codeLength;
+    var lazy = get(node);
+    if (lazy != null) {
+      return context.getInformativeData(lazy.data)?.codeLength ?? 0;
     }
     return node.length;
   }
 
   static int getCodeOffset(
-    AstBinaryReader reader,
+    LinkedUnitContext context,
     MethodDeclaration node,
   ) {
-    if (reader.isLazy) {
-      var lazy = get(node);
-      return lazy.data.codeOffset;
+    var lazy = get(node);
+    if (lazy != null) {
+      return context.getInformativeData(lazy.data)?.codeOffset ?? 0;
     }
     return node.offset;
   }
@@ -1309,13 +1273,11 @@
     AstBinaryReader reader,
     MethodDeclaration node,
   ) {
-    if (reader.isLazy) {
-      var lazy = get(node);
-      if (!lazy._hasReturnType) {
-        var type = reader.readType(lazy.data.actualReturnType);
-        LazyAst.setReturnType(node, type);
-        lazy._hasReturnType = true;
-      }
+    var lazy = get(node);
+    if (lazy != null && !lazy._hasReturnType) {
+      var type = reader.readType(lazy.data.actualReturnType);
+      LazyAst.setReturnType(node, type);
+      lazy._hasReturnType = true;
     }
     return LazyAst.getReturnType(node);
   }
@@ -1361,14 +1323,12 @@
   }
 
   static void readDocumentationComment(
-    AstBinaryReader reader,
+    LinkedUnitContext context,
     MethodDeclaration node,
   ) {
-    var lazy = LazyMethodDeclaration.get(node);
+    var lazy = get(node);
     if (lazy != null && !lazy._hasDocumentationComment) {
-      node.documentationComment = reader.readNode(
-        lazy.data.annotatedNode_comment,
-      );
+      node.documentationComment = context.createComment(lazy.data);
       lazy._hasDocumentationComment = true;
     }
   }
@@ -1377,7 +1337,7 @@
     AstBinaryReader reader,
     MethodDeclaration node,
   ) {
-    var lazy = LazyMethodDeclaration.get(node);
+    var lazy = get(node);
     if (lazy != null && !lazy._hasFormalParameters) {
       node.parameters = reader.readNode(
         lazy.data.methodDeclaration_formalParameters,
@@ -1460,36 +1420,34 @@
   }
 
   static int getCodeLength(
-    AstBinaryReader reader,
+    LinkedUnitContext context,
     MixinDeclaration node,
   ) {
-    if (reader.isLazy) {
-      var lazy = get(node);
-      return lazy.data.codeLength;
+    var lazy = get(node);
+    if (lazy != null) {
+      return context.getInformativeData(lazy.data)?.codeLength ?? 0;
     }
     return node.length;
   }
 
   static int getCodeOffset(
-    AstBinaryReader reader,
+    LinkedUnitContext context,
     MixinDeclaration node,
   ) {
-    if (reader.isLazy) {
-      var lazy = get(node);
-      return lazy.data.codeOffset;
+    var lazy = get(node);
+    if (lazy != null) {
+      return context.getInformativeData(lazy.data)?.codeOffset ?? 0;
     }
     return node.offset;
   }
 
   static void readDocumentationComment(
-    AstBinaryReader reader,
+    LinkedUnitContext context,
     MixinDeclaration node,
   ) {
     var lazy = get(node);
     if (lazy.data != null && !lazy._hasDocumentationComment) {
-      node.documentationComment = reader.readNode(
-        lazy.data.annotatedNode_comment,
-      );
+      node.documentationComment = context.createComment(lazy.data);
       lazy._hasDocumentationComment = true;
     }
   }
@@ -1526,7 +1484,7 @@
     AstBinaryReader reader,
     MixinDeclaration node,
   ) {
-    var lazy = LazyMixinDeclaration.get(node);
+    var lazy = get(node);
     if (lazy.data != null && !lazy._hasMetadata) {
       var dataList = lazy.data.annotatedNode_metadata;
       for (var i = 0; i < dataList.length; ++i) {
@@ -1566,14 +1524,12 @@
   }
 
   static void readDocumentationComment(
-    AstBinaryReader reader,
+    LinkedUnitContext context,
     TopLevelVariableDeclaration node,
   ) {
     var lazy = get(node);
     if (lazy != null && !lazy._hasDocumentationComment) {
-      node.documentationComment = reader.readNode(
-        lazy.data.annotatedNode_comment,
-      );
+      node.documentationComment = context.createComment(lazy.data);
       lazy._hasDocumentationComment = true;
     }
   }
@@ -1614,23 +1570,23 @@
   }
 
   static int getCodeLength(
-    AstBinaryReader reader,
+    LinkedUnitContext context,
     TypeParameter node,
   ) {
-    if (reader.isLazy) {
-      var lazy = get(node);
-      return lazy.data.codeLength;
+    var lazy = get(node);
+    if (lazy != null) {
+      return context.getInformativeData(lazy.data)?.codeLength ?? 0;
     }
     return node.length;
   }
 
   static int getCodeOffset(
-    AstBinaryReader reader,
+    LinkedUnitContext context,
     TypeParameter node,
   ) {
-    if (reader.isLazy) {
-      var lazy = get(node);
-      return lazy.data.codeOffset;
+    var lazy = get(node);
+    if (lazy != null) {
+      return context.getInformativeData(lazy.data)?.codeOffset ?? 0;
     }
     return node.offset;
   }
@@ -1690,12 +1646,12 @@
   }
 
   static int getCodeLength(
-    AstBinaryReader reader,
+    LinkedUnitContext context,
     VariableDeclaration node,
   ) {
-    if (reader.isLazy) {
-      var lazy = get(node);
-      return lazy.data.codeLength;
+    var lazy = get(node);
+    if (lazy != null) {
+      return context.getInformativeData(lazy.data)?.codeLength ?? 0;
     }
     VariableDeclarationList parent = node.parent;
     if (parent.variables[0] == node) {
@@ -1706,12 +1662,12 @@
   }
 
   static int getCodeOffset(
-    AstBinaryReader reader,
+    LinkedUnitContext context,
     VariableDeclaration node,
   ) {
-    if (reader.isLazy) {
-      var lazy = get(node);
-      return lazy.data.codeOffset;
+    var lazy = get(node);
+    if (lazy != null) {
+      return context.getInformativeData(lazy.data)?.codeOffset ?? 0;
     }
     VariableDeclarationList parent = node.parent;
     if (parent.variables[0] == node) {
@@ -1725,13 +1681,11 @@
     AstBinaryReader reader,
     VariableDeclaration node,
   ) {
-    if (reader.isLazy) {
-      var lazy = get(node);
-      if (!lazy._hasType) {
-        var type = reader.readType(lazy.data.actualType);
-        LazyAst.setType(node, type);
-        lazy._hasType = true;
-      }
+    var lazy = get(node);
+    if (lazy != null && !lazy._hasType) {
+      var type = reader.readType(lazy.data.actualType);
+      LazyAst.setType(node, type);
+      lazy._hasType = true;
     }
     return LazyAst.getType(node);
   }
@@ -1760,14 +1714,12 @@
     AstBinaryReader reader,
     VariableDeclaration node,
   ) {
-    if (reader.isLazy) {
-      var lazy = get(node);
-      if (lazy != null && !lazy._hasInitializer) {
-        node.initializer = reader.readNode(
-          lazy.data.variableDeclaration_initializer,
-        );
-        lazy._hasInitializer = true;
-      }
+    var lazy = get(node);
+    if (lazy != null && !lazy._hasInitializer) {
+      node.initializer = reader.readNode(
+        lazy.data.variableDeclaration_initializer,
+      );
+      lazy._hasInitializer = true;
     }
   }
 
@@ -1793,14 +1745,12 @@
     AstBinaryReader reader,
     VariableDeclarationList node,
   ) {
-    if (reader.isLazy) {
-      var lazy = get(node);
-      if (!lazy._hasTypeNode) {
-        node.type = reader.readNode(
-          lazy.data.variableDeclarationList_type,
-        );
-        lazy._hasTypeNode = true;
-      }
+    var lazy = get(node);
+    if (lazy != null && !lazy._hasTypeNode) {
+      node.type = reader.readNode(
+        lazy.data.variableDeclarationList_type,
+      );
+      lazy._hasTypeNode = true;
     }
   }
 
diff --git a/pkg/analyzer/lib/src/summary2/link.dart b/pkg/analyzer/lib/src/summary2/link.dart
index 7d9f6f5..af4948d 100644
--- a/pkg/analyzer/lib/src/summary2/link.dart
+++ b/pkg/analyzer/lib/src/summary2/link.dart
@@ -189,10 +189,8 @@
           LinkedNodeUnitBuilder(
             isSynthetic: unitContext.isSynthetic,
             uriStr: unitContext.uriStr,
-            lineStarts: unit.lineInfo.lineStarts,
             node: unitLinkedNode,
             isNNBD: unit.featureSet.isEnabled(Feature.non_nullable),
-            genericFunctionTypes: writer.genericFunctionTypes,
           ),
         );
       }
diff --git a/pkg/analyzer/lib/src/summary2/linked_bundle_context.dart b/pkg/analyzer/lib/src/summary2/linked_bundle_context.dart
index 7688746..4c218be 100644
--- a/pkg/analyzer/lib/src/summary2/linked_bundle_context.dart
+++ b/pkg/analyzer/lib/src/summary2/linked_bundle_context.dart
@@ -5,6 +5,7 @@
 import 'package:analyzer/dart/element/element.dart';
 import 'package:analyzer/src/summary/format.dart';
 import 'package:analyzer/src/summary/idl.dart';
+import 'package:analyzer/src/summary2/informative_data.dart';
 import 'package:analyzer/src/summary2/link.dart';
 import 'package:analyzer/src/summary2/linked_element_factory.dart';
 import 'package:analyzer/src/summary2/linked_unit_context.dart';
@@ -72,6 +73,7 @@
       var source = inputUnit.source;
       var uriStr = source != null ? '${source.uri}' : '';
       var reference = unitRef.getChild(uriStr);
+      createInformativeData(inputUnit.unit);
       libraryContext.units.add(
         LinkedUnitContext(
           this,
diff --git a/pkg/analyzer/lib/src/summary2/linked_element_factory.dart b/pkg/analyzer/lib/src/summary2/linked_element_factory.dart
index 9ce9558..e1561c0 100644
--- a/pkg/analyzer/lib/src/summary2/linked_element_factory.dart
+++ b/pkg/analyzer/lib/src/summary2/linked_element_factory.dart
@@ -5,10 +5,10 @@
 import 'package:analyzer/dart/analysis/session.dart';
 import 'package:analyzer/dart/ast/ast.dart';
 import 'package:analyzer/dart/element/element.dart';
-import 'package:analyzer/src/dart/ast/ast.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/core_types.dart';
 import 'package:analyzer/src/summary2/linked_bundle_context.dart';
 import 'package:analyzer/src/summary2/linked_unit_context.dart';
@@ -103,6 +103,23 @@
       rootReference.removeChild(uriStr);
     }
   }
+
+  /// Set optional informative data for the unit.
+  void setInformativeData(
+    String libraryUriStr,
+    String unitUriStr,
+    List<UnlinkedInformativeData> informativeData,
+  ) {
+    var libraryContext = libraryMap[libraryUriStr];
+    if (libraryContext != null) {
+      for (var unitContext in libraryContext.units) {
+        if (unitContext.uriStr == unitUriStr) {
+          unitContext.informativeData = informativeData;
+          return;
+        }
+      }
+    }
+  }
 }
 
 class _ElementRequest {
@@ -148,14 +165,6 @@
       return _function(enclosing, reference);
     }
 
-    if (parentName == '@genericFunctionType') {
-      CompilationUnitElementImpl enclosing = elementOfReference(parent2);
-      var context = enclosing.linkedContext;
-      var id = int.parse(reference.name);
-      GenericFunctionTypeImpl node = context.getGenericFunctionType(id);
-      return node.declaredElement as GenericFunctionTypeElementImpl;
-    }
-
     if (parentName == '@getter' || parentName == '@setter') {
       var enclosing = elementOfReference(parent2);
       return _accessor(enclosing, reference);
diff --git a/pkg/analyzer/lib/src/summary2/linked_unit_context.dart b/pkg/analyzer/lib/src/summary2/linked_unit_context.dart
index 4f1d87f..2f285f7 100644
--- a/pkg/analyzer/lib/src/summary2/linked_unit_context.dart
+++ b/pkg/analyzer/lib/src/summary2/linked_unit_context.dart
@@ -4,6 +4,7 @@
 
 import 'package:analyzer/dart/analysis/features.dart';
 import 'package:analyzer/dart/ast/ast.dart';
+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/source/line_info.dart';
@@ -11,6 +12,7 @@
 import 'package:analyzer/src/dart/element/element.dart';
 import 'package:analyzer/src/dart/element/type.dart';
 import 'package:analyzer/src/generated/resolver.dart';
+import 'package:analyzer/src/generated/testing/token_factory.dart';
 import 'package:analyzer/src/generated/utilities_dart.dart';
 import 'package:analyzer/src/summary/idl.dart';
 import 'package:analyzer/src/summary2/ast_binary_reader.dart';
@@ -28,9 +30,8 @@
   final bool isSynthetic;
   final LinkedNodeUnit data;
 
-  /// This list is filled lazily with [GenericFunctionType] nodes as they
-  /// are requested by [getGenericFunctionType].
-  List<GenericFunctionType> _genericFunctionTypeNodeList;
+  /// Optional informative data for the unit.
+  List<UnlinkedInformativeData> informativeData;
 
   AstBinaryReader _astReader;
 
@@ -57,12 +58,6 @@
     _astReader = AstBinaryReader(this);
     _astReader.isLazy = unit == null;
 
-    if (data != null) {
-      _genericFunctionTypeNodeList = List<GenericFunctionType>(
-        data.genericFunctionTypes.length,
-      );
-    }
-
     _unit = unit;
     _hasDirectivesRead = _unit != null;
   }
@@ -93,7 +88,8 @@
     if (_unit == null) {
       _unit = _astReader.readNode(data.node);
 
-      var lineStarts = data.lineStarts;
+      var informativeData = getInformativeData(data.node);
+      var lineStarts = informativeData?.compilationUnit_lineStarts ?? [];
       if (lineStarts.isEmpty) {
         lineStarts = [0];
       }
@@ -114,6 +110,30 @@
     return _unit;
   }
 
+  void createGenericFunctionTypeElement(int id, GenericFunctionTypeImpl node) {
+    var containerRef = this.reference.getChild('@genericFunctionType');
+    var reference = containerRef.getChild('$id');
+    var element = GenericFunctionTypeElementImpl.forLinkedNode(
+      this.reference.element,
+      reference,
+      node,
+    );
+    node.declaredElement = element;
+  }
+
+  Comment createComment(LinkedNode data) {
+    var informativeData = getInformativeData(data);
+    var tokenStringList = informativeData?.documentationComment_tokens;
+    if (tokenStringList == null || tokenStringList.isEmpty) {
+      return null;
+    }
+
+    var tokens = tokenStringList
+        .map((lexeme) => TokenFactory.tokenFromString(lexeme))
+        .toList();
+    return astFactory.documentationComment(tokens);
+  }
+
   /// Return the [LibraryElement] referenced in the [node].
   LibraryElement directiveLibrary(UriBasedDirective node) {
     var uriStr = LazyDirective.getSelectedUri(node);
@@ -123,66 +143,66 @@
 
   int getCodeLength(AstNode node) {
     if (node is ClassDeclaration) {
-      return LazyClassDeclaration.getCodeLength(_astReader, node);
+      return LazyClassDeclaration.getCodeLength(this, node);
     } else if (node is ClassTypeAlias) {
-      return LazyClassTypeAlias.getCodeLength(_astReader, node);
+      return LazyClassTypeAlias.getCodeLength(this, node);
     } else if (node is CompilationUnit) {
       if (data != null) {
-        return data.node.codeLength;
+        return getInformativeData(data.node)?.codeLength ?? 0;
       } else {
         return node.length;
       }
     } else if (node is ConstructorDeclaration) {
-      return LazyConstructorDeclaration.getCodeLength(_astReader, node);
+      return LazyConstructorDeclaration.getCodeLength(this, node);
     } else if (node is EnumDeclaration) {
-      return LazyEnumDeclaration.getCodeLength(_astReader, node);
+      return LazyEnumDeclaration.getCodeLength(this, node);
     } else if (node is FormalParameter) {
-      return LazyFormalParameter.getCodeLength(_astReader, node);
+      return LazyFormalParameter.getCodeLength(this, node);
     } else if (node is FunctionDeclaration) {
-      return LazyFunctionDeclaration.getCodeLength(_astReader, node);
+      return LazyFunctionDeclaration.getCodeLength(this, node);
     } else if (node is FunctionTypeAliasImpl) {
-      return LazyFunctionTypeAlias.getCodeLength(_astReader, node);
+      return LazyFunctionTypeAlias.getCodeLength(this, node);
     } else if (node is GenericTypeAlias) {
-      return LazyGenericTypeAlias.getCodeLength(_astReader, node);
+      return LazyGenericTypeAlias.getCodeLength(this, node);
     } else if (node is MethodDeclaration) {
-      return LazyMethodDeclaration.getCodeLength(_astReader, node);
+      return LazyMethodDeclaration.getCodeLength(this, node);
     } else if (node is MixinDeclaration) {
-      return LazyMixinDeclaration.getCodeLength(_astReader, node);
+      return LazyMixinDeclaration.getCodeLength(this, node);
     } else if (node is TypeParameter) {
-      return LazyTypeParameter.getCodeLength(_astReader, node);
+      return LazyTypeParameter.getCodeLength(this, node);
     } else if (node is VariableDeclaration) {
-      return LazyVariableDeclaration.getCodeLength(_astReader, node);
+      return LazyVariableDeclaration.getCodeLength(this, node);
     }
     throw UnimplementedError('${node.runtimeType}');
   }
 
   int getCodeOffset(AstNode node) {
     if (node is ClassDeclaration) {
-      return LazyClassDeclaration.getCodeOffset(_astReader, node);
+      return LazyClassDeclaration.getCodeOffset(this, node);
     } else if (node is ClassTypeAlias) {
-      return LazyClassTypeAlias.getCodeOffset(_astReader, node);
+      return LazyClassTypeAlias.getCodeOffset(this, node);
     } else if (node is CompilationUnit) {
       return 0;
     } else if (node is ConstructorDeclaration) {
-      return LazyConstructorDeclaration.getCodeOffset(_astReader, node);
+      return LazyConstructorDeclaration.getCodeOffset(this, node);
     } else if (node is EnumDeclaration) {
-      return LazyEnumDeclaration.getCodeOffset(_astReader, node);
+      return LazyEnumDeclaration.getCodeOffset(this, node);
     } else if (node is FormalParameter) {
-      return LazyFormalParameter.getCodeOffset(_astReader, node);
+      return LazyFormalParameter.getCodeOffset(this, node);
     } else if (node is FunctionDeclaration) {
-      return LazyFunctionDeclaration.getCodeOffset(_astReader, node);
+      return LazyFunctionDeclaration.getCodeOffset(this, node);
     } else if (node is FunctionTypeAliasImpl) {
-      return LazyFunctionTypeAlias.getCodeOffset(_astReader, node);
+      return LazyFunctionTypeAlias.getCodeOffset(this, node);
     } else if (node is GenericTypeAlias) {
-      return LazyGenericTypeAlias.getCodeOffset(_astReader, node);
+      return LazyGenericTypeAlias.getCodeOffset(this, node);
     } else if (node is MethodDeclaration) {
-      return LazyMethodDeclaration.getCodeOffset(_astReader, node);
+      return LazyMethodDeclaration.getCodeOffset(this, node);
     } else if (node is MixinDeclaration) {
-      return LazyMixinDeclaration.getCodeOffset(_astReader, node);
+      return LazyMixinDeclaration.getCodeOffset(this, node);
     } else if (node is TypeParameter) {
-      return LazyTypeParameter.getCodeOffset(_astReader, node);
+      return LazyTypeParameter.getCodeOffset(this, node);
     } else if (node is VariableDeclaration) {
-      return LazyVariableDeclaration.getCodeOffset(_astReader, node);
+      return LazyVariableDeclaration.getCodeOffset(this, node);
     }
     throw UnimplementedError('${node.runtimeType}');
   }
@@ -222,49 +242,49 @@
     return null;
   }
 
-  int getDirectiveOffset(AstNode node) {
-    return LazyDirective.getKeywordOffset(node);
+  int getDirectiveOffset(Directive node) {
+    return node.keyword.offset;
   }
 
   Comment getDocumentationComment(AstNode node) {
     if (node is ClassDeclaration) {
-      LazyClassDeclaration.readDocumentationComment(_astReader, node);
+      LazyClassDeclaration.readDocumentationComment(this, node);
       return node.documentationComment;
     } else if (node is ClassTypeAlias) {
-      LazyClassTypeAlias.readDocumentationComment(_astReader, node);
+      LazyClassTypeAlias.readDocumentationComment(this, node);
       return node.documentationComment;
     } else if (node is ConstructorDeclaration) {
-      LazyConstructorDeclaration.readDocumentationComment(_astReader, node);
+      LazyConstructorDeclaration.readDocumentationComment(this, node);
       return node.documentationComment;
     } else if (node is EnumConstantDeclaration) {
-      LazyEnumConstantDeclaration.readDocumentationComment(_astReader, node);
+      LazyEnumConstantDeclaration.readDocumentationComment(this, node);
       return node.documentationComment;
     } else if (node is EnumDeclaration) {
-      LazyEnumDeclaration.readDocumentationComment(_astReader, node);
+      LazyEnumDeclaration.readDocumentationComment(this, node);
       return node.documentationComment;
     } else if (node is FunctionDeclaration) {
-      LazyFunctionDeclaration.readDocumentationComment(_astReader, node);
+      LazyFunctionDeclaration.readDocumentationComment(this, node);
       return node.documentationComment;
     } else if (node is FunctionTypeAlias) {
-      LazyFunctionTypeAlias.readDocumentationComment(_astReader, node);
+      LazyFunctionTypeAlias.readDocumentationComment(this, node);
       return node.documentationComment;
     } else if (node is GenericTypeAlias) {
-      LazyGenericTypeAlias.readDocumentationComment(_astReader, node);
+      LazyGenericTypeAlias.readDocumentationComment(this, node);
       return node.documentationComment;
     } else if (node is MethodDeclaration) {
-      LazyMethodDeclaration.readDocumentationComment(_astReader, node);
+      LazyMethodDeclaration.readDocumentationComment(this, node);
       return node.documentationComment;
     } else if (node is MixinDeclaration) {
-      LazyMixinDeclaration.readDocumentationComment(_astReader, node);
+      LazyMixinDeclaration.readDocumentationComment(this, node);
       return node.documentationComment;
     } else if (node is VariableDeclaration) {
       var parent2 = node.parent.parent;
       if (parent2 is FieldDeclaration) {
-        LazyFieldDeclaration.readDocumentationComment(_astReader, parent2);
+        LazyFieldDeclaration.readDocumentationComment(this, parent2);
         return parent2.documentationComment;
       } else if (parent2 is TopLevelVariableDeclaration) {
         LazyTopLevelVariableDeclaration.readDocumentationComment(
-          _astReader,
+          this,
           parent2,
         );
         return parent2.documentationComment;
@@ -337,28 +357,6 @@
     }
   }
 
-  GenericFunctionTypeImpl getGenericFunctionType(int id) {
-    GenericFunctionTypeImpl node = _genericFunctionTypeNodeList[id];
-    if (node == null) {
-      var data = this.data.genericFunctionTypes[id];
-      node = _astReader.readGenericFunctionTypeShallow(data);
-      LazyAst.setGenericFunctionTypeId(node, id);
-      _genericFunctionTypeNodeList[id] = node;
-
-      var containerRef = this.reference.getChild('@genericFunctionType');
-      var reference = containerRef.getChild('$id');
-      var element = GenericFunctionTypeElementImpl.forLinkedNode(
-        this.reference.element,
-        reference,
-        node,
-      );
-      node.declaredElement = element;
-
-      _astReader.readGenericFunctionTypeFinish(data, node);
-    }
-    return node;
-  }
-
   Reference getGenericFunctionTypeReference(GenericFunctionType node) {
     var containerRef = reference.getChild('@genericFunctionType');
     var id = LazyAst.getGenericFunctionTypeId(node);
@@ -394,6 +392,15 @@
     }
   }
 
+  UnlinkedInformativeData getInformativeData(LinkedNode data) {
+    if (informativeData == null) return null;
+
+    var id = data.informativeId;
+    if (id == 0) return null;
+
+    return informativeData[id - 1];
+  }
+
   bool getInheritsCovariant(AstNode node) {
     if (node is DefaultFormalParameter) {
       return getInheritsCovariant(node.parameter);
diff --git a/pkg/analyzer/lib/src/task/strong/checker.dart b/pkg/analyzer/lib/src/task/strong/checker.dart
index 2ca6313..7725c55 100644
--- a/pkg/analyzer/lib/src/task/strong/checker.dart
+++ b/pkg/analyzer/lib/src/task/strong/checker.dart
@@ -1184,11 +1184,12 @@
           if (expr.isMap) {
             _recordMessage(
                 expr, StrongModeCode.INVALID_CAST_LITERAL_MAP, [from, to]);
-          } else {
-            // Ambiguity should be resolved by now
-            assert(expr.isSet);
+          } else if (expr.isSet) {
             _recordMessage(
                 expr, StrongModeCode.INVALID_CAST_LITERAL_SET, [from, to]);
+          } else {
+            // This should only happen when the code is invalid, in which case
+            // the error should have been reported elsewhere.
           }
         } else {
           _recordMessage(
diff --git a/pkg/analyzer/lib/src/test_utilities/find_element.dart b/pkg/analyzer/lib/src/test_utilities/find_element.dart
index f8ff22c..bf87a5f 100644
--- a/pkg/analyzer/lib/src/test_utilities/find_element.dart
+++ b/pkg/analyzer/lib/src/test_utilities/find_element.dart
@@ -498,4 +498,13 @@
     }
     throw StateError('Not found: $name');
   }
+
+  TopLevelVariableElement topVar(String name) {
+    for (var variable in definingUnit.topLevelVariables) {
+      if (variable.name == name) {
+        return variable;
+      }
+    }
+    throw StateError('Not found: $name');
+  }
 }
diff --git a/pkg/analyzer/pubspec.yaml b/pkg/analyzer/pubspec.yaml
index fdd4710..29b6585 100644
--- a/pkg/analyzer/pubspec.yaml
+++ b/pkg/analyzer/pubspec.yaml
@@ -4,7 +4,7 @@
 description: Static analyzer for Dart.
 homepage: https://github.com/dart-lang/sdk/tree/master/pkg/analyzer
 environment:
-  sdk: '>=2.1.0-dev.5.0 <3.0.0'
+  sdk: '>=2.2.2 <3.0.0'
 dependencies:
   args: '>=0.12.1 <2.0.0'
   charcode: ^1.1.0
diff --git a/pkg/analyzer/test/generated/parser_fasta_listener.dart b/pkg/analyzer/test/generated/parser_fasta_listener.dart
index 26fff6d..a8a660d 100644
--- a/pkg/analyzer/test/generated/parser_fasta_listener.dart
+++ b/pkg/analyzer/test/generated/parser_fasta_listener.dart
@@ -806,9 +806,9 @@
   }
 
   @override
-  void endFunctionTypedFormalParameter(Token nameToken) {
+  void endFunctionTypedFormalParameter(Token nameToken, Token question) {
     end('FunctionTypedFormalParameter');
-    super.endFunctionTypedFormalParameter(nameToken);
+    super.endFunctionTypedFormalParameter(nameToken, question);
   }
 
   @override
diff --git a/pkg/analyzer/test/generated/parser_fasta_test.dart b/pkg/analyzer/test/generated/parser_fasta_test.dart
index 4f0c894..291c7ff 100644
--- a/pkg/analyzer/test/generated/parser_fasta_test.dart
+++ b/pkg/analyzer/test/generated/parser_fasta_test.dart
@@ -2282,6 +2282,38 @@
     expect(defaultParameter.defaultValue, isNotNull);
     expect(defaultParameter.isNamed, isTrue);
   }
+
+  void test_parseNormalFormalParameter_function_named_nullable() {
+    ParameterKind kind = ParameterKind.NAMED;
+    var defaultParameter =
+        parseFormalParameter('a()? : null', kind) as DefaultFormalParameter;
+    var functionParameter =
+        defaultParameter.parameter as FunctionTypedFormalParameter;
+    assertNoErrors();
+    expect(functionParameter.returnType, isNull);
+    expect(functionParameter.identifier, isNotNull);
+    expect(functionParameter.typeParameters, isNull);
+    expect(functionParameter.parameters, isNotNull);
+    expect(functionParameter.isNamed, isTrue);
+    expect(functionParameter.question, isNotNull);
+    expect(defaultParameter.separator, isNotNull);
+    expect(defaultParameter.defaultValue, isNotNull);
+    expect(defaultParameter.isNamed, isTrue);
+  }
+
+  void test_parseNormalFormalParameter_function_noType_nullable() {
+    NormalFormalParameter parameter =
+        parseNNBDFormalParameter('a()?', ParameterKind.REQUIRED);
+    expect(parameter, isNotNull);
+    assertNoErrors();
+    expect(parameter, isFunctionTypedFormalParameter);
+    FunctionTypedFormalParameter functionParameter = parameter;
+    expect(functionParameter.returnType, isNull);
+    expect(functionParameter.identifier, isNotNull);
+    expect(functionParameter.typeParameters, isNull);
+    expect(functionParameter.parameters, isNotNull);
+    expect(functionParameter.question, isNotNull);
+  }
 }
 
 /**
diff --git a/pkg/analyzer/test/generated/parser_test.dart b/pkg/analyzer/test/generated/parser_test.dart
index 26edc07..4de8709 100644
--- a/pkg/analyzer/test/generated/parser_test.dart
+++ b/pkg/analyzer/test/generated/parser_test.dart
@@ -9118,6 +9118,7 @@
     expect(functionParameter.typeParameters, isNull);
     expect(functionParameter.parameters, isNotNull);
     expect(functionParameter.isNamed, isTrue);
+    expect(functionParameter.question, isNull);
     expect(defaultParameter.separator, isNotNull);
     expect(defaultParameter.defaultValue, isNotNull);
     expect(defaultParameter.isNamed, isTrue);
@@ -9133,6 +9134,7 @@
     expect(functionParameter.identifier, isNotNull);
     expect(functionParameter.typeParameters, isNull);
     expect(functionParameter.parameters, isNotNull);
+    expect(functionParameter.question, isNull);
   }
 
   void test_parseNormalFormalParameter_function_noType_covariant() {
@@ -9147,6 +9149,7 @@
     expect(functionParameter.identifier, isNotNull);
     expect(functionParameter.typeParameters, isNull);
     expect(functionParameter.parameters, isNotNull);
+    expect(functionParameter.question, isNull);
   }
 
   void test_parseNormalFormalParameter_function_noType_typeParameters() {
@@ -9159,6 +9162,7 @@
     expect(functionParameter.identifier, isNotNull);
     expect(functionParameter.typeParameters, isNotNull);
     expect(functionParameter.parameters, isNotNull);
+    expect(functionParameter.question, isNull);
   }
 
   void test_parseNormalFormalParameter_function_type() {
@@ -9171,6 +9175,7 @@
     expect(functionParameter.identifier, isNotNull);
     expect(functionParameter.typeParameters, isNull);
     expect(functionParameter.parameters, isNotNull);
+    expect(functionParameter.question, isNull);
   }
 
   void test_parseNormalFormalParameter_function_type_typeParameters() {
@@ -9183,6 +9188,7 @@
     expect(functionParameter.identifier, isNotNull);
     expect(functionParameter.typeParameters, isNotNull);
     expect(functionParameter.parameters, isNotNull);
+    expect(functionParameter.question, isNull);
   }
 
   void test_parseNormalFormalParameter_function_typeVoid_covariant() {
@@ -9197,6 +9203,7 @@
     expect(functionParameter.identifier, isNotNull);
     expect(functionParameter.typeParameters, isNull);
     expect(functionParameter.parameters, isNotNull);
+    expect(functionParameter.question, isNull);
   }
 
   void test_parseNormalFormalParameter_function_void() {
@@ -9209,6 +9216,7 @@
     expect(functionParameter.identifier, isNotNull);
     expect(functionParameter.typeParameters, isNull);
     expect(functionParameter.parameters, isNotNull);
+    expect(functionParameter.question, isNull);
   }
 
   void test_parseNormalFormalParameter_function_void_typeParameters() {
@@ -9221,6 +9229,7 @@
     expect(functionParameter.identifier, isNotNull);
     expect(functionParameter.typeParameters, isNotNull);
     expect(functionParameter.parameters, isNotNull);
+    expect(functionParameter.question, isNull);
   }
 
   void test_parseNormalFormalParameter_function_withDocComment() {
diff --git a/pkg/analyzer/test/generated/resolver_test.dart b/pkg/analyzer/test/generated/resolver_test.dart
index 9cc2c26..b20c4b5 100644
--- a/pkg/analyzer/test/generated/resolver_test.dart
+++ b/pkg/analyzer/test/generated/resolver_test.dart
@@ -26,6 +26,7 @@
 import 'package:analyzer/src/generated/testing/element_factory.dart';
 import 'package:analyzer/src/generated/testing/test_type_provider.dart';
 import 'package:analyzer/src/source/source_resource.dart';
+import 'package:analyzer/src/string_source.dart';
 import 'package:analyzer/src/test_utilities/resource_provider_mixin.dart';
 import 'package:test/test.dart';
 import 'package:test_reflective_loader/test_reflective_loader.dart';
@@ -1183,7 +1184,7 @@
       symbolType.element,
       typeType.element
     ];
-    coreUnit.source = new TestSource('dart:core');
+    coreUnit.source = new StringSource('', null, uri: Uri.parse('dart:core'));
     coreUnit.librarySource = coreUnit.source;
     CompilationUnitElementImpl asyncUnit = new CompilationUnitElementImpl();
     asyncUnit.types = <ClassElement>[
@@ -1191,7 +1192,8 @@
       futureOrType.element,
       streamType.element
     ];
-    asyncUnit.source = new TestSource('dart:async');
+
+    asyncUnit.source = new StringSource('', null, uri: Uri.parse('dart:async'));
     asyncUnit.librarySource = asyncUnit.source;
     LibraryElementImpl coreLibrary = new LibraryElementImpl.forNode(
         null, null, AstTestFactory.libraryIdentifier2(["dart.core"]), true);
diff --git a/pkg/analyzer/test/generated/type_system_test.dart b/pkg/analyzer/test/generated/type_system_test.dart
index 16599ec..964112f 100644
--- a/pkg/analyzer/test/generated/type_system_test.dart
+++ b/pkg/analyzer/test/generated/type_system_test.dart
@@ -30,13 +30,14 @@
 
 main() {
   defineReflectiveSuite(() {
+    defineReflectiveTests(AssignabilityTest);
     defineReflectiveTests(ConstraintMatchingTest);
-    defineReflectiveTests(StrongAssignabilityTest);
-    defineReflectiveTests(StrongSubtypingTest);
+    defineReflectiveTests(GenericFunctionInferenceTest);
+    defineReflectiveTests(GreatestLowerBoundTest);
+    defineReflectiveTests(LeastUpperBoundFunctionsTest);
+    defineReflectiveTests(LeastUpperBoundTest);
     defineReflectiveTests(NonNullableSubtypingTest);
-    defineReflectiveTests(StrongGenericFunctionInferenceTest);
-    defineReflectiveTests(StrongLeastUpperBoundTest);
-    defineReflectiveTests(StrongGreatestLowerBoundTest);
+    defineReflectiveTests(SubtypingTest);
     defineReflectiveTests(TypeSystemTest);
   });
 }
@@ -64,6 +65,272 @@
   }
 }
 
+@reflectiveTest
+class AssignabilityTest extends AbstractTypeSystemTest {
+  void test_isAssignableTo_bottom_isBottom() {
+    DartType interfaceType = ElementFactory.classElement2('A', []).type;
+    List<DartType> interassignable = <DartType>[
+      dynamicType,
+      objectType,
+      intType,
+      doubleType,
+      numType,
+      stringType,
+      interfaceType,
+      bottomType
+    ];
+
+    _checkGroups(bottomType, interassignable: interassignable);
+  }
+
+  void test_isAssignableTo_call_method() {
+    ClassElementImpl classBottom = ElementFactory.classElement2("B");
+    MethodElement methodBottom =
+        ElementFactory.methodElement("call", objectType, <DartType>[intType]);
+    classBottom.methods = <MethodElement>[methodBottom];
+
+    DartType top =
+        TypeBuilder.function(required: <DartType>[intType], result: objectType);
+    InterfaceType bottom = classBottom.type;
+
+    _checkIsStrictAssignableTo(bottom, top);
+  }
+
+  void test_isAssignableTo_classes() {
+    ClassElement classTop = ElementFactory.classElement2("A");
+    ClassElement classLeft = ElementFactory.classElement("B", classTop.type);
+    ClassElement classRight = ElementFactory.classElement("C", classTop.type);
+    ClassElement classBottom = ElementFactory.classElement("D", classLeft.type)
+      ..interfaces = <InterfaceType>[classRight.type];
+    InterfaceType top = classTop.type;
+    InterfaceType left = classLeft.type;
+    InterfaceType right = classRight.type;
+    InterfaceType bottom = classBottom.type;
+
+    _checkLattice(top, left, right, bottom);
+  }
+
+  void test_isAssignableTo_double() {
+    DartType interfaceType = ElementFactory.classElement2('A', []).type;
+    List<DartType> interassignable = <DartType>[
+      dynamicType,
+      objectType,
+      doubleType,
+      numType,
+      bottomType
+    ];
+    List<DartType> unrelated = <DartType>[
+      intType,
+      stringType,
+      interfaceType,
+    ];
+
+    _checkGroups(doubleType,
+        interassignable: interassignable, unrelated: unrelated);
+  }
+
+  void test_isAssignableTo_dynamic_isTop() {
+    DartType interfaceType = ElementFactory.classElement2('A', []).type;
+    List<DartType> interassignable = <DartType>[
+      dynamicType,
+      objectType,
+      intType,
+      doubleType,
+      numType,
+      stringType,
+      interfaceType,
+      bottomType
+    ];
+    _checkGroups(dynamicType, interassignable: interassignable);
+  }
+
+  void test_isAssignableTo_generics() {
+    ClassElementImpl LClass = ElementFactory.classElement2('L', ["T"]);
+    InterfaceType LType = LClass.type;
+    ClassElementImpl MClass = ElementFactory.classElement2('M', ["T"]);
+    DartType typeParam = MClass.typeParameters[0].type;
+    InterfaceType superType = LType.instantiate(<DartType>[typeParam]);
+    MClass.interfaces = <InterfaceType>[superType];
+    InterfaceType MType = MClass.type;
+
+    InterfaceType top = LType.instantiate(<DartType>[dynamicType]);
+    InterfaceType left = MType.instantiate(<DartType>[dynamicType]);
+    InterfaceType right = LType.instantiate(<DartType>[intType]);
+    InterfaceType bottom = MType.instantiate(<DartType>[intType]);
+
+    _checkCrossLattice(top, left, right, bottom);
+  }
+
+  void test_isAssignableTo_int() {
+    DartType interfaceType = ElementFactory.classElement2('A', []).type;
+    List<DartType> interassignable = <DartType>[
+      dynamicType,
+      objectType,
+      intType,
+      numType,
+      bottomType
+    ];
+    List<DartType> unrelated = <DartType>[
+      doubleType,
+      stringType,
+      interfaceType,
+    ];
+
+    _checkGroups(intType,
+        interassignable: interassignable, unrelated: unrelated);
+  }
+
+  void test_isAssignableTo_named_optional() {
+    DartType r =
+        TypeBuilder.function(required: <DartType>[intType], result: intType);
+    DartType o = TypeBuilder.function(
+        required: <DartType>[], optional: <DartType>[intType], result: intType);
+    DartType n = TypeBuilder.function(
+        required: <DartType>[],
+        named: <String, DartType>{'x': intType},
+        result: intType);
+    DartType rr = TypeBuilder.function(
+        required: <DartType>[intType, intType], result: intType);
+    DartType ro = TypeBuilder.function(
+        required: <DartType>[intType],
+        optional: <DartType>[intType],
+        result: intType);
+    DartType rn = TypeBuilder.function(
+        required: <DartType>[intType],
+        named: <String, DartType>{'x': intType},
+        result: intType);
+    DartType oo = TypeBuilder.function(
+        required: <DartType>[],
+        optional: <DartType>[intType, intType],
+        result: intType);
+    DartType nn = TypeBuilder.function(
+        required: <DartType>[],
+        named: <String, DartType>{'x': intType, 'y': intType},
+        result: intType);
+    DartType nnn = TypeBuilder.function(
+        required: <DartType>[],
+        named: <String, DartType>{'x': intType, 'y': intType, 'z': intType},
+        result: intType);
+
+    _checkGroups(r,
+        interassignable: [r, o, ro, rn, oo], unrelated: [n, rr, nn, nnn]);
+    _checkGroups(o,
+        interassignable: [o, oo], unrelated: [n, rr, ro, rn, nn, nnn]);
+    _checkGroups(n,
+        interassignable: [n, nn, nnn], unrelated: [r, o, rr, ro, rn, oo]);
+    _checkGroups(rr,
+        interassignable: [rr, ro, oo], unrelated: [r, o, n, rn, nn, nnn]);
+    _checkGroups(ro, interassignable: [ro, oo], unrelated: [o, n, rn, nn, nnn]);
+    _checkGroups(rn,
+        interassignable: [rn], unrelated: [o, n, rr, ro, oo, nn, nnn]);
+    _checkGroups(oo, interassignable: [oo], unrelated: [n, rn, nn, nnn]);
+    _checkGroups(nn,
+        interassignable: [nn, nnn], unrelated: [r, o, rr, ro, rn, oo]);
+    _checkGroups(nnn,
+        interassignable: [nnn], unrelated: [r, o, rr, ro, rn, oo]);
+  }
+
+  void test_isAssignableTo_num() {
+    DartType interfaceType = ElementFactory.classElement2('A', []).type;
+    List<DartType> interassignable = <DartType>[
+      dynamicType,
+      objectType,
+      numType,
+      intType,
+      doubleType,
+      bottomType
+    ];
+    List<DartType> unrelated = <DartType>[
+      stringType,
+      interfaceType,
+    ];
+
+    _checkGroups(numType,
+        interassignable: interassignable, unrelated: unrelated);
+  }
+
+  void test_isAssignableTo_simple_function() {
+    FunctionType top =
+        TypeBuilder.function(required: <DartType>[intType], result: objectType);
+    FunctionType left =
+        TypeBuilder.function(required: <DartType>[intType], result: intType);
+    FunctionType right = TypeBuilder.function(
+        required: <DartType>[objectType], result: objectType);
+    FunctionType bottom =
+        TypeBuilder.function(required: <DartType>[objectType], result: intType);
+
+    _checkCrossLattice(top, left, right, bottom);
+  }
+
+  void test_isAssignableTo_void_functions() {
+    FunctionType top =
+        TypeBuilder.function(required: <DartType>[intType], result: voidType);
+    FunctionType bottom =
+        TypeBuilder.function(required: <DartType>[objectType], result: intType);
+
+    _checkEquivalent(bottom, top);
+  }
+
+  void _checkCrossLattice(
+      DartType top, DartType left, DartType right, DartType bottom) {
+    _checkGroups(top, interassignable: [top, left, right, bottom]);
+    _checkGroups(left,
+        interassignable: [top, left, bottom], unrelated: [right]);
+    _checkGroups(right,
+        interassignable: [top, right, bottom], unrelated: [left]);
+    _checkGroups(bottom, interassignable: [top, left, right, bottom]);
+  }
+
+  void _checkEquivalent(DartType type1, DartType type2) {
+    _checkIsAssignableTo(type1, type2);
+    _checkIsAssignableTo(type2, type1);
+  }
+
+  void _checkGroups(DartType t1,
+      {List<DartType> interassignable, List<DartType> unrelated}) {
+    if (interassignable != null) {
+      for (DartType t2 in interassignable) {
+        _checkEquivalent(t1, t2);
+      }
+    }
+    if (unrelated != null) {
+      for (DartType t2 in unrelated) {
+        _checkUnrelated(t1, t2);
+      }
+    }
+  }
+
+  void _checkIsAssignableTo(DartType type1, DartType type2) {
+    expect(typeSystem.isAssignableTo(type1, type2), true);
+  }
+
+  void _checkIsNotAssignableTo(DartType type1, DartType type2) {
+    expect(typeSystem.isAssignableTo(type1, type2), false);
+  }
+
+  void _checkIsStrictAssignableTo(DartType type1, DartType type2) {
+    _checkIsAssignableTo(type1, type2);
+    _checkIsNotAssignableTo(type2, type1);
+  }
+
+  void _checkLattice(
+      DartType top, DartType left, DartType right, DartType bottom) {
+    _checkGroups(top, interassignable: <DartType>[top, left, right, bottom]);
+    _checkGroups(left,
+        interassignable: <DartType>[top, left, bottom],
+        unrelated: <DartType>[right]);
+    _checkGroups(right,
+        interassignable: <DartType>[top, right, bottom],
+        unrelated: <DartType>[left]);
+    _checkGroups(bottom, interassignable: <DartType>[top, left, right, bottom]);
+  }
+
+  void _checkUnrelated(DartType type1, DartType type2) {
+    _checkIsNotAssignableTo(type1, type2);
+    _checkIsNotAssignableTo(type2, type1);
+  }
+}
+
 /**
  * Base class for testing LUB and GLB in spec and strong mode.
  */
@@ -510,704 +777,8 @@
   }
 }
 
-/**
- * Base class for testing LUB in spec and strong mode.
- * Defines helper functions and tests. Tests here are ones whose behavior is
- * the same in strong and spec mode.
- */
-abstract class LeastUpperBoundTestBase extends BoundTestBase {
-  void test_bottom_function() {
-    _checkLeastUpperBound(bottomType, simpleFunctionType, simpleFunctionType);
-  }
-
-  void test_bottom_interface() {
-    DartType interfaceType = ElementFactory.classElement2('A', []).type;
-    _checkLeastUpperBound(bottomType, interfaceType, interfaceType);
-  }
-
-  void test_bottom_typeParam() {
-    DartType typeParam = ElementFactory.typeParameterElement('T').type;
-    _checkLeastUpperBound(bottomType, typeParam, typeParam);
-  }
-
-  void test_directInterfaceCase() {
-    // class A
-    // class B implements A
-    // class C implements B
-    ClassElementImpl classA = ElementFactory.classElement2("A");
-    ClassElementImpl classB = ElementFactory.classElement2("B");
-    ClassElementImpl classC = ElementFactory.classElement2("C");
-    InterfaceType typeA = classA.type;
-    InterfaceType typeB = classB.type;
-    InterfaceType typeC = classC.type;
-    classB.interfaces = <InterfaceType>[typeA];
-    classC.interfaces = <InterfaceType>[typeB];
-    _checkLeastUpperBound(typeB, typeC, typeB);
-  }
-
-  void test_directSubclassCase() {
-    // class A
-    // class B extends A
-    // class C extends B
-    ClassElementImpl classA = ElementFactory.classElement2("A");
-    ClassElementImpl classB = ElementFactory.classElement("B", classA.type);
-    ClassElementImpl classC = ElementFactory.classElement("C", classB.type);
-    InterfaceType typeB = classB.type;
-    InterfaceType typeC = classC.type;
-    _checkLeastUpperBound(typeB, typeC, typeB);
-  }
-
-  void test_dynamic_bottom() {
-    _checkLeastUpperBound(dynamicType, bottomType, dynamicType);
-  }
-
-  void test_dynamic_function() {
-    _checkLeastUpperBound(dynamicType, simpleFunctionType, dynamicType);
-  }
-
-  void test_dynamic_interface() {
-    DartType interfaceType = ElementFactory.classElement2('A', []).type;
-    _checkLeastUpperBound(dynamicType, interfaceType, dynamicType);
-  }
-
-  void test_dynamic_typeParam() {
-    DartType typeParam = ElementFactory.typeParameterElement('T').type;
-    _checkLeastUpperBound(dynamicType, typeParam, dynamicType);
-  }
-
-  void test_dynamic_void() {
-    // Note: _checkLeastUpperBound tests `LUB(x, y)` as well as `LUB(y, x)`
-    _checkLeastUpperBound(dynamicType, voidType, voidType);
-  }
-
-  void test_functionsDifferentRequiredArity() {
-    FunctionType type1 = _functionType([intType, intType]);
-    FunctionType type2 = _functionType([intType, intType, intType]);
-    _checkLeastUpperBound(type1, type2, functionType);
-  }
-
-  void test_functionsIgnoreExtraNamedParams() {
-    FunctionType type1 = _functionType([], named: {'a': intType, 'b': intType});
-    FunctionType type2 = _functionType([], named: {'a': intType, 'c': intType});
-    FunctionType expected = _functionType([], named: {'a': intType});
-    _checkLeastUpperBound(type1, type2, expected);
-  }
-
-  void test_functionsIgnoreExtraPositionalParams() {
-    FunctionType type1 =
-        _functionType([], optional: [intType, intType, stringType]);
-    FunctionType type2 = _functionType([], optional: [intType]);
-    FunctionType expected = _functionType([], optional: [intType]);
-    _checkLeastUpperBound(type1, type2, expected);
-  }
-
-  void test_functionsLubReturnType() {
-    FunctionType type1 = _functionType([], returns: intType);
-    FunctionType type2 = _functionType([], returns: doubleType);
-    FunctionType expected = _functionType([], returns: numType);
-    _checkLeastUpperBound(type1, type2, expected);
-  }
-
-  void test_functionsSameType() {
-    FunctionType type1 = _functionType([stringType, intType, numType],
-        optional: [doubleType], named: {'n': numType}, returns: intType);
-    FunctionType type2 = _functionType([stringType, intType, numType],
-        optional: [doubleType], named: {'n': numType}, returns: intType);
-    FunctionType expected = _functionType([stringType, intType, numType],
-        optional: [doubleType], named: {'n': numType}, returns: intType);
-    _checkLeastUpperBound(type1, type2, expected);
-  }
-
-  void test_interface_function() {
-    DartType interfaceType = ElementFactory.classElement2('A', []).type;
-    _checkLeastUpperBound(interfaceType, simpleFunctionType, objectType);
-  }
-
-  void test_mixinCase() {
-    // class A
-    // class B extends A
-    // class C extends A
-    // class D extends B with M, N, O, P
-    ClassElement classA = ElementFactory.classElement2("A");
-    ClassElement classB = ElementFactory.classElement("B", classA.type);
-    ClassElement classC = ElementFactory.classElement("C", classA.type);
-    ClassElementImpl classD = ElementFactory.classElement("D", classB.type);
-    InterfaceType typeA = classA.type;
-    InterfaceType typeC = classC.type;
-    InterfaceType typeD = classD.type;
-    classD.mixins = <InterfaceType>[
-      ElementFactory.classElement2("M").type,
-      ElementFactory.classElement2("N").type,
-      ElementFactory.classElement2("O").type,
-      ElementFactory.classElement2("P").type
-    ];
-    _checkLeastUpperBound(typeD, typeC, typeA);
-  }
-
-  void test_nestedFunctionsLubInnerParamTypes() {
-    FunctionType type1 = _functionType([
-      _functionType([stringType, intType, intType])
-    ]);
-    FunctionType type2 = _functionType([
-      _functionType([intType, doubleType, numType])
-    ]);
-    FunctionType expected = _functionType([
-      _functionType([objectType, numType, numType])
-    ]);
-    _checkLeastUpperBound(type1, type2, expected);
-  }
-
-  void test_object() {
-    ClassElementImpl classA = ElementFactory.classElement2("A");
-    ClassElementImpl classB = ElementFactory.classElement2("B");
-    InterfaceType typeA = classA.type;
-    InterfaceType typeB = classB.type;
-    DartType typeObject = typeA.element.supertype;
-    // assert that object does not have a super type
-    expect((typeObject.element as ClassElement).supertype, isNull);
-    // assert that both A and B have the same super type of Object
-    expect(typeB.element.supertype, typeObject);
-    // finally, assert that the only least upper bound of A and B is Object
-    _checkLeastUpperBound(typeA, typeB, typeObject);
-  }
-
-  void test_self() {
-    DartType typeParam = ElementFactory.typeParameterElement('T').type;
-    DartType interfaceType = ElementFactory.classElement2('A', []).type;
-
-    List<DartType> types = [
-      dynamicType,
-      voidType,
-      bottomType,
-      typeParam,
-      interfaceType,
-      simpleFunctionType
-    ];
-
-    for (DartType type in types) {
-      _checkLeastUpperBound(type, type, type);
-    }
-  }
-
-  void test_sharedSuperclass1() {
-    ClassElementImpl classA = ElementFactory.classElement2("A");
-    ClassElementImpl classB = ElementFactory.classElement("B", classA.type);
-    ClassElementImpl classC = ElementFactory.classElement("C", classA.type);
-    InterfaceType typeA = classA.type;
-    InterfaceType typeB = classB.type;
-    InterfaceType typeC = classC.type;
-    _checkLeastUpperBound(typeB, typeC, typeA);
-  }
-
-  void test_sharedSuperclass2() {
-    ClassElementImpl classA = ElementFactory.classElement2("A");
-    ClassElementImpl classB = ElementFactory.classElement("B", classA.type);
-    ClassElementImpl classC = ElementFactory.classElement("C", classA.type);
-    ClassElementImpl classD = ElementFactory.classElement("D", classC.type);
-    InterfaceType typeA = classA.type;
-    InterfaceType typeB = classB.type;
-    InterfaceType typeD = classD.type;
-    _checkLeastUpperBound(typeB, typeD, typeA);
-  }
-
-  void test_sharedSuperclass3() {
-    ClassElementImpl classA = ElementFactory.classElement2("A");
-    ClassElementImpl classB = ElementFactory.classElement("B", classA.type);
-    ClassElementImpl classC = ElementFactory.classElement("C", classB.type);
-    ClassElementImpl classD = ElementFactory.classElement("D", classB.type);
-    InterfaceType typeB = classB.type;
-    InterfaceType typeC = classC.type;
-    InterfaceType typeD = classD.type;
-    _checkLeastUpperBound(typeC, typeD, typeB);
-  }
-
-  void test_sharedSuperclass4() {
-    ClassElement classA = ElementFactory.classElement2("A");
-    ClassElement classA2 = ElementFactory.classElement2("A2");
-    ClassElement classA3 = ElementFactory.classElement2("A3");
-    ClassElementImpl classB = ElementFactory.classElement("B", classA.type);
-    ClassElementImpl classC = ElementFactory.classElement("C", classA.type);
-    InterfaceType typeA = classA.type;
-    InterfaceType typeA2 = classA2.type;
-    InterfaceType typeA3 = classA3.type;
-    InterfaceType typeB = classB.type;
-    InterfaceType typeC = classC.type;
-    classB.interfaces = <InterfaceType>[typeA2];
-    classC.interfaces = <InterfaceType>[typeA3];
-    _checkLeastUpperBound(typeB, typeC, typeA);
-  }
-
-  void test_sharedSuperinterface1() {
-    ClassElementImpl classA = ElementFactory.classElement2("A");
-    ClassElementImpl classB = ElementFactory.classElement2("B");
-    ClassElementImpl classC = ElementFactory.classElement2("C");
-    InterfaceType typeA = classA.type;
-    InterfaceType typeB = classB.type;
-    InterfaceType typeC = classC.type;
-    classB.interfaces = <InterfaceType>[typeA];
-    classC.interfaces = <InterfaceType>[typeA];
-    _checkLeastUpperBound(typeB, typeC, typeA);
-  }
-
-  void test_sharedSuperinterface2() {
-    ClassElementImpl classA = ElementFactory.classElement2("A");
-    ClassElementImpl classB = ElementFactory.classElement2("B");
-    ClassElementImpl classC = ElementFactory.classElement2("C");
-    ClassElementImpl classD = ElementFactory.classElement2("D");
-    InterfaceType typeA = classA.type;
-    InterfaceType typeB = classB.type;
-    InterfaceType typeC = classC.type;
-    InterfaceType typeD = classD.type;
-    classB.interfaces = <InterfaceType>[typeA];
-    classC.interfaces = <InterfaceType>[typeA];
-    classD.interfaces = <InterfaceType>[typeC];
-    _checkLeastUpperBound(typeB, typeD, typeA);
-  }
-
-  void test_sharedSuperinterface3() {
-    ClassElementImpl classA = ElementFactory.classElement2("A");
-    ClassElementImpl classB = ElementFactory.classElement2("B");
-    ClassElementImpl classC = ElementFactory.classElement2("C");
-    ClassElementImpl classD = ElementFactory.classElement2("D");
-    InterfaceType typeA = classA.type;
-    InterfaceType typeB = classB.type;
-    InterfaceType typeC = classC.type;
-    InterfaceType typeD = classD.type;
-    classB.interfaces = <InterfaceType>[typeA];
-    classC.interfaces = <InterfaceType>[typeB];
-    classD.interfaces = <InterfaceType>[typeB];
-    _checkLeastUpperBound(typeC, typeD, typeB);
-  }
-
-  void test_sharedSuperinterface4() {
-    ClassElement classA = ElementFactory.classElement2("A");
-    ClassElement classA2 = ElementFactory.classElement2("A2");
-    ClassElement classA3 = ElementFactory.classElement2("A3");
-    ClassElementImpl classB = ElementFactory.classElement2("B");
-    ClassElementImpl classC = ElementFactory.classElement2("C");
-    InterfaceType typeA = classA.type;
-    InterfaceType typeA2 = classA2.type;
-    InterfaceType typeA3 = classA3.type;
-    InterfaceType typeB = classB.type;
-    InterfaceType typeC = classC.type;
-    classB.interfaces = <InterfaceType>[typeA, typeA2];
-    classC.interfaces = <InterfaceType>[typeA, typeA3];
-    _checkLeastUpperBound(typeB, typeC, typeA);
-  }
-
-  void test_twoComparables() {
-    _checkLeastUpperBound(stringType, numType, objectType);
-  }
-
-  void test_typeParam_function_bounded() {
-    TypeParameterElementImpl typeParamElement =
-        ElementFactory.typeParameterElement('T');
-    typeParamElement.bound = functionType;
-    DartType typeParam = typeParamElement.type;
-    _checkLeastUpperBound(typeParam, simpleFunctionType, functionType);
-  }
-
-  void test_typeParam_function_noBound() {
-    DartType typeParam = ElementFactory.typeParameterElement('T').type;
-    _checkLeastUpperBound(typeParam, simpleFunctionType, objectType);
-  }
-
-  void test_typeParam_interface_bounded() {
-    DartType typeA = ElementFactory.classElement2('A', []).type;
-    DartType typeB = ElementFactory.classElement('B', typeA).type;
-    DartType typeC = ElementFactory.classElement('C', typeA).type;
-    TypeParameterElementImpl typeParamElement =
-        ElementFactory.typeParameterElement('T');
-    typeParamElement.bound = typeB;
-    DartType typeParam = typeParamElement.type;
-    _checkLeastUpperBound(typeParam, typeC, typeA);
-  }
-
-  void test_typeParam_interface_noBound() {
-    DartType typeParam = ElementFactory.typeParameterElement('T').type;
-    DartType interfaceType = ElementFactory.classElement2('A', []).type;
-    _checkLeastUpperBound(typeParam, interfaceType, objectType);
-  }
-
-  void test_typeParameters_same() {
-    // List<int>
-    // List<int>
-    InterfaceType listOfIntType = listType.instantiate(<DartType>[intType]);
-    _checkLeastUpperBound(listOfIntType, listOfIntType, listOfIntType);
-  }
-
-  void test_void() {
-    List<DartType> types = [
-      bottomType,
-      simpleFunctionType,
-      ElementFactory.classElement2('A', []).type,
-      ElementFactory.typeParameterElement('T').type
-    ];
-    for (DartType type in types) {
-      _checkLeastUpperBound(
-          _functionType([], returns: voidType),
-          _functionType([], returns: type),
-          _functionType([], returns: voidType));
-    }
-  }
-}
-
 @reflectiveTest
-class NonNullableSubtypingTest extends StrongSubtypingTestBase {
-  @override
-  void setUp() {
-    typeProvider = AnalysisContextFactory.contextWithCoreAndOptions(
-            new AnalysisOptionsImpl()
-              ..contextFeatures = FeatureSet.forTesting(
-                  additionalFeatures: [Feature.non_nullable]),
-            resourceProvider: new MemoryResourceProvider())
-        .typeProvider;
-
-    // TypeSystem should use the context type provider.
-    typeSystem = new Dart2TypeSystem(typeProvider);
-
-    LibraryElement coreLibrary = typeProvider.objectType.element.library;
-    LibraryElement asyncLibrary = typeProvider.streamType.element.library;
-
-    // Get a non-nullable type provider for convience during the test.
-    typeProvider = new NonNullableTypeProvider(coreLibrary, asyncLibrary);
-  }
-
-  void test_int_nullableTypes() {
-    List<DartType> equivalents = <DartType>[
-      intType,
-      _star(intType),
-    ];
-    List<DartType> supertypes = <DartType>[
-      _question(intType),
-      objectType,
-      _question(objectType),
-    ];
-    List<DartType> unrelated = <DartType>[doubleType, nullType];
-    _checkGroups(intType,
-        equivalents: equivalents, supertypes: supertypes, unrelated: unrelated);
-  }
-
-  void test_intQuestion_nullableTypes() {
-    List<DartType> equivalents = <DartType>[
-      _question(intType),
-      _star(intType),
-    ];
-    List<DartType> subtypes = <DartType>[
-      intType,
-      nullType,
-    ];
-    List<DartType> supertypes = <DartType>[
-      _question(numType),
-      _star(numType),
-      _question(objectType),
-      _star(objectType),
-    ];
-    List<DartType> unrelated = <DartType>[doubleType, numType, objectType];
-    _checkGroups(_question(intType),
-        equivalents: equivalents,
-        supertypes: supertypes,
-        unrelated: unrelated,
-        subtypes: subtypes);
-  }
-
-  void test_intStar_nullableTypes() {
-    List<DartType> equivalents = <DartType>[
-      intType,
-      _question(intType),
-      _star(intType),
-    ];
-    List<DartType> subtypes = <DartType>[nullType];
-    List<DartType> supertypes = <DartType>[
-      numType,
-      _question(numType),
-      _star(numType),
-      objectType,
-      _question(objectType),
-    ];
-    List<DartType> unrelated = <DartType>[doubleType];
-    _checkGroups(_star(intType),
-        equivalents: equivalents,
-        supertypes: supertypes,
-        unrelated: unrelated,
-        subtypes: subtypes);
-  }
-
-  DartType _question(DartType dartType) =>
-      (dartType as TypeImpl).withNullability(NullabilitySuffix.question);
-
-  DartType _star(DartType dartType) =>
-      (dartType as TypeImpl).withNullability(NullabilitySuffix.star);
-}
-
-@reflectiveTest
-class StrongAssignabilityTest extends AbstractTypeSystemTest {
-  void test_isAssignableTo_bottom_isBottom() {
-    DartType interfaceType = ElementFactory.classElement2('A', []).type;
-    List<DartType> interassignable = <DartType>[
-      dynamicType,
-      objectType,
-      intType,
-      doubleType,
-      numType,
-      stringType,
-      interfaceType,
-      bottomType
-    ];
-
-    _checkGroups(bottomType, interassignable: interassignable);
-  }
-
-  void test_isAssignableTo_call_method() {
-    ClassElementImpl classBottom = ElementFactory.classElement2("B");
-    MethodElement methodBottom =
-        ElementFactory.methodElement("call", objectType, <DartType>[intType]);
-    classBottom.methods = <MethodElement>[methodBottom];
-
-    DartType top =
-        TypeBuilder.function(required: <DartType>[intType], result: objectType);
-    InterfaceType bottom = classBottom.type;
-
-    _checkIsStrictAssignableTo(bottom, top);
-  }
-
-  void test_isAssignableTo_classes() {
-    ClassElement classTop = ElementFactory.classElement2("A");
-    ClassElement classLeft = ElementFactory.classElement("B", classTop.type);
-    ClassElement classRight = ElementFactory.classElement("C", classTop.type);
-    ClassElement classBottom = ElementFactory.classElement("D", classLeft.type)
-      ..interfaces = <InterfaceType>[classRight.type];
-    InterfaceType top = classTop.type;
-    InterfaceType left = classLeft.type;
-    InterfaceType right = classRight.type;
-    InterfaceType bottom = classBottom.type;
-
-    _checkLattice(top, left, right, bottom);
-  }
-
-  void test_isAssignableTo_double() {
-    DartType interfaceType = ElementFactory.classElement2('A', []).type;
-    List<DartType> interassignable = <DartType>[
-      dynamicType,
-      objectType,
-      doubleType,
-      numType,
-      bottomType
-    ];
-    List<DartType> unrelated = <DartType>[
-      intType,
-      stringType,
-      interfaceType,
-    ];
-
-    _checkGroups(doubleType,
-        interassignable: interassignable, unrelated: unrelated);
-  }
-
-  void test_isAssignableTo_dynamic_isTop() {
-    DartType interfaceType = ElementFactory.classElement2('A', []).type;
-    List<DartType> interassignable = <DartType>[
-      dynamicType,
-      objectType,
-      intType,
-      doubleType,
-      numType,
-      stringType,
-      interfaceType,
-      bottomType
-    ];
-    _checkGroups(dynamicType, interassignable: interassignable);
-  }
-
-  void test_isAssignableTo_generics() {
-    ClassElementImpl LClass = ElementFactory.classElement2('L', ["T"]);
-    InterfaceType LType = LClass.type;
-    ClassElementImpl MClass = ElementFactory.classElement2('M', ["T"]);
-    DartType typeParam = MClass.typeParameters[0].type;
-    InterfaceType superType = LType.instantiate(<DartType>[typeParam]);
-    MClass.interfaces = <InterfaceType>[superType];
-    InterfaceType MType = MClass.type;
-
-    InterfaceType top = LType.instantiate(<DartType>[dynamicType]);
-    InterfaceType left = MType.instantiate(<DartType>[dynamicType]);
-    InterfaceType right = LType.instantiate(<DartType>[intType]);
-    InterfaceType bottom = MType.instantiate(<DartType>[intType]);
-
-    _checkCrossLattice(top, left, right, bottom);
-  }
-
-  void test_isAssignableTo_int() {
-    DartType interfaceType = ElementFactory.classElement2('A', []).type;
-    List<DartType> interassignable = <DartType>[
-      dynamicType,
-      objectType,
-      intType,
-      numType,
-      bottomType
-    ];
-    List<DartType> unrelated = <DartType>[
-      doubleType,
-      stringType,
-      interfaceType,
-    ];
-
-    _checkGroups(intType,
-        interassignable: interassignable, unrelated: unrelated);
-  }
-
-  void test_isAssignableTo_named_optional() {
-    DartType r =
-        TypeBuilder.function(required: <DartType>[intType], result: intType);
-    DartType o = TypeBuilder.function(
-        required: <DartType>[], optional: <DartType>[intType], result: intType);
-    DartType n = TypeBuilder.function(
-        required: <DartType>[],
-        named: <String, DartType>{'x': intType},
-        result: intType);
-    DartType rr = TypeBuilder.function(
-        required: <DartType>[intType, intType], result: intType);
-    DartType ro = TypeBuilder.function(
-        required: <DartType>[intType],
-        optional: <DartType>[intType],
-        result: intType);
-    DartType rn = TypeBuilder.function(
-        required: <DartType>[intType],
-        named: <String, DartType>{'x': intType},
-        result: intType);
-    DartType oo = TypeBuilder.function(
-        required: <DartType>[],
-        optional: <DartType>[intType, intType],
-        result: intType);
-    DartType nn = TypeBuilder.function(
-        required: <DartType>[],
-        named: <String, DartType>{'x': intType, 'y': intType},
-        result: intType);
-    DartType nnn = TypeBuilder.function(
-        required: <DartType>[],
-        named: <String, DartType>{'x': intType, 'y': intType, 'z': intType},
-        result: intType);
-
-    _checkGroups(r,
-        interassignable: [r, o, ro, rn, oo], unrelated: [n, rr, nn, nnn]);
-    _checkGroups(o,
-        interassignable: [o, oo], unrelated: [n, rr, ro, rn, nn, nnn]);
-    _checkGroups(n,
-        interassignable: [n, nn, nnn], unrelated: [r, o, rr, ro, rn, oo]);
-    _checkGroups(rr,
-        interassignable: [rr, ro, oo], unrelated: [r, o, n, rn, nn, nnn]);
-    _checkGroups(ro, interassignable: [ro, oo], unrelated: [o, n, rn, nn, nnn]);
-    _checkGroups(rn,
-        interassignable: [rn], unrelated: [o, n, rr, ro, oo, nn, nnn]);
-    _checkGroups(oo, interassignable: [oo], unrelated: [n, rn, nn, nnn]);
-    _checkGroups(nn,
-        interassignable: [nn, nnn], unrelated: [r, o, rr, ro, rn, oo]);
-    _checkGroups(nnn,
-        interassignable: [nnn], unrelated: [r, o, rr, ro, rn, oo]);
-  }
-
-  void test_isAssignableTo_num() {
-    DartType interfaceType = ElementFactory.classElement2('A', []).type;
-    List<DartType> interassignable = <DartType>[
-      dynamicType,
-      objectType,
-      numType,
-      intType,
-      doubleType,
-      bottomType
-    ];
-    List<DartType> unrelated = <DartType>[
-      stringType,
-      interfaceType,
-    ];
-
-    _checkGroups(numType,
-        interassignable: interassignable, unrelated: unrelated);
-  }
-
-  void test_isAssignableTo_simple_function() {
-    FunctionType top =
-        TypeBuilder.function(required: <DartType>[intType], result: objectType);
-    FunctionType left =
-        TypeBuilder.function(required: <DartType>[intType], result: intType);
-    FunctionType right = TypeBuilder.function(
-        required: <DartType>[objectType], result: objectType);
-    FunctionType bottom =
-        TypeBuilder.function(required: <DartType>[objectType], result: intType);
-
-    _checkCrossLattice(top, left, right, bottom);
-  }
-
-  void test_isAssignableTo_void_functions() {
-    FunctionType top =
-        TypeBuilder.function(required: <DartType>[intType], result: voidType);
-    FunctionType bottom =
-        TypeBuilder.function(required: <DartType>[objectType], result: intType);
-
-    _checkEquivalent(bottom, top);
-  }
-
-  void _checkCrossLattice(
-      DartType top, DartType left, DartType right, DartType bottom) {
-    _checkGroups(top, interassignable: [top, left, right, bottom]);
-    _checkGroups(left,
-        interassignable: [top, left, bottom], unrelated: [right]);
-    _checkGroups(right,
-        interassignable: [top, right, bottom], unrelated: [left]);
-    _checkGroups(bottom, interassignable: [top, left, right, bottom]);
-  }
-
-  void _checkEquivalent(DartType type1, DartType type2) {
-    _checkIsAssignableTo(type1, type2);
-    _checkIsAssignableTo(type2, type1);
-  }
-
-  void _checkGroups(DartType t1,
-      {List<DartType> interassignable, List<DartType> unrelated}) {
-    if (interassignable != null) {
-      for (DartType t2 in interassignable) {
-        _checkEquivalent(t1, t2);
-      }
-    }
-    if (unrelated != null) {
-      for (DartType t2 in unrelated) {
-        _checkUnrelated(t1, t2);
-      }
-    }
-  }
-
-  void _checkIsAssignableTo(DartType type1, DartType type2) {
-    expect(typeSystem.isAssignableTo(type1, type2), true);
-  }
-
-  void _checkIsNotAssignableTo(DartType type1, DartType type2) {
-    expect(typeSystem.isAssignableTo(type1, type2), false);
-  }
-
-  void _checkIsStrictAssignableTo(DartType type1, DartType type2) {
-    _checkIsAssignableTo(type1, type2);
-    _checkIsNotAssignableTo(type2, type1);
-  }
-
-  void _checkLattice(
-      DartType top, DartType left, DartType right, DartType bottom) {
-    _checkGroups(top, interassignable: <DartType>[top, left, right, bottom]);
-    _checkGroups(left,
-        interassignable: <DartType>[top, left, bottom],
-        unrelated: <DartType>[right]);
-    _checkGroups(right,
-        interassignable: <DartType>[top, right, bottom],
-        unrelated: <DartType>[left]);
-    _checkGroups(bottom, interassignable: <DartType>[top, left, right, bottom]);
-  }
-
-  void _checkUnrelated(DartType type1, DartType type2) {
-    _checkIsNotAssignableTo(type1, type2);
-    _checkIsNotAssignableTo(type2, type1);
-  }
-}
-
-@reflectiveTest
-class StrongGenericFunctionInferenceTest extends AbstractTypeSystemTest {
+class GenericFunctionInferenceTest extends AbstractTypeSystemTest {
   void test_boundedByAnotherTypeParameter() {
     // <TFrom, TTo extends Iterable<TFrom>>(TFrom) -> TTo
     var tFrom = TypeBuilder.variable('TFrom');
@@ -1503,11 +1074,8 @@
   }
 }
 
-/**
- * Tests GLB, which only exists in strong mode.
- */
 @reflectiveTest
-class StrongGreatestLowerBoundTest extends BoundTestBase {
+class GreatestLowerBoundTest extends BoundTestBase {
   void setUp() {
     super.setUp();
     typeSystem = new Dart2TypeSystem(typeProvider);
@@ -1823,20 +1391,19 @@
   }
 }
 
-/**
- * Tests LUB in strong mode.
- *
- * Tests defined in this class are ones whose behavior is spec mode-specific.
- * In particular, function parameters are compared using LUB in spec mode, but
- * GLB in strong mode.
- */
 @reflectiveTest
-class StrongLeastUpperBoundTest extends LeastUpperBoundTestBase {
+class LeastUpperBoundFunctionsTest extends BoundTestBase {
   void setUp() {
     super.setUp();
     typeSystem = new Dart2TypeSystem(typeProvider);
   }
 
+  void test_functionsDifferentRequiredArity() {
+    FunctionType type1 = _functionType([intType, intType]);
+    FunctionType type2 = _functionType([intType, intType, intType]);
+    _checkLeastUpperBound(type1, type2, functionType);
+  }
+
   void test_functionsFuzzyArrows() {
     FunctionType type1 = _functionType([dynamicType]);
     FunctionType type2 = _functionType([intType]);
@@ -1867,6 +1434,149 @@
     _checkLeastUpperBound(type1, type2, expected);
   }
 
+  void test_functionsIgnoreExtraNamedParams() {
+    FunctionType type1 = _functionType([], named: {'a': intType, 'b': intType});
+    FunctionType type2 = _functionType([], named: {'a': intType, 'c': intType});
+    FunctionType expected = _functionType([], named: {'a': intType});
+    _checkLeastUpperBound(type1, type2, expected);
+  }
+
+  void test_functionsIgnoreExtraPositionalParams() {
+    FunctionType type1 =
+        _functionType([], optional: [intType, intType, stringType]);
+    FunctionType type2 = _functionType([], optional: [intType]);
+    FunctionType expected = _functionType([], optional: [intType]);
+    _checkLeastUpperBound(type1, type2, expected);
+  }
+
+  void test_functionsLubReturnType() {
+    FunctionType type1 = _functionType([], returns: intType);
+    FunctionType type2 = _functionType([], returns: doubleType);
+    FunctionType expected = _functionType([], returns: numType);
+    _checkLeastUpperBound(type1, type2, expected);
+  }
+
+  void test_functionsSameType() {
+    FunctionType type1 = _functionType([stringType, intType, numType],
+        optional: [doubleType], named: {'n': numType}, returns: intType);
+    FunctionType type2 = _functionType([stringType, intType, numType],
+        optional: [doubleType], named: {'n': numType}, returns: intType);
+    FunctionType expected = _functionType([stringType, intType, numType],
+        optional: [doubleType], named: {'n': numType}, returns: intType);
+    _checkLeastUpperBound(type1, type2, expected);
+  }
+}
+
+@reflectiveTest
+class LeastUpperBoundTest extends BoundTestBase {
+  void setUp() {
+    super.setUp();
+    typeSystem = new Dart2TypeSystem(typeProvider);
+  }
+
+  void test_bottom_function() {
+    _checkLeastUpperBound(bottomType, simpleFunctionType, simpleFunctionType);
+  }
+
+  void test_bottom_interface() {
+    DartType interfaceType = ElementFactory.classElement2('A', []).type;
+    _checkLeastUpperBound(bottomType, interfaceType, interfaceType);
+  }
+
+  void test_bottom_typeParam() {
+    DartType typeParam = ElementFactory.typeParameterElement('T').type;
+    _checkLeastUpperBound(bottomType, typeParam, typeParam);
+  }
+
+  void test_directInterfaceCase() {
+    // class A
+    // class B implements A
+    // class C implements B
+    ClassElementImpl classA = ElementFactory.classElement2("A");
+    ClassElementImpl classB = ElementFactory.classElement2("B");
+    ClassElementImpl classC = ElementFactory.classElement2("C");
+    InterfaceType typeA = classA.type;
+    InterfaceType typeB = classB.type;
+    InterfaceType typeC = classC.type;
+    classB.interfaces = <InterfaceType>[typeA];
+    classC.interfaces = <InterfaceType>[typeB];
+    _checkLeastUpperBound(typeB, typeC, typeB);
+  }
+
+  void test_directSubclassCase() {
+    // class A
+    // class B extends A
+    // class C extends B
+    ClassElementImpl classA = ElementFactory.classElement2("A");
+    ClassElementImpl classB = ElementFactory.classElement("B", classA.type);
+    ClassElementImpl classC = ElementFactory.classElement("C", classB.type);
+    InterfaceType typeB = classB.type;
+    InterfaceType typeC = classC.type;
+    _checkLeastUpperBound(typeB, typeC, typeB);
+  }
+
+  void test_dynamic_bottom() {
+    _checkLeastUpperBound(dynamicType, bottomType, dynamicType);
+  }
+
+  void test_dynamic_function() {
+    _checkLeastUpperBound(dynamicType, simpleFunctionType, dynamicType);
+  }
+
+  void test_dynamic_interface() {
+    DartType interfaceType = ElementFactory.classElement2('A', []).type;
+    _checkLeastUpperBound(dynamicType, interfaceType, dynamicType);
+  }
+
+  void test_dynamic_typeParam() {
+    DartType typeParam = ElementFactory.typeParameterElement('T').type;
+    _checkLeastUpperBound(dynamicType, typeParam, dynamicType);
+  }
+
+  void test_dynamic_void() {
+    // Note: _checkLeastUpperBound tests `LUB(x, y)` as well as `LUB(y, x)`
+    _checkLeastUpperBound(dynamicType, voidType, voidType);
+  }
+
+  void test_interface_function() {
+    DartType interfaceType = ElementFactory.classElement2('A', []).type;
+    _checkLeastUpperBound(interfaceType, simpleFunctionType, objectType);
+  }
+
+  void test_mixinCase() {
+    // class A
+    // class B extends A
+    // class C extends A
+    // class D extends B with M, N, O, P
+    ClassElement classA = ElementFactory.classElement2("A");
+    ClassElement classB = ElementFactory.classElement("B", classA.type);
+    ClassElement classC = ElementFactory.classElement("C", classA.type);
+    ClassElementImpl classD = ElementFactory.classElement("D", classB.type);
+    InterfaceType typeA = classA.type;
+    InterfaceType typeC = classC.type;
+    InterfaceType typeD = classD.type;
+    classD.mixins = <InterfaceType>[
+      ElementFactory.classElement2("M").type,
+      ElementFactory.classElement2("N").type,
+      ElementFactory.classElement2("O").type,
+      ElementFactory.classElement2("P").type
+    ];
+    _checkLeastUpperBound(typeD, typeC, typeA);
+  }
+
+  void test_nestedFunctionsLubInnerParamTypes() {
+    FunctionType type1 = _functionType([
+      _functionType([stringType, intType, intType])
+    ]);
+    FunctionType type2 = _functionType([
+      _functionType([intType, doubleType, numType])
+    ]);
+    FunctionType expected = _functionType([
+      _functionType([objectType, numType, numType])
+    ]);
+    _checkLeastUpperBound(type1, type2, expected);
+  }
+
   void test_nestedNestedFunctionsGlbInnermostParamTypes() {
     FunctionType type1 = _functionType([
       _functionType([
@@ -1886,6 +1596,148 @@
     _checkLeastUpperBound(type1, type2, expected);
   }
 
+  void test_object() {
+    ClassElementImpl classA = ElementFactory.classElement2("A");
+    ClassElementImpl classB = ElementFactory.classElement2("B");
+    InterfaceType typeA = classA.type;
+    InterfaceType typeB = classB.type;
+    DartType typeObject = typeA.element.supertype;
+    // assert that object does not have a super type
+    expect((typeObject.element as ClassElement).supertype, isNull);
+    // assert that both A and B have the same super type of Object
+    expect(typeB.element.supertype, typeObject);
+    // finally, assert that the only least upper bound of A and B is Object
+    _checkLeastUpperBound(typeA, typeB, typeObject);
+  }
+
+  void test_self() {
+    DartType typeParam = ElementFactory.typeParameterElement('T').type;
+    DartType interfaceType = ElementFactory.classElement2('A', []).type;
+
+    List<DartType> types = [
+      dynamicType,
+      voidType,
+      bottomType,
+      typeParam,
+      interfaceType,
+      simpleFunctionType
+    ];
+
+    for (DartType type in types) {
+      _checkLeastUpperBound(type, type, type);
+    }
+  }
+
+  void test_sharedSuperclass1() {
+    ClassElementImpl classA = ElementFactory.classElement2("A");
+    ClassElementImpl classB = ElementFactory.classElement("B", classA.type);
+    ClassElementImpl classC = ElementFactory.classElement("C", classA.type);
+    InterfaceType typeA = classA.type;
+    InterfaceType typeB = classB.type;
+    InterfaceType typeC = classC.type;
+    _checkLeastUpperBound(typeB, typeC, typeA);
+  }
+
+  void test_sharedSuperclass2() {
+    ClassElementImpl classA = ElementFactory.classElement2("A");
+    ClassElementImpl classB = ElementFactory.classElement("B", classA.type);
+    ClassElementImpl classC = ElementFactory.classElement("C", classA.type);
+    ClassElementImpl classD = ElementFactory.classElement("D", classC.type);
+    InterfaceType typeA = classA.type;
+    InterfaceType typeB = classB.type;
+    InterfaceType typeD = classD.type;
+    _checkLeastUpperBound(typeB, typeD, typeA);
+  }
+
+  void test_sharedSuperclass3() {
+    ClassElementImpl classA = ElementFactory.classElement2("A");
+    ClassElementImpl classB = ElementFactory.classElement("B", classA.type);
+    ClassElementImpl classC = ElementFactory.classElement("C", classB.type);
+    ClassElementImpl classD = ElementFactory.classElement("D", classB.type);
+    InterfaceType typeB = classB.type;
+    InterfaceType typeC = classC.type;
+    InterfaceType typeD = classD.type;
+    _checkLeastUpperBound(typeC, typeD, typeB);
+  }
+
+  void test_sharedSuperclass4() {
+    ClassElement classA = ElementFactory.classElement2("A");
+    ClassElement classA2 = ElementFactory.classElement2("A2");
+    ClassElement classA3 = ElementFactory.classElement2("A3");
+    ClassElementImpl classB = ElementFactory.classElement("B", classA.type);
+    ClassElementImpl classC = ElementFactory.classElement("C", classA.type);
+    InterfaceType typeA = classA.type;
+    InterfaceType typeA2 = classA2.type;
+    InterfaceType typeA3 = classA3.type;
+    InterfaceType typeB = classB.type;
+    InterfaceType typeC = classC.type;
+    classB.interfaces = <InterfaceType>[typeA2];
+    classC.interfaces = <InterfaceType>[typeA3];
+    _checkLeastUpperBound(typeB, typeC, typeA);
+  }
+
+  void test_sharedSuperinterface1() {
+    ClassElementImpl classA = ElementFactory.classElement2("A");
+    ClassElementImpl classB = ElementFactory.classElement2("B");
+    ClassElementImpl classC = ElementFactory.classElement2("C");
+    InterfaceType typeA = classA.type;
+    InterfaceType typeB = classB.type;
+    InterfaceType typeC = classC.type;
+    classB.interfaces = <InterfaceType>[typeA];
+    classC.interfaces = <InterfaceType>[typeA];
+    _checkLeastUpperBound(typeB, typeC, typeA);
+  }
+
+  void test_sharedSuperinterface2() {
+    ClassElementImpl classA = ElementFactory.classElement2("A");
+    ClassElementImpl classB = ElementFactory.classElement2("B");
+    ClassElementImpl classC = ElementFactory.classElement2("C");
+    ClassElementImpl classD = ElementFactory.classElement2("D");
+    InterfaceType typeA = classA.type;
+    InterfaceType typeB = classB.type;
+    InterfaceType typeC = classC.type;
+    InterfaceType typeD = classD.type;
+    classB.interfaces = <InterfaceType>[typeA];
+    classC.interfaces = <InterfaceType>[typeA];
+    classD.interfaces = <InterfaceType>[typeC];
+    _checkLeastUpperBound(typeB, typeD, typeA);
+  }
+
+  void test_sharedSuperinterface3() {
+    ClassElementImpl classA = ElementFactory.classElement2("A");
+    ClassElementImpl classB = ElementFactory.classElement2("B");
+    ClassElementImpl classC = ElementFactory.classElement2("C");
+    ClassElementImpl classD = ElementFactory.classElement2("D");
+    InterfaceType typeA = classA.type;
+    InterfaceType typeB = classB.type;
+    InterfaceType typeC = classC.type;
+    InterfaceType typeD = classD.type;
+    classB.interfaces = <InterfaceType>[typeA];
+    classC.interfaces = <InterfaceType>[typeB];
+    classD.interfaces = <InterfaceType>[typeB];
+    _checkLeastUpperBound(typeC, typeD, typeB);
+  }
+
+  void test_sharedSuperinterface4() {
+    ClassElement classA = ElementFactory.classElement2("A");
+    ClassElement classA2 = ElementFactory.classElement2("A2");
+    ClassElement classA3 = ElementFactory.classElement2("A3");
+    ClassElementImpl classB = ElementFactory.classElement2("B");
+    ClassElementImpl classC = ElementFactory.classElement2("C");
+    InterfaceType typeA = classA.type;
+    InterfaceType typeA2 = classA2.type;
+    InterfaceType typeA3 = classA3.type;
+    InterfaceType typeB = classB.type;
+    InterfaceType typeC = classC.type;
+    classB.interfaces = <InterfaceType>[typeA, typeA2];
+    classC.interfaces = <InterfaceType>[typeA, typeA3];
+    _checkLeastUpperBound(typeB, typeC, typeA);
+  }
+
+  void test_twoComparables() {
+    _checkLeastUpperBound(stringType, numType, objectType);
+  }
+
   void test_typeParam_boundedByParam() {
     TypeParameterElementImpl typeParamElementT =
         ElementFactory.typeParameterElement('T');
@@ -1918,6 +1770,36 @@
     _checkLeastUpperBound(s, u, AType.instantiate([objectType]));
   }
 
+  void test_typeParam_function_bounded() {
+    TypeParameterElementImpl typeParamElement =
+        ElementFactory.typeParameterElement('T');
+    typeParamElement.bound = functionType;
+    DartType typeParam = typeParamElement.type;
+    _checkLeastUpperBound(typeParam, simpleFunctionType, functionType);
+  }
+
+  void test_typeParam_function_noBound() {
+    DartType typeParam = ElementFactory.typeParameterElement('T').type;
+    _checkLeastUpperBound(typeParam, simpleFunctionType, objectType);
+  }
+
+  void test_typeParam_interface_bounded() {
+    DartType typeA = ElementFactory.classElement2('A', []).type;
+    DartType typeB = ElementFactory.classElement('B', typeA).type;
+    DartType typeC = ElementFactory.classElement('C', typeA).type;
+    TypeParameterElementImpl typeParamElement =
+        ElementFactory.typeParameterElement('T');
+    typeParamElement.bound = typeB;
+    DartType typeParam = typeParamElement.type;
+    _checkLeastUpperBound(typeParam, typeC, typeA);
+  }
+
+  void test_typeParam_interface_noBound() {
+    DartType typeParam = ElementFactory.typeParameterElement('T').type;
+    DartType interfaceType = ElementFactory.classElement2('A', []).type;
+    _checkLeastUpperBound(typeParam, interfaceType, objectType);
+  }
+
   /// Check least upper bound of the same class with different type parameters.
   void test_typeParameters_different() {
     // class List<int>
@@ -1929,6 +1811,13 @@
     _checkLeastUpperBound(listOfIntType, listOfDoubleType, listOfNum);
   }
 
+  void test_typeParameters_same() {
+    // List<int>
+    // List<int>
+    InterfaceType listOfIntType = listType.instantiate(<DartType>[intType]);
+    _checkLeastUpperBound(listOfIntType, listOfIntType, listOfIntType);
+  }
+
   /// Check least upper bound of two related classes with different
   /// type parameters.
   void test_typeParametersAndClass_different() {
@@ -1940,10 +1829,113 @@
     // TODO(leafp): this should be iterableOfNumType
     _checkLeastUpperBound(listOfIntType, iterableOfDoubleType, objectType);
   }
+
+  void test_void() {
+    List<DartType> types = [
+      bottomType,
+      simpleFunctionType,
+      ElementFactory.classElement2('A', []).type,
+      ElementFactory.typeParameterElement('T').type
+    ];
+    for (DartType type in types) {
+      _checkLeastUpperBound(
+          _functionType([], returns: voidType),
+          _functionType([], returns: type),
+          _functionType([], returns: voidType));
+    }
+  }
 }
 
 @reflectiveTest
-class StrongSubtypingTest extends StrongSubtypingTestBase {
+class NonNullableSubtypingTest extends SubtypingTestBase {
+  @override
+  void setUp() {
+    typeProvider = AnalysisContextFactory.contextWithCoreAndOptions(
+            new AnalysisOptionsImpl()
+              ..contextFeatures = FeatureSet.forTesting(
+                  additionalFeatures: [Feature.non_nullable]),
+            resourceProvider: new MemoryResourceProvider())
+        .typeProvider;
+
+    // TypeSystem should use the context type provider.
+    typeSystem = new Dart2TypeSystem(typeProvider);
+
+    LibraryElement coreLibrary = typeProvider.objectType.element.library;
+    LibraryElement asyncLibrary = typeProvider.streamType.element.library;
+
+    // Get a non-nullable type provider for convience during the test.
+    typeProvider = new NonNullableTypeProvider(coreLibrary, asyncLibrary);
+  }
+
+  void test_int_nullableTypes() {
+    List<DartType> equivalents = <DartType>[
+      intType,
+      _star(intType),
+    ];
+    List<DartType> supertypes = <DartType>[
+      _question(intType),
+      objectType,
+      _question(objectType),
+    ];
+    List<DartType> unrelated = <DartType>[doubleType, nullType];
+    _checkGroups(intType,
+        equivalents: equivalents, supertypes: supertypes, unrelated: unrelated);
+  }
+
+  void test_intQuestion_nullableTypes() {
+    List<DartType> equivalents = <DartType>[
+      _question(intType),
+      _star(intType),
+    ];
+    List<DartType> subtypes = <DartType>[
+      intType,
+      nullType,
+    ];
+    List<DartType> supertypes = <DartType>[
+      _question(numType),
+      _star(numType),
+      _question(objectType),
+      _star(objectType),
+    ];
+    List<DartType> unrelated = <DartType>[doubleType, numType, objectType];
+    _checkGroups(_question(intType),
+        equivalents: equivalents,
+        supertypes: supertypes,
+        unrelated: unrelated,
+        subtypes: subtypes);
+  }
+
+  void test_intStar_nullableTypes() {
+    List<DartType> equivalents = <DartType>[
+      intType,
+      _question(intType),
+      _star(intType),
+    ];
+    List<DartType> subtypes = <DartType>[nullType];
+    List<DartType> supertypes = <DartType>[
+      numType,
+      _question(numType),
+      _star(numType),
+      objectType,
+      _question(objectType),
+    ];
+    List<DartType> unrelated = <DartType>[doubleType];
+    _checkGroups(_star(intType),
+        equivalents: equivalents,
+        supertypes: supertypes,
+        unrelated: unrelated,
+        subtypes: subtypes);
+  }
+
+  DartType _question(DartType dartType) =>
+      (dartType as TypeImpl).withNullability(NullabilitySuffix.question);
+
+  DartType _star(DartType dartType) =>
+      (dartType as TypeImpl).withNullability(NullabilitySuffix.star);
+}
+
+@reflectiveTest
+class SubtypingTest extends SubtypingTestBase {
   void test_bottom_isBottom() {
     DartType interfaceType = ElementFactory.classElement2('A', []).type;
     List<DartType> equivalents = <DartType>[bottomType];
@@ -2255,7 +2247,7 @@
   }
 }
 
-class StrongSubtypingTestBase {
+class SubtypingTestBase {
   TypeProvider typeProvider;
   TypeSystem typeSystem;
 
diff --git a/pkg/analyzer/test/src/command_line/arguments_test.dart b/pkg/analyzer/test/src/command_line/arguments_test.dart
index 3662f70..d9e2e10 100644
--- a/pkg/analyzer/test/src/command_line/arguments_test.dart
+++ b/pkg/analyzer/test/src/command_line/arguments_test.dart
@@ -84,7 +84,7 @@
         createDartSdkManager(resourceProvider, false, result);
     expect(manager, isNotNull);
     expect(manager.defaultSdkDirectory,
-        FolderBasedDartSdk.defaultSdkDirectory(resourceProvider));
+        FolderBasedDartSdk.defaultSdkDirectory(resourceProvider)?.path);
     expect(manager.canUseSummaries, false);
   }
 
@@ -96,8 +96,9 @@
     DartSdkManager manager =
         createDartSdkManager(resourceProvider, true, result);
     expect(manager, isNotNull);
+
     expect(manager.defaultSdkDirectory,
-        FolderBasedDartSdk.defaultSdkDirectory(resourceProvider));
+        FolderBasedDartSdk.defaultSdkDirectory(resourceProvider)?.path);
     expect(manager.canUseSummaries, true);
   }
 
diff --git a/pkg/analyzer/test/src/dart/analysis/test_all.dart b/pkg/analyzer/test/src/dart/analysis/test_all.dart
index 481b428..689b3d4 100644
--- a/pkg/analyzer/test/src/dart/analysis/test_all.dart
+++ b/pkg/analyzer/test/src/dart/analysis/test_all.dart
@@ -26,6 +26,7 @@
 import 'search_test.dart' as search;
 import 'session_helper_test.dart' as session_helper;
 import 'session_test.dart' as session;
+import 'unlinked_api_signature_test.dart' as unlinked_api_signature;
 import 'uri_converter_test.dart' as uri_converter;
 
 main() {
@@ -52,6 +53,7 @@
     search.main();
     session.main();
     session_helper.main();
+    unlinked_api_signature.main();
     uri_converter.main();
   }, name: 'analysis');
 }
diff --git a/pkg/analyzer/test/src/dart/analysis/unlinked_api_signature_test.dart b/pkg/analyzer/test/src/dart/analysis/unlinked_api_signature_test.dart
new file mode 100644
index 0000000..8222c70
--- /dev/null
+++ b/pkg/analyzer/test/src/dart/analysis/unlinked_api_signature_test.dart
@@ -0,0 +1,851 @@
+// 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/unlinked_api_signature.dart';
+import 'package:test/test.dart';
+import 'package:test_reflective_loader/test_reflective_loader.dart';
+
+import '../ast/parse_base.dart';
+
+main() {
+  defineReflectiveSuite(() {
+    defineReflectiveTests(UnitApiSignatureTest);
+  });
+}
+
+@reflectiveTest
+class UnitApiSignatureTest extends ParseBase {
+  void assertNotSameSignature(String oldCode, String newCode) {
+    assertSignature(oldCode, newCode, same: false);
+  }
+
+  void assertSameSignature(String oldCode, String newCode) {
+    assertSignature(oldCode, newCode, same: true);
+  }
+
+  void assertSignature(String oldCode, String newCode, {bool same}) {
+    var path = convertPath('/test.dart');
+
+    newFile(path, content: oldCode);
+    var oldUnit = parseUnit(path).unit;
+    var oldSignature = computeUnlinkedApiSignature(oldUnit);
+
+    newFile(path, content: newCode);
+    var newUnit = parseUnit(path).unit;
+    var newSignature = computeUnlinkedApiSignature(newUnit);
+
+    if (same) {
+      expect(newSignature, oldSignature);
+    } else {
+      expect(newSignature, isNot(oldSignature));
+    }
+  }
+
+  test_class_annotation() async {
+    assertNotSameSignature(r'''
+const a = 0;
+
+class C {}
+''', r'''
+const a = 0;
+
+@a
+class C {}
+''');
+  }
+
+  test_class_constructor_block_to_empty() {
+    assertSameSignature(r'''
+class C {
+  C() {
+    var v = 1;
+  }
+}
+''', r'''
+class C {
+  C();
+}
+''');
+  }
+
+  test_class_constructor_body() {
+    assertSameSignature(r'''
+class C {
+  C() {
+    var v = 1;
+  }
+}
+''', r'''
+class C {
+  C() {
+    var v = 2;
+  }
+}
+''');
+  }
+
+  test_class_constructor_empty_to_block() {
+    assertSameSignature(r'''
+class C {
+  C();
+}
+''', r'''
+class C {
+  C() {
+    var v = 1;
+  }
+}
+''');
+  }
+
+  test_class_constructor_initializer_const() {
+    assertNotSameSignature(r'''
+class C {
+  final int f;
+  const C() : f = 1;
+}
+''', r'''
+class C {
+  final int f;
+  const C() : f = 2;
+}
+''');
+  }
+
+  test_class_constructor_initializer_empty() {
+    assertSameSignature(r'''
+class C {
+  C.foo() : ;
+}
+''', r'''
+class C {
+  C.foo() : f;
+}
+''');
+  }
+
+  test_class_constructor_initializer_notConst() {
+    assertSameSignature(r'''
+class C {
+  final int f;
+  C.foo() : f = 1;
+  const C.bar();
+}
+''', r'''
+class C {
+  final int f;
+  C.foo() : f = 2;
+  const C.bar();
+}
+''');
+  }
+
+  test_class_constructor_parameters_add() {
+    assertNotSameSignature(r'''
+class C {
+  C(int a);
+}
+''', r'''
+class C {
+  C(int a, int b);
+}
+''');
+  }
+
+  test_class_constructor_parameters_remove() {
+    assertNotSameSignature(r'''
+class C {
+  C(int a, int b);
+}
+''', r'''
+class C {
+  C(int a);
+}
+''');
+  }
+
+  test_class_constructor_parameters_rename() {
+    assertNotSameSignature(r'''
+class C {
+  C(int a);
+}
+''', r'''
+class C {
+  C(int b);
+}
+''');
+  }
+
+  test_class_constructor_parameters_type() {
+    assertNotSameSignature(r'''
+class C {
+  C(int p);
+}
+''', r'''
+class C {
+  C(double p);
+}
+''');
+  }
+
+  test_class_extends() {
+    assertNotSameSignature(r'''
+class A {}
+class B {}
+''', r'''
+class A {}
+class B extends A {}
+''');
+  }
+
+  test_class_field_withoutType() {
+    assertNotSameSignature(r'''
+class C {
+  var a = 1;
+}
+''', r'''
+class C {
+  var a = 2;
+}
+''');
+  }
+
+  test_class_field_withoutType2() {
+    assertNotSameSignature(r'''
+class C {
+  var a = 1, b = 2, c, d = 4;
+}
+''', r'''
+class C {
+  var a = 1, b, c = 3, d = 4;
+}
+''');
+  }
+
+  test_class_field_withType() {
+    assertSameSignature(r'''
+class C {
+  int a = 1, b, c = 3;
+}
+''', r'''
+class C {
+  int a = 0, b = 2, c;
+}
+''');
+  }
+
+  test_class_field_withType_const() {
+    assertNotSameSignature(r'''
+class C {
+  static const int a = 1;
+}
+''', r'''
+class C {
+  static const int a = 2;
+}
+''');
+  }
+
+  test_class_field_withType_final_hasConstConstructor() {
+    assertNotSameSignature(r'''
+class C {
+  final int a = 1;
+  const C();
+}
+''', r'''
+class C {
+  final int a = 2;
+  const C();
+}
+''');
+  }
+
+  test_class_field_withType_final_noConstConstructor() {
+    assertSameSignature(r'''
+class C {
+  final int a = 1;
+}
+''', r'''
+class C {
+  final int a = 2;
+}
+''');
+  }
+
+  test_class_field_withType_hasConstConstructor() {
+    assertSameSignature(r'''
+class C {
+  int a = 1;
+  const C();
+}
+''', r'''
+class C {
+  int a = 2;
+  const C();
+}
+''');
+  }
+
+  test_class_field_withType_static_final_hasConstConstructor() {
+    assertSameSignature(r'''
+class C {
+  static final int a = 1;
+  const C();
+}
+''', r'''
+class C {
+  static final int a = 2;
+  const C();
+}
+''');
+  }
+
+  test_class_field_withType_static_hasConstConstructor() {
+    assertSameSignature(r'''
+class C {
+  static int a = 1;
+  const C();
+}
+''', r'''
+class C {
+  static int a = 2;
+  const C();
+}
+''');
+  }
+
+  test_class_implements() {
+    assertNotSameSignature(r'''
+class A {}
+class B {}
+''', r'''
+class A {}
+class B implements A {}
+''');
+  }
+
+  test_class_method_annotation() {
+    assertNotSameSignature(r'''
+const a = 0;
+
+class C {
+  void foo() {}
+}
+''', r'''
+const a = 0;
+
+class C {
+  @a
+  void foo() {}
+}
+''');
+  }
+
+  test_class_method_body_async_to_sync() {
+    assertSameSignature(r'''
+class C {
+  Future foo() async {}
+}
+''', r'''
+class C {
+  Future foo() {}
+}
+''');
+  }
+
+  test_class_method_body_block() {
+    assertSameSignature(r'''
+class C {
+  int foo() {
+    return 1;
+  }
+}
+''', r'''
+class C {
+  int foo() {
+    return 2;
+  }
+}
+''');
+  }
+
+  test_class_method_body_block_to_expression() {
+    assertSameSignature(r'''
+class C {
+  int foo() {
+    return 1;
+  }
+}
+''', r'''
+class C {
+  int foo() => 2;
+}
+''');
+  }
+
+  test_class_method_body_empty_to_block() {
+    assertSameSignature(r'''
+class C {
+  int foo();
+}
+''', r'''
+class C {
+  int foo() {
+    var v = 0;
+  }
+}
+''');
+  }
+
+  test_class_method_body_expression() {
+    assertSameSignature(r'''
+class C {
+  int foo() => 1;
+}
+''', r'''
+class C {
+  int foo() => 2;
+}
+''');
+  }
+
+  test_class_method_body_sync_to_async() {
+    assertSameSignature(r'''
+class C {
+  Future foo() {}
+}
+''', r'''
+class C {
+  Future foo() async {}
+}
+''');
+  }
+
+  test_class_method_getter_body_block_to_expression() {
+    assertSameSignature(r'''
+class C {
+  int get foo {
+    return 1;
+  }
+}
+''', r'''
+class C {
+  int get foo => 2;
+}
+''');
+  }
+
+  test_class_method_getter_body_empty_to_expression() {
+    assertSameSignature(r'''
+class C {
+  int get foo;
+}
+''', r'''
+class C {
+  int get foo => 2;
+}
+''');
+  }
+
+  test_class_method_parameters_add() {
+    assertNotSameSignature(r'''
+class C {
+  foo(int a) {}
+}
+''', r'''
+class C {
+  foo(int a, int b) {}
+}
+''');
+  }
+
+  test_class_method_parameters_remove() {
+    assertNotSameSignature(r'''
+class C {
+  foo(int a, int b) {}
+}
+''', r'''
+class C {
+  foo(int a) {}
+}
+''');
+  }
+
+  test_class_method_parameters_rename() {
+    assertNotSameSignature(r'''
+class C {
+  void foo(int a) {}
+}
+''', r'''
+class C {
+  void foo(int b) {}
+}
+''');
+  }
+
+  test_class_method_parameters_type() {
+    assertNotSameSignature(r'''
+class C {
+  void foo(int p) {}
+}
+''', r'''
+class C {
+  void foo(double p) {}
+}
+''');
+  }
+
+  test_class_method_returnType() {
+    assertNotSameSignature(r'''
+class C {
+  int foo() => 0;
+}
+''', r'''
+class C {
+  num foo() => 0;
+}
+''');
+  }
+
+  test_class_method_typeParameters_add() async {
+    assertNotSameSignature(r'''
+class C {
+  void foo() {}
+}
+''', r'''
+class C {
+  void foo<T>() {}
+}
+''');
+  }
+
+  test_class_method_typeParameters_remove() {
+    assertNotSameSignature(r'''
+class C {
+  void foo<T>() {}
+}
+''', r'''
+class C {
+  void foo() {}
+}
+''');
+  }
+
+  test_class_method_typeParameters_rename() {
+    assertNotSameSignature(r'''
+class C {
+  void foo<T>() {}
+}
+''', r'''
+class C {
+  void foo<U>() {}
+}
+''');
+  }
+
+  test_class_modifier() {
+    assertNotSameSignature(r'''
+class C {}
+''', r'''
+abstract class C {}
+''');
+  }
+
+  test_class_with() {
+    assertNotSameSignature(r'''
+class A {}
+class B {}
+class C extends A {}
+''', r'''
+class A {}
+class B {}
+class C extends A with B {}
+''');
+  }
+
+  test_commentAdd() {
+    assertSameSignature(r'''
+var a = 1;
+var b = 2;
+var c = 3;
+''', r'''
+var a = 1; // comment
+
+/// comment 1
+/// comment 2
+var b = 2;
+
+/**
+ *  Comment
+ */
+var c = 3;
+''');
+  }
+
+  test_commentRemove() {
+    assertSameSignature(r'''
+var a = 1; // comment
+
+/// comment 1
+/// comment 2
+var b = 2;
+
+/**
+ *  Comment
+ */
+var c = 3;
+''', r'''
+var a = 1;
+var b = 2;
+var c = 3;
+''');
+  }
+
+  test_function_annotation() {
+    assertNotSameSignature(r'''
+const a = 0;
+
+void foo() {}
+''', r'''
+const a = 0;
+
+@a
+void foo() {}
+''');
+  }
+
+  test_function_body_async_to_sync() {
+    assertSameSignature(r'''
+Future foo() async {}
+''', r'''
+Future foo() {}
+''');
+  }
+
+  test_function_body_block() {
+    assertSameSignature(r'''
+int foo() {
+  return 1;
+}
+''', r'''
+int foo() {
+  return 2;
+}
+''');
+  }
+
+  test_function_body_block_to_expression() {
+    assertSameSignature(r'''
+int foo() {
+  return 1;
+}
+''', r'''
+int foo() => 2;
+''');
+  }
+
+  test_function_body_expression() {
+    assertSameSignature(r'''
+int foo() => 1;
+''', r'''
+int foo() => 2;
+''');
+  }
+
+  test_function_body_sync_to_async() {
+    assertSameSignature(r'''
+Future foo() {}
+''', r'''
+Future foo() async {}
+''');
+  }
+
+  test_function_getter_block_to_expression() {
+    assertSameSignature(r'''
+int get foo {
+  return 1;
+}
+''', r'''
+int get foo => 2;
+''');
+  }
+
+  test_function_parameters_rename() {
+    assertNotSameSignature(r'''
+void foo(int a) {}
+''', r'''
+void foo(int b) {}
+''');
+  }
+
+  test_function_parameters_type() {
+    assertNotSameSignature(r'''
+void foo(int p) {}
+''', r'''
+void foo(double p) {}
+''');
+  }
+
+  test_function_returnType() {
+    assertNotSameSignature(r'''
+int foo() => 0;
+''', r'''
+num foo() => 0;
+''');
+  }
+
+  test_function_typeParameters_add() {
+    assertNotSameSignature(r'''
+void foo() {}
+''', r'''
+void foo<T>() {}
+''');
+  }
+
+  test_function_typeParameters_remove() {
+    assertNotSameSignature(r'''
+void foo<T>() {}
+''', r'''
+void foo() {}
+''');
+  }
+
+  test_function_typeParameters_rename() {
+    assertNotSameSignature(r'''
+void foo<T>() {}
+''', r'''
+void foo<U>() {}
+''');
+  }
+
+  test_issue34850() {
+    assertNotSameSignature(r'''
+foo
+Future<List<int>> bar() {}
+''', r'''
+foo
+Future<List<int>> bar(int x) {}
+''');
+  }
+
+  test_mixin_field_withoutType() {
+    assertNotSameSignature(r'''
+mixin M {
+  var a = 1;
+}
+''', r'''
+mixin M {
+  var a = 2;
+}
+''');
+  }
+
+  test_mixin_field_withType() {
+    assertSameSignature(r'''
+mixin M {
+  int a = 1, b, c = 3;
+}
+''', r'''
+mixin M {
+  int a = 0, b = 2, c;
+}
+''');
+  }
+
+  test_mixin_implements() {
+    assertNotSameSignature(r'''
+class A {}
+mixin M {}
+''', r'''
+class A {}
+mixin M implements A {}
+''');
+  }
+
+  test_mixin_method_body_block() {
+    assertSameSignature(r'''
+mixin M {
+  int foo() {
+    return 1;
+  }
+}
+''', r'''
+mixin M {
+  int foo() {
+    return 2;
+  }
+}
+''');
+  }
+
+  test_mixin_method_body_expression() {
+    assertSameSignature(r'''
+mixin M {
+  int foo() => 1;
+}
+''', r'''
+mixin M {
+  int foo() => 2;
+}
+''');
+  }
+
+  test_mixin_on() {
+    assertNotSameSignature(r'''
+class A {}
+mixin M {}
+''', r'''
+class A {}
+mixin M on A {}
+''');
+  }
+
+  test_topLevelVariable_withoutType() {
+    assertNotSameSignature(r'''
+var a = 1;
+''', r'''
+var a = 2;
+''');
+  }
+
+  test_topLevelVariable_withoutType2() {
+    assertNotSameSignature(r'''
+var a = 1, b = 2, c, d = 4;;
+''', r'''
+var a = 1, b, c = 3, d = 4;;
+''');
+  }
+
+  test_topLevelVariable_withType() {
+    assertSameSignature(r'''
+int a = 1, b, c = 3;
+''', r'''
+int a = 0, b = 2, c;
+''');
+  }
+
+  test_topLevelVariable_withType_const() {
+    assertNotSameSignature(r'''
+const int a = 1;
+''', r'''
+const int a = 2;
+''');
+  }
+
+  test_topLevelVariable_withType_final() {
+    assertSameSignature(r'''
+final int a = 1;
+''', r'''
+final int a = 2;
+''');
+  }
+
+  test_typedef_generic_parameters_type() {
+    assertNotSameSignature(r'''
+typedef F = void Function(int);
+''', r'''
+typedef F = void Function(double);
+''');
+  }
+}
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 7be6ca3..c722521 100644
--- a/pkg/analyzer/test/src/dart/resolution/non_nullable_test.dart
+++ b/pkg/analyzer/test/src/dart/resolution/non_nullable_test.dart
@@ -262,12 +262,6 @@
       'int? Function(bool!, String!, String?)?',
     );
   }
-}
-
-@reflectiveTest
-class NullableTest extends DriverResolutionTest {
-  @override
-  bool get typeToStringWithNullability => true;
 
   test_class_hierarchy() async {
     addTestFile('''
@@ -301,6 +295,58 @@
     assertType(findNode.typeName('C;'), 'C');
   }
 
+  test_mixin_hierarchy() async {
+    addTestFile('''
+class A {}
+
+mixin X1 on A {} // 1
+mixin X2 implements A {} // 2
+''');
+    await resolveTestFile();
+    assertNoTestErrors();
+
+    assertType(findNode.typeName('A {} // 1'), 'A');
+    assertType(findNode.typeName('A {} // 2'), 'A');
+  }
+}
+
+@reflectiveTest
+class NullableTest extends DriverResolutionTest {
+  @override
+  bool get typeToStringWithNullability => true;
+
+  test_class_hierarchy() async {
+    addTestFile('''
+class A {}
+
+class X1 extends A {} // 1
+class X2 implements A {} // 2
+class X3 with A {} // 3
+''');
+    await resolveTestFile();
+    assertNoTestErrors();
+
+    assertType(findNode.typeName('A {} // 1'), 'A*');
+    assertType(findNode.typeName('A {} // 2'), 'A*');
+    assertType(findNode.typeName('A {} // 3'), 'A*');
+  }
+
+  test_classTypeAlias_hierarchy() async {
+    addTestFile('''
+class A {}
+class B {}
+class C {}
+
+class X = A with B implements C;
+''');
+    await resolveTestFile();
+    assertNoTestErrors();
+
+    assertType(findNode.typeName('A with'), 'A*');
+    assertType(findNode.typeName('B implements'), 'B*');
+    assertType(findNode.typeName('C;'), 'C*');
+  }
+
   test_local_variable_interfaceType_notMigrated() async {
     addTestFile('''
 main() {
@@ -325,7 +371,7 @@
     await resolveTestFile();
     assertNoTestErrors();
 
-    assertType(findNode.typeName('A {} // 1'), 'A');
-    assertType(findNode.typeName('A {} // 2'), 'A');
+    assertType(findNode.typeName('A {} // 1'), 'A*');
+    assertType(findNode.typeName('A {} // 2'), 'A*');
   }
 }
diff --git a/pkg/analyzer/test/src/diagnostics/ambiguous_set_or_map_literal_test.dart b/pkg/analyzer/test/src/diagnostics/ambiguous_set_or_map_literal_test.dart
index 78754f2..26f5983 100644
--- a/pkg/analyzer/test/src/diagnostics/ambiguous_set_or_map_literal_test.dart
+++ b/pkg/analyzer/test/src/diagnostics/ambiguous_set_or_map_literal_test.dart
@@ -29,6 +29,15 @@
 
 @reflectiveTest
 class AmbiguousSetOrMapLiteralEitherTest extends DriverResolutionTest {
+  test_invalidPrefixOperator() async {
+    // Guard against an exception being thrown.
+    await assertErrorsInCode('''
+union(a, b) => !{...a, ...b};
+''', [
+      error(CompileTimeErrorCode.AMBIGUOUS_SET_OR_MAP_LITERAL_EITHER, 16, 12),
+    ]);
+  }
+
   test_setAndMap() async {
     assertErrorsInCode('''
 var map;
diff --git a/pkg/analyzer/test/src/diagnostics/must_call_super_test.dart b/pkg/analyzer/test/src/diagnostics/must_call_super_test.dart
index 32d9967..ed220c7 100644
--- a/pkg/analyzer/test/src/diagnostics/must_call_super_test.dart
+++ b/pkg/analyzer/test/src/diagnostics/must_call_super_test.dart
@@ -54,7 +54,7 @@
     ]);
   }
 
-  test_fromExtendingClass_abstractImplementation() async {
+  test_fromExtendingClass_abstractInSuperclass() async {
     await assertNoErrorsInCode(r'''
 import 'package:meta/meta.dart';
 abstract class A {
@@ -68,6 +68,20 @@
 ''');
   }
 
+  test_fromExtendingClass_abstractInSubclass() async {
+    await assertNoErrorsInCode(r'''
+import 'package:meta/meta.dart';
+abstract class A {
+  @mustCallSuper
+  void a() {}
+}
+class B extends A {
+  @override
+  void a();
+}
+''');
+  }
+
   test_fromInterface() async {
     await assertNoErrorsInCode(r'''
 import 'package:meta/meta.dart';
diff --git a/pkg/analyzer/test/src/diagnostics/non_const_call_to_literal_constructor.dart b/pkg/analyzer/test/src/diagnostics/non_const_call_to_literal_constructor.dart
index 3b24286..408fc1a 100644
--- a/pkg/analyzer/test/src/diagnostics/non_const_call_to_literal_constructor.dart
+++ b/pkg/analyzer/test/src/diagnostics/non_const_call_to_literal_constructor.dart
@@ -62,7 +62,7 @@
   }
 
   test_namedConstructor() async {
-    await assertErrorCodesInCode(r'''
+    await assertErrorsInCode(r'''
 import 'package:meta/meta.dart';
 class A {
   @literal
@@ -71,11 +71,14 @@
 void main() {
   var a = A.named();
 }
-''', [HintCode.NON_CONST_CALL_TO_LITERAL_CONSTRUCTOR]);
+''', [
+      error(HintCode.UNUSED_LOCAL_VARIABLE, 95, 1),
+      error(HintCode.NON_CONST_CALL_TO_LITERAL_CONSTRUCTOR, 99, 9),
+    ]);
   }
 
   test_nonConstContext() async {
-    await assertErrorCodesInCode(r'''
+    await assertErrorsInCode(r'''
 import 'package:meta/meta.dart';
 class A {
   @literal
@@ -84,7 +87,10 @@
 void main() {
   var a = A();
 }
-''', [HintCode.NON_CONST_CALL_TO_LITERAL_CONSTRUCTOR]);
+''', [
+      error(HintCode.UNUSED_LOCAL_VARIABLE, 89, 1),
+      error(HintCode.NON_CONST_CALL_TO_LITERAL_CONSTRUCTOR, 93, 3),
+    ]);
   }
 
   test_unconstableCreation() async {
@@ -102,7 +108,7 @@
   }
 
   test_usingNew() async {
-    await assertErrorCodesInCode(r'''
+    await assertErrorsInCode(r'''
 import 'package:meta/meta.dart';
 class A {
   @literal
@@ -111,6 +117,9 @@
 void main() {
   var a = new A();
 }
-''', [HintCode.NON_CONST_CALL_TO_LITERAL_CONSTRUCTOR_USING_NEW]);
+''', [
+      error(HintCode.UNUSED_LOCAL_VARIABLE, 89, 1),
+      error(HintCode.NON_CONST_CALL_TO_LITERAL_CONSTRUCTOR_USING_NEW, 93, 7),
+    ]);
   }
 }
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
index 4ae32aa..7f85015 100644
--- 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
@@ -23,7 +23,7 @@
   test_inList_deferred() async {
     newFile(convertPath('/test/lib/lib1.dart'), content: r'''
 const bool c = true;''');
-    await assertErrorCodesInCode(
+    await assertErrorsInCode(
         r'''
 import 'lib1.dart' deferred as a;
 f() {
@@ -31,10 +31,15 @@
 }''',
         analysisOptions.experimentStatus.constant_update_2018
             ? [
-                CompileTimeErrorCode
-                    .NON_CONSTANT_IF_ELEMENT_CONDITION_FROM_DEFERRED_LIBRARY
+                error(
+                    CompileTimeErrorCode
+                        .NON_CONSTANT_IF_ELEMENT_CONDITION_FROM_DEFERRED_LIBRARY,
+                    59,
+                    3),
               ]
-            : [CompileTimeErrorCode.NON_CONSTANT_LIST_ELEMENT]);
+            : [
+                error(CompileTimeErrorCode.NON_CONSTANT_LIST_ELEMENT, 56, 9),
+              ]);
   }
 
   test_inList_nonConst() async {
@@ -50,7 +55,7 @@
   test_inList_notDeferred() async {
     newFile(convertPath('/test/lib/lib1.dart'), content: r'''
 const bool c = true;''');
-    await assertErrorCodesInCode(
+    await assertErrorsInCode(
         r'''
 import 'lib1.dart' as a;
 f() {
@@ -58,13 +63,15 @@
 }''',
         analysisOptions.experimentStatus.constant_update_2018
             ? []
-            : [CompileTimeErrorCode.NON_CONSTANT_LIST_ELEMENT]);
+            : [
+                error(CompileTimeErrorCode.NON_CONSTANT_LIST_ELEMENT, 47, 9),
+              ]);
   }
 
   test_inMap_deferred() async {
     newFile(convertPath('/test/lib/lib1.dart'), content: r'''
 const bool c = true;''');
-    await assertErrorCodesInCode(
+    await assertErrorsInCode(
         r'''
 import 'lib1.dart' deferred as a;
 f() {
@@ -72,10 +79,15 @@
 }''',
         analysisOptions.experimentStatus.constant_update_2018
             ? [
-                CompileTimeErrorCode
-                    .NON_CONSTANT_IF_ELEMENT_CONDITION_FROM_DEFERRED_LIBRARY
+                error(
+                    CompileTimeErrorCode
+                        .NON_CONSTANT_IF_ELEMENT_CONDITION_FROM_DEFERRED_LIBRARY,
+                    59,
+                    3),
               ]
-            : [CompileTimeErrorCode.NON_CONSTANT_MAP_ELEMENT]);
+            : [
+                error(CompileTimeErrorCode.NON_CONSTANT_MAP_ELEMENT, 56, 13),
+              ]);
   }
 
   test_inMap_notConst() async {
@@ -91,7 +103,7 @@
   test_inMap_notDeferred() async {
     newFile(convertPath('/test/lib/lib1.dart'), content: r'''
 const bool c = true;''');
-    await assertErrorCodesInCode(
+    await assertErrorsInCode(
         r'''
 import 'lib1.dart' as a;
 f() {
@@ -99,13 +111,15 @@
 }''',
         analysisOptions.experimentStatus.constant_update_2018
             ? []
-            : [CompileTimeErrorCode.NON_CONSTANT_MAP_ELEMENT]);
+            : [
+                error(CompileTimeErrorCode.NON_CONSTANT_MAP_ELEMENT, 47, 13),
+              ]);
   }
 
   test_inSet_deferred() async {
     newFile(convertPath('/test/lib/lib1.dart'), content: r'''
 const bool c = true;''');
-    await assertErrorCodesInCode(
+    await assertErrorsInCode(
         r'''
 import 'lib1.dart' deferred as a;
 f() {
@@ -113,10 +127,15 @@
 }''',
         analysisOptions.experimentStatus.constant_update_2018
             ? [
-                CompileTimeErrorCode
-                    .NON_CONSTANT_IF_ELEMENT_CONDITION_FROM_DEFERRED_LIBRARY
+                error(
+                    CompileTimeErrorCode
+                        .NON_CONSTANT_IF_ELEMENT_CONDITION_FROM_DEFERRED_LIBRARY,
+                    59,
+                    3),
               ]
-            : [CompileTimeErrorCode.NON_CONSTANT_SET_ELEMENT]);
+            : [
+                error(CompileTimeErrorCode.NON_CONSTANT_SET_ELEMENT, 56, 9),
+              ]);
   }
 
   test_inSet_notConst() async {
@@ -132,7 +151,7 @@
   test_inSet_notDeferred() async {
     newFile(convertPath('/test/lib/lib1.dart'), content: r'''
 const bool c = true;''');
-    await assertErrorCodesInCode(
+    await assertErrorsInCode(
         r'''
 import 'lib1.dart' as a;
 f() {
@@ -140,7 +159,9 @@
 }''',
         analysisOptions.experimentStatus.constant_update_2018
             ? []
-            : [CompileTimeErrorCode.NON_CONSTANT_SET_ELEMENT]);
+            : [
+                error(CompileTimeErrorCode.NON_CONSTANT_SET_ELEMENT, 47, 9),
+              ]);
   }
 }
 
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
index de4f61f..998262b 100644
--- 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
@@ -25,17 +25,22 @@
     // reports wrong error code (which is not crucial to fix)
     newFile(convertPath('/test/lib/lib1.dart'), content: r'''
 const int c = 1;''');
-    await assertErrorCodesInCode(r'''
+    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]);
+''', [
+      error(
+          CompileTimeErrorCode.NON_CONSTANT_LIST_ELEMENT_FROM_DEFERRED_LIBRARY,
+          0,
+          0),
+    ]);
   }
 
   test_const_ifElement_thenTrue_deferredThen() async {
     newFile(convertPath('/test/lib/lib1.dart'), content: r'''
 const int c = 1;''');
-    await assertErrorCodesInCode(
+    await assertErrorsInCode(
         r'''
 import 'lib1.dart' deferred as a;
 const cond = true;
@@ -43,28 +48,43 @@
 ''',
         analysisOptions.experimentStatus.constant_update_2018
             ? [
-                CompileTimeErrorCode
-                    .NON_CONSTANT_LIST_ELEMENT_FROM_DEFERRED_LIBRARY
+                error(
+                    CompileTimeErrorCode
+                        .NON_CONSTANT_LIST_ELEMENT_FROM_DEFERRED_LIBRARY,
+                    79,
+                    3),
               ]
-            : [CompileTimeErrorCode.NON_CONSTANT_LIST_ELEMENT]);
+            : [
+                error(CompileTimeErrorCode.NON_CONSTANT_LIST_ELEMENT, 69, 13),
+              ]);
   }
 
   test_const_topLevel_deferred() async {
     newFile(convertPath('/test/lib/lib1.dart'), content: r'''
 const int c = 1;''');
-    await assertErrorCodesInCode(r'''
+    await assertErrorsInCode(r'''
 import 'lib1.dart' deferred as a;
 var v = const [a.c];
-''', [CompileTimeErrorCode.NON_CONSTANT_LIST_ELEMENT_FROM_DEFERRED_LIBRARY]);
+''', [
+      error(
+          CompileTimeErrorCode.NON_CONSTANT_LIST_ELEMENT_FROM_DEFERRED_LIBRARY,
+          49,
+          3),
+    ]);
   }
 
   test_const_topLevel_deferred_nested() async {
     newFile(convertPath('/test/lib/lib1.dart'), content: r'''
 const int c = 1;''');
-    await assertErrorCodesInCode(r'''
+    await assertErrorsInCode(r'''
 import 'lib1.dart' deferred as a;
 var v = const [a.c + 1];
-''', [CompileTimeErrorCode.NON_CONSTANT_LIST_ELEMENT_FROM_DEFERRED_LIBRARY]);
+''', [
+      error(
+          CompileTimeErrorCode.NON_CONSTANT_LIST_ELEMENT_FROM_DEFERRED_LIBRARY,
+          49,
+          7),
+    ]);
   }
 }
 
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 585bf90..2803c58 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
@@ -19,88 +19,146 @@
 @reflectiveTest
 class NonConstantListElementTest extends DriverResolutionTest {
   test_const_forElement() async {
-    await assertErrorCodesInCode(r'''
+    await assertErrorsInCode(r'''
 const Set set = {};
 var v = const [for(final x in set) x];
-''', [CompileTimeErrorCode.NON_CONSTANT_LIST_ELEMENT]);
+''', [
+      error(CompileTimeErrorCode.NON_CONSTANT_LIST_ELEMENT, 35, 21),
+    ]);
   }
 
   test_const_ifElement_thenElseFalse_finalElse() async {
-    await assertErrorCodesInCode('''
+    await assertErrorsInCode(
+        '''
 final dynamic a = 0;
 var v = const [if (1 < 0) 0 else a];
-''', [CompileTimeErrorCode.NON_CONSTANT_LIST_ELEMENT]);
+''',
+        analysisOptions.experimentStatus.constant_update_2018
+            ? [
+                error(CompileTimeErrorCode.NON_CONSTANT_LIST_ELEMENT, 54, 1),
+              ]
+            : [
+                error(CompileTimeErrorCode.NON_CONSTANT_LIST_ELEMENT, 36, 19),
+              ]);
   }
 
   test_const_ifElement_thenElseFalse_finalThen() async {
-    await assertErrorCodesInCode('''
+    await assertErrorsInCode(
+        '''
 final dynamic a = 0;
 var v = const [if (1 < 0) a else 0];
-''', [CompileTimeErrorCode.NON_CONSTANT_LIST_ELEMENT]);
+''',
+        analysisOptions.experimentStatus.constant_update_2018
+            ? [
+                error(CompileTimeErrorCode.NON_CONSTANT_LIST_ELEMENT, 47, 1),
+              ]
+            : [
+                error(CompileTimeErrorCode.NON_CONSTANT_LIST_ELEMENT, 36, 19),
+              ]);
   }
 
   test_const_ifElement_thenElseTrue_finalElse() async {
-    await assertErrorCodesInCode('''
+    await assertErrorsInCode(
+        '''
 final dynamic a = 0;
 var v = const [if (1 > 0) 0 else a];
-''', [CompileTimeErrorCode.NON_CONSTANT_LIST_ELEMENT]);
+''',
+        analysisOptions.experimentStatus.constant_update_2018
+            ? [
+                error(CompileTimeErrorCode.NON_CONSTANT_LIST_ELEMENT, 54, 1),
+              ]
+            : [
+                error(CompileTimeErrorCode.NON_CONSTANT_LIST_ELEMENT, 36, 19),
+              ]);
   }
 
   test_const_ifElement_thenElseTrue_finalThen() async {
-    await assertErrorCodesInCode('''
+    await assertErrorsInCode(
+        '''
 final dynamic a = 0;
 var v = const [if (1 > 0) a else 0];
-''', [CompileTimeErrorCode.NON_CONSTANT_LIST_ELEMENT]);
+''',
+        analysisOptions.experimentStatus.constant_update_2018
+            ? [
+                error(CompileTimeErrorCode.NON_CONSTANT_LIST_ELEMENT, 47, 1),
+              ]
+            : [
+                error(CompileTimeErrorCode.NON_CONSTANT_LIST_ELEMENT, 36, 19),
+              ]);
   }
 
   test_const_ifElement_thenFalse_constThen() async {
-    await assertErrorCodesInCode(
+    await assertErrorsInCode(
         '''
 const dynamic a = 0;
 var v = const [if (1 < 0) a];
 ''',
         analysisOptions.experimentStatus.constant_update_2018
             ? []
-            : [CompileTimeErrorCode.NON_CONSTANT_LIST_ELEMENT]);
+            : [
+                error(CompileTimeErrorCode.NON_CONSTANT_LIST_ELEMENT, 36, 12),
+              ]);
   }
 
   test_const_ifElement_thenFalse_finalThen() async {
-    await assertErrorCodesInCode('''
+    await assertErrorsInCode(
+        '''
 final dynamic a = 0;
 var v = const [if (1 < 0) a];
-''', [CompileTimeErrorCode.NON_CONSTANT_LIST_ELEMENT]);
+''',
+        analysisOptions.experimentStatus.constant_update_2018
+            ? [
+                error(CompileTimeErrorCode.NON_CONSTANT_LIST_ELEMENT, 47, 1),
+              ]
+            : [
+                error(CompileTimeErrorCode.NON_CONSTANT_LIST_ELEMENT, 36, 12),
+              ]);
   }
 
   test_const_ifElement_thenTrue_constThen() async {
-    await assertErrorCodesInCode(
+    await assertErrorsInCode(
         '''
 const dynamic a = 0;
 var v = const [if (1 > 0) a];
 ''',
         analysisOptions.experimentStatus.constant_update_2018
             ? []
-            : [CompileTimeErrorCode.NON_CONSTANT_LIST_ELEMENT]);
+            : [
+                error(CompileTimeErrorCode.NON_CONSTANT_LIST_ELEMENT, 36, 12),
+              ]);
   }
 
   test_const_ifElement_thenTrue_finalThen() async {
-    await assertErrorCodesInCode('''
+    await assertErrorsInCode(
+        '''
 final dynamic a = 0;
 var v = const [if (1 > 0) a];
-''', [CompileTimeErrorCode.NON_CONSTANT_LIST_ELEMENT]);
+''',
+        analysisOptions.experimentStatus.constant_update_2018
+            ? [
+                error(CompileTimeErrorCode.NON_CONSTANT_LIST_ELEMENT, 47, 1),
+              ]
+            : [
+                error(CompileTimeErrorCode.NON_CONSTANT_LIST_ELEMENT, 36, 12),
+              ]);
   }
 
   test_const_topVar() async {
-    await assertErrorCodesInCode('''
+    await assertErrorsInCode('''
 final dynamic a = 0;
 var v = const [a];
-''', [CompileTimeErrorCode.NON_CONSTANT_LIST_ELEMENT]);
+''', [
+      error(CompileTimeErrorCode.NON_CONSTANT_LIST_ELEMENT, 36, 1),
+    ]);
   }
 
   test_const_topVar_nested() async {
-    await assertErrorCodesInCode(r'''
+    await assertErrorsInCode(r'''
 final dynamic a = 0;
 var v = const [a + 1];
-''', [CompileTimeErrorCode.NON_CONSTANT_LIST_ELEMENT]);
+''', [
+      error(CompileTimeErrorCode.NON_CONSTANT_LIST_ELEMENT, 36, 1),
+    ]);
   }
 
   test_nonConst_topVar() async {
diff --git a/pkg/analyzer/test/src/diagnostics/non_constant_map_element_test.dart b/pkg/analyzer/test/src/diagnostics/non_constant_map_element_test.dart
index c6c69bd..a57c563 100644
--- a/pkg/analyzer/test/src/diagnostics/non_constant_map_element_test.dart
+++ b/pkg/analyzer/test/src/diagnostics/non_constant_map_element_test.dart
@@ -21,19 +21,32 @@
 @reflectiveTest
 class NonConstantMapElementTest extends DriverResolutionTest {
   test_forElement_cannotBeConst() async {
-    await assertErrorCodesInCode('''
+    await assertErrorsInCode('''
 void main() {
   const {1: null, for (final x in const []) null: null};
 }
-''', [CompileTimeErrorCode.NON_CONSTANT_MAP_ELEMENT]);
+''', [
+      error(CompileTimeErrorCode.NON_CONSTANT_MAP_ELEMENT, 32, 36),
+      error(HintCode.UNUSED_LOCAL_VARIABLE, 43, 1),
+    ]);
   }
 
   test_forElement_nested_cannotBeConst() async {
-    await assertErrorCodesInCode('''
+    await assertErrorsInCode(
+        '''
 void main() {
   const {1: null, if (true) for (final x in const []) null: null};
 }
-''', [CompileTimeErrorCode.NON_CONSTANT_MAP_ELEMENT]);
+''',
+        analysisOptions.experimentStatus.constant_update_2018
+            ? [
+                error(CompileTimeErrorCode.NON_CONSTANT_MAP_ELEMENT, 42, 36),
+                error(HintCode.UNUSED_LOCAL_VARIABLE, 53, 1),
+              ]
+            : [
+                error(CompileTimeErrorCode.NON_CONSTANT_MAP_ELEMENT, 32, 46),
+                error(HintCode.UNUSED_LOCAL_VARIABLE, 53, 1),
+              ]);
   }
 
   test_forElement_notConst_noError() async {
@@ -46,7 +59,7 @@
   }
 
   test_ifElement_mayBeConst() async {
-    await assertErrorCodesInCode(
+    await assertErrorsInCode(
         '''
 void main() {
   const {1: null, if (true) null: null};
@@ -54,11 +67,13 @@
 ''',
         analysisOptions.experimentStatus.constant_update_2018
             ? []
-            : [CompileTimeErrorCode.NON_CONSTANT_MAP_ELEMENT]);
+            : [
+                error(CompileTimeErrorCode.NON_CONSTANT_MAP_ELEMENT, 32, 20),
+              ]);
   }
 
   test_ifElement_nested_mayBeConst() async {
-    await assertErrorCodesInCode(
+    await assertErrorsInCode(
         '''
 void main() {
   const {1: null, if (true) if (true) null: null};
@@ -66,20 +81,30 @@
 ''',
         analysisOptions.experimentStatus.constant_update_2018
             ? []
-            : [CompileTimeErrorCode.NON_CONSTANT_MAP_ELEMENT]);
+            : [
+                error(CompileTimeErrorCode.NON_CONSTANT_MAP_ELEMENT, 32, 30),
+              ]);
   }
 
   test_ifElement_notConstCondition() async {
-    await assertErrorCodesInCode('''
+    await assertErrorsInCode(
+        '''
 void main() {
   bool notConst = true;
   const {1: null, if (notConst) null: null};
 }
-''', [CompileTimeErrorCode.NON_CONSTANT_MAP_ELEMENT]);
+''',
+        analysisOptions.experimentStatus.constant_update_2018
+            ? [
+                error(CompileTimeErrorCode.NON_CONSTANT_MAP_ELEMENT, 60, 8),
+              ]
+            : [
+                error(CompileTimeErrorCode.NON_CONSTANT_MAP_ELEMENT, 56, 24),
+              ]);
   }
 
   test_ifElementWithElse_mayBeConst() async {
-    await assertErrorCodesInCode(
+    await assertErrorsInCode(
         '''
 void main() {
   const isTrue = true;
@@ -88,11 +113,13 @@
 ''',
         analysisOptions.experimentStatus.constant_update_2018
             ? []
-            : [CompileTimeErrorCode.NON_CONSTANT_MAP_ELEMENT]);
+            : [
+                error(CompileTimeErrorCode.NON_CONSTANT_MAP_ELEMENT, 55, 38),
+              ]);
   }
 
   test_spreadElement_mayBeConst() async {
-    await assertErrorCodesInCode(
+    await assertErrorsInCode(
         '''
 void main() {
   const {1: null, ...{null: null}};
@@ -100,16 +127,26 @@
 ''',
         analysisOptions.experimentStatus.constant_update_2018
             ? []
-            : [CompileTimeErrorCode.NON_CONSTANT_MAP_ELEMENT]);
+            : [
+                error(CompileTimeErrorCode.NON_CONSTANT_MAP_ELEMENT, 32, 15),
+              ]);
   }
 
   test_spreadElement_notConst() async {
-    await assertErrorCodesInCode('''
+    await assertErrorsInCode(
+        '''
 void main() {
   var notConst = {};
   const {1: null, ...notConst};
 }
-''', [CompileTimeErrorCode.NON_CONSTANT_MAP_ELEMENT]);
+''',
+        analysisOptions.experimentStatus.constant_update_2018
+            ? [
+                error(CompileTimeErrorCode.NON_CONSTANT_MAP_ELEMENT, 56, 8),
+              ]
+            : [
+                error(CompileTimeErrorCode.NON_CONSTANT_MAP_ELEMENT, 53, 11),
+              ]);
   }
 }
 
@@ -123,98 +160,128 @@
 @reflectiveTest
 class NonConstantMapKeyTest extends DriverResolutionTest {
   test_const_ifElement_thenElseFalse_finalElse() async {
-    await assertErrorCodesInCode(
+    await assertErrorsInCode(
         '''
 final dynamic a = 0;
 var v = const <int, int>{if (1 < 0) 0: 0 else a: 0};
 ''',
         analysisOptions.experimentStatus.constant_update_2018
-            ? [CompileTimeErrorCode.NON_CONSTANT_MAP_KEY]
-            : [CompileTimeErrorCode.NON_CONSTANT_MAP_ELEMENT]);
+            ? [
+                error(CompileTimeErrorCode.NON_CONSTANT_MAP_KEY, 0, 0),
+              ]
+            : [
+                error(CompileTimeErrorCode.NON_CONSTANT_MAP_ELEMENT, 46, 25),
+              ]);
   }
 
   test_const_ifElement_thenElseFalse_finalThen() async {
-    await assertErrorCodesInCode(
+    await assertErrorsInCode(
         '''
 final dynamic a = 0;
 var v = const <int, int>{if (1 < 0) a: 0 else 0: 0};
 ''',
         analysisOptions.experimentStatus.constant_update_2018
-            ? [CompileTimeErrorCode.NON_CONSTANT_MAP_KEY]
-            : [CompileTimeErrorCode.NON_CONSTANT_MAP_ELEMENT]);
+            ? [
+                error(CompileTimeErrorCode.NON_CONSTANT_MAP_KEY, 0, 0),
+              ]
+            : [
+                error(CompileTimeErrorCode.NON_CONSTANT_MAP_ELEMENT, 46, 25),
+              ]);
   }
 
   test_const_ifElement_thenElseTrue_finalElse() async {
-    await assertErrorCodesInCode(
+    await assertErrorsInCode(
         '''
 final dynamic a = 0;
 var v = const <int, int>{if (1 > 0) 0: 0 else a: 0};
 ''',
         analysisOptions.experimentStatus.constant_update_2018
-            ? [CompileTimeErrorCode.NON_CONSTANT_MAP_KEY]
-            : [CompileTimeErrorCode.NON_CONSTANT_MAP_ELEMENT]);
+            ? [
+                error(CompileTimeErrorCode.NON_CONSTANT_MAP_KEY, 0, 0),
+              ]
+            : [
+                error(CompileTimeErrorCode.NON_CONSTANT_MAP_ELEMENT, 46, 25),
+              ]);
   }
 
   test_const_ifElement_thenElseTrue_finalThen() async {
-    await assertErrorCodesInCode(
+    await assertErrorsInCode(
         '''
 final dynamic a = 0;
 var v = const <int, int>{if (1 > 0) a: 0 else 0: 0};
 ''',
         analysisOptions.experimentStatus.constant_update_2018
-            ? [CompileTimeErrorCode.NON_CONSTANT_MAP_KEY]
-            : [CompileTimeErrorCode.NON_CONSTANT_MAP_ELEMENT]);
+            ? [
+                error(CompileTimeErrorCode.NON_CONSTANT_MAP_KEY, 0, 0),
+              ]
+            : [
+                error(CompileTimeErrorCode.NON_CONSTANT_MAP_ELEMENT, 46, 25),
+              ]);
   }
 
   test_const_ifElement_thenFalse_constThen() async {
-    await assertErrorCodesInCode(
+    await assertErrorsInCode(
         '''
 const dynamic a = 0;
 var v = const <int, int>{if (1 < 0) a: 0};
 ''',
         analysisOptions.experimentStatus.constant_update_2018
             ? []
-            : [CompileTimeErrorCode.NON_CONSTANT_MAP_ELEMENT]);
+            : [
+                error(CompileTimeErrorCode.NON_CONSTANT_MAP_ELEMENT, 46, 15),
+              ]);
   }
 
   test_const_ifElement_thenFalse_finalThen() async {
-    await assertErrorCodesInCode(
+    await assertErrorsInCode(
         '''
 final dynamic a = 0;
 var v = const <int, int>{if (1 < 0) a: 0};
 ''',
         analysisOptions.experimentStatus.constant_update_2018
-            ? [CompileTimeErrorCode.NON_CONSTANT_MAP_KEY]
-            : [CompileTimeErrorCode.NON_CONSTANT_MAP_ELEMENT]);
+            ? [
+                error(CompileTimeErrorCode.NON_CONSTANT_MAP_KEY, 0, 0),
+              ]
+            : [
+                error(CompileTimeErrorCode.NON_CONSTANT_MAP_ELEMENT, 46, 15),
+              ]);
   }
 
   test_const_ifElement_thenTrue_constThen() async {
-    await assertErrorCodesInCode(
+    await assertErrorsInCode(
         '''
 const dynamic a = 0;
 var v = const <int, int>{if (1 > 0) a: 0};
 ''',
         analysisOptions.experimentStatus.constant_update_2018
             ? []
-            : [CompileTimeErrorCode.NON_CONSTANT_MAP_ELEMENT]);
+            : [
+                error(CompileTimeErrorCode.NON_CONSTANT_MAP_ELEMENT, 46, 15),
+              ]);
   }
 
   test_const_ifElement_thenTrue_finalThen() async {
-    await assertErrorCodesInCode(
+    await assertErrorsInCode(
         '''
 final dynamic a = 0;
 var v = const <int, int>{if (1 > 0) a: 0};
 ''',
         analysisOptions.experimentStatus.constant_update_2018
-            ? [CompileTimeErrorCode.NON_CONSTANT_MAP_KEY]
-            : [CompileTimeErrorCode.NON_CONSTANT_MAP_ELEMENT]);
+            ? [
+                error(CompileTimeErrorCode.NON_CONSTANT_MAP_KEY, 0, 0),
+              ]
+            : [
+                error(CompileTimeErrorCode.NON_CONSTANT_MAP_ELEMENT, 46, 15),
+              ]);
   }
 
   test_const_topVar() async {
-    await assertErrorCodesInCode('''
+    await assertErrorsInCode('''
 final dynamic a = 0;
 var v = const <int, int>{a: 0};
-''', [CompileTimeErrorCode.NON_CONSTANT_MAP_KEY]);
+''', [
+      error(CompileTimeErrorCode.NON_CONSTANT_MAP_KEY, 46, 1),
+    ]);
   }
 
   test_nonConst_topVar() async {
@@ -228,98 +295,128 @@
 @reflectiveTest
 class NonConstantMapValueTest extends DriverResolutionTest {
   test_const_ifElement_thenElseFalse_finalElse() async {
-    await assertErrorCodesInCode(
+    await assertErrorsInCode(
         '''
 final dynamic a = 0;
 var v = const <int, int>{if (1 < 0) 0: 0 else 0: a};
 ''',
         analysisOptions.experimentStatus.constant_update_2018
-            ? [CompileTimeErrorCode.NON_CONSTANT_MAP_VALUE]
-            : [CompileTimeErrorCode.NON_CONSTANT_MAP_ELEMENT]);
+            ? [
+                error(CompileTimeErrorCode.NON_CONSTANT_MAP_VALUE, 0, 0),
+              ]
+            : [
+                error(CompileTimeErrorCode.NON_CONSTANT_MAP_ELEMENT, 46, 25),
+              ]);
   }
 
   test_const_ifElement_thenElseFalse_finalThen() async {
-    await assertErrorCodesInCode(
+    await assertErrorsInCode(
         '''
 final dynamic a = 0;
 var v = const <int, int>{if (1 < 0) 0: a else 0: 0};
 ''',
         analysisOptions.experimentStatus.constant_update_2018
-            ? [CompileTimeErrorCode.NON_CONSTANT_MAP_VALUE]
-            : [CompileTimeErrorCode.NON_CONSTANT_MAP_ELEMENT]);
+            ? [
+                error(CompileTimeErrorCode.NON_CONSTANT_MAP_VALUE, 0, 0),
+              ]
+            : [
+                error(CompileTimeErrorCode.NON_CONSTANT_MAP_ELEMENT, 46, 25),
+              ]);
   }
 
   test_const_ifElement_thenElseTrue_finalElse() async {
-    await assertErrorCodesInCode(
+    await assertErrorsInCode(
         '''
 final dynamic a = 0;
 var v = const <int, int>{if (1 > 0) 0: 0 else 0: a};
 ''',
         analysisOptions.experimentStatus.constant_update_2018
-            ? [CompileTimeErrorCode.NON_CONSTANT_MAP_VALUE]
-            : [CompileTimeErrorCode.NON_CONSTANT_MAP_ELEMENT]);
+            ? [
+                error(CompileTimeErrorCode.NON_CONSTANT_MAP_VALUE, 0, 0),
+              ]
+            : [
+                error(CompileTimeErrorCode.NON_CONSTANT_MAP_ELEMENT, 46, 25),
+              ]);
   }
 
   test_const_ifElement_thenElseTrue_finalThen() async {
-    await assertErrorCodesInCode(
+    await assertErrorsInCode(
         '''
 final dynamic a = 0;
 var v = const <int, int>{if (1 > 0) 0: a else 0: 0};
 ''',
         analysisOptions.experimentStatus.constant_update_2018
-            ? [CompileTimeErrorCode.NON_CONSTANT_MAP_VALUE]
-            : [CompileTimeErrorCode.NON_CONSTANT_MAP_ELEMENT]);
+            ? [
+                error(CompileTimeErrorCode.NON_CONSTANT_MAP_VALUE, 0, 0),
+              ]
+            : [
+                error(CompileTimeErrorCode.NON_CONSTANT_MAP_ELEMENT, 46, 25),
+              ]);
   }
 
   test_const_ifElement_thenFalse_constThen() async {
-    await assertErrorCodesInCode(
+    await assertErrorsInCode(
         '''
 const dynamic a = 0;
 var v = const <int, int>{if (1 < 0) 0: a};
 ''',
         analysisOptions.experimentStatus.constant_update_2018
             ? []
-            : [CompileTimeErrorCode.NON_CONSTANT_MAP_ELEMENT]);
+            : [
+                error(CompileTimeErrorCode.NON_CONSTANT_MAP_ELEMENT, 46, 15),
+              ]);
   }
 
   test_const_ifElement_thenFalse_finalThen() async {
-    await assertErrorCodesInCode(
+    await assertErrorsInCode(
         '''
 final dynamic a = 0;
 var v = const <int, int>{if (1 < 0) 0: a};
 ''',
         analysisOptions.experimentStatus.constant_update_2018
-            ? [CompileTimeErrorCode.NON_CONSTANT_MAP_VALUE]
-            : [CompileTimeErrorCode.NON_CONSTANT_MAP_ELEMENT]);
+            ? [
+                error(CompileTimeErrorCode.NON_CONSTANT_MAP_VALUE, 0, 0),
+              ]
+            : [
+                error(CompileTimeErrorCode.NON_CONSTANT_MAP_ELEMENT, 46, 15),
+              ]);
   }
 
   test_const_ifElement_thenTrue_constThen() async {
-    await assertErrorCodesInCode(
+    await assertErrorsInCode(
         '''
 const dynamic a = 0;
 var v = const <int, int>{if (1 > 0) 0: a};
 ''',
         analysisOptions.experimentStatus.constant_update_2018
             ? []
-            : [CompileTimeErrorCode.NON_CONSTANT_MAP_ELEMENT]);
+            : [
+                error(CompileTimeErrorCode.NON_CONSTANT_MAP_ELEMENT, 46, 15),
+              ]);
   }
 
   test_const_ifElement_thenTrue_finalThen() async {
-    await assertErrorCodesInCode(
+    await assertErrorsInCode(
         '''
 final dynamic a = 0;
 var v = const <int, int>{if (1 > 0) 0: a};
 ''',
         analysisOptions.experimentStatus.constant_update_2018
-            ? [CompileTimeErrorCode.NON_CONSTANT_MAP_VALUE]
-            : [CompileTimeErrorCode.NON_CONSTANT_MAP_ELEMENT]);
+            ? [
+                error(CompileTimeErrorCode.NON_CONSTANT_MAP_VALUE, 0, 0),
+              ]
+            : [
+                error(CompileTimeErrorCode.NON_CONSTANT_MAP_ELEMENT, 46, 15),
+              ]);
   }
 
   test_const_topVar() async {
-    await assertErrorCodesInCode('''
+    await assertErrorsInCode('''
 final dynamic a = 0;
 var v = const <int, int>{0: a};
-''', [CompileTimeErrorCode.NON_CONSTANT_MAP_VALUE]);
+''', [
+      error(CompileTimeErrorCode.NON_CONSTANT_MAP_VALUE, 49, 1),
+    ]);
   }
 
   test_nonConst_topVar() async {
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
index 3b3be9c..8796e37 100644
--- 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
@@ -24,43 +24,60 @@
 // reports wrong error code
     newFile(convertPath('/test/lib/lib1.dart'), content: r'''
 const int c = 1;''');
-    await assertErrorCodesInCode(r'''
+    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]);
+''', [
+      error(CompileTimeErrorCode.NON_CONSTANT_MAP_KEY_FROM_DEFERRED_LIBRARY, 0,
+          0),
+    ]);
   }
 
   test_const_ifElement_thenTrue_deferredThen() async {
     newFile(convertPath('/test/lib/lib1.dart'), content: r'''
 const int c = 1;''');
-    await assertErrorCodesInCode(
+    await assertErrorsInCode(
         r'''
 import 'lib1.dart' deferred as a;
 const cond = true;
 var v = const { if (cond) a.c : 0};
 ''',
         analysisOptions.experimentStatus.constant_update_2018
-            ? [CompileTimeErrorCode.NON_CONSTANT_MAP_KEY_FROM_DEFERRED_LIBRARY]
-            : [CompileTimeErrorCode.NON_CONSTANT_MAP_ELEMENT]);
+            ? [
+                error(
+                    CompileTimeErrorCode
+                        .NON_CONSTANT_MAP_KEY_FROM_DEFERRED_LIBRARY,
+                    79,
+                    3),
+              ]
+            : [
+                error(CompileTimeErrorCode.NON_CONSTANT_MAP_ELEMENT, 69, 17),
+              ]);
   }
 
   test_const_topLevel_deferred() async {
     newFile(convertPath('/test/lib/lib1.dart'), content: r'''
 const int c = 1;''');
-    await assertErrorCodesInCode(r'''
+    await assertErrorsInCode(r'''
 import 'lib1.dart' deferred as a;
 var v = const {a.c : 0};
-''', [CompileTimeErrorCode.NON_CONSTANT_MAP_KEY_FROM_DEFERRED_LIBRARY]);
+''', [
+      error(CompileTimeErrorCode.NON_CONSTANT_MAP_KEY_FROM_DEFERRED_LIBRARY, 49,
+          3),
+    ]);
   }
 
   test_const_topLevel_deferred_nested() async {
     newFile(convertPath('/test/lib/lib1.dart'), content: r'''
 const int c = 1;''');
-    await assertErrorCodesInCode(r'''
+    await assertErrorsInCode(r'''
 import 'lib1.dart' deferred as a;
 var v = const {a.c + 1 : 0};
-''', [CompileTimeErrorCode.NON_CONSTANT_MAP_KEY_FROM_DEFERRED_LIBRARY]);
+''', [
+      error(CompileTimeErrorCode.NON_CONSTANT_MAP_KEY_FROM_DEFERRED_LIBRARY, 49,
+          7),
+    ]);
   }
 }
 
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
index 5d865e5..0f7a698 100644
--- a/pkg/analyzer/test/src/diagnostics/non_constant_map_key_test.dart
+++ b/pkg/analyzer/test/src/diagnostics/non_constant_map_key_test.dart
@@ -19,34 +19,44 @@
 @reflectiveTest
 class NonConstantMapKeyTest extends DriverResolutionTest {
   test_const_ifElement_thenTrue_elseFinal() async {
-    await assertErrorCodesInCode(
+    await assertErrorsInCode(
         r'''
 final dynamic a = 0;
 const cond = true;
 var v = const {if (cond) 0: 1 else a : 0};
 ''',
         analysisOptions.experimentStatus.constant_update_2018
-            ? [CompileTimeErrorCode.NON_CONSTANT_MAP_KEY]
-            : [CompileTimeErrorCode.NON_CONSTANT_MAP_ELEMENT]);
+            ? [
+                error(CompileTimeErrorCode.NON_CONSTANT_MAP_KEY, 75, 1),
+              ]
+            : [
+                error(CompileTimeErrorCode.NON_CONSTANT_MAP_ELEMENT, 55, 25),
+              ]);
   }
 
   test_const_ifElement_thenTrue_thenFinal() async {
-    await assertErrorCodesInCode(
+    await assertErrorsInCode(
         r'''
 final dynamic a = 0;
 const cond = true;
 var v = const {if (cond) a : 0};
 ''',
         analysisOptions.experimentStatus.constant_update_2018
-            ? [CompileTimeErrorCode.NON_CONSTANT_MAP_KEY]
-            : [CompileTimeErrorCode.NON_CONSTANT_MAP_ELEMENT]);
+            ? [
+                error(CompileTimeErrorCode.NON_CONSTANT_MAP_KEY, 65, 1),
+              ]
+            : [
+                error(CompileTimeErrorCode.NON_CONSTANT_MAP_ELEMENT, 55, 15),
+              ]);
   }
 
   test_const_topLevel() async {
-    await assertErrorCodesInCode(r'''
+    await assertErrorsInCode(r'''
 final dynamic a = 0;
 var v = const {a : 0};
-''', [CompileTimeErrorCode.NON_CONSTANT_MAP_KEY]);
+''', [
+      error(CompileTimeErrorCode.NON_CONSTANT_MAP_KEY, 36, 1),
+    ]);
   }
 }
 
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
index 5e1e315..d116bb9 100644
--- 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
@@ -24,17 +24,20 @@
     // reports wrong error code
     newFile(convertPath('/test/lib/lib1.dart'), content: r'''
 const int c = 1;''');
-    await assertErrorCodesInCode(r'''
+    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]);
+''', [
+      error(CompileTimeErrorCode.NON_CONSTANT_MAP_VALUE_FROM_DEFERRED_LIBRARY,
+          99, 3),
+    ]);
   }
 
   test_const_ifElement_thenTrue_thenDeferred() async {
     newFile(convertPath('/test/lib/lib1.dart'), content: r'''
 const int c = 1;''');
-    await assertErrorCodesInCode(
+    await assertErrorsInCode(
         r'''
 import 'lib1.dart' deferred as a;
 const cond = true;
@@ -42,28 +45,39 @@
 ''',
         analysisOptions.experimentStatus.constant_update_2018
             ? [
-                CompileTimeErrorCode
-                    .NON_CONSTANT_MAP_VALUE_FROM_DEFERRED_LIBRARY
+                error(
+                    CompileTimeErrorCode
+                        .NON_CONSTANT_MAP_VALUE_FROM_DEFERRED_LIBRARY,
+                    85,
+                    3),
               ]
-            : [CompileTimeErrorCode.NON_CONSTANT_MAP_ELEMENT]);
+            : [
+                error(CompileTimeErrorCode.NON_CONSTANT_MAP_ELEMENT, 69, 19),
+              ]);
   }
 
   test_const_topLevel_deferred() async {
     newFile(convertPath('/test/lib/lib1.dart'), content: r'''
 const int c = 1;''');
-    await assertErrorCodesInCode(r'''
+    await assertErrorsInCode(r'''
 import 'lib1.dart' deferred as a;
 var v = const {'a' : a.c};
-''', [CompileTimeErrorCode.NON_CONSTANT_MAP_VALUE_FROM_DEFERRED_LIBRARY]);
+''', [
+      error(CompileTimeErrorCode.NON_CONSTANT_MAP_VALUE_FROM_DEFERRED_LIBRARY,
+          55, 3),
+    ]);
   }
 
   test_const_topLevel_deferred_nested() async {
     newFile(convertPath('/test/lib/lib1.dart'), content: r'''
 const int c = 1;''');
-    await assertErrorCodesInCode(r'''
+    await assertErrorsInCode(r'''
 import 'lib1.dart' deferred as a;
 var v = const {'a' : a.c + 1};
-''', [CompileTimeErrorCode.NON_CONSTANT_MAP_VALUE_FROM_DEFERRED_LIBRARY]);
+''', [
+      error(CompileTimeErrorCode.NON_CONSTANT_MAP_VALUE_FROM_DEFERRED_LIBRARY,
+          55, 7),
+    ]);
   }
 }
 
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
index eb75842..a448d9c 100644
--- a/pkg/analyzer/test/src/diagnostics/non_constant_map_value_test.dart
+++ b/pkg/analyzer/test/src/diagnostics/non_constant_map_value_test.dart
@@ -19,37 +19,45 @@
 @reflectiveTest
 class NonConstantMapValueTest extends DriverResolutionTest {
   test_const_ifTrue_elseFinal() async {
-    await assertErrorCodesInCode(
+    await assertErrorsInCode(
         r'''
 final dynamic a = 0;
 const cond = true;
 var v = const {if (cond) 'a': 'b', 'c' : a};
 ''',
         analysisOptions.experimentStatus.constant_update_2018
-            ? [CompileTimeErrorCode.NON_CONSTANT_MAP_VALUE]
+            ? [
+                error(CompileTimeErrorCode.NON_CONSTANT_MAP_VALUE, 81, 1),
+              ]
             : [
-                CompileTimeErrorCode.NON_CONSTANT_MAP_VALUE,
-                CompileTimeErrorCode.NON_CONSTANT_MAP_ELEMENT
+                error(CompileTimeErrorCode.NON_CONSTANT_MAP_ELEMENT, 55, 18),
+                error(CompileTimeErrorCode.NON_CONSTANT_MAP_VALUE, 81, 1),
               ]);
   }
 
   test_const_ifTrue_thenFinal() async {
-    await assertErrorCodesInCode(
+    await assertErrorsInCode(
         r'''
 final dynamic a = 0;
 const cond = true;
 var v = const {if (cond) 'a' : a};
 ''',
         analysisOptions.experimentStatus.constant_update_2018
-            ? [CompileTimeErrorCode.NON_CONSTANT_MAP_VALUE]
-            : [CompileTimeErrorCode.NON_CONSTANT_MAP_ELEMENT]);
+            ? [
+                error(CompileTimeErrorCode.NON_CONSTANT_MAP_VALUE, 71, 1),
+              ]
+            : [
+                error(CompileTimeErrorCode.NON_CONSTANT_MAP_ELEMENT, 55, 17),
+              ]);
   }
 
   test_const_topLevel() async {
-    await assertErrorCodesInCode(r'''
+    await assertErrorsInCode(r'''
 final dynamic a = 0;
 var v = const {'a' : a};
-''', [CompileTimeErrorCode.NON_CONSTANT_MAP_VALUE]);
+''', [
+      error(CompileTimeErrorCode.NON_CONSTANT_MAP_VALUE, 42, 1),
+    ]);
   }
 }
 
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
index f4d6ff7..7dd39c4 100644
--- 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
@@ -25,17 +25,20 @@
     // reports wrong error code
     newFile(convertPath('/test/lib/lib1.dart'), content: r'''
 const int c = 1;''');
-    await assertErrorCodesInCode(r'''
+    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]);
+''', [
+      error(CompileTimeErrorCode.NON_CONSTANT_SET_ELEMENT_FROM_DEFERRED_LIBRARY,
+          88, 3),
+    ]);
   }
 
   test_const_ifElement_thenTrue_thenDeferred() async {
     newFile(convertPath('/test/lib/lib1.dart'), content: r'''
 const int c = 1;''');
-    await assertErrorCodesInCode(
+    await assertErrorsInCode(
         r'''
 import 'lib1.dart' deferred as a;
 const cond = true;
@@ -43,28 +46,39 @@
 ''',
         analysisOptions.experimentStatus.constant_update_2018
             ? [
-                CompileTimeErrorCode
-                    .NON_CONSTANT_SET_ELEMENT_FROM_DEFERRED_LIBRARY
+                error(
+                    CompileTimeErrorCode
+                        .NON_CONSTANT_SET_ELEMENT_FROM_DEFERRED_LIBRARY,
+                    78,
+                    3),
               ]
-            : [CompileTimeErrorCode.NON_CONSTANT_SET_ELEMENT]);
+            : [
+                error(CompileTimeErrorCode.NON_CONSTANT_SET_ELEMENT, 68, 13),
+              ]);
   }
 
   test_const_topLevel_deferred() async {
     newFile(convertPath('/test/lib/lib1.dart'), content: r'''
 const int c = 1;''');
-    await assertErrorCodesInCode(r'''
+    await assertErrorsInCode(r'''
 import 'lib1.dart' deferred as a;
 var v = const {a.c};
-''', [CompileTimeErrorCode.NON_CONSTANT_SET_ELEMENT_FROM_DEFERRED_LIBRARY]);
+''', [
+      error(CompileTimeErrorCode.NON_CONSTANT_SET_ELEMENT_FROM_DEFERRED_LIBRARY,
+          49, 3),
+    ]);
   }
 
   test_const_topLevel_deferred_nested() async {
     newFile(convertPath('/test/lib/lib1.dart'), content: r'''
 const int c = 1;''');
-    await assertErrorCodesInCode(r'''
+    await assertErrorsInCode(r'''
 import 'lib1.dart' deferred as a;
 var v = const {a.c + 1};
-''', [CompileTimeErrorCode.NON_CONSTANT_SET_ELEMENT_FROM_DEFERRED_LIBRARY]);
+''', [
+      error(CompileTimeErrorCode.NON_CONSTANT_SET_ELEMENT_FROM_DEFERRED_LIBRARY,
+          49, 7),
+    ]);
   }
 }
 
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 cb461c7..7793685 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
@@ -19,88 +19,152 @@
 @reflectiveTest
 class NonConstantSetElementTest extends DriverResolutionTest {
   test_const_ifElement_thenElseFalse_finalElse() async {
-    await assertErrorCodesInCode('''
+    await assertErrorsInCode(
+        '''
 final dynamic a = 0;
 var v = const <int>{if (1 < 0) 0 else a};
-''', [CompileTimeErrorCode.NON_CONSTANT_SET_ELEMENT]);
+''',
+        analysisOptions.experimentStatus.constant_update_2018
+            ? [
+                error(CompileTimeErrorCode.NON_CONSTANT_SET_ELEMENT, 59, 1),
+              ]
+            : [
+                error(CompileTimeErrorCode.NON_CONSTANT_SET_ELEMENT, 41, 19),
+              ]);
   }
 
   test_const_ifElement_thenElseFalse_finalThen() async {
-    await assertErrorCodesInCode('''
+    await assertErrorsInCode(
+        '''
 final dynamic a = 0;
 var v = const <int>{if (1 < 0) a else 0};
-''', [CompileTimeErrorCode.NON_CONSTANT_SET_ELEMENT]);
+''',
+        analysisOptions.experimentStatus.constant_update_2018
+            ? [
+                error(CompileTimeErrorCode.NON_CONSTANT_SET_ELEMENT, 52, 1),
+              ]
+            : [
+                error(CompileTimeErrorCode.NON_CONSTANT_SET_ELEMENT, 41, 19),
+              ]);
   }
 
   test_const_ifElement_thenElseTrue_finalElse() async {
-    await assertErrorCodesInCode('''
+    await assertErrorsInCode(
+        '''
 final dynamic a = 0;
 var v = const <int>{if (1 > 0) 0 else a};
-''', [CompileTimeErrorCode.NON_CONSTANT_SET_ELEMENT]);
+''',
+        analysisOptions.experimentStatus.constant_update_2018
+            ? [
+                error(CompileTimeErrorCode.NON_CONSTANT_SET_ELEMENT, 59, 1),
+              ]
+            : [
+                error(CompileTimeErrorCode.NON_CONSTANT_SET_ELEMENT, 41, 19),
+              ]);
   }
 
   test_const_ifElement_thenElseTrue_finalThen() async {
-    await assertErrorCodesInCode('''
+    await assertErrorsInCode(
+        '''
 final dynamic a = 0;
 var v = const <int>{if (1 > 0) a else 0};
-''', [CompileTimeErrorCode.NON_CONSTANT_SET_ELEMENT]);
+''',
+        analysisOptions.experimentStatus.constant_update_2018
+            ? [
+                error(CompileTimeErrorCode.NON_CONSTANT_SET_ELEMENT, 52, 1),
+              ]
+            : [
+                error(CompileTimeErrorCode.NON_CONSTANT_SET_ELEMENT, 41, 19),
+              ]);
   }
 
   test_const_ifElement_thenFalse_constThen() async {
-    await assertErrorCodesInCode(
+    await assertErrorsInCode(
         '''
 const dynamic a = 0;
 var v = const <int>{if (1 < 0) a};
 ''',
         analysisOptions.experimentStatus.constant_update_2018
             ? []
-            : [CompileTimeErrorCode.NON_CONSTANT_SET_ELEMENT]);
+            : [
+                error(CompileTimeErrorCode.NON_CONSTANT_SET_ELEMENT, 41, 12),
+              ]);
   }
 
   test_const_ifElement_thenFalse_finalThen() async {
-    await assertErrorCodesInCode('''
+    await assertErrorsInCode(
+        '''
 final dynamic a = 0;
 var v = const <int>{if (1 < 0) a};
-''', [CompileTimeErrorCode.NON_CONSTANT_SET_ELEMENT]);
+''',
+        analysisOptions.experimentStatus.constant_update_2018
+            ? [
+                error(CompileTimeErrorCode.NON_CONSTANT_SET_ELEMENT, 52, 1),
+              ]
+            : [
+                error(CompileTimeErrorCode.NON_CONSTANT_SET_ELEMENT, 41, 12),
+              ]);
   }
 
   test_const_ifElement_thenTrue_constThen() async {
-    await assertErrorCodesInCode(
+    await assertErrorsInCode(
         '''
 const dynamic a = 0;
 var v = const <int>{if (1 > 0) a};
 ''',
         analysisOptions.experimentStatus.constant_update_2018
             ? []
-            : [CompileTimeErrorCode.NON_CONSTANT_SET_ELEMENT]);
+            : [
+                error(CompileTimeErrorCode.NON_CONSTANT_SET_ELEMENT, 41, 12),
+              ]);
   }
 
   test_const_ifElement_thenTrue_finalThen() async {
-    await assertErrorCodesInCode('''
+    await assertErrorsInCode(
+        '''
 final dynamic a = 0;
 var v = const <int>{if (1 > 0) a};
-''', [CompileTimeErrorCode.NON_CONSTANT_SET_ELEMENT]);
+''',
+        analysisOptions.experimentStatus.constant_update_2018
+            ? [
+                error(CompileTimeErrorCode.NON_CONSTANT_SET_ELEMENT, 52, 1),
+              ]
+            : [
+                error(CompileTimeErrorCode.NON_CONSTANT_SET_ELEMENT, 41, 12),
+              ]);
   }
 
   test_const_parameter() async {
-    await assertErrorCodesInCode(r'''
+    await assertErrorsInCode(r'''
 f(a) {
   return const {a};
-}''', [CompileTimeErrorCode.NON_CONSTANT_SET_ELEMENT]);
+}''', [
+      error(CompileTimeErrorCode.NON_CONSTANT_SET_ELEMENT, 23, 1),
+    ]);
   }
 
   test_const_spread_final() async {
-    await assertErrorCodesInCode(r'''
+    await assertErrorsInCode(
+        r'''
 final Set x = null;
 var v = const {...x};
-''', [CompileTimeErrorCode.NON_CONSTANT_SET_ELEMENT]);
+''',
+        analysisOptions.experimentStatus.constant_update_2018
+            ? [
+                error(CompileTimeErrorCode.NON_CONSTANT_SET_ELEMENT, 38, 1),
+              ]
+            : [
+                error(CompileTimeErrorCode.NON_CONSTANT_SET_ELEMENT, 35, 4),
+              ]);
   }
 
   test_const_topVar() async {
-    await assertErrorCodesInCode('''
+    await assertErrorsInCode('''
 final dynamic a = 0;
 var v = const <int>{a};
-''', [CompileTimeErrorCode.NON_CONSTANT_SET_ELEMENT]);
+''', [
+      error(CompileTimeErrorCode.NON_CONSTANT_SET_ELEMENT, 41, 1),
+    ]);
   }
 
   test_nonConst_topVar() async {
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
index ac6d136..b8ad8b4 100644
--- 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
@@ -23,7 +23,7 @@
   test_inList_deferred() async {
     newFile(convertPath('/test/lib/lib1.dart'), content: r'''
 const List c = [];''');
-    await assertErrorCodesInCode(
+    await assertErrorsInCode(
         r'''
 import 'lib1.dart' deferred as a;
 f() {
@@ -31,10 +31,15 @@
 }''',
         analysisOptions.experimentStatus.constant_update_2018
             ? [
-                CompileTimeErrorCode
-                    .NON_CONSTANT_SPREAD_EXPRESSION_FROM_DEFERRED_LIBRARY
+                error(
+                    CompileTimeErrorCode
+                        .NON_CONSTANT_SPREAD_EXPRESSION_FROM_DEFERRED_LIBRARY,
+                    59,
+                    3),
               ]
-            : [CompileTimeErrorCode.NON_CONSTANT_LIST_ELEMENT]);
+            : [
+                error(CompileTimeErrorCode.NON_CONSTANT_LIST_ELEMENT, 56, 6),
+              ]);
   }
 
   test_inList_deferred_notConst() async {
@@ -50,7 +55,7 @@
   test_inList_notDeferred() async {
     newFile(convertPath('/test/lib/lib1.dart'), content: r'''
 const List c = [];''');
-    await assertErrorCodesInCode(
+    await assertErrorsInCode(
         r'''
 import 'lib1.dart' as a;
 f() {
@@ -58,13 +63,15 @@
 }''',
         analysisOptions.experimentStatus.constant_update_2018
             ? []
-            : [CompileTimeErrorCode.NON_CONSTANT_LIST_ELEMENT]);
+            : [
+                error(CompileTimeErrorCode.NON_CONSTANT_LIST_ELEMENT, 47, 6),
+              ]);
   }
 
   test_inMap_deferred() async {
     newFile(convertPath('/test/lib/lib1.dart'), content: r'''
 const Map c = <int, int>{};''');
-    await assertErrorCodesInCode(
+    await assertErrorsInCode(
         r'''
 import 'lib1.dart' deferred as a;
 f() {
@@ -72,10 +79,15 @@
 }''',
         analysisOptions.experimentStatus.constant_update_2018
             ? [
-                CompileTimeErrorCode
-                    .NON_CONSTANT_SPREAD_EXPRESSION_FROM_DEFERRED_LIBRARY
+                error(
+                    CompileTimeErrorCode
+                        .NON_CONSTANT_SPREAD_EXPRESSION_FROM_DEFERRED_LIBRARY,
+                    59,
+                    3),
               ]
-            : [CompileTimeErrorCode.NON_CONSTANT_MAP_ELEMENT]);
+            : [
+                error(CompileTimeErrorCode.NON_CONSTANT_MAP_ELEMENT, 56, 6),
+              ]);
   }
 
   test_inMap_notConst() async {
@@ -91,7 +103,7 @@
   test_inMap_notDeferred() async {
     newFile(convertPath('/test/lib/lib1.dart'), content: r'''
 const Map c = <int, int>{};''');
-    await assertErrorCodesInCode(
+    await assertErrorsInCode(
         r'''
 import 'lib1.dart' as a;
 f() {
@@ -99,13 +111,15 @@
 }''',
         analysisOptions.experimentStatus.constant_update_2018
             ? []
-            : [CompileTimeErrorCode.NON_CONSTANT_MAP_ELEMENT]);
+            : [
+                error(CompileTimeErrorCode.NON_CONSTANT_MAP_ELEMENT, 47, 6),
+              ]);
   }
 
   test_inSet_deferred() async {
     newFile(convertPath('/test/lib/lib1.dart'), content: r'''
 const Set c = <int>{};''');
-    await assertErrorCodesInCode(
+    await assertErrorsInCode(
         r'''
 import 'lib1.dart' deferred as a;
 f() {
@@ -113,10 +127,15 @@
 }''',
         analysisOptions.experimentStatus.constant_update_2018
             ? [
-                CompileTimeErrorCode
-                    .NON_CONSTANT_SPREAD_EXPRESSION_FROM_DEFERRED_LIBRARY
+                error(
+                    CompileTimeErrorCode
+                        .NON_CONSTANT_SPREAD_EXPRESSION_FROM_DEFERRED_LIBRARY,
+                    59,
+                    3),
               ]
-            : [CompileTimeErrorCode.NON_CONSTANT_SET_ELEMENT]);
+            : [
+                error(CompileTimeErrorCode.NON_CONSTANT_SET_ELEMENT, 56, 6),
+              ]);
   }
 
   test_inSet_notConst() async {
@@ -132,7 +151,7 @@
   test_inSet_notDeferred() async {
     newFile(convertPath('/test/lib/lib1.dart'), content: r'''
 const Set c = <int>{};''');
-    await assertErrorCodesInCode(
+    await assertErrorsInCode(
         r'''
 import 'lib1.dart' as a;
 f() {
@@ -140,7 +159,9 @@
 }''',
         analysisOptions.experimentStatus.constant_update_2018
             ? []
-            : [CompileTimeErrorCode.NON_CONSTANT_SET_ELEMENT]);
+            : [
+                error(CompileTimeErrorCode.NON_CONSTANT_SET_ELEMENT, 47, 6),
+              ]);
   }
 }
 
diff --git a/pkg/analyzer/test/src/diagnostics/not_iterable_spread_test.dart b/pkg/analyzer/test/src/diagnostics/not_iterable_spread_test.dart
index 129bb73..4b774e1 100644
--- a/pkg/analyzer/test/src/diagnostics/not_iterable_spread_test.dart
+++ b/pkg/analyzer/test/src/diagnostics/not_iterable_spread_test.dart
@@ -29,30 +29,39 @@
   }
 
   test_notIterable_direct() async {
-    await assertErrorCodesInCode('''
+    await assertErrorsInCode('''
 var a = 0;
 var v = [...a];
-''', [CompileTimeErrorCode.NOT_ITERABLE_SPREAD]);
+''', [
+      error(CompileTimeErrorCode.NOT_ITERABLE_SPREAD, 23, 1),
+    ]);
   }
 
   test_notIterable_forElement() async {
-    await assertErrorCodesInCode('''
+    await assertErrorsInCode('''
 var a = 0;
 var v = [for (var i in []) ...a];
-''', [CompileTimeErrorCode.NOT_ITERABLE_SPREAD]);
+''', [
+      error(HintCode.UNUSED_LOCAL_VARIABLE, 29, 1),
+      error(CompileTimeErrorCode.NOT_ITERABLE_SPREAD, 41, 1),
+    ]);
   }
 
   test_notIterable_ifElement_else() async {
-    await assertErrorCodesInCode('''
+    await assertErrorsInCode('''
 var a = 0;
 var v = [if (1 > 0) ...[] else ...a];
-''', [CompileTimeErrorCode.NOT_ITERABLE_SPREAD]);
+''', [
+      error(CompileTimeErrorCode.NOT_ITERABLE_SPREAD, 45, 1),
+    ]);
   }
 
   test_notIterable_ifElement_then() async {
-    await assertErrorCodesInCode('''
+    await assertErrorsInCode('''
 var a = 0;
 var v = [if (1 > 0) ...a];
-''', [CompileTimeErrorCode.NOT_ITERABLE_SPREAD]);
+''', [
+      error(CompileTimeErrorCode.NOT_ITERABLE_SPREAD, 34, 1),
+    ]);
   }
 }
diff --git a/pkg/analyzer/test/src/diagnostics/not_map_spread_test.dart b/pkg/analyzer/test/src/diagnostics/not_map_spread_test.dart
index d5142c1..2f7e415 100644
--- a/pkg/analyzer/test/src/diagnostics/not_map_spread_test.dart
+++ b/pkg/analyzer/test/src/diagnostics/not_map_spread_test.dart
@@ -29,30 +29,39 @@
   }
 
   test_notMap_direct() async {
-    await assertErrorCodesInCode('''
+    await assertErrorsInCode('''
 var a = 0;
 var v = <int, int>{...a};
-''', [CompileTimeErrorCode.NOT_MAP_SPREAD]);
+''', [
+      error(CompileTimeErrorCode.NOT_MAP_SPREAD, 33, 1),
+    ]);
   }
 
   test_notMap_forElement() async {
-    await assertErrorCodesInCode('''
+    await assertErrorsInCode('''
 var a = 0;
 var v = <int, int>{for (var i in []) ...a};
-''', [CompileTimeErrorCode.NOT_MAP_SPREAD]);
+''', [
+      error(HintCode.UNUSED_LOCAL_VARIABLE, 39, 1),
+      error(CompileTimeErrorCode.NOT_MAP_SPREAD, 51, 1),
+    ]);
   }
 
   test_notMap_ifElement_else() async {
-    await assertErrorCodesInCode('''
+    await assertErrorsInCode('''
 var a = 0;
 var v = <int, int>{if (1 > 0) ...<int, int>{} else ...a};
-''', [CompileTimeErrorCode.NOT_MAP_SPREAD]);
+''', [
+      error(CompileTimeErrorCode.NOT_MAP_SPREAD, 65, 1),
+    ]);
   }
 
   test_notMap_ifElement_then() async {
-    await assertErrorCodesInCode('''
+    await assertErrorsInCode('''
 var a = 0;
 var v = <int, int>{if (1 > 0) ...a};
-''', [CompileTimeErrorCode.NOT_MAP_SPREAD]);
+''', [
+      error(CompileTimeErrorCode.NOT_MAP_SPREAD, 44, 1),
+    ]);
   }
 }
diff --git a/pkg/analyzer/test/src/diagnostics/not_null_aware_null_spread_test.dart b/pkg/analyzer/test/src/diagnostics/not_null_aware_null_spread_test.dart
index 56bcd2c..115ffde 100644
--- a/pkg/analyzer/test/src/diagnostics/not_null_aware_null_spread_test.dart
+++ b/pkg/analyzer/test/src/diagnostics/not_null_aware_null_spread_test.dart
@@ -16,16 +16,20 @@
 @reflectiveTest
 class NotNullAwareNullSpreadTest extends DriverResolutionTest {
   test_listLiteral_notNullAware_nullLiteral() async {
-    await assertErrorCodesInCode('''
+    await assertErrorsInCode('''
 var v = [...null];
-''', [CompileTimeErrorCode.NOT_NULL_AWARE_NULL_SPREAD]);
+''', [
+      error(CompileTimeErrorCode.NOT_NULL_AWARE_NULL_SPREAD, 12, 4),
+    ]);
   }
 
   test_listLiteral_notNullAware_nullTyped() async {
-    await assertErrorCodesInCode('''
+    await assertErrorsInCode('''
 Null a = null;
 var v = [...a];
-''', [CompileTimeErrorCode.NOT_NULL_AWARE_NULL_SPREAD]);
+''', [
+      error(CompileTimeErrorCode.NOT_NULL_AWARE_NULL_SPREAD, 27, 1),
+    ]);
   }
 
   test_listLiteral_nullAware_nullLiteral() async {
@@ -42,16 +46,20 @@
   }
 
   test_mapLiteral_notNullAware_nullLiteral() async {
-    await assertErrorCodesInCode('''
+    await assertErrorsInCode('''
 var v = <int, int>{...null};
-''', [CompileTimeErrorCode.NOT_NULL_AWARE_NULL_SPREAD]);
+''', [
+      error(CompileTimeErrorCode.NOT_NULL_AWARE_NULL_SPREAD, 22, 4),
+    ]);
   }
 
   test_mapLiteral_notNullAware_nullType() async {
-    await assertErrorCodesInCode('''
+    await assertErrorsInCode('''
 Null a = null;
 var v = <int, int>{...a};
-''', [CompileTimeErrorCode.NOT_NULL_AWARE_NULL_SPREAD]);
+''', [
+      error(CompileTimeErrorCode.NOT_NULL_AWARE_NULL_SPREAD, 37, 1),
+    ]);
   }
 
   test_mapLiteral_nullAware_nullLiteral() async {
@@ -68,16 +76,20 @@
   }
 
   test_setLiteral_notNullAware_nullLiteral() async {
-    await assertErrorCodesInCode('''
+    await assertErrorsInCode('''
 var v = <int>{...null};
-''', [CompileTimeErrorCode.NOT_NULL_AWARE_NULL_SPREAD]);
+''', [
+      error(CompileTimeErrorCode.NOT_NULL_AWARE_NULL_SPREAD, 17, 4),
+    ]);
   }
 
   test_setLiteral_notNullAware_nullTyped() async {
-    await assertErrorCodesInCode('''
+    await assertErrorsInCode('''
 Null a = null;
 var v = <int>{...a};
-''', [CompileTimeErrorCode.NOT_NULL_AWARE_NULL_SPREAD]);
+''', [
+      error(CompileTimeErrorCode.NOT_NULL_AWARE_NULL_SPREAD, 32, 1),
+    ]);
   }
 
   test_setLiteral_nullAware_nullLiteral() async {
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
index 7f89a71..6b5be07 100644
--- a/pkg/analyzer/test/src/diagnostics/null_aware_before_operator_test.dart
+++ b/pkg/analyzer/test/src/diagnostics/null_aware_before_operator_test.dart
@@ -48,11 +48,13 @@
   }
 
   test_minus() async {
-    await assertErrorCodesInCode(r'''
+    await assertErrorsInCode(r'''
 m(x) {
   x?.a - '';
 }
-''', [HintCode.NULL_AWARE_BEFORE_OPERATOR]);
+''', [
+      error(HintCode.NULL_AWARE_BEFORE_OPERATOR, 9, 4),
+    ]);
   }
 
   test_not_equal() async {
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
index 89203f2..c057732 100644
--- a/pkg/analyzer/test/src/diagnostics/null_aware_in_condition_test.dart
+++ b/pkg/analyzer/test/src/diagnostics/null_aware_in_condition_test.dart
@@ -16,58 +16,72 @@
 @reflectiveTest
 class NullAwareInConditionTest extends DriverResolutionTest {
   test_assert() async {
-    await assertErrorCodesInCode(r'''
+    await assertErrorsInCode(r'''
 m(x) {
   assert (x?.a);
 }
-''', [HintCode.NULL_AWARE_IN_CONDITION]);
+''', [
+      error(HintCode.NULL_AWARE_IN_CONDITION, 17, 4),
+    ]);
   }
 
   test_conditionalExpression() async {
-    await assertErrorCodesInCode(r'''
+    await assertErrorsInCode(r'''
 m(x) {
   return x?.a ? 0 : 1;
 }
-''', [HintCode.NULL_AWARE_IN_CONDITION]);
+''', [
+      error(HintCode.NULL_AWARE_IN_CONDITION, 16, 4),
+    ]);
   }
 
   test_do() async {
-    await assertErrorCodesInCode(r'''
+    await assertErrorsInCode(r'''
 m(x) {
   do {} while (x?.a);
 }
-''', [HintCode.NULL_AWARE_IN_CONDITION]);
+''', [
+      error(HintCode.NULL_AWARE_IN_CONDITION, 22, 4),
+    ]);
   }
 
   test_for() async {
-    await assertErrorCodesInCode(r'''
+    await assertErrorsInCode(r'''
 m(x) {
   for (var v = x; v?.a; v = v.next) {}
 }
-''', [HintCode.NULL_AWARE_IN_CONDITION]);
+''', [
+      error(HintCode.NULL_AWARE_IN_CONDITION, 25, 4),
+    ]);
   }
 
   test_if() async {
-    await assertErrorCodesInCode(r'''
+    await assertErrorsInCode(r'''
 m(x) {
   if (x?.a) {}
 }
-''', [HintCode.NULL_AWARE_IN_CONDITION]);
+''', [
+      error(HintCode.NULL_AWARE_IN_CONDITION, 13, 4),
+    ]);
   }
 
   test_if_parenthesized() async {
-    await assertErrorCodesInCode(r'''
+    await assertErrorsInCode(r'''
 m(x) {
   if ((x?.a)) {}
 }
-''', [HintCode.NULL_AWARE_IN_CONDITION]);
+''', [
+      error(HintCode.NULL_AWARE_IN_CONDITION, 13, 6),
+    ]);
   }
 
   test_while() async {
-    await assertErrorCodesInCode(r'''
+    await assertErrorsInCode(r'''
 m(x) {
   while (x?.a) {}
 }
-''', [HintCode.NULL_AWARE_IN_CONDITION]);
+''', [
+      error(HintCode.NULL_AWARE_IN_CONDITION, 16, 4),
+    ]);
   }
 }
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
index b60810e..d445199 100644
--- 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
@@ -16,51 +16,63 @@
 @reflectiveTest
 class NullAwareInLogicalOperatorTest extends DriverResolutionTest {
   test_conditionalAnd_first() async {
-    await assertErrorCodesInCode(r'''
+    await assertErrorsInCode(r'''
 m(x) {
   x?.a && x.b;
 }
-''', [HintCode.NULL_AWARE_IN_LOGICAL_OPERATOR]);
+''', [
+      error(HintCode.NULL_AWARE_IN_LOGICAL_OPERATOR, 9, 4),
+    ]);
   }
 
   test_conditionalAnd_second() async {
-    await assertErrorCodesInCode(r'''
+    await assertErrorsInCode(r'''
 m(x) {
   x.a && x?.b;
 }
-''', [HintCode.NULL_AWARE_IN_LOGICAL_OPERATOR]);
+''', [
+      error(HintCode.NULL_AWARE_IN_LOGICAL_OPERATOR, 16, 4),
+    ]);
   }
 
   test_conditionalAnd_third() async {
-    await assertErrorCodesInCode(r'''
+    await assertErrorsInCode(r'''
 m(x) {
   x.a && x.b && x?.c;
 }
-''', [HintCode.NULL_AWARE_IN_LOGICAL_OPERATOR]);
+''', [
+      error(HintCode.NULL_AWARE_IN_LOGICAL_OPERATOR, 23, 4),
+    ]);
   }
 
   test_conditionalOr_first() async {
-    await assertErrorCodesInCode(r'''
+    await assertErrorsInCode(r'''
 m(x) {
   x?.a || x.b;
 }
-''', [HintCode.NULL_AWARE_IN_LOGICAL_OPERATOR]);
+''', [
+      error(HintCode.NULL_AWARE_IN_LOGICAL_OPERATOR, 9, 4),
+    ]);
   }
 
   test_conditionalOr_second() async {
-    await assertErrorCodesInCode(r'''
+    await assertErrorsInCode(r'''
 m(x) {
   x.a || x?.b;
 }
-''', [HintCode.NULL_AWARE_IN_LOGICAL_OPERATOR]);
+''', [
+      error(HintCode.NULL_AWARE_IN_LOGICAL_OPERATOR, 16, 4),
+    ]);
   }
 
   test_conditionalOr_third() async {
-    await assertErrorCodesInCode(r'''
+    await assertErrorsInCode(r'''
 m(x) {
   x.a || x.b || x?.c;
 }
-''', [HintCode.NULL_AWARE_IN_LOGICAL_OPERATOR]);
+''', [
+      error(HintCode.NULL_AWARE_IN_LOGICAL_OPERATOR, 23, 4),
+    ]);
   }
 
   test_for_noCondition() async {
@@ -80,10 +92,12 @@
   }
 
   test_not() async {
-    await assertErrorCodesInCode(r'''
+    await assertErrorsInCode(r'''
 m(x) {
   !x?.a;
 }
-''', [HintCode.NULL_AWARE_IN_LOGICAL_OPERATOR]);
+''', [
+      error(HintCode.NULL_AWARE_IN_LOGICAL_OPERATOR, 10, 4),
+    ]);
   }
 }
diff --git a/pkg/analyzer/test/src/diagnostics/nullable_type_in_extends_clause_test.dart b/pkg/analyzer/test/src/diagnostics/nullable_type_in_extends_clause_test.dart
index 2478d79..b2f454b 100644
--- a/pkg/analyzer/test/src/diagnostics/nullable_type_in_extends_clause_test.dart
+++ b/pkg/analyzer/test/src/diagnostics/nullable_type_in_extends_clause_test.dart
@@ -29,10 +29,12 @@
   }
 
   test_class_nullable() async {
-    assertErrorCodesInCode('''
+    assertErrorsInCode('''
 class A {}
 class B extends A? {}
-''', [CompileTimeErrorCode.NULLABLE_TYPE_IN_EXTENDS_CLAUSE]);
+''', [
+      error(CompileTimeErrorCode.NULLABLE_TYPE_IN_EXTENDS_CLAUSE, 27, 2),
+    ]);
   }
 
   test_classAlias_withClass_nonNullable() async {
@@ -44,11 +46,13 @@
   }
 
   test_classAlias_withClass_nullable() async {
-    assertErrorCodesInCode('''
+    assertErrorsInCode('''
 class A {}
 class B {}
 class C = A? with B;
-''', [CompileTimeErrorCode.NULLABLE_TYPE_IN_EXTENDS_CLAUSE]);
+''', [
+      error(CompileTimeErrorCode.NULLABLE_TYPE_IN_EXTENDS_CLAUSE, 32, 2),
+    ]);
   }
 
   test_classAlias_withMixin_nonNullable() async {
@@ -60,10 +64,12 @@
   }
 
   test_classAlias_withMixin_nullable() async {
-    assertErrorCodesInCode('''
+    assertErrorsInCode('''
 class A {}
 mixin B {}
 class C = A? with B;
-''', [CompileTimeErrorCode.NULLABLE_TYPE_IN_EXTENDS_CLAUSE]);
+''', [
+      error(CompileTimeErrorCode.NULLABLE_TYPE_IN_EXTENDS_CLAUSE, 32, 2),
+    ]);
   }
 }
diff --git a/pkg/analyzer/test/src/diagnostics/nullable_type_in_implements_clause_test.dart b/pkg/analyzer/test/src/diagnostics/nullable_type_in_implements_clause_test.dart
index ec81d73..39ffb8e 100644
--- a/pkg/analyzer/test/src/diagnostics/nullable_type_in_implements_clause_test.dart
+++ b/pkg/analyzer/test/src/diagnostics/nullable_type_in_implements_clause_test.dart
@@ -29,10 +29,12 @@
   }
 
   test_class_nullable() async {
-    assertErrorCodesInCode('''
+    assertErrorsInCode('''
 class A {}
 class B implements A? {}
-''', [CompileTimeErrorCode.NULLABLE_TYPE_IN_IMPLEMENTS_CLAUSE]);
+''', [
+      error(CompileTimeErrorCode.NULLABLE_TYPE_IN_IMPLEMENTS_CLAUSE, 30, 2),
+    ]);
   }
 
   test_mixin_nonNullable() async {
@@ -43,9 +45,11 @@
   }
 
   test_mixin_nullable() async {
-    assertErrorCodesInCode('''
+    assertErrorsInCode('''
 class A {}
 mixin B implements A? {}
-''', [CompileTimeErrorCode.NULLABLE_TYPE_IN_IMPLEMENTS_CLAUSE]);
+''', [
+      error(CompileTimeErrorCode.NULLABLE_TYPE_IN_IMPLEMENTS_CLAUSE, 30, 2),
+    ]);
   }
 }
diff --git a/pkg/analyzer/test/src/diagnostics/nullable_type_in_on_clause_test.dart b/pkg/analyzer/test/src/diagnostics/nullable_type_in_on_clause_test.dart
index d9613ee..60e319a 100644
--- a/pkg/analyzer/test/src/diagnostics/nullable_type_in_on_clause_test.dart
+++ b/pkg/analyzer/test/src/diagnostics/nullable_type_in_on_clause_test.dart
@@ -29,9 +29,11 @@
   }
 
   test_nullable() async {
-    assertErrorCodesInCode('''
+    assertErrorsInCode('''
 class A {}
 mixin B on A? {}
-''', [CompileTimeErrorCode.NULLABLE_TYPE_IN_ON_CLAUSE]);
+''', [
+      error(CompileTimeErrorCode.NULLABLE_TYPE_IN_ON_CLAUSE, 22, 2),
+    ]);
   }
 }
diff --git a/pkg/analyzer/test/src/diagnostics/nullable_type_in_with_clause_test.dart b/pkg/analyzer/test/src/diagnostics/nullable_type_in_with_clause_test.dart
index d25ad1f..c05909c 100644
--- a/pkg/analyzer/test/src/diagnostics/nullable_type_in_with_clause_test.dart
+++ b/pkg/analyzer/test/src/diagnostics/nullable_type_in_with_clause_test.dart
@@ -29,10 +29,12 @@
   }
 
   test_class_nullable() async {
-    assertErrorCodesInCode('''
+    assertErrorsInCode('''
 class A {}
 class B with A? {}
-''', [CompileTimeErrorCode.NULLABLE_TYPE_IN_WITH_CLAUSE]);
+''', [
+      error(CompileTimeErrorCode.NULLABLE_TYPE_IN_WITH_CLAUSE, 24, 2),
+    ]);
   }
 
   test_classAlias_withClass_nonNullable() async {
@@ -44,11 +46,13 @@
   }
 
   test_classAlias_withClass_nullable() async {
-    assertErrorCodesInCode('''
+    assertErrorsInCode('''
 class A {}
 class B {}
 class C = A with B?;
-''', [CompileTimeErrorCode.NULLABLE_TYPE_IN_WITH_CLAUSE]);
+''', [
+      error(CompileTimeErrorCode.NULLABLE_TYPE_IN_WITH_CLAUSE, 39, 2),
+    ]);
   }
 
   test_classAlias_withMixin_nonNullable() async {
@@ -60,10 +64,12 @@
   }
 
   test_classAlias_withMixin_nullable() async {
-    assertErrorCodesInCode('''
+    assertErrorsInCode('''
 class A {}
 mixin B {}
 class C = A with B?;
-''', [CompileTimeErrorCode.NULLABLE_TYPE_IN_WITH_CLAUSE]);
+''', [
+      error(CompileTimeErrorCode.NULLABLE_TYPE_IN_WITH_CLAUSE, 39, 2),
+    ]);
   }
 }
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
index 7ecb535..7def0c4 100644
--- 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
@@ -25,9 +25,11 @@
 
   @failingTest
   test_overrideEquals_andNotHashCode() async {
-    await assertErrorCodesInCode(r'''
+    await assertErrorsInCode(r'''
 class A {
   bool operator ==(x) {}
-}''', [HintCode.OVERRIDE_EQUALS_BUT_NOT_HASH_CODE]);
+}''', [
+      error(HintCode.OVERRIDE_EQUALS_BUT_NOT_HASH_CODE, 6, 1),
+    ]);
   }
 }
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
index 514ad99..2a978fe 100644
--- 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
@@ -16,7 +16,7 @@
 @reflectiveTest
 class OverrideOnNonOverridingFieldTest extends DriverResolutionTest {
   test_inInterface() async {
-    await assertErrorCodesInCode(r'''
+    await assertErrorsInCode(r'''
 class A {
   int get a => 0;
   void set b(_) {}
@@ -29,11 +29,13 @@
   int b;
   @override
   int c;
-}''', [CompileTimeErrorCode.INVALID_OVERRIDE]);
+}''', [
+      error(CompileTimeErrorCode.INVALID_OVERRIDE, 126, 5),
+    ]);
   }
 
   test_inSuperclass() async {
-    await assertErrorCodesInCode(r'''
+    await assertErrorsInCode(r'''
 class A {
   int get a => 0;
   void set b(_) {}
@@ -46,16 +48,20 @@
   int b;
   @override
   int c;
-}''', [CompileTimeErrorCode.INVALID_OVERRIDE]);
+}''', [
+      error(CompileTimeErrorCode.INVALID_OVERRIDE, 123, 5),
+    ]);
   }
 
   test_invalid() async {
-    await assertErrorCodesInCode(r'''
+    await assertErrorsInCode(r'''
 class A {
 }
 class B extends A {
   @override
   final int m = 1;
-}''', [HintCode.OVERRIDE_ON_NON_OVERRIDING_FIELD]);
+}''', [
+      error(HintCode.OVERRIDE_ON_NON_OVERRIDING_FIELD, 56, 1),
+    ]);
   }
 }
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
index 58dfef6..3a3345c 100644
--- 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
@@ -38,12 +38,14 @@
   }
 
   test_invalid() async {
-    await assertErrorCodesInCode(r'''
+    await assertErrorsInCode(r'''
 class A {
 }
 class B extends A {
   @override
   int get m => 1;
-}''', [HintCode.OVERRIDE_ON_NON_OVERRIDING_GETTER]);
+}''', [
+      error(HintCode.OVERRIDE_ON_NON_OVERRIDING_GETTER, 54, 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
index 608295d..19a2cbd 100644
--- 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
@@ -65,12 +65,14 @@
   }
 
   test_invalid() async {
-    await assertErrorCodesInCode(r'''
+    await assertErrorsInCode(r'''
 class A {
 }
 class B extends A {
   @override
   int m() => 1;
-}''', [HintCode.OVERRIDE_ON_NON_OVERRIDING_METHOD]);
+}''', [
+      error(HintCode.OVERRIDE_ON_NON_OVERRIDING_METHOD, 50, 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
index 0625741..748aa24 100644
--- 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
@@ -38,12 +38,14 @@
   }
 
   test_invalid() async {
-    await assertErrorCodesInCode(r'''
+    await assertErrorsInCode(r'''
 class A {
 }
 class B extends A {
   @override
   set m(int x) {}
-}''', [HintCode.OVERRIDE_ON_NON_OVERRIDING_SETTER]);
+}''', [
+      error(HintCode.OVERRIDE_ON_NON_OVERRIDING_SETTER, 50, 1),
+    ]);
   }
 }
diff --git a/pkg/analyzer/test/src/diagnostics/sdk_constraint_verifier_support.dart b/pkg/analyzer/test/src/diagnostics/sdk_constraint_verifier_support.dart
index feb02f5..8bd294a 100644
--- a/pkg/analyzer/test/src/diagnostics/sdk_constraint_verifier_support.dart
+++ b/pkg/analyzer/test/src/diagnostics/sdk_constraint_verifier_support.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.
 
-import 'package:analyzer/error/error.dart';
 import 'package:pub_semver/pub_semver.dart';
 
 import '../dart/resolution/driver_resolution.dart';
+import '../../generated/test_support.dart';
 
 /// A base class designed to be used by tests of the hints produced by the
 /// SdkConstraintVerifier.
@@ -13,10 +13,10 @@
   /// 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 {
+      {List<ExpectedError> expectedErrors}) async {
     driver.configure(
         analysisOptions: analysisOptions
           ..sdkVersionConstraint = VersionConstraint.parse(version));
-    await assertErrorCodesInCode(source, errorCodes ?? []);
+    await assertErrorsInCode(source, expectedErrors ?? []);
   }
 }
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
index 2dc0373..106093c 100644
--- 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
@@ -33,6 +33,8 @@
     verifyVersion('2.2.0', '''
 const dynamic a = 2;
 const c = (a as int) + 2;
-''', errorCodes: [HintCode.SDK_VERSION_AS_EXPRESSION_IN_CONST_CONTEXT]);
+''', expectedErrors: [
+      error(HintCode.SDK_VERSION_AS_EXPRESSION_IN_CONST_CONTEXT, 32, 8),
+    ]);
   }
 }
diff --git a/pkg/analyzer/test/src/diagnostics/sdk_version_async_exported_from_core_test.dart b/pkg/analyzer/test/src/diagnostics/sdk_version_async_exported_from_core_test.dart
index 7e04d6d..2a296e2 100644
--- a/pkg/analyzer/test/src/diagnostics/sdk_version_async_exported_from_core_test.dart
+++ b/pkg/analyzer/test/src/diagnostics/sdk_version_async_exported_from_core_test.dart
@@ -72,7 +72,9 @@
 import 'dart:core' show Future, int;
 
 Future<int> zero() async => 0;
-''', errorCodes: [HintCode.SDK_VERSION_ASYNC_EXPORTED_FROM_CORE]);
+''', expectedErrors: [
+      error(HintCode.SDK_VERSION_ASYNC_EXPORTED_FROM_CORE, 38, 6),
+    ]);
   }
 
   test_lessThan_explicitImportOfExportingLibrary() async {
@@ -89,7 +91,9 @@
   test_lessThan_implicitImportOfCore() async {
     await verifyVersion('2.0.0', '''
 Future<int> zero() async => 0;
-''', errorCodes: [HintCode.SDK_VERSION_ASYNC_EXPORTED_FROM_CORE]);
+''', expectedErrors: [
+      error(HintCode.SDK_VERSION_ASYNC_EXPORTED_FROM_CORE, 0, 6),
+    ]);
   }
 
   test_lessThan_implicitImportOfCore_inPart() async {
@@ -100,7 +104,9 @@
 part of lib;
 
 Future<int> zero() async => 0;
-''', errorCodes: [HintCode.SDK_VERSION_ASYNC_EXPORTED_FROM_CORE]);
+''', expectedErrors: [
+      error(HintCode.SDK_VERSION_ASYNC_EXPORTED_FROM_CORE, 14, 6),
+    ]);
   }
 
   test_lessThan_onlyReferencedInExport_hide() async {
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
index 29f4773..4183627 100644
--- a/pkg/analyzer/test/src/diagnostics/sdk_version_bool_operator_test.dart
+++ b/pkg/analyzer/test/src/diagnostics/sdk_version_bool_operator_test.dart
@@ -30,7 +30,9 @@
   test_and_const_lessThan() {
     verifyVersion('2.2.0', '''
 const c = true & false;
-''', errorCodes: [HintCode.SDK_VERSION_BOOL_OPERATOR]);
+''', expectedErrors: [
+      error(HintCode.SDK_VERSION_BOOL_OPERATOR, 15, 1),
+    ]);
   }
 
   test_and_nonConst_equals() {
@@ -54,7 +56,9 @@
   test_or_const_lessThan() {
     verifyVersion('2.2.0', '''
 const c = true | false;
-''', errorCodes: [HintCode.SDK_VERSION_BOOL_OPERATOR]);
+''', expectedErrors: [
+      error(HintCode.SDK_VERSION_BOOL_OPERATOR, 15, 1),
+    ]);
   }
 
   test_or_nonConst_equals() {
@@ -78,7 +82,9 @@
   test_xor_const_lessThan() {
     verifyVersion('2.2.0', '''
 const c = true ^ false;
-''', errorCodes: [HintCode.SDK_VERSION_BOOL_OPERATOR]);
+''', expectedErrors: [
+      error(HintCode.SDK_VERSION_BOOL_OPERATOR, 15, 1),
+    ]);
   }
 
   test_xor_nonConst_equals() {
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
index f8093af..e1814bb 100644
--- 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
@@ -38,7 +38,9 @@
 }
 const A a = A();
 const c = a == null;
-''', errorCodes: [HintCode.SDK_VERSION_EQ_EQ_OPERATOR_IN_CONST_CONTEXT]);
+''', expectedErrors: [
+      error(HintCode.SDK_VERSION_EQ_EQ_OPERATOR_IN_CONST_CONTEXT, 54, 2),
+    ]);
   }
 
   test_right_equals() {
@@ -58,6 +60,8 @@
 }
 const A a = A();
 const c = null == a;
-''', errorCodes: [HintCode.SDK_VERSION_EQ_EQ_OPERATOR_IN_CONST_CONTEXT]);
+''', expectedErrors: [
+      error(HintCode.SDK_VERSION_EQ_EQ_OPERATOR_IN_CONST_CONTEXT, 57, 2),
+    ]);
   }
 }
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
index 38d71f0..ed8c441 100644
--- 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
@@ -26,7 +26,9 @@
     //  UNDEFINED_OPERATOR when triple_shift is enabled by default.
     verifyVersion('2.3.2', '''
 const a = 42 >>> 3;
-''', errorCodes: [StaticTypeWarningCode.UNDEFINED_OPERATOR]);
+''', expectedErrors: [
+      error(StaticTypeWarningCode.UNDEFINED_OPERATOR, 13, 3),
+    ]);
   }
 
   test_const_lessThan() {
@@ -34,9 +36,9 @@
     //  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
+''', expectedErrors: [
+      error(HintCode.SDK_VERSION_GT_GT_GT_OPERATOR, 13, 3),
+      error(StaticTypeWarningCode.UNDEFINED_OPERATOR, 13, 3),
     ]);
   }
 
@@ -53,7 +55,9 @@
 class A {
   A operator >>>(A a) => this;
 }
-''', errorCodes: [HintCode.SDK_VERSION_GT_GT_GT_OPERATOR]);
+''', expectedErrors: [
+      error(HintCode.SDK_VERSION_GT_GT_GT_OPERATOR, 23, 3),
+    ]);
   }
 
   test_nonConst_equals() {
@@ -61,7 +65,9 @@
     //  UNDEFINED_OPERATOR when constant update is enabled by default.
     verifyVersion('2.3.2', '''
 var a = 42 >>> 3;
-''', errorCodes: [StaticTypeWarningCode.UNDEFINED_OPERATOR]);
+''', expectedErrors: [
+      error(StaticTypeWarningCode.UNDEFINED_OPERATOR, 11, 3),
+    ]);
   }
 
   test_nonConst_lessThan() {
@@ -69,9 +75,9 @@
     //  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
+''', expectedErrors: [
+      error(HintCode.SDK_VERSION_GT_GT_GT_OPERATOR, 11, 3),
+      error(StaticTypeWarningCode.UNDEFINED_OPERATOR, 11, 3),
     ]);
   }
 }
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
index 9b19e3c..fb7197a 100644
--- 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
@@ -33,6 +33,8 @@
     verifyVersion('2.2.0', '''
 const dynamic a = 2;
 const c = a is int;
-''', errorCodes: [HintCode.SDK_VERSION_IS_EXPRESSION_IN_CONST_CONTEXT]);
+''', expectedErrors: [
+      error(HintCode.SDK_VERSION_IS_EXPRESSION_IN_CONST_CONTEXT, 31, 8),
+    ]);
   }
 }
diff --git a/pkg/analyzer/test/src/diagnostics/sdk_version_never_test.dart b/pkg/analyzer/test/src/diagnostics/sdk_version_never_test.dart
index 749e00f..f9703db 100644
--- a/pkg/analyzer/test/src/diagnostics/sdk_version_never_test.dart
+++ b/pkg/analyzer/test/src/diagnostics/sdk_version_never_test.dart
@@ -43,6 +43,8 @@
   test_lessThan() async {
     await verifyVersion('2.3.0', '''
 Never sink;
-''', errorCodes: [HintCode.SDK_VERSION_NEVER]);
+''', expectedErrors: [
+      error(HintCode.SDK_VERSION_NEVER, 0, 5),
+    ]);
   }
 }
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
index 4a7b294..8164001 100644
--- a/pkg/analyzer/test/src/diagnostics/sdk_version_set_literal_test.dart
+++ b/pkg/analyzer/test/src/diagnostics/sdk_version_set_literal_test.dart
@@ -30,6 +30,8 @@
   test_lessThan() async {
     await verifyVersion('2.1.0', '''
 Set<int> zero() => <int>{0};
-''', errorCodes: [HintCode.SDK_VERSION_SET_LITERAL]);
+''', expectedErrors: [
+      error(HintCode.SDK_VERSION_SET_LITERAL, 19, 8),
+    ]);
   }
 }
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
index 53017da..b75a1a6 100644
--- 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
@@ -30,6 +30,8 @@
   test_lessThan() async {
     await verifyVersion('2.2.1', '''
 List<int> zero() => [if (0 < 1) 0];
-''', errorCodes: [HintCode.SDK_VERSION_UI_AS_CODE]);
+''', expectedErrors: [
+      error(HintCode.SDK_VERSION_UI_AS_CODE, 21, 12),
+    ]);
   }
 }
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 641a352..caac598 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
@@ -19,7 +19,7 @@
 @reflectiveTest
 class SetElementTypeNotAssignableTest extends DriverResolutionTest {
   test_const_ifElement_thenElseFalse_intInt() async {
-    await assertErrorCodesInCode(
+    await assertErrorsInCode(
         '''
 const dynamic a = 0;
 const dynamic b = 0;
@@ -27,81 +27,101 @@
 ''',
         analysisOptions.experimentStatus.constant_update_2018
             ? []
-            : [CompileTimeErrorCode.NON_CONSTANT_SET_ELEMENT]);
+            : [
+                error(CompileTimeErrorCode.NON_CONSTANT_SET_ELEMENT, 62, 19),
+              ]);
   }
 
   test_const_ifElement_thenElseFalse_intString() async {
-    await assertErrorCodesInCode(
+    await assertErrorsInCode(
         '''
 const dynamic a = 0;
 const dynamic b = 'b';
 var v = const <int>{if (1 < 0) a else b};
 ''',
         analysisOptions.experimentStatus.constant_update_2018
-            ? [StaticWarningCode.SET_ELEMENT_TYPE_NOT_ASSIGNABLE]
-            : [CompileTimeErrorCode.NON_CONSTANT_SET_ELEMENT]);
+            ? [
+                error(StaticWarningCode.SET_ELEMENT_TYPE_NOT_ASSIGNABLE, 82, 1),
+              ]
+            : [
+                error(CompileTimeErrorCode.NON_CONSTANT_SET_ELEMENT, 64, 19),
+              ]);
   }
 
   test_const_ifElement_thenFalse_intString() async {
-    await assertErrorCodesInCode(
+    await assertErrorsInCode(
         '''
 var v = const <int>{if (1 < 0) 'a'};
 ''',
         analysisOptions.experimentStatus.constant_update_2018
-            ? [StaticWarningCode.SET_ELEMENT_TYPE_NOT_ASSIGNABLE]
+            ? [
+                error(StaticWarningCode.SET_ELEMENT_TYPE_NOT_ASSIGNABLE, 31, 3),
+              ]
             : [
-                StaticWarningCode.SET_ELEMENT_TYPE_NOT_ASSIGNABLE,
-                CompileTimeErrorCode.NON_CONSTANT_SET_ELEMENT
+                error(CompileTimeErrorCode.NON_CONSTANT_SET_ELEMENT, 20, 14),
+                error(StaticWarningCode.SET_ELEMENT_TYPE_NOT_ASSIGNABLE, 31, 3),
               ]);
   }
 
   test_const_ifElement_thenFalse_intString_dynamic() async {
-    await assertErrorCodesInCode(
+    await assertErrorsInCode(
         '''
 const dynamic a = 'a';
 var v = const <int>{if (1 < 0) a};
 ''',
         analysisOptions.experimentStatus.constant_update_2018
             ? []
-            : [CompileTimeErrorCode.NON_CONSTANT_SET_ELEMENT]);
+            : [
+                error(CompileTimeErrorCode.NON_CONSTANT_SET_ELEMENT, 43, 12),
+              ]);
   }
 
   test_const_ifElement_thenTrue_intInt() async {
-    await assertErrorCodesInCode(
+    await assertErrorsInCode(
         '''
 const dynamic a = 0;
 var v = const <int>{if (true) a};
 ''',
         analysisOptions.experimentStatus.constant_update_2018
             ? []
-            : [CompileTimeErrorCode.NON_CONSTANT_SET_ELEMENT]);
+            : [
+                error(CompileTimeErrorCode.NON_CONSTANT_SET_ELEMENT, 41, 11),
+              ]);
   }
 
   test_const_ifElement_thenTrue_intString() async {
-    await assertErrorCodesInCode(
+    await assertErrorsInCode(
         '''
 const dynamic a = 'a';
 var v = const <int>{if (true) a};
 ''',
         analysisOptions.experimentStatus.constant_update_2018
-            ? [StaticWarningCode.SET_ELEMENT_TYPE_NOT_ASSIGNABLE]
-            : [CompileTimeErrorCode.NON_CONSTANT_SET_ELEMENT]);
+            ? [
+                error(StaticWarningCode.SET_ELEMENT_TYPE_NOT_ASSIGNABLE, 53, 1),
+              ]
+            : [
+                error(CompileTimeErrorCode.NON_CONSTANT_SET_ELEMENT, 43, 11),
+              ]);
   }
 
   test_const_spread_intInt() async {
-    await assertErrorCodesInCode(
+    await assertErrorsInCode(
         '''
 var v = const <int>{...[0, 1]};
 ''',
         analysisOptions.experimentStatus.constant_update_2018
             ? []
-            : [CompileTimeErrorCode.NON_CONSTANT_SET_ELEMENT]);
+            : [
+                error(CompileTimeErrorCode.NON_CONSTANT_SET_ELEMENT, 20, 9),
+              ]);
   }
 
   test_explicitTypeArgs_const() async {
-    await assertErrorCodesInCode('''
+    await assertErrorsInCode('''
 var v = const <String>{42};
-''', [StaticWarningCode.SET_ELEMENT_TYPE_NOT_ASSIGNABLE]);
+''', [
+      error(StaticWarningCode.SET_ELEMENT_TYPE_NOT_ASSIGNABLE, 23, 2),
+    ]);
   }
 
   test_explicitTypeArgs_const_actualTypeMatch() async {
@@ -112,16 +132,20 @@
   }
 
   test_explicitTypeArgs_const_actualTypeMismatch() async {
-    await assertErrorCodesInCode('''
+    await assertErrorsInCode('''
 const dynamic x = 42;
 var v = const <String>{x};
-''', [StaticWarningCode.SET_ELEMENT_TYPE_NOT_ASSIGNABLE]);
+''', [
+      error(StaticWarningCode.SET_ELEMENT_TYPE_NOT_ASSIGNABLE, 45, 1),
+    ]);
   }
 
   test_explicitTypeArgs_notConst() async {
-    await assertErrorCodesInCode('''
+    await assertErrorsInCode('''
 var v = <String>{42};
-''', [StaticWarningCode.SET_ELEMENT_TYPE_NOT_ASSIGNABLE]);
+''', [
+      error(StaticWarningCode.SET_ELEMENT_TYPE_NOT_ASSIGNABLE, 17, 2),
+    ]);
   }
 
   test_nonConst_ifElement_thenElseFalse_intDynamic() async {
@@ -141,9 +165,11 @@
   }
 
   test_nonConst_ifElement_thenFalse_intString() async {
-    await assertErrorCodesInCode('''
+    await assertErrorsInCode('''
 var v = <int>[if (1 < 0) 'a'];
-''', [StaticWarningCode.LIST_ELEMENT_TYPE_NOT_ASSIGNABLE]);
+''', [
+      error(StaticWarningCode.LIST_ELEMENT_TYPE_NOT_ASSIGNABLE, 25, 3),
+    ]);
   }
 
   test_nonConst_ifElement_thenTrue_intDynamic() async {
diff --git a/pkg/analyzer/test/src/diagnostics/top_level_instance_getter_test.dart b/pkg/analyzer/test/src/diagnostics/top_level_instance_getter_test.dart
index 2a28469..ceb09b7 100644
--- a/pkg/analyzer/test/src/diagnostics/top_level_instance_getter_test.dart
+++ b/pkg/analyzer/test/src/diagnostics/top_level_instance_getter_test.dart
@@ -89,64 +89,76 @@
   }
 
   test_implicitlyTyped() async {
-    await assertErrorCodesInCode('''
+    await assertErrorsInCode('''
 class A {
   get g => 0;
 }
 var b = new A().g;
-''', [StrongModeCode.TOP_LEVEL_INSTANCE_GETTER]);
+''', [
+      error(StrongModeCode.TOP_LEVEL_INSTANCE_GETTER, 42, 1),
+    ]);
   }
 
   test_implicitlyTyped_call() async {
-    await assertErrorCodesInCode('''
+    await assertErrorsInCode('''
 class A {
   get g => () => 0;
 }
 var a = new A();
 var b = a.g();
-''', [StrongModeCode.TOP_LEVEL_INSTANCE_GETTER]);
+''', [
+      error(StrongModeCode.TOP_LEVEL_INSTANCE_GETTER, 57, 5),
+    ]);
   }
 
   test_implicitlyTyped_field() async {
-    await assertErrorCodesInCode('''
+    await assertErrorsInCode('''
 class A {
   var g = 0;
 }
 var b = new A().g;
-''', [StrongModeCode.TOP_LEVEL_INSTANCE_GETTER]);
+''', [
+      error(StrongModeCode.TOP_LEVEL_INSTANCE_GETTER, 41, 1),
+    ]);
   }
 
   test_implicitlyTyped_field_call() async {
-    await assertErrorCodesInCode('''
+    await assertErrorsInCode('''
 class A {
   var g = () => 0;
 }
 var a = new A();
 var b = a.g();
-''', [StrongModeCode.TOP_LEVEL_INSTANCE_GETTER]);
+''', [
+      error(StrongModeCode.TOP_LEVEL_INSTANCE_GETTER, 56, 5),
+    ]);
   }
 
   test_implicitlyTyped_field_prefixedIdentifier() async {
-    await assertErrorCodesInCode('''
+    await assertErrorsInCode('''
 class A {
   var g = 0;
 }
 var a = new A();
 var b = a.g;
-''', [StrongModeCode.TOP_LEVEL_INSTANCE_GETTER]);
+''', [
+      error(StrongModeCode.TOP_LEVEL_INSTANCE_GETTER, 52, 1),
+    ]);
   }
 
   test_implicitlyTyped_fn() async {
     // The reference to a.x triggers TOP_LEVEL_INSTANCE_GETTER because f is
     // generic, so the type of a.x might affect the type of b.
-    await assertErrorCodesInCode('''
+    await assertErrorsInCode('''
 class A {
   var x = 0;
 }
 int f<T>(x) => 0;
 var a = new A();
 var b = f(a.x);
-''', [StrongModeCode.TOP_LEVEL_INSTANCE_GETTER]);
+''', [
+      error(StrongModeCode.TOP_LEVEL_INSTANCE_GETTER, 72, 1),
+    ]);
   }
 
   test_implicitlyTyped_fn_explicit_type_params() async {
@@ -191,13 +203,15 @@
   test_implicitlyTyped_invoke() async {
     // The reference to a.x triggers TOP_LEVEL_INSTANCE_GETTER because the
     // closure is generic, so the type of a.x might affect the type of b.
-    await assertErrorCodesInCode('''
+    await assertErrorsInCode('''
 class A {
   var x = 0;
 }
 var a = new A();
 var b = (<T>(y) => 0)(a.x);
-''', [StrongModeCode.TOP_LEVEL_INSTANCE_GETTER]);
+''', [
+      error(StrongModeCode.TOP_LEVEL_INSTANCE_GETTER, 66, 1),
+    ]);
   }
 
   test_implicitlyTyped_invoke_explicit_type_params() async {
@@ -227,14 +241,16 @@
   test_implicitlyTyped_method() async {
     // The reference to a.x triggers TOP_LEVEL_INSTANCE_GETTER because f is
     // generic, so the type of a.x might affect the type of b.
-    await assertErrorCodesInCode('''
+    await assertErrorsInCode('''
 class A {
   var x = 0;
   int f<T>(int x) => 0;
 }
 var a = new A();
 var b = a.f(a.x);
-''', [StrongModeCode.TOP_LEVEL_INSTANCE_GETTER]);
+''', [
+      error(StrongModeCode.TOP_LEVEL_INSTANCE_GETTER, 80, 1),
+    ]);
   }
 
   test_implicitlyTyped_method_explicit_type_params() async {
@@ -266,7 +282,7 @@
   test_implicitlyTyped_new() async {
     // The reference to a.x triggers TOP_LEVEL_INSTANCE_GETTER because B is
     // generic, so the type of a.x might affect the type of b.
-    await assertErrorCodesInCode('''
+    await assertErrorsInCode('''
 class A {
   var x = 0;
 }
@@ -275,7 +291,9 @@
 }
 var a = new A();
 var b = new B(a.x);
-''', [StrongModeCode.TOP_LEVEL_INSTANCE_GETTER]);
+''', [
+      error(StrongModeCode.TOP_LEVEL_INSTANCE_GETTER, 81, 1),
+    ]);
   }
 
   test_implicitlyTyped_new_explicit_type_params() async {
@@ -329,7 +347,7 @@
   test_implicitlyTyped_new_named() async {
     // The reference to a.x triggers TOP_LEVEL_INSTANCE_GETTER because B is
     // generic, so the type of a.x might affect the type of b.
-    await assertErrorCodesInCode('''
+    await assertErrorsInCode('''
 class A {
   var x = 0;
 }
@@ -338,7 +356,9 @@
 }
 var a = new A();
 var b = new B.named(a.x);
-''', [StrongModeCode.TOP_LEVEL_INSTANCE_GETTER]);
+''', [
+      error(StrongModeCode.TOP_LEVEL_INSTANCE_GETTER, 93, 1),
+    ]);
   }
 
   test_implicitlyTyped_new_not_generic() async {
@@ -397,30 +417,34 @@
 ''');
     // The reference to a.x triggers TOP_LEVEL_INSTANCE_GETTER because B is
     // generic, so the type of a.x might affect the type of b.
-    await assertErrorCodesInCode('''
+    await assertErrorsInCode('''
 import 'lib1.dart' as foo;
 class A {
   var x = 0;
 }
 var a = new A();
 var b = new foo.B(a.x);
-''', [StrongModeCode.TOP_LEVEL_INSTANCE_GETTER]);
+''', [
+      error(StrongModeCode.TOP_LEVEL_INSTANCE_GETTER, 89, 1),
+    ]);
   }
 
   test_implicitlyTyped_prefixedIdentifier() async {
-    await assertErrorCodesInCode('''
+    await assertErrorsInCode('''
 class A {
   get g => 0;
 }
 var a = new A();
 var b = a.g;
-''', [StrongModeCode.TOP_LEVEL_INSTANCE_GETTER]);
+''', [
+      error(StrongModeCode.TOP_LEVEL_INSTANCE_GETTER, 53, 1),
+    ]);
   }
 
   test_implicitlyTyped_propertyAccessLhs() async {
     // The reference to a.x triggers TOP_LEVEL_INSTANCE_GETTER because the type
     // of a.x affects the lookup of y, which in turn affects the type of b.
-    await assertErrorCodesInCode('''
+    await assertErrorsInCode('''
 class A {
   var x = new B();
   int operator[](int value) => 0;
@@ -430,7 +454,9 @@
 }
 var a = new A();
 var b = (a.x).y;
-''', [StrongModeCode.TOP_LEVEL_INSTANCE_GETTER]);
+''', [
+      error(StrongModeCode.TOP_LEVEL_INSTANCE_GETTER, 114, 1),
+    ]);
   }
 
   test_prefixedIdentifier() async {
diff --git a/pkg/analyzer/test/src/diagnostics/top_level_instance_method_test.dart b/pkg/analyzer/test/src/diagnostics/top_level_instance_method_test.dart
index 221a7f0..00a78e1 100644
--- a/pkg/analyzer/test/src/diagnostics/top_level_instance_method_test.dart
+++ b/pkg/analyzer/test/src/diagnostics/top_level_instance_method_test.dart
@@ -16,12 +16,14 @@
 @reflectiveTest
 class TopLevelInstanceMethodTest extends DriverResolutionTest {
   test_noParameter() async {
-    await assertErrorCodesInCode('''
+    await assertErrorsInCode('''
 class A {
   f() => 0;
 }
 var x = new A().f();
-''', [StrongModeCode.TOP_LEVEL_INSTANCE_METHOD]);
+''', [
+      error(StrongModeCode.TOP_LEVEL_INSTANCE_METHOD, 32, 11),
+    ]);
   }
 
   test_parameter() async {
@@ -34,12 +36,14 @@
   }
 
   test_parameter_generic() async {
-    await assertErrorCodesInCode('''
+    await assertErrorsInCode('''
 class A {
   int f<T>(v) => 0;
 }
 var x = new A().f(0);
-''', [StrongModeCode.TOP_LEVEL_INSTANCE_METHOD]);
+''', [
+      error(StrongModeCode.TOP_LEVEL_INSTANCE_METHOD, 40, 12),
+    ]);
   }
 
   test_parameter_generic_explicit() async {
@@ -61,21 +65,25 @@
   }
 
   test_tearOff() async {
-    await assertErrorCodesInCode('''
+    await assertErrorsInCode('''
 class A {
   f() => 0;
 }
 var x = new A().f;
-''', [StrongModeCode.TOP_LEVEL_INSTANCE_METHOD]);
+''', [
+      error(StrongModeCode.TOP_LEVEL_INSTANCE_METHOD, 40, 1),
+    ]);
   }
 
   test_tearOff_parameter() async {
-    await assertErrorCodesInCode('''
+    await assertErrorsInCode('''
 class A {
   int f(v) => 0;
 }
 var x = new A().f;
-''', [StrongModeCode.TOP_LEVEL_INSTANCE_METHOD]);
+''', [
+      error(StrongModeCode.TOP_LEVEL_INSTANCE_METHOD, 45, 1),
+    ]);
   }
 
   test_tearoff_static() async {
diff --git a/pkg/analyzer/test/src/diagnostics/type_check_is_not_null_test.dart b/pkg/analyzer/test/src/diagnostics/type_check_is_not_null_test.dart
index 9a473f0..e5e14a3 100644
--- a/pkg/analyzer/test/src/diagnostics/type_check_is_not_null_test.dart
+++ b/pkg/analyzer/test/src/diagnostics/type_check_is_not_null_test.dart
@@ -16,10 +16,12 @@
 @reflectiveTest
 class TypeCheckIsNotNullTest extends DriverResolutionTest {
   test_not_Null() async {
-    await assertErrorCodesInCode(r'''
+    await assertErrorsInCode(r'''
 bool m(i) {
   return i is! Null;
 }
-''', [HintCode.TYPE_CHECK_IS_NOT_NULL]);
+''', [
+      error(HintCode.TYPE_CHECK_IS_NOT_NULL, 21, 10),
+    ]);
   }
 }
diff --git a/pkg/analyzer/test/src/diagnostics/type_check_is_null_test.dart b/pkg/analyzer/test/src/diagnostics/type_check_is_null_test.dart
index 42d8555..19d804b 100644
--- a/pkg/analyzer/test/src/diagnostics/type_check_is_null_test.dart
+++ b/pkg/analyzer/test/src/diagnostics/type_check_is_null_test.dart
@@ -16,10 +16,12 @@
 @reflectiveTest
 class TypeCheckIsNullTest extends DriverResolutionTest {
   test_is_Null() async {
-    await assertErrorCodesInCode(r'''
+    await assertErrorsInCode(r'''
 bool m(i) {
   return i is Null;
 }
-''', [HintCode.TYPE_CHECK_IS_NULL]);
+''', [
+      error(HintCode.TYPE_CHECK_IS_NULL, 21, 9),
+    ]);
   }
 }
diff --git a/pkg/analyzer/test/src/diagnostics/unchecked_use_of_nullable_value_test.dart b/pkg/analyzer/test/src/diagnostics/unchecked_use_of_nullable_value_test.dart
index 08ffb33..6dc6cfc 100644
--- a/pkg/analyzer/test/src/diagnostics/unchecked_use_of_nullable_value_test.dart
+++ b/pkg/analyzer/test/src/diagnostics/unchecked_use_of_nullable_value_test.dart
@@ -31,12 +31,14 @@
   }
 
   test_and_nullable() async {
-    await assertErrorCodesInCode(r'''
+    await assertErrorsInCode(r'''
 m() {
   bool? x;
   if(x && true) {}
 }
-''', [StaticWarningCode.UNCHECKED_USE_OF_NULLABLE_VALUE]);
+''', [
+      error(StaticWarningCode.UNCHECKED_USE_OF_NULLABLE_VALUE, 22, 1),
+    ]);
   }
 
   test_as_nullable() async {
@@ -58,12 +60,14 @@
   }
 
   test_assert_nullable() async {
-    await assertErrorCodesInCode(r'''
+    await assertErrorsInCode(r'''
 m() {
   bool? x;
   assert(x);
 }
-''', [StaticWarningCode.UNCHECKED_USE_OF_NULLABLE_VALUE]);
+''', [
+      error(StaticWarningCode.UNCHECKED_USE_OF_NULLABLE_VALUE, 26, 1),
+    ]);
   }
 
   test_await_nonNullable() async {
@@ -94,12 +98,14 @@
   }
 
   test_cascade_nullable() async {
-    await assertErrorCodesInCode(r'''
+    await assertErrorsInCode(r'''
 m() {
   int? x;
   x..isEven;
 }
-''', [StaticWarningCode.UNCHECKED_USE_OF_NULLABLE_VALUE]);
+''', [
+      error(StaticWarningCode.UNCHECKED_USE_OF_NULLABLE_VALUE, 18, 1),
+    ]);
   }
 
   test_eq_nullable() async {
@@ -121,12 +127,15 @@
   }
 
   test_forLoop_nullable() async {
-    await assertErrorCodesInCode(r'''
+    await assertErrorsInCode(r'''
 m() {
   List? x;
   for (var y in x) {}
 }
-''', [StaticWarningCode.UNCHECKED_USE_OF_NULLABLE_VALUE]);
+''', [
+      error(HintCode.UNUSED_LOCAL_VARIABLE, 28, 1),
+      error(StaticWarningCode.UNCHECKED_USE_OF_NULLABLE_VALUE, 33, 1),
+    ]);
   }
 
   test_if_nonNullable() async {
@@ -139,12 +148,14 @@
   }
 
   test_if_nullable() async {
-    await assertErrorCodesInCode(r'''
+    await assertErrorsInCode(r'''
 m() {
   bool? x;
   if (x) {}
 }
-''', [StaticWarningCode.UNCHECKED_USE_OF_NULLABLE_VALUE]);
+''', [
+      error(StaticWarningCode.UNCHECKED_USE_OF_NULLABLE_VALUE, 23, 1),
+    ]);
   }
 
   test_index_nonNullable() async {
@@ -157,12 +168,14 @@
   }
 
   test_index_nullable() async {
-    await assertErrorCodesInCode(r'''
+    await assertErrorsInCode(r'''
 m() {
   List? x;
   x[0];
 }
-''', [StaticWarningCode.UNCHECKED_USE_OF_NULLABLE_VALUE]);
+''', [
+      error(StaticWarningCode.UNCHECKED_USE_OF_NULLABLE_VALUE, 19, 1),
+    ]);
   }
 
   test_invoke_dynamicFunctionType_nonNullable() async {
@@ -175,12 +188,14 @@
   }
 
   test_invoke_dynamicFunctionType_nullable() async {
-    await assertErrorCodesInCode(r'''
+    await assertErrorsInCode(r'''
 m() {
   Function? x;
   x();
 }
-''', [StaticWarningCode.UNCHECKED_USE_OF_NULLABLE_VALUE]);
+''', [
+      error(StaticWarningCode.UNCHECKED_USE_OF_NULLABLE_VALUE, 23, 1),
+    ]);
   }
 
   test_invoke_nonNullable() async {
@@ -193,12 +208,14 @@
   }
 
   test_invoke_nullable() async {
-    await assertErrorCodesInCode(r'''
+    await assertErrorsInCode(r'''
 m() {
   Function()? x;
   x();
 }
-''', [StaticWarningCode.UNCHECKED_USE_OF_NULLABLE_VALUE]);
+''', [
+      error(StaticWarningCode.UNCHECKED_USE_OF_NULLABLE_VALUE, 25, 1),
+    ]);
   }
 
   test_invoke_parenthesized_nonNullable() async {
@@ -247,12 +264,14 @@
   }
 
   test_member_nullable() async {
-    await assertErrorCodesInCode(r'''
+    await assertErrorsInCode(r'''
 m() {
   int? x;
   x.isEven;
 }
-''', [StaticWarningCode.UNCHECKED_USE_OF_NULLABLE_VALUE]);
+''', [
+      error(StaticWarningCode.UNCHECKED_USE_OF_NULLABLE_VALUE, 18, 1),
+    ]);
   }
 
   test_member_parenthesized_hashCode_nullable() async {
@@ -265,12 +284,14 @@
   }
 
   test_member_parenthesized_nullable() async {
-    await assertErrorCodesInCode(r'''
+    await assertErrorsInCode(r'''
 m() {
   int? x;
   (x).isEven;
 }
-''', [StaticWarningCode.UNCHECKED_USE_OF_NULLABLE_VALUE]);
+''', [
+      error(StaticWarningCode.UNCHECKED_USE_OF_NULLABLE_VALUE, 18, 3),
+    ]);
   }
 
   test_member_parenthesized_runtimeType_nullable() async {
@@ -283,21 +304,25 @@
   }
 
   test_member_potentiallyNullable() async {
-    await assertErrorCodesInCode(r'''
+    await assertErrorsInCode(r'''
 m<T extends int?>() {
   T x;
   x.isEven;
 }
-''', [StaticWarningCode.UNCHECKED_USE_OF_NULLABLE_VALUE]);
+''', [
+      error(StaticWarningCode.UNCHECKED_USE_OF_NULLABLE_VALUE, 31, 1),
+    ]);
   }
 
   test_member_potentiallyNullable_called() async {
-    await assertErrorCodesInCode(r'''
+    await assertErrorsInCode(r'''
 m<T extends Function>() {
   List<T?> x;
   x.first();
 }
-''', [StaticWarningCode.UNCHECKED_USE_OF_NULLABLE_VALUE]);
+''', [
+      error(StaticWarningCode.UNCHECKED_USE_OF_NULLABLE_VALUE, 44, 5),
+    ]);
   }
 
   test_member_questionDot_nullable() async {
@@ -337,12 +362,14 @@
   }
 
   test_method_nullable() async {
-    await assertErrorCodesInCode(r'''
+    await assertErrorsInCode(r'''
 m() {
   int? x;
   x.round();
 }
-''', [StaticWarningCode.UNCHECKED_USE_OF_NULLABLE_VALUE]);
+''', [
+      error(StaticWarningCode.UNCHECKED_USE_OF_NULLABLE_VALUE, 18, 1),
+    ]);
   }
 
   test_method_questionDot_nullable() async {
@@ -373,12 +400,15 @@
   }
 
   test_minusEq_nullable() async {
-    await assertErrorCodesInCode(r'''
+    await assertErrorsInCode(r'''
 m() {
   int? x;
   x -= 1;
 }
-''', [StaticWarningCode.UNCHECKED_USE_OF_NULLABLE_VALUE]);
+''', [
+      error(HintCode.UNUSED_LOCAL_VARIABLE, 13, 1),
+      error(StaticWarningCode.UNCHECKED_USE_OF_NULLABLE_VALUE, 18, 1),
+    ]);
   }
 
   test_not_nonNullable() async {
@@ -391,12 +421,14 @@
   }
 
   test_not_nullable() async {
-    await assertErrorCodesInCode(r'''
+    await assertErrorsInCode(r'''
 m() {
   bool? x;
   if(!x) {}
 }
-''', [StaticWarningCode.UNCHECKED_USE_OF_NULLABLE_VALUE]);
+''', [
+      error(StaticWarningCode.UNCHECKED_USE_OF_NULLABLE_VALUE, 23, 1),
+    ]);
   }
 
   test_notEq_nullable() async {
@@ -418,12 +450,14 @@
   }
 
   test_operatorMinus_nullable() async {
-    await assertErrorCodesInCode(r'''
+    await assertErrorsInCode(r'''
 m() {
   int? x;
   x - 3;
 }
-''', [StaticWarningCode.UNCHECKED_USE_OF_NULLABLE_VALUE]);
+''', [
+      error(StaticWarningCode.UNCHECKED_USE_OF_NULLABLE_VALUE, 18, 1),
+    ]);
   }
 
   test_operatorPlus_nonNullable() async {
@@ -436,12 +470,14 @@
   }
 
   test_operatorPlus_nullable() async {
-    await assertErrorCodesInCode(r'''
+    await assertErrorsInCode(r'''
 m() {
   int? x;
   x + 3;
 }
-''', [StaticWarningCode.UNCHECKED_USE_OF_NULLABLE_VALUE]);
+''', [
+      error(StaticWarningCode.UNCHECKED_USE_OF_NULLABLE_VALUE, 18, 1),
+    ]);
   }
 
   test_operatorPostfixDec_nonNullable() async {
@@ -454,12 +490,15 @@
   }
 
   test_operatorPostfixDec_nullable() async {
-    await assertErrorCodesInCode(r'''
+    await assertErrorsInCode(r'''
 m() {
   int? x;
   x--;
 }
-''', [StaticWarningCode.UNCHECKED_USE_OF_NULLABLE_VALUE]);
+''', [
+      error(HintCode.UNUSED_LOCAL_VARIABLE, 13, 1),
+      error(StaticWarningCode.UNCHECKED_USE_OF_NULLABLE_VALUE, 18, 1),
+    ]);
   }
 
   test_operatorPostfixInc_nonNullable() async {
@@ -472,12 +511,15 @@
   }
 
   test_operatorPostfixInc_nullable() async {
-    await assertErrorCodesInCode(r'''
+    await assertErrorsInCode(r'''
 m() {
   int? x;
   x++;
 }
-''', [StaticWarningCode.UNCHECKED_USE_OF_NULLABLE_VALUE]);
+''', [
+      error(HintCode.UNUSED_LOCAL_VARIABLE, 13, 1),
+      error(StaticWarningCode.UNCHECKED_USE_OF_NULLABLE_VALUE, 18, 1),
+    ]);
   }
 
   test_operatorPrefixDec_nonNullable() async {
@@ -490,12 +532,15 @@
   }
 
   test_operatorPrefixDec_nullable() async {
-    await assertErrorCodesInCode(r'''
+    await assertErrorsInCode(r'''
 m() {
   int? x;
   --x;
 }
-''', [StaticWarningCode.UNCHECKED_USE_OF_NULLABLE_VALUE]);
+''', [
+      error(HintCode.UNUSED_LOCAL_VARIABLE, 13, 1),
+      error(StaticWarningCode.UNCHECKED_USE_OF_NULLABLE_VALUE, 20, 1),
+    ]);
   }
 
   test_operatorPrefixInc_nonNullable() async {
@@ -508,12 +553,15 @@
   }
 
   test_operatorPrefixInc_nullable() async {
-    await assertErrorCodesInCode(r'''
+    await assertErrorsInCode(r'''
 m() {
   int? x;
   ++x;
 }
-''', [StaticWarningCode.UNCHECKED_USE_OF_NULLABLE_VALUE]);
+''', [
+      error(HintCode.UNUSED_LOCAL_VARIABLE, 13, 1),
+      error(StaticWarningCode.UNCHECKED_USE_OF_NULLABLE_VALUE, 20, 1),
+    ]);
   }
 
   test_operatorUnaryMinus_nonNullable() async {
@@ -526,12 +574,15 @@
   }
 
   test_operatorUnaryMinus_nullable() async {
-    await assertErrorCodesInCode(r'''
+    await assertErrorsInCode(r'''
 m() {
   int? x;
   -x;
 }
-''', [StaticWarningCode.UNCHECKED_USE_OF_NULLABLE_VALUE]);
+''', [
+      error(HintCode.UNUSED_LOCAL_VARIABLE, 13, 1),
+      error(StaticWarningCode.UNCHECKED_USE_OF_NULLABLE_VALUE, 19, 1),
+    ]);
   }
 
   test_or_nonNullable() async {
@@ -544,12 +595,14 @@
   }
 
   test_or_nullable() async {
-    await assertErrorCodesInCode(r'''
+    await assertErrorsInCode(r'''
 m() {
   bool? x;
   if(x || false) {}
 }
-''', [StaticWarningCode.UNCHECKED_USE_OF_NULLABLE_VALUE]);
+''', [
+      error(StaticWarningCode.UNCHECKED_USE_OF_NULLABLE_VALUE, 22, 1),
+    ]);
   }
 
   test_plusEq_nonNullable() async {
@@ -562,21 +615,26 @@
   }
 
   test_plusEq_nullable() async {
-    await assertErrorCodesInCode(r'''
+    await assertErrorsInCode(r'''
 m() {
   int? x;
   x += 1;
 }
-''', [StaticWarningCode.UNCHECKED_USE_OF_NULLABLE_VALUE]);
+''', [
+      error(HintCode.UNUSED_LOCAL_VARIABLE, 13, 1),
+      error(StaticWarningCode.UNCHECKED_USE_OF_NULLABLE_VALUE, 18, 1),
+    ]);
   }
 
   test_ternary_condition_nullable() async {
-    await assertErrorCodesInCode(r'''
+    await assertErrorsInCode(r'''
 m() {
   bool? x;
   x ? 0 : 1;
 }
-''', [StaticWarningCode.UNCHECKED_USE_OF_NULLABLE_VALUE]);
+''', [
+      error(StaticWarningCode.UNCHECKED_USE_OF_NULLABLE_VALUE, 19, 1),
+    ]);
   }
 
   test_ternary_lhs_nullable() async {
diff --git a/pkg/analyzer/test/src/diagnostics/undefined_getter_test.dart b/pkg/analyzer/test/src/diagnostics/undefined_getter_test.dart
index 3713aef..6feaae5 100644
--- a/pkg/analyzer/test/src/diagnostics/undefined_getter_test.dart
+++ b/pkg/analyzer/test/src/diagnostics/undefined_getter_test.dart
@@ -16,11 +16,13 @@
 @reflectiveTest
 class UndefinedGetterTest extends DriverResolutionTest {
   test_ifElement_inList_notPromoted() async {
-    await assertErrorCodesInCode('''
+    await assertErrorsInCode('''
 f(int x) {
   return [if (x is String) x.length];
 }
-''', [StaticTypeWarningCode.UNDEFINED_GETTER]);
+''', [
+      error(StaticTypeWarningCode.UNDEFINED_GETTER, 40, 6),
+    ]);
   }
 
   test_ifElement_inList_promoted() async {
@@ -32,11 +34,13 @@
   }
 
   test_ifElement_inMap_notPromoted() async {
-    await assertErrorCodesInCode('''
+    await assertErrorsInCode('''
 f(int x) {
   return {if (x is String) x : x.length};
 }
-''', [StaticTypeWarningCode.UNDEFINED_GETTER]);
+''', [
+      error(StaticTypeWarningCode.UNDEFINED_GETTER, 44, 6),
+    ]);
   }
 
   test_ifElement_inMap_promoted() async {
@@ -48,11 +52,13 @@
   }
 
   test_ifElement_inSet_notPromoted() async {
-    await assertErrorCodesInCode('''
+    await assertErrorsInCode('''
 f(int x) {
   return {if (x is String) x.length};
 }
-''', [StaticTypeWarningCode.UNDEFINED_GETTER]);
+''', [
+      error(StaticTypeWarningCode.UNDEFINED_GETTER, 40, 6),
+    ]);
   }
 
   test_ifElement_inSet_promoted() async {
@@ -64,13 +70,15 @@
   }
 
   test_ifStatement_notPromoted() async {
-    await assertErrorCodesInCode('''
+    await assertErrorsInCode('''
 f(int x) {
   if (x is String) {
     x.length;
   }
 }
-''', [StaticTypeWarningCode.UNDEFINED_GETTER]);
+''', [
+      error(StaticTypeWarningCode.UNDEFINED_GETTER, 38, 6),
+    ]);
   }
 
   test_ifStatement_promoted() async {
@@ -84,12 +92,14 @@
   }
 
   test_promotedTypeParameter_regress35305() async {
-    await assertErrorCodesInCode(r'''
+    await assertErrorsInCode(r'''
 void f<X extends num, Y extends X>(Y y) {
   if (y is int) {
     y.isEven;
   }
 }
-''', [StaticTypeWarningCode.UNDEFINED_GETTER]);
+''', [
+      error(StaticTypeWarningCode.UNDEFINED_GETTER, 66, 6),
+    ]);
   }
 }
diff --git a/pkg/analyzer/test/src/diagnostics/undefined_hidden_name_test.dart b/pkg/analyzer/test/src/diagnostics/undefined_hidden_name_test.dart
index 888721c..94e0131 100644
--- a/pkg/analyzer/test/src/diagnostics/undefined_hidden_name_test.dart
+++ b/pkg/analyzer/test/src/diagnostics/undefined_hidden_name_test.dart
@@ -17,15 +17,20 @@
 class UndefinedHiddenNameTest extends DriverResolutionTest {
   test_export() async {
     newFile('/test/lib/lib1.dart');
-    await assertErrorCodesInCode(r'''
+    await assertErrorsInCode(r'''
 export 'lib1.dart' hide a;
-''', [HintCode.UNDEFINED_HIDDEN_NAME]);
+''', [
+      error(HintCode.UNDEFINED_HIDDEN_NAME, 24, 1),
+    ]);
   }
 
   test_import() async {
     newFile('/test/lib/lib1.dart');
-    await assertErrorCodesInCode(r'''
+    await assertErrorsInCode(r'''
 import 'lib1.dart' hide a;
-''', [HintCode.UNUSED_IMPORT, HintCode.UNDEFINED_HIDDEN_NAME]);
+''', [
+      error(HintCode.UNUSED_IMPORT, 7, 11),
+      error(HintCode.UNDEFINED_HIDDEN_NAME, 24, 1),
+    ]);
   }
 }
diff --git a/pkg/analyzer/test/src/diagnostics/undefined_identifier_test.dart b/pkg/analyzer/test/src/diagnostics/undefined_identifier_test.dart
index 3a8e91f..895322a 100644
--- a/pkg/analyzer/test/src/diagnostics/undefined_identifier_test.dart
+++ b/pkg/analyzer/test/src/diagnostics/undefined_identifier_test.dart
@@ -24,11 +24,14 @@
   }
 
   test_forElement_inList_outsideElement() async {
-    await assertErrorCodesInCode('''
+    await assertErrorsInCode('''
 f() {
   return [for (int x in []) null, x];
 }
-''', [StaticWarningCode.UNDEFINED_IDENTIFIER]);
+''', [
+      error(HintCode.UNUSED_LOCAL_VARIABLE, 25, 1),
+      error(StaticWarningCode.UNDEFINED_IDENTIFIER, 40, 1),
+    ]);
   }
 
   test_forStatement_inBody() async {
@@ -42,11 +45,14 @@
   }
 
   test_forStatement_outsideBody() async {
-    await assertErrorCodesInCode('''
+    await assertErrorsInCode('''
 f() {
   for (int x in []) {}
   x;
 }
-''', [StaticWarningCode.UNDEFINED_IDENTIFIER]);
+''', [
+      error(HintCode.UNUSED_LOCAL_VARIABLE, 17, 1),
+      error(StaticWarningCode.UNDEFINED_IDENTIFIER, 31, 1),
+    ]);
   }
 }
diff --git a/pkg/analyzer/test/src/diagnostics/undefined_operator_test.dart b/pkg/analyzer/test/src/diagnostics/undefined_operator_test.dart
index a10a3ee..8ce6206 100644
--- a/pkg/analyzer/test/src/diagnostics/undefined_operator_test.dart
+++ b/pkg/analyzer/test/src/diagnostics/undefined_operator_test.dart
@@ -16,18 +16,20 @@
 @reflectiveTest
 class UndefinedOperatorTest extends DriverResolutionTest {
   test_binaryExpression() async {
-    await assertErrorCodesInCode(r'''
+    await assertErrorsInCode(r'''
 class A {}
 f(var a) {
   if (a is A) {
     a + 1;
   }
 }
-''', [StaticTypeWarningCode.UNDEFINED_OPERATOR]);
+''', [
+      error(StaticTypeWarningCode.UNDEFINED_OPERATOR, 44, 1),
+    ]);
   }
 
   test_binaryExpression_inSubtype() async {
-    await assertErrorCodesInCode(r'''
+    await assertErrorsInCode(r'''
 class A {}
 class B extends A {
   operator +(B b) {}
@@ -37,11 +39,13 @@
     a + 1;
   }
 }
-''', [StaticTypeWarningCode.UNDEFINED_OPERATOR]);
+''', [
+      error(StaticTypeWarningCode.UNDEFINED_OPERATOR, 87, 1),
+    ]);
   }
 
   test_indexBoth() async {
-    await assertErrorCodesInCode(r'''
+    await assertErrorsInCode(r'''
 class A {}
 f(var a) {
   if (a is A) {
@@ -49,13 +53,13 @@
   }
 }
 ''', [
-      StaticTypeWarningCode.UNDEFINED_OPERATOR,
-      StaticTypeWarningCode.UNDEFINED_OPERATOR,
+      error(StaticTypeWarningCode.UNDEFINED_OPERATOR, 43, 3),
+      error(StaticTypeWarningCode.UNDEFINED_OPERATOR, 43, 3),
     ]);
   }
 
   test_indexBoth_inSubtype() async {
-    await assertErrorCodesInCode(r'''
+    await assertErrorsInCode(r'''
 class A {}
 class B extends A {
   operator [](int index) {}
@@ -66,24 +70,26 @@
   }
 }
 ''', [
-      StaticTypeWarningCode.UNDEFINED_OPERATOR,
-      StaticTypeWarningCode.UNDEFINED_OPERATOR,
+      error(StaticTypeWarningCode.UNDEFINED_OPERATOR, 93, 3),
+      error(StaticTypeWarningCode.UNDEFINED_OPERATOR, 93, 3),
     ]);
   }
 
   test_indexGetter() async {
-    await assertErrorCodesInCode(r'''
+    await assertErrorsInCode(r'''
 class A {}
 f(var a) {
   if (a is A) {
     a[0];
   }
 }
-''', [StaticTypeWarningCode.UNDEFINED_OPERATOR]);
+''', [
+      error(StaticTypeWarningCode.UNDEFINED_OPERATOR, 43, 3),
+    ]);
   }
 
   test_indexGetter_inSubtype() async {
-    await assertErrorCodesInCode(r'''
+    await assertErrorsInCode(r'''
 class A {}
 class B extends A {
   operator [](int index) {}
@@ -93,22 +99,26 @@
     a[0];
   }
 }
-''', [StaticTypeWarningCode.UNDEFINED_OPERATOR]);
+''', [
+      error(StaticTypeWarningCode.UNDEFINED_OPERATOR, 93, 3),
+    ]);
   }
 
   test_indexSetter() async {
-    await assertErrorCodesInCode(r'''
+    await assertErrorsInCode(r'''
 class A {}
 f(var a) {
   if (a is A) {
     a[0] = 1;
   }
 }
-''', [StaticTypeWarningCode.UNDEFINED_OPERATOR]);
+''', [
+      error(StaticTypeWarningCode.UNDEFINED_OPERATOR, 43, 3),
+    ]);
   }
 
   test_indexSetter_inSubtype() async {
-    await assertErrorCodesInCode(r'''
+    await assertErrorsInCode(r'''
 class A {}
 class B extends A {
   operator []=(i, v) {}
@@ -118,7 +128,9 @@
     a[0] = 1;
   }
 }
-''', [StaticTypeWarningCode.UNDEFINED_OPERATOR]);
+''', [
+      error(StaticTypeWarningCode.UNDEFINED_OPERATOR, 89, 3),
+    ]);
   }
 
   test_postfixExpression() async {
diff --git a/pkg/analyzer/test/src/diagnostics/undefined_prefixed_name_test.dart b/pkg/analyzer/test/src/diagnostics/undefined_prefixed_name_test.dart
index 6de8429..3485b60 100644
--- a/pkg/analyzer/test/src/diagnostics/undefined_prefixed_name_test.dart
+++ b/pkg/analyzer/test/src/diagnostics/undefined_prefixed_name_test.dart
@@ -17,19 +17,23 @@
 class UndefinedPrefixedNameTest extends DriverResolutionTest {
   test_getterContext() async {
     newFile('/test/lib/lib.dart');
-    await assertErrorCodesInCode('''
+    await assertErrorsInCode('''
 import 'lib.dart' as p;
 f() => p.c;
-''', [StaticTypeWarningCode.UNDEFINED_PREFIXED_NAME]);
+''', [
+      error(StaticTypeWarningCode.UNDEFINED_PREFIXED_NAME, 33, 1),
+    ]);
   }
 
   test_setterContext() async {
     newFile('/test/lib/lib.dart');
-    await assertErrorCodesInCode('''
+    await assertErrorsInCode('''
 import 'lib.dart' as p;
 f() {
   p.c = 0;
 }
-''', [StaticTypeWarningCode.UNDEFINED_PREFIXED_NAME]);
+''', [
+      error(StaticTypeWarningCode.UNDEFINED_PREFIXED_NAME, 34, 1),
+    ]);
   }
 }
diff --git a/pkg/analyzer/test/src/diagnostics/undefined_setter_test.dart b/pkg/analyzer/test/src/diagnostics/undefined_setter_test.dart
index 7306c0e..827b77e 100644
--- a/pkg/analyzer/test/src/diagnostics/undefined_setter_test.dart
+++ b/pkg/analyzer/test/src/diagnostics/undefined_setter_test.dart
@@ -16,7 +16,7 @@
 @reflectiveTest
 class UndefinedSetterTest extends DriverResolutionTest {
   test_inSubtype() async {
-    await assertErrorCodesInCode(r'''
+    await assertErrorsInCode(r'''
 class A {}
 class B extends A {
   set b(x) {}
@@ -26,17 +26,21 @@
     a.b = 0;
   }
 }
-''', [StaticTypeWarningCode.UNDEFINED_SETTER]);
+''', [
+      error(StaticTypeWarningCode.UNDEFINED_SETTER, 80, 1),
+    ]);
   }
 
   test_inType() async {
-    await assertErrorCodesInCode(r'''
+    await assertErrorsInCode(r'''
 class A {}
 f(var a) {
   if(a is A) {
     a.m = 0;
   }
 }
-''', [StaticTypeWarningCode.UNDEFINED_SETTER]);
+''', [
+      error(StaticTypeWarningCode.UNDEFINED_SETTER, 43, 1),
+    ]);
   }
 }
diff --git a/pkg/analyzer/test/src/diagnostics/undefined_shown_name_test.dart b/pkg/analyzer/test/src/diagnostics/undefined_shown_name_test.dart
index 3243bb2..121fbda 100644
--- a/pkg/analyzer/test/src/diagnostics/undefined_shown_name_test.dart
+++ b/pkg/analyzer/test/src/diagnostics/undefined_shown_name_test.dart
@@ -17,15 +17,20 @@
 class UndefinedShownNameTest extends DriverResolutionTest {
   test_export() async {
     newFile('/test/lib/lib1.dart');
-    await assertErrorCodesInCode(r'''
+    await assertErrorsInCode(r'''
 export 'lib1.dart' show a;
-''', [HintCode.UNDEFINED_SHOWN_NAME]);
+''', [
+      error(HintCode.UNDEFINED_SHOWN_NAME, 24, 1),
+    ]);
   }
 
   test_import() async {
     newFile('/test/lib/lib1.dart');
-    await assertErrorCodesInCode(r'''
+    await assertErrorsInCode(r'''
 import 'lib1.dart' show a;
-''', [HintCode.UNUSED_IMPORT, HintCode.UNDEFINED_SHOWN_NAME]);
+''', [
+      error(HintCode.UNUSED_IMPORT, 7, 11),
+      error(HintCode.UNDEFINED_SHOWN_NAME, 24, 1),
+    ]);
   }
 }
diff --git a/pkg/analyzer/test/src/diagnostics/unnecessary_cast_test.dart b/pkg/analyzer/test/src/diagnostics/unnecessary_cast_test.dart
index 0d89796..a7a5c1a 100644
--- a/pkg/analyzer/test/src/diagnostics/unnecessary_cast_test.dart
+++ b/pkg/analyzer/test/src/diagnostics/unnecessary_cast_test.dart
@@ -59,13 +59,15 @@
 
   test_generics() async {
     // dartbug.com/18953
-    assertErrorCodesInCode(r'''
+    assertErrorsInCode(r'''
 import 'dart:async';
 Future<int> f() => new Future.value(0);
 void g(bool c) {
   (c ? f(): new Future.value(0) as Future<int>).then((int value) {});
 }
-''', [HintCode.UNNECESSARY_CAST]);
+''', [
+      error(HintCode.UNNECESSARY_CAST, 90, 34),
+    ]);
   }
 
   test_parameter_A() async {
@@ -92,18 +94,24 @@
   }
 
   test_type_supertype() async {
-    await assertErrorCodesInCode(r'''
+    await assertErrorsInCode(r'''
 m(int i) {
   var b = i as Object;
 }
-''', [HintCode.UNNECESSARY_CAST]);
+''', [
+      error(HintCode.UNUSED_LOCAL_VARIABLE, 17, 1),
+      error(HintCode.UNNECESSARY_CAST, 21, 11),
+    ]);
   }
 
   test_type_type() async {
-    await assertErrorCodesInCode(r'''
+    await assertErrorsInCode(r'''
 m(num i) {
   var b = i as num;
 }
-''', [HintCode.UNNECESSARY_CAST]);
+''', [
+      error(HintCode.UNUSED_LOCAL_VARIABLE, 17, 1),
+      error(HintCode.UNNECESSARY_CAST, 21, 8),
+    ]);
   }
 }
diff --git a/pkg/analyzer/test/src/diagnostics/unnecessary_no_such_method_test.dart b/pkg/analyzer/test/src/diagnostics/unnecessary_no_such_method_test.dart
index 0801ae0..d443e12 100644
--- a/pkg/analyzer/test/src/diagnostics/unnecessary_no_such_method_test.dart
+++ b/pkg/analyzer/test/src/diagnostics/unnecessary_no_such_method_test.dart
@@ -16,7 +16,7 @@
 @reflectiveTest
 class UnnecessaryNoSuchMethodTest extends DriverResolutionTest {
   test_blockBody() async {
-    await assertErrorCodesInCode(r'''
+    await assertErrorsInCode(r'''
 class A {
   noSuchMethod(x) => super.noSuchMethod(x);
 }
@@ -26,7 +26,9 @@
     return super.noSuchMethod(y);
   }
 }
-''', [HintCode.UNNECESSARY_NO_SUCH_METHOD]);
+''', [
+      error(HintCode.UNNECESSARY_NO_SUCH_METHOD, 87, 55),
+    ]);
   }
 
   test_blockBody_notReturnStatement() async {
@@ -59,7 +61,7 @@
   }
 
   test_expressionBody() async {
-    await assertErrorCodesInCode(r'''
+    await assertErrorsInCode(r'''
 class A {
   noSuchMethod(x) => super.noSuchMethod(x);
 }
@@ -67,7 +69,9 @@
   mmm();
   noSuchMethod(y) => super.noSuchMethod(y);
 }
-''', [HintCode.UNNECESSARY_NO_SUCH_METHOD]);
+''', [
+      error(HintCode.UNNECESSARY_NO_SUCH_METHOD, 87, 41),
+    ]);
   }
 
   test_expressionBody_notNoSuchMethod() async {
diff --git a/pkg/analyzer/test/src/diagnostics/unnecessary_type_check_false_test.dart b/pkg/analyzer/test/src/diagnostics/unnecessary_type_check_false_test.dart
index e3316ad..727f808 100644
--- a/pkg/analyzer/test/src/diagnostics/unnecessary_type_check_false_test.dart
+++ b/pkg/analyzer/test/src/diagnostics/unnecessary_type_check_false_test.dart
@@ -16,24 +16,32 @@
 @reflectiveTest
 class UnnecessaryTypeCheckFalseTest extends DriverResolutionTest {
   test_null_not_Null() async {
-    await assertErrorCodesInCode(r'''
+    await assertErrorsInCode(r'''
 bool b = null is! Null;
-''', [HintCode.UNNECESSARY_TYPE_CHECK_FALSE]);
+''', [
+      error(HintCode.UNNECESSARY_TYPE_CHECK_FALSE, 9, 13),
+    ]);
   }
 
   test_type_not_dynamic() async {
-    await assertErrorCodesInCode(r'''
+    await assertErrorsInCode(r'''
 m(i) {
   bool b = i is! dynamic;
 }
-''', [HintCode.UNNECESSARY_TYPE_CHECK_FALSE]);
+''', [
+      error(HintCode.UNUSED_LOCAL_VARIABLE, 14, 1),
+      error(HintCode.UNNECESSARY_TYPE_CHECK_FALSE, 18, 13),
+    ]);
   }
 
   test_type_not_object() async {
-    await assertErrorCodesInCode(r'''
+    await assertErrorsInCode(r'''
 m(i) {
   bool b = i is! Object;
 }
-''', [HintCode.UNNECESSARY_TYPE_CHECK_FALSE]);
+''', [
+      error(HintCode.UNUSED_LOCAL_VARIABLE, 14, 1),
+      error(HintCode.UNNECESSARY_TYPE_CHECK_FALSE, 18, 12),
+    ]);
   }
 }
diff --git a/pkg/analyzer/test/src/diagnostics/unnecessary_type_check_true_test.dart b/pkg/analyzer/test/src/diagnostics/unnecessary_type_check_true_test.dart
index 269d39a..daae87f 100644
--- a/pkg/analyzer/test/src/diagnostics/unnecessary_type_check_true_test.dart
+++ b/pkg/analyzer/test/src/diagnostics/unnecessary_type_check_true_test.dart
@@ -16,24 +16,32 @@
 @reflectiveTest
 class UnnecessaryTypeCheckTrueTest extends DriverResolutionTest {
   test_null_is_Null() async {
-    await assertErrorCodesInCode(r'''
+    await assertErrorsInCode(r'''
 bool b = null is Null;
-''', [HintCode.UNNECESSARY_TYPE_CHECK_TRUE]);
+''', [
+      error(HintCode.UNNECESSARY_TYPE_CHECK_TRUE, 9, 12),
+    ]);
   }
 
   test_type_is_dynamic() async {
-    await assertErrorCodesInCode(r'''
+    await assertErrorsInCode(r'''
 m(i) {
   bool b = i is dynamic;
 }
-''', [HintCode.UNNECESSARY_TYPE_CHECK_TRUE]);
+''', [
+      error(HintCode.UNUSED_LOCAL_VARIABLE, 14, 1),
+      error(HintCode.UNNECESSARY_TYPE_CHECK_TRUE, 18, 12),
+    ]);
   }
 
   test_type_is_object() async {
-    await assertErrorCodesInCode(r'''
+    await assertErrorsInCode(r'''
 m(i) {
   bool b = i is Object;
 }
-''', [HintCode.UNNECESSARY_TYPE_CHECK_TRUE]);
+''', [
+      error(HintCode.UNUSED_LOCAL_VARIABLE, 14, 1),
+      error(HintCode.UNNECESSARY_TYPE_CHECK_TRUE, 18, 11),
+    ]);
   }
 }
diff --git a/pkg/analyzer/test/src/diagnostics/unused_catch_clause_test.dart b/pkg/analyzer/test/src/diagnostics/unused_catch_clause_test.dart
index de74c41..9eefe4c 100644
--- a/pkg/analyzer/test/src/diagnostics/unused_catch_clause_test.dart
+++ b/pkg/analyzer/test/src/diagnostics/unused_catch_clause_test.dart
@@ -19,13 +19,15 @@
   bool get enableUnusedLocalVariable => true;
 
   test_on_unusedException() async {
-    await assertErrorCodesInCode(r'''
+    await assertErrorsInCode(r'''
 main() {
   try {
   } on String catch (exception) {
   }
 }
-''', [HintCode.UNUSED_CATCH_CLAUSE]);
+''', [
+      error(HintCode.UNUSED_CATCH_CLAUSE, 38, 9),
+    ]);
   }
 
   test_on_usedException() async {
diff --git a/pkg/analyzer/test/src/diagnostics/unused_catch_stack_test.dart b/pkg/analyzer/test/src/diagnostics/unused_catch_stack_test.dart
index 84303fa..9ee0541 100644
--- a/pkg/analyzer/test/src/diagnostics/unused_catch_stack_test.dart
+++ b/pkg/analyzer/test/src/diagnostics/unused_catch_stack_test.dart
@@ -19,13 +19,15 @@
   bool get enableUnusedLocalVariable => true;
 
   test_on_unusedStack() async {
-    await assertErrorCodesInCode(r'''
+    await assertErrorsInCode(r'''
 main() {
   try {
   } on String catch (exception, stackTrace) {
   }
 }
-''', [HintCode.UNUSED_CATCH_STACK]);
+''', [
+      error(HintCode.UNUSED_CATCH_STACK, 49, 10),
+    ]);
   }
 
   test_on_usedStack() async {
@@ -40,13 +42,15 @@
   }
 
   test_unusedStack() async {
-    await assertErrorCodesInCode(r'''
+    await assertErrorsInCode(r'''
 main() {
   try {
   } catch (exception, stackTrace) {
   }
 }
-''', [HintCode.UNUSED_CATCH_STACK]);
+''', [
+      error(HintCode.UNUSED_CATCH_STACK, 39, 10),
+    ]);
   }
 
   test_usedStack() async {
diff --git a/pkg/analyzer/test/src/diagnostics/unused_element_test.dart b/pkg/analyzer/test/src/diagnostics/unused_element_test.dart
index 8f16748..ef38d33 100644
--- a/pkg/analyzer/test/src/diagnostics/unused_element_test.dart
+++ b/pkg/analyzer/test/src/diagnostics/unused_element_test.dart
@@ -85,7 +85,7 @@
   }
 
   test_class_notUsed_inClassMember() async {
-    await assertErrorCodesInCode(r'''
+    await assertErrorsInCode(r'''
 class _A {
   static staticMethod() {
     new _A();
@@ -94,45 +94,55 @@
     new _A();
   }
 }
-''', [HintCode.UNUSED_ELEMENT]);
+''', [
+      error(HintCode.UNUSED_ELEMENT, 6, 2),
+    ]);
   }
 
   test_class_notUsed_inConstructorName() async {
-    await assertErrorCodesInCode(r'''
+    await assertErrorsInCode(r'''
 class _A {
   _A() {}
   _A.named() {}
 }
-''', [HintCode.UNUSED_ELEMENT]);
+''', [
+      error(HintCode.UNUSED_ELEMENT, 6, 2),
+    ]);
   }
 
   test_class_notUsed_isExpression() async {
-    await assertErrorCodesInCode(r'''
+    await assertErrorsInCode(r'''
 class _A {}
 main(p) {
   if (p is _A) {
   }
 }
-''', [HintCode.UNUSED_ELEMENT]);
+''', [
+      error(HintCode.UNUSED_ELEMENT, 6, 2),
+    ]);
   }
 
   test_class_notUsed_noReference() async {
-    await assertErrorCodesInCode(r'''
+    await assertErrorsInCode(r'''
 class _A {}
 main() {
 }
-''', [HintCode.UNUSED_ELEMENT]);
+''', [
+      error(HintCode.UNUSED_ELEMENT, 6, 2),
+    ]);
   }
 
   test_class_notUsed_variableDeclaration() async {
-    await assertErrorCodesInCode(r'''
+    await assertErrorsInCode(r'''
 class _A {}
 main() {
   _A v;
   print(v);
 }
 print(x) {}
-''', [HintCode.UNUSED_ELEMENT]);
+''', [
+      error(HintCode.UNUSED_ELEMENT, 6, 2),
+    ]);
   }
 
   test_enum_isUsed_fieldReference() async {
@@ -145,11 +155,13 @@
   }
 
   test_enum_notUsed_noReference() async {
-    await assertErrorCodesInCode(r'''
+    await assertErrorsInCode(r'''
 enum _MyEnum {A, B, C}
 main() {
 }
-''', [HintCode.UNUSED_ELEMENT]);
+''', [
+      error(HintCode.UNUSED_ELEMENT, 5, 7),
+    ]);
   }
 
   test_functionLocal_isUsed_closure() async {
@@ -181,21 +193,25 @@
   }
 
   test_functionLocal_notUsed_noReference() async {
-    await assertErrorCodesInCode(r'''
+    await assertErrorsInCode(r'''
 main() {
   f() {}
 }
-''', [HintCode.UNUSED_ELEMENT]);
+''', [
+      error(HintCode.UNUSED_ELEMENT, 11, 1),
+    ]);
   }
 
   test_functionLocal_notUsed_referenceFromItself() async {
-    await assertErrorCodesInCode(r'''
+    await assertErrorsInCode(r'''
 main() {
   _f(int p) {
     _f(p - 1);
   }
 }
-''', [HintCode.UNUSED_ELEMENT]);
+''', [
+      error(HintCode.UNUSED_ELEMENT, 11, 2),
+    ]);
   }
 
   test_functionTop_isUsed_invocation() async {
@@ -218,21 +234,25 @@
   }
 
   test_functionTop_notUsed_noReference() async {
-    await assertErrorCodesInCode(r'''
+    await assertErrorsInCode(r'''
 _f() {}
 main() {
 }
-''', [HintCode.UNUSED_ELEMENT]);
+''', [
+      error(HintCode.UNUSED_ELEMENT, 0, 2),
+    ]);
   }
 
   test_functionTop_notUsed_referenceFromItself() async {
-    await assertErrorCodesInCode(r'''
+    await assertErrorsInCode(r'''
 _f(int p) {
   _f(p - 1);
 }
 main() {
 }
-''', [HintCode.UNUSED_ELEMENT]);
+''', [
+      error(HintCode.UNUSED_ELEMENT, 0, 2),
+    ]);
   }
 
   test_functionTypeAlias_isUsed_isExpression() async {
@@ -274,11 +294,13 @@
   }
 
   test_functionTypeAlias_notUsed_noReference() async {
-    await assertErrorCodesInCode(r'''
+    await assertErrorsInCode(r'''
 typedef _F(a, b);
 main() {
 }
-''', [HintCode.UNUSED_ELEMENT]);
+''', [
+      error(HintCode.UNUSED_ELEMENT, 8, 2),
+    ]);
   }
 
   test_getter_isUsed_invocation_implicitThis() async {
@@ -315,21 +337,25 @@
   }
 
   test_getter_notUsed_noReference() async {
-    await assertErrorCodesInCode(r'''
+    await assertErrorsInCode(r'''
 class A {
   get _g => null;
 }
-''', [HintCode.UNUSED_ELEMENT]);
+''', [
+      error(HintCode.UNUSED_ELEMENT, 16, 2),
+    ]);
   }
 
   test_getter_notUsed_referenceFromItself() async {
-    await assertErrorCodesInCode(r'''
+    await assertErrorsInCode(r'''
 class A {
   get _g {
     return _g;
   }
 }
-''', [HintCode.UNUSED_ELEMENT]);
+''', [
+      error(HintCode.UNUSED_ELEMENT, 16, 2),
+    ]);
   }
 
   test_method_isUsed_hasReference_implicitThis() async {
@@ -477,21 +503,25 @@
   }
 
   test_method_notUsed_noReference() async {
-    await assertErrorCodesInCode(r'''
+    await assertErrorsInCode(r'''
 class A {
   static _m() {}
 }
-''', [HintCode.UNUSED_ELEMENT]);
+''', [
+      error(HintCode.UNUSED_ELEMENT, 19, 2),
+    ]);
   }
 
   test_method_notUsed_referenceFromItself() async {
-    await assertErrorCodesInCode(r'''
+    await assertErrorsInCode(r'''
 class A {
   static _m(int p) {
     _m(p - 1);
   }
 }
-''', [HintCode.UNUSED_ELEMENT]);
+''', [
+      error(HintCode.UNUSED_ELEMENT, 19, 2),
+    ]);
   }
 
   test_setter_isUsed_invocation_implicitThis() async {
@@ -528,15 +558,17 @@
   }
 
   test_setter_notUsed_noReference() async {
-    await assertErrorCodesInCode(r'''
+    await assertErrorsInCode(r'''
 class A {
   set _s(x) {}
 }
-''', [HintCode.UNUSED_ELEMENT]);
+''', [
+      error(HintCode.UNUSED_ELEMENT, 16, 2),
+    ]);
   }
 
   test_setter_notUsed_referenceFromItself() async {
-    await assertErrorCodesInCode(r'''
+    await assertErrorsInCode(r'''
 class A {
   set _s(int x) {
     if (x > 5) {
@@ -544,7 +576,9 @@
     }
   }
 }
-''', [HintCode.UNUSED_ELEMENT]);
+''', [
+      error(HintCode.UNUSED_ELEMENT, 16, 2),
+    ]);
   }
 
   test_topLevelVariable_isUsed() async {
@@ -567,11 +601,13 @@
   }
 
   test_topLevelVariable_notUsed() async {
-    await assertErrorCodesInCode(r'''
+    await assertErrorsInCode(r'''
 int _a = 1;
 main() {
   _a = 2;
 }
-''', [HintCode.UNUSED_ELEMENT]);
+''', [
+      error(HintCode.UNUSED_ELEMENT, 4, 2),
+    ]);
   }
 }
diff --git a/pkg/analyzer/test/src/diagnostics/unused_field_test.dart b/pkg/analyzer/test/src/diagnostics/unused_field_test.dart
index a0dacdb..fa17061 100644
--- a/pkg/analyzer/test/src/diagnostics/unused_field_test.dart
+++ b/pkg/analyzer/test/src/diagnostics/unused_field_test.dart
@@ -105,40 +105,48 @@
   }
 
   test_unusedField_notUsed_compoundAssign() async {
-    await assertErrorCodesInCode(r'''
+    await assertErrorsInCode(r'''
 class A {
   int _f;
   main() {
     _f += 2;
   }
 }
-''', [HintCode.UNUSED_FIELD]);
+''', [
+      error(HintCode.UNUSED_FIELD, 16, 2),
+    ]);
   }
 
   test_unusedField_notUsed_constructorFieldInitializers() async {
-    await assertErrorCodesInCode(r'''
+    await assertErrorsInCode(r'''
 class A {
   int _f;
   A() : _f = 0;
 }
-''', [HintCode.UNUSED_FIELD]);
+''', [
+      error(HintCode.UNUSED_FIELD, 16, 2),
+    ]);
   }
 
   test_unusedField_notUsed_fieldFormalParameter() async {
-    await assertErrorCodesInCode(r'''
+    await assertErrorsInCode(r'''
 class A {
   int _f;
   A(this._f);
 }
-''', [HintCode.UNUSED_FIELD]);
+''', [
+      error(HintCode.UNUSED_FIELD, 16, 2),
+    ]);
   }
 
   test_unusedField_notUsed_noReference() async {
-    await assertErrorCodesInCode(r'''
+    await assertErrorsInCode(r'''
 class A {
   int _f;
 }
-''', [HintCode.UNUSED_FIELD]);
+''', [
+      error(HintCode.UNUSED_FIELD, 16, 2),
+    ]);
   }
 
   test_unusedField_notUsed_nullAssign() async {
@@ -154,29 +162,33 @@
   }
 
   test_unusedField_notUsed_postfixExpr() async {
-    await assertErrorCodesInCode(r'''
+    await assertErrorsInCode(r'''
 class A {
   int _f = 0;
   main() {
     _f++;
   }
 }
-''', [HintCode.UNUSED_FIELD]);
+''', [
+      error(HintCode.UNUSED_FIELD, 16, 2),
+    ]);
   }
 
   test_unusedField_notUsed_prefixExpr() async {
-    await assertErrorCodesInCode(r'''
+    await assertErrorsInCode(r'''
 class A {
   int _f = 0;
   main() {
     ++_f;
   }
 }
-''', [HintCode.UNUSED_FIELD]);
+''', [
+      error(HintCode.UNUSED_FIELD, 16, 2),
+    ]);
   }
 
   test_unusedField_notUsed_simpleAssignment() async {
-    await assertErrorCodesInCode(r'''
+    await assertErrorsInCode(r'''
 class A {
   int _f;
   m() {
@@ -186,6 +198,8 @@
 main(A a) {
   a._f = 2;
 }
-''', [HintCode.UNUSED_FIELD]);
+''', [
+      error(HintCode.UNUSED_FIELD, 16, 2),
+    ]);
   }
 }
diff --git a/pkg/analyzer/test/src/diagnostics/unused_import_test.dart b/pkg/analyzer/test/src/diagnostics/unused_import_test.dart
index 84ac848..2159a68 100644
--- a/pkg/analyzer/test/src/diagnostics/unused_import_test.dart
+++ b/pkg/analyzer/test/src/diagnostics/unused_import_test.dart
@@ -31,11 +31,13 @@
     newFile('/test/lib/lib1.dart', content: r'''
 class A {}
 ''');
-    await assertErrorCodesInCode(r'''
+    await assertErrorsInCode(r'''
 import 'lib1.dart';
 import 'lib1.dart' as one;
 one.A a;
-''', [HintCode.UNUSED_IMPORT]);
+''', [
+      error(HintCode.UNUSED_IMPORT, 7, 11),
+    ]);
   }
 
   test_as_equalPrefixes_referenced() async {
@@ -63,11 +65,13 @@
     newFile('/test/lib/lib2.dart', content: r'''
 class B {}
 ''');
-    await assertErrorCodesInCode(r'''
+    await assertErrorsInCode(r'''
 import 'lib1.dart' as one;
 import 'lib2.dart' as one;
 one.A a;
-''', [HintCode.UNUSED_IMPORT]);
+''', [
+      error(HintCode.UNUSED_IMPORT, 32, 11),
+    ]);
   }
 
   test_core_library() async {
@@ -131,11 +135,13 @@
     newFile('/test/lib/lib1.dart', content: r'''
 class A {}
 ''');
-    await assertErrorCodesInCode(r'''
+    await assertErrorsInCode(r'''
 import 'lib1.dart';
 import 'lib1.dart' hide A;
 A a;
-''', [HintCode.UNUSED_IMPORT]);
+''', [
+      error(HintCode.UNUSED_IMPORT, 27, 11),
+    ]);
   }
 
   test_inComment_libraryDirective() async {
@@ -200,17 +206,21 @@
 class A {}
 class B {}
 ''');
-    await assertErrorCodesInCode(r'''
+    await assertErrorsInCode(r'''
 import 'lib1.dart' show A;
 import 'lib1.dart' show B;
 A a;
-''', [HintCode.UNUSED_IMPORT]);
+''', [
+      error(HintCode.UNUSED_IMPORT, 34, 11),
+    ]);
   }
 
   test_unusedImport() async {
     newFile('/test/lib/lib1.dart');
-    await assertErrorCodesInCode(r'''
+    await assertErrorsInCode(r'''
 import 'lib1.dart';
-''', [HintCode.UNUSED_IMPORT]);
+''', [
+      error(HintCode.UNUSED_IMPORT, 7, 11),
+    ]);
   }
 }
diff --git a/pkg/analyzer/test/src/diagnostics/unused_label_test.dart b/pkg/analyzer/test/src/diagnostics/unused_label_test.dart
index 3322685..4d1c338 100644
--- a/pkg/analyzer/test/src/diagnostics/unused_label_test.dart
+++ b/pkg/analyzer/test/src/diagnostics/unused_label_test.dart
@@ -16,7 +16,7 @@
 @reflectiveTest
 class UnusedLabelTest extends DriverResolutionTest {
   test_unused_inSwitch() async {
-    await assertErrorCodesInCode(r'''
+    await assertErrorsInCode(r'''
 f(x) {
   switch (x) {
     label: case 0:
@@ -25,17 +25,21 @@
       break;
   }
 }
-''', [HintCode.UNUSED_LABEL]);
+''', [
+      error(HintCode.UNUSED_LABEL, 26, 6),
+    ]);
   }
 
   test_unused_onWhile() async {
-    await assertErrorCodesInCode(r'''
+    await assertErrorsInCode(r'''
 f(condition()) {
   label: while (condition()) {
     break;
   }
 }
-''', [HintCode.UNUSED_LABEL]);
+''', [
+      error(HintCode.UNUSED_LABEL, 19, 6),
+    ]);
   }
 
   test_used_inSwitch() async {
diff --git a/pkg/analyzer/test/src/diagnostics/unused_local_variable_test.dart b/pkg/analyzer/test/src/diagnostics/unused_local_variable_test.dart
index d4281bc..5bf524c 100644
--- a/pkg/analyzer/test/src/diagnostics/unused_local_variable_test.dart
+++ b/pkg/analyzer/test/src/diagnostics/unused_local_variable_test.dart
@@ -31,23 +31,27 @@
   }
 
   test_inFunction() async {
-    await assertErrorCodesInCode(r'''
+    await assertErrorsInCode(r'''
 main() {
   var v = 1;
   v = 2;
 }
-''', [HintCode.UNUSED_LOCAL_VARIABLE]);
+''', [
+      error(HintCode.UNUSED_LOCAL_VARIABLE, 15, 1),
+    ]);
   }
 
   test_inMethod() async {
-    await assertErrorCodesInCode(r'''
+    await assertErrorsInCode(r'''
 class A {
   foo() {
     var v = 1;
     v = 2;
   }
 }
-''', [HintCode.UNUSED_LOCAL_VARIABLE]);
+''', [
+      error(HintCode.UNUSED_LOCAL_VARIABLE, 28, 1),
+    ]);
   }
 
   test_isInvoked() async {
@@ -72,30 +76,36 @@
   }
 
   test_isRead_notUsed_compoundAssign() async {
-    await assertErrorCodesInCode(r'''
+    await assertErrorsInCode(r'''
 main() {
   var v = 1;
   v += 2;
 }
-''', [HintCode.UNUSED_LOCAL_VARIABLE]);
+''', [
+      error(HintCode.UNUSED_LOCAL_VARIABLE, 15, 1),
+    ]);
   }
 
   test_isRead_notUsed_postfixExpr() async {
-    await assertErrorCodesInCode(r'''
+    await assertErrorsInCode(r'''
 main() {
   var v = 1;
   v++;
 }
-''', [HintCode.UNUSED_LOCAL_VARIABLE]);
+''', [
+      error(HintCode.UNUSED_LOCAL_VARIABLE, 15, 1),
+    ]);
   }
 
   test_isRead_notUsed_prefixExpr() async {
-    await assertErrorCodesInCode(r'''
+    await assertErrorsInCode(r'''
 main() {
   var v = 1;
   ++v;
 }
-''', [HintCode.UNUSED_LOCAL_VARIABLE]);
+''', [
+      error(HintCode.UNUSED_LOCAL_VARIABLE, 15, 1),
+    ]);
   }
 
   test_isRead_usedArgument() async {
diff --git a/pkg/analyzer/test/src/diagnostics/unused_shown_name_test.dart b/pkg/analyzer/test/src/diagnostics/unused_shown_name_test.dart
index fd823b1..99b749b 100644
--- a/pkg/analyzer/test/src/diagnostics/unused_shown_name_test.dart
+++ b/pkg/analyzer/test/src/diagnostics/unused_shown_name_test.dart
@@ -20,10 +20,12 @@
 class A {}
 class B {}
 ''');
-    assertErrorCodesInCode(r'''
+    assertErrorsInCode(r'''
 import 'lib1.dart' show A, B;
 A a;
-''', [HintCode.UNUSED_SHOWN_NAME]);
+''', [
+      error(HintCode.UNUSED_SHOWN_NAME, 27, 1),
+    ]);
   }
 
   test_unusedShownName_as() async {
@@ -31,10 +33,12 @@
 class A {}
 class B {}
 ''');
-    assertErrorCodesInCode(r'''
+    assertErrorsInCode(r'''
 import 'lib1.dart' as p show A, B;
 p.A a;
-''', [HintCode.UNUSED_SHOWN_NAME]);
+''', [
+      error(HintCode.UNUSED_SHOWN_NAME, 32, 1),
+    ]);
   }
 
   test_unusedShownName_duplicates() async {
@@ -44,12 +48,15 @@
 class C {}
 class D {}
 ''');
-    assertErrorCodesInCode(r'''
+    assertErrorsInCode(r'''
 import 'lib1.dart' show A, B;
 import 'lib1.dart' show C, D;
 A a;
 C c;
-''', [HintCode.UNUSED_SHOWN_NAME, HintCode.UNUSED_SHOWN_NAME]);
+''', [
+      error(HintCode.UNUSED_SHOWN_NAME, 27, 1),
+      error(HintCode.UNUSED_SHOWN_NAME, 57, 1),
+    ]);
   }
 
   test_unusedShownName_topLevelVariable() async {
@@ -59,12 +66,14 @@
 const int var3 = 3;
 const int var4 = 4;
 ''');
-    assertErrorCodesInCode(r'''
+    assertErrorsInCode(r'''
 import 'lib1.dart' show var1, var2;
 import 'lib1.dart' show var3, var4;
 int a = var1;
 int b = var2;
 int c = var3;
-''', [HintCode.UNUSED_SHOWN_NAME]);
+''', [
+      error(HintCode.UNUSED_SHOWN_NAME, 66, 4),
+    ]);
   }
 }
diff --git a/pkg/analyzer/test/src/fasta/message_coverage_test.dart b/pkg/analyzer/test/src/fasta/message_coverage_test.dart
index f40c351..291f940 100644
--- a/pkg/analyzer/test/src/fasta/message_coverage_test.dart
+++ b/pkg/analyzer/test/src/fasta/message_coverage_test.dart
@@ -38,7 +38,7 @@
   }
 
   /**
-   * Given the path to the file 'message.yaml', return a list of the top-level
+   * Given the path to the file 'messages.yaml', return a list of the top-level
    * keys defined in that file that define an 'analyzerCode'.
    */
   List<String> getMappedCodes(String messagesPath) {
@@ -61,7 +61,7 @@
   }
 
   /**
-   * Given the path to the file 'message.yaml', return a list of the analyzer
+   * Given the path to the file 'messages.yaml', return a list of the analyzer
    * codes defined in that file.
    */
   List<String> getReferencedCodes(String messagesPath) {
diff --git a/pkg/analyzer/test/src/fasta/recovery/partial_code/extension_declaration_test.dart b/pkg/analyzer/test/src/fasta/recovery/partial_code/extension_declaration_test.dart
new file mode 100644
index 0000000..e04eadd
--- /dev/null
+++ b/pkg/analyzer/test/src/fasta/recovery/partial_code/extension_declaration_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.
+
+import 'package:analyzer/dart/analysis/features.dart';
+import 'package:analyzer/src/dart/error/syntactic_errors.dart';
+
+import 'partial_code_support.dart';
+
+main() {
+  new ExtensionDeclarationTest().buildAll();
+}
+
+class ExtensionDeclarationTest extends PartialCodeTest {
+  buildAll() {
+    buildTests(
+        'extension_declaration',
+        [
+          new TestDescriptor(
+              'keyword',
+              'extension',
+              [
+                ParserErrorCode.MISSING_IDENTIFIER,
+                ParserErrorCode.EXPECTED_TOKEN,
+                ParserErrorCode.EXPECTED_TYPE_NAME,
+                ParserErrorCode.EXPECTED_BODY,
+              ],
+              'extension _s_ on _s_ {}',
+              failing: ['getter', 'functionNonVoid', 'functionVoid', 'mixin']),
+          new TestDescriptor(
+              'named',
+              'extension E',
+              [
+                ParserErrorCode.EXPECTED_TOKEN,
+                ParserErrorCode.EXPECTED_TYPE_NAME,
+                ParserErrorCode.EXPECTED_BODY,
+              ],
+              'extension E on _s_ {}',
+              failing: ['getter', 'functionNonVoid', 'functionVoid', 'mixin']),
+          new TestDescriptor(
+              'on',
+              'extension E on',
+              [
+                ParserErrorCode.EXPECTED_TYPE_NAME,
+                ParserErrorCode.EXPECTED_BODY,
+              ],
+              'extension E on _s_ {}',
+              failing: ['getter', 'functionNonVoid', 'functionVoid', 'mixin']),
+          new TestDescriptor(
+              'extendedType',
+              'extension E on String',
+              [
+                ParserErrorCode.EXPECTED_BODY,
+              ],
+              'extension E on String {}'),
+          // Most of the failing tests are because the following text could be
+          // a member of the class, so the parser adds the closing brace _after_
+          // the declaration that's expected to follow it.
+          //
+          // The notable exceptions are 'class', 'enum', 'mixin', and 'typedef'.
+          new TestDescriptor(
+              'partialBody',
+              'extension E on String {',
+              [
+                ScannerErrorCode.EXPECTED_TOKEN,
+              ],
+              'extension E on String {}',
+              failing: [
+                'class',
+                'const',
+                'enum',
+                'final',
+                'functionNonVoid',
+                'functionVoid',
+                'mixin',
+                'getter',
+                'setter',
+                'typedef',
+                'var'
+              ]),
+        ],
+        PartialCodeTest.declarationSuffixes,
+        featureSet: new FeatureSet.forTesting(
+            sdkVersion: '2.3.0',
+            additionalFeatures: [Feature.extension_methods]));
+  }
+}
diff --git a/pkg/analyzer/test/src/fasta/recovery/partial_code/partial_code_support.dart b/pkg/analyzer/test/src/fasta/recovery/partial_code/partial_code_support.dart
index 8634b8f..45263e5 100644
--- a/pkg/analyzer/test/src/fasta/recovery/partial_code/partial_code_support.dart
+++ b/pkg/analyzer/test/src/fasta/recovery/partial_code/partial_code_support.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/analysis/features.dart';
 import 'package:analyzer/dart/ast/ast.dart';
 import 'package:analyzer/error/error.dart';
 import 'package:analyzer/src/dart/error/syntactic_errors.dart';
@@ -47,6 +48,7 @@
   static final List<TestSuffix> declarationSuffixes = <TestSuffix>[
     new TestSuffix('class', 'class A {}'),
     new TestSuffix('enum', 'enum E { v }'),
+//    new TestSuffix('extension', 'extension E on A {}'),
     new TestSuffix('mixin', 'mixin M {}'),
     new TestSuffix('typedef', 'typedef A = B Function(C, D);'),
     new TestSuffix('functionVoid', 'void f() {}'),
@@ -107,16 +109,21 @@
    */
   buildTests(String groupName, List<TestDescriptor> descriptors,
       List<TestSuffix> suffixes,
-      {String head, bool includeEof: true, String tail}) {
+      {FeatureSet featureSet,
+      String head,
+      bool includeEof: true,
+      String tail}) {
     group(groupName, () {
       for (TestDescriptor descriptor in descriptors) {
         if (includeEof) {
           _buildTestForDescriptorAndSuffix(
-              descriptor, TestSuffix.eof, 0, head, tail);
+              descriptor, TestSuffix.eof, 0, head, tail,
+              featureSet: featureSet);
         }
         for (int i = 0; i < suffixes.length; i++) {
           _buildTestForDescriptorAndSuffix(
-              descriptor, suffixes[i], i + 1, head, tail);
+              descriptor, suffixes[i], i + 1, head, tail,
+              featureSet: featureSet);
         }
         if (descriptor.failing != null) {
           test('${descriptor.name}_failingList', () {
@@ -138,7 +145,8 @@
    * Build a single test based on the given [descriptor] and [suffix].
    */
   _buildTestForDescriptorAndSuffix(TestDescriptor descriptor, TestSuffix suffix,
-      int suffixIndex, String head, String tail) {
+      int suffixIndex, String head, String tail,
+      {FeatureSet featureSet}) {
     test('${descriptor.name}_${suffix.name}', () {
       //
       // Compose the invalid and valid pieces of code.
@@ -172,7 +180,7 @@
       //
       GatheringErrorListener listener =
           new GatheringErrorListener(checkRanges: true);
-      parseCompilationUnit2(base.toString(), listener);
+      parseCompilationUnit2(base.toString(), listener, featureSet: featureSet);
       var baseErrorCodes = <ErrorCode>[];
       listener.errors.forEach((AnalysisError error) {
         if (error.errorCode == ParserErrorCode.BREAK_OUTSIDE_OF_LOOP ||
@@ -218,7 +226,8 @@
             invalid.toString(), expectedInvalidCodeErrors, valid.toString(),
             adjustValidUnitBeforeComparison:
                 descriptor.adjustValidUnitBeforeComparison,
-            expectedErrorsInValidCode: expectedValidCodeErrors);
+            expectedErrorsInValidCode: expectedValidCodeErrors,
+            featureSet: featureSet);
       }
     });
   }
diff --git a/pkg/analyzer/test/src/fasta/recovery/partial_code/test_all.dart b/pkg/analyzer/test/src/fasta/recovery/partial_code/test_all.dart
index 768c05b..0b20072 100644
--- a/pkg/analyzer/test/src/fasta/recovery/partial_code/test_all.dart
+++ b/pkg/analyzer/test/src/fasta/recovery/partial_code/test_all.dart
@@ -13,6 +13,7 @@
 import 'do_statement_test.dart' as do_statement;
 import 'enum_declaration_test.dart' as enum_declaration;
 import 'export_directive_test.dart' as export_directive;
+import 'extension_declaration_test.dart' as extension_declaration;
 import 'field_declaration_test.dart' as field_declaration;
 import 'forEach_statement_test.dart' as forEach_statement;
 import 'for_statement_test.dart' as for_statement;
@@ -46,6 +47,7 @@
     do_statement.main();
     enum_declaration.main();
     export_directive.main();
+    extension_declaration.main();
     field_declaration.main();
     for_statement.main();
     forEach_statement.main();
diff --git a/pkg/analyzer/test/src/summary/resynthesize_ast2_test.dart b/pkg/analyzer/test/src/summary/resynthesize_ast2_test.dart
index 800bdd1..ec7bbef 100644
--- a/pkg/analyzer/test/src/summary/resynthesize_ast2_test.dart
+++ b/pkg/analyzer/test/src/summary/resynthesize_ast2_test.dart
@@ -11,6 +11,7 @@
 import 'package:analyzer/src/generated/source.dart';
 import 'package:analyzer/src/summary/idl.dart';
 import 'package:analyzer/src/summary/summary_sdk.dart';
+import 'package:analyzer/src/summary2/informative_data.dart';
 import 'package:analyzer/src/summary2/link.dart';
 import 'package:analyzer/src/summary2/linked_bundle_context.dart';
 import 'package:analyzer/src/summary2/linked_element_factory.dart';
@@ -103,6 +104,23 @@
       LinkedBundleContext(elementFactory, linkResult.bundle),
     );
 
+    // Set informative data.
+    for (var inputLibrary in inputLibraries) {
+      var libraryUriStr = '${inputLibrary.source.uri}';
+      for (var inputUnit in inputLibrary.units) {
+        var unitSource = inputUnit.source;
+        if (unitSource != null) {
+          var unitUriStr = '${unitSource.uri}';
+          var informativeData = createInformativeData(inputUnit.unit);
+          elementFactory.setInformativeData(
+            libraryUriStr,
+            unitUriStr,
+            informativeData,
+          );
+        }
+      }
+    }
+
     if (analysisContext.typeProvider == null) {
       var dartCore = elementFactory.libraryOfUri('dart:core');
       var dartAsync = elementFactory.libraryOfUri('dart:async');
diff --git a/pkg/analyzer/test/verify_docs_test.dart b/pkg/analyzer/test/verify_docs_test.dart
index 90fbc51..22c3858 100644
--- a/pkg/analyzer/test/verify_docs_test.dart
+++ b/pkg/analyzer/test/verify_docs_test.dart
@@ -136,6 +136,14 @@
           writeError(error, importsLength);
         }
       }
+    } catch (exception, stackTrace) {
+      if (output.isNotEmpty) {
+        output.writeln();
+      }
+      output.writeln('Exception while analyzing "$snippet"');
+      output.writeln();
+      output.writeln(exception);
+      output.writeln(stackTrace);
     } finally {
       provider.removeOverlay(snippetPath);
     }
diff --git a/pkg/analyzer/tool/diagnostics/diagnostics.md b/pkg/analyzer/tool/diagnostics/diagnostics.md
new file mode 100644
index 0000000..b3fc35b
--- /dev/null
+++ b/pkg/analyzer/tool/diagnostics/diagnostics.md
@@ -0,0 +1,415 @@
+---
+title: Diagnostics
+description: Details for diagnostics produced by the Dart analyzer.
+---
+
+This page lists diagnostic messages produced by the Dart analyzer,
+with details about what those messages mean and how you can fix your code.
+For more information about the analyzer, see
+[Customizing static analysis](/guides/language/analysis-options).
+
+## Glossary
+
+This page uses the following terms.
+
+### Potentially non-nullable
+
+A type is _potentially non-nullable_ if it's either explicitly non-nullable or
+if it's a type parameter. The latter case is included because the actual runtime
+type might be non-nullable.
+
+## Diagnostics
+
+The analyzer produces the following diagnostics for code that
+doesn't conform to the language specification or
+that might work in unexpected ways.
+
+### ambiguous\_set\_or\_map\_literal\_both
+
+_This literal contains both 'Map' and 'Iterable' spreads, which makes it
+impossible to determine whether the literal is a map or a set._
+
+#### Description
+
+Because map and set literals use the same delimiters (`{` and `}`), the
+analyzer looks at the type arguments and the elements to determine which
+kind of literal you meant. When there are no type arguments and all of the
+elements are spread elements (which are allowed in both kinds of literals),
+then the analyzer uses the types of the expressions that are being spread.
+If all of the expressions have the type `Iterable`, then it's a set
+literal; if they all have the type `Map`, then it's a map literal.
+
+The analyzer produces this diagnostic when some of the expressions being
+spread have the type `Iterable` and others have the type `Map`, making it
+impossible for the analyzer to determine whether you are writing a map
+literal or a set literal.
+
+#### Example
+
+The following code produces this diagnostic:
+
+```dart
+union(Map<String, String> a, List<String> b, Map<String, String> c) =>
+    {...a, ...b, ...c};
+```
+
+The list `b` can only be spread into a set, and the maps `a` and `c` can
+only be spread into a map, and the literal can't be both.
+
+#### Common fixes
+
+There are two common ways to fix this problem. The first is to remove all
+of the spread elements of one kind or the other, so that the elements are
+consistent. In this case, that likely means removing the list (and
+deciding what to do about the now unused parameter):
+
+```dart
+union(Map<String, String> a, List<String> b, Map<String, String> c) =>
+    {...a, ...c};
+```
+
+The second fix is to change the elements of one kind into elements that are
+consistent with the other elements. For example, you could add the elements
+of the list as keys that map to themselves:
+
+```dart
+union(Map<String, String> a, List<String> b, Map<String, String> c) =>
+    {...a, for (String s in b) s: s, ...c};
+```
+
+### ambiguous\_set\_or\_map\_literal\_either
+
+_This literal must be either a map or a set, but the elements don't have enough
+type information for type inference to work._
+
+#### Description
+
+Because map and set literals use the same delimiters (`‘{` and `}`), the
+analyzer looks at the type arguments and the elements to determine which
+kind of literal you meant. When there are no type arguments and all of the
+elements are spread elements (which are allowed in both kinds of literals)
+then the analyzer uses the types of the expressions that are being spread
+to decide. If all of the expressions have the type `Iterable`, then it's a
+set literal, if they all have the type `Map`, then it's a map literal.
+
+This diagnostic is produced when none of the expressions being spread has a
+type that allows the analyzer to decide whether you were writing a map
+literal or a set literal.
+
+#### Example
+
+The following code produces this diagnostic:
+
+```dart
+union(a, b) => !{...a, ...b}!;
+```
+
+The problem occurs because there are no type arguments, and there is no
+information about the type of either `a` or `b`.
+
+#### Common fixes
+
+There are three common ways to fix this problem. The first is to add type
+arguments to the literal. For example, if the literal is intended to be a
+map literal, you might write something like this:
+
+```dart
+union(a, b) => <String, String>{...a, ...b};
+```
+
+The second fix is to add type information so that the expressions have
+either the type `Iterable` or the type `Map`. You could add an explicit
+cast or, in this case, add types to the declarations of the two parameters:
+
+```dart
+union(List<int> a, List<int> b) => {...a, ...b};
+```
+
+The third fix is to add context information. In this case, that means
+adding a return type to the function:
+
+```dart
+Set<String> union(a, b) => {...a, ...b};
+```
+
+In other cases, you might add a type somewhere else. For example, say the
+original code looks like this:
+
+```dart
+union(a, b) {
+  var x = {...a, ...b};
+  return x;
+}
+```
+
+You might add a type annotation on `x`, like this:
+
+```dart
+union(a, b) {
+  Map<String, String> x = {...a, ...b};
+  return x;
+}
+```
+
+### default\_value\_on\_required\_parameter
+
+_Required named parameters can't have a default value._
+
+#### Description
+
+The analyzer produces this diagnostic when a named parameter has both the
+`required` modifier and a default value. If the parameter is required, then
+a value for the parameter is always provided at the call sites, so the
+default value can never be used.
+
+#### Example
+
+The following code generates this diagnostic:
+
+```dart
+void log({required String !message! = 'no message'}) {}
+```
+
+#### Common fixes
+
+If the parameter is really required, then remove the default value:
+
+```dart
+void log({required String message}) {}
+```
+
+If the parameter isn't always required, then remove the `required`
+modifier:
+
+```dart
+void log({String message = 'no message'}) {}
+```
+
+### deprecated\_member\_use
+
+_'{0}' is deprecated and shouldn't be used._
+
+#### Description
+
+The analyzer produces this diagnostic when a deprecated library or class
+member is used in a different package.
+
+#### Example
+
+If the method `m` in the class `C` is annotated with `@deprecated`, then
+the following code produces this diagnostic:
+
+```dart
+void f(C c) {
+  c.!m!();
+}
+```
+
+#### Common fixes
+
+The documentation for declarations that are annotated with `@deprecated`
+should have documentation to indicate what code to use in place of the
+deprecated code.
+
+### expression\_in\_map
+
+_Expressions can't be used in a map literal._
+
+#### Description
+
+The analyzer produces this diagnostic when the analyzer finds an
+expression, rather than a map entry, in what appears to be a map literal.
+
+#### Example
+
+The following code generates this diagnostic:
+
+```dart
+var map = <String, int>{'a': 0, 'b': 1, !'c'!};
+```
+
+#### Common fixes
+
+If the expression is intended to compute either a key or a value in an
+entry, fix the issue by completing the code:
+
+```dart
+var map = <String, int>{'a': 0, 'b': 1, 'c': 2};
+```
+
+### invalid\_literal\_annotation
+
+_Only const constructors can have the `@literal` annotation._
+
+#### Description
+
+The meaning of the `@literal` annotation is only defined when it's applied
+to a const constructor.
+
+#### Example
+
+The following code produces this diagnostic:
+
+```dart
+!@literal!
+var x;
+```
+
+#### Common fixes
+
+Remove the annotation:
+
+```dart
+var x;
+```
+
+### missing\_default\_value\_for\_parameter
+
+_The parameter '{0}' can't have a value of 'null' because of its type, so it
+must either be a required parameter or have a default value._
+
+#### Description
+
+The analyzer produces this diagnostic when an optional parameter doesn't
+have a default value, but has a
+<a href=”#potentially-non-nullable”>potentially non-nullable</a> type.
+Optional parameters that have no explicit default value have an implicit
+default value of `null`. If the type of the parameter doesn't allow the
+parameter to have a value of null, then the implicit default value is not
+valid.
+
+#### Example
+
+The following code generates this diagnostic:
+
+```dart
+void log({String !message!}) {}
+```
+
+#### Common fixes
+
+If the parameter can have the value `null`, then add a question mark after
+the type annotation:
+
+```dart
+void log({String? message}) {}
+```
+
+If the parameter can't be null, then either provide a default value:
+
+```dart
+void log({String message = ''}) {}
+```
+
+or add the `required` modifier to the parameter:
+
+```dart
+void log({required String message}) {}
+```
+
+### not\_iterable\_spread
+
+_Spread elements in list or set literals must implement 'Iterable'._
+
+#### Description
+
+The analyzer produces this diagnostic when the static type of the
+expression of a spread element that appears in either a list literal or a
+set literal doesn't implement the type `Iterable`.
+
+#### Example
+
+The following code generates this diagnostic:
+
+```dart
+var m = <String, int>{'a': 0, 'b': 1};
+var s = <String>{...m};
+```
+
+#### Common fixes
+
+The most common fix is to replace the expression with one that produces an
+iterable object:
+
+```dart
+var m = <String, int>{'a': 0, 'b': 1};
+var s = <String>{...m.keys};
+```
+
+### nullable\_type\_in\_extends\_clause
+
+_A class can't extend a nullable type._
+
+#### Description
+
+The analyzer produces this diagnostic when a class declaration uses an
+extends clause to specify a superclass, and the type that's specified is a
+nullable type.
+
+The reason the supertype is a _type_ rather than a class name is to allow
+you to control the signatures of the members to be inherited from the
+supertype, such as by specifying type arguments. However, the nullability
+of a type doesn't change the signatures of any members, so there isn't any
+reason to allow the nullability to be specified when used in the extends
+clause.
+
+#### Example
+
+The following code generates this diagnostic:
+
+```dart
+class Invalid extends !Duration?! {}
+```
+
+#### Common fixes
+
+The most common fix is to remove the question mark:
+
+```dart
+class Invalid extends Duration {}
+```
+
+### sdk\_version\_set\_literal
+
+_Set literals weren't supported until version 2.2, but this code must be able to
+run on earlier versions._
+
+#### Description
+
+The analyzer produces this diagnostic when a set literal is found in code
+that has an SDK constraint whose lower bound is less than 2.2. Set literals
+were not supported in earlier versions, so this code won't be able to run
+against earlier versions of the SDK.
+
+#### Example
+
+In a package that defines SDK constraints in the `pubspec.yaml` file that
+have a lower bound that's less than 2.2:
+
+```yaml
+environment:
+  sdk: '>=2.1.0 <2.4.0'
+```
+
+The following code generates this diagnostic:
+
+```dart
+var s = !<int>{}!;
+```
+
+#### Common fixes
+
+If you don't need to support older versions of the SDK, then you can
+increase the SDK constraint to allow the syntax to be used:
+
+```yaml
+environment:
+  sdk: '>=2.2.0 <2.4.0'
+```
+
+If you do need to support older versions of the SDK, then replace the set
+literal with code that creates the set without the use of a literal:
+
+```dart
+var s = new Set<int>();
+```
diff --git a/pkg/analyzer/tool/diagnostics/generate.dart b/pkg/analyzer/tool/diagnostics/generate.dart
new file mode 100644
index 0000000..17350b5
--- /dev/null
+++ b/pkg/analyzer/tool/diagnostics/generate.dart
@@ -0,0 +1,216 @@
+// 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/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/dart/ast/token.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/src/context.dart';
+
+/// Generate the file `diagnostics.md` based on the documentation associated
+/// with the declarations of the error codes.
+void main() async {
+  Context pathContext = PhysicalResourceProvider.INSTANCE.pathContext;
+  String packageRoot = pathContext.normalize(package_root.packageRoot);
+  String analyzerPath = pathContext.join(packageRoot, 'analyzer');
+  List<String> docPaths = [
+    pathContext.join(
+        analyzerPath, 'lib', 'src', 'dart', 'error', 'hint_codes.dart'),
+    pathContext.join(analyzerPath, 'lib', 'src', 'error', 'codes.dart'),
+  ];
+  String outputPath =
+      pathContext.join(analyzerPath, 'tool', 'diagnostics', 'diagnostics.md');
+
+  DocumentationGenerator generator = DocumentationGenerator(docPaths);
+  generator.writeDocumentation(outputPath);
+}
+
+/// A class used to generate diagnostic documentation.
+class DocumentationGenerator {
+  /// The absolute paths of the files containing the declarations of the error
+  /// codes.
+  final List<String> docPaths;
+
+  /// A map from the name of a diagnostic code to the lines of the documentation
+  /// for that code.
+  Map<String, List<String>> docsByCode = {};
+
+  /// Initialize a newly created documentation generator.
+  DocumentationGenerator(this.docPaths) {
+    _extractAllDocs();
+  }
+
+  /// Write the documentation to the file at the given [outputPath].
+  void writeDocumentation(String outputPath) async {
+    IOSink sink = File(outputPath).openWrite();
+    _writeHeader(sink);
+    _writeGlossary(sink);
+    _writeDiagnostics(sink);
+    await sink.flush();
+    await sink.close();
+  }
+
+  /// Return a version of the [text] in which characters that have special
+  /// meaning in markdown have been escaped.
+  String _escape(String text) {
+    return text.replaceAll('_', '\\_');
+  }
+
+  /// Extract documentation from all of the files containing the definitions of
+  /// diagnostics.
+  void _extractAllDocs() {
+    AnalysisContextCollection collection = new AnalysisContextCollection(
+        includedPaths: docPaths,
+        resourceProvider: PhysicalResourceProvider.INSTANCE);
+    for (String docPath in docPaths) {
+      _extractDocs(_parse(collection, docPath));
+    }
+  }
+
+  /// Extract documentation from the given [field] declaration.
+  List<String> _extractDoc(FieldDeclaration field) {
+    Token comments = field.firstTokenAfterCommentAndMetadata.precedingComments;
+    if (comments == null) {
+      return null;
+    }
+    List<String> docs = [];
+    while (comments != null) {
+      String lexeme = comments.lexeme;
+      if (lexeme.startsWith('// TODO')) {
+        break;
+      } else if (lexeme.startsWith('// ')) {
+        docs.add(lexeme.substring(3));
+      } else if (lexeme == '//') {
+        docs.add('');
+      }
+      comments = comments.next;
+    }
+    if (docs.isEmpty) {
+      return null;
+    }
+    return docs;
+  }
+
+  /// Extract documentation from the file that was parsed to produce the given
+  /// [result].
+  void _extractDocs(ParsedUnitResult result) {
+    CompilationUnit unit = result.unit;
+    for (CompilationUnitMember declaration in unit.declarations) {
+      if (declaration is ClassDeclaration) {
+        for (ClassMember member in declaration.members) {
+          if (member is FieldDeclaration) {
+            List<String> docs = _extractDoc(member);
+            if (docs != null) {
+              VariableDeclaration variable = member.fields.variables[0];
+              String variableName = variable.name.name;
+              if (docsByCode.containsKey(variableName)) {
+                throw StateError('Duplicate diagnostic code');
+              }
+              String message =
+                  ((variable.initializer as InstanceCreationExpression)
+                          .argumentList
+                          .arguments[1] as StringLiteral)
+                      .stringValue;
+              docs = [
+                '### ${_escape(variableName.toLowerCase())}',
+                '',
+                ..._split('_${_escape(message)}_'),
+                '',
+                ...docs,
+              ];
+              docsByCode[variableName] = docs;
+            }
+          }
+        }
+      }
+    }
+  }
+
+  /// Use the analysis context [collection] to parse the file at the given
+  /// [path] and return the result.
+  ParsedUnitResult _parse(AnalysisContextCollection collection, String path) {
+    AnalysisSession session = collection.contextFor(path).currentSession;
+    if (session == null) {
+      throw new StateError('No session for "$path"');
+    }
+    ParsedUnitResult result = session.getParsedUnit(path);
+    if (result.state != ResultState.VALID) {
+      throw new StateError('Unable to parse "$path"');
+    }
+    return result;
+  }
+
+  /// Split the [message] into multiple lines, each of which is less than 80
+  /// characters long.
+  List<String> _split(String message) {
+    // This uses a brute force approach because we don't expect to have messages
+    // that need to be split more than once.
+    int length = message.length;
+    if (length <= 80) {
+      return [message];
+    }
+    int endIndex = message.lastIndexOf(' ', 80);
+    if (endIndex < 0) {
+      return [message];
+    }
+    return [message.substring(0, endIndex), message.substring(endIndex + 1)];
+  }
+
+  /// Write the documentation for all of the diagnostics.
+  void _writeDiagnostics(IOSink sink) {
+    sink.write('''
+
+## Diagnostics
+
+The analyzer produces the following diagnostics for code that
+doesn't conform to the language specification or
+that might work in unexpected ways.
+''');
+    List<String> errorCodes = docsByCode.keys.toList();
+    errorCodes.sort();
+    for (String errorCode in errorCodes) {
+      List<String> docs = docsByCode[errorCode];
+      sink.writeln();
+      for (String line in docs) {
+        sink.writeln(line);
+      }
+    }
+  }
+
+  /// Write the glossary.
+  void _writeGlossary(IOSink sink) {
+    sink.write('''
+
+## Glossary
+
+This page uses the following terms.
+
+### Potentially non-nullable
+
+A type is _potentially non-nullable_ if it's either explicitly non-nullable or
+if it's a type parameter. The latter case is included because the actual runtime
+type might be non-nullable.
+''');
+  }
+
+  /// Write the header of the file.
+  void _writeHeader(IOSink sink) {
+    sink.write('''
+---
+title: Diagnostics
+description: Details for diagnostics produced by the Dart analyzer.
+---
+
+This page lists diagnostic messages produced by the Dart analyzer,
+with details about what those messages mean and how you can fix your code.
+For more information about the analyzer, see
+[Customizing static analysis](/guides/language/analysis-options).
+''');
+  }
+}
diff --git a/pkg/analyzer/tool/experiments/experiments_test.dart b/pkg/analyzer/tool/experiments/experiments_test.dart
new file mode 100644
index 0000000..167c033
--- /dev/null
+++ b/pkg/analyzer/tool/experiments/experiments_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.
+
+import "dart:io" show Platform;
+
+import 'package:analysis_tool/tools.dart';
+import 'package:path/path.dart';
+
+import 'generate.dart';
+
+/**
+ * Check that all targets have been code generated.  If they haven't tell the
+ * user to run generate_all.dart.
+ */
+main() async {
+  String script = Platform.script.toFilePath(windows: Platform.isWindows);
+  List<String> components = split(script);
+  int index = components.indexOf('analyzer');
+  String pkgPath = joinAll(components.sublist(0, index + 1));
+  await GeneratedContent.checkAll(pkgPath,
+      join(pkgPath, 'tool', 'experiments', 'generate.dart'), allTargets);
+}
diff --git a/pkg/analyzer/tool/experiments/generate.dart b/pkg/analyzer/tool/experiments/generate.dart
new file mode 100644
index 0000000..d74f223
--- /dev/null
+++ b/pkg/analyzer/tool/experiments/generate.dart
@@ -0,0 +1,271 @@
+/**
+ * This file contains code to generate experimental flags
+ * based on the information in tools/experimental_features.yaml.
+ */
+import 'dart:io';
+
+import 'package:analysis_tool/tools.dart';
+import 'package:front_end/src/fasta/scanner/characters.dart' show $MINUS, $_;
+import 'package:front_end/src/testing/package_root.dart' as pkgRoot;
+import 'package:path/path.dart';
+import 'package:yaml/yaml.dart' show YamlMap, loadYaml;
+
+main() async {
+  await GeneratedContent.generateAll(
+      normalize(join(pkgRoot.packageRoot, 'analyzer')), allTargets);
+}
+
+List<GeneratedContent> get allTargets {
+  Map<dynamic, dynamic> experimentsYaml = loadYaml(new File(join(
+          normalize(join(pkgRoot.packageRoot, '../tools')),
+          'experimental_features.yaml'))
+      .readAsStringSync());
+
+  return <GeneratedContent>[
+    new GeneratedFile('lib/src/dart/analysis/experiments.g.dart',
+        (String pkgPath) async {
+      var generator = new _ExperimentsGenerator(experimentsYaml);
+      generator.generateFormatCode();
+      return generator.out.toString();
+    }),
+  ];
+}
+
+String keyToIdentifier(String key) {
+  var identifier = StringBuffer();
+  for (int index = 0; index < key.length; ++index) {
+    var code = key.codeUnitAt(index);
+    if (code == $MINUS) {
+      code = $_;
+    }
+    identifier.writeCharCode(code);
+  }
+  return identifier.toString();
+}
+
+class _ExperimentsGenerator {
+  final Map experimentsYaml;
+
+  List<String> keysSorted;
+
+  final out = new StringBuffer('''
+//
+// THIS FILE IS GENERATED. DO NOT EDIT.
+//
+// Instead modify 'tools/experimental_features.yaml' and run
+// 'dart pkg/analyzer/tool/experiments/generate.dart' to update.
+
+part of 'experiments.dart';
+''');
+
+  _ExperimentsGenerator(this.experimentsYaml);
+
+  void generateFormatCode() {
+    keysSorted = experimentsYaml.keys.cast<String>().toList()..sort();
+    generateSection_KnownFeatures();
+    generateSection_BuildExperimentalFlagsArray();
+    generateSection_EnableString();
+    generateSection_ExperimentalFeature();
+    generateSection_IsEnabledByDefault();
+    generateSection_IsExpired();
+    generateSection_CurrentState();
+  }
+
+  void generateSection_BuildExperimentalFlagsArray() {
+    out.write('''
+
+List<bool> _buildExperimentalFlagsArray() => <bool>[
+''');
+    for (var key in keysSorted) {
+      var id = keyToIdentifier(key);
+      var entry = experimentsYaml[key] as YamlMap;
+      bool shipped = entry['enabledIn'] != null;
+      bool expired = entry['expired'];
+      if (shipped || expired == true) {
+        out.writeln('true, // $key');
+      } else {
+        out.writeln('IsEnabledByDefault.$id,');
+      }
+    }
+    // TODO(danrubel): Remove bogus entries
+    out.write('''
+      false, // bogus-disabled
+      true, // bogus-enabled
+    ];
+''');
+  }
+
+  void generateSection_CurrentState() {
+    // TODO(danrubel): Remove bogus entries
+    out.write('''
+
+mixin _CurrentState {
+  /// Current state for the flag "bogus-disabled"
+  bool get bogus_disabled => isEnabled(ExperimentalFeatures.bogus_disabled);
+
+  /// Current state for the flag "bogus-enabled"
+  bool get bogus_enabled => isEnabled(ExperimentalFeatures.bogus_enabled);
+''');
+    for (var key in keysSorted) {
+      var id = keyToIdentifier(key);
+      out.write('''
+  /// Current state for the flag "$key"
+  bool get $id => isEnabled(ExperimentalFeatures.$id);
+    ''');
+    }
+    out.write('''
+
+  bool isEnabled(covariant ExperimentalFeature feature);
+}''');
+  }
+
+  void generateSection_EnableString() {
+    out.write('''
+
+/// Constant strings for enabling each of the currently known experimental
+/// flags.
+class EnableString {
+''');
+    for (var key in keysSorted) {
+      out.write('''
+      /// String to enable the experiment "$key"
+      static const String ${keyToIdentifier(key)} = '$key';
+    ''');
+    }
+    // TODO(danrubel): Remove bogus entries
+    out.write('''
+
+      /// String to enable the experiment "bogus-disabled"
+      static const String bogus_disabled = 'bogus-disabled';
+
+      /// String to enable the experiment "bogus-enabled"
+      static const String bogus_enabled = 'bogus-enabled';
+    }''');
+  }
+
+  void generateSection_ExperimentalFeature() {
+    out.write('''
+
+class ExperimentalFeatures {
+''');
+    int index = 0;
+    for (var key in keysSorted) {
+      var id = keyToIdentifier(key);
+      var help = (experimentsYaml[key] as YamlMap)['help'] ?? '';
+      var enabledIn = (experimentsYaml[key] as YamlMap)['enabledIn'];
+      out.write('''
+
+      static const $id = const ExperimentalFeature(
+      $index,
+      EnableString.$id,
+      IsEnabledByDefault.$id,
+      IsExpired.$id,
+      '$help'
+    ''');
+      if (enabledIn != null) {
+        if (enabledIn is double) {
+          enabledIn = '$enabledIn.0';
+        }
+        out.write(",firstSupportedVersion: '$enabledIn'");
+      }
+      out.writeln(');');
+      ++index;
+    }
+    // TODO(danrubel): Remove bogus entries
+    out.write('''
+
+      static const bogus_disabled = const ExperimentalFeature(
+        $index,
+        EnableString.bogus_disabled,
+        IsEnabledByDefault.bogus_disabled,
+        IsExpired.bogus_disabled,
+        null);
+
+      static const bogus_enabled = const ExperimentalFeature(
+        ${index + 1},
+        EnableString.bogus_enabled,
+        IsEnabledByDefault.bogus_enabled,
+        IsExpired.bogus_enabled,
+        null,
+        firstSupportedVersion: '1.0.0');
+    }''');
+  }
+
+  void generateSection_IsEnabledByDefault() {
+    out.write('''
+
+/// Constant bools indicating whether each experimental flag is currently
+/// enabled by default.
+class IsEnabledByDefault {
+''');
+    for (var key in keysSorted) {
+      var entry = experimentsYaml[key] as YamlMap;
+      bool shipped = entry['enabledIn'] != null;
+      out.write('''
+      /// Default state of the experiment "$key"
+      static const bool ${keyToIdentifier(key)} = $shipped;
+    ''');
+    }
+    // TODO(danrubel): Remove bogus entries
+    out.write('''
+
+      /// Default state of the experiment "bogus-disabled"
+      static const bool bogus_disabled = false;
+
+      /// Default state of the experiment "bogus-enabled"
+      static const bool bogus_enabled = true;
+    }''');
+  }
+
+  void generateSection_IsExpired() {
+    out.write('''
+
+/// Constant bools indicating whether each experimental flag is currently
+/// expired (meaning its enable/disable status can no longer be altered from the
+/// value in [IsEnabledByDefault]).
+class IsExpired {
+''');
+    for (var key in keysSorted) {
+      var entry = experimentsYaml[key] as YamlMap;
+      bool shipped = entry['enabledIn'] != null;
+      bool expired = entry['expired'];
+      out.write('''
+      /// Expiration status of the experiment "$key"
+      static const bool ${keyToIdentifier(key)} = ${expired == true};
+    ''');
+      if (shipped && expired == false) {
+        throw 'Cannot mark shipped feature as "expired: false"';
+      }
+    }
+    // TODO(danrubel): Remove bogus entries
+    out.write('''
+
+      /// Expiration status of the experiment "bogus-disabled"
+      static const bool bogus_disabled = true;
+
+      /// Expiration status of the experiment "bogus-enabled"
+      static const bool bogus_enabled = true;
+    }''');
+  }
+
+  void generateSection_KnownFeatures() {
+    out.write('''
+
+/// A map containing information about all known experimental flags.
+const _knownFeatures = <String, ExperimentalFeature>{
+''');
+    for (var key in keysSorted) {
+      var id = keyToIdentifier(key);
+      out.write('''
+  EnableString.$id: ExperimentalFeatures.$id,
+    ''');
+    }
+    // TODO(danrubel): Remove bogus entries
+    out.write('''
+
+  EnableString.bogus_disabled: ExperimentalFeatures.bogus_disabled,
+  EnableString.bogus_enabled: ExperimentalFeatures.bogus_enabled,
+};
+''');
+  }
+}
diff --git a/pkg/analyzer/tool/messages/generate.dart b/pkg/analyzer/tool/messages/generate.dart
index a88a897..babac722 100644
--- a/pkg/analyzer/tool/messages/generate.dart
+++ b/pkg/analyzer/tool/messages/generate.dart
@@ -62,7 +62,7 @@
 """;
 
 const shouldRunFastaGenerateMessagesFirst = """
-Error: After modifying message.yaml, run this first:
+Error: After modifying messages.yaml, run this first:
        pkg/front_end/tool/fasta generate-messages
 """;
 
diff --git a/pkg/analyzer_cli/lib/src/build_mode.dart b/pkg/analyzer_cli/lib/src/build_mode.dart
index 10ef17b..39e0a65 100644
--- a/pkg/analyzer_cli/lib/src/build_mode.dart
+++ b/pkg/analyzer_cli/lib/src/build_mode.dart
@@ -339,6 +339,9 @@
    * add them to  the [assembler].
    */
   void _computeLinkedLibraries(Set<String> libraryUris) {
+    // Ensure that summary1 linking is done with summary1 rules.
+    AnalysisDriver.useSummary2 = false;
+
     logger.run('Link output summary', () {
       void trackDependency(String absoluteUri) {
         if (dependencyTracker != null) {
@@ -375,6 +378,7 @@
    * [inputParsedUnitResults] to produce linked libraries in [assembler].
    */
   void _computeLinkedLibraries2() {
+    AnalysisDriver.useSummary2 = consumeSummary2;
     logger.run('Link output summary2', () {
       var inputLibraries = <summary2.LinkInputLibrary>[];
 
@@ -511,6 +515,9 @@
     analysisOptions =
         createAnalysisOptionsForCommandLineOptions(options, rootPath);
 
+    // Ensure that FileState prepare summary2 information if necessary.
+    AnalysisDriver.useSummary2 = consumeSummary2;
+
     AnalysisDriverScheduler scheduler = new AnalysisDriverScheduler(logger);
     analysisDriver = new AnalysisDriver(
         scheduler,
@@ -608,12 +615,9 @@
    * is sent to a new file at that path.
    */
   Future<void> _printErrors({String outputPath}) async {
-    await logger.runAsync('Compute and print analysis errors', () async {
-      var wasUseSummary2 = AnalysisDriver.useSummary2;
-      if (consumeSummary2) {
-        AnalysisDriver.useSummary2 = true;
-      }
+    AnalysisDriver.useSummary2 = consumeSummary2;
 
+    await logger.runAsync('Compute and print analysis errors', () async {
       StringBuffer buffer = new StringBuffer();
       var severityProcessor = (AnalysisError error) =>
           determineProcessedSeverity(error, options, analysisOptions);
@@ -638,8 +642,6 @@
       } else {
         new io.File(outputPath).writeAsStringSync(buffer.toString());
       }
-
-      AnalysisDriver.useSummary2 = wasUseSummary2;
     });
   }
 }
diff --git a/pkg/analyzer_cli/test/mocks.dart b/pkg/analyzer_cli/test/mocks.dart
index ab4e74f..b5e5627 100644
--- a/pkg/analyzer_cli/test/mocks.dart
+++ b/pkg/analyzer_cli/test/mocks.dart
@@ -87,6 +87,9 @@
   }
 
   @override
+  bool get hasPublishedDocs => false;
+
+  @override
   bool get isUnresolvedIdentifier => false;
 
   @override
diff --git a/pkg/compiler/lib/src/common/names.dart b/pkg/compiler/lib/src/common/names.dart
index ec947a4..a8eaea4 100644
--- a/pkg/compiler/lib/src/common/names.dart
+++ b/pkg/compiler/lib/src/common/names.dart
@@ -214,6 +214,9 @@
   static final Uri dart__js_helper =
       new Uri(scheme: 'dart', path: '_js_helper');
 
+  /// The URI for 'dart:_rti'.
+  static final Uri dart__rti = new Uri(scheme: 'dart', path: '_rti');
+
   /// The URI for 'dart:_interceptors'.
   static final Uri dart__interceptors =
       new Uri(scheme: 'dart', path: '_interceptors');
diff --git a/pkg/compiler/lib/src/compiler.dart b/pkg/compiler/lib/src/compiler.dart
index 85057ab..ed69778 100644
--- a/pkg/compiler/lib/src/compiler.dart
+++ b/pkg/compiler/lib/src/compiler.dart
@@ -270,7 +270,6 @@
       GlobalTypeInferenceResults globalTypeInferenceResults) async {
     JClosedWorld closedWorld = globalTypeInferenceResults.closedWorld;
     backendStrategy.registerJClosedWorld(closedWorld);
-    if (options.showInternalProgress) reporter.log('Compiling...');
     phase = PHASE_COMPILING;
     CodegenInputs codegenInputs =
         backend.onCodegenStart(globalTypeInferenceResults);
@@ -279,8 +278,10 @@
       CodegenResults codegenResults =
           await serializationTask.deserializeCodegen(
               backendStrategy, globalTypeInferenceResults, codegenInputs);
+      reporter.log('Compiling methods');
       runCodegenEnqueuer(codegenResults);
     } else {
+      reporter.log('Compiling methods');
       CodegenResults codegenResults = new OnDemandCodegenResults(
           globalTypeInferenceResults, codegenInputs, backend.functionCompiler);
       if (options.writeCodegenUri != null) {
@@ -349,7 +350,7 @@
 
     phase = PHASE_RESOLVING;
     resolutionEnqueuer.applyImpact(mainImpact);
-    if (options.showInternalProgress) reporter.log('Resolving...');
+    if (options.showInternalProgress) reporter.log('Computing closed world');
 
     processQueue(
         frontendStrategy.elementEnvironment, resolutionEnqueuer, mainFunction,
@@ -376,7 +377,7 @@
   GlobalTypeInferenceResults performGlobalTypeInference(
       JClosedWorld closedWorld) {
     FunctionEntity mainFunction = closedWorld.elementEnvironment.mainFunction;
-    if (options.showInternalProgress) reporter.log('Inferring types...');
+    reporter.log('Performing global type inference');
     InferredDataBuilder inferredDataBuilder =
         new InferredDataBuilderImpl(closedWorld.annotationsData);
     return globalInference.runGlobalTypeInference(
@@ -400,6 +401,7 @@
     if (retainDataForTesting) {
       codegenWorldForTesting = codegenWorld;
     }
+    reporter.log('Emitting JavaScript');
     int programSize = backend.assembleProgram(closedWorld,
         globalInferenceResults.inferredData, codegenInputs, codegenWorld);
 
diff --git a/pkg/compiler/lib/src/ir/annotations.dart b/pkg/compiler/lib/src/ir/annotations.dart
index ae07571..4e10bf8 100644
--- a/pkg/compiler/lib/src/ir/annotations.dart
+++ b/pkg/compiler/lib/src/ir/annotations.dart
@@ -4,6 +4,7 @@
 
 import 'package:kernel/ast.dart' as ir;
 import '../common/names.dart';
+import 'modular.dart';
 
 class IrAnnotationData {
   Map<ir.Class, String> _nativeClassNames = {};
@@ -119,7 +120,8 @@
   }
 }
 
-IrAnnotationData processAnnotations(ir.Component component) {
+IrAnnotationData processAnnotations(ModularCore modularCore) {
+  ir.Component component = modularCore.component;
   IrAnnotationData data = new IrAnnotationData();
 
   void processMember(ir.Member member) {
@@ -128,7 +130,8 @@
     List<String> returnsAnnotations;
     for (ir.Expression annotation in member.annotations) {
       if (annotation is ir.ConstantExpression) {
-        ir.Constant constant = annotation.constant;
+        ir.Constant constant =
+            modularCore.constantEvaluator.evaluate(annotation);
 
         String jsName = _getJsInteropName(constant);
         if (jsName != null) {
@@ -175,7 +178,8 @@
   for (ir.Library library in component.libraries) {
     for (ir.Expression annotation in library.annotations) {
       if (annotation is ir.ConstantExpression) {
-        ir.Constant constant = annotation.constant;
+        ir.Constant constant =
+            modularCore.constantEvaluator.evaluate(annotation);
 
         String jsName = _getJsInteropName(constant);
         if (jsName != null) {
@@ -186,7 +190,8 @@
     for (ir.Class cls in library.classes) {
       for (ir.Expression annotation in cls.annotations) {
         if (annotation is ir.ConstantExpression) {
-          ir.Constant constant = annotation.constant;
+          ir.Constant constant =
+              modularCore.constantEvaluator.evaluate(annotation);
 
           String nativeClassName = _getNativeClassName(constant);
           if (nativeClassName != null) {
@@ -357,6 +362,8 @@
     if (metadata is! ir.ConstantExpression) continue;
     ir.ConstantExpression constantExpression = metadata;
     ir.Constant constant = constantExpression.constant;
+    assert(constant is! ir.UnevaluatedConstant,
+        "Unexpected unevaluated constant on $member: $metadata");
     PragmaAnnotationData data = _getPragmaAnnotation(constant);
     if (data != null) {
       annotations.add(data);
diff --git a/pkg/compiler/lib/src/ir/modular.dart b/pkg/compiler/lib/src/ir/modular.dart
index 9d7ea73..37eb213 100644
--- a/pkg/compiler/lib/src/ir/modular.dart
+++ b/pkg/compiler/lib/src/ir/modular.dart
@@ -11,9 +11,17 @@
 import '../js_backend/annotations.dart';
 import '../util/enumset.dart';
 import 'annotations.dart';
+import 'constants.dart';
 import 'impact.dart';
 import 'scope.dart';
 
+class ModularCore {
+  final ir.Component component;
+  final Dart2jsConstantEvaluator constantEvaluator;
+
+  ModularCore(this.component, this.constantEvaluator);
+}
+
 class ModularMemberData {
   final ScopeModel scopeModel;
   final ImpactBuilderData impactBuilderData;
diff --git a/pkg/compiler/lib/src/js_emitter/code_emitter_task.dart b/pkg/compiler/lib/src/js_emitter/code_emitter_task.dart
index 5393c9b..3871204 100644
--- a/pkg/compiler/lib/src/js_emitter/code_emitter_task.dart
+++ b/pkg/compiler/lib/src/js_emitter/code_emitter_task.dart
@@ -110,7 +110,9 @@
       CodegenInputs codegenInputs,
       CodegenWorld codegenWorld) {
     return measure(() {
-      _finalizeRti(codegenInputs, codegenWorld);
+      measureSubtask('finalize rti', () {
+        _finalizeRti(codegenInputs, codegenWorld);
+      });
       ProgramBuilder programBuilder = new ProgramBuilder(
           _compiler.options,
           _compiler.reporter,
diff --git a/pkg/compiler/lib/src/js_emitter/headers.dart b/pkg/compiler/lib/src/js_emitter/headers.dart
index adc0060..08fd664a 100644
--- a/pkg/compiler/lib/src/js_emitter/headers.dart
+++ b/pkg/compiler/lib/src/js_emitter/headers.dart
@@ -37,8 +37,4 @@
 //    if this function is defined, it will be called at each entry of a
 //    method or constructor. Used only when compiling programs with
 //    --experiment-call-instrumentation.
-//
-// defaultPackagesBase:
-//    Override the location where `package:` uris are resolved from. By default
-//    they are resolved under "packages/" from the current window location.
 """;
diff --git a/pkg/compiler/lib/src/js_emitter/startup_emitter/emitter.dart b/pkg/compiler/lib/src/js_emitter/startup_emitter/emitter.dart
index ba22b6e..c664a0f 100644
--- a/pkg/compiler/lib/src/js_emitter/startup_emitter/emitter.dart
+++ b/pkg/compiler/lib/src/js_emitter/startup_emitter/emitter.dart
@@ -138,6 +138,7 @@
   final DiagnosticReporter _reporter;
   final JClosedWorld _closedWorld;
   final RuntimeTypesEncoder _rtiEncoder;
+  final CompilerTask _task;
   ModelEmitter _emitter;
 
   @override
@@ -152,7 +153,7 @@
       this._closedWorld,
       this._rtiEncoder,
       SourceInformationStrategy sourceInformationStrategy,
-      CompilerTask task,
+      this._task,
       bool shouldGenerateSourceMap)
       : super(namer) {
     _emitter = new ModelEmitter(
@@ -162,7 +163,7 @@
         dumpInfoTask,
         namer,
         _closedWorld,
-        task,
+        _task,
         this,
         sourceInformationStrategy,
         _rtiEncoder,
@@ -174,11 +175,15 @@
 
   @override
   int emitProgram(ProgramBuilder programBuilder, CodegenWorld codegenWorld) {
-    Program program = programBuilder.buildProgram();
+    Program program = _task.measureSubtask('build program', () {
+      return programBuilder.buildProgram();
+    });
     if (retainDataForTesting) {
       programForTesting = program;
     }
-    return _emitter.emitProgram(program, codegenWorld);
+    return _task.measureSubtask('emit program', () {
+      return _emitter.emitProgram(program, codegenWorld);
+    });
   }
 
   @override
diff --git a/pkg/compiler/lib/src/js_emitter/startup_emitter/model_emitter.dart b/pkg/compiler/lib/src/js_emitter/startup_emitter/model_emitter.dart
index 064bd19..78b6164 100644
--- a/pkg/compiler/lib/src/js_emitter/startup_emitter/model_emitter.dart
+++ b/pkg/compiler/lib/src/js_emitter/startup_emitter/model_emitter.dart
@@ -201,21 +201,25 @@
     program.finalizers.forEach((js.TokenFinalizer f) => f.finalizeTokens());
 
     // TODO(sra): This is where we know if the types (and potentially other
-    // deferred ASTs inside the parts) have any contents. We shoudl wait until
+    // deferred ASTs inside the parts) have any contents. We should wait until
     // this point to decide if a part is empty.
 
     Map<DeferredFragment, String> hunkHashes =
-        writeDeferredFragments(deferredFragmentsCode);
+        _task.measureSubtask('write fragments', () {
+      return writeDeferredFragments(deferredFragmentsCode);
+    });
 
     // Now that we have written the deferred hunks, we can create the deferred
     // loading data.
     fragmentEmitter.finalizeDeferredLoadingData(
         program.loadMap, hunkHashes, deferredLoadingState);
 
-    writeMainFragment(mainFragment, mainCode,
-        isSplit: program.deferredFragments.isNotEmpty ||
-            program.hasSoftDeferredClasses ||
-            _options.experimentalTrackAllocations);
+    _task.measureSubtask('write fragments', () {
+      writeMainFragment(mainFragment, mainCode,
+          isSplit: program.deferredFragments.isNotEmpty ||
+              program.hasSoftDeferredClasses ||
+              _options.experimentalTrackAllocations);
+    });
 
     if (_closedWorld.backendUsage.requiresPreamble &&
         !_closedWorld.backendUsage.isHtmlLoaded) {
@@ -295,9 +299,12 @@
       code
     ]);
 
-    mainOutput.addBuffer(js.createCodeBuffer(
+    CodeBuffer buffer = js.createCodeBuffer(
         program, _options, _sourceInformationStrategy,
-        monitor: _dumpInfoTask));
+        monitor: _dumpInfoTask);
+    _task.measureSubtask('emit buffers', () {
+      mainOutput.addBuffer(buffer);
+    });
 
     if (_shouldGenerateSourceMap) {
       _task.measureSubtask('source-maps', () {
@@ -365,9 +372,12 @@
       js.js.statement('$deferredInitializersGlobal.current = #', code)
     ]);
 
-    output.addBuffer(js.createCodeBuffer(
+    CodeBuffer buffer = js.createCodeBuffer(
         program, _options, _sourceInformationStrategy,
-        monitor: _dumpInfoTask));
+        monitor: _dumpInfoTask);
+    _task.measureSubtask('emit buffers', () {
+      output.addBuffer(buffer);
+    });
 
     // Make a unique hash of the code (before the sourcemaps are added)
     // This will be used to retrieve the initializing function from the global
@@ -424,7 +434,7 @@
     mapping.addAll(_closedWorld.outputUnitData.computeDeferredMap(
         _options, _closedWorld.elementEnvironment,
         omittedUnits:
-            omittedFragments.map((fragemnt) => fragemnt.outputUnit).toSet()));
+            omittedFragments.map((fragment) => fragment.outputUnit).toSet()));
     _outputProvider.createOutputSink(
         _options.deferredMapUri.path, '', OutputType.deferredMap)
       ..add(const JsonEncoder.withIndent("  ").convert(mapping))
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 cde245a..e24352c 100644
--- a/pkg/compiler/lib/src/js_model/element_map_impl.dart
+++ b/pkg/compiler/lib/src/js_model/element_map_impl.dart
@@ -1334,6 +1334,7 @@
       type ??= findIn(Uris.dart_web_sql);
       type ??= findIn(Uris.dart_indexed_db);
       type ??= findIn(Uris.dart_typed_data);
+      type ??= findIn(Uris.dart__rti);
       type ??= findIn(Uris.dart_mirrors);
       if (type == null && required) {
         reporter.reportErrorMessage(CURRENT_ELEMENT_SPANNABLE,
diff --git a/pkg/compiler/lib/src/kernel/element_map_impl.dart b/pkg/compiler/lib/src/kernel/element_map_impl.dart
index bb8f069..84f80cc 100644
--- a/pkg/compiler/lib/src/kernel/element_map_impl.dart
+++ b/pkg/compiler/lib/src/kernel/element_map_impl.dart
@@ -888,6 +888,7 @@
       type ??= findIn(Uris.dart_web_sql);
       type ??= findIn(Uris.dart_indexed_db);
       type ??= findIn(Uris.dart_typed_data);
+      type ??= findIn(Uris.dart__rti);
       type ??= findIn(Uris.dart_mirrors);
       if (type == null && required) {
         reporter.reportErrorMessage(CURRENT_ELEMENT_SPANNABLE,
diff --git a/pkg/compiler/lib/src/kernel/kernel_strategy.dart b/pkg/compiler/lib/src/kernel/kernel_strategy.dart
index 1559108..c93e50f 100644
--- a/pkg/compiler/lib/src/kernel/kernel_strategy.dart
+++ b/pkg/compiler/lib/src/kernel/kernel_strategy.dart
@@ -71,7 +71,8 @@
   void registerLoadedLibraries(KernelResult kernelResult) {
     _elementMap.addComponent(kernelResult.component);
     if (_options.useCFEConstants) {
-      _irAnnotationData = processAnnotations(kernelResult.component);
+      _irAnnotationData = processAnnotations(new ModularCore(
+          kernelResult.component, _elementMap.constantEvaluator));
     }
     _annotationProcessor = new KernelAnnotationProcessor(
         elementMap, nativeBasicDataBuilder, _irAnnotationData);
diff --git a/pkg/compiler/lib/src/ssa/builder_kernel.dart b/pkg/compiler/lib/src/ssa/builder_kernel.dart
index f0f64ff..9c0a6a5 100644
--- a/pkg/compiler/lib/src/ssa/builder_kernel.dart
+++ b/pkg/compiler/lib/src/ssa/builder_kernel.dart
@@ -377,6 +377,8 @@
         return false;
       case 'USE_CONTENT_SECURITY_POLICY':
         return options.useContentSecurityPolicy;
+      case 'USE_NEW_RTI':
+        return options.experimentNewRti;
       default:
         return null;
     }
diff --git a/pkg/compiler/lib/src/ssa/codegen.dart b/pkg/compiler/lib/src/ssa/codegen.dart
index 1b97f87..5fabe81 100644
--- a/pkg/compiler/lib/src/ssa/codegen.dart
+++ b/pkg/compiler/lib/src/ssa/codegen.dart
@@ -3330,4 +3330,34 @@
   void visitRef(HRef node) {
     visit(node.value);
   }
+
+  @override
+  visitIsTest(HIsTest node) {
+    throw UnimplementedError('SsaCodeGenerator.visitIsTest');
+  }
+
+  @override
+  visitAsCheck(HAsCheck node) {
+    throw UnimplementedError('SsaCodeGenerator.visitAsCheck');
+  }
+
+  @override
+  visitSubtypeCheck(HSubtypeCheck node) {
+    throw UnimplementedError('SsaCodeGenerator.visitSubtypeCheck');
+  }
+
+  @override
+  visitLoadType(HLoadType node) {
+    throw UnimplementedError('SsaCodeGenerator.visitLoadType');
+  }
+
+  @override
+  visitTypeEval(HTypeEval node) {
+    throw UnimplementedError('SsaCodeGenerator.visitTypeEval');
+  }
+
+  @override
+  visitTypeBind(HTypeBind node) {
+    throw UnimplementedError('SsaCodeGenerator.visitTypeBind');
+  }
 }
diff --git a/pkg/compiler/lib/src/ssa/nodes.dart b/pkg/compiler/lib/src/ssa/nodes.dart
index db7f6f6..3d8a473 100644
--- a/pkg/compiler/lib/src/ssa/nodes.dart
+++ b/pkg/compiler/lib/src/ssa/nodes.dart
@@ -103,6 +103,14 @@
   R visitTypeInfoReadRaw(HTypeInfoReadRaw node);
   R visitTypeInfoReadVariable(HTypeInfoReadVariable node);
   R visitTypeInfoExpression(HTypeInfoExpression node);
+
+  // Instructions for 'dart:_rti'.
+  R visitIsTest(HIsTest node);
+  R visitAsCheck(HAsCheck node);
+  R visitSubtypeCheck(HSubtypeCheck node);
+  R visitLoadType(HLoadType node);
+  R visitTypeEval(HTypeEval node);
+  R visitTypeBind(HTypeBind node);
 }
 
 abstract class HGraphVisitor {
@@ -584,8 +592,22 @@
   @override
   visitTypeInfoReadVariable(HTypeInfoReadVariable node) =>
       visitInstruction(node);
+
   @override
   visitTypeInfoExpression(HTypeInfoExpression node) => visitInstruction(node);
+
+  @override
+  visitIsTest(HIsTest node) => visitInstruction(node);
+  @override
+  visitAsCheck(HAsCheck node) => visitCheck(node);
+  @override
+  visitSubtypeCheck(HSubtypeCheck node) => visitCheck(node);
+  @override
+  visitLoadType(HLoadType node) => visitInstruction(node);
+  @override
+  visitTypeEval(HTypeEval node) => visitInstruction(node);
+  @override
+  visitTypeBind(HTypeBind node) => visitInstruction(node);
 }
 
 class SubGraph {
@@ -1064,6 +1086,13 @@
   static const int BOOL_CONVERSION_TYPECODE = 45;
   static const int PRIMITIVE_CHECK_TYPECODE = 46;
 
+  static const int IS_TEST_TYPECODE = 47;
+  static const int AS_CHECK_TYPECODE = 48;
+  static const int SUBTYPE_CHECK_TYPECODE = 49;
+  static const int LOAD_TYPE_TYPECODE = 50;
+  static const int TYPE_EVAL_TYPECODE = 51;
+  static const int TYPE_BIND_TYPECODE = 52;
+
   HInstruction(this.inputs, this.instructionType)
       : id = idCounter++,
         usedBy = <HInstruction>[] {
@@ -1384,6 +1413,9 @@
   bool hasSameLoopHeaderAs(HInstruction other) {
     return block.enclosingLoopHeader == other.block.enclosingLoopHeader;
   }
+
+  @override
+  String toString() => '${this.runtimeType}()';
 }
 
 /// The set of uses of [source] that are dominated by [dominator].
@@ -3342,6 +3374,7 @@
       receiver.isNull(domain).isPotentiallyTrue;
 }
 
+/// Is-test using legacy constructor based typ representation.
 class HIs extends HInstruction {
   /// A check against a raw type: 'o is int', 'o is A'.
   static const int RAW_CHECK = 0;
@@ -3476,7 +3509,7 @@
 ///
 /// HLateValue is useful for naming values that would otherwise be generated at
 /// use site, for example, if 'this' is used many times, replacing uses of
-/// 'this' with HLateValhe(HThis) will have the effect of copying 'this' to a
+/// 'this' with HLateValue(HThis) will have the effect of copying 'this' to a
 /// temporary will reduce the size of minified code.
 class HLateValue extends HLateInstruction {
   HLateValue(HInstruction target) : super([target], target.instructionType);
@@ -3489,6 +3522,7 @@
   toString() => 'HLateValue($target)';
 }
 
+/// Type check or cast using legacy constructor-based type representation.
 class HTypeConversion extends HCheck {
   // Values for [kind].
   static const int TYPE_CHECK = 0;
@@ -4299,3 +4333,179 @@
     }
   }
 }
+
+// -----------------------------------------------------------------------------
+
+/// Is-test using Rti form of type expression.
+///
+/// This instruction can be used for any type. Tests for simple types are
+/// lowered to other instructions, so this instruction remains for types that
+/// depend on type variables and complex types.
+class HIsTest extends HInstruction {
+  HIsTest(HInstruction checked, HInstruction rti, AbstractValue type)
+      : super([rti, checked], type) {
+    setUseGvn();
+  }
+
+  // The type input is first to facilitate the `type.is(value)` codegen pattern.
+  HInstruction get typeInput => inputs[0];
+  HInstruction get checkedInput => inputs[1];
+
+  @override
+  accept(HVisitor visitor) => visitor.visitIsTest(this);
+
+  @override
+  int typeCode() => HInstruction.IS_TEST_TYPECODE;
+
+  @override
+  bool typeEquals(HInstruction other) => other is HIsTest;
+
+  @override
+  bool dataEquals(HIsTest other) => true;
+
+  @override
+  String toString() => 'HIsTest()';
+}
+
+/// Type cast or type check using Rti form of type expression.
+class HAsCheck extends HCheck {
+  final bool isTypeError;
+
+  HAsCheck(HInstruction checked, HInstruction rti, this.isTypeError,
+      AbstractValue type)
+      : super([rti, checked], type) {}
+
+  // The type input is first to facilitate the `type.as(value)` codegen pattern.
+  HInstruction get typeInput => inputs[0];
+  @override
+  HInstruction get checkedInput => inputs[1];
+
+  @override
+  accept(HVisitor visitor) => visitor.visitAsCheck(this);
+
+  @override
+  int typeCode() => HInstruction.AS_CHECK_TYPECODE;
+
+  @override
+  bool typeEquals(HInstruction other) => other is HAsCheck;
+
+  @override
+  bool dataEquals(HAsCheck other) {
+    return isTypeError == other.isTypeError;
+  }
+
+  @override
+  String toString() {
+    String error = isTypeError ? 'TypeError' : 'CastError';
+    return 'HAsCheck($error)';
+  }
+}
+
+/// Subtype check comparing two Rti types.
+class HSubtypeCheck extends HCheck {
+  HSubtypeCheck(
+      HInstruction subtype, HInstruction supertype, AbstractValue type)
+      : super([subtype, supertype], type) {
+    setUseGvn();
+  }
+
+  HInstruction get typeInput => inputs[1];
+
+  @override
+  accept(HVisitor visitor) => visitor.visitSubtypeCheck(this);
+
+  @override
+  int typeCode() => HInstruction.SUBTYPE_CHECK_TYPECODE;
+
+  @override
+  bool typeEquals(HInstruction other) => other is HSubtypeCheck;
+
+  @override
+  bool dataEquals(HSubtypeCheck other) => true;
+
+  @override
+  String toString() => 'HSubtypeCheck()';
+}
+
+/// Common superclass for instructions that generate Rti values.
+abstract class HRtiInstruction extends HInstruction {
+  HRtiInstruction(List<HInstruction> inputs, AbstractValue type)
+      : super(inputs, type);
+}
+
+/// Evaluates an Rti type recipe in the global environment.
+class HLoadType extends HRtiInstruction {
+  DartType typeExpression; // TODO(sra): Allow a type environment expression.
+
+  HLoadType(this.typeExpression, AbstractValue type) : super([], type) {
+    setUseGvn();
+  }
+
+  @override
+  accept(HVisitor visitor) => visitor.visitLoadType(this);
+
+  @override
+  int typeCode() => HInstruction.LOAD_TYPE_TYPECODE;
+
+  @override
+  bool typeEquals(HInstruction other) => other is HLoadType;
+
+  @override
+  bool dataEquals(HLoadType other) {
+    return typeExpression == other.typeExpression;
+  }
+
+  @override
+  String toString() => 'HLoadType($typeExpression)';
+}
+
+/// Evaluates an Rti type recipe in an Rti environment.
+class HTypeEval extends HRtiInstruction {
+  DartType typeExpression; // TODO(sra); Allow a type environment expression.
+
+  HTypeEval(HInstruction environment, this.typeExpression, AbstractValue type)
+      : super([environment], type) {
+    setUseGvn();
+  }
+
+  @override
+  accept(HVisitor visitor) => visitor.visitTypeEval(this);
+
+  @override
+  int typeCode() => HInstruction.TYPE_EVAL_TYPECODE;
+
+  @override
+  bool typeEquals(HInstruction other) => other is HTypeEval;
+
+  @override
+  bool dataEquals(HTypeEval other) {
+    return typeExpression == other.typeExpression;
+  }
+
+  @override
+  String toString() => 'HTypeEval($typeExpression)';
+}
+
+/// Extends an Rti type environment with generic function types.
+class HTypeBind extends HRtiInstruction {
+  HTypeBind(
+      HInstruction environment, HInstruction typeArguments, AbstractValue type)
+      : super([environment, typeArguments], type) {
+    setUseGvn();
+  }
+
+  @override
+  accept(HVisitor visitor) => visitor.visitTypeBind(this);
+
+  @override
+  int typeCode() => HInstruction.TYPE_BIND_TYPECODE;
+
+  @override
+  bool typeEquals(HInstruction other) => other is HTypeBind;
+
+  @override
+  bool dataEquals(HTypeBind other) => true;
+
+  @override
+  String toString() => 'HTypeBind()';
+}
diff --git a/pkg/compiler/lib/src/ssa/ssa_tracer.dart b/pkg/compiler/lib/src/ssa/ssa_tracer.dart
index db7b380..95bfbb5 100644
--- a/pkg/compiler/lib/src/ssa/ssa_tracer.dart
+++ b/pkg/compiler/lib/src/ssa/ssa_tracer.dart
@@ -673,4 +673,41 @@
   String visitYield(HYield node) {
     return "Yield${node.hasStar ? "*" : ""}: ${temporaryId(node.inputs[0])}";
   }
+
+  @override
+  visitIsTest(HIsTest node) {
+    var inputs = node.inputs.map(temporaryId).join(', ');
+    return "IsTest: $inputs";
+  }
+
+  @override
+  visitAsCheck(HAsCheck node) {
+    var inputs = node.inputs.map(temporaryId).join(', ');
+    String error = node.isTypeError ? 'TypeError' : 'CastError';
+    return "AsCheck: $error $inputs";
+  }
+
+  @override
+  visitSubtypeCheck(HSubtypeCheck node) {
+    var inputs = node.inputs.map(temporaryId).join(', ');
+    return "SubtypeCheck: $inputs";
+  }
+
+  @override
+  visitLoadType(HLoadType node) {
+    var inputs = node.inputs.map(temporaryId).join(', ');
+    return "LoadType: $inputs";
+  }
+
+  @override
+  visitTypeEval(HTypeEval node) {
+    var inputs = node.inputs.map(temporaryId).join(', ');
+    return "TypeEval: $inputs";
+  }
+
+  @override
+  visitTypeBind(HTypeBind node) {
+    var inputs = node.inputs.map(temporaryId).join(', ');
+    return "TypeBind: $inputs";
+  }
 }
diff --git a/pkg/compiler/pubspec.yaml b/pkg/compiler/pubspec.yaml
index b34280b..2dbf1fb 100644
--- a/pkg/compiler/pubspec.yaml
+++ b/pkg/compiler/pubspec.yaml
@@ -3,7 +3,7 @@
 name: compiler
 publish_to: none
 environment:
-  sdk: '>=2.2.0 <3.0.0'
+  sdk: '>=2.3.0 <3.0.0'
 
 # NOTE: `pub get / pub upgrade` are generally not needed when working on this
 # package. The `.packages` file in the repository root will be used by default.
diff --git a/tests/compiler/dart2js/modular/modular_test.dart b/pkg/compiler/tool/modular_test_suite.dart
similarity index 88%
rename from tests/compiler/dart2js/modular/modular_test.dart
rename to pkg/compiler/tool/modular_test_suite.dart
index fd60292..67c5bf0 100644
--- a/tests/compiler/dart2js/modular/modular_test.dart
+++ b/pkg/compiler/tool/modular_test_suite.dart
@@ -15,15 +15,16 @@
 import 'package:modular_test/src/suite.dart';
 import 'package:modular_test/src/runner.dart';
 
-Uri sdkRoot = Platform.script.resolve("../../../../");
+Uri sdkRoot = Platform.script.resolve("../../../");
 Options _options;
+String _dart2jsScript;
+String _kernelWorkerScript;
 main(List<String> args) async {
   _options = Options.parse(args);
-  var suiteFolder = Platform.script.resolve('data/');
-  var suiteName = relativize(suiteFolder, sdkRoot).path;
+  await _resolveScripts();
   await runSuite(
-      suiteFolder,
-      suiteName.substring(0, suiteName.length - 1), // remove trailing /
+      sdkRoot.resolve('tests/modular/'),
+      'tests/modular',
       _options,
       new IOPipeline([
         SourceToDillStep(),
@@ -113,7 +114,6 @@
     await File.fromUri(root.resolve('.packages'))
         .writeAsString('$packagesContents');
 
-    var sdkRoot = Platform.script.resolve("../../../../");
     List<String> sources;
     List<String> extraArgs;
     if (module.isSdk) {
@@ -138,7 +138,7 @@
     }
 
     List<String> args = [
-      sdkRoot.resolve("utils/bazel/kernel_worker.dart").toFilePath(),
+      _kernelWorkerScript,
       '--no-summary-only',
       '--target',
       'dart2js',
@@ -191,10 +191,12 @@
     Set<Module> transitiveDependencies = computeTransitiveDependencies(module);
     Iterable<String> dillDependencies =
         transitiveDependencies.map((m) => '${toUri(m, dillId)}');
-    var sdkRoot = Platform.script.resolve("../../../../");
     List<String> args = [
       '--packages=${sdkRoot.toFilePath()}/.packages',
-      'package:compiler/src/dart2js.dart',
+      _dart2jsScript,
+      // TODO(sigmund): remove this dependency on libraries.json
+      if (_options.useSdk)
+        '--libraries-spec=$_librarySpecForSnapshot',
       '${toUri(module, dillId)}',
       for (String flag in flags) '--enable-experiment=$flag',
       '${Flags.dillDependencies}=${dillDependencies.join(',')}',
@@ -241,10 +243,10 @@
   Future<void> execute(Module module, Uri root, ModuleDataToRelativeUri toUri,
       List<String> flags) async {
     if (_options.verbose) print("\nstep: dart2js backend on $module");
-    var sdkRoot = Platform.script.resolve("../../../../");
     List<String> args = [
       '--packages=${sdkRoot.toFilePath()}/.packages',
-      'package:compiler/src/dart2js.dart',
+      _dart2jsScript,
+      if (_options.useSdk) '--libraries-spec=$_librarySpecForSnapshot',
       '${toUri(module, updatedDillId)}',
       for (String flag in flags) '--enable-experiment=$flag',
       '${Flags.readData}=${toUri(module, globalDataId)}',
@@ -287,10 +289,10 @@
   Future<void> execute(Module module, Uri root, ModuleDataToRelativeUri toUri,
       List<String> flags) async {
     if (_options.verbose) print("step: dart2js backend on $module");
-    var sdkRoot = Platform.script.resolve("../../../../");
     List<String> args = [
       '--packages=${sdkRoot.toFilePath()}/.packages',
-      'package:compiler/src/dart2js.dart',
+      _dart2jsScript,
+      if (_options.useSdk) '--libraries-spec=$_librarySpecForSnapshot',
       '${toUri(module, updatedDillId)}',
       for (String flag in flags) '${Flags.enableLanguageExperiments}=$flag',
       '${Flags.readData}=${toUri(module, globalDataId)}',
@@ -331,7 +333,6 @@
   Future<void> execute(Module module, Uri root, ModuleDataToRelativeUri toUri,
       List<String> flags) async {
     if (_options.verbose) print("\nstep: d8 on $module");
-    var sdkRoot = Platform.script.resolve("../../../../");
     List<String> d8Args = [
       sdkRoot
           .resolve('sdk/lib/_internal/js_runtime/lib/preambles/d8.js')
@@ -412,3 +413,30 @@
   @override
   String toString() => name;
 }
+
+Future<void> _resolveScripts() async {
+  Future<String> resolve(
+      String sourceUriOrPath, String relativeSnapshotPath) async {
+    Uri sourceUri = sdkRoot.resolve(sourceUriOrPath);
+    String result =
+        sourceUri.scheme == 'file' ? sourceUri.toFilePath() : sourceUriOrPath;
+    if (_options.useSdk) {
+      String snapshot = Uri.file(Platform.resolvedExecutable)
+          .resolve(relativeSnapshotPath)
+          .toFilePath();
+      if (await File(snapshot).exists()) {
+        return snapshot;
+      }
+    }
+    return result;
+  }
+
+  _dart2jsScript = await resolve(
+      'package:compiler/src/dart2js.dart', 'snapshots/dart2js.dart.snapshot');
+  _kernelWorkerScript = await resolve('utils/bazel/kernel_worker.dart',
+      'snapshots/kernel_worker.dart.snapshot');
+}
+
+String _librarySpecForSnapshot = Uri.file(Platform.resolvedExecutable)
+    .resolve('../lib/libraries.json')
+    .toFilePath();
diff --git a/pkg/dartfix/lib/src/driver.dart b/pkg/dartfix/lib/src/driver.dart
index 549f41d..d999d83 100644
--- a/pkg/dartfix/lib/src/driver.dart
+++ b/pkg/dartfix/lib/src/driver.dart
@@ -36,7 +36,7 @@
     Context testContext,
     Logger testLogger,
   }) async {
-    final Options options = Options.parse(args);
+    final Options options = Options.parse(args, testContext, testLogger);
 
     force = options.force;
     overwrite = options.overwrite;
@@ -48,7 +48,7 @@
 
     // Start showing progress before we start the analysis server.
     Progress progress;
-    if (options.listFixes) {
+    if (options.showHelp) {
       progress = logger.progress('${ansi.emphasized('Listing fixes')}');
     } else {
       progress = logger.progress('${ansi.emphasized('Calculating fixes')}');
@@ -63,26 +63,26 @@
       context.exit(1);
     }
 
-    if (options.listFixes) {
+    if (options.showHelp) {
       try {
         await showListOfFixes(progress: progress);
       } finally {
         await server.stop();
       }
-    } else {
-      Future serverStopped;
+      context.exit(0);
+    }
 
-      try {
-        await setupFixesAnalysis(options);
-        result = await requestFixes(options, progress: progress);
-        serverStopped = server.stop();
-        await applyFixes();
-        await serverStopped;
-      } finally {
-        // If we didn't already try to stop the server, then stop it now.
-        if (serverStopped == null) {
-          await server.stop();
-        }
+    Future serverStopped;
+    try {
+      await setupFixesAnalysis(options);
+      result = await requestFixes(options, progress: progress);
+      serverStopped = server.stop();
+      await applyFixes();
+      await serverStopped;
+    } finally {
+      // If we didn't already try to stop the server, then stop it now.
+      if (serverStopped == null) {
+        await server.stop();
       }
     }
   }
@@ -122,14 +122,13 @@
       unsupportedOption(includeOption);
       return false;
     }
-    if (options.listFixes) {
-      unsupportedOption(listOption);
-      return false;
-    }
     if (options.requiredFixes) {
       unsupportedOption(requiredOption);
       return false;
     }
+    if (options.showHelp) {
+      return false;
+    }
     return true;
   }
 
@@ -270,23 +269,34 @@
     final fixes = new List<DartFix>.from(result.fixes)
       ..sort((f1, f2) => f1.name.compareTo(f2.name));
 
-    for (DartFix fix in fixes) {
-      String line = fix.name;
-      if (fix.isRequired == true) {
-        line = '$line (required)';
-      }
-      logger.stdout('');
-      logger.stdout(line);
-      if (fix.description != null) {
-        for (String line in indentAndWrapDescription(fix.description)) {
-          logger.stdout(line);
-        }
-      }
-    }
+    logger.stdout('''
+
+These fixes are automatically applied unless at least one
+--$includeOption option is specified and --$requiredOption is not specified.
+They may be individually disabled using --$excludeOption.''');
+
+    fixes.where((fix) => fix.isRequired).forEach(showFix);
+
+    logger.stdout('''
+
+These fixes are NOT automatically applied, but may be enabled using --$includeOption.''');
+
+    fixes.where((fix) => !fix.isRequired).forEach(showFix);
 
     return result;
   }
 
+  void showFix(DartFix fix) {
+    logger.stdout('''
+
+* ${fix.name}''');
+    if (fix.description != null) {
+      for (String line in indentAndWrapDescription(fix.description)) {
+        logger.stdout(line);
+      }
+    }
+  }
+
   List<String> indentAndWrapDescription(String description) =>
       description.split('\n').map((line) => '    $line').toList();
 }
diff --git a/pkg/dartfix/lib/src/options.dart b/pkg/dartfix/lib/src/options.dart
index 3b6d651..a4d8923 100644
--- a/pkg/dartfix/lib/src/options.dart
+++ b/pkg/dartfix/lib/src/options.dart
@@ -22,12 +22,12 @@
   final List<String> excludeFixes;
 
   final bool force;
-  final bool listFixes;
+  final bool showHelp;
   final bool overwrite;
   final bool useColor;
   final bool verbose;
 
-  static Options parse(List<String> args, {Context context, Logger logger}) {
+  static Options parse(List<String> args, Context context, Logger logger) {
     final parser = new ArgParser(allowTrailingOptions: true)
       ..addSeparator('Choosing fixes to be applied:')
       ..addMultiOption(includeOption,
@@ -39,11 +39,6 @@
           help: 'Apply required fixes.',
           defaultsTo: false,
           negatable: false)
-      ..addFlag(listOption,
-          abbr: 'l',
-          help: 'Display a list of fixes that can be applied.',
-          defaultsTo: false,
-          negatable: false)
       ..addSeparator('Modifying files:')
       ..addFlag(overwriteOption,
           abbr: 'w',
@@ -99,13 +94,9 @@
     }
     options.logger = logger;
 
-    if (results[_helpOption] as bool) {
-      _showUsage(parser, logger);
-      context.exit(1);
-    }
-
-    // For '--list', we short circuit the logic to validate the sdk and project.
-    if (options.listFixes) {
+    // For '--help', we short circuit the logic to validate the sdk and project.
+    if (options.showHelp) {
+      _showUsage(parser, logger, showHelpHint: false);
       return options;
     }
 
@@ -157,10 +148,10 @@
             (results[includeOption] as List ?? []).cast<String>().toList(),
         excludeFixes =
             (results[excludeOption] as List ?? []).cast<String>().toList(),
-        listFixes = results[listOption] as bool,
         overwrite = results[overwriteOption] as bool,
         requiredFixes = results[requiredOption] as bool,
         sdkPath = _getSdkPath(),
+        showHelp = results[_helpOption] as bool || results.arguments.isEmpty,
         targets = results.rest,
         useColor = results.wasParsed(_colorOption)
             ? results[_colorOption] as bool
@@ -181,21 +172,18 @@
   }
 
   static _showUsage(ArgParser parser, Logger logger,
-      {bool showListHint = true}) {
-    logger.stderr('Usage: $_binaryName [options...] <directory paths>');
-    logger.stderr('');
-    logger.stderr(parser.usage);
-    logger.stderr('''
-
-If neither --$includeOption nor --$requiredOption is specified, then all fixes will be
-applied. Any fixes specified using --$excludeOption will not be applied regardless
-of whether they are required or specifed using --$includeOption.''');
-    if (showListHint) {
-      logger.stderr('''
-
-Use --list to display the fixes that can be specified using either
---$includeOption or --$excludeOption.''');
-    }
+      {bool showHelpHint = true}) {
+    Function(String message) out = showHelpHint ? logger.stderr : logger.stdout;
+    // show help on stdout when showHelp is true and showHelpHint is false
+    out('''
+Usage: $_binaryName [options...] <directory paths>
+''');
+    out(parser.usage);
+    out(showHelpHint
+        ? '''
+Use --$_helpOption to display the fixes that can be specified using either
+--$includeOption or --$excludeOption.'''
+        : '');
   }
 }
 
@@ -209,5 +197,4 @@
 // options only supported by server 1.22.2 and greater
 const excludeOption = 'exclude';
 const includeOption = 'include';
-const listOption = 'list';
 const requiredOption = 'required';
diff --git a/pkg/dartfix/test/all.dart b/pkg/dartfix/test/all.dart
index 010f047..f06cf57 100644
--- a/pkg/dartfix/test/all.dart
+++ b/pkg/dartfix/test/all.dart
@@ -6,8 +6,8 @@
 
 import 'src/client_version_test.dart' as client_version_test;
 import 'src/driver_exclude_test.dart' as driver_exclude_test;
+import 'src/driver_help_test.dart' as driver_list_test;
 import 'src/driver_include_test.dart' as driver_include_test;
-import 'src/driver_list_test.dart' as driver_list_test;
 import 'src/driver_required_test.dart' as driver_required_test;
 import 'src/driver_test.dart' as driver_test;
 import 'src/options_test.dart' as options_test;
diff --git a/pkg/dartfix/test/src/driver_help_test.dart b/pkg/dartfix/test/src/driver_help_test.dart
new file mode 100644
index 0000000..b7e944c
--- /dev/null
+++ b/pkg/dartfix/test/src/driver_help_test.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 'package:dartfix/src/driver.dart';
+import 'package:dartfix/src/options.dart';
+import 'package:test/test.dart';
+
+import 'test_context.dart';
+
+main() {
+  test('help explicit', () async {
+    final driver = new Driver();
+    final testContext = new TestContext();
+    final testLogger = new TestLogger();
+    try {
+      await driver.start(
+        ['--help'], // display help and list fixes
+        testContext: testContext,
+        testLogger: testLogger,
+      );
+      fail('expected exception');
+    } on TestExit catch (e) {
+      expect(e.code, 0);
+    }
+    final errText = testLogger.stderrBuffer.toString();
+    final outText = testLogger.stdoutBuffer.toString();
+    expect(errText, isEmpty);
+    expect(outText, contains('--$excludeOption'));
+    expect(outText, isNot(contains('Use --help to display the fixes')));
+    expect(outText, contains('use-mixin'));
+  });
+
+  test('help implicit', () async {
+    final driver = new Driver();
+    final testContext = new TestContext();
+    final testLogger = new TestLogger();
+    try {
+      await driver.start(
+        [], // no options or arguments should display help and list fixes
+        testContext: testContext,
+        testLogger: testLogger,
+      );
+      fail('expected exception');
+    } on TestExit catch (e) {
+      expect(e.code, 0);
+    }
+    final errText = testLogger.stderrBuffer.toString();
+    final outText = testLogger.stdoutBuffer.toString();
+    print(errText);
+    print(outText);
+    expect(errText, isEmpty);
+    expect(outText, contains('--$excludeOption'));
+    expect(outText, isNot(contains('Use --help to display the fixes')));
+    expect(outText, contains('use-mixin'));
+  });
+}
diff --git a/pkg/dartfix/test/src/driver_list_test.dart b/pkg/dartfix/test/src/driver_list_test.dart
deleted file mode 100644
index 372c98b..0000000
--- a/pkg/dartfix/test/src/driver_list_test.dart
+++ /dev/null
@@ -1,24 +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:dartfix/src/driver.dart';
-import 'package:test/test.dart';
-
-import 'test_context.dart';
-
-main() {
-  test('list fixes', () async {
-    final driver = new Driver();
-    final testContext = new TestContext();
-    final testLogger = new TestLogger();
-    await driver.start(['--list'], // list fixes
-        testContext: testContext,
-        testLogger: testLogger);
-    final errText = testLogger.stderrBuffer.toString();
-    final outText = testLogger.stdoutBuffer.toString();
-    print(errText);
-    print(outText);
-    expect(outText, contains('use-mixin'));
-  });
-}
diff --git a/pkg/dartfix/test/src/options_test.dart b/pkg/dartfix/test/src/options_test.dart
index c463ed6..b0b74d7 100644
--- a/pkg/dartfix/test/src/options_test.dart
+++ b/pkg/dartfix/test/src/options_test.dart
@@ -26,7 +26,7 @@
     bool force = false,
     List<String> includeFixes = const <String>[],
     List<String> excludeFixes = const <String>[],
-    bool listFixes = false,
+    bool showHelp = false,
     String normalOut,
     bool requiredFixes = false,
     bool overwrite = false,
@@ -36,7 +36,7 @@
     Options options;
     int actualExitCode;
     try {
-      options = Options.parse(args, context: context, logger: logger);
+      options = Options.parse(args, context, logger);
     } on TestExit catch (e) {
       actualExitCode = e.code;
     }
@@ -53,7 +53,7 @@
     expect(options.force, force);
     expect(options.requiredFixes, requiredFixes);
     expect(options.overwrite, overwrite);
-    expect(options.listFixes, listFixes);
+    expect(options.showHelp, showHelp);
     expect(options.includeFixes, includeFixes);
     expect(options.excludeFixes, excludeFixes);
     expect(options.verbose, verbose);
@@ -79,8 +79,12 @@
     parse(['--force', 'foo'], force: true, targetSuffixes: ['foo']);
   });
 
-  test('help', () {
-    parse(['--help'], errorOut: 'Display this help message', exitCode: 1);
+  test('help explicit', () {
+    parse(['--help'], normalOut: 'Display this help message', showHelp: true);
+  });
+
+  test('help implicit', () {
+    parse([], normalOut: 'Display this help message', showHelp: true);
   });
 
   test('include fix', () {
@@ -95,7 +99,7 @@
 
   test('invalid option no logger', () {
     try {
-      Options.parse(['--foo'], context: context);
+      Options.parse(['--foo'], context, null);
       fail('Expected exception');
     } on TestExit catch (e) {
       expect(e.code, 15, reason: 'exit code');
@@ -107,10 +111,6 @@
         errorOut: 'Expected directory, but found', exitCode: 15);
   });
 
-  test('list fixes', () {
-    parse(['--list'], normalOut: '', listFixes: true);
-  });
-
   test('overwrite', () {
     parse(['--overwrite', 'foo'], overwrite: true, targetSuffixes: ['foo']);
   });
diff --git a/pkg/dev_compiler/analysis_options.yaml b/pkg/dev_compiler/analysis_options.yaml
index 29c4ac1..007c3e7 100644
--- a/pkg/dev_compiler/analysis_options.yaml
+++ b/pkg/dev_compiler/analysis_options.yaml
@@ -10,7 +10,6 @@
     - test/codegen/**
     - test/samples/**
     - test/transformer/hello_app/**
-    - tool/input_sdk/**
 
 linter:
   rules:
@@ -23,6 +22,7 @@
     - curly_braces_in_flow_control_structures
     - empty_constructor_bodies
     - library_names
+    - no_duplicate_case_values
     - null_closures
     - prefer_contains
     - prefer_equal_for_default_values
diff --git a/pkg/dev_compiler/lib/src/compiler/js_names.dart b/pkg/dev_compiler/lib/src/compiler/js_names.dart
index 24d3dbd..ba120a3 100644
--- a/pkg/dev_compiler/lib/src/compiler/js_names.dart
+++ b/pkg/dev_compiler/lib/src/compiler/js_names.dart
@@ -289,7 +289,6 @@
     case "import":
     case "in":
     case "instanceof":
-    case "let":
     case "new":
     case "return":
     case "super":
diff --git a/pkg/dev_compiler/lib/src/kernel/command.dart b/pkg/dev_compiler/lib/src/kernel/command.dart
index 7507c3a..364981a 100644
--- a/pkg/dev_compiler/lib/src/kernel/command.dart
+++ b/pkg/dev_compiler/lib/src/kernel/command.dart
@@ -93,7 +93,11 @@
             'specified multi-root scheme.',
         defaultsTo: [Uri.base.path])
     ..addOption('dart-sdk',
-        help: '(unsupported with --kernel) path to the Dart SDK.', hide: true);
+        help: '(unsupported with --kernel) path to the Dart SDK.', hide: true)
+    ..addFlag('compile-sdk',
+        help: 'Build an SDK module.', defaultsTo: false, hide: true)
+    ..addOption('libraries-file',
+        help: 'The path to the libraries.json file for the sdk.');
   SharedCompilerOptions.addArguments(argParser);
 
   var declaredVariables = parseAndRemoveDeclaredVariables(args);
@@ -155,15 +159,17 @@
       summaryPaths.map(sourcePathToUri), options.summaryModules.values);
   var useAnalyzer = summaryPaths.any((s) => !s.endsWith('.dill'));
   var sdkSummaryPath = argResults['dart-sdk-summary'] as String;
-  String librarySpecPath;
+  var librarySpecPath = argResults['libraries-file'] as String;
   if (sdkSummaryPath == null) {
     sdkSummaryPath =
         useAnalyzer ? defaultAnalyzerSdkSummaryPath : defaultSdkSummaryPath;
-    librarySpecPath = defaultLibrarySpecPath;
-  } else {
+    librarySpecPath ??= defaultLibrarySpecPath;
+  }
+
+  if (librarySpecPath == null) {
     // TODO(jmesserly): the `isSupported` bit should be included in the SDK
     // summary, but front_end requires a separate file, so we have to work
-    // around that, while avoiding yet another command line option.
+    // around that, while not requiring yet another command line option.
     //
     // Right now we search two locations: one level above the SDK summary
     // (this works for the build and SDK layouts) or next to the SDK summary
@@ -217,6 +223,7 @@
   bool trackWidgetCreation =
       argResults['track-widget-creation'] as bool ?? false;
 
+  var compileSdk = argResults['compile-sdk'] == true;
   var oldCompilerState = compilerState;
   List<Component> doneInputSummaries;
   fe.IncrementalCompiler incrementalCompiler;
@@ -224,7 +231,9 @@
   if (useAnalyzer || !useIncrementalCompiler) {
     compilerState = await fe.initializeCompiler(
         oldCompilerState,
-        sourcePathToUri(sdkSummaryPath),
+        compileSdk,
+        sourcePathToUri(getSdkPath()),
+        compileSdk ? null : sourcePathToUri(sdkSummaryPath),
         sourcePathToUri(packageFile),
         sourcePathToUri(librarySpecPath),
         summaryModules.keys.toList(),
@@ -237,7 +246,9 @@
     compilerState = await fe.initializeIncrementalCompiler(
         oldCompilerState,
         doneInputSummaries,
-        sourcePathToUri(sdkSummaryPath),
+        compileSdk,
+        sourcePathToUri(getSdkPath()),
+        compileSdk ? null : sourcePathToUri(sdkSummaryPath),
         sourcePathToUri(packageFile),
         sourcePathToUri(librarySpecPath),
         summaryModules.keys.toList(),
@@ -456,7 +467,7 @@
 
 bool _checkForDartMirrorsImport(Component component) {
   for (var library in component.libraries) {
-    if (library.isExternal) continue;
+    if (library.isExternal || library.importUri.scheme == 'dart') continue;
     for (var dep in library.dependencies) {
       var uri = dep.targetLibrary.importUri;
       if (uri.scheme == 'dart' && uri.path == 'mirrors') {
diff --git a/pkg/dev_compiler/lib/src/kernel/compiler.dart b/pkg/dev_compiler/lib/src/kernel/compiler.dart
index 13f7c0b..531ca40 100644
--- a/pkg/dev_compiler/lib/src/kernel/compiler.dart
+++ b/pkg/dev_compiler/lib/src/kernel/compiler.dart
@@ -3127,6 +3127,8 @@
       // TODO(jmesserly): figure out why this is throwing. Perhaps the file URI
       // and offset are mismatched and don't correspond to the same source?
       return null;
+    } on RangeError catch (_) {
+      return null;
     }
   }
 
diff --git a/pkg/dev_compiler/test/js/builder_test.dart b/pkg/dev_compiler/test/js/builder_test.dart
index d294048..0dfae14 100644
--- a/pkg/dev_compiler/test/js/builder_test.dart
+++ b/pkg/dev_compiler/test/js/builder_test.dart
@@ -13,7 +13,7 @@
 
 _checkExpression(String src) => _check(_parser(src).parseExpression(), src);
 
-main() {
+void main() {
   group('MiniJsParser', () {
     // TODO(ochafik): Add more coverage.
     test('parses classes with complex members', () {
diff --git a/pkg/dev_compiler/test/modular/data/js_interop/.packages b/pkg/dev_compiler/test/modular/data/js_interop/.packages
deleted file mode 100644
index 68d6156..0000000
--- a/pkg/dev_compiler/test/modular/data/js_interop/.packages
+++ /dev/null
@@ -1 +0,0 @@
-js:../../../../../../pkg/js/lib
diff --git a/pkg/dev_compiler/test/modular/modular_test.dart b/pkg/dev_compiler/test/modular_suite.dart
similarity index 79%
rename from pkg/dev_compiler/test/modular/modular_test.dart
rename to pkg/dev_compiler/test/modular_suite.dart
index 8e96f72..78c22cb 100644
--- a/pkg/dev_compiler/test/modular/modular_test.dart
+++ b/pkg/dev_compiler/test/modular_suite.dart
@@ -12,15 +12,16 @@
 import 'package:modular_test/src/suite.dart';
 import 'package:modular_test/src/runner.dart';
 
-Uri sdkRoot = Platform.script.resolve("../../../../");
+Uri sdkRoot = Platform.script.resolve("../../../");
 Options _options;
+String _dartdevcScript;
+String _kernelWorkerScript;
 main(List<String> args) async {
   _options = Options.parse(args);
-  var suiteFolder = Platform.script.resolve('data/');
-  var suiteName = relativize(suiteFolder, sdkRoot).path;
+  await _resolveScripts();
   await runSuite(
-      suiteFolder,
-      suiteName.substring(0, suiteName.length - 1), // remove trailing /
+      sdkRoot.resolve('tests/modular/'),
+      'tests/modular',
       _options,
       new IOPipeline([
         SourceToSummaryDillStep(),
@@ -62,7 +63,7 @@
     //
     // Files in packages are defined in terms of `package:` URIs, while
     // non-package URIs are defined using the `dart-dev-app` scheme.
-    String rootScheme = module.isSdk ? 'dart-dev-sdk' : 'dev-dart-app';
+    String rootScheme = module.isSdk ? 'dev-dart-sdk' : 'dev-dart-app';
     String sourceToImportUri(Uri relativeUri) =>
         _sourceToImportUri(module, rootScheme, relativeUri);
 
@@ -81,7 +82,7 @@
     }
 
     List<String> args = [
-      sdkRoot.resolve("utils/bazel/kernel_worker.dart").toFilePath(),
+      _kernelWorkerScript,
       '--summary-only',
       '--target',
       'ddc',
@@ -129,60 +130,54 @@
   Future<void> execute(Module module, Uri root, ModuleDataToRelativeUri toUri,
       List<String> flags) async {
     if (_options.verbose) print("\nstep: ddk on $module");
-    var sdkRoot = Platform.script.resolve("../../../../");
 
     Set<Module> transitiveDependencies = computeTransitiveDependencies(module);
     _createPackagesFile(module, root, transitiveDependencies);
 
-    List<String> args;
+    String rootScheme = module.isSdk ? 'dev-dart-sdk' : 'dev-dart-app';
+    List<String> sources;
+    List<String> extraArgs;
     if (module.isSdk) {
-      // TODO(sigmund): this produces an error because kernel_sdk doesn't have a
-      // way to provide a .packages file. Technically is not needed, but it
-      // would be nice to proceed without any error messages.
-      args = [
-        '--packages=${sdkRoot.toFilePath()}/.packages',
-        sdkRoot.resolve('pkg/dev_compiler/tool/kernel_sdk.dart').toFilePath(),
-        '--libraries',
-        'sdk/lib/libraries.json',
-        '--output',
-        '${toUri(module, jsId)}.ignored_dill',
-      ];
-      var result = await _runProcess(
-          Platform.resolvedExecutable, args, root.toFilePath());
-      _checkExitCode(result, this, module);
-      await File.fromUri(root.resolve('es6/dart_sdk.js'))
-          .copy(root.resolveUri(toUri(module, jsId)).toFilePath());
+      sources = ['dart:core'];
+      extraArgs = ['--compile-sdk'];
+      assert(transitiveDependencies.isEmpty);
     } else {
-      Uri output = toUri(module, jsId);
       Module sdkModule = module.dependencies.firstWhere((m) => m.isSdk);
-      String sourceToImportUri(Uri relativeUri) =>
-          _sourceToImportUri(module, 'dev-dart-app', relativeUri);
-
-      args = [
-        '--packages=${sdkRoot.toFilePath()}/.packages',
-        sdkRoot.resolve('pkg/dev_compiler/bin/dartdevc.dart').toFilePath(),
-        '--kernel',
-        '--modules=es6',
-        '--no-summarize',
-        '--no-source-map',
-        '--multi-root-scheme',
-        'dev-dart-app',
+      sources = module.sources
+          .map((relativeUri) =>
+              _sourceToImportUri(module, rootScheme, relativeUri))
+          .toList();
+      extraArgs = [
         '--dart-sdk-summary',
         '${toUri(sdkModule, dillId)}',
         '--packages',
         '.packages',
-        ...module.sources.map(sourceToImportUri),
-        for (String flag in flags) '--enable-experiment=$flag',
-        ...(transitiveDependencies
-            .where((m) => !m.isSdk)
-            .expand((m) => ['-s', '${toUri(m, dillId)}=${m.name}'])),
-        '-o',
-        '$output',
       ];
-      var result = await _runProcess(
-          Platform.resolvedExecutable, args, root.toFilePath());
-      _checkExitCode(result, this, module);
     }
+
+    Uri output = toUri(module, jsId);
+
+    List<String> args = [
+      '--packages=${sdkRoot.toFilePath()}/.packages',
+      _dartdevcScript,
+      '--kernel',
+      '--modules=es6',
+      '--no-summarize',
+      '--no-source-map',
+      '--multi-root-scheme',
+      rootScheme,
+      ...sources,
+      ...extraArgs,
+      for (String flag in flags) '--enable-experiment=$flag',
+      ...(transitiveDependencies
+          .where((m) => !m.isSdk)
+          .expand((m) => ['-s', '${toUri(m, dillId)}=${m.name}'])),
+      '-o',
+      '$output',
+    ];
+    var result =
+        await _runProcess(Platform.resolvedExecutable, args, root.toFilePath());
+    _checkExitCode(result, this, module);
   }
 
   @override
@@ -211,7 +206,6 @@
   Future<void> execute(Module module, Uri root, ModuleDataToRelativeUri toUri,
       List<String> flags) async {
     if (_options.verbose) print("\nstep: d8 on $module");
-    var sdkRoot = Platform.script.resolve("../../../../");
 
     // Rename sdk.js to dart_sdk.js (the alternative, but more hermetic solution
     // would be to rename the import on all other .js files, but seems
@@ -318,3 +312,24 @@
     return '$rootScheme:/$relativeUri';
   }
 }
+
+Future<void> _resolveScripts() async {
+  Future<String> resolve(
+      String sdkSourcePath, String relativeSnapshotPath) async {
+    String result = sdkRoot.resolve(sdkSourcePath).toFilePath();
+    if (_options.useSdk) {
+      String snapshot = Uri.file(Platform.resolvedExecutable)
+          .resolve(relativeSnapshotPath)
+          .toFilePath();
+      if (await File(snapshot).exists()) {
+        return snapshot;
+      }
+    }
+    return result;
+  }
+
+  _dartdevcScript = await resolve(
+      'pkg/dev_compiler/bin/dartdevc.dart', 'snapshots/dartdevc.dart.snapshot');
+  _kernelWorkerScript = await resolve('utils/bazel/kernel_worker.dart',
+      'snapshots/kernel_worker.dart.snapshot');
+}
diff --git a/pkg/dev_compiler/test/nullable_inference_test.dart b/pkg/dev_compiler/test/nullable_inference_test.dart
index 2390343..7690119 100644
--- a/pkg/dev_compiler/test/nullable_inference_test.dart
+++ b/pkg/dev_compiler/test/nullable_inference_test.dart
@@ -576,8 +576,8 @@
   var mainUri = Uri.file('/memory/test.dart');
   _fileSystem.entityForUri(mainUri).writeAsStringSync(code);
   var oldCompilerState = _compilerState;
-  _compilerState = await fe.initializeCompiler(oldCompilerState, sdkUri,
-      packagesUri, null, [], DevCompilerTarget(TargetFlags()),
+  _compilerState = await fe.initializeCompiler(oldCompilerState, false, null,
+      sdkUri, packagesUri, null, [], DevCompilerTarget(TargetFlags()),
       fileSystem: _fileSystem, experiments: const {});
   if (!identical(oldCompilerState, _compilerState)) inference = null;
   fe.DdcResult result =
diff --git a/pkg/dev_compiler/test/options/options_test.dart b/pkg/dev_compiler/test/options/options_test.dart
index 3f5b3b1..7f78142 100644
--- a/pkg/dev_compiler/test/options/options_test.dart
+++ b/pkg/dev_compiler/test/options/options_test.dart
@@ -24,7 +24,7 @@
 
 final sdkSummaryArgs = ['--$sdkSummaryPathOption', sdkSummaryFile];
 
-main() {
+void main() {
   test('basic', () {
     var options = AnalyzerOptions.basic()..analysisRoot = optionsDir;
     var driver = CompilerAnalysisDriver(options);
diff --git a/pkg/dev_compiler/test/sourcemap/ddc_common.dart b/pkg/dev_compiler/test/sourcemap/ddc_common.dart
index f6f4838..4308f5b 100644
--- a/pkg/dev_compiler/test/sourcemap/ddc_common.dart
+++ b/pkg/dev_compiler/test/sourcemap/ddc_common.dart
@@ -205,6 +205,6 @@
 Uri selfUri = currentMirrorSystem()
     .findLibrary(#dev_compiler.test.sourcemap.ddc_common)
     .uri;
-String d8Preambles = File.fromUri(
-        selfUri.resolve('../../tool/input_sdk/private/preambles/d8.js'))
+String d8Preambles = File.fromUri(selfUri.resolve(
+        '../../../../sdk/lib/_internal/js_dev_runtime/private/preambles/d8.js'))
     .readAsStringSync();
diff --git a/pkg/dev_compiler/test/sourcemap/sourcemaps_ddc_suite.dart b/pkg/dev_compiler/test/sourcemap/sourcemaps_ddc_suite.dart
index 3818d6f..275870c 100644
--- a/pkg/dev_compiler/test/sourcemap/sourcemaps_ddc_suite.dart
+++ b/pkg/dev_compiler/test/sourcemap/sourcemaps_ddc_suite.dart
@@ -85,4 +85,5 @@
   }
 }
 
-main(List<String> arguments) => runMe(arguments, createContext, "testing.json");
+void main(List<String> arguments) =>
+    runMe(arguments, createContext, "testing.json");
diff --git a/pkg/dev_compiler/test/sourcemap/sourcemaps_ddk_suite.dart b/pkg/dev_compiler/test/sourcemap/sourcemaps_ddk_suite.dart
index 511c10b..1d1fb94 100644
--- a/pkg/dev_compiler/test/sourcemap/sourcemaps_ddk_suite.dart
+++ b/pkg/dev_compiler/test/sourcemap/sourcemaps_ddk_suite.dart
@@ -104,4 +104,5 @@
   }
 }
 
-main(List<String> arguments) => runMe(arguments, createContext, "testing.json");
+void main(List<String> arguments) =>
+    runMe(arguments, createContext, "testing.json");
diff --git a/pkg/dev_compiler/test/sourcemap/stacktrace_ddc_suite.dart b/pkg/dev_compiler/test/sourcemap/stacktrace_ddc_suite.dart
index 1143568..d137aa1 100644
--- a/pkg/dev_compiler/test/sourcemap/stacktrace_ddc_suite.dart
+++ b/pkg/dev_compiler/test/sourcemap/stacktrace_ddc_suite.dart
@@ -19,4 +19,5 @@
   ];
 }
 
-main(List<String> arguments) => runMe(arguments, createContext, "testing.json");
+void main(List<String> arguments) =>
+    runMe(arguments, createContext, "testing.json");
diff --git a/pkg/dev_compiler/test/sourcemap/stacktrace_ddk_suite.dart b/pkg/dev_compiler/test/sourcemap/stacktrace_ddk_suite.dart
index aeaca51..94d26c6 100644
--- a/pkg/dev_compiler/test/sourcemap/stacktrace_ddk_suite.dart
+++ b/pkg/dev_compiler/test/sourcemap/stacktrace_ddk_suite.dart
@@ -28,4 +28,5 @@
   }
 }
 
-main(List<String> arguments) => runMe(arguments, createContext, "testing.json");
+void main(List<String> arguments) =>
+    runMe(arguments, createContext, "testing.json");
diff --git a/pkg/dev_compiler/test/sourcemap/stacktrace_testfiles/null_instance_field.dart b/pkg/dev_compiler/test/sourcemap/stacktrace_testfiles/null_instance_field.dart
index a624b2e..131d057 100644
--- a/pkg/dev_compiler/test/sourcemap/stacktrace_testfiles/null_instance_field.dart
+++ b/pkg/dev_compiler/test/sourcemap/stacktrace_testfiles/null_instance_field.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.
 
-main() {
+void main() {
   /*1:main*/ test(Class());
 }
 
diff --git a/pkg/dev_compiler/test/sourcemap/stacktrace_testfiles/null_interceptor_field.dart b/pkg/dev_compiler/test/sourcemap/stacktrace_testfiles/null_interceptor_field.dart
index 21fc03c..beec13d 100644
--- a/pkg/dev_compiler/test/sourcemap/stacktrace_testfiles/null_interceptor_field.dart
+++ b/pkg/dev_compiler/test/sourcemap/stacktrace_testfiles/null_interceptor_field.dart
@@ -6,7 +6,7 @@
   get length => 3; // ensures we build an interceptor for `.length`
 }
 
-main() {
+void main() {
   confuse('').trim(); // includes some code above the interceptors
   confuse([]).length;
   confuse(MyType()).length;
diff --git a/pkg/dev_compiler/test/sourcemap/stacktrace_testfiles/rethrow.dart b/pkg/dev_compiler/test/sourcemap/stacktrace_testfiles/rethrow.dart
index 2354061..82a3819 100644
--- a/pkg/dev_compiler/test/sourcemap/stacktrace_testfiles/rethrow.dart
+++ b/pkg/dev_compiler/test/sourcemap/stacktrace_testfiles/rethrow.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.
 
-main() {
+void main() {
   /*1:main*/ test();
 }
 
diff --git a/pkg/dev_compiler/test/sourcemap/stacktrace_testfiles/throw_in_async.dart b/pkg/dev_compiler/test/sourcemap/stacktrace_testfiles/throw_in_async.dart
index 0f6165e..ea6ab10 100644
--- a/pkg/dev_compiler/test/sourcemap/stacktrace_testfiles/throw_in_async.dart
+++ b/pkg/dev_compiler/test/sourcemap/stacktrace_testfiles/throw_in_async.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.
 
-main() {
+void main() {
   /*1:main*/ test();
 }
 
diff --git a/pkg/dev_compiler/test/sourcemap/stacktrace_testfiles/throw_in_awaited_async.dart b/pkg/dev_compiler/test/sourcemap/stacktrace_testfiles/throw_in_awaited_async.dart
index 2801397..5e4721a 100644
--- a/pkg/dev_compiler/test/sourcemap/stacktrace_testfiles/throw_in_awaited_async.dart
+++ b/pkg/dev_compiler/test/sourcemap/stacktrace_testfiles/throw_in_awaited_async.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.
 
-main() {
+void main() {
   /*1:main*/ test1();
 }
 
diff --git a/pkg/dev_compiler/test/sourcemap/stacktrace_testfiles/throw_in_constructor.dart b/pkg/dev_compiler/test/sourcemap/stacktrace_testfiles/throw_in_constructor.dart
index fde3136..f57db8f 100644
--- a/pkg/dev_compiler/test/sourcemap/stacktrace_testfiles/throw_in_constructor.dart
+++ b/pkg/dev_compiler/test/sourcemap/stacktrace_testfiles/throw_in_constructor.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.
 
-main() {
+void main() {
   // ignore: UNUSED_LOCAL_VARIABLE
   var /*ddc.1:main*/ c = /*ddk.1:main*/ Class();
 }
diff --git a/pkg/dev_compiler/test/sourcemap/stacktrace_testfiles/throw_in_constructor_from_async.dart b/pkg/dev_compiler/test/sourcemap/stacktrace_testfiles/throw_in_constructor_from_async.dart
index 907777c..6d251e8 100644
--- a/pkg/dev_compiler/test/sourcemap/stacktrace_testfiles/throw_in_constructor_from_async.dart
+++ b/pkg/dev_compiler/test/sourcemap/stacktrace_testfiles/throw_in_constructor_from_async.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.
 
-main() {
+void main() {
   // This call is no longer on the stack when the error is thrown.
   /*1:main*/ test();
 }
diff --git a/pkg/dev_compiler/test/sourcemap/stacktrace_testfiles/throw_in_instance_method.dart b/pkg/dev_compiler/test/sourcemap/stacktrace_testfiles/throw_in_instance_method.dart
index 4261c48..2fbc97f 100644
--- a/pkg/dev_compiler/test/sourcemap/stacktrace_testfiles/throw_in_instance_method.dart
+++ b/pkg/dev_compiler/test/sourcemap/stacktrace_testfiles/throw_in_instance_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.
 
-main() {
+void main() {
   var c = Class();
   c. /*1:main*/ test();
 }
diff --git a/pkg/dev_compiler/test/sourcemap/stacktrace_testfiles/throw_in_main.dart b/pkg/dev_compiler/test/sourcemap/stacktrace_testfiles/throw_in_main.dart
index f43b4d4..c7043fe 100644
--- a/pkg/dev_compiler/test/sourcemap/stacktrace_testfiles/throw_in_main.dart
+++ b/pkg/dev_compiler/test/sourcemap/stacktrace_testfiles/throw_in_main.dart
@@ -2,6 +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.
 
-main() {
+void main() {
   /*1:main*/ throw '>ExceptionMarker<';
 }
diff --git a/pkg/dev_compiler/test/sourcemap/stacktrace_testfiles/throw_in_static_method.dart b/pkg/dev_compiler/test/sourcemap/stacktrace_testfiles/throw_in_static_method.dart
index 4c4e5b8..658db6a 100644
--- a/pkg/dev_compiler/test/sourcemap/stacktrace_testfiles/throw_in_static_method.dart
+++ b/pkg/dev_compiler/test/sourcemap/stacktrace_testfiles/throw_in_static_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.
 
-main() {
+void main() {
   /*ddc.1:main*/ Class. /*ddk.1:main*/ test();
 }
 
diff --git a/pkg/dev_compiler/test/sourcemap/stacktrace_testfiles/throw_in_top_level_method.dart b/pkg/dev_compiler/test/sourcemap/stacktrace_testfiles/throw_in_top_level_method.dart
index 962e60c..d03d29a 100644
--- a/pkg/dev_compiler/test/sourcemap/stacktrace_testfiles/throw_in_top_level_method.dart
+++ b/pkg/dev_compiler/test/sourcemap/stacktrace_testfiles/throw_in_top_level_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.
 
-main() {
+void main() {
   /*1:main*/ test();
 }
 
diff --git a/pkg/dev_compiler/test/sourcemap/stacktrace_testfiles/throw_in_top_level_method_from_async.dart b/pkg/dev_compiler/test/sourcemap/stacktrace_testfiles/throw_in_top_level_method_from_async.dart
index f58dde6..f5240ee 100644
--- a/pkg/dev_compiler/test/sourcemap/stacktrace_testfiles/throw_in_top_level_method_from_async.dart
+++ b/pkg/dev_compiler/test/sourcemap/stacktrace_testfiles/throw_in_top_level_method_from_async.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.
 
-main() {
+void main() {
   /*1:main*/ test1();
 }
 
diff --git a/pkg/dev_compiler/test/sourcemap/stacktrace_testfiles/throw_in_try_catch.dart b/pkg/dev_compiler/test/sourcemap/stacktrace_testfiles/throw_in_try_catch.dart
index 2bb8501..1da6f77 100644
--- a/pkg/dev_compiler/test/sourcemap/stacktrace_testfiles/throw_in_try_catch.dart
+++ b/pkg/dev_compiler/test/sourcemap/stacktrace_testfiles/throw_in_try_catch.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.
 
-main() {
+void main() {
   /*1:main*/ test();
 }
 
diff --git a/pkg/dev_compiler/test/sourcemap/stacktrace_testfiles/throw_in_try_finally.dart b/pkg/dev_compiler/test/sourcemap/stacktrace_testfiles/throw_in_try_finally.dart
index fe97b70..7bfcd1a 100644
--- a/pkg/dev_compiler/test/sourcemap/stacktrace_testfiles/throw_in_try_finally.dart
+++ b/pkg/dev_compiler/test/sourcemap/stacktrace_testfiles/throw_in_try_finally.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.
 
-main() {
+void main() {
   /*1:main*/ test();
 }
 
diff --git a/pkg/dev_compiler/test/sourcemap/testfiles/breakpoint_on_function_line_breaks_in_body.dart b/pkg/dev_compiler/test/sourcemap/testfiles/breakpoint_on_function_line_breaks_in_body.dart
index c133da3..e7f354b 100644
--- a/pkg/dev_compiler/test/sourcemap/testfiles/breakpoint_on_function_line_breaks_in_body.dart
+++ b/pkg/dev_compiler/test/sourcemap/testfiles/breakpoint_on_function_line_breaks_in_body.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.
 
-main() {
+void main() {
   foo();
 }
 
diff --git a/pkg/dev_compiler/test/sourcemap/testfiles/call_on_field_in_class.dart b/pkg/dev_compiler/test/sourcemap/testfiles/call_on_field_in_class.dart
index 69b242d..567e68e 100644
--- a/pkg/dev_compiler/test/sourcemap/testfiles/call_on_field_in_class.dart
+++ b/pkg/dev_compiler/test/sourcemap/testfiles/call_on_field_in_class.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.
 
-main() {
+void main() {
   /* bl */ var foo = /*sl:1*/ Foo();
   foo.foo = foo. /*sl:2*/ fooMethod;
   foo /*sl:3*/ .fooMethod();
diff --git a/pkg/dev_compiler/test/sourcemap/testfiles/hello_async.dart b/pkg/dev_compiler/test/sourcemap/testfiles/hello_async.dart
index 6758e46..cfa5b12 100644
--- a/pkg/dev_compiler/test/sourcemap/testfiles/hello_async.dart
+++ b/pkg/dev_compiler/test/sourcemap/testfiles/hello_async.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.
 
-main() {
+void main() {
   /*bl*/
   /*s:1*/ foo();
   /*s:4*/
diff --git a/pkg/dev_compiler/test/sourcemap/testfiles/hello_call.dart b/pkg/dev_compiler/test/sourcemap/testfiles/hello_call.dart
index 0d3d2e4..a5662bb 100644
--- a/pkg/dev_compiler/test/sourcemap/testfiles/hello_call.dart
+++ b/pkg/dev_compiler/test/sourcemap/testfiles/hello_call.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.
 
-main() {
+void main() {
   /*bl*/
   /*s:1*/ foo();
 }
diff --git a/pkg/dev_compiler/test/sourcemap/testfiles/hello_class_call.dart b/pkg/dev_compiler/test/sourcemap/testfiles/hello_class_call.dart
index 31e4aa7..de068a9 100644
--- a/pkg/dev_compiler/test/sourcemap/testfiles/hello_class_call.dart
+++ b/pkg/dev_compiler/test/sourcemap/testfiles/hello_class_call.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.
 
-main() {
+void main() {
   /*bl*/
   Foo foo = Foo();
   foo.foo();
diff --git a/pkg/dev_compiler/test/sourcemap/testfiles/hello_sane_column_on_print_return_value.dart b/pkg/dev_compiler/test/sourcemap/testfiles/hello_sane_column_on_print_return_value.dart
index 6c1b07afa..49408f2 100644
--- a/pkg/dev_compiler/test/sourcemap/testfiles/hello_sane_column_on_print_return_value.dart
+++ b/pkg/dev_compiler/test/sourcemap/testfiles/hello_sane_column_on_print_return_value.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.
 
-main() {
+void main() {
   /*bc:3*/ print(/*bc:1*/ foo());
 }
 
diff --git a/pkg/dev_compiler/test/sourcemap/testfiles/hello_world.dart b/pkg/dev_compiler/test/sourcemap/testfiles/hello_world.dart
index 59746a1..019e2de 100644
--- a/pkg/dev_compiler/test/sourcemap/testfiles/hello_world.dart
+++ b/pkg/dev_compiler/test/sourcemap/testfiles/hello_world.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.
 
-main() {
+void main() {
   /*nb*/ // no break on empty line
   /*bl*/ print("Hello, World!");
 /*s:1*/
diff --git a/pkg/dev_compiler/test/sourcemap/testfiles/method_call_with_named_parameters.dart b/pkg/dev_compiler/test/sourcemap/testfiles/method_call_with_named_parameters.dart
index 426e385..f665d7c 100644
--- a/pkg/dev_compiler/test/sourcemap/testfiles/method_call_with_named_parameters.dart
+++ b/pkg/dev_compiler/test/sourcemap/testfiles/method_call_with_named_parameters.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.
 
-main() {
+void main() {
   foo(/*bc:1*/ bar(), baz: /*bc:2*/ baz());
   /*nbb:0:4*/
 }
diff --git a/pkg/dev_compiler/test/sourcemap/testfiles/method_call_with_named_parameters_no_given.dart b/pkg/dev_compiler/test/sourcemap/testfiles/method_call_with_named_parameters_no_given.dart
index 6091682..763d098 100644
--- a/pkg/dev_compiler/test/sourcemap/testfiles/method_call_with_named_parameters_no_given.dart
+++ b/pkg/dev_compiler/test/sourcemap/testfiles/method_call_with_named_parameters_no_given.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.
 
-main() {
+void main() {
   foo(/*bc:1*/ bar());
   /*nbb:0:3*/
 }
diff --git a/pkg/dev_compiler/test/sourcemap/testfiles/next_through_assert.dart b/pkg/dev_compiler/test/sourcemap/testfiles/next_through_assert.dart
index 0b692fa..bcf0307 100644
--- a/pkg/dev_compiler/test/sourcemap/testfiles/next_through_assert.dart
+++ b/pkg/dev_compiler/test/sourcemap/testfiles/next_through_assert.dart
@@ -3,7 +3,7 @@
 // BSD-style license that can be found in the LICENSE file.
 
 /*Debugger:stepOver*/
-main() {
+void main() {
   assert(/*bc:1*/ foo());
 }
 
diff --git a/pkg/dev_compiler/test/sourcemap/testfiles/next_through_assign_call_test.dart b/pkg/dev_compiler/test/sourcemap/testfiles/next_through_assign_call_test.dart
index f44926d..b4941e7 100644
--- a/pkg/dev_compiler/test/sourcemap/testfiles/next_through_assign_call_test.dart
+++ b/pkg/dev_compiler/test/sourcemap/testfiles/next_through_assign_call_test.dart
@@ -3,7 +3,7 @@
 // BSD-style license that can be found in the LICENSE file.
 
 /*Debugger:stepOver*/
-main() {
+void main() {
   /*nb*/ int a;
   /*nb*/ int b;
   a = b = /*bc:1*/ foo();
diff --git a/pkg/dev_compiler/test/sourcemap/testfiles/next_through_assign_int_test.dart b/pkg/dev_compiler/test/sourcemap/testfiles/next_through_assign_int_test.dart
index bed6ec6..5a4452e 100644
--- a/pkg/dev_compiler/test/sourcemap/testfiles/next_through_assign_int_test.dart
+++ b/pkg/dev_compiler/test/sourcemap/testfiles/next_through_assign_int_test.dart
@@ -3,7 +3,7 @@
 // BSD-style license that can be found in the LICENSE file.
 
 /*Debugger:stepOver*/
-main() {
+void main() {
   /*nb*/ int a;
   /*nb*/ int b;
   /*bl*/
diff --git a/pkg/dev_compiler/test/sourcemap/testfiles/next_through_catch_test.dart b/pkg/dev_compiler/test/sourcemap/testfiles/next_through_catch_test.dart
index 777af94..fe9fde0 100644
--- a/pkg/dev_compiler/test/sourcemap/testfiles/next_through_catch_test.dart
+++ b/pkg/dev_compiler/test/sourcemap/testfiles/next_through_catch_test.dart
@@ -4,7 +4,7 @@
 
 /*Debugger:stepOver*/
 
-main() {
+void main() {
   /*bl*/
   try {
     /*sl:1*/ var value = "world";
diff --git a/pkg/dev_compiler/test/sourcemap/testfiles/next_through_for_each_loop_test.dart b/pkg/dev_compiler/test/sourcemap/testfiles/next_through_for_each_loop_test.dart
index 112a8fb..d59f77b 100644
--- a/pkg/dev_compiler/test/sourcemap/testfiles/next_through_for_each_loop_test.dart
+++ b/pkg/dev_compiler/test/sourcemap/testfiles/next_through_for_each_loop_test.dart
@@ -3,7 +3,7 @@
 // BSD-style license that can be found in the LICENSE file.
 
 /*Debugger:stepOver*/
-main() {
+void main() {
   /*bl*/ /*sl:1*/ List<int> data = [1, 2, 3];
   for (
       // comment forcing formatting
diff --git a/pkg/dev_compiler/test/sourcemap/testfiles/next_through_for_loop_with_break_and_continue_test.dart b/pkg/dev_compiler/test/sourcemap/testfiles/next_through_for_loop_with_break_and_continue_test.dart
index c51f64f..f562c22 100644
--- a/pkg/dev_compiler/test/sourcemap/testfiles/next_through_for_loop_with_break_and_continue_test.dart
+++ b/pkg/dev_compiler/test/sourcemap/testfiles/next_through_for_loop_with_break_and_continue_test.dart
@@ -3,7 +3,7 @@
 // BSD-style license that can be found in the LICENSE file.
 
 /*Debugger:stepOver*/
-main() {
+void main() {
   /*bl*/ /*sl:1*/ int count = 0;
   for (/*sl:2*/ int i = 0;
       /*sl:3*/ /*sl:8*/ /*sl:13*/ /*sl:17*/ /*nbb:18:21*/ i < 42;
diff --git a/pkg/dev_compiler/test/sourcemap/testfiles/next_through_is_and_as_test.dart b/pkg/dev_compiler/test/sourcemap/testfiles/next_through_is_and_as_test.dart
index d3b49d1..2f90736 100644
--- a/pkg/dev_compiler/test/sourcemap/testfiles/next_through_is_and_as_test.dart
+++ b/pkg/dev_compiler/test/sourcemap/testfiles/next_through_is_and_as_test.dart
@@ -4,7 +4,7 @@
 
 /*Debugger:stepOver*/
 
-main() {
+void main() {
   /*bl*/
   /*sl:1*/ var i = 42.42;
   /*sl:2*/ var hex = 0x42;
diff --git a/pkg/dev_compiler/test/sourcemap/testfiles/next_through_map_creation.dart b/pkg/dev_compiler/test/sourcemap/testfiles/next_through_map_creation.dart
index 83e19bb..8d38e83 100644
--- a/pkg/dev_compiler/test/sourcemap/testfiles/next_through_map_creation.dart
+++ b/pkg/dev_compiler/test/sourcemap/testfiles/next_through_map_creation.dart
@@ -4,7 +4,7 @@
 
 /*Debugger:stepOver*/
 
-main() {
+void main() {
   /*bl*/
   var x = {/*bc:1*/ foo(): /*bc:2*/ bar() };
   /*sl:3*/ print(x);
diff --git a/pkg/dev_compiler/test/sourcemap/testfiles/next_through_multi_catch_test.dart b/pkg/dev_compiler/test/sourcemap/testfiles/next_through_multi_catch_test.dart
index e2c30d0..d2ecc4c 100644
--- a/pkg/dev_compiler/test/sourcemap/testfiles/next_through_multi_catch_test.dart
+++ b/pkg/dev_compiler/test/sourcemap/testfiles/next_through_multi_catch_test.dart
@@ -4,7 +4,7 @@
 
 /*Debugger:stepOver*/
 
-main() {
+void main() {
   /*bl*/
   try {
     /*sl:1*/ throw "Boom!";
diff --git a/pkg/dev_compiler/test/sourcemap/testfiles/next_through_operator_bracket_on_super_test.dart b/pkg/dev_compiler/test/sourcemap/testfiles/next_through_operator_bracket_on_super_test.dart
index 27d4995..de8c40d 100644
--- a/pkg/dev_compiler/test/sourcemap/testfiles/next_through_operator_bracket_on_super_test.dart
+++ b/pkg/dev_compiler/test/sourcemap/testfiles/next_through_operator_bracket_on_super_test.dart
@@ -21,7 +21,7 @@
   }
 }
 
-main() {
+void main() {
   Class3 c = Class3();
   c[42];
   c.code();
diff --git a/pkg/dev_compiler/test/sourcemap/testfiles/next_through_operator_bracket_on_this_test.dart b/pkg/dev_compiler/test/sourcemap/testfiles/next_through_operator_bracket_on_this_test.dart
index d529139..f0f1130 100644
--- a/pkg/dev_compiler/test/sourcemap/testfiles/next_through_operator_bracket_on_this_test.dart
+++ b/pkg/dev_compiler/test/sourcemap/testfiles/next_through_operator_bracket_on_this_test.dart
@@ -13,7 +13,7 @@
   }
 }
 
-main() {
+void main() {
   Class2 c = Class2();
   c[42];
   c.code();
diff --git a/pkg/dev_compiler/test/sourcemap/testfiles/next_through_operator_bracket_test.dart b/pkg/dev_compiler/test/sourcemap/testfiles/next_through_operator_bracket_test.dart
index c3d7835..90fa680 100644
--- a/pkg/dev_compiler/test/sourcemap/testfiles/next_through_operator_bracket_test.dart
+++ b/pkg/dev_compiler/test/sourcemap/testfiles/next_through_operator_bracket_test.dart
@@ -13,7 +13,7 @@
   }
 }
 
-main() {
+void main() {
   /*bl*/ /*sl:1*/ Class2 c = Class2();
   c /*sl:2*/ [42];
   c /*sl:3*/ .code();
diff --git a/pkg/dev_compiler/test/sourcemap/testfiles/next_through_static_set.dart b/pkg/dev_compiler/test/sourcemap/testfiles/next_through_static_set.dart
index a621285..7bdd6e4 100644
--- a/pkg/dev_compiler/test/sourcemap/testfiles/next_through_static_set.dart
+++ b/pkg/dev_compiler/test/sourcemap/testfiles/next_through_static_set.dart
@@ -6,7 +6,7 @@
 
 var bar = 0;
 
-main() {
+void main() {
   bar = /*bc:1*/ foo();
 }
 
diff --git a/pkg/dev_compiler/test/sourcemap/testfiles/next_through_string_concatenation.dart b/pkg/dev_compiler/test/sourcemap/testfiles/next_through_string_concatenation.dart
index 38c5aa5..610c2aa 100644
--- a/pkg/dev_compiler/test/sourcemap/testfiles/next_through_string_concatenation.dart
+++ b/pkg/dev_compiler/test/sourcemap/testfiles/next_through_string_concatenation.dart
@@ -4,7 +4,7 @@
 
 /*Debugger:stepOver*/
 
-main() {
+void main() {
   var qux;
   qux = "${/*bc:1*/ foo()} x ${/*bc:2*/ bar()} x ${/*bc:3*/ baz()}";
   print(qux);
diff --git a/pkg/dev_compiler/test/sourcemap/testfiles/next_through_string_plus.dart b/pkg/dev_compiler/test/sourcemap/testfiles/next_through_string_plus.dart
index 382044e..bc5d2f5 100644
--- a/pkg/dev_compiler/test/sourcemap/testfiles/next_through_string_plus.dart
+++ b/pkg/dev_compiler/test/sourcemap/testfiles/next_through_string_plus.dart
@@ -4,7 +4,7 @@
 
 /*Debugger:stepOver*/
 
-main() {
+void main() {
   var qux;
   qux = /*bc:1*/ foo() + /*bc:2*/ bar();
   print(qux);
diff --git a/pkg/dev_compiler/test/sourcemap/testfiles/next_through_throw.dart b/pkg/dev_compiler/test/sourcemap/testfiles/next_through_throw.dart
index 586d52d..1d7b275 100644
--- a/pkg/dev_compiler/test/sourcemap/testfiles/next_through_throw.dart
+++ b/pkg/dev_compiler/test/sourcemap/testfiles/next_through_throw.dart
@@ -4,7 +4,7 @@
 
 /*Debugger:stepOver*/
 
-main() {
+void main() {
   try {
     throw /*bc:1*/ foo();
   } catch (e) {
diff --git a/pkg/dev_compiler/test/sourcemap/testfiles/next_through_variable_set.dart b/pkg/dev_compiler/test/sourcemap/testfiles/next_through_variable_set.dart
index 50177f2..54e362b 100644
--- a/pkg/dev_compiler/test/sourcemap/testfiles/next_through_variable_set.dart
+++ b/pkg/dev_compiler/test/sourcemap/testfiles/next_through_variable_set.dart
@@ -4,7 +4,7 @@
 
 /*Debugger:stepOver*/
 
-main() {
+void main() {
   /*bl*/
   /*sl:1*/ var x = 0;
   x = /*bc:2*/ foo();
diff --git a/pkg/dev_compiler/test/sourcemap/testfiles/next_through_yield.dart b/pkg/dev_compiler/test/sourcemap/testfiles/next_through_yield.dart
index 05ca943..882e28c 100644
--- a/pkg/dev_compiler/test/sourcemap/testfiles/next_through_yield.dart
+++ b/pkg/dev_compiler/test/sourcemap/testfiles/next_through_yield.dart
@@ -4,7 +4,7 @@
 
 /*Debugger:stepOver*/
 
-main() {
+void main() {
   for (int i in naturalsTo(2)) {
     print(i);
   }
diff --git a/pkg/dev_compiler/test/sourcemap/testfiles/no_mapping_on_class_constructor_line.dart b/pkg/dev_compiler/test/sourcemap/testfiles/no_mapping_on_class_constructor_line.dart
index f6b3b13..aa521b6 100644
--- a/pkg/dev_compiler/test/sourcemap/testfiles/no_mapping_on_class_constructor_line.dart
+++ b/pkg/dev_compiler/test/sourcemap/testfiles/no_mapping_on_class_constructor_line.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.
 
-main() {
+void main() {
   // ignore: unused_local_variable
   Foo foo = Foo();
 }
diff --git a/pkg/dev_compiler/test/sourcemap/testfiles/no_mapping_on_class_function_line.dart b/pkg/dev_compiler/test/sourcemap/testfiles/no_mapping_on_class_function_line.dart
index 26508de..33ea7c2 100644
--- a/pkg/dev_compiler/test/sourcemap/testfiles/no_mapping_on_class_function_line.dart
+++ b/pkg/dev_compiler/test/sourcemap/testfiles/no_mapping_on_class_function_line.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.
 
-main() {
+void main() {
   Foo foo = Foo();
   foo.foo();
 }
diff --git a/pkg/dev_compiler/test/sourcemap/testfiles/no_mapping_on_class_line.dart b/pkg/dev_compiler/test/sourcemap/testfiles/no_mapping_on_class_line.dart
index 0233caa4..d64c1fa 100644
--- a/pkg/dev_compiler/test/sourcemap/testfiles/no_mapping_on_class_line.dart
+++ b/pkg/dev_compiler/test/sourcemap/testfiles/no_mapping_on_class_line.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.
 
-main() {
+void main() {
   Foo foo = Foo();
   foo.foo();
 }
diff --git a/pkg/dev_compiler/test/sourcemap/testfiles/no_mapping_on_class_named_constructor_line.dart b/pkg/dev_compiler/test/sourcemap/testfiles/no_mapping_on_class_named_constructor_line.dart
index 32ddfc4..22930ce 100644
--- a/pkg/dev_compiler/test/sourcemap/testfiles/no_mapping_on_class_named_constructor_line.dart
+++ b/pkg/dev_compiler/test/sourcemap/testfiles/no_mapping_on_class_named_constructor_line.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.
 
-main() {
+void main() {
   // ignore: unused_local_variable
   Foo foo = Foo.named();
 }
diff --git a/pkg/dev_compiler/test/sourcemap/testfiles/no_mapping_on_function_line.dart b/pkg/dev_compiler/test/sourcemap/testfiles/no_mapping_on_function_line.dart
index 48223d1..a80c41e 100644
--- a/pkg/dev_compiler/test/sourcemap/testfiles/no_mapping_on_function_line.dart
+++ b/pkg/dev_compiler/test/sourcemap/testfiles/no_mapping_on_function_line.dart
@@ -3,7 +3,7 @@
 // BSD-style license that can be found in the LICENSE file.
 
 /*nm*/
-main() {
+void main() {
   foo();
 }
 
diff --git a/pkg/dev_compiler/test/sourcemap/testfiles/printing_class_fields.dart b/pkg/dev_compiler/test/sourcemap/testfiles/printing_class_fields.dart
index 8bf01a3..0d94442 100644
--- a/pkg/dev_compiler/test/sourcemap/testfiles/printing_class_fields.dart
+++ b/pkg/dev_compiler/test/sourcemap/testfiles/printing_class_fields.dart
@@ -3,7 +3,7 @@
 // BSD-style license that can be found in the LICENSE file.
 
 /*Debugger:stepOver*/
-main() {
+void main() {
   /*bl*/
   /*sl:1*/ Foo foo = Foo(1, 2);
   /*sl:2*/ print(foo.x);
diff --git a/pkg/dev_compiler/test/sourcemap/testfiles/printing_class_fields_step_into.dart b/pkg/dev_compiler/test/sourcemap/testfiles/printing_class_fields_step_into.dart
index f3f17c1..e889171 100644
--- a/pkg/dev_compiler/test/sourcemap/testfiles/printing_class_fields_step_into.dart
+++ b/pkg/dev_compiler/test/sourcemap/testfiles/printing_class_fields_step_into.dart
@@ -3,7 +3,7 @@
 // BSD-style license that can be found in the LICENSE file.
 
 /*nb*/
-main() {
+void main() {
   /*bl*/
   Foo foo = /*sl:1*/ Foo(1, 2);
   /*s:5*/ print(foo.x);
diff --git a/pkg/dev_compiler/test/sourcemap/testfiles/step_through_async_star_yield.dart b/pkg/dev_compiler/test/sourcemap/testfiles/step_through_async_star_yield.dart
index ec3cab3..36bd4ef 100644
--- a/pkg/dev_compiler/test/sourcemap/testfiles/step_through_async_star_yield.dart
+++ b/pkg/dev_compiler/test/sourcemap/testfiles/step_through_async_star_yield.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.
 
-main() async {
+void main() async {
   await for (var i in foobar()) {
     print(i);
   }
diff --git a/pkg/dev_compiler/test/sourcemap/testfiles/step_through_await_for.dart b/pkg/dev_compiler/test/sourcemap/testfiles/step_through_await_for.dart
index e2021cf..e5b6d10 100644
--- a/pkg/dev_compiler/test/sourcemap/testfiles/step_through_await_for.dart
+++ b/pkg/dev_compiler/test/sourcemap/testfiles/step_through_await_for.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.
 
-main() async {
+void main() async {
   /* bl */
   /*sl:1 */ print("About to loop!");
   await for (var /*s:3*/ /*s:5*/ i in foobar /*sl:2*/ ()) {
diff --git a/pkg/dev_compiler/test/sourcemap/testfiles/step_through_conditional_expression.dart b/pkg/dev_compiler/test/sourcemap/testfiles/step_through_conditional_expression.dart
index 8ea00cf..867c480 100644
--- a/pkg/dev_compiler/test/sourcemap/testfiles/step_through_conditional_expression.dart
+++ b/pkg/dev_compiler/test/sourcemap/testfiles/step_through_conditional_expression.dart
@@ -4,7 +4,7 @@
 
 /*Debugger:stepOver*/
 
-main() {
+void main() {
   print(/*bc:1*/ foo() ? bar() : /*bc:2*/ baz());
   print(/*bc:4*/ ! /*bc:3*/ foo() ? /*bc:5*/ bar() : baz());
 }
diff --git a/pkg/dev_compiler/test/sourcemap/testfiles/step_through_if_and_identical.dart b/pkg/dev_compiler/test/sourcemap/testfiles/step_through_if_and_identical.dart
index 0b81376..7984135 100644
--- a/pkg/dev_compiler/test/sourcemap/testfiles/step_through_if_and_identical.dart
+++ b/pkg/dev_compiler/test/sourcemap/testfiles/step_through_if_and_identical.dart
@@ -4,7 +4,7 @@
 
 /*Debugger:stepOver*/
 
-main() {
+void main() {
   if (/*bc:1*/ foo() == /*bc:2*/ bar()) {
     print("wat?!?");
   }
diff --git a/pkg/dev_compiler/test/sourcemap/testfiles/step_through_property_get_test.dart b/pkg/dev_compiler/test/sourcemap/testfiles/step_through_property_get_test.dart
index e4211c0..78826c7 100644
--- a/pkg/dev_compiler/test/sourcemap/testfiles/step_through_property_get_test.dart
+++ b/pkg/dev_compiler/test/sourcemap/testfiles/step_through_property_get_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.
 
-main() {
+void main() {
   Bar bar = Bar();
   bar.doStuff();
 }
diff --git a/pkg/dev_compiler/test/sourcemap/testfiles/step_through_sync_star.dart b/pkg/dev_compiler/test/sourcemap/testfiles/step_through_sync_star.dart
index 84bb777..36768c1 100644
--- a/pkg/dev_compiler/test/sourcemap/testfiles/step_through_sync_star.dart
+++ b/pkg/dev_compiler/test/sourcemap/testfiles/step_through_sync_star.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.
 
-main() {
+void main() {
   /* bl */
   /*sl:1*/ var iterator = naturalsTo(2);
   for (int /*bc:3*/ /*bc:8*/ /*bc:12*/ i in /*bc:2*/ iterator) {
diff --git a/pkg/dev_compiler/test/sourcemap/testfiles/stops_at_ending_brace.dart b/pkg/dev_compiler/test/sourcemap/testfiles/stops_at_ending_brace.dart
index 8bcca4b..d322e4c 100644
--- a/pkg/dev_compiler/test/sourcemap/testfiles/stops_at_ending_brace.dart
+++ b/pkg/dev_compiler/test/sourcemap/testfiles/stops_at_ending_brace.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.
 
-main() {
+void main() {
   Foo();
   // Comment to push the ending brace back a bit.
 /*s:2*/
diff --git a/pkg/dev_compiler/test/string_to_uri_test.dart b/pkg/dev_compiler/test/string_to_uri_test.dart
index 31b86f6..063b87a 100755
--- a/pkg/dev_compiler/test/string_to_uri_test.dart
+++ b/pkg/dev_compiler/test/string_to_uri_test.dart
@@ -2,7 +2,7 @@
 import 'package:dev_compiler/src/compiler/shared_command.dart';
 import 'package:test/test.dart';
 
-main(List<String> args) {
+void main(List<String> args) {
   String currentDir;
   setUpAll(() {
     currentDir = Directory.current.path.replaceAll(r'\', r'/');
diff --git a/pkg/dev_compiler/tool/build_sdk.dart b/pkg/dev_compiler/tool/build_sdk.dart
index 5fc97e0..60eb377 100644
--- a/pkg/dev_compiler/tool/build_sdk.dart
+++ b/pkg/dev_compiler/tool/build_sdk.dart
@@ -13,7 +13,7 @@
 
 import 'package:dev_compiler/src/analyzer/command.dart';
 
-main(List<String> arguments) async {
+void main(List<String> arguments) async {
   var args = ['--no-source-map', '--no-emit-metadata'];
   args.addAll(arguments);
   args.addAll([
diff --git a/pkg/dev_compiler/tool/kernel_sdk.dart b/pkg/dev_compiler/tool/kernel_sdk.dart
index d7e000d..0366522 100755
--- a/pkg/dev_compiler/tool/kernel_sdk.dart
+++ b/pkg/dev_compiler/tool/kernel_sdk.dart
@@ -14,7 +14,12 @@
 import 'package:dev_compiler/src/kernel/command.dart';
 import 'package:dev_compiler/src/kernel/compiler.dart';
 import 'package:front_end/src/api_unstable/ddc.dart'
-    show CompilerOptions, kernelForComponent;
+    show
+        CompilerOptions,
+        kernelForComponent,
+        DiagnosticMessage,
+        printDiagnosticMessage,
+        Severity;
 import 'package:kernel/kernel.dart';
 import 'package:kernel/target/targets.dart';
 import 'package:path/path.dart' as path;
@@ -38,14 +43,25 @@
   }
 
   var librarySpecPath = parserOptions['libraries'] as String;
+  var packagesPath = path.join(ddcPath, '../../.packages');
 
   var target = DevCompilerTarget(TargetFlags());
+  void onDiagnostic(DiagnosticMessage message) {
+    printDiagnosticMessage(message, print);
+    if (message.severity == Severity.error ||
+        message.severity == Severity.internalProblem) {
+      exitCode = 1;
+    }
+  }
+
   var options = CompilerOptions()
     ..compileSdk = true
-    // TODO(sigmund): remove this unnecessary option when possible.
+    // TODO(sigmund): remove these two unnecessary options when possible.
     ..sdkRoot = Uri.base
+    ..packagesFileUri = Uri.base.resolveUri(Uri.file(packagesPath))
     ..librariesSpecificationUri = Uri.base.resolveUri(Uri.file(librarySpecPath))
-    ..target = target;
+    ..target = target
+    ..onDiagnostic = onDiagnostic;
 
   var inputs = target.extraRequiredLibraries.map(Uri.parse).toList();
   var component = await kernelForComponent(inputs, options);
diff --git a/pkg/dev_compiler/tool/patch_sdk.dart b/pkg/dev_compiler/tool/patch_sdk.dart
index 5b9a979..c890b2e 100755
--- a/pkg/dev_compiler/tool/patch_sdk.dart
+++ b/pkg/dev_compiler/tool/patch_sdk.dart
@@ -22,9 +22,12 @@
   var self = path.relative(path.fromUri(Platform.script));
   if (argv.length < 3) {
     var toolDir = path.relative(path.dirname(path.fromUri(Platform.script)));
+    var dartDir = path.dirname(path
+        .dirname(path.dirname(path.dirname(path.fromUri(Platform.script)))));
 
     var repoExample = path.join(toolDir, '..', '..', '..');
-    var patchExample = path.join(toolDir, 'input_sdk');
+    var patchExample =
+        path.join(dartDir, 'sdk', 'lib', '_internal', 'js_dev_runtime');
     var outExample =
         path.relative(path.normalize(path.join('gen', 'patched_sdk')));
 
diff --git a/pkg/dev_compiler/web/main.dart b/pkg/dev_compiler/web/main.dart
index 67a02bd..df7682f 100755
--- a/pkg/dev_compiler/web/main.dart
+++ b/pkg/dev_compiler/web/main.dart
@@ -17,7 +17,7 @@
 external set setUpCompilerInBrowser(Function function);
 
 Future<dynamic> _setUpCompilerInBrowser;
-main() {
+void main() {
   var args = ['compile'];
 
   // Avoid race condition when users try to call $setUpDartDevCompilerInBrowser
diff --git a/pkg/dev_compiler/web/stack_trace_mapper.dart b/pkg/dev_compiler/web/stack_trace_mapper.dart
index 9044aa6..7fa1dc1 100644
--- a/pkg/dev_compiler/web/stack_trace_mapper.dart
+++ b/pkg/dev_compiler/web/stack_trace_mapper.dart
@@ -112,7 +112,7 @@
   _mapping = LazyMapping(provider);
 }
 
-main() {
+void main() {
   // Register with DDC.
   dartStackTraceUtility = DartStackTraceUtility(
       mapper: allowInterop(mapper),
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 f91b17d..6428f9b 100644
--- a/pkg/front_end/lib/src/api_prototype/experimental_flags.dart
+++ b/pkg/front_end/lib/src/api_prototype/experimental_flags.dart
@@ -2,7 +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.
 
-// TODO(askesc): Generate this file from a flag specification.
+// NOTE: THIS FILE IS GENERATED. DO NOT EDIT.
+//
+// Instead modify 'tools/experimental_features.yaml' and run
+// 'pkg/front_end/tool/fasta generate-experimental-flags' to update.
 
 enum ExperimentalFlag {
   constantUpdate2018,
diff --git a/pkg/front_end/lib/src/api_unstable/ddc.dart b/pkg/front_end/lib/src/api_unstable/ddc.dart
index 852cd60..4c2076b 100644
--- a/pkg/front_end/lib/src/api_unstable/ddc.dart
+++ b/pkg/front_end/lib/src/api_unstable/ddc.dart
@@ -73,6 +73,8 @@
 
 Future<InitializedCompilerState> initializeCompiler(
     InitializedCompilerState oldState,
+    bool compileSdk,
+    Uri sdkRoot,
     Uri sdkSummary,
     Uri packagesFile,
     Uri librariesSpecificationUri,
@@ -83,6 +85,7 @@
   inputSummaries.sort((a, b) => a.toString().compareTo(b.toString()));
 
   if (oldState != null &&
+      oldState.options.compileSdk == compileSdk &&
       oldState.options.sdkSummary == sdkSummary &&
       oldState.options.packagesFileUri == packagesFile &&
       oldState.options.librariesSpecificationUri == librariesSpecificationUri &&
@@ -104,6 +107,8 @@
   }
 
   CompilerOptions options = new CompilerOptions()
+    ..compileSdk = compileSdk
+    ..sdkRoot = sdkRoot
     ..sdkSummary = sdkSummary
     ..packagesFileUri = packagesFile
     ..inputSummaries = inputSummaries
@@ -120,6 +125,8 @@
 Future<InitializedCompilerState> initializeIncrementalCompiler(
     InitializedCompilerState oldState,
     List<Component> doneInputSummaries,
+    bool compileSdk,
+    Uri sdkRoot,
     Uri sdkSummary,
     Uri packagesFile,
     Uri librariesSpecificationUri,
@@ -140,9 +147,12 @@
 
   if (oldState == null ||
       oldState.incrementalCompiler == null ||
+      oldState.options.compileSdk != compileSdk ||
       cachedSdkInput == null) {
     // No previous state.
     options = new CompilerOptions()
+      ..compileSdk = compileSdk
+      ..sdkRoot = sdkRoot
       ..sdkSummary = sdkSummary
       ..packagesFileUri = packagesFile
       ..inputSummaries = inputSummaries
diff --git a/pkg/front_end/lib/src/base/errors.dart b/pkg/front_end/lib/src/base/errors.dart
index 2fbd323..735fa5d 100644
--- a/pkg/front_end/lib/src/base/errors.dart
+++ b/pkg/front_end/lib/src/base/errors.dart
@@ -26,10 +26,10 @@
   final String correction;
 
   /**
-   * The URL of a page containing documentation for errors with this code, or
-   * `null` if there is no known documentation.
+   * Return `true` if diagnostics with this code have documentation for them
+   * that has been published.
    */
-  final String url;
+  final bool hasPublishedDocs;
 
   /**
    * Whether this error is caused by an unresolved identifier.
@@ -42,7 +42,8 @@
    * template. The correction associated with the error will be created from the
    * given [correction] template.
    */
-  const ErrorCode(this.name, this.message, [this.correction, this.url])
+  const ErrorCode(this.name, this.message,
+      [this.correction, this.hasPublishedDocs = false])
       : isUnresolvedIdentifier = false;
 
   /**
@@ -52,7 +53,9 @@
    * given [correction] template.
    */
   const ErrorCode.temporary(this.name, this.message,
-      {this.correction, this.isUnresolvedIdentifier: false, this.url});
+      {this.correction,
+      this.isUnresolvedIdentifier: false,
+      this.hasPublishedDocs = false});
 
   /**
    * The severity of the error.
@@ -69,6 +72,12 @@
    */
   String get uniqueName => "$runtimeType.$name";
 
+  /**
+   * Return a URL that can be used to access documentation for diagnostics with
+   * this code, or `null` if there is no published documentation.
+   */
+  String get url => null;
+
   @override
   String toString() => uniqueName;
 }
diff --git a/pkg/front_end/lib/src/fasta/builder/class_builder.dart b/pkg/front_end/lib/src/fasta/builder/class_builder.dart
index 0ef4745..199e65c 100644
--- a/pkg/front_end/lib/src/fasta/builder/class_builder.dart
+++ b/pkg/front_end/lib/src/fasta/builder/class_builder.dart
@@ -77,7 +77,7 @@
     return library.partOfLibrary ?? library;
   }
 
-  void buildAnnotations(LibraryBuilder library) {}
+  void buildOutlineExpressions(LibraryBuilder library) {}
 
   /// Registers a constructor redirection for this class and returns true if
   /// this redirection gives rise to a cycle that has not been reported before.
diff --git a/pkg/front_end/lib/src/fasta/builder/library_builder.dart b/pkg/front_end/lib/src/fasta/builder/library_builder.dart
index ed544d6..51e0852 100644
--- a/pkg/front_end/lib/src/fasta/builder/library_builder.dart
+++ b/pkg/front_end/lib/src/fasta/builder/library_builder.dart
@@ -236,7 +236,7 @@
 
   void recordAccess(int charOffset, int length, Uri fileUri) {}
 
-  void buildAnnotations() {}
+  void buildOutlineExpressions() {}
 }
 
 class LibraryLocalDeclarationIterator implements Iterator<Declaration> {
diff --git a/pkg/front_end/lib/src/fasta/builder/member_builder.dart b/pkg/front_end/lib/src/fasta/builder/member_builder.dart
index 2dd5099..0b99bf5 100644
--- a/pkg/front_end/lib/src/fasta/builder/member_builder.dart
+++ b/pkg/front_end/lib/src/fasta/builder/member_builder.dart
@@ -37,7 +37,7 @@
     }
   }
 
-  void buildAnnotations(LibraryBuilder library) {}
+  void buildOutlineExpressions(LibraryBuilder library) {}
 
   @override
   String get fullNameForErrors => name;
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 d2e1703..f1d4ff2 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
@@ -62,6 +62,8 @@
   /// [../kernel/kernel_library_builder.dart].
   Map<String, String> unserializableExports;
 
+  bool exportsAlreadyFinalized = false;
+
   DillLibraryBuilder(this.library, this.loader)
       : super(library.fileUri, new Scope.top(), new Scope.top());
 
@@ -173,6 +175,8 @@
   }
 
   void finalizeExports() {
+    if (exportsAlreadyFinalized) return;
+    exportsAlreadyFinalized = true;
     unserializableExports?.forEach((String name, String messageText) {
       Declaration declaration;
       switch (name) {
diff --git a/pkg/front_end/lib/src/fasta/incremental_compiler.dart b/pkg/front_end/lib/src/fasta/incremental_compiler.dart
index 16d1187..87f7acd1 100644
--- a/pkg/front_end/lib/src/fasta/incremental_compiler.dart
+++ b/pkg/front_end/lib/src/fasta/incremental_compiler.dart
@@ -9,7 +9,11 @@
 import 'package:kernel/binary/ast_from_binary.dart' show BinaryBuilder;
 
 import 'package:kernel/binary/ast_from_binary.dart'
-    show BinaryBuilder, CanonicalNameError, InvalidKernelVersionError;
+    show
+        BinaryBuilder,
+        CanonicalNameError,
+        CanonicalNameSdkError,
+        InvalidKernelVersionError;
 
 import 'package:kernel/class_hierarchy.dart' show ClassHierarchy;
 
@@ -161,7 +165,9 @@
               bytesLength =
                   prepareSummary(summaryBytes, uriTranslator, c, data);
 
-              if (e is InvalidKernelVersionError || e is PackageChangedError) {
+              if (e is InvalidKernelVersionError ||
+                  e is PackageChangedError ||
+                  e is CanonicalNameSdkError) {
                 // Don't report any warning.
               } else {
                 Uri gzInitializedFrom;
@@ -222,17 +228,26 @@
       List<LibraryBuilder> reusedLibraries = computeReusedLibraries(
           invalidatedUris, uriTranslator,
           notReused: notReusedLibraries);
-      Set<Uri> reusedLibraryUris =
-          new Set<Uri>.from(reusedLibraries.map((b) => b.uri));
-      bool removedBuilders = false;
-      for (Uri uri in new Set<Uri>.from(dillLoadedData.loader.builders.keys)
-        ..removeAll(reusedLibraryUris)) {
-        LibraryBuilder builder = dillLoadedData.loader.builders.remove(uri);
-        userBuilders?.remove(uri);
+
+      bool removedDillBuilders = false;
+      for (LibraryBuilder builder in notReusedLibraries) {
         CompilerContext.current.uriToSource.remove(builder.fileUri);
-        removedBuilders = true;
+
+        LibraryBuilder dillBuilder =
+            dillLoadedData.loader.builders.remove(builder.uri);
+        if (dillBuilder != null) {
+          removedDillBuilders = true;
+          userBuilders?.remove(builder.uri);
+        }
+
+        // Remove component problems for libraries we don't reuse.
+        if (remainingComponentProblems.isNotEmpty) {
+          Library lib = builder.target;
+          removeLibraryFromRemainingComponentProblems(lib, uriTranslator);
+        }
       }
-      if (removedBuilders) {
+
+      if (removedDillBuilders) {
         dillLoadedData.loader.libraries.clear();
         for (LibraryBuilder builder in dillLoadedData.loader.builders.values) {
           dillLoadedData.loader.libraries.add(builder.target);
@@ -258,16 +273,6 @@
             .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);
-        }
-      }
-
       if (hierarchy != null) {
         List<Library> removedLibraries = new List<Library>();
         for (LibraryBuilder builder in notReusedLibraries) {
@@ -283,7 +288,7 @@
             " of ${userCode.loader.builders.length} libraries");
       }
 
-      await loadEnsureLoadedComponents(reusedLibraryUris, reusedLibraries);
+      await loadEnsureLoadedComponents(reusedLibraries);
 
       KernelTarget userCodeOld = userCode;
       userCode = new KernelTarget(
@@ -401,13 +406,13 @@
 
   /// Internal method.
   Future loadEnsureLoadedComponents(
-      Set<Uri> reusedLibraryUris, List<LibraryBuilder> reusedLibraries) async {
+      List<LibraryBuilder> reusedLibraries) async {
     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)) {
+          if (!dillLoadedData.loader.builders.containsKey(lib.importUri)) {
             dillLoadedData.loader.libraries.add(lib);
             dillLoadedData.addLibrary(lib);
             reusedLibraries.add(dillLoadedData.loader.read(lib.importUri, -1));
@@ -885,9 +890,14 @@
       }
     }
 
-    userBuilders?.forEach(addBuilderAndInvalidateUris);
     if (userCode != null) {
+      // userCode already contains the builders from userBuilders.
       userCode.loader.builders.forEach(addBuilderAndInvalidateUris);
+    } else {
+      // userCode was null so we explicitly have to add the builders from
+      // userBuilders (which cannot be null as we checked initially that one of
+      // them was non-null).
+      userBuilders.forEach(addBuilderAndInvalidateUris);
     }
 
     recordInvalidatedImportUrisForTesting(invalidatedImportUris);
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 393be7d..2599943 100644
--- a/pkg/front_end/lib/src/fasta/kernel/body_builder.dart
+++ b/pkg/front_end/lib/src/fasta/kernel/body_builder.dart
@@ -171,7 +171,7 @@
   @override
   final Uri uri;
 
-  final TypeInferrer _typeInferrer;
+  final TypeInferrer typeInferrer;
 
   @override
   final TypePromoter typePromoter;
@@ -262,7 +262,7 @@
       this.classBuilder,
       this.isInstanceMember,
       this.uri,
-      this._typeInferrer)
+      this.typeInferrer)
       : enableNative =
             library.loader.target.backendTarget.enableNative(library.uri),
         stringExpectedAfterNative =
@@ -271,7 +271,7 @@
             (library.uri.path == "_builtin" || library.uri.path == "ui"),
         needsImplicitSuperInitializer =
             coreTypes?.objectClass != classBuilder?.cls,
-        typePromoter = _typeInferrer?.typePromoter,
+        typePromoter = typeInferrer?.typePromoter,
         legacyMode = library.legacyMode,
         super(enclosingScope);
 
@@ -306,7 +306,7 @@
     return isInstanceMember || member is KernelConstructorBuilder;
   }
 
-  TypeEnvironment get typeEnvironment => _typeInferrer?.typeSchemaEnvironment;
+  TypeEnvironment get typeEnvironment => typeInferrer?.typeSchemaEnvironment;
 
   DartType get implicitTypeArgument =>
       legacyMode ? const DynamicType() : const ImplicitTypeArgument();
@@ -463,7 +463,7 @@
 
   void inferAnnotations(List<Expression> annotations) {
     if (annotations != null) {
-      _typeInferrer?.inferMetadata(this, annotations);
+      typeInferrer?.inferMetadata(this, annotations);
       library.loader.transformListPostInference(
           annotations, transformSetLiterals, transformCollections);
     }
@@ -582,9 +582,13 @@
           // Duplicate definition. The field might not be the correct one,
           // so we skip inference of the initializer.
           // Error reporting and recovery is handled elsewhere.
+        } else if (field.target.initializer != null) {
+          // The initializer was already compiled (e.g., if it appear in the
+          // outline, like constant field initializers) so we do not need to
+          // perform type inference or transformations.
         } else {
           field.initializer = initializer;
-          _typeInferrer?.inferFieldInitializer(
+          typeInferrer?.inferFieldInitializer(
               this, field.builtType, initializer);
           library.loader.transformPostInference(
               field.target, transformSetLiterals, transformCollections);
@@ -711,7 +715,7 @@
       }
       initializer = buildInvalidInitializer(node, token.charOffset);
     }
-    _typeInferrer?.inferInitializer(this, initializer);
+    typeInferrer?.inferInitializer(this, initializer);
     if (member is KernelConstructorBuilder && !member.isExternal) {
       member.addInitializer(initializer, this);
     } else {
@@ -752,7 +756,7 @@
                 null);
           }
           realParameter.initializer = initializer..parent = realParameter;
-          _typeInferrer?.inferParameterInitializer(
+          typeInferrer?.inferParameterInitializer(
               this, initializer, realParameter.type);
           library.loader.transformPostInference(
               realParameter, transformSetLiterals, transformCollections);
@@ -760,7 +764,7 @@
       }
     }
 
-    _typeInferrer?.inferFunctionBody(
+    typeInferrer?.inferFunctionBody(
         this, _computeReturnTypeContext(member), asyncModifier, body);
     if (body != null) {
       library.loader.transformPostInference(
@@ -907,7 +911,7 @@
       // set its inferredType field.  If type inference is disabled, reach to
       // the outtermost parent to check if the node is a dead code.
       if (invocation.parent == null) continue;
-      if (_typeInferrer != null) {
+      if (typeInferrer != null) {
         if (invocation is FactoryConstructorInvocationJudgment &&
             invocation.inferredType == null) {
           continue;
@@ -1118,7 +1122,7 @@
 
     ReturnJudgment fakeReturn = new ReturnJudgment(null, expression);
 
-    _typeInferrer?.inferFunctionBody(
+    typeInferrer?.inferFunctionBody(
         this, const DynamicType(), AsyncMarker.Sync, fakeReturn);
 
     return fakeReturn.expression;
@@ -2983,7 +2987,7 @@
   }
 
   @override
-  void endFunctionTypedFormalParameter(Token nameToken) {
+  void endFunctionTypedFormalParameter(Token nameToken, Token question) {
     debugEvent("FunctionTypedFormalParameter");
     if (inCatchClause || functionNestingLevel != 0) {
       exitLocalScope();
@@ -2991,6 +2995,7 @@
     FormalParameters formals = pop();
     UnresolvedType<KernelTypeBuilder> returnType = pop();
     List<KernelTypeVariableBuilder> typeVariables = pop();
+    reportErrorIfNullableType(question);
     UnresolvedType<KernelTypeBuilder> type =
         formals.toFunctionType(returnType, typeVariables);
     exitLocalScope();
diff --git a/pkg/front_end/lib/src/fasta/kernel/implicit_field_type.dart b/pkg/front_end/lib/src/fasta/kernel/implicit_field_type.dart
index 902db15..c82886b 100644
--- a/pkg/front_end/lib/src/fasta/kernel/implicit_field_type.dart
+++ b/pkg/front_end/lib/src/fasta/kernel/implicit_field_type.dart
@@ -15,9 +15,9 @@
 
 class ImplicitFieldType extends DartType {
   final MemberBuilder member;
-  final Token initializerToken;
+  Token initializerToken;
 
-  const ImplicitFieldType(this.member, this.initializerToken);
+  ImplicitFieldType(this.member, this.initializerToken);
 
   accept(DartTypeVisitor<Object> v) {
     unsupported("accept", member.charOffset, member.fileUri);
diff --git a/pkg/front_end/lib/src/fasta/kernel/kernel_body_builder.dart b/pkg/front_end/lib/src/fasta/kernel/kernel_body_builder.dart
index c37724b..278e742 100644
--- a/pkg/front_end/lib/src/fasta/kernel/kernel_body_builder.dart
+++ b/pkg/front_end/lib/src/fasta/kernel/kernel_body_builder.dart
@@ -42,7 +42,7 @@
       : forest = const Fangorn(),
         super.forField(member, typeInferrer);
 
-  KernelBodyBuilder.forAnnotation(
+  KernelBodyBuilder.forOutlineExpression(
       KernelLibraryBuilder library,
       KernelClassBuilder classBuilder,
       ModifierBuilder member,
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 31214d6..5e4ac3a 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
@@ -226,10 +226,10 @@
   }
 
   @override
-  void buildAnnotations(LibraryBuilder library) {
+  void buildOutlineExpressions(LibraryBuilder library) {
     void build(String ignore, Declaration declaration) {
       MemberBuilder member = declaration;
-      member.buildAnnotations(library);
+      member.buildOutlineExpressions(library);
     }
 
     KernelMetadataBuilder.buildAnnotations(
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 39c70c9..88a91b4 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
@@ -7,10 +7,18 @@
 import 'package:kernel/ast.dart'
     show Class, DartType, DynamicType, Expression, Field, Name, NullLiteral;
 
+import '../constant_context.dart' show ConstantContext;
+
 import '../fasta_codes.dart' show messageInternalProblemAlreadyInitialized;
 
 import '../problems.dart' show internalProblem, unsupported;
 
+import '../scanner.dart' show Token;
+
+import '../scope.dart' show Scope;
+
+import '../source/source_loader.dart' show SourceLoader;
+
 import '../type_inference/type_inference_engine.dart'
     show IncludesTypeParametersCovariantly;
 
@@ -34,6 +42,7 @@
   final ShadowField field;
   final List<MetadataBuilder> metadata;
   final KernelTypeBuilder type;
+  Token constInitializerToken;
 
   KernelFieldBuilder(this.metadata, this.type, String name, int modifiers,
       Declaration compilationUnit, int charOffset, int charEndOffset)
@@ -94,10 +103,29 @@
   }
 
   @override
-  void buildAnnotations(LibraryBuilder library) {
+  void buildOutlineExpressions(LibraryBuilder library) {
     ClassBuilder classBuilder = isClassMember ? parent : null;
     KernelMetadataBuilder.buildAnnotations(
         field, metadata, library, classBuilder, this, null);
+    if (constInitializerToken != null) {
+      Scope scope = classBuilder?.scope ?? library.scope;
+      KernelBodyBuilder bodyBuilder =
+          new KernelBodyBuilder.forOutlineExpression(
+              library, classBuilder, this, scope, null, fileUri);
+      bodyBuilder.constantContext =
+          isConst ? ConstantContext.inferred : ConstantContext.none;
+      initializer = bodyBuilder.parseFieldInitializer(constInitializerToken)
+        ..parent = field;
+      constInitializerToken = null;
+      bodyBuilder.typeInferrer
+          ?.inferFieldInitializer(bodyBuilder, field.type, field.initializer);
+      if (library.loader is SourceLoader) {
+        SourceLoader loader = library.loader;
+        loader.transformPostInference(field, bodyBuilder.transformSetLiterals,
+            bodyBuilder.transformCollections);
+      }
+      bodyBuilder.resolveRedirectingFactoryTargets();
+    }
   }
 
   Field get target => field;
@@ -116,8 +144,12 @@
       }
       ImplicitFieldType type = field.type;
       field.type = const DynamicType();
-      initializer = new KernelBodyBuilder.forField(this, typeInferrer)
-          .parseFieldInitializer(type.initializerToken);
+      KernelBodyBuilder bodyBuilder =
+          new KernelBodyBuilder.forField(this, typeInferrer);
+      bodyBuilder.constantContext =
+          isConst ? ConstantContext.inferred : ConstantContext.none;
+      initializer = bodyBuilder.parseFieldInitializer(type.initializerToken);
+      type.initializerToken = null;
     }
   }
 
diff --git a/pkg/front_end/lib/src/fasta/kernel/kernel_library_builder.dart b/pkg/front_end/lib/src/fasta/kernel/kernel_library_builder.dart
index 983b7c7..1532c58 100644
--- a/pkg/front_end/lib/src/fasta/kernel/kernel_library_builder.dart
+++ b/pkg/front_end/lib/src/fasta/kernel/kernel_library_builder.dart
@@ -636,18 +636,18 @@
       String name,
       int charOffset,
       int charEndOffset,
-      Token initializerTokenForInference,
-      bool hasInitializer) {
+      Token initializerToken,
+      bool hasInitializer,
+      {Token constInitializerToken}) {
     if (hasInitializer) {
       modifiers |= hasInitializerMask;
     }
     KernelFieldBuilder field = new KernelFieldBuilder(
         metadata, type, name, modifiers, this, charOffset, charEndOffset);
+    field.constInitializerToken = constInitializerToken;
     addBuilder(name, field, charOffset);
-    if (initializerTokenForInference != null) {
-      assert(type == null);
-      field.target.type =
-          new ImplicitFieldType(field, initializerTokenForInference);
+    if (!legacyMode && type == null && initializerToken != null) {
+      field.target.type = new ImplicitFieldType(field, initializerToken);
     }
     loader.target.metadataCollector
         ?.setDocumentationComment(field.target, documentationComment);
@@ -903,7 +903,7 @@
   }
 
   @override
-  void buildAnnotations() {
+  void buildOutlineExpressions() {
     KernelMetadataBuilder.buildAnnotations(
         library, metadata, this, null, null, null);
   }
diff --git a/pkg/front_end/lib/src/fasta/kernel/kernel_metadata_builder.dart b/pkg/front_end/lib/src/fasta/kernel/kernel_metadata_builder.dart
index 7bc39e6..1c9f1f0 100644
--- a/pkg/front_end/lib/src/fasta/kernel/kernel_metadata_builder.dart
+++ b/pkg/front_end/lib/src/fasta/kernel/kernel_metadata_builder.dart
@@ -38,7 +38,7 @@
     Scope scope = parent is Library || parent is Class || classBuilder == null
         ? library.scope
         : classBuilder.scope;
-    KernelBodyBuilder bodyBuilder = new KernelBodyBuilder.forAnnotation(
+    KernelBodyBuilder bodyBuilder = new KernelBodyBuilder.forOutlineExpression(
         library, classBuilder, member, scope, parameterScope, fileUri);
     for (int i = 0; i < metadata.length; ++i) {
       KernelMetadataBuilder annotationBuilder = metadata[i];
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 c8d217b..0e9e42e 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
@@ -363,7 +363,7 @@
   }
 
   @override
-  void buildAnnotations(LibraryBuilder library) {
+  void buildOutlineExpressions(LibraryBuilder library) {
     ClassBuilder classBuilder = isClassMember ? parent : null;
     KernelMetadataBuilder.buildAnnotations(
         target,
@@ -497,7 +497,7 @@
   }
 
   @override
-  void buildAnnotations(LibraryBuilder library) {
+  void buildOutlineExpressions(LibraryBuilder library) {
     ClassBuilder classBuilder = isClassMember ? parent : null;
     KernelMetadataBuilder.buildAnnotations(
         target,
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 83e30e9..5d67c40 100644
--- a/pkg/front_end/lib/src/fasta/kernel/kernel_target.dart
+++ b/pkg/front_end/lib/src/fasta/kernel/kernel_target.dart
@@ -279,7 +279,7 @@
       loader.checkRedirectingFactories(myClasses);
       loader.addNoSuchMethodForwarders(myClasses);
       loader.checkMixins(myClasses);
-      loader.buildAnnotations();
+      loader.buildOutlineExpressions();
       installAllComponentProblems(loader.allComponentProblems);
       loader.allComponentProblems.clear();
       return component;
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 c596a7e..64ec528 100644
--- a/pkg/front_end/lib/src/fasta/parser/forwarding_listener.dart
+++ b/pkg/front_end/lib/src/fasta/parser/forwarding_listener.dart
@@ -684,8 +684,8 @@
   }
 
   @override
-  void endFunctionTypedFormalParameter(Token nameToken) {
-    listener?.endFunctionTypedFormalParameter(nameToken);
+  void endFunctionTypedFormalParameter(Token nameToken, Token question) {
+    listener?.endFunctionTypedFormalParameter(nameToken, question);
   }
 
   @override
diff --git a/pkg/front_end/lib/src/fasta/parser/listener.dart b/pkg/front_end/lib/src/fasta/parser/listener.dart
index 0e8f57d..63d333f 100644
--- a/pkg/front_end/lib/src/fasta/parser/listener.dart
+++ b/pkg/front_end/lib/src/fasta/parser/listener.dart
@@ -1189,7 +1189,7 @@
   /// - type variables
   /// - return type
   /// - formal parameters
-  void endFunctionTypedFormalParameter(Token nameToken) {
+  void endFunctionTypedFormalParameter(Token nameToken, Token question) {
     logEvent("FunctionTypedFormalParameter");
   }
 
diff --git a/pkg/front_end/lib/src/fasta/parser/parser.dart b/pkg/front_end/lib/src/fasta/parser/parser.dart
index 24fe512..3583dc6 100644
--- a/pkg/front_end/lib/src/fasta/parser/parser.dart
+++ b/pkg/front_end/lib/src/fasta/parser/parser.dart
@@ -1445,7 +1445,12 @@
       token = typeInfo.parseType(beforeType, this);
       endInlineFunctionType = parseFormalParametersRequiredOpt(
           endInlineFunctionType, MemberKind.FunctionTypedParameter);
-      listener.endFunctionTypedFormalParameter(beforeInlineFunctionType);
+      Token question;
+      if (optional('?', endInlineFunctionType.next)) {
+        question = endInlineFunctionType = endInlineFunctionType.next;
+      }
+      listener.endFunctionTypedFormalParameter(
+          beforeInlineFunctionType, question);
 
       // Generalized function types don't allow inline function types.
       // The following isn't allowed:
diff --git a/pkg/front_end/lib/src/fasta/source/outline_builder.dart b/pkg/front_end/lib/src/fasta/source/outline_builder.dart
index 43536a0..964646f 100644
--- a/pkg/front_end/lib/src/fasta/source/outline_builder.dart
+++ b/pkg/front_end/lib/src/fasta/source/outline_builder.dart
@@ -1211,13 +1211,14 @@
   }
 
   @override
-  void endFunctionTypedFormalParameter(Token nameToken) {
+  void endFunctionTypedFormalParameter(Token nameToken, Token question) {
     debugEvent("FunctionTypedFormalParameter");
     List<FormalParameterBuilder> formals = pop();
     int formalsOffset = pop();
     TypeBuilder returnType = pop();
     List<TypeVariableBuilder<KernelTypeBuilder, DartType>> typeVariables =
         pop();
+    reportErrorIfNullableType(question);
     push(library.addFunctionType(
         returnType, typeVariables, formals, formalsOffset));
   }
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 28b8b90..09cd1c9 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
@@ -166,9 +166,16 @@
           fileUri);
       actualCls.supertype = null;
     }
+    if (actualCls.supertype == null && supertype is! KernelNamedTypeBuilder) {
+      supertype = null;
+    }
     mixedInType = checkSupertype(mixedInType);
     actualCls.mixedInType =
         mixedInType?.buildMixedInType(library, charOffset, fileUri);
+    if (actualCls.mixedInType == null &&
+        mixedInType is! KernelNamedTypeBuilder) {
+      mixedInType = null;
+    }
     actualCls.isMixinDeclaration = isMixinDeclaration;
     // TODO(ahe): If `cls.supertype` is null, and this isn't Object, report a
     // compile-time error.
@@ -305,7 +312,7 @@
 
   List<Declaration> computeDirectSupertypes(ClassBuilder objectClass) {
     final List<Declaration> result = <Declaration>[];
-    final KernelNamedTypeBuilder supertype = this.supertype;
+    final KernelTypeBuilder supertype = this.supertype;
     if (supertype != null) {
       result.add(supertype.declaration);
     } else if (objectClass != this) {
@@ -314,11 +321,11 @@
     final List<KernelTypeBuilder> interfaces = this.interfaces;
     if (interfaces != null) {
       for (int i = 0; i < interfaces.length; i++) {
-        KernelNamedTypeBuilder interface = interfaces[i];
+        KernelTypeBuilder interface = interfaces[i];
         result.add(interface.declaration);
       }
     }
-    final KernelNamedTypeBuilder mixedInType = this.mixedInType;
+    final KernelTypeBuilder mixedInType = this.mixedInType;
     if (mixedInType != null) {
       result.add(mixedInType.declaration);
     }
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 3323184..89abbb2 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
@@ -34,6 +34,8 @@
 
 import '../combinator.dart' show Combinator;
 
+import '../configuration.dart' show Configuration;
+
 import '../export.dart' show Export;
 
 import '../fasta_codes.dart'
@@ -69,7 +71,7 @@
 
 import '../import.dart' show Import;
 
-import '../configuration.dart' show Configuration;
+import '../modifier.dart' show constMask;
 
 import '../problems.dart' show unexpected, unhandled;
 
@@ -390,14 +392,18 @@
       String name,
       int charOffset,
       int charEndOffset,
-      Token initializerTokenForInference,
-      bool hasInitializer);
+      Token initializerToken,
+      bool hasInitializer,
+      {Token constInitializerToken});
 
   void addFields(String documentationComment, List<MetadataBuilder> metadata,
       int modifiers, T type, List<FieldInfo> fieldInfos) {
     for (FieldInfo info in fieldInfos) {
-      Token startToken =
-          type != null || legacyMode ? null : info.initializerTokenForInference;
+      bool isConst = modifiers & constMask != 0;
+      Token startToken;
+      if (isConst || (type == null && !legacyMode)) {
+        startToken = info.initializerToken;
+      }
       if (startToken != null) {
         // Extract only the tokens for the initializer expression from the
         // token stream.
@@ -405,9 +411,10 @@
         endToken.setNext(new Token.eof(endToken.next.offset));
         new Token.eof(startToken.previous.offset).setNext(startToken);
       }
-      bool hasInitializer = info.initializerTokenForInference != null;
+      bool hasInitializer = info.initializerToken != null;
       addField(documentationComment, metadata, modifiers, type, info.name,
-          info.charOffset, info.charEndOffset, startToken, hasInitializer);
+          info.charOffset, info.charEndOffset, startToken, hasInitializer,
+          constInitializerToken: isConst ? startToken : null);
     }
   }
 
@@ -1013,10 +1020,10 @@
 class FieldInfo {
   final String name;
   final int charOffset;
-  final Token initializerTokenForInference;
+  final Token initializerToken;
   final Token beforeLast;
   final int charEndOffset;
 
-  const FieldInfo(this.name, this.charOffset, this.initializerTokenForInference,
+  const FieldInfo(this.name, this.charOffset, this.initializerToken,
       this.beforeLast, this.charEndOffset);
 }
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 adffcbd..c420708 100644
--- a/pkg/front_end/lib/src/fasta/source/source_loader.dart
+++ b/pkg/front_end/lib/src/fasta/source/source_loader.dart
@@ -104,7 +104,8 @@
 
 import '../problems.dart' show internalProblem;
 
-import '../scanner.dart' show ErrorToken, ScannerResult, Token, scan;
+import '../scanner.dart'
+    show ErrorToken, ScannerConfiguration, ScannerResult, Token, scan;
 
 import '../type_inference/interface_resolver.dart' show InterfaceResolver;
 
@@ -200,7 +201,10 @@
       byteCount += rawBytes.length;
     }
 
-    ScannerResult result = scan(bytes, includeComments: includeComments);
+    ScannerResult result = scan(bytes,
+        includeComments: includeComments,
+        configuration: new ScannerConfiguration(
+            enableTripleShift: target.enableTripleShift));
     Token token = result.tokens;
     if (!suppressLexicalErrors) {
       List<int> source = getSource(bytes);
@@ -948,17 +952,17 @@
     ticker.logMs("Checked mixin declaration applications");
   }
 
-  void buildAnnotations() {
+  void buildOutlineExpressions() {
     builders.forEach((Uri uri, LibraryBuilder library) {
       if (library.loader == this) {
-        library.buildAnnotations();
+        library.buildOutlineExpressions();
         Iterator<Declaration> iterator = library.iterator;
         while (iterator.moveNext()) {
           Declaration declaration = iterator.current;
           if (declaration is ClassBuilder) {
-            declaration.buildAnnotations(library);
+            declaration.buildOutlineExpressions(library);
           } else if (declaration is MemberBuilder) {
-            declaration.buildAnnotations(library);
+            declaration.buildOutlineExpressions(library);
           }
         }
       }
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 6c48edf..621a14e 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
@@ -677,7 +677,7 @@
   }
 
   @override
-  void endFunctionTypedFormalParameter(Token nameToken) {
+  void endFunctionTypedFormalParameter(Token nameToken, Token question) {
     debugEvent("FunctionTypedFormalParameter", nameToken);
   }
 
diff --git a/pkg/front_end/test/fasta/parser/parser.status b/pkg/front_end/test/fasta/parser/parser.status
index 3619aff..c43b22f 100644
--- a/pkg/front_end/test/fasta/parser/parser.status
+++ b/pkg/front_end/test/fasta/parser/parser.status
@@ -3,170 +3,6 @@
 # BSD-style license that can be found in the LICENSE.md file.
 
 pkg/analyzer_cli/test/data/file_with_error: Fail
-pkg/dev_compiler/test/codegen/corelib/from_environment_const_type_test: Fail
-pkg/dev_compiler/test/codegen/corelib/from_environment_const_type_undefined_test: Fail
-pkg/dev_compiler/test/codegen/corelib/symbol_reserved_word_test: Fail
-pkg/dev_compiler/test/codegen/destructuring: Fail
-pkg/dev_compiler/test/codegen/language/abstract_syntax_test: Fail
-pkg/dev_compiler/test/codegen/language/argument_definition_test: Fail
-pkg/dev_compiler/test/codegen/language/assign_instance_method_negative_test: Fail
-pkg/dev_compiler/test/codegen/language/async_await_syntax_test: Fail
-pkg/dev_compiler/test/codegen/language/await_backwards_compatibility_test: Fail
-pkg/dev_compiler/test/codegen/language/bad_constructor_test: Fail
-pkg/dev_compiler/test/codegen/language/bad_initializer1_negative_test: Fail
-pkg/dev_compiler/test/codegen/language/bad_initializer2_negative_test: Fail
-pkg/dev_compiler/test/codegen/language/bad_named_constructor_negative_test: Fail
-pkg/dev_compiler/test/codegen/language/black_listed_test: Fail
-pkg/dev_compiler/test/codegen/language/body_less_constructor_wrong_arg_negative_test: Fail
-pkg/dev_compiler/test/codegen/language/built_in_identifier_prefix_test: Fail
-pkg/dev_compiler/test/codegen/language/built_in_identifier_test: Fail
-pkg/dev_compiler/test/codegen/language/cascade_test: Fail
-pkg/dev_compiler/test/codegen/language/class_cycle2_test: Fail
-pkg/dev_compiler/test/codegen/language/class_keyword_test: Fail
-pkg/dev_compiler/test/codegen/language/class_syntax_test: Fail
-pkg/dev_compiler/test/codegen/language/closure_call_wrong_argument_count_negative_test: Fail
-pkg/dev_compiler/test/codegen/language/compile_time_constant13_test: Fail
-pkg/dev_compiler/test/codegen/language/const_counter_negative_test: Fail
-pkg/dev_compiler/test/codegen/language/const_native_factory_test: Fail
-pkg/dev_compiler/test/codegen/language/const_optional_args_negative_test: Fail
-pkg/dev_compiler/test/codegen/language/constructor3_negative_test: Fail
-pkg/dev_compiler/test/codegen/language/constructor_call_wrong_argument_count_negative_test: Fail
-pkg/dev_compiler/test/codegen/language/constructor_initializer_test: Fail
-pkg/dev_compiler/test/codegen/language/constructor_name_test: Fail
-pkg/dev_compiler/test/codegen/language/constructor_redirect1_negative_test: Fail
-pkg/dev_compiler/test/codegen/language/constructor_redirect2_negative_test: Fail
-pkg/dev_compiler/test/codegen/language/constructor_setter_negative_test: Fail
-pkg/dev_compiler/test/codegen/language/cyclic_typedef_test: Fail
-pkg/dev_compiler/test/codegen/language/deferred_type_dependency_test: Fail
-pkg/dev_compiler/test/codegen/language/duplicate_export_negative_test: Fail
-pkg/dev_compiler/test/codegen/language/duplicate_interface_negative_test: Fail
-pkg/dev_compiler/test/codegen/language/enum_is_keyword_test: Fail
-pkg/dev_compiler/test/codegen/language/enum_syntax_test: Fail
-pkg/dev_compiler/test/codegen/language/export_ambiguous_main_negative_test: Fail
-pkg/dev_compiler/test/codegen/language/extend_type_parameter2_negative_test: Fail
-pkg/dev_compiler/test/codegen/language/extend_type_parameter_negative_test: Fail
-pkg/dev_compiler/test/codegen/language/external_test: Fail
-pkg/dev_compiler/test/codegen/language/factory2_negative_test: Fail
-pkg/dev_compiler/test/codegen/language/factory_negative_test: Fail
-pkg/dev_compiler/test/codegen/language/field1_negative_test: Fail
-pkg/dev_compiler/test/codegen/language/field2_negative_test: Fail
-pkg/dev_compiler/test/codegen/language/field3a_negative_test: Fail
-pkg/dev_compiler/test/codegen/language/field4_negative_test: Fail
-pkg/dev_compiler/test/codegen/language/field5_negative_test: Fail
-pkg/dev_compiler/test/codegen/language/field6_negative_test: Fail
-pkg/dev_compiler/test/codegen/language/field6a_negative_test: Fail
-pkg/dev_compiler/test/codegen/language/field_method4_negative_test: Fail
-pkg/dev_compiler/test/codegen/language/function_syntax_test: Fail
-pkg/dev_compiler/test/codegen/language/function_type_parameter2_negative_test: Fail
-pkg/dev_compiler/test/codegen/language/function_type_parameter_negative_test: Fail
-pkg/dev_compiler/test/codegen/language/get_set_syntax_test: Fail
-pkg/dev_compiler/test/codegen/language/getter_declaration_negative_test: Fail
-pkg/dev_compiler/test/codegen/language/illegal_declaration_test: Fail
-pkg/dev_compiler/test/codegen/language/import_combinators_negative_test: Fail
-pkg/dev_compiler/test/codegen/language/inst_field_initializer1_negative_test: Fail
-pkg/dev_compiler/test/codegen/language/instance_call_wrong_argument_count_negative_test: Fail
-pkg/dev_compiler/test/codegen/language/instance_method2_negative_test: Fail
-pkg/dev_compiler/test/codegen/language/instance_method_negative_test: Fail
-pkg/dev_compiler/test/codegen/language/interface2_negative_test: Fail
-pkg/dev_compiler/test/codegen/language/interface_cycle_test: Fail
-pkg/dev_compiler/test/codegen/language/interface_static_non_final_fields_negative_test: Fail
-pkg/dev_compiler/test/codegen/language/keyword_type_expression_test: Fail
-pkg/dev_compiler/test/codegen/language/label2_negative_test: Fail
-pkg/dev_compiler/test/codegen/language/label3_negative_test: Fail
-pkg/dev_compiler/test/codegen/language/label5_negative_test: Fail
-pkg/dev_compiler/test/codegen/language/label6_negative_test: Fail
-pkg/dev_compiler/test/codegen/language/library_negative_test: Fail
-pkg/dev_compiler/test/codegen/language/list_literal2_negative_test: Fail
-pkg/dev_compiler/test/codegen/language/list_literal_syntax_test: Fail
-pkg/dev_compiler/test/codegen/language/literal_unary_plus_test: Fail
-pkg/dev_compiler/test/codegen/language/main_test: Fail
-pkg/dev_compiler/test/codegen/language/malformed_inheritance_test: Fail
-pkg/dev_compiler/test/codegen/language/malformed_test: Fail
-pkg/dev_compiler/test/codegen/language/map_literal2_negative_test: Fail
-pkg/dev_compiler/test/codegen/language/metadata_test: Fail
-pkg/dev_compiler/test/codegen/language/method_override2_test: Fail
-pkg/dev_compiler/test/codegen/language/mixin_forwarding_constructor4_test: Fail
-pkg/dev_compiler/test/codegen/language/mixin_illegal_syntax_test: Fail
-pkg/dev_compiler/test/codegen/language/mixin_invalid_inheritance1_test: Fail
-pkg/dev_compiler/test/codegen/language/named_constructor_test: Fail
-pkg/dev_compiler/test/codegen/language/named_parameters_aggregated_test: Fail
-pkg/dev_compiler/test/codegen/language/no_such_method_negative_test: Fail
-pkg/dev_compiler/test/codegen/language/non_const_super_negative_test: Fail
-pkg/dev_compiler/test/codegen/language/null_test: Fail
-pkg/dev_compiler/test/codegen/language/number_identifier_test: Fail
-pkg/dev_compiler/test/codegen/language/override_field_method1_negative_test: Fail
-pkg/dev_compiler/test/codegen/language/override_field_method2_negative_test: Fail
-pkg/dev_compiler/test/codegen/language/override_field_method4_negative_test: Fail
-pkg/dev_compiler/test/codegen/language/override_field_method5_negative_test: Fail
-pkg/dev_compiler/test/codegen/language/override_inheritance_generic_test: Fail
-pkg/dev_compiler/test/codegen/language/parameter_default_test: Fail
-pkg/dev_compiler/test/codegen/language/parameter_initializer1_negative_test: Fail
-pkg/dev_compiler/test/codegen/language/parameter_initializer2_negative_test: Fail
-pkg/dev_compiler/test/codegen/language/parameter_initializer3_negative_test: Fail
-pkg/dev_compiler/test/codegen/language/parameter_initializer4_negative_test: Fail
-pkg/dev_compiler/test/codegen/language/parameter_initializer5_negative_test: Fail
-pkg/dev_compiler/test/codegen/language/parameter_initializer6_negative_test: Fail
-pkg/dev_compiler/test/codegen/language/prefix10_negative_test: Fail
-pkg/dev_compiler/test/codegen/language/prefix11_negative_test: Fail
-pkg/dev_compiler/test/codegen/language/prefix12_negative_test: Fail
-pkg/dev_compiler/test/codegen/language/prefix13_negative_test: Fail
-pkg/dev_compiler/test/codegen/language/prefix15_negative_test: Fail
-pkg/dev_compiler/test/codegen/language/prefix1_negative_test: Fail
-pkg/dev_compiler/test/codegen/language/prefix2_negative_test: Fail
-pkg/dev_compiler/test/codegen/language/prefix3_negative_test: Fail
-pkg/dev_compiler/test/codegen/language/prefix4_negative_test: Fail
-pkg/dev_compiler/test/codegen/language/prefix5_negative_test: Fail
-pkg/dev_compiler/test/codegen/language/prefix6_negative_test: Fail
-pkg/dev_compiler/test/codegen/language/prefix7_negative_test: Fail
-pkg/dev_compiler/test/codegen/language/prefix8_negative_test: Fail
-pkg/dev_compiler/test/codegen/language/private_member1_negative_test: Fail
-pkg/dev_compiler/test/codegen/language/private_member2_negative_test: Fail
-pkg/dev_compiler/test/codegen/language/private_member3_negative_test: Fail
-pkg/dev_compiler/test/codegen/language/regress_23051_test: Fail
-pkg/dev_compiler/test/codegen/language/script1_negative_test: Fail
-pkg/dev_compiler/test/codegen/language/script2_negative_test: Fail
-pkg/dev_compiler/test/codegen/language/source_self_negative_test: Fail
-pkg/dev_compiler/test/codegen/language/static_call_wrong_argument_count_negative_test: Fail
-pkg/dev_compiler/test/codegen/language/static_parameter_test: Fail
-pkg/dev_compiler/test/codegen/language/static_top_level_test: Fail
-pkg/dev_compiler/test/codegen/language/string_interpolation9_test: Fail
-pkg/dev_compiler/test/codegen/language/string_unicode1_negative_test: Fail
-pkg/dev_compiler/test/codegen/language/string_unicode2_negative_test: Fail
-pkg/dev_compiler/test/codegen/language/string_unicode3_negative_test: Fail
-pkg/dev_compiler/test/codegen/language/string_unicode4_negative_test: Fail
-pkg/dev_compiler/test/codegen/language/switch1_negative_test: Fail
-pkg/dev_compiler/test/codegen/language/switch3_negative_test: Fail
-pkg/dev_compiler/test/codegen/language/switch4_negative_test: Fail
-pkg/dev_compiler/test/codegen/language/switch5_negative_test: Fail
-pkg/dev_compiler/test/codegen/language/switch7_negative_test: Fail
-pkg/dev_compiler/test/codegen/language/sync_generator2_test: Fail
-pkg/dev_compiler/test/codegen/language/syntax_test: Fail
-pkg/dev_compiler/test/codegen/language/tearoff_basic_test: Fail
-pkg/dev_compiler/test/codegen/language/tearoff_constructor_basic_test: Fail
-pkg/dev_compiler/test/codegen/language/try_catch_on_syntax_test: Fail
-pkg/dev_compiler/test/codegen/language/try_catch_syntax_test: Fail
-pkg/dev_compiler/test/codegen/language/type_variable_bounds2_test: Fail
-pkg/dev_compiler/test/codegen/language/type_variable_static_context_negative_test: Fail
-pkg/dev_compiler/test/codegen/language/unbalanced_brace_test: Fail
-pkg/dev_compiler/test/codegen/language/unresolved_in_factory_negative_test: Fail
-pkg/dev_compiler/test/codegen/language/unresolved_top_level_method_negative_test: Fail
-pkg/dev_compiler/test/codegen/language/unresolved_top_level_var_negative_test: Fail
-pkg/dev_compiler/test/codegen/language/unsigned_right_shift_test: Fail
-pkg/dev_compiler/test/codegen/language/variable_declaration_metadata_test: Fail
-pkg/dev_compiler/test/codegen/lib/mirrors/metadata_allowed_values_test: Fail
-pkg/dev_compiler/test/codegen/lib/mirrors/metadata_scope_test: Fail
-pkg/dev_compiler/test/codegen/lib/mirrors/mirror_in_static_init_test: Fail
-pkg/dev_compiler/test/codegen/lib/mirrors/other_declarations_location_test: Fail
-pkg/dev_compiler/test/codegen/lib/mirrors/syntax_error_test: Fail
-pkg/dev_compiler/test/codegen/lib/mirrors/typevariable_mirror_metadata_test: Fail
-pkg/dev_compiler/tool/input_sdk/lib/html/dart2js/html_dart2js: Fail
-pkg/dev_compiler/tool/input_sdk/lib/indexed_db/dart2js/indexed_db_dart2js: Fail
-pkg/dev_compiler/tool/input_sdk/lib/svg/dart2js/svg_dart2js: Fail
-pkg/dev_compiler/tool/input_sdk/lib/web_audio/dart2js/web_audio_dart2js: Fail
-pkg/dev_compiler/tool/input_sdk/lib/web_gl/dart2js/web_gl_dart2js: Fail
-pkg/dev_compiler/tool/input_sdk/lib/web_sql/dart2js/web_sql_dart2js: Fail
-pkg/dev_compiler/tool/input_sdk/private/ddc_runtime/types: Fail
-pkg/dev_compiler/tool/input_sdk/private/native_typed_data: Fail
 pkg/front_end/test/fasta/rasta/bad_interpolation: Fail
 pkg/front_end/test/fasta/rasta/issue_000032: Fail
 pkg/front_end/test/fasta/rasta/issue_000035: Fail
@@ -245,6 +81,14 @@
 samples/sample_extension/sample_asynchronous_extension: Fail
 samples/sample_extension/sample_synchronous_extension: Fail
 sdk/lib/_blink/dartium/_blink_dartium: Fail
+sdk/lib/_internal/js_dev_runtime/lib/html/dart2js/html_dart2js: Fail
+sdk/lib/_internal/js_dev_runtime/lib/indexed_db/dart2js/indexed_db_dart2js: Fail
+sdk/lib/_internal/js_dev_runtime/lib/svg/dart2js/svg_dart2js: Fail
+sdk/lib/_internal/js_dev_runtime/lib/web_audio/dart2js/web_audio_dart2js: Fail
+sdk/lib/_internal/js_dev_runtime/lib/web_gl/dart2js/web_gl_dart2js: Fail
+sdk/lib/_internal/js_dev_runtime/lib/web_sql/dart2js/web_sql_dart2js: Fail
+sdk/lib/_internal/js_dev_runtime/private/ddc_runtime/types: Fail
+sdk/lib/_internal/js_dev_runtime/private/native_typed_data: Fail
 sdk/lib/_internal/js_runtime/lib/native_typed_data: Fail
 sdk/lib/html/dart2js/html_dart2js: Fail
 sdk/lib/indexed_db/dart2js/indexed_db_dart2js: Fail
diff --git a/pkg/front_end/test/incremental_load_from_invalid_dill_test.dart b/pkg/front_end/test/incremental_load_from_invalid_dill_test.dart
index 9dc2941..0d9a84e 100644
--- a/pkg/front_end/test/incremental_load_from_invalid_dill_test.dart
+++ b/pkg/front_end/test/incremental_load_from_invalid_dill_test.dart
@@ -40,7 +40,7 @@
 
 import 'package:front_end/src/fasta/severity.dart' show Severity;
 
-import 'package:kernel/kernel.dart' show Component;
+import 'package:kernel/kernel.dart' show Component, Library;
 
 import 'incremental_load_from_dill_test.dart' show getOptions;
 
@@ -56,24 +56,26 @@
   Uri sdkSummary;
   Uri initializeFrom;
   Uri helperFile;
+  Uri helper2File;
   Uri entryPoint;
+  Uri entryPointImportDartFoo;
   Uri platformUri;
   List<int> sdkSummaryData;
   List<DiagnosticMessage> errorMessages;
   List<DiagnosticMessage> warningMessages;
   MemoryFileSystem fs;
   CompilerOptions options;
+  IncrementalCompiler compiler;
 
-  compileExpectInitializeFailAndSpecificWarning(
+  void compileExpectInitializeFailAndSpecificWarning(
       Code expectedWarningCode, bool writeFileOnCrashReport) async {
     errorMessages.clear();
     warningMessages.clear();
     options.writeFileOnCrashReport = writeFileOnCrashReport;
-    DeleteTempFilesIncrementalCompiler compiler =
-        new DeleteTempFilesIncrementalCompiler(
-            new CompilerContext(
-                new ProcessedOptions(options: options, inputs: [entryPoint])),
-            initializeFrom);
+    compiler = new DeleteTempFilesIncrementalCompiler(
+        new CompilerContext(
+            new ProcessedOptions(options: options, inputs: [entryPoint])),
+        initializeFrom);
     await compiler.computeDelta();
     if (compiler.initializedFromDill) {
       Expect.fail("Expected to not be able to initialized from dill, but did.");
@@ -91,13 +93,40 @@
     }
   }
 
+  Future<Component> compileExpectOk(
+      bool initializedFromDill, Uri compileThis) async {
+    errorMessages.clear();
+    warningMessages.clear();
+    options.writeFileOnCrashReport = false;
+    compiler = new DeleteTempFilesIncrementalCompiler(
+        new CompilerContext(
+            new ProcessedOptions(options: options, inputs: [compileThis])),
+        initializeFrom);
+    Component component = await compiler.computeDelta();
+
+    if (compiler.initializedFromDill != initializedFromDill) {
+      Expect.fail("Expected initializedFromDill to be $initializedFromDill "
+          "but was ${compiler.initializedFromDill}");
+    }
+    if (errorMessages.isNotEmpty) {
+      Expect.fail("Got unexpected errors: " + joinMessages(errorMessages));
+    }
+    if (warningMessages.isNotEmpty) {
+      Expect.fail("Got unexpected warnings: " + joinMessages(warningMessages));
+    }
+
+    return component;
+  }
+
   initialize() async {
     sdkRoot = computePlatformBinariesLocation(forceBuildDir: true);
     base = Uri.parse("org-dartlang-test:///");
     sdkSummary = base.resolve("vm_platform.dill");
     initializeFrom = base.resolve("initializeFrom.dill");
     helperFile = base.resolve("helper.dart");
+    helper2File = base.resolve("helper2.dart");
     entryPoint = base.resolve("small.dart");
+    entryPointImportDartFoo = base.resolve("small_foo.dart");
     platformUri = sdkRoot.resolve("vm_platform_strong.dill");
     sdkSummaryData = await new File.fromUri(platformUri).readAsBytes();
     errorMessages = <DiagnosticMessage>[];
@@ -108,6 +137,7 @@
     options.fileSystem = fs;
     options.sdkRoot = null;
     options.sdkSummary = sdkSummary;
+    options.omitPlatform = true;
     options.onDiagnostic = (DiagnosticMessage message) {
       if (message.severity == Severity.error) {
         errorMessages.add(message);
@@ -122,16 +152,27 @@
     print("hello from foo");
 }
 """);
+    fs.entityForUri(helper2File).writeAsStringSync("""
+foo2() {
+    print("hello from foo2");
+}
+""");
     fs.entityForUri(entryPoint).writeAsStringSync("""
 import "helper.dart" as helper;
 main() {
     helper.foo();
 }
 """);
+    fs.entityForUri(entryPointImportDartFoo).writeAsStringSync("""
+import "dart:foo" as helper;
+main() {
+    helper.foo2();
+}
+""");
   }
 
   Future<Null> test() async {
-    IncrementalCompiler compiler = new IncrementalCompiler(
+    compiler = new IncrementalCompiler(
         new CompilerContext(
             new ProcessedOptions(options: options, inputs: [entryPoint])),
         initializeFrom);
@@ -140,23 +181,32 @@
     List<int> dataGood = serializeComponent(componentGood);
     fs.entityForUri(initializeFrom).writeAsBytesSync(dataGood);
 
-    // Initialize from good dill file should be ok.
+    // Create fake "dart:foo" library.
+    options.omitPlatform = false;
     compiler = new IncrementalCompiler(
         new CompilerContext(
-            new ProcessedOptions(options: options, inputs: [entryPoint])),
+            new ProcessedOptions(options: options, inputs: [helper2File])),
         initializeFrom);
-    compiler.invalidate(entryPoint);
-    Component component = await compiler.computeDelta();
-    if (!compiler.initializedFromDill) {
-      Expect.fail(
-          "Expected to have sucessfully initialized from dill, but didn't.");
+    Component componentHelper = await compiler.computeDelta();
+    Library helper2Lib = componentHelper.libraries
+        .firstWhere((lib) => lib.importUri == helper2File);
+    helper2Lib.importUri = new Uri(scheme: "dart", path: "foo");
+    List<int> sdkWithDartFoo = serializeComponent(componentHelper);
+    options.omitPlatform = true;
+
+    // Compile with our fake sdk with dart:foo should be ok.
+    List<int> orgSdkBytes = await fs.entityForUri(sdkSummary).readAsBytes();
+    fs.entityForUri(sdkSummary).writeAsBytesSync(sdkWithDartFoo);
+    Component component = await compileExpectOk(true, entryPointImportDartFoo);
+    fs.entityForUri(sdkSummary).writeAsBytesSync(orgSdkBytes);
+    if (component.libraries.length != 1) {
+      Expect.fail("Expected 1 library, got ${component.libraries.length}: "
+          "${component.libraries}");
     }
-    if (errorMessages.isNotEmpty) {
-      Expect.fail("Got unexpected errors: " + joinMessages(errorMessages));
-    }
-    if (warningMessages.isNotEmpty) {
-      Expect.fail("Got unexpected warnings: " + joinMessages(warningMessages));
-    }
+    List<int> dataLinkedToSdkWithFoo = serializeComponent(component);
+
+    // Initialize from good dill file should be ok.
+    await compileExpectOk(true, entryPoint);
 
     // Create a partial dill file.
     compiler.invalidate(entryPoint);
@@ -181,6 +231,11 @@
         codeInitializeFromDillUnknownProblem, true);
     await compileExpectInitializeFailAndSpecificWarning(
         codeInitializeFromDillUnknownProblemNoDump, false);
+
+    // Create a dill with a reference to a non-existing sdk thing:
+    // Should be ok (for now), but we shouldn't actually initialize from dill.
+    fs.entityForUri(initializeFrom).writeAsBytesSync(dataLinkedToSdkWithFoo);
+    await compileExpectOk(false, entryPoint);
   }
 }
 
diff --git a/pkg/front_end/testcases/DeltaBlue.dart.outline.expect b/pkg/front_end/testcases/DeltaBlue.dart.outline.expect
index 65edda0..85cc345 100644
--- a/pkg/front_end/testcases/DeltaBlue.dart.outline.expect
+++ b/pkg/front_end/testcases/DeltaBlue.dart.outline.expect
@@ -181,16 +181,16 @@
   method execute() → void
     ;
 }
-static const field dynamic REQUIRED;
-static const field dynamic STRONG_PREFERRED;
-static const field dynamic PREFERRED;
-static const field dynamic STRONG_DEFAULT;
-static const field dynamic NORMAL;
-static const field dynamic WEAK_DEFAULT;
-static const field dynamic WEAKEST;
-static const field core::int NONE;
-static const field core::int FORWARD;
-static const field core::int BACKWARD;
+static const field dynamic REQUIRED = const self::Strength::•(0, "required");
+static const field dynamic STRONG_PREFERRED = const self::Strength::•(1, "strongPreferred");
+static const field dynamic PREFERRED = const self::Strength::•(2, "preferred");
+static const field dynamic STRONG_DEFAULT = const self::Strength::•(3, "strongDefault");
+static const field dynamic NORMAL = const self::Strength::•(4, "normal");
+static const field dynamic WEAK_DEFAULT = const self::Strength::•(5, "weakDefault");
+static const field dynamic WEAKEST = const self::Strength::•(6, "weakest");
+static const field core::int NONE = 1;
+static const field core::int FORWARD = 2;
+static const field core::int BACKWARD = 0;
 static field self::Planner planner;
 static method main() → dynamic
   ;
diff --git a/pkg/front_end/testcases/annotation_on_enum_values.dart.outline.expect b/pkg/front_end/testcases/annotation_on_enum_values.dart.outline.expect
index a04857a..c705421 100644
--- a/pkg/front_end/testcases/annotation_on_enum_values.dart.outline.expect
+++ b/pkg/front_end/testcases/annotation_on_enum_values.dart.outline.expect
@@ -22,6 +22,6 @@
   method toString() → core::String
     return this.{=self::Foo::_name};
 }
-static const field core::int hest;
+static const field core::int hest = 42;
 static method main() → dynamic
   ;
diff --git a/pkg/front_end/testcases/annotation_top.dart.outline.expect b/pkg/front_end/testcases/annotation_top.dart.outline.expect
index 579ecba..11b2fda 100644
--- a/pkg/front_end/testcases/annotation_top.dart.outline.expect
+++ b/pkg/front_end/testcases/annotation_top.dart.outline.expect
@@ -16,7 +16,7 @@
   synthetic constructor •() → self::C
     ;
 }
-static const field core::Object a;
+static const field core::Object a = const core::Object::•();
 @self::a
 @self::A::•(3)
 static field core::int f1;
diff --git a/pkg/front_end/testcases/annotation_typedef_formals.dart.outline.expect b/pkg/front_end/testcases/annotation_typedef_formals.dart.outline.expect
index 945da25..1cdad69 100644
--- a/pkg/front_end/testcases/annotation_typedef_formals.dart.outline.expect
+++ b/pkg/front_end/testcases/annotation_typedef_formals.dart.outline.expect
@@ -4,8 +4,8 @@
 
 typedef F = (core::int, core::num, {w: core::Object, z: core::String}) → void;
 typedef G = (core::int, core::num, [core::String, core::Object]) → void;
-static const field core::int foo;
-static const field core::int bar;
-static const field core::int baz;
+static const field core::int foo = 21;
+static const field core::int bar = 42;
+static const field core::int baz = 84;
 static method main() → dynamic
   ;
diff --git a/pkg/front_end/testcases/annotation_typedef_formals_resolution.dart.outline.expect b/pkg/front_end/testcases/annotation_typedef_formals_resolution.dart.outline.expect
index e9a1864..8aca7b0 100644
--- a/pkg/front_end/testcases/annotation_typedef_formals_resolution.dart.outline.expect
+++ b/pkg/front_end/testcases/annotation_typedef_formals_resolution.dart.outline.expect
@@ -3,6 +3,6 @@
 import "dart:core" as core;
 
 typedef F = (core::int) → core::int;
-static const field core::int app;
+static const field core::int app = 0;
 static method main() → dynamic
   ;
diff --git a/pkg/front_end/testcases/annotation_variable_declaration.dart.outline.expect b/pkg/front_end/testcases/annotation_variable_declaration.dart.outline.expect
index 3eb241b..faa7175 100644
--- a/pkg/front_end/testcases/annotation_variable_declaration.dart.outline.expect
+++ b/pkg/front_end/testcases/annotation_variable_declaration.dart.outline.expect
@@ -19,6 +19,6 @@
   method hest({dynamic named}) → dynamic
     ;
 }
-static const field core::int foo;
+static const field core::int foo = 42;
 static method main() → dynamic
   ;
diff --git a/pkg/front_end/testcases/bug33099.dart.outline.expect b/pkg/front_end/testcases/bug33099.dart.outline.expect
index 24e4823..1753eb4 100644
--- a/pkg/front_end/testcases/bug33099.dart.outline.expect
+++ b/pkg/front_end/testcases/bug33099.dart.outline.expect
@@ -25,7 +25,7 @@
   synthetic constructor •() → self::MyTest2
     ;
 }
-static const field self::_FailingTest failingTest;
+static const field self::_FailingTest failingTest = const self::_FailingTest::•();
 static method main() → dynamic
   ;
 static method _hasFailingTestAnnotation(mir::MethodMirror method) → core::bool
diff --git a/pkg/front_end/testcases/implicit_const_with_static_fields.dart.outline.expect b/pkg/front_end/testcases/implicit_const_with_static_fields.dart.outline.expect
index 8e3f873..8658511 100644
--- a/pkg/front_end/testcases/implicit_const_with_static_fields.dart.outline.expect
+++ b/pkg/front_end/testcases/implicit_const_with_static_fields.dart.outline.expect
@@ -3,10 +3,10 @@
 import "dart:core" as core;
 
 class C extends core::Object {
-  static const field dynamic constField;
+  static const field dynamic constField = 87;
   const constructor •(dynamic x) → self::C
     ;
 }
-static const field dynamic constTopLevelField;
+static const field dynamic constTopLevelField = 42;
 static method main() → dynamic
   ;
diff --git a/pkg/front_end/testcases/metadata_enum.dart.outline.expect b/pkg/front_end/testcases/metadata_enum.dart.outline.expect
index 1ecf0f8..16c0355 100644
--- a/pkg/front_end/testcases/metadata_enum.dart.outline.expect
+++ b/pkg/front_end/testcases/metadata_enum.dart.outline.expect
@@ -16,6 +16,6 @@
   method toString() → core::String
     return this.{=self::E::_name};
 }
-static const field dynamic a;
+static const field dynamic a = null;
 static method main() → dynamic
   ;
diff --git a/pkg/front_end/testcases/metadata_named_mixin_application.dart.outline.expect b/pkg/front_end/testcases/metadata_named_mixin_application.dart.outline.expect
index ec64387..b3c6bd0 100644
--- a/pkg/front_end/testcases/metadata_named_mixin_application.dart.outline.expect
+++ b/pkg/front_end/testcases/metadata_named_mixin_application.dart.outline.expect
@@ -16,6 +16,6 @@
   synthetic constructor •() → self::E
     ;
 }
-static const field dynamic a;
+static const field dynamic a = null;
 static method main() → dynamic
   ;
diff --git a/pkg/front_end/testcases/nested_implicit_const_with_env_var.dart.outline.expect b/pkg/front_end/testcases/nested_implicit_const_with_env_var.dart.outline.expect
index 2a8f6986..00b4657 100644
--- a/pkg/front_end/testcases/nested_implicit_const_with_env_var.dart.outline.expect
+++ b/pkg/front_end/testcases/nested_implicit_const_with_env_var.dart.outline.expect
@@ -18,6 +18,6 @@
   method fun() → dynamic
     ;
 }
-static const field core::int foo;
+static const field core::int foo = const core::int::fromEnvironment("fisk");
 static method main() → dynamic
   ;
diff --git a/pkg/front_end/testcases/rasta/constant_get_and_invoke.dart.outline.expect b/pkg/front_end/testcases/rasta/constant_get_and_invoke.dart.outline.expect
index 7c08d7a..c9b0d8b 100644
--- a/pkg/front_end/testcases/rasta/constant_get_and_invoke.dart.outline.expect
+++ b/pkg/front_end/testcases/rasta/constant_get_and_invoke.dart.outline.expect
@@ -1,6 +1,6 @@
 library;
 import self as self;
 
-static const field dynamic c;
+static const field dynamic c = 1;
 static method main() → dynamic
   ;
diff --git a/pkg/front_end/testcases/rasta/static.dart.outline.expect b/pkg/front_end/testcases/rasta/static.dart.outline.expect
index 970c3bb..f9b177a 100644
--- a/pkg/front_end/testcases/rasta/static.dart.outline.expect
+++ b/pkg/front_end/testcases/rasta/static.dart.outline.expect
@@ -3,7 +3,7 @@
 import "dart:core" as core;
 
 class Foo extends core::Object {
-  static const field dynamic staticConstant;
+  static const field dynamic staticConstant = 42;
   static field dynamic staticField;
   synthetic constructor •() → self::Foo
     ;
diff --git a/pkg/front_end/testcases/redirecting_factory_metadata.dart.outline.expect b/pkg/front_end/testcases/redirecting_factory_metadata.dart.outline.expect
index dc87a52..4830e5f 100644
--- a/pkg/front_end/testcases/redirecting_factory_metadata.dart.outline.expect
+++ b/pkg/front_end/testcases/redirecting_factory_metadata.dart.outline.expect
@@ -10,8 +10,8 @@
   static factory •(dynamic p) → self::Foo
     let dynamic #redirecting_factory = self::Foo::named in invalid-expression;
 }
-static const field dynamic forParameter;
-static const field dynamic forFactoryItself;
-static const field dynamic anotherForParameter;
+static const field dynamic forParameter = 1;
+static const field dynamic forFactoryItself = 2;
+static const field dynamic anotherForParameter = 3;
 static method main() → dynamic
   ;
diff --git a/pkg/front_end/testcases/regress/issue_36793.dart.outline.expect b/pkg/front_end/testcases/regress/issue_36793.dart.outline.expect
index b13488b..bd4a7de 100644
--- a/pkg/front_end/testcases/regress/issue_36793.dart.outline.expect
+++ b/pkg/front_end/testcases/regress/issue_36793.dart.outline.expect
@@ -12,7 +12,7 @@
 import self as self;
 import "dart:core" as core;
 
-static const field core::int y;
+static const field core::int y = 42;
 @self::y
 static field core::int x;
 static method main() → dynamic
diff --git a/pkg/front_end/tool/_fasta/generate_experimental_flags.dart b/pkg/front_end/tool/_fasta/generate_experimental_flags.dart
new file mode 100644
index 0000000..355836a
--- /dev/null
+++ b/pkg/front_end/tool/_fasta/generate_experimental_flags.dart
@@ -0,0 +1,105 @@
+// 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:io';
+
+import 'dart:isolate';
+
+import 'package:yaml/yaml.dart' show YamlMap, loadYaml;
+
+import 'package:dart_style/dart_style.dart' show DartFormatter;
+
+import '../../lib/src/fasta/scanner/characters.dart' show $A, $MINUS, $a, $z;
+
+main(List<String> arguments) async {
+  var port = new ReceivePort();
+  await new File.fromUri(await computeGeneratedFile())
+      .writeAsString(await generateMessagesFile(), flush: true);
+  port.close();
+}
+
+Future<Uri> computeGeneratedFile() {
+  return Isolate.resolvePackageUri(
+      Uri.parse('package:front_end/src/api_prototype/experimental_flags.dart'));
+}
+
+Future<String> generateMessagesFile() async {
+  Uri messagesFile =
+      Platform.script.resolve("../../../../tools/experimental_features.yaml");
+  Map<dynamic, dynamic> yaml =
+      loadYaml(await new File.fromUri(messagesFile).readAsStringSync());
+  StringBuffer sb = new StringBuffer();
+
+  sb.write('''
+// 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.
+
+// NOTE: THIS FILE IS GENERATED. DO NOT EDIT.
+//
+// Instead modify 'tools/experimental_features.yaml' and run
+// 'pkg/front_end/tool/fasta generate-experimental-flags' to update.
+''');
+
+  List<String> keys = yaml.keys.cast<String>().toList()..sort();
+
+  sb.write('''
+
+enum ExperimentalFlag {
+''');
+  for (var key in keys) {
+    sb.writeln('  ${keyToIdentifier(key)},');
+  }
+  sb.writeln('}');
+
+  sb.write('''
+
+ExperimentalFlag parseExperimentalFlag(String flag) {
+  switch (flag) {
+''');
+  for (var key in keys) {
+    sb.writeln('    case "$key":');
+    sb.writeln('     return ExperimentalFlag.${keyToIdentifier(key)};');
+  }
+  sb.write('''  }
+  return null;
+}
+''');
+
+  sb.write('''
+
+const Map<ExperimentalFlag, bool> defaultExperimentalFlags = {
+''');
+  for (var key in keys) {
+    bool shipped = (yaml[key] as YamlMap)['enabledIn'] != null;
+    sb.writeln('  ExperimentalFlag.${keyToIdentifier(key)}: ${shipped},');
+    if (shipped) {
+      var expired = (yaml[key] as YamlMap)['expired'];
+      if (expired == false) {
+        throw 'Cannot mark shipped feature as "expired: false"';
+      }
+    }
+  }
+  sb.writeln('};');
+
+  return new DartFormatter().format("$sb");
+}
+
+keyToIdentifier(String key) {
+  var identifier = StringBuffer();
+  for (int index = 0; index < key.length; ++index) {
+    var code = key.codeUnitAt(index);
+    if (code == $MINUS) {
+      ++index;
+      code = key.codeUnitAt(index);
+      if ($a <= code && code <= $z) {
+        code = code - $a + $A;
+      }
+    }
+    identifier.writeCharCode(code);
+  }
+  return identifier.toString();
+}
diff --git a/pkg/front_end/tool/_fasta/generate_experimental_flags_test.dart b/pkg/front_end/tool/_fasta/generate_experimental_flags_test.dart
new file mode 100644
index 0000000..81fdca0
--- /dev/null
+++ b/pkg/front_end/tool/_fasta/generate_experimental_flags_test.dart
@@ -0,0 +1,23 @@
+// 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 "dart:io" show File;
+
+import "package:async_helper/async_helper.dart" show asyncTest;
+
+import "package:expect/expect.dart" show Expect;
+
+import "generate_experimental_flags.dart"
+    show computeGeneratedFile, generateMessagesFile;
+
+main() {
+  asyncTest(() async {
+    Uri generatedFile = await computeGeneratedFile();
+    String generated = await generateMessagesFile();
+    String actual = (await new File.fromUri(generatedFile).readAsString())
+        .replaceAll('\r\n', '\n');
+    Expect.stringEquals(
+        generated, actual, "${generatedFile.path} is out of date");
+  });
+}
diff --git a/pkg/front_end/tool/fasta b/pkg/front_end/tool/fasta
index 65b9ec4..aa970c3 100755
--- a/pkg/front_end/tool/fasta
+++ b/pkg/front_end/tool/fasta
@@ -55,6 +55,7 @@
     set -- "$@" "--config=${REPO_DIR}/pkg/front_end/testing.json"
     ;;
   generate-messages) SCRIPT="${TOOL_DIR}/generate_messages.dart";;
+  generate-experimental-flags) SCRIPT="${TOOL_DIR}/generate_experimental_flags.dart";;
   *)
     stop "'$1' isn't a valid subcommand."
     ;;
diff --git a/pkg/kernel/lib/binary/ast_from_binary.dart b/pkg/kernel/lib/binary/ast_from_binary.dart
index 31c621d..905363a 100644
--- a/pkg/kernel/lib/binary/ast_from_binary.dart
+++ b/pkg/kernel/lib/binary/ast_from_binary.dart
@@ -39,6 +39,10 @@
   CanonicalNameError(this.message);
 }
 
+class CanonicalNameSdkError extends CanonicalNameError {
+  CanonicalNameSdkError(String message) : super(message);
+}
+
 class _ComponentIndex {
   static const numberOfFixedFields = 9;
 
@@ -528,8 +532,8 @@
               // OK then.
               checkReferenceNode = false;
             } else {
-              throw new CanonicalNameError(
-                  "Null reference (${child.name}) ($child).");
+              throw buildCanonicalNameError(
+                  "Null reference (${child.name}) ($child).", child);
             }
           }
           if (checkReferenceNode) {
@@ -538,8 +542,8 @@
                   "Canonical name and reference doesn't agree.");
             }
             if (child.reference.node == null) {
-              throw new CanonicalNameError(
-                  "Reference is null (${child.name}) ($child).");
+              throw buildCanonicalNameError(
+                  "Reference is null (${child.name}) ($child).", child);
             }
           }
         }
@@ -548,6 +552,17 @@
     }
   }
 
+  CanonicalNameError buildCanonicalNameError(
+      String message, CanonicalName problemNode) {
+    // Special-case missing sdk entries as that is probably a change to the
+    // platform - that's something we might want to react differently to.
+    String libraryUri = problemNode?.nonRootTop?.name ?? "";
+    if (libraryUri.startsWith("dart:")) {
+      return new CanonicalNameSdkError(message);
+    }
+    return new CanonicalNameError(message);
+  }
+
   _ComponentIndex _readComponentIndex(int componentFileSize) {
     int savedByteIndex = _byteOffset;
 
diff --git a/pkg/kernel/lib/transformations/track_widget_constructor_locations.dart b/pkg/kernel/lib/transformations/track_widget_constructor_locations.dart
index d227409..13bde9a 100644
--- a/pkg/kernel/lib/transformations/track_widget_constructor_locations.dart
+++ b/pkg/kernel/lib/transformations/track_widget_constructor_locations.dart
@@ -345,6 +345,7 @@
       _hasCreationLocationClass.enclosingLibrary,
     );
     final Field locationField = new Field(fieldName,
+        type: new InterfaceType(_locationClass),
         isFinal: true,
         reference: clazz.reference.canonicalName
             ?.getChildFromFieldWithName(fieldName)
diff --git a/pkg/modular_test/lib/src/generic_runner.dart b/pkg/modular_test/lib/src/generic_runner.dart
index 7a3786c..e7c3030 100644
--- a/pkg/modular_test/lib/src/generic_runner.dart
+++ b/pkg/modular_test/lib/src/generic_runner.dart
@@ -116,7 +116,15 @@
     testOutcomes.add(outcome);
   }
 
-  if (options.logDir == null) return;
+  if (options.logDir == null) {
+    // TODO(sigmund): delete. This is only added to ensure the bots show test
+    // failures until support for `--output-directory` is added to the test
+    // matrix.
+    if (testOutcomes.any((o) => !o.matchedExpectations)) {
+      exitCode = 1;
+    }
+    return;
+  }
 
   List<String> results = [];
   List<String> logs = [];
@@ -144,8 +152,13 @@
     }
   }
 
-  File.fromUri(options.logDir.resolve('results.json'))
-      .writeAsStringSync(results.map((s) => '$s\n').join());
-  File.fromUri(options.logDir.resolve('logs.json'))
-      .writeAsStringSync(logs.map((s) => '$s\n').join());
+  // Ensure the directory URI ends with a path separator.
+  var logDir = Directory.fromUri(options.logDir).uri;
+  var resultJsonUri = logDir.resolve('results.json');
+  var logsJsonUri = logDir.resolve('logs.json');
+  File.fromUri(resultJsonUri)
+      .writeAsStringSync(results.map((s) => '$s\n').join(), flush: true);
+  File.fromUri(logsJsonUri)
+      .writeAsStringSync(logs.map((s) => '$s\n').join(), flush: true);
+  print('log files emitted to ${resultJsonUri} and ${logsJsonUri}');
 }
diff --git a/pkg/modular_test/lib/src/loader.dart b/pkg/modular_test/lib/src/loader.dart
index b73da9b..e23d38e 100644
--- a/pkg/modular_test/lib/src/loader.dart
+++ b/pkg/modular_test/lib/src/loader.dart
@@ -211,7 +211,6 @@
     'sdk/lib/',
     'runtime/lib/',
     'runtime/bin/',
-    'pkg/dev_compiler/tool/input_sdk/',
   ];
   for (var path in sdkLibrariesAndPatchesRoots) {
     var dir = Directory.fromUri(root.resolve(path));
diff --git a/pkg/modular_test/lib/src/runner.dart b/pkg/modular_test/lib/src/runner.dart
index 9c3b36f..d3803bb 100644
--- a/pkg/modular_test/lib/src/runner.dart
+++ b/pkg/modular_test/lib/src/runner.dart
@@ -24,7 +24,7 @@
       .map((e) => new _PipelineTest(e.uri, suiteFolder, options, pipeline))
       .toList();
 
-  generic.runSuite(
+  await generic.runSuite(
       entries,
       new generic.RunnerOptions()
         ..suiteName = suiteName
@@ -64,6 +64,7 @@
   int shard = 1;
   String configurationName;
   Uri outputDirectory;
+  bool useSdk = false;
 
   static Options parse(List<String> args) {
     var parser = new ArgParser()
@@ -74,6 +75,8 @@
       ..addFlag('show-skipped',
           defaultsTo: false,
           help: 'print the name of the tests skipped by the filtering option')
+      ..addFlag('use-sdk',
+          defaultsTo: false, help: 'whether to use snapshots from a built sdk')
       ..addOption('filter',
           help: 'only run tests containing this filter as a substring')
       ..addOption('shards',
@@ -101,6 +104,7 @@
     return Options()
       ..showSkipped = argResults['show-skipped']
       ..verbose = argResults['verbose']
+      ..useSdk = argResults['use-sdk']
       ..filter = argResults['filter']
       ..shards = shards
       ..shard = shard
diff --git a/pkg/nnbd_migration/CHANGELOG.md b/pkg/nnbd_migration/CHANGELOG.md
new file mode 100644
index 0000000..aea8052
--- /dev/null
+++ b/pkg/nnbd_migration/CHANGELOG.md
@@ -0,0 +1,2 @@
+## 0.1.0-dev (not yet published)
+* Separated from analysis_server project.
diff --git a/pkg/nnbd_migration/LICENSE b/pkg/nnbd_migration/LICENSE
new file mode 100644
index 0000000..f75d7c2
--- /dev/null
+++ b/pkg/nnbd_migration/LICENSE
@@ -0,0 +1,26 @@
+Copyright 2019, the Dart 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.
diff --git a/pkg/nnbd_migration/README.md b/pkg/nnbd_migration/README.md
new file mode 100644
index 0000000..b1d8f0a
--- /dev/null
+++ b/pkg/nnbd_migration/README.md
@@ -0,0 +1,4 @@
+# NNBD Migration Engine
+
+This package provides infrastructure for migrating code to be non-nullable by
+default.
diff --git a/pkg/nnbd_migration/lib/nnbd_migration.dart b/pkg/nnbd_migration/lib/nnbd_migration.dart
new file mode 100644
index 0000000..33afb82
--- /dev/null
+++ b/pkg/nnbd_migration/lib/nnbd_migration.dart
@@ -0,0 +1,99 @@
+// 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/protocol_server.dart';
+import 'package:analyzer/dart/analysis/results.dart';
+import 'package:analyzer/src/generated/source.dart';
+import 'package:meta/meta.dart';
+import 'package:nnbd_migration/src/nullability_migration_impl.dart';
+
+/// Kinds of fixes that might be performed by nullability migration.
+class NullabilityFixKind {
+  /// An import needs to be added.
+  static const addImport =
+      const NullabilityFixKind._(appliedMessage: 'Add an import');
+
+  /// A formal parameter needs to have a required annotation added.
+  static const addRequired =
+      const NullabilityFixKind._(appliedMessage: 'Add a required annotation');
+
+  /// An expression's value needs to be null-checked.
+  static const checkExpression = const NullabilityFixKind._(
+    appliedMessage: 'Added a null check to an expression',
+  );
+
+  /// An explicit type mentioned in the source program needs to be made
+  /// nullable.
+  static const makeTypeNullable = const NullabilityFixKind._(
+    appliedMessage: 'Changed a type to be nullable',
+  );
+
+  /// An if-test or conditional expression needs to have its "then" branch
+  /// discarded.
+  static const discardThen = const NullabilityFixKind._(
+    appliedMessage: 'Discarded an unreachable conditional then branch',
+  );
+
+  /// An if-test or conditional expression needs to have its "else" branch
+  /// discarded.
+  static const discardElse = const NullabilityFixKind._(
+    appliedMessage: 'Discarded an unreachable conditional else branch',
+  );
+
+  /// A message used by dartfix to indicate a fix has been applied.
+  final String appliedMessage;
+
+  const NullabilityFixKind._({@required this.appliedMessage});
+}
+
+/// Provisional API for DartFix to perform nullability migration.
+///
+/// Usage: pass each input source file to [prepareInput].  Then pass each input
+/// source file to [processInput].  Then call [finish] to obtain the
+/// modifications that need to be made to each source file.
+abstract class NullabilityMigration {
+  /// Prepares to perform nullability migration.
+  ///
+  /// If [permissive] is `true`, exception handling logic will try to proceed
+  /// as far as possible even though the migration algorithm is not yet
+  /// complete.  TODO(paulberry): remove this mode once the migration algorithm
+  /// is fully implemented.
+  factory NullabilityMigration(NullabilityMigrationListener listener,
+      {bool permissive}) = NullabilityMigrationImpl;
+
+  void finish();
+
+  void prepareInput(ResolvedUnitResult result);
+
+  void processInput(ResolvedUnitResult result);
+}
+
+/// [NullabilityMigrationListener] is used by [NullabilityMigration]
+/// to communicate source changes or "fixes" to the client.
+abstract class NullabilityMigrationListener {
+  /// Add the given [detail] to the list of details to be returned to the
+  /// client.
+  void addDetail(String detail);
+
+  /// [addEdit] is called once for each source edit, in the order in which they
+  /// appear in the source file.
+  void addEdit(SingleNullabilityFix fix, SourceEdit edit);
+
+  /// [addFix] is called once for each source change.
+  void addFix(SingleNullabilityFix fix);
+}
+
+/// Representation of a single conceptual change made by the nullability
+/// migration algorithm.  This change might require multiple source edits to
+/// achieve.
+abstract class SingleNullabilityFix {
+  /// What kind of fix this is.
+  NullabilityFixKind get kind;
+
+  /// Location of the change, for reporting to the user.
+  Location get location;
+
+  /// File to change.
+  Source get source;
+}
diff --git a/pkg/analysis_server/lib/src/nullability/conditional_discard.dart b/pkg/nnbd_migration/lib/src/conditional_discard.dart
similarity index 96%
rename from pkg/analysis_server/lib/src/nullability/conditional_discard.dart
rename to pkg/nnbd_migration/lib/src/conditional_discard.dart
index dca55ce..144bd82 100644
--- a/pkg/analysis_server/lib/src/nullability/conditional_discard.dart
+++ b/pkg/nnbd_migration/lib/src/conditional_discard.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.
 
-import 'package:analysis_server/src/nullability/nullability_node.dart';
+import 'package:nnbd_migration/src/nullability_node.dart';
 
 /// Container for information gathered during nullability migration about a
 /// conditional check that might need to be discarded.
diff --git a/pkg/analysis_server/lib/src/nullability/decorated_type.dart b/pkg/nnbd_migration/lib/src/decorated_type.dart
similarity index 87%
rename from pkg/analysis_server/lib/src/nullability/decorated_type.dart
rename to pkg/nnbd_migration/lib/src/decorated_type.dart
index 0dbc5ac..a740c1c 100644
--- a/pkg/analysis_server/lib/src/nullability/decorated_type.dart
+++ b/pkg/nnbd_migration/lib/src/decorated_type.dart
@@ -2,12 +2,12 @@
 // for 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/nullability/nullability_node.dart';
-import 'package:analysis_server/src/nullability/transitional_api.dart';
 import 'package:analyzer/dart/element/element.dart';
 import 'package:analyzer/dart/element/type.dart';
 import 'package:analyzer/src/dart/element/type.dart';
 import 'package:analyzer_plugin/protocol/protocol_common.dart' show SourceEdit;
+import 'package:nnbd_migration/src/nullability_node.dart';
+import 'package:nnbd_migration/src/potential_modification.dart';
 
 /// Representation of a type in the code to be migrated.  In addition to
 /// tracking the (unmigrated) [DartType], we track the [ConstraintVariable]s
@@ -41,10 +41,6 @@
       this.namedParameters = const {},
       this.typeArguments = const []}) {
     assert(node != null);
-    // The type system doesn't have a non-nullable version of `dynamic`.  So if
-    // the type is `dynamic`, verify that the node was initially placed into a
-    // nullable state.
-    assert(!type.isDynamic || node.isNullable);
   }
 
   /// Creates a [DecoratedType] corresponding to the given [element], which is
@@ -117,6 +113,13 @@
     }
   }
 
+  /// Creates a shallow copy of `this`, replacing the nullability node.
+  DecoratedType withNode(NullabilityNode node) => DecoratedType(type, node,
+      returnType: returnType,
+      positionalParameters: positionalParameters,
+      namedParameters: namedParameters,
+      typeArguments: typeArguments);
+
   /// Internal implementation of [_substitute], used as a recursion target.
   DecoratedType _substitute(
       Map<TypeParameterElement, DecoratedType> substitution,
@@ -161,8 +164,15 @@
 
   DecoratedTypeAnnotation(
       DartType type, NullabilityNode nullabilityNode, this._offset,
-      {List<DecoratedType> typeArguments = const []})
-      : super(type, nullabilityNode, typeArguments: typeArguments);
+      {List<DecoratedType> typeArguments = const [],
+      DecoratedType returnType,
+      List<DecoratedType> positionalParameters = const [],
+      Map<String, DecoratedType> namedParameters = const {}})
+      : super(type, nullabilityNode,
+            typeArguments: typeArguments,
+            returnType: returnType,
+            positionalParameters: positionalParameters,
+            namedParameters: namedParameters);
 
   @override
   bool get isEmpty => !node.isNullable;
diff --git a/pkg/analysis_server/lib/src/nullability/decorated_type_operations.dart b/pkg/nnbd_migration/lib/src/decorated_type_operations.dart
similarity index 87%
rename from pkg/analysis_server/lib/src/nullability/decorated_type_operations.dart
rename to pkg/nnbd_migration/lib/src/decorated_type_operations.dart
index 0788209..b1e3fa8 100644
--- a/pkg/analysis_server/lib/src/nullability/decorated_type_operations.dart
+++ b/pkg/nnbd_migration/lib/src/decorated_type_operations.dart
@@ -2,11 +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:analysis_server/src/nullability/decorated_type.dart';
-import 'package:analysis_server/src/nullability/node_builder.dart';
 import 'package:analyzer/dart/element/element.dart';
 import 'package:analyzer/dart/element/type_system.dart';
 import 'package:analyzer/src/dart/resolver/flow_analysis.dart';
+import 'package:nnbd_migration/src/decorated_type.dart';
+import 'package:nnbd_migration/src/node_builder.dart';
 
 /// [TypeOperations] that works with [DecoratedType]s.
 class DecoratedTypeOperations implements TypeOperations<DecoratedType> {
diff --git a/pkg/analysis_server/lib/src/nullability/expression_checks.dart b/pkg/nnbd_migration/lib/src/expression_checks.dart
similarity index 91%
rename from pkg/analysis_server/lib/src/nullability/expression_checks.dart
rename to pkg/nnbd_migration/lib/src/expression_checks.dart
index bc533d6..6dd34af 100644
--- a/pkg/analysis_server/lib/src/nullability/expression_checks.dart
+++ b/pkg/nnbd_migration/lib/src/expression_checks.dart
@@ -2,9 +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.
 
-import 'package:analysis_server/src/nullability/nullability_node.dart';
-import 'package:analysis_server/src/nullability/transitional_api.dart';
 import 'package:analyzer_plugin/protocol/protocol_common.dart';
+import 'package:nnbd_migration/src/nullability_node.dart';
+import 'package:nnbd_migration/src/potential_modification.dart';
 
 /// Container for information gathered during nullability migration about the
 /// set of runtime checks that might need to be performed on the value of an
diff --git a/pkg/analysis_server/lib/src/nullability/graph_builder.dart b/pkg/nnbd_migration/lib/src/graph_builder.dart
similarity index 77%
rename from pkg/analysis_server/lib/src/nullability/graph_builder.dart
rename to pkg/nnbd_migration/lib/src/graph_builder.dart
index c2f4bfa..cf3c46d 100644
--- a/pkg/analysis_server/lib/src/nullability/graph_builder.dart
+++ b/pkg/nnbd_migration/lib/src/graph_builder.dart
@@ -2,11 +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.
 
-import 'package:analysis_server/src/nullability/conditional_discard.dart';
-import 'package:analysis_server/src/nullability/decorated_type.dart';
-import 'package:analysis_server/src/nullability/expression_checks.dart';
-import 'package:analysis_server/src/nullability/node_builder.dart';
-import 'package:analysis_server/src/nullability/nullability_node.dart';
 import 'package:analyzer/dart/ast/ast.dart';
 import 'package:analyzer/dart/ast/token.dart';
 import 'package:analyzer/dart/ast/visitor.dart';
@@ -16,6 +11,12 @@
 import 'package:analyzer/src/generated/resolver.dart';
 import 'package:analyzer/src/generated/source.dart';
 import 'package:meta/meta.dart';
+import 'package:nnbd_migration/nnbd_migration.dart';
+import 'package:nnbd_migration/src/conditional_discard.dart';
+import 'package:nnbd_migration/src/decorated_type.dart';
+import 'package:nnbd_migration/src/expression_checks.dart';
+import 'package:nnbd_migration/src/node_builder.dart';
+import 'package:nnbd_migration/src/nullability_node.dart';
 
 /// Visitor that builds nullability graph edges by examining code to be
 /// migrated.
@@ -29,7 +30,7 @@
   /// previous pass over the source code).
   final VariableRepository _variables;
 
-  final bool _permissive;
+  final NullabilityMigrationListener /*?*/ listener;
 
   final NullabilityGraph _graph;
 
@@ -73,8 +74,10 @@
   /// or expression.
   bool _inConditionalControlFlow = false;
 
+  NullabilityNode _lastConditionalNode;
+
   GraphBuilder(TypeProvider typeProvider, this._variables, this._graph,
-      this._source, this._permissive)
+      this._source, this.listener)
       : _notNullType =
             DecoratedType(typeProvider.objectType, NullabilityNode.never),
         _nonNullableBoolType =
@@ -109,8 +112,27 @@
     } else {
       baseElement = element;
     }
-    var decoratedBaseType =
-        _variables.decoratedElementType(baseElement, create: true);
+    DecoratedType decoratedBaseType;
+    if (baseElement is PropertyAccessorElement &&
+        baseElement.isSynthetic &&
+        !baseElement.variable.isSynthetic) {
+      var variable = baseElement.variable;
+      var decoratedElementType =
+          _variables.decoratedElementType(variable, create: true);
+      if (baseElement.isGetter) {
+        decoratedBaseType = DecoratedType(
+            baseElement.type, NullabilityNode.never,
+            returnType: decoratedElementType);
+      } else {
+        assert(baseElement.isSetter);
+        decoratedBaseType = DecoratedType(
+            baseElement.type, NullabilityNode.never,
+            positionalParameters: [decoratedElementType]);
+      }
+    } else {
+      decoratedBaseType =
+          _variables.decoratedElementType(baseElement, create: true);
+    }
     if (substitution != null) {
       DartType elementType;
       if (element is MethodElement) {
@@ -139,6 +161,23 @@
   }
 
   @override
+  DecoratedType visitAssignmentExpression(AssignmentExpression node) {
+    if (node.operator.type != TokenType.EQ) {
+      throw UnimplementedError('TODO(paulberry)');
+    }
+    var leftType = node.leftHandSide.accept(this);
+    var conditionalNode = _lastConditionalNode;
+    _lastConditionalNode = null;
+    var expressionType = _handleAssignment(leftType, node.rightHandSide);
+    if (_isConditionalExpression(node.leftHandSide)) {
+      expressionType = expressionType.withNode(
+          NullabilityNode.forLUB(conditionalNode, expressionType.node));
+      _variables.recordDecoratedExpressionType(node, expressionType);
+    }
+    return expressionType;
+  }
+
+  @override
   DecoratedType visitBinaryExpression(BinaryExpression node) {
     switch (node.operator.type) {
       case TokenType.EQ_EQ:
@@ -185,6 +224,13 @@
   }
 
   @override
+  DecoratedType visitCascadeExpression(CascadeExpression node) {
+    var type = node.target.accept(this);
+    node.cascadeSections.accept(this);
+    return type;
+  }
+
+  @override
   DecoratedType visitClassDeclaration(ClassDeclaration node) {
     node.members.accept(this);
     return null;
@@ -198,8 +244,8 @@
     assert(_isSimple(thenType)); // TODO(paulberry)
     var elseType = node.elseExpression.accept(this);
     assert(_isSimple(elseType)); // TODO(paulberry)
-    var overallType = DecoratedType(node.staticType,
-        NullabilityNode.forLUB(node, thenType.node, elseType.node, _graph));
+    var overallType = DecoratedType(
+        node.staticType, NullabilityNode.forLUB(thenType.node, elseType.node));
     _variables.recordDecoratedExpressionType(node, overallType);
     return overallType;
   }
@@ -232,7 +278,7 @@
 
   @override
   DecoratedType visitFunctionDeclaration(FunctionDeclaration node) {
-    node.functionExpression.parameters.accept(this);
+    node.functionExpression.parameters?.accept(this);
     assert(_currentFunctionType == null);
     _currentFunctionType =
         _variables.decoratedElementType(node.declaredElement);
@@ -283,6 +329,27 @@
   }
 
   @override
+  DecoratedType visitIndexExpression(IndexExpression node) {
+    DecoratedType targetType;
+    var target = node.realTarget;
+    if (target != null) {
+      targetType = _handleAssignment(_notNullType, target);
+    }
+    var callee = node.staticElement;
+    if (callee == null) {
+      throw new UnimplementedError('TODO(paulberry)');
+    }
+    var calleeType = getOrComputeElementType(callee, targetType: targetType);
+    // TODO(paulberry): substitute if necessary
+    _handleAssignment(calleeType.positionalParameters[0], node.index);
+    if (node.inSetterContext()) {
+      return calleeType.positionalParameters[1];
+    } else {
+      return calleeType.returnType;
+    }
+  }
+
+  @override
   DecoratedType visitIntegerLiteral(IntegerLiteral node) {
     return DecoratedType(node.staticType, NullabilityNode.never);
   }
@@ -305,12 +372,15 @@
   @override
   DecoratedType visitMethodInvocation(MethodInvocation node) {
     DecoratedType targetType;
-    if (node.target != null) {
-      if (node.operator.type != TokenType.PERIOD) {
-        throw new UnimplementedError('TODO(paulberry)');
+    var target = node.realTarget;
+    bool isConditional = _isConditionalExpression(node);
+    if (target != null) {
+      if (isConditional) {
+        targetType = target.accept(this);
+      } else {
+        _checkNonObjectMember(node.methodName.name); // TODO(paulberry)
+        targetType = _handleAssignment(_notNullType, target);
       }
-      _checkNonObjectMember(node.methodName.name); // TODO(paulberry)
-      targetType = _handleAssignment(_notNullType, node.target);
     }
     var callee = node.methodName.staticElement;
     if (callee == null) {
@@ -338,15 +408,25 @@
       if (suppliedNamedParameters.contains(entry.key)) continue;
       entry.value.node.recordNamedParameterNotSupplied(_guards, _graph);
     }
-    return calleeType.returnType;
+    var expressionType = calleeType.returnType;
+    if (isConditional) {
+      expressionType = expressionType.withNode(
+          NullabilityNode.forLUB(targetType.node, expressionType.node));
+      _variables.recordDecoratedExpressionType(node, expressionType);
+    }
+    return expressionType;
   }
 
   @override
   DecoratedType visitNode(AstNode node) {
-    if (_permissive) {
+    if (listener != null) {
       try {
         return super.visitNode(node);
-      } catch (_) {
+      } catch (exception, stackTrace) {
+        listener.addDetail('''
+$exception
+
+$stackTrace''');
         return null;
       }
     } else {
@@ -369,13 +449,13 @@
     if (node.prefix.staticElement is ImportElement) {
       throw new UnimplementedError('TODO(paulberry)');
     } else {
-      return _handlePropertyAccess(node.prefix, node.period, node.identifier);
+      return _handlePropertyAccess(node, node.prefix, node.identifier);
     }
   }
 
   @override
   DecoratedType visitPropertyAccess(PropertyAccess node) {
-    return _handlePropertyAccess(node.target, node.operator, node.propertyName);
+    return _handlePropertyAccess(node, node.realTarget, node.propertyName);
   }
 
   @override
@@ -391,7 +471,8 @@
   @override
   DecoratedType visitSimpleIdentifier(SimpleIdentifier node) {
     var staticElement = node.staticElement;
-    if (staticElement is ParameterElement) {
+    if (staticElement is ParameterElement ||
+        staticElement is LocalVariableElement) {
       return getOrComputeElementType(staticElement);
     } else if (staticElement is ClassElement) {
       return _nonNullableTypeType;
@@ -439,6 +520,18 @@
     return DecoratedType(typeName.type, NullabilityNode.never);
   }
 
+  @override
+  DecoratedType visitVariableDeclaration(VariableDeclaration node) {
+    var destinationType = getOrComputeElementType(node.declaredElement);
+    var initializer = node.initializer;
+    if (initializer == null) {
+      throw UnimplementedError('TODO(paulberry)');
+    } else {
+      _handleAssignment(destinationType, initializer);
+    }
+    return null;
+  }
+
   /// Creates the necessary constraint(s) for an assignment from [sourceType] to
   /// [destinationType].  [expression] is the expression whose type is
   /// [sourceType]; it is the expression we will have to null-check in the case
@@ -506,19 +599,56 @@
   }
 
   DecoratedType _handlePropertyAccess(
-      Expression target, Token operator, SimpleIdentifier propertyName) {
-    if (operator.type != TokenType.PERIOD) {
-      throw new UnimplementedError('TODO(paulberry)');
+      Expression node, Expression target, SimpleIdentifier propertyName) {
+    DecoratedType targetType;
+    bool isConditional = _isConditionalExpression(node);
+    if (isConditional) {
+      targetType = target.accept(this);
+    } else {
+      _checkNonObjectMember(propertyName.name); // TODO(paulberry)
+      targetType = _handleAssignment(_notNullType, target);
     }
-    _checkNonObjectMember(propertyName.name); // TODO(paulberry)
-    var targetType = _handleAssignment(_notNullType, target);
     var callee = propertyName.staticElement;
     if (callee == null) {
       throw new UnimplementedError('TODO(paulberry)');
     }
     var calleeType = getOrComputeElementType(callee, targetType: targetType);
     // TODO(paulberry): substitute if necessary
-    return calleeType.returnType;
+    if (propertyName.inSetterContext()) {
+      if (isConditional) {
+        _lastConditionalNode = targetType.node;
+      }
+      return calleeType.positionalParameters[0];
+    } else {
+      var expressionType = calleeType.returnType;
+      if (isConditional) {
+        expressionType = expressionType.withNode(
+            NullabilityNode.forLUB(targetType.node, expressionType.node));
+        _variables.recordDecoratedExpressionType(node, expressionType);
+      }
+      return expressionType;
+    }
+  }
+
+  bool _isConditionalExpression(Expression expression) {
+    Token token;
+    if (expression is MethodInvocation) {
+      token = expression.operator;
+      if (token == null) return false;
+    } else if (expression is PropertyAccess) {
+      token = expression.operator;
+    } else {
+      return false;
+    }
+    switch (token.type) {
+      case TokenType.PERIOD:
+      case TokenType.PERIOD_PERIOD:
+        return false;
+      case TokenType.QUESTION_PERIOD:
+        return true;
+      default:
+        throw new UnimplementedError('TODO(paulberry)');
+    }
   }
 
   /// Double checks that [type] is sufficiently simple for this naive prototype
@@ -529,6 +659,7 @@
   bool _isSimple(DecoratedType type) {
     if (type.type.isBottom) return true;
     if (type.type.isVoid) return true;
+    if (type.type is TypeParameterType) return true;
     if (type.type is! InterfaceType) return false;
     if ((type.type as InterfaceType).typeParameters.isNotEmpty) return false;
     return true;
diff --git a/pkg/analysis_server/lib/src/nullability/node_builder.dart b/pkg/nnbd_migration/lib/src/node_builder.dart
similarity index 69%
rename from pkg/analysis_server/lib/src/nullability/node_builder.dart
rename to pkg/nnbd_migration/lib/src/node_builder.dart
index b85765b..44a7475 100644
--- a/pkg/analysis_server/lib/src/nullability/node_builder.dart
+++ b/pkg/nnbd_migration/lib/src/node_builder.dart
@@ -2,10 +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.
 
-import 'package:analysis_server/src/nullability/conditional_discard.dart';
-import 'package:analysis_server/src/nullability/decorated_type.dart';
-import 'package:analysis_server/src/nullability/expression_checks.dart';
-import 'package:analysis_server/src/nullability/nullability_node.dart';
 import 'package:analyzer/dart/ast/ast.dart';
 import 'package:analyzer/dart/ast/visitor.dart';
 import 'package:analyzer/dart/element/element.dart';
@@ -13,6 +9,12 @@
 import 'package:analyzer/src/dart/element/type.dart';
 import 'package:analyzer/src/generated/resolver.dart';
 import 'package:analyzer/src/generated/source.dart';
+import 'package:front_end/src/scanner/token.dart';
+import 'package:nnbd_migration/nnbd_migration.dart';
+import 'package:nnbd_migration/src/conditional_discard.dart';
+import 'package:nnbd_migration/src/decorated_type.dart';
+import 'package:nnbd_migration/src/expression_checks.dart';
+import 'package:nnbd_migration/src/nullability_node.dart';
 
 /// Visitor that builds nullability nodes based on visiting code to be migrated.
 ///
@@ -35,13 +37,13 @@
   /// parameters?
   DecoratedType _currentFunctionType;
 
-  final bool _permissive;
+  final NullabilityMigrationListener /*?*/ listener;
 
   final NullabilityGraph _graph;
 
   final TypeProvider _typeProvider;
 
-  NodeBuilder(this._variables, this._source, this._permissive, this._graph,
+  NodeBuilder(this._variables, this._source, this.listener, this._graph,
       this._typeProvider);
 
   /// Creates and stores a [DecoratedType] object corresponding to the given
@@ -59,6 +61,13 @@
   }
 
   @override
+  DecoratedType visitConstructorDeclaration(ConstructorDeclaration node) {
+    _handleExecutableDeclaration(
+        node.declaredElement, null, node.parameters, node.body, node);
+    return null;
+  }
+
+  @override
   DecoratedType visitDefaultFormalParameter(DefaultFormalParameter node) {
     var decoratedType = node.parameter.accept(this);
     if (node.declaredElement.hasRequired || node.defaultValue != null) {
@@ -84,23 +93,27 @@
   @override
   DecoratedType visitFunctionDeclaration(FunctionDeclaration node) {
     _handleExecutableDeclaration(node.declaredElement, node.returnType,
-        node.functionExpression.parameters, node);
+        node.functionExpression.parameters, node.functionExpression.body, node);
     return null;
   }
 
   @override
   DecoratedType visitMethodDeclaration(MethodDeclaration node) {
-    _handleExecutableDeclaration(
-        node.declaredElement, node.returnType, node.parameters, node);
+    _handleExecutableDeclaration(node.declaredElement, node.returnType,
+        node.parameters, node.body, node);
     return null;
   }
 
   @override
   DecoratedType visitNode(AstNode node) {
-    if (_permissive) {
+    if (listener != null) {
       try {
         return super.visitNode(node);
-      } catch (_) {
+      } catch (exception, stackTrace) {
+        listener.addDetail('''
+$exception
+
+$stackTrace''');
         return null;
       }
     } else {
@@ -124,15 +137,20 @@
   @override
   DecoratedType visitTypeAnnotation(TypeAnnotation node) {
     assert(node != null); // TODO(paulberry)
-    assert(node is NamedType); // TODO(paulberry)
     var type = node.type;
-    if (type.isVoid) {
-      return DecoratedType(
-          type, NullabilityNode.forTypeAnnotation(node.end, always: true));
+    if (type.isVoid || type.isDynamic) {
+      var nullabilityNode = NullabilityNode.forTypeAnnotation(node.end);
+      _graph.connect(NullabilityNode.always, nullabilityNode);
+      var decoratedType =
+          DecoratedTypeAnnotation(type, nullabilityNode, node.offset);
+      _variables.recordDecoratedTypeAnnotation(_source, node, decoratedType,
+          potentialModification: false);
+      return decoratedType;
     }
-    assert(
-        type is InterfaceType || type is TypeParameterType); // TODO(paulberry)
     var typeArguments = const <DecoratedType>[];
+    DecoratedType returnType;
+    var positionalParameters = const <DecoratedType>[];
+    var namedParameters = const <String, DecoratedType>{};
     if (type is InterfaceType && type.typeParameters.isNotEmpty) {
       if (node is TypeName) {
         assert(node.typeArguments != null);
@@ -142,13 +160,40 @@
         assert(false); // TODO(paulberry): is this possible?
       }
     }
+    if (node is GenericFunctionType) {
+      returnType = decorateType(node.returnType, node);
+      if (node.typeParameters != null) {
+        throw UnimplementedError('TODO(paulberry)');
+      }
+      positionalParameters = <DecoratedType>[];
+      namedParameters = <String, DecoratedType>{};
+    }
     var decoratedType = DecoratedTypeAnnotation(
-        type,
-        NullabilityNode.forTypeAnnotation(node.end,
-            always: node.question != null),
-        node.end,
-        typeArguments: typeArguments);
+        type, NullabilityNode.forTypeAnnotation(node.end), node.end,
+        typeArguments: typeArguments,
+        returnType: returnType,
+        positionalParameters: positionalParameters,
+        namedParameters: namedParameters);
     _variables.recordDecoratedTypeAnnotation(_source, node, decoratedType);
+    if (node is GenericFunctionType) {
+      var previousFunctionType = _currentFunctionType;
+      try {
+        _currentFunctionType = decoratedType;
+        node.parameters.accept(this);
+      } finally {
+        _currentFunctionType = previousFunctionType;
+      }
+    }
+    switch (_classifyComment(node.endToken.next.precedingComments)) {
+      case _NullabilityComment.bang:
+        _graph.connect(decoratedType.node, NullabilityNode.never, hard: true);
+        break;
+      case _NullabilityComment.question:
+        _graph.connect(NullabilityNode.always, decoratedType.node);
+        break;
+      case _NullabilityComment.none:
+        break;
+    }
     return decoratedType;
   }
 
@@ -165,11 +210,29 @@
     return null;
   }
 
+  @override
+  DecoratedType visitVariableDeclarationList(VariableDeclarationList node) {
+    var type = decorateType(node.type, node);
+    for (var variable in node.variables) {
+      _variables.recordDecoratedElementType(variable.declaredElement, type);
+    }
+    return null;
+  }
+
+  _NullabilityComment _classifyComment(Token token) {
+    if (token is CommentToken) {
+      if (token.lexeme == '/*!*/') return _NullabilityComment.bang;
+      if (token.lexeme == '/*?*/') return _NullabilityComment.question;
+    }
+    return _NullabilityComment.none;
+  }
+
   /// Common handling of function and method declarations.
   void _handleExecutableDeclaration(
       ExecutableElement declaredElement,
       TypeAnnotation returnType,
       FormalParameterList parameters,
+      FunctionBody body,
       AstNode enclosingNode) {
     var decoratedReturnType = decorateType(returnType, enclosingNode);
     var previousFunctionType = _currentFunctionType;
@@ -183,6 +246,7 @@
     _currentFunctionType = functionType;
     try {
       parameters?.accept(this);
+      body?.accept(this);
     } finally {
       _currentFunctionType = previousFunctionType;
     }
@@ -202,7 +266,8 @@
 
   /// Associates decorated type information with the given [type] node.
   void recordDecoratedTypeAnnotation(
-      Source source, TypeAnnotation node, DecoratedTypeAnnotation type);
+      Source source, TypeAnnotation node, DecoratedTypeAnnotation type,
+      {bool potentialModification: true});
 
   /// Records that [node] is associated with the question of whether the named
   /// [parameter] should be optional (should not have a `required`
@@ -248,3 +313,17 @@
   void recordExpressionChecks(
       Source source, Expression expression, ExpressionChecks checks);
 }
+
+/// Types of comments that can influence nullability
+enum _NullabilityComment {
+  /// The comment `/*!*/`, which indicates that the type should not have a `?`
+  /// appended.
+  bang,
+
+  /// The comment `/*?*/`, which indicates that the type should have a `?`
+  /// appended.
+  question,
+
+  /// No special comment.
+  none,
+}
diff --git a/pkg/nnbd_migration/lib/src/nullability_migration_impl.dart b/pkg/nnbd_migration/lib/src/nullability_migration_impl.dart
new file mode 100644
index 0000000..a94f87b
--- /dev/null
+++ b/pkg/nnbd_migration/lib/src/nullability_migration_impl.dart
@@ -0,0 +1,101 @@
+// 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/protocol_server.dart';
+import 'package:analyzer/dart/analysis/results.dart';
+import 'package:analyzer/src/generated/source.dart';
+import 'package:nnbd_migration/nnbd_migration.dart';
+import 'package:nnbd_migration/src/decorated_type.dart';
+import 'package:nnbd_migration/src/expression_checks.dart';
+import 'package:nnbd_migration/src/graph_builder.dart';
+import 'package:nnbd_migration/src/node_builder.dart';
+import 'package:nnbd_migration/src/nullability_node.dart';
+import 'package:nnbd_migration/src/potential_modification.dart';
+import 'package:nnbd_migration/src/variables.dart';
+
+/// Implementation of the [NullabilityMigration] public API.
+class NullabilityMigrationImpl implements NullabilityMigration {
+  final NullabilityMigrationListener listener;
+
+  final _variables = Variables();
+
+  final _graph = NullabilityGraph();
+
+  final bool _permissive;
+
+  /// Prepares to perform nullability migration.
+  ///
+  /// If [permissive] is `true`, exception handling logic will try to proceed
+  /// as far as possible even though the migration algorithm is not yet
+  /// complete.  TODO(paulberry): remove this mode once the migration algorithm
+  /// is fully implemented.
+  NullabilityMigrationImpl(this.listener, {bool permissive: false})
+      : _permissive = permissive;
+
+  void finish() {
+    _graph.propagate();
+    for (var entry in _variables.getPotentialModifications().entries) {
+      var source = entry.key;
+      for (var potentialModification in entry.value) {
+        var fix = _SingleNullabilityFix(source, potentialModification);
+        listener.addFix(fix);
+        for (var edit in potentialModification.modifications) {
+          listener.addEdit(fix, edit);
+        }
+      }
+    }
+  }
+
+  void prepareInput(ResolvedUnitResult result) {
+    var unit = result.unit;
+    unit.accept(NodeBuilder(_variables, unit.declaredElement.source,
+        _permissive ? listener : null, _graph, result.typeProvider));
+  }
+
+  void processInput(ResolvedUnitResult result) {
+    var unit = result.unit;
+    unit.accept(GraphBuilder(result.typeProvider, _variables, _graph,
+        unit.declaredElement.source, _permissive ? listener : null));
+  }
+}
+
+/// Implementation of [SingleNullabilityFix] used internally by
+/// [NullabilityMigration].
+class _SingleNullabilityFix extends SingleNullabilityFix {
+  @override
+  final Source source;
+
+  @override
+  final NullabilityFixKind kind;
+
+  factory _SingleNullabilityFix(
+      Source source, PotentialModification potentialModification) {
+    // TODO(paulberry): once everything is migrated into the analysis server,
+    // the migration engine can just create SingleNullabilityFix objects
+    // directly and set their kind appropriately; we won't need to translate the
+    // kinds using a bunch of `is` checks.
+    NullabilityFixKind kind;
+    if (potentialModification is ExpressionChecks) {
+      kind = NullabilityFixKind.checkExpression;
+    } else if (potentialModification is DecoratedTypeAnnotation) {
+      kind = NullabilityFixKind.makeTypeNullable;
+    } else if (potentialModification is ConditionalModification) {
+      kind = potentialModification.discard.keepFalse
+          ? NullabilityFixKind.discardThen
+          : NullabilityFixKind.discardElse;
+    } else if (potentialModification is PotentiallyAddImport) {
+      kind = NullabilityFixKind.addImport;
+    } else if (potentialModification is PotentiallyAddRequired) {
+      kind = NullabilityFixKind.addRequired;
+    } else {
+      throw new UnimplementedError('TODO(paulberry)');
+    }
+    return _SingleNullabilityFix._(source, kind);
+  }
+
+  _SingleNullabilityFix._(this.source, this.kind);
+
+  /// TODO(paulberry): do something better
+  Location get location => null;
+}
diff --git a/pkg/analysis_server/lib/src/nullability/nullability_node.dart b/pkg/nnbd_migration/lib/src/nullability_node.dart
similarity index 91%
rename from pkg/analysis_server/lib/src/nullability/nullability_node.dart
rename to pkg/nnbd_migration/lib/src/nullability_node.dart
index 453887d..4abbc72 100644
--- a/pkg/analysis_server/lib/src/nullability/nullability_node.dart
+++ b/pkg/nnbd_migration/lib/src/nullability_node.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.
 
-import 'package:analyzer/dart/ast/ast.dart';
 import 'package:meta/meta.dart';
 
 /// Data structure to keep track of the relationship from one [NullabilityNode]
@@ -60,16 +59,7 @@
     var sources = [sourceNode]..addAll(guards);
     var edge = NullabilityEdge(destinationNode, sources, hard);
     for (var source in sources) {
-      _allSourceNodes.add(source);
-      if (source is NullabilityNodeMutable) {
-        source._downstreamEdges.add(edge);
-      } else if (source == NullabilityNode.always) {
-        _downstreamFromAlways.add(edge);
-      } else {
-        // We don't need to track nodes that are downstream from `never` because
-        // `never` will never be nullable.
-        assert(source == NullabilityNode.never);
-      }
+      _connectDownstream(source, edge);
     }
     if (destinationNode is NullabilityNodeMutable) {
       destinationNode._upstreamEdges.add(edge);
@@ -144,6 +134,24 @@
     _propagateDownstream();
   }
 
+  void _connectDownstream(NullabilityNode source, NullabilityEdge edge) {
+    _allSourceNodes.add(source);
+    if (source is NullabilityNodeMutable) {
+      source._downstreamEdges.add(edge);
+      if (source is _NullabilityNodeCompound) {
+        for (var component in source._components) {
+          _connectDownstream(component, edge);
+        }
+      }
+    } else if (source == NullabilityNode.always) {
+      _downstreamFromAlways.add(edge);
+    } else {
+      // We don't need to track nodes that are downstream from `never` because
+      // `never` will never be nullable.
+      assert(source == NullabilityNode.never);
+    }
+  }
+
   Iterable<NullabilityEdge> _getDownstreamEdges(NullabilityNode node) {
     if (node is NullabilityNodeMutable) {
       return node._downstreamEdges;
@@ -176,7 +184,7 @@
         }
         for (var source in edge.sources) {
           if (!source.isNullable) {
-            // Note all sources are nullable, so this edge doesn't apply yet.
+            // Not all sources are nullable, so this edge doesn't apply yet.
             continue nextEdge;
           }
         }
@@ -264,11 +272,8 @@
   /// [joinNullabilities] callback.  TODO(paulberry): this should become
   /// unnecessary once constraint solving is performed directly using
   /// [NullabilityNode] objects.
-  factory NullabilityNode.forLUB(
-      Expression conditionalExpression,
-      NullabilityNode a,
-      NullabilityNode b,
-      NullabilityGraph graph) = NullabilityNodeForLUB._;
+  factory NullabilityNode.forLUB(NullabilityNode a, NullabilityNode b) =
+      NullabilityNodeForLUB._;
 
   /// Creates a [NullabilityNode] representing the nullability of a type
   /// substitution where [outerNode] is the nullability node for the type
@@ -287,8 +292,7 @@
 
   /// Creates a [NullabilityNode] representing the nullability of a type
   /// annotation appearing explicitly in the user's program.
-  factory NullabilityNode.forTypeAnnotation(int endOffset,
-          {@required bool always}) =>
+  factory NullabilityNode.forTypeAnnotation(int endOffset) =>
       _NullabilityNodeSimple('type($endOffset)');
 
   NullabilityNode._();
@@ -372,17 +376,15 @@
 
 /// Derived class for nullability nodes that arise from the least-upper-bound
 /// implied by a conditional expression.
-class NullabilityNodeForLUB extends NullabilityNodeMutable {
+class NullabilityNodeForLUB extends _NullabilityNodeCompound {
   final NullabilityNode left;
 
   final NullabilityNode right;
 
-  NullabilityNodeForLUB._(
-      Expression expression, this.left, this.right, NullabilityGraph graph)
-      : super._() {
-    graph.connect(left, this);
-    graph.connect(right, this);
-  }
+  NullabilityNodeForLUB._(this.left, this.right);
+
+  @override
+  Iterable<NullabilityNode> get _components => [left, right];
 
   @override
   String get _debugPrefix => 'LUB($left, $right)';
@@ -390,7 +392,7 @@
 
 /// Derived class for nullability nodes that arise from type variable
 /// substitution.
-class NullabilityNodeForSubstitution extends NullabilityNodeMutable {
+class NullabilityNodeForSubstitution extends _NullabilityNodeCompound {
   /// Nullability node representing the inner type of the substitution.
   ///
   /// For example, if this NullabilityNode arose from substituting `int*` for
@@ -405,7 +407,10 @@
   /// `*` in `T*`.
   final NullabilityNode outerNode;
 
-  NullabilityNodeForSubstitution._(this.innerNode, this.outerNode) : super._();
+  NullabilityNodeForSubstitution._(this.innerNode, this.outerNode);
+
+  @override
+  Iterable<NullabilityNode> get _components => [innerNode, outerNode];
 
   @override
   String get _debugPrefix => 'Substituted($innerNode, $outerNode)';
@@ -439,6 +444,15 @@
   bool get isNullable => _state.isNullable;
 }
 
+abstract class _NullabilityNodeCompound extends NullabilityNodeMutable {
+  _NullabilityNodeCompound() : super._();
+
+  @override
+  bool get isNullable => _components.any((c) => c.isNullable);
+
+  Iterable<NullabilityNode> get _components;
+}
+
 class _NullabilityNodeImmutable extends NullabilityNode {
   @override
   final String _debugPrefix;
diff --git a/pkg/nnbd_migration/lib/src/potential_modification.dart b/pkg/nnbd_migration/lib/src/potential_modification.dart
new file mode 100644
index 0000000..6bc0d16
--- /dev/null
+++ b/pkg/nnbd_migration/lib/src/potential_modification.dart
@@ -0,0 +1,169 @@
+// 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_plugin/protocol/protocol_common.dart' show SourceEdit;
+import 'package:nnbd_migration/src/conditional_discard.dart';
+import 'package:nnbd_migration/src/nullability_node.dart';
+
+/// Records information about how a conditional expression or statement might
+/// need to be modified.
+class ConditionalModification extends PotentialModification {
+  final int offset;
+
+  final int end;
+
+  final bool isStatement;
+
+  final ConditionalDiscard discard;
+
+  final _KeepNode condition;
+
+  final _KeepNode thenStatement;
+
+  final _KeepNode elseStatement;
+
+  factory ConditionalModification(AstNode node, ConditionalDiscard discard) {
+    if (node is IfStatement) {
+      return ConditionalModification._(
+          node.offset,
+          node.end,
+          node is Statement,
+          discard,
+          _KeepNode(node.condition),
+          _KeepNode(node.thenStatement),
+          _KeepNode(node.elseStatement));
+    } else {
+      throw new UnimplementedError('TODO(paulberry)');
+    }
+  }
+
+  ConditionalModification._(this.offset, this.end, this.isStatement,
+      this.discard, this.condition, this.thenStatement, this.elseStatement);
+
+  @override
+  bool get isEmpty => discard.keepTrue && discard.keepFalse;
+
+  @override
+  Iterable<SourceEdit> get modifications {
+    if (isEmpty) return const [];
+    // TODO(paulberry): move the following logic into DartEditBuilder (see
+    // dartbug.com/35872).
+    var result = <SourceEdit>[];
+    var keepNodes = <_KeepNode>[];
+    if (!discard.pureCondition) {
+      keepNodes.add(condition); // TODO(paulberry): test
+    }
+    if (discard.keepTrue) {
+      keepNodes.add(thenStatement); // TODO(paulberry): test
+    }
+    if (discard.keepFalse) {
+      keepNodes.add(elseStatement); // TODO(paulberry): test
+    }
+    // TODO(paulberry): test thoroughly
+    for (int i = 0; i < keepNodes.length; i++) {
+      var keepNode = keepNodes[i];
+      if (i == 0 && keepNode.offset != offset) {
+        result.add(SourceEdit(offset, 0, '/* '));
+      }
+      if (i != 0 || keepNode.offset != offset) {
+        result.add(SourceEdit(keepNode.offset, 0, '*/ '));
+      }
+      if (i != keepNodes.length - 1 || keepNode.end != end) {
+        result.add(SourceEdit(keepNode.end, 0,
+            keepNode.isExpression && isStatement ? '; /*' : ' /*'));
+      }
+      if (i == keepNodes.length - 1 && keepNode.end != end) {
+        result.add(SourceEdit(end, 0, ' */'));
+      }
+    }
+    return result;
+  }
+}
+
+/// Records information about the possible addition of an import
+/// to the source code.
+class PotentiallyAddImport extends PotentialModification {
+  final _usages = <PotentialModification>[];
+
+  final int _offset;
+  final String _importPath;
+
+  PotentiallyAddImport(
+      AstNode beforeNode, this._importPath, PotentialModification usage)
+      : _offset = beforeNode.offset {
+    _usages.add(usage);
+  }
+
+  get importPath => _importPath;
+
+  @override
+  bool get isEmpty {
+    for (PotentialModification usage in _usages) {
+      if (!usage.isEmpty) {
+        return false;
+      }
+    }
+    return true;
+  }
+
+  // TODO(danrubel): change all of dartfix NNBD to use DartChangeBuilder
+  @override
+  Iterable<SourceEdit> get modifications =>
+      isEmpty ? const [] : [SourceEdit(_offset, 0, "import '$_importPath';\n")];
+
+  void addUsage(PotentialModification usage) {
+    _usages.add(usage);
+  }
+}
+
+/// Records information about the possible addition of a `@required` annotation
+/// to the source code.
+class PotentiallyAddRequired extends PotentialModification {
+  final NullabilityNode _node;
+
+  final int _offset;
+
+  PotentiallyAddRequired(DefaultFormalParameter parameter, this._node)
+      : _offset = parameter.offset;
+
+  @override
+  bool get isEmpty => _node.isNullable;
+
+  @override
+  Iterable<SourceEdit> get modifications =>
+      isEmpty ? const [] : [SourceEdit(_offset, 0, '@required ')];
+}
+
+/// Interface used by data structures representing potential modifications to
+/// the code being migrated.
+abstract class PotentialModification {
+  bool get isEmpty;
+
+  /// Gets the individual migrations that need to be done, considering the
+  /// solution to the constraint equations.
+  Iterable<SourceEdit> get modifications;
+}
+
+/// Helper object used by [ConditionalModification] to keep track of AST nodes
+/// within the conditional expression.
+class _KeepNode {
+  final int offset;
+
+  final int end;
+
+  final bool isExpression;
+
+  factory _KeepNode(AstNode node) {
+    int offset = node.offset;
+    int end = node.end;
+    if (node is Block && node.statements.isNotEmpty) {
+      offset = node.statements.beginToken.offset;
+      end = node.statements.endToken.end;
+    }
+    return _KeepNode._(offset, end, node is Expression);
+  }
+
+  _KeepNode._(this.offset, this.end, this.isExpression);
+}
diff --git a/pkg/nnbd_migration/lib/src/variables.dart b/pkg/nnbd_migration/lib/src/variables.dart
new file mode 100644
index 0000000..df66005
--- /dev/null
+++ b/pkg/nnbd_migration/lib/src/variables.dart
@@ -0,0 +1,129 @@
+// 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/element.dart';
+import 'package:analyzer/src/generated/source.dart';
+import 'package:nnbd_migration/src/conditional_discard.dart';
+import 'package:nnbd_migration/src/decorated_type.dart';
+import 'package:nnbd_migration/src/expression_checks.dart';
+import 'package:nnbd_migration/src/node_builder.dart';
+import 'package:nnbd_migration/src/nullability_node.dart';
+import 'package:nnbd_migration/src/potential_modification.dart';
+
+class Variables implements VariableRecorder, VariableRepository {
+  final _decoratedElementTypes = <Element, DecoratedType>{};
+
+  final _decoratedTypeAnnotations =
+      <Source, Map<int, DecoratedTypeAnnotation>>{};
+
+  final _potentialModifications = <Source, List<PotentialModification>>{};
+
+  @override
+  DecoratedType decoratedElementType(Element element, {bool create: false}) =>
+      _decoratedElementTypes[element] ??= create
+          ? DecoratedType.forElement(element)
+          : throw StateError('No element found');
+
+  @override
+  DecoratedType decoratedTypeAnnotation(
+      Source source, TypeAnnotation typeAnnotation) {
+    return _decoratedTypeAnnotations[source]
+        [_uniqueOffsetForTypeAnnotation(typeAnnotation)];
+  }
+
+  Map<Source, List<PotentialModification>> getPotentialModifications() =>
+      _potentialModifications;
+
+  @override
+  void recordConditionalDiscard(
+      Source source, AstNode node, ConditionalDiscard conditionalDiscard) {
+    _addPotentialModification(
+        source, ConditionalModification(node, conditionalDiscard));
+  }
+
+  void recordDecoratedElementType(Element element, DecoratedType type) {
+    _decoratedElementTypes[element] = type;
+  }
+
+  void recordDecoratedExpressionType(Expression node, DecoratedType type) {}
+
+  void recordDecoratedTypeAnnotation(
+      Source source, TypeAnnotation node, DecoratedTypeAnnotation type,
+      {bool potentialModification: true}) {
+    if (potentialModification) _addPotentialModification(source, type);
+    (_decoratedTypeAnnotations[source] ??=
+        {})[_uniqueOffsetForTypeAnnotation(node)] = type;
+  }
+
+  @override
+  void recordExpressionChecks(
+      Source source, Expression expression, ExpressionChecks checks) {
+    _addPotentialModification(source, checks);
+  }
+
+  @override
+  void recordPossiblyOptional(
+      Source source, DefaultFormalParameter parameter, NullabilityNode node) {
+    var modification = PotentiallyAddRequired(parameter, node);
+    _addPotentialModification(source, modification);
+    _addPotentialImport(
+        source, parameter, modification, 'package:meta/meta.dart');
+  }
+
+  void _addPotentialImport(Source source, AstNode node,
+      PotentialModification usage, String importPath) {
+    // Get the compilation unit - assume not null
+    while (node is! CompilationUnit) {
+      node = node.parent;
+    }
+    var unit = node as CompilationUnit;
+
+    // Find an existing import
+    for (var directive in unit.directives) {
+      if (directive is ImportDirective) {
+        if (directive.uri.stringValue == importPath) {
+          return;
+        }
+      }
+    }
+
+    // Add the usage to an existing modification if possible
+    for (var modification in (_potentialModifications[source] ??= [])) {
+      if (modification is PotentiallyAddImport) {
+        if (modification.importPath == importPath) {
+          modification.addUsage(usage);
+          return;
+        }
+      }
+    }
+
+    // Create a new import modification
+    AstNode beforeNode;
+    for (var directive in unit.directives) {
+      if (directive is ImportDirective || directive is ExportDirective) {
+        beforeNode = directive;
+        break;
+      }
+    }
+    if (beforeNode == null) {
+      for (var declaration in unit.declarations) {
+        beforeNode = declaration;
+        break;
+      }
+    }
+    _addPotentialModification(
+        source, PotentiallyAddImport(beforeNode, importPath, usage));
+  }
+
+  void _addPotentialModification(
+      Source source, PotentialModification potentialModification) {
+    (_potentialModifications[source] ??= []).add(potentialModification);
+  }
+
+  int _uniqueOffsetForTypeAnnotation(TypeAnnotation typeAnnotation) =>
+      typeAnnotation is GenericFunctionType
+          ? typeAnnotation.functionKeyword.offset
+          : typeAnnotation.offset;
+}
diff --git a/pkg/nnbd_migration/pubspec.yaml b/pkg/nnbd_migration/pubspec.yaml
new file mode 100644
index 0000000..bacb556
--- /dev/null
+++ b/pkg/nnbd_migration/pubspec.yaml
@@ -0,0 +1,6 @@
+name: nnbd_migration
+publish_to: none
+environment:
+  sdk: '>=2.2.2 <3.0.0'
+dependencies:
+  analyzer: ^0.36.3
diff --git a/pkg/nnbd_migration/test/abstract_context.dart b/pkg/nnbd_migration/test/abstract_context.dart
new file mode 100644
index 0000000..a9f80a5
--- /dev/null
+++ b/pkg/nnbd_migration/test/abstract_context.dart
@@ -0,0 +1,140 @@
+// 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/session.dart';
+import 'package:analyzer/file_system/file_system.dart';
+import 'package:analyzer/file_system/overlay_file_system.dart';
+import 'package:analyzer/src/dart/analysis/analysis_context_collection.dart';
+import 'package:analyzer/src/dart/analysis/driver.dart';
+import 'package:analyzer/src/dart/analysis/driver_based_analysis_context.dart';
+import 'package:analyzer/src/generated/engine.dart' show AnalysisEngine;
+import 'package:analyzer/src/generated/source.dart';
+import 'package:analyzer/src/test_utilities/mock_sdk.dart';
+import 'package:analyzer/src/test_utilities/resource_provider_mixin.dart';
+
+/// TODO(paulberry): this logic is duplicated from other packages.  Find a way
+/// share it, or avoid relying on it.
+class AbstractContextTest with ResourceProviderMixin {
+  OverlayResourceProvider overlayResourceProvider;
+
+  AnalysisContextCollection _analysisContextCollection;
+  AnalysisDriver _driver;
+
+  AnalysisDriver get driver => _driver;
+
+  AnalysisSession get session => driver.currentSession;
+
+  void addMetaPackage() {
+    addPackageFile('meta', 'meta.dart', r'''
+library meta;
+
+const Required required = const Required();
+
+class Required {
+  final String reason;
+  const Required([this.reason]);
+}
+''');
+  }
+
+  /// Add a new file with the given [pathInLib] to the package with the
+  /// given [packageName].  Then ensure that the test package depends on the
+  /// [packageName].
+  File addPackageFile(String packageName, String pathInLib, String content) {
+    var packagePath = '/.pub-cache/$packageName';
+    _addTestPackageDependency(packageName, packagePath);
+    return newFile('$packagePath/lib/$pathInLib', content: content);
+  }
+
+  Source addSource(String path, String content, [Uri uri]) {
+    File file = newFile(path, content: content);
+    Source source = file.createSource(uri);
+    driver.addFile(file.path);
+    driver.changeFile(file.path);
+    return source;
+  }
+
+  /// Create all analysis contexts in `/home`.
+  void createAnalysisContexts() {
+    _analysisContextCollection = AnalysisContextCollectionImpl(
+      includedPaths: [convertPath('/home')],
+      enableIndex: true,
+      resourceProvider: overlayResourceProvider,
+      sdkPath: convertPath('/sdk'),
+    );
+
+    var testPath = convertPath('/home/test');
+    _driver = getDriver(testPath);
+  }
+
+  /// Return the existing analysis context that should be used to analyze the
+  /// given [path], or throw [StateError] if the [path] is not analyzed in any
+  /// of the created analysis contexts.
+  AnalysisContext getContext(String path) {
+    path = convertPath(path);
+    return _analysisContextCollection.contextFor(path);
+  }
+
+  /// Return the existing analysis driver that should be used to analyze the
+  /// given [path], or throw [StateError] if the [path] is not analyzed in any
+  /// of the created analysis contexts.
+  AnalysisDriver getDriver(String path) {
+    DriverBasedAnalysisContext context =
+        getContext(path) as DriverBasedAnalysisContext;
+    return context.driver;
+  }
+
+  void setUp() {
+    setupResourceProvider();
+    overlayResourceProvider = OverlayResourceProvider(resourceProvider);
+
+    new MockSdk(resourceProvider: resourceProvider);
+
+    newFolder('/home/test');
+    newFile('/home/test/.packages', content: r'''
+test:file:///home/test/lib
+''');
+
+    createAnalysisContexts();
+  }
+
+  void setupResourceProvider() {}
+
+  void tearDown() {
+    AnalysisEngine.instance.clearCaches();
+    AnalysisEngine.instance.logger = null;
+  }
+
+  void _addTestPackageDependency(String name, String rootPath) {
+    var packagesFile = getFile('/home/test/.packages');
+    var packagesContent = packagesFile.readAsStringSync();
+
+    // Ignore if there is already the same package dependency.
+    if (packagesContent.contains('$name:file://')) {
+      return;
+    }
+
+    packagesContent += '$name:${toUri('$rootPath/lib')}\n';
+
+    packagesFile.writeAsStringSync(packagesContent);
+
+    _createDriver();
+  }
+
+  void _createDriver() {
+    var collection = AnalysisContextCollectionImpl(
+      includedPaths: [convertPath('/home')],
+      enableIndex: true,
+      resourceProvider: resourceProvider,
+      sdkPath: convertPath('/sdk'),
+    );
+
+    var testPath = convertPath('/home/test');
+    var context = collection.contextFor(testPath) as DriverBasedAnalysisContext;
+
+    _driver = context.driver;
+  }
+}
diff --git a/pkg/nnbd_migration/test/abstract_single_unit.dart b/pkg/nnbd_migration/test/abstract_single_unit.dart
new file mode 100644
index 0000000..25c5f87
--- /dev/null
+++ b/pkg/nnbd_migration/test/abstract_single_unit.dart
@@ -0,0 +1,60 @@
+// 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/results.dart';
+import 'package:analyzer/dart/ast/ast.dart';
+import 'package:analyzer/dart/element/element.dart';
+import 'package:analyzer/error/error.dart';
+import 'package:analyzer/src/error/codes.dart';
+import 'package:analyzer/src/generated/source.dart';
+import 'package:analyzer/src/test_utilities/find_node.dart';
+import 'package:test/test.dart';
+
+import 'abstract_context.dart';
+
+/// TODO(paulberry): this logic is duplicated from other packages.  Find a way
+/// share it, or avoid relying on it.
+class AbstractSingleUnitTest extends AbstractContextTest {
+  bool verifyNoTestUnitErrors = true;
+
+  String testCode;
+  String testFile;
+  Source testSource;
+  ResolvedUnitResult testAnalysisResult;
+  CompilationUnit testUnit;
+  CompilationUnitElement testUnitElement;
+  LibraryElement testLibraryElement;
+  FindNode findNode;
+
+  void addTestSource(String code, [Uri uri]) {
+    testCode = code;
+    testSource = addSource(testFile, code, uri);
+  }
+
+  Future<void> resolveTestUnit(String code) async {
+    addTestSource(code);
+    testAnalysisResult = await session.getResolvedUnit(testFile);
+    testUnit = testAnalysisResult.unit;
+    if (verifyNoTestUnitErrors) {
+      expect(testAnalysisResult.errors.where((AnalysisError error) {
+        return error.errorCode != HintCode.DEAD_CODE &&
+            error.errorCode != HintCode.UNUSED_CATCH_CLAUSE &&
+            error.errorCode != HintCode.UNUSED_CATCH_STACK &&
+            error.errorCode != HintCode.UNUSED_ELEMENT &&
+            error.errorCode != HintCode.UNUSED_FIELD &&
+            error.errorCode != HintCode.UNUSED_IMPORT &&
+            error.errorCode != HintCode.UNUSED_LOCAL_VARIABLE;
+      }), isEmpty);
+    }
+    testUnitElement = testUnit.declaredElement;
+    testLibraryElement = testUnitElement.library;
+    findNode = FindNode(code, testUnit);
+  }
+
+  @override
+  void setUp() {
+    super.setUp();
+    testFile = convertPath('/home/test/lib/test.dart');
+  }
+}
diff --git a/pkg/analysis_server/test/src/nullability/provisional_api_test.dart b/pkg/nnbd_migration/test/api_test.dart
similarity index 63%
rename from pkg/analysis_server/test/src/nullability/provisional_api_test.dart
rename to pkg/nnbd_migration/test/api_test.dart
index f6ba883..8f3e7d7 100644
--- a/pkg/analysis_server/test/src/nullability/provisional_api_test.dart
+++ b/pkg/nnbd_migration/test/api_test.dart
@@ -2,13 +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.
 
-import 'package:analysis_server/src/nullability/provisional_api.dart';
 import 'package:analyzer/src/generated/source.dart';
 import 'package:analyzer_plugin/protocol/protocol_common.dart';
+import 'package:nnbd_migration/nnbd_migration.dart';
 import 'package:test/test.dart';
 import 'package:test_reflective_loader/test_reflective_loader.dart';
 
-import '../../abstract_context.dart';
+import 'abstract_context.dart';
 
 main() {
   defineReflectiveSuite(() {
@@ -76,6 +76,42 @@
 
 /// Mixin containing test cases for the provisional API.
 mixin _ProvisionalApiTestCases on _ProvisionalApiTestBase {
+  test_comment_bang_implies_non_null_intent() async {
+    var content = '''
+void f(int/*!*/ i) {}
+void g(bool b, int i) {
+  if (b) f(i);
+}
+main() {
+  g(false, null);
+}
+''';
+    var expected = '''
+void f(int/*!*/ i) {}
+void g(bool b, int? i) {
+  if (b) f(i!);
+}
+main() {
+  g(false, null);
+}
+''';
+    await _checkSingleFileChanges(content, expected);
+  }
+
+  test_comment_question_implies_nullable() async {
+    var content = '''
+void _f() {
+  int/*?*/ i = 0;
+}
+''';
+    var expected = '''
+void _f() {
+  int?/*?*/ i = 0;
+}
+''';
+    await _checkSingleFileChanges(content, expected);
+  }
+
   test_conditional_assert_statement_does_not_imply_non_null_intent() async {
     var content = '''
 void f(bool b, int i) {
@@ -188,7 +224,115 @@
     await _checkSingleFileChanges(content, expected);
   }
 
-  test_data_flow_generic_inward() async {
+  test_constructorDeclaration_namedParameter() async {
+    var content = '''
+class C {
+  C({Key key});
+}
+class Key {}
+''';
+    var expected = '''
+class C {
+  C({Key? key});
+}
+class Key {}
+''';
+    await _checkSingleFileChanges(content, expected);
+  }
+
+  test_data_flow_assignment_field() async {
+    var content = '''
+class C {
+  int x = 0;
+}
+void f(C c) {
+  c.x = null;
+}
+''';
+    var expected = '''
+class C {
+  int? x = 0;
+}
+void f(C c) {
+  c.x = null;
+}
+''';
+    await _checkSingleFileChanges(content, expected);
+  }
+
+  test_data_flow_assignment_field_in_cascade() async {
+    var content = '''
+class C {
+  int x = 0;
+}
+void f(C c) {
+  c..x = null;
+}
+''';
+    var expected = '''
+class C {
+  int? x = 0;
+}
+void f(C c) {
+  c..x = null;
+}
+''';
+    await _checkSingleFileChanges(content, expected);
+  }
+
+  test_data_flow_assignment_local() async {
+    var content = '''
+void main() {
+  int i = 0;
+  i = null;
+}
+''';
+    var expected = '''
+void main() {
+  int? i = 0;
+  i = null;
+}
+''';
+    await _checkSingleFileChanges(content, expected);
+  }
+
+  test_data_flow_assignment_setter() async {
+    var content = '''
+class C {
+  void set s(int value) {}
+}
+void f(C c) {
+  c.s = null;
+}
+''';
+    var expected = '''
+class C {
+  void set s(int? value) {}
+}
+void f(C c) {
+  c.s = null;
+}
+''';
+    await _checkSingleFileChanges(content, expected);
+  }
+
+  test_data_flow_field_read() async {
+    var content = '''
+class C {
+  int/*?*/ f = 0;
+}
+int f(C c) => c.f;
+''';
+    var expected = '''
+class C {
+  int?/*?*/ f = 0;
+}
+int? f(C c) => c.f;
+''';
+    await _checkSingleFileChanges(content, expected);
+  }
+
+  test_data_flow_generic_contravariant_inward() async {
     var content = '''
 class C<T> {
   void f(T t) {}
@@ -226,6 +370,130 @@
     await _checkSingleFileChanges(content, expected);
   }
 
+  test_data_flow_generic_covariant_outward() async {
+    var content = '''
+class C<T> {
+  T getValue() => null;
+}
+int f(C<int> x) => x.getValue();
+''';
+    var expected = '''
+class C<T> {
+  T? getValue() => null;
+}
+int? f(C<int> x) => x.getValue();
+''';
+    await _checkSingleFileChanges(content, expected);
+  }
+
+  test_data_flow_generic_covariant_substituted() async {
+    var content = '''
+abstract class C<T> {
+  T getValue();
+}
+int f(C<int/*?*/> x) => x.getValue();
+''';
+    var expected = '''
+abstract class C<T> {
+  T getValue();
+}
+int? f(C<int?/*?*/> x) => x.getValue();
+''';
+    await _checkSingleFileChanges(content, expected);
+  }
+
+  test_data_flow_indexed_get_index_value() async {
+    var content = '''
+class C {
+  int operator[](int i) => 1;
+}
+int f(C c) => c[null];
+''';
+    var expected = '''
+class C {
+  int operator[](int? i) => 1;
+}
+int f(C c) => c[null];
+''';
+    await _checkSingleFileChanges(content, expected);
+  }
+
+  test_data_flow_indexed_get_value() async {
+    var content = '''
+class C {
+  int operator[](int i) => null;
+}
+int f(C c) => c[0];
+''';
+    var expected = '''
+class C {
+  int? operator[](int i) => null;
+}
+int? f(C c) => c[0];
+''';
+    await _checkSingleFileChanges(content, expected);
+  }
+
+  test_data_flow_indexed_set_index_value() async {
+    var content = '''
+class C {
+  void operator[]=(int i, int j) {}
+}
+void f(C c) {
+  c[null] = 0;
+}
+''';
+    var expected = '''
+class C {
+  void operator[]=(int? i, int j) {}
+}
+void f(C c) {
+  c[null] = 0;
+}
+''';
+    await _checkSingleFileChanges(content, expected);
+  }
+
+  test_data_flow_indexed_set_index_value_in_cascade() async {
+    var content = '''
+class C {
+  void operator[]=(int i, int j) {}
+}
+void f(C c) {
+  c..[null] = 0;
+}
+''';
+    var expected = '''
+class C {
+  void operator[]=(int? i, int j) {}
+}
+void f(C c) {
+  c..[null] = 0;
+}
+''';
+    await _checkSingleFileChanges(content, expected);
+  }
+
+  test_data_flow_indexed_set_value() async {
+    var content = '''
+class C {
+  void operator[]=(int i, int j) {}
+}
+void f(C c) {
+  c[0] = null;
+}
+''';
+    var expected = '''
+class C {
+  void operator[]=(int i, int? j) {}
+}
+void f(C c) {
+  c[0] = null;
+}
+''';
+    await _checkSingleFileChanges(content, expected);
+  }
+
   test_data_flow_inward() async {
     var content = '''
 int f(int i) => 0;
@@ -264,6 +532,70 @@
     await _checkSingleFileChanges(content, expected);
   }
 
+  test_data_flow_local_declaration() async {
+    var content = '''
+void f(int i) {
+  int j = i;
+}
+main() {
+  f(null);
+}
+''';
+    var expected = '''
+void f(int? i) {
+  int? j = i;
+}
+main() {
+  f(null);
+}
+''';
+    await _checkSingleFileChanges(content, expected);
+  }
+
+  test_data_flow_local_reference() async {
+    var content = '''
+void f(int i) {}
+void g(int i) {
+  int j = i;
+  f(i);
+}
+main() {
+  g(null);
+}
+''';
+    var expected = '''
+void f(int? i) {}
+void g(int? i) {
+  int? j = i;
+  f(i);
+}
+main() {
+  g(null);
+}
+''';
+    await _checkSingleFileChanges(content, expected);
+  }
+
+  test_data_flow_method_call_in_cascade() async {
+    var content = '''
+class C {
+  void m(int x) {}
+}
+void f(C c) {
+  c..m(null);
+}
+''';
+    var expected = '''
+class C {
+  void m(int? x) {}
+}
+void f(C c) {
+  c..m(null);
+}
+''';
+    await _checkSingleFileChanges(content, expected);
+  }
+
   test_data_flow_outward() async {
     var content = '''
 int f(int i) => null;
@@ -313,6 +645,16 @@
     await _checkSingleFileChanges(content, expected);
   }
 
+  test_getter_topLevel() async {
+    var content = '''
+int get g => 0;
+''';
+    var expected = '''
+int get g => 0;
+''';
+    await _checkSingleFileChanges(content, expected);
+  }
+
   test_named_parameter_no_default_unused() async {
     var content = '''
 void f({String s}) {}
@@ -528,6 +870,96 @@
     await _checkSingleFileChanges(content, expected);
   }
 
+  test_null_aware_getter_invocation() async {
+    var content = '''
+bool f(int i) => i?.isEven;
+main() {
+  f(null);
+}
+''';
+    var expected = '''
+bool? f(int? i) => i?.isEven;
+main() {
+  f(null);
+}
+''';
+    await _checkSingleFileChanges(content, expected);
+  }
+
+  test_null_aware_method_invocation() async {
+    var content = '''
+int f(int i) => i?.abs();
+main() {
+  f(null);
+}
+''';
+    var expected = '''
+int? f(int? i) => i?.abs();
+main() {
+  f(null);
+}
+''';
+    await _checkSingleFileChanges(content, expected);
+  }
+
+  test_null_aware_setter_invocation_null_target() async {
+    var content = '''
+class C {
+  void set x(int value);
+}
+int f(C c) => c?.x = 1;
+main() {
+  f(null);
+}
+''';
+    var expected = '''
+class C {
+  void set x(int value);
+}
+int? f(C? c) => c?.x = 1;
+main() {
+  f(null);
+}
+''';
+    await _checkSingleFileChanges(content, expected);
+  }
+
+  test_null_aware_setter_invocation_null_value() async {
+    var content = '''
+class C {
+  void set x(int value);
+}
+int f(C c) => c?.x = 1;
+main() {
+  f(null);
+}
+''';
+    var expected = '''
+class C {
+  void set x(int value);
+}
+int? f(C? c) => c?.x = 1;
+main() {
+  f(null);
+}
+''';
+    await _checkSingleFileChanges(content, expected);
+  }
+
+  test_parameter_genericFunctionType() async {
+    var content = '''
+int f(int x, int Function(int i) g) {
+  return g(x);
+}
+''';
+    var expected = '''
+int f(int x, int Function(int i) g) {
+  return g(x);
+}
+''';
+    await _checkSingleFileChanges(content, expected);
+  }
+
   test_single_file_multiple_changes() async {
     var content = '''
 int f() => null;
@@ -630,6 +1062,122 @@
     await _checkSingleFileChanges(content, expected);
   }
 
+  test_unconditional_binary_expression_implies_non_null_intent() async {
+    var content = '''
+void f(int i) {
+  i + 1;
+}
+void g(bool b, int i) {
+  if (b) f(i);
+}
+main() {
+  g(false, null);
+}
+''';
+    var expected = '''
+void f(int i) {
+  i + 1;
+}
+void g(bool b, int? i) {
+  if (b) f(i!);
+}
+main() {
+  g(false, null);
+}
+''';
+    await _checkSingleFileChanges(content, expected);
+  }
+
+  test_unconditional_cascaded_indexed_set_implies_non_null_intent() async {
+    var content = '''
+class C {
+  operator[]=(int i, int j) {}
+}
+void f(C c) {
+  c..[1] = 2;
+}
+void g(bool b, C c) {
+  if (b) f(c);
+}
+main() {
+  g(false, null);
+}
+''';
+    var expected = '''
+class C {
+  operator[]=(int i, int j) {}
+}
+void f(C c) {
+  c..[1] = 2;
+}
+void g(bool b, C? c) {
+  if (b) f(c!);
+}
+main() {
+  g(false, null);
+}
+''';
+    await _checkSingleFileChanges(content, expected);
+  }
+
+  test_unconditional_cascaded_method_call_implies_non_null_intent() async {
+    var content = '''
+void f(int i) {
+  i..abs();
+}
+void g(bool b, int i) {
+  if (b) f(i);
+}
+main() {
+  g(false, null);
+}
+''';
+    var expected = '''
+void f(int i) {
+  i..abs();
+}
+void g(bool b, int? i) {
+  if (b) f(i!);
+}
+main() {
+  g(false, null);
+}
+''';
+    await _checkSingleFileChanges(content, expected);
+  }
+
+  test_unconditional_cascaded_property_set_implies_non_null_intent() async {
+    var content = '''
+class C {
+  int x = 0;
+}
+void f(C c) {
+  c..x = 1;
+}
+void g(bool b, C c) {
+  if (b) f(c);
+}
+main() {
+  g(false, null);
+}
+''';
+    var expected = '''
+class C {
+  int x = 0;
+}
+void f(C c) {
+  c..x = 1;
+}
+void g(bool b, C? c) {
+  if (b) f(c!);
+}
+main() {
+  g(false, null);
+}
+''';
+    await _checkSingleFileChanges(content, expected);
+  }
+
   test_unconditional_method_call_implies_non_null_intent() async {
     var content = '''
 void f(int i) {
@@ -766,6 +1314,13 @@
 class _TestMigrationListener implements NullabilityMigrationListener {
   final _edits = <Source, List<SourceEdit>>{};
 
+  List<String> details = [];
+
+  @override
+  void addDetail(String detail) {
+    details.add(detail);
+  }
+
   @override
   void addEdit(SingleNullabilityFix fix, SourceEdit edit) {
     (_edits[fix.source] ??= []).add(edit);
diff --git a/pkg/analysis_server/test/src/nullability/migration_visitor_test.dart b/pkg/nnbd_migration/test/migration_visitor_test.dart
similarity index 71%
rename from pkg/analysis_server/test/src/nullability/migration_visitor_test.dart
rename to pkg/nnbd_migration/test/migration_visitor_test.dart
index 357b500..27969b5 100644
--- a/pkg/analysis_server/test/src/nullability/migration_visitor_test.dart
+++ b/pkg/nnbd_migration/test/migration_visitor_test.dart
@@ -2,22 +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.
 
-import 'package:analysis_server/src/nullability/conditional_discard.dart';
-import 'package:analysis_server/src/nullability/decorated_type.dart';
-import 'package:analysis_server/src/nullability/expression_checks.dart';
-import 'package:analysis_server/src/nullability/graph_builder.dart';
-import 'package:analysis_server/src/nullability/node_builder.dart';
-import 'package:analysis_server/src/nullability/nullability_node.dart';
-import 'package:analysis_server/src/nullability/transitional_api.dart';
 import 'package:analyzer/dart/ast/ast.dart';
 import 'package:analyzer/src/generated/resolver.dart';
 import 'package:analyzer/src/generated/source.dart';
-import 'package:analyzer/src/test_utilities/find_node.dart';
 import 'package:meta/meta.dart';
+import 'package:nnbd_migration/src/conditional_discard.dart';
+import 'package:nnbd_migration/src/decorated_type.dart';
+import 'package:nnbd_migration/src/expression_checks.dart';
+import 'package:nnbd_migration/src/graph_builder.dart';
+import 'package:nnbd_migration/src/node_builder.dart';
+import 'package:nnbd_migration/src/nullability_node.dart';
+import 'package:nnbd_migration/src/variables.dart';
 import 'package:test/test.dart';
 import 'package:test_reflective_loader/test_reflective_loader.dart';
 
-import '../../abstract_single_unit.dart';
+import 'abstract_single_unit.dart';
 
 main() {
   defineReflectiveSuite(() {
@@ -34,7 +33,7 @@
   Future<CompilationUnit> analyze(String code) async {
     var unit = await super.analyze(code);
     unit.accept(
-        GraphBuilder(typeProvider, _variables, graph, testSource, false));
+        GraphBuilder(typeProvider, _variables, graph, testSource, null));
     return unit;
   }
 
@@ -109,6 +108,176 @@
     assertEdge(decoratedTypeAnnotation('int i').node, never, hard: true);
   }
 
+  test_assignmentExpression_field() async {
+    await analyze('''
+class C {
+  int x = 0;
+}
+void f(C c, int i) {
+  c.x = i;
+}
+''');
+    assertEdge(decoratedTypeAnnotation('int i').node,
+        decoratedTypeAnnotation('int x').node,
+        hard: true);
+  }
+
+  test_assignmentExpression_field_cascaded() async {
+    await analyze('''
+class C {
+  int x = 0;
+}
+void f(C c, int i) {
+  c..x = i;
+}
+''');
+    assertEdge(decoratedTypeAnnotation('int i').node,
+        decoratedTypeAnnotation('int x').node,
+        hard: true);
+  }
+
+  test_assignmentExpression_field_target_check() async {
+    await analyze('''
+class C {
+  int x = 0;
+}
+void f(C c, int i) {
+  c.x = i;
+}
+''');
+    assertNullCheck(
+        checkExpression('c.x'), decoratedTypeAnnotation('C c').node);
+  }
+
+  test_assignmentExpression_field_target_check_cascaded() async {
+    await analyze('''
+class C {
+  int x = 0;
+}
+void f(C c, int i) {
+  c..x = i;
+}
+''');
+    assertNullCheck(
+        checkExpression('c..x'), decoratedTypeAnnotation('C c').node);
+  }
+
+  test_assignmentExpression_indexExpression_index() async {
+    await analyze('''
+class C {
+  void operator[]=(int a, int b) {}
+}
+void f(C c, int i, int j) {
+  c[i] = j;
+}
+''');
+    assertEdge(decoratedTypeAnnotation('int i').node,
+        decoratedTypeAnnotation('int a').node,
+        hard: true);
+  }
+
+  test_assignmentExpression_indexExpression_return_value() async {
+    await analyze('''
+class C {
+  void operator[]=(int a, int b) {}
+}
+int f(C c, int i, int j) => c[i] = j;
+''');
+    assertEdge(decoratedTypeAnnotation('int j').node,
+        decoratedTypeAnnotation('int f').node,
+        hard: false);
+  }
+
+  test_assignmentExpression_indexExpression_target_check() async {
+    await analyze('''
+class C {
+  void operator[]=(int a, int b) {}
+}
+void f(C c, int i, int j) {
+  c[i] = j;
+}
+''');
+    assertNullCheck(checkExpression('c['), decoratedTypeAnnotation('C c').node);
+  }
+
+  test_assignmentExpression_indexExpression_value() async {
+    await analyze('''
+class C {
+  void operator[]=(int a, int b) {}
+}
+void f(C c, int i, int j) {
+  c[i] = j;
+}
+''');
+    assertEdge(decoratedTypeAnnotation('int j').node,
+        decoratedTypeAnnotation('int b').node,
+        hard: true);
+  }
+
+  test_assignmentExpression_operands() async {
+    await analyze('''
+void f(int i, int j) {
+  i = j;
+}
+''');
+    assertEdge(decoratedTypeAnnotation('int j').node,
+        decoratedTypeAnnotation('int i').node,
+        hard: true);
+  }
+
+  test_assignmentExpression_return_value() async {
+    await analyze('''
+void f(int i, int j) {
+  g(i = j);
+}
+void g(int k) {}
+''');
+    assertEdge(decoratedTypeAnnotation('int j').node,
+        decoratedTypeAnnotation('int k').node,
+        hard: false);
+  }
+
+  test_assignmentExpression_setter() async {
+    await analyze('''
+class C {
+  void set s(int value) {}
+}
+void f(C c, int i) {
+  c.s = i;
+}
+''');
+    assertEdge(decoratedTypeAnnotation('int i').node,
+        decoratedTypeAnnotation('int value').node,
+        hard: true);
+  }
+
+  test_assignmentExpression_setter_null_aware() async {
+    await analyze('''
+class C {
+  void set s(int value) {}
+}
+int f(C c, int i) => (c?.s = i);
+''');
+    var lubNode =
+        decoratedExpressionType('(c?.s = i)').node as NullabilityNodeForLUB;
+    expect(lubNode.left, same(decoratedTypeAnnotation('C c').node));
+    expect(lubNode.right, same(decoratedTypeAnnotation('int i').node));
+    assertEdge(lubNode, decoratedTypeAnnotation('int f').node, hard: false);
+  }
+
+  test_assignmentExpression_setter_target_check() async {
+    await analyze('''
+class C {
+  void set s(int value) {}
+}
+void f(C c, int i) {
+  c.s = i;
+}
+''');
+    assertNullCheck(
+        checkExpression('c.s'), decoratedTypeAnnotation('C c').node);
+  }
+
   test_binaryExpression_add_left_check() async {
     await analyze('''
 int f(int i, int j) => i + j;
@@ -190,6 +359,18 @@
     assertNoUpstreamNullability(decoratedTypeAnnotation('bool').node);
   }
 
+  test_cascadeExpression() async {
+    await analyze('''
+class C {
+  int x = 0;
+}
+C f(C c, int i) => c..x = i;
+''');
+    assertEdge(decoratedTypeAnnotation('C c').node,
+        decoratedTypeAnnotation('C f').node,
+        hard: false);
+  }
+
   test_conditionalExpression_condition_check() async {
     await analyze('''
 int f(bool b, int i, int j) {
@@ -540,6 +721,83 @@
         contextNode: nullable_return);
   }
 
+  test_indexExpression_index() async {
+    await analyze('''
+class C {
+  int operator[](int i) => 1;
+}
+int f(C c, int j) => c[j];
+''');
+    assertEdge(decoratedTypeAnnotation('int j').node,
+        decoratedTypeAnnotation('int i').node,
+        hard: true);
+  }
+
+  test_indexExpression_index_cascaded() async {
+    await analyze('''
+class C {
+  int operator[](int i) => 1;
+}
+C f(C c, int j) => c..[j];
+''');
+    assertEdge(decoratedTypeAnnotation('int j').node,
+        decoratedTypeAnnotation('int i').node,
+        hard: true);
+  }
+
+  test_indexExpression_return_type() async {
+    await analyze('''
+class C {
+  int operator[](int i) => 1;
+}
+int f(C c) => c[0];
+''');
+    assertEdge(decoratedTypeAnnotation('int operator').node,
+        decoratedTypeAnnotation('int f').node,
+        hard: false);
+  }
+
+  test_indexExpression_target_check() async {
+    await analyze('''
+class C {
+  int operator[](int i) => 1;
+}
+int f(C c) => c[0];
+''');
+    assertNullCheck(checkExpression('c['), decoratedTypeAnnotation('C c').node);
+  }
+
+  test_indexExpression_target_check_cascaded() async {
+    await analyze('''
+class C {
+  int operator[](int i) => 1;
+}
+C f(C c) => c..[0];
+''');
+    assertNullCheck(
+        checkExpression('c..['), decoratedTypeAnnotation('C c').node);
+  }
+
+  test_indexExpression_target_demonstrates_non_null_intent() async {
+    await analyze('''
+class C {
+  int operator[](int i) => 1;
+}
+int f(C c) => c[0];
+''');
+    assertEdge(decoratedTypeAnnotation('C c').node, never, hard: true);
+  }
+
+  test_indexExpression_target_demonstrates_non_null_intent_cascaded() async {
+    await analyze('''
+class C {
+  int operator[](int i) => 1;
+}
+C f(C c) => c..[0];
+''');
+    assertEdge(decoratedTypeAnnotation('C c').node, never, hard: true);
+  }
+
   test_intLiteral() async {
     await analyze('''
 int f() {
@@ -633,6 +891,20 @@
         hard: false);
   }
 
+  test_methodInvocation_return_type_null_aware() async {
+    await analyze('''
+class C {
+  bool m() => true;
+}
+bool f(C c) => (c?.m());
+''');
+    var lubNode =
+        decoratedExpressionType('(c?.m())').node as NullabilityNodeForLUB;
+    expect(lubNode.left, same(decoratedTypeAnnotation('C c').node));
+    expect(lubNode.right, same(decoratedTypeAnnotation('bool m').node));
+    assertEdge(lubNode, decoratedTypeAnnotation('bool f').node, hard: false);
+  }
+
   test_methodInvocation_target_check() async {
     await analyze('''
 class C {
@@ -647,6 +919,20 @@
         checkExpression('c.m'), decoratedTypeAnnotation('C c').node);
   }
 
+  test_methodInvocation_target_check_cascaded() async {
+    await analyze('''
+class C {
+  void m() {}
+}
+void test(C c) {
+  c..m();
+}
+''');
+
+    assertNullCheck(
+        checkExpression('c..m'), decoratedTypeAnnotation('C c').node);
+  }
+
   test_methodInvocation_target_demonstrates_non_null_intent() async {
     await analyze('''
 class C {
@@ -660,6 +946,19 @@
     assertEdge(decoratedTypeAnnotation('C c').node, never, hard: true);
   }
 
+  test_methodInvocation_target_demonstrates_non_null_intent_cascaded() async {
+    await analyze('''
+class C {
+  void m() {}
+}
+void test(C c) {
+  c..m();
+}
+''');
+
+    assertEdge(decoratedTypeAnnotation('C c').node, never, hard: true);
+  }
+
   test_never() async {
     await analyze('');
 
@@ -677,7 +976,19 @@
         contextNode: decoratedTypeAnnotation('int').node);
   }
 
-  test_prefixedIdentifier_return_type() async {
+  test_prefixedIdentifier_field_type() async {
+    await analyze('''
+class C {
+  bool b = true;
+}
+bool f(C c) => c.b;
+''');
+    assertEdge(decoratedTypeAnnotation('bool b').node,
+        decoratedTypeAnnotation('bool f').node,
+        hard: false);
+  }
+
+  test_prefixedIdentifier_getter_type() async {
     await analyze('''
 class C {
   bool get b => true;
@@ -728,6 +1039,20 @@
         hard: false);
   }
 
+  test_propertyAccess_return_type_null_aware() async {
+    await analyze('''
+class C {
+  bool get b => true;
+}
+bool f(C c) => (c?.b);
+''');
+    var lubNode =
+        decoratedExpressionType('(c?.b)').node as NullabilityNodeForLUB;
+    expect(lubNode.left, same(decoratedTypeAnnotation('C c').node));
+    expect(lubNode.right, same(decoratedTypeAnnotation('bool get b').node));
+    assertEdge(lubNode, decoratedTypeAnnotation('bool f').node, hard: false);
+  }
+
   test_propertyAccess_target_check() async {
     await analyze('''
 class C {
@@ -765,6 +1090,32 @@
         contextNode: decoratedTypeAnnotation('int').node);
   }
 
+  test_return_null_generic() async {
+    await analyze('''
+class C<T> {
+  T f() {
+    return null;
+  }
+}
+''');
+    var tNode = decoratedTypeAnnotation('T f').node;
+    assertEdge(always, tNode, hard: false);
+    assertNullCheck(checkExpression('null'), always, contextNode: tNode);
+  }
+
+  test_simpleIdentifier_local() async {
+    await analyze('''
+main() {
+  int i = 0;
+  int j = i;
+}
+''');
+
+    assertEdge(decoratedTypeAnnotation('int i').node,
+        decoratedTypeAnnotation('int j').node,
+        hard: true);
+  }
+
   test_soft_edge_for_non_variable_reference() async {
     // Edges originating in things other than variable references should be
     // soft.
@@ -821,18 +1172,27 @@
 ''');
     assertNoUpstreamNullability(decoratedTypeAnnotation('Type').node);
   }
+
+  test_variableDeclaration() async {
+    await analyze('''
+void f(int i) {
+  int j = i;
+}
+''');
+    assertEdge(decoratedTypeAnnotation('int i').node,
+        decoratedTypeAnnotation('int j').node,
+        hard: true);
+  }
 }
 
 class MigrationVisitorTestBase extends AbstractSingleUnitTest {
   final _Variables _variables;
 
-  FindNode findNode;
-
   final NullabilityGraph graph;
 
   MigrationVisitorTestBase() : this._(NullabilityGraph());
 
-  MigrationVisitorTestBase._(this.graph) : _variables = _Variables(graph);
+  MigrationVisitorTestBase._(this.graph) : _variables = _Variables();
 
   NullabilityNode get always => NullabilityNode.always;
 
@@ -842,9 +1202,8 @@
 
   Future<CompilationUnit> analyze(String code) async {
     await resolveTestUnit(code);
-    testUnit.accept(
-        NodeBuilder(_variables, testSource, false, graph, typeProvider));
-    findNode = FindNode(code, testUnit);
+    testUnit
+        .accept(NodeBuilder(_variables, testSource, null, graph, typeProvider));
     return testUnit;
   }
 
@@ -868,6 +1227,13 @@
     }
   }
 
+  /// Gets the [DecoratedType] associated with the generic function type
+  /// annotation whose text is [text].
+  DecoratedType decoratedGenericFunctionTypeAnnotation(String text) {
+    return _variables.decoratedTypeAnnotation(
+        testSource, findNode.genericFunctionType(text));
+  }
+
   /// Gets the [DecoratedType] associated with the type annotation whose text
   /// is [text].
   DecoratedType decoratedTypeAnnotation(String text) {
@@ -905,6 +1271,74 @@
   DecoratedType decoratedTypeParameterBound(String search) => _variables
       .decoratedElementType(findNode.typeParameter(search).declaredElement);
 
+  test_dynamic_type() async {
+    await analyze('''
+dynamic f() {}
+''');
+    var decoratedType = decoratedTypeAnnotation('dynamic');
+    expect(decoratedFunctionType('f').returnType, same(decoratedType));
+    assertEdge(always, decoratedType.node, hard: false);
+  }
+
+  test_field_type_simple() async {
+    await analyze('''
+class C {
+  int f = 0;
+}
+''');
+    var decoratedType = decoratedTypeAnnotation('int');
+    expect(decoratedType.node, TypeMatcher<NullabilityNodeMutable>());
+    expect(
+        _variables.decoratedElementType(
+            findNode.fieldDeclaration('f').fields.variables[0].declaredElement),
+        same(decoratedType));
+  }
+
+  test_genericFunctionType_namedParameterType() async {
+    await analyze('''
+void f(void Function({int y}) x) {}
+''');
+    var decoratedType =
+        decoratedGenericFunctionTypeAnnotation('void Function({int y})');
+    expect(decoratedFunctionType('f').positionalParameters[0],
+        same(decoratedType));
+    expect(decoratedType.node, TypeMatcher<NullabilityNodeMutable>());
+    var decoratedIntType = decoratedTypeAnnotation('int');
+    expect(decoratedType.namedParameters['y'], same(decoratedIntType));
+    expect(decoratedIntType.node, isNotNull);
+    expect(decoratedIntType.node, isNot(NullabilityNode.never));
+  }
+
+  test_genericFunctionType_returnType() async {
+    await analyze('''
+void f(int Function() x) {}
+''');
+    var decoratedType =
+        decoratedGenericFunctionTypeAnnotation('int Function()');
+    expect(decoratedFunctionType('f').positionalParameters[0],
+        same(decoratedType));
+    expect(decoratedType.node, TypeMatcher<NullabilityNodeMutable>());
+    var decoratedIntType = decoratedTypeAnnotation('int');
+    expect(decoratedType.returnType, same(decoratedIntType));
+    expect(decoratedIntType.node, isNotNull);
+    expect(decoratedIntType.node, isNot(NullabilityNode.never));
+  }
+
+  test_genericFunctionType_unnamedParameterType() async {
+    await analyze('''
+void f(void Function(int) x) {}
+''');
+    var decoratedType =
+        decoratedGenericFunctionTypeAnnotation('void Function(int)');
+    expect(decoratedFunctionType('f').positionalParameters[0],
+        same(decoratedType));
+    expect(decoratedType.node, TypeMatcher<NullabilityNodeMutable>());
+    var decoratedIntType = decoratedTypeAnnotation('int');
+    expect(decoratedType.positionalParameters[0], same(decoratedIntType));
+    expect(decoratedIntType.node, isNotNull);
+    expect(decoratedIntType.node, isNot(NullabilityNode.never));
+  }
+
   test_interfaceType_typeParameter() async {
     await analyze('''
 void f(List<int> x) {}
@@ -1013,6 +1447,20 @@
     expect(decoratedType.node, isNot(NullabilityNode.never));
   }
 
+  test_type_comment_bang() async {
+    await analyze('''
+void f(int/*!*/ i) {}
+''');
+    assertEdge(decoratedTypeAnnotation('int').node, never, hard: true);
+  }
+
+  test_type_comment_question() async {
+    await analyze('''
+void f(int/*?*/ i) {}
+''');
+    assertEdge(always, decoratedTypeAnnotation('int').node, hard: false);
+  }
+
   test_type_parameter_explicit_bound() async {
     await analyze('''
 class C<T extends Object> {}
@@ -1034,6 +1482,25 @@
     expect(bound.node.isNullable, isTrue);
     expect(bound.type, same(typeProvider.objectType));
   }
+
+  test_variableDeclaration_type_simple() async {
+    await analyze('''
+main() {
+  int i;
+}
+''');
+    var decoratedType = decoratedTypeAnnotation('int');
+    expect(decoratedType.node, TypeMatcher<NullabilityNodeMutable>());
+  }
+
+  test_void_type() async {
+    await analyze('''
+void f() {}
+''');
+    var decoratedType = decoratedTypeAnnotation('void');
+    expect(decoratedFunctionType('f').returnType, same(decoratedType));
+    assertEdge(always, decoratedType.node, hard: false);
+  }
 }
 
 /// Mock representation of constraint variables.
@@ -1046,8 +1513,6 @@
 
   final _possiblyOptional = <DefaultFormalParameter, NullabilityNode>{};
 
-  _Variables(NullabilityGraph graph) : super(graph);
-
   /// Gets the [ExpressionChecks] associated with the given [expression].
   ExpressionChecks checkExpression(Expression expression) =>
       _expressionChecks[_normalizeExpression(expression)];
diff --git a/pkg/analysis_server/test/src/nullability/test_all.dart b/pkg/nnbd_migration/test/test_all.dart
similarity index 81%
rename from pkg/analysis_server/test/src/nullability/test_all.dart
rename to pkg/nnbd_migration/test/test_all.dart
index c43a34f..8f19fb9 100644
--- a/pkg/analysis_server/test/src/nullability/test_all.dart
+++ b/pkg/nnbd_migration/test/test_all.dart
@@ -4,12 +4,12 @@
 
 import 'package:test_reflective_loader/test_reflective_loader.dart';
 
+import 'api_test.dart' as api_test;
 import 'migration_visitor_test.dart' as migration_visitor_test;
-import 'provisional_api_test.dart' as provisional_api_test;
 
 main() {
   defineReflectiveSuite(() {
     migration_visitor_test.main();
-    provisional_api_test.main();
+    api_test.main();
   });
 }
diff --git a/pkg/pkg.status b/pkg/pkg.status
index 26698f9..367542c 100644
--- a/pkg/pkg.status
+++ b/pkg/pkg.status
@@ -78,6 +78,7 @@
 dartfix/test/*: SkipByDesign # Only meant to run on vm
 front_end/test/*: SkipByDesign # Only meant to run on vm, most use dart:mirrors and dart:io
 front_end/tool/*: SkipByDesign # Only meant to run on vm
+nnbd_migration/test/*: SkipByDesign # Uses mirrors
 smith/test/*: SkipByDesign # Only meant to run on vm
 status_file/test/normalize_test: SkipByDesign # Uses dart:io
 status_file/test/parse_and_normalize_test: SkipByDesign # Uses dart:io
diff --git a/pkg/smith/lib/configuration.dart b/pkg/smith/lib/configuration.dart
index 62dbee4..9fc946a 100644
--- a/pkg/smith/lib/configuration.dart
+++ b/pkg/smith/lib/configuration.dart
@@ -656,6 +656,9 @@
         return const [
           Runtime.none,
           Runtime.chrome,
+          Runtime.edge,
+          Runtime.firefox,
+          Runtime.safari,
         ];
 
       case Compiler.dart2analyzer:
diff --git a/pkg/status_file/test/data/vm.status b/pkg/status_file/test/data/vm.status
index 227c4ac..bf2543f 100644
--- a/pkg/status_file/test/data/vm.status
+++ b/pkg/status_file/test/data/vm.status
@@ -17,9 +17,6 @@
 cc/Fail1: Fail # These tests are expected to crash on all platforms.
 cc/Fail2: Fail # These tests are expected to crash on all platforms.
 
-cc/Dart2JSCompileAll: Fail, Crash # Issue 27369
-cc/Dart2JSCompilerStats: Fail, Crash # Issue 27369
-
 cc/Profiler_InliningIntervalBoundry: Skip # Differences in ia32, debug, release
 
 cc/Sleep: Skip # Flaky # Flaky on buildbot. Issue 5133 and 10409.
@@ -138,9 +135,6 @@
 dart/spawn_shutdown_test: Skip  # VM Shutdown test
 dart/hello_fuchsia_test: SkipByDesign # This is a test for fuchsia OS
 
-[ ($runtime == vm || $runtime == dart_precompiled) && $mode == debug && $builder_tag == asan ]
-cc/Dart2JSCompileAll: SkipSlow  # Timeout.
-
 [ $builder_tag == asan ]
 cc/CodeImmutability: Fail,OK # Address Sanitizer turns a crash into a failure.
 cc/IsolateReload_DanglingGetter_Class: Fail # Issue 28349
diff --git a/pkg/vm/lib/bytecode/assembler.dart b/pkg/vm/lib/bytecode/assembler.dart
index 6401815..387db94 100644
--- a/pkg/vm/lib/bytecode/assembler.dart
+++ b/pkg/vm/lib/bytecode/assembler.dart
@@ -282,6 +282,7 @@
   }
 
   void emitJump(Label label) {
+    emitSourcePosition();
     _emitJumpInstruction(Opcode.kJump, label);
     isUnreachable = true;
   }
@@ -319,6 +320,7 @@
   }
 
   void emitReturnTOS() {
+    emitSourcePosition();
     _emitInstruction0(Opcode.kReturnTOS);
     isUnreachable = true;
   }
@@ -352,10 +354,12 @@
   }
 
   void emitStoreLocal(int rx) {
+    emitSourcePosition();
     _emitInstructionX(Opcode.kStoreLocal, rx);
   }
 
   void emitPopLocal(int rx) {
+    emitSourcePosition();
     _emitInstructionX(Opcode.kPopLocal, rx);
   }
 
diff --git a/pkg/vm/lib/bytecode/gen_bytecode.dart b/pkg/vm/lib/bytecode/gen_bytecode.dart
index 01a941d..ba4f75e 100644
--- a/pkg/vm/lib/bytecode/gen_bytecode.dart
+++ b/pkg/vm/lib/bytecode/gen_bytecode.dart
@@ -1732,8 +1732,8 @@
 
     final int closureFunctionIndex = cp.addClosureFunction(closureIndex);
 
-    _genPrologue(node, function);
     _recordSourcePosition(function.fileOffset);
+    _genPrologue(node, function);
 
     Label continuationSwitchLabel;
     int continuationSwitchVar;
diff --git a/pkg/vm/lib/v8_snapshot_profile.dart b/pkg/vm/lib/v8_snapshot_profile.dart
index ec01774..efda4c1 100644
--- a/pkg/vm/lib/v8_snapshot_profile.dart
+++ b/pkg/vm/lib/v8_snapshot_profile.dart
@@ -85,9 +85,37 @@
     Expect.equals(snapshot["node_count"], _parseNodes(top["nodes"]));
     Expect.equals(snapshot["edge_count"], _parseEdges(top["edges"]));
 
+    _verifyRoot();
+
     _calculateFromEdges();
   }
 
+  void _verifyRoot() {
+    // HeapSnapshotWorker.HeapSnapshot.calculateDistances (from HeapSnapshot.js)
+    // assumes that the root does not have more than one edge to any other node
+    // (most likely an oversight).
+    final Set<int> roots = <int>{};
+    for (final edge in _toEdges[root]) {
+      final int to = edge.nodeOffset;
+      Expect.isTrue(!roots.contains(to));
+      roots.add(to);
+    }
+
+    // Check that all nodes are reachable from the root (offset 0).
+    final Set<int> enqueued = {root};
+    final dfs = <int>[root];
+    while (!dfs.isEmpty) {
+      final next = dfs.removeLast();
+      for (final edge in _toEdges[next]) {
+        if (!enqueued.contains(edge.nodeOffset)) {
+          enqueued.add(edge.nodeOffset);
+          dfs.add(edge.nodeOffset);
+        }
+      }
+    }
+    Expect.equals(enqueued.length, nodeCount);
+  }
+
   void _parseMetadata(Map meta) {
     final List nodeFields = meta["node_fields"];
     nodeFields.forEach(_nodeFields.add);
@@ -160,7 +188,8 @@
         final int nameOrIndex = edges[edgeOffset + nameOrIndexIndex];
         if (_edgeTypes[type] == "property") {
           Expect.isTrue(0 <= nameOrIndex && nameOrIndex < _strings.length);
-        } else if (_edgeTypes[type] == "element") {
+        } else if (_edgeTypes[type] == "element" ||
+            _edgeTypes[type] == "context") {
           Expect.isTrue(nameOrIndex >= 0);
         }
 
diff --git a/runtime/bin/ffi_test_functions.cc b/runtime/bin/ffi_test_functions.cc
index 200d6c2..52b4512 100644
--- a/runtime/bin/ffi_test_functions.cc
+++ b/runtime/bin/ffi_test_functions.cc
@@ -22,6 +22,7 @@
 #include <limits>
 
 #include "include/dart_api.h"
+#include "include/dart_native_api.h"
 
 namespace dart {
 
@@ -458,42 +459,39 @@
 // Functions for stress-testing.
 
 DART_EXPORT int64_t MinInt64() {
+  Dart_ExecuteInternalCommand("gc-on-next-allocation");
   return 0x8000000000000000;
 }
 
 DART_EXPORT int64_t MinInt32() {
+  Dart_ExecuteInternalCommand("gc-on-next-allocation");
   return 0x80000000;
 }
 
 DART_EXPORT double SmallDouble() {
+  Dart_ExecuteInternalCommand("gc-on-next-allocation");
   return 0x80000000 * -1.0;
 }
 
 // Requires boxing on 32-bit and 64-bit systems, even if the top 32-bits are
 // truncated.
 DART_EXPORT void* LargePointer() {
+  Dart_ExecuteInternalCommand("gc-on-next-allocation");
   uint64_t origin = 0x8100000082000000;
   return reinterpret_cast<void*>(origin);
 }
 
-// Allocates 'count'-many Mint boxes, to stress-test GC during an FFI call.
-DART_EXPORT void AllocateMints(uint64_t count) {
-  Dart_EnterScope();
-  for (uint64_t i = 0; i < count; ++i) {
-    Dart_NewInteger(0x8000000000000001);
-  }
-  Dart_ExitScope();
+DART_EXPORT void TriggerGC(uint64_t count) {
+  Dart_ExecuteInternalCommand("gc-now");
 }
 
 // Calls a Dart function to allocate 'count' objects.
 // Used for stress-testing GC when re-entering the API.
-DART_EXPORT void AllocateThroughDart(uint64_t count) {
+DART_EXPORT void AllocateThroughDart() {
   Dart_EnterScope();
   Dart_Handle root = Dart_RootLibrary();
-  Dart_Handle arguments[1] = {Dart_NewIntegerFromUint64(count)};
   Dart_Handle result = Dart_Invoke(
-      root, Dart_NewStringFromCString("testAllocationsInDartHelper"), 1,
-      arguments);
+      root, Dart_NewStringFromCString("testAllocationsInDartHelper"), 0, NULL);
   const char* error;
   if (Dart_IsError(result)) {
     Dart_StringToCString(Dart_ToString(result), &error);
@@ -506,21 +504,6 @@
   Dart_ExitScope();
 }
 
-#if !defined(_WIN32)
-DART_EXPORT int RedirectStderr() {
-  char filename[256];
-  snprintf(filename, sizeof(filename), "/tmp/captured_stderr_%d", getpid());
-  FILE* f = freopen(filename, "w", stderr);
-  if (f == nullptr) {
-    fprintf(stderr, "Could not open temp file.\n");
-    Dart_PrepareToAbort();
-    abort();
-  }
-  printf("Got file %s\n", filename);
-  return getpid();
-}
-#endif
-
 ////////////////////////////////////////////////////////////////////////////////
 // Tests for callbacks.
 
diff --git a/runtime/bin/gen_snapshot.cc b/runtime/bin/gen_snapshot.cc
index 6af098e..fbd41ce 100644
--- a/runtime/bin/gen_snapshot.cc
+++ b/runtime/bin/gen_snapshot.cc
@@ -119,17 +119,19 @@
   V(reused_instructions, reused_instructions_filename)                         \
   V(blobs_container_filename, blobs_container_filename)                        \
   V(assembly, assembly_filename)                                               \
+  V(elf, elf_filename)                                                         \
   V(load_compilation_trace, load_compilation_trace_filename)                   \
   V(load_type_feedback, load_type_feedback_filename)                           \
   V(save_obfuscation_map, obfuscation_map_filename)
 
 #define BOOL_OPTIONS_LIST(V)                                                   \
-  V(read_all_bytecode, read_all_bytecode)                                      \
   V(compile_all, compile_all)                                                  \
+  V(help, help)                                                                \
   V(obfuscate, obfuscate)                                                      \
+  V(read_all_bytecode, read_all_bytecode)                                      \
+  V(strip, strip)                                                              \
   V(verbose, verbose)                                                          \
-  V(version, version)                                                          \
-  V(help, help)
+  V(version, version)
 
 #define STRING_OPTION_DEFINITION(flag, variable)                               \
   static const char* variable = NULL;                                          \
@@ -188,6 +190,14 @@
 "[--save-obfuscation-map=<map-filename>]                                     \n"
 "<dart-kernel-file>                                                          \n"
 "                                                                            \n"
+"To create an AOT application snapshot as an ELF shared library:             \n"
+"--snapshot_kind=app-aot-elf                                                 \n"
+"--elf=<output-file>                                                         \n"
+"[--strip]                                                                   \n"
+"[--obfuscate]                                                               \n"
+"[--save-obfuscation-map=<map-filename>]                                     \n"
+"<dart-kernel-file>                                                          \n"
+"                                                                            \n"
 "AOT snapshots can be obfuscated: that is all identifiers will be renamed    \n"
 "during compilation. This mode is enabled with --obfuscate flag. Mapping     \n"
 "between original and obfuscated names can be serialized as a JSON array     \n"
@@ -317,16 +327,16 @@
       }
       break;
     }
-    case kAppAOTAssembly:
     case kAppAOTElf: {
-      if (assembly_filename == NULL) {
+      if (elf_filename == NULL) {
         Syslog::PrintErr(
             "Building an AOT snapshot as assembly requires specifying "
-            "an output file for --assembly.\n\n");
+            "an output file for --elf.\n\n");
         return -1;
       }
       break;
     }
+    case kAppAOTAssembly:
     case kVMAOTAssembly: {
       if (assembly_filename == NULL) {
         Syslog::PrintErr(
@@ -630,9 +640,15 @@
     result = Dart_CreateAppAOTSnapshotAsAssembly(StreamingWriteCallback, file);
     CHECK_RESULT(result);
   } else if (snapshot_kind == kAppAOTElf) {
-    File* file = OpenFile(assembly_filename);
+    if (strip) {
+      Syslog::PrintErr(
+          "Warning: Generating ELF library without DWARF debugging"
+          " information.\n");
+    }
+    File* file = OpenFile(elf_filename);
     RefCntReleaseScope<File> rs(file);
-    result = Dart_CreateAppAOTSnapshotAsElf(StreamingWriteCallback, file);
+    result =
+        Dart_CreateAppAOTSnapshotAsElf(StreamingWriteCallback, file, strip);
     CHECK_RESULT(result);
   } else if (snapshot_kind == kAppAOTBlobs) {
     const uint8_t* shared_data = NULL;
diff --git a/runtime/bin/process_android.cc b/runtime/bin/process_android.cc
index 1484749..bbb0afa 100644
--- a/runtime/bin/process_android.cc
+++ b/runtime/bin/process_android.cc
@@ -436,24 +436,24 @@
     }
   }
 
-  // Tries to find path_ relative to the current namespace.
+  // Tries to find path_ relative to the current namespace unless it should be
+  // searched in the PATH.
   // The path that should be passed to exec is returned in realpath.
   // Returns true on success, and false if there was an error that should
   // be reported to the parent.
   bool FindPathInNamespace(char* realpath, intptr_t realpath_size) {
+    // Perform a PATH search if there's no slash in the path.
+    if (strchr(path_, '/') == NULL) {
+      // TODO(zra): If there is a non-default namespace, the entries in PATH
+      // should be treated as relative to the namespace.
+      strncpy(realpath, path_, realpath_size);
+      realpath[realpath_size - 1] = '\0';
+      return true;
+    }
     NamespaceScope ns(namespc_, path_);
     const int fd =
         TEMP_FAILURE_RETRY(openat(ns.fd(), ns.path(), O_RDONLY | O_CLOEXEC));
     if (fd == -1) {
-      if ((errno == ENOENT) && (strchr(path_, '/') == NULL)) {
-        // path_ was not found relative to the namespace, but since it didn't
-        // contain a '/', we can pass it directly to execvp, which will do a
-        // lookup in PATH.
-        // TODO(zra): If there is a non-default namespace, the entries in PATH
-        // should be treated as relative to the namespace.
-        strncpy(realpath, path_, realpath_size);
-        return true;
-      }
       return false;
     }
     char procpath[PATH_MAX];
diff --git a/runtime/bin/process_fuchsia.cc b/runtime/bin/process_fuchsia.cc
index 88ebda7..087d875 100644
--- a/runtime/bin/process_fuchsia.cc
+++ b/runtime/bin/process_fuchsia.cc
@@ -619,7 +619,7 @@
     LOG_INFO("ProcessStarter: Start() Calling fdio_spawn_vmo\n");
     zx_handle_t process = ZX_HANDLE_INVALID;
     char err_msg[FDIO_SPAWN_ERR_MSG_MAX_LENGTH];
-    uint32_t flags = FDIO_SPAWN_CLONE_JOB | FDIO_SPAWN_CLONE_LDSVC;
+    uint32_t flags = FDIO_SPAWN_CLONE_JOB | FDIO_SPAWN_DEFAULT_LDSVC;
     status = fdio_spawn_vmo(ZX_HANDLE_INVALID, flags, vmo, program_arguments_,
                             program_environment_, actions_count, actions,
                             &process, err_msg);
@@ -678,7 +678,7 @@
 
   zx_status_t AddPipe(int target_fd, int* local_fd,
                       fdio_spawn_action_t* action) {
-    zx_status_t status = fdio_pipe_half2(local_fd, &action->h.handle);
+    zx_status_t status = fdio_pipe_half(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(PA_FD), target_fd);
diff --git a/runtime/bin/process_linux.cc b/runtime/bin/process_linux.cc
index da0a75b..afc9667 100644
--- a/runtime/bin/process_linux.cc
+++ b/runtime/bin/process_linux.cc
@@ -436,24 +436,24 @@
     }
   }
 
-  // Tries to find path_ relative to the current namespace.
+  // Tries to find path_ relative to the current namespace unless it should be
+  // searched in the PATH.
   // The path that should be passed to exec is returned in realpath.
   // Returns true on success, and false if there was an error that should
   // be reported to the parent.
   bool FindPathInNamespace(char* realpath, intptr_t realpath_size) {
+    // Perform a PATH search if there's no slash in the path.
+    if (strchr(path_, '/') == NULL) {
+      // TODO(zra): If there is a non-default namespace, the entries in PATH
+      // should be treated as relative to the namespace.
+      strncpy(realpath, path_, realpath_size);
+      realpath[realpath_size - 1] = '\0';
+      return true;
+    }
     NamespaceScope ns(namespc_, path_);
     const int fd =
         TEMP_FAILURE_RETRY(openat64(ns.fd(), ns.path(), O_RDONLY | O_CLOEXEC));
     if (fd == -1) {
-      if ((errno == ENOENT) && (strchr(path_, '/') == NULL)) {
-        // path_ was not found relative to the namespace, but since it didn't
-        // contain a '/', we can pass it directly to execvp, which will do a
-        // lookup in PATH.
-        // TODO(zra): If there is a non-default namespace, the entries in PATH
-        // should be treated as relative to the namespace.
-        strncpy(realpath, path_, realpath_size);
-        return true;
-      }
       return false;
     }
     char procpath[PATH_MAX];
diff --git a/runtime/include/dart_api.h b/runtime/include/dart_api.h
index 7103341..31a7d1b 100644
--- a/runtime/include/dart_api.h
+++ b/runtime/include/dart_api.h
@@ -913,6 +913,13 @@
 DART_EXPORT Dart_Handle Dart_DebugName();
 
 /**
+ * Returns the ID for an isolate which is used to query the service protocol.
+ *
+ * It is the responsibility of the caller to free the returned ID.
+ */
+DART_EXPORT const char* Dart_IsolateServiceId(Dart_Isolate isolate);
+
+/**
  * Enters an isolate. After calling this function,
  * the current isolate will be set to the provided isolate.
  *
@@ -3299,7 +3306,8 @@
  */
 DART_EXPORT DART_WARN_UNUSED_RESULT Dart_Handle
 Dart_CreateAppAOTSnapshotAsElf(Dart_StreamingWriteCallback callback,
-                               void* callback_data);
+                               void* callback_data,
+                               bool stripped);
 
 /**
  *  Like Dart_CreateAppAOTSnapshotAsAssembly, but only includes
diff --git a/runtime/include/dart_native_api.h b/runtime/include/dart_native_api.h
index 3b8f4d2..e45c010 100644
--- a/runtime/include/dart_native_api.h
+++ b/runtime/include/dart_native_api.h
@@ -175,4 +175,10 @@
  */
 DART_EXPORT DART_WARN_UNUSED_RESULT Dart_Handle Dart_FinalizeAllClasses();
 
+/*  This function is intentionally undocumented.
+ *
+ *  It should not be used outside internal tests.
+ */
+DART_EXPORT void Dart_ExecuteInternalCommand(const char* command);
+
 #endif /* INCLUDE_DART_NATIVE_API_H_ */ /* NOLINT */
diff --git a/runtime/lib/ffi_dynamic_library.cc b/runtime/lib/ffi_dynamic_library.cc
index 4bd67e2..102e1b3 100644
--- a/runtime/lib/ffi_dynamic_library.cc
+++ b/runtime/lib/ffi_dynamic_library.cc
@@ -2,8 +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.
 
-#if !defined(TARGET_OS_LINUX) && !defined(TARGET_OS_MACOS) &&                  \
-    !defined(TARGET_OS_ANDROID)
+#include "include/dart_api.h"
+#include "vm/bootstrap_natives.h"
+#include "vm/exceptions.h"
+#include "vm/globals.h"
+#include "vm/native_entry.h"
+
+#if !defined(HOST_OS_LINUX) && !defined(HOST_OS_MACOS) &&                      \
+    !defined(HOST_OS_ANDROID)
 // TODO(dacoharkes): Implement dynamic libraries for other targets & merge the
 // implementation with:
 // - runtime/bin/extensions.h
@@ -13,16 +19,11 @@
 #else
 #include <dlfcn.h>
 #endif
-#include "include/dart_api.h"
-#include "vm/bootstrap_natives.h"
-#include "vm/exceptions.h"
-#include "vm/native_entry.h"
 
 namespace dart {
 
 static void* LoadExtensionLibrary(const char* library_file) {
-#if defined(TARGET_OS_LINUX) || defined(TARGET_OS_MACOS) ||                    \
-    defined(TARGET_OS_ANDROID)
+#if defined(HOST_OS_LINUX) || defined(HOST_OS_MACOS) || defined(HOST_OS_ANDROID)
   void* handle = dlopen(library_file, RTLD_LAZY);
   if (handle == nullptr) {
     char* error = dlerror();
@@ -32,7 +33,7 @@
   }
 
   return handle;
-#elif defined(TARGET_OS_WINDOWS)
+#elif defined(HOST_OS_WINDOWS)
   SetLastError(0);  // Clear any errors.
 
   // Convert to wchar_t string.
@@ -70,8 +71,7 @@
 }
 
 static void* ResolveSymbol(void* handle, const char* symbol) {
-#if defined(TARGET_OS_LINUX) || defined(TARGET_OS_MACOS) ||                    \
-    defined(TARGET_OS_ANDROID)
+#if defined(HOST_OS_LINUX) || defined(HOST_OS_MACOS) || defined(HOST_OS_ANDROID)
   dlerror();  // Clear any errors.
   void* pointer = dlsym(handle, symbol);
   if (pointer == nullptr) {
@@ -81,7 +81,7 @@
     Exceptions::ThrowArgumentError(msg);
   }
   return pointer;
-#elif defined(TARGET_OS_WINDOWS)
+#elif defined(HOST_OS_WINDOWS)
   SetLastError(0);
   void* pointer = GetProcAddress(reinterpret_cast<HMODULE>(handle), symbol);
   if (pointer == nullptr) {
diff --git a/runtime/lib/isolate.cc b/runtime/lib/isolate.cc
index c6280f1..84c2aed 100644
--- a/runtime/lib/isolate.cc
+++ b/runtime/lib/isolate.cc
@@ -434,4 +434,120 @@
   return Object::null();
 }
 
+static void ExternalTypedDataFinalizer(void* isolate_callback_data,
+                                       Dart_WeakPersistentHandle handle,
+                                       void* peer) {
+  free(peer);
+}
+
+static intptr_t GetUint8SizeOrThrow(const Instance& instance) {
+  // From the Dart side we are guaranteed that the type of [instance] is a
+  // subtype of TypedData.
+  if (instance.IsTypedDataBase()) {
+    return TypedDataBase::Cast(instance).LengthInBytes();
+  }
+
+  // This can happen if [instance] is `null` or an instance of a 3rd party class
+  // which implements [TypedData].
+  Exceptions::ThrowArgumentError(instance);
+}
+
+DEFINE_NATIVE_ENTRY(TransferableTypedData_factory, 0, 2) {
+  ASSERT(
+      TypeArguments::CheckedHandle(zone, arguments->NativeArgAt(0)).IsNull());
+
+  GET_NON_NULL_NATIVE_ARGUMENT(Instance, array_instance,
+                               arguments->NativeArgAt(1));
+
+  Array& array = Array::Handle();
+  intptr_t array_length;
+  if (array_instance.IsGrowableObjectArray()) {
+    const auto& growable_array = GrowableObjectArray::Cast(array_instance);
+    array ^= growable_array.data();
+    array_length = growable_array.Length();
+  } else if (array_instance.IsArray()) {
+    array ^= Array::Cast(array_instance).raw();
+    array_length = array.Length();
+  } else {
+    Exceptions::ThrowArgumentError(array_instance);
+    UNREACHABLE();
+  }
+  Instance& instance = Instance::Handle();
+  unsigned long long total_bytes = 0;
+  const unsigned long kMaxBytes =
+      TypedData::MaxElements(kTypedDataUint8ArrayCid);
+  for (intptr_t i = 0; i < array_length; i++) {
+    instance ^= array.At(i);
+    total_bytes += GetUint8SizeOrThrow(instance);
+    if (total_bytes > kMaxBytes) {
+      const Array& error_args = Array::Handle(Array::New(3));
+      error_args.SetAt(0, array);
+      error_args.SetAt(1, String::Handle(String::New("data")));
+      error_args.SetAt(2,
+                       String::Handle(String::NewFormatted(
+                           "Aggregated list exceeds max size %ld", kMaxBytes)));
+      Exceptions::ThrowByType(Exceptions::kArgumentValue, error_args);
+      UNREACHABLE();
+    }
+  }
+
+  uint8_t* data = reinterpret_cast<uint8_t*>(malloc(total_bytes));
+  if (data == nullptr) {
+    const Instance& exception =
+        Instance::Handle(thread->isolate()->object_store()->out_of_memory());
+    Exceptions::Throw(thread, exception);
+    UNREACHABLE();
+  }
+  intptr_t offset = 0;
+  for (intptr_t i = 0; i < array_length; i++) {
+    instance ^= array.At(i);
+
+    {
+      NoSafepointScope no_safepoint;
+      const auto& typed_data = TypedDataBase::Cast(instance);
+      const intptr_t length_in_bytes = typed_data.LengthInBytes();
+
+      void* source = typed_data.DataAddr(0);
+      // The memory does not overlap.
+      memcpy(data + offset, source, length_in_bytes);
+      offset += length_in_bytes;
+    }
+  }
+  ASSERT(static_cast<unsigned long>(offset) == total_bytes);
+  return TransferableTypedData::New(data, total_bytes);
+}
+
+DEFINE_NATIVE_ENTRY(TransferableTypedData_materialize, 0, 1) {
+  GET_NON_NULL_NATIVE_ARGUMENT(TransferableTypedData, t,
+                               arguments->NativeArgAt(0));
+
+  void* peer;
+  {
+    NoSafepointScope no_safepoint;
+    peer = thread->heap()->GetPeer(t.raw());
+    // Assume that object's Peer is only used to track transferrability state.
+    ASSERT(peer != nullptr);
+  }
+
+  TransferableTypedDataPeer* tpeer =
+      reinterpret_cast<TransferableTypedDataPeer*>(peer);
+  const intptr_t length = tpeer->length();
+  uint8_t* data = tpeer->data();
+  if (data == nullptr) {
+    const auto& error = String::Handle(String::New(
+        "Attempt to materialize object that was transferred already."));
+    Exceptions::ThrowArgumentError(error);
+    UNREACHABLE();
+  }
+  tpeer->ClearData();
+
+  const ExternalTypedData& typed_data = ExternalTypedData::Handle(
+      ExternalTypedData::New(kExternalTypedDataUint8ArrayCid, data, length,
+                             thread->heap()->SpaceForExternal(length)));
+  FinalizablePersistentHandle::New(thread->isolate(), typed_data,
+                                   /* peer= */ data,
+                                   &ExternalTypedDataFinalizer, length);
+  return typed_data.raw();
+}
+
 }  // namespace dart
diff --git a/runtime/lib/isolate_patch.dart b/runtime/lib/isolate_patch.dart
index cdd5394..7c28e91 100644
--- a/runtime/lib/isolate_patch.dart
+++ b/runtime/lib/isolate_patch.dart
@@ -7,12 +7,13 @@
 /// used by patches of that library. We plan to change this when we have a
 /// shared front end and simply use parts.
 
-import "dart:_internal" show VMLibraryHooks, patch;
+import "dart:_internal" show ClassID, VMLibraryHooks, patch;
 
 import "dart:async"
     show Completer, Future, Stream, StreamController, StreamSubscription, Timer;
 
 import "dart:collection" show HashMap;
+import "dart:typed_data" show ByteBuffer, TypedData, Uint8List;
 
 /// These are the additional parts of this patch library:
 // part "timer_impl.dart";
@@ -671,3 +672,33 @@
 
   static String _getCurrentRootUriStr() native "Isolate_getCurrentRootUriStr";
 }
+
+@patch
+abstract class TransferableTypedData {
+  @patch
+  factory TransferableTypedData.fromList(List<TypedData> chunks) {
+    if (chunks == null) {
+      throw ArgumentError(chunks);
+    }
+    final int cid = ClassID.getID(chunks);
+    if (cid != ClassID.cidArray &&
+        cid != ClassID.cidGrowableObjectArray &&
+        cid != ClassID.cidImmutableArray) {
+      chunks = List.unmodifiable(chunks);
+    }
+    return _TransferableTypedDataImpl(chunks);
+  }
+}
+
+@pragma("vm:entry-point")
+class _TransferableTypedDataImpl implements TransferableTypedData {
+  factory _TransferableTypedDataImpl(List<TypedData> list)
+      native "TransferableTypedData_factory";
+
+  ByteBuffer materialize() {
+    return _materializeIntoUint8List().buffer;
+  }
+
+  Uint8List _materializeIntoUint8List()
+      native "TransferableTypedData_materialize";
+}
diff --git a/runtime/lib/mirrors.cc b/runtime/lib/mirrors.cc
index 3bc2dc5..beb978b 100644
--- a/runtime/lib/mirrors.cc
+++ b/runtime/lib/mirrors.cc
@@ -331,6 +331,23 @@
   return CreateMirror(Symbols::_LocalClassMirror(), args);
 }
 
+static bool IsCensoredLibrary(const String& url) {
+  static const char* const censored_libraries[] = {
+      "dart:_builtin",
+      "dart:_vmservice",
+      "dart:vmservice_io",
+  };
+  for (const char* censored_library : censored_libraries) {
+    if (url.Equals(censored_library)) {
+      return true;
+    }
+  }
+  if (!Api::IsFfiEnabled() && url.Equals(Symbols::DartFfi())) {
+    return true;
+  }
+  return false;
+}
+
 static RawInstance* CreateLibraryMirror(Thread* thread, const Library& lib) {
   Zone* zone = thread->zone();
   ASSERT(!lib.IsNull());
@@ -340,17 +357,9 @@
   str = lib.name();
   args.SetAt(1, str);
   str = lib.url();
-  const char* censored_libraries[] = {
-      "dart:_builtin",
-      "dart:_vmservice",
-      "dart:vmservice_io",
-      NULL,
-  };
-  for (intptr_t i = 0; censored_libraries[i] != NULL; i++) {
-    if (str.Equals(censored_libraries[i])) {
-      // Censored library (grumble).
-      return Instance::null();
-    }
+  if (IsCensoredLibrary(str)) {
+    // Censored library (grumble).
+    return Instance::null();
   }
   args.SetAt(2, str);
   return CreateMirror(Symbols::_LocalLibraryMirror(), args);
diff --git a/runtime/tests/vm/dart/data_uri_import_test.dart b/runtime/tests/vm/dart/data_uri_import_test.dart
index 8ce4e1a..576f302 100644
--- a/runtime/tests/vm/dart/data_uri_import_test.dart
+++ b/runtime/tests/vm/dart/data_uri_import_test.dart
@@ -6,13 +6,13 @@
 import 'data:application/dart;charset=utf-8,foo%28%29%20%3D%3E%2042%3B';  /// percentencoded: ok
 import 'data:text/plain;charset=utf-8,foo%28%29%20%3D%3E%2042%3B';  /// wrongmime: ok
 import 'data:;charset=utf-8,foo%28%29%20%3D%3E%2042%3B';  /// nomime: ok
-import 'data:application/dart;charset=utf-16,foo%28%29%20%3D%3E%2042%3B';  /// utf16: runtime error
+import 'data:application/dart;charset=utf-16,foo%28%29%20%3D%3E%2042%3B';  /// utf16: ok
 import 'data:application/dart,foo%28%29%20%3D%3E%2042%3B';  /// nocharset: ok
-import 'data:application/dart;charset=utf-8,foo?%9g';  /// badencodeddate: runtime error
+import 'data:application/dart;charset=utf-8,foo?%9g';  /// badencodeddate: compile-time error
 import 'data:application/dart;charset=utf-8;base64,Zm9vKCkgPT4gNDI7';  /// base64: ok
 
 import "package:expect/expect.dart";
 
 main() {
   Expect.equals(42, foo());
-}
\ No newline at end of file
+}
diff --git a/runtime/tests/vm/dart/issue_31959_31960_test.dart b/runtime/tests/vm/dart/issue_31959_31960_test.dart
new file mode 100644
index 0000000..3990fb6
--- /dev/null
+++ b/runtime/tests/vm/dart/issue_31959_31960_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 'dart:async';
+import 'dart:isolate';
+import 'dart:math';
+import 'dart:typed_data';
+
+import 'package:async_helper/async_helper.dart' show asyncStart, asyncEnd;
+import 'package:expect/expect.dart';
+
+Uint8List generateSampleList(final size) {
+  final list = Uint8List(size);
+  for (int i = 0; i < size; i++) {
+    list[i] = i % 243;
+  }
+  return list;
+}
+
+void validateReceivedList(final expectedSize, final list) {
+  Expect.equals(expectedSize, list.length);
+  // probe few elements
+  for (int i = 0; i < list.length; i += max<num>(1, expectedSize ~/ 1000)) {
+    Expect.equals(i % 243, list[i]);
+  }
+}
+
+Future<Null> testSend(
+    bool transferable, int toIsolateSize, int fromIsolateSize) async {
+  asyncStart();
+  final port = ReceivePort();
+  final inbox = StreamIterator(port);
+  await Isolate.spawn(isolateMain,
+      [transferable, toIsolateSize, fromIsolateSize, port.sendPort]);
+  await inbox.moveNext();
+  final outbox = inbox.current;
+  final workWatch = Stopwatch();
+  final data = generateSampleList(toIsolateSize);
+  int count = 10;
+  workWatch.start();
+  while (count-- > 0) {
+    outbox.send(transferable ? TransferableTypedData.fromList([data]) : data);
+    await inbox.moveNext();
+    validateReceivedList(
+        fromIsolateSize,
+        transferable
+            ? inbox.current.materialize().asUint8List()
+            : inbox.current);
+  }
+  print('total ${workWatch.elapsedMilliseconds}ms');
+  outbox.send(null);
+  port.close();
+  asyncEnd();
+}
+
+main() async {
+  asyncStart();
+  int bignum = 100 * 1000 * 1000;
+  await testSend(false, bignum, 1); // none
+  await testSend(true, bignum, 1); // 31959tr
+  await testSend(false, bignum, 1); // 31960
+  await testSend(true, bignum, 1); // 31960tr
+  asyncEnd();
+}
+
+Future<Null> isolateMain(List config) async {
+  bool transferable = config[0];
+  int toIsolateSize = config[1];
+  int fromIsolateSize = config[2];
+  SendPort outbox = config[3];
+
+  final port = ReceivePort();
+  final inbox = StreamIterator(port);
+  outbox.send(port.sendPort);
+  final data = generateSampleList(fromIsolateSize);
+  while (true) {
+    await inbox.moveNext();
+    if (inbox.current == null) {
+      break;
+    }
+    validateReceivedList(
+        toIsolateSize,
+        transferable
+            ? inbox.current.materialize().asUint8List()
+            : inbox.current);
+    outbox.send(transferable ? TransferableTypedData.fromList([data]) : data);
+  }
+  port.close();
+}
diff --git a/runtime/tests/vm/dart/transferable_test.dart b/runtime/tests/vm/dart/transferable_test.dart
new file mode 100644
index 0000000..a9a97d7
--- /dev/null
+++ b/runtime/tests/vm/dart/transferable_test.dart
@@ -0,0 +1,130 @@
+// 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.
+
+// Test that validates that transferables are faster than regular typed data.
+
+import 'dart:async';
+import 'dart:isolate';
+import 'dart:typed_data';
+
+import "package:expect/expect.dart";
+
+const int toIsolateSize = 100 * 1024 * 1024;
+const int fromIsolateSize = 100 * 1024 * 1024;
+
+const int nIterations = 5;
+
+int iteration;
+bool keepTimerRunning;
+
+main() async {
+  keepTimerRunning = true;
+
+  print('--- standard');
+  iteration = nIterations;
+  final stopwatch = new Stopwatch()..start();
+  await runBatch(useTransferable: false);
+  final standard = stopwatch.elapsedMilliseconds;
+
+  print('--- transferable');
+  iteration = nIterations;
+  stopwatch.reset();
+  await runBatch(useTransferable: true);
+  final transferable = stopwatch.elapsedMilliseconds;
+  print(
+      'standard($standard ms)/transferable($transferable ms): ${standard / transferable}x');
+  Expect.isTrue(standard / transferable > 1.2);
+  keepTimerRunning = false;
+}
+
+packageList(Uint8List data, bool useTransferable) {
+  return useTransferable
+      ? TransferableTypedData.fromList(<Uint8List>[data])
+      : data;
+}
+
+packageByteData(ByteData data, bool useTransferable) {
+  return useTransferable
+      ? TransferableTypedData.fromList(<Uint8List>[data.buffer.asUint8List()])
+      : data;
+}
+
+class StartMessage {
+  final SendPort sendPort;
+  final bool useTransferable;
+
+  StartMessage(this.sendPort, this.useTransferable);
+}
+
+runBatch({bool useTransferable}) async {
+  Timer.run(idleTimer);
+  final port = ReceivePort();
+  final inbox = StreamIterator<dynamic>(port);
+  final worker = await Isolate.spawn(
+      isolateMain, StartMessage(port.sendPort, useTransferable),
+      paused: true);
+  final workerCompleted = Completer<bool>();
+  final workerExitedPort = ReceivePort()
+    ..listen((_) => workerCompleted.complete(true));
+  worker.addOnExitListener(workerExitedPort.sendPort);
+  worker.resume(worker.pauseCapability);
+
+  await inbox.moveNext();
+  final outbox = inbox.current;
+  final workWatch = new Stopwatch();
+  final data = new Uint8List(toIsolateSize);
+
+  while (iteration-- > 0) {
+    final packagedData = packageList(data, useTransferable);
+    workWatch.start();
+    outbox.send(packagedData);
+    await inbox.moveNext();
+
+    final received = inbox.current;
+    final receivedData =
+        received is TransferableTypedData ? received.materialize() : received;
+    int time = workWatch.elapsedMilliseconds;
+    print('${time}ms for round-trip');
+    workWatch.reset();
+  }
+  outbox.send(null);
+
+  await workerCompleted.future;
+  workerExitedPort.close();
+  port.close();
+}
+
+Future<Null> isolateMain(StartMessage startMessage) async {
+  final port = new ReceivePort();
+  final inbox = new StreamIterator<dynamic>(port);
+  startMessage.sendPort.send(port.sendPort);
+  final data = Uint8List.view(new Uint8List(fromIsolateSize).buffer);
+  while (true) {
+    await inbox.moveNext();
+    final received = inbox.current;
+    if (received == null) {
+      break;
+    }
+    final receivedData =
+        received is TransferableTypedData ? received.materialize() : received;
+
+    final packagedData = packageList(data, startMessage.useTransferable);
+
+    startMessage.sendPort.send(packagedData);
+  }
+  port.close();
+}
+
+final Stopwatch idleWatch = new Stopwatch();
+
+void idleTimer() {
+  idleWatch.stop();
+  final time = idleWatch.elapsedMilliseconds;
+  if (time > 5) print('${time}ms since last checkin');
+  idleWatch.reset();
+  idleWatch.start();
+  if (keepTimerRunning) {
+    Timer.run(idleTimer);
+  }
+}
diff --git a/runtime/tests/vm/dart/transferable_throws_oom_test.dart b/runtime/tests/vm/dart/transferable_throws_oom_test.dart
new file mode 100644
index 0000000..c1b21f0
--- /dev/null
+++ b/runtime/tests/vm/dart/transferable_throws_oom_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.
+
+// Test that ensures correct exception when running out of memory for
+// really large transferable.
+
+import 'dart:async';
+import 'dart:collection';
+import 'dart:core';
+import 'dart:io';
+import 'dart:isolate';
+import 'dart:typed_data';
+import 'dart:math';
+
+import "package:expect/expect.dart";
+
+main() {
+  // Attempt to create total 1tb uint8list which should fail on 32 and 64-bit
+  // platforms.
+  final bytes100MB = Uint8List(100 * 1024 * 1024);
+  final total1TB = List<Uint8List>.filled(10000, bytes100MB);
+  // Try to make a 1 TB transferable.
+  Expect.throws(() => TransferableTypedData.fromList(total1TB));
+}
diff --git a/runtime/tests/vm/dart/transferable_throws_test.dart b/runtime/tests/vm/dart/transferable_throws_test.dart
new file mode 100644
index 0000000..860965a
--- /dev/null
+++ b/runtime/tests/vm/dart/transferable_throws_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.
+
+// Test that ensures correct exceptions are thrown when misusing
+// [TransferableTypedData].
+
+import 'dart:async';
+import 'dart:collection';
+import 'dart:core';
+import 'dart:io';
+import 'dart:isolate';
+import 'dart:typed_data';
+import 'dart:math';
+
+import "package:expect/expect.dart";
+
+throwsIfMaterializeAfterSend() async {
+  final completer = Completer<bool>();
+  final rp = ReceivePort()
+    ..listen((e) {
+      completer.complete(true);
+    });
+  final transferable = TransferableTypedData.fromList([Uint8List(1024)]);
+  rp.sendPort.send(transferable);
+  Expect.throwsArgumentError(() => transferable.materialize());
+  await completer.future;
+  rp.close();
+}
+
+throwsIfSendMoreThanOnce() async {
+  final completer = Completer<bool>();
+  final rp = ReceivePort()
+    ..listen((e) {
+      completer.complete(true);
+    });
+  final bytes = Uint8List(1024);
+  final transferable = TransferableTypedData.fromList([bytes]);
+  rp.sendPort.send(transferable);
+  Expect.throwsArgumentError(() => rp.sendPort.send(transferable));
+  await completer.future;
+  rp.close();
+}
+
+throwsIfMaterializeMoreThanOnce() {
+  final transferable = TransferableTypedData.fromList([Uint8List(1024)]);
+  transferable.materialize();
+  Expect.throwsArgumentError(() => transferable.materialize());
+}
+
+throwsIfReceiverMaterializesMoreThanOnce() async {
+  final completer = Completer<List>();
+  final isolateErrors = ReceivePort()..listen((e) => completer.complete(e));
+  await Isolate.spawn(
+      receiver, TransferableTypedData.fromList([Uint8List(1024)]),
+      onError: isolateErrors.sendPort);
+  final error = await completer.future;
+  Expect.equals(
+      error[0],
+      "Invalid argument(s): Attempt to materialize object that was"
+      " transferred already.");
+  isolateErrors.close();
+}
+
+void receiver(final transferable) {
+  transferable.materialize();
+  transferable.materialize();
+}
+
+throwsIfCummulativeListIsTooLargeOn32bitPlatform() {
+  try {
+    int maxUint8ListSize = pow(2, 30);
+    // Check whether we are on 32-bit or 64-bit platform.
+    new Uint8List(maxUint8ListSize);
+    // On 64-bit platform we will have difficulty allocating large enough
+    // Uint8List to verify "too large" use case, so do nothing.
+    return;
+  } catch (_) {}
+
+  var halfmax = new Uint8List(pow(2, 29) - 1);
+  Expect.throwsArgumentError(
+      () => TransferableTypedData.fromList([halfmax, halfmax, Uint8List(2)]));
+}
+
+class MyList<T> extends ListBase<T> {
+  @override
+  int length;
+
+  @override
+  T operator [](int index) => null;
+  @override
+  void operator []=(int index, T value) {}
+}
+
+class MyTypedData implements TypedData {
+  noSuchMethod(_) {}
+}
+
+main() async {
+  await throwsIfMaterializeAfterSend();
+  await throwsIfSendMoreThanOnce();
+  throwsIfMaterializeMoreThanOnce();
+  await throwsIfReceiverMaterializesMoreThanOnce();
+  throwsIfCummulativeListIsTooLargeOn32bitPlatform();
+
+  Expect.throwsArgumentError(() => TransferableTypedData.fromList(null));
+  Expect.throwsArgumentError(() => TransferableTypedData.fromList([null]));
+  Expect.throwsArgumentError(
+      () => TransferableTypedData.fromList(MyList<Uint8List>()));
+  Expect.throwsArgumentError(
+      () => TransferableTypedData.fromList([MyTypedData()]));
+}
diff --git a/runtime/tests/vm/dart/v8_snapshot_profile_writer_test.dart b/runtime/tests/vm/dart/v8_snapshot_profile_writer_test.dart
index 266adde..fa99a62 100644
--- a/runtime/tests/vm/dart/v8_snapshot_profile_writer_test.dart
+++ b/runtime/tests/vm/dart/v8_snapshot_profile_writer_test.dart
@@ -149,6 +149,11 @@
 
     match = matchComplete(field, line);
     if (match != null && currentClass != null) {
+      if (fields[currentClass] == null) {
+        hasMissingFields = true;
+        print("$currentClass is missing entirely.");
+        continue;
+      }
       if (!fields[currentClass].contains(match.group(2))) {
         hasMissingFields = true;
         print("$currentClass is missing ${match.group(2)}.");
diff --git a/runtime/tests/vm/vm.status b/runtime/tests/vm/vm.status
index 143f5ca..5b8bc01 100644
--- a/runtime/tests/vm/vm.status
+++ b/runtime/tests/vm/vm.status
@@ -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.
 
-cc/Dart2JSCompileAll: Fail, Crash # Issue 27369
-cc/Dart2JSCompilerStats: Fail, Crash # Issue 27369
 cc/Fail0: Fail # These tests are expected to crash on all platforms.
 cc/Fail1: Fail # These tests are expected to crash on all platforms.
 cc/Fail2: Fail # These tests are expected to crash on all platforms.
@@ -20,6 +18,8 @@
 dart/stack_overflow_shared_test: Pass, Slow # Uses --shared-slow-path-triggers-gc flag.
 dart/use_bare_instructions_flag_test: Pass, Slow # Spawns several subprocesses
 
+cc/Profiler_StringInterpolation: Fail # Issue 37208
+
 [ $mode == debug ]
 dart/appjit_cha_deopt_test: Pass, Slow # Quite slow in debug mode, uses --optimization-counter-threshold=100
 
@@ -28,13 +28,13 @@
 dart/kernel_determinism_test: SkipSlow
 
 [ $compiler == app_jitk ]
-dart/data_uri_import_test/utf16: MissingRuntimeError
 dart/redirection_type_shuffling_test/none: RuntimeError
 dart/snapshot_version_test: RuntimeError
 
 [ $hot_reload || $hot_reload_rollback ]
 dart/compilation_trace_test: Pass, Slow
 dart/type_feedback_test: Pass, Slow
+dart/issue_31959_31960_test: SkipSlow
 
 [ $compiler != dartk || ($arch != x64 && $arch != simarm && $arch != arm) || $hot_reload || $hot_reload_rollback ]
 dart/entrypoints/jit/*: SkipByDesign  # Only supported in the Dart 2 JIT and AOT, and test optimizations - hence disabled on hotreload bots.
@@ -56,6 +56,12 @@
 [ $runtime != vm && $runtime != dart_precompiled ]
 dart/catch_entry_state: SkipByDesign
 
+[ $builder_tag == asan ]
+dart/transferable_throws_oom_test: SkipByDesign # This test tries to allocate too much memory on purpose. Still dartbug.com/37188
+
+[ $system == macos ]
+dart/transferable_throws_oom_test: SkipByDesign # Allocating too much memory to cause OOM doesn't work on mac
+
 [ $compiler != dartk && $compiler != dartkb ]
 cc/IsolateReload_KernelIncrementalCompile: SkipByDesign
 cc/IsolateReload_KernelIncrementalCompileAppAndLib: SkipByDesign
@@ -83,7 +89,7 @@
 [ $runtime == vm && $mode == product && $compiler == dartk ]
 cc/CorelibIsolateStartup: Timeout, Pass
 
-[ $runtime != vm ]
+[ $runtime != vm && $runtime != dart_precompiled ]
 dart/*: SkipByDesign # VM specific tests
 
 [ $runtime != dart_precompiled  || $system == android ]
@@ -126,9 +132,6 @@
 dart/data_uri_import_test/utf16: Crash
 dart/data_uri_import_test/wrongmime: Crash
 
-[ $builder_tag == asan && $mode == debug && ($runtime == dart_precompiled || $runtime == vm) ]
-cc/Dart2JSCompileAll: SkipSlow # Timeout.
-
 # Enabling of dartk for sim{arm,arm64,dbc64} revelaed these test failures, which
 # are to be triaged.  Isolate tests are skipped on purpose due to the usage of
 # batch mode.
@@ -152,7 +155,6 @@
 cc/Debugger_SetBreakpointInPartOfLibrary: Crash
 cc/IsolateReload_NotTypedefToTypedef: Fail
 cc/IsolateReload_TypedefToNotTypedef: Fail
-dart/data_uri_import_test/utf16: MissingRuntimeError
 dart/spawn_shutdown_test: SkipSlow
 
 [ ($compiler == dartk || $compiler == dartkb) && $runtime == vm && $system == macos ]
@@ -177,6 +179,7 @@
 
 [ ($compiler == dartk || $compiler == dartkb) && ($arch == simarm || $arch == simarm64 || $arch == simdbc || $arch == simdbc64) ]
 dart/appjit*: SkipSlow # DFE too slow
+dart/issue_31959_31960_test: SkipSlow
 
 # Enabling of dartk for sim{arm,arm64,dbc64} revelaed these test failures, which
 # are to be triaged.  Isolate tests are skipped on purpose due to the usage of
@@ -194,7 +197,6 @@
 dart/kernel_determinism_test: SkipByDesign # Test needs to run from source
 
 [ $compiler == dartkp && ($runtime == dart_precompiled || $runtime == vm) ]
-dart/data_uri_import_test/utf16: MissingRuntimeError # UTF-16 data URIs work in dartk
 dart/issue32950_test: SkipByDesign # uses spawnUri.
 dart/redirection_type_shuffling_test: SkipByDesign # Includes dart:mirrors.
 dart/spawn_shutdown_test: SkipSlow
diff --git a/runtime/vm/benchmark_test.cc b/runtime/vm/benchmark_test.cc
index 265ca29..738478b 100644
--- a/runtime/vm/benchmark_test.cc
+++ b/runtime/vm/benchmark_test.cc
@@ -26,62 +26,6 @@
 Benchmark* Benchmark::tail_ = NULL;
 const char* Benchmark::executable_ = NULL;
 
-//
-// Measure compile of all dart2js(compiler) functions.
-//
-static char* ComputeDart2JSPath(const char* arg) {
-  char buffer[2048];
-  char* dart2js_path = strdup(File::GetCanonicalPath(NULL, arg));
-  const char* compiler_path = "%s%spkg%scompiler%slib%scompiler.dart";
-  const char* path_separator = File::PathSeparator();
-  ASSERT(path_separator != NULL && strlen(path_separator) == 1);
-  char* ptr = strrchr(dart2js_path, *path_separator);
-  while (ptr != NULL) {
-    *ptr = '\0';
-    Utils::SNPrint(buffer, 2048, compiler_path, dart2js_path, path_separator,
-                   path_separator, path_separator, path_separator,
-                   path_separator);
-    if (File::Exists(NULL, buffer)) {
-      break;
-    }
-    ptr = strrchr(dart2js_path, *path_separator);
-  }
-  if (ptr == NULL) {
-    free(dart2js_path);
-    dart2js_path = NULL;
-  }
-  return dart2js_path;
-}
-
-static void func(Dart_NativeArguments args) {}
-
-static Dart_NativeFunction NativeResolver(Dart_Handle name,
-                                          int arg_count,
-                                          bool* auto_setup_scope) {
-  ASSERT(auto_setup_scope != NULL);
-  *auto_setup_scope = false;
-  return &func;
-}
-
-static void SetupDart2JSPackagePath() {
-  bool worked = bin::DartUtils::SetOriginalWorkingDirectory();
-  EXPECT(worked);
-
-  Dart_Handle result = bin::DartUtils::PrepareForScriptLoading(false, false);
-  EXPECT_VALID(result);
-
-  // Setup package root.
-  char buffer[2048];
-  char* executable_path =
-      strdup(File::GetCanonicalPath(NULL, Benchmark::Executable()));
-  const char* packages_path = "%s%s..%spackages";
-  const char* path_separator = File::PathSeparator();
-  Utils::SNPrint(buffer, 2048, packages_path, executable_path, path_separator,
-                 path_separator);
-  result = bin::DartUtils::SetupPackageRoot(buffer, NULL);
-  EXPECT_VALID(result);
-}
-
 void Benchmark::RunAll(const char* executable) {
   SetExecutable(executable);
   Benchmark* benchmark = first_;
@@ -114,6 +58,32 @@
   benchmark->set_score(elapsed_time);
 }
 
+// This file is created by the target //runtime/bin:dart_kernel_platform_cc
+// which is depended on by run_vm_tests.
+static char* ComputeKernelServicePath(const char* arg) {
+  char buffer[2048];
+  char* kernel_service_path = strdup(File::GetCanonicalPath(NULL, arg));
+  EXPECT(kernel_service_path != NULL);
+  const char* compiler_path = "%s%sgen%skernel_service.dill";
+  const char* path_separator = File::PathSeparator();
+  ASSERT(path_separator != NULL && strlen(path_separator) == 1);
+  char* ptr = strrchr(kernel_service_path, *path_separator);
+  while (ptr != NULL) {
+    *ptr = '\0';
+    Utils::SNPrint(buffer, ARRAY_SIZE(buffer), compiler_path,
+                   kernel_service_path, path_separator, path_separator);
+    if (File::Exists(NULL, buffer)) {
+      break;
+    }
+    ptr = strrchr(kernel_service_path, *path_separator);
+  }
+  free(kernel_service_path);
+  if (ptr == NULL) {
+    return NULL;
+  }
+  return strdup(buffer);
+}
+
 // This file is created by the target //runtime/bin:gen_kernel_bytecode_dill
 // which is depended on by run_vm_tests.
 static char* ComputeGenKernelKernelPath(const char* arg) {
@@ -380,33 +350,51 @@
   benchmark->set_score(elapsed_time);
 }
 
-BENCHMARK(Dart2JSCompileAll) {
+static void vmservice_resolver(Dart_NativeArguments args) {}
+
+static Dart_NativeFunction NativeResolver(Dart_Handle name,
+                                          int arg_count,
+                                          bool* auto_setup_scope) {
+  ASSERT(auto_setup_scope != NULL);
+  *auto_setup_scope = false;
+  return &vmservice_resolver;
+}
+
+//
+// Measure compile of all kernel Service(CFE) functions.
+//
+BENCHMARK(KernelServiceCompileAll) {
   bin::Builtin::SetNativeResolver(bin::Builtin::kBuiltinLibrary);
   bin::Builtin::SetNativeResolver(bin::Builtin::kIOLibrary);
   bin::Builtin::SetNativeResolver(bin::Builtin::kCLILibrary);
-  SetupDart2JSPackagePath();
-  char* dart_root = ComputeDart2JSPath(Benchmark::Executable());
-  char* script = NULL;
-  if (dart_root != NULL) {
-    HANDLESCOPE(thread);
-    script = OS::SCreate(NULL, "import '%s/pkg/compiler/lib/compiler.dart';",
-                         dart_root);
-    Dart_Handle lib = TestCase::LoadTestScript(
-        script, reinterpret_cast<Dart_NativeEntryResolver>(NativeResolver));
-    EXPECT_VALID(lib);
-  } else {
-    Dart_Handle lib = TestCase::LoadTestScript(
-        "import 'pkg/compiler/lib/compiler.dart';",
-        reinterpret_cast<Dart_NativeEntryResolver>(NativeResolver));
-    EXPECT_VALID(lib);
-  }
-  Timer timer(true, "Compile all of dart2js benchmark");
+  char* dill_path = ComputeKernelServicePath(Benchmark::Executable());
+  File* file = File::Open(NULL, dill_path, File::kRead);
+  EXPECT(file != NULL);
+  bin::RefCntReleaseScope<File> rs(file);
+  intptr_t kernel_buffer_size = file->Length();
+  uint8_t* kernel_buffer =
+      reinterpret_cast<uint8_t*>(malloc(kernel_buffer_size));
+  EXPECT(kernel_buffer != NULL);
+  bool read_fully = file->ReadFully(kernel_buffer, kernel_buffer_size);
+  EXPECT(read_fully);
+  Dart_Handle result =
+      Dart_LoadScriptFromKernel(kernel_buffer, kernel_buffer_size);
+  EXPECT_VALID(result);
+  Dart_Handle service_lib = Dart_LookupLibrary(NewString("dart:vmservice_io"));
+  ASSERT(!Dart_IsError(service_lib));
+  Dart_SetNativeResolver(
+      service_lib, reinterpret_cast<Dart_NativeEntryResolver>(NativeResolver),
+      NULL);
+  result = Dart_FinalizeLoading(false);
+  EXPECT_VALID(result);
+
+  Timer timer(true, "Compile all of kernel service benchmark");
   timer.Start();
 #if !defined(PRODUCT)
   const bool old_flag = FLAG_background_compilation;
   FLAG_background_compilation = false;
 #endif
-  Dart_Handle result = Dart_CompileAll();
+  result = Dart_CompileAll();
 #if !defined(PRODUCT)
   FLAG_background_compilation = old_flag;
 #endif
@@ -414,8 +402,8 @@
   timer.Stop();
   int64_t elapsed_time = timer.TotalElapsedTime();
   benchmark->set_score(elapsed_time);
-  free(dart_root);
-  free(script);
+  free(dill_path);
+  free(kernel_buffer);
 }
 
 //
diff --git a/runtime/vm/bootstrap_natives.h b/runtime/vm/bootstrap_natives.h
index 34cfbc4..98c6129 100644
--- a/runtime/vm/bootstrap_natives.h
+++ b/runtime/vm/bootstrap_natives.h
@@ -387,7 +387,9 @@
   V(Ffi_fromFunction, 1)                                                       \
   V(Ffi_dl_open, 1)                                                            \
   V(Ffi_dl_lookup, 2)                                                          \
-  V(Ffi_dl_getHandle, 1)
+  V(Ffi_dl_getHandle, 1)                                                       \
+  V(TransferableTypedData_factory, 2)                                          \
+  V(TransferableTypedData_materialize, 1)
 
 // List of bootstrap native entry points used in the dart:mirror library.
 #define MIRRORS_BOOTSTRAP_NATIVE_LIST(V)                                       \
diff --git a/runtime/vm/class_finalizer.cc b/runtime/vm/class_finalizer.cc
index 88858e7..5b3fe6d 100644
--- a/runtime/vm/class_finalizer.cc
+++ b/runtime/vm/class_finalizer.cc
@@ -191,15 +191,15 @@
     class_array = object_store->pending_classes();
     ASSERT(!class_array.IsNull());
     Class& cls = Class::Handle();
-    // Mark all classes as cycle-free (should be checked by front-end).
-    // TODO(alexmarkov): Cleanup is_cycle_free bit on classes.
+
+#if defined(DEBUG)
     for (intptr_t i = 0; i < class_array.Length(); i++) {
       cls ^= class_array.At(i);
-      if (!cls.is_cycle_free()) {
-        cls.set_is_cycle_free();
-      }
+      ASSERT(cls.is_declaration_loaded());
     }
-    // Finalize all classes.
+#endif
+
+    // Finalize types in all classes.
     for (intptr_t i = 0; i < class_array.Length(); i++) {
       cls ^= class_array.At(i);
       FinalizeTypesInClass(cls);
@@ -557,8 +557,6 @@
     const Class& super_class = Class::Handle(super_type.type_class());
     const intptr_t num_super_type_params = super_class.NumTypeParameters();
     const intptr_t num_super_type_args = super_class.NumTypeArguments();
-    ASSERT(num_super_type_args ==
-           (cls.NumTypeArguments() - cls.NumOwnTypeArguments()));
     if (!super_type.IsFinalized() && !super_type.IsBeingFinalized()) {
       super_type = FinalizeType(cls, super_type, kFinalize, pending_types);
       cls.set_super_type(super_type);
@@ -1005,6 +1003,7 @@
 void ClassFinalizer::FinalizeTypesInClass(const Class& cls) {
   Thread* thread = Thread::Current();
   HANDLESCOPE(thread);
+  ASSERT(cls.is_declaration_loaded());
   if (cls.is_type_finalized()) {
     return;
   }
@@ -1242,75 +1241,31 @@
                                       ->object_store()
                                       ->pending_unevaluated_const_fields());
 
-  if (enum_cls.kernel_offset() > 0) {
-    Error& error = Error::Handle(zone);
-    for (intptr_t i = 0; i < fields.Length(); i++) {
-      field = Field::RawCast(fields.At(i));
-      if (!field.is_static() || !field.is_const() ||
-          (sentinel.raw() == field.raw())) {
-        continue;
-      }
-      // The eager evaluation of the enum values is required for hot-reload (see
-      // commit e3ecc87). However, while busy loading the constant table, we
-      // need to postpone this evaluation until table is done.
-      if (!FLAG_precompiled_mode) {
-        if (field.IsUninitialized()) {
-          if (pending_unevaluated_const_fields.IsNull()) {
-            // Evaluate right away.
-            error = field.Initialize();
-            if (!error.IsNull()) {
-              ReportError(error);
-            }
-          } else {
-            // Postpone evaluation until we have a constant table.
-            pending_unevaluated_const_fields.Add(field);
+  ASSERT(enum_cls.kernel_offset() > 0);
+  Error& error = Error::Handle(zone);
+  for (intptr_t i = 0; i < fields.Length(); i++) {
+    field = Field::RawCast(fields.At(i));
+    if (!field.is_static() || !field.is_const() ||
+        (sentinel.raw() == field.raw())) {
+      continue;
+    }
+    // The eager evaluation of the enum values is required for hot-reload (see
+    // commit e3ecc87). However, while busy loading the constant table, we
+    // need to postpone this evaluation until table is done.
+    if (!FLAG_precompiled_mode) {
+      if (field.IsUninitialized()) {
+        if (pending_unevaluated_const_fields.IsNull()) {
+          // Evaluate right away.
+          error = field.Initialize();
+          if (!error.IsNull()) {
+            ReportError(error);
           }
+        } else {
+          // Postpone evaluation until we have a constant table.
+          pending_unevaluated_const_fields.Add(field);
         }
       }
     }
-  } else {
-    const String& name_prefix =
-        String::Handle(String::Concat(enum_name, Symbols::Dot()));
-    Instance& ordinal_value = Instance::Handle(zone);
-    Array& values_list = Array::Handle(zone);
-    const Field& values_field =
-        Field::Handle(zone, enum_cls.LookupStaticField(Symbols::Values()));
-    ASSERT(!values_field.IsNull());
-    ASSERT(Instance::Handle(zone, values_field.StaticValue()).IsArray());
-    values_list = Array::RawCast(values_field.StaticValue());
-    const Array& fields = Array::Handle(zone, enum_cls.fields());
-    for (intptr_t i = 0; i < fields.Length(); i++) {
-      field = Field::RawCast(fields.At(i));
-      if (!field.is_static()) continue;
-      ordinal_value = field.StaticValue();
-      // The static fields that need to be initialized with enum instances
-      // contain the smi value of the ordinal number, which was stored in
-      // the field by the parser. Other fields contain non-smi values.
-      if (!ordinal_value.IsSmi()) continue;
-      enum_ident = field.name();
-      // Construct the string returned by toString.
-      ASSERT(!enum_ident.IsNull());
-      // For the user-visible name of the enumeration value, we need to
-      // unmangle private names.
-      if (enum_ident.CharAt(0) == '_') {
-        enum_ident = String::ScrubName(enum_ident);
-      }
-      enum_ident = Symbols::FromConcat(thread, name_prefix, enum_ident);
-      enum_value = Instance::New(enum_cls, Heap::kOld);
-      enum_value.SetField(index_field, ordinal_value);
-      enum_value.SetField(name_field, enum_ident);
-      enum_value = enum_value.CheckAndCanonicalize(thread, &error_msg);
-      ASSERT(!enum_value.IsNull());
-      ASSERT(enum_value.IsCanonical());
-      field.SetStaticValue(enum_value, true);
-      field.RecordStore(enum_value);
-      intptr_t ord = Smi::Cast(ordinal_value).Value();
-      ASSERT(ord < values_list.Length());
-      values_list.SetAt(ord, enum_value);
-    }
-    values_list.MakeImmutable();
-    values_list ^= values_list.CheckAndCanonicalize(thread, &error_msg);
-    ASSERT(!values_list.IsNull());
   }
 }
 
@@ -1427,7 +1382,7 @@
   cls = class_table.At(kFfiPointerCid);
   error = cls.EnsureIsFinalized(thread);
   ASSERT(error.IsNull());
-  ASSERT(cls.NumOwnTypeArguments() == 1);
+  ASSERT(cls.NumTypeParameters() == 1);
   type_param ^= TypeParameter::RawCast(
       TypeArguments::Handle(cls.type_parameters()).TypeAt(0));
   ASSERT(Pointer::kNativeTypeArgPos == type_param.index());
diff --git a/runtime/vm/class_finalizer_test.cc b/runtime/vm/class_finalizer_test.cc
index a1440d2..7768c44 100644
--- a/runtime/vm/class_finalizer_test.cc
+++ b/runtime/vm/class_finalizer_test.cc
@@ -16,6 +16,7 @@
   const Class& cls = Class::Handle(Class::New(
       Library::Handle(), class_name, script, TokenPosition::kNoSource));
   cls.set_interfaces(Object::empty_array());
+  cls.set_is_declaration_loaded();
   cls.SetFunctions(Object::empty_array());
   cls.SetFields(Object::empty_array());
   return cls.raw();
diff --git a/runtime/vm/class_id.h b/runtime/vm/class_id.h
index 9acabba..f95d77f 100644
--- a/runtime/vm/class_id.h
+++ b/runtime/vm/class_id.h
@@ -78,7 +78,8 @@
   V(WeakProperty)                                                              \
   V(MirrorReference)                                                           \
   V(LinkedHashMap)                                                             \
-  V(UserTag)
+  V(UserTag)                                                                   \
+  V(TransferableTypedData)
 
 #define CLASS_LIST_ARRAYS(V)                                                   \
   V(Array)                                                                     \
diff --git a/runtime/vm/class_table.cc b/runtime/vm/class_table.cc
index 70ad37c..3d4ab6c 100644
--- a/runtime/vm/class_table.cc
+++ b/runtime/vm/class_table.cc
@@ -464,19 +464,14 @@
   }
 }
 
-intptr_t ClassTable::TableOffsetFor(intptr_t cid) {
-  return OFFSET_OF(ClassTable, class_heap_stats_table_);
-}
-
 intptr_t ClassTable::ClassOffsetFor(intptr_t cid) {
   return cid * sizeof(ClassHeapStats);  // NOLINT
 }
 
-intptr_t ClassTable::CounterOffsetFor(intptr_t cid, bool is_new_space) {
+intptr_t ClassTable::NewSpaceCounterOffsetFor(intptr_t cid) {
   const intptr_t class_offset = ClassOffsetFor(cid);
   const intptr_t count_field_offset =
-      is_new_space ? ClassHeapStats::allocated_since_gc_new_space_offset()
-                   : ClassHeapStats::allocated_since_gc_old_space_offset();
+      ClassHeapStats::allocated_since_gc_new_space_offset();
   return class_offset + count_field_offset;
 }
 
@@ -484,11 +479,10 @@
   return ClassOffsetFor(cid) + ClassHeapStats::state_offset();
 }
 
-intptr_t ClassTable::SizeOffsetFor(intptr_t cid, bool is_new_space) {
+intptr_t ClassTable::NewSpaceSizeOffsetFor(intptr_t cid) {
   const uword class_offset = ClassOffsetFor(cid);
   const uword size_field_offset =
-      is_new_space ? ClassHeapStats::allocated_size_since_gc_new_space_offset()
-                   : ClassHeapStats::allocated_size_since_gc_old_space_offset();
+      ClassHeapStats::allocated_size_since_gc_new_space_offset();
   return class_offset + size_field_offset;
 }
 
diff --git a/runtime/vm/class_table.h b/runtime/vm/class_table.h
index 3268bb7..c851ef9 100644
--- a/runtime/vm/class_table.h
+++ b/runtime/vm/class_table.h
@@ -301,16 +301,13 @@
   }
 
   // Used by the generated code.
-  static intptr_t TableOffsetFor(intptr_t cid);
-
-  // Used by the generated code.
-  static intptr_t CounterOffsetFor(intptr_t cid, bool is_new_space);
+  static intptr_t NewSpaceCounterOffsetFor(intptr_t cid);
 
   // Used by the generated code.
   static intptr_t StateOffsetFor(intptr_t cid);
 
   // Used by the generated code.
-  static intptr_t SizeOffsetFor(intptr_t cid, bool is_new_space);
+  static intptr_t NewSpaceSizeOffsetFor(intptr_t cid);
 
   ClassHeapStats* StatsWithUpdatedSize(intptr_t cid);
 
diff --git a/runtime/vm/clustered_snapshot.cc b/runtime/vm/clustered_snapshot.cc
index ae78790..a71b9cb 100644
--- a/runtime/vm/clustered_snapshot.cc
+++ b/runtime/vm/clustered_snapshot.cc
@@ -182,11 +182,10 @@
     s->Write<int32_t>(cls->ptr()->instance_size_in_words_);
     s->Write<int32_t>(cls->ptr()->next_field_offset_in_words_);
     s->Write<int32_t>(cls->ptr()->type_arguments_field_offset_in_words_);
-    s->Write<uint16_t>(cls->ptr()->num_type_arguments_);
-    s->Write<uint16_t>(cls->ptr()->has_pragma_and_num_own_type_arguments_);
+    s->Write<int16_t>(cls->ptr()->num_type_arguments_);
     s->Write<uint16_t>(cls->ptr()->num_native_fields_);
     s->WriteTokenPosition(cls->ptr()->token_pos_);
-    s->Write<uint16_t>(cls->ptr()->state_bits_);
+    s->Write<uint32_t>(cls->ptr()->state_bits_);
   }
 
  private:
@@ -244,11 +243,10 @@
         d->Read<int32_t>();  // Skip.
       }
       cls->ptr()->type_arguments_field_offset_in_words_ = d->Read<int32_t>();
-      cls->ptr()->num_type_arguments_ = d->Read<uint16_t>();
-      cls->ptr()->has_pragma_and_num_own_type_arguments_ = d->Read<uint16_t>();
+      cls->ptr()->num_type_arguments_ = d->Read<int16_t>();
       cls->ptr()->num_native_fields_ = d->Read<uint16_t>();
       cls->ptr()->token_pos_ = d->ReadTokenPosition();
-      cls->ptr()->state_bits_ = d->Read<uint16_t>();
+      cls->ptr()->state_bits_ = d->Read<uint32_t>();
     }
 
     for (intptr_t id = start_index_; id < stop_index_; id++) {
@@ -271,11 +269,10 @@
       cls->ptr()->instance_size_in_words_ = d->Read<int32_t>();
       cls->ptr()->next_field_offset_in_words_ = d->Read<int32_t>();
       cls->ptr()->type_arguments_field_offset_in_words_ = d->Read<int32_t>();
-      cls->ptr()->num_type_arguments_ = d->Read<uint16_t>();
-      cls->ptr()->has_pragma_and_num_own_type_arguments_ = d->Read<uint16_t>();
+      cls->ptr()->num_type_arguments_ = d->Read<int16_t>();
       cls->ptr()->num_native_fields_ = d->Read<uint16_t>();
       cls->ptr()->token_pos_ = d->ReadTokenPosition();
-      cls->ptr()->state_bits_ = d->Read<uint16_t>();
+      cls->ptr()->state_bits_ = d->Read<uint32_t>();
 
       table->AllocateIndex(class_id);
       table->SetAt(class_id, cls);
@@ -1818,7 +1815,8 @@
       s->TraceDataOffset(offset);
       ASSERT(Utils::IsAligned(offset, kObjectAlignment));
       ASSERT(offset > running_offset);
-      s->WriteUnsigned((offset - running_offset) >> kObjectAlignmentLog2);
+      s->WriteUnsigned((offset - running_offset) >>
+                       compiler::target::ObjectAlignment::kObjectAlignmentLog2);
       running_offset = offset;
       s->TraceEndWritingObject();
     }
diff --git a/runtime/vm/code_descriptors.cc b/runtime/vm/code_descriptors.cc
index 84d9882..7d1b764 100644
--- a/runtime/vm/code_descriptors.cc
+++ b/runtime/vm/code_descriptors.cc
@@ -19,7 +19,7 @@
 
   // When precompiling, we only use pc descriptors for exceptions.
   if (!FLAG_precompiled_mode || try_index != -1) {
-    intptr_t merged_kind_try =
+    int32_t merged_kind_try =
         RawPcDescriptors::MergedKindTry::Encode(kind, try_index);
 
     PcDescriptors::EncodeInteger(&encoded_data_, merged_kind_try);
diff --git a/runtime/vm/compiler/aot/aot_call_specializer.cc b/runtime/vm/compiler/aot/aot_call_specializer.cc
index 895d8a7..b3c2ea3 100644
--- a/runtime/vm/compiler/aot/aot_call_specializer.cc
+++ b/runtime/vm/compiler/aot/aot_call_specializer.cc
@@ -431,7 +431,7 @@
     return nullptr;  // non-smi mask
   }
   const int64_t modulus = Utils::Abs(value);
-  if (!Utils::IsPowerOfTwo(modulus) || !Smi::IsValid(modulus - 1)) {
+  if (!Utils::IsPowerOfTwo(modulus) || !compiler::target::IsSmi(modulus - 1)) {
     return nullptr;
   }
 
diff --git a/runtime/vm/compiler/asm_intrinsifier_arm.cc b/runtime/vm/compiler/asm_intrinsifier_arm.cc
index 2da017e..bb2cb37 100644
--- a/runtime/vm/compiler/asm_intrinsifier_arm.cc
+++ b/runtime/vm/compiler/asm_intrinsifier_arm.cc
@@ -430,7 +430,7 @@
   ASSERT(kSmiTagShift == 1);
   ASSERT(kSmiTag == 0);
   TestBothArgumentsSmis(assembler, normal_ir_body);
-  __ CompareImmediate(R0, target::ToRawSmi(target::Smi::kBits));
+  __ CompareImmediate(R0, target::ToRawSmi(target::kSmiBits));
   __ b(normal_ir_body, HI);
 
   __ SmiUntag(R0);
@@ -1450,7 +1450,7 @@
   __ ldr(R0, FieldAddress(R1, target::Double::value_offset()));
   __ ldr(R1, FieldAddress(R1, target::Double::value_offset() + 4));
   __ eor(R0, R0, Operand(R1));
-  __ AndImmediate(R0, R0, kSmiMax);
+  __ AndImmediate(R0, R0, target::kSmiMax);
   __ SmiTag(R0);
   __ Ret();
 
@@ -1495,7 +1495,7 @@
   // Receiver.
   __ ldr(R0, Address(SP, 0 * target::kWordSize));
   // Field '_state'.
-  __ ldr(R1, FieldAddress(R0, LookupFieldOffsetInBytes(state_field)));
+  __ ldr(R1, FieldAddress(R0, target::Field::OffsetOf(state_field)));
   // Addresses of _state[0] and _state[1].
 
   const int64_t disp_0 =
@@ -1608,8 +1608,7 @@
 
   __ Bind(&use_declaration_type);
   __ LoadClassById(R2, R1);  // Overwrites R1.
-  __ ldrh(R3, FieldAddress(
-                  R2, target::Class::num_type_arguments_offset_in_bytes()));
+  __ ldrh(R3, FieldAddress(R2, target::Class::num_type_arguments_offset()));
   __ CompareImmediate(R3, 0);
   __ b(normal_ir_body, NE);
 
@@ -1644,8 +1643,7 @@
   // Check if there are no type arguments. In this case we can return true.
   // Otherwise fall through into the runtime to handle comparison.
   __ LoadClassById(R3, R1);
-  __ ldrh(R3, FieldAddress(
-                  R3, target::Class::num_type_arguments_offset_in_bytes()));
+  __ ldrh(R3, FieldAddress(R3, target::Class::num_type_arguments_offset()));
   __ CompareImmediate(R3, 0);
   __ b(normal_ir_body, NE);
 
diff --git a/runtime/vm/compiler/asm_intrinsifier_arm64.cc b/runtime/vm/compiler/asm_intrinsifier_arm64.cc
index 6c63421..1551dfc 100644
--- a/runtime/vm/compiler/asm_intrinsifier_arm64.cc
+++ b/runtime/vm/compiler/asm_intrinsifier_arm64.cc
@@ -430,7 +430,7 @@
   const Register result = R0;
 
   TestBothArgumentsSmis(assembler, normal_ir_body);
-  __ CompareImmediate(right, target::ToRawSmi(target::Smi::kBits));
+  __ CompareImmediate(right, target::ToRawSmi(target::kSmiBits));
   __ b(normal_ir_body, CS);
 
   // Left is not a constant.
@@ -1520,7 +1520,7 @@
   __ Bind(&double_hash);
   __ fmovrd(R0, V0);
   __ eor(R0, R0, Operand(R0, LSR, 32));
-  __ AndImmediate(R0, R0, kSmiMax);
+  __ AndImmediate(R0, R0, target::kSmiMax);
   __ SmiTag(R0);
   __ ret();
 
@@ -1669,8 +1669,7 @@
 
   __ Bind(&use_declaration_type);
   __ LoadClassById(R2, R1);  // Overwrites R1.
-  __ ldr(R3,
-         FieldAddress(R2, target::Class::num_type_arguments_offset_in_bytes()),
+  __ ldr(R3, FieldAddress(R2, target::Class::num_type_arguments_offset()),
          kHalfword);
   __ CompareImmediate(R3, 0);
   __ b(normal_ir_body, NE);
@@ -1706,8 +1705,7 @@
   // Check if there are no type arguments. In this case we can return true.
   // Otherwise fall through into the runtime to handle comparison.
   __ LoadClassById(R3, R1);  // Overwrites R1.
-  __ ldr(R3,
-         FieldAddress(R3, target::Class::num_type_arguments_offset_in_bytes()),
+  __ ldr(R3, FieldAddress(R3, target::Class::num_type_arguments_offset()),
          kHalfword);
   __ CompareImmediate(R3, 0);
   __ b(normal_ir_body, NE);
diff --git a/runtime/vm/compiler/asm_intrinsifier_ia32.cc b/runtime/vm/compiler/asm_intrinsifier_ia32.cc
index c035d55..690df69 100644
--- a/runtime/vm/compiler/asm_intrinsifier_ia32.cc
+++ b/runtime/vm/compiler/asm_intrinsifier_ia32.cc
@@ -440,7 +440,7 @@
   Label overflow;
   TestBothArgumentsSmis(assembler, normal_ir_body);
   // Shift value is in EAX. Compare with tagged Smi.
-  __ cmpl(EAX, Immediate(target::ToRawSmi(target::Smi::kBits)));
+  __ cmpl(EAX, Immediate(target::ToRawSmi(target::kSmiBits)));
   __ j(ABOVE_EQUAL, normal_ir_body, Assembler::kNearJump);
 
   __ SmiUntag(EAX);
@@ -1553,7 +1553,7 @@
   __ movl(EAX, FieldAddress(ECX, target::Double::value_offset()));
   __ movl(ECX, FieldAddress(ECX, target::Double::value_offset() + 4));
   __ xorl(EAX, ECX);
-  __ andl(EAX, Immediate(kSmiMax));
+  __ andl(EAX, Immediate(target::kSmiMax));
   __ SmiTag(EAX);
   __ ret();
 
@@ -1711,8 +1711,7 @@
   // Object is neither double, nor integer, nor string.
   __ Bind(&use_declaration_type);
   __ LoadClassById(EBX, EDI);
-  __ movzxw(EDI, FieldAddress(
-                     EBX, target::Class::num_type_arguments_offset_in_bytes()));
+  __ movzxw(EDI, FieldAddress(EBX, target::Class::num_type_arguments_offset()));
   __ cmpl(EDI, Immediate(0));
   __ j(NOT_EQUAL, normal_ir_body, Assembler::kNearJump);
   __ movl(EAX, FieldAddress(EBX, target::Class::declaration_type_offset()));
@@ -1747,8 +1746,7 @@
   // Check if there are no type arguments. In this case we can return true.
   // Otherwise fall through into the runtime to handle comparison.
   __ LoadClassById(EBX, EDI);
-  __ movzxw(EBX, FieldAddress(
-                     EBX, target::Class::num_type_arguments_offset_in_bytes()));
+  __ movzxw(EBX, FieldAddress(EBX, target::Class::num_type_arguments_offset()));
   __ cmpl(EBX, Immediate(0));
   __ j(NOT_EQUAL, normal_ir_body, Assembler::kNearJump);
 
diff --git a/runtime/vm/compiler/asm_intrinsifier_x64.cc b/runtime/vm/compiler/asm_intrinsifier_x64.cc
index 76618bc..d210d67 100644
--- a/runtime/vm/compiler/asm_intrinsifier_x64.cc
+++ b/runtime/vm/compiler/asm_intrinsifier_x64.cc
@@ -494,7 +494,7 @@
   Label overflow;
   TestBothArgumentsSmis(assembler, normal_ir_body);
   // Shift value is in RAX. Compare with tagged Smi.
-  __ cmpq(RAX, Immediate(target::ToRawSmi(target::Smi::kBits)));
+  __ cmpq(RAX, Immediate(target::ToRawSmi(target::kSmiBits)));
   __ j(ABOVE_EQUAL, normal_ir_body, Assembler::kNearJump);
 
   __ SmiUntag(RAX);
@@ -1465,7 +1465,7 @@
   __ movq(RCX, RAX);
   __ shrq(RCX, Immediate(32));
   __ xorq(RAX, RCX);
-  __ andq(RAX, Immediate(kSmiMax));
+  __ andq(RAX, Immediate(target::kSmiMax));
   __ SmiTag(RAX);
   __ ret();
 
@@ -1623,8 +1623,7 @@
   // Object is neither double, nor integer, nor string.
   __ Bind(&use_declaration_type);
   __ LoadClassById(RDI, RCX);
-  __ movzxw(RCX, FieldAddress(
-                     RDI, target::Class::num_type_arguments_offset_in_bytes()));
+  __ movzxw(RCX, FieldAddress(RDI, target::Class::num_type_arguments_offset()));
   __ cmpq(RCX, Immediate(0));
   __ j(NOT_EQUAL, normal_ir_body, Assembler::kNearJump);
   __ movq(RAX, FieldAddress(RDI, target::Class::declaration_type_offset()));
@@ -1659,8 +1658,7 @@
   // Check if there are no type arguments. In this case we can return true.
   // Otherwise fall through into the runtime to handle comparison.
   __ LoadClassById(RDI, RCX);
-  __ movzxw(RCX, FieldAddress(
-                     RDI, target::Class::num_type_arguments_offset_in_bytes()));
+  __ movzxw(RCX, FieldAddress(RDI, target::Class::num_type_arguments_offset()));
   __ cmpq(RCX, Immediate(0));
   __ j(NOT_EQUAL, normal_ir_body, Assembler::kNearJump);
 
diff --git a/runtime/vm/compiler/assembler/assembler_arm.cc b/runtime/vm/compiler/assembler/assembler_arm.cc
index dbfc95e..fa570c5 100644
--- a/runtime/vm/compiler/assembler/assembler_arm.cc
+++ b/runtime/vm/compiler/assembler/assembler_arm.cc
@@ -24,6 +24,7 @@
 DECLARE_FLAG(bool, check_code_pointer);
 DECLARE_FLAG(bool, inline_alloc);
 DECLARE_FLAG(bool, precompiled_mode);
+DECLARE_FLAG(bool, use_slow_path);
 
 namespace compiler {
 
@@ -560,7 +561,7 @@
   LoadImmediate(state, compiler::target::Thread::native_execution_state());
   StoreToOffset(kWord, state, THR, Thread::execution_state_offset());
 
-  if (TargetCPUFeatures::arm_version() == ARMv5TE) {
+  if (FLAG_use_slow_path || TargetCPUFeatures::arm_version() == ARMv5TE) {
     EnterSafepointSlowly();
   } else {
     Label slow_path, done, retry;
@@ -592,7 +593,7 @@
 }
 
 void Assembler::TransitionNativeToGenerated(Register addr, Register state) {
-  if (TargetCPUFeatures::arm_version() == ARMv5TE) {
+  if (FLAG_use_slow_path || TargetCPUFeatures::arm_version() == ARMv5TE) {
     ExitSafepointSlowly();
   } else {
     Label slow_path, done, retry;
@@ -1389,7 +1390,9 @@
       code = 4 | (idx << 3);
       break;
     }
-    default: { break; }
+    default: {
+      break;
+    }
   }
 
   EmitSIMDddd(B24 | B23 | B11 | B10 | B6, kWordPair,
@@ -1599,9 +1602,9 @@
   } else if (CanLoadFromObjectPool(object)) {
     // Make sure that class CallPattern is able to decode this load from the
     // object pool.
-    const int32_t offset = ObjectPool::element_offset(
-        is_unique ? object_pool_builder().AddObject(object)
-                  : object_pool_builder().FindObject(object));
+    const auto index = is_unique ? object_pool_builder().AddObject(object)
+                                 : object_pool_builder().FindObject(object);
+    const int32_t offset = ObjectPool::element_offset(index);
     LoadWordFromPoolOffset(rd, offset - kHeapObjectTag, pp, cond);
   } else {
     UNREACHABLE();
@@ -3430,8 +3433,8 @@
   ASSERT(cid > 0);
   const intptr_t class_offset = ClassTable::ClassOffsetFor(cid);
   LoadIsolate(dest);
-  intptr_t table_offset =
-      Isolate::class_table_offset() + ClassTable::TableOffsetFor(cid);
+  intptr_t table_offset = Isolate::class_table_offset() +
+                          ClassTable::class_heap_stats_table_offset();
   ldr(dest, Address(dest, table_offset));
   AddImmediate(dest, class_offset);
 }
diff --git a/runtime/vm/compiler/assembler/assembler_arm64.cc b/runtime/vm/compiler/assembler/assembler_arm64.cc
index d56909a..5c1b902 100644
--- a/runtime/vm/compiler/assembler/assembler_arm64.cc
+++ b/runtime/vm/compiler/assembler/assembler_arm64.cc
@@ -18,6 +18,7 @@
 DECLARE_FLAG(bool, check_code_pointer);
 DECLARE_FLAG(bool, inline_alloc);
 DECLARE_FLAG(bool, precompiled_mode);
+DECLARE_FLAG(bool, use_slow_path);
 
 DEFINE_FLAG(bool, use_far_branches, false, "Always use far branches");
 
@@ -1312,12 +1313,13 @@
 }
 
 void Assembler::TransitionGeneratedToNative(Register destination,
-                                            Register new_exit_rame,
+                                            Register new_exit_frame,
                                             Register state) {
   Register addr = TMP2;
+  ASSERT(addr != state);
 
   // Save exit frame information to enable stack walking.
-  StoreToOffset(new_exit_rame, THR,
+  StoreToOffset(new_exit_frame, THR,
                 compiler::target::Thread::top_exit_frame_info_offset());
 
   // Mark that the thread is executing native code.
@@ -1326,17 +1328,20 @@
   StoreToOffset(state, THR, compiler::target::Thread::execution_state_offset());
 
   Label slow_path, done, retry;
-  movz(addr, Immediate(compiler::target::Thread::safepoint_state_offset()), 0);
-  add(addr, THR, Operand(addr));
-  Bind(&retry);
-  ldxr(state, addr);
-  cmp(state, Operand(Thread::safepoint_state_unacquired()));
-  b(&slow_path, NE);
+  if (!FLAG_use_slow_path) {
+    movz(addr, Immediate(compiler::target::Thread::safepoint_state_offset()),
+         0);
+    add(addr, THR, Operand(addr));
+    Bind(&retry);
+    ldxr(state, addr);
+    cmp(state, Operand(Thread::safepoint_state_unacquired()));
+    b(&slow_path, NE);
 
-  movz(state, Immediate(Thread::safepoint_state_acquired()), 0);
-  stxr(TMP, state, addr);
-  cbz(&done, TMP);  // 0 means stxr was successful.
-  b(&retry);
+    movz(state, Immediate(Thread::safepoint_state_acquired()), 0);
+    stxr(TMP, state, addr);
+    cbz(&done, TMP);  // 0 means stxr was successful.
+    b(&retry);
+  }
 
   Bind(&slow_path);
   ldr(addr,
@@ -1349,24 +1354,28 @@
 
 void Assembler::TransitionNativeToGenerated(Register state) {
   Register addr = TMP2;
+  ASSERT(addr != state);
 
   Label slow_path, done, retry;
-  movz(addr, Immediate(compiler::target::Thread::safepoint_state_offset()), 0);
-  add(addr, THR, Operand(addr));
-  Bind(&retry);
-  ldxr(state, addr);
-  cmp(state, Operand(Thread::safepoint_state_acquired()));
-  b(&slow_path, NE);
+  if (!FLAG_use_slow_path) {
+    movz(addr, Immediate(compiler::target::Thread::safepoint_state_offset()),
+         0);
+    add(addr, THR, Operand(addr));
+    Bind(&retry);
+    ldxr(state, addr);
+    cmp(state, Operand(Thread::safepoint_state_acquired()));
+    b(&slow_path, NE);
 
-  movz(state, Immediate(Thread::safepoint_state_unacquired()), 0);
-  stxr(TMP, state, addr);
-  cbz(&done, TMP);  // 0 means stxr was successful.
-  b(&retry);
+    movz(state, Immediate(Thread::safepoint_state_unacquired()), 0);
+    stxr(TMP, state, addr);
+    cbz(&done, TMP);  // 0 means stxr was successful.
+    b(&retry);
+  }
 
   Bind(&slow_path);
   ldr(addr,
       Address(THR, compiler::target::Thread::exit_safepoint_stub_offset()));
-  ldr(addr, FieldAddress(TMP, compiler::target::Code::entry_point_offset()));
+  ldr(addr, FieldAddress(addr, compiler::target::Code::entry_point_offset()));
   blr(addr);
 
   Bind(&done);
@@ -1486,8 +1495,8 @@
   ASSERT(cid > 0);
   intptr_t state_offset = ClassTable::StateOffsetFor(cid);
   LoadIsolate(temp_reg);
-  intptr_t table_offset =
-      Isolate::class_table_offset() + ClassTable::TableOffsetFor(cid);
+  intptr_t table_offset = Isolate::class_table_offset() +
+                          ClassTable::class_heap_stats_table_offset();
   ldr(temp_reg, Address(temp_reg, table_offset));
   AddImmediate(temp_reg, state_offset);
   ldr(temp_reg, Address(temp_reg, 0));
@@ -1497,10 +1506,10 @@
 
 void Assembler::UpdateAllocationStats(intptr_t cid) {
   ASSERT(cid > 0);
-  intptr_t counter_offset = ClassTable::CounterOffsetFor(cid, /*is_new=*/true);
+  intptr_t counter_offset = target::ClassTable::NewSpaceCounterOffsetFor(cid);
   LoadIsolate(TMP2);
-  intptr_t table_offset =
-      Isolate::class_table_offset() + ClassTable::TableOffsetFor(cid);
+  intptr_t table_offset = Isolate::class_table_offset() +
+                          ClassTable::class_heap_stats_table_offset();
   ldr(TMP, Address(TMP2, table_offset));
   AddImmediate(TMP2, TMP, counter_offset);
   ldr(TMP, Address(TMP2, 0));
@@ -1516,8 +1525,8 @@
   const uword size_field_offset =
       ClassHeapStats::allocated_size_since_gc_new_space_offset();
   LoadIsolate(TMP2);
-  intptr_t table_offset =
-      Isolate::class_table_offset() + ClassTable::TableOffsetFor(cid);
+  intptr_t table_offset = Isolate::class_table_offset() +
+                          ClassTable::class_heap_stats_table_offset();
   ldr(TMP, Address(TMP2, table_offset));
   AddImmediate(TMP2, TMP, class_offset);
   ldr(TMP, Address(TMP2, count_field_offset));
diff --git a/runtime/vm/compiler/assembler/assembler_ia32.cc b/runtime/vm/compiler/assembler/assembler_ia32.cc
index a451572..7311298 100644
--- a/runtime/vm/compiler/assembler/assembler_ia32.cc
+++ b/runtime/vm/compiler/assembler/assembler_ia32.cc
@@ -16,6 +16,7 @@
 
 #if !defined(DART_PRECOMPILED_RUNTIME)
 DECLARE_FLAG(bool, inline_alloc);
+DECLARE_FLAG(bool, use_slow_path);
 #endif
 
 namespace compiler {
@@ -2109,16 +2110,17 @@
 
   // Compare and swap the value at Thread::safepoint_state from unacquired to
   // acquired. On success, jump to 'success'; otherwise, fallthrough.
-  pushl(EAX);
-  movl(EAX, Immediate(Thread::safepoint_state_unacquired()));
-  movl(scratch, Immediate(Thread::safepoint_state_acquired()));
-  LockCmpxchgl(Address(THR, Thread::safepoint_state_offset()), scratch);
-  movl(scratch, EAX);
-  popl(EAX);
-  cmpl(scratch, Immediate(Thread::safepoint_state_unacquired()));
-
   Label done;
-  j(EQUAL, &done);
+  if (!FLAG_use_slow_path) {
+    pushl(EAX);
+    movl(EAX, Immediate(Thread::safepoint_state_unacquired()));
+    movl(scratch, Immediate(Thread::safepoint_state_acquired()));
+    LockCmpxchgl(Address(THR, Thread::safepoint_state_offset()), scratch);
+    movl(scratch, EAX);
+    popl(EAX);
+    cmpl(scratch, Immediate(Thread::safepoint_state_unacquired()));
+    j(EQUAL, &done);
+  }
 
   movl(scratch,
        Address(THR, compiler::target::Thread::enter_safepoint_stub_offset()));
@@ -2132,18 +2134,20 @@
 void Assembler::TransitionNativeToGenerated(Register scratch) {
   // Compare and swap the value at Thread::safepoint_state from acquired to
   // unacquired. On success, jump to 'success'; otherwise, fallthrough.
-  pushl(EAX);
-  movl(EAX, Immediate(compiler::target::Thread::safepoint_state_acquired()));
-  movl(scratch,
-       Immediate(compiler::target::Thread::safepoint_state_unacquired()));
-  LockCmpxchgl(Address(THR, compiler::target::Thread::safepoint_state_offset()),
-               scratch);
-  movl(scratch, EAX);
-  popl(EAX);
-  cmpl(scratch, Immediate(Thread::safepoint_state_acquired()));
-
   Label done;
-  j(EQUAL, &done);
+  if (!FLAG_use_slow_path) {
+    pushl(EAX);
+    movl(EAX, Immediate(compiler::target::Thread::safepoint_state_acquired()));
+    movl(scratch,
+         Immediate(compiler::target::Thread::safepoint_state_unacquired()));
+    LockCmpxchgl(
+        Address(THR, compiler::target::Thread::safepoint_state_offset()),
+        scratch);
+    movl(scratch, EAX);
+    popl(EAX);
+    cmpl(scratch, Immediate(Thread::safepoint_state_acquired()));
+    j(EQUAL, &done);
+  }
 
   movl(scratch,
        Address(THR, compiler::target::Thread::exit_safepoint_stub_offset()));
@@ -2296,8 +2300,8 @@
   intptr_t state_offset = ClassTable::StateOffsetFor(cid);
   ASSERT(temp_reg != kNoRegister);
   LoadIsolate(temp_reg);
-  intptr_t table_offset =
-      Isolate::class_table_offset() + ClassTable::TableOffsetFor(cid);
+  intptr_t table_offset = Isolate::class_table_offset() +
+                          ClassTable::class_heap_stats_table_offset();
   movl(temp_reg, Address(temp_reg, table_offset));
   state_address = Address(temp_reg, state_offset);
   testb(state_address,
@@ -2309,12 +2313,11 @@
 
 void Assembler::UpdateAllocationStats(intptr_t cid, Register temp_reg) {
   ASSERT(cid > 0);
-  intptr_t counter_offset =
-      ClassTable::CounterOffsetFor(cid, /*is_new_space=*/true);
+  intptr_t counter_offset = ClassTable::NewSpaceCounterOffsetFor(cid);
   ASSERT(temp_reg != kNoRegister);
   LoadIsolate(temp_reg);
-  intptr_t table_offset =
-      Isolate::class_table_offset() + ClassTable::TableOffsetFor(cid);
+  intptr_t table_offset = Isolate::class_table_offset() +
+                          ClassTable::class_heap_stats_table_offset();
   movl(temp_reg, Address(temp_reg, table_offset));
   incl(Address(temp_reg, counter_offset));
 }
@@ -2325,7 +2328,7 @@
   ASSERT(cid > 0);
   ASSERT(cid < kNumPredefinedCids);
   UpdateAllocationStats(cid, temp_reg);
-  intptr_t size_offset = ClassTable::SizeOffsetFor(cid, /*is_new_space=*/true);
+  intptr_t size_offset = ClassTable::NewSpaceSizeOffsetFor(cid);
   addl(Address(temp_reg, size_offset), size_reg);
 }
 
@@ -2335,7 +2338,7 @@
   ASSERT(cid > 0);
   ASSERT(cid < kNumPredefinedCids);
   UpdateAllocationStats(cid, temp_reg);
-  intptr_t size_offset = ClassTable::SizeOffsetFor(cid, /*is_new_space=*/true);
+  intptr_t size_offset = ClassTable::NewSpaceSizeOffsetFor(cid);
   addl(Address(temp_reg, size_offset), Immediate(size_in_bytes));
 }
 #endif  // !PRODUCT
diff --git a/runtime/vm/compiler/assembler/assembler_x64.cc b/runtime/vm/compiler/assembler/assembler_x64.cc
index f9e725b..1a6596e 100644
--- a/runtime/vm/compiler/assembler/assembler_x64.cc
+++ b/runtime/vm/compiler/assembler/assembler_x64.cc
@@ -18,6 +18,7 @@
 DECLARE_FLAG(bool, check_code_pointer);
 DECLARE_FLAG(bool, inline_alloc);
 DECLARE_FLAG(bool, precompiled_mode);
+DECLARE_FLAG(bool, use_slow_path);
 #endif
 
 namespace compiler {
@@ -176,19 +177,23 @@
   // Compare and swap the value at Thread::safepoint_state from unacquired to
   // acquired. If the CAS fails, go to a slow-path stub.
   Label done;
-  pushq(RAX);
-  movq(RAX, Immediate(Thread::safepoint_state_unacquired()));
-  movq(TMP, Immediate(Thread::safepoint_state_acquired()));
-  LockCmpxchgq(Address(THR, Thread::safepoint_state_offset()), TMP);
-  movq(TMP, RAX);
-  popq(RAX);
-  cmpq(TMP, Immediate(Thread::safepoint_state_unacquired()));
-  j(EQUAL, &done);
+  if (!FLAG_use_slow_path) {
+    pushq(RAX);
+    movq(RAX, Immediate(Thread::safepoint_state_unacquired()));
+    movq(TMP, Immediate(Thread::safepoint_state_acquired()));
+    LockCmpxchgq(Address(THR, Thread::safepoint_state_offset()), TMP);
+    movq(TMP, RAX);
+    popq(RAX);
+    cmpq(TMP, Immediate(Thread::safepoint_state_unacquired()));
+    j(EQUAL, &done);
+  }
 
   movq(TMP,
        Address(THR, compiler::target::Thread::enter_safepoint_stub_offset()));
   movq(TMP, FieldAddress(TMP, compiler::target::Code::entry_point_offset()));
-  CallCFunction(TMP);
+  // Use call instead of CFunctionCall to prevent having to clean up shadow
+  // space afterwards. This is possible because safepoint stub has no arguments.
+  call(TMP);
 
   Bind(&done);
 }
@@ -197,19 +202,23 @@
   // Compare and swap the value at Thread::safepoint_state from acquired to
   // unacquired. On success, jump to 'success'; otherwise, fallthrough.
   Label done;
-  pushq(RAX);
-  movq(RAX, Immediate(Thread::safepoint_state_acquired()));
-  movq(TMP, Immediate(Thread::safepoint_state_unacquired()));
-  LockCmpxchgq(Address(THR, Thread::safepoint_state_offset()), TMP);
-  movq(TMP, RAX);
-  popq(RAX);
-  cmpq(TMP, Immediate(Thread::safepoint_state_acquired()));
-  j(EQUAL, &done);
+  if (!FLAG_use_slow_path) {
+    pushq(RAX);
+    movq(RAX, Immediate(Thread::safepoint_state_acquired()));
+    movq(TMP, Immediate(Thread::safepoint_state_unacquired()));
+    LockCmpxchgq(Address(THR, Thread::safepoint_state_offset()), TMP);
+    movq(TMP, RAX);
+    popq(RAX);
+    cmpq(TMP, Immediate(Thread::safepoint_state_acquired()));
+    j(EQUAL, &done);
+  }
 
   movq(TMP,
        Address(THR, compiler::target::Thread::exit_safepoint_stub_offset()));
   movq(TMP, FieldAddress(TMP, compiler::target::Code::entry_point_offset()));
-  CallCFunction(TMP);
+  // Use call instead of CFunctionCall to prevent having to clean up shadow
+  // space afterwards. This is possible because safepoint stub has no arguments.
+  call(TMP);
 
   Bind(&done);
 
@@ -1182,7 +1191,7 @@
                                  bool is_unique) {
   ASSERT(IsOriginalObject(object));
 
-  target::word offset_from_thread;
+  intptr_t offset_from_thread;
   if (target::CanLoadFromThread(object, &offset_from_thread)) {
     movq(dst, Address(THR, offset_from_thread));
   } else if (CanLoadFromObjectPool(object)) {
@@ -1207,7 +1216,7 @@
 void Assembler::StoreObject(const Address& dst, const Object& object) {
   ASSERT(IsOriginalObject(object));
 
-  target::word offset_from_thread;
+  intptr_t offset_from_thread;
   if (target::CanLoadFromThread(object, &offset_from_thread)) {
     movq(TMP, Address(THR, offset_from_thread));
     movq(dst, TMP);
@@ -1223,7 +1232,7 @@
 void Assembler::PushObject(const Object& object) {
   ASSERT(IsOriginalObject(object));
 
-  target::word offset_from_thread;
+  intptr_t offset_from_thread;
   if (target::CanLoadFromThread(object, &offset_from_thread)) {
     pushq(Address(THR, offset_from_thread));
   } else if (CanLoadFromObjectPool(object)) {
@@ -1238,7 +1247,7 @@
 void Assembler::CompareObject(Register reg, const Object& object) {
   ASSERT(IsOriginalObject(object));
 
-  target::word offset_from_thread;
+  intptr_t offset_from_thread;
   if (target::CanLoadFromThread(object, &offset_from_thread)) {
     cmpq(reg, Address(THR, offset_from_thread));
   } else if (CanLoadFromObjectPool(object)) {
@@ -1777,8 +1786,8 @@
   intptr_t state_offset = ClassTable::StateOffsetFor(cid);
   Register temp_reg = TMP;
   LoadIsolate(temp_reg);
-  intptr_t table_offset =
-      Isolate::class_table_offset() + ClassTable::TableOffsetFor(cid);
+  intptr_t table_offset = Isolate::class_table_offset() +
+                          ClassTable::class_heap_stats_table_offset();
   movq(temp_reg, Address(temp_reg, table_offset));
   testb(Address(temp_reg, state_offset),
         Immediate(target::ClassHeapStats::TraceAllocationMask()));
@@ -1789,12 +1798,11 @@
 
 void Assembler::UpdateAllocationStats(intptr_t cid) {
   ASSERT(cid > 0);
-  intptr_t counter_offset =
-      ClassTable::CounterOffsetFor(cid, /*is_new_space=*/true);
+  intptr_t counter_offset = ClassTable::NewSpaceCounterOffsetFor(cid);
   Register temp_reg = TMP;
   LoadIsolate(temp_reg);
-  intptr_t table_offset =
-      Isolate::class_table_offset() + ClassTable::TableOffsetFor(cid);
+  intptr_t table_offset = Isolate::class_table_offset() +
+                          ClassTable::class_heap_stats_table_offset();
   movq(temp_reg, Address(temp_reg, table_offset));
   incq(Address(temp_reg, counter_offset));
 }
@@ -1804,7 +1812,7 @@
   ASSERT(cid < kNumPredefinedCids);
   UpdateAllocationStats(cid);
   Register temp_reg = TMP;
-  intptr_t size_offset = ClassTable::SizeOffsetFor(cid, /*is_new_space=*/true);
+  intptr_t size_offset = ClassTable::NewSpaceSizeOffsetFor(cid);
   addq(Address(temp_reg, size_offset), size_reg);
 }
 
@@ -1814,7 +1822,7 @@
   ASSERT(cid < kNumPredefinedCids);
   UpdateAllocationStats(cid);
   Register temp_reg = TMP;
-  intptr_t size_offset = ClassTable::SizeOffsetFor(cid, /*is_new_space=*/true);
+  intptr_t size_offset = ClassTable::NewSpaceSizeOffsetFor(cid);
   addq(Address(temp_reg, size_offset), Immediate(size_in_bytes));
 }
 #endif  // !PRODUCT
diff --git a/runtime/vm/compiler/backend/flow_graph_checker.cc b/runtime/vm/compiler/backend/flow_graph_checker.cc
index 8502f63..4660d82 100644
--- a/runtime/vm/compiler/backend/flow_graph_checker.cc
+++ b/runtime/vm/compiler/backend/flow_graph_checker.cc
@@ -340,8 +340,8 @@
   const Object& value = constant->value();
   if (value.IsSmi()) {
     const int64_t smi_value = Integer::Cast(value).AsInt64Value();
-    ASSERT(kSmiMin <= smi_value);
-    ASSERT(smi_value <= kSmiMax);
+    ASSERT(compiler::target::kSmiMin <= smi_value);
+    ASSERT(smi_value <= compiler::target::kSmiMax);
   }
   // Any constant involved in SSA should appear in the entry (making it more
   // likely it was inserted by the utility that avoids duplication).
diff --git a/runtime/vm/compiler/backend/flow_graph_compiler.cc b/runtime/vm/compiler/backend/flow_graph_compiler.cc
index eee9a38..cd2a8db 100644
--- a/runtime/vm/compiler/backend/flow_graph_compiler.cc
+++ b/runtime/vm/compiler/backend/flow_graph_compiler.cc
@@ -824,7 +824,8 @@
 
     RegisterSet* registers = locs->live_registers();
     ASSERT(registers != NULL);
-    const intptr_t kFpuRegisterSpillFactor = kFpuRegisterSize / kWordSize;
+    const intptr_t kFpuRegisterSpillFactor =
+        kFpuRegisterSize / compiler::target::kWordSize;
     intptr_t saved_registers_size = 0;
     const bool using_shared_stub = locs->call_on_shared_slow_path();
     if (using_shared_stub) {
@@ -965,7 +966,8 @@
   RegisterSet* regs = instruction->locs()->live_registers();
   intptr_t fpu_reg_slots[kNumberOfFpuRegisters];
   intptr_t cpu_reg_slots[kNumberOfCpuRegisters];
-  const intptr_t kFpuRegisterSpillFactor = kFpuRegisterSize / kWordSize;
+  const intptr_t kFpuRegisterSpillFactor =
+      kFpuRegisterSize / compiler::target::kWordSize;
   // FPU registers are spilled first from highest to lowest register number.
   for (intptr_t i = kNumberOfFpuRegisters - 1; i >= 0; --i) {
     FpuRegister reg = static_cast<FpuRegister>(i);
@@ -1234,7 +1236,7 @@
         if (field.is_instance() &&
             (FLAG_precompiled_mode || !IsPotentialUnboxedField(field))) {
           SpecialStatsBegin(CombinedCodeStatistics::kTagIntrinsics);
-          GenerateGetterIntrinsic(field.Offset());
+          GenerateGetterIntrinsic(compiler::target::Field::OffsetOf(field));
           SpecialStatsEnd(CombinedCodeStatistics::kTagIntrinsics);
           return !isolate()->use_field_guards();
         }
@@ -1253,7 +1255,7 @@
           if (field.is_instance() &&
               (FLAG_precompiled_mode || field.guarded_cid() == kDynamicCid)) {
             SpecialStatsBegin(CombinedCodeStatistics::kTagIntrinsics);
-            GenerateSetterIntrinsic(field.Offset());
+            GenerateSetterIntrinsic(compiler::target::Field::OffsetOf(field));
             SpecialStatsEnd(CombinedCodeStatistics::kTagIntrinsics);
             return !isolate()->use_field_guards();
           }
@@ -1267,8 +1269,9 @@
             parsed_function().function().extracted_method_closure());
         auto& klass = Class::Handle(extracted_method.Owner());
         const intptr_t type_arguments_field_offset =
-            klass.NumTypeArguments() > 0
-                ? (klass.type_arguments_field_offset() - kHeapObjectTag)
+            compiler::target::Class::HasTypeArgumentsField(klass)
+                ? (compiler::target::Class::TypeArgumentsFieldOffset(klass) -
+                   kHeapObjectTag)
                 : 0;
 
         SpecialStatsBegin(CombinedCodeStatistics::kTagIntrinsics);
@@ -2308,8 +2311,9 @@
     __ CompareObject(kTypeArgumentsReg, Object::null_object());
     __ BranchIf(EQUAL, done);
     __ LoadField(dst_type_reg,
-                 FieldAddress(kTypeArgumentsReg, TypeArguments::type_at_offset(
-                                                     type_param.index())));
+                 FieldAddress(kTypeArgumentsReg,
+                              compiler::target::TypeArguments::type_at_offset(
+                                  type_param.index())));
     if (type_usage_info != NULL) {
       type_usage_info->UseTypeInAssertAssignable(dst_type);
     }
diff --git a/runtime/vm/compiler/backend/flow_graph_compiler_arm.cc b/runtime/vm/compiler/backend/flow_graph_compiler_arm.cc
index 598cc1c..9018e54 100644
--- a/runtime/vm/compiler/backend/flow_graph_compiler_arm.cc
+++ b/runtime/vm/compiler/backend/flow_graph_compiler_arm.cc
@@ -196,7 +196,7 @@
   }
 
   ASSERT(deopt_env() != NULL);
-  __ ldr(LR, Address(THR, Thread::deoptimize_entry_offset()));
+  __ ldr(LR, Address(THR, compiler::target::Thread::deoptimize_entry_offset()));
   __ blx(LR);
   ASSERT(kReservedCpuRegisters & (1 << LR));
   set_pc_offset(assembler->CodeSize());
@@ -431,8 +431,8 @@
   __ LoadClassById(R1, R2);
   // R1: instance class.
   // Check immediate superclass equality.
-  __ ldr(R2, FieldAddress(R1, Class::super_type_offset()));
-  __ ldr(R2, FieldAddress(R2, Type::type_class_id_offset()));
+  __ ldr(R2, FieldAddress(R1, compiler::target::Class::super_type_offset()));
+  __ ldr(R2, FieldAddress(R2, compiler::target::Type::type_class_id_offset()));
   __ CompareImmediate(R2, Smi::RawValue(type_class.id()));
   __ b(is_instance_lbl, EQ);
 
@@ -475,7 +475,8 @@
     __ CompareObject(kTypeArgumentsReg, Object::null_object());
     __ b(is_instance_lbl, EQ);
     __ ldr(R3, FieldAddress(kTypeArgumentsReg,
-                            TypeArguments::type_at_offset(type_param.index())));
+                            compiler::target::TypeArguments::type_at_offset(
+                                type_param.index())));
     // R3: concrete type of type.
     // Check if type argument is dynamic, Object, or void.
     __ CompareObject(R3, Object::dynamic_type());
@@ -772,15 +773,18 @@
   const intptr_t sub_type_cache_index = __ object_pool_builder().AddObject(
       Object::null_object(), ObjectPool::Patchability::kPatchable);
   const intptr_t sub_type_cache_offset =
-      ObjectPool::element_offset(sub_type_cache_index) - kHeapObjectTag;
+      compiler::target::ObjectPool::element_offset(sub_type_cache_index) -
+      kHeapObjectTag;
   const intptr_t dst_name_index = __ object_pool_builder().AddObject(
       dst_name, ObjectPool::Patchability::kPatchable);
   ASSERT((sub_type_cache_index + 1) == dst_name_index);
   ASSERT(__ constant_pool_allowed());
 
-  __ LoadField(R9,
-               FieldAddress(kDstTypeReg,
-                            AbstractType::type_test_stub_entry_point_offset()));
+  __ LoadField(
+      R9,
+      FieldAddress(
+          kDstTypeReg,
+          compiler::target::AbstractType::type_test_stub_entry_point_offset()));
   __ LoadWordFromPoolOffset(kSubtypeTestCacheReg, sub_type_cache_offset, PP,
                             AL);
   __ blx(R9);
@@ -822,15 +826,17 @@
     kPoolReg = PP;
   } else {
     __ LoadFieldFromOffset(kWord, kPoolReg, CODE_REG,
-                           Code::object_pool_offset());
+                           compiler::target::Code::object_pool_offset());
   }
   __ LoadImmediate(R4, type_arguments_field_offset);
-  __ LoadFieldFromOffset(kWord, R1, kPoolReg,
-                         ObjectPool::element_offset(function_index));
-  __ LoadFieldFromOffset(kWord, CODE_REG, kPoolReg,
-                         ObjectPool::element_offset(stub_index));
-  __ Branch(FieldAddress(
-      CODE_REG, Code::entry_point_offset(Code::EntryKind::kUnchecked)));
+  __ LoadFieldFromOffset(
+      kWord, R1, kPoolReg,
+      compiler::target::ObjectPool::element_offset(function_index));
+  __ LoadFieldFromOffset(
+      kWord, CODE_REG, kPoolReg,
+      compiler::target::ObjectPool::element_offset(stub_index));
+  __ Branch(FieldAddress(CODE_REG, compiler::target::Code::entry_point_offset(
+                                       Code::EntryKind::kUnchecked)));
 }
 
 void FlowGraphCompiler::GenerateGetterIntrinsic(intptr_t offset) {
@@ -838,7 +844,7 @@
   // SP: receiver.
   // Sequence node has one return node, its input is load field node.
   __ Comment("Inlined Getter");
-  __ ldr(R0, Address(SP, 0 * kWordSize));
+  __ ldr(R0, Address(SP, 0 * compiler::target::kWordSize));
   __ LoadFieldFromOffset(kWord, R0, R0, offset);
   __ Ret();
 }
@@ -849,8 +855,8 @@
   // SP+0: value.
   // Sequence node has one store node and one return NULL node.
   __ Comment("Inlined Setter");
-  __ ldr(R0, Address(SP, 1 * kWordSize));  // Receiver.
-  __ ldr(R1, Address(SP, 0 * kWordSize));  // Value.
+  __ ldr(R0, Address(SP, 1 * compiler::target::kWordSize));  // Receiver.
+  __ ldr(R1, Address(SP, 0 * compiler::target::kWordSize));  // Value.
   __ StoreIntoObjectOffset(R0, offset, R1);
   __ LoadObject(R0, Object::null_object());
   __ Ret();
@@ -862,13 +868,18 @@
       (!is_optimizing() || may_reoptimize())) {
     __ Comment("Invocation Count Check");
     const Register function_reg = R8;
-    __ ldr(function_reg, FieldAddress(CODE_REG, Code::owner_offset()));
-    __ ldr(R3, FieldAddress(function_reg, Function::usage_counter_offset()));
+    __ ldr(function_reg,
+           FieldAddress(CODE_REG, compiler::target::Code::owner_offset()));
+    __ ldr(R3,
+           FieldAddress(function_reg,
+                        compiler::target::Function::usage_counter_offset()));
     // Reoptimization of an optimized function is triggered by counting in
     // IC stubs, but not at the entry of the function.
     if (!is_optimizing()) {
       __ add(R3, R3, Operand(1));
-      __ str(R3, FieldAddress(function_reg, Function::usage_counter_offset()));
+      __ str(R3,
+             FieldAddress(function_reg,
+                          compiler::target::Function::usage_counter_offset()));
     }
     __ CompareImmediate(R3, GetOptimizationThreshold());
     ASSERT(function_reg == R8);
@@ -878,10 +889,10 @@
   if (flow_graph().IsCompiledForOsr()) {
     const intptr_t extra_slots = ExtraStackSlotsOnOsrEntry();
     ASSERT(extra_slots >= 0);
-    __ EnterOsrFrame(extra_slots * kWordSize);
+    __ EnterOsrFrame(extra_slots * compiler::target::kWordSize);
   } else {
     ASSERT(StackSize() >= 0);
-    __ EnterDartFrame(StackSize() * kWordSize);
+    __ EnterDartFrame(StackSize() * compiler::target::kWordSize);
   }
 }
 
@@ -907,7 +918,8 @@
       const intptr_t slot_index =
           compiler::target::frame_layout.FrameSlotForVariableIndex(-i);
       Register value_reg = slot_index == args_desc_slot ? ARGS_DESC_REG : R0;
-      __ StoreToOffset(kWord, value_reg, FP, slot_index * kWordSize);
+      __ StoreToOffset(kWord, value_reg, FP,
+                       slot_index * compiler::target::kWordSize);
     }
   }
 
@@ -1021,9 +1033,11 @@
   bool old_use_far_branches = assembler_->use_far_branches();
   assembler_->set_use_far_branches(true);
 #endif  // DEBUG
-  __ LoadFieldFromOffset(kWord, R1, R0, Array::element_offset(edge_id));
+  __ LoadFieldFromOffset(kWord, R1, R0,
+                         compiler::target::Array::element_offset(edge_id));
   __ add(R1, R1, Operand(Smi::RawValue(1)));
-  __ StoreIntoObjectNoBarrierOffset(R0, Array::element_offset(edge_id), R1);
+  __ StoreIntoObjectNoBarrierOffset(
+      R0, compiler::target::Array::element_offset(edge_id), R1);
 #if defined(DEBUG)
   assembler_->set_use_far_branches(old_use_far_branches);
 #endif  // DEBUG
@@ -1082,9 +1096,14 @@
 
   __ Comment("MegamorphicCall");
   // Load receiver into R0.
-  __ LoadFromOffset(kWord, R0, SP, (args_desc.Count() - 1) * kWordSize);
+  __ LoadFromOffset(kWord, R0, SP,
+                    (args_desc.Count() - 1) * compiler::target::kWordSize);
   __ LoadObject(R9, cache);
-  __ ldr(LR, Address(THR, Thread::megamorphic_call_checked_entry_offset()));
+  __ ldr(
+      LR,
+      Address(
+          THR,
+          compiler::target::Thread::megamorphic_call_checked_entry_offset()));
   __ blx(LR);
 
   RecordSafepoint(locs, slow_path_argument_count);
@@ -1121,8 +1140,9 @@
   const Code& initial_stub = StubCode::ICCallThroughFunction();
 
   __ Comment("SwitchableCall");
-  __ LoadFromOffset(kWord, R0, SP,
-                    (ic_data.CountWithoutTypeArgs() - 1) * kWordSize);
+  __ LoadFromOffset(
+      kWord, R0, SP,
+      (ic_data.CountWithoutTypeArgs() - 1) * compiler::target::kWordSize);
   if (FLAG_precompiled_mode && FLAG_use_bare_instructions) {
     // The AOT runtime will replace the slot in the object pool with the
     // entrypoint address - see clustered_snapshot.cc.
@@ -1131,8 +1151,10 @@
     __ LoadUniqueObject(CODE_REG, initial_stub);
     const intptr_t entry_point_offset =
         entry_kind == Code::EntryKind::kNormal
-            ? Code::entry_point_offset(Code::EntryKind::kMonomorphic)
-            : Code::entry_point_offset(Code::EntryKind::kMonomorphicUnchecked);
+            ? compiler::target::Code::entry_point_offset(
+                  Code::EntryKind::kMonomorphic)
+            : compiler::target::Code::entry_point_offset(
+                  Code::EntryKind::kMonomorphicUnchecked);
     __ ldr(LR, FieldAddress(CODE_REG, entry_point_offset));
   }
   __ LoadUniqueObject(R9, ic_data);
@@ -1265,7 +1287,9 @@
     const Array& arguments_descriptor) {
   __ Comment("EmitTestAndCall");
   // Load receiver into R0.
-  __ LoadFromOffset(kWord, R0, SP, (count_without_type_args - 1) * kWordSize);
+  __ LoadFromOffset(
+      kWord, R0, SP,
+      (count_without_type_args - 1) * compiler::target::kWordSize);
   __ LoadObject(R4, arguments_descriptor);
 }
 
diff --git a/runtime/vm/compiler/backend/il.cc b/runtime/vm/compiler/backend/il.cc
index 170af1e..6c06e20 100644
--- a/runtime/vm/compiler/backend/il.cc
+++ b/runtime/vm/compiler/backend/il.cc
@@ -823,7 +823,7 @@
 
   intptr_t min = cids.ComputeLowestCid();
   intptr_t max = cids.ComputeHighestCid();
-  return (max - min) < kBitsPerWord;
+  return (max - min) < compiler::target::kBitsPerWord;
 }
 
 bool CheckClassInstr::IsBitTest() const {
@@ -837,7 +837,7 @@
   for (intptr_t i = 0; i < cids_.length(); ++i) {
     intptr_t run;
     uintptr_t range = 1ul + cids_[i].Extent();
-    if (range >= static_cast<uintptr_t>(kBitsPerWord)) {
+    if (range >= static_cast<uintptr_t>(compiler::target::kBitsPerWord)) {
       run = -1;
     } else {
       run = (1 << range) - 1;
@@ -1312,6 +1312,7 @@
     while (next != NULL) {
       current = next;
       current->set_definition(other);
+      current->RefineReachingType(other->Type());
       next = current->next_use();
     }
 
@@ -1330,6 +1331,7 @@
     while (next != NULL) {
       current = next;
       current->set_definition(other);
+      current->RefineReachingType(other->Type());
       next = current->next_use();
     }
     next = other->env_use_list();
@@ -1833,7 +1835,7 @@
   }
   const intptr_t value_cid = value()->Type()->ToCid();
   if (value_cid == kSmiCid) {
-    return (kSmiBits > 32) && !is_truncating() &&
+    return (compiler::target::kSmiBits > 32) && !is_truncating() &&
            !RangeUtils::Fits(value()->definition()->range(),
                              RangeBoundary::kRangeBoundaryInt32);
   } else if (value_cid == kMintCid) {
@@ -1842,7 +1844,7 @@
                              RangeBoundary::kRangeBoundaryInt32);
   } else if (is_truncating() && value()->definition()->IsBoxInteger()) {
     return false;
-  } else if ((kSmiBits < 32) && value()->Type()->IsInt()) {
+  } else if ((compiler::target::kSmiBits < 32) && value()->Type()->IsInt()) {
     return !RangeUtils::Fits(value()->definition()->range(),
                              RangeBoundary::kRangeBoundaryInt32);
   } else {
@@ -1933,7 +1935,7 @@
 static intptr_t RepresentationBits(Representation r) {
   switch (r) {
     case kTagged:
-      return kBitsPerWord - 1;
+      return compiler::target::kBitsPerWord - 1;
     case kUnboxedInt32:
     case kUnboxedUint32:
       return 32;
@@ -3182,7 +3184,7 @@
 // (on simdbc64 the [UnboxedConstantInstr] handling is only implemented for
 //  doubles and causes a bailout for everthing else)
 #if !defined(TARGET_ARCH_DBC)
-  if (kBitsPerWord == 64) {
+  if (compiler::target::kBitsPerWord == 64) {
     ConstantInstr* c = value()->definition()->AsConstant();
     if (c != NULL && (c->value().IsSmi() || c->value().IsMint())) {
       UnboxedConstantInstr* uc =
@@ -5091,18 +5093,18 @@
   if (RawObject::IsTypedDataClassId(class_id) ||
       RawObject::IsTypedDataViewClassId(class_id) ||
       RawObject::IsExternalTypedDataClassId(class_id)) {
-    return TypedDataBase::length_offset();
+    return compiler::target::TypedDataBase::length_offset();
   }
 
   switch (class_id) {
     case kGrowableObjectArrayCid:
-      return GrowableObjectArray::length_offset();
+      return compiler::target::GrowableObjectArray::length_offset();
     case kOneByteStringCid:
     case kTwoByteStringCid:
-      return String::length_offset();
+      return compiler::target::String::length_offset();
     case kArrayCid:
     case kImmutableArrayCid:
-      return Array::length_offset();
+      return compiler::target::Array::length_offset();
     default:
       UNREACHABLE();
       return -1;
diff --git a/runtime/vm/compiler/backend/il.h b/runtime/vm/compiler/backend/il.h
index 012ebad..757c185 100644
--- a/runtime/vm/compiler/backend/il.h
+++ b/runtime/vm/compiler/backend/il.h
@@ -3018,6 +3018,8 @@
 
   const Object& value() const { return value_; }
 
+  bool IsSmi() const { return compiler::target::IsSmi(value()); }
+
   virtual bool ComputeCanDeoptimize() const { return false; }
 
   virtual void InferRange(RangeAnalysis* analysis, Range* range);
@@ -4775,7 +4777,11 @@
 
   Value* array() const { return inputs_[0]; }
   Value* index() const { return inputs_[1]; }
-  intptr_t index_scale() const { return Instance::ElementSizeFor(class_id_); }
+
+  intptr_t index_scale() const {
+    return compiler::target::Instance::ElementSizeFor(class_id_);
+  }
+
   intptr_t class_id() const { return class_id_; }
   intptr_t element_count() const { return element_count_; }
 
@@ -6137,7 +6143,10 @@
   const RuntimeEntry& TargetFunction() const { return entry_; }
   bool IsExternal() const { return cid_ == kExternalTwoByteStringCid; }
   intptr_t class_id() const { return cid_; }
-  intptr_t index_scale() const { return Instance::ElementSizeFor(cid_); }
+
+  intptr_t index_scale() const {
+    return compiler::target::Instance::ElementSizeFor(cid_);
+  }
 
   virtual bool ComputeCanDeoptimize() const { return false; }
 
diff --git a/runtime/vm/compiler/backend/il_arm.cc b/runtime/vm/compiler/backend/il_arm.cc
index e833159..c687ec4 100644
--- a/runtime/vm/compiler/backend/il_arm.cc
+++ b/runtime/vm/compiler/backend/il_arm.cc
@@ -64,7 +64,8 @@
                 Temp<Register> temp)) {
   __ LoadObject(CODE_REG, instr->code());
   __ LeaveDartFrame();  // The arguments are still on the stack.
-  __ Branch(FieldAddress(CODE_REG, Code::entry_point_offset()));
+  __ Branch(
+      FieldAddress(CODE_REG, compiler::target::Code::entry_point_offset()));
 
   // Even though the TailCallInstr will be the last instruction in a basic
   // block, the flow graph compiler will emit native code for other blocks after
@@ -129,7 +130,7 @@
   const intptr_t fp_sp_dist =
       (compiler::target::frame_layout.first_local_from_fp + 1 -
        compiler->StackSize()) *
-      kWordSize;
+      compiler::target::kWordSize;
   ASSERT(fp_sp_dist <= 0);
   __ sub(R2, SP, Operand(FP));
   __ CompareImmediate(R2, fp_sp_dist);
@@ -234,10 +235,11 @@
     __ Lsl(result, result, Operand(shift + kSmiTagSize));
   } else {
     __ sub(result, result, Operand(1));
-    const int32_t val = Smi::RawValue(true_value) - Smi::RawValue(false_value);
+    const int32_t val = compiler::target::ToRawSmi(true_value) -
+                        compiler::target::ToRawSmi(false_value);
     __ AndImmediate(result, result, val);
     if (false_value != 0) {
-      __ AddImmediate(result, Smi::RawValue(false_value));
+      __ AddImmediate(result, compiler::target::ToRawSmi(false_value));
     }
   }
 }
@@ -263,8 +265,10 @@
   // R4: Arguments descriptor.
   // R0: Function.
   ASSERT(locs()->in(0).reg() == R0);
-  __ ldr(CODE_REG, FieldAddress(R0, Function::code_offset()));
-  __ ldr(R2, FieldAddress(R0, Code::function_entry_point_offset(entry_kind())));
+  __ ldr(CODE_REG, FieldAddress(R0, compiler::target::Function::code_offset()));
+  __ ldr(R2,
+         FieldAddress(R0, compiler::target::Code::function_entry_point_offset(
+                              entry_kind())));
 
   // R2: instructions entry point.
   // R9: Smi 0 (no IC data; the lazy-compile stub expects a GC-safe value).
@@ -320,7 +324,10 @@
                                        Register tmp) {
   if (destination.IsRegister()) {
     if (representation() == kUnboxedInt32) {
-      __ LoadImmediate(destination.reg(), Smi::Cast(value_).Value());
+      int64_t v;
+      const bool ok = compiler::HasIntegerValue(value_, &v);
+      RELEASE_ASSERT(ok);
+      __ LoadImmediate(destination.reg(), v);
     } else {
       ASSERT(representation() == kTagged);
       __ LoadObject(destination.reg(), value_);
@@ -350,7 +357,10 @@
     ASSERT(tmp != kNoRegister);
     const intptr_t dest_offset = destination.ToStackSlotOffset();
     if (representation() == kUnboxedInt32) {
-      __ LoadImmediate(tmp, Smi::Cast(value_).Value());
+      int64_t v;
+      const bool ok = compiler::HasIntegerValue(value_, &v);
+      RELEASE_ASSERT(ok);
+      __ LoadImmediate(tmp, v);
     } else {
       __ LoadObject(tmp, value_);
     }
@@ -803,8 +813,8 @@
   const Register left = locs()->in(0).reg();
   Location right = locs()->in(1);
   if (right.IsConstant()) {
-    ASSERT(right.constant().IsSmi());
-    const int32_t imm = reinterpret_cast<int32_t>(right.constant().raw());
+    ASSERT(compiler::target::IsSmi(right.constant()));
+    const int32_t imm = compiler::target::ToRawSmi(right.constant());
     __ TestImmediate(left, imm);
   } else {
     __ tst(left, Operand(right.reg()));
@@ -933,7 +943,7 @@
   __ PushObject(Object::null_object());
 
   // Pass a pointer to the first argument in R2.
-  __ add(R2, SP, Operand(ArgumentCount() * kWordSize));
+  __ add(R2, SP, Operand(ArgumentCount() * compiler::target::kWordSize));
 
   // Compute the effective address. When running under the simulator,
   // this is a redirection address that forces the simulator to call
@@ -1179,9 +1189,8 @@
          CallingConventions::ArgumentRegisters[0] != TMP2 &&
          CallingConventions::ArgumentRegisters[0] != R1);
   __ LoadImmediate(CallingConventions::ArgumentRegisters[0], callback_id_);
-  __ LoadFromOffset(
-      kWord, R1, THR,
-      compiler::target::Thread::verify_callback_isolate_entry_point_offset());
+  __ LoadFromOffset(kWord, R1, THR,
+                    compiler::target::Thread::verify_callback_entry_offset());
   __ blx(R1);
 
   // Load the code object.
@@ -1203,6 +1212,9 @@
     __ LoadImmediate(PP, 0);  // GC safe value into PP.
   }
 
+  // Load a GC-safe value for the arguments descriptor (unused but tagged).
+  __ LoadImmediate(ARGS_DESC_REG, 0);
+
   // Load a dummy return address which suggests that we are inside of
   // InvokeDartCodeStub. This is how the stack walker detects an entry frame.
   __ LoadFromOffset(kWord, LR, THR,
@@ -1228,8 +1240,12 @@
   const Register char_code = locs()->in(0).reg();
   const Register result = locs()->out(0).reg();
 
-  __ ldr(result, Address(THR, Thread::predefined_symbols_address_offset()));
-  __ AddImmediate(result, Symbols::kNullCharCodeSymbolOffset * kWordSize);
+  __ ldr(
+      result,
+      Address(THR,
+              compiler::target::Thread::predefined_symbols_address_offset()));
+  __ AddImmediate(
+      result, Symbols::kNullCharCodeSymbolOffset * compiler::target::kWordSize);
   __ ldr(result, Address(result, char_code, LSL, 1));  // Char code is a smi.
 }
 
@@ -1244,10 +1260,12 @@
   ASSERT(cid_ == kOneByteStringCid);
   const Register str = locs()->in(0).reg();
   const Register result = locs()->out(0).reg();
-  __ ldr(result, FieldAddress(str, String::length_offset()));
-  __ cmp(result, Operand(Smi::RawValue(1)));
+  __ ldr(result, FieldAddress(str, compiler::target::String::length_offset()));
+  __ cmp(result, Operand(compiler::target::ToRawSmi(1)));
   __ LoadImmediate(result, -1, NE);
-  __ ldrb(result, FieldAddress(str, OneByteString::data_offset()), EQ);
+  __ ldrb(result,
+          FieldAddress(str, compiler::target::OneByteString::data_offset()),
+          EQ);
   __ SmiTag(result);
 }
 
@@ -1413,8 +1431,8 @@
   if ((constant == NULL) || !Assembler::IsSafeSmi(constant->value())) {
     return false;
   }
-  const int64_t index = Smi::Cast(constant->value()).AsInt64Value();
-  const intptr_t scale = Instance::ElementSizeFor(cid);
+  const int64_t index = compiler::target::SmiValue(constant->value());
+  const intptr_t scale = compiler::target::Instance::ElementSizeFor(cid);
   const intptr_t base_offset =
       (is_external ? 0 : (Instance::DataOffsetFor(cid) - kHeapObjectTag));
   const int64_t offset = index * scale + base_offset;
@@ -1507,7 +1525,7 @@
                           : __ ElementAddressForIntIndex(
                                 true,  // Load.
                                 IsExternal(), class_id(), index_scale(), array,
-                                Smi::Cast(index.constant()).Value(),
+                                compiler::target::SmiValue(index.constant()),
                                 IP);  // Temp register.
     // Warning: element_address may use register IP as base.
   } else {
@@ -1517,11 +1535,11 @@
                                        IsExternal(), class_id(), index_scale(),
                                        array, index.reg());
     } else {
-      __ LoadElementAddressForIntIndex(address,
-                                       true,  // Load.
-                                       IsExternal(), class_id(), index_scale(),
-                                       array,
-                                       Smi::Cast(index.constant()).Value());
+      __ LoadElementAddressForIntIndex(
+          address,
+          true,  // Load.
+          IsExternal(), class_id(), index_scale(), array,
+          compiler::target::SmiValue(index.constant()));
     }
   }
 
@@ -1600,10 +1618,10 @@
       const Register result_hi = result_pair->At(1).reg();
       if (aligned()) {
         __ ldr(result_lo, Address(address));
-        __ ldr(result_hi, Address(address, kWordSize));
+        __ ldr(result_hi, Address(address, compiler::target::kWordSize));
       } else {
         __ LoadWordUnaligned(result_lo, address, TMP);
-        __ AddImmediate(address, address, kWordSize);
+        __ AddImmediate(address, address, compiler::target::kWordSize);
         __ LoadWordUnaligned(result_hi, address, TMP);
       }
       break;
@@ -1799,15 +1817,16 @@
 
   Address element_address(kNoRegister);
   if (directly_addressable) {
-    element_address = index.IsRegister()
-                          ? __ ElementAddressForRegIndex(
-                                false,  // Store.
-                                IsExternal(), class_id(), index_scale(), array,
-                                index.reg())
-                          : __ ElementAddressForIntIndex(
-                                false,  // Store.
-                                IsExternal(), class_id(), index_scale(), array,
-                                Smi::Cast(index.constant()).Value(), temp);
+    element_address =
+        index.IsRegister()
+            ? __ ElementAddressForRegIndex(false,  // Store.
+                                           IsExternal(), class_id(),
+                                           index_scale(), array,
+                                           index.reg())
+            : __ ElementAddressForIntIndex(
+                  false,  // Store.
+                  IsExternal(), class_id(), index_scale(), array,
+                  compiler::target::SmiValue(index.constant()), temp);
   } else {
     if (index.IsRegister()) {
       __ LoadElementAddressForRegIndex(temp,
@@ -1815,11 +1834,11 @@
                                        IsExternal(), class_id(), index_scale(),
                                        array, index.reg());
     } else {
-      __ LoadElementAddressForIntIndex(temp,
-                                       false,  // Store.
-                                       IsExternal(), class_id(), index_scale(),
-                                       array,
-                                       Smi::Cast(index.constant()).Value());
+      __ LoadElementAddressForIntIndex(
+          temp,
+          false,  // Store.
+          IsExternal(), class_id(), index_scale(), array,
+          compiler::target::SmiValue(index.constant()));
     }
   }
 
@@ -1843,8 +1862,8 @@
     case kOneByteStringCid: {
       ASSERT(RequiredInputRepresentation(2) == kUnboxedIntPtr);
       if (locs()->in(2).IsConstant()) {
-        const Smi& constant = Smi::Cast(locs()->in(2).constant());
-        __ LoadImmediate(IP, static_cast<int8_t>(constant.Value()));
+        __ LoadImmediate(IP,
+                         compiler::target::SmiValue(locs()->in(2).constant()));
         __ strb(IP, element_address);
       } else {
         const Register value = locs()->in(2).reg();
@@ -1856,8 +1875,7 @@
     case kExternalTypedDataUint8ClampedArrayCid: {
       ASSERT(RequiredInputRepresentation(2) == kUnboxedIntPtr);
       if (locs()->in(2).IsConstant()) {
-        const Smi& constant = Smi::Cast(locs()->in(2).constant());
-        intptr_t value = constant.Value();
+        intptr_t value = compiler::target::SmiValue(locs()->in(2).constant());
         // Clamp to 0x0 or 0xFF respectively.
         if (value > 0xFF) {
           value = 0xFF;
@@ -1907,10 +1925,10 @@
       Register value_hi = value_pair->At(1).reg();
       if (aligned()) {
         __ str(value_lo, Address(temp));
-        __ str(value_hi, Address(temp, kWordSize));
+        __ str(value_hi, Address(temp, compiler::target::kWordSize));
       } else {
         __ StoreWordUnaligned(value_lo, temp, temp2);
-        __ AddImmediate(temp, temp, kWordSize);
+        __ AddImmediate(temp, temp, compiler::target::kWordSize);
         __ StoreWordUnaligned(value_hi, temp, temp2);
       }
       break;
@@ -2030,9 +2048,10 @@
   if (emit_full_guard) {
     __ LoadObject(field_reg, Field::ZoneHandle(field().Original()));
 
-    FieldAddress field_cid_operand(field_reg, Field::guarded_cid_offset());
-    FieldAddress field_nullability_operand(field_reg,
-                                           Field::is_nullable_offset());
+    FieldAddress field_cid_operand(
+        field_reg, compiler::target::Field::guarded_cid_offset());
+    FieldAddress field_nullability_operand(
+        field_reg, compiler::target::Field::is_nullable_offset());
 
     if (value_cid == kDynamicCid) {
       LoadValueCid(compiler, value_cid_reg, value_reg);
@@ -2079,7 +2098,8 @@
       ASSERT(!compiler->is_optimizing());
       __ Bind(fail);
 
-      __ ldrh(IP, FieldAddress(field_reg, Field::guarded_cid_offset()));
+      __ ldrh(IP, FieldAddress(field_reg,
+                               compiler::target::Field::guarded_cid_offset()));
       __ CompareImmediate(IP, kDynamicCid);
       __ b(&ok, EQ);
 
@@ -2171,12 +2191,13 @@
 
     __ LoadObject(field_reg, Field::ZoneHandle(field().Original()));
 
-    __ ldrsb(
-        offset_reg,
-        FieldAddress(field_reg,
-                     Field::guarded_list_length_in_object_offset_offset()));
+    __ ldrsb(offset_reg,
+             FieldAddress(field_reg,
+                          compiler::target::Field::
+                              guarded_list_length_in_object_offset_offset()));
     __ ldr(length_reg,
-           FieldAddress(field_reg, Field::guarded_list_length_offset()));
+           FieldAddress(field_reg,
+                        compiler::target::Field::guarded_list_length_offset()));
 
     __ tst(offset_reg, Operand(offset_reg));
     __ b(&ok, MI);
@@ -2211,8 +2232,8 @@
     __ ldr(length_reg,
            FieldAddress(value_reg,
                         field().guarded_list_length_in_object_offset()));
-    __ CompareImmediate(length_reg,
-                        Smi::RawValue(field().guarded_list_length()));
+    __ CompareImmediate(
+        length_reg, compiler::target::ToRawSmi(field().guarded_list_length()));
     __ b(deopt, NE);
   }
 }
@@ -2384,9 +2405,10 @@
                                       result, temp);
       __ eor(temp, temp, Operand(temp));
       __ StoreToOffset(kWord, value, result,
-                       Mint::value_offset() - kHeapObjectTag);
+                       compiler::target::Mint::value_offset() - kHeapObjectTag);
       __ StoreToOffset(kWord, temp, result,
-                       Mint::value_offset() - kHeapObjectTag + kWordSize);
+                       compiler::target::Mint::value_offset() - kHeapObjectTag +
+                           compiler::target::kWordSize);
       __ Bind(&done);
     }
   }
@@ -2484,17 +2506,21 @@
     switch (cid) {
       case kDoubleCid:
         __ Comment("UnboxedDoubleStoreInstanceFieldInstr");
-        __ StoreDToOffset(value, temp, Double::value_offset() - kHeapObjectTag);
+        __ StoreDToOffset(
+            value, temp,
+            compiler::target::Double::value_offset() - kHeapObjectTag);
         break;
       case kFloat32x4Cid:
         __ Comment("UnboxedFloat32x4StoreInstanceFieldInstr");
-        __ StoreMultipleDToOffset(value, 2, temp,
-                                  Float32x4::value_offset() - kHeapObjectTag);
+        __ StoreMultipleDToOffset(
+            value, 2, temp,
+            compiler::target::Float32x4::value_offset() - kHeapObjectTag);
         break;
       case kFloat64x2Cid:
         __ Comment("UnboxedFloat64x2StoreInstanceFieldInstr");
-        __ StoreMultipleDToOffset(value, 2, temp,
-                                  Float64x2::value_offset() - kHeapObjectTag);
+        __ StoreMultipleDToOffset(
+            value, 2, temp,
+            compiler::target::Float64x2::value_offset() - kHeapObjectTag);
         break;
       default:
         UNREACHABLE();
@@ -2522,23 +2548,28 @@
 
     __ LoadObject(temp, Field::ZoneHandle(Z, slot().field().Original()));
 
-    __ ldrh(temp2, FieldAddress(temp, Field::is_nullable_offset()));
+    __ ldrh(temp2,
+            FieldAddress(temp, compiler::target::Field::is_nullable_offset()));
     __ CompareImmediate(temp2, kNullCid);
     __ b(&store_pointer, EQ);
 
-    __ ldrb(temp2, FieldAddress(temp, Field::kind_bits_offset()));
+    __ ldrb(temp2,
+            FieldAddress(temp, compiler::target::Field::kind_bits_offset()));
     __ tst(temp2, Operand(1 << Field::kUnboxingCandidateBit));
     __ b(&store_pointer, EQ);
 
-    __ ldrh(temp2, FieldAddress(temp, Field::guarded_cid_offset()));
+    __ ldrh(temp2,
+            FieldAddress(temp, compiler::target::Field::guarded_cid_offset()));
     __ CompareImmediate(temp2, kDoubleCid);
     __ b(&store_double, EQ);
 
-    __ ldrh(temp2, FieldAddress(temp, Field::guarded_cid_offset()));
+    __ ldrh(temp2,
+            FieldAddress(temp, compiler::target::Field::guarded_cid_offset()));
     __ CompareImmediate(temp2, kFloat32x4Cid);
     __ b(&store_float32x4, EQ);
 
-    __ ldrh(temp2, FieldAddress(temp, Field::guarded_cid_offset()));
+    __ ldrh(temp2,
+            FieldAddress(temp, compiler::target::Field::guarded_cid_offset()));
     __ CompareImmediate(temp2, kFloat64x2Cid);
     __ b(&store_float64x2, EQ);
 
@@ -2618,7 +2649,8 @@
 void LoadStaticFieldInstr::EmitNativeCode(FlowGraphCompiler* compiler) {
   const Register field = locs()->in(0).reg();
   const Register result = locs()->out(0).reg();
-  __ LoadFieldFromOffset(kWord, result, field, Field::static_value_offset());
+  __ LoadFieldFromOffset(kWord, result, field,
+                         compiler::target::Field::static_value_offset());
 }
 
 LocationSummary* StoreStaticFieldInstr::MakeLocationSummary(Zone* zone,
@@ -2638,12 +2670,16 @@
 
   __ LoadObject(temp, Field::ZoneHandle(Z, field().Original()));
   if (this->value()->NeedsWriteBarrier()) {
-    __ StoreIntoObject(temp, FieldAddress(temp, Field::static_value_offset()),
-                       value, CanValueBeSmi(),
-                       /*lr_reserved=*/!compiler->intrinsic_mode());
+    __ StoreIntoObject(
+        temp,
+        FieldAddress(temp, compiler::target::Field::static_value_offset()),
+        value, CanValueBeSmi(),
+        /*lr_reserved=*/!compiler->intrinsic_mode());
   } else {
     __ StoreIntoObjectNoBarrier(
-        temp, FieldAddress(temp, Field::static_value_offset()), value);
+        temp,
+        FieldAddress(temp, compiler::target::Field::static_value_offset()),
+        value);
   }
 }
 
@@ -2700,11 +2736,13 @@
 
   // Store the type argument field.
   __ StoreIntoObjectNoBarrier(
-      R0, FieldAddress(R0, Array::type_arguments_offset()), kElemTypeReg);
+      R0, FieldAddress(R0, compiler::target::Array::type_arguments_offset()),
+      kElemTypeReg);
 
   // Set the length field.
-  __ StoreIntoObjectNoBarrier(R0, FieldAddress(R0, Array::length_offset()),
-                              kLengthReg);
+  __ StoreIntoObjectNoBarrier(
+      R0, FieldAddress(R0, compiler::target::Array::length_offset()),
+      kLengthReg);
 
   // Initialize all array elements to raw_null.
   // R0: new object start as a tagged pointer.
@@ -2724,9 +2762,9 @@
 #endif  // DEBUG
     }
     __ AddImmediate(R6, R0, sizeof(RawArray) - kHeapObjectTag);
-    if (array_size < (kInlineArraySize * kWordSize)) {
-      __ InitializeFieldsNoBarrierUnrolled(R0, R6, 0, num_elements * kWordSize,
-                                           R8, R9);
+    if (array_size < (kInlineArraySize * compiler::target::kWordSize)) {
+      __ InitializeFieldsNoBarrierUnrolled(
+          R0, R6, 0, num_elements * compiler::target::kWordSize, R8, R9);
     } else {
       __ InitializeFieldsNoBarrier(R0, R6, R3, R8, R9);
     }
@@ -2752,8 +2790,9 @@
 
   if (compiler->is_optimizing() && !FLAG_precompiled_mode &&
       num_elements()->BindsToConstant() &&
-      num_elements()->BoundConstant().IsSmi()) {
-    const intptr_t length = Smi::Cast(num_elements()->BoundConstant()).Value();
+      compiler::target::IsSmi(num_elements()->BoundConstant())) {
+    const intptr_t length =
+        compiler::target::SmiValue(num_elements()->BoundConstant());
     if (Array::IsValidLength(length)) {
       Label slow_path, done;
       InlineArrayAllocation(compiler, length, &slow_path, &done);
@@ -2812,18 +2851,21 @@
     switch (cid) {
       case kDoubleCid:
         __ Comment("UnboxedDoubleLoadFieldInstr");
-        __ LoadDFromOffset(result, temp,
-                           Double::value_offset() - kHeapObjectTag);
+        __ LoadDFromOffset(
+            result, temp,
+            compiler::target::Double::value_offset() - kHeapObjectTag);
         break;
       case kFloat32x4Cid:
         __ Comment("UnboxedFloat32x4LoadFieldInstr");
-        __ LoadMultipleDFromOffset(result, 2, temp,
-                                   Float32x4::value_offset() - kHeapObjectTag);
+        __ LoadMultipleDFromOffset(
+            result, 2, temp,
+            compiler::target::Float32x4::value_offset() - kHeapObjectTag);
         break;
       case kFloat64x2Cid:
         __ Comment("UnboxedFloat64x2LoadFieldInstr");
-        __ LoadMultipleDFromOffset(result, 2, temp,
-                                   Float64x2::value_offset() - kHeapObjectTag);
+        __ LoadMultipleDFromOffset(
+            result, 2, temp,
+            compiler::target::Float64x2::value_offset() - kHeapObjectTag);
         break;
       default:
         UNREACHABLE();
@@ -2845,9 +2887,10 @@
 
     __ LoadObject(result_reg, Field::ZoneHandle(slot().field().Original()));
 
-    FieldAddress field_cid_operand(result_reg, Field::guarded_cid_offset());
-    FieldAddress field_nullability_operand(result_reg,
-                                           Field::is_nullable_offset());
+    FieldAddress field_cid_operand(
+        result_reg, compiler::target::Field::guarded_cid_offset());
+    FieldAddress field_nullability_operand(
+        result_reg, compiler::target::Field::is_nullable_offset());
 
     __ ldrh(temp, field_nullability_operand);
     __ CompareImmediate(temp, kNullCid);
@@ -2979,25 +3022,38 @@
   // TODO(regis): Consider moving this into a shared stub to reduce
   // generated code size.
   __ LoadObject(R3, type_arguments());
-  __ ldr(R3, FieldAddress(R3, TypeArguments::instantiations_offset()));
-  __ AddImmediate(R3, Array::data_offset() - kHeapObjectTag);
+  __ ldr(R3, FieldAddress(
+                 R3, compiler::target::TypeArguments::instantiations_offset()));
+  __ AddImmediate(R3, compiler::target::Array::data_offset() - kHeapObjectTag);
   // The instantiations cache is initialized with Object::zero_array() and is
   // therefore guaranteed to contain kNoInstantiator. No length check needed.
   Label loop, next, found, slow_case;
   __ Bind(&loop);
-  __ ldr(R2, Address(R3, 0 * kWordSize));  // Cached instantiator type args.
+  __ ldr(
+      R2,
+      Address(
+          R3,
+          0 * compiler::target::kWordSize));  // Cached instantiator type args.
   __ cmp(R2, Operand(instantiator_type_args_reg));
   __ b(&next, NE);
-  __ ldr(IP, Address(R3, 1 * kWordSize));  // Cached function type args.
+  __ ldr(
+      IP,
+      Address(R3,
+              1 * compiler::target::kWordSize));  // Cached function type args.
   __ cmp(IP, Operand(function_type_args_reg));
   __ b(&found, EQ);
   __ Bind(&next);
-  __ AddImmediate(R3, StubCode::kInstantiationSizeInWords * kWordSize);
-  __ CompareImmediate(R2, Smi::RawValue(StubCode::kNoInstantiator));
+  __ AddImmediate(
+      R3, StubCode::kInstantiationSizeInWords * compiler::target::kWordSize);
+  __ CompareImmediate(R2,
+                      compiler::target::ToRawSmi(StubCode::kNoInstantiator));
   __ b(&loop, NE);
   __ b(&slow_case);
   __ Bind(&found);
-  __ ldr(result_reg, Address(R3, 2 * kWordSize));  // Cached instantiated args.
+  __ ldr(
+      result_reg,
+      Address(R3,
+              2 * compiler::target::kWordSize));  // Cached instantiated args.
   __ b(&type_arguments_instantiated);
 
   __ Bind(&slow_case);
@@ -3073,7 +3129,8 @@
 
   // Setup up number of context variables field.
   __ LoadImmediate(temp0, num_context_variables());
-  __ str(temp0, FieldAddress(result, Context::num_variables_offset()));
+  __ str(temp0, FieldAddress(
+                    result, compiler::target::Context::num_variables_offset()));
 
   __ Bind(slow_path->exit_label());
 }
@@ -3114,7 +3171,8 @@
   Register temp = locs()->temp(0).reg();
   Label call_runtime, no_call;
 
-  __ ldr(temp, FieldAddress(field, Field::static_value_offset()));
+  __ ldr(temp,
+         FieldAddress(field, compiler::target::Field::static_value_offset()));
   __ CompareObject(temp, Object::sentinel());
   __ b(&call_runtime, EQ);
 
@@ -3183,7 +3241,7 @@
   const intptr_t fp_sp_dist =
       (compiler::target::frame_layout.first_local_from_fp + 1 -
        compiler->StackSize()) *
-      kWordSize;
+      compiler::target::kWordSize;
   ASSERT(fp_sp_dist <= 0);
   __ AddImmediate(SP, FP, fp_sp_dist);
 
@@ -3229,7 +3287,9 @@
       __ Comment("CheckStackOverflowSlowPathOsr");
       __ Bind(osr_entry_label());
       __ LoadImmediate(value, Thread::kOsrRequest);
-      __ str(value, Address(THR, Thread::stack_overflow_flags_offset()));
+      __ str(value,
+             Address(THR,
+                     compiler::target::Thread::stack_overflow_flags_offset()));
     }
     __ Comment("CheckStackOverflowSlowPath");
     __ Bind(entry_label());
@@ -3246,8 +3306,8 @@
     compiler->pending_deoptimization_env_ = env;
 
     if (using_shared_stub) {
-      const uword entry_point_offset =
-          Thread::stack_overflow_shared_stub_entry_point_offset(
+      const uword entry_point_offset = compiler::target::Thread::
+          stack_overflow_shared_stub_entry_point_offset(
               instruction()->locs()->live_registers()->FpuRegisterCount() > 0);
       __ ldr(LR, Address(THR, entry_point_offset));
       __ blx(LR);
@@ -3287,7 +3347,7 @@
 };
 
 void CheckStackOverflowInstr::EmitNativeCode(FlowGraphCompiler* compiler) {
-  __ ldr(IP, Address(THR, Thread::stack_limit_offset()));
+  __ ldr(IP, Address(THR, compiler::target::Thread::stack_limit_offset()));
   __ cmp(SP, Operand(IP));
 
   auto object_store = compiler->isolate()->object_store();
@@ -3324,7 +3384,8 @@
     __ LoadObject(temp, compiler->parsed_function().function());
     intptr_t threshold =
         FLAG_optimization_counter_threshold * (loop_depth() + 1);
-    __ ldr(temp, FieldAddress(temp, Function::usage_counter_offset()));
+    __ ldr(temp, FieldAddress(
+                     temp, compiler::target::Function::usage_counter_offset()));
     __ CompareImmediate(temp, threshold);
     __ b(slow_path->osr_entry_label(), GE);
   }
@@ -3345,10 +3406,10 @@
                      : NULL;
   if (locs.in(1).IsConstant()) {
     const Object& constant = locs.in(1).constant();
-    ASSERT(constant.IsSmi());
+    ASSERT(compiler::target::IsSmi(constant));
     // Immediate shift operation takes 5 bits for the count.
     const intptr_t kCountLimit = 0x1F;
-    const intptr_t value = Smi::Cast(constant).Value();
+    const intptr_t value = compiler::target::SmiValue(constant);
     ASSERT((0 < value) && (value < kCountLimit));
     if (shift_left->can_overflow()) {
       // Check for overflow (preserve left).
@@ -3368,19 +3429,20 @@
     // TODO(srdjan): Implement code below for is_truncating().
     // If left is constant, we know the maximal allowed size for right.
     const Object& obj = shift_left->left()->BoundConstant();
-    if (obj.IsSmi()) {
-      const intptr_t left_int = Smi::Cast(obj).Value();
+    if (compiler::target::IsSmi(obj)) {
+      const intptr_t left_int = compiler::target::SmiValue(obj);
       if (left_int == 0) {
         __ cmp(right, Operand(0));
         __ b(deopt, MI);
         __ mov(result, Operand(0));
         return;
       }
-      const intptr_t max_right = kSmiBits - Utils::HighestBit(left_int);
+      const intptr_t max_right =
+          compiler::target::kSmiBits - Utils::HighestBit(left_int);
       const bool right_needs_check =
           !RangeUtils::IsWithin(right_range, 0, max_right - 1);
       if (right_needs_check) {
-        __ cmp(right, Operand(reinterpret_cast<int32_t>(Smi::New(max_right))));
+        __ cmp(right, Operand(compiler::target::ToRawSmi(max_right)));
         __ b(deopt, CS);
       }
       __ SmiUntag(IP, right);
@@ -3390,7 +3452,7 @@
   }
 
   const bool right_needs_check =
-      !RangeUtils::IsWithin(right_range, 0, (Smi::kBits - 1));
+      !RangeUtils::IsWithin(right_range, 0, (compiler::target::kSmiBits - 1));
   if (!shift_left->can_overflow()) {
     if (right_needs_check) {
       if (!RangeUtils::IsPositive(right_range)) {
@@ -3399,7 +3461,8 @@
         __ b(deopt, MI);
       }
 
-      __ cmp(right, Operand(reinterpret_cast<int32_t>(Smi::New(Smi::kBits))));
+      __ cmp(right,
+             Operand(compiler::target::ToRawSmi(compiler::target::kSmiBits)));
       __ mov(result, Operand(0), CS);
       __ SmiUntag(IP, right, CC);  // SmiUntag right into IP if CC.
       __ Lsl(result, left, IP, CC);
@@ -3410,7 +3473,8 @@
   } else {
     if (right_needs_check) {
       ASSERT(shift_left->CanDeoptimize());
-      __ cmp(right, Operand(reinterpret_cast<int32_t>(Smi::New(Smi::kBits))));
+      __ cmp(right,
+             Operand(compiler::target::ToRawSmi(compiler::target::kSmiBits)));
       __ b(deopt, CS);
     }
     // Left is not a constant.
@@ -3532,7 +3596,8 @@
     case Token::kSHL:
       ASSERT(result != left);
       ASSERT(result != right);
-      __ CompareImmediate(right, Smi::RawValue(Smi::kBits));
+      __ CompareImmediate(
+          right, compiler::target::ToRawSmi(compiler::target::kSmiBits));
       __ b(slow_path->entry_label(), HI);
 
       __ SmiUntag(TMP, right);
@@ -3545,7 +3610,8 @@
     case Token::kSHR:
       ASSERT(result != left);
       ASSERT(result != right);
-      __ CompareImmediate(right, Smi::RawValue(Smi::kBits));
+      __ CompareImmediate(
+          right, compiler::target::ToRawSmi(compiler::target::kSmiBits));
       __ b(slow_path->entry_label(), HI);
 
       __ SmiUntag(result, right);
@@ -3761,8 +3827,8 @@
 
   if (locs()->in(1).IsConstant()) {
     const Object& constant = locs()->in(1).constant();
-    ASSERT(constant.IsSmi());
-    const int32_t imm = reinterpret_cast<int32_t>(constant.raw());
+    ASSERT(compiler::target::IsSmi(constant));
+    const int32_t imm = compiler::target::ToRawSmi(constant);
     switch (op_kind()) {
       case Token::kADD: {
         if (deopt == NULL) {
@@ -3786,7 +3852,7 @@
       }
       case Token::kMUL: {
         // Keep left value tagged and untag right value.
-        const intptr_t value = Smi::Cast(constant).Value();
+        const intptr_t value = compiler::target::SmiValue(constant);
         if (deopt == NULL) {
           __ LoadImmediate(IP, value);
           __ mul(result, left, IP);
@@ -3800,7 +3866,7 @@
         break;
       }
       case Token::kTRUNCDIV: {
-        const intptr_t value = Smi::Cast(constant).Value();
+        const intptr_t value = compiler::target::SmiValue(constant);
         ASSERT(value != kIntptrMin);
         ASSERT(Utils::IsPowerOfTwo(Utils::Abs(value)));
         const intptr_t shift_count =
@@ -3856,7 +3922,7 @@
       case Token::kSHR: {
         // sarl operation masks the count to 5 bits.
         const intptr_t kCountLimit = 0x1F;
-        intptr_t value = Smi::Cast(constant).Value();
+        intptr_t value = compiler::target::SmiValue(constant);
         __ Asr(result, left,
                Operand(Utils::Minimum(value + kSmiTagSize, kCountLimit)));
         __ SmiTag(result);
@@ -4020,10 +4086,10 @@
                      : NULL;
   ASSERT(locs.in(1).IsConstant());
   const Object& constant = locs.in(1).constant();
-  ASSERT(constant.IsSmi());
+  ASSERT(compiler::target::IsSmi(constant));
   // Immediate shift operation takes 5 bits for the count.
   const intptr_t kCountLimit = 0x1F;
-  const intptr_t value = Smi::Cast(constant).Value();
+  const intptr_t value = compiler::target::SmiValue(constant);
   ASSERT((0 < value) && (value < kCountLimit));
   if (shift_left->can_overflow()) {
     // Check for overflow (preserve left).
@@ -4073,8 +4139,8 @@
 
   if (locs()->in(1).IsConstant()) {
     const Object& constant = locs()->in(1).constant();
-    ASSERT(constant.IsSmi());
-    const intptr_t value = Smi::Cast(constant).Value();
+    ASSERT(compiler::target::IsSmi(constant));
+    const intptr_t value = compiler::target::SmiValue(constant);
     switch (op_kind()) {
       case Token::kADD: {
         if (deopt == NULL) {
@@ -4315,7 +4381,7 @@
       ASSERT(result->At(0).reg() != box);
       __ LoadFieldFromOffset(kWord, result->At(0).reg(), box, ValueOffset());
       __ LoadFieldFromOffset(kWord, result->At(1).reg(), box,
-                             ValueOffset() + kWordSize);
+                             ValueOffset() + compiler::target::kWordSize);
       break;
     }
 
@@ -4377,7 +4443,8 @@
   const Register result = locs()->out(0).reg();
   Label done;
   __ SmiUntag(result, value, &done);
-  __ LoadFieldFromOffset(kWord, result, value, Mint::value_offset());
+  __ LoadFieldFromOffset(kWord, result, value,
+                         compiler::target::Mint::value_offset());
   __ Bind(&done);
 }
 
@@ -4432,14 +4499,16 @@
     BoxAllocationSlowPath::Allocate(compiler, this, compiler->mint_class(), out,
                                     temp);
     if (from_representation() == kUnboxedInt32) {
-      __ Asr(temp, value, Operand(kBitsPerWord - 1));
+      __ Asr(temp, value, Operand(compiler::target::kBitsPerWord - 1));
     } else {
       ASSERT(from_representation() == kUnboxedUint32);
       __ eor(temp, temp, Operand(temp));
     }
-    __ StoreToOffset(kWord, value, out, Mint::value_offset() - kHeapObjectTag);
+    __ StoreToOffset(kWord, value, out,
+                     compiler::target::Mint::value_offset() - kHeapObjectTag);
     __ StoreToOffset(kWord, temp, out,
-                     Mint::value_offset() - kHeapObjectTag + kWordSize);
+                     compiler::target::Mint::value_offset() - kHeapObjectTag +
+                         compiler::target::kWordSize);
     __ Bind(&done);
   }
 }
@@ -4485,9 +4554,10 @@
   BoxAllocationSlowPath::Allocate(compiler, this, compiler->mint_class(),
                                   out_reg, tmp);
   __ StoreToOffset(kWord, value_lo, out_reg,
-                   Mint::value_offset() - kHeapObjectTag);
+                   compiler::target::Mint::value_offset() - kHeapObjectTag);
   __ StoreToOffset(kWord, value_hi, out_reg,
-                   Mint::value_offset() - kHeapObjectTag + kWordSize);
+                   compiler::target::Mint::value_offset() - kHeapObjectTag +
+                       compiler::target::kWordSize);
   __ Bind(&done);
 }
 
@@ -4496,10 +4566,13 @@
                               Register result,
                               Register temp,
                               Label* deopt) {
-  __ LoadFieldFromOffset(kWord, result, mint, Mint::value_offset());
+  __ LoadFieldFromOffset(kWord, result, mint,
+                         compiler::target::Mint::value_offset());
   if (deopt != NULL) {
-    __ LoadFieldFromOffset(kWord, temp, mint, Mint::value_offset() + kWordSize);
-    __ cmp(temp, Operand(result, ASR, kBitsPerWord - 1));
+    __ LoadFieldFromOffset(
+        kWord, temp, mint,
+        compiler::target::Mint::value_offset() + compiler::target::kWordSize);
+    __ cmp(temp, Operand(result, ASR, compiler::target::kBitsPerWord - 1));
     __ b(deopt, NE);
   }
 }
@@ -5486,7 +5559,8 @@
   const Register value_obj = locs()->in(0).reg();
   ASSERT(result == R0);
   ASSERT(result != value_obj);
-  __ LoadDFromOffset(DTMP, value_obj, Double::value_offset() - kHeapObjectTag);
+  __ LoadDFromOffset(DTMP, value_obj,
+                     compiler::target::Double::value_offset() - kHeapObjectTag);
 
   Label done, do_call;
   // First check for NaN. Checking for minint after the conversion doesn't work
@@ -6063,11 +6137,11 @@
   Register value = locs()->in(0).reg();
   Label* deopt = compiler->AddDeoptStub(deopt_id(), ICData::kDeoptCheckClass);
   if (cids_.IsSingleCid()) {
-    __ CompareImmediate(value, Smi::RawValue(cids_.cid_start));
+    __ CompareImmediate(value, compiler::target::ToRawSmi(cids_.cid_start));
     __ b(deopt, NE);
   } else {
-    __ AddImmediate(value, -Smi::RawValue(cids_.cid_start));
-    __ CompareImmediate(value, Smi::RawValue(cids_.Extent()));
+    __ AddImmediate(value, -compiler::target::ToRawSmi(cids_.cid_start));
+    __ CompareImmediate(value, compiler::target::ToRawSmi(cids_.Extent()));
     __ b(deopt, HI);  // Unsigned higher.
   }
 }
@@ -6093,9 +6167,11 @@
   Location index_loc = locs()->in(kIndexPos);
 
   if (length_loc.IsConstant() && index_loc.IsConstant()) {
-    ASSERT((Smi::Cast(length_loc.constant()).Value() <=
-            Smi::Cast(index_loc.constant()).Value()) ||
-           (Smi::Cast(index_loc.constant()).Value() < 0));
+#ifdef DEBUG
+    const int32_t length = compiler::target::SmiValue(length_loc.constant());
+    const int32_t index = compiler::target::SmiValue(index_loc.constant());
+    ASSERT((length <= index) || (index < 0));
+#endif
     // Unconditionally deoptimize for constant bounds checks because they
     // only occur only when index is out-of-bounds.
     __ b(deopt);
@@ -6105,20 +6181,21 @@
   const intptr_t index_cid = index()->Type()->ToCid();
   if (index_loc.IsConstant()) {
     const Register length = length_loc.reg();
-    const Smi& index = Smi::Cast(index_loc.constant());
-    __ CompareImmediate(length, reinterpret_cast<int32_t>(index.raw()));
+    __ CompareImmediate(length,
+                        compiler::target::ToRawSmi(index_loc.constant()));
     __ b(deopt, LS);
   } else if (length_loc.IsConstant()) {
-    const Smi& length = Smi::Cast(length_loc.constant());
     const Register index = index_loc.reg();
     if (index_cid != kSmiCid) {
       __ BranchIfNotSmi(index, deopt);
     }
-    if (length.Value() == Smi::kMaxValue) {
+    if (compiler::target::SmiValue(length_loc.constant()) ==
+        compiler::target::kSmiMax) {
       __ tst(index, Operand(index));
       __ b(deopt, MI);
     } else {
-      __ CompareImmediate(index, reinterpret_cast<int32_t>(length.raw()));
+      __ CompareImmediate(index,
+                          compiler::target::ToRawSmi(length_loc.constant()));
       __ b(deopt, CS);
     }
   } else {
@@ -6350,7 +6427,8 @@
 
     switch (instruction()->AsShiftInt64Op()->op_kind()) {
       case Token::kSHR:
-        __ Asr(out_hi, left_hi, Operand(kBitsPerWord - 1), GE);
+        __ Asr(out_hi, left_hi, Operand(compiler::target::kBitsPerWord - 1),
+               GE);
         __ mov(out_lo, Operand(out_hi), GE);
         break;
       case Token::kSHL: {
@@ -6369,10 +6447,13 @@
     // The unboxed int64 argument is passed through a dedicated slot in Thread.
     // TODO(dartbug.com/33549): Clean this up when unboxed values
     // could be passed as arguments.
-    __ StoreToOffset(kWord, right_lo, THR,
-                     Thread::unboxed_int64_runtime_arg_offset());
-    __ StoreToOffset(kWord, right_hi, THR,
-                     Thread::unboxed_int64_runtime_arg_offset() + kWordSize);
+    __ StoreToOffset(
+        kWord, right_lo, THR,
+        compiler::target::Thread::unboxed_int64_runtime_arg_offset());
+    __ StoreToOffset(
+        kWord, right_hi, THR,
+        compiler::target::Thread::unboxed_int64_runtime_arg_offset() +
+            compiler::target::kWordSize);
   }
 };
 
@@ -6510,10 +6591,13 @@
     // The unboxed int64 argument is passed through a dedicated slot in Thread.
     // TODO(dartbug.com/33549): Clean this up when unboxed values
     // could be passed as arguments.
-    __ StoreToOffset(kWord, right_lo, THR,
-                     Thread::unboxed_int64_runtime_arg_offset());
-    __ StoreToOffset(kWord, right_hi, THR,
-                     Thread::unboxed_int64_runtime_arg_offset() + kWordSize);
+    __ StoreToOffset(
+        kWord, right_lo, THR,
+        compiler::target::Thread::unboxed_int64_runtime_arg_offset());
+    __ StoreToOffset(
+        kWord, right_hi, THR,
+        compiler::target::Thread::unboxed_int64_runtime_arg_offset() +
+            compiler::target::kWordSize);
   }
 };
 
@@ -6806,7 +6890,7 @@
       Label* deopt =
           compiler->AddDeoptStub(deopt_id(), ICData::kDeoptUnboxInteger);
       ASSERT(to() == kUnboxedInt32);
-      __ cmp(in_hi, Operand(in_lo, ASR, kBitsPerWord - 1));
+      __ cmp(in_hi, Operand(in_lo, ASR, compiler::target::kBitsPerWord - 1));
       __ b(deopt, NE);
     }
   } else if (from() == kUnboxedUint32 || from() == kUnboxedInt32) {
@@ -6821,7 +6905,7 @@
       __ eor(out_hi, out_hi, Operand(out_hi));
     } else {
       ASSERT(from() == kUnboxedInt32);
-      __ mov(out_hi, Operand(in, ASR, kBitsPerWord - 1));
+      __ mov(out_hi, Operand(in, ASR, compiler::target::kBitsPerWord - 1));
     }
   } else {
     UNREACHABLE();
@@ -6844,7 +6928,8 @@
   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;
+  const intptr_t shift_length =
+      (compiler::target::kWordSize - from_width_bytes()) * kBitsPerByte;
   __ Lsl(reg, reg, Operand(shift_length));
   switch (representation_) {
     case kUnboxedInt32:  // Sign extend operand.
diff --git a/runtime/vm/compiler/backend/il_arm64.cc b/runtime/vm/compiler/backend/il_arm64.cc
index 15ae1de..1b5b2c3 100644
--- a/runtime/vm/compiler/backend/il_arm64.cc
+++ b/runtime/vm/compiler/backend/il_arm64.cc
@@ -1079,9 +1079,8 @@
          CallingConventions::ArgumentRegisters[0] != TMP2 &&
          CallingConventions::ArgumentRegisters[0] != R1);
   __ LoadImmediate(CallingConventions::ArgumentRegisters[0], callback_id_);
-  __ LoadFromOffset(
-      R1, THR,
-      compiler::target::Thread::verify_callback_isolate_entry_point_offset());
+  __ LoadFromOffset(R1, THR,
+                    compiler::target::Thread::verify_callback_entry_offset());
   __ blr(R1);
 
   // Load the code object.
@@ -1106,6 +1105,9 @@
     __ LoadObject(PP, compiler::NullObject());
   }
 
+  // Load a GC-safe value for the arguments descriptor (unused but tagged).
+  __ mov(ARGS_DESC_REG, ZR);
+
   // Load a dummy return address which suggests that we are inside of
   // InvokeDartCodeStub. This is how the stack walker detects an entry frame.
   __ LoadFromOffset(LR, THR,
diff --git a/runtime/vm/compiler/backend/il_ia32.cc b/runtime/vm/compiler/backend/il_ia32.cc
index f71bb81..7268abe 100644
--- a/runtime/vm/compiler/backend/il_ia32.cc
+++ b/runtime/vm/compiler/backend/il_ia32.cc
@@ -1049,8 +1049,9 @@
   // Now that the safepoint has ended, we can hold Dart objects with bare hands.
   // TODO(35934): fix linking issue
   __ pushl(Immediate(callback_id_));
-  __ movl(EAX, Address(THR, compiler::target::Thread::
-                                verify_callback_isolate_entry_point_offset()));
+  __ movl(
+      EAX,
+      Address(THR, compiler::target::Thread::verify_callback_entry_offset()));
   __ call(EAX);
   __ popl(EAX);
 
@@ -1066,6 +1067,9 @@
   __ movl(Address(FPREG, kPcMarkerSlotFromFp * compiler::target::kWordSize),
           CODE_REG);
 
+  // Load a GC-safe value for the arguments descriptor (unused but tagged).
+  __ xorl(ARGS_DESC_REG, ARGS_DESC_REG);
+
   // Push a dummy return address which suggests that we are inside of
   // InvokeDartCodeStub. This is how the stack walker detects an entry frame.
   __ movl(
diff --git a/runtime/vm/compiler/backend/il_x64.cc b/runtime/vm/compiler/backend/il_x64.cc
index 7ffade3..c0d1f41 100644
--- a/runtime/vm/compiler/backend/il_x64.cc
+++ b/runtime/vm/compiler/backend/il_x64.cc
@@ -1020,7 +1020,7 @@
   // Save a space for the code object.
   __ PushImmediate(Immediate(0));
 
-  // InvokoeDartCodeStub saves the arguments descriptor here. We don't have one,
+  // InvokeDartCodeStub saves the arguments descriptor here. We don't have one,
   // but we need to follow the same frame layout for the stack walker.
   __ PushImmediate(Immediate(0));
 
@@ -1072,8 +1072,9 @@
   // Otherwise we'll clobber the argument sent from the caller.
   COMPILE_ASSERT(RAX != CallingConventions::kArg1Reg);
   __ movq(CallingConventions::kArg1Reg, Immediate(callback_id_));
-  __ movq(RAX, Address(THR, compiler::target::Thread::
-                                verify_callback_isolate_entry_point_offset()));
+  __ movq(
+      RAX,
+      Address(THR, compiler::target::Thread::verify_callback_entry_offset()));
   __ call(RAX);
 
   // Load the code object.
@@ -1095,6 +1096,9 @@
     __ xorq(PP, PP);  // GC-safe value into PP.
   }
 
+  // Load a GC-safe value for arguments descriptor (unused but tagged).
+  __ xorq(ARGS_DESC_REG, ARGS_DESC_REG);
+
   // Push a dummy return address which suggests that we are inside of
   // InvokeDartCodeStub. This is how the stack walker detects an entry frame.
   __ movq(
diff --git a/runtime/vm/compiler/backend/inliner.cc b/runtime/vm/compiler/backend/inliner.cc
index 7be5d0e..5235005 100644
--- a/runtime/vm/compiler/backend/inliner.cc
+++ b/runtime/vm/compiler/backend/inliner.cc
@@ -1731,6 +1731,11 @@
           BlockEntryInstr* block = old_target->dominated_blocks()[j];
           new_join->AddDominatedBlock(block);
         }
+        // Since we are reusing the same inlined body across multiple cids,
+        // reset the type information on the redefinition of the receiver
+        // in case it was originally given a concrete type.
+        ASSERT(new_join->next()->IsRedefinition());
+        new_join->next()->AsRedefinition()->UpdateType(CompileType::Dynamic());
         // Create a new target with the join as unconditional successor.
         TargetEntryInstr* new_target = new TargetEntryInstr(
             AllocateBlockId(), old_target->try_index(), DeoptId::kNone);
@@ -2386,7 +2391,8 @@
 static bool CanUnboxInt32() {
   // Int32/Uint32 can be unboxed if it fits into a smi or the platform
   // supports unboxed mints.
-  return (kSmiBits >= 32) || FlowGraphCompiler::SupportsUnboxedInt64();
+  return (compiler::target::kSmiBits >= 32) ||
+         FlowGraphCompiler::SupportsUnboxedInt64();
 }
 
 // Quick access to the current one.
@@ -2418,8 +2424,9 @@
     *array = elements;
     array_cid = kArrayCid;
   } else if (RawObject::IsExternalTypedDataClassId(array_cid)) {
-    LoadUntaggedInstr* elements = new (Z) LoadUntaggedInstr(
-        new (Z) Value(*array), ExternalTypedData::data_offset());
+    LoadUntaggedInstr* elements = new (Z)
+        LoadUntaggedInstr(new (Z) Value(*array),
+                          compiler::target::TypedDataBase::data_field_offset());
     *cursor = flow_graph->AppendTo(*cursor, elements, NULL, FlowGraph::kValue);
     *array = elements;
   }
@@ -2451,11 +2458,12 @@
   if ((array_cid == kTypedDataInt32ArrayCid) ||
       (array_cid == kTypedDataUint32ArrayCid)) {
     // Deoptimization may be needed if result does not always fit in a Smi.
-    deopt_id = (kSmiBits >= 32) ? DeoptId::kNone : call->deopt_id();
+    deopt_id =
+        (compiler::target::kSmiBits >= 32) ? DeoptId::kNone : call->deopt_id();
   }
 
   // Array load and return.
-  intptr_t index_scale = Instance::ElementSizeFor(array_cid);
+  intptr_t index_scale = compiler::target::Instance::ElementSizeFor(array_cid);
   LoadIndexedInstr* load = new (Z)
       LoadIndexedInstr(new (Z) Value(array), new (Z) Value(index), index_scale,
                        array_cid, kAlignedAccess, deopt_id, call->token_pos());
@@ -2674,7 +2682,8 @@
                                   FlowGraph::kValue);
   }
 
-  const intptr_t index_scale = Instance::ElementSizeFor(array_cid);
+  const intptr_t index_scale =
+      compiler::target::Instance::ElementSizeFor(array_cid);
   *last = new (Z) StoreIndexedInstr(
       new (Z) Value(array), new (Z) Value(index), new (Z) Value(stored_value),
       needs_store_barrier, index_scale, array_cid, kAlignedAccess,
@@ -2830,7 +2839,7 @@
       call->token_pos());
   *cursor = flow_graph->AppendTo(*cursor, length, NULL, FlowGraph::kValue);
 
-  intptr_t element_size = Instance::ElementSizeFor(array_cid);
+  intptr_t element_size = compiler::target::Instance::ElementSizeFor(array_cid);
   ConstantInstr* bytes_per_element =
       flow_graph->GetConstant(Smi::Handle(Z, Smi::New(element_size)));
   BinarySmiOpInstr* len_in_bytes = new (Z)
@@ -2841,7 +2850,8 @@
 
   // adjusted_length = len_in_bytes - (element_size - 1).
   Definition* adjusted_length = len_in_bytes;
-  intptr_t adjustment = Instance::ElementSizeFor(view_cid) - 1;
+  intptr_t adjustment =
+      compiler::target::Instance::ElementSizeFor(view_cid) - 1;
   if (adjustment > 0) {
     ConstantInstr* length_adjustment =
         flow_graph->GetConstant(Smi::Handle(Z, Smi::New(adjustment)));
@@ -2882,8 +2892,9 @@
   if (array_cid == kDynamicCid ||
       RawObject::IsExternalTypedDataClassId(array_cid)) {
     // Internal or External typed data: load untagged.
-    auto elements = new (Z) LoadUntaggedInstr(
-        new (Z) Value(*array), TypedDataBase::data_field_offset());
+    auto elements = new (Z)
+        LoadUntaggedInstr(new (Z) Value(*array),
+                          compiler::target::TypedDataBase::data_field_offset());
     *cursor = flow_graph->AppendTo(*cursor, elements, NULL, FlowGraph::kValue);
     *array = elements;
   } else {
@@ -3040,7 +3051,7 @@
     case kTypedDataInt32ArrayCid:
     case kTypedDataUint32ArrayCid:
       // On 64-bit platforms assume that stored value is always a smi.
-      if (kSmiBits >= 32) {
+      if (compiler::target::kSmiBits >= 32) {
         value_check = Cids::CreateMonomorphic(Z, kSmiCid);
       }
       break;
@@ -3204,18 +3215,21 @@
 
   // For external strings: Load backing store.
   if (cid == kExternalOneByteStringCid) {
-    str = new LoadUntaggedInstr(new Value(str),
-                                ExternalOneByteString::external_data_offset());
+    str = new LoadUntaggedInstr(
+        new Value(str),
+        compiler::target::ExternalOneByteString::external_data_offset());
     cursor = flow_graph->AppendTo(cursor, str, NULL, FlowGraph::kValue);
   } else if (cid == kExternalTwoByteStringCid) {
-    str = new LoadUntaggedInstr(new Value(str),
-                                ExternalTwoByteString::external_data_offset());
+    str = new LoadUntaggedInstr(
+        new Value(str),
+        compiler::target::ExternalTwoByteString::external_data_offset());
     cursor = flow_graph->AppendTo(cursor, str, NULL, FlowGraph::kValue);
   }
 
-  LoadIndexedInstr* load_indexed = new (Z) LoadIndexedInstr(
-      new (Z) Value(str), new (Z) Value(index), Instance::ElementSizeFor(cid),
-      cid, kAlignedAccess, DeoptId::kNone, call->token_pos());
+  LoadIndexedInstr* load_indexed = new (Z)
+      LoadIndexedInstr(new (Z) Value(str), new (Z) Value(index),
+                       compiler::target::Instance::ElementSizeFor(cid), cid,
+                       kAlignedAccess, DeoptId::kNone, call->token_pos());
   cursor = flow_graph->AppendTo(cursor, load_indexed, NULL, FlowGraph::kValue);
 
   auto box = BoxInstr::Create(kUnboxedIntPtr, new Value(load_indexed));
diff --git a/runtime/vm/compiler/backend/inliner_test.cc b/runtime/vm/compiler/backend/inliner_test.cc
new file mode 100644
index 0000000..75609a4
--- /dev/null
+++ b/runtime/vm/compiler/backend/inliner_test.cc
@@ -0,0 +1,137 @@
+// 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.
+
+#include "vm/compiler/backend/inliner.h"
+
+#include "vm/compiler/backend/il.h"
+#include "vm/compiler/backend/il_printer.h"
+#include "vm/compiler/backend/il_test_helper.h"
+#include "vm/compiler/compiler_pass.h"
+#include "vm/object.h"
+#include "vm/unit_test.h"
+
+namespace dart {
+
+// Test that the redefinition for an inlined polymorphic function used with
+// multiple receiver cids does not have a concrete type.
+ISOLATE_UNIT_TEST_CASE(Inliner_PolyInliningRedefinition) {
+  const char* kScript = R"(
+    abstract class A {
+      String toInline() { return "A"; }
+    }
+
+    class B extends A {}
+    class C extends A {
+      @override
+      String toInline() { return "C";}
+    }
+    class D extends A {}
+
+    testInlining(A arg) {
+      arg.toInline();
+    }
+
+    main() {
+      for (var i = 0; i < 10; i++) {
+        testInlining(B());
+        testInlining(C());
+        testInlining(D());
+      }
+    }
+  )";
+
+  const auto& root_library = Library::Handle(LoadTestScript(kScript));
+  const auto& function =
+      Function::Handle(GetFunction(root_library, "testInlining"));
+
+  Invoke(root_library, "main");
+
+  TestPipeline pipeline(function, CompilerPass::kJIT);
+  FlowGraph* flow_graph = pipeline.RunPasses({
+      CompilerPass::kComputeSSA,
+      CompilerPass::kApplyICData,
+      CompilerPass::kTryOptimizePatterns,
+      CompilerPass::kSetOuterInliningId,
+      CompilerPass::kTypePropagation,
+      CompilerPass::kApplyClassIds,
+      CompilerPass::kInlining,
+  });
+
+  auto entry = flow_graph->graph_entry()->normal_entry();
+  EXPECT(entry != nullptr);
+
+  EXPECT(entry->initial_definitions()->length() == 1);
+  EXPECT(entry->initial_definitions()->At(0)->IsParameter());
+  ParameterInstr* param = entry->initial_definitions()->At(0)->AsParameter();
+
+  // First we find the start of the prelude for the inlined instruction,
+  // and also keep a reference to the LoadClassId instruction for later.
+  LoadClassIdInstr* lcid = nullptr;
+  BranchInstr* prelude = nullptr;
+
+  ILMatcher cursor(flow_graph, entry);
+  RELEASE_ASSERT(cursor.TryMatch(
+      {
+          {kMatchLoadClassId, &lcid},
+          {kMatchBranch, &prelude},
+      },
+      /*insert_before=*/kMoveGlob));
+
+  const Class& cls = Class::Handle(
+      root_library.LookupLocalClass(String::Handle(Symbols::New(thread, "B"))));
+
+  Definition* cid_B = flow_graph->GetConstant(Smi::Handle(Smi::New(cls.id())));
+  Instruction* current = prelude;
+
+  // We walk false branches until we either reach a branch instruction that uses
+  // B's cid for comparison to the value returned from the LCID instruction
+  // above, or a default case if there was no branch instruction for B's cid.
+  while (true) {
+    EXPECT(current->IsBranch());
+    const ComparisonInstr* check = current->AsBranch()->comparison();
+    EXPECT(check->left()->definition() == lcid);
+    if (check->right()->definition() == cid_B) break;
+    current = current->SuccessorAt(1);
+    // By following false paths, we should be walking a series of blocks that
+    // looks like:
+    // B#[target]:#
+    //   Branch if <check on class ID>
+    // If we end up not finding a branch, then we're in a default case
+    // that contains a class check.
+    current = current->next();
+    if (!current->IsBranch()) {
+      break;
+    }
+  }
+  // If we found a branch that checks against the class ID, we follow the true
+  // branch to a block that contains only a goto to the desired join block.
+  if (current->IsBranch()) {
+    current = current->SuccessorAt(0);
+  } else {
+    // We're in the default case, which will check the class ID to make sure
+    // it's the one expected for the fallthrough. That check will be followed
+    // by a goto to the desired join block.
+    EXPECT(current->IsRedefinition());
+    const auto redef = current->AsRedefinition();
+    EXPECT(redef->value()->definition() == lcid);
+    current = current->next();
+    EXPECT(current->IsCheckClassId());
+    EXPECT(current->AsCheckClassId()->value()->definition() == redef);
+  }
+  current = current->next();
+  EXPECT(current->IsGoto());
+  current = current->AsGoto()->successor();
+  // Now we should be at a block that starts like:
+  // BY[join]:# pred(...)
+  //    vW <- Redefinition(vV)
+  //
+  // where vV is a reference to the function parameter (the receiver of
+  // the inlined function).
+  current = current->next();
+  EXPECT(current->IsRedefinition());
+  EXPECT(current->AsRedefinition()->value()->definition() == param);
+  EXPECT(current->AsRedefinition()->Type()->ToCid() == kDynamicCid);
+}
+
+}  // namespace dart
diff --git a/runtime/vm/compiler/backend/linearscan.h b/runtime/vm/compiler/backend/linearscan.h
index 7c1a93e..9655f32 100644
--- a/runtime/vm/compiler/backend/linearscan.h
+++ b/runtime/vm/compiler/backend/linearscan.h
@@ -52,7 +52,8 @@
 class FlowGraphAllocator : public ValueObject {
  public:
   // Number of stack slots needed for a fpu register spill slot.
-  static const intptr_t kDoubleSpillFactor = kDoubleSize / kWordSize;
+  static const intptr_t kDoubleSpillFactor =
+      kDoubleSize / compiler::target::kWordSize;
 
   explicit FlowGraphAllocator(const FlowGraph& flow_graph,
                               bool intrinsic_mode = false);
@@ -525,16 +526,16 @@
   Location spill_slot() const { return spill_slot_; }
 
   bool HasOnlyUnconstrainedUsesInLoop(intptr_t loop_id) const {
-    if (loop_id < kBitsPerWord) {
-      const intptr_t mask = static_cast<intptr_t>(1) << loop_id;
+    if (loop_id < kMaxLoops) {
+      const uint64_t mask = static_cast<uint64_t>(1) << loop_id;
       return (has_only_any_uses_in_loops_ & mask) != 0;
     }
     return false;
   }
 
   void MarkHasOnlyUnconstrainedUsesInLoop(intptr_t loop_id) {
-    if (loop_id < kBitsPerWord) {
-      has_only_any_uses_in_loops_ |= static_cast<intptr_t>(1) << loop_id;
+    if (loop_id < kMaxLoops) {
+      has_only_any_uses_in_loops_ |= static_cast<uint64_t>(1) << loop_id;
     }
   }
 
@@ -576,7 +577,8 @@
 
   LiveRange* next_sibling_;
 
-  intptr_t has_only_any_uses_in_loops_;
+  static constexpr intptr_t kMaxLoops = sizeof(uint64_t) * kBitsPerByte;
+  uint64_t has_only_any_uses_in_loops_;
   bool is_loop_phi_;
 
   AllocationFinger finger_;
diff --git a/runtime/vm/compiler/backend/locations.cc b/runtime/vm/compiler/backend/locations.cc
index f705a15..34f8223 100644
--- a/runtime/vm/compiler/backend/locations.cc
+++ b/runtime/vm/compiler/backend/locations.cc
@@ -145,7 +145,7 @@
 
 template <class Register, class FpuRegister>
 intptr_t TemplateLocation<Register, FpuRegister>::ToStackSlotOffset() const {
-  return stack_index() * kWordSize;
+  return stack_index() * compiler::target::kWordSize;
 }
 
 template <class Register, class FpuRegister>
diff --git a/runtime/vm/compiler/backend/range_analysis.cc b/runtime/vm/compiler/backend/range_analysis.cc
index d619f96..28f3b2d 100644
--- a/runtime/vm/compiler/backend/range_analysis.cc
+++ b/runtime/vm/compiler/backend/range_analysis.cc
@@ -816,8 +816,8 @@
     // AOT should only see non-deopting GenericCheckBound.
     ASSERT(!FLAG_precompiled_mode);
 
-    ConstantInstr* max_smi =
-        flow_graph_->GetConstant(Smi::Handle(Smi::New(Smi::kMaxValue)));
+    ConstantInstr* max_smi = flow_graph_->GetConstant(
+        Smi::Handle(Smi::New(compiler::target::kSmiMax)));
     for (intptr_t i = 0; i < non_positive_symbols.length(); i++) {
       CheckArrayBoundInstr* precondition = new CheckArrayBoundInstr(
           new Value(max_smi), new Value(non_positive_symbols[i]),
@@ -1075,7 +1075,7 @@
 
         c = left_const + right_const;
         if (Utils::WillAddOverflow(left_const, right_const) ||
-            !Smi::IsValid(c)) {
+            !compiler::target::IsSmi(c)) {
           return false;  // Abort.
         }
 
@@ -1120,7 +1120,7 @@
 
         c = (left_const - right_const);
         if (Utils::WillSubOverflow(left_const, right_const) ||
-            !Smi::IsValid(c)) {
+            !compiler::target::IsSmi(c)) {
           return false;  // Abort.
         }
 
@@ -1180,7 +1180,7 @@
       }
     } else if ((*defn)->IsConstant()) {
       ConstantInstr* constant_defn = (*defn)->AsConstant();
-      if ((constant != NULL) && constant_defn->value().IsSmi()) {
+      if ((constant != NULL) && constant_defn->IsSmi()) {
         *defn = NULL;
         *constant = Smi::Cast(constant_defn->value()).Value();
       }
@@ -1195,7 +1195,7 @@
                               Definition* defn) {
     if (defn->IsConstant()) {
       const Object& value = defn->AsConstant()->value();
-      return value.IsSmi() && (Smi::Cast(value).Value() >= 0);
+      return compiler::target::IsSmi(value) && (Smi::Cast(value).Value() >= 0);
     } else if (defn->HasSSATemp()) {
       if (!RangeUtils::IsPositive(defn->range())) {
         symbols->Add(defn);
@@ -1683,7 +1683,7 @@
 }
 
 RangeBoundary RangeBoundary::FromDefinition(Definition* defn, int64_t offs) {
-  if (defn->IsConstant() && defn->AsConstant()->value().IsSmi()) {
+  if (defn->IsConstant() && defn->AsConstant()->IsSmi()) {
     return FromConstant(Smi::Cast(defn->AsConstant()->value()).Value() + offs);
   }
   ASSERT(IsValidOffsetForSymbolicRangeBoundary(offs));
@@ -2289,7 +2289,8 @@
 
   const int64_t left_max = ConstantAbsMax(left_range);
   const int64_t right_max = ConstantAbsMax(right_range);
-  if ((left_max <= -kSmiMin) && (right_max <= -kSmiMin) &&
+  if ((left_max <= -compiler::target::kSmiMin) &&
+      (right_max <= -compiler::target::kSmiMin) &&
       ((left_max == 0) || (right_max <= kMaxInt64 / left_max))) {
     // Product of left and right max values stays in 64 bit range.
     const int64_t mul_max = left_max * right_max;
@@ -2625,8 +2626,9 @@
   switch (slot().kind()) {
     case Slot::Kind::kArray_length:
     case Slot::Kind::kGrowableObjectArray_length:
-      *range = Range(RangeBoundary::FromConstant(0),
-                     RangeBoundary::FromConstant(Array::kMaxElements));
+      *range = Range(
+          RangeBoundary::FromConstant(0),
+          RangeBoundary::FromConstant(compiler::target::Array::kMaxElements));
       break;
 
     case Slot::Kind::kTypedDataBase_length:
@@ -2635,8 +2637,9 @@
       break;
 
     case Slot::Kind::kString_length:
-      *range = Range(RangeBoundary::FromConstant(0),
-                     RangeBoundary::FromConstant(String::kMaxElements));
+      *range = Range(
+          RangeBoundary::FromConstant(0),
+          RangeBoundary::FromConstant(compiler::target::String::kMaxElements));
       break;
 
     case Slot::Kind::kDartField:
@@ -2929,7 +2932,8 @@
 
   // Range of the index is unknown can't decide if the check is redundant.
   if (index_range == NULL) {
-    if (!(index()->BindsToConstant() && index()->BoundConstant().IsSmi())) {
+    if (!(index()->BindsToConstant() &&
+          compiler::target::IsSmi(index()->BoundConstant()))) {
       return false;
     }
 
diff --git a/runtime/vm/compiler/backend/range_analysis.h b/runtime/vm/compiler/backend/range_analysis.h
index a16ea2b..e34d230 100644
--- a/runtime/vm/compiler/backend/range_analysis.h
+++ b/runtime/vm/compiler/backend/range_analysis.h
@@ -64,7 +64,8 @@
   static RangeBoundary FromDefinition(Definition* defn, int64_t offs = 0);
 
   static bool IsValidOffsetForSymbolicRangeBoundary(int64_t offset) {
-    if ((offset > (kMaxInt64 - kSmiMax)) || (offset < (kMinInt64 - kSmiMin))) {
+    if ((offset > (kMaxInt64 - compiler::target::kSmiMax)) ||
+        (offset < (kMinInt64 - compiler::target::kSmiMin))) {
       // Avoid creating symbolic range boundaries which can wrap around.
       return false;
     }
@@ -72,16 +73,20 @@
   }
 
   // Construct a RangeBoundary for the constant MinSmi value.
-  static RangeBoundary MinSmi() { return FromConstant(Smi::kMinValue); }
+  static RangeBoundary MinSmi() {
+    return FromConstant(compiler::target::kSmiMin);
+  }
 
   // Construct a RangeBoundary for the constant MaxSmi value.
-  static RangeBoundary MaxSmi() { return FromConstant(Smi::kMaxValue); }
+  static RangeBoundary MaxSmi() {
+    return FromConstant(compiler::target::kSmiMax);
+  }
 
   // Construct a RangeBoundary for the constant kMin value.
   static RangeBoundary MinConstant(RangeSize size) {
     switch (size) {
       case kRangeBoundarySmi:
-        return FromConstant(Smi::kMinValue);
+        return FromConstant(compiler::target::kSmiMin);
       case kRangeBoundaryInt32:
         return FromConstant(kMinInt32);
       case kRangeBoundaryInt64:
@@ -94,7 +99,7 @@
   static RangeBoundary MaxConstant(RangeSize size) {
     switch (size) {
       case kRangeBoundarySmi:
-        return FromConstant(Smi::kMaxValue);
+        return FromConstant(compiler::target::kSmiMax);
       case kRangeBoundaryInt32:
         return FromConstant(kMaxInt32);
       case kRangeBoundaryInt64:
@@ -138,7 +143,8 @@
 
   // Returns true when this is a constant that is outside of Smi range.
   bool OverflowedSmi() const {
-    return (IsConstant() && !Smi::IsValid(ConstantValue())) || IsInfinity();
+    return (IsConstant() && !compiler::target::IsSmi(ConstantValue())) ||
+           IsInfinity();
   }
 
   bool Overflowed(RangeBoundary::RangeSize size) const {
diff --git a/runtime/vm/compiler/backend/range_analysis_test.cc b/runtime/vm/compiler/backend/range_analysis_test.cc
index c67708f..81b1467 100644
--- a/runtime/vm/compiler/backend/range_analysis_test.cc
+++ b/runtime/vm/compiler/backend/range_analysis_test.cc
@@ -67,15 +67,18 @@
   TEST_RANGE_OP(Range::Shl, -1, 1, 63, 63, RangeBoundary(kMinInt64),
                 RangeBoundary::PositiveInfinity());
   if (kBitsPerWord == 64) {
-    TEST_RANGE_OP_SMI(Range::Shl, -1, 1, 62, 62, RangeBoundary(kSmiMin),
-                      RangeBoundary(kSmiMax));
+    TEST_RANGE_OP_SMI(Range::Shl, -1, 1, 62, 62,
+                      RangeBoundary(compiler::target::kSmiMin),
+                      RangeBoundary(compiler::target::kSmiMax));
     TEST_RANGE_OP_SMI(Range::Shl, -1, 1, 30, 30, RangeBoundary(-(1 << 30)),
                       RangeBoundary(1 << 30));
   } else {
-    TEST_RANGE_OP_SMI(Range::Shl, -1, 1, 30, 30, RangeBoundary(kSmiMin),
-                      RangeBoundary(kSmiMax));
-    TEST_RANGE_OP_SMI(Range::Shl, -1, 1, 62, 62, RangeBoundary(kSmiMin),
-                      RangeBoundary(kSmiMax));
+    TEST_RANGE_OP_SMI(Range::Shl, -1, 1, 30, 30,
+                      RangeBoundary(compiler::target::kSmiMin),
+                      RangeBoundary(compiler::target::kSmiMax));
+    TEST_RANGE_OP_SMI(Range::Shl, -1, 1, 62, 62,
+                      RangeBoundary(compiler::target::kSmiMin),
+                      RangeBoundary(compiler::target::kSmiMax));
   }
   TEST_RANGE_OP(Range::Shl, 0, 100, 0, 64, RangeBoundary(0),
                 RangeBoundary::PositiveInfinity());
diff --git a/runtime/vm/compiler/backend/redundancy_elimination.cc b/runtime/vm/compiler/backend/redundancy_elimination.cc
index 27245b2..1144be8 100644
--- a/runtime/vm/compiler/backend/redundancy_elimination.cc
+++ b/runtime/vm/compiler/backend/redundancy_elimination.cc
@@ -1725,10 +1725,9 @@
               Definition* forward_def = graph_->constant_null();
               if (alloc->ArgumentCount() > 0) {
                 ASSERT(alloc->ArgumentCount() == 1);
-                intptr_t type_args_offset =
-                    alloc->cls().type_arguments_field_offset();
-                if (load->slot().IsTypeArguments() &&
-                    load->slot().offset_in_bytes() == type_args_offset) {
+                const Slot& type_args_slot = Slot::GetTypeArgumentsSlotFor(
+                    graph_->thread(), alloc->cls());
+                if (load->slot().IsIdentical(type_args_slot)) {
                   forward_def = alloc->PushArgumentAt(0)->value()->definition();
                 }
               }
diff --git a/runtime/vm/compiler/backend/redundancy_elimination_test.cc b/runtime/vm/compiler/backend/redundancy_elimination_test.cc
index 9aee1ee..e22f5e4 100644
--- a/runtime/vm/compiler/backend/redundancy_elimination_test.cc
+++ b/runtime/vm/compiler/backend/redundancy_elimination_test.cc
@@ -679,7 +679,33 @@
   Invoke(root_library, "main");
 
   TestPipeline pipeline(function, CompilerPass::kJIT);
-  FlowGraph* flow_graph = pipeline.RunPasses({});
+  // Recent changes actually compile the function into a single basic
+  // block, so we need to test right after the load optimizer has been run.
+  // Have checked that this test still fails appropriately using the load
+  // optimizer prior to the fix (commit 2a237327).
+  FlowGraph* flow_graph = pipeline.RunPasses({
+      CompilerPass::kComputeSSA,
+      CompilerPass::kApplyICData,
+      CompilerPass::kTryOptimizePatterns,
+      CompilerPass::kSetOuterInliningId,
+      CompilerPass::kTypePropagation,
+      CompilerPass::kApplyClassIds,
+      CompilerPass::kInlining,
+      CompilerPass::kTypePropagation,
+      CompilerPass::kApplyClassIds,
+      CompilerPass::kTypePropagation,
+      CompilerPass::kApplyICData,
+      CompilerPass::kCanonicalize,
+      CompilerPass::kBranchSimplify,
+      CompilerPass::kIfConvert,
+      CompilerPass::kCanonicalize,
+      CompilerPass::kConstantPropagation,
+      CompilerPass::kOptimisticallySpecializeSmiPhis,
+      CompilerPass::kTypePropagation,
+      CompilerPass::kWidenSmiToInt32,
+      CompilerPass::kSelectRepresentations,
+      CompilerPass::kCSE,
+  });
 
   auto entry = flow_graph->graph_entry()->normal_entry();
   EXPECT(entry != nullptr);
@@ -698,6 +724,7 @@
           kMatchAndMoveBranchTrue,
           kMatchAndMoveBranchTrue,
           kMatchAndMoveBranchFalse,
+          kMatchAndMoveBranchFalse,
           {kMatchAndMoveUnboxedConstant, &double_one},
           {kMatchAndMoveStoreIndexed, &first_store},
           kMatchAndMoveBranchFalse,
diff --git a/runtime/vm/compiler/backend/slot.cc b/runtime/vm/compiler/backend/slot.cc
index df6904b..bb0c918 100644
--- a/runtime/vm/compiler/backend/slot.cc
+++ b/runtime/vm/compiler/backend/slot.cc
@@ -54,7 +54,8 @@
 #define FIELD_VAR (0)
 #define DEFINE_NATIVE_FIELD(ClassName, FieldName, cid, mutability)             \
   Slot(Kind::k##ClassName##_##FieldName, FIELD_##mutability, k##cid##Cid,      \
-       ClassName::FieldName##_offset(), #ClassName "." #FieldName, nullptr),
+       compiler::target::ClassName::FieldName##_offset(),                      \
+       #ClassName "." #FieldName, nullptr),
 
       NATIVE_SLOTS_LIST(DEFINE_NATIVE_FIELD)
 
@@ -102,7 +103,8 @@
 }
 
 const Slot& Slot::GetTypeArgumentsSlotFor(Thread* thread, const Class& cls) {
-  return GetTypeArgumentsSlotAt(thread, cls.type_arguments_field_offset());
+  return GetTypeArgumentsSlotAt(
+      thread, compiler::target::Class::TypeArgumentsFieldOffset(cls));
 }
 
 const Slot& Slot::GetContextVariableSlotFor(Thread* thread,
@@ -115,7 +117,8 @@
   return SlotCache::Instance(thread).Canonicalize(Slot(
       Kind::kCapturedVariable,
       IsImmutableBit::encode(variable.is_final()) | IsNullableBit::encode(true),
-      kDynamicCid, Context::variable_offset(variable.index().value()),
+      kDynamicCid,
+      compiler::target::Context::variable_offset(variable.index().value()),
       &variable.name(), /*static_type=*/nullptr));
 }
 
@@ -156,7 +159,7 @@
            IsImmutableBit::encode(field.is_final() || field.is_const()) |
                IsNullableBit::encode(is_nullable) |
                IsGuardedBit::encode(used_guarded_state),
-           nullable_cid, field.Offset(), &field,
+           nullable_cid, compiler::target::Field::OffsetOf(field), &field,
            &AbstractType::ZoneHandle(zone, field.type())));
 
   // If properties of this slot were based on the guarded state make sure
diff --git a/runtime/vm/compiler/backend/slot.h b/runtime/vm/compiler/backend/slot.h
index ef6a408..46141a9 100644
--- a/runtime/vm/compiler/backend/slot.h
+++ b/runtime/vm/compiler/backend/slot.h
@@ -168,6 +168,8 @@
   bool Equals(const Slot* other) const;
   intptr_t Hashcode() const;
 
+  bool IsIdentical(const Slot& other) const { return this == &other; }
+
  private:
   Slot(Kind kind,
        int8_t bits,
diff --git a/runtime/vm/compiler/call_specializer.cc b/runtime/vm/compiler/call_specializer.cc
index 1c405f9..de3c1b5 100644
--- a/runtime/vm/compiler/call_specializer.cc
+++ b/runtime/vm/compiler/call_specializer.cc
@@ -510,7 +510,7 @@
 }
 
 static bool SmiFitsInDouble() {
-  return kSmiBits < 53;
+  return compiler::target::kSmiBits < 53;
 }
 
 bool CallSpecializer::TryReplaceWithEqualityOp(InstanceCallInstr* call,
@@ -1836,8 +1836,9 @@
   const intptr_t element_size = TypedDataBase::ElementSizeFor(cid);
   const intptr_t index_scale = element_size;
 
-  auto data = new (Z) LoadUntaggedInstr(new (Z) Value(array),
-                                        TypedDataBase::data_field_offset());
+  auto data = new (Z)
+      LoadUntaggedInstr(new (Z) Value(array),
+                        compiler::target::TypedDataBase::data_field_offset());
   flow_graph_->InsertBefore(call, data, call->env(), FlowGraph::kValue);
 
   Definition* load = new (Z)
@@ -1913,8 +1914,9 @@
       break;
   }
 
-  auto data = new (Z) LoadUntaggedInstr(new (Z) Value(array),
-                                        TypedDataBase::data_field_offset());
+  auto data = new (Z)
+      LoadUntaggedInstr(new (Z) Value(array),
+                        compiler::target::TypedDataBase::data_field_offset());
   flow_graph_->InsertBefore(call, data, call->env(), FlowGraph::kValue);
 
   auto store = new (Z) StoreIndexedInstr(
diff --git a/runtime/vm/compiler/compiler_sources.gni b/runtime/vm/compiler/compiler_sources.gni
index 632e5b4..bac526c 100644
--- a/runtime/vm/compiler/compiler_sources.gni
+++ b/runtime/vm/compiler/compiler_sources.gni
@@ -168,6 +168,7 @@
   "backend/il_test.cc",
   "backend/il_test_helper.h",
   "backend/il_test_helper.cc",
+  "backend/inliner_test.cc",
   "backend/locations_helpers_test.cc",
   "backend/loops_test.cc",
   "backend/range_analysis_test.cc",
diff --git a/runtime/vm/compiler/frontend/base_flow_graph_builder.cc b/runtime/vm/compiler/frontend/base_flow_graph_builder.cc
index aff93f9..c133f75 100644
--- a/runtime/vm/compiler/frontend/base_flow_graph_builder.cc
+++ b/runtime/vm/compiler/frontend/base_flow_graph_builder.cc
@@ -539,8 +539,9 @@
       value->BindsToConstant() ? kNoStoreBarrier : kEmitStoreBarrier;
   StoreIndexedInstr* store = new (Z) StoreIndexedInstr(
       Pop(),  // Array.
-      index, value, emit_store_barrier, Instance::ElementSizeFor(class_id),
-      class_id, kAlignedAccess, DeoptId::kNone, TokenPosition::kNoSource);
+      index, value, emit_store_barrier,
+      compiler::target::Instance::ElementSizeFor(class_id), class_id,
+      kAlignedAccess, DeoptId::kNone, TokenPosition::kNoSource);
   return Fragment(store);
 }
 
diff --git a/runtime/vm/compiler/frontend/bytecode_flow_graph_builder.cc b/runtime/vm/compiler/frontend/bytecode_flow_graph_builder.cc
index 71a60b5..82204fd 100644
--- a/runtime/vm/compiler/frontend/bytecode_flow_graph_builder.cc
+++ b/runtime/vm/compiler/frontend/bytecode_flow_graph_builder.cc
@@ -674,7 +674,8 @@
     store_type_args += B->LoadArgDescriptor();
     store_type_args += B->LoadNativeField(Slot::ArgumentsDescriptor_count());
     store_type_args += B->LoadFpRelativeSlot(
-        kWordSize * (1 + compiler::target::frame_layout.param_end_from_fp),
+        compiler::target::kWordSize *
+            (1 + compiler::target::frame_layout.param_end_from_fp),
         CompileType::CreateNullable(/*is_nullable=*/true, kTypeArgumentsCid));
     store_type_args +=
         B->StoreLocalRaw(TokenPosition::kNoSource, type_args_var);
diff --git a/runtime/vm/compiler/frontend/bytecode_reader.cc b/runtime/vm/compiler/frontend/bytecode_reader.cc
index e59d856..c180689 100644
--- a/runtime/vm/compiler/frontend/bytecode_reader.cc
+++ b/runtime/vm/compiler/frontend/bytecode_reader.cc
@@ -36,77 +36,6 @@
     : MetadataHelper(helper, tag(), /* precompiler_only = */ false),
       active_class_(active_class) {}
 
-bool BytecodeMetadataHelper::HasBytecode(intptr_t node_offset) {
-  const intptr_t md_offset = GetNextMetadataPayloadOffset(node_offset);
-  return (md_offset >= 0);
-}
-
-void BytecodeMetadataHelper::ReadMetadata(const Function& function) {
-#if defined(SUPPORT_TIMELINE)
-  TimelineDurationScope tds(Thread::Current(), Timeline::GetCompilerStream(),
-                            "BytecodeMetadataHelper::ReadMetadata");
-  // This increases bytecode reading time by ~7%, so only keep it around for
-  // debugging.
-#if defined(DEBUG)
-  tds.SetNumArguments(1);
-  tds.CopyArgument(0, "Function", function.ToQualifiedCString());
-#endif  // defined(DEBUG)
-#endif  // !defined(SUPPORT_TIMELINE)
-
-  switch (function.kind()) {
-    case RawFunction::kImplicitGetter:
-      function.AttachBytecode(Object::implicit_getter_bytecode());
-      return;
-    case RawFunction::kImplicitSetter:
-      function.AttachBytecode(Object::implicit_setter_bytecode());
-      return;
-    case RawFunction::kImplicitStaticGetter:
-      if (IsStaticFieldGetterGeneratedAsInitializer(function, helper_->zone_)) {
-        break;
-      }
-      function.AttachBytecode(Object::implicit_static_getter_bytecode());
-      return;
-    case RawFunction::kMethodExtractor:
-      function.AttachBytecode(Object::method_extractor_bytecode());
-      return;
-    case RawFunction::kInvokeFieldDispatcher:
-      if (Class::Handle(function.Owner()).id() == kClosureCid) {
-        function.AttachBytecode(Object::invoke_closure_bytecode());
-      } else {
-        function.AttachBytecode(Object::invoke_field_bytecode());
-      }
-      return;
-    case RawFunction::kNoSuchMethodDispatcher:
-      function.AttachBytecode(Object::nsm_dispatcher_bytecode());
-      return;
-    default:
-      break;
-  }
-
-  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());
-
-  BytecodeComponentData bytecode_component(
-      Array::Handle(helper_->zone_, GetBytecodeComponent()));
-  BytecodeReaderHelper bytecode_reader(helper_, active_class_,
-                                       &bytecode_component);
-
-  bytecode_reader.ReadCode(function, code_offset);
-}
-
 void BytecodeMetadataHelper::ParseBytecodeFunction(
     ParsedFunction* parsed_function) {
   TIMELINE_DURATION(Thread::Current(), CompilerVerbose,
@@ -130,8 +59,7 @@
 
   BytecodeComponentData bytecode_component(
       Array::Handle(helper_->zone_, GetBytecodeComponent()));
-  BytecodeReaderHelper bytecode_reader(helper_, active_class_,
-                                       &bytecode_component);
+  BytecodeReaderHelper bytecode_reader(&H, active_class_, &bytecode_component);
 
   bytecode_reader.ParseBytecodeFunction(parsed_function, function);
 }
@@ -152,33 +80,17 @@
 
   BytecodeComponentData bytecode_component(
       Array::Handle(helper_->zone_, GetBytecodeComponent()));
-  BytecodeReaderHelper bytecode_reader(helper_, active_class_,
-                                       &bytecode_component);
+  BytecodeReaderHelper bytecode_reader(&H, active_class_, &bytecode_component);
 
-  AlternativeReadingScope alt(&helper_->reader_, &H.metadata_payloads(),
-                              md_offset);
+  AlternativeReadingScope alt(&bytecode_reader.reader(), md_offset);
 
-  intptr_t members_offset = helper_->reader_.ReadUInt();
+  intptr_t members_offset = bytecode_reader.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) {
@@ -192,10 +104,8 @@
     return Library::null();
   }
 
-  BytecodeReaderHelper bytecode_reader(helper_, active_class_,
-                                       &bytecode_component);
-  AlternativeReadingScope alt(&helper_->reader_, &H.metadata_payloads(),
-                              main_offset);
+  BytecodeReaderHelper bytecode_reader(&H, active_class_, &bytecode_component);
+  AlternativeReadingScope alt(&bytecode_reader.reader(), main_offset);
   return bytecode_reader.ReadMain();
 }
 
@@ -214,22 +124,23 @@
     return Array::null();
   }
 
-  BytecodeReaderHelper component_reader(helper_, nullptr, nullptr);
+  BytecodeReaderHelper component_reader(&H, nullptr, nullptr);
   return component_reader.ReadBytecodeComponent(md_offset);
 }
 
 BytecodeReaderHelper::BytecodeReaderHelper(
-    KernelReaderHelper* helper,
+    TranslationHelper* translation_helper,
     ActiveClass* active_class,
     BytecodeComponentData* bytecode_component)
-    : helper_(helper),
-      translation_helper_(helper->translation_helper_),
+    : reader_(translation_helper->metadata_payloads()),
+      translation_helper_(*translation_helper),
       active_class_(active_class),
-      zone_(helper_->zone_),
+      thread_(translation_helper->thread()),
+      zone_(translation_helper->zone()),
       bytecode_component_(bytecode_component),
-      scoped_function_(Function::Handle(helper_->zone_)),
-      scoped_function_name_(String::Handle(helper_->zone_)),
-      scoped_function_class_(Class::Handle(helper_->zone_)) {}
+      scoped_function_(Function::Handle(translation_helper->zone())),
+      scoped_function_name_(String::Handle(translation_helper->zone())),
+      scoped_function_class_(Class::Handle(translation_helper->zone())) {}
 
 void BytecodeReaderHelper::ReadCode(const Function& function,
                                     intptr_t code_offset) {
@@ -238,10 +149,9 @@
          !function.IsImplicitSetterFunction());
   ASSERT(code_offset > 0);
 
-  AlternativeReadingScope alt(&helper_->reader_, &H.metadata_payloads(),
-                              code_offset);
+  AlternativeReadingScope alt(&reader_, code_offset);
 
-  const intptr_t flags = helper_->reader_.ReadUInt();
+  const intptr_t flags = reader_.ReadUInt();
   const bool has_exceptions_table =
       (flags & Code::kHasExceptionsTableFlag) != 0;
   const bool has_source_positions =
@@ -256,23 +166,23 @@
       (flags & Code::kHasDefaultFunctionTypeArgsFlag) != 0;
 
   if (has_parameters_flags) {
-    intptr_t num_params = helper_->reader_.ReadUInt();
+    intptr_t num_params = reader_.ReadUInt();
     ASSERT(num_params ==
            function.NumParameters() - function.NumImplicitParameters());
     for (intptr_t i = 0; i < num_params; ++i) {
-      helper_->reader_.ReadUInt();
+      reader_.ReadUInt();
     }
   }
   if (has_forwarding_stub_target) {
-    helper_->reader_.ReadUInt();
+    reader_.ReadUInt();
   }
   if (has_default_function_type_args) {
-    helper_->reader_.ReadUInt();
+    reader_.ReadUInt();
   }
 
   intptr_t num_closures = 0;
   if (has_closures) {
-    num_closures = helper_->ReadListLength();
+    num_closures = reader_.ReadListLength();
     closures_ = &Array::Handle(Z, Array::New(num_closures));
     for (intptr_t i = 0; i < num_closures; i++) {
       ReadClosureDeclaration(function, i);
@@ -280,7 +190,7 @@
   }
 
   // Create object pool and read pool entries.
-  const intptr_t obj_count = helper_->reader_.ReadListLength();
+  const intptr_t obj_count = reader_.ReadListLength();
   const ObjectPool& pool = ObjectPool::Handle(Z, ObjectPool::New(obj_count));
 
   {
@@ -288,7 +198,7 @@
     // ICData objects.
     //
     // TODO(alexmarkov): allocate deopt_ids for closures separately
-    DeoptIdScope deopt_id_scope(H.thread(), 0);
+    DeoptIdScope deopt_id_scope(thread_, 0);
 
     ReadConstantPool(function, pool);
   }
@@ -296,7 +206,7 @@
   // Read bytecode and attach to function.
   const Bytecode& bytecode = Bytecode::Handle(Z, ReadBytecode(pool));
   function.AttachBytecode(bytecode);
-  ASSERT(bytecode.GetBinary(Z) == helper_->reader_.typed_data()->raw());
+  ASSERT(bytecode.GetBinary(Z) == reader_.typed_data()->raw());
 
   ReadExceptionsTable(bytecode, has_exceptions_table);
 
@@ -312,7 +222,7 @@
   // Record the corresponding stores if field guards are enabled.
   if (has_nullable_fields) {
     ASSERT(function.IsGenerativeConstructor());
-    const intptr_t num_fields = helper_->ReadListLength();
+    const intptr_t num_fields = reader_.ReadListLength();
     if (I->use_field_guards()) {
       Field& field = Field::Handle(Z);
       for (intptr_t i = 0; i < num_fields; i++) {
@@ -333,7 +243,7 @@
     for (intptr_t i = 0; i < num_closures; i++) {
       closure ^= closures_->At(i);
 
-      const intptr_t flags = helper_->reader_.ReadUInt();
+      const intptr_t flags = reader_.ReadUInt();
       const bool has_exceptions_table =
           (flags & ClosureCode::kHasExceptionsTableFlag) != 0;
       const bool has_source_positions =
@@ -344,7 +254,7 @@
       // Read closure bytecode and attach to closure function.
       closure_bytecode = ReadBytecode(pool);
       closure.AttachBytecode(closure_bytecode);
-      ASSERT(bytecode.GetBinary(Z) == helper_->reader_.typed_data()->raw());
+      ASSERT(bytecode.GetBinary(Z) == reader_.typed_data()->raw());
 
       ReadExceptionsTable(closure_bytecode, has_exceptions_table);
 
@@ -368,7 +278,7 @@
   const int kHasTypeParamsFlag = 1 << 2;
   const int kHasSourcePositionsFlag = 1 << 3;
 
-  const intptr_t flags = helper_->reader_.ReadUInt();
+  const intptr_t flags = reader_.ReadUInt();
 
   Object& parent = Object::Handle(Z, ReadObject());
   if (!parent.IsFunction()) {
@@ -384,8 +294,8 @@
   TokenPosition position = TokenPosition::kNoSource;
   TokenPosition end_position = TokenPosition::kNoSource;
   if ((flags & kHasSourcePositionsFlag) != 0) {
-    position = helper_->ReadPosition();
-    end_position = helper_->ReadPosition();
+    position = reader_.ReadPosition();
+    end_position = reader_.ReadPosition();
   }
 
   const Function& closure = Function::Handle(
@@ -419,12 +329,11 @@
   }
 
   const intptr_t kImplicitClosureParam = 1;
-  const intptr_t num_params =
-      kImplicitClosureParam + helper_->reader_.ReadUInt();
+  const intptr_t num_params = kImplicitClosureParam + reader_.ReadUInt();
 
   intptr_t num_required_params = num_params;
   if (has_optional_positional_params || has_optional_named_params) {
-    num_required_params = kImplicitClosureParam + helper_->reader_.ReadUInt();
+    num_required_params = kImplicitClosureParam + reader_.ReadUInt();
   }
 
   func.set_num_fixed_parameters(num_required_params);
@@ -470,7 +379,7 @@
     const Function& parameterized_function) {
   ASSERT(parameterized_class.IsNull() != parameterized_function.IsNull());
 
-  const intptr_t num_type_params = helper_->reader_.ReadUInt();
+  const intptr_t num_type_params = reader_.ReadUInt();
   ASSERT(num_type_params > 0);
 
   // First setup the type parameters, so if any of the following code uses it
@@ -566,18 +475,18 @@
   const String* simpleInstanceOf = nullptr;
   const intptr_t obj_count = pool.Length();
   for (intptr_t i = 0; i < obj_count; ++i) {
-    const intptr_t tag = helper_->ReadTag();
+    const intptr_t tag = reader_.ReadTag();
     switch (tag) {
       case ConstantPoolTag::kInvalid:
         UNREACHABLE();
       case ConstantPoolTag::kICData: {
-        intptr_t flags = helper_->ReadByte();
+        intptr_t flags = reader_.ReadByte();
         InvocationKind kind =
             static_cast<InvocationKind>(flags & kInvocationKindMask);
         bool isDynamic = (flags & kFlagDynamic) != 0;
         name ^= ReadObject();
         ASSERT(name.IsSymbol());
-        intptr_t arg_desc_index = helper_->ReadUInt();
+        intptr_t arg_desc_index = reader_.ReadUInt();
         ASSERT(arg_desc_index < i);
         array ^= pool.ObjectAt(arg_desc_index);
         if (simpleInstanceOf == nullptr) {
@@ -607,7 +516,7 @@
         obj =
             ICData::New(function, name,
                         array,  // Arguments descriptor.
-                        H.thread()->compiler_state().GetNextDeoptId(),
+                        thread_->compiler_state().GetNextDeoptId(),
                         checked_argument_count, ICData::RebindRule::kInstance);
       } break;
       case ConstantPoolTag::kStaticField:
@@ -640,7 +549,7 @@
         ASSERT(obj.IsAbstractType());
         break;
       case ConstantPoolTag::kClosureFunction: {
-        intptr_t closure_index = helper_->ReadUInt();
+        intptr_t closure_index = reader_.ReadUInt();
         obj = closures_->At(closure_index);
         ASSERT(obj.IsFunction());
       } break;
@@ -705,8 +614,8 @@
   TIMELINE_DURATION(Thread::Current(), CompilerVerbose,
                     "BytecodeReaderHelper::ReadBytecode");
 #endif  // defined(SUPPORT_TIMELINE)
-  intptr_t size = helper_->ReadUInt();
-  intptr_t offset = helper_->reader_.offset();
+  intptr_t size = reader_.ReadUInt();
+  intptr_t offset = reader_.offset();
 
   static_assert(KernelBytecode::kMinSupportedBytecodeFormatVersion < 7,
                 "Cleanup support for old bytecode format versions");
@@ -715,8 +624,8 @@
     offset = Utils::RoundUp(offset, kAlignment);
   }
 
-  const uint8_t* data = helper_->reader_.BufferAt(offset);
-  helper_->reader_.set_offset(offset + size);
+  const uint8_t* data = reader_.BufferAt(offset);
+  reader_.set_offset(offset + size);
 
   // Create and return bytecode object.
   return Bytecode::New(reinterpret_cast<uword>(data), size, offset, pool);
@@ -730,7 +639,7 @@
 #endif
 
   const intptr_t try_block_count =
-      has_exceptions_table ? helper_->reader_.ReadListLength() : 0;
+      has_exceptions_table ? reader_.ReadListLength() : 0;
   if (try_block_count > 0) {
     const ObjectPool& pool = ObjectPool::Handle(Z, bytecode.object_pool());
     AbstractType& handler_type = AbstractType::Handle(Z);
@@ -746,28 +655,28 @@
     // Encoding of ExceptionsTable is described in
     // pkg/vm/lib/bytecode/exceptions.dart.
     for (intptr_t try_index = 0; try_index < try_block_count; try_index++) {
-      intptr_t outer_try_index_plus1 = helper_->reader_.ReadUInt();
+      intptr_t outer_try_index_plus1 = reader_.ReadUInt();
       intptr_t outer_try_index = outer_try_index_plus1 - 1;
       // PcDescriptors are expressed in terms of return addresses.
-      intptr_t start_pc = KernelBytecode::BytecodePcToOffset(
-          helper_->reader_.ReadUInt() << kPCShifter,
-          /* is_return_address = */ true);
-      intptr_t end_pc = KernelBytecode::BytecodePcToOffset(
-          helper_->reader_.ReadUInt() << kPCShifter,
-          /* is_return_address = */ true);
-      intptr_t handler_pc = KernelBytecode::BytecodePcToOffset(
-          helper_->reader_.ReadUInt() << kPCShifter,
-          /* is_return_address = */ false);
-      uint8_t flags = helper_->reader_.ReadByte();
+      intptr_t start_pc =
+          KernelBytecode::BytecodePcToOffset(reader_.ReadUInt() << kPCShifter,
+                                             /* is_return_address = */ true);
+      intptr_t end_pc =
+          KernelBytecode::BytecodePcToOffset(reader_.ReadUInt() << kPCShifter,
+                                             /* is_return_address = */ true);
+      intptr_t handler_pc =
+          KernelBytecode::BytecodePcToOffset(reader_.ReadUInt() << kPCShifter,
+                                             /* is_return_address = */ false);
+      uint8_t flags = reader_.ReadByte();
       const uint8_t kFlagNeedsStackTrace = 1 << 0;
       const uint8_t kFlagIsSynthetic = 1 << 1;
       const bool needs_stacktrace = (flags & kFlagNeedsStackTrace) != 0;
       const bool is_generated = (flags & kFlagIsSynthetic) != 0;
-      intptr_t type_count = helper_->reader_.ReadListLength();
+      intptr_t type_count = reader_.ReadListLength();
       ASSERT(type_count > 0);
       handler_types = Array::New(type_count, Heap::kOld);
       for (intptr_t i = 0; i < type_count; i++) {
-        intptr_t type_index = helper_->reader_.ReadUInt();
+        intptr_t type_index = reader_.ReadUInt();
         ASSERT(type_index < pool.Length());
         handler_type ^= pool.ObjectAt(type_index);
         handler_types.SetAt(i, handler_type);
@@ -802,7 +711,7 @@
     return;
   }
 
-  intptr_t offset = helper_->reader_.ReadUInt();
+  intptr_t offset = reader_.ReadUInt();
   bytecode.set_source_positions_binary_offset(
       bytecode_component_->GetSourcePositionsOffset() + offset);
 }
@@ -813,7 +722,7 @@
     return;
   }
 
-  intptr_t offset = helper_->reader_.ReadUInt();
+  intptr_t offset = reader_.ReadUInt();
   USE(offset);
 
 #if !defined(PRODUCT)
@@ -892,17 +801,16 @@
 RawArray* BytecodeReaderHelper::ReadBytecodeComponent(intptr_t md_offset) {
   ASSERT(Thread::Current()->IsMutatorThread());
 
-  AlternativeReadingScope alt(&helper_->reader_, &H.metadata_payloads(),
-                              md_offset);
+  AlternativeReadingScope alt(&reader_, md_offset);
 
-  const intptr_t start_offset = helper_->reader_.offset();
+  const intptr_t start_offset = reader_.offset();
 
-  intptr_t magic = helper_->reader_.ReadUInt32();
+  intptr_t magic = reader_.ReadUInt32();
   if (magic != KernelBytecode::kMagicValue) {
     FATAL1("Unexpected Dart bytecode magic %" Px, magic);
   }
 
-  const intptr_t version = helper_->reader_.ReadUInt32();
+  const intptr_t version = reader_.ReadUInt32();
   if ((version < KernelBytecode::kMinSupportedBytecodeFormatVersion) ||
       (version > KernelBytecode::kMaxSupportedBytecodeFormatVersion)) {
     FATAL3("Unsupported Dart bytecode format version %" Pd
@@ -914,55 +822,50 @@
   }
   BytecodeReader::UseBytecodeVersion(version);
 
-  helper_->reader_.ReadUInt32();  // Skip stringTable.numItems
-  const intptr_t string_table_offset =
-      start_offset + helper_->reader_.ReadUInt32();
+  reader_.ReadUInt32();  // Skip stringTable.numItems
+  const intptr_t string_table_offset = start_offset + reader_.ReadUInt32();
 
-  helper_->reader_.ReadUInt32();  // Skip objectTable.numItems
-  const intptr_t object_table_offset =
-      start_offset + helper_->reader_.ReadUInt32();
+  reader_.ReadUInt32();  // Skip objectTable.numItems
+  const intptr_t object_table_offset = start_offset + reader_.ReadUInt32();
 
-  helper_->reader_.ReadUInt32();  // Skip main.numItems
-  const intptr_t main_offset = start_offset + helper_->reader_.ReadUInt32();
+  reader_.ReadUInt32();  // Skip main.numItems
+  const intptr_t main_offset = start_offset + reader_.ReadUInt32();
 
-  helper_->reader_.ReadUInt32();  // Skip members.numItems
-  const intptr_t members_offset = start_offset + helper_->reader_.ReadUInt32();
+  reader_.ReadUInt32();  // Skip members.numItems
+  const intptr_t members_offset = start_offset + reader_.ReadUInt32();
 
-  helper_->reader_.ReadUInt32();  // Skip codes.numItems
-  const intptr_t codes_offset = start_offset + helper_->reader_.ReadUInt32();
+  reader_.ReadUInt32();  // Skip codes.numItems
+  const intptr_t codes_offset = start_offset + reader_.ReadUInt32();
 
-  helper_->reader_.ReadUInt32();  // Skip sourcePositions.numItems
-  const intptr_t sources_positions_offset =
-      start_offset + helper_->reader_.ReadUInt32();
+  reader_.ReadUInt32();  // Skip sourcePositions.numItems
+  const intptr_t sources_positions_offset = start_offset + reader_.ReadUInt32();
 
   intptr_t local_variables_offset = 0;
   static_assert(KernelBytecode::kMinSupportedBytecodeFormatVersion < 9,
                 "Cleanup condition");
   if (version >= 9) {
-    helper_->reader_.ReadUInt32();  // Skip localVariables.numItems
-    local_variables_offset = start_offset + helper_->reader_.ReadUInt32();
+    reader_.ReadUInt32();  // Skip localVariables.numItems
+    local_variables_offset = start_offset + reader_.ReadUInt32();
   }
 
-  helper_->reader_.ReadUInt32();  // Skip annotations.numItems
-  const intptr_t annotations_offset =
-      start_offset + helper_->reader_.ReadUInt32();
+  reader_.ReadUInt32();  // Skip annotations.numItems
+  const intptr_t annotations_offset = start_offset + 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();
+  reader_.set_offset(string_table_offset);
+  const intptr_t num_one_byte_strings = reader_.ReadUInt32();
+  const intptr_t num_two_byte_strings = reader_.ReadUInt32();
   const intptr_t strings_contents_offset =
-      helper_->reader_.offset() +
-      (num_one_byte_strings + num_two_byte_strings) * 4;
+      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();
+  reader_.set_offset(object_table_offset);
+  const intptr_t num_objects = reader_.ReadUInt();
+  const intptr_t objects_size = 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 intptr_t objects_contents_offset = reader_.offset();
+  reader_.set_offset(objects_contents_offset + objects_size);
 
   const Array& bytecode_component_array = Array::Handle(
       Z, BytecodeComponentData::New(
@@ -976,7 +879,7 @@
   // Read object offsets.
   Smi& offs = Smi::Handle(Z);
   for (intptr_t i = 0; i < num_objects; ++i) {
-    offs = Smi::New(helper_->reader_.ReadUInt());
+    offs = Smi::New(reader_.ReadUInt());
     bytecode_component.SetObject(i, offs);
   }
 
@@ -986,7 +889,7 @@
 }
 
 RawObject* BytecodeReaderHelper::ReadObject() {
-  uint32_t header = helper_->reader_.ReadUInt();
+  uint32_t header = reader_.ReadUInt();
   if ((header & kReferenceBit) != 0) {
     intptr_t index = header >> kIndexShift;
     if (index == 0) {
@@ -999,16 +902,14 @@
     // Object is not loaded yet.
     intptr_t offset = bytecode_component_->GetObjectsContentsOffset() +
                       Smi::Value(Smi::RawCast(obj));
-    AlternativeReadingScope alt(&helper_->reader_, &H.metadata_payloads(),
-                                offset);
-    header = helper_->reader_.ReadUInt();
+    AlternativeReadingScope alt(&reader_, offset);
+    header = reader_.ReadUInt();
 
     obj = ReadObjectContents(header);
     ASSERT(obj->IsHeapObject());
     {
-      Thread* thread = H.thread();
-      REUSABLE_OBJECT_HANDLESCOPE(thread);
-      Object& obj_handle = thread->ObjectHandle();
+      REUSABLE_OBJECT_HANDLESCOPE(thread_);
+      Object& obj_handle = thread_->ObjectHandle();
       obj_handle = obj;
       bytecode_component_->SetObject(index, obj_handle);
     }
@@ -1024,7 +925,7 @@
   pieces.Add(String::Handle(Z, cls.Name()));
   pieces.Add(Symbols::Dot());
   pieces.Add(name);
-  return Symbols::FromConcatAll(H.thread(), pieces);
+  return Symbols::FromConcatAll(thread_, pieces);
 }
 
 RawObject* BytecodeReaderHelper::ReadObjectContents(uint32_t header) {
@@ -1079,7 +980,7 @@
       break;
     case kLibrary: {
       const String& uri = String::Handle(Z, ReadString());
-      RawLibrary* library = Library::LookupLibrary(H.thread(), uri);
+      RawLibrary* library = Library::LookupLibrary(thread_, uri);
       if (library == Library::null()) {
         FATAL1("Unable to find library %s", uri.ToCString());
       }
@@ -1139,7 +1040,7 @@
     }
     case kClosure: {
       ReadObject();  // Skip enclosing member.
-      const intptr_t closure_index = helper_->reader_.ReadUInt();
+      const intptr_t closure_index = reader_.ReadUInt();
       return closures_->At(closure_index);
     }
     case kSimpleType: {
@@ -1156,7 +1057,7 @@
     }
     case kTypeParameter: {
       Object& parent = Object::Handle(Z, ReadObject());
-      const intptr_t index_in_parent = helper_->reader_.ReadUInt();
+      const intptr_t index_in_parent = reader_.ReadUInt();
       TypeArguments& type_parameters = TypeArguments::Handle(Z);
       if (parent.IsClass()) {
         type_parameters = Class::Cast(parent).type_parameters();
@@ -1230,13 +1131,13 @@
       return ReadConstObject(tag);
     }
     case kArgDesc: {
-      const intptr_t num_arguments = helper_->ReadUInt();
+      const intptr_t num_arguments = reader_.ReadUInt();
       const intptr_t num_type_args =
-          ((flags & kFlagHasTypeArgs) != 0) ? helper_->ReadUInt() : 0;
+          ((flags & kFlagHasTypeArgs) != 0) ? reader_.ReadUInt() : 0;
       if ((flags & kFlagHasNamedArgs) == 0) {
         return ArgumentsDescriptor::New(num_type_args, num_arguments);
       } else {
-        const intptr_t num_arg_names = helper_->ReadListLength();
+        const intptr_t num_arg_names = reader_.ReadListLength();
         const Array& array = Array::Handle(Z, Array::New(num_arg_names));
         String& name = String::Handle(Z);
         for (intptr_t i = 0; i < num_arg_names; ++i) {
@@ -1281,7 +1182,7 @@
             TypeArguments::Handle(Z, type.arguments());
         obj.SetTypeArguments(type_args);
       }
-      const intptr_t num_fields = helper_->ReadUInt();
+      const intptr_t num_fields = reader_.ReadUInt();
       Field& field = Field::Handle(Z);
       Object& value = Object::Handle(Z);
       for (intptr_t i = 0; i < num_fields; ++i) {
@@ -1292,7 +1193,7 @@
       return H.Canonicalize(obj);
     }
     case kInt: {
-      const int64_t value = helper_->reader_.ReadSLEB128AsInt64();
+      const int64_t value = reader_.ReadSLEB128AsInt64();
       if (Smi::IsValid(value)) {
         return Smi::New(static_cast<intptr_t>(value));
       }
@@ -1300,7 +1201,7 @@
       return H.Canonicalize(obj);
     }
     case kDouble: {
-      const int64_t bits = helper_->reader_.ReadSLEB128AsInt64();
+      const int64_t bits = reader_.ReadSLEB128AsInt64();
       double value = bit_cast<double, int64_t>(bits);
       const Double& obj = Double::Handle(Z, Double::New(value, Heap::kOld));
       return H.Canonicalize(obj);
@@ -1308,7 +1209,7 @@
     case kList: {
       const AbstractType& elem_type =
           AbstractType::CheckedHandle(Z, ReadObject());
-      const intptr_t length = helper_->ReadUInt();
+      const intptr_t length = reader_.ReadUInt();
       const Array& array = Array::Handle(Z, Array::New(length, elem_type));
       Object& value = Object::Handle(Z);
       for (intptr_t i = 0; i < length; ++i) {
@@ -1328,7 +1229,7 @@
       return H.Canonicalize(Instance::Cast(obj));
     }
     case kBool: {
-      bool is_true = helper_->ReadByte() != 0;
+      bool is_true = reader_.ReadByte() != 0;
       return is_true ? Bool::True().raw() : Bool::False().raw();
     }
     case kSymbol: {
@@ -1368,21 +1269,21 @@
   const int kHeaderFields = 2;
   const int kUInt32Size = 4;
 
-  uint32_t ref = helper_->reader_.ReadUInt();
+  uint32_t ref = reader_.ReadUInt();
   const bool isOneByteString = (ref & kFlagTwoByteString) == 0;
   intptr_t index = ref >> 1;
 
   if (!isOneByteString) {
-    const uint32_t num_one_byte_strings = helper_->reader_.ReadUInt32At(
-        bytecode_component_->GetStringsHeaderOffset());
+    const uint32_t num_one_byte_strings =
+        reader_.ReadUInt32At(bytecode_component_->GetStringsHeaderOffset());
     index += num_one_byte_strings;
   }
 
-  AlternativeReadingScope alt(&helper_->reader_, &H.metadata_payloads(),
+  AlternativeReadingScope alt(&reader_,
                               bytecode_component_->GetStringsHeaderOffset() +
                                   (kHeaderFields + index - 1) * kUInt32Size);
-  intptr_t start_offs = helper_->ReadUInt32();
-  intptr_t end_offs = helper_->ReadUInt32();
+  intptr_t start_offs = reader_.ReadUInt32();
+  intptr_t end_offs = reader_.ReadUInt32();
   if (index == 0) {
     // For the 0-th string we read a header field instead of end offset of
     // the previous string.
@@ -1392,14 +1293,14 @@
   // Bytecode strings reside in ExternalTypedData which is not movable by GC,
   // so it is OK to take a direct pointer to string characters even if
   // symbol allocation triggers GC.
-  const uint8_t* data = helper_->reader_.BufferAt(
+  const uint8_t* data = reader_.BufferAt(
       bytecode_component_->GetStringsContentsOffset() + start_offs);
 
   if (is_canonical) {
     if (isOneByteString) {
-      return Symbols::FromLatin1(H.thread(), data, end_offs - start_offs);
+      return Symbols::FromLatin1(thread_, data, end_offs - start_offs);
     } else {
-      return Symbols::FromUTF16(H.thread(),
+      return Symbols::FromUTF16(thread_,
                                 reinterpret_cast<const uint16_t*>(data),
                                 (end_offs - start_offs) >> 1);
     }
@@ -1415,7 +1316,7 @@
 
 RawTypeArguments* BytecodeReaderHelper::ReadTypeArguments(
     const Class& instantiator) {
-  const intptr_t length = helper_->reader_.ReadUInt();
+  const intptr_t length = reader_.ReadUInt();
   TypeArguments& type_arguments =
       TypeArguments::ZoneHandle(Z, TypeArguments::New(length));
   AbstractType& type = AbstractType::Handle(Z);
@@ -1451,10 +1352,9 @@
 
   const intptr_t offset =
       bytecode_component_->GetMembersOffset() + members_offset;
-  AlternativeReadingScope alt_md(&helper_->reader_, &H.metadata_payloads(),
-                                 offset);
+  AlternativeReadingScope alt_md(&reader_, offset);
 
-  const intptr_t num_functions = helper_->reader_.ReadUInt();
+  const intptr_t num_functions = reader_.ReadUInt();
   functions_ = &Array::Handle(Z, Array::New(num_functions, Heap::kOld));
   function_index_ = 0;
 
@@ -1482,7 +1382,7 @@
   const int kHasPragmaFlag = 1 << 11;
   const int kHasCustomScriptFlag = 1 << 12;
 
-  const int num_fields = helper_->ReadListLength();
+  const int num_fields = reader_.ReadListLength();
   if ((num_fields == 0) && !cls.is_enum_class()) {
     return;
   }
@@ -1496,7 +1396,7 @@
   Function& function = Function::Handle(Z);
 
   for (intptr_t i = 0; i < num_fields; ++i) {
-    intptr_t flags = helper_->reader_.ReadUInt();
+    intptr_t flags = reader_.ReadUInt();
 
     const bool is_static = (flags & kIsStaticFlag) != 0;
     const bool is_final = (flags & kIsFinalFlag) != 0;
@@ -1517,8 +1417,8 @@
     TokenPosition position = TokenPosition::kNoSource;
     TokenPosition end_position = TokenPosition::kNoSource;
     if ((flags & kHasSourcePositionsFlag) != 0) {
-      position = helper_->ReadPosition();
-      end_position = helper_->ReadPosition();
+      position = reader_.ReadPosition();
+      end_position = reader_.ReadPosition();
     }
 
     field = Field::New(name, is_static, is_final, is_const,
@@ -1552,7 +1452,7 @@
     }
 
     if (has_initializer && is_static) {
-      const intptr_t code_offset = helper_->reader_.ReadUInt();
+      const intptr_t code_offset = reader_.ReadUInt();
       field.set_bytecode_offset(code_offset +
                                 bytecode_component_->GetCodesOffset());
       field.SetStaticValue(Object::sentinel(), true);
@@ -1600,8 +1500,8 @@
     }
 
     if ((flags & kHasAnnotationsFlag) != 0) {
-      intptr_t annotations_offset = helper_->reader_.ReadUInt() +
-                                    bytecode_component_->GetAnnotationsOffset();
+      intptr_t annotations_offset =
+          reader_.ReadUInt() + bytecode_component_->GetAnnotationsOffset();
       ASSERT(annotations_offset > 0);
 
       if (FLAG_enable_mirrors || has_pragma) {
@@ -1611,9 +1511,8 @@
         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);
+          NoOOBMessageScope no_msg_scope(thread_);
+          NoReloadScope no_reload_scope(thread_->isolate(), thread_);
           library.GetMetadata(field);
         }
       }
@@ -1689,7 +1588,7 @@
   const int kHasPragmaFlag = 1 << 21;
   const int kHasCustomScriptFlag = 1 << 22;
 
-  const intptr_t num_functions = helper_->ReadListLength();
+  const intptr_t num_functions = reader_.ReadListLength();
   ASSERT(function_index_ + num_functions == functions_->Length());
 
   if (function_index_ + num_functions == 0) {
@@ -1704,7 +1603,7 @@
   AbstractType& type = AbstractType::Handle(Z);
 
   for (intptr_t i = 0; i < num_functions; ++i) {
-    intptr_t flags = helper_->reader_.ReadUInt();
+    intptr_t flags = reader_.ReadUInt();
 
     const bool is_static = (flags & kIsStaticFlag) != 0;
     const bool is_factory = (flags & kIsFactoryFlag) != 0;
@@ -1723,8 +1622,8 @@
     TokenPosition position = TokenPosition::kNoSource;
     TokenPosition end_position = TokenPosition::kNoSource;
     if ((flags & kHasSourcePositionsFlag) != 0) {
-      position = helper_->ReadPosition();
-      end_position = helper_->ReadPosition();
+      position = reader_.ReadPosition();
+      end_position = reader_.ReadPosition();
     }
 
     RawFunction::Kind kind = RawFunction::kRegularFunction;
@@ -1774,13 +1673,12 @@
     }
 
     const intptr_t num_implicit_params = (!is_static || is_factory) ? 1 : 0;
-    const intptr_t num_params =
-        num_implicit_params + helper_->reader_.ReadUInt();
+    const intptr_t num_params = num_implicit_params + reader_.ReadUInt();
 
     intptr_t num_required_params = num_params;
     if ((flags & (kHasOptionalPositionalParamsFlag |
                   kHasOptionalNamedParamsFlag)) != 0) {
-      num_required_params = num_implicit_params + helper_->reader_.ReadUInt();
+      num_required_params = num_implicit_params + reader_.ReadUInt();
     }
 
     function.set_num_fixed_parameters(num_required_params);
@@ -1822,15 +1720,14 @@
     }
 
     if ((flags & kIsAbstractFlag) == 0) {
-      const intptr_t code_offset = helper_->reader_.ReadUInt();
+      const intptr_t code_offset = 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();
+          reader_.ReadUInt() + bytecode_component_->GetAnnotationsOffset();
       ASSERT(annotations_offset > 0);
 
       if (FLAG_enable_mirrors || has_pragma) {
@@ -1885,17 +1782,16 @@
   ASSERT(is_covariant->length() == num_params);
   ASSERT(is_generic_covariant_impl->length() == num_params);
 
-  AlternativeReadingScope alt(&helper_->reader_, &H.metadata_payloads(),
-                              function.bytecode_offset());
+  AlternativeReadingScope alt(&reader_, function.bytecode_offset());
 
-  const intptr_t code_flags = helper_->reader_.ReadUInt();
+  const intptr_t code_flags = reader_.ReadUInt();
   if ((code_flags & Code::kHasParameterFlagsFlag) != 0) {
-    const intptr_t num_explicit_params = helper_->reader_.ReadUInt();
+    const intptr_t num_explicit_params = 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();
+      const intptr_t flags = reader_.ReadUInt();
 
       if ((flags & Parameter::kIsCovariantFlag) != 0) {
         is_covariant->Add(i);
@@ -1980,10 +1876,9 @@
   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());
+  AlternativeReadingScope alt(&reader_, target.bytecode_offset());
 
-  const intptr_t flags = helper_->reader_.ReadUInt();
+  const intptr_t flags = reader_.ReadUInt();
   const bool has_parameters_flags = (flags & Code::kHasParameterFlagsFlag) != 0;
   const bool has_forwarding_stub_target =
       (flags & Code::kHasForwardingStubTargetFlag) != 0;
@@ -1991,10 +1886,10 @@
       (flags & Code::kHasDefaultFunctionTypeArgsFlag) != 0;
 
   if (has_parameters_flags) {
-    const intptr_t num_params = helper_->reader_.ReadUInt();
+    const intptr_t num_params = 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();
+      const intptr_t flags = reader_.ReadUInt();
 
       bool is_covariant = (flags & Parameter::kIsCovariantFlag) != 0;
       bool is_generic_covariant_impl =
@@ -2019,7 +1914,7 @@
   }
 
   if (has_forwarding_stub_target) {
-    const intptr_t cp_index = helper_->reader_.ReadUInt();
+    const intptr_t cp_index = reader_.ReadUInt();
     const auto& forwarding_stub_target =
         Function::CheckedZoneHandle(Z, obj_pool.ObjectAt(cp_index));
     parsed_function->MarkForwardingStub(&forwarding_stub_target);
@@ -2027,7 +1922,7 @@
 
   if (has_default_function_type_args) {
     ASSERT(function.IsGeneric());
-    const intptr_t cp_index = helper_->reader_.ReadUInt();
+    const intptr_t cp_index = reader_.ReadUInt();
     const auto& type_args =
         TypeArguments::CheckedHandle(Z, obj_pool.ObjectAt(cp_index));
     parsed_function->SetDefaultFunctionTypeArguments(type_args);
@@ -2200,40 +2095,92 @@
 
   VMTagScope tagScope(thread, VMTag::kLoadBytecodeTagId);
 
+#if defined(SUPPORT_TIMELINE)
+  TimelineDurationScope tds(Thread::Current(), Timeline::GetCompilerStream(),
+                            "BytecodeReader::ReadFunctionBytecode");
+  // This increases bytecode reading time by ~7%, so only keep it around for
+  // debugging.
+#if defined(DEBUG)
+  tds.SetNumArguments(1);
+  tds.CopyArgument(0, "Function", function.ToQualifiedCString());
+#endif  // defined(DEBUG)
+#endif  // !defined(SUPPORT_TIMELINE)
+
   LongJumpScope jump;
   if (setjmp(*jump.Set()) == 0) {
     StackZone stack_zone(thread);
     Zone* const zone = stack_zone.GetZone();
     HANDLESCOPE(thread);
-    CompilerState compiler_state(thread);
 
-    const Script& script = Script::Handle(zone, function.script());
-    TranslationHelper translation_helper(thread);
-    translation_helper.InitFromScript(script);
+    auto& bytecode = Bytecode::Handle(zone);
 
-    KernelReaderHelper reader_helper(
-        zone, &translation_helper, script,
-        ExternalTypedData::Handle(zone, function.KernelData()),
-        function.KernelDataProgramOffset());
-    ActiveClass active_class;
+    switch (function.kind()) {
+      case RawFunction::kImplicitGetter:
+        bytecode = Object::implicit_getter_bytecode().raw();
+        break;
+      case RawFunction::kImplicitSetter:
+        bytecode = Object::implicit_setter_bytecode().raw();
+        break;
+      case RawFunction::kImplicitStaticGetter:
+        if (!IsStaticFieldGetterGeneratedAsInitializer(function, zone)) {
+          bytecode = Object::implicit_static_getter_bytecode().raw();
+        }
+        break;
+      case RawFunction::kMethodExtractor:
+        bytecode = Object::method_extractor_bytecode().raw();
+        break;
+      case RawFunction::kInvokeFieldDispatcher:
+        if (Class::Handle(function.Owner()).id() == kClosureCid) {
+          bytecode = Object::invoke_closure_bytecode().raw();
+        } else {
+          bytecode = Object::invoke_field_bytecode().raw();
+        }
+        break;
+      case RawFunction::kNoSuchMethodDispatcher:
+        bytecode = Object::nsm_dispatcher_bytecode().raw();
+        break;
+      default:
+        break;
+    }
 
-    BytecodeMetadataHelper bytecode_metadata_helper(&reader_helper,
-                                                    &active_class);
+    if (!bytecode.IsNull()) {
+      function.AttachBytecode(bytecode);
+    } else if (function.is_declared_in_bytecode()) {
+      const intptr_t code_offset = function.bytecode_offset();
+      if (code_offset != 0) {
+        CompilerState compiler_state(thread);
 
-    // Setup a [ActiveClassScope] and a [ActiveMemberScope] which will be used
-    // e.g. for type translation.
-    const Class& klass = Class::Handle(zone, function.Owner());
-    Function& outermost_function =
-        Function::Handle(zone, function.GetOutermostFunction());
+        const Script& script = Script::Handle(zone, function.script());
+        TranslationHelper translation_helper(thread);
+        translation_helper.InitFromScript(script);
 
-    ActiveClassScope active_class_scope(&active_class, &klass);
-    ActiveMemberScope active_member(&active_class, &outermost_function);
-    ActiveTypeParametersScope active_type_params(&active_class, function, zone);
+        ActiveClass active_class;
 
-    bytecode_metadata_helper.ReadMetadata(function);
+        // Setup a [ActiveClassScope] and a [ActiveMemberScope] which will be
+        // used e.g. for type translation.
+        const Class& klass = Class::Handle(zone, function.Owner());
+        Function& outermost_function =
+            Function::Handle(zone, function.GetOutermostFunction());
+
+        ActiveClassScope active_class_scope(&active_class, &klass);
+        ActiveMemberScope active_member(&active_class, &outermost_function);
+        ActiveTypeParametersScope active_type_params(&active_class, function,
+                                                     zone);
+
+        BytecodeComponentData bytecode_component(
+            Array::Handle(zone, translation_helper.GetBytecodeComponent()));
+        ASSERT(!bytecode_component.IsNull());
+        BytecodeReaderHelper bytecode_reader(&translation_helper, &active_class,
+                                             &bytecode_component);
+
+        bytecode_reader.ReadCode(function, code_offset);
+      }
+    }
 
 #if !defined(PRODUCT)
-    thread->isolate()->debugger()->NotifyBytecodeLoaded(function);
+    if (function.HasBytecode()) {
+      thread->isolate()->debugger()->NotifyBytecodeLoaded(function);
+    }
 #endif
 
     return Error::null();
@@ -2253,17 +2200,18 @@
   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);
+  BytecodeComponentData bytecode_component(
+      Array::Handle(zone, translation_helper.GetBytecodeComponent()));
+  ASSERT(!bytecode_component.IsNull());
+  BytecodeReaderHelper bytecode_reader(&translation_helper, &active_class,
+                                       &bytecode_component);
 
-  return bytecode_metadata_helper.ReadAnnotation(
-      annotation_field.bytecode_offset());
+  AlternativeReadingScope alt(&bytecode_reader.reader(),
+                              annotation_field.bytecode_offset());
+
+  return bytecode_reader.ReadObject();
 }
 
 #if !defined(PRODUCT)
diff --git a/runtime/vm/compiler/frontend/bytecode_reader.h b/runtime/vm/compiler/frontend/bytecode_reader.h
index 9353029..753bff9 100644
--- a/runtime/vm/compiler/frontend/bytecode_reader.h
+++ b/runtime/vm/compiler/frontend/bytecode_reader.h
@@ -24,10 +24,6 @@
   explicit BytecodeMetadataHelper(KernelReaderHelper* helper,
                                   ActiveClass* active_class);
 
-  bool HasBytecode(intptr_t node_offset);
-
-  void ReadMetadata(const Function& function);
-
   void ParseBytecodeFunction(ParsedFunction* parsed_function);
   void ParseBytecodeImplicitClosureFunction(ParsedFunction* parsed_function);
 
@@ -36,9 +32,6 @@
   // 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();
@@ -53,10 +46,12 @@
 // Helper class for reading bytecode.
 class BytecodeReaderHelper : public ValueObject {
  public:
-  explicit BytecodeReaderHelper(KernelReaderHelper* helper,
+  explicit BytecodeReaderHelper(TranslationHelper* translation_helper,
                                 ActiveClass* active_class,
                                 BytecodeComponentData* bytecode_component);
 
+  Reader& reader() { return reader_; }
+
   void ReadCode(const Function& function, intptr_t code_offset);
 
   void ReadMembers(const Class& cls,
@@ -196,9 +191,10 @@
                               const Function& function,
                               const Function& target);
 
-  KernelReaderHelper* const helper_;
+  Reader reader_;
   TranslationHelper& translation_helper_;
   ActiveClass* const active_class_;
+  Thread* const thread_;
   Zone* const zone_;
   BytecodeComponentData* const bytecode_component_;
   Array* closures_ = nullptr;
diff --git a/runtime/vm/compiler/frontend/kernel_to_il.cc b/runtime/vm/compiler/frontend/kernel_to_il.cc
index f3524f5..b8be355 100644
--- a/runtime/vm/compiler/frontend/kernel_to_il.cc
+++ b/runtime/vm/compiler/frontend/kernel_to_il.cc
@@ -1033,13 +1033,13 @@
   // instructions!
   body += LoadLocal(view_object);
   body += LoadLocal(typed_data);
-  body += LoadUntagged(TypedDataBase::data_field_offset());
+  body += LoadUntagged(compiler::target::TypedDataBase::data_field_offset());
   body += ConvertUntaggedToIntptr();
   body += LoadLocal(offset_in_bytes);
   body += UnboxSmiToIntptr();
   body += AddIntptrIntegers();
   body += ConvertIntptrToUntagged();
-  body += StoreUntagged(TypedDataView::data_field_offset());
+  body += StoreUntagged(compiler::target::TypedDataBase::data_field_offset());
 
   return body;
 }
@@ -1772,9 +1772,10 @@
     loop_body += LoadLocal(argument_count);
     loop_body += LoadLocal(index);
     loop_body += SmiBinaryOp(Token::kSUB, /*truncate=*/true);
-    loop_body += LoadFpRelativeSlot(
-        kWordSize * compiler::target::frame_layout.param_end_from_fp,
-        CompileType::Dynamic());
+    loop_body +=
+        LoadFpRelativeSlot(compiler::target::kWordSize *
+                               compiler::target::frame_layout.param_end_from_fp,
+                           CompileType::Dynamic());
     loop_body += StoreIndexed(kArrayCid);
 
     // ++i
diff --git a/runtime/vm/compiler/frontend/kernel_translation_helper.cc b/runtime/vm/compiler/frontend/kernel_translation_helper.cc
index fcd1734..b999e21 100644
--- a/runtime/vm/compiler/frontend/kernel_translation_helper.cc
+++ b/runtime/vm/compiler/frontend/kernel_translation_helper.cc
@@ -922,14 +922,11 @@
 }
 
 FieldHelper::FieldHelper(KernelReaderHelper* helper, intptr_t offset)
-    : helper_(helper),
-      next_read_(kStart),
-      has_function_literal_initializer_(false) {
+    : helper_(helper), next_read_(kStart) {
   helper_->SetOffset(offset);
 }
 
-void FieldHelper::ReadUntilExcluding(Field field,
-                                     bool detect_function_literal_initializer) {
+void FieldHelper::ReadUntilExcluding(Field field) {
   if (field <= next_read_) return;
 
   // Ordered with fall-through.
@@ -982,20 +979,6 @@
       FALL_THROUGH;
     case kInitializer:
       if (helper_->ReadTag() == kSomething) {
-        if (detect_function_literal_initializer &&
-            helper_->PeekTag() == kFunctionExpression) {
-          AlternativeReadingScope alt(&helper_->reader_);
-          Tag tag = helper_->ReadTag();
-          ASSERT(tag == kFunctionExpression);
-          helper_->ReadPosition();  // read position.
-
-          FunctionNodeHelper helper(helper_);
-          helper.ReadUntilIncluding(FunctionNodeHelper::kEndPosition);
-
-          has_function_literal_initializer_ = true;
-          function_literal_start_ = helper.position_;
-          function_literal_end_ = helper.end_position_;
-        }
         helper_->SkipExpression();  // read initializer.
       }
       if (++next_read_ == field) return;
diff --git a/runtime/vm/compiler/frontend/kernel_translation_helper.h b/runtime/vm/compiler/frontend/kernel_translation_helper.h
index 4ca7a14..ad4898c 100644
--- a/runtime/vm/compiler/frontend/kernel_translation_helper.h
+++ b/runtime/vm/compiler/frontend/kernel_translation_helper.h
@@ -416,9 +416,7 @@
   };
 
   explicit FieldHelper(KernelReaderHelper* helper)
-      : helper_(helper),
-        next_read_(kStart),
-        has_function_literal_initializer_(false) {}
+      : helper_(helper), next_read_(kStart) {}
 
   FieldHelper(KernelReaderHelper* helper, intptr_t offset);
 
@@ -426,8 +424,7 @@
     ReadUntilExcluding(static_cast<Field>(static_cast<int>(field) + 1));
   }
 
-  void ReadUntilExcluding(Field field,
-                          bool detect_function_literal_initializer = false);
+  void ReadUntilExcluding(Field field);
 
   void SetNext(Field field) { next_read_ = field; }
   void SetJustRead(Field field) { next_read_ = field + 1; }
@@ -440,15 +437,6 @@
     return (flags_ & kIsGenericCovariantImpl) != 0;
   }
 
-  bool FieldHasFunctionLiteralInitializer(TokenPosition* start,
-                                          TokenPosition* end) {
-    if (has_function_literal_initializer_) {
-      *start = function_literal_start_;
-      *end = function_literal_end_;
-    }
-    return has_function_literal_initializer_;
-  }
-
   NameIndex canonical_name_;
   TokenPosition position_;
   TokenPosition end_position_;
@@ -460,10 +448,6 @@
   KernelReaderHelper* helper_;
   intptr_t next_read_;
 
-  bool has_function_literal_initializer_;
-  TokenPosition function_literal_start_;
-  TokenPosition function_literal_end_;
-
   DISALLOW_COPY_AND_ASSIGN(FieldHelper);
 };
 
diff --git a/runtime/vm/compiler/frontend/prologue_builder.cc b/runtime/vm/compiler/frontend/prologue_builder.cc
index f0cb2cf..d4f7829 100644
--- a/runtime/vm/compiler/frontend/prologue_builder.cc
+++ b/runtime/vm/compiler/frontend/prologue_builder.cc
@@ -190,8 +190,9 @@
   for (; param < num_fixed_params; ++param) {
     copy_args_prologue += LoadLocal(optional_count_var);
     copy_args_prologue += LoadFpRelativeSlot(
-        kWordSize * (compiler::target::frame_layout.param_end_from_fp +
-                     num_fixed_params - param),
+        compiler::target::kWordSize *
+            (compiler::target::frame_layout.param_end_from_fp +
+             num_fixed_params - param),
         ParameterType(ParameterVariable(param)));
     copy_args_prologue +=
         StoreLocalRaw(TokenPosition::kNoSource, ParameterVariable(param));
@@ -211,8 +212,9 @@
       Fragment good(supplied);
       good += LoadLocal(optional_count_var);
       good += LoadFpRelativeSlot(
-          kWordSize * (compiler::target::frame_layout.param_end_from_fp +
-                       num_fixed_params - param),
+          compiler::target::kWordSize *
+              (compiler::target::frame_layout.param_end_from_fp +
+               num_fixed_params - param),
           ParameterType(ParameterVariable(param)));
       good += StoreLocalRaw(TokenPosition::kNoSource, ParameterVariable(param));
       good += Drop();
@@ -249,7 +251,8 @@
     ASSERT(num_opt_named_params > 0);
 
     const intptr_t first_name_offset =
-        ArgumentsDescriptor::first_named_entry_offset() - Array::data_offset();
+        compiler::target::ArgumentsDescriptor::first_named_entry_offset() -
+        compiler::target::Array::data_offset();
 
     // Start by alphabetically sorting the names of the optional parameters.
     int* opt_param_position = Z->Alloc<int>(num_opt_named_params);
@@ -266,19 +269,23 @@
     for (intptr_t i = 0; param < num_params; ++param, ++i) {
       JoinEntryInstr* join = BuildJoinEntry();
 
-      copy_args_prologue +=
-          IntConstant(ArgumentsDescriptor::named_entry_size() / kWordSize);
+      copy_args_prologue += IntConstant(
+          compiler::target::ArgumentsDescriptor::named_entry_size() /
+          compiler::target::kWordSize);
       copy_args_prologue += LoadLocal(optional_count_vars_processed);
       copy_args_prologue += SmiBinaryOp(Token::kMUL, /* truncate= */ true);
       LocalVariable* tuple_diff = MakeTemporary();
 
       // name = arg_desc[names_offset + arg_desc_name_index + nameOffset]
       copy_args_prologue += LoadArgDescriptor();
-      copy_args_prologue += IntConstant(
-          (first_name_offset + ArgumentsDescriptor::name_offset()) / kWordSize);
+      copy_args_prologue +=
+          IntConstant((first_name_offset +
+                       compiler::target::ArgumentsDescriptor::name_offset()) /
+                      compiler::target::kWordSize);
       copy_args_prologue += LoadLocal(tuple_diff);
       copy_args_prologue += SmiBinaryOp(Token::kADD, /* truncate= */ true);
-      copy_args_prologue += LoadIndexed(/* index_scale = */ kWordSize);
+      copy_args_prologue +=
+          LoadIndexed(/* index_scale = */ compiler::target::kWordSize);
 
       // first name in sorted list of all names
       const String& param_name = String::ZoneHandle(
@@ -303,15 +310,17 @@
           // pos = arg_desc[names_offset + arg_desc_name_index + positionOffset]
           good += LoadArgDescriptor();
           good += IntConstant(
-              (first_name_offset + ArgumentsDescriptor::position_offset()) /
-              kWordSize);
+              (first_name_offset +
+               compiler::target::ArgumentsDescriptor::position_offset()) /
+              compiler::target::kWordSize);
           good += LoadLocal(tuple_diff);
           good += SmiBinaryOp(Token::kADD, /* truncate= */ true);
-          good += LoadIndexed(/* index_scale = */ kWordSize);
+          good += LoadIndexed(/* index_scale = */ compiler::target::kWordSize);
         }
         good += SmiBinaryOp(Token::kSUB, /* truncate= */ true);
         good += LoadFpRelativeSlot(
-            kWordSize * compiler::target::frame_layout.param_end_from_fp,
+            compiler::target::kWordSize *
+                compiler::target::frame_layout.param_end_from_fp,
             ParameterType(ParameterVariable(opt_param_position[i])));
 
         // Copy down.
@@ -417,7 +426,8 @@
   store_type_args += LoadArgDescriptor();
   store_type_args += LoadNativeField(Slot::ArgumentsDescriptor_count());
   store_type_args += LoadFpRelativeSlot(
-      kWordSize * (1 + compiler::target::frame_layout.param_end_from_fp),
+      compiler::target::kWordSize *
+          (1 + compiler::target::frame_layout.param_end_from_fp),
       CompileType::CreateNullable(/*is_nullable=*/true, kTypeArgumentsCid));
   store_type_args += StoreLocal(TokenPosition::kNoSource, type_args_var);
   store_type_args += Drop();
diff --git a/runtime/vm/compiler/graph_intrinsifier.cc b/runtime/vm/compiler/graph_intrinsifier.cc
index ddf564b..5c51441 100644
--- a/runtime/vm/compiler/graph_intrinsifier.cc
+++ b/runtime/vm/compiler/graph_intrinsifier.cc
@@ -169,12 +169,12 @@
 
   if (RawObject::IsExternalTypedDataClassId(array_cid)) {
     array = builder.AddDefinition(new LoadUntaggedInstr(
-        new Value(array), ExternalTypedData::data_offset()));
+        new Value(array), target::TypedDataBase::data_field_offset()));
   }
 
   Definition* result = builder.AddDefinition(new LoadIndexedInstr(
       new Value(array), new Value(index),
-      Instance::ElementSizeFor(array_cid),  // index scale
+      target::Instance::ElementSizeFor(array_cid),  // index scale
       array_cid, kAlignedAccess, DeoptId::kNone, builder.TokenPos()));
 
   // We don't perform [RangeAnalysis] for graph intrinsics. To inform the
@@ -347,14 +347,14 @@
 
   if (RawObject::IsExternalTypedDataClassId(array_cid)) {
     array = builder.AddDefinition(new LoadUntaggedInstr(
-        new Value(array), ExternalTypedData::data_offset()));
+        new Value(array), target::TypedDataBase::data_field_offset()));
   }
   // No store barrier.
   ASSERT(RawObject::IsExternalTypedDataClassId(array_cid) ||
          RawObject::IsTypedDataClassId(array_cid));
   builder.AddInstruction(new StoreIndexedInstr(
       new Value(array), new Value(index), new Value(value), kNoStoreBarrier,
-      Instance::ElementSizeFor(array_cid),  // index scale
+      target::Instance::ElementSizeFor(array_cid),  // index scale
       array_cid, kAlignedAccess, DeoptId::kNone, builder.TokenPos()));
   // Return null.
   Definition* null_def = builder.AddNullDefinition();
@@ -482,15 +482,15 @@
   // For external strings: Load external data.
   if (cid == kExternalOneByteStringCid) {
     str = builder.AddDefinition(new LoadUntaggedInstr(
-        new Value(str), ExternalOneByteString::external_data_offset()));
+        new Value(str), target::ExternalOneByteString::external_data_offset()));
   } else if (cid == kExternalTwoByteStringCid) {
     str = builder.AddDefinition(new LoadUntaggedInstr(
-        new Value(str), ExternalTwoByteString::external_data_offset()));
+        new Value(str), target::ExternalTwoByteString::external_data_offset()));
   }
 
   Definition* load = builder.AddDefinition(new LoadIndexedInstr(
-      new Value(str), new Value(index), Instance::ElementSizeFor(cid), cid,
-      kAlignedAccess, DeoptId::kNone, builder.TokenPos()));
+      new Value(str), new Value(index), target::Instance::ElementSizeFor(cid),
+      cid, kAlignedAccess, DeoptId::kNone, builder.TokenPos()));
 
   // We don't perform [RangeAnalysis] for graph intrinsics. To inform the
   // following boxing instruction about a more precise range we attach it here
@@ -687,7 +687,7 @@
                          Slot::GrowableObjectArray_data(), builder.TokenPos()));
   Definition* result = builder.AddDefinition(new LoadIndexedInstr(
       new Value(backing_store), new Value(index),
-      Instance::ElementSizeFor(kArrayCid),  // index scale
+      target::Instance::ElementSizeFor(kArrayCid),  // index scale
       kArrayCid, kAlignedAccess, DeoptId::kNone, builder.TokenPos()));
   builder.AddReturn(new Value(result));
   return true;
@@ -716,7 +716,7 @@
 
   builder.AddInstruction(new StoreIndexedInstr(
       new Value(array), new Value(index), new Value(value), kEmitStoreBarrier,
-      Instance::ElementSizeFor(kArrayCid),  // index scale
+      target::Instance::ElementSizeFor(kArrayCid),  // index scale
       kArrayCid, kAlignedAccess, DeoptId::kNone, builder.TokenPos()));
   // Return null.
   Definition* null_def = builder.AddNullDefinition();
@@ -751,7 +751,7 @@
   builder.AddInstruction(new StoreIndexedInstr(
       new Value(backing_store), new Value(index), new Value(value),
       kEmitStoreBarrier,
-      Instance::ElementSizeFor(kArrayCid),  // index scale
+      target::Instance::ElementSizeFor(kArrayCid),  // index scale
       kArrayCid, kAlignedAccess, DeoptId::kNone, builder.TokenPos()));
   // Return null.
   Definition* null_def = builder.AddNullDefinition();
diff --git a/runtime/vm/compiler/intrinsifier.cc b/runtime/vm/compiler/intrinsifier.cc
index ee1649f..84b3baf 100644
--- a/runtime/vm/compiler/intrinsifier.cc
+++ b/runtime/vm/compiler/intrinsifier.cc
@@ -59,7 +59,8 @@
     case MethodRecognizer::kUint64ArrayGetIndexed:
     case MethodRecognizer::kUint64ArraySetIndexed:
       // TODO(ajcbik): consider 32-bit as well.
-      if (kBitsPerWord == 64 && FlowGraphCompiler::SupportsUnboxedInt64()) {
+      if (target::kBitsPerWord == 64 &&
+          FlowGraphCompiler::SupportsUnboxedInt64()) {
         break;
       }
       if (FLAG_trace_intrinsifier) {
@@ -186,7 +187,7 @@
     return compiler->intrinsic_slow_path_label()->IsUnused();
   }
 
-#if !defined(HASH_IN_OBJECT_HEADER)
+#if !defined(TARGET_HASH_IN_OBJECT_HEADER)
   // These two are more complicated on 32 bit platforms, where the
   // identity hash is not stored in the header of the object.  We
   // therefore don't intrinsify them, falling back on the native C++
diff --git a/runtime/vm/compiler/offsets_extractor.cc b/runtime/vm/compiler/offsets_extractor.cc
index ec0c866..0262779 100644
--- a/runtime/vm/compiler/offsets_extractor.cc
+++ b/runtime/vm/compiler/offsets_extractor.cc
@@ -42,28 +42,32 @@
  public:
   static void DumpOffsets() {
 #define PRINT_FIELD_OFFSET(Class, Name)                                        \
-  std::cout << "static constexpr dart::word " #Class "_" #Name " = "           \
+  std::cout << "static constexpr dart::compiler::target::word " #Class         \
+               "_" #Name " = "                                                 \
             << Class::Name() << ";\n";
 
 #define PRINT_ARRAY_LAYOUT(Class, Name)                                        \
-  std::cout << "static constexpr dart::word " #Class                           \
+  std::cout << "static constexpr dart::compiler::target::word " #Class         \
                "_elements_start_offset = "                                     \
             << Class::ArrayLayout::elements_start_offset() << ";\n";           \
-  std::cout << "static constexpr dart::word " #Class "_element_size = "        \
+  std::cout << "static constexpr dart::compiler::target::word " #Class         \
+               "_element_size = "                                              \
             << Class::ArrayLayout::kElementSize << ";\n";
 
 #define PRINT_ARRAY_STRUCTFIELD_OFFSET(Class, Name, ElementOffsetName,         \
                                        FieldOffset)
 
 #define PRINT_SIZEOF(Class, Name, What)                                        \
-  std::cout << "static constexpr dart::word " #Class "_" #Name " = "           \
+  std::cout << "static constexpr dart::compiler::target::word " #Class         \
+               "_" #Name " = "                                                 \
             << sizeof(What) << ";\n";
 
 #define PRINT_RANGE(Class, Name, Type, First, Last, Filter)                    \
   {                                                                            \
     auto filter = Filter;                                                      \
     bool comma = false;                                                        \
-    std::cout << "static dart::word " #Class "_" #Name "[] = {";               \
+    std::cout << "static dart::compiler::target::word " #Class "_" #Name       \
+                 "[] = {";                                                     \
     for (intptr_t i = static_cast<intptr_t>(First);                            \
          i <= static_cast<intptr_t>(Last); i++) {                              \
       auto v = static_cast<Type>(i);                                           \
@@ -74,7 +78,8 @@
   }
 
 #define PRINT_CONSTANT(Class, Name)                                            \
-  std::cout << "static constexpr dart::word " #Class "_" #Name " = "           \
+  std::cout << "static constexpr dart::compiler::target::word " #Class         \
+               "_" #Name " = "                                                 \
             << Class::Name << ";\n";
 
 #define PRECOMP_NO_CHECK(Code) Code
diff --git a/runtime/vm/compiler/relocation.cc b/runtime/vm/compiler/relocation.cc
index 5d4d35f..aec5b3e 100644
--- a/runtime/vm/compiler/relocation.cc
+++ b/runtime/vm/compiler/relocation.cc
@@ -107,7 +107,8 @@
 
   for (intptr_t i = 0; i < code_objects_->length(); ++i) {
     current_caller = (*code_objects_)[i];
-    const intptr_t size = current_caller.instructions()->HeapSize();
+    const intptr_t size =
+        ImageWriter::SizeInSnapshot(current_caller.instructions());
     if (size > max_instructions_size_) {
       max_instructions_size_ = size;
     }
@@ -182,7 +183,7 @@
   }
   text_offsets_.Insert({instructions, next_text_offset_});
   commands_->Add(ImageWriterCommand(next_text_offset_, code));
-  next_text_offset_ += instructions->HeapSize();
+  next_text_offset_ += ImageWriter::SizeInSnapshot(instructions);
 
   return true;
 }
diff --git a/runtime/vm/compiler/runtime_api.cc b/runtime/vm/compiler/runtime_api.cc
index c5a4a53..79fff9b 100644
--- a/runtime/vm/compiler/runtime_api.cc
+++ b/runtime/vm/compiler/runtime_api.cc
@@ -4,8 +4,19 @@
 
 #include "vm/compiler/runtime_api.h"
 
+namespace dart {
+namespace compiler {
+namespace target {
+
+#include "vm/compiler/runtime_offsets_extracted.h"
+
+}  // namespace target
+}  // namespace compiler
+}  // namespace dart
+
 #if !defined(DART_PRECOMPILED_RUNTIME)
 
+#include "vm/compiler/runtime_offsets_list.h"
 #include "vm/dart_entry.h"
 #include "vm/longjump.h"
 #include "vm/native_arguments.h"
@@ -20,6 +31,11 @@
 namespace compiler {
 
 bool IsSameObject(const Object& a, const Object& b) {
+  if (a.IsMint() && b.IsMint()) {
+    return Mint::Cast(a).value() == Mint::Cast(b).value();
+  } else if (a.IsDouble() && b.IsDouble()) {
+    return Double::Cast(a).value() == Double::Cast(b).value();
+  }
   return a.raw() == b.raw();
 }
 
@@ -49,7 +65,7 @@
 #undef DO
 
 bool IsInOldSpace(const Object& obj) {
-  return obj.IsOld();
+  return obj.IsSmi() || obj.IsOld();
 }
 
 intptr_t ObjectHash(const Object& obj) {
@@ -162,7 +178,8 @@
 }
 
 word TypedDataMaxNewSpaceElements(classid_t cid) {
-  return dart::TypedData::MaxNewSpaceElements(cid);
+  return (dart::Heap::kNewAllocatableSize - target::TypedData::InstanceSize()) /
+         TypedDataElementSizeInBytes(cid);
 }
 
 const Field& LookupMathRandomStateFieldOffset() {
@@ -215,23 +232,29 @@
 }
 
 word RuntimeEntry::OffsetFromThread() const {
-  return dart::Thread::OffsetFromThread(runtime_entry_);
+  return target::Thread::OffsetFromThread(runtime_entry_);
 }
 
 namespace target {
 
 const word kPageSize = dart::kPageSize;
-const word kPageSizeInWords = dart::kPageSizeInWords;
+const word kPageSizeInWords = dart::kPageSize / kWordSize;
 const word kPageMask = dart::kPageMask;
 
+static word TranslateOffsetInWordsToHost(word offset) {
+  RELEASE_ASSERT((offset % kWordSize) == 0);
+  return (offset / kWordSize) * dart::kWordSize;
+}
+
 uint32_t MakeTagWordForNewSpaceObject(classid_t cid, uword instance_size) {
-  return dart::RawObject::SizeTag::encode(instance_size) |
+  return dart::RawObject::SizeTag::encode(
+             TranslateOffsetInWordsToHost(instance_size)) |
          dart::RawObject::ClassIdTag::encode(cid) |
          dart::RawObject::NewBit::encode(true);
 }
 
 word Object::tags_offset() {
-  return dart::Object::tags_offset();
+  return 0;
 }
 
 const word RawObject::kCardRememberedBit = dart::RawObject::kCardRememberedBit;
@@ -247,7 +270,8 @@
 const word RawObject::kClassIdTagSize = dart::RawObject::kClassIdTagSize;
 
 const word RawObject::kSizeTagMaxSizeTag =
-    dart::RawObject::SizeTag::kMaxSizeTag;
+    dart::RawObject::SizeTag::kMaxSizeTagInUnitsOfAlignment *
+    ObjectAlignment::kObjectAlignment;
 
 const word RawObject::kTagBitsSizeTagPos =
     dart::RawObject::TagBits::kSizeTagPos;
@@ -262,21 +286,6 @@
   return dart::RawObject::IsTypedDataClassId(cid);
 }
 
-intptr_t ObjectPool::element_offset(intptr_t index) {
-  return dart::ObjectPool::element_offset(index);
-}
-
-word Class::type_arguments_field_offset_in_words_offset() {
-  return dart::Class::type_arguments_field_offset_in_words_offset();
-}
-
-word Class::declaration_type_offset() {
-  return dart::Class::declaration_type_offset();
-}
-
-word Class::num_type_arguments_offset_in_bytes() {
-  return dart::Class::num_type_arguments_offset();
-}
 
 const word Class::kNoTypeArguments = dart::Class::kNoTypeArguments;
 
@@ -284,8 +293,59 @@
   return handle.id();
 }
 
+static word TranslateOffsetInWords(word offset) {
+  RELEASE_ASSERT((offset % dart::kWordSize) == 0);
+  return (offset / dart::kWordSize) * kWordSize;
+}
+
+static uword GetInstanceSizeImpl(const dart::Class& handle) {
+  switch (handle.id()) {
+    case kMintCid:
+      return Mint::InstanceSize();
+    case kDoubleCid:
+      return Double::InstanceSize();
+    case kInt32x4Cid:
+      return Int32x4::InstanceSize();
+    case kFloat32x4Cid:
+      return Float32x4::InstanceSize();
+    case kFloat64x2Cid:
+      return Float64x2::InstanceSize();
+    case kObjectCid:
+      return Object::InstanceSize();
+    case kInstanceCid:
+      return Instance::InstanceSize();
+    case kGrowableObjectArrayCid:
+      return GrowableObjectArray::InstanceSize();
+    case kClosureCid:
+      return Closure::InstanceSize();
+    case kTypedDataBaseCid:
+      return TypedDataBase::InstanceSize();
+    case kLinkedHashMapCid:
+      return LinkedHashMap::InstanceSize();
+    case kByteBufferCid:
+    case kByteDataViewCid:
+    case kFfiPointerCid:
+#define HANDLE_CASE(clazz)                                                     \
+  case kTypedData##clazz##Cid:                                                 \
+  case kTypedData##clazz##ViewCid:                                             \
+  case kExternalTypedData##clazz##Cid:
+      CLASS_LIST_TYPED_DATA(HANDLE_CASE)
+#undef HANDLE_CASE
+      return TranslateOffsetInWords(handle.instance_size());
+    default:
+      if (handle.id() >= kNumPredefinedCids) {
+        return TranslateOffsetInWords(handle.instance_size());
+      }
+  }
+  FATAL3("Unsupported class for size translation: %s (id=%" Pd
+         ", kNumPredefinedCids=%d)\n",
+         handle.ToCString(), handle.id(), kNumPredefinedCids);
+  return -1;
+}
+
 uword Class::GetInstanceSize(const dart::Class& handle) {
-  return handle.instance_size();
+  return Utils::RoundUp(GetInstanceSizeImpl(handle),
+                        ObjectAlignment::kObjectAlignment);
 }
 
 intptr_t Class::NumTypeArguments(const dart::Class& klass) {
@@ -297,11 +357,7 @@
 }
 
 intptr_t Class::TypeArgumentsFieldOffset(const dart::Class& klass) {
-  return klass.type_arguments_field_offset();
-}
-
-intptr_t Class::InstanceSize(const dart::Class& klass) {
-  return klass.instance_size();
+  return TranslateOffsetInWords(klass.type_arguments_field_offset());
 }
 
 bool Class::TraceAllocation(const dart::Class& klass) {
@@ -309,57 +365,60 @@
 }
 
 word Instance::first_field_offset() {
-  return dart::Instance::NextFieldOffset();
+  return TranslateOffsetInWords(dart::Instance::NextFieldOffset());
 }
 
 word Instance::DataOffsetFor(intptr_t cid) {
-  return dart::Instance::DataOffsetFor(cid);
+  if (dart::RawObject::IsExternalTypedDataClassId(cid) ||
+      dart::RawObject::IsExternalStringClassId(cid)) {
+    // Elements start at offset 0 of the external data.
+    return 0;
+  }
+  if (dart::RawObject::IsTypedDataClassId(cid)) {
+    return TypedData::data_offset();
+  }
+  switch (cid) {
+    case kArrayCid:
+    case kImmutableArrayCid:
+      return Array::data_offset();
+    case kOneByteStringCid:
+      return OneByteString::data_offset();
+    case kTwoByteStringCid:
+      return TwoByteString::data_offset();
+    default:
+      UNIMPLEMENTED();
+      return Array::data_offset();
+  }
 }
 
 word Instance::ElementSizeFor(intptr_t cid) {
-  return dart::Instance::ElementSizeFor(cid);
-}
-
-word Function::code_offset() {
-  return dart::Function::code_offset();
-}
-
-word Function::entry_point_offset() {
-  return dart::Function::entry_point_offset();
-}
-
-word Function::usage_counter_offset() {
-  return dart::Function::usage_counter_offset();
-}
-
-word Function::unchecked_entry_point_offset() {
-  return dart::Function::unchecked_entry_point_offset();
+  if (dart::RawObject::IsExternalTypedDataClassId(cid) ||
+      dart::RawObject::IsTypedDataClassId(cid) ||
+      dart::RawObject::IsTypedDataViewClassId(cid)) {
+    return dart::TypedDataBase::ElementSizeInBytes(cid);
+  }
+  switch (cid) {
+    case kArrayCid:
+    case kImmutableArrayCid:
+      return kWordSize;
+    case kOneByteStringCid:
+      return dart::OneByteString::kBytesPerElement;
+    case kTwoByteStringCid:
+      return dart::TwoByteString::kBytesPerElement;
+    case kExternalOneByteStringCid:
+      return dart::ExternalOneByteString::kBytesPerElement;
+    case kExternalTwoByteStringCid:
+      return dart::ExternalTwoByteString::kBytesPerElement;
+    default:
+      UNIMPLEMENTED();
+      return 0;
+  }
 }
 
 word ICData::CodeIndexFor(word num_args) {
   return dart::ICData::CodeIndexFor(num_args);
 }
 
-word ICData::owner_offset() {
-  return dart::ICData::owner_offset();
-}
-
-word ICData::arguments_descriptor_offset() {
-  return dart::ICData::arguments_descriptor_offset();
-}
-
-word ICData::entries_offset() {
-  return dart::ICData::entries_offset();
-}
-
-word ICData::receivers_static_type_offset() {
-  return dart::ICData::receivers_static_type_offset();
-}
-
-word ICData::state_bits_offset() {
-  return dart::ICData::state_bits_offset();
-}
-
 word ICData::CountIndexFor(word num_args) {
   return dart::ICData::CountIndexFor(num_args);
 }
@@ -380,144 +439,74 @@
   return dart::ICData::EntryPointIndexFor(num_args);
 }
 
-word ICData::NumArgsTestedShift() {
-  return dart::ICData::NumArgsTestedShift();
-}
-
-word ICData::NumArgsTestedMask() {
-  return dart::ICData::NumArgsTestedMask();
-}
-
 const word MegamorphicCache::kSpreadFactor =
     dart::MegamorphicCache::kSpreadFactor;
 
-word MegamorphicCache::mask_offset() {
-  return dart::MegamorphicCache::mask_offset();
-}
-word MegamorphicCache::buckets_offset() {
-  return dart::MegamorphicCache::buckets_offset();
-}
-word MegamorphicCache::arguments_descriptor_offset() {
-  return dart::MegamorphicCache::arguments_descriptor_offset();
-}
-
-word SingleTargetCache::lower_limit_offset() {
-  return dart::SingleTargetCache::lower_limit_offset();
-}
-word SingleTargetCache::upper_limit_offset() {
-  return dart::SingleTargetCache::upper_limit_offset();
-}
-word SingleTargetCache::entry_point_offset() {
-  return dart::SingleTargetCache::entry_point_offset();
-}
-word SingleTargetCache::target_offset() {
-  return dart::SingleTargetCache::target_offset();
-}
-
-const word Array::kMaxNewSpaceElements = dart::Array::kMaxNewSpaceElements;
-
 word Context::InstanceSize(word n) {
-  return dart::Context::InstanceSize(n);
+  return TranslateOffsetInWords(dart::Context::InstanceSize(n));
 }
 
 word Context::variable_offset(word n) {
-  return dart::Context::variable_offset(n);
+  return TranslateOffsetInWords(dart::Context::variable_offset(n));
 }
 
-word TypedData::InstanceSize() {
-  return sizeof(RawTypedData);
+#define DEFINE_FIELD(clazz, name)                                              \
+  word clazz::name() { return clazz##_##name; }
+
+#define DEFINE_ARRAY(clazz, name)                                              \
+  word clazz::name(intptr_t index) {                                           \
+    return clazz##_elements_start_offset + index * clazz##_element_size;       \
+  }
+
+#define DEFINE_ARRAY_STRUCTFIELD(clazz, name, element_offset, field_offset)
+
+#define DEFINE_SIZEOF(clazz, name, what)                                       \
+  word clazz::name() { return clazz##_##name; }
+
+#define DEFINE_RANGE(Class, Getter, Type, First, Last, Filter)                 \
+  word Class::Getter(Type index) {                                             \
+    return Class##_##Getter[static_cast<intptr_t>(index) -                     \
+                            static_cast<intptr_t>(First)];                     \
+  }
+
+#define DEFINE_CONSTANT(Class, Name) const word Class::Name = Class##_##Name;
+
+#define PRECOMP_NO_CHECK(Code) Code
+
+OFFSETS_LIST(DEFINE_FIELD,
+             DEFINE_ARRAY,
+             DEFINE_ARRAY_STRUCTFIELD,
+             DEFINE_SIZEOF,
+             DEFINE_RANGE,
+             DEFINE_CONSTANT,
+             PRECOMP_NO_CHECK)
+
+#undef DEFINE_FIELD
+#undef DEFINE_ARRAY
+#undef DEFINE_ARRAY_STRUCTFIELD
+#undef DEFINE_SIZEOF
+#undef DEFINE_RANGE
+#undef DEFINE_CONSTANT
+#undef PRECOMP_NO_CHECK
+
+const word StoreBufferBlock::kSize = dart::StoreBufferBlock::kSize;
+
+const word MarkingStackBlock::kSize = dart::MarkingStackBlock::kSize;
+
+word Instructions::HeaderSize() {
+  intptr_t alignment = OS::PreferredCodeAlignment();
+  intptr_t aligned_size =
+      Utils::RoundUp(Instructions::UnalignedHeaderSize(), alignment);
+  ASSERT(aligned_size == alignment);
+  return aligned_size;
 }
 
-word Array::header_size() {
-  return sizeof(dart::RawArray);
+#if !defined(TARGET_ARCH_DBC)
+word Thread::stack_overflow_shared_stub_entry_point_offset(bool fpu_regs) {
+  return fpu_regs ? stack_overflow_shared_with_fpu_regs_entry_point_offset()
+                  : stack_overflow_shared_without_fpu_regs_entry_point_offset();
 }
-
-#define CLASS_NAME_LIST(V)                                                     \
-  V(AbstractType, type_test_stub_entry_point_offset)                           \
-  V(ArgumentsDescriptor, count_offset)                                         \
-  V(ArgumentsDescriptor, type_args_len_offset)                                 \
-  V(Array, data_offset)                                                        \
-  V(Array, length_offset)                                                      \
-  V(Array, tags_offset)                                                        \
-  V(Array, type_arguments_offset)                                              \
-  V(ClassTable, table_offset)                                                  \
-  V(Closure, context_offset)                                                   \
-  V(Closure, delayed_type_arguments_offset)                                    \
-  V(Closure, function_offset)                                                  \
-  V(Closure, function_type_arguments_offset)                                   \
-  V(Closure, instantiator_type_arguments_offset)                               \
-  V(Code, object_pool_offset)                                                  \
-  V(Code, saved_instructions_offset)                                           \
-  V(Context, num_variables_offset)                                             \
-  V(Context, parent_offset)                                                    \
-  V(Double, value_offset)                                                      \
-  V(Float32x4, value_offset)                                                   \
-  V(Float64x2, value_offset)                                                   \
-  V(GrowableObjectArray, data_offset)                                          \
-  V(GrowableObjectArray, length_offset)                                        \
-  V(GrowableObjectArray, type_arguments_offset)                                \
-  V(HeapPage, card_table_offset)                                               \
-  V(Isolate, class_table_offset)                                               \
-  V(Isolate, current_tag_offset)                                               \
-  V(Isolate, default_tag_offset)                                               \
-  V(Isolate, ic_miss_code_offset)                                              \
-  V(Isolate, object_store_offset)                                              \
-  V(Isolate, user_tag_offset)                                                  \
-  V(MarkingStackBlock, pointers_offset)                                        \
-  V(MarkingStackBlock, top_offset)                                             \
-  V(Mint, value_offset)                                                        \
-  V(NativeArguments, argc_tag_offset)                                          \
-  V(NativeArguments, argv_offset)                                              \
-  V(NativeArguments, retval_offset)                                            \
-  V(NativeArguments, thread_offset)                                            \
-  V(ObjectStore, double_type_offset)                                           \
-  V(ObjectStore, int_type_offset)                                              \
-  V(ObjectStore, string_type_offset)                                           \
-  V(OneByteString, data_offset)                                                \
-  V(StoreBufferBlock, pointers_offset)                                         \
-  V(StoreBufferBlock, top_offset)                                              \
-  V(String, hash_offset)                                                       \
-  V(String, length_offset)                                                     \
-  V(SubtypeTestCache, cache_offset)                                            \
-  V(Thread, active_exception_offset)                                           \
-  V(Thread, active_stacktrace_offset)                                          \
-  V(Thread, async_stack_trace_offset)                                          \
-  V(Thread, auto_scope_native_wrapper_entry_point_offset)                      \
-  V(Thread, bool_false_offset)                                                 \
-  V(Thread, bool_true_offset)                                                  \
-  V(Thread, dart_stream_offset)                                                \
-  V(Thread, end_offset)                                                        \
-  V(Thread, global_object_pool_offset)                                         \
-  V(Thread, isolate_offset)                                                    \
-  V(Thread, marking_stack_block_offset)                                        \
-  V(Thread, no_scope_native_wrapper_entry_point_offset)                        \
-  V(Thread, object_null_offset)                                                \
-  V(Thread, predefined_symbols_address_offset)                                 \
-  V(Thread, resume_pc_offset)                                                  \
-  V(Thread, store_buffer_block_offset)                                         \
-  V(Thread, top_exit_frame_info_offset)                                        \
-  V(Thread, top_offset)                                                        \
-  V(Thread, top_resource_offset)                                               \
-  V(Thread, vm_tag_offset)                                                     \
-  V(Thread, safepoint_state_offset)                                            \
-  V(Thread, callback_code_offset)                                              \
-  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(Type, hash_offset)                                                         \
-  V(TypeRef, type_offset)                                                      \
-  V(Type, signature_offset)                                                    \
-  V(Type, type_state_offset)                                                   \
-  V(UserTag, tag_offset)
-
-#define DEFINE_FORWARDER(clazz, name)                                          \
-  word clazz::name() { return dart::clazz::name(); }
-
-CLASS_NAME_LIST(DEFINE_FORWARDER)
-#undef DEFINE_FORWARDER
+#endif  // !defined(TARGET_ARCH_DBC)
 
 uword Thread::safepoint_state_unacquired() {
   return dart::Thread::safepoint_state_unacquired();
@@ -527,285 +516,83 @@
   return dart::Thread::safepoint_state_acquired();
 }
 
-const word HeapPage::kBytesPerCardLog2 = dart::HeapPage::kBytesPerCardLog2;
-
-const word String::kHashBits = dart::String::kHashBits;
-
-word String::InstanceSize() {
-  return sizeof(dart::RawString);
-}
-
-bool Heap::IsAllocatableInNewSpace(intptr_t instance_size) {
-  return dart::Heap::IsAllocatableInNewSpace(instance_size);
-}
-
-#if !defined(TARGET_ARCH_DBC)
-word Thread::write_barrier_code_offset() {
-  return dart::Thread::write_barrier_code_offset();
-}
-
-word Thread::array_write_barrier_code_offset() {
-  return dart::Thread::array_write_barrier_code_offset();
-}
-
-word Thread::fix_callers_target_code_offset() {
-  return dart::Thread::fix_callers_target_code_offset();
-}
-
-word Thread::fix_allocation_stub_code_offset() {
-  return dart::Thread::fix_allocation_stub_code_offset();
-}
-
-word Thread::call_to_runtime_entry_point_offset() {
-  return dart::Thread::call_to_runtime_entry_point_offset();
-}
-
-word Thread::null_error_shared_with_fpu_regs_entry_point_offset() {
-  return dart::Thread::null_error_shared_with_fpu_regs_entry_point_offset();
-}
-
-word Thread::null_error_shared_without_fpu_regs_entry_point_offset() {
-  return dart::Thread::null_error_shared_without_fpu_regs_entry_point_offset();
-}
-
-word Thread::monomorphic_miss_entry_offset() {
-  return dart::Thread::monomorphic_miss_entry_offset();
-}
-
-word Thread::write_barrier_mask_offset() {
-  return dart::Thread::write_barrier_mask_offset();
-}
-
-word Thread::write_barrier_entry_point_offset() {
-  return dart::Thread::write_barrier_entry_point_offset();
-}
-
-word Thread::array_write_barrier_entry_point_offset() {
-  return dart::Thread::array_write_barrier_entry_point_offset();
-}
-
-word Thread::verify_callback_isolate_entry_point_offset() {
-  return dart::Thread::verify_callback_entry_offset();
-}
-#endif  // !defined(TARGET_ARCH_DBC)
-
-#if defined(TARGET_ARCH_ARM) || defined(TARGET_ARCH_ARM64) ||                  \
-    defined(TARGET_ARCH_X64)
-word Thread::write_barrier_wrappers_thread_offset(intptr_t regno) {
-  return dart::Thread::write_barrier_wrappers_thread_offset(
-      static_cast<Register>(regno));
-}
-#endif
-
-#if !defined(TARGET_ARCH_DBC)
-
-word Thread::monomorphic_miss_stub_offset() {
-  return dart::Thread::monomorphic_miss_stub_offset();
-}
-
-word Thread::ic_lookup_through_code_stub_offset() {
-  return dart::Thread::ic_lookup_through_code_stub_offset();
-}
-
-word Thread::lazy_specialize_type_test_stub_offset() {
-  return dart::Thread::lazy_specialize_type_test_stub_offset();
-}
-
-word Thread::slow_type_test_stub_offset() {
-  return dart::Thread::slow_type_test_stub_offset();
-}
-
-word Thread::call_to_runtime_stub_offset() {
-  return dart::Thread::call_to_runtime_stub_offset();
-}
-
-word Thread::invoke_dart_code_stub_offset() {
-  return dart::Thread::invoke_dart_code_stub_offset();
-}
-
-word Thread::interpret_call_entry_point_offset() {
-  return dart::Thread::interpret_call_entry_point_offset();
-}
-
-word Thread::invoke_dart_code_from_bytecode_stub_offset() {
-  return dart::Thread::invoke_dart_code_from_bytecode_stub_offset();
-}
-
-word Thread::null_error_shared_without_fpu_regs_stub_offset() {
-  return dart::Thread::null_error_shared_without_fpu_regs_stub_offset();
-}
-
-word Thread::null_error_shared_with_fpu_regs_stub_offset() {
-  return dart::Thread::null_error_shared_with_fpu_regs_stub_offset();
-}
-
-word Thread::stack_overflow_shared_without_fpu_regs_stub_offset() {
-  return dart::Thread::stack_overflow_shared_without_fpu_regs_stub_offset();
-}
-
-word Thread::stack_overflow_shared_with_fpu_regs_stub_offset() {
-  return dart::Thread::stack_overflow_shared_with_fpu_regs_stub_offset();
-}
-
-word Thread::lazy_deopt_from_return_stub_offset() {
-  return dart::Thread::lazy_deopt_from_return_stub_offset();
-}
-
-word Thread::lazy_deopt_from_throw_stub_offset() {
-  return dart::Thread::lazy_deopt_from_throw_stub_offset();
-}
-
-word Thread::deoptimize_stub_offset() {
-  return dart::Thread::deoptimize_stub_offset();
-}
-
-word Thread::enter_safepoint_stub_offset() {
-  return dart::Thread::enter_safepoint_stub_offset();
-}
-
-word Thread::exit_safepoint_stub_offset() {
-  return dart::Thread::exit_safepoint_stub_offset();
-}
-
-word Thread::execution_state_offset() {
-  return dart::Thread::execution_state_offset();
+uword Thread::generated_execution_state() {
+  return dart::Thread::ExecutionState::kThreadInGenerated;
 }
 
 uword Thread::native_execution_state() {
   return dart::Thread::ExecutionState::kThreadInNative;
 }
 
-uword Thread::generated_execution_state() {
-  return dart::Thread::ExecutionState::kThreadInGenerated;
-}
-
 uword Thread::vm_tag_compiled_id() {
   return dart::VMTag::kDartCompiledTagId;
 }
 
-#endif  // !defined(TARGET_ARCH_DBC)
-
-#define DECLARE_CONSTANT_OFFSET_GETTER(name)                                   \
-  word Thread::name##_address_offset() {                                       \
-    return dart::Thread::name##_address_offset();                              \
-  }
-THREAD_XMM_CONSTANT_LIST(DECLARE_CONSTANT_OFFSET_GETTER)
-#undef DECLARE_CONSTANT_OFFSET_GETTER
-
 word Thread::OffsetFromThread(const dart::Object& object) {
-  return dart::Thread::OffsetFromThread(object);
+  auto host_offset = dart::Thread::OffsetFromThread(object);
+  return object_null_offset() +
+         TranslateOffsetInWords(host_offset -
+                                dart::Thread::object_null_offset());
 }
 
-const word StoreBufferBlock::kSize = dart::StoreBufferBlock::kSize;
+intptr_t Thread::OffsetFromThread(const dart::RuntimeEntry* runtime_entry) {
+  auto host_offset = dart::Thread::OffsetFromThread(runtime_entry);
+  return AllocateArray_entry_point_offset() +
+         TranslateOffsetInWords(
+             host_offset - dart::Thread::AllocateArray_entry_point_offset());
+}
 
-const word MarkingStackBlock::kSize = dart::MarkingStackBlock::kSize;
+bool CanLoadFromThread(const dart::Object& object,
+                       intptr_t* offset /* = nullptr */) {
+  if (dart::Thread::CanLoadFromThread(object)) {
+    if (offset != nullptr) {
+      *offset = Thread::OffsetFromThread(object);
+    }
+    return true;
+  }
+  return false;
+}
 
 #if !defined(PRODUCT)
-word Isolate::single_step_offset() {
-  return dart::Isolate::single_step_offset();
-}
-#endif  // !defined(PRODUCT)
-
-#if !defined(PRODUCT)
-word ClassTable::ClassOffsetFor(intptr_t cid) {
-  return dart::ClassTable::ClassOffsetFor(cid);
-}
-
 word ClassTable::StateOffsetFor(intptr_t cid) {
   return dart::ClassTable::StateOffsetFor(cid);
 }
 
-word ClassTable::TableOffsetFor(intptr_t cid) {
-  return dart::ClassTable::TableOffsetFor(cid);
+word ClassTable::NewSpaceCounterOffsetFor(intptr_t index) {
+  return ClassOffsetFor(index) +
+         ClassHeapStats::allocated_since_gc_new_space_offset();
 }
 
-word ClassTable::CounterOffsetFor(intptr_t cid, bool is_new) {
-  return dart::ClassTable::CounterOffsetFor(cid, is_new);
-}
-
-word ClassTable::SizeOffsetFor(intptr_t cid, bool is_new) {
-  return dart::ClassTable::SizeOffsetFor(cid, is_new);
+word ClassTable::NewSpaceSizeOffsetFor(intptr_t index) {
+  return ClassOffsetFor(index) +
+         ClassHeapStats::allocated_size_since_gc_new_space_offset();
 }
 #endif  // !defined(PRODUCT)
 
-const word ClassTable::kSizeOfClassPairLog2 =
-    dart::ClassTable::kSizeOfClassPairLog2;
+static_assert(
+    kSmiBits <= dart::kSmiBits,
+    "Expected that size of Smi on HOST is at least as large as on target.");
 
-const intptr_t Instructions::kPolymorphicEntryOffset =
-    dart::Instructions::kPolymorphicEntryOffset;
-
-const intptr_t Instructions::kMonomorphicEntryOffset =
-    dart::Instructions::kMonomorphicEntryOffset;
-
-intptr_t Instructions::HeaderSize() {
-  return dart::Instructions::HeaderSize();
-}
-
-intptr_t Code::entry_point_offset(CodeEntryKind kind) {
-  return dart::Code::entry_point_offset(kind);
-}
-
-const word SubtypeTestCache::kTestEntryLength =
-    dart::SubtypeTestCache::kTestEntryLength;
-const word SubtypeTestCache::kInstanceClassIdOrFunction =
-    dart::SubtypeTestCache::kInstanceClassIdOrFunction;
-const word SubtypeTestCache::kInstanceTypeArguments =
-    dart::SubtypeTestCache::kInstanceTypeArguments;
-const word SubtypeTestCache::kInstantiatorTypeArguments =
-    dart::SubtypeTestCache::kInstantiatorTypeArguments;
-const word SubtypeTestCache::kFunctionTypeArguments =
-    dart::SubtypeTestCache::kFunctionTypeArguments;
-const word SubtypeTestCache::kInstanceParentFunctionTypeArguments =
-    dart::SubtypeTestCache::kInstanceParentFunctionTypeArguments;
-const word SubtypeTestCache::kInstanceDelayedFunctionTypeArguments =
-    dart::SubtypeTestCache::kInstanceDelayedFunctionTypeArguments;
-const word SubtypeTestCache::kTestResult = dart::SubtypeTestCache::kTestResult;
-
-word Context::header_size() {
-  return sizeof(dart::RawContext);
-}
-
-#if !defined(PRODUCT)
-word ClassHeapStats::TraceAllocationMask() {
-  return dart::ClassHeapStats::TraceAllocationMask();
-}
-
-word ClassHeapStats::state_offset() {
-  return dart::ClassHeapStats::state_offset();
-}
-
-word ClassHeapStats::allocated_since_gc_new_space_offset() {
-  return dart::ClassHeapStats::allocated_since_gc_new_space_offset();
-}
-
-word ClassHeapStats::allocated_size_since_gc_new_space_offset() {
-  return dart::ClassHeapStats::allocated_size_since_gc_new_space_offset();
-}
-#endif  // !defined(PRODUCT)
-
-const word Smi::kBits = dart::Smi::kBits;
 bool IsSmi(const dart::Object& a) {
-  return a.IsSmi();
+  return a.IsSmi() && Utils::IsInt(kSmiBits + 1, dart::Smi::Cast(a).Value());
+}
+
+bool IsSmi(int64_t v) {
+  return Utils::IsInt(kSmiBits + 1, v);
 }
 
 word ToRawSmi(const dart::Object& a) {
-  ASSERT(a.IsSmi());
-  return reinterpret_cast<word>(a.raw());
+  RELEASE_ASSERT(IsSmi(a));
+  return static_cast<word>(reinterpret_cast<intptr_t>(a.raw()));
 }
 
 word ToRawSmi(intptr_t value) {
   return dart::Smi::RawValue(value);
 }
 
-bool CanLoadFromThread(const dart::Object& object,
-                       word* offset /* = nullptr */) {
-  if (dart::Thread::CanLoadFromThread(object)) {
-    if (offset != nullptr) {
-      *offset = dart::Thread::OffsetFromThread(object);
-    }
-    return true;
-  }
-  return false;
+word SmiValue(const dart::Object& a) {
+  RELEASE_ASSERT(IsSmi(a));
+  return static_cast<word>(dart::Smi::Cast(a).Value());
 }
 
 #if defined(TARGET_ARCH_IA32)
@@ -828,15 +615,8 @@
 }
 #endif  // defined(TARGET_ARCH_IA32)
 
-const word NativeEntry::kNumCallWrapperArguments =
-    dart::NativeEntry::kNumCallWrapperArguments;
-
-word NativeArguments::StructSize() {
-  return sizeof(dart::NativeArguments);
-}
-
 word RegExp::function_offset(classid_t cid, bool sticky) {
-  return dart::RegExp::function_offset(cid, sticky);
+  return TranslateOffsetInWords(dart::RegExp::function_offset(cid, sticky));
 }
 
 const word Symbols::kNumberOfOneCharCodeSymbols =
@@ -844,6 +624,28 @@
 const word Symbols::kNullCharCodeSymbolOffset =
     dart::Symbols::kNullCharCodeSymbolOffset;
 
+const word String::kHashBits = dart::String::kHashBits;
+
+bool Heap::IsAllocatableInNewSpace(intptr_t instance_size) {
+  return dart::Heap::IsAllocatableInNewSpace(instance_size);
+}
+
+word Field::OffsetOf(const dart::Field& field) {
+  return TranslateOffsetInWords(field.Offset());
+}
+
+}  // namespace target
+}  // namespace compiler
+}  // namespace dart
+
+#else
+
+namespace dart {
+namespace compiler {
+namespace target {
+
+const word Array::kMaxElements = Array_kMaxElements;
+
 }  // namespace target
 }  // namespace compiler
 }  // namespace dart
diff --git a/runtime/vm/compiler/runtime_api.h b/runtime/vm/compiler/runtime_api.h
index 24ce301..57f4312 100644
--- a/runtime/vm/compiler/runtime_api.h
+++ b/runtime/vm/compiler/runtime_api.h
@@ -23,6 +23,7 @@
 #include "vm/bitfield.h"
 #include "vm/class_id.h"
 #include "vm/code_entry_kind.h"
+#include "vm/constants.h"
 #include "vm/frame_layout.h"
 #include "vm/pointer_tagging.h"
 #include "vm/runtime_entry_list.h"
@@ -64,12 +65,16 @@
 class InvalidClass {};
 extern InvalidClass kWordSize;
 extern InvalidClass kWordSizeLog2;
+extern InvalidClass kBitsPerWord;
 extern InvalidClass kNewObjectAlignmentOffset;
 extern InvalidClass kOldObjectAlignmentOffset;
 extern InvalidClass kNewObjectBitPosition;
 extern InvalidClass kObjectAlignment;
 extern InvalidClass kObjectAlignmentLog2;
 extern InvalidClass kObjectAlignmentMask;
+extern InvalidClass kSmiBits;
+extern InvalidClass kSmiMin;
+extern InvalidClass kSmiMax;
 
 static constexpr intptr_t kHostWordSize = dart::kWordSize;
 static constexpr intptr_t kHostWordSizeLog2 = dart::kWordSizeLog2;
@@ -252,21 +257,30 @@
 //    - sizes of structures
 namespace target {
 
-// Currently we define target::word to match dart::word which represents
-// host word.
-//
-// Once refactoring of the compiler is complete we will switch target::word
-// to be independent from host word.
-typedef dart::word word;
-typedef dart::uword uword;
+#if defined(TARGET_ARCH_IS_32_BIT)
+typedef int32_t word;
+typedef uint32_t uword;
+static constexpr word kWordSize = 4;
+static constexpr word kWordSizeLog2 = 2;
+#elif defined(TARGET_ARCH_IS_64_BIT)
+typedef int64_t word;
+typedef uint64_t uword;
+static constexpr word kWordSize = 8;
+static constexpr word kWordSizeLog2 = 3;
+#else
+#error "Unsupported architecture"
+#endif
 
-static constexpr word kWordSize = dart::kWordSize;
-static constexpr word kWordSizeLog2 = dart::kWordSizeLog2;
+static constexpr word kBitsPerWord = 8 * kWordSize;
 static_assert((1 << kWordSizeLog2) == kWordSize,
               "kWordSizeLog2 should match kWordSize");
 
 using ObjectAlignment = dart::ObjectAlignment<kWordSize, kWordSizeLog2>;
 
+const intptr_t kSmiBits = kBitsPerWord - 2;
+const intptr_t kSmiMax = (static_cast<intptr_t>(1) << kSmiBits) - 1;
+const intptr_t kSmiMin = -(static_cast<intptr_t>(1) << kSmiBits);
+
 // Information about heap pages.
 extern const word kPageSize;
 extern const word kPageSizeInWords;
@@ -291,10 +305,14 @@
 // Target specific information about objects.
 //
 
-// Returns true if the given object can be represented as a Smi on the
-// target platform.
+// Returns true if the given object can be represented as a Smi on the target
+// platform.
 bool IsSmi(const dart::Object& a);
 
+// Returns true if the given value can be represented as a Smi on the target
+// platform.
+bool IsSmi(int64_t value);
+
 // Return raw Smi representation of the given object for the target platform.
 word ToRawSmi(const dart::Object& a);
 
@@ -305,10 +323,12 @@
 // as a Smi.
 word ToRawSmi(intptr_t value);
 
+word SmiValue(const dart::Object& a);
+
 // If the given object can be loaded from the thread on the target then
 // return true and set offset (if provided) to the offset from the
 // thread pointer to a field that contains the object.
-bool CanLoadFromThread(const dart::Object& object, word* offset = nullptr);
+bool CanLoadFromThread(const dart::Object& object, intptr_t* offset = nullptr);
 
 // On IA32 we can embed raw pointers into generated code.
 #if defined(TARGET_ARCH_IA32)
@@ -350,12 +370,13 @@
  public:
   // Offset of the tags word.
   static word tags_offset();
+  static word InstanceSize();
 };
 
 class ObjectPool : public AllStatic {
  public:
   // Return offset to the element with the given [index] in the object pool.
-  static intptr_t element_offset(intptr_t index);
+  static word element_offset(intptr_t index);
 };
 
 class Class : public AllStatic {
@@ -364,8 +385,10 @@
 
   static word declaration_type_offset();
 
+  static word super_type_offset();
+
   // The offset of the RawObject::num_type_arguments_ field in bytes.
-  static word num_type_arguments_offset_in_bytes();
+  static word num_type_arguments_offset();
 
   // The value used if no type arguments vector is present.
   static const word kNoTypeArguments;
@@ -385,9 +408,6 @@
   // Returns the offset (in bytes) of the type arguments vector.
   static intptr_t TypeArgumentsFieldOffset(const dart::Class& klass);
 
-  // Returns the instance size (in bytes).
-  static intptr_t InstanceSize(const dart::Class& klass);
-
   // Whether to trace allocation for this klass.
   static bool TraceAllocation(const dart::Class& klass);
 };
@@ -398,6 +418,7 @@
   static word first_field_offset();
   static word DataOffsetFor(intptr_t cid);
   static word ElementSizeFor(intptr_t cid);
+  static word InstanceSize();
 };
 
 class Function : public AllStatic {
@@ -449,7 +470,9 @@
   static word data_offset();
   static word type_arguments_offset();
   static word length_offset();
+  static word element_offset(intptr_t index);
 
+  static const word kMaxElements;
   static const word kMaxNewSpaceElements;
 };
 
@@ -458,12 +481,14 @@
   static word data_offset();
   static word type_arguments_offset();
   static word length_offset();
+  static word InstanceSize();
 };
 
 class TypedDataBase : public AllStatic {
  public:
   static word data_field_offset();
   static word length_offset();
+  static word InstanceSize();
 };
 
 class TypedData : public AllStatic {
@@ -472,10 +497,41 @@
   static word InstanceSize();
 };
 
+class ExternalTypedData : public AllStatic {
+ public:
+  static word data_offset();
+};
+
+class TypedDataView : public AllStatic {
+ public:
+  static word offset_in_bytes_offset();
+  static word data_offset();
+};
+
+class LinkedHashMap : public AllStatic {
+ public:
+  static word index_offset();
+  static word data_offset();
+  static word hash_mask_offset();
+  static word used_data_offset();
+  static word deleted_keys_offset();
+  static word InstanceSize();
+};
+
 class ArgumentsDescriptor : public AllStatic {
  public:
+  static word first_named_entry_offset();
+  static word named_entry_size();
+  static word position_offset();
+  static word name_offset();
   static word count_offset();
   static word type_args_len_offset();
+  static word positional_count_offset();
+};
+
+class Pointer : public AllStatic {
+ public:
+  static word c_memory_address_offset();
 };
 
 class AbstractType : public AllStatic {
@@ -489,6 +545,7 @@
   static word type_state_offset();
   static word arguments_offset();
   static word signature_offset();
+  static word type_class_id_offset();
 };
 
 class TypeRef : public AllStatic {
@@ -499,21 +556,19 @@
 class Double : public AllStatic {
  public:
   static word value_offset();
-};
-
-class Smi : public AllStatic {
- public:
-  static const word kBits;
+  static word InstanceSize();
 };
 
 class Mint : public AllStatic {
  public:
   static word value_offset();
+  static word InstanceSize();
 };
 
 class String : public AllStatic {
  public:
   static const word kHashBits;
+  static const word kMaxElements;
   static word hash_offset();
   static word length_offset();
   static word InstanceSize();
@@ -529,14 +584,31 @@
   static word data_offset();
 };
 
+class ExternalOneByteString : public AllStatic {
+ public:
+  static word external_data_offset();
+};
+
+class ExternalTwoByteString : public AllStatic {
+ public:
+  static word external_data_offset();
+};
+
+class Int32x4 : public AllStatic {
+ public:
+  static word InstanceSize();
+};
+
 class Float32x4 : public AllStatic {
  public:
   static word value_offset();
+  static word InstanceSize();
 };
 
 class Float64x2 : public AllStatic {
  public:
   static word value_offset();
+  static word InstanceSize();
 };
 
 class TimelineStream : public AllStatic {
@@ -544,12 +616,18 @@
   static word enabled_offset();
 };
 
+class VMHandles : public AllStatic {
+ public:
+  static constexpr intptr_t kOffsetOfRawPtrInHandle = kWordSize;
+};
+
 class Thread : public AllStatic {
  public:
   static word dart_stream_offset();
   static word async_stack_trace_offset();
   static word predefined_symbols_address_offset();
-
+  static word deoptimize_entry_offset();
+  static word megamorphic_call_checked_entry_offset();
   static word active_exception_offset();
   static word active_stacktrace_offset();
   static word resume_pc_offset();
@@ -569,10 +647,10 @@
   static word null_error_shared_without_fpu_regs_entry_point_offset();
   static word write_barrier_mask_offset();
   static word monomorphic_miss_entry_offset();
-  static word write_barrier_wrappers_thread_offset(intptr_t regno);
+  static word write_barrier_wrappers_thread_offset(Register regno);
   static word array_write_barrier_entry_point_offset();
   static word write_barrier_entry_point_offset();
-  static word verify_callback_isolate_entry_point_offset();
+  static word verify_callback_entry_offset();
   static word vm_tag_offset();
   static uword vm_tag_compiled_id();
 
@@ -583,9 +661,14 @@
   static word execution_state_offset();
   static uword native_execution_state();
   static uword generated_execution_state();
+  static word stack_overflow_flags_offset();
+  static word stack_overflow_shared_stub_entry_point_offset(bool fpu_regs);
+  static word stack_limit_offset();
+  static word unboxed_int64_runtime_arg_offset();
 
   static word callback_code_offset();
 
+  static word AllocateArray_entry_point_offset();
 #if !defined(TARGET_ARCH_DBC)
   static word write_barrier_code_offset();
   static word array_write_barrier_code_offset();
@@ -602,7 +685,9 @@
   static word invoke_dart_code_from_bytecode_stub_offset();
   static word null_error_shared_without_fpu_regs_stub_offset();
   static word null_error_shared_with_fpu_regs_stub_offset();
+  static word stack_overflow_shared_without_fpu_regs_entry_point_offset();
   static word stack_overflow_shared_without_fpu_regs_stub_offset();
+  static word stack_overflow_shared_with_fpu_regs_entry_point_offset();
   static word stack_overflow_shared_with_fpu_regs_stub_offset();
   static word lazy_deopt_from_return_stub_offset();
   static word lazy_deopt_from_throw_stub_offset();
@@ -628,6 +713,7 @@
 #undef DECLARE_CONSTANT_OFFSET_GETTER
 
   static word OffsetFromThread(const dart::Object& object);
+  static intptr_t OffsetFromThread(const dart::RuntimeEntry* runtime_entry);
 };
 
 class StoreBufferBlock : public AllStatic {
@@ -670,9 +756,9 @@
 #if !defined(PRODUCT)
   static word ClassOffsetFor(intptr_t cid);
   static word StateOffsetFor(intptr_t cid);
-  static word TableOffsetFor(intptr_t cid);
-  static word CounterOffsetFor(intptr_t cid, bool is_new);
-  static word SizeOffsetFor(intptr_t cid, bool is_new);
+  static word class_heap_stats_table_offset();
+  static word NewSpaceCounterOffsetFor(intptr_t cid);
+  static word NewSpaceSizeOffsetFor(intptr_t cid);
 #endif  // !defined(PRODUCT)
   static const word kSizeOfClassPairLog2;
 };
@@ -689,9 +775,10 @@
 
 class Instructions : public AllStatic {
  public:
-  static const intptr_t kPolymorphicEntryOffset;
-  static const intptr_t kMonomorphicEntryOffset;
-  static intptr_t HeaderSize();
+  static const word kPolymorphicEntryOffset;
+  static const word kMonomorphicEntryOffset;
+  static word HeaderSize();
+  static word UnalignedHeaderSize();
 };
 
 class Code : public AllStatic {
@@ -700,10 +787,11 @@
   static uword EntryPointOf(const dart::Code& code);
 #endif  // defined(TARGET_ARCH_IA32)
 
-  static intptr_t object_pool_offset();
-  static intptr_t entry_point_offset(
-      CodeEntryKind kind = CodeEntryKind::kNormal);
-  static intptr_t saved_instructions_offset();
+  static word object_pool_offset();
+  static word entry_point_offset(CodeEntryKind kind = CodeEntryKind::kNormal);
+  static word function_entry_point_offset(CodeEntryKind kind);
+  static word saved_instructions_offset();
+  static word owner_offset();
 };
 
 class SubtypeTestCache : public AllStatic {
@@ -736,6 +824,8 @@
   static word function_offset();
   static word function_type_arguments_offset();
   static word instantiator_type_arguments_offset();
+  static word hash_offset();
+  static word InstanceSize();
 };
 
 class HeapPage : public AllStatic {
@@ -783,6 +873,24 @@
   static const word kNullCharCodeSymbolOffset;
 };
 
+class Field : public AllStatic {
+ public:
+  static word OffsetOf(const dart::Field& field);
+
+  static word guarded_cid_offset();
+  static word guarded_list_length_in_object_offset_offset();
+  static word guarded_list_length_offset();
+  static word is_nullable_offset();
+  static word static_value_offset();
+  static word kind_bits_offset();
+};
+
+class TypeArguments : public AllStatic {
+ public:
+  static word instantiations_offset();
+  static word type_at_offset(intptr_t i);
+};
+
 }  // namespace target
 }  // namespace compiler
 }  // namespace dart
diff --git a/runtime/vm/compiler/runtime_offsets_extracted.h b/runtime/vm/compiler/runtime_offsets_extracted.h
index 4540195..761b30f 100644
--- a/runtime/vm/compiler/runtime_offsets_extracted.h
+++ b/runtime/vm/compiler/runtime_offsets_extracted.h
@@ -16,1328 +16,1954 @@
 // dart.cc.
 
 #if defined(TARGET_ARCH_ARM)
-static constexpr dart::word ObjectPool_elements_start_offset = 8;
-static constexpr dart::word ObjectPool_element_size = 4;
-static constexpr dart::word Array_kMaxElements = 268435455;
-static constexpr dart::word Array_kMaxNewSpaceElements = 65533;
-static constexpr dart::word ClassTable_kSizeOfClassPairLog2 = 3;
-static constexpr dart::word Instructions_kMonomorphicEntryOffset = 20;
-static constexpr dart::word Instructions_kPolymorphicEntryOffset = 0;
-static constexpr dart::word HeapPage_kBytesPerCardLog2 = 9;
-static constexpr dart::word NativeEntry_kNumCallWrapperArguments = 2;
-static constexpr dart::word String_kMaxElements = 536870911;
-static constexpr dart::word SubtypeTestCache_kFunctionTypeArguments = 4;
-static constexpr dart::word SubtypeTestCache_kInstanceClassIdOrFunction = 1;
-static constexpr dart::word
+static constexpr dart::compiler::target::word ObjectPool_elements_start_offset =
+    8;
+static constexpr dart::compiler::target::word ObjectPool_element_size = 4;
+static constexpr dart::compiler::target::word Array_kMaxElements = 268435455;
+static constexpr dart::compiler::target::word Array_kMaxNewSpaceElements =
+    65533;
+static constexpr dart::compiler::target::word ClassTable_kSizeOfClassPairLog2 =
+    3;
+static constexpr dart::compiler::target::word
+    Instructions_kMonomorphicEntryOffset = 20;
+static constexpr dart::compiler::target::word
+    Instructions_kPolymorphicEntryOffset = 0;
+static constexpr dart::compiler::target::word HeapPage_kBytesPerCardLog2 = 9;
+static constexpr dart::compiler::target::word
+    NativeEntry_kNumCallWrapperArguments = 2;
+static constexpr dart::compiler::target::word String_kMaxElements = 536870911;
+static constexpr dart::compiler::target::word
+    SubtypeTestCache_kFunctionTypeArguments = 4;
+static constexpr dart::compiler::target::word
+    SubtypeTestCache_kInstanceClassIdOrFunction = 1;
+static constexpr dart::compiler::target::word
     SubtypeTestCache_kInstanceDelayedFunctionTypeArguments = 6;
-static constexpr dart::word
+static constexpr dart::compiler::target::word
     SubtypeTestCache_kInstanceParentFunctionTypeArguments = 5;
-static constexpr dart::word SubtypeTestCache_kInstanceTypeArguments = 2;
-static constexpr dart::word SubtypeTestCache_kInstantiatorTypeArguments = 3;
-static constexpr dart::word SubtypeTestCache_kTestEntryLength = 7;
-static constexpr dart::word SubtypeTestCache_kTestResult = 0;
-static constexpr dart::word AbstractType_type_test_stub_entry_point_offset = 4;
-static constexpr dart::word ArgumentsDescriptor_count_offset = 16;
-static constexpr dart::word ArgumentsDescriptor_first_named_entry_offset = 24;
-static constexpr dart::word ArgumentsDescriptor_named_entry_size = 8;
-static constexpr dart::word ArgumentsDescriptor_name_offset = 0;
-static constexpr dart::word ArgumentsDescriptor_position_offset = 4;
-static constexpr dart::word ArgumentsDescriptor_positional_count_offset = 20;
-static constexpr dart::word ArgumentsDescriptor_type_args_len_offset = 12;
-static constexpr dart::word Array_data_offset = 12;
-static constexpr dart::word Array_length_offset = 8;
-static constexpr dart::word Array_tags_offset = 0;
-static constexpr dart::word Array_type_arguments_offset = 4;
-static constexpr dart::word Class_declaration_type_offset = 56;
-static constexpr dart::word Class_num_type_arguments_offset = 102;
-static constexpr dart::word Class_super_type_offset = 44;
-static constexpr dart::word Class_type_arguments_field_offset_in_words_offset =
-    92;
-static constexpr dart::word ClassHeapStats_TraceAllocationMask = 1;
-static constexpr dart::word ClassHeapStats_allocated_since_gc_new_space_offset =
-    48;
-static constexpr dart::word
-    ClassHeapStats_allocated_size_since_gc_new_space_offset = 52;
-static constexpr dart::word ClassHeapStats_state_offset = 160;
-static constexpr dart::word ClassTable_table_offset = 8;
-static constexpr dart::word Closure_context_offset = 20;
-static constexpr dart::word Closure_delayed_type_arguments_offset = 12;
-static constexpr dart::word Closure_function_offset = 16;
-static constexpr dart::word Closure_function_type_arguments_offset = 8;
-static constexpr dart::word Closure_hash_offset = 24;
-static constexpr dart::word Closure_instantiator_type_arguments_offset = 4;
-static constexpr dart::word Code_object_pool_offset = 20;
-static constexpr dart::word Code_saved_instructions_offset = 24;
-static constexpr dart::word Code_owner_offset = 28;
-static constexpr dart::word Context_num_variables_offset = 4;
-static constexpr dart::word Context_parent_offset = 8;
-static constexpr dart::word Double_value_offset = 8;
-static constexpr dart::word ExternalOneByteString_external_data_offset = 12;
-static constexpr dart::word ExternalTwoByteString_external_data_offset = 12;
-static constexpr dart::word Float32x4_value_offset = 8;
-static constexpr dart::word Float64x2_value_offset = 8;
-static constexpr dart::word Field_guarded_cid_offset = 48;
-static constexpr dart::word Field_guarded_list_length_in_object_offset_offset =
+static constexpr dart::compiler::target::word
+    SubtypeTestCache_kInstanceTypeArguments = 2;
+static constexpr dart::compiler::target::word
+    SubtypeTestCache_kInstantiatorTypeArguments = 3;
+static constexpr dart::compiler::target::word
+    SubtypeTestCache_kTestEntryLength = 7;
+static constexpr dart::compiler::target::word SubtypeTestCache_kTestResult = 0;
+static constexpr dart::compiler::target::word
+    AbstractType_type_test_stub_entry_point_offset = 4;
+static constexpr dart::compiler::target::word ArgumentsDescriptor_count_offset =
+    16;
+static constexpr dart::compiler::target::word
+    ArgumentsDescriptor_first_named_entry_offset = 24;
+static constexpr dart::compiler::target::word
+    ArgumentsDescriptor_named_entry_size = 8;
+static constexpr dart::compiler::target::word ArgumentsDescriptor_name_offset =
+    0;
+static constexpr dart::compiler::target::word
+    ArgumentsDescriptor_position_offset = 4;
+static constexpr dart::compiler::target::word
+    ArgumentsDescriptor_positional_count_offset = 20;
+static constexpr dart::compiler::target::word
+    ArgumentsDescriptor_type_args_len_offset = 12;
+static constexpr dart::compiler::target::word Array_data_offset = 12;
+static constexpr dart::compiler::target::word Array_length_offset = 8;
+static constexpr dart::compiler::target::word Array_tags_offset = 0;
+static constexpr dart::compiler::target::word Array_type_arguments_offset = 4;
+static constexpr dart::compiler::target::word Class_declaration_type_offset =
     56;
-static constexpr dart::word Field_guarded_list_length_offset = 28;
-static constexpr dart::word Field_is_nullable_offset = 50;
-static constexpr dart::word Field_static_value_offset = 16;
-static constexpr dart::word Field_kind_bits_offset = 58;
-static constexpr dart::word Function_code_offset = 44;
-static constexpr dart::word Function_entry_point_offset = 4;
-static constexpr dart::word Function_unchecked_entry_point_offset = 8;
-static constexpr dart::word Function_usage_counter_offset = 76;
-static constexpr dart::word GrowableObjectArray_data_offset = 12;
-static constexpr dart::word GrowableObjectArray_length_offset = 8;
-static constexpr dart::word GrowableObjectArray_type_arguments_offset = 4;
-static constexpr dart::word HeapPage_card_table_offset = 20;
-static constexpr dart::word ICData_NumArgsTestedMask = 3;
-static constexpr dart::word ICData_NumArgsTestedShift = 0;
-static constexpr dart::word ICData_arguments_descriptor_offset = 12;
-static constexpr dart::word ICData_entries_offset = 4;
-static constexpr dart::word ICData_owner_offset = 20;
-static constexpr dart::word ICData_state_bits_offset = 28;
-static constexpr dart::word ICData_receivers_static_type_offset = 16;
-static constexpr dart::word Isolate_class_table_offset = 24;
-static constexpr dart::word Isolate_current_tag_offset = 8;
-static constexpr dart::word Isolate_default_tag_offset = 12;
-static constexpr dart::word Isolate_ic_miss_code_offset = 16;
-static constexpr dart::word Isolate_object_store_offset = 20;
-static constexpr dart::word Isolate_single_step_offset = 44;
-static constexpr dart::word Isolate_user_tag_offset = 4;
-static constexpr dart::word LinkedHashMap_data_offset = 16;
-static constexpr dart::word LinkedHashMap_deleted_keys_offset = 24;
-static constexpr dart::word LinkedHashMap_hash_mask_offset = 12;
-static constexpr dart::word LinkedHashMap_index_offset = 8;
-static constexpr dart::word LinkedHashMap_used_data_offset = 20;
-static constexpr dart::word MarkingStackBlock_pointers_offset = 8;
-static constexpr dart::word MarkingStackBlock_top_offset = 4;
-static constexpr dart::word MegamorphicCache_arguments_descriptor_offset = 16;
-static constexpr dart::word MegamorphicCache_buckets_offset = 4;
-static constexpr dart::word MegamorphicCache_mask_offset = 8;
-static constexpr dart::word Mint_value_offset = 8;
-static constexpr dart::word NativeArguments_argc_tag_offset = 4;
-static constexpr dart::word NativeArguments_argv_offset = 8;
-static constexpr dart::word NativeArguments_retval_offset = 12;
-static constexpr dart::word NativeArguments_thread_offset = 0;
-static constexpr dart::word ObjectStore_double_type_offset = 64;
-static constexpr dart::word ObjectStore_int_type_offset = 32;
-static constexpr dart::word ObjectStore_string_type_offset = 80;
-static constexpr dart::word OneByteString_data_offset = 12;
-static constexpr dart::word Pointer_c_memory_address_offset = 8;
-static constexpr dart::word SingleTargetCache_entry_point_offset = 8;
-static constexpr dart::word SingleTargetCache_lower_limit_offset = 12;
-static constexpr dart::word SingleTargetCache_target_offset = 4;
-static constexpr dart::word SingleTargetCache_upper_limit_offset = 14;
-static constexpr dart::word StoreBufferBlock_pointers_offset = 8;
-static constexpr dart::word StoreBufferBlock_top_offset = 4;
-static constexpr dart::word String_hash_offset = 8;
-static constexpr dart::word String_length_offset = 4;
-static constexpr dart::word SubtypeTestCache_cache_offset = 4;
-static constexpr dart::word Thread_AllocateArray_entry_point_offset = 284;
-static constexpr dart::word Thread_active_exception_offset = 612;
-static constexpr dart::word Thread_active_stacktrace_offset = 616;
-static constexpr dart::word Thread_array_write_barrier_code_offset = 112;
-static constexpr dart::word Thread_array_write_barrier_entry_point_offset = 196;
-static constexpr dart::word Thread_async_stack_trace_offset = 84;
-static constexpr dart::word
+static constexpr dart::compiler::target::word Class_num_type_arguments_offset =
+    102;
+static constexpr dart::compiler::target::word Class_super_type_offset = 44;
+static constexpr dart::compiler::target::word
+    Class_type_arguments_field_offset_in_words_offset = 92;
+static constexpr dart::compiler::target::word
+    ClassHeapStats_TraceAllocationMask = 1;
+static constexpr dart::compiler::target::word
+    ClassHeapStats_allocated_since_gc_new_space_offset = 48;
+static constexpr dart::compiler::target::word
+    ClassHeapStats_allocated_size_since_gc_new_space_offset = 52;
+static constexpr dart::compiler::target::word ClassHeapStats_state_offset = 160;
+static constexpr dart::compiler::target::word ClassTable_table_offset = 8;
+static constexpr dart::compiler::target::word Closure_context_offset = 20;
+static constexpr dart::compiler::target::word
+    Closure_delayed_type_arguments_offset = 12;
+static constexpr dart::compiler::target::word Closure_function_offset = 16;
+static constexpr dart::compiler::target::word
+    Closure_function_type_arguments_offset = 8;
+static constexpr dart::compiler::target::word Closure_hash_offset = 24;
+static constexpr dart::compiler::target::word
+    Closure_instantiator_type_arguments_offset = 4;
+static constexpr dart::compiler::target::word Code_object_pool_offset = 20;
+static constexpr dart::compiler::target::word Code_saved_instructions_offset =
+    24;
+static constexpr dart::compiler::target::word Code_owner_offset = 28;
+static constexpr dart::compiler::target::word Context_num_variables_offset = 4;
+static constexpr dart::compiler::target::word Context_parent_offset = 8;
+static constexpr dart::compiler::target::word Double_value_offset = 8;
+static constexpr dart::compiler::target::word
+    ExternalOneByteString_external_data_offset = 12;
+static constexpr dart::compiler::target::word
+    ExternalTwoByteString_external_data_offset = 12;
+static constexpr dart::compiler::target::word Float32x4_value_offset = 8;
+static constexpr dart::compiler::target::word Float64x2_value_offset = 8;
+static constexpr dart::compiler::target::word Field_guarded_cid_offset = 48;
+static constexpr dart::compiler::target::word
+    Field_guarded_list_length_in_object_offset_offset = 56;
+static constexpr dart::compiler::target::word Field_guarded_list_length_offset =
+    28;
+static constexpr dart::compiler::target::word Field_is_nullable_offset = 50;
+static constexpr dart::compiler::target::word Field_static_value_offset = 16;
+static constexpr dart::compiler::target::word Field_kind_bits_offset = 58;
+static constexpr dart::compiler::target::word Function_code_offset = 44;
+static constexpr dart::compiler::target::word Function_entry_point_offset = 4;
+static constexpr dart::compiler::target::word
+    Function_unchecked_entry_point_offset = 8;
+static constexpr dart::compiler::target::word Function_usage_counter_offset =
+    76;
+static constexpr dart::compiler::target::word GrowableObjectArray_data_offset =
+    12;
+static constexpr dart::compiler::target::word
+    GrowableObjectArray_length_offset = 8;
+static constexpr dart::compiler::target::word
+    GrowableObjectArray_type_arguments_offset = 4;
+static constexpr dart::compiler::target::word HeapPage_card_table_offset = 20;
+static constexpr dart::compiler::target::word ICData_NumArgsTestedMask = 3;
+static constexpr dart::compiler::target::word ICData_NumArgsTestedShift = 0;
+static constexpr dart::compiler::target::word
+    ICData_arguments_descriptor_offset = 12;
+static constexpr dart::compiler::target::word ICData_entries_offset = 4;
+static constexpr dart::compiler::target::word ICData_owner_offset = 20;
+static constexpr dart::compiler::target::word ICData_state_bits_offset = 28;
+static constexpr dart::compiler::target::word
+    ICData_receivers_static_type_offset = 16;
+static constexpr dart::compiler::target::word Isolate_class_table_offset = 24;
+static constexpr dart::compiler::target::word Isolate_current_tag_offset = 8;
+static constexpr dart::compiler::target::word Isolate_default_tag_offset = 12;
+static constexpr dart::compiler::target::word Isolate_ic_miss_code_offset = 16;
+static constexpr dart::compiler::target::word Isolate_object_store_offset = 20;
+static constexpr dart::compiler::target::word Isolate_single_step_offset = 44;
+static constexpr dart::compiler::target::word Isolate_user_tag_offset = 4;
+static constexpr dart::compiler::target::word LinkedHashMap_data_offset = 16;
+static constexpr dart::compiler::target::word
+    LinkedHashMap_deleted_keys_offset = 24;
+static constexpr dart::compiler::target::word LinkedHashMap_hash_mask_offset =
+    12;
+static constexpr dart::compiler::target::word LinkedHashMap_index_offset = 8;
+static constexpr dart::compiler::target::word LinkedHashMap_used_data_offset =
+    20;
+static constexpr dart::compiler::target::word
+    MarkingStackBlock_pointers_offset = 8;
+static constexpr dart::compiler::target::word MarkingStackBlock_top_offset = 4;
+static constexpr dart::compiler::target::word
+    MegamorphicCache_arguments_descriptor_offset = 16;
+static constexpr dart::compiler::target::word MegamorphicCache_buckets_offset =
+    4;
+static constexpr dart::compiler::target::word MegamorphicCache_mask_offset = 8;
+static constexpr dart::compiler::target::word Mint_value_offset = 8;
+static constexpr dart::compiler::target::word NativeArguments_argc_tag_offset =
+    4;
+static constexpr dart::compiler::target::word NativeArguments_argv_offset = 8;
+static constexpr dart::compiler::target::word NativeArguments_retval_offset =
+    12;
+static constexpr dart::compiler::target::word NativeArguments_thread_offset = 0;
+static constexpr dart::compiler::target::word ObjectStore_double_type_offset =
+    64;
+static constexpr dart::compiler::target::word ObjectStore_int_type_offset = 32;
+static constexpr dart::compiler::target::word ObjectStore_string_type_offset =
+    80;
+static constexpr dart::compiler::target::word OneByteString_data_offset = 12;
+static constexpr dart::compiler::target::word Pointer_c_memory_address_offset =
+    8;
+static constexpr dart::compiler::target::word
+    SingleTargetCache_entry_point_offset = 8;
+static constexpr dart::compiler::target::word
+    SingleTargetCache_lower_limit_offset = 12;
+static constexpr dart::compiler::target::word SingleTargetCache_target_offset =
+    4;
+static constexpr dart::compiler::target::word
+    SingleTargetCache_upper_limit_offset = 14;
+static constexpr dart::compiler::target::word StoreBufferBlock_pointers_offset =
+    8;
+static constexpr dart::compiler::target::word StoreBufferBlock_top_offset = 4;
+static constexpr dart::compiler::target::word String_hash_offset = 8;
+static constexpr dart::compiler::target::word String_length_offset = 4;
+static constexpr dart::compiler::target::word SubtypeTestCache_cache_offset = 4;
+static constexpr dart::compiler::target::word
+    Thread_AllocateArray_entry_point_offset = 284;
+static constexpr dart::compiler::target::word Thread_active_exception_offset =
+    612;
+static constexpr dart::compiler::target::word Thread_active_stacktrace_offset =
+    616;
+static constexpr dart::compiler::target::word
+    Thread_array_write_barrier_code_offset = 112;
+static constexpr dart::compiler::target::word
+    Thread_array_write_barrier_entry_point_offset = 196;
+static constexpr dart::compiler::target::word Thread_async_stack_trace_offset =
+    84;
+static constexpr dart::compiler::target::word
     Thread_auto_scope_native_wrapper_entry_point_offset = 244;
-static constexpr dart::word Thread_bool_false_offset = 104;
-static constexpr dart::word Thread_bool_true_offset = 100;
-static constexpr dart::word Thread_call_to_runtime_entry_point_offset = 200;
-static constexpr dart::word Thread_call_to_runtime_stub_offset = 132;
-static constexpr dart::word Thread_dart_stream_offset = 644;
-static constexpr dart::word Thread_deoptimize_entry_offset = 232;
-static constexpr dart::word Thread_deoptimize_stub_offset = 164;
-static constexpr dart::word Thread_double_abs_address_offset = 264;
-static constexpr dart::word Thread_double_negate_address_offset = 260;
-static constexpr dart::word Thread_end_offset = 60;
-static constexpr dart::word Thread_enter_safepoint_stub_offset = 184;
-static constexpr dart::word Thread_execution_state_offset = 628;
-static constexpr dart::word Thread_exit_safepoint_stub_offset = 188;
-static constexpr dart::word Thread_fix_allocation_stub_code_offset = 120;
-static constexpr dart::word Thread_fix_callers_target_code_offset = 116;
-static constexpr dart::word Thread_float_absolute_address_offset = 276;
-static constexpr dart::word Thread_float_negate_address_offset = 272;
-static constexpr dart::word Thread_float_not_address_offset = 268;
-static constexpr dart::word Thread_float_zerow_address_offset = 280;
-static constexpr dart::word Thread_global_object_pool_offset = 620;
-static constexpr dart::word Thread_ic_lookup_through_code_stub_offset = 156;
-static constexpr dart::word Thread_interpret_call_entry_point_offset = 248;
-static constexpr dart::word Thread_invoke_dart_code_from_bytecode_stub_offset =
-    128;
-static constexpr dart::word Thread_invoke_dart_code_stub_offset = 124;
-static constexpr dart::word Thread_isolate_offset = 48;
-static constexpr dart::word Thread_lazy_deopt_from_return_stub_offset = 168;
-static constexpr dart::word Thread_lazy_deopt_from_throw_stub_offset = 172;
-static constexpr dart::word Thread_lazy_specialize_type_test_stub_offset = 180;
-static constexpr dart::word Thread_marking_stack_block_offset = 72;
-static constexpr dart::word Thread_megamorphic_call_checked_entry_offset = 220;
-static constexpr dart::word Thread_monomorphic_miss_entry_offset = 224;
-static constexpr dart::word Thread_monomorphic_miss_stub_offset = 152;
-static constexpr dart::word Thread_no_scope_native_wrapper_entry_point_offset =
-    240;
-static constexpr dart::word
+static constexpr dart::compiler::target::word Thread_bool_false_offset = 104;
+static constexpr dart::compiler::target::word Thread_bool_true_offset = 100;
+static constexpr dart::compiler::target::word
+    Thread_call_to_runtime_entry_point_offset = 200;
+static constexpr dart::compiler::target::word
+    Thread_call_to_runtime_stub_offset = 132;
+static constexpr dart::compiler::target::word Thread_dart_stream_offset = 644;
+static constexpr dart::compiler::target::word Thread_deoptimize_entry_offset =
+    232;
+static constexpr dart::compiler::target::word Thread_deoptimize_stub_offset =
+    164;
+static constexpr dart::compiler::target::word Thread_double_abs_address_offset =
+    264;
+static constexpr dart::compiler::target::word
+    Thread_double_negate_address_offset = 260;
+static constexpr dart::compiler::target::word Thread_end_offset = 60;
+static constexpr dart::compiler::target::word
+    Thread_enter_safepoint_stub_offset = 184;
+static constexpr dart::compiler::target::word Thread_execution_state_offset =
+    628;
+static constexpr dart::compiler::target::word
+    Thread_exit_safepoint_stub_offset = 188;
+static constexpr dart::compiler::target::word
+    Thread_fix_allocation_stub_code_offset = 120;
+static constexpr dart::compiler::target::word
+    Thread_fix_callers_target_code_offset = 116;
+static constexpr dart::compiler::target::word
+    Thread_float_absolute_address_offset = 276;
+static constexpr dart::compiler::target::word
+    Thread_float_negate_address_offset = 272;
+static constexpr dart::compiler::target::word Thread_float_not_address_offset =
+    268;
+static constexpr dart::compiler::target::word
+    Thread_float_zerow_address_offset = 280;
+static constexpr dart::compiler::target::word Thread_global_object_pool_offset =
+    620;
+static constexpr dart::compiler::target::word
+    Thread_ic_lookup_through_code_stub_offset = 156;
+static constexpr dart::compiler::target::word
+    Thread_interpret_call_entry_point_offset = 248;
+static constexpr dart::compiler::target::word
+    Thread_invoke_dart_code_from_bytecode_stub_offset = 128;
+static constexpr dart::compiler::target::word
+    Thread_invoke_dart_code_stub_offset = 124;
+static constexpr dart::compiler::target::word Thread_isolate_offset = 48;
+static constexpr dart::compiler::target::word
+    Thread_lazy_deopt_from_return_stub_offset = 168;
+static constexpr dart::compiler::target::word
+    Thread_lazy_deopt_from_throw_stub_offset = 172;
+static constexpr dart::compiler::target::word
+    Thread_lazy_specialize_type_test_stub_offset = 180;
+static constexpr dart::compiler::target::word
+    Thread_marking_stack_block_offset = 72;
+static constexpr dart::compiler::target::word
+    Thread_megamorphic_call_checked_entry_offset = 220;
+static constexpr dart::compiler::target::word
+    Thread_monomorphic_miss_entry_offset = 224;
+static constexpr dart::compiler::target::word
+    Thread_monomorphic_miss_stub_offset = 152;
+static constexpr dart::compiler::target::word
+    Thread_no_scope_native_wrapper_entry_point_offset = 240;
+static constexpr dart::compiler::target::word
     Thread_null_error_shared_with_fpu_regs_entry_point_offset = 208;
-static constexpr dart::word Thread_null_error_shared_with_fpu_regs_stub_offset =
-    140;
-static constexpr dart::word
+static constexpr dart::compiler::target::word
+    Thread_null_error_shared_with_fpu_regs_stub_offset = 140;
+static constexpr dart::compiler::target::word
     Thread_null_error_shared_without_fpu_regs_entry_point_offset = 204;
-static constexpr dart::word
+static constexpr dart::compiler::target::word
     Thread_null_error_shared_without_fpu_regs_stub_offset = 136;
-static constexpr dart::word Thread_object_null_offset = 96;
-static constexpr dart::word Thread_predefined_symbols_address_offset = 252;
-static constexpr dart::word Thread_resume_pc_offset = 624;
-static constexpr dart::word Thread_safepoint_state_offset = 632;
-static constexpr dart::word Thread_slow_type_test_stub_offset = 176;
-static constexpr dart::word Thread_stack_limit_offset = 36;
-static constexpr dart::word Thread_stack_overflow_flags_offset = 40;
-static constexpr dart::word
+static constexpr dart::compiler::target::word Thread_object_null_offset = 96;
+static constexpr dart::compiler::target::word
+    Thread_predefined_symbols_address_offset = 252;
+static constexpr dart::compiler::target::word Thread_resume_pc_offset = 624;
+static constexpr dart::compiler::target::word Thread_safepoint_state_offset =
+    632;
+static constexpr dart::compiler::target::word
+    Thread_slow_type_test_stub_offset = 176;
+static constexpr dart::compiler::target::word Thread_stack_limit_offset = 36;
+static constexpr dart::compiler::target::word
+    Thread_stack_overflow_flags_offset = 40;
+static constexpr dart::compiler::target::word
     Thread_stack_overflow_shared_with_fpu_regs_entry_point_offset = 216;
-static constexpr dart::word
+static constexpr dart::compiler::target::word
     Thread_stack_overflow_shared_with_fpu_regs_stub_offset = 148;
-static constexpr dart::word
+static constexpr dart::compiler::target::word
     Thread_stack_overflow_shared_without_fpu_regs_entry_point_offset = 212;
-static constexpr dart::word
+static constexpr dart::compiler::target::word
     Thread_stack_overflow_shared_without_fpu_regs_stub_offset = 144;
-static constexpr dart::word Thread_store_buffer_block_offset = 68;
-static constexpr dart::word Thread_top_exit_frame_info_offset = 64;
-static constexpr dart::word Thread_top_offset = 56;
-static constexpr dart::word Thread_top_resource_offset = 24;
-static constexpr dart::word Thread_unboxed_int64_runtime_arg_offset = 88;
-static constexpr dart::word Thread_vm_tag_offset = 80;
-static constexpr dart::word Thread_write_barrier_code_offset = 108;
-static constexpr dart::word Thread_write_barrier_entry_point_offset = 192;
-static constexpr dart::word Thread_write_barrier_mask_offset = 44;
-static constexpr dart::word Thread_verify_callback_entry_offset = 236;
-static constexpr dart::word Thread_callback_code_offset = 636;
-static constexpr dart::word TimelineStream_enabled_offset = 8;
-static constexpr dart::word TwoByteString_data_offset = 12;
-static constexpr dart::word Type_arguments_offset = 16;
-static constexpr dart::word Type_hash_offset = 20;
-static constexpr dart::word Type_signature_offset = 24;
-static constexpr dart::word Type_type_class_id_offset = 12;
-static constexpr dart::word Type_type_state_offset = 32;
-static constexpr dart::word TypeArguments_instantiations_offset = 4;
-static constexpr dart::word TypeRef_type_offset = 12;
-static constexpr dart::word TypedDataBase_data_field_offset = 4;
-static constexpr dart::word TypedDataBase_length_offset = 8;
-static constexpr dart::word TypedDataView_data_offset = 12;
-static constexpr dart::word TypedDataView_offset_in_bytes_offset = 16;
-static constexpr dart::word TypedData_data_offset = 12;
-static constexpr dart::word UserTag_tag_offset = 8;
-static constexpr dart::word Array_elements_start_offset = 12;
-static constexpr dart::word Array_element_size = 4;
-static constexpr dart::word TypeArguments_elements_start_offset = 16;
-static constexpr dart::word TypeArguments_element_size = 4;
-static constexpr dart::word ClassTable_elements_start_offset = 0;
-static constexpr dart::word ClassTable_element_size = 168;
-static constexpr dart::word ClassTable_class_heap_stats_table_offset = 16;
-static dart::word Code_entry_point_offset[] = {4, 12, 8, 16};
-static dart::word Code_function_entry_point_offset[] = {4, 8};
-static dart::word Thread_write_barrier_wrappers_thread_offset[] = {
-    576, 580, 584, 588, 592, -1, 596, 600, 604, 608, -1, -1, -1, -1, -1, -1};
-static constexpr dart::word Array_header_size = 12;
-static constexpr dart::word Context_header_size = 12;
-static constexpr dart::word Double_InstanceSize = 16;
-static constexpr dart::word Float32x4_InstanceSize = 24;
-static constexpr dart::word Float64x2_InstanceSize = 24;
-static constexpr dart::word Instructions_UnalignedHeaderSize = 16;
-static constexpr dart::word Int32x4_InstanceSize = 24;
-static constexpr dart::word Mint_InstanceSize = 16;
-static constexpr dart::word NativeArguments_StructSize = 16;
-static constexpr dart::word String_InstanceSize = 12;
-static constexpr dart::word TypedData_InstanceSize = 12;
+static constexpr dart::compiler::target::word Thread_store_buffer_block_offset =
+    68;
+static constexpr dart::compiler::target::word
+    Thread_top_exit_frame_info_offset = 64;
+static constexpr dart::compiler::target::word Thread_top_offset = 56;
+static constexpr dart::compiler::target::word Thread_top_resource_offset = 24;
+static constexpr dart::compiler::target::word
+    Thread_unboxed_int64_runtime_arg_offset = 88;
+static constexpr dart::compiler::target::word Thread_vm_tag_offset = 80;
+static constexpr dart::compiler::target::word Thread_write_barrier_code_offset =
+    108;
+static constexpr dart::compiler::target::word
+    Thread_write_barrier_entry_point_offset = 192;
+static constexpr dart::compiler::target::word Thread_write_barrier_mask_offset =
+    44;
+static constexpr dart::compiler::target::word
+    Thread_verify_callback_entry_offset = 236;
+static constexpr dart::compiler::target::word Thread_callback_code_offset = 636;
+static constexpr dart::compiler::target::word TimelineStream_enabled_offset = 8;
+static constexpr dart::compiler::target::word TwoByteString_data_offset = 12;
+static constexpr dart::compiler::target::word Type_arguments_offset = 16;
+static constexpr dart::compiler::target::word Type_hash_offset = 20;
+static constexpr dart::compiler::target::word Type_signature_offset = 24;
+static constexpr dart::compiler::target::word Type_type_class_id_offset = 12;
+static constexpr dart::compiler::target::word Type_type_state_offset = 32;
+static constexpr dart::compiler::target::word
+    TypeArguments_instantiations_offset = 4;
+static constexpr dart::compiler::target::word TypeRef_type_offset = 12;
+static constexpr dart::compiler::target::word TypedDataBase_data_field_offset =
+    4;
+static constexpr dart::compiler::target::word TypedDataBase_length_offset = 8;
+static constexpr dart::compiler::target::word TypedDataView_data_offset = 12;
+static constexpr dart::compiler::target::word
+    TypedDataView_offset_in_bytes_offset = 16;
+static constexpr dart::compiler::target::word TypedData_data_offset = 12;
+static constexpr dart::compiler::target::word UserTag_tag_offset = 8;
+static constexpr dart::compiler::target::word Array_elements_start_offset = 12;
+static constexpr dart::compiler::target::word Array_element_size = 4;
+static constexpr dart::compiler::target::word
+    TypeArguments_elements_start_offset = 16;
+static constexpr dart::compiler::target::word TypeArguments_element_size = 4;
+static constexpr dart::compiler::target::word ClassTable_elements_start_offset =
+    0;
+static constexpr dart::compiler::target::word ClassTable_element_size = 168;
+static constexpr dart::compiler::target::word
+    ClassTable_class_heap_stats_table_offset = 16;
+static dart::compiler::target::word Code_entry_point_offset[] = {4, 12, 8, 16};
+static dart::compiler::target::word Code_function_entry_point_offset[] = {4, 8};
+static dart::compiler::target::word
+    Thread_write_barrier_wrappers_thread_offset[] = {
+        576, 580, 584, 588, 592, -1, 596, 600,
+        604, 608, -1,  -1,  -1,  -1, -1,  -1};
+static constexpr dart::compiler::target::word Array_header_size = 12;
+static constexpr dart::compiler::target::word Context_header_size = 12;
+static constexpr dart::compiler::target::word Double_InstanceSize = 16;
+static constexpr dart::compiler::target::word Float32x4_InstanceSize = 24;
+static constexpr dart::compiler::target::word Float64x2_InstanceSize = 24;
+static constexpr dart::compiler::target::word Instructions_UnalignedHeaderSize =
+    16;
+static constexpr dart::compiler::target::word Int32x4_InstanceSize = 24;
+static constexpr dart::compiler::target::word Mint_InstanceSize = 16;
+static constexpr dart::compiler::target::word NativeArguments_StructSize = 16;
+static constexpr dart::compiler::target::word String_InstanceSize = 12;
+static constexpr dart::compiler::target::word TypedData_InstanceSize = 12;
+static constexpr dart::compiler::target::word Object_InstanceSize = 4;
+static constexpr dart::compiler::target::word TypedDataBase_InstanceSize = 12;
+static constexpr dart::compiler::target::word Closure_InstanceSize = 28;
+static constexpr dart::compiler::target::word GrowableObjectArray_InstanceSize =
+    16;
+static constexpr dart::compiler::target::word Instance_InstanceSize = 4;
+static constexpr dart::compiler::target::word LinkedHashMap_InstanceSize = 28;
 #endif  // defined(TARGET_ARCH_ARM)
 
 #if defined(TARGET_ARCH_X64)
-static constexpr dart::word ObjectPool_elements_start_offset = 16;
-static constexpr dart::word ObjectPool_element_size = 8;
-static constexpr dart::word Array_kMaxElements = 576460752303423487;
-static constexpr dart::word Array_kMaxNewSpaceElements = 32765;
-static constexpr dart::word ClassTable_kSizeOfClassPairLog2 = 4;
-static constexpr dart::word Instructions_kMonomorphicEntryOffset = 32;
-static constexpr dart::word Instructions_kPolymorphicEntryOffset = 8;
-static constexpr dart::word HeapPage_kBytesPerCardLog2 = 10;
-static constexpr dart::word NativeEntry_kNumCallWrapperArguments = 2;
-static constexpr dart::word String_kMaxElements = 2305843009213693951;
-static constexpr dart::word SubtypeTestCache_kFunctionTypeArguments = 4;
-static constexpr dart::word SubtypeTestCache_kInstanceClassIdOrFunction = 1;
-static constexpr dart::word
+static constexpr dart::compiler::target::word ObjectPool_elements_start_offset =
+    16;
+static constexpr dart::compiler::target::word ObjectPool_element_size = 8;
+static constexpr dart::compiler::target::word Array_kMaxElements =
+    576460752303423487;
+static constexpr dart::compiler::target::word Array_kMaxNewSpaceElements =
+    32765;
+static constexpr dart::compiler::target::word ClassTable_kSizeOfClassPairLog2 =
+    4;
+static constexpr dart::compiler::target::word
+    Instructions_kMonomorphicEntryOffset = 32;
+static constexpr dart::compiler::target::word
+    Instructions_kPolymorphicEntryOffset = 8;
+static constexpr dart::compiler::target::word HeapPage_kBytesPerCardLog2 = 10;
+static constexpr dart::compiler::target::word
+    NativeEntry_kNumCallWrapperArguments = 2;
+static constexpr dart::compiler::target::word String_kMaxElements =
+    2305843009213693951;
+static constexpr dart::compiler::target::word
+    SubtypeTestCache_kFunctionTypeArguments = 4;
+static constexpr dart::compiler::target::word
+    SubtypeTestCache_kInstanceClassIdOrFunction = 1;
+static constexpr dart::compiler::target::word
     SubtypeTestCache_kInstanceDelayedFunctionTypeArguments = 6;
-static constexpr dart::word
+static constexpr dart::compiler::target::word
     SubtypeTestCache_kInstanceParentFunctionTypeArguments = 5;
-static constexpr dart::word SubtypeTestCache_kInstanceTypeArguments = 2;
-static constexpr dart::word SubtypeTestCache_kInstantiatorTypeArguments = 3;
-static constexpr dart::word SubtypeTestCache_kTestEntryLength = 7;
-static constexpr dart::word SubtypeTestCache_kTestResult = 0;
-static constexpr dart::word AbstractType_type_test_stub_entry_point_offset = 8;
-static constexpr dart::word ArgumentsDescriptor_count_offset = 32;
-static constexpr dart::word ArgumentsDescriptor_first_named_entry_offset = 48;
-static constexpr dart::word ArgumentsDescriptor_named_entry_size = 16;
-static constexpr dart::word ArgumentsDescriptor_name_offset = 0;
-static constexpr dart::word ArgumentsDescriptor_position_offset = 8;
-static constexpr dart::word ArgumentsDescriptor_positional_count_offset = 40;
-static constexpr dart::word ArgumentsDescriptor_type_args_len_offset = 24;
-static constexpr dart::word Array_data_offset = 24;
-static constexpr dart::word Array_length_offset = 16;
-static constexpr dart::word Array_tags_offset = 0;
-static constexpr dart::word Array_type_arguments_offset = 8;
-static constexpr dart::word Class_declaration_type_offset = 112;
-static constexpr dart::word Class_num_type_arguments_offset = 186;
-static constexpr dart::word Class_super_type_offset = 88;
-static constexpr dart::word Class_type_arguments_field_offset_in_words_offset =
-    176;
-static constexpr dart::word ClassHeapStats_TraceAllocationMask = 1;
-static constexpr dart::word ClassHeapStats_allocated_since_gc_new_space_offset =
-    96;
-static constexpr dart::word
+static constexpr dart::compiler::target::word
+    SubtypeTestCache_kInstanceTypeArguments = 2;
+static constexpr dart::compiler::target::word
+    SubtypeTestCache_kInstantiatorTypeArguments = 3;
+static constexpr dart::compiler::target::word
+    SubtypeTestCache_kTestEntryLength = 7;
+static constexpr dart::compiler::target::word SubtypeTestCache_kTestResult = 0;
+static constexpr dart::compiler::target::word
+    AbstractType_type_test_stub_entry_point_offset = 8;
+static constexpr dart::compiler::target::word ArgumentsDescriptor_count_offset =
+    32;
+static constexpr dart::compiler::target::word
+    ArgumentsDescriptor_first_named_entry_offset = 48;
+static constexpr dart::compiler::target::word
+    ArgumentsDescriptor_named_entry_size = 16;
+static constexpr dart::compiler::target::word ArgumentsDescriptor_name_offset =
+    0;
+static constexpr dart::compiler::target::word
+    ArgumentsDescriptor_position_offset = 8;
+static constexpr dart::compiler::target::word
+    ArgumentsDescriptor_positional_count_offset = 40;
+static constexpr dart::compiler::target::word
+    ArgumentsDescriptor_type_args_len_offset = 24;
+static constexpr dart::compiler::target::word Array_data_offset = 24;
+static constexpr dart::compiler::target::word Array_length_offset = 16;
+static constexpr dart::compiler::target::word Array_tags_offset = 0;
+static constexpr dart::compiler::target::word Array_type_arguments_offset = 8;
+static constexpr dart::compiler::target::word Class_declaration_type_offset =
+    112;
+static constexpr dart::compiler::target::word Class_num_type_arguments_offset =
+    186;
+static constexpr dart::compiler::target::word Class_super_type_offset = 88;
+static constexpr dart::compiler::target::word
+    Class_type_arguments_field_offset_in_words_offset = 176;
+static constexpr dart::compiler::target::word
+    ClassHeapStats_TraceAllocationMask = 1;
+static constexpr dart::compiler::target::word
+    ClassHeapStats_allocated_since_gc_new_space_offset = 96;
+static constexpr dart::compiler::target::word
     ClassHeapStats_allocated_size_since_gc_new_space_offset = 104;
-static constexpr dart::word ClassHeapStats_state_offset = 272;
-static constexpr dart::word ClassTable_table_offset = 16;
-static constexpr dart::word Closure_context_offset = 40;
-static constexpr dart::word Closure_delayed_type_arguments_offset = 24;
-static constexpr dart::word Closure_function_offset = 32;
-static constexpr dart::word Closure_function_type_arguments_offset = 16;
-static constexpr dart::word Closure_hash_offset = 48;
-static constexpr dart::word Closure_instantiator_type_arguments_offset = 8;
-static constexpr dart::word Code_object_pool_offset = 40;
-static constexpr dart::word Code_saved_instructions_offset = 48;
-static constexpr dart::word Code_owner_offset = 56;
-static constexpr dart::word Context_num_variables_offset = 8;
-static constexpr dart::word Context_parent_offset = 16;
-static constexpr dart::word Double_value_offset = 8;
-static constexpr dart::word ExternalOneByteString_external_data_offset = 16;
-static constexpr dart::word ExternalTwoByteString_external_data_offset = 16;
-static constexpr dart::word Float32x4_value_offset = 8;
-static constexpr dart::word Float64x2_value_offset = 8;
-static constexpr dart::word Field_guarded_cid_offset = 88;
-static constexpr dart::word Field_guarded_list_length_in_object_offset_offset =
-    96;
-static constexpr dart::word Field_guarded_list_length_offset = 56;
-static constexpr dart::word Field_is_nullable_offset = 90;
-static constexpr dart::word Field_static_value_offset = 32;
-static constexpr dart::word Field_kind_bits_offset = 98;
-static constexpr dart::word Function_code_offset = 88;
-static constexpr dart::word Function_entry_point_offset = 8;
-static constexpr dart::word Function_unchecked_entry_point_offset = 16;
-static constexpr dart::word Function_usage_counter_offset = 132;
-static constexpr dart::word GrowableObjectArray_data_offset = 24;
-static constexpr dart::word GrowableObjectArray_length_offset = 16;
-static constexpr dart::word GrowableObjectArray_type_arguments_offset = 8;
-static constexpr dart::word HeapPage_card_table_offset = 40;
-static constexpr dart::word ICData_NumArgsTestedMask = 3;
-static constexpr dart::word ICData_NumArgsTestedShift = 0;
-static constexpr dart::word ICData_arguments_descriptor_offset = 24;
-static constexpr dart::word ICData_entries_offset = 8;
-static constexpr dart::word ICData_owner_offset = 40;
-static constexpr dart::word ICData_state_bits_offset = 52;
-static constexpr dart::word ICData_receivers_static_type_offset = 32;
-static constexpr dart::word Isolate_class_table_offset = 48;
-static constexpr dart::word Isolate_current_tag_offset = 16;
-static constexpr dart::word Isolate_default_tag_offset = 24;
-static constexpr dart::word Isolate_ic_miss_code_offset = 32;
-static constexpr dart::word Isolate_object_store_offset = 40;
-static constexpr dart::word Isolate_single_step_offset = 88;
-static constexpr dart::word Isolate_user_tag_offset = 8;
-static constexpr dart::word LinkedHashMap_data_offset = 32;
-static constexpr dart::word LinkedHashMap_deleted_keys_offset = 48;
-static constexpr dart::word LinkedHashMap_hash_mask_offset = 24;
-static constexpr dart::word LinkedHashMap_index_offset = 16;
-static constexpr dart::word LinkedHashMap_used_data_offset = 40;
-static constexpr dart::word MarkingStackBlock_pointers_offset = 16;
-static constexpr dart::word MarkingStackBlock_top_offset = 8;
-static constexpr dart::word MegamorphicCache_arguments_descriptor_offset = 32;
-static constexpr dart::word MegamorphicCache_buckets_offset = 8;
-static constexpr dart::word MegamorphicCache_mask_offset = 16;
-static constexpr dart::word Mint_value_offset = 8;
-static constexpr dart::word NativeArguments_argc_tag_offset = 8;
-static constexpr dart::word NativeArguments_argv_offset = 16;
-static constexpr dart::word NativeArguments_retval_offset = 24;
-static constexpr dart::word NativeArguments_thread_offset = 0;
-static constexpr dart::word ObjectStore_double_type_offset = 128;
-static constexpr dart::word ObjectStore_int_type_offset = 64;
-static constexpr dart::word ObjectStore_string_type_offset = 160;
-static constexpr dart::word OneByteString_data_offset = 16;
-static constexpr dart::word Pointer_c_memory_address_offset = 16;
-static constexpr dart::word SingleTargetCache_entry_point_offset = 16;
-static constexpr dart::word SingleTargetCache_lower_limit_offset = 24;
-static constexpr dart::word SingleTargetCache_target_offset = 8;
-static constexpr dart::word SingleTargetCache_upper_limit_offset = 26;
-static constexpr dart::word StoreBufferBlock_pointers_offset = 16;
-static constexpr dart::word StoreBufferBlock_top_offset = 8;
-static constexpr dart::word String_hash_offset = 4;
-static constexpr dart::word String_length_offset = 8;
-static constexpr dart::word SubtypeTestCache_cache_offset = 8;
-static constexpr dart::word Thread_AllocateArray_entry_point_offset = 560;
-static constexpr dart::word Thread_active_exception_offset = 1232;
-static constexpr dart::word Thread_active_stacktrace_offset = 1240;
-static constexpr dart::word Thread_array_write_barrier_code_offset = 216;
-static constexpr dart::word Thread_array_write_barrier_entry_point_offset = 384;
-static constexpr dart::word Thread_async_stack_trace_offset = 168;
-static constexpr dart::word
+static constexpr dart::compiler::target::word ClassHeapStats_state_offset = 272;
+static constexpr dart::compiler::target::word ClassTable_table_offset = 16;
+static constexpr dart::compiler::target::word Closure_context_offset = 40;
+static constexpr dart::compiler::target::word
+    Closure_delayed_type_arguments_offset = 24;
+static constexpr dart::compiler::target::word Closure_function_offset = 32;
+static constexpr dart::compiler::target::word
+    Closure_function_type_arguments_offset = 16;
+static constexpr dart::compiler::target::word Closure_hash_offset = 48;
+static constexpr dart::compiler::target::word
+    Closure_instantiator_type_arguments_offset = 8;
+static constexpr dart::compiler::target::word Code_object_pool_offset = 40;
+static constexpr dart::compiler::target::word Code_saved_instructions_offset =
+    48;
+static constexpr dart::compiler::target::word Code_owner_offset = 56;
+static constexpr dart::compiler::target::word Context_num_variables_offset = 8;
+static constexpr dart::compiler::target::word Context_parent_offset = 16;
+static constexpr dart::compiler::target::word Double_value_offset = 8;
+static constexpr dart::compiler::target::word
+    ExternalOneByteString_external_data_offset = 16;
+static constexpr dart::compiler::target::word
+    ExternalTwoByteString_external_data_offset = 16;
+static constexpr dart::compiler::target::word Float32x4_value_offset = 8;
+static constexpr dart::compiler::target::word Float64x2_value_offset = 8;
+static constexpr dart::compiler::target::word Field_guarded_cid_offset = 88;
+static constexpr dart::compiler::target::word
+    Field_guarded_list_length_in_object_offset_offset = 96;
+static constexpr dart::compiler::target::word Field_guarded_list_length_offset =
+    56;
+static constexpr dart::compiler::target::word Field_is_nullable_offset = 90;
+static constexpr dart::compiler::target::word Field_static_value_offset = 32;
+static constexpr dart::compiler::target::word Field_kind_bits_offset = 98;
+static constexpr dart::compiler::target::word Function_code_offset = 88;
+static constexpr dart::compiler::target::word Function_entry_point_offset = 8;
+static constexpr dart::compiler::target::word
+    Function_unchecked_entry_point_offset = 16;
+static constexpr dart::compiler::target::word Function_usage_counter_offset =
+    132;
+static constexpr dart::compiler::target::word GrowableObjectArray_data_offset =
+    24;
+static constexpr dart::compiler::target::word
+    GrowableObjectArray_length_offset = 16;
+static constexpr dart::compiler::target::word
+    GrowableObjectArray_type_arguments_offset = 8;
+static constexpr dart::compiler::target::word HeapPage_card_table_offset = 40;
+static constexpr dart::compiler::target::word ICData_NumArgsTestedMask = 3;
+static constexpr dart::compiler::target::word ICData_NumArgsTestedShift = 0;
+static constexpr dart::compiler::target::word
+    ICData_arguments_descriptor_offset = 24;
+static constexpr dart::compiler::target::word ICData_entries_offset = 8;
+static constexpr dart::compiler::target::word ICData_owner_offset = 40;
+static constexpr dart::compiler::target::word ICData_state_bits_offset = 52;
+static constexpr dart::compiler::target::word
+    ICData_receivers_static_type_offset = 32;
+static constexpr dart::compiler::target::word Isolate_class_table_offset = 48;
+static constexpr dart::compiler::target::word Isolate_current_tag_offset = 16;
+static constexpr dart::compiler::target::word Isolate_default_tag_offset = 24;
+static constexpr dart::compiler::target::word Isolate_ic_miss_code_offset = 32;
+static constexpr dart::compiler::target::word Isolate_object_store_offset = 40;
+static constexpr dart::compiler::target::word Isolate_single_step_offset = 88;
+static constexpr dart::compiler::target::word Isolate_user_tag_offset = 8;
+static constexpr dart::compiler::target::word LinkedHashMap_data_offset = 32;
+static constexpr dart::compiler::target::word
+    LinkedHashMap_deleted_keys_offset = 48;
+static constexpr dart::compiler::target::word LinkedHashMap_hash_mask_offset =
+    24;
+static constexpr dart::compiler::target::word LinkedHashMap_index_offset = 16;
+static constexpr dart::compiler::target::word LinkedHashMap_used_data_offset =
+    40;
+static constexpr dart::compiler::target::word
+    MarkingStackBlock_pointers_offset = 16;
+static constexpr dart::compiler::target::word MarkingStackBlock_top_offset = 8;
+static constexpr dart::compiler::target::word
+    MegamorphicCache_arguments_descriptor_offset = 32;
+static constexpr dart::compiler::target::word MegamorphicCache_buckets_offset =
+    8;
+static constexpr dart::compiler::target::word MegamorphicCache_mask_offset = 16;
+static constexpr dart::compiler::target::word Mint_value_offset = 8;
+static constexpr dart::compiler::target::word NativeArguments_argc_tag_offset =
+    8;
+static constexpr dart::compiler::target::word NativeArguments_argv_offset = 16;
+static constexpr dart::compiler::target::word NativeArguments_retval_offset =
+    24;
+static constexpr dart::compiler::target::word NativeArguments_thread_offset = 0;
+static constexpr dart::compiler::target::word ObjectStore_double_type_offset =
+    128;
+static constexpr dart::compiler::target::word ObjectStore_int_type_offset = 64;
+static constexpr dart::compiler::target::word ObjectStore_string_type_offset =
+    160;
+static constexpr dart::compiler::target::word OneByteString_data_offset = 16;
+static constexpr dart::compiler::target::word Pointer_c_memory_address_offset =
+    16;
+static constexpr dart::compiler::target::word
+    SingleTargetCache_entry_point_offset = 16;
+static constexpr dart::compiler::target::word
+    SingleTargetCache_lower_limit_offset = 24;
+static constexpr dart::compiler::target::word SingleTargetCache_target_offset =
+    8;
+static constexpr dart::compiler::target::word
+    SingleTargetCache_upper_limit_offset = 26;
+static constexpr dart::compiler::target::word StoreBufferBlock_pointers_offset =
+    16;
+static constexpr dart::compiler::target::word StoreBufferBlock_top_offset = 8;
+static constexpr dart::compiler::target::word String_hash_offset = 4;
+static constexpr dart::compiler::target::word String_length_offset = 8;
+static constexpr dart::compiler::target::word SubtypeTestCache_cache_offset = 8;
+static constexpr dart::compiler::target::word
+    Thread_AllocateArray_entry_point_offset = 560;
+static constexpr dart::compiler::target::word Thread_active_exception_offset =
+    1232;
+static constexpr dart::compiler::target::word Thread_active_stacktrace_offset =
+    1240;
+static constexpr dart::compiler::target::word
+    Thread_array_write_barrier_code_offset = 216;
+static constexpr dart::compiler::target::word
+    Thread_array_write_barrier_entry_point_offset = 384;
+static constexpr dart::compiler::target::word Thread_async_stack_trace_offset =
+    168;
+static constexpr dart::compiler::target::word
     Thread_auto_scope_native_wrapper_entry_point_offset = 480;
-static constexpr dart::word Thread_bool_false_offset = 200;
-static constexpr dart::word Thread_bool_true_offset = 192;
-static constexpr dart::word Thread_call_to_runtime_entry_point_offset = 392;
-static constexpr dart::word Thread_call_to_runtime_stub_offset = 256;
-static constexpr dart::word Thread_dart_stream_offset = 1296;
-static constexpr dart::word Thread_deoptimize_entry_offset = 456;
-static constexpr dart::word Thread_deoptimize_stub_offset = 320;
-static constexpr dart::word Thread_double_abs_address_offset = 520;
-static constexpr dart::word Thread_double_negate_address_offset = 512;
-static constexpr dart::word Thread_end_offset = 120;
-static constexpr dart::word Thread_enter_safepoint_stub_offset = 360;
-static constexpr dart::word Thread_execution_state_offset = 1264;
-static constexpr dart::word Thread_exit_safepoint_stub_offset = 368;
-static constexpr dart::word Thread_fix_allocation_stub_code_offset = 232;
-static constexpr dart::word Thread_fix_callers_target_code_offset = 224;
-static constexpr dart::word Thread_float_absolute_address_offset = 544;
-static constexpr dart::word Thread_float_negate_address_offset = 536;
-static constexpr dart::word Thread_float_not_address_offset = 528;
-static constexpr dart::word Thread_float_zerow_address_offset = 552;
-static constexpr dart::word Thread_global_object_pool_offset = 1248;
-static constexpr dart::word Thread_ic_lookup_through_code_stub_offset = 304;
-static constexpr dart::word Thread_interpret_call_entry_point_offset = 488;
-static constexpr dart::word Thread_invoke_dart_code_from_bytecode_stub_offset =
-    248;
-static constexpr dart::word Thread_invoke_dart_code_stub_offset = 240;
-static constexpr dart::word Thread_isolate_offset = 96;
-static constexpr dart::word Thread_lazy_deopt_from_return_stub_offset = 328;
-static constexpr dart::word Thread_lazy_deopt_from_throw_stub_offset = 336;
-static constexpr dart::word Thread_lazy_specialize_type_test_stub_offset = 352;
-static constexpr dart::word Thread_marking_stack_block_offset = 144;
-static constexpr dart::word Thread_megamorphic_call_checked_entry_offset = 432;
-static constexpr dart::word Thread_monomorphic_miss_entry_offset = 440;
-static constexpr dart::word Thread_monomorphic_miss_stub_offset = 296;
-static constexpr dart::word Thread_no_scope_native_wrapper_entry_point_offset =
-    472;
-static constexpr dart::word
+static constexpr dart::compiler::target::word Thread_bool_false_offset = 200;
+static constexpr dart::compiler::target::word Thread_bool_true_offset = 192;
+static constexpr dart::compiler::target::word
+    Thread_call_to_runtime_entry_point_offset = 392;
+static constexpr dart::compiler::target::word
+    Thread_call_to_runtime_stub_offset = 256;
+static constexpr dart::compiler::target::word Thread_dart_stream_offset = 1296;
+static constexpr dart::compiler::target::word Thread_deoptimize_entry_offset =
+    456;
+static constexpr dart::compiler::target::word Thread_deoptimize_stub_offset =
+    320;
+static constexpr dart::compiler::target::word Thread_double_abs_address_offset =
+    520;
+static constexpr dart::compiler::target::word
+    Thread_double_negate_address_offset = 512;
+static constexpr dart::compiler::target::word Thread_end_offset = 120;
+static constexpr dart::compiler::target::word
+    Thread_enter_safepoint_stub_offset = 360;
+static constexpr dart::compiler::target::word Thread_execution_state_offset =
+    1264;
+static constexpr dart::compiler::target::word
+    Thread_exit_safepoint_stub_offset = 368;
+static constexpr dart::compiler::target::word
+    Thread_fix_allocation_stub_code_offset = 232;
+static constexpr dart::compiler::target::word
+    Thread_fix_callers_target_code_offset = 224;
+static constexpr dart::compiler::target::word
+    Thread_float_absolute_address_offset = 544;
+static constexpr dart::compiler::target::word
+    Thread_float_negate_address_offset = 536;
+static constexpr dart::compiler::target::word Thread_float_not_address_offset =
+    528;
+static constexpr dart::compiler::target::word
+    Thread_float_zerow_address_offset = 552;
+static constexpr dart::compiler::target::word Thread_global_object_pool_offset =
+    1248;
+static constexpr dart::compiler::target::word
+    Thread_ic_lookup_through_code_stub_offset = 304;
+static constexpr dart::compiler::target::word
+    Thread_interpret_call_entry_point_offset = 488;
+static constexpr dart::compiler::target::word
+    Thread_invoke_dart_code_from_bytecode_stub_offset = 248;
+static constexpr dart::compiler::target::word
+    Thread_invoke_dart_code_stub_offset = 240;
+static constexpr dart::compiler::target::word Thread_isolate_offset = 96;
+static constexpr dart::compiler::target::word
+    Thread_lazy_deopt_from_return_stub_offset = 328;
+static constexpr dart::compiler::target::word
+    Thread_lazy_deopt_from_throw_stub_offset = 336;
+static constexpr dart::compiler::target::word
+    Thread_lazy_specialize_type_test_stub_offset = 352;
+static constexpr dart::compiler::target::word
+    Thread_marking_stack_block_offset = 144;
+static constexpr dart::compiler::target::word
+    Thread_megamorphic_call_checked_entry_offset = 432;
+static constexpr dart::compiler::target::word
+    Thread_monomorphic_miss_entry_offset = 440;
+static constexpr dart::compiler::target::word
+    Thread_monomorphic_miss_stub_offset = 296;
+static constexpr dart::compiler::target::word
+    Thread_no_scope_native_wrapper_entry_point_offset = 472;
+static constexpr dart::compiler::target::word
     Thread_null_error_shared_with_fpu_regs_entry_point_offset = 408;
-static constexpr dart::word Thread_null_error_shared_with_fpu_regs_stub_offset =
-    272;
-static constexpr dart::word
+static constexpr dart::compiler::target::word
+    Thread_null_error_shared_with_fpu_regs_stub_offset = 272;
+static constexpr dart::compiler::target::word
     Thread_null_error_shared_without_fpu_regs_entry_point_offset = 400;
-static constexpr dart::word
+static constexpr dart::compiler::target::word
     Thread_null_error_shared_without_fpu_regs_stub_offset = 264;
-static constexpr dart::word Thread_object_null_offset = 184;
-static constexpr dart::word Thread_predefined_symbols_address_offset = 496;
-static constexpr dart::word Thread_resume_pc_offset = 1256;
-static constexpr dart::word Thread_safepoint_state_offset = 1272;
-static constexpr dart::word Thread_slow_type_test_stub_offset = 344;
-static constexpr dart::word Thread_stack_limit_offset = 72;
-static constexpr dart::word Thread_stack_overflow_flags_offset = 80;
-static constexpr dart::word
+static constexpr dart::compiler::target::word Thread_object_null_offset = 184;
+static constexpr dart::compiler::target::word
+    Thread_predefined_symbols_address_offset = 496;
+static constexpr dart::compiler::target::word Thread_resume_pc_offset = 1256;
+static constexpr dart::compiler::target::word Thread_safepoint_state_offset =
+    1272;
+static constexpr dart::compiler::target::word
+    Thread_slow_type_test_stub_offset = 344;
+static constexpr dart::compiler::target::word Thread_stack_limit_offset = 72;
+static constexpr dart::compiler::target::word
+    Thread_stack_overflow_flags_offset = 80;
+static constexpr dart::compiler::target::word
     Thread_stack_overflow_shared_with_fpu_regs_entry_point_offset = 424;
-static constexpr dart::word
+static constexpr dart::compiler::target::word
     Thread_stack_overflow_shared_with_fpu_regs_stub_offset = 288;
-static constexpr dart::word
+static constexpr dart::compiler::target::word
     Thread_stack_overflow_shared_without_fpu_regs_entry_point_offset = 416;
-static constexpr dart::word
+static constexpr dart::compiler::target::word
     Thread_stack_overflow_shared_without_fpu_regs_stub_offset = 280;
-static constexpr dart::word Thread_store_buffer_block_offset = 136;
-static constexpr dart::word Thread_top_exit_frame_info_offset = 128;
-static constexpr dart::word Thread_top_offset = 112;
-static constexpr dart::word Thread_top_resource_offset = 48;
-static constexpr dart::word Thread_unboxed_int64_runtime_arg_offset = 176;
-static constexpr dart::word Thread_vm_tag_offset = 160;
-static constexpr dart::word Thread_write_barrier_code_offset = 208;
-static constexpr dart::word Thread_write_barrier_entry_point_offset = 376;
-static constexpr dart::word Thread_write_barrier_mask_offset = 88;
-static constexpr dart::word Thread_verify_callback_entry_offset = 464;
-static constexpr dart::word Thread_callback_code_offset = 1280;
-static constexpr dart::word TimelineStream_enabled_offset = 16;
-static constexpr dart::word TwoByteString_data_offset = 16;
-static constexpr dart::word Type_arguments_offset = 32;
-static constexpr dart::word Type_hash_offset = 40;
-static constexpr dart::word Type_signature_offset = 48;
-static constexpr dart::word Type_type_class_id_offset = 24;
-static constexpr dart::word Type_type_state_offset = 60;
-static constexpr dart::word TypeArguments_instantiations_offset = 8;
-static constexpr dart::word TypeRef_type_offset = 24;
-static constexpr dart::word TypedDataBase_data_field_offset = 8;
-static constexpr dart::word TypedDataBase_length_offset = 16;
-static constexpr dart::word TypedDataView_data_offset = 24;
-static constexpr dart::word TypedDataView_offset_in_bytes_offset = 32;
-static constexpr dart::word TypedData_data_offset = 24;
-static constexpr dart::word UserTag_tag_offset = 16;
-static constexpr dart::word Array_elements_start_offset = 24;
-static constexpr dart::word Array_element_size = 8;
-static constexpr dart::word TypeArguments_elements_start_offset = 32;
-static constexpr dart::word TypeArguments_element_size = 8;
-static constexpr dart::word ClassTable_elements_start_offset = 0;
-static constexpr dart::word ClassTable_element_size = 288;
-static constexpr dart::word ClassTable_class_heap_stats_table_offset = 32;
-static dart::word Code_entry_point_offset[] = {8, 24, 16, 32};
-static dart::word Code_function_entry_point_offset[] = {8, 16};
-static dart::word Thread_write_barrier_wrappers_thread_offset[] = {
-    1144, 1152, 1160, 1168, -1,   -1,   1176, 1184,
-    1192, 1200, 1208, -1,   1216, 1224, -1,   -1};
-static constexpr dart::word Array_header_size = 24;
-static constexpr dart::word Context_header_size = 24;
-static constexpr dart::word Double_InstanceSize = 16;
-static constexpr dart::word Float32x4_InstanceSize = 24;
-static constexpr dart::word Float64x2_InstanceSize = 24;
-static constexpr dart::word Instructions_UnalignedHeaderSize = 24;
-static constexpr dart::word Int32x4_InstanceSize = 24;
-static constexpr dart::word Mint_InstanceSize = 16;
-static constexpr dart::word NativeArguments_StructSize = 32;
-static constexpr dart::word String_InstanceSize = 16;
-static constexpr dart::word TypedData_InstanceSize = 24;
+static constexpr dart::compiler::target::word Thread_store_buffer_block_offset =
+    136;
+static constexpr dart::compiler::target::word
+    Thread_top_exit_frame_info_offset = 128;
+static constexpr dart::compiler::target::word Thread_top_offset = 112;
+static constexpr dart::compiler::target::word Thread_top_resource_offset = 48;
+static constexpr dart::compiler::target::word
+    Thread_unboxed_int64_runtime_arg_offset = 176;
+static constexpr dart::compiler::target::word Thread_vm_tag_offset = 160;
+static constexpr dart::compiler::target::word Thread_write_barrier_code_offset =
+    208;
+static constexpr dart::compiler::target::word
+    Thread_write_barrier_entry_point_offset = 376;
+static constexpr dart::compiler::target::word Thread_write_barrier_mask_offset =
+    88;
+static constexpr dart::compiler::target::word
+    Thread_verify_callback_entry_offset = 464;
+static constexpr dart::compiler::target::word Thread_callback_code_offset =
+    1280;
+static constexpr dart::compiler::target::word TimelineStream_enabled_offset =
+    16;
+static constexpr dart::compiler::target::word TwoByteString_data_offset = 16;
+static constexpr dart::compiler::target::word Type_arguments_offset = 32;
+static constexpr dart::compiler::target::word Type_hash_offset = 40;
+static constexpr dart::compiler::target::word Type_signature_offset = 48;
+static constexpr dart::compiler::target::word Type_type_class_id_offset = 24;
+static constexpr dart::compiler::target::word Type_type_state_offset = 60;
+static constexpr dart::compiler::target::word
+    TypeArguments_instantiations_offset = 8;
+static constexpr dart::compiler::target::word TypeRef_type_offset = 24;
+static constexpr dart::compiler::target::word TypedDataBase_data_field_offset =
+    8;
+static constexpr dart::compiler::target::word TypedDataBase_length_offset = 16;
+static constexpr dart::compiler::target::word TypedDataView_data_offset = 24;
+static constexpr dart::compiler::target::word
+    TypedDataView_offset_in_bytes_offset = 32;
+static constexpr dart::compiler::target::word TypedData_data_offset = 24;
+static constexpr dart::compiler::target::word UserTag_tag_offset = 16;
+static constexpr dart::compiler::target::word Array_elements_start_offset = 24;
+static constexpr dart::compiler::target::word Array_element_size = 8;
+static constexpr dart::compiler::target::word
+    TypeArguments_elements_start_offset = 32;
+static constexpr dart::compiler::target::word TypeArguments_element_size = 8;
+static constexpr dart::compiler::target::word ClassTable_elements_start_offset =
+    0;
+static constexpr dart::compiler::target::word ClassTable_element_size = 288;
+static constexpr dart::compiler::target::word
+    ClassTable_class_heap_stats_table_offset = 32;
+static dart::compiler::target::word Code_entry_point_offset[] = {8, 24, 16, 32};
+static dart::compiler::target::word Code_function_entry_point_offset[] = {8,
+                                                                          16};
+static dart::compiler::target::word
+    Thread_write_barrier_wrappers_thread_offset[] = {
+        1144, 1152, 1160, 1168, -1,   -1,   1176, 1184,
+        1192, 1200, 1208, -1,   1216, 1224, -1,   -1};
+static constexpr dart::compiler::target::word Array_header_size = 24;
+static constexpr dart::compiler::target::word Context_header_size = 24;
+static constexpr dart::compiler::target::word Double_InstanceSize = 16;
+static constexpr dart::compiler::target::word Float32x4_InstanceSize = 24;
+static constexpr dart::compiler::target::word Float64x2_InstanceSize = 24;
+static constexpr dart::compiler::target::word Instructions_UnalignedHeaderSize =
+    24;
+static constexpr dart::compiler::target::word Int32x4_InstanceSize = 24;
+static constexpr dart::compiler::target::word Mint_InstanceSize = 16;
+static constexpr dart::compiler::target::word NativeArguments_StructSize = 32;
+static constexpr dart::compiler::target::word String_InstanceSize = 16;
+static constexpr dart::compiler::target::word TypedData_InstanceSize = 24;
+static constexpr dart::compiler::target::word Object_InstanceSize = 8;
+static constexpr dart::compiler::target::word TypedDataBase_InstanceSize = 24;
+static constexpr dart::compiler::target::word Closure_InstanceSize = 56;
+static constexpr dart::compiler::target::word GrowableObjectArray_InstanceSize =
+    32;
+static constexpr dart::compiler::target::word Instance_InstanceSize = 8;
+static constexpr dart::compiler::target::word LinkedHashMap_InstanceSize = 56;
 #endif  // defined(TARGET_ARCH_X64)
 
 #if defined(TARGET_ARCH_IA32)
-static constexpr dart::word ObjectPool_elements_start_offset = 8;
-static constexpr dart::word ObjectPool_element_size = 4;
-static constexpr dart::word Array_kMaxElements = 268435455;
-static constexpr dart::word Array_kMaxNewSpaceElements = 65533;
-static constexpr dart::word ClassTable_kSizeOfClassPairLog2 = 3;
-static constexpr dart::word Instructions_kMonomorphicEntryOffset = 0;
-static constexpr dart::word Instructions_kPolymorphicEntryOffset = 0;
-static constexpr dart::word HeapPage_kBytesPerCardLog2 = 9;
-static constexpr dart::word NativeEntry_kNumCallWrapperArguments = 2;
-static constexpr dart::word String_kMaxElements = 536870911;
-static constexpr dart::word SubtypeTestCache_kFunctionTypeArguments = 4;
-static constexpr dart::word SubtypeTestCache_kInstanceClassIdOrFunction = 1;
-static constexpr dart::word
+static constexpr dart::compiler::target::word ObjectPool_elements_start_offset =
+    8;
+static constexpr dart::compiler::target::word ObjectPool_element_size = 4;
+static constexpr dart::compiler::target::word Array_kMaxElements = 268435455;
+static constexpr dart::compiler::target::word Array_kMaxNewSpaceElements =
+    65533;
+static constexpr dart::compiler::target::word ClassTable_kSizeOfClassPairLog2 =
+    3;
+static constexpr dart::compiler::target::word
+    Instructions_kMonomorphicEntryOffset = 0;
+static constexpr dart::compiler::target::word
+    Instructions_kPolymorphicEntryOffset = 0;
+static constexpr dart::compiler::target::word HeapPage_kBytesPerCardLog2 = 9;
+static constexpr dart::compiler::target::word
+    NativeEntry_kNumCallWrapperArguments = 2;
+static constexpr dart::compiler::target::word String_kMaxElements = 536870911;
+static constexpr dart::compiler::target::word
+    SubtypeTestCache_kFunctionTypeArguments = 4;
+static constexpr dart::compiler::target::word
+    SubtypeTestCache_kInstanceClassIdOrFunction = 1;
+static constexpr dart::compiler::target::word
     SubtypeTestCache_kInstanceDelayedFunctionTypeArguments = 6;
-static constexpr dart::word
+static constexpr dart::compiler::target::word
     SubtypeTestCache_kInstanceParentFunctionTypeArguments = 5;
-static constexpr dart::word SubtypeTestCache_kInstanceTypeArguments = 2;
-static constexpr dart::word SubtypeTestCache_kInstantiatorTypeArguments = 3;
-static constexpr dart::word SubtypeTestCache_kTestEntryLength = 7;
-static constexpr dart::word SubtypeTestCache_kTestResult = 0;
-static constexpr dart::word AbstractType_type_test_stub_entry_point_offset = 4;
-static constexpr dart::word ArgumentsDescriptor_count_offset = 16;
-static constexpr dart::word ArgumentsDescriptor_first_named_entry_offset = 24;
-static constexpr dart::word ArgumentsDescriptor_named_entry_size = 8;
-static constexpr dart::word ArgumentsDescriptor_name_offset = 0;
-static constexpr dart::word ArgumentsDescriptor_position_offset = 4;
-static constexpr dart::word ArgumentsDescriptor_positional_count_offset = 20;
-static constexpr dart::word ArgumentsDescriptor_type_args_len_offset = 12;
-static constexpr dart::word Array_data_offset = 12;
-static constexpr dart::word Array_length_offset = 8;
-static constexpr dart::word Array_tags_offset = 0;
-static constexpr dart::word Array_type_arguments_offset = 4;
-static constexpr dart::word Class_declaration_type_offset = 56;
-static constexpr dart::word Class_num_type_arguments_offset = 102;
-static constexpr dart::word Class_super_type_offset = 44;
-static constexpr dart::word Class_type_arguments_field_offset_in_words_offset =
-    92;
-static constexpr dart::word ClassHeapStats_TraceAllocationMask = 1;
-static constexpr dart::word ClassHeapStats_allocated_since_gc_new_space_offset =
-    48;
-static constexpr dart::word
-    ClassHeapStats_allocated_size_since_gc_new_space_offset = 52;
-static constexpr dart::word ClassHeapStats_state_offset = 160;
-static constexpr dart::word ClassTable_table_offset = 8;
-static constexpr dart::word Closure_context_offset = 20;
-static constexpr dart::word Closure_delayed_type_arguments_offset = 12;
-static constexpr dart::word Closure_function_offset = 16;
-static constexpr dart::word Closure_function_type_arguments_offset = 8;
-static constexpr dart::word Closure_hash_offset = 24;
-static constexpr dart::word Closure_instantiator_type_arguments_offset = 4;
-static constexpr dart::word Code_object_pool_offset = 20;
-static constexpr dart::word Code_saved_instructions_offset = 24;
-static constexpr dart::word Code_owner_offset = 28;
-static constexpr dart::word Context_num_variables_offset = 4;
-static constexpr dart::word Context_parent_offset = 8;
-static constexpr dart::word Double_value_offset = 8;
-static constexpr dart::word ExternalOneByteString_external_data_offset = 12;
-static constexpr dart::word ExternalTwoByteString_external_data_offset = 12;
-static constexpr dart::word Float32x4_value_offset = 8;
-static constexpr dart::word Float64x2_value_offset = 8;
-static constexpr dart::word Field_guarded_cid_offset = 48;
-static constexpr dart::word Field_guarded_list_length_in_object_offset_offset =
+static constexpr dart::compiler::target::word
+    SubtypeTestCache_kInstanceTypeArguments = 2;
+static constexpr dart::compiler::target::word
+    SubtypeTestCache_kInstantiatorTypeArguments = 3;
+static constexpr dart::compiler::target::word
+    SubtypeTestCache_kTestEntryLength = 7;
+static constexpr dart::compiler::target::word SubtypeTestCache_kTestResult = 0;
+static constexpr dart::compiler::target::word
+    AbstractType_type_test_stub_entry_point_offset = 4;
+static constexpr dart::compiler::target::word ArgumentsDescriptor_count_offset =
+    16;
+static constexpr dart::compiler::target::word
+    ArgumentsDescriptor_first_named_entry_offset = 24;
+static constexpr dart::compiler::target::word
+    ArgumentsDescriptor_named_entry_size = 8;
+static constexpr dart::compiler::target::word ArgumentsDescriptor_name_offset =
+    0;
+static constexpr dart::compiler::target::word
+    ArgumentsDescriptor_position_offset = 4;
+static constexpr dart::compiler::target::word
+    ArgumentsDescriptor_positional_count_offset = 20;
+static constexpr dart::compiler::target::word
+    ArgumentsDescriptor_type_args_len_offset = 12;
+static constexpr dart::compiler::target::word Array_data_offset = 12;
+static constexpr dart::compiler::target::word Array_length_offset = 8;
+static constexpr dart::compiler::target::word Array_tags_offset = 0;
+static constexpr dart::compiler::target::word Array_type_arguments_offset = 4;
+static constexpr dart::compiler::target::word Class_declaration_type_offset =
     56;
-static constexpr dart::word Field_guarded_list_length_offset = 28;
-static constexpr dart::word Field_is_nullable_offset = 50;
-static constexpr dart::word Field_static_value_offset = 16;
-static constexpr dart::word Field_kind_bits_offset = 58;
-static constexpr dart::word Function_code_offset = 44;
-static constexpr dart::word Function_entry_point_offset = 4;
-static constexpr dart::word Function_unchecked_entry_point_offset = 8;
-static constexpr dart::word Function_usage_counter_offset = 76;
-static constexpr dart::word GrowableObjectArray_data_offset = 12;
-static constexpr dart::word GrowableObjectArray_length_offset = 8;
-static constexpr dart::word GrowableObjectArray_type_arguments_offset = 4;
-static constexpr dart::word HeapPage_card_table_offset = 20;
-static constexpr dart::word ICData_NumArgsTestedMask = 3;
-static constexpr dart::word ICData_NumArgsTestedShift = 0;
-static constexpr dart::word ICData_arguments_descriptor_offset = 12;
-static constexpr dart::word ICData_entries_offset = 4;
-static constexpr dart::word ICData_owner_offset = 20;
-static constexpr dart::word ICData_state_bits_offset = 28;
-static constexpr dart::word ICData_receivers_static_type_offset = 16;
-static constexpr dart::word Isolate_class_table_offset = 24;
-static constexpr dart::word Isolate_current_tag_offset = 8;
-static constexpr dart::word Isolate_default_tag_offset = 12;
-static constexpr dart::word Isolate_ic_miss_code_offset = 16;
-static constexpr dart::word Isolate_object_store_offset = 20;
-static constexpr dart::word Isolate_single_step_offset = 44;
-static constexpr dart::word Isolate_user_tag_offset = 4;
-static constexpr dart::word LinkedHashMap_data_offset = 16;
-static constexpr dart::word LinkedHashMap_deleted_keys_offset = 24;
-static constexpr dart::word LinkedHashMap_hash_mask_offset = 12;
-static constexpr dart::word LinkedHashMap_index_offset = 8;
-static constexpr dart::word LinkedHashMap_used_data_offset = 20;
-static constexpr dart::word MarkingStackBlock_pointers_offset = 8;
-static constexpr dart::word MarkingStackBlock_top_offset = 4;
-static constexpr dart::word MegamorphicCache_arguments_descriptor_offset = 16;
-static constexpr dart::word MegamorphicCache_buckets_offset = 4;
-static constexpr dart::word MegamorphicCache_mask_offset = 8;
-static constexpr dart::word Mint_value_offset = 8;
-static constexpr dart::word NativeArguments_argc_tag_offset = 4;
-static constexpr dart::word NativeArguments_argv_offset = 8;
-static constexpr dart::word NativeArguments_retval_offset = 12;
-static constexpr dart::word NativeArguments_thread_offset = 0;
-static constexpr dart::word ObjectStore_double_type_offset = 64;
-static constexpr dart::word ObjectStore_int_type_offset = 32;
-static constexpr dart::word ObjectStore_string_type_offset = 80;
-static constexpr dart::word OneByteString_data_offset = 12;
-static constexpr dart::word Pointer_c_memory_address_offset = 8;
-static constexpr dart::word SingleTargetCache_entry_point_offset = 8;
-static constexpr dart::word SingleTargetCache_lower_limit_offset = 12;
-static constexpr dart::word SingleTargetCache_target_offset = 4;
-static constexpr dart::word SingleTargetCache_upper_limit_offset = 14;
-static constexpr dart::word StoreBufferBlock_pointers_offset = 8;
-static constexpr dart::word StoreBufferBlock_top_offset = 4;
-static constexpr dart::word String_hash_offset = 8;
-static constexpr dart::word String_length_offset = 4;
-static constexpr dart::word SubtypeTestCache_cache_offset = 4;
-static constexpr dart::word Thread_AllocateArray_entry_point_offset = 284;
-static constexpr dart::word Thread_active_exception_offset = 576;
-static constexpr dart::word Thread_active_stacktrace_offset = 580;
-static constexpr dart::word Thread_array_write_barrier_code_offset = 112;
-static constexpr dart::word Thread_array_write_barrier_entry_point_offset = 196;
-static constexpr dart::word Thread_async_stack_trace_offset = 84;
-static constexpr dart::word
+static constexpr dart::compiler::target::word Class_num_type_arguments_offset =
+    102;
+static constexpr dart::compiler::target::word Class_super_type_offset = 44;
+static constexpr dart::compiler::target::word
+    Class_type_arguments_field_offset_in_words_offset = 92;
+static constexpr dart::compiler::target::word
+    ClassHeapStats_TraceAllocationMask = 1;
+static constexpr dart::compiler::target::word
+    ClassHeapStats_allocated_since_gc_new_space_offset = 48;
+static constexpr dart::compiler::target::word
+    ClassHeapStats_allocated_size_since_gc_new_space_offset = 52;
+static constexpr dart::compiler::target::word ClassHeapStats_state_offset = 160;
+static constexpr dart::compiler::target::word ClassTable_table_offset = 8;
+static constexpr dart::compiler::target::word Closure_context_offset = 20;
+static constexpr dart::compiler::target::word
+    Closure_delayed_type_arguments_offset = 12;
+static constexpr dart::compiler::target::word Closure_function_offset = 16;
+static constexpr dart::compiler::target::word
+    Closure_function_type_arguments_offset = 8;
+static constexpr dart::compiler::target::word Closure_hash_offset = 24;
+static constexpr dart::compiler::target::word
+    Closure_instantiator_type_arguments_offset = 4;
+static constexpr dart::compiler::target::word Code_object_pool_offset = 20;
+static constexpr dart::compiler::target::word Code_saved_instructions_offset =
+    24;
+static constexpr dart::compiler::target::word Code_owner_offset = 28;
+static constexpr dart::compiler::target::word Context_num_variables_offset = 4;
+static constexpr dart::compiler::target::word Context_parent_offset = 8;
+static constexpr dart::compiler::target::word Double_value_offset = 8;
+static constexpr dart::compiler::target::word
+    ExternalOneByteString_external_data_offset = 12;
+static constexpr dart::compiler::target::word
+    ExternalTwoByteString_external_data_offset = 12;
+static constexpr dart::compiler::target::word Float32x4_value_offset = 8;
+static constexpr dart::compiler::target::word Float64x2_value_offset = 8;
+static constexpr dart::compiler::target::word Field_guarded_cid_offset = 48;
+static constexpr dart::compiler::target::word
+    Field_guarded_list_length_in_object_offset_offset = 56;
+static constexpr dart::compiler::target::word Field_guarded_list_length_offset =
+    28;
+static constexpr dart::compiler::target::word Field_is_nullable_offset = 50;
+static constexpr dart::compiler::target::word Field_static_value_offset = 16;
+static constexpr dart::compiler::target::word Field_kind_bits_offset = 58;
+static constexpr dart::compiler::target::word Function_code_offset = 44;
+static constexpr dart::compiler::target::word Function_entry_point_offset = 4;
+static constexpr dart::compiler::target::word
+    Function_unchecked_entry_point_offset = 8;
+static constexpr dart::compiler::target::word Function_usage_counter_offset =
+    76;
+static constexpr dart::compiler::target::word GrowableObjectArray_data_offset =
+    12;
+static constexpr dart::compiler::target::word
+    GrowableObjectArray_length_offset = 8;
+static constexpr dart::compiler::target::word
+    GrowableObjectArray_type_arguments_offset = 4;
+static constexpr dart::compiler::target::word HeapPage_card_table_offset = 20;
+static constexpr dart::compiler::target::word ICData_NumArgsTestedMask = 3;
+static constexpr dart::compiler::target::word ICData_NumArgsTestedShift = 0;
+static constexpr dart::compiler::target::word
+    ICData_arguments_descriptor_offset = 12;
+static constexpr dart::compiler::target::word ICData_entries_offset = 4;
+static constexpr dart::compiler::target::word ICData_owner_offset = 20;
+static constexpr dart::compiler::target::word ICData_state_bits_offset = 28;
+static constexpr dart::compiler::target::word
+    ICData_receivers_static_type_offset = 16;
+static constexpr dart::compiler::target::word Isolate_class_table_offset = 24;
+static constexpr dart::compiler::target::word Isolate_current_tag_offset = 8;
+static constexpr dart::compiler::target::word Isolate_default_tag_offset = 12;
+static constexpr dart::compiler::target::word Isolate_ic_miss_code_offset = 16;
+static constexpr dart::compiler::target::word Isolate_object_store_offset = 20;
+static constexpr dart::compiler::target::word Isolate_single_step_offset = 44;
+static constexpr dart::compiler::target::word Isolate_user_tag_offset = 4;
+static constexpr dart::compiler::target::word LinkedHashMap_data_offset = 16;
+static constexpr dart::compiler::target::word
+    LinkedHashMap_deleted_keys_offset = 24;
+static constexpr dart::compiler::target::word LinkedHashMap_hash_mask_offset =
+    12;
+static constexpr dart::compiler::target::word LinkedHashMap_index_offset = 8;
+static constexpr dart::compiler::target::word LinkedHashMap_used_data_offset =
+    20;
+static constexpr dart::compiler::target::word
+    MarkingStackBlock_pointers_offset = 8;
+static constexpr dart::compiler::target::word MarkingStackBlock_top_offset = 4;
+static constexpr dart::compiler::target::word
+    MegamorphicCache_arguments_descriptor_offset = 16;
+static constexpr dart::compiler::target::word MegamorphicCache_buckets_offset =
+    4;
+static constexpr dart::compiler::target::word MegamorphicCache_mask_offset = 8;
+static constexpr dart::compiler::target::word Mint_value_offset = 8;
+static constexpr dart::compiler::target::word NativeArguments_argc_tag_offset =
+    4;
+static constexpr dart::compiler::target::word NativeArguments_argv_offset = 8;
+static constexpr dart::compiler::target::word NativeArguments_retval_offset =
+    12;
+static constexpr dart::compiler::target::word NativeArguments_thread_offset = 0;
+static constexpr dart::compiler::target::word ObjectStore_double_type_offset =
+    64;
+static constexpr dart::compiler::target::word ObjectStore_int_type_offset = 32;
+static constexpr dart::compiler::target::word ObjectStore_string_type_offset =
+    80;
+static constexpr dart::compiler::target::word OneByteString_data_offset = 12;
+static constexpr dart::compiler::target::word Pointer_c_memory_address_offset =
+    8;
+static constexpr dart::compiler::target::word
+    SingleTargetCache_entry_point_offset = 8;
+static constexpr dart::compiler::target::word
+    SingleTargetCache_lower_limit_offset = 12;
+static constexpr dart::compiler::target::word SingleTargetCache_target_offset =
+    4;
+static constexpr dart::compiler::target::word
+    SingleTargetCache_upper_limit_offset = 14;
+static constexpr dart::compiler::target::word StoreBufferBlock_pointers_offset =
+    8;
+static constexpr dart::compiler::target::word StoreBufferBlock_top_offset = 4;
+static constexpr dart::compiler::target::word String_hash_offset = 8;
+static constexpr dart::compiler::target::word String_length_offset = 4;
+static constexpr dart::compiler::target::word SubtypeTestCache_cache_offset = 4;
+static constexpr dart::compiler::target::word
+    Thread_AllocateArray_entry_point_offset = 284;
+static constexpr dart::compiler::target::word Thread_active_exception_offset =
+    576;
+static constexpr dart::compiler::target::word Thread_active_stacktrace_offset =
+    580;
+static constexpr dart::compiler::target::word
+    Thread_array_write_barrier_code_offset = 112;
+static constexpr dart::compiler::target::word
+    Thread_array_write_barrier_entry_point_offset = 196;
+static constexpr dart::compiler::target::word Thread_async_stack_trace_offset =
+    84;
+static constexpr dart::compiler::target::word
     Thread_auto_scope_native_wrapper_entry_point_offset = 244;
-static constexpr dart::word Thread_bool_false_offset = 104;
-static constexpr dart::word Thread_bool_true_offset = 100;
-static constexpr dart::word Thread_call_to_runtime_entry_point_offset = 200;
-static constexpr dart::word Thread_call_to_runtime_stub_offset = 132;
-static constexpr dart::word Thread_dart_stream_offset = 608;
-static constexpr dart::word Thread_deoptimize_entry_offset = 232;
-static constexpr dart::word Thread_deoptimize_stub_offset = 164;
-static constexpr dart::word Thread_double_abs_address_offset = 264;
-static constexpr dart::word Thread_double_negate_address_offset = 260;
-static constexpr dart::word Thread_end_offset = 60;
-static constexpr dart::word Thread_enter_safepoint_stub_offset = 184;
-static constexpr dart::word Thread_execution_state_offset = 592;
-static constexpr dart::word Thread_exit_safepoint_stub_offset = 188;
-static constexpr dart::word Thread_fix_allocation_stub_code_offset = 120;
-static constexpr dart::word Thread_fix_callers_target_code_offset = 116;
-static constexpr dart::word Thread_float_absolute_address_offset = 276;
-static constexpr dart::word Thread_float_negate_address_offset = 272;
-static constexpr dart::word Thread_float_not_address_offset = 268;
-static constexpr dart::word Thread_float_zerow_address_offset = 280;
-static constexpr dart::word Thread_global_object_pool_offset = 584;
-static constexpr dart::word Thread_ic_lookup_through_code_stub_offset = 156;
-static constexpr dart::word Thread_interpret_call_entry_point_offset = 248;
-static constexpr dart::word Thread_invoke_dart_code_from_bytecode_stub_offset =
-    128;
-static constexpr dart::word Thread_invoke_dart_code_stub_offset = 124;
-static constexpr dart::word Thread_isolate_offset = 48;
-static constexpr dart::word Thread_lazy_deopt_from_return_stub_offset = 168;
-static constexpr dart::word Thread_lazy_deopt_from_throw_stub_offset = 172;
-static constexpr dart::word Thread_lazy_specialize_type_test_stub_offset = 180;
-static constexpr dart::word Thread_marking_stack_block_offset = 72;
-static constexpr dart::word Thread_megamorphic_call_checked_entry_offset = 220;
-static constexpr dart::word Thread_monomorphic_miss_entry_offset = 224;
-static constexpr dart::word Thread_monomorphic_miss_stub_offset = 152;
-static constexpr dart::word Thread_no_scope_native_wrapper_entry_point_offset =
-    240;
-static constexpr dart::word
+static constexpr dart::compiler::target::word Thread_bool_false_offset = 104;
+static constexpr dart::compiler::target::word Thread_bool_true_offset = 100;
+static constexpr dart::compiler::target::word
+    Thread_call_to_runtime_entry_point_offset = 200;
+static constexpr dart::compiler::target::word
+    Thread_call_to_runtime_stub_offset = 132;
+static constexpr dart::compiler::target::word Thread_dart_stream_offset = 608;
+static constexpr dart::compiler::target::word Thread_deoptimize_entry_offset =
+    232;
+static constexpr dart::compiler::target::word Thread_deoptimize_stub_offset =
+    164;
+static constexpr dart::compiler::target::word Thread_double_abs_address_offset =
+    264;
+static constexpr dart::compiler::target::word
+    Thread_double_negate_address_offset = 260;
+static constexpr dart::compiler::target::word Thread_end_offset = 60;
+static constexpr dart::compiler::target::word
+    Thread_enter_safepoint_stub_offset = 184;
+static constexpr dart::compiler::target::word Thread_execution_state_offset =
+    592;
+static constexpr dart::compiler::target::word
+    Thread_exit_safepoint_stub_offset = 188;
+static constexpr dart::compiler::target::word
+    Thread_fix_allocation_stub_code_offset = 120;
+static constexpr dart::compiler::target::word
+    Thread_fix_callers_target_code_offset = 116;
+static constexpr dart::compiler::target::word
+    Thread_float_absolute_address_offset = 276;
+static constexpr dart::compiler::target::word
+    Thread_float_negate_address_offset = 272;
+static constexpr dart::compiler::target::word Thread_float_not_address_offset =
+    268;
+static constexpr dart::compiler::target::word
+    Thread_float_zerow_address_offset = 280;
+static constexpr dart::compiler::target::word Thread_global_object_pool_offset =
+    584;
+static constexpr dart::compiler::target::word
+    Thread_ic_lookup_through_code_stub_offset = 156;
+static constexpr dart::compiler::target::word
+    Thread_interpret_call_entry_point_offset = 248;
+static constexpr dart::compiler::target::word
+    Thread_invoke_dart_code_from_bytecode_stub_offset = 128;
+static constexpr dart::compiler::target::word
+    Thread_invoke_dart_code_stub_offset = 124;
+static constexpr dart::compiler::target::word Thread_isolate_offset = 48;
+static constexpr dart::compiler::target::word
+    Thread_lazy_deopt_from_return_stub_offset = 168;
+static constexpr dart::compiler::target::word
+    Thread_lazy_deopt_from_throw_stub_offset = 172;
+static constexpr dart::compiler::target::word
+    Thread_lazy_specialize_type_test_stub_offset = 180;
+static constexpr dart::compiler::target::word
+    Thread_marking_stack_block_offset = 72;
+static constexpr dart::compiler::target::word
+    Thread_megamorphic_call_checked_entry_offset = 220;
+static constexpr dart::compiler::target::word
+    Thread_monomorphic_miss_entry_offset = 224;
+static constexpr dart::compiler::target::word
+    Thread_monomorphic_miss_stub_offset = 152;
+static constexpr dart::compiler::target::word
+    Thread_no_scope_native_wrapper_entry_point_offset = 240;
+static constexpr dart::compiler::target::word
     Thread_null_error_shared_with_fpu_regs_entry_point_offset = 208;
-static constexpr dart::word Thread_null_error_shared_with_fpu_regs_stub_offset =
-    140;
-static constexpr dart::word
+static constexpr dart::compiler::target::word
+    Thread_null_error_shared_with_fpu_regs_stub_offset = 140;
+static constexpr dart::compiler::target::word
     Thread_null_error_shared_without_fpu_regs_entry_point_offset = 204;
-static constexpr dart::word
+static constexpr dart::compiler::target::word
     Thread_null_error_shared_without_fpu_regs_stub_offset = 136;
-static constexpr dart::word Thread_object_null_offset = 96;
-static constexpr dart::word Thread_predefined_symbols_address_offset = 252;
-static constexpr dart::word Thread_resume_pc_offset = 588;
-static constexpr dart::word Thread_safepoint_state_offset = 596;
-static constexpr dart::word Thread_slow_type_test_stub_offset = 176;
-static constexpr dart::word Thread_stack_limit_offset = 36;
-static constexpr dart::word Thread_stack_overflow_flags_offset = 40;
-static constexpr dart::word
+static constexpr dart::compiler::target::word Thread_object_null_offset = 96;
+static constexpr dart::compiler::target::word
+    Thread_predefined_symbols_address_offset = 252;
+static constexpr dart::compiler::target::word Thread_resume_pc_offset = 588;
+static constexpr dart::compiler::target::word Thread_safepoint_state_offset =
+    596;
+static constexpr dart::compiler::target::word
+    Thread_slow_type_test_stub_offset = 176;
+static constexpr dart::compiler::target::word Thread_stack_limit_offset = 36;
+static constexpr dart::compiler::target::word
+    Thread_stack_overflow_flags_offset = 40;
+static constexpr dart::compiler::target::word
     Thread_stack_overflow_shared_with_fpu_regs_entry_point_offset = 216;
-static constexpr dart::word
+static constexpr dart::compiler::target::word
     Thread_stack_overflow_shared_with_fpu_regs_stub_offset = 148;
-static constexpr dart::word
+static constexpr dart::compiler::target::word
     Thread_stack_overflow_shared_without_fpu_regs_entry_point_offset = 212;
-static constexpr dart::word
+static constexpr dart::compiler::target::word
     Thread_stack_overflow_shared_without_fpu_regs_stub_offset = 144;
-static constexpr dart::word Thread_store_buffer_block_offset = 68;
-static constexpr dart::word Thread_top_exit_frame_info_offset = 64;
-static constexpr dart::word Thread_top_offset = 56;
-static constexpr dart::word Thread_top_resource_offset = 24;
-static constexpr dart::word Thread_unboxed_int64_runtime_arg_offset = 88;
-static constexpr dart::word Thread_vm_tag_offset = 80;
-static constexpr dart::word Thread_write_barrier_code_offset = 108;
-static constexpr dart::word Thread_write_barrier_entry_point_offset = 192;
-static constexpr dart::word Thread_write_barrier_mask_offset = 44;
-static constexpr dart::word Thread_verify_callback_entry_offset = 236;
-static constexpr dart::word Thread_callback_code_offset = 600;
-static constexpr dart::word TimelineStream_enabled_offset = 8;
-static constexpr dart::word TwoByteString_data_offset = 12;
-static constexpr dart::word Type_arguments_offset = 16;
-static constexpr dart::word Type_hash_offset = 20;
-static constexpr dart::word Type_signature_offset = 24;
-static constexpr dart::word Type_type_class_id_offset = 12;
-static constexpr dart::word Type_type_state_offset = 32;
-static constexpr dart::word TypeArguments_instantiations_offset = 4;
-static constexpr dart::word TypeRef_type_offset = 12;
-static constexpr dart::word TypedDataBase_data_field_offset = 4;
-static constexpr dart::word TypedDataBase_length_offset = 8;
-static constexpr dart::word TypedDataView_data_offset = 12;
-static constexpr dart::word TypedDataView_offset_in_bytes_offset = 16;
-static constexpr dart::word TypedData_data_offset = 12;
-static constexpr dart::word UserTag_tag_offset = 8;
-static constexpr dart::word Array_elements_start_offset = 12;
-static constexpr dart::word Array_element_size = 4;
-static constexpr dart::word TypeArguments_elements_start_offset = 16;
-static constexpr dart::word TypeArguments_element_size = 4;
-static constexpr dart::word ClassTable_elements_start_offset = 0;
-static constexpr dart::word ClassTable_element_size = 168;
-static constexpr dart::word ClassTable_class_heap_stats_table_offset = 16;
-static dart::word Code_entry_point_offset[] = {4, 12, 8, 16};
-static dart::word Code_function_entry_point_offset[] = {4, 8};
-static constexpr dart::word Array_header_size = 12;
-static constexpr dart::word Context_header_size = 12;
-static constexpr dart::word Double_InstanceSize = 16;
-static constexpr dart::word Float32x4_InstanceSize = 24;
-static constexpr dart::word Float64x2_InstanceSize = 24;
-static constexpr dart::word Instructions_UnalignedHeaderSize = 16;
-static constexpr dart::word Int32x4_InstanceSize = 24;
-static constexpr dart::word Mint_InstanceSize = 16;
-static constexpr dart::word NativeArguments_StructSize = 16;
-static constexpr dart::word String_InstanceSize = 12;
-static constexpr dart::word TypedData_InstanceSize = 12;
+static constexpr dart::compiler::target::word Thread_store_buffer_block_offset =
+    68;
+static constexpr dart::compiler::target::word
+    Thread_top_exit_frame_info_offset = 64;
+static constexpr dart::compiler::target::word Thread_top_offset = 56;
+static constexpr dart::compiler::target::word Thread_top_resource_offset = 24;
+static constexpr dart::compiler::target::word
+    Thread_unboxed_int64_runtime_arg_offset = 88;
+static constexpr dart::compiler::target::word Thread_vm_tag_offset = 80;
+static constexpr dart::compiler::target::word Thread_write_barrier_code_offset =
+    108;
+static constexpr dart::compiler::target::word
+    Thread_write_barrier_entry_point_offset = 192;
+static constexpr dart::compiler::target::word Thread_write_barrier_mask_offset =
+    44;
+static constexpr dart::compiler::target::word
+    Thread_verify_callback_entry_offset = 236;
+static constexpr dart::compiler::target::word Thread_callback_code_offset = 600;
+static constexpr dart::compiler::target::word TimelineStream_enabled_offset = 8;
+static constexpr dart::compiler::target::word TwoByteString_data_offset = 12;
+static constexpr dart::compiler::target::word Type_arguments_offset = 16;
+static constexpr dart::compiler::target::word Type_hash_offset = 20;
+static constexpr dart::compiler::target::word Type_signature_offset = 24;
+static constexpr dart::compiler::target::word Type_type_class_id_offset = 12;
+static constexpr dart::compiler::target::word Type_type_state_offset = 32;
+static constexpr dart::compiler::target::word
+    TypeArguments_instantiations_offset = 4;
+static constexpr dart::compiler::target::word TypeRef_type_offset = 12;
+static constexpr dart::compiler::target::word TypedDataBase_data_field_offset =
+    4;
+static constexpr dart::compiler::target::word TypedDataBase_length_offset = 8;
+static constexpr dart::compiler::target::word TypedDataView_data_offset = 12;
+static constexpr dart::compiler::target::word
+    TypedDataView_offset_in_bytes_offset = 16;
+static constexpr dart::compiler::target::word TypedData_data_offset = 12;
+static constexpr dart::compiler::target::word UserTag_tag_offset = 8;
+static constexpr dart::compiler::target::word Array_elements_start_offset = 12;
+static constexpr dart::compiler::target::word Array_element_size = 4;
+static constexpr dart::compiler::target::word
+    TypeArguments_elements_start_offset = 16;
+static constexpr dart::compiler::target::word TypeArguments_element_size = 4;
+static constexpr dart::compiler::target::word ClassTable_elements_start_offset =
+    0;
+static constexpr dart::compiler::target::word ClassTable_element_size = 168;
+static constexpr dart::compiler::target::word
+    ClassTable_class_heap_stats_table_offset = 16;
+static dart::compiler::target::word Code_entry_point_offset[] = {4, 12, 8, 16};
+static dart::compiler::target::word Code_function_entry_point_offset[] = {4, 8};
+static constexpr dart::compiler::target::word Array_header_size = 12;
+static constexpr dart::compiler::target::word Context_header_size = 12;
+static constexpr dart::compiler::target::word Double_InstanceSize = 16;
+static constexpr dart::compiler::target::word Float32x4_InstanceSize = 24;
+static constexpr dart::compiler::target::word Float64x2_InstanceSize = 24;
+static constexpr dart::compiler::target::word Instructions_UnalignedHeaderSize =
+    16;
+static constexpr dart::compiler::target::word Int32x4_InstanceSize = 24;
+static constexpr dart::compiler::target::word Mint_InstanceSize = 16;
+static constexpr dart::compiler::target::word NativeArguments_StructSize = 16;
+static constexpr dart::compiler::target::word String_InstanceSize = 12;
+static constexpr dart::compiler::target::word TypedData_InstanceSize = 12;
+static constexpr dart::compiler::target::word Object_InstanceSize = 4;
+static constexpr dart::compiler::target::word TypedDataBase_InstanceSize = 12;
+static constexpr dart::compiler::target::word Closure_InstanceSize = 28;
+static constexpr dart::compiler::target::word GrowableObjectArray_InstanceSize =
+    16;
+static constexpr dart::compiler::target::word Instance_InstanceSize = 4;
+static constexpr dart::compiler::target::word LinkedHashMap_InstanceSize = 28;
 #endif  // defined(TARGET_ARCH_IA32)
 
 #if defined(TARGET_ARCH_ARM64)
-static constexpr dart::word ObjectPool_elements_start_offset = 16;
-static constexpr dart::word ObjectPool_element_size = 8;
-static constexpr dart::word Array_kMaxElements = 576460752303423487;
-static constexpr dart::word Array_kMaxNewSpaceElements = 32765;
-static constexpr dart::word ClassTable_kSizeOfClassPairLog2 = 4;
-static constexpr dart::word Instructions_kMonomorphicEntryOffset = 28;
-static constexpr dart::word Instructions_kPolymorphicEntryOffset = 8;
-static constexpr dart::word HeapPage_kBytesPerCardLog2 = 10;
-static constexpr dart::word NativeEntry_kNumCallWrapperArguments = 2;
-static constexpr dart::word String_kMaxElements = 2305843009213693951;
-static constexpr dart::word SubtypeTestCache_kFunctionTypeArguments = 4;
-static constexpr dart::word SubtypeTestCache_kInstanceClassIdOrFunction = 1;
-static constexpr dart::word
+static constexpr dart::compiler::target::word ObjectPool_elements_start_offset =
+    16;
+static constexpr dart::compiler::target::word ObjectPool_element_size = 8;
+static constexpr dart::compiler::target::word Array_kMaxElements =
+    576460752303423487;
+static constexpr dart::compiler::target::word Array_kMaxNewSpaceElements =
+    32765;
+static constexpr dart::compiler::target::word ClassTable_kSizeOfClassPairLog2 =
+    4;
+static constexpr dart::compiler::target::word
+    Instructions_kMonomorphicEntryOffset = 28;
+static constexpr dart::compiler::target::word
+    Instructions_kPolymorphicEntryOffset = 8;
+static constexpr dart::compiler::target::word HeapPage_kBytesPerCardLog2 = 10;
+static constexpr dart::compiler::target::word
+    NativeEntry_kNumCallWrapperArguments = 2;
+static constexpr dart::compiler::target::word String_kMaxElements =
+    2305843009213693951;
+static constexpr dart::compiler::target::word
+    SubtypeTestCache_kFunctionTypeArguments = 4;
+static constexpr dart::compiler::target::word
+    SubtypeTestCache_kInstanceClassIdOrFunction = 1;
+static constexpr dart::compiler::target::word
     SubtypeTestCache_kInstanceDelayedFunctionTypeArguments = 6;
-static constexpr dart::word
+static constexpr dart::compiler::target::word
     SubtypeTestCache_kInstanceParentFunctionTypeArguments = 5;
-static constexpr dart::word SubtypeTestCache_kInstanceTypeArguments = 2;
-static constexpr dart::word SubtypeTestCache_kInstantiatorTypeArguments = 3;
-static constexpr dart::word SubtypeTestCache_kTestEntryLength = 7;
-static constexpr dart::word SubtypeTestCache_kTestResult = 0;
-static constexpr dart::word AbstractType_type_test_stub_entry_point_offset = 8;
-static constexpr dart::word ArgumentsDescriptor_count_offset = 32;
-static constexpr dart::word ArgumentsDescriptor_first_named_entry_offset = 48;
-static constexpr dart::word ArgumentsDescriptor_named_entry_size = 16;
-static constexpr dart::word ArgumentsDescriptor_name_offset = 0;
-static constexpr dart::word ArgumentsDescriptor_position_offset = 8;
-static constexpr dart::word ArgumentsDescriptor_positional_count_offset = 40;
-static constexpr dart::word ArgumentsDescriptor_type_args_len_offset = 24;
-static constexpr dart::word Array_data_offset = 24;
-static constexpr dart::word Array_length_offset = 16;
-static constexpr dart::word Array_tags_offset = 0;
-static constexpr dart::word Array_type_arguments_offset = 8;
-static constexpr dart::word Class_declaration_type_offset = 112;
-static constexpr dart::word Class_num_type_arguments_offset = 186;
-static constexpr dart::word Class_super_type_offset = 88;
-static constexpr dart::word Class_type_arguments_field_offset_in_words_offset =
-    176;
-static constexpr dart::word ClassHeapStats_TraceAllocationMask = 1;
-static constexpr dart::word ClassHeapStats_allocated_since_gc_new_space_offset =
-    96;
-static constexpr dart::word
+static constexpr dart::compiler::target::word
+    SubtypeTestCache_kInstanceTypeArguments = 2;
+static constexpr dart::compiler::target::word
+    SubtypeTestCache_kInstantiatorTypeArguments = 3;
+static constexpr dart::compiler::target::word
+    SubtypeTestCache_kTestEntryLength = 7;
+static constexpr dart::compiler::target::word SubtypeTestCache_kTestResult = 0;
+static constexpr dart::compiler::target::word
+    AbstractType_type_test_stub_entry_point_offset = 8;
+static constexpr dart::compiler::target::word ArgumentsDescriptor_count_offset =
+    32;
+static constexpr dart::compiler::target::word
+    ArgumentsDescriptor_first_named_entry_offset = 48;
+static constexpr dart::compiler::target::word
+    ArgumentsDescriptor_named_entry_size = 16;
+static constexpr dart::compiler::target::word ArgumentsDescriptor_name_offset =
+    0;
+static constexpr dart::compiler::target::word
+    ArgumentsDescriptor_position_offset = 8;
+static constexpr dart::compiler::target::word
+    ArgumentsDescriptor_positional_count_offset = 40;
+static constexpr dart::compiler::target::word
+    ArgumentsDescriptor_type_args_len_offset = 24;
+static constexpr dart::compiler::target::word Array_data_offset = 24;
+static constexpr dart::compiler::target::word Array_length_offset = 16;
+static constexpr dart::compiler::target::word Array_tags_offset = 0;
+static constexpr dart::compiler::target::word Array_type_arguments_offset = 8;
+static constexpr dart::compiler::target::word Class_declaration_type_offset =
+    112;
+static constexpr dart::compiler::target::word Class_num_type_arguments_offset =
+    186;
+static constexpr dart::compiler::target::word Class_super_type_offset = 88;
+static constexpr dart::compiler::target::word
+    Class_type_arguments_field_offset_in_words_offset = 176;
+static constexpr dart::compiler::target::word
+    ClassHeapStats_TraceAllocationMask = 1;
+static constexpr dart::compiler::target::word
+    ClassHeapStats_allocated_since_gc_new_space_offset = 96;
+static constexpr dart::compiler::target::word
     ClassHeapStats_allocated_size_since_gc_new_space_offset = 104;
-static constexpr dart::word ClassHeapStats_state_offset = 272;
-static constexpr dart::word ClassTable_table_offset = 16;
-static constexpr dart::word Closure_context_offset = 40;
-static constexpr dart::word Closure_delayed_type_arguments_offset = 24;
-static constexpr dart::word Closure_function_offset = 32;
-static constexpr dart::word Closure_function_type_arguments_offset = 16;
-static constexpr dart::word Closure_hash_offset = 48;
-static constexpr dart::word Closure_instantiator_type_arguments_offset = 8;
-static constexpr dart::word Code_object_pool_offset = 40;
-static constexpr dart::word Code_saved_instructions_offset = 48;
-static constexpr dart::word Code_owner_offset = 56;
-static constexpr dart::word Context_num_variables_offset = 8;
-static constexpr dart::word Context_parent_offset = 16;
-static constexpr dart::word Double_value_offset = 8;
-static constexpr dart::word ExternalOneByteString_external_data_offset = 16;
-static constexpr dart::word ExternalTwoByteString_external_data_offset = 16;
-static constexpr dart::word Float32x4_value_offset = 8;
-static constexpr dart::word Float64x2_value_offset = 8;
-static constexpr dart::word Field_guarded_cid_offset = 88;
-static constexpr dart::word Field_guarded_list_length_in_object_offset_offset =
-    96;
-static constexpr dart::word Field_guarded_list_length_offset = 56;
-static constexpr dart::word Field_is_nullable_offset = 90;
-static constexpr dart::word Field_static_value_offset = 32;
-static constexpr dart::word Field_kind_bits_offset = 98;
-static constexpr dart::word Function_code_offset = 88;
-static constexpr dart::word Function_entry_point_offset = 8;
-static constexpr dart::word Function_unchecked_entry_point_offset = 16;
-static constexpr dart::word Function_usage_counter_offset = 132;
-static constexpr dart::word GrowableObjectArray_data_offset = 24;
-static constexpr dart::word GrowableObjectArray_length_offset = 16;
-static constexpr dart::word GrowableObjectArray_type_arguments_offset = 8;
-static constexpr dart::word HeapPage_card_table_offset = 40;
-static constexpr dart::word ICData_NumArgsTestedMask = 3;
-static constexpr dart::word ICData_NumArgsTestedShift = 0;
-static constexpr dart::word ICData_arguments_descriptor_offset = 24;
-static constexpr dart::word ICData_entries_offset = 8;
-static constexpr dart::word ICData_owner_offset = 40;
-static constexpr dart::word ICData_state_bits_offset = 52;
-static constexpr dart::word ICData_receivers_static_type_offset = 32;
-static constexpr dart::word Isolate_class_table_offset = 48;
-static constexpr dart::word Isolate_current_tag_offset = 16;
-static constexpr dart::word Isolate_default_tag_offset = 24;
-static constexpr dart::word Isolate_ic_miss_code_offset = 32;
-static constexpr dart::word Isolate_object_store_offset = 40;
-static constexpr dart::word Isolate_single_step_offset = 88;
-static constexpr dart::word Isolate_user_tag_offset = 8;
-static constexpr dart::word LinkedHashMap_data_offset = 32;
-static constexpr dart::word LinkedHashMap_deleted_keys_offset = 48;
-static constexpr dart::word LinkedHashMap_hash_mask_offset = 24;
-static constexpr dart::word LinkedHashMap_index_offset = 16;
-static constexpr dart::word LinkedHashMap_used_data_offset = 40;
-static constexpr dart::word MarkingStackBlock_pointers_offset = 16;
-static constexpr dart::word MarkingStackBlock_top_offset = 8;
-static constexpr dart::word MegamorphicCache_arguments_descriptor_offset = 32;
-static constexpr dart::word MegamorphicCache_buckets_offset = 8;
-static constexpr dart::word MegamorphicCache_mask_offset = 16;
-static constexpr dart::word Mint_value_offset = 8;
-static constexpr dart::word NativeArguments_argc_tag_offset = 8;
-static constexpr dart::word NativeArguments_argv_offset = 16;
-static constexpr dart::word NativeArguments_retval_offset = 24;
-static constexpr dart::word NativeArguments_thread_offset = 0;
-static constexpr dart::word ObjectStore_double_type_offset = 128;
-static constexpr dart::word ObjectStore_int_type_offset = 64;
-static constexpr dart::word ObjectStore_string_type_offset = 160;
-static constexpr dart::word OneByteString_data_offset = 16;
-static constexpr dart::word Pointer_c_memory_address_offset = 16;
-static constexpr dart::word SingleTargetCache_entry_point_offset = 16;
-static constexpr dart::word SingleTargetCache_lower_limit_offset = 24;
-static constexpr dart::word SingleTargetCache_target_offset = 8;
-static constexpr dart::word SingleTargetCache_upper_limit_offset = 26;
-static constexpr dart::word StoreBufferBlock_pointers_offset = 16;
-static constexpr dart::word StoreBufferBlock_top_offset = 8;
-static constexpr dart::word String_hash_offset = 4;
-static constexpr dart::word String_length_offset = 8;
-static constexpr dart::word SubtypeTestCache_cache_offset = 8;
-static constexpr dart::word Thread_AllocateArray_entry_point_offset = 560;
-static constexpr dart::word Thread_active_exception_offset = 1320;
-static constexpr dart::word Thread_active_stacktrace_offset = 1328;
-static constexpr dart::word Thread_array_write_barrier_code_offset = 216;
-static constexpr dart::word Thread_array_write_barrier_entry_point_offset = 384;
-static constexpr dart::word Thread_async_stack_trace_offset = 168;
-static constexpr dart::word
+static constexpr dart::compiler::target::word ClassHeapStats_state_offset = 272;
+static constexpr dart::compiler::target::word ClassTable_table_offset = 16;
+static constexpr dart::compiler::target::word Closure_context_offset = 40;
+static constexpr dart::compiler::target::word
+    Closure_delayed_type_arguments_offset = 24;
+static constexpr dart::compiler::target::word Closure_function_offset = 32;
+static constexpr dart::compiler::target::word
+    Closure_function_type_arguments_offset = 16;
+static constexpr dart::compiler::target::word Closure_hash_offset = 48;
+static constexpr dart::compiler::target::word
+    Closure_instantiator_type_arguments_offset = 8;
+static constexpr dart::compiler::target::word Code_object_pool_offset = 40;
+static constexpr dart::compiler::target::word Code_saved_instructions_offset =
+    48;
+static constexpr dart::compiler::target::word Code_owner_offset = 56;
+static constexpr dart::compiler::target::word Context_num_variables_offset = 8;
+static constexpr dart::compiler::target::word Context_parent_offset = 16;
+static constexpr dart::compiler::target::word Double_value_offset = 8;
+static constexpr dart::compiler::target::word
+    ExternalOneByteString_external_data_offset = 16;
+static constexpr dart::compiler::target::word
+    ExternalTwoByteString_external_data_offset = 16;
+static constexpr dart::compiler::target::word Float32x4_value_offset = 8;
+static constexpr dart::compiler::target::word Float64x2_value_offset = 8;
+static constexpr dart::compiler::target::word Field_guarded_cid_offset = 88;
+static constexpr dart::compiler::target::word
+    Field_guarded_list_length_in_object_offset_offset = 96;
+static constexpr dart::compiler::target::word Field_guarded_list_length_offset =
+    56;
+static constexpr dart::compiler::target::word Field_is_nullable_offset = 90;
+static constexpr dart::compiler::target::word Field_static_value_offset = 32;
+static constexpr dart::compiler::target::word Field_kind_bits_offset = 98;
+static constexpr dart::compiler::target::word Function_code_offset = 88;
+static constexpr dart::compiler::target::word Function_entry_point_offset = 8;
+static constexpr dart::compiler::target::word
+    Function_unchecked_entry_point_offset = 16;
+static constexpr dart::compiler::target::word Function_usage_counter_offset =
+    132;
+static constexpr dart::compiler::target::word GrowableObjectArray_data_offset =
+    24;
+static constexpr dart::compiler::target::word
+    GrowableObjectArray_length_offset = 16;
+static constexpr dart::compiler::target::word
+    GrowableObjectArray_type_arguments_offset = 8;
+static constexpr dart::compiler::target::word HeapPage_card_table_offset = 40;
+static constexpr dart::compiler::target::word ICData_NumArgsTestedMask = 3;
+static constexpr dart::compiler::target::word ICData_NumArgsTestedShift = 0;
+static constexpr dart::compiler::target::word
+    ICData_arguments_descriptor_offset = 24;
+static constexpr dart::compiler::target::word ICData_entries_offset = 8;
+static constexpr dart::compiler::target::word ICData_owner_offset = 40;
+static constexpr dart::compiler::target::word ICData_state_bits_offset = 52;
+static constexpr dart::compiler::target::word
+    ICData_receivers_static_type_offset = 32;
+static constexpr dart::compiler::target::word Isolate_class_table_offset = 48;
+static constexpr dart::compiler::target::word Isolate_current_tag_offset = 16;
+static constexpr dart::compiler::target::word Isolate_default_tag_offset = 24;
+static constexpr dart::compiler::target::word Isolate_ic_miss_code_offset = 32;
+static constexpr dart::compiler::target::word Isolate_object_store_offset = 40;
+static constexpr dart::compiler::target::word Isolate_single_step_offset = 88;
+static constexpr dart::compiler::target::word Isolate_user_tag_offset = 8;
+static constexpr dart::compiler::target::word LinkedHashMap_data_offset = 32;
+static constexpr dart::compiler::target::word
+    LinkedHashMap_deleted_keys_offset = 48;
+static constexpr dart::compiler::target::word LinkedHashMap_hash_mask_offset =
+    24;
+static constexpr dart::compiler::target::word LinkedHashMap_index_offset = 16;
+static constexpr dart::compiler::target::word LinkedHashMap_used_data_offset =
+    40;
+static constexpr dart::compiler::target::word
+    MarkingStackBlock_pointers_offset = 16;
+static constexpr dart::compiler::target::word MarkingStackBlock_top_offset = 8;
+static constexpr dart::compiler::target::word
+    MegamorphicCache_arguments_descriptor_offset = 32;
+static constexpr dart::compiler::target::word MegamorphicCache_buckets_offset =
+    8;
+static constexpr dart::compiler::target::word MegamorphicCache_mask_offset = 16;
+static constexpr dart::compiler::target::word Mint_value_offset = 8;
+static constexpr dart::compiler::target::word NativeArguments_argc_tag_offset =
+    8;
+static constexpr dart::compiler::target::word NativeArguments_argv_offset = 16;
+static constexpr dart::compiler::target::word NativeArguments_retval_offset =
+    24;
+static constexpr dart::compiler::target::word NativeArguments_thread_offset = 0;
+static constexpr dart::compiler::target::word ObjectStore_double_type_offset =
+    128;
+static constexpr dart::compiler::target::word ObjectStore_int_type_offset = 64;
+static constexpr dart::compiler::target::word ObjectStore_string_type_offset =
+    160;
+static constexpr dart::compiler::target::word OneByteString_data_offset = 16;
+static constexpr dart::compiler::target::word Pointer_c_memory_address_offset =
+    16;
+static constexpr dart::compiler::target::word
+    SingleTargetCache_entry_point_offset = 16;
+static constexpr dart::compiler::target::word
+    SingleTargetCache_lower_limit_offset = 24;
+static constexpr dart::compiler::target::word SingleTargetCache_target_offset =
+    8;
+static constexpr dart::compiler::target::word
+    SingleTargetCache_upper_limit_offset = 26;
+static constexpr dart::compiler::target::word StoreBufferBlock_pointers_offset =
+    16;
+static constexpr dart::compiler::target::word StoreBufferBlock_top_offset = 8;
+static constexpr dart::compiler::target::word String_hash_offset = 4;
+static constexpr dart::compiler::target::word String_length_offset = 8;
+static constexpr dart::compiler::target::word SubtypeTestCache_cache_offset = 8;
+static constexpr dart::compiler::target::word
+    Thread_AllocateArray_entry_point_offset = 560;
+static constexpr dart::compiler::target::word Thread_active_exception_offset =
+    1320;
+static constexpr dart::compiler::target::word Thread_active_stacktrace_offset =
+    1328;
+static constexpr dart::compiler::target::word
+    Thread_array_write_barrier_code_offset = 216;
+static constexpr dart::compiler::target::word
+    Thread_array_write_barrier_entry_point_offset = 384;
+static constexpr dart::compiler::target::word Thread_async_stack_trace_offset =
+    168;
+static constexpr dart::compiler::target::word
     Thread_auto_scope_native_wrapper_entry_point_offset = 480;
-static constexpr dart::word Thread_bool_false_offset = 200;
-static constexpr dart::word Thread_bool_true_offset = 192;
-static constexpr dart::word Thread_call_to_runtime_entry_point_offset = 392;
-static constexpr dart::word Thread_call_to_runtime_stub_offset = 256;
-static constexpr dart::word Thread_dart_stream_offset = 1384;
-static constexpr dart::word Thread_deoptimize_entry_offset = 456;
-static constexpr dart::word Thread_deoptimize_stub_offset = 320;
-static constexpr dart::word Thread_double_abs_address_offset = 520;
-static constexpr dart::word Thread_double_negate_address_offset = 512;
-static constexpr dart::word Thread_end_offset = 120;
-static constexpr dart::word Thread_enter_safepoint_stub_offset = 360;
-static constexpr dart::word Thread_execution_state_offset = 1352;
-static constexpr dart::word Thread_exit_safepoint_stub_offset = 368;
-static constexpr dart::word Thread_fix_allocation_stub_code_offset = 232;
-static constexpr dart::word Thread_fix_callers_target_code_offset = 224;
-static constexpr dart::word Thread_float_absolute_address_offset = 544;
-static constexpr dart::word Thread_float_negate_address_offset = 536;
-static constexpr dart::word Thread_float_not_address_offset = 528;
-static constexpr dart::word Thread_float_zerow_address_offset = 552;
-static constexpr dart::word Thread_global_object_pool_offset = 1336;
-static constexpr dart::word Thread_ic_lookup_through_code_stub_offset = 304;
-static constexpr dart::word Thread_interpret_call_entry_point_offset = 488;
-static constexpr dart::word Thread_invoke_dart_code_from_bytecode_stub_offset =
-    248;
-static constexpr dart::word Thread_invoke_dart_code_stub_offset = 240;
-static constexpr dart::word Thread_isolate_offset = 96;
-static constexpr dart::word Thread_lazy_deopt_from_return_stub_offset = 328;
-static constexpr dart::word Thread_lazy_deopt_from_throw_stub_offset = 336;
-static constexpr dart::word Thread_lazy_specialize_type_test_stub_offset = 352;
-static constexpr dart::word Thread_marking_stack_block_offset = 144;
-static constexpr dart::word Thread_megamorphic_call_checked_entry_offset = 432;
-static constexpr dart::word Thread_monomorphic_miss_entry_offset = 440;
-static constexpr dart::word Thread_monomorphic_miss_stub_offset = 296;
-static constexpr dart::word Thread_no_scope_native_wrapper_entry_point_offset =
-    472;
-static constexpr dart::word
+static constexpr dart::compiler::target::word Thread_bool_false_offset = 200;
+static constexpr dart::compiler::target::word Thread_bool_true_offset = 192;
+static constexpr dart::compiler::target::word
+    Thread_call_to_runtime_entry_point_offset = 392;
+static constexpr dart::compiler::target::word
+    Thread_call_to_runtime_stub_offset = 256;
+static constexpr dart::compiler::target::word Thread_dart_stream_offset = 1384;
+static constexpr dart::compiler::target::word Thread_deoptimize_entry_offset =
+    456;
+static constexpr dart::compiler::target::word Thread_deoptimize_stub_offset =
+    320;
+static constexpr dart::compiler::target::word Thread_double_abs_address_offset =
+    520;
+static constexpr dart::compiler::target::word
+    Thread_double_negate_address_offset = 512;
+static constexpr dart::compiler::target::word Thread_end_offset = 120;
+static constexpr dart::compiler::target::word
+    Thread_enter_safepoint_stub_offset = 360;
+static constexpr dart::compiler::target::word Thread_execution_state_offset =
+    1352;
+static constexpr dart::compiler::target::word
+    Thread_exit_safepoint_stub_offset = 368;
+static constexpr dart::compiler::target::word
+    Thread_fix_allocation_stub_code_offset = 232;
+static constexpr dart::compiler::target::word
+    Thread_fix_callers_target_code_offset = 224;
+static constexpr dart::compiler::target::word
+    Thread_float_absolute_address_offset = 544;
+static constexpr dart::compiler::target::word
+    Thread_float_negate_address_offset = 536;
+static constexpr dart::compiler::target::word Thread_float_not_address_offset =
+    528;
+static constexpr dart::compiler::target::word
+    Thread_float_zerow_address_offset = 552;
+static constexpr dart::compiler::target::word Thread_global_object_pool_offset =
+    1336;
+static constexpr dart::compiler::target::word
+    Thread_ic_lookup_through_code_stub_offset = 304;
+static constexpr dart::compiler::target::word
+    Thread_interpret_call_entry_point_offset = 488;
+static constexpr dart::compiler::target::word
+    Thread_invoke_dart_code_from_bytecode_stub_offset = 248;
+static constexpr dart::compiler::target::word
+    Thread_invoke_dart_code_stub_offset = 240;
+static constexpr dart::compiler::target::word Thread_isolate_offset = 96;
+static constexpr dart::compiler::target::word
+    Thread_lazy_deopt_from_return_stub_offset = 328;
+static constexpr dart::compiler::target::word
+    Thread_lazy_deopt_from_throw_stub_offset = 336;
+static constexpr dart::compiler::target::word
+    Thread_lazy_specialize_type_test_stub_offset = 352;
+static constexpr dart::compiler::target::word
+    Thread_marking_stack_block_offset = 144;
+static constexpr dart::compiler::target::word
+    Thread_megamorphic_call_checked_entry_offset = 432;
+static constexpr dart::compiler::target::word
+    Thread_monomorphic_miss_entry_offset = 440;
+static constexpr dart::compiler::target::word
+    Thread_monomorphic_miss_stub_offset = 296;
+static constexpr dart::compiler::target::word
+    Thread_no_scope_native_wrapper_entry_point_offset = 472;
+static constexpr dart::compiler::target::word
     Thread_null_error_shared_with_fpu_regs_entry_point_offset = 408;
-static constexpr dart::word Thread_null_error_shared_with_fpu_regs_stub_offset =
-    272;
-static constexpr dart::word
+static constexpr dart::compiler::target::word
+    Thread_null_error_shared_with_fpu_regs_stub_offset = 272;
+static constexpr dart::compiler::target::word
     Thread_null_error_shared_without_fpu_regs_entry_point_offset = 400;
-static constexpr dart::word
+static constexpr dart::compiler::target::word
     Thread_null_error_shared_without_fpu_regs_stub_offset = 264;
-static constexpr dart::word Thread_object_null_offset = 184;
-static constexpr dart::word Thread_predefined_symbols_address_offset = 496;
-static constexpr dart::word Thread_resume_pc_offset = 1344;
-static constexpr dart::word Thread_safepoint_state_offset = 1360;
-static constexpr dart::word Thread_slow_type_test_stub_offset = 344;
-static constexpr dart::word Thread_stack_limit_offset = 72;
-static constexpr dart::word Thread_stack_overflow_flags_offset = 80;
-static constexpr dart::word
+static constexpr dart::compiler::target::word Thread_object_null_offset = 184;
+static constexpr dart::compiler::target::word
+    Thread_predefined_symbols_address_offset = 496;
+static constexpr dart::compiler::target::word Thread_resume_pc_offset = 1344;
+static constexpr dart::compiler::target::word Thread_safepoint_state_offset =
+    1360;
+static constexpr dart::compiler::target::word
+    Thread_slow_type_test_stub_offset = 344;
+static constexpr dart::compiler::target::word Thread_stack_limit_offset = 72;
+static constexpr dart::compiler::target::word
+    Thread_stack_overflow_flags_offset = 80;
+static constexpr dart::compiler::target::word
     Thread_stack_overflow_shared_with_fpu_regs_entry_point_offset = 424;
-static constexpr dart::word
+static constexpr dart::compiler::target::word
     Thread_stack_overflow_shared_with_fpu_regs_stub_offset = 288;
-static constexpr dart::word
+static constexpr dart::compiler::target::word
     Thread_stack_overflow_shared_without_fpu_regs_entry_point_offset = 416;
-static constexpr dart::word
+static constexpr dart::compiler::target::word
     Thread_stack_overflow_shared_without_fpu_regs_stub_offset = 280;
-static constexpr dart::word Thread_store_buffer_block_offset = 136;
-static constexpr dart::word Thread_top_exit_frame_info_offset = 128;
-static constexpr dart::word Thread_top_offset = 112;
-static constexpr dart::word Thread_top_resource_offset = 48;
-static constexpr dart::word Thread_unboxed_int64_runtime_arg_offset = 176;
-static constexpr dart::word Thread_vm_tag_offset = 160;
-static constexpr dart::word Thread_write_barrier_code_offset = 208;
-static constexpr dart::word Thread_write_barrier_entry_point_offset = 376;
-static constexpr dart::word Thread_write_barrier_mask_offset = 88;
-static constexpr dart::word Thread_verify_callback_entry_offset = 464;
-static constexpr dart::word Thread_callback_code_offset = 1368;
-static constexpr dart::word TimelineStream_enabled_offset = 16;
-static constexpr dart::word TwoByteString_data_offset = 16;
-static constexpr dart::word Type_arguments_offset = 32;
-static constexpr dart::word Type_hash_offset = 40;
-static constexpr dart::word Type_signature_offset = 48;
-static constexpr dart::word Type_type_class_id_offset = 24;
-static constexpr dart::word Type_type_state_offset = 60;
-static constexpr dart::word TypeArguments_instantiations_offset = 8;
-static constexpr dart::word TypeRef_type_offset = 24;
-static constexpr dart::word TypedDataBase_data_field_offset = 8;
-static constexpr dart::word TypedDataBase_length_offset = 16;
-static constexpr dart::word TypedDataView_data_offset = 24;
-static constexpr dart::word TypedDataView_offset_in_bytes_offset = 32;
-static constexpr dart::word TypedData_data_offset = 24;
-static constexpr dart::word UserTag_tag_offset = 16;
-static constexpr dart::word Array_elements_start_offset = 24;
-static constexpr dart::word Array_element_size = 8;
-static constexpr dart::word TypeArguments_elements_start_offset = 32;
-static constexpr dart::word TypeArguments_element_size = 8;
-static constexpr dart::word ClassTable_elements_start_offset = 0;
-static constexpr dart::word ClassTable_element_size = 288;
-static constexpr dart::word ClassTable_class_heap_stats_table_offset = 32;
-static dart::word Code_entry_point_offset[] = {8, 24, 16, 32};
-static dart::word Code_function_entry_point_offset[] = {8, 16};
-static dart::word Thread_write_barrier_wrappers_thread_offset[] = {
-    1144, 1152, 1160, 1168, 1176, 1184, 1192, 1200, 1208, 1216, 1224,
-    1232, 1240, 1248, 1256, -1,   -1,   -1,   -1,   1264, 1272, 1280,
-    1288, 1296, 1304, 1312, -1,   -1,   -1,   -1,   -1,   -1};
-static constexpr dart::word Array_header_size = 24;
-static constexpr dart::word Context_header_size = 24;
-static constexpr dart::word Double_InstanceSize = 16;
-static constexpr dart::word Float32x4_InstanceSize = 24;
-static constexpr dart::word Float64x2_InstanceSize = 24;
-static constexpr dart::word Instructions_UnalignedHeaderSize = 24;
-static constexpr dart::word Int32x4_InstanceSize = 24;
-static constexpr dart::word Mint_InstanceSize = 16;
-static constexpr dart::word NativeArguments_StructSize = 32;
-static constexpr dart::word String_InstanceSize = 16;
-static constexpr dart::word TypedData_InstanceSize = 24;
+static constexpr dart::compiler::target::word Thread_store_buffer_block_offset =
+    136;
+static constexpr dart::compiler::target::word
+    Thread_top_exit_frame_info_offset = 128;
+static constexpr dart::compiler::target::word Thread_top_offset = 112;
+static constexpr dart::compiler::target::word Thread_top_resource_offset = 48;
+static constexpr dart::compiler::target::word
+    Thread_unboxed_int64_runtime_arg_offset = 176;
+static constexpr dart::compiler::target::word Thread_vm_tag_offset = 160;
+static constexpr dart::compiler::target::word Thread_write_barrier_code_offset =
+    208;
+static constexpr dart::compiler::target::word
+    Thread_write_barrier_entry_point_offset = 376;
+static constexpr dart::compiler::target::word Thread_write_barrier_mask_offset =
+    88;
+static constexpr dart::compiler::target::word
+    Thread_verify_callback_entry_offset = 464;
+static constexpr dart::compiler::target::word Thread_callback_code_offset =
+    1368;
+static constexpr dart::compiler::target::word TimelineStream_enabled_offset =
+    16;
+static constexpr dart::compiler::target::word TwoByteString_data_offset = 16;
+static constexpr dart::compiler::target::word Type_arguments_offset = 32;
+static constexpr dart::compiler::target::word Type_hash_offset = 40;
+static constexpr dart::compiler::target::word Type_signature_offset = 48;
+static constexpr dart::compiler::target::word Type_type_class_id_offset = 24;
+static constexpr dart::compiler::target::word Type_type_state_offset = 60;
+static constexpr dart::compiler::target::word
+    TypeArguments_instantiations_offset = 8;
+static constexpr dart::compiler::target::word TypeRef_type_offset = 24;
+static constexpr dart::compiler::target::word TypedDataBase_data_field_offset =
+    8;
+static constexpr dart::compiler::target::word TypedDataBase_length_offset = 16;
+static constexpr dart::compiler::target::word TypedDataView_data_offset = 24;
+static constexpr dart::compiler::target::word
+    TypedDataView_offset_in_bytes_offset = 32;
+static constexpr dart::compiler::target::word TypedData_data_offset = 24;
+static constexpr dart::compiler::target::word UserTag_tag_offset = 16;
+static constexpr dart::compiler::target::word Array_elements_start_offset = 24;
+static constexpr dart::compiler::target::word Array_element_size = 8;
+static constexpr dart::compiler::target::word
+    TypeArguments_elements_start_offset = 32;
+static constexpr dart::compiler::target::word TypeArguments_element_size = 8;
+static constexpr dart::compiler::target::word ClassTable_elements_start_offset =
+    0;
+static constexpr dart::compiler::target::word ClassTable_element_size = 288;
+static constexpr dart::compiler::target::word
+    ClassTable_class_heap_stats_table_offset = 32;
+static dart::compiler::target::word Code_entry_point_offset[] = {8, 24, 16, 32};
+static dart::compiler::target::word Code_function_entry_point_offset[] = {8,
+                                                                          16};
+static dart::compiler::target::word
+    Thread_write_barrier_wrappers_thread_offset[] = {
+        1144, 1152, 1160, 1168, 1176, 1184, 1192, 1200, 1208, 1216, 1224,
+        1232, 1240, 1248, 1256, -1,   -1,   -1,   -1,   1264, 1272, 1280,
+        1288, 1296, 1304, 1312, -1,   -1,   -1,   -1,   -1,   -1};
+static constexpr dart::compiler::target::word Array_header_size = 24;
+static constexpr dart::compiler::target::word Context_header_size = 24;
+static constexpr dart::compiler::target::word Double_InstanceSize = 16;
+static constexpr dart::compiler::target::word Float32x4_InstanceSize = 24;
+static constexpr dart::compiler::target::word Float64x2_InstanceSize = 24;
+static constexpr dart::compiler::target::word Instructions_UnalignedHeaderSize =
+    24;
+static constexpr dart::compiler::target::word Int32x4_InstanceSize = 24;
+static constexpr dart::compiler::target::word Mint_InstanceSize = 16;
+static constexpr dart::compiler::target::word NativeArguments_StructSize = 32;
+static constexpr dart::compiler::target::word String_InstanceSize = 16;
+static constexpr dart::compiler::target::word TypedData_InstanceSize = 24;
+static constexpr dart::compiler::target::word Object_InstanceSize = 8;
+static constexpr dart::compiler::target::word TypedDataBase_InstanceSize = 24;
+static constexpr dart::compiler::target::word Closure_InstanceSize = 56;
+static constexpr dart::compiler::target::word GrowableObjectArray_InstanceSize =
+    32;
+static constexpr dart::compiler::target::word Instance_InstanceSize = 8;
+static constexpr dart::compiler::target::word LinkedHashMap_InstanceSize = 56;
 #endif  // defined(TARGET_ARCH_ARM64)
 
 #if defined(TARGET_ARCH_DBC) && defined(TARGET_ARCH_IS_64_BIT)
-static constexpr dart::word ObjectPool_elements_start_offset = 16;
-static constexpr dart::word ObjectPool_element_size = 8;
-static constexpr dart::word Array_kMaxElements = 576460752303423487;
-static constexpr dart::word Array_kMaxNewSpaceElements = 32765;
-static constexpr dart::word ClassTable_kSizeOfClassPairLog2 = 4;
-static constexpr dart::word Instructions_kMonomorphicEntryOffset = 0;
-static constexpr dart::word Instructions_kPolymorphicEntryOffset = 0;
-static constexpr dart::word HeapPage_kBytesPerCardLog2 = 10;
-static constexpr dart::word NativeEntry_kNumCallWrapperArguments = 2;
-static constexpr dart::word String_kMaxElements = 2305843009213693951;
-static constexpr dart::word SubtypeTestCache_kFunctionTypeArguments = 4;
-static constexpr dart::word SubtypeTestCache_kInstanceClassIdOrFunction = 1;
-static constexpr dart::word
+static constexpr dart::compiler::target::word ObjectPool_elements_start_offset =
+    16;
+static constexpr dart::compiler::target::word ObjectPool_element_size = 8;
+static constexpr dart::compiler::target::word Array_kMaxElements =
+    576460752303423487;
+static constexpr dart::compiler::target::word Array_kMaxNewSpaceElements =
+    32765;
+static constexpr dart::compiler::target::word ClassTable_kSizeOfClassPairLog2 =
+    4;
+static constexpr dart::compiler::target::word
+    Instructions_kMonomorphicEntryOffset = 0;
+static constexpr dart::compiler::target::word
+    Instructions_kPolymorphicEntryOffset = 0;
+static constexpr dart::compiler::target::word HeapPage_kBytesPerCardLog2 = 10;
+static constexpr dart::compiler::target::word
+    NativeEntry_kNumCallWrapperArguments = 2;
+static constexpr dart::compiler::target::word String_kMaxElements =
+    2305843009213693951;
+static constexpr dart::compiler::target::word
+    SubtypeTestCache_kFunctionTypeArguments = 4;
+static constexpr dart::compiler::target::word
+    SubtypeTestCache_kInstanceClassIdOrFunction = 1;
+static constexpr dart::compiler::target::word
     SubtypeTestCache_kInstanceDelayedFunctionTypeArguments = 6;
-static constexpr dart::word
+static constexpr dart::compiler::target::word
     SubtypeTestCache_kInstanceParentFunctionTypeArguments = 5;
-static constexpr dart::word SubtypeTestCache_kInstanceTypeArguments = 2;
-static constexpr dart::word SubtypeTestCache_kInstantiatorTypeArguments = 3;
-static constexpr dart::word SubtypeTestCache_kTestEntryLength = 7;
-static constexpr dart::word SubtypeTestCache_kTestResult = 0;
-static constexpr dart::word AbstractType_type_test_stub_entry_point_offset = 8;
-static constexpr dart::word ArgumentsDescriptor_count_offset = 32;
-static constexpr dart::word ArgumentsDescriptor_first_named_entry_offset = 48;
-static constexpr dart::word ArgumentsDescriptor_named_entry_size = 16;
-static constexpr dart::word ArgumentsDescriptor_name_offset = 0;
-static constexpr dart::word ArgumentsDescriptor_position_offset = 8;
-static constexpr dart::word ArgumentsDescriptor_positional_count_offset = 40;
-static constexpr dart::word ArgumentsDescriptor_type_args_len_offset = 24;
-static constexpr dart::word Array_data_offset = 24;
-static constexpr dart::word Array_length_offset = 16;
-static constexpr dart::word Array_tags_offset = 0;
-static constexpr dart::word Array_type_arguments_offset = 8;
-static constexpr dart::word Class_declaration_type_offset = 112;
-static constexpr dart::word Class_num_type_arguments_offset = 186;
-static constexpr dart::word Class_super_type_offset = 88;
-static constexpr dart::word Class_type_arguments_field_offset_in_words_offset =
-    176;
-static constexpr dart::word ClassHeapStats_TraceAllocationMask = 1;
-static constexpr dart::word ClassHeapStats_allocated_since_gc_new_space_offset =
-    96;
-static constexpr dart::word
+static constexpr dart::compiler::target::word
+    SubtypeTestCache_kInstanceTypeArguments = 2;
+static constexpr dart::compiler::target::word
+    SubtypeTestCache_kInstantiatorTypeArguments = 3;
+static constexpr dart::compiler::target::word
+    SubtypeTestCache_kTestEntryLength = 7;
+static constexpr dart::compiler::target::word SubtypeTestCache_kTestResult = 0;
+static constexpr dart::compiler::target::word
+    AbstractType_type_test_stub_entry_point_offset = 8;
+static constexpr dart::compiler::target::word ArgumentsDescriptor_count_offset =
+    32;
+static constexpr dart::compiler::target::word
+    ArgumentsDescriptor_first_named_entry_offset = 48;
+static constexpr dart::compiler::target::word
+    ArgumentsDescriptor_named_entry_size = 16;
+static constexpr dart::compiler::target::word ArgumentsDescriptor_name_offset =
+    0;
+static constexpr dart::compiler::target::word
+    ArgumentsDescriptor_position_offset = 8;
+static constexpr dart::compiler::target::word
+    ArgumentsDescriptor_positional_count_offset = 40;
+static constexpr dart::compiler::target::word
+    ArgumentsDescriptor_type_args_len_offset = 24;
+static constexpr dart::compiler::target::word Array_data_offset = 24;
+static constexpr dart::compiler::target::word Array_length_offset = 16;
+static constexpr dart::compiler::target::word Array_tags_offset = 0;
+static constexpr dart::compiler::target::word Array_type_arguments_offset = 8;
+static constexpr dart::compiler::target::word Class_declaration_type_offset =
+    112;
+static constexpr dart::compiler::target::word Class_num_type_arguments_offset =
+    186;
+static constexpr dart::compiler::target::word Class_super_type_offset = 88;
+static constexpr dart::compiler::target::word
+    Class_type_arguments_field_offset_in_words_offset = 176;
+static constexpr dart::compiler::target::word
+    ClassHeapStats_TraceAllocationMask = 1;
+static constexpr dart::compiler::target::word
+    ClassHeapStats_allocated_since_gc_new_space_offset = 96;
+static constexpr dart::compiler::target::word
     ClassHeapStats_allocated_size_since_gc_new_space_offset = 104;
-static constexpr dart::word ClassHeapStats_state_offset = 272;
-static constexpr dart::word ClassTable_table_offset = 16;
-static constexpr dart::word Closure_context_offset = 40;
-static constexpr dart::word Closure_delayed_type_arguments_offset = 24;
-static constexpr dart::word Closure_function_offset = 32;
-static constexpr dart::word Closure_function_type_arguments_offset = 16;
-static constexpr dart::word Closure_hash_offset = 48;
-static constexpr dart::word Closure_instantiator_type_arguments_offset = 8;
-static constexpr dart::word Code_object_pool_offset = 40;
-static constexpr dart::word Code_saved_instructions_offset = 48;
-static constexpr dart::word Code_owner_offset = 56;
-static constexpr dart::word Context_num_variables_offset = 8;
-static constexpr dart::word Context_parent_offset = 16;
-static constexpr dart::word Double_value_offset = 8;
-static constexpr dart::word ExternalOneByteString_external_data_offset = 16;
-static constexpr dart::word ExternalTwoByteString_external_data_offset = 16;
-static constexpr dart::word Float32x4_value_offset = 8;
-static constexpr dart::word Float64x2_value_offset = 8;
-static constexpr dart::word Field_guarded_cid_offset = 88;
-static constexpr dart::word Field_guarded_list_length_in_object_offset_offset =
-    96;
-static constexpr dart::word Field_guarded_list_length_offset = 56;
-static constexpr dart::word Field_is_nullable_offset = 90;
-static constexpr dart::word Field_static_value_offset = 32;
-static constexpr dart::word Field_kind_bits_offset = 98;
-static constexpr dart::word Function_code_offset = 88;
-static constexpr dart::word Function_entry_point_offset = 8;
-static constexpr dart::word Function_unchecked_entry_point_offset = 16;
-static constexpr dart::word Function_usage_counter_offset = 132;
-static constexpr dart::word GrowableObjectArray_data_offset = 24;
-static constexpr dart::word GrowableObjectArray_length_offset = 16;
-static constexpr dart::word GrowableObjectArray_type_arguments_offset = 8;
-static constexpr dart::word HeapPage_card_table_offset = 40;
-static constexpr dart::word ICData_NumArgsTestedMask = 3;
-static constexpr dart::word ICData_NumArgsTestedShift = 0;
-static constexpr dart::word ICData_arguments_descriptor_offset = 24;
-static constexpr dart::word ICData_entries_offset = 8;
-static constexpr dart::word ICData_owner_offset = 40;
-static constexpr dart::word ICData_state_bits_offset = 52;
-static constexpr dart::word ICData_receivers_static_type_offset = 32;
-static constexpr dart::word Isolate_class_table_offset = 48;
-static constexpr dart::word Isolate_current_tag_offset = 16;
-static constexpr dart::word Isolate_default_tag_offset = 24;
-static constexpr dart::word Isolate_ic_miss_code_offset = 32;
-static constexpr dart::word Isolate_object_store_offset = 40;
-static constexpr dart::word Isolate_single_step_offset = 88;
-static constexpr dart::word Isolate_user_tag_offset = 8;
-static constexpr dart::word LinkedHashMap_data_offset = 32;
-static constexpr dart::word LinkedHashMap_deleted_keys_offset = 48;
-static constexpr dart::word LinkedHashMap_hash_mask_offset = 24;
-static constexpr dart::word LinkedHashMap_index_offset = 16;
-static constexpr dart::word LinkedHashMap_used_data_offset = 40;
-static constexpr dart::word MarkingStackBlock_pointers_offset = 16;
-static constexpr dart::word MarkingStackBlock_top_offset = 8;
-static constexpr dart::word MegamorphicCache_arguments_descriptor_offset = 32;
-static constexpr dart::word MegamorphicCache_buckets_offset = 8;
-static constexpr dart::word MegamorphicCache_mask_offset = 16;
-static constexpr dart::word Mint_value_offset = 8;
-static constexpr dart::word NativeArguments_argc_tag_offset = 8;
-static constexpr dart::word NativeArguments_argv_offset = 16;
-static constexpr dart::word NativeArguments_retval_offset = 24;
-static constexpr dart::word NativeArguments_thread_offset = 0;
-static constexpr dart::word ObjectStore_double_type_offset = 128;
-static constexpr dart::word ObjectStore_int_type_offset = 64;
-static constexpr dart::word ObjectStore_string_type_offset = 160;
-static constexpr dart::word OneByteString_data_offset = 16;
-static constexpr dart::word Pointer_c_memory_address_offset = 16;
-static constexpr dart::word SingleTargetCache_entry_point_offset = 16;
-static constexpr dart::word SingleTargetCache_lower_limit_offset = 24;
-static constexpr dart::word SingleTargetCache_target_offset = 8;
-static constexpr dart::word SingleTargetCache_upper_limit_offset = 26;
-static constexpr dart::word StoreBufferBlock_pointers_offset = 16;
-static constexpr dart::word StoreBufferBlock_top_offset = 8;
-static constexpr dart::word String_hash_offset = 4;
-static constexpr dart::word String_length_offset = 8;
-static constexpr dart::word SubtypeTestCache_cache_offset = 8;
-static constexpr dart::word Thread_AllocateArray_entry_point_offset = 296;
-static constexpr dart::word Thread_active_exception_offset = 880;
-static constexpr dart::word Thread_active_stacktrace_offset = 888;
-static constexpr dart::word Thread_async_stack_trace_offset = 168;
-static constexpr dart::word
+static constexpr dart::compiler::target::word ClassHeapStats_state_offset = 272;
+static constexpr dart::compiler::target::word ClassTable_table_offset = 16;
+static constexpr dart::compiler::target::word Closure_context_offset = 40;
+static constexpr dart::compiler::target::word
+    Closure_delayed_type_arguments_offset = 24;
+static constexpr dart::compiler::target::word Closure_function_offset = 32;
+static constexpr dart::compiler::target::word
+    Closure_function_type_arguments_offset = 16;
+static constexpr dart::compiler::target::word Closure_hash_offset = 48;
+static constexpr dart::compiler::target::word
+    Closure_instantiator_type_arguments_offset = 8;
+static constexpr dart::compiler::target::word Code_object_pool_offset = 40;
+static constexpr dart::compiler::target::word Code_saved_instructions_offset =
+    48;
+static constexpr dart::compiler::target::word Code_owner_offset = 56;
+static constexpr dart::compiler::target::word Context_num_variables_offset = 8;
+static constexpr dart::compiler::target::word Context_parent_offset = 16;
+static constexpr dart::compiler::target::word Double_value_offset = 8;
+static constexpr dart::compiler::target::word
+    ExternalOneByteString_external_data_offset = 16;
+static constexpr dart::compiler::target::word
+    ExternalTwoByteString_external_data_offset = 16;
+static constexpr dart::compiler::target::word Float32x4_value_offset = 8;
+static constexpr dart::compiler::target::word Float64x2_value_offset = 8;
+static constexpr dart::compiler::target::word Field_guarded_cid_offset = 88;
+static constexpr dart::compiler::target::word
+    Field_guarded_list_length_in_object_offset_offset = 96;
+static constexpr dart::compiler::target::word Field_guarded_list_length_offset =
+    56;
+static constexpr dart::compiler::target::word Field_is_nullable_offset = 90;
+static constexpr dart::compiler::target::word Field_static_value_offset = 32;
+static constexpr dart::compiler::target::word Field_kind_bits_offset = 98;
+static constexpr dart::compiler::target::word Function_code_offset = 88;
+static constexpr dart::compiler::target::word Function_entry_point_offset = 8;
+static constexpr dart::compiler::target::word
+    Function_unchecked_entry_point_offset = 16;
+static constexpr dart::compiler::target::word Function_usage_counter_offset =
+    132;
+static constexpr dart::compiler::target::word GrowableObjectArray_data_offset =
+    24;
+static constexpr dart::compiler::target::word
+    GrowableObjectArray_length_offset = 16;
+static constexpr dart::compiler::target::word
+    GrowableObjectArray_type_arguments_offset = 8;
+static constexpr dart::compiler::target::word HeapPage_card_table_offset = 40;
+static constexpr dart::compiler::target::word ICData_NumArgsTestedMask = 3;
+static constexpr dart::compiler::target::word ICData_NumArgsTestedShift = 0;
+static constexpr dart::compiler::target::word
+    ICData_arguments_descriptor_offset = 24;
+static constexpr dart::compiler::target::word ICData_entries_offset = 8;
+static constexpr dart::compiler::target::word ICData_owner_offset = 40;
+static constexpr dart::compiler::target::word ICData_state_bits_offset = 52;
+static constexpr dart::compiler::target::word
+    ICData_receivers_static_type_offset = 32;
+static constexpr dart::compiler::target::word Isolate_class_table_offset = 48;
+static constexpr dart::compiler::target::word Isolate_current_tag_offset = 16;
+static constexpr dart::compiler::target::word Isolate_default_tag_offset = 24;
+static constexpr dart::compiler::target::word Isolate_ic_miss_code_offset = 32;
+static constexpr dart::compiler::target::word Isolate_object_store_offset = 40;
+static constexpr dart::compiler::target::word Isolate_single_step_offset = 88;
+static constexpr dart::compiler::target::word Isolate_user_tag_offset = 8;
+static constexpr dart::compiler::target::word LinkedHashMap_data_offset = 32;
+static constexpr dart::compiler::target::word
+    LinkedHashMap_deleted_keys_offset = 48;
+static constexpr dart::compiler::target::word LinkedHashMap_hash_mask_offset =
+    24;
+static constexpr dart::compiler::target::word LinkedHashMap_index_offset = 16;
+static constexpr dart::compiler::target::word LinkedHashMap_used_data_offset =
+    40;
+static constexpr dart::compiler::target::word
+    MarkingStackBlock_pointers_offset = 16;
+static constexpr dart::compiler::target::word MarkingStackBlock_top_offset = 8;
+static constexpr dart::compiler::target::word
+    MegamorphicCache_arguments_descriptor_offset = 32;
+static constexpr dart::compiler::target::word MegamorphicCache_buckets_offset =
+    8;
+static constexpr dart::compiler::target::word MegamorphicCache_mask_offset = 16;
+static constexpr dart::compiler::target::word Mint_value_offset = 8;
+static constexpr dart::compiler::target::word NativeArguments_argc_tag_offset =
+    8;
+static constexpr dart::compiler::target::word NativeArguments_argv_offset = 16;
+static constexpr dart::compiler::target::word NativeArguments_retval_offset =
+    24;
+static constexpr dart::compiler::target::word NativeArguments_thread_offset = 0;
+static constexpr dart::compiler::target::word ObjectStore_double_type_offset =
+    128;
+static constexpr dart::compiler::target::word ObjectStore_int_type_offset = 64;
+static constexpr dart::compiler::target::word ObjectStore_string_type_offset =
+    160;
+static constexpr dart::compiler::target::word OneByteString_data_offset = 16;
+static constexpr dart::compiler::target::word Pointer_c_memory_address_offset =
+    16;
+static constexpr dart::compiler::target::word
+    SingleTargetCache_entry_point_offset = 16;
+static constexpr dart::compiler::target::word
+    SingleTargetCache_lower_limit_offset = 24;
+static constexpr dart::compiler::target::word SingleTargetCache_target_offset =
+    8;
+static constexpr dart::compiler::target::word
+    SingleTargetCache_upper_limit_offset = 26;
+static constexpr dart::compiler::target::word StoreBufferBlock_pointers_offset =
+    16;
+static constexpr dart::compiler::target::word StoreBufferBlock_top_offset = 8;
+static constexpr dart::compiler::target::word String_hash_offset = 4;
+static constexpr dart::compiler::target::word String_length_offset = 8;
+static constexpr dart::compiler::target::word SubtypeTestCache_cache_offset = 8;
+static constexpr dart::compiler::target::word
+    Thread_AllocateArray_entry_point_offset = 296;
+static constexpr dart::compiler::target::word Thread_active_exception_offset =
+    880;
+static constexpr dart::compiler::target::word Thread_active_stacktrace_offset =
+    888;
+static constexpr dart::compiler::target::word Thread_async_stack_trace_offset =
+    168;
+static constexpr dart::compiler::target::word
     Thread_auto_scope_native_wrapper_entry_point_offset = 216;
-static constexpr dart::word Thread_bool_false_offset = 200;
-static constexpr dart::word Thread_bool_true_offset = 192;
-static constexpr dart::word Thread_dart_stream_offset = 944;
-static constexpr dart::word Thread_double_abs_address_offset = 256;
-static constexpr dart::word Thread_double_negate_address_offset = 248;
-static constexpr dart::word Thread_end_offset = 120;
-static constexpr dart::word Thread_execution_state_offset = 912;
-static constexpr dart::word Thread_float_absolute_address_offset = 280;
-static constexpr dart::word Thread_float_negate_address_offset = 272;
-static constexpr dart::word Thread_float_not_address_offset = 264;
-static constexpr dart::word Thread_float_zerow_address_offset = 288;
-static constexpr dart::word Thread_global_object_pool_offset = 896;
-static constexpr dart::word Thread_isolate_offset = 96;
-static constexpr dart::word Thread_marking_stack_block_offset = 144;
-static constexpr dart::word Thread_no_scope_native_wrapper_entry_point_offset =
-    208;
-static constexpr dart::word Thread_object_null_offset = 184;
-static constexpr dart::word Thread_predefined_symbols_address_offset = 232;
-static constexpr dart::word Thread_resume_pc_offset = 904;
-static constexpr dart::word Thread_safepoint_state_offset = 920;
-static constexpr dart::word Thread_stack_limit_offset = 72;
-static constexpr dart::word Thread_stack_overflow_flags_offset = 80;
-static constexpr dart::word Thread_store_buffer_block_offset = 136;
-static constexpr dart::word Thread_top_exit_frame_info_offset = 128;
-static constexpr dart::word Thread_top_offset = 112;
-static constexpr dart::word Thread_top_resource_offset = 48;
-static constexpr dart::word Thread_unboxed_int64_runtime_arg_offset = 176;
-static constexpr dart::word Thread_vm_tag_offset = 160;
-static constexpr dart::word Thread_write_barrier_mask_offset = 88;
-static constexpr dart::word Thread_callback_code_offset = 928;
-static constexpr dart::word TimelineStream_enabled_offset = 16;
-static constexpr dart::word TwoByteString_data_offset = 16;
-static constexpr dart::word Type_arguments_offset = 32;
-static constexpr dart::word Type_hash_offset = 40;
-static constexpr dart::word Type_signature_offset = 48;
-static constexpr dart::word Type_type_class_id_offset = 24;
-static constexpr dart::word Type_type_state_offset = 60;
-static constexpr dart::word TypeArguments_instantiations_offset = 8;
-static constexpr dart::word TypeRef_type_offset = 24;
-static constexpr dart::word TypedDataBase_data_field_offset = 8;
-static constexpr dart::word TypedDataBase_length_offset = 16;
-static constexpr dart::word TypedDataView_data_offset = 24;
-static constexpr dart::word TypedDataView_offset_in_bytes_offset = 32;
-static constexpr dart::word TypedData_data_offset = 24;
-static constexpr dart::word UserTag_tag_offset = 16;
-static constexpr dart::word Array_elements_start_offset = 24;
-static constexpr dart::word Array_element_size = 8;
-static constexpr dart::word TypeArguments_elements_start_offset = 32;
-static constexpr dart::word TypeArguments_element_size = 8;
-static constexpr dart::word ClassTable_elements_start_offset = 0;
-static constexpr dart::word ClassTable_element_size = 288;
-static constexpr dart::word ClassTable_class_heap_stats_table_offset = 32;
-static dart::word Code_entry_point_offset[] = {8, 24, 16, 32};
-static dart::word Code_function_entry_point_offset[] = {8, 16};
-static constexpr dart::word Array_header_size = 24;
-static constexpr dart::word Context_header_size = 24;
-static constexpr dart::word Double_InstanceSize = 16;
-static constexpr dart::word Float32x4_InstanceSize = 24;
-static constexpr dart::word Float64x2_InstanceSize = 24;
-static constexpr dart::word Instructions_UnalignedHeaderSize = 24;
-static constexpr dart::word Int32x4_InstanceSize = 24;
-static constexpr dart::word Mint_InstanceSize = 16;
-static constexpr dart::word NativeArguments_StructSize = 32;
-static constexpr dart::word String_InstanceSize = 16;
-static constexpr dart::word TypedData_InstanceSize = 24;
+static constexpr dart::compiler::target::word Thread_bool_false_offset = 200;
+static constexpr dart::compiler::target::word Thread_bool_true_offset = 192;
+static constexpr dart::compiler::target::word Thread_dart_stream_offset = 944;
+static constexpr dart::compiler::target::word Thread_double_abs_address_offset =
+    256;
+static constexpr dart::compiler::target::word
+    Thread_double_negate_address_offset = 248;
+static constexpr dart::compiler::target::word Thread_end_offset = 120;
+static constexpr dart::compiler::target::word Thread_execution_state_offset =
+    912;
+static constexpr dart::compiler::target::word
+    Thread_float_absolute_address_offset = 280;
+static constexpr dart::compiler::target::word
+    Thread_float_negate_address_offset = 272;
+static constexpr dart::compiler::target::word Thread_float_not_address_offset =
+    264;
+static constexpr dart::compiler::target::word
+    Thread_float_zerow_address_offset = 288;
+static constexpr dart::compiler::target::word Thread_global_object_pool_offset =
+    896;
+static constexpr dart::compiler::target::word Thread_isolate_offset = 96;
+static constexpr dart::compiler::target::word
+    Thread_marking_stack_block_offset = 144;
+static constexpr dart::compiler::target::word
+    Thread_no_scope_native_wrapper_entry_point_offset = 208;
+static constexpr dart::compiler::target::word Thread_object_null_offset = 184;
+static constexpr dart::compiler::target::word
+    Thread_predefined_symbols_address_offset = 232;
+static constexpr dart::compiler::target::word Thread_resume_pc_offset = 904;
+static constexpr dart::compiler::target::word Thread_safepoint_state_offset =
+    920;
+static constexpr dart::compiler::target::word Thread_stack_limit_offset = 72;
+static constexpr dart::compiler::target::word
+    Thread_stack_overflow_flags_offset = 80;
+static constexpr dart::compiler::target::word Thread_store_buffer_block_offset =
+    136;
+static constexpr dart::compiler::target::word
+    Thread_top_exit_frame_info_offset = 128;
+static constexpr dart::compiler::target::word Thread_top_offset = 112;
+static constexpr dart::compiler::target::word Thread_top_resource_offset = 48;
+static constexpr dart::compiler::target::word
+    Thread_unboxed_int64_runtime_arg_offset = 176;
+static constexpr dart::compiler::target::word Thread_vm_tag_offset = 160;
+static constexpr dart::compiler::target::word Thread_write_barrier_mask_offset =
+    88;
+static constexpr dart::compiler::target::word Thread_callback_code_offset = 928;
+static constexpr dart::compiler::target::word TimelineStream_enabled_offset =
+    16;
+static constexpr dart::compiler::target::word TwoByteString_data_offset = 16;
+static constexpr dart::compiler::target::word Type_arguments_offset = 32;
+static constexpr dart::compiler::target::word Type_hash_offset = 40;
+static constexpr dart::compiler::target::word Type_signature_offset = 48;
+static constexpr dart::compiler::target::word Type_type_class_id_offset = 24;
+static constexpr dart::compiler::target::word Type_type_state_offset = 60;
+static constexpr dart::compiler::target::word
+    TypeArguments_instantiations_offset = 8;
+static constexpr dart::compiler::target::word TypeRef_type_offset = 24;
+static constexpr dart::compiler::target::word TypedDataBase_data_field_offset =
+    8;
+static constexpr dart::compiler::target::word TypedDataBase_length_offset = 16;
+static constexpr dart::compiler::target::word TypedDataView_data_offset = 24;
+static constexpr dart::compiler::target::word
+    TypedDataView_offset_in_bytes_offset = 32;
+static constexpr dart::compiler::target::word TypedData_data_offset = 24;
+static constexpr dart::compiler::target::word UserTag_tag_offset = 16;
+static constexpr dart::compiler::target::word Array_elements_start_offset = 24;
+static constexpr dart::compiler::target::word Array_element_size = 8;
+static constexpr dart::compiler::target::word
+    TypeArguments_elements_start_offset = 32;
+static constexpr dart::compiler::target::word TypeArguments_element_size = 8;
+static constexpr dart::compiler::target::word ClassTable_elements_start_offset =
+    0;
+static constexpr dart::compiler::target::word ClassTable_element_size = 288;
+static constexpr dart::compiler::target::word
+    ClassTable_class_heap_stats_table_offset = 32;
+static dart::compiler::target::word Code_entry_point_offset[] = {8, 24, 16, 32};
+static dart::compiler::target::word Code_function_entry_point_offset[] = {8,
+                                                                          16};
+static constexpr dart::compiler::target::word Array_header_size = 24;
+static constexpr dart::compiler::target::word Context_header_size = 24;
+static constexpr dart::compiler::target::word Double_InstanceSize = 16;
+static constexpr dart::compiler::target::word Float32x4_InstanceSize = 24;
+static constexpr dart::compiler::target::word Float64x2_InstanceSize = 24;
+static constexpr dart::compiler::target::word Instructions_UnalignedHeaderSize =
+    24;
+static constexpr dart::compiler::target::word Int32x4_InstanceSize = 24;
+static constexpr dart::compiler::target::word Mint_InstanceSize = 16;
+static constexpr dart::compiler::target::word NativeArguments_StructSize = 32;
+static constexpr dart::compiler::target::word String_InstanceSize = 16;
+static constexpr dart::compiler::target::word TypedData_InstanceSize = 24;
+static constexpr dart::compiler::target::word Object_InstanceSize = 8;
+static constexpr dart::compiler::target::word TypedDataBase_InstanceSize = 24;
+static constexpr dart::compiler::target::word Closure_InstanceSize = 56;
+static constexpr dart::compiler::target::word GrowableObjectArray_InstanceSize =
+    32;
+static constexpr dart::compiler::target::word Instance_InstanceSize = 8;
+static constexpr dart::compiler::target::word LinkedHashMap_InstanceSize = 56;
 #endif  // defined(TARGET_ARCH_DBC) && defined(TARGET_ARCH_IS_64_BIT)
 
 #if defined(TARGET_ARCH_DBC) && defined(TARGET_ARCH_IS_32_BIT)
-static constexpr dart::word ObjectPool_elements_start_offset = 8;
-static constexpr dart::word ObjectPool_element_size = 4;
-static constexpr dart::word Array_kMaxElements = 268435455;
-static constexpr dart::word Array_kMaxNewSpaceElements = 65533;
-static constexpr dart::word ClassTable_kSizeOfClassPairLog2 = 3;
-static constexpr dart::word Instructions_kMonomorphicEntryOffset = 0;
-static constexpr dart::word Instructions_kPolymorphicEntryOffset = 0;
-static constexpr dart::word HeapPage_kBytesPerCardLog2 = 9;
-static constexpr dart::word NativeEntry_kNumCallWrapperArguments = 2;
-static constexpr dart::word String_kMaxElements = 536870911;
-static constexpr dart::word SubtypeTestCache_kFunctionTypeArguments = 4;
-static constexpr dart::word SubtypeTestCache_kInstanceClassIdOrFunction = 1;
-static constexpr dart::word
+static constexpr dart::compiler::target::word ObjectPool_elements_start_offset =
+    8;
+static constexpr dart::compiler::target::word ObjectPool_element_size = 4;
+static constexpr dart::compiler::target::word Array_kMaxElements = 268435455;
+static constexpr dart::compiler::target::word Array_kMaxNewSpaceElements =
+    65533;
+static constexpr dart::compiler::target::word ClassTable_kSizeOfClassPairLog2 =
+    3;
+static constexpr dart::compiler::target::word
+    Instructions_kMonomorphicEntryOffset = 0;
+static constexpr dart::compiler::target::word
+    Instructions_kPolymorphicEntryOffset = 0;
+static constexpr dart::compiler::target::word HeapPage_kBytesPerCardLog2 = 9;
+static constexpr dart::compiler::target::word
+    NativeEntry_kNumCallWrapperArguments = 2;
+static constexpr dart::compiler::target::word String_kMaxElements = 536870911;
+static constexpr dart::compiler::target::word
+    SubtypeTestCache_kFunctionTypeArguments = 4;
+static constexpr dart::compiler::target::word
+    SubtypeTestCache_kInstanceClassIdOrFunction = 1;
+static constexpr dart::compiler::target::word
     SubtypeTestCache_kInstanceDelayedFunctionTypeArguments = 6;
-static constexpr dart::word
+static constexpr dart::compiler::target::word
     SubtypeTestCache_kInstanceParentFunctionTypeArguments = 5;
-static constexpr dart::word SubtypeTestCache_kInstanceTypeArguments = 2;
-static constexpr dart::word SubtypeTestCache_kInstantiatorTypeArguments = 3;
-static constexpr dart::word SubtypeTestCache_kTestEntryLength = 7;
-static constexpr dart::word SubtypeTestCache_kTestResult = 0;
-static constexpr dart::word AbstractType_type_test_stub_entry_point_offset = 4;
-static constexpr dart::word ArgumentsDescriptor_count_offset = 16;
-static constexpr dart::word ArgumentsDescriptor_first_named_entry_offset = 24;
-static constexpr dart::word ArgumentsDescriptor_named_entry_size = 8;
-static constexpr dart::word ArgumentsDescriptor_name_offset = 0;
-static constexpr dart::word ArgumentsDescriptor_position_offset = 4;
-static constexpr dart::word ArgumentsDescriptor_positional_count_offset = 20;
-static constexpr dart::word ArgumentsDescriptor_type_args_len_offset = 12;
-static constexpr dart::word Array_data_offset = 12;
-static constexpr dart::word Array_length_offset = 8;
-static constexpr dart::word Array_tags_offset = 0;
-static constexpr dart::word Array_type_arguments_offset = 4;
-static constexpr dart::word Class_declaration_type_offset = 56;
-static constexpr dart::word Class_num_type_arguments_offset = 102;
-static constexpr dart::word Class_super_type_offset = 44;
-static constexpr dart::word Class_type_arguments_field_offset_in_words_offset =
-    92;
-static constexpr dart::word ClassHeapStats_TraceAllocationMask = 1;
-static constexpr dart::word ClassHeapStats_allocated_since_gc_new_space_offset =
-    48;
-static constexpr dart::word
-    ClassHeapStats_allocated_size_since_gc_new_space_offset = 52;
-static constexpr dart::word ClassHeapStats_state_offset = 160;
-static constexpr dart::word ClassTable_table_offset = 8;
-static constexpr dart::word Closure_context_offset = 20;
-static constexpr dart::word Closure_delayed_type_arguments_offset = 12;
-static constexpr dart::word Closure_function_offset = 16;
-static constexpr dart::word Closure_function_type_arguments_offset = 8;
-static constexpr dart::word Closure_hash_offset = 24;
-static constexpr dart::word Closure_instantiator_type_arguments_offset = 4;
-static constexpr dart::word Code_object_pool_offset = 20;
-static constexpr dart::word Code_saved_instructions_offset = 24;
-static constexpr dart::word Code_owner_offset = 28;
-static constexpr dart::word Context_num_variables_offset = 4;
-static constexpr dart::word Context_parent_offset = 8;
-static constexpr dart::word Double_value_offset = 8;
-static constexpr dart::word ExternalOneByteString_external_data_offset = 12;
-static constexpr dart::word ExternalTwoByteString_external_data_offset = 12;
-static constexpr dart::word Float32x4_value_offset = 8;
-static constexpr dart::word Float64x2_value_offset = 8;
-static constexpr dart::word Field_guarded_cid_offset = 48;
-static constexpr dart::word Field_guarded_list_length_in_object_offset_offset =
+static constexpr dart::compiler::target::word
+    SubtypeTestCache_kInstanceTypeArguments = 2;
+static constexpr dart::compiler::target::word
+    SubtypeTestCache_kInstantiatorTypeArguments = 3;
+static constexpr dart::compiler::target::word
+    SubtypeTestCache_kTestEntryLength = 7;
+static constexpr dart::compiler::target::word SubtypeTestCache_kTestResult = 0;
+static constexpr dart::compiler::target::word
+    AbstractType_type_test_stub_entry_point_offset = 4;
+static constexpr dart::compiler::target::word ArgumentsDescriptor_count_offset =
+    16;
+static constexpr dart::compiler::target::word
+    ArgumentsDescriptor_first_named_entry_offset = 24;
+static constexpr dart::compiler::target::word
+    ArgumentsDescriptor_named_entry_size = 8;
+static constexpr dart::compiler::target::word ArgumentsDescriptor_name_offset =
+    0;
+static constexpr dart::compiler::target::word
+    ArgumentsDescriptor_position_offset = 4;
+static constexpr dart::compiler::target::word
+    ArgumentsDescriptor_positional_count_offset = 20;
+static constexpr dart::compiler::target::word
+    ArgumentsDescriptor_type_args_len_offset = 12;
+static constexpr dart::compiler::target::word Array_data_offset = 12;
+static constexpr dart::compiler::target::word Array_length_offset = 8;
+static constexpr dart::compiler::target::word Array_tags_offset = 0;
+static constexpr dart::compiler::target::word Array_type_arguments_offset = 4;
+static constexpr dart::compiler::target::word Class_declaration_type_offset =
     56;
-static constexpr dart::word Field_guarded_list_length_offset = 28;
-static constexpr dart::word Field_is_nullable_offset = 50;
-static constexpr dart::word Field_static_value_offset = 16;
-static constexpr dart::word Field_kind_bits_offset = 58;
-static constexpr dart::word Function_code_offset = 44;
-static constexpr dart::word Function_entry_point_offset = 4;
-static constexpr dart::word Function_unchecked_entry_point_offset = 8;
-static constexpr dart::word Function_usage_counter_offset = 76;
-static constexpr dart::word GrowableObjectArray_data_offset = 12;
-static constexpr dart::word GrowableObjectArray_length_offset = 8;
-static constexpr dart::word GrowableObjectArray_type_arguments_offset = 4;
-static constexpr dart::word HeapPage_card_table_offset = 20;
-static constexpr dart::word ICData_NumArgsTestedMask = 3;
-static constexpr dart::word ICData_NumArgsTestedShift = 0;
-static constexpr dart::word ICData_arguments_descriptor_offset = 12;
-static constexpr dart::word ICData_entries_offset = 4;
-static constexpr dart::word ICData_owner_offset = 20;
-static constexpr dart::word ICData_state_bits_offset = 28;
-static constexpr dart::word ICData_receivers_static_type_offset = 16;
-static constexpr dart::word Isolate_class_table_offset = 24;
-static constexpr dart::word Isolate_current_tag_offset = 8;
-static constexpr dart::word Isolate_default_tag_offset = 12;
-static constexpr dart::word Isolate_ic_miss_code_offset = 16;
-static constexpr dart::word Isolate_object_store_offset = 20;
-static constexpr dart::word Isolate_single_step_offset = 44;
-static constexpr dart::word Isolate_user_tag_offset = 4;
-static constexpr dart::word LinkedHashMap_data_offset = 16;
-static constexpr dart::word LinkedHashMap_deleted_keys_offset = 24;
-static constexpr dart::word LinkedHashMap_hash_mask_offset = 12;
-static constexpr dart::word LinkedHashMap_index_offset = 8;
-static constexpr dart::word LinkedHashMap_used_data_offset = 20;
-static constexpr dart::word MarkingStackBlock_pointers_offset = 8;
-static constexpr dart::word MarkingStackBlock_top_offset = 4;
-static constexpr dart::word MegamorphicCache_arguments_descriptor_offset = 16;
-static constexpr dart::word MegamorphicCache_buckets_offset = 4;
-static constexpr dart::word MegamorphicCache_mask_offset = 8;
-static constexpr dart::word Mint_value_offset = 8;
-static constexpr dart::word NativeArguments_argc_tag_offset = 4;
-static constexpr dart::word NativeArguments_argv_offset = 8;
-static constexpr dart::word NativeArguments_retval_offset = 12;
-static constexpr dart::word NativeArguments_thread_offset = 0;
-static constexpr dart::word ObjectStore_double_type_offset = 64;
-static constexpr dart::word ObjectStore_int_type_offset = 32;
-static constexpr dart::word ObjectStore_string_type_offset = 80;
-static constexpr dart::word OneByteString_data_offset = 12;
-static constexpr dart::word Pointer_c_memory_address_offset = 8;
-static constexpr dart::word SingleTargetCache_entry_point_offset = 8;
-static constexpr dart::word SingleTargetCache_lower_limit_offset = 12;
-static constexpr dart::word SingleTargetCache_target_offset = 4;
-static constexpr dart::word SingleTargetCache_upper_limit_offset = 14;
-static constexpr dart::word StoreBufferBlock_pointers_offset = 8;
-static constexpr dart::word StoreBufferBlock_top_offset = 4;
-static constexpr dart::word String_hash_offset = 8;
-static constexpr dart::word String_length_offset = 4;
-static constexpr dart::word SubtypeTestCache_cache_offset = 4;
-static constexpr dart::word Thread_AllocateArray_entry_point_offset = 152;
-static constexpr dart::word Thread_active_exception_offset = 444;
-static constexpr dart::word Thread_active_stacktrace_offset = 448;
-static constexpr dart::word Thread_async_stack_trace_offset = 84;
-static constexpr dart::word
+static constexpr dart::compiler::target::word Class_num_type_arguments_offset =
+    102;
+static constexpr dart::compiler::target::word Class_super_type_offset = 44;
+static constexpr dart::compiler::target::word
+    Class_type_arguments_field_offset_in_words_offset = 92;
+static constexpr dart::compiler::target::word
+    ClassHeapStats_TraceAllocationMask = 1;
+static constexpr dart::compiler::target::word
+    ClassHeapStats_allocated_since_gc_new_space_offset = 48;
+static constexpr dart::compiler::target::word
+    ClassHeapStats_allocated_size_since_gc_new_space_offset = 52;
+static constexpr dart::compiler::target::word ClassHeapStats_state_offset = 160;
+static constexpr dart::compiler::target::word ClassTable_table_offset = 8;
+static constexpr dart::compiler::target::word Closure_context_offset = 20;
+static constexpr dart::compiler::target::word
+    Closure_delayed_type_arguments_offset = 12;
+static constexpr dart::compiler::target::word Closure_function_offset = 16;
+static constexpr dart::compiler::target::word
+    Closure_function_type_arguments_offset = 8;
+static constexpr dart::compiler::target::word Closure_hash_offset = 24;
+static constexpr dart::compiler::target::word
+    Closure_instantiator_type_arguments_offset = 4;
+static constexpr dart::compiler::target::word Code_object_pool_offset = 20;
+static constexpr dart::compiler::target::word Code_saved_instructions_offset =
+    24;
+static constexpr dart::compiler::target::word Code_owner_offset = 28;
+static constexpr dart::compiler::target::word Context_num_variables_offset = 4;
+static constexpr dart::compiler::target::word Context_parent_offset = 8;
+static constexpr dart::compiler::target::word Double_value_offset = 8;
+static constexpr dart::compiler::target::word
+    ExternalOneByteString_external_data_offset = 12;
+static constexpr dart::compiler::target::word
+    ExternalTwoByteString_external_data_offset = 12;
+static constexpr dart::compiler::target::word Float32x4_value_offset = 8;
+static constexpr dart::compiler::target::word Float64x2_value_offset = 8;
+static constexpr dart::compiler::target::word Field_guarded_cid_offset = 48;
+static constexpr dart::compiler::target::word
+    Field_guarded_list_length_in_object_offset_offset = 56;
+static constexpr dart::compiler::target::word Field_guarded_list_length_offset =
+    28;
+static constexpr dart::compiler::target::word Field_is_nullable_offset = 50;
+static constexpr dart::compiler::target::word Field_static_value_offset = 16;
+static constexpr dart::compiler::target::word Field_kind_bits_offset = 58;
+static constexpr dart::compiler::target::word Function_code_offset = 44;
+static constexpr dart::compiler::target::word Function_entry_point_offset = 4;
+static constexpr dart::compiler::target::word
+    Function_unchecked_entry_point_offset = 8;
+static constexpr dart::compiler::target::word Function_usage_counter_offset =
+    76;
+static constexpr dart::compiler::target::word GrowableObjectArray_data_offset =
+    12;
+static constexpr dart::compiler::target::word
+    GrowableObjectArray_length_offset = 8;
+static constexpr dart::compiler::target::word
+    GrowableObjectArray_type_arguments_offset = 4;
+static constexpr dart::compiler::target::word HeapPage_card_table_offset = 20;
+static constexpr dart::compiler::target::word ICData_NumArgsTestedMask = 3;
+static constexpr dart::compiler::target::word ICData_NumArgsTestedShift = 0;
+static constexpr dart::compiler::target::word
+    ICData_arguments_descriptor_offset = 12;
+static constexpr dart::compiler::target::word ICData_entries_offset = 4;
+static constexpr dart::compiler::target::word ICData_owner_offset = 20;
+static constexpr dart::compiler::target::word ICData_state_bits_offset = 28;
+static constexpr dart::compiler::target::word
+    ICData_receivers_static_type_offset = 16;
+static constexpr dart::compiler::target::word Isolate_class_table_offset = 24;
+static constexpr dart::compiler::target::word Isolate_current_tag_offset = 8;
+static constexpr dart::compiler::target::word Isolate_default_tag_offset = 12;
+static constexpr dart::compiler::target::word Isolate_ic_miss_code_offset = 16;
+static constexpr dart::compiler::target::word Isolate_object_store_offset = 20;
+static constexpr dart::compiler::target::word Isolate_single_step_offset = 44;
+static constexpr dart::compiler::target::word Isolate_user_tag_offset = 4;
+static constexpr dart::compiler::target::word LinkedHashMap_data_offset = 16;
+static constexpr dart::compiler::target::word
+    LinkedHashMap_deleted_keys_offset = 24;
+static constexpr dart::compiler::target::word LinkedHashMap_hash_mask_offset =
+    12;
+static constexpr dart::compiler::target::word LinkedHashMap_index_offset = 8;
+static constexpr dart::compiler::target::word LinkedHashMap_used_data_offset =
+    20;
+static constexpr dart::compiler::target::word
+    MarkingStackBlock_pointers_offset = 8;
+static constexpr dart::compiler::target::word MarkingStackBlock_top_offset = 4;
+static constexpr dart::compiler::target::word
+    MegamorphicCache_arguments_descriptor_offset = 16;
+static constexpr dart::compiler::target::word MegamorphicCache_buckets_offset =
+    4;
+static constexpr dart::compiler::target::word MegamorphicCache_mask_offset = 8;
+static constexpr dart::compiler::target::word Mint_value_offset = 8;
+static constexpr dart::compiler::target::word NativeArguments_argc_tag_offset =
+    4;
+static constexpr dart::compiler::target::word NativeArguments_argv_offset = 8;
+static constexpr dart::compiler::target::word NativeArguments_retval_offset =
+    12;
+static constexpr dart::compiler::target::word NativeArguments_thread_offset = 0;
+static constexpr dart::compiler::target::word ObjectStore_double_type_offset =
+    64;
+static constexpr dart::compiler::target::word ObjectStore_int_type_offset = 32;
+static constexpr dart::compiler::target::word ObjectStore_string_type_offset =
+    80;
+static constexpr dart::compiler::target::word OneByteString_data_offset = 12;
+static constexpr dart::compiler::target::word Pointer_c_memory_address_offset =
+    8;
+static constexpr dart::compiler::target::word
+    SingleTargetCache_entry_point_offset = 8;
+static constexpr dart::compiler::target::word
+    SingleTargetCache_lower_limit_offset = 12;
+static constexpr dart::compiler::target::word SingleTargetCache_target_offset =
+    4;
+static constexpr dart::compiler::target::word
+    SingleTargetCache_upper_limit_offset = 14;
+static constexpr dart::compiler::target::word StoreBufferBlock_pointers_offset =
+    8;
+static constexpr dart::compiler::target::word StoreBufferBlock_top_offset = 4;
+static constexpr dart::compiler::target::word String_hash_offset = 8;
+static constexpr dart::compiler::target::word String_length_offset = 4;
+static constexpr dart::compiler::target::word SubtypeTestCache_cache_offset = 4;
+static constexpr dart::compiler::target::word
+    Thread_AllocateArray_entry_point_offset = 152;
+static constexpr dart::compiler::target::word Thread_active_exception_offset =
+    444;
+static constexpr dart::compiler::target::word Thread_active_stacktrace_offset =
+    448;
+static constexpr dart::compiler::target::word Thread_async_stack_trace_offset =
+    84;
+static constexpr dart::compiler::target::word
     Thread_auto_scope_native_wrapper_entry_point_offset = 112;
-static constexpr dart::word Thread_bool_false_offset = 104;
-static constexpr dart::word Thread_bool_true_offset = 100;
-static constexpr dart::word Thread_dart_stream_offset = 476;
-static constexpr dart::word Thread_double_abs_address_offset = 132;
-static constexpr dart::word Thread_double_negate_address_offset = 128;
-static constexpr dart::word Thread_end_offset = 60;
-static constexpr dart::word Thread_execution_state_offset = 460;
-static constexpr dart::word Thread_float_absolute_address_offset = 144;
-static constexpr dart::word Thread_float_negate_address_offset = 140;
-static constexpr dart::word Thread_float_not_address_offset = 136;
-static constexpr dart::word Thread_float_zerow_address_offset = 148;
-static constexpr dart::word Thread_global_object_pool_offset = 452;
-static constexpr dart::word Thread_isolate_offset = 48;
-static constexpr dart::word Thread_marking_stack_block_offset = 72;
-static constexpr dart::word Thread_no_scope_native_wrapper_entry_point_offset =
-    108;
-static constexpr dart::word Thread_object_null_offset = 96;
-static constexpr dart::word Thread_predefined_symbols_address_offset = 120;
-static constexpr dart::word Thread_resume_pc_offset = 456;
-static constexpr dart::word Thread_safepoint_state_offset = 464;
-static constexpr dart::word Thread_stack_limit_offset = 36;
-static constexpr dart::word Thread_stack_overflow_flags_offset = 40;
-static constexpr dart::word Thread_store_buffer_block_offset = 68;
-static constexpr dart::word Thread_top_exit_frame_info_offset = 64;
-static constexpr dart::word Thread_top_offset = 56;
-static constexpr dart::word Thread_top_resource_offset = 24;
-static constexpr dart::word Thread_unboxed_int64_runtime_arg_offset = 88;
-static constexpr dart::word Thread_vm_tag_offset = 80;
-static constexpr dart::word Thread_write_barrier_mask_offset = 44;
-static constexpr dart::word Thread_callback_code_offset = 468;
-static constexpr dart::word TimelineStream_enabled_offset = 8;
-static constexpr dart::word TwoByteString_data_offset = 12;
-static constexpr dart::word Type_arguments_offset = 16;
-static constexpr dart::word Type_hash_offset = 20;
-static constexpr dart::word Type_signature_offset = 24;
-static constexpr dart::word Type_type_class_id_offset = 12;
-static constexpr dart::word Type_type_state_offset = 32;
-static constexpr dart::word TypeArguments_instantiations_offset = 4;
-static constexpr dart::word TypeRef_type_offset = 12;
-static constexpr dart::word TypedDataBase_data_field_offset = 4;
-static constexpr dart::word TypedDataBase_length_offset = 8;
-static constexpr dart::word TypedDataView_data_offset = 12;
-static constexpr dart::word TypedDataView_offset_in_bytes_offset = 16;
-static constexpr dart::word TypedData_data_offset = 12;
-static constexpr dart::word UserTag_tag_offset = 8;
-static constexpr dart::word Array_elements_start_offset = 12;
-static constexpr dart::word Array_element_size = 4;
-static constexpr dart::word TypeArguments_elements_start_offset = 16;
-static constexpr dart::word TypeArguments_element_size = 4;
-static constexpr dart::word ClassTable_elements_start_offset = 0;
-static constexpr dart::word ClassTable_element_size = 168;
-static constexpr dart::word ClassTable_class_heap_stats_table_offset = 16;
-static dart::word Code_entry_point_offset[] = {4, 12, 8, 16};
-static dart::word Code_function_entry_point_offset[] = {4, 8};
-static constexpr dart::word Array_header_size = 12;
-static constexpr dart::word Context_header_size = 12;
-static constexpr dart::word Double_InstanceSize = 16;
-static constexpr dart::word Float32x4_InstanceSize = 24;
-static constexpr dart::word Float64x2_InstanceSize = 24;
-static constexpr dart::word Instructions_UnalignedHeaderSize = 16;
-static constexpr dart::word Int32x4_InstanceSize = 24;
-static constexpr dart::word Mint_InstanceSize = 16;
-static constexpr dart::word NativeArguments_StructSize = 16;
-static constexpr dart::word String_InstanceSize = 12;
-static constexpr dart::word TypedData_InstanceSize = 12;
+static constexpr dart::compiler::target::word Thread_bool_false_offset = 104;
+static constexpr dart::compiler::target::word Thread_bool_true_offset = 100;
+static constexpr dart::compiler::target::word Thread_dart_stream_offset = 476;
+static constexpr dart::compiler::target::word Thread_double_abs_address_offset =
+    132;
+static constexpr dart::compiler::target::word
+    Thread_double_negate_address_offset = 128;
+static constexpr dart::compiler::target::word Thread_end_offset = 60;
+static constexpr dart::compiler::target::word Thread_execution_state_offset =
+    460;
+static constexpr dart::compiler::target::word
+    Thread_float_absolute_address_offset = 144;
+static constexpr dart::compiler::target::word
+    Thread_float_negate_address_offset = 140;
+static constexpr dart::compiler::target::word Thread_float_not_address_offset =
+    136;
+static constexpr dart::compiler::target::word
+    Thread_float_zerow_address_offset = 148;
+static constexpr dart::compiler::target::word Thread_global_object_pool_offset =
+    452;
+static constexpr dart::compiler::target::word Thread_isolate_offset = 48;
+static constexpr dart::compiler::target::word
+    Thread_marking_stack_block_offset = 72;
+static constexpr dart::compiler::target::word
+    Thread_no_scope_native_wrapper_entry_point_offset = 108;
+static constexpr dart::compiler::target::word Thread_object_null_offset = 96;
+static constexpr dart::compiler::target::word
+    Thread_predefined_symbols_address_offset = 120;
+static constexpr dart::compiler::target::word Thread_resume_pc_offset = 456;
+static constexpr dart::compiler::target::word Thread_safepoint_state_offset =
+    464;
+static constexpr dart::compiler::target::word Thread_stack_limit_offset = 36;
+static constexpr dart::compiler::target::word
+    Thread_stack_overflow_flags_offset = 40;
+static constexpr dart::compiler::target::word Thread_store_buffer_block_offset =
+    68;
+static constexpr dart::compiler::target::word
+    Thread_top_exit_frame_info_offset = 64;
+static constexpr dart::compiler::target::word Thread_top_offset = 56;
+static constexpr dart::compiler::target::word Thread_top_resource_offset = 24;
+static constexpr dart::compiler::target::word
+    Thread_unboxed_int64_runtime_arg_offset = 88;
+static constexpr dart::compiler::target::word Thread_vm_tag_offset = 80;
+static constexpr dart::compiler::target::word Thread_write_barrier_mask_offset =
+    44;
+static constexpr dart::compiler::target::word Thread_callback_code_offset = 468;
+static constexpr dart::compiler::target::word TimelineStream_enabled_offset = 8;
+static constexpr dart::compiler::target::word TwoByteString_data_offset = 12;
+static constexpr dart::compiler::target::word Type_arguments_offset = 16;
+static constexpr dart::compiler::target::word Type_hash_offset = 20;
+static constexpr dart::compiler::target::word Type_signature_offset = 24;
+static constexpr dart::compiler::target::word Type_type_class_id_offset = 12;
+static constexpr dart::compiler::target::word Type_type_state_offset = 32;
+static constexpr dart::compiler::target::word
+    TypeArguments_instantiations_offset = 4;
+static constexpr dart::compiler::target::word TypeRef_type_offset = 12;
+static constexpr dart::compiler::target::word TypedDataBase_data_field_offset =
+    4;
+static constexpr dart::compiler::target::word TypedDataBase_length_offset = 8;
+static constexpr dart::compiler::target::word TypedDataView_data_offset = 12;
+static constexpr dart::compiler::target::word
+    TypedDataView_offset_in_bytes_offset = 16;
+static constexpr dart::compiler::target::word TypedData_data_offset = 12;
+static constexpr dart::compiler::target::word UserTag_tag_offset = 8;
+static constexpr dart::compiler::target::word Array_elements_start_offset = 12;
+static constexpr dart::compiler::target::word Array_element_size = 4;
+static constexpr dart::compiler::target::word
+    TypeArguments_elements_start_offset = 16;
+static constexpr dart::compiler::target::word TypeArguments_element_size = 4;
+static constexpr dart::compiler::target::word ClassTable_elements_start_offset =
+    0;
+static constexpr dart::compiler::target::word ClassTable_element_size = 168;
+static constexpr dart::compiler::target::word
+    ClassTable_class_heap_stats_table_offset = 16;
+static dart::compiler::target::word Code_entry_point_offset[] = {4, 12, 8, 16};
+static dart::compiler::target::word Code_function_entry_point_offset[] = {4, 8};
+static constexpr dart::compiler::target::word Array_header_size = 12;
+static constexpr dart::compiler::target::word Context_header_size = 12;
+static constexpr dart::compiler::target::word Double_InstanceSize = 16;
+static constexpr dart::compiler::target::word Float32x4_InstanceSize = 24;
+static constexpr dart::compiler::target::word Float64x2_InstanceSize = 24;
+static constexpr dart::compiler::target::word Instructions_UnalignedHeaderSize =
+    16;
+static constexpr dart::compiler::target::word Int32x4_InstanceSize = 24;
+static constexpr dart::compiler::target::word Mint_InstanceSize = 16;
+static constexpr dart::compiler::target::word NativeArguments_StructSize = 16;
+static constexpr dart::compiler::target::word String_InstanceSize = 12;
+static constexpr dart::compiler::target::word TypedData_InstanceSize = 12;
+static constexpr dart::compiler::target::word Object_InstanceSize = 4;
+static constexpr dart::compiler::target::word TypedDataBase_InstanceSize = 12;
+static constexpr dart::compiler::target::word Closure_InstanceSize = 28;
+static constexpr dart::compiler::target::word GrowableObjectArray_InstanceSize =
+    16;
+static constexpr dart::compiler::target::word Instance_InstanceSize = 4;
+static constexpr dart::compiler::target::word LinkedHashMap_InstanceSize = 28;
 #endif  // defined(TARGET_ARCH_DBC) && defined(TARGET_ARCH_IS_32_BIT)
 
 #endif  // RUNTIME_VM_COMPILER_RUNTIME_OFFSETS_EXTRACTED_H_
diff --git a/runtime/vm/compiler/runtime_offsets_list.h b/runtime/vm/compiler/runtime_offsets_list.h
index 6882e1c..007773a 100644
--- a/runtime/vm/compiler/runtime_offsets_list.h
+++ b/runtime/vm/compiler/runtime_offsets_list.h
@@ -262,6 +262,12 @@
   SIZEOF(Mint, InstanceSize, RawMint)                                          \
   SIZEOF(NativeArguments, StructSize, NativeArguments)                         \
   SIZEOF(String, InstanceSize, RawString)                                      \
-  SIZEOF(TypedData, InstanceSize, RawTypedData)
+  SIZEOF(TypedData, InstanceSize, RawTypedData)                                \
+  SIZEOF(Object, InstanceSize, RawObject)                                      \
+  SIZEOF(TypedDataBase, InstanceSize, RawTypedDataBase)                        \
+  SIZEOF(Closure, InstanceSize, RawClosure)                                    \
+  SIZEOF(GrowableObjectArray, InstanceSize, RawGrowableObjectArray)            \
+  SIZEOF(Instance, InstanceSize, RawInstance)                                  \
+  SIZEOF(LinkedHashMap, InstanceSize, RawLinkedHashMap)
 
 #endif  // RUNTIME_VM_COMPILER_RUNTIME_OFFSETS_LIST_H_
diff --git a/runtime/vm/compiler/stub_code_compiler_arm.cc b/runtime/vm/compiler/stub_code_compiler_arm.cc
index 7f4f9e2..bdf0ec4 100644
--- a/runtime/vm/compiler/stub_code_compiler_arm.cc
+++ b/runtime/vm/compiler/stub_code_compiler_arm.cc
@@ -1098,7 +1098,7 @@
   __ StoreToOffset(kWord, R9, THR, target::Thread::vm_tag_offset());
 
   // Load arguments descriptor array into R4, which is passed to Dart code.
-  __ ldr(R4, Address(R1, VMHandles::kOffsetOfRawPtrInHandle));
+  __ ldr(R4, Address(R1, target::VMHandles::kOffsetOfRawPtrInHandle));
 
   // Load number of arguments into R9 and adjust count for type arguments.
   __ ldr(R3,
@@ -1110,7 +1110,7 @@
   __ SmiUntag(R9);
 
   // Compute address of 'arguments array' data area into R2.
-  __ ldr(R2, Address(R2, VMHandles::kOffsetOfRawPtrInHandle));
+  __ ldr(R2, Address(R2, target::VMHandles::kOffsetOfRawPtrInHandle));
   __ AddImmediate(R2, target::Array::data_offset() - kHeapObjectTag);
 
   // Set up arguments for the Dart call.
@@ -1134,7 +1134,7 @@
   } else {
     __ LoadImmediate(PP, 0);  // GC safe value into PP.
   }
-  __ ldr(CODE_REG, Address(R0, VMHandles::kOffsetOfRawPtrInHandle));
+  __ ldr(CODE_REG, Address(R0, target::VMHandles::kOffsetOfRawPtrInHandle));
   __ ldr(R0, FieldAddress(CODE_REG, target::Code::entry_point_offset()));
   __ blx(R0);  // R4 is the arguments descriptor array.
 
@@ -1668,7 +1668,7 @@
   // when the object initialization should be done as a loop or as
   // straight line code.
   const int kInlineInstanceSize = 12;
-  const intptr_t instance_size = target::Class::InstanceSize(cls);
+  const intptr_t instance_size = target::Class::GetInstanceSize(cls);
   ASSERT(instance_size > 0);
   ASSERT(instance_size % target::ObjectAlignment::kObjectAlignment == 0);
   if (is_cls_parameterized) {
diff --git a/runtime/vm/compiler/stub_code_compiler_arm64.cc b/runtime/vm/compiler/stub_code_compiler_arm64.cc
index c431835..31e9286 100644
--- a/runtime/vm/compiler/stub_code_compiler_arm64.cc
+++ b/runtime/vm/compiler/stub_code_compiler_arm64.cc
@@ -1732,7 +1732,7 @@
   // when the object initialization should be done as a loop or as
   // straight line code.
   const int kInlineInstanceSize = 12;
-  const intptr_t instance_size = target::Class::InstanceSize(cls);
+  const intptr_t instance_size = target::Class::GetInstanceSize(cls);
   ASSERT(instance_size > 0);
   if (is_cls_parameterized) {
     __ ldr(kTypeArgumentsReg, Address(SP));
diff --git a/runtime/vm/compiler/stub_code_compiler_ia32.cc b/runtime/vm/compiler/stub_code_compiler_ia32.cc
index f7fdf98..8e59855 100644
--- a/runtime/vm/compiler/stub_code_compiler_ia32.cc
+++ b/runtime/vm/compiler/stub_code_compiler_ia32.cc
@@ -1384,7 +1384,7 @@
   // when the object initialization should be done as a loop or as
   // straight line code.
   const int kInlineInstanceSize = 12;  // In words.
-  const intptr_t instance_size = target::Class::InstanceSize(cls);
+  const intptr_t instance_size = target::Class::GetInstanceSize(cls);
   ASSERT(instance_size > 0);
   if (is_cls_parameterized) {
     __ movl(EDX, Address(ESP, kObjectTypeArgumentsOffset));
diff --git a/runtime/vm/compiler/stub_code_compiler_x64.cc b/runtime/vm/compiler/stub_code_compiler_x64.cc
index 92836b2..77e894f 100644
--- a/runtime/vm/compiler/stub_code_compiler_x64.cc
+++ b/runtime/vm/compiler/stub_code_compiler_x64.cc
@@ -1682,7 +1682,7 @@
   // when the object initialization should be done as a loop or as
   // straight line code.
   const int kInlineInstanceSize = 12;  // In words.
-  const intptr_t instance_size = target::Class::InstanceSize(cls);
+  const intptr_t instance_size = target::Class::GetInstanceSize(cls);
   ASSERT(instance_size > 0);
   __ LoadObject(R9, NullObject());
   if (is_cls_parameterized) {
diff --git a/runtime/vm/constants_kbc.h b/runtime/vm/constants_kbc.h
index 529d96c..811f106 100644
--- a/runtime/vm/constants_kbc.h
+++ b/runtime/vm/constants_kbc.h
@@ -995,6 +995,22 @@
     }
   }
 
+  // The interpreter and this function must agree on the opcodes.
+  DART_FORCE_INLINE static bool IsDebugBreakCheckedOpcode(
+      const KBCInstr* instr) {
+    switch (DecodeOpcode(instr)) {
+      case KernelBytecode::kCheckStack:
+      case KernelBytecode::kDirectCall:
+      case KernelBytecode::kInterfaceCall:
+      case KernelBytecode::kUncheckedInterfaceCall:
+      case KernelBytecode::kDynamicCall:
+      case KernelBytecode::kReturnTOS:
+        return true;
+      default:
+        return false;
+    }
+  }
+
   static const uint8_t kNativeCallToGrowableListArgc = 2;
 
   DART_FORCE_INLINE static uint8_t DecodeArgc_Old(const KBCInstr* ret_addr) {
diff --git a/runtime/vm/dart_api_impl.cc b/runtime/vm/dart_api_impl.cc
index 55eb9ba..4ebdac9 100644
--- a/runtime/vm/dart_api_impl.cc
+++ b/runtime/vm/dart_api_impl.cc
@@ -274,17 +274,6 @@
                        current_func, field_count, num_fields);
 }
 
-Heap::Space SpaceForExternal(Thread* thread, intptr_t size) {
-  Heap* heap = thread->heap();
-  // If 'size' would be a significant fraction of new space, then use old.
-  static const int kExtNewRatio = 16;
-  if (size > (heap->CapacityInWords(Heap::kNew) * kWordSize) / kExtNewRatio) {
-    return Heap::kOld;
-  } else {
-    return Heap::kNew;
-  }
-}
-
 static RawObject* Send0Arg(const Instance& receiver, const String& selector) {
   const intptr_t kTypeArgsLen = 0;
   const intptr_t kNumArgs = 1;
@@ -1234,6 +1223,15 @@
                               static_cast<int64_t>(I->main_port()), I->name()));
 }
 
+DART_EXPORT const char* Dart_IsolateServiceId(Dart_Isolate isolate) {
+  if (isolate == NULL) {
+    FATAL1("%s expects argument 'isolate' to be non-null.", CURRENT_FUNC);
+  }
+  Isolate* I = reinterpret_cast<Isolate*>(isolate);
+  int64_t main_port = static_cast<int64_t>(I->main_port());
+  return OS::SCreate(NULL, "isolates/%" Pd64, main_port);
+}
+
 DART_EXPORT void Dart_EnterIsolate(Dart_Isolate isolate) {
   CHECK_NO_ISOLATE(Isolate::Current());
   // TODO(16615): Validate isolate parameter.
@@ -2518,7 +2516,7 @@
   return Api::NewHandle(
       T,
       String::NewExternal(latin1_array, length, peer, external_allocation_size,
-                          callback, SpaceForExternal(T, length)));
+                          callback, T->heap()->SpaceForExternal(length)));
 }
 
 DART_EXPORT Dart_Handle
@@ -2540,7 +2538,7 @@
   return Api::NewHandle(
       T,
       String::NewExternal(utf16_array, length, peer, external_allocation_size,
-                          callback, SpaceForExternal(T, bytes)));
+                          callback, T->heap()->SpaceForExternal(bytes)));
 }
 
 DART_EXPORT Dart_Handle Dart_StringToCString(Dart_Handle object,
@@ -3424,8 +3422,9 @@
   Zone* zone = thread->zone();
   intptr_t bytes = length * ExternalTypedData::ElementSizeInBytes(cid);
   const ExternalTypedData& result = ExternalTypedData::Handle(
-      zone, ExternalTypedData::New(cid, reinterpret_cast<uint8_t*>(data),
-                                   length, SpaceForExternal(thread, bytes)));
+      zone,
+      ExternalTypedData::New(cid, reinterpret_cast<uint8_t*>(data), length,
+                             thread->heap()->SpaceForExternal(bytes)));
   if (callback != NULL) {
     AllocateFinalizableHandle(thread, result, peer, external_allocation_size,
                               callback);
@@ -6066,7 +6065,8 @@
 
 DART_EXPORT Dart_Handle
 Dart_CreateAppAOTSnapshotAsElf(Dart_StreamingWriteCallback callback,
-                               void* callback_data) {
+                               void* callback_data,
+                               bool strip) {
 #if defined(TARGET_ARCH_IA32)
   return Api::NewError("AOT compilation is not supported on IA32.");
 #elif defined(TARGET_ARCH_DBC)
@@ -6090,8 +6090,12 @@
   NOT_IN_PRODUCT(TimelineDurationScope tds2(T, Timeline::GetIsolateStream(),
                                             "WriteAppAOTSnapshot"));
   StreamingWriteStream elf_stream(2 * MB, callback, callback_data);
+
   Elf* elf = new (Z) Elf(Z, &elf_stream);
-  Dwarf* dwarf = new (Z) Dwarf(Z, nullptr, elf);
+  Dwarf* dwarf = nullptr;
+  if (!strip) {
+    dwarf = new (Z) Dwarf(Z, nullptr, elf);
+  }
 
   BlobImageWriter vm_image_writer(T, &vm_snapshot_instructions_buffer,
                                   ApiReallocate, /* initial_size= */ 2 * MB,
@@ -6109,9 +6113,11 @@
                  writer.VmIsolateSnapshotSize());
   elf->AddROData("_kDartIsolateSnapshotData", isolate_snapshot_data_buffer,
                  writer.IsolateSnapshotSize());
-  // TODO(rmacnak): Generate .debug_frame / .eh_frame / .arm.exidx to
-  // providing unwinding information.
-  dwarf->Write();
+  if (!strip) {
+    // TODO(rmacnak): Generate .debug_frame / .eh_frame / .arm.exidx to
+    // provide unwinding information.
+    dwarf->Write();
+  }
   elf->Finalize();
 
   return Api::Success();
diff --git a/runtime/vm/dart_api_impl_test.cc b/runtime/vm/dart_api_impl_test.cc
index a8c490b..e500239 100644
--- a/runtime/vm/dart_api_impl_test.cc
+++ b/runtime/vm/dart_api_impl_test.cc
@@ -3635,6 +3635,15 @@
   EXPECT(Dart_IsString(debug_name));
 }
 
+TEST_CASE(DartAPI_IsolateServiceID) {
+  Dart_Isolate isolate = Dart_CurrentIsolate();
+  const char* id = Dart_IsolateServiceId(isolate);
+  EXPECT(id != NULL);
+  int64_t main_port = Dart_GetMainPortId();
+  EXPECT_STREQ(ZONE_STR("isolates/%" Pd64, main_port), id);
+  free(const_cast<char*>(id));
+}
+
 static void MyMessageNotifyCallback(Dart_Isolate dest_isolate) {}
 
 VM_UNIT_TEST_CASE(DartAPI_SetMessageCallbacks) {
diff --git a/runtime/vm/debugger.cc b/runtime/vm/debugger.cc
index 639314f..f79f581 100644
--- a/runtime/vm/debugger.cc
+++ b/runtime/vm/debugger.cc
@@ -16,6 +16,7 @@
 #include "vm/deopt_instructions.h"
 #include "vm/flags.h"
 #include "vm/globals.h"
+#include "vm/interpreter.h"
 #include "vm/json_stream.h"
 #include "vm/kernel.h"
 #include "vm/longjump.h"
@@ -1484,7 +1485,7 @@
   jsobj->AddLocation(script, pos);
   jsobj->AddProperty("function", function());
   if (IsInterpreted()) {
-    jsobj->AddProperty("bytecode", bytecode());
+    jsobj->AddProperty("code", bytecode());
   } else {
     jsobj->AddProperty("code", code());
   }
@@ -1528,7 +1529,7 @@
   jsobj->AddLocation(script, pos);
   jsobj->AddProperty("function", function());
   if (IsInterpreted()) {
-    jsobj->AddProperty("bytecode", bytecode());
+    jsobj->AddProperty("code", bytecode());
   } else {
     jsobj->AddProperty("code", code());
   }
@@ -1549,7 +1550,7 @@
   jsobj->AddLocation(script, pos);
   jsobj->AddProperty("function", function());
   if (IsInterpreted()) {
-    jsobj->AddProperty("bytecode", bytecode());
+    jsobj->AddProperty("code", bytecode());
   } else {
     jsobj->AddProperty("code", code());
   }
@@ -1683,7 +1684,7 @@
   if (!is_enabled_) {
     if (IsInterpreted()) {
 #if !defined(DART_PRECOMPILED_RUNTIME)
-      SetBytecodeBreak();
+      SetBytecodeBreakpoint();
 #else
       UNREACHABLE();
 #endif  // !defined(DART_PRECOMPILED_RUNTIME)
@@ -1698,7 +1699,7 @@
   if (is_enabled_) {
     if (IsInterpreted()) {
 #if !defined(DART_PRECOMPILED_RUNTIME)
-      UnsetBytecodeBreak();
+      UnsetBytecodeBreakpoint();
 #else
       UNREACHABLE();
 #endif  // !defined(DART_PRECOMPILED_RUNTIME)
@@ -1910,6 +1911,18 @@
   }
 }
 
+void Debugger::NotifySingleStepping(bool value) const {
+  isolate_->set_single_step(value);
+#if !defined(DART_PRECOMPILED_RUNTIME)
+  // Do not call Interpreter::Current(), which may allocate an interpreter.
+  Interpreter* interpreter = Thread::Current()->interpreter();
+  if (interpreter != nullptr) {
+    // Do not reset is_debugging to false if bytecode debug breaks are enabled.
+    interpreter->set_is_debugging(value || HasEnabledBytecodeBreakpoints());
+  }
+#endif  // !defined(DART_PRECOMPILED_RUNTIME)
+}
+
 ActivationFrame* Debugger::CollectDartFrame(Isolate* isolate,
                                             uword pc,
                                             StackFrame* frame,
@@ -2406,23 +2419,29 @@
   StackFrameIterator iterator(ValidationPolicy::kDontValidateFrames,
                               Thread::Current(),
                               StackFrameIterator::kNoCrossThreadIteration);
-  StackFrame* frame = iterator.NextFrame();
-  while ((frame != NULL) && !frame->IsDartFrame()) {
+  StackFrame* frame;
+  while (true) {
     frame = iterator.NextFrame();
-  }
-  ASSERT(frame != NULL);
+    RELEASE_ASSERT(frame != nullptr);
+    if (!frame->IsDartFrame()) {
+      continue;
+    }
 #if !defined(DART_PRECOMPILED_RUNTIME)
-  if (frame->is_interpreted()) {
-    Bytecode& bytecode = Bytecode::Handle(frame->LookupDartBytecode());
-    ActivationFrame* activation =
-        new ActivationFrame(frame->pc(), frame->fp(), frame->sp(), bytecode);
+    if (frame->is_interpreted()) {
+      Bytecode& bytecode = Bytecode::Handle(frame->LookupDartBytecode());
+      if (bytecode.function() == Function::null()) {
+        continue;  // Skip bytecode stub frame.
+      }
+      ActivationFrame* activation =
+          new ActivationFrame(frame->pc(), frame->fp(), frame->sp(), bytecode);
+      return activation;
+    }
+#endif  // !defined(DART_PRECOMPILED_RUNTIME)
+    Code& code = Code::Handle(frame->LookupDartCode());
+    ActivationFrame* activation = new ActivationFrame(
+        frame->pc(), frame->fp(), frame->sp(), code, Object::null_array(), 0);
     return activation;
   }
-#endif  // !defined(DART_PRECOMPILED_RUNTIME)
-  Code& code = Code::Handle(frame->LookupDartCode());
-  ActivationFrame* activation = new ActivationFrame(
-      frame->pc(), frame->fp(), frame->sp(), code, Object::null_array(), 0);
-  return activation;
 }
 
 DebuggerStackTrace* Debugger::StackTrace() {
@@ -2885,6 +2904,24 @@
   return TokenPosition::kNoSource;
 }
 
+#if !defined(DART_PRECOMPILED_RUNTIME)
+// Find a 'debug break checked' bytecode in the range [pc..end_pc[ and return
+// the pc after it or nullptr.
+static const KBCInstr* FindBreakpointCheckedInstr(const KBCInstr* pc,
+                                                  const KBCInstr* end_pc) {
+  while ((pc < end_pc) && !KernelBytecode::IsDebugBreakCheckedOpcode(pc)) {
+    pc = KernelBytecode::Next(pc);
+  }
+  if (pc < end_pc) {
+    ASSERT(KernelBytecode::IsDebugBreakCheckedOpcode(pc));
+    // The checked debug break pc must point to the next bytecode.
+    return KernelBytecode::Next(pc);
+  }
+  // No 'debug break checked' bytecode in the range.
+  return nullptr;
+}
+#endif  // !defined(DART_PRECOMPILED_RUNTIME)
+
 void Debugger::MakeCodeBreakpointAt(const Function& func,
                                     BreakpointLocation* loc) {
   ASSERT(loc->token_pos_.IsReal());
@@ -2895,24 +2932,45 @@
   if (func.HasBytecode()) {
     Bytecode& bytecode = Bytecode::Handle(func.bytecode());
     ASSERT(!bytecode.IsNull());
-    uword lowest_pc_offset = kUwordMax;
+    const KBCInstr* pc = nullptr;
     if (bytecode.HasSourcePositions()) {
       kernel::BytecodeSourcePositionsIterator iter(Thread::Current()->zone(),
                                                    bytecode);
+      bool check_range = false;
       while (iter.MoveNext()) {
-        if (iter.TokenPos() == loc->token_pos_) {
-          if (iter.PcOffset() < lowest_pc_offset) {
-            lowest_pc_offset = iter.PcOffset();
+        if (check_range) {
+          const KBCInstr* end_pc =
+              reinterpret_cast<const KBCInstr*>(bytecode.PayloadStart()) +
+              iter.PcOffset();
+          check_range = false;
+          // Find a 'debug break checked' bytecode in the range [pc..end_pc[.
+          pc = FindBreakpointCheckedInstr(pc, end_pc);
+          if (pc != nullptr) {
+            // TODO(regis): We may want to find all PCs for a token position,
+            // e.g. in the case of duplicated bytecode in finally clauses.
+            break;
           }
         }
+        if (iter.TokenPos() == loc->token_pos_) {
+          pc = reinterpret_cast<const KBCInstr*>(bytecode.PayloadStart()) +
+               iter.PcOffset();
+          check_range = true;
+        }
+      }
+      if (check_range) {
+        ASSERT(pc != nullptr);
+        // Use the end of the bytecode as the end of the range to check.
+        pc = FindBreakpointCheckedInstr(
+            pc, reinterpret_cast<const KBCInstr*>(bytecode.PayloadStart()) +
+                    bytecode.Size());
       }
     }
-    if (lowest_pc_offset != kUwordMax) {
-      uword lowest_pc = bytecode.PayloadStart() + lowest_pc_offset;
-      CodeBreakpoint* code_bpt = GetCodeBreakpoint(lowest_pc);
+    if (pc != nullptr) {
+      CodeBreakpoint* code_bpt = GetCodeBreakpoint(reinterpret_cast<uword>(pc));
       if (code_bpt == NULL) {
         // No code breakpoint for this code exists; create one.
-        code_bpt = new CodeBreakpoint(bytecode, loc->token_pos_, lowest_pc);
+        code_bpt = new CodeBreakpoint(bytecode, loc->token_pos_,
+                                      reinterpret_cast<uword>(pc));
         RegisterCodeBreakpoint(code_bpt);
       }
       code_bpt->set_bpt_location(loc);
@@ -3575,7 +3633,7 @@
 void Debugger::EnterSingleStepMode() {
   ResetSteppingFramePointers();
   DeoptimizeWorld();
-  isolate_->set_single_step(true);
+  NotifySingleStepping(true);
 }
 
 void Debugger::ResetSteppingFramePointers() {
@@ -3637,7 +3695,7 @@
     // as well.  We need to deoptimize the world in case we are about
     // to call an optimized function.
     DeoptimizeWorld();
-    isolate_->set_single_step(true);
+    NotifySingleStepping(true);
     skip_next_step_ = skip_next_step;
     SetAsyncSteppingFramePointer(stack_trace);
     if (FLAG_verbose_debug) {
@@ -3645,7 +3703,7 @@
     }
   } else if (resume_action_ == kStepOver) {
     DeoptimizeWorld();
-    isolate_->set_single_step(true);
+    NotifySingleStepping(true);
     skip_next_step_ = skip_next_step;
     SetSyncSteppingFramePointer(stack_trace);
     SetAsyncSteppingFramePointer(stack_trace);
@@ -3669,7 +3727,7 @@
     }
     // Fall through to synchronous stepping.
     DeoptimizeWorld();
-    isolate_->set_single_step(true);
+    NotifySingleStepping(true);
     // Find topmost caller that is debuggable.
     for (intptr_t i = 1; i < stack_trace->Length(); i++) {
       ActivationFrame* frame = stack_trace->FrameAt(i);
@@ -3959,7 +4017,7 @@
 void Debugger::SignalPausedEvent(ActivationFrame* top_frame, Breakpoint* bpt) {
   resume_action_ = kContinue;
   ResetSteppingFramePointers();
-  isolate_->set_single_step(false);
+  NotifySingleStepping(false);
   ASSERT(!IsPaused());
   if ((bpt != NULL) && bpt->IsSingleShot()) {
     RemoveBreakpoint(bpt->id());
@@ -4695,7 +4753,7 @@
   SetResumeAction(kContinue);
   stepping_fp_ = 0;
   async_stepping_fp_ = 0;
-  isolate_->set_single_step(false);
+  NotifySingleStepping(false);
 }
 
 BreakpointLocation* Debugger::GetLatentBreakpoint(const String& url,
diff --git a/runtime/vm/debugger.h b/runtime/vm/debugger.h
index e186720..39a2c89 100644
--- a/runtime/vm/debugger.h
+++ b/runtime/vm/debugger.h
@@ -230,8 +230,8 @@
 
   void PatchCode();
   void RestoreCode();
-  void SetBytecodeBreak();
-  void UnsetBytecodeBreak();
+  void SetBytecodeBreakpoint();
+  void UnsetBytecodeBreakpoint();
 
   RawCode* code_;
   RawBytecode* bytecode_;
@@ -552,6 +552,10 @@
     ignore_breakpoints_ = ignore_breakpoints;
   }
 
+  bool HasEnabledBytecodeBreakpoints() const;
+  // Called from the interpreter. Note that pc already points to next bytecode.
+  bool HasBytecodeBreakpointAt(const KBCInstr* next_pc) const;
+
   // Put the isolate into single stepping mode when Dart code next runs.
   //
   // This is used by the vm service to allow the user to step while
@@ -671,6 +675,7 @@
                                      intptr_t requested_column,
                                      TokenPosition exact_token_pos);
   void DeoptimizeWorld();
+  void NotifySingleStepping(bool value) const;
   BreakpointLocation* SetCodeBreakpoints(bool in_bytecode,
                                          BreakpointLocation* loc,
                                          const Script& script,
diff --git a/runtime/vm/debugger_kbc.cc b/runtime/vm/debugger_kbc.cc
index 2bfbb65..c07d8e9 100644
--- a/runtime/vm/debugger_kbc.cc
+++ b/runtime/vm/debugger_kbc.cc
@@ -7,24 +7,47 @@
 
 #include "vm/debugger.h"
 #include "vm/instructions_kbc.h"
+#include "vm/interpreter.h"
 
 namespace dart {
 
 #ifndef PRODUCT
-
-void CodeBreakpoint::SetBytecodeBreak() {
+void CodeBreakpoint::SetBytecodeBreakpoint() {
   ASSERT(!is_enabled_);
-  ASSERT(!Isolate::Current()->is_using_old_bytecode_instructions());
-  // TODO(regis): Register pc_ (or the token pos range including pc_) with the
-  // interpreter as a debug break address.
   is_enabled_ = true;
+  Interpreter::Current()->set_is_debugging(true);
 }
 
-void CodeBreakpoint::UnsetBytecodeBreak() {
+void CodeBreakpoint::UnsetBytecodeBreakpoint() {
   ASSERT(is_enabled_);
-  // TODO(regis): Unregister pc_ (or the token pos range including pc_) with the
-  // interpreter as a debug break address.
   is_enabled_ = false;
+  if (!Isolate::Current()->single_step() &&
+      !Isolate::Current()->debugger()->HasEnabledBytecodeBreakpoints()) {
+    Interpreter::Current()->set_is_debugging(false);
+  }
+}
+
+bool Debugger::HasEnabledBytecodeBreakpoints() const {
+  CodeBreakpoint* cbpt = code_breakpoints_;
+  while (cbpt != nullptr) {
+    if (cbpt->IsEnabled() && cbpt->IsInterpreted()) {
+      return true;
+    }
+    cbpt = cbpt->next();
+  }
+  return false;
+}
+
+bool Debugger::HasBytecodeBreakpointAt(const KBCInstr* next_pc) const {
+  CodeBreakpoint* cbpt = code_breakpoints_;
+  while (cbpt != nullptr) {
+    if ((reinterpret_cast<uword>(next_pc)) == cbpt->pc_ && cbpt->IsEnabled()) {
+      ASSERT(cbpt->IsInterpreted());
+      return true;
+    }
+    cbpt = cbpt->next();
+  }
+  return false;
 }
 #endif  // !PRODUCT
 
diff --git a/runtime/vm/elf.cc b/runtime/vm/elf.cc
index 206ead1..6830f3b 100644
--- a/runtime/vm/elf.cc
+++ b/runtime/vm/elf.cc
@@ -371,15 +371,19 @@
   // Assumed by various offset logic in this file.
   ASSERT(stream_->position() == 0);
 
-  // We don't bother with a separate .shstrtab since all our strings will fit
-  // in a single page.
-  strtab_ = new (zone_) StringTable();
-  strtab_->section_name = strtab_->AddString(".dynstr");
-  AddSection(strtab_);
+  // All our strings would fit in a single page. However, we use separate
+  // .shstrtab and .dynstr to work around a bug in Android's strip utility.
+  shstrtab_ = new (zone_) StringTable();
+  shstrtab_->section_name = shstrtab_->AddString(".shstrtab");
+  AddSection(shstrtab_);
+
+  symstrtab_ = new (zone_) StringTable();
+  symstrtab_->section_name = shstrtab_->AddString(".dynstr");
+  AddSection(symstrtab_);
 
   symtab_ = new (zone_) SymbolTable();
-  symtab_->section_name = strtab_->AddString(".dynsym");
-  symtab_->section_link = strtab_->section_index;
+  symtab_->section_name = shstrtab_->AddString(".dynsym");
+  symtab_->section_link = symstrtab_->section_index;
   AddSection(symtab_);
 
   // dlsym gets confused if a symbol's value is dso offset 0, treating this as a
@@ -413,13 +417,13 @@
 
 intptr_t Elf::AddText(const char* name, const uint8_t* bytes, intptr_t size) {
   ProgramBits* image = new (zone_) ProgramBits(true, true, bytes, size);
-  image->section_name = strtab_->AddString(".text");
+  image->section_name = shstrtab_->AddString(".text");
   AddSection(image);
   AddSegment(image);
 
   Symbol* symbol = new (zone_) Symbol();
   symbol->cstr = name;
-  symbol->name = strtab_->AddString(name);
+  symbol->name = symstrtab_->AddString(name);
   symbol->info = (STB_GLOBAL << 4) | STT_FUNC;
   symbol->section = image->section_index;
   // For shared libraries, this is the offset from the DSO base. For static
@@ -433,13 +437,13 @@
 
 intptr_t Elf::AddROData(const char* name, const uint8_t* bytes, intptr_t size) {
   ProgramBits* image = new (zone_) ProgramBits(true, false, bytes, size);
-  image->section_name = strtab_->AddString(".rodata");
+  image->section_name = shstrtab_->AddString(".rodata");
   AddSection(image);
   AddSegment(image);
 
   Symbol* symbol = new (zone_) Symbol();
   symbol->cstr = name;
-  symbol->name = strtab_->AddString(name);
+  symbol->name = symstrtab_->AddString(name);
   symbol->info = (STB_GLOBAL << 4) | STT_OBJECT;
   symbol->section = image->section_index;
   // For shared libraries, this is the offset from the DSO base. For static
@@ -453,24 +457,25 @@
 
 void Elf::AddDebug(const char* name, const uint8_t* bytes, intptr_t size) {
   ProgramBits* image = new (zone_) ProgramBits(false, false, bytes, size);
-  image->section_name = strtab_->AddString(name);
+  image->section_name = shstrtab_->AddString(name);
   AddSection(image);
 }
 
 void Elf::Finalize() {
-  SymbolHashTable* hash = new (zone_) SymbolHashTable(strtab_, symtab_);
-  hash->section_name = strtab_->AddString(".hash");
+  SymbolHashTable* hash = new (zone_) SymbolHashTable(symstrtab_, symtab_);
+  hash->section_name = shstrtab_->AddString(".hash");
   AddSection(hash);
   AddSegment(hash);
 
   // Before finalizing the string table's memory size:
-  intptr_t name_dynamic = strtab_->AddString(".dynamic");
+  intptr_t name_dynamic = shstrtab_->AddString(".dynamic");
 
   // Finalizes memory size of string and symbol tables.
-  AddSegment(strtab_);
+  AddSegment(shstrtab_);
+  AddSegment(symstrtab_);
   AddSegment(symtab_);
 
-  dynamic_ = new (zone_) DynamicTable(strtab_, symtab_, hash);
+  dynamic_ = new (zone_) DynamicTable(symstrtab_, symtab_, hash);
   dynamic_->section_name = name_dynamic;
   AddSection(dynamic_);
   AddSegment(dynamic_);
@@ -551,7 +556,7 @@
   WriteHalf(segments_.length() + kNumImplicitSegments);
   WriteHalf(kElfSectionTableEntrySize);
   WriteHalf(sections_.length() + kNumInvalidSections);
-  WriteHalf(strtab_->section_index);
+  WriteHalf(shstrtab_->section_index);
 
   ASSERT(stream_->position() == kElfHeaderSize);
 }
diff --git a/runtime/vm/elf.h b/runtime/vm/elf.h
index d49fd62..aed4c66 100644
--- a/runtime/vm/elf.h
+++ b/runtime/vm/elf.h
@@ -74,7 +74,8 @@
   intptr_t section_table_file_size_;
   intptr_t program_table_file_offset_;
   intptr_t program_table_file_size_;
-  StringTable* strtab_;
+  StringTable* shstrtab_;
+  StringTable* symstrtab_;
   SymbolTable* symtab_;
   DynamicTable* dynamic_;
 };
diff --git a/runtime/vm/exceptions.cc b/runtime/vm/exceptions.cc
index 79361ba..f40c90b 100644
--- a/runtime/vm/exceptions.cc
+++ b/runtime/vm/exceptions.cc
@@ -371,15 +371,15 @@
 };
 
 CatchEntryMove CatchEntryMove::ReadFrom(ReadStream* stream) {
-  using Reader = ReadStream::Raw<sizeof(intptr_t), intptr_t>;
-  const intptr_t src = Reader::Read(stream);
-  const intptr_t dest_and_kind = Reader::Read(stream);
+  using Reader = ReadStream::Raw<sizeof(int32_t), int32_t>;
+  const int32_t src = Reader::Read(stream);
+  const int32_t dest_and_kind = Reader::Read(stream);
   return CatchEntryMove(src, dest_and_kind);
 }
 
 #if !defined(DART_PRECOMPILED_RUNTIME)
 void CatchEntryMove::WriteTo(WriteStream* stream) {
-  using Writer = WriteStream::Raw<sizeof(intptr_t), intptr_t>;
+  using Writer = WriteStream::Raw<sizeof(int32_t), int32_t>;
   Writer::Write(stream, src_);
   Writer::Write(stream, dest_and_kind_);
 }
diff --git a/runtime/vm/exceptions.h b/runtime/vm/exceptions.h
index 46b4d68..50d1a8f 100644
--- a/runtime/vm/exceptions.h
+++ b/runtime/vm/exceptions.h
@@ -203,21 +203,21 @@
 #endif
 
  private:
-  CatchEntryMove(intptr_t src, intptr_t dest_and_kind)
+  CatchEntryMove(int32_t src, int32_t dest_and_kind)
       : src_(src), dest_and_kind_(dest_and_kind) {}
 
   // Note: BitField helper does not work with signed values of size that does
   // not match the destination size - thus we don't use BitField for declaring
   // DestinationField and instead encode and decode it manually.
-  using SourceKindField = BitField<intptr_t, SourceKind, 0, 4>;
+  using SourceKindField = BitField<int32_t, SourceKind, 0, 4>;
 
-  static constexpr intptr_t kHalfSourceBits = kBitsPerWord / 2;
-  using LoSourceSlot = BitField<intptr_t, intptr_t, 0, kHalfSourceBits>;
+  static constexpr intptr_t kHalfSourceBits = 16;
+  using LoSourceSlot = BitField<int32_t, int32_t, 0, kHalfSourceBits>;
   using HiSourceSlot =
-      BitField<intptr_t, intptr_t, kHalfSourceBits, kHalfSourceBits>;
+      BitField<int32_t, int32_t, kHalfSourceBits, kHalfSourceBits>;
 
-  intptr_t src_;
-  intptr_t dest_and_kind_;
+  int32_t src_;
+  int32_t dest_and_kind_;
 };
 
 // A sequence of moves that needs to be executed to create a state expected
diff --git a/runtime/vm/finalizable_data.h b/runtime/vm/finalizable_data.h
index f4ae01a..df383d2 100644
--- a/runtime/vm/finalizable_data.h
+++ b/runtime/vm/finalizable_data.h
@@ -15,6 +15,7 @@
   void* data;
   void* peer;
   Dart_WeakPersistentHandleFinalizer callback;
+  Dart_WeakPersistentHandleFinalizer successful_write_callback;
 };
 
 class MessageFinalizableData {
@@ -23,18 +24,24 @@
 
   ~MessageFinalizableData() {
     for (intptr_t i = position_; i < records_.length(); i++) {
-      records_[i].callback(NULL, NULL, records_[i].peer);
+      records_[i].callback(nullptr, nullptr, records_[i].peer);
     }
   }
 
-  void Put(intptr_t external_size,
-           void* data,
-           void* peer,
-           Dart_WeakPersistentHandleFinalizer callback) {
+  /// If [successful_write_callback] is provided, it's invoked when message
+  /// was serialized successfully.
+  /// [callback] is invoked when serialization failed.
+  void Put(
+      intptr_t external_size,
+      void* data,
+      void* peer,
+      Dart_WeakPersistentHandleFinalizer callback,
+      Dart_WeakPersistentHandleFinalizer successful_write_callback = nullptr) {
     FinalizableData finalizable_data;
     finalizable_data.data = data;
     finalizable_data.peer = peer;
     finalizable_data.callback = callback;
+    finalizable_data.successful_write_callback = successful_write_callback;
     records_.Add(finalizable_data);
     external_size_ += external_size;
   }
@@ -44,6 +51,15 @@
     return records_[position_++];
   }
 
+  void SerializationSucceeded() {
+    for (intptr_t i = position_; i < records_.length(); i++) {
+      if (records_[i].successful_write_callback != nullptr) {
+        records_[i].successful_write_callback(nullptr, nullptr,
+                                              records_[i].peer);
+      }
+    }
+  }
+
   intptr_t external_size() const { return external_size_; }
 
  private:
diff --git a/runtime/vm/heap/heap.cc b/runtime/vm/heap/heap.cc
index 2a53317..ca9aa44 100644
--- a/runtime/vm/heap/heap.cc
+++ b/runtime/vm/heap/heap.cc
@@ -43,7 +43,8 @@
       barrier_done_(),
       read_only_(false),
       gc_new_space_in_progress_(false),
-      gc_old_space_in_progress_(false) {
+      gc_old_space_in_progress_(false),
+      gc_on_next_allocation_(false) {
   UpdateGlobalMaxUsed();
   for (int sel = 0; sel < kNumWeakSelectors; sel++) {
     new_weak_tables_[sel] = new WeakTable();
@@ -80,6 +81,7 @@
 
 uword Heap::AllocateNew(intptr_t size) {
   ASSERT(Thread::Current()->no_safepoint_scope_depth() == 0);
+  CollectForDebugging();
   Thread* thread = Thread::Current();
   uword addr = new_space_.TryAllocateInTLAB(thread, size);
   if (addr != 0) {
@@ -125,6 +127,7 @@
 
 uword Heap::AllocateOld(intptr_t size, HeapPage::PageType type) {
   ASSERT(Thread::Current()->no_safepoint_scope_depth() == 0);
+  CollectForDebugging();
   uword addr = old_space_.TryAllocate(size, type);
   if (addr != 0) {
     return addr;
@@ -652,6 +655,17 @@
   old_space_.AddRegionsToObjectSet(set);
 }
 
+void Heap::CollectOnNextAllocation() {
+  AbandonRemainingTLAB(Thread::Current());
+  gc_on_next_allocation_ = true;
+}
+
+void Heap::CollectForDebugging() {
+  if (!gc_on_next_allocation_) return;
+  CollectAllGarbage(kDebugging);
+  gc_on_next_allocation_ = false;
+}
+
 ObjectSet* Heap::CreateAllocatedObjectSet(
     Zone* zone,
     MarkExpectation mark_expectation) const {
@@ -1017,6 +1031,16 @@
 #endif  // !defined(PRODUCT)
 }
 
+Heap::Space Heap::SpaceForExternal(intptr_t size) const {
+  // If 'size' would be a significant fraction of new space, then use old.
+  static const int kExtNewRatio = 16;
+  if (size > (CapacityInWords(Heap::kNew) * kWordSize) / kExtNewRatio) {
+    return Heap::kOld;
+  } else {
+    return Heap::kNew;
+  }
+}
+
 NoHeapGrowthControlScope::NoHeapGrowthControlScope()
     : ThreadStackResource(Thread::Current()) {
   Heap* heap = reinterpret_cast<Isolate*>(isolate())->heap();
diff --git a/runtime/vm/heap/heap.h b/runtime/vm/heap/heap.h
index 837f2c9..6f530b9 100644
--- a/runtime/vm/heap/heap.h
+++ b/runtime/vm/heap/heap.h
@@ -301,6 +301,9 @@
   }
   void MakeTLABIterable(Thread* thread);
   void AbandonRemainingTLAB(Thread* thread);
+  Space SpaceForExternal(intptr_t size) const;
+
+  void CollectOnNextAllocation();
 
  private:
   class GCStats : public ValueObject {
@@ -373,6 +376,9 @@
 
   void AddRegionsToObjectSet(ObjectSet* set) const;
 
+  // Trigger major GC if 'gc_on_next_allocation_' is set.
+  void CollectForDebugging();
+
   Isolate* isolate_;
 
   // The different spaces used for allocation.
@@ -396,6 +402,11 @@
   bool gc_new_space_in_progress_;
   bool gc_old_space_in_progress_;
 
+  // Whether the next heap allocation (new or old) should trigger
+  // CollectAllGarbage. Used within unit tests for testing GC on certain
+  // sensitive codepaths.
+  bool gc_on_next_allocation_;
+
   friend class Become;       // VisitObjectPointers
   friend class GCCompactor;  // VisitObjectPointers
   friend class Precompiler;  // VisitObjects
diff --git a/runtime/vm/image_snapshot.cc b/runtime/vm/image_snapshot.cc
index b3d16c8..fe46279 100644
--- a/runtime/vm/image_snapshot.cc
+++ b/runtime/vm/image_snapshot.cc
@@ -107,7 +107,7 @@
           RawInstructions* instructions = Code::InstructionsOf(code);
           const intptr_t offset = next_text_offset_;
           instructions_.Add(InstructionsData(instructions, code, offset));
-          next_text_offset_ += instructions->HeapSize();
+          next_text_offset_ += SizeInSnapshot(instructions);
           ASSERT(heap_->GetObjectId(instructions) == 0);
           heap_->SetObjectId(instructions, offset);
           break;
@@ -142,7 +142,7 @@
     pair.object = raw_obj;
     pair.offset = offset;
     map->Insert(pair);
-    obj_addr += raw_obj->HeapSize();
+    obj_addr += SizeInSnapshot(raw_obj);
   }
   ASSERT(obj_addr == end_addr);
 }
@@ -175,13 +175,17 @@
 
   offset = next_text_offset_;
   heap_->SetObjectId(instructions, offset);
-  next_text_offset_ += instructions->HeapSize();
+  next_text_offset_ += SizeInSnapshot(instructions);
   instructions_.Add(InstructionsData(instructions, code, offset));
 
   ASSERT(offset != 0);
   return offset;
 }
 
+intptr_t ImageWriter::SizeInSnapshot(RawObject* raw_object) {
+  return raw_object->HeapSize();
+}
+
 bool ImageWriter::GetSharedDataOffsetFor(RawObject* raw_object,
                                          uint32_t* offset) {
   ObjectOffsetPair* pair = shared_objects_.Lookup(raw_object);
@@ -193,9 +197,9 @@
 }
 
 uint32_t ImageWriter::GetDataOffsetFor(RawObject* raw_object) {
-  intptr_t heap_size = raw_object->HeapSize();
+  intptr_t snap_size = SizeInSnapshot(raw_object);
   intptr_t offset = next_data_offset_;
-  next_data_offset_ += heap_size;
+  next_data_offset_ += snap_size;
   objects_.Add(ObjectData(raw_object));
   return offset;
 }
@@ -238,7 +242,7 @@
       js.PrintPropertyStr("c", name);
     }
     js.PrintProperty("n", data.code_->QualifiedName());
-    js.PrintProperty("s", data.insns_->raw()->HeapSize());
+    js.PrintProperty("s", SizeInSnapshot(data.insns_->raw()));
     js.CloseObject();
   }
   js.CloseArray();
@@ -473,7 +477,7 @@
                                             "Instructions",
                                             /*name=*/nullptr);
       profile_writer_->AttributeBytesTo({offset_space_, offset},
-                                        insns.raw()->HeapSize());
+                                        SizeInSnapshot(insns.raw()));
     }
 
     ASSERT(insns.raw()->HeapSize() % sizeof(uint64_t) == 0);
@@ -540,7 +544,7 @@
 
 #ifdef DART_PRECOMPILER
     // Create a label for use by DWARF.
-    if (!code.IsNull()) {
+    if ((dwarf_ != nullptr) && !code.IsNull()) {
       const intptr_t dwarf_index = dwarf_->AddCode(code);
       assembly_stream_.Print(".Lcode%" Pd ":\n", dwarf_index);
     }
@@ -751,7 +755,7 @@
 
 #ifdef DART_PRECOMPILER
     const Code& code = *instructions_[i].code_;
-    if ((elf_ != nullptr) && !code.IsNull()) {
+    if ((elf_ != nullptr) && (dwarf_ != nullptr) && !code.IsNull()) {
       intptr_t segment_offset = instructions_blob_stream_.bytes_written() +
                                 Instructions::HeaderSize();
       dwarf_->AddCode(code, segment_base + segment_offset);
@@ -775,7 +779,8 @@
     beginning += sizeof(uword);
     text_offset += WriteByteSequence(beginning, end);
 
-    ASSERT((text_offset - instr_start) == insns.raw()->HeapSize());
+    ASSERT((text_offset - instr_start) ==
+           ImageWriter::SizeInSnapshot(insns.raw()));
   }
 
 #ifdef DART_PRECOMPILER
diff --git a/runtime/vm/image_snapshot.h b/runtime/vm/image_snapshot.h
index 720d855..f59d946 100644
--- a/runtime/vm/image_snapshot.h
+++ b/runtime/vm/image_snapshot.h
@@ -181,6 +181,8 @@
 
   void TraceInstructions(const Instructions& instructions);
 
+  static intptr_t SizeInSnapshot(RawObject* object);
+
  protected:
   void WriteROData(WriteStream* stream);
   virtual void WriteText(WriteStream* clustered_stream, bool vm) = 0;
diff --git a/runtime/vm/interpreter.cc b/runtime/vm/interpreter.cc
index e815a7f..3d9597e 100644
--- a/runtime/vm/interpreter.cc
+++ b/runtime/vm/interpreter.cc
@@ -381,7 +381,7 @@
 Interpreter* Interpreter::Current() {
   Thread* thread = Thread::Current();
   Interpreter* interpreter = thread->interpreter();
-  if (interpreter == NULL) {
+  if (interpreter == nullptr) {
     TransitionGeneratedToVM transition(thread);
     interpreter = new Interpreter();
     Thread::Current()->set_interpreter(interpreter);
@@ -1167,6 +1167,25 @@
     }                                                                          \
   }
 
+#ifdef PRODUCT
+#define DEBUG_CHECK
+#else
+#define DEBUG_CHECK                                                            \
+  if (is_debugging()) {                                                        \
+    /* Check for debug breakpoint or if single stepping. */                    \
+    if (thread->isolate()->debugger()->HasBytecodeBreakpointAt(pc)) {          \
+      SP[1] = null_value;                                                      \
+      Exit(thread, FP, SP + 2, pc);                                            \
+      NativeArguments args(thread, 0, NULL, SP + 1);                           \
+      INVOKE_RUNTIME(DRT_BreakpointRuntimeHandler, args)                       \
+    } else if (thread->isolate()->single_step()) {                             \
+      Exit(thread, FP, SP + 1, pc);                                            \
+      NativeArguments args(thread, 0, NULL, NULL);                             \
+      INVOKE_RUNTIME(DRT_SingleStepHandler, args);                             \
+    }                                                                          \
+  }
+#endif  // PRODUCT
+
 bool Interpreter::AssertAssignable(Thread* thread,
                                    const KBCInstr* pc,
                                    RawObject** FP,
@@ -1762,6 +1781,7 @@
 
   {
     BYTECODE(CheckStack, A);
+    DEBUG_CHECK;
     {
       // Check the interpreter's own stack limit for actual interpreter's stack
       // overflows, and also the thread's stack limit for scheduled interrupts.
@@ -1956,16 +1976,7 @@
 
   {
     BYTECODE(DirectCall, D_F);
-
-#ifndef PRODUCT
-    // Check if single stepping.
-    if (thread->isolate()->single_step()) {
-      Exit(thread, FP, SP + 1, pc);
-      NativeArguments args(thread, 0, NULL, NULL);
-      INVOKE_RUNTIME(DRT_SingleStepHandler, args);
-    }
-#endif  // !PRODUCT
-
+    DEBUG_CHECK;
     // Invoke target function.
     {
       const uint32_t argc = rF;
@@ -1986,16 +1997,7 @@
 
   {
     BYTECODE(InterfaceCall, D_F);
-
-#ifndef PRODUCT
-    // Check if single stepping.
-    if (thread->isolate()->single_step()) {
-      Exit(thread, FP, SP + 1, pc);
-      NativeArguments args(thread, 0, NULL, NULL);
-      INVOKE_RUNTIME(DRT_SingleStepHandler, args);
-    }
-#endif  // !PRODUCT
-
+    DEBUG_CHECK;
     {
       const uint32_t argc = rF;
       const uint32_t kidx = rD;
@@ -2018,16 +2020,7 @@
 
   {
     BYTECODE(UncheckedInterfaceCall, D_F);
-
-#ifndef PRODUCT
-    // Check if single stepping.
-    if (thread->isolate()->single_step()) {
-      Exit(thread, FP, SP + 1, pc);
-      NativeArguments args(thread, 0, NULL, NULL);
-      INVOKE_RUNTIME(DRT_SingleStepHandler, args);
-    }
-#endif  // !PRODUCT
-
+    DEBUG_CHECK;
     {
       const uint32_t argc = rF;
       const uint32_t kidx = rD;
@@ -2050,16 +2043,7 @@
 
   {
     BYTECODE(DynamicCall, D_F);
-
-#ifndef PRODUCT
-    // Check if single stepping.
-    if (thread->isolate()->single_step()) {
-      Exit(thread, FP, SP + 1, pc);
-      NativeArguments args(thread, 0, NULL, NULL);
-      INVOKE_RUNTIME(DRT_SingleStepHandler, args);
-    }
-#endif  // !PRODUCT
-
+    DEBUG_CHECK;
     {
       const uint32_t argc = rF;
       const uint32_t kidx = rD;
@@ -2275,6 +2259,7 @@
     RawObject* result;  // result to return to the caller.
 
     BYTECODE(ReturnTOS, 0);
+    DEBUG_CHECK;
     result = *SP;
     // Restore caller PC.
     pc = SavedCallerPC(FP);
diff --git a/runtime/vm/interpreter.h b/runtime/vm/interpreter.h
index 7001203..a47eecc 100644
--- a/runtime/vm/interpreter.h
+++ b/runtime/vm/interpreter.h
@@ -122,6 +122,11 @@
   void VisitObjectPointers(ObjectPointerVisitor* visitor);
   void MajorGC() { lookup_cache_.Clear(); }
 
+#ifndef PRODUCT
+  void set_is_debugging(bool value) { is_debugging_ = value; }
+  bool is_debugging() const { return is_debugging_; }
+#endif  // !PRODUCT
+
  private:
   uintptr_t* stack_;
   uword stack_base_;
@@ -274,6 +279,10 @@
     last_setjmp_buffer_ = buffer;
   }
 
+#ifndef PRODUCT
+  bool is_debugging_;
+#endif  // !PRODUCT
+
   friend class InterpreterSetjmpBuffer;
   DISALLOW_COPY_AND_ASSIGN(Interpreter);
 };
diff --git a/runtime/vm/isolate.cc b/runtime/vm/isolate.cc
index 028c1bc..e68d40c 100644
--- a/runtime/vm/isolate.cc
+++ b/runtime/vm/isolate.cc
@@ -1351,7 +1351,8 @@
 
 bool Isolate::AddResumeCapability(const Capability& capability) {
   // Ensure a limit for the number of resume capabilities remembered.
-  static const intptr_t kMaxResumeCapabilities = kSmiMax / (6 * kWordSize);
+  static const intptr_t kMaxResumeCapabilities =
+      compiler::target::kSmiMax / (6 * kWordSize);
 
   const GrowableObjectArray& caps = GrowableObjectArray::Handle(
       current_zone(), object_store()->resume_capabilities());
@@ -1402,7 +1403,8 @@
 void Isolate::AddExitListener(const SendPort& listener,
                               const Instance& response) {
   // Ensure a limit for the number of listeners remembered.
-  static const intptr_t kMaxListeners = kSmiMax / (12 * kWordSize);
+  static const intptr_t kMaxListeners =
+      compiler::target::kSmiMax / (12 * kWordSize);
 
   const GrowableObjectArray& listeners = GrowableObjectArray::Handle(
       current_zone(), object_store()->exit_listeners());
@@ -1469,7 +1471,8 @@
 
 void Isolate::AddErrorListener(const SendPort& listener) {
   // Ensure a limit for the number of listeners remembered.
-  static const intptr_t kMaxListeners = kSmiMax / (6 * kWordSize);
+  static const intptr_t kMaxListeners =
+      compiler::target::kSmiMax / (6 * kWordSize);
 
   const GrowableObjectArray& listeners = GrowableObjectArray::Handle(
       current_zone(), object_store()->error_listeners());
diff --git a/runtime/vm/kernel.cc b/runtime/vm/kernel.cc
index 703a495..ac4a5c7 100644
--- a/runtime/vm/kernel.cc
+++ b/runtime/vm/kernel.cc
@@ -17,25 +17,6 @@
 namespace dart {
 namespace kernel {
 
-bool FieldHasFunctionLiteralInitializer(const Field& field,
-                                        TokenPosition* start,
-                                        TokenPosition* end) {
-  Zone* zone = Thread::Current()->zone();
-  const Script& script = Script::Handle(zone, field.Script());
-
-  TranslationHelper translation_helper(Thread::Current());
-  translation_helper.InitFromScript(script);
-
-  KernelReaderHelper kernel_reader_helper(
-      zone, &translation_helper, Script::Handle(zone, field.Script()),
-      ExternalTypedData::Handle(zone, field.KernelData()),
-      field.KernelDataProgramOffset());
-  kernel_reader_helper.SetOffset(field.kernel_offset());
-  kernel::FieldHelper field_helper(&kernel_reader_helper);
-  field_helper.ReadUntilExcluding(kernel::FieldHelper::kEnd, true);
-  return field_helper.FieldHasFunctionLiteralInitializer(start, end);
-}
-
 KernelLineStartsReader::KernelLineStartsReader(
     const dart::TypedData& line_starts_data,
     dart::Zone* zone)
@@ -672,19 +653,19 @@
   TranslationHelper translation_helper(thread);
   translation_helper.InitFromScript(script);
 
-  KernelReaderHelper reader_helper(
-      zone, &translation_helper, script,
-      ExternalTypedData::Handle(zone, function.KernelData()),
-      function.KernelDataProgramOffset());
-
   if (function.is_declared_in_bytecode()) {
-    BytecodeReaderHelper bytecode_reader_helper(&reader_helper, nullptr,
+    BytecodeReaderHelper bytecode_reader_helper(&translation_helper, nullptr,
                                                 nullptr);
     bytecode_reader_helper.ReadParameterCovariance(function, is_covariant,
                                                    is_generic_covariant_impl);
     return;
   }
 
+  KernelReaderHelper reader_helper(
+      zone, &translation_helper, script,
+      ExternalTypedData::Handle(zone, function.KernelData()),
+      function.KernelDataProgramOffset());
+
   reader_helper.SetOffset(function.kernel_offset());
   reader_helper.ReadUntilFunctionNode();
 
diff --git a/runtime/vm/kernel.h b/runtime/vm/kernel.h
index 0de9d5d..4e66b89 100644
--- a/runtime/vm/kernel.h
+++ b/runtime/vm/kernel.h
@@ -187,10 +187,6 @@
   DISALLOW_COPY_AND_ASSIGN(KernelLineStartsReader);
 };
 
-bool FieldHasFunctionLiteralInitializer(const Field& field,
-                                        TokenPosition* start,
-                                        TokenPosition* end);
-
 void CollectTokenPositionsFor(const Script& script);
 
 RawObject* EvaluateMetadata(const Field& metadata_field,
diff --git a/runtime/vm/kernel_loader.cc b/runtime/vm/kernel_loader.cc
index 4186f23..b5001d1 100644
--- a/runtime/vm/kernel_loader.cc
+++ b/runtime/vm/kernel_loader.cc
@@ -965,13 +965,6 @@
       return;
     }
   }
-  if (FLAG_enable_interpreter || FLAG_use_bytecode_compiler) {
-    if (bytecode_metadata_helper_.HasBytecode(field.kernel_offset() +
-                                              library_kernel_offset_)) {
-      field.set_has_initializer(true);
-      return;
-    }
-  }
   field.set_has_initializer(false);
 }
 
@@ -1066,8 +1059,8 @@
   Class& toplevel_class =
       Class::Handle(Z, Class::New(library, Symbols::TopLevel(), script,
                                   TokenPosition::kNoSource, register_class));
+  toplevel_class.set_is_declaration_loaded();
   toplevel_class.set_is_type_finalized();
-  toplevel_class.set_is_cycle_free();
   library.set_toplevel_class(toplevel_class);
 
   library_helper.ReadUntilExcluding(LibraryHelper::kDependencies);
@@ -1386,6 +1379,8 @@
   if (class_helper->is_transformed_mixin_application()) {
     klass->set_is_transformed_mixin_application();
   }
+
+  klass->set_is_declaration_loaded();
 }
 
 void KernelLoader::LoadClass(const Library& library,
@@ -1438,10 +1433,9 @@
       helper_.ReadListLength();  // read type_parameters list length.
 
   ActiveClassScope active_class_scope(&active_class_, out_class);
-  if (!out_class->is_cycle_free()) {
+  if (!out_class->is_declaration_loaded()) {
     LoadPreliminaryClass(&class_helper, type_parameter_counts);
   } else {
-    // do not use type parameters with cycle_free
     ASSERT(type_parameter_counts == 0);
     class_helper.SetJustRead(ClassHelper::kTypeParameters);
   }
@@ -2071,12 +2065,6 @@
   if (field_helper->IsStatic()) {
     bool has_initializer = (tag == kSomething);
 
-    if (FLAG_enable_interpreter || FLAG_use_bytecode_compiler) {
-      has_initializer = has_initializer ||
-                        bytecode_metadata_helper_.HasBytecode(
-                            field.kernel_offset() + library_kernel_offset_);
-    }
-
     if (!has_initializer) {
       // Static fields without an initializer are implicitly initialized to
       // null. We do not need a getter.
diff --git a/runtime/vm/lockers.h b/runtime/vm/lockers.h
index 8cce8c3..de62b6c 100644
--- a/runtime/vm/lockers.h
+++ b/runtime/vm/lockers.h
@@ -46,7 +46,11 @@
 class MutexLocker : public ValueObject {
  public:
   explicit MutexLocker(Mutex* mutex, bool no_safepoint_scope = true)
-      : mutex_(mutex), no_safepoint_scope_(no_safepoint_scope) {
+      :
+#if defined(DEBUG)
+        no_safepoint_scope_(no_safepoint_scope),
+#endif
+        mutex_(mutex) {
     ASSERT(mutex != NULL);
 #if defined(DEBUG)
     if (no_safepoint_scope_) {
@@ -88,8 +92,8 @@
   }
 
  private:
+  DEBUG_ONLY(bool no_safepoint_scope_;)
   Mutex* const mutex_;
-  bool no_safepoint_scope_;
 
   DISALLOW_COPY_AND_ASSIGN(MutexLocker);
 };
diff --git a/runtime/vm/native_api_impl.cc b/runtime/vm/native_api_impl.cc
index df1859d..c225bff 100644
--- a/runtime/vm/native_api_impl.cc
+++ b/runtime/vm/native_api_impl.cc
@@ -237,4 +237,17 @@
 #endif  // defined(DART_PRECOMPILED_RUNTIME)
 }
 
+DART_EXPORT void Dart_ExecuteInternalCommand(const char* command) {
+  if (!FLAG_enable_testing_pragmas) return;
+
+  TransitionNativeToVM _(Thread::Current());
+  if (!strcmp(command, "gc-on-next-allocation")) {
+    Isolate::Current()->heap()->CollectOnNextAllocation();
+  } else if (!strcmp(command, "gc-now")) {
+    Isolate::Current()->heap()->CollectAllGarbage(Heap::kDebugging);
+  } else {
+    UNREACHABLE();
+  }
+}
+
 }  // namespace dart
diff --git a/runtime/vm/native_symbol_fuchsia.cc b/runtime/vm/native_symbol_fuchsia.cc
index f81220e..70aa0b5 100644
--- a/runtime/vm/native_symbol_fuchsia.cc
+++ b/runtime/vm/native_symbol_fuchsia.cc
@@ -79,7 +79,7 @@
 
   NativeSymbols* next_;
   const char* const dso_name_;
-  uint32_t num_entries_;
+  intptr_t num_entries_;
   Entry* entries_;
   const char* name_table_;
 
diff --git a/runtime/vm/object.cc b/runtime/vm/object.cc
index 08b8a5f..f914e28 100644
--- a/runtime/vm/object.cc
+++ b/runtime/vm/object.cc
@@ -533,12 +533,10 @@
     cls.set_id(Class::kClassId);
     cls.set_state_bits(0);
     cls.set_is_finalized();
+    cls.set_is_declaration_loaded();
     cls.set_is_type_finalized();
-    cls.set_is_cycle_free();
     cls.set_type_arguments_field_offset_in_words(Class::kNoTypeArguments);
     cls.set_num_type_arguments(0);
-    cls.set_num_own_type_arguments(0);
-    cls.set_has_pragma(false);
     cls.set_num_native_fields(0);
     cls.InitEmptyFields();
     isolate->RegisterClass(cls);
@@ -547,24 +545,21 @@
   // Allocate and initialize the null class.
   cls = Class::New<Instance>(kNullCid);
   cls.set_num_type_arguments(0);
-  cls.set_num_own_type_arguments(0);
   isolate->object_store()->set_null_class(cls);
 
   // Allocate and initialize the free list element class.
   cls = Class::New<FreeListElement::FakeInstance>(kFreeListElement);
   cls.set_num_type_arguments(0);
-  cls.set_num_own_type_arguments(0);
   cls.set_is_finalized();
+  cls.set_is_declaration_loaded();
   cls.set_is_type_finalized();
-  cls.set_is_cycle_free();
 
   // Allocate and initialize the forwarding corpse class.
   cls = Class::New<ForwardingCorpse::FakeInstance>(kForwardingCorpse);
   cls.set_num_type_arguments(0);
-  cls.set_num_own_type_arguments(0);
   cls.set_is_finalized();
+  cls.set_is_declaration_loaded();
   cls.set_is_type_finalized();
-  cls.set_is_cycle_free();
 
   // Allocate and initialize the sentinel values of Null class.
   {
@@ -688,12 +683,10 @@
   isolate->object_store()->set_array_class(cls);
   cls.set_type_arguments_field_offset(Array::type_arguments_offset());
   cls.set_num_type_arguments(1);
-  cls.set_num_own_type_arguments(1);
   cls = Class::New<Array>(kImmutableArrayCid);
   isolate->object_store()->set_immutable_array_class(cls);
   cls.set_type_arguments_field_offset(Array::type_arguments_offset());
   cls.set_num_type_arguments(1);
-  cls.set_num_own_type_arguments(1);
   cls = Class::New<GrowableObjectArray>();
   isolate->object_store()->set_growable_object_array_class(cls);
   cls.set_type_arguments_field_offset(
@@ -830,24 +823,22 @@
   cls = Class::New<Instance>(kDynamicCid);
   cls.set_is_abstract();
   cls.set_num_type_arguments(0);
-  cls.set_num_own_type_arguments(0);
   cls.set_is_finalized();
+  cls.set_is_declaration_loaded();
   cls.set_is_type_finalized();
-  cls.set_is_cycle_free();
   dynamic_class_ = cls.raw();
 
   cls = Class::New<Instance>(kVoidCid);
   cls.set_num_type_arguments(0);
-  cls.set_num_own_type_arguments(0);
   cls.set_is_finalized();
+  cls.set_is_declaration_loaded();
   cls.set_is_type_finalized();
-  cls.set_is_cycle_free();
   void_class_ = cls.raw();
 
   cls = Class::New<Type>();
   cls.set_is_finalized();
+  cls.set_is_declaration_loaded();
   cls.set_is_type_finalized();
-  cls.set_is_cycle_free();
 
   cls = dynamic_class_;
   *dynamic_type_ = Type::NewNonParameterizedType(cls);
@@ -1527,6 +1518,11 @@
     RegisterPrivateClass(cls, Symbols::_SendPortImpl(), isolate_lib);
     pending_classes.Add(cls);
 
+    cls = Class::New<TransferableTypedData>();
+    RegisterPrivateClass(cls, Symbols::_TransferableTypedDataImpl(),
+                         isolate_lib);
+    pending_classes.Add(cls);
+
     const Class& stacktrace_cls = Class::Handle(zone, Class::New<StackTrace>());
     RegisterPrivateClass(stacktrace_cls, Symbols::_StackTrace(), core_lib);
     pending_classes.Add(stacktrace_cls);
@@ -1546,7 +1542,6 @@
     object_store->set_object_class(cls);
     cls.set_name(Symbols::Object());
     cls.set_num_type_arguments(0);
-    cls.set_num_own_type_arguments(0);
     cls.set_is_prefinalized();
     core_lib.AddClass(cls);
     pending_classes.Add(cls);
@@ -1561,7 +1556,6 @@
     cls = Class::New<Instance>(kNullCid);
     object_store->set_null_class(cls);
     cls.set_num_type_arguments(0);
-    cls.set_num_own_type_arguments(0);
     cls.set_is_prefinalized();
     RegisterClass(cls, Symbols::Null(), core_lib);
     pending_classes.Add(cls);
@@ -1604,7 +1598,6 @@
     // Class that represents the Dart class _Closure and C++ class Closure.
     cls = Class::New<Closure>();
     object_store->set_closure_class(cls);
-    cls.ResetFinalization();  // To calculate field offsets from Dart source.
     RegisterPrivateClass(cls, Symbols::_Closure(), core_lib);
     pending_classes.Add(cls);
 
@@ -1645,7 +1638,6 @@
     object_store->set_linked_hash_map_class(cls);
     cls.set_type_arguments_field_offset(LinkedHashMap::type_arguments_offset());
     cls.set_num_type_arguments(2);
-    cls.set_num_own_type_arguments(0);
     RegisterPrivateClass(cls, Symbols::_LinkedHashMap(), lib);
     pending_classes.Add(cls);
 
@@ -1719,7 +1711,6 @@
     cls = Class::New<Instance>(kIllegalCid);
     RegisterClass(cls, Symbols::Float32x4(), lib);
     cls.set_num_type_arguments(0);
-    cls.set_num_own_type_arguments(0);
     cls.set_is_prefinalized();
     type = Type::NewNonParameterizedType(cls);
     object_store->set_float32x4_type(type);
@@ -1732,7 +1723,6 @@
     cls = Class::New<Instance>(kIllegalCid);
     RegisterClass(cls, Symbols::Int32x4(), lib);
     cls.set_num_type_arguments(0);
-    cls.set_num_own_type_arguments(0);
     cls.set_is_prefinalized();
     type = Type::NewNonParameterizedType(cls);
     object_store->set_int32x4_type(type);
@@ -1745,7 +1735,6 @@
     cls = Class::New<Instance>(kIllegalCid);
     RegisterClass(cls, Symbols::Float64x2(), lib);
     cls.set_num_type_arguments(0);
-    cls.set_num_own_type_arguments(0);
     cls.set_is_prefinalized();
     type = Type::NewNonParameterizedType(cls);
     object_store->set_float64x2_type(type);
@@ -1759,7 +1748,6 @@
     // Note that this class is implemented by Dart class _AbstractType.
     cls = Class::New<Instance>(kIllegalCid);
     cls.set_num_type_arguments(0);
-    cls.set_num_own_type_arguments(0);
     cls.set_is_prefinalized();
     RegisterClass(cls, Symbols::Type(), core_lib);
     pending_classes.Add(cls);
@@ -1769,7 +1757,6 @@
     // Abstract class that represents the Dart class Function.
     cls = Class::New<Instance>(kIllegalCid);
     cls.set_num_type_arguments(0);
-    cls.set_num_own_type_arguments(0);
     cls.set_is_prefinalized();
     RegisterClass(cls, Symbols::Function(), core_lib);
     pending_classes.Add(cls);
@@ -1785,7 +1772,6 @@
     cls = Class::New<Instance>(kIllegalCid);
     RegisterClass(cls, Symbols::Int(), core_lib);
     cls.set_num_type_arguments(0);
-    cls.set_num_own_type_arguments(0);
     cls.set_is_prefinalized();
     pending_classes.Add(cls);
     type = Type::NewNonParameterizedType(cls);
@@ -1794,7 +1780,6 @@
     cls = Class::New<Instance>(kIllegalCid);
     RegisterClass(cls, Symbols::Double(), core_lib);
     cls.set_num_type_arguments(0);
-    cls.set_num_own_type_arguments(0);
     cls.set_is_prefinalized();
     pending_classes.Add(cls);
     type = Type::NewNonParameterizedType(cls);
@@ -1804,7 +1789,6 @@
     cls = Class::New<Instance>(kIllegalCid);
     RegisterClass(cls, name, core_lib);
     cls.set_num_type_arguments(0);
-    cls.set_num_own_type_arguments(0);
     cls.set_is_prefinalized();
     pending_classes.Add(cls);
     type = Type::NewNonParameterizedType(cls);
@@ -1880,7 +1864,6 @@
 
     cls = Class::New<Instance>(kFfiNativeTypeCid);
     cls.set_num_type_arguments(0);
-    cls.set_num_own_type_arguments(0);
     cls.set_is_prefinalized();
     pending_classes.Add(cls);
     object_store->set_ffi_native_type_class(cls);
@@ -1889,7 +1872,6 @@
 #define REGISTER_FFI_TYPE_MARKER(clazz)                                        \
   cls = Class::New<Instance>(kFfi##clazz##Cid);                                \
   cls.set_num_type_arguments(0);                                               \
-  cls.set_num_own_type_arguments(0);                                           \
   cls.set_is_prefinalized();                                                   \
   pending_classes.Add(cls);                                                    \
   RegisterClass(cls, Symbols::Ffi##clazz(), lib);
@@ -1899,7 +1881,6 @@
     cls = Class::New<Instance>(kFfiNativeFunctionCid);
     cls.set_type_arguments_field_offset(Pointer::type_arguments_offset());
     cls.set_num_type_arguments(1);
-    cls.set_num_own_type_arguments(1);
     cls.set_is_prefinalized();
     pending_classes.Add(cls);
     RegisterClass(cls, Symbols::FfiNativeFunction(), lib);
@@ -2060,6 +2041,8 @@
 
     cls = Class::New<MirrorReference>();
     cls = Class::New<UserTag>();
+
+    cls = Class::New<TransferableTypedData>();
   }
   return Error::null();
 }
@@ -2301,16 +2284,16 @@
   COMPILE_ASSERT((FakeObject::kClassId != kInstanceCid));
   result.set_id(FakeObject::kClassId);
   result.set_num_type_arguments(0);
-  result.set_num_own_type_arguments(0);
-  result.set_has_pragma(false);
   result.set_num_native_fields(0);
   result.set_state_bits(0);
   if ((FakeObject::kClassId < kInstanceCid) ||
       (FakeObject::kClassId == kTypeArgumentsCid)) {
     // VM internal classes are done. There is no finalization needed or
     // possible in this case.
+    result.set_is_declaration_loaded();
+    result.set_is_type_finalized();
     result.set_is_finalized();
-  } else {
+  } else if (FakeObject::kClassId != kClosureCid) {
     // VM backed classes are almost ready: run checks and resolve class
     // references, but do not recompute size.
     result.set_is_prefinalized();
@@ -2337,25 +2320,8 @@
   StoreNonPointer(&raw_ptr()->num_type_arguments_, value);
 }
 
-void Class::set_num_own_type_arguments(intptr_t value) const {
-  if (!Utils::IsUint(kNumOwnTypeArgumentsSize, value)) {
-    ReportTooManyTypeArguments(*this);
-  }
-  StoreNonPointer(
-      &raw_ptr()->has_pragma_and_num_own_type_arguments_,
-      NumOwnTypeArguments::update(
-          value, raw_ptr()->has_pragma_and_num_own_type_arguments_));
-}
-
-void Class::set_has_pragma_and_num_own_type_arguments(uint16_t value) const {
-  StoreNonPointer(&raw_ptr()->has_pragma_and_num_own_type_arguments_, value);
-}
-
 void Class::set_has_pragma(bool value) const {
-  StoreNonPointer(
-      &raw_ptr()->has_pragma_and_num_own_type_arguments_,
-      HasPragmaBit::update(value,
-                           raw_ptr()->has_pragma_and_num_own_type_arguments_));
+  set_state_bits(HasPragmaBit::update(value, raw_ptr()->state_bits_));
 }
 
 // Initialize class fields of type Array with empty array.
@@ -2605,7 +2571,7 @@
 }
 
 void Class::set_state_bits(intptr_t bits) const {
-  StoreNonPointer(&raw_ptr()->state_bits_, static_cast<uint16_t>(bits));
+  StoreNonPointer(&raw_ptr()->state_bits_, static_cast<uint32_t>(bits));
 }
 
 void Class::set_library(const Library& value) const {
@@ -2613,8 +2579,6 @@
 }
 
 void Class::set_type_parameters(const TypeArguments& value) const {
-  ASSERT((num_own_type_arguments() == kUnknownNumTypeArguments) ||
-         is_prefinalized());
   ASSERT((num_type_arguments() == kUnknownNumTypeArguments) ||
          is_prefinalized());
   StorePointer(&raw_ptr()->type_parameters_, value.raw());
@@ -2635,39 +2599,45 @@
   return type_params.Length();
 }
 
-intptr_t Class::NumOwnTypeArguments() const {
-  // Return cached value if already calculated.
-  if (num_own_type_arguments() != kUnknownNumTypeArguments) {
-    return num_own_type_arguments();
-  }
+intptr_t Class::ComputeNumTypeArguments() const {
+  ASSERT(is_declaration_loaded());
   Thread* thread = Thread::Current();
-  Isolate* isolate = thread->isolate();
   Zone* zone = thread->zone();
+  Isolate* isolate = thread->isolate();
   const intptr_t num_type_params = NumTypeParameters();
-  if ((num_type_params == 0) || (super_type() == AbstractType::null()) ||
+
+  if ((super_type() == AbstractType::null()) ||
       (super_type() == isolate->object_store()->object_type())) {
-    set_num_own_type_arguments(num_type_params);
     return num_type_params;
   }
-  const AbstractType& sup_type = AbstractType::Handle(zone, super_type());
-  const TypeArguments& sup_type_args =
-      TypeArguments::Handle(zone, sup_type.arguments());
+
+  const auto& sup_type = AbstractType::Handle(zone, super_type());
+  ASSERT(sup_type.IsType());
+
+  const auto& sup_class = Class::Handle(zone, sup_type.type_class());
+  ASSERT(!sup_class.IsTypedefClass());
+
+  const intptr_t sup_class_num_type_args = sup_class.NumTypeArguments();
+  if (num_type_params == 0) {
+    return sup_class_num_type_args;
+  }
+
+  const auto& sup_type_args = TypeArguments::Handle(zone, sup_type.arguments());
   if (sup_type_args.IsNull()) {
     // The super type is raw or the super class is non generic.
     // In either case, overlapping is not possible.
-    set_num_own_type_arguments(num_type_params);
-    return num_type_params;
+    return sup_class_num_type_args + num_type_params;
   }
-  const intptr_t num_sup_type_args = sup_type_args.Length();
+
+  const intptr_t sup_type_args_length = sup_type_args.Length();
   // At this point, the super type may or may not be finalized. In either case,
   // the result of this function must remain the same.
   // The value of num_sup_type_args may increase when the super type is
-  // finalized, but the last num_sup_type_args type arguments will not be
+  // finalized, but the last [sup_type_args_length] type arguments will not be
   // modified by finalization, only shifted to higher indices in the vector.
   // The super type may not even be resolved yet. This is not necessary, since
   // we only check for matching type parameters, which are resolved by default.
-  const TypeArguments& type_params =
-      TypeArguments::Handle(zone, type_parameters());
+  const auto& type_params = TypeArguments::Handle(zone, type_parameters());
   // Determine the maximum overlap of a prefix of the vector consisting of the
   // type parameters of this class with a suffix of the vector consisting of the
   // type arguments of the super type of this class.
@@ -2676,58 +2646,38 @@
   // Attempt to overlap the whole vector of type parameters; reduce the size
   // of the vector (keeping the first type parameter) until it fits or until
   // its size is zero.
-  TypeParameter& type_param = TypeParameter::Handle(zone);
-  AbstractType& sup_type_arg = AbstractType::Handle(zone);
+  auto& type_param = TypeParameter::Handle(zone);
+  auto& sup_type_arg = AbstractType::Handle(zone);
   for (intptr_t num_overlapping_type_args =
-           (num_type_params < num_sup_type_args) ? num_type_params
-                                                 : num_sup_type_args;
+           (num_type_params < sup_type_args_length) ? num_type_params
+                                                    : sup_type_args_length;
        num_overlapping_type_args > 0; num_overlapping_type_args--) {
     intptr_t i = 0;
     for (; i < num_overlapping_type_args; i++) {
       type_param ^= type_params.TypeAt(i);
-      sup_type_arg = sup_type_args.TypeAt(num_sup_type_args -
+      sup_type_arg = sup_type_args.TypeAt(sup_type_args_length -
                                           num_overlapping_type_args + i);
       if (!type_param.Equals(sup_type_arg)) break;
     }
     if (i == num_overlapping_type_args) {
       // Overlap found.
-      set_num_own_type_arguments(num_type_params - num_overlapping_type_args);
-      return num_type_params - num_overlapping_type_args;
+      return sup_class_num_type_args + num_type_params -
+             num_overlapping_type_args;
     }
   }
   // No overlap found.
-  set_num_own_type_arguments(num_type_params);
-  return num_type_params;
+  return sup_class_num_type_args + num_type_params;
 }
 
 intptr_t Class::NumTypeArguments() const {
   // Return cached value if already calculated.
-  if (num_type_arguments() != kUnknownNumTypeArguments) {
-    return num_type_arguments();
+  intptr_t num_type_args = num_type_arguments();
+  if (num_type_args != kUnknownNumTypeArguments) {
+    return num_type_args;
   }
-  // To work properly, this call requires the super class of this class to be
-  // resolved, which is checked by the type_class() call on the super type.
-  Thread* thread = Thread::Current();
-  Zone* zone = thread->zone();
-  Isolate* isolate = thread->isolate();
-  Class& cls = Class::Handle(zone);
-  AbstractType& sup_type = AbstractType::Handle(zone);
-  cls = raw();
-  intptr_t num_type_args = 0;
-  do {
-    num_type_args += cls.NumOwnTypeArguments();
-    // Super type of Object class is null.
-    if ((cls.super_type() == AbstractType::null()) ||
-        (cls.super_type() == isolate->object_store()->object_type())) {
-      break;
-    }
-    sup_type = cls.super_type();
-    // A TypeRef or function type can appear as type argument of
-    // sup_type, but not as sup_type itself.
-    ASSERT(sup_type.IsType());
-    cls = sup_type.type_class();
-    ASSERT(!cls.IsTypedefClass());
-  } while (true);
+
+  num_type_args = ComputeNumTypeArguments();
+  ASSERT(num_type_args != kUnknownNumTypeArguments);
   set_num_type_arguments(num_type_args);
   return num_type_args;
 }
@@ -3685,8 +3635,6 @@
   result.set_next_field_offset(FakeInstance::NextFieldOffset());
   result.set_id(index);
   result.set_num_type_arguments(kUnknownNumTypeArguments);
-  result.set_num_own_type_arguments(kUnknownNumTypeArguments);
-  result.set_has_pragma(false);
   result.set_num_native_fields(0);
   result.set_state_bits(0);
   result.InitEmptyFields();
@@ -3739,9 +3687,9 @@
     cls.set_next_field_offset(instance_size);
     cls.set_num_native_fields(field_count);
     cls.set_is_finalized();
+    cls.set_is_declaration_loaded();
     cls.set_is_type_finalized();
     cls.set_is_synthesized_class();
-    cls.set_is_cycle_free();
     cls.set_kernel_offset(-1);
     library.AddClass(cls);
     return cls.raw();
@@ -4069,8 +4017,17 @@
   set_state_bits(AbstractBit::update(true, raw_ptr()->state_bits_));
 }
 
+void Class::set_is_declaration_loaded() const {
+  ASSERT(!is_declaration_loaded());
+  set_state_bits(ClassLoadingBits::update(RawClass::kDeclarationLoaded,
+                                          raw_ptr()->state_bits_));
+}
+
 void Class::set_is_type_finalized() const {
-  set_state_bits(TypeFinalizedBit::update(true, raw_ptr()->state_bits_));
+  ASSERT(is_declaration_loaded());
+  ASSERT(!is_type_finalized());
+  set_state_bits(ClassLoadingBits::update(RawClass::kTypeFinalized,
+                                          raw_ptr()->state_bits_));
 }
 
 void Class::set_is_patch() const {
@@ -4098,11 +4055,6 @@
   set_state_bits(FieldsMarkedNullableBit::update(true, raw_ptr()->state_bits_));
 }
 
-void Class::set_is_cycle_free() const {
-  ASSERT(!is_cycle_free());
-  set_state_bits(CycleFreeBit::update(true, raw_ptr()->state_bits_));
-}
-
 void Class::set_is_allocated(bool value) const {
   set_state_bits(IsAllocatedBit::update(value, raw_ptr()->state_bits_));
 }
@@ -4117,13 +4069,6 @@
       ClassFinalizedBits::update(RawClass::kFinalized, raw_ptr()->state_bits_));
 }
 
-void Class::ResetFinalization() const {
-  ASSERT(IsTopLevel() || IsClosureClass());
-  set_state_bits(
-      ClassFinalizedBits::update(RawClass::kAllocated, raw_ptr()->state_bits_));
-  set_state_bits(TypeFinalizedBit::update(false, raw_ptr()->state_bits_));
-}
-
 void Class::set_is_prefinalized() const {
   ASSERT(!is_finalized());
   set_state_bits(ClassFinalizedBits::update(RawClass::kPreFinalized,
@@ -21412,6 +21357,40 @@
   return "SendPort";
 }
 
+static void TransferableTypedDataFinalizer(void* isolate_callback_data,
+                                           Dart_WeakPersistentHandle handle,
+                                           void* peer) {
+  delete (reinterpret_cast<TransferableTypedDataPeer*>(peer));
+}
+
+RawTransferableTypedData* TransferableTypedData::New(uint8_t* data,
+                                                     intptr_t length,
+                                                     Heap::Space space) {
+  TransferableTypedDataPeer* peer = new TransferableTypedDataPeer(data, length);
+
+  Thread* thread = Thread::Current();
+  TransferableTypedData& result = TransferableTypedData::Handle();
+  {
+    RawObject* raw =
+        Object::Allocate(TransferableTypedData::kClassId,
+                         TransferableTypedData::InstanceSize(), space);
+    NoSafepointScope no_safepoint;
+    thread->heap()->SetPeer(raw, peer);
+    result ^= raw;
+  }
+  // Set up finalizer so it frees allocated memory if handle is
+  // garbage-collected.
+  peer->set_handle(FinalizablePersistentHandle::New(
+      thread->isolate(), result, peer, &TransferableTypedDataFinalizer,
+      length));
+
+  return result.raw();
+}
+
+const char* TransferableTypedData::ToCString() const {
+  return "TransferableTypedData";
+}
+
 const char* Closure::ToCString() const {
   Zone* zone = Thread::Current()->zone();
   const Function& fun = Function::Handle(zone, function());
diff --git a/runtime/vm/object.h b/runtime/vm/object.h
index 453e847..33261da 100644
--- a/runtime/vm/object.h
+++ b/runtime/vm/object.h
@@ -916,10 +916,6 @@
   // the super class.
   intptr_t NumTypeArguments() const;
 
-  // Return the number of type arguments that are specific to this class, i.e.
-  // not overlapping with the type arguments of the super class of this class.
-  intptr_t NumOwnTypeArguments() const;
-
   // Return true if this class declares type parameters.
   bool IsGeneric() const { return NumTypeParameters(Thread::Current()) > 0; }
 
@@ -950,7 +946,10 @@
   }
 
   // The super type of this class, Object type if not explicitly specified.
-  RawAbstractType* super_type() const { return raw_ptr()->super_type_; }
+  RawAbstractType* super_type() const {
+    ASSERT(is_declaration_loaded());
+    return raw_ptr()->super_type_;
+  }
   void set_super_type(const AbstractType& value) const;
   static intptr_t super_type_offset() {
     return OFFSET_OF(RawClass, super_type_);
@@ -1117,8 +1116,17 @@
   }
   void set_is_abstract() const;
 
+  RawClass::ClassLoadingState class_loading_state() const {
+    return ClassLoadingBits::decode(raw_ptr()->state_bits_);
+  }
+
+  bool is_declaration_loaded() const {
+    return class_loading_state() >= RawClass::kDeclarationLoaded;
+  }
+  void set_is_declaration_loaded() const;
+
   bool is_type_finalized() const {
-    return TypeFinalizedBit::decode(raw_ptr()->state_bits_);
+    return class_loading_state() >= RawClass::kTypeFinalized;
   }
   void set_is_type_finalized() const;
 
@@ -1146,8 +1154,6 @@
 
   void set_is_prefinalized() const;
 
-  void ResetFinalization() const;
-
   bool is_const() const { return ConstBit::decode(raw_ptr()->state_bits_); }
   void set_is_const() const;
 
@@ -1167,11 +1173,6 @@
   }
   void set_is_fields_marked_nullable() const;
 
-  bool is_cycle_free() const {
-    return CycleFreeBit::decode(raw_ptr()->state_bits_);
-  }
-  void set_is_cycle_free() const;
-
   bool is_allocated() const {
     return IsAllocatedBit::decode(raw_ptr()->state_bits_);
   }
@@ -1334,41 +1335,44 @@
   enum StateBits {
     kConstBit = 0,
     kImplementedBit = 1,
-    kTypeFinalizedBit = 2,
-    kClassFinalizedPos = 3,
+    kClassFinalizedPos = 2,
     kClassFinalizedSize = 2,
-    kAbstractBit = kClassFinalizedPos + kClassFinalizedSize,  // = 5
-    kPatchBit = 6,
+    kClassLoadingPos = kClassFinalizedPos + kClassFinalizedSize,  // = 4
+    kClassLoadingSize = 2,
+    kAbstractBit = kClassLoadingPos + kClassLoadingSize,  // = 6
+    kPatchBit,
     kSynthesizedClassBit,
     kMixinAppAliasBit,
     kMixinTypeAppliedBit,
     kFieldsMarkedNullableBit,
-    kCycleFreeBit,
     kEnumBit,
     kTransformedMixinApplicationBit,
     kIsAllocatedBit,
     kIsLoadedBit,
+    kHasPragmaBit,
   };
-  class ConstBit : public BitField<uint16_t, bool, kConstBit, 1> {};
-  class ImplementedBit : public BitField<uint16_t, bool, kImplementedBit, 1> {};
-  class TypeFinalizedBit
-      : public BitField<uint16_t, bool, kTypeFinalizedBit, 1> {};
-  class ClassFinalizedBits : public BitField<uint16_t,
+  class ConstBit : public BitField<uint32_t, bool, kConstBit, 1> {};
+  class ImplementedBit : public BitField<uint32_t, bool, kImplementedBit, 1> {};
+  class ClassFinalizedBits : public BitField<uint32_t,
                                              RawClass::ClassFinalizedState,
                                              kClassFinalizedPos,
                                              kClassFinalizedSize> {};
-  class AbstractBit : public BitField<uint16_t, bool, kAbstractBit, 1> {};
-  class PatchBit : public BitField<uint16_t, bool, kPatchBit, 1> {};
+  class ClassLoadingBits : public BitField<uint32_t,
+                                           RawClass::ClassLoadingState,
+                                           kClassLoadingPos,
+                                           kClassLoadingSize> {};
+  class AbstractBit : public BitField<uint32_t, bool, kAbstractBit, 1> {};
+  class PatchBit : public BitField<uint32_t, bool, kPatchBit, 1> {};
   class SynthesizedClassBit
-      : public BitField<uint16_t, bool, kSynthesizedClassBit, 1> {};
+      : public BitField<uint32_t, bool, kSynthesizedClassBit, 1> {};
   class FieldsMarkedNullableBit
-      : public BitField<uint16_t, bool, kFieldsMarkedNullableBit, 1> {};
-  class CycleFreeBit : public BitField<uint16_t, bool, kCycleFreeBit, 1> {};
-  class EnumBit : public BitField<uint16_t, bool, kEnumBit, 1> {};
+      : public BitField<uint32_t, bool, kFieldsMarkedNullableBit, 1> {};
+  class EnumBit : public BitField<uint32_t, bool, kEnumBit, 1> {};
   class TransformedMixinApplicationBit
-      : public BitField<uint16_t, bool, kTransformedMixinApplicationBit, 1> {};
-  class IsAllocatedBit : public BitField<uint16_t, bool, kIsAllocatedBit, 1> {};
-  class IsLoadedBit : public BitField<uint16_t, bool, kIsLoadedBit, 1> {};
+      : public BitField<uint32_t, bool, kTransformedMixinApplicationBit, 1> {};
+  class IsAllocatedBit : public BitField<uint32_t, bool, kIsAllocatedBit, 1> {};
+  class IsLoadedBit : public BitField<uint32_t, bool, kIsLoadedBit, 1> {};
+  class HasPragmaBit : public BitField<uint32_t, bool, kHasPragmaBit, 1> {};
 
   void set_name(const String& value) const;
   void set_user_name(const String& value) const;
@@ -1386,40 +1390,23 @@
   // functions_hash_table is in use iff there are at least this many functions.
   static const intptr_t kFunctionLookupHashTreshold = 16;
 
-  enum HasPragmaAndNumOwnTypeArgumentsBits {
-    kHasPragmaBit = 0,
-    kNumOwnTypeArgumentsPos = 1,
-    kNumOwnTypeArgumentsSize = 15
-  };
-
-  class HasPragmaBit : public BitField<uint16_t, bool, kHasPragmaBit, 1> {};
-  class NumOwnTypeArguments : public BitField<uint16_t,
-                                              uint16_t,
-                                              kNumOwnTypeArgumentsPos,
-                                              kNumOwnTypeArgumentsSize> {};
-
   // Initial value for the cached number of type arguments.
-  static const intptr_t kUnknownNumTypeArguments =
-      (1U << kNumOwnTypeArgumentsSize) - 1;
+  static const intptr_t kUnknownNumTypeArguments = -1;
 
   int16_t num_type_arguments() const { return raw_ptr()->num_type_arguments_; }
   void set_num_type_arguments(intptr_t value) const;
 
  public:
   bool has_pragma() const {
-    return HasPragmaBit::decode(
-        raw_ptr()->has_pragma_and_num_own_type_arguments_);
+    return HasPragmaBit::decode(raw_ptr()->state_bits_);
   }
   void set_has_pragma(bool has_pragma) const;
 
  private:
-  uint16_t num_own_type_arguments() const {
-    return NumOwnTypeArguments::decode(
-        raw_ptr()->has_pragma_and_num_own_type_arguments_);
-  }
-  void set_num_own_type_arguments(intptr_t value) const;
-
-  void set_has_pragma_and_num_own_type_arguments(uint16_t value) const;
+  // Calculates number of type arguments of this class.
+  // This includes type arguments of a superclass and takes overlapping
+  // of type arguments into account.
+  intptr_t ComputeNumTypeArguments() const;
 
   // Assigns empty array to all raw class array fields.
   void InitEmptyFields();
@@ -5628,7 +5615,7 @@
   }
 
   static bool IsValidLength(intptr_t len) {
-    return 0 <= len && len <= kMaxElements;
+    return 0 <= len && len <= compiler::target::Array::kMaxElements;
   }
 
   static intptr_t InstanceSize() {
@@ -8516,12 +8503,22 @@
     }
   }
 
+  void* DataAddr(intptr_t byte_offset) const {
+    ASSERT((byte_offset == 0) ||
+           ((byte_offset > 0) && (byte_offset < LengthInBytes())));
+    return reinterpret_cast<void*>(Validate(raw_ptr()->data_) + byte_offset);
+  }
+
  protected:
   void SetLength(intptr_t value) const {
     ASSERT(value <= Smi::kMaxValue);
     StoreSmi(&raw_ptr()->length_, Smi::New(value));
   }
 
+  virtual uint8_t* Validate(uint8_t* data) const {
+    return UnsafeMutableNonPointer(data);
+  }
+
  private:
   friend class Class;
 
@@ -8545,13 +8542,6 @@
   // architecture.
   static const intptr_t kHashBits = 30;
 
-  void* DataAddr(intptr_t byte_offset) const {
-    ASSERT((byte_offset == 0) ||
-           ((byte_offset > 0) && (byte_offset < LengthInBytes())));
-    return reinterpret_cast<void*>(UnsafeMutableNonPointer(raw_ptr()->data()) +
-                                   byte_offset);
-  }
-
   virtual bool CanonicalizeEquals(const Instance& other) const;
   virtual uint32_t CanonicalizeHash() const;
 
@@ -8692,12 +8682,6 @@
   // snapshot. Should be independent of word size.
   static const int kDataSerializationAlignment = 8;
 
-  void* DataAddr(intptr_t byte_offset) const {
-    ASSERT((byte_offset == 0) ||
-           ((byte_offset > 0) && (byte_offset < LengthInBytes())));
-    return reinterpret_cast<void*>(raw_ptr()->data_ + byte_offset);
-  }
-
 #define TYPED_GETTER_SETTER(name, type)                                        \
   type Get##name(intptr_t byte_offset) const {                                 \
     return ReadUnaligned(reinterpret_cast<type*>(DataAddr(byte_offset)));      \
@@ -8751,6 +8735,8 @@
   }
 
  protected:
+  virtual uint8_t* Validate(uint8_t* data) const { return data; }
+
   void SetLength(intptr_t value) const {
     ASSERT(value <= Smi::kMaxValue);
     StoreSmi(&raw_ptr()->length_, Smi::New(value));
@@ -8823,6 +8809,9 @@
 
   RawSmi* offset_in_bytes() const { return raw_ptr()->offset_in_bytes_; }
 
+ protected:
+  virtual uint8_t* Validate(uint8_t* data) const { return data; }
+
  private:
   void RecomputeDataField() { raw()->RecomputeDataField(); }
 
@@ -9189,6 +9178,50 @@
   friend class Class;
 };
 
+// This is allocated when new instance of TransferableTypedData is created in
+// [TransferableTypedData::New].
+class TransferableTypedDataPeer {
+ public:
+  // [data] backing store should be malloc'ed, not new'ed.
+  TransferableTypedDataPeer(uint8_t* data, intptr_t length)
+      : data_(data), length_(length), handle_(nullptr) {}
+
+  ~TransferableTypedDataPeer() { free(data_); }
+
+  uint8_t* data() const { return data_; }
+  intptr_t length() const { return length_; }
+  FinalizablePersistentHandle* handle() const { return handle_; }
+  void set_handle(FinalizablePersistentHandle* handle) { handle_ = handle; }
+
+  void ClearData() {
+    data_ = nullptr;
+    length_ = 0;
+    handle_ = nullptr;
+  }
+
+ private:
+  uint8_t* data_;
+  intptr_t length_;
+  FinalizablePersistentHandle* handle_;
+
+  DISALLOW_COPY_AND_ASSIGN(TransferableTypedDataPeer);
+};
+
+class TransferableTypedData : public Instance {
+ public:
+  static RawTransferableTypedData* New(uint8_t* data,
+                                       intptr_t len,
+                                       Heap::Space space = Heap::kNew);
+
+  static intptr_t InstanceSize() {
+    return RoundedAllocationSize(sizeof(RawTransferableTypedData));
+  }
+
+ private:
+  FINAL_HEAP_OBJECT_IMPLEMENTATION(TransferableTypedData, Instance);
+  friend class Class;
+};
+
 // Internal stacktrace object used in exceptions for printing stack traces.
 class StackTrace : public Instance {
  public:
diff --git a/runtime/vm/object_service.cc b/runtime/vm/object_service.cc
index cab61e5..3616d4e 100644
--- a/runtime/vm/object_service.cc
+++ b/runtime/vm/object_service.cc
@@ -1455,6 +1455,10 @@
   Instance::PrintJSONImpl(stream, ref);
 }
 
+void TransferableTypedData::PrintJSONImpl(JSONStream* stream, bool ref) const {
+  Instance::PrintJSONImpl(stream, ref);
+}
+
 void ClosureData::PrintJSONImpl(JSONStream* stream, bool ref) const {
   Object::PrintJSONImpl(stream, ref);
 }
diff --git a/runtime/vm/object_test.cc b/runtime/vm/object_test.cc
index ace33b6..0921cc8 100644
--- a/runtime/vm/object_test.cc
+++ b/runtime/vm/object_test.cc
@@ -31,6 +31,7 @@
   const Class& cls = Class::Handle(Class::New(
       Library::Handle(), class_name, script, TokenPosition::kNoSource));
   cls.set_is_synthesized_class();  // Dummy class for testing.
+  cls.set_is_declaration_loaded();
   return cls.raw();
 }
 
diff --git a/runtime/vm/os_linux.cc b/runtime/vm/os_linux.cc
index bc254e4..2ca3bb6 100644
--- a/runtime/vm/os_linux.cc
+++ b/runtime/vm/os_linux.cc
@@ -37,12 +37,14 @@
 DEFINE_FLAG(bool,
             generate_perf_events_symbols,
             false,
-            "Generate events symbols for profiling with perf");
+            "Generate events symbols for profiling with perf (disables dual "
+            "code mapping)");
 
 DEFINE_FLAG(bool,
             generate_perf_jitdump,
             false,
-            "Generate jitdump file to use with perf-inject");
+            "Generate jitdump file to use with perf-inject (disables dual code "
+            "mapping)");
 
 DECLARE_FLAG(bool, write_protect_code);
 DECLARE_FLAG(bool, write_protect_vm_isolate);
diff --git a/runtime/vm/raw_object.cc b/runtime/vm/raw_object.cc
index eb5d39a..0658a6d 100644
--- a/runtime/vm/raw_object.cc
+++ b/runtime/vm/raw_object.cc
@@ -478,6 +478,7 @@
 NULL_VISITOR(Bool)
 NULL_VISITOR(Capability)
 NULL_VISITOR(SendPort)
+NULL_VISITOR(TransferableTypedData)
 REGULAR_VISITOR(Pointer)
 NULL_VISITOR(DynamicLibrary)
 VARIABLE_NULL_VISITOR(Instructions, Instructions::Size(raw_obj))
diff --git a/runtime/vm/raw_object.h b/runtime/vm/raw_object.h
index 355cb6b..1028af1 100644
--- a/runtime/vm/raw_object.h
+++ b/runtime/vm/raw_object.h
@@ -13,6 +13,7 @@
 #include "platform/atomic.h"
 #include "vm/class_id.h"
 #include "vm/compiler/method_recognizer.h"
+#include "vm/compiler/runtime_api.h"
 #include "vm/exceptions.h"
 #include "vm/globals.h"
 #include "vm/object_graph.h"
@@ -150,8 +151,10 @@
   // Encodes the object size in the tag in units of object alignment.
   class SizeTag {
    public:
-    static const intptr_t kMaxSizeTag = ((1 << RawObject::kSizeTagSize) - 1)
-                                        << kObjectAlignmentLog2;
+    static constexpr intptr_t kMaxSizeTagInUnitsOfAlignment =
+        ((1 << RawObject::kSizeTagSize) - 1);
+    static constexpr intptr_t kMaxSizeTag =
+        kMaxSizeTagInUnitsOfAlignment * kObjectAlignment;
 
     static uword encode(intptr_t size) {
       return SizeBits::encode(SizeToTagValue(size));
@@ -171,11 +174,15 @@
         : public BitField<uint32_t, intptr_t, kSizeTagPos, kSizeTagSize> {};
 
     static intptr_t SizeToTagValue(intptr_t size) {
-      ASSERT(Utils::IsAligned(size, kObjectAlignment));
-      return (size > kMaxSizeTag) ? 0 : (size >> kObjectAlignmentLog2);
+      ASSERT(Utils::IsAligned(
+          size, compiler::target::ObjectAlignment::kObjectAlignment));
+      return (size > kMaxSizeTag)
+                 ? 0
+                 : (size >>
+                    compiler::target::ObjectAlignment::kObjectAlignmentLog2);
     }
     static intptr_t TagValueToSize(intptr_t value) {
-      return value << kObjectAlignmentLog2;
+      return value << compiler::target::ObjectAlignment::kObjectAlignmentLog2;
     }
   };
 
@@ -723,6 +730,7 @@
   friend class ObjectOffsetTrait;   // GetClassId
   friend class WriteBarrierUpdateVisitor;  // CheckHeapPointerStore
   friend class OffsetsTable;
+  friend class RawTransferableTypedData;  // GetClassId
 
   DISALLOW_ALLOCATION();
   DISALLOW_IMPLICIT_CONSTRUCTORS(RawObject);
@@ -735,6 +743,19 @@
     kPreFinalized,          // VM classes: size precomputed, but no checks done.
     kFinalized,             // Class parsed, finalized and ready for use.
   };
+  enum ClassLoadingState {
+    // Class object is created, but it is not filled up.
+    // At this state class can only be used as a forward reference during
+    // class loading.
+    kNameOnly = 0,
+    // Class declaration information such as type parameters, supertype and
+    // implemented interfaces are loaded. However, types in the class are
+    // not finalized yet.
+    kDeclarationLoaded,
+    // Types in the class are finalized. At this point, members can be loaded
+    // and class can be finalized.
+    kTypeFinalized,
+  };
 
  private:
   RAW_HEAP_OBJECT_IMPLEMENTATION(Class);
@@ -784,13 +805,8 @@
   int32_t next_field_offset_in_words_;  // Offset of the next instance field.
   classid_t id_;                // Class Id, also index in the class table.
   int16_t num_type_arguments_;  // Number of type arguments in flattened vector.
-
-  // Bitfields with number of non-overlapping type arguments and 'has_pragma'
-  // bit.
-  uint16_t has_pragma_and_num_own_type_arguments_;
-
   uint16_t num_native_fields_;
-  uint16_t state_bits_;
+  uint32_t state_bits_;
   NOT_IN_PRECOMPILED(intptr_t kernel_offset_);
 
   friend class Instance;
@@ -1450,19 +1466,19 @@
    public:
     // Most of the time try_index will be small and merged field will fit into
     // one byte.
-    static intptr_t Encode(intptr_t kind, intptr_t try_index) {
+    static int32_t Encode(intptr_t kind, intptr_t try_index) {
       intptr_t kind_shift = Utils::ShiftForPowerOfTwo(kind);
       ASSERT(Utils::IsUint(kKindShiftSize, kind_shift));
       ASSERT(Utils::IsInt(kTryIndexSize, try_index));
       return (try_index << kTryIndexPos) | (kind_shift << kKindShiftPos);
     }
 
-    static intptr_t DecodeKind(intptr_t merged_kind_try) {
+    static intptr_t DecodeKind(int32_t merged_kind_try) {
       const intptr_t kKindShiftMask = (1 << kKindShiftSize) - 1;
       return 1 << (merged_kind_try & kKindShiftMask);
     }
 
-    static intptr_t DecodeTryIndex(intptr_t merged_kind_try) {
+    static intptr_t DecodeTryIndex(int32_t merged_kind_try) {
       // Arithmetic shift.
       return merged_kind_try >> kTryIndexPos;
     }
@@ -1474,7 +1490,7 @@
     COMPILE_ASSERT(kLastKind <= 1 << ((1 << kKindShiftSize) - 1));
 
     static const intptr_t kTryIndexPos = kKindShiftSize;
-    static const intptr_t kTryIndexSize = kBitsPerWord - kKindShiftSize;
+    static const intptr_t kTryIndexSize = 32 - kKindShiftSize;
   };
 
  private:
@@ -2398,6 +2414,11 @@
   VISIT_TO(RawObject*, handler_)
 };
 
+class RawTransferableTypedData : public RawInstance {
+  RAW_HEAP_OBJECT_IMPLEMENTATION(TransferableTypedData);
+  VISIT_NOTHING();
+};
+
 // VM type for capturing stacktraces when exceptions are thrown,
 // Currently we don't have any interface that this object is supposed
 // to implement so we just support the 'toString' method which
diff --git a/runtime/vm/raw_object_fields.cc b/runtime/vm/raw_object_fields.cc
index 5728dad..c4aac7c 100644
--- a/runtime/vm/raw_object_fields.cc
+++ b/runtime/vm/raw_object_fields.cc
@@ -109,6 +109,7 @@
   F(Bytecode, function_)                                                       \
   F(Bytecode, exception_handlers_)                                             \
   F(Bytecode, pc_descriptors_)                                                 \
+  F(Bytecode, closures_)                                                       \
   F(ExceptionHandlers, handled_types_data_)                                    \
   F(Context, parent_)                                                          \
   F(SingleTargetCache, target_)                                                \
@@ -191,7 +192,13 @@
   F(Pointer, type_arguments_)                                                  \
   F(Pointer, c_memory_address_)                                                \
   F(DynamicLibrary, handle_)                                                   \
-  F(FfiTrampolineData, signature_type_)
+  F(FfiTrampolineData, signature_type_)                                        \
+  F(FfiTrampolineData, c_signature_)                                           \
+  F(FfiTrampolineData, callback_target_)                                       \
+  F(TypedDataBase, data_)                                                      \
+  F(TypedDataBase, length_)                                                    \
+  F(TypedDataView, typed_data_)                                                \
+  F(TypedDataView, offset_in_bytes_)
 
 OffsetsTable::OffsetsTable(Zone* zone) : cached_offsets_(zone) {
   for (intptr_t i = 0; offsets_table[i].class_id != -1; ++i) {
diff --git a/runtime/vm/raw_object_snapshot.cc b/runtime/vm/raw_object_snapshot.cc
index 296b478..d734dbb 100644
--- a/runtime/vm/raw_object_snapshot.cc
+++ b/runtime/vm/raw_object_snapshot.cc
@@ -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.
 
+#include "vm/dart_api_state.h"
 #include "vm/message.h"
 #include "vm/native_entry.h"
 #include "vm/object.h"
@@ -2133,6 +2134,68 @@
   writer->Write<uint64_t>(ptr()->origin_id_);
 }
 
+RawTransferableTypedData* TransferableTypedData::ReadFrom(
+    SnapshotReader* reader,
+    intptr_t object_id,
+    intptr_t tags,
+    Snapshot::Kind kind,
+    bool as_reference) {
+  ASSERT(reader != nullptr);
+
+  ASSERT(!Snapshot::IsFull(kind));
+  const intptr_t length = reader->Read<int32_t>();
+
+  const FinalizableData finalizable_data =
+      static_cast<MessageSnapshotReader*>(reader)->finalizable_data()->Take();
+  uint8_t* data = reinterpret_cast<uint8_t*>(finalizable_data.data);
+  auto& transferableTypedData = TransferableTypedData::ZoneHandle(
+      reader->zone(), TransferableTypedData::New(data, length));
+  reader->AddBackRef(object_id, &transferableTypedData, kIsDeserialized);
+  return transferableTypedData.raw();
+}
+
+void RawTransferableTypedData::WriteTo(SnapshotWriter* writer,
+                                       intptr_t object_id,
+                                       Snapshot::Kind kind,
+                                       bool as_reference) {
+  ASSERT(writer != nullptr);
+  ASSERT(GetClassId() == kTransferableTypedDataCid);
+  void* peer = writer->thread()->heap()->GetPeer(this);
+  // Assume that object's Peer is only used to track transferrability state.
+  ASSERT(peer != nullptr);
+  TransferableTypedDataPeer* tpeer =
+      reinterpret_cast<TransferableTypedDataPeer*>(peer);
+  intptr_t length = tpeer->length();  // In bytes.
+  void* data = tpeer->data();
+  if (data == nullptr) {
+    writer->SetWriteException(
+        Exceptions::kArgument,
+        "Illegal argument in isolate message"
+        " : (TransferableTypedData has been transferred already)");
+    return;
+  }
+
+  // Write out the serialization header value for this object.
+  writer->WriteInlinedObjectHeader(object_id);
+
+  writer->WriteIndexedObject(GetClassId());
+  writer->WriteTags(writer->GetObjectTags(this));
+  writer->Write<int32_t>(length);
+
+  static_cast<MessageWriter*>(writer)->finalizable_data()->Put(
+      length, data, tpeer,
+      // Finalizer does nothing - in case of failure to serialize,
+      // [data] remains wrapped in sender's [TransferableTypedData].
+      [](void* data, Dart_WeakPersistentHandle handle, void* peer) {},
+      // This is invoked on successful serialization of the message
+      [](void* data, Dart_WeakPersistentHandle handle, void* peer) {
+        TransferableTypedDataPeer* tpeer =
+            reinterpret_cast<TransferableTypedDataPeer*>(peer);
+        tpeer->handle()->EnsureFreeExternal(Isolate::Current());
+        tpeer->ClearData();
+      });
+}
+
 RawStackTrace* StackTrace::ReadFrom(SnapshotReader* reader,
                                     intptr_t object_id,
                                     intptr_t tags,
diff --git a/runtime/vm/runtime_entry.cc b/runtime/vm/runtime_entry.cc
index cac4d22..674623b 100644
--- a/runtime/vm/runtime_entry.cc
+++ b/runtime/vm/runtime_entry.cc
@@ -976,9 +976,10 @@
                              StackFrameIterator::kNoCrossThreadIteration);
   StackFrame* caller_frame = iterator.NextFrame();
   ASSERT(caller_frame != NULL);
-  ASSERT(!caller_frame->is_interpreted());
-  const Code& orig_stub = Code::Handle(
-      zone, isolate->debugger()->GetPatchedStubAddress(caller_frame->pc()));
+  Code& orig_stub = Code::Handle(zone);
+  if (!caller_frame->is_interpreted()) {
+    orig_stub = isolate->debugger()->GetPatchedStubAddress(caller_frame->pc());
+  }
   const Error& error =
       Error::Handle(zone, isolate->debugger()->PauseBreakpoint());
   ThrowIfError(error);
@@ -2758,6 +2759,7 @@
 }
 
 extern "C" void DFLRT_EnterSafepoint(NativeArguments __unusable_) {
+  CHECK_STACK_ALIGNMENT;
   Thread* thread = Thread::Current();
   ASSERT(thread->top_exit_frame_info() != 0);
   ASSERT(thread->execution_state() == Thread::kThreadInNative);
@@ -2766,6 +2768,7 @@
 DEFINE_RAW_LEAF_RUNTIME_ENTRY(EnterSafepoint, 0, false, &DFLRT_EnterSafepoint);
 
 extern "C" void DFLRT_ExitSafepoint(NativeArguments __unusable_) {
+  CHECK_STACK_ALIGNMENT;
   Thread* thread = Thread::Current();
   ASSERT(thread->top_exit_frame_info() != 0);
   ASSERT(thread->execution_state() == Thread::kThreadInNative);
diff --git a/runtime/vm/runtime_entry_arm.cc b/runtime/vm/runtime_entry_arm.cc
index 7f84226..9c7585e 100644
--- a/runtime/vm/runtime_entry_arm.cc
+++ b/runtime/vm/runtime_entry_arm.cc
@@ -47,17 +47,21 @@
                                 intptr_t argument_count) {
   if (runtime_entry->is_leaf()) {
     ASSERT(argument_count == runtime_entry->argument_count());
-    __ LoadFromOffset(kWord, TMP, THR, Thread::OffsetFromThread(runtime_entry));
-    __ str(TMP, Address(THR, Thread::vm_tag_offset()));
+    __ LoadFromOffset(
+        kWord, TMP, THR,
+        compiler::target::Thread::OffsetFromThread(runtime_entry));
+    __ str(TMP, Address(THR, compiler::target::Thread::vm_tag_offset()));
     __ blx(TMP);
     __ LoadImmediate(TMP, VMTag::kDartCompiledTagId);
-    __ str(TMP, Address(THR, Thread::vm_tag_offset()));
+    __ str(TMP, Address(THR, compiler::target::Thread::vm_tag_offset()));
     ASSERT((kAbiPreservedCpuRegs & (1 << THR)) != 0);
     ASSERT((kAbiPreservedCpuRegs & (1 << PP)) != 0);
   } else {
     // Argument count is not checked here, but in the runtime entry for a more
     // informative error message.
-    __ LoadFromOffset(kWord, R9, THR, Thread::OffsetFromThread(runtime_entry));
+    __ LoadFromOffset(
+        kWord, R9, THR,
+        compiler::target::Thread::OffsetFromThread(runtime_entry));
     __ LoadImmediate(R4, argument_count);
     __ BranchLinkToRuntime();
   }
diff --git a/runtime/vm/service/service_evolution.md b/runtime/vm/service/service_evolution.md
new file mode 100644
index 0000000..c2e140a
--- /dev/null
+++ b/runtime/vm/service/service_evolution.md
@@ -0,0 +1,67 @@
+# Evolving the Dart Service Protocol
+
+This document outlines the mindset of the Dart Service Protocol designers and maintainers when it comes to extending or modifying the protocol. Any proposals or requests to update the protocol will be evaluated against the principles described below before being added to the protocol specification.
+
+## Requirements
+
+Any proposed additions to the Dart service protocol should adhere to the following principles.
+
+### Perform Only Simple Operations
+
+The API surface of the service protocol should remain as small and simple as possible. Proposed changes to the protocol will only be accepted if they meet one of the following criteria:
+
+* There is no existing combination of RPCs that achieve the behavior proposed
+* A level of atomicity is required that cannot be achieved by existing RPCs
+* Significant demonstrable performance gains can be made by adding a specialized RPC (e.g., a batch version of an existing RPC)
+
+### Avoid Introducing Side Effects
+
+In general, interacting with the service protocol should avoid changing the state of the Dart instance. Side effects introduced as the result of a service protocol request may be difficult to debug, especially if they change state in a running Dart program. Although exceptions can be made in special circumstances, service protocol APIs should:
+
+* **Be stateless.** Requests should be independent of one another. For example, assuming execution is paused and the Dart instance is effectively idle, invoking the same RPC twice should return the same result.
+* **Be predictable.** If an API must change state, the resulting state change should be obvious and expected. For example, the `SetFlag` RPC allows for specific settings in the Dart instance to be changed but does not introduce any additional side effects.
+
+### Keep Low-Powered Devices in Mind
+
+As the Dart instance may be running on a remote or low-powered device, the service protocol should only provide functionality that doesn't make assumptions about the hardware configuration the Dart instance is running on. In addition, processing should be done on the client whenever possible to maintain reasonable performance in the case where the Dart instance is running on a remote or low-powered device.
+
+Based on the principles above, any changes to the service protocol must satisfy the following:
+
+* **The proposed change must be valid for all types of devices, regardless of their performance.** For example, a request to reduce the minimal sample rate for the profiler from 50us to 10us would be rejected as low-end ARM devices are unable to handle a 10us sample period, often leading to a crash.
+* **Keep as much processing as possible on the client side to avoid slowdowns on low-end devices.** For example, dominator analysis of a heap snapshot is performed on the client side in Observatory.
+
+### Implementation Agnostic
+
+The Dart service protocol is designed to be usable by any implementation of Dart, not just the Dart VM in the official Dart SDK. As a result, the protocol must avoid exposing details of the underlying implementation through its interface. Any exposure of implementation details must only be done through private RPCs and their responses and should only be used within the context of that implementation (e.g., private RPCs provided by the Dart VM are fine to be used within Observatory but are not advertised to, and should not be used by, external clients).
+
+For example, the fact that the Dart VM currently uses a generational garbage collector may not be true in the future, so a response containing information about new and old space should not be exposed through the protocol.
+
+## FAQ
+
+**_Q: I want to get information about system X but there's no way to query for that information over the service protocol. Can we add a new RPC for this?_**
+
+**A:** Maybe! If it's not possible to achieve something through the current service protocol, adding support for that operation can be investigated. However, only RPCs which do not violate the principles stated above will be accepted into the protocol.
+
+**_Q: There's a certain series of RPCs that I invoke frequently. Can we create a single RPC for this operation?_**
+
+**A:** No, unless there is a need for the operations performed by the series of RPCs to be performed atomically or there is a significant performance benefit of performing work in a single RPC.
+
+**_Q: I'd like to do an experiment that requires changes to the service protocol. How can I do this?_**
+
+**A:** Assuming there's no significant performance impact anticipated by an experimental RPC, it's possible to add experimental functionality to the service protocol. Any experimental functionality should either be marked as private or be documented as being experimental and that it may be deprecated without notice. Experimental RPCs should have a short lifespan and be documented with an expected expiration date.
+
+Any experimental changes that are intended to be permanent must adhere to the principles described in the first section of this document.
+
+If you require assistance in adding experimental functionality to the protocol, please reach out to the maintainers at dart-service-protocol@google.com. Changes required to the Dart VM service implementation can also be handled by members of dart-service-protocol@google.com or dart-vm-team@google.com.
+
+**_Q: There's a private RPC that performs functionality that I'm looking for. Can I use it?_**
+
+**A: No, private RPCs and their responses should not be used outside of the Dart SDK.** The implementations of these RPCs and responses are subject to change without warning and unauthorized private RPC requests may be discarded in the future.
+
+**_Q: Can we make a private RPC public?_**
+
+**A:** In general, no. While some private RPCs and responses can be made public without much effort, many expose internal implementation details of the VM itself for use by VM engineers in Observatory. If there is a strong case for exposing functionality provided by a private RPC, a new public RPC will need to be defined in order to keep the protocol from exposing implementation details of the system.
+
+**_Q: I have more questions about the service protocol. Who can I contact?_**
+
+**A:** The Dart VM team is responsible for maintaining the service protocol. The current maintainers can be contacted at dart-service-protocol@google.com.
diff --git a/runtime/vm/snapshot.cc b/runtime/vm/snapshot.cc
index aeb1714..3824991 100644
--- a/runtime/vm/snapshot.cc
+++ b/runtime/vm/snapshot.cc
@@ -45,7 +45,8 @@
           RawObject::IsStringClassId(class_id) ||
           RawObject::IsTypedDataClassId(class_id) ||
           RawObject::IsExternalTypedDataClassId(class_id) ||
-          RawObject::IsTypedDataViewClassId(class_id) || class_id == kNullCid);
+          RawObject::IsTypedDataViewClassId(class_id) || class_id == kNullCid ||
+          class_id == kTransferableTypedDataCid);
 }
 
 static bool IsObjectStoreTypeId(intptr_t index) {
@@ -1483,6 +1484,8 @@
   }
   if (has_exception) {
     ThrowException(exception_type(), exception_msg());
+  } else {
+    finalizable_data_->SerializationSucceeded();
   }
 
   MessageFinalizableData* finalizable_data = finalizable_data_;
diff --git a/runtime/vm/snapshot.h b/runtime/vm/snapshot.h
index 995afc7..0939635e 100644
--- a/runtime/vm/snapshot.h
+++ b/runtime/vm/snapshot.h
@@ -442,6 +442,7 @@
   friend class Script;
   friend class SignatureData;
   friend class SubtypeTestCache;
+  friend class TransferableTypedData;
   friend class Type;
   friend class TypedDataView;
   friend class TypeArguments;
@@ -715,6 +716,7 @@
   friend class RawScript;
   friend class RawStackTrace;
   friend class RawSubtypeTestCache;
+  friend class RawTransferableTypedData;
   friend class RawType;
   friend class RawTypedDataView;
   friend class RawTypeRef;
diff --git a/runtime/vm/symbols.h b/runtime/vm/symbols.h
index f265e3e..5454049 100644
--- a/runtime/vm/symbols.h
+++ b/runtime/vm/symbols.h
@@ -287,6 +287,7 @@
   V(ThrowNewInvocation, "_throwNewInvocation")                                 \
   V(TopLevel, "::")                                                            \
   V(TruncDivOperator, "~/")                                                    \
+  V(TransferableTypedData, "TransferableTypedData")                            \
   V(TryFinallyReturnValue, ":try_finally_return_value")                        \
   V(TwoByteString, "_TwoByteString")                                           \
   V(TwoNewlines, "\n\n")                                                       \
@@ -403,6 +404,7 @@
   V(_RawReceivePortImpl, "_RawReceivePortImpl")                                \
   V(_RegExp, "_RegExp")                                                        \
   V(_SendPortImpl, "_SendPortImpl")                                            \
+  V(_TransferableTypedDataImpl, "_TransferableTypedDataImpl")                  \
   V(_Smi, "_Smi")                                                              \
   V(_SourceLocation, "_SourceLocation")                                        \
   V(_SpecialTypeMirror, "_SpecialTypeMirror")                                  \
diff --git a/runtime/vm/timeline.h b/runtime/vm/timeline.h
index 3fa4cff..9d43824 100644
--- a/runtime/vm/timeline.h
+++ b/runtime/vm/timeline.h
@@ -60,10 +60,14 @@
 
   bool enabled() {
 #if defined(HOST_OS_FUCHSIA) && !defined(FUCHSIA_SDK)
+#ifdef PRODUCT
     return trace_is_category_enabled(fuchsia_name_);
 #else
+    return trace_is_category_enabled(fuchsia_name_) || enabled_ != 0;
+#endif  // PRODUCT
+#else
     return enabled_ != 0;
-#endif
+#endif  // defined(HOST_OS_FUCHSIA) && !defined(FUCHSIA_SDK)
   }
 
   void set_enabled(bool enabled) { enabled_ = enabled ? 1 : 0; }
diff --git a/runtime/vm/type_testing_stubs.cc b/runtime/vm/type_testing_stubs.cc
index 1b78344..90dc754 100644
--- a/runtime/vm/type_testing_stubs.cc
+++ b/runtime/vm/type_testing_stubs.cc
@@ -322,9 +322,10 @@
   // fall through to continue
 
   // b) Then we'll load the values for the type parameters.
-  __ LoadField(
-      instance_type_args_reg,
-      FieldAddress(instance_reg, type_class.type_arguments_field_offset()));
+  __ LoadField(instance_type_args_reg,
+               FieldAddress(instance_reg,
+                            compiler::target::Class::TypeArgumentsFieldOffset(
+                                type_class)));
 
   // The kernel frontend should fill in any non-assigned type parameters on
   // construction with dynamic/Object, so we should never get the null type
@@ -391,24 +392,27 @@
     // TODO(kustermann): Even though it should be safe to use TMP here, we
     // should avoid using TMP outside the assembler.  Try to find a free
     // register to use here!
+    __ LoadField(TMP,
+                 FieldAddress(instance_type_args_reg,
+                              compiler::target::TypeArguments::type_at_offset(
+                                  type_param_value_offset_i)));
     __ LoadField(
-        TMP,
-        FieldAddress(instance_type_args_reg,
-                     TypeArguments::type_at_offset(type_param_value_offset_i)));
-    __ LoadField(class_id_reg, FieldAddress(TMP, Type::type_class_id_offset()));
+        class_id_reg,
+        FieldAddress(TMP, compiler::target::Type::type_class_id_offset()));
 
     if (type_arg.IsTypeParameter()) {
       const TypeParameter& type_param = TypeParameter::Cast(type_arg);
       const Register kTypeArgumentsReg = type_param.IsClassTypeParameter()
                                              ? instantiator_type_args_reg
                                              : function_type_args_reg;
-      __ LoadField(
-          own_type_arg_reg,
-          FieldAddress(kTypeArgumentsReg,
-                       TypeArguments::type_at_offset(type_param.index())));
+      __ LoadField(own_type_arg_reg,
+                   FieldAddress(kTypeArgumentsReg,
+                                compiler::target::TypeArguments::type_at_offset(
+                                    type_param.index())));
       __ CompareWithFieldValue(
           class_id_reg,
-          FieldAddress(own_type_arg_reg, Type::type_class_id_offset()));
+          FieldAddress(own_type_arg_reg,
+                       compiler::target::Type::type_class_id_offset()));
       __ BranchIf(NOT_EQUAL, check_failed);
     } else {
       const Class& type_class = Class::Handle(type_arg.type_class());
@@ -483,7 +487,7 @@
       const Class& instance_klass =
           Class::Handle(Isolate::Current()->class_table()->At(cid));
       if (load_field->slot().IsTypeArguments() && instance_klass.IsGeneric() &&
-          instance_klass.type_arguments_field_offset() ==
+          compiler::target::Class::TypeArgumentsFieldOffset(instance_klass) ==
               load_field->slot().offset_in_bytes()) {
         // This is a subset of Case c) above, namely forwarding the type
         // argument vector.
diff --git a/runtime/vm/type_testing_stubs_arm.cc b/runtime/vm/type_testing_stubs_arm.cc
index 30f1de07..28d8c7c 100644
--- a/runtime/vm/type_testing_stubs_arm.cc
+++ b/runtime/vm/type_testing_stubs_arm.cc
@@ -23,8 +23,10 @@
   BuildOptimizedTypeTestStubFastCases(assembler, hi, type, type_class,
                                       kInstanceReg, kClassIdReg);
 
-  __ ldr(CODE_REG, Address(THR, Thread::slow_type_test_stub_offset()));
-  __ Branch(FieldAddress(CODE_REG, Code::entry_point_offset()));
+  __ ldr(CODE_REG,
+         Address(THR, compiler::target::Thread::slow_type_test_stub_offset()));
+  __ Branch(
+      FieldAddress(CODE_REG, compiler::target::Code::entry_point_offset()));
 }
 
 void TypeTestingStubGenerator::
diff --git a/runtime/vm/unit_test.cc b/runtime/vm/unit_test.cc
index 168f264..880a945 100644
--- a/runtime/vm/unit_test.cc
+++ b/runtime/vm/unit_test.cc
@@ -685,6 +685,7 @@
     val = lib.EvaluateCompiledExpression(kernel_bytes, kernel_length,
                                          Array::empty_array(), param_values,
                                          TypeArguments::null_type_arguments());
+    free(const_cast<uint8_t*>(kernel_bytes));
   }
   return Api::NewHandle(thread, val.raw());
 }
diff --git a/runtime/vm/v8_snapshot_writer.cc b/runtime/vm/v8_snapshot_writer.cc
index 2ddd3e0..b8ef328 100644
--- a/runtime/vm/v8_snapshot_writer.cc
+++ b/runtime/vm/v8_snapshot_writer.cc
@@ -23,7 +23,7 @@
       node_types_(zone_),
       edge_types_(zone_),
       strings_(zone),
-      roots_(zone_, 100) {
+      roots_(zone_) {
   node_types_.Insert({"Unknown", kUnknown});
   node_types_.Insert({"ArtificialRoot", kArtificialRoot});
 
@@ -128,7 +128,7 @@
   // The artificial root has 'nullptr' edges, it actually points to all the
   // roots.
   writer->PrintValue64(info.edges != nullptr ? info.edges->length()
-                                             : roots_.length());
+                                             : roots_.Size());
   writer->PrintNewline();
 }
 
@@ -142,7 +142,15 @@
 
 void V8SnapshotProfileWriter::AddRoot(ObjectId object_id) {
   EnsureId(object_id);
-  roots_.Add(object_id);
+  // HeapSnapshotWorker.HeapSnapshot.calculateDistances (from HeapSnapshot.js)
+  // assumes that the root does not have more than one edge to any other node
+  // (most likely an oversight).
+  if (roots_.HasKey(object_id)) return;
+
+  ObjectIdToNodeInfoTraits::Pair pair;
+  pair.key = object_id;
+  pair.value = NodeInfo{0, 0, object_id, 0, nullptr, 0};
+  roots_.Insert(pair);
 }
 
 void V8SnapshotProfileWriter::WriteStringsTable(
@@ -210,7 +218,7 @@
 
     writer->PrintProperty64("node_count",
                             nodes_.Size() + 1 /* artificial root */);
-    writer->PrintProperty64("edge_count", edge_count_ + roots_.length());
+    writer->PrintProperty64("edge_count", edge_count_ + roots_.Size());
   }
   writer->CloseObject();
 
@@ -234,13 +242,14 @@
     writer->OpenArray("edges");
 
     // Write references from the artificial root to the actual roots.
-    for (intptr_t i = 0; i < roots_.length(); ++i) {
-      WriteEdgeInfo(writer, {kElement, i, roots_[i]});
+    ObjectIdToNodeInfoTraits::Pair* entry = nullptr;
+    auto roots_it = roots_.GetIterator();
+    for (int i = 0; (entry = roots_it.Next()) != nullptr; ++i) {
+      WriteEdgeInfo(writer, {kElement, i, entry->key});
     }
 
-    ObjectIdToNodeInfoTraits::Pair* entry = nullptr;
-    auto it = nodes_.GetIterator();
-    while ((entry = it.Next()) != nullptr) {
+    auto nodes_it = nodes_.GetIterator();
+    while ((entry = nodes_it.Next()) != nullptr) {
       for (intptr_t i = 0; i < entry->value.edges->length(); ++i) {
         WriteEdgeInfo(writer, entry->value.edges->At(i));
       }
diff --git a/runtime/vm/v8_snapshot_writer.h b/runtime/vm/v8_snapshot_writer.h
index fa9ee85..63d0617 100644
--- a/runtime/vm/v8_snapshot_writer.h
+++ b/runtime/vm/v8_snapshot_writer.h
@@ -10,6 +10,7 @@
 #include "platform/assert.h"
 #include "vm/allocation.h"
 #include "vm/hash_map.h"
+#include "vm/hash_table.h"
 #include "vm/json_writer.h"
 #include "vm/object.h"
 
@@ -201,7 +202,12 @@
   DirectChainedHashMap<StringToIntMapTraits> node_types_;
   DirectChainedHashMap<StringToIntMapTraits> edge_types_;
   DirectChainedHashMap<StringToIntMapTraits> strings_;
-  ZoneGrowableArray<ObjectId> roots_;
+
+  // We don't have a zone-allocated hash set, so we just re-use the type for
+  // nodes_ even though we don't need to access the node info (and fill it with
+  // dummy values).
+  DirectChainedHashMap<ObjectIdToNodeInfoTraits> roots_;
+
   size_t edge_count_ = 0;
 #endif
 };
diff --git a/runtime/vm/virtual_memory_posix.cc b/runtime/vm/virtual_memory_posix.cc
index fb1fff2..bf9833f 100644
--- a/runtime/vm/virtual_memory_posix.cc
+++ b/runtime/vm/virtual_memory_posix.cc
@@ -35,12 +35,29 @@
 DECLARE_FLAG(bool, dual_map_code);
 DECLARE_FLAG(bool, write_protect_code);
 
+#if defined(TARGET_OS_LINUX)
+DECLARE_FLAG(bool, generate_perf_events_symbols);
+DECLARE_FLAG(bool, generate_perf_jitdump);
+#endif
+
 uword VirtualMemory::page_size_ = 0;
 
 void VirtualMemory::Init() {
   page_size_ = getpagesize();
 
 #if defined(DUAL_MAPPING_SUPPORTED)
+// Perf is Linux-specific and the flags aren't defined in Product.
+#if defined(TARGET_OS_LINUX) && !defined(PRODUCT)
+  // Perf interacts strangely with memfds, leading it to sometimes collect
+  // garbled return addresses.
+  if (FLAG_generate_perf_events_symbols || FLAG_generate_perf_jitdump) {
+    LOG_INFO(
+        "Dual code mapping disabled to generate perf events or jitdump.\n");
+    FLAG_dual_map_code = false;
+    return;
+  }
+#endif
+
   // Detect dual mapping exec permission limitation on some platforms,
   // such as on docker containers, and disable dual mapping in this case.
   // Also detect for missing support of memfd_create syscall.
diff --git a/sdk/lib/_http/http.dart b/sdk/lib/_http/http.dart
index 4e7d636..1e2560f 100644
--- a/sdk/lib/_http/http.dart
+++ b/sdk/lib/_http/http.dart
@@ -1963,7 +1963,7 @@
   /// This specifies whether the response bytes were compressed when they were
   /// received across the wire and whether callers will receive compressed
   /// or uncompressed bytes when they listed to this response's byte stream.
-  @Since("2.3.2")
+  @Since("2.4")
   HttpClientResponseCompressionState get compressionState;
 
   /**
@@ -2055,7 +2055,7 @@
 ///  * Does the caller need to manually decompress the response's byte stream?
 ///
 /// This enum is accessed via the [HttpClientResponse.compressionState] value.
-@Since("2.3.2")
+@Since("2.4")
 enum HttpClientResponseCompressionState {
   /// The body of the HTTP response was received and remains in an uncompressed
   /// state.
diff --git a/sdk/lib/_http/websocket.dart b/sdk/lib/_http/websocket.dart
index 64dbeb1..5a949af 100644
--- a/sdk/lib/_http/websocket.dart
+++ b/sdk/lib/_http/websocket.dart
@@ -50,51 +50,78 @@
   static const int RESERVED_1015 = reserved1015;
 }
 
-/**
- * The [CompressionOptions] class allows you to control
- * the options of WebSocket compression.
- */
+/// Options controlling compression in a [WebSocket].
+///
+/// A [CompressionOptions] instance can be passed to [WebSocket.connect], or
+/// used in other similar places where [WebSocket] compression is configured.
+///
+/// In most cases the default [compressionDefault] is sufficient, but in some
+/// situations, it might be desirable to use different compression parameters,
+/// for example to preserve memory on small devices.
 class CompressionOptions {
-  /// Default WebSocket Compression options.
+  /// Default [WebSocket] compression configuration.
   ///
-  /// Compression will be enabled with the following options:
+  /// Enables compression with default window sizes and no reuse. This is the
+  /// default options used by [WebSocket.connect] if no [CompressionOptions] is
+  /// supplied.
   ///
   /// * `clientNoContextTakeover`: false
   /// * `serverNoContextTakeover`: false
-  /// * `clientMaxWindowBits`: 15
-  /// * `serverMaxWindowBits`: 15
+  /// * `clientMaxWindowBits`: null (default maximal window size of 15 bits)
+  /// * `serverMaxWindowBits`: null (default maximal window size of 15 bits)
   static const CompressionOptions compressionDefault =
       const CompressionOptions();
   @Deprecated("Use compressionDefault instead")
   static const CompressionOptions DEFAULT = compressionDefault;
 
-  /// Disables WebSocket Compression.
+  /// No-compression configuration.
+  ///
+  /// Disables compression when used as compression configuration for a
+  /// [WebSocket].
   static const CompressionOptions compressionOff =
       const CompressionOptions(enabled: false);
   @Deprecated("Use compressionOff instead")
   static const CompressionOptions OFF = compressionOff;
 
-  /// Controls whether the client will reuse its compression instances.
+  /// Whether the client will reuse its compression instances.
   final bool clientNoContextTakeover;
 
-  /// Controls whether the server will reuse its compression instances.
+  /// Whether the server will reuse its compression instances.
   final bool serverNoContextTakeover;
 
-  /// Determines the max window bits for the client.
+  /// The maximal window size bit count requested by the client.
+  ///
+  /// The windows size for the compression is always a power of two, so the
+  /// number of bits precisely determines the window size.
+  ///
+  /// If set to `null`, the client has no preference, and the compression can
+  /// use up to its default maximum window size of 15 bits depending on the
+  /// server's preference.
   final int clientMaxWindowBits;
 
-  /// Determines the max window bits for the server.
+  /// The maximal window size bit count requested by the server.
+  ///
+  /// The windows size for the compression is always a power of two, so the
+  /// number of bits precisely determines the window size.
+  ///
+  /// If set to `null`, the server has no preference, and the compression can
+  /// use up to its default maximum window size of 15 bits depending on the
+  /// client's preference.
   final int serverMaxWindowBits;
 
-  /// Enables or disables WebSocket compression.
+  /// Whether WebSocket compression is enabled.
+  ///
+  /// If not enabled, the remaining fields have no effect, and the
+  /// [compressionOff] instance can, and should, be reused instead of creating a
+  /// new instance with compression disabled.
   final bool enabled;
 
   const CompressionOptions(
-      {this.clientNoContextTakeover: false,
-      this.serverNoContextTakeover: false,
+      {this.clientNoContextTakeover = false,
+      this.serverNoContextTakeover = false,
       this.clientMaxWindowBits,
       this.serverMaxWindowBits,
-      this.enabled: true});
+      this.enabled = true});
 
   /// Parses list of requested server headers to return server compression
   /// response headers.
diff --git a/pkg/dev_compiler/tool/input_sdk/lib/js/dart2js/js_dart2js.dart b/sdk/lib/_internal/js_dev_runtime/lib/js/dart2js/js_dart2js.dart
similarity index 100%
rename from pkg/dev_compiler/tool/input_sdk/lib/js/dart2js/js_dart2js.dart
rename to sdk/lib/_internal/js_dev_runtime/lib/js/dart2js/js_dart2js.dart
diff --git a/pkg/dev_compiler/tool/input_sdk/lib/js_util/dart2js/js_util_dart2js.dart b/sdk/lib/_internal/js_dev_runtime/lib/js_util/dart2js/js_util_dart2js.dart
similarity index 100%
rename from pkg/dev_compiler/tool/input_sdk/lib/js_util/dart2js/js_util_dart2js.dart
rename to sdk/lib/_internal/js_dev_runtime/lib/js_util/dart2js/js_util_dart2js.dart
diff --git a/pkg/dev_compiler/tool/input_sdk/libraries.dart b/sdk/lib/_internal/js_dev_runtime/libraries.dart
similarity index 100%
rename from pkg/dev_compiler/tool/input_sdk/libraries.dart
rename to sdk/lib/_internal/js_dev_runtime/libraries.dart
diff --git a/pkg/dev_compiler/tool/input_sdk/patch/async_patch.dart b/sdk/lib/_internal/js_dev_runtime/patch/async_patch.dart
similarity index 100%
rename from pkg/dev_compiler/tool/input_sdk/patch/async_patch.dart
rename to sdk/lib/_internal/js_dev_runtime/patch/async_patch.dart
diff --git a/pkg/dev_compiler/tool/input_sdk/patch/cli_patch.dart b/sdk/lib/_internal/js_dev_runtime/patch/cli_patch.dart
similarity index 100%
rename from pkg/dev_compiler/tool/input_sdk/patch/cli_patch.dart
rename to sdk/lib/_internal/js_dev_runtime/patch/cli_patch.dart
diff --git a/pkg/dev_compiler/tool/input_sdk/patch/collection_patch.dart b/sdk/lib/_internal/js_dev_runtime/patch/collection_patch.dart
similarity index 100%
rename from pkg/dev_compiler/tool/input_sdk/patch/collection_patch.dart
rename to sdk/lib/_internal/js_dev_runtime/patch/collection_patch.dart
diff --git a/pkg/dev_compiler/tool/input_sdk/patch/convert_patch.dart b/sdk/lib/_internal/js_dev_runtime/patch/convert_patch.dart
similarity index 100%
rename from pkg/dev_compiler/tool/input_sdk/patch/convert_patch.dart
rename to sdk/lib/_internal/js_dev_runtime/patch/convert_patch.dart
diff --git a/pkg/dev_compiler/tool/input_sdk/patch/core_patch.dart b/sdk/lib/_internal/js_dev_runtime/patch/core_patch.dart
similarity index 100%
rename from pkg/dev_compiler/tool/input_sdk/patch/core_patch.dart
rename to sdk/lib/_internal/js_dev_runtime/patch/core_patch.dart
diff --git a/pkg/dev_compiler/tool/input_sdk/patch/developer_patch.dart b/sdk/lib/_internal/js_dev_runtime/patch/developer_patch.dart
similarity index 100%
rename from pkg/dev_compiler/tool/input_sdk/patch/developer_patch.dart
rename to sdk/lib/_internal/js_dev_runtime/patch/developer_patch.dart
diff --git a/pkg/dev_compiler/tool/input_sdk/patch/internal_patch.dart b/sdk/lib/_internal/js_dev_runtime/patch/internal_patch.dart
similarity index 100%
rename from pkg/dev_compiler/tool/input_sdk/patch/internal_patch.dart
rename to sdk/lib/_internal/js_dev_runtime/patch/internal_patch.dart
diff --git a/pkg/dev_compiler/tool/input_sdk/patch/io_patch.dart b/sdk/lib/_internal/js_dev_runtime/patch/io_patch.dart
similarity index 100%
rename from pkg/dev_compiler/tool/input_sdk/patch/io_patch.dart
rename to sdk/lib/_internal/js_dev_runtime/patch/io_patch.dart
diff --git a/pkg/dev_compiler/tool/input_sdk/patch/isolate_patch.dart b/sdk/lib/_internal/js_dev_runtime/patch/isolate_patch.dart
similarity index 91%
rename from pkg/dev_compiler/tool/input_sdk/patch/isolate_patch.dart
rename to sdk/lib/_internal/js_dev_runtime/patch/isolate_patch.dart
index 9ccdada..f6aa73bb 100644
--- a/pkg/dev_compiler/tool/input_sdk/patch/isolate_patch.dart
+++ b/sdk/lib/_internal/js_dev_runtime/patch/isolate_patch.dart
@@ -6,6 +6,7 @@
 
 import 'dart:_js_helper' show patch, NoReifyGeneric;
 import 'dart:async';
+import "dart:typed_data" show TypedData;
 
 @patch
 class Isolate {
@@ -23,13 +24,8 @@
   @patch
   static Future<Uri> get packageConfig => _unsupported();
 
-  static Uri _packageBase = Uri.base.resolve('packages/');
-
   @patch
-  static Future<Uri> resolvePackageUri(Uri packageUri) async {
-    if (packageUri.scheme != 'package') return packageUri;
-    return _packageBase.resolveUri(packageUri.replace(scheme: ''));
-  }
+  static Future<Uri> resolvePackageUri(Uri packageUri) => _unsupported();
 
   @patch
   static Future<Isolate> spawn<T>(void entryPoint(T message), T message,
@@ -116,6 +112,13 @@
   factory Capability() => _unsupported();
 }
 
+@patch
+abstract class TransferableTypedData {
+  @patch
+  factory TransferableTypedData.fromList(List<TypedData> list) =>
+      _unsupported();
+}
+
 @NoReifyGeneric()
 T _unsupported<T>() {
   throw UnsupportedError('dart:isolate is not supported on dart4web');
diff --git a/pkg/dev_compiler/tool/input_sdk/patch/math_patch.dart b/sdk/lib/_internal/js_dev_runtime/patch/math_patch.dart
similarity index 100%
rename from pkg/dev_compiler/tool/input_sdk/patch/math_patch.dart
rename to sdk/lib/_internal/js_dev_runtime/patch/math_patch.dart
diff --git a/pkg/dev_compiler/tool/input_sdk/patch/mirrors_patch.dart b/sdk/lib/_internal/js_dev_runtime/patch/mirrors_patch.dart
similarity index 100%
rename from pkg/dev_compiler/tool/input_sdk/patch/mirrors_patch.dart
rename to sdk/lib/_internal/js_dev_runtime/patch/mirrors_patch.dart
diff --git a/pkg/dev_compiler/tool/input_sdk/patch/typed_data_patch.dart b/sdk/lib/_internal/js_dev_runtime/patch/typed_data_patch.dart
similarity index 100%
rename from pkg/dev_compiler/tool/input_sdk/patch/typed_data_patch.dart
rename to sdk/lib/_internal/js_dev_runtime/patch/typed_data_patch.dart
diff --git a/pkg/dev_compiler/tool/input_sdk/private/annotations.dart b/sdk/lib/_internal/js_dev_runtime/private/annotations.dart
similarity index 100%
rename from pkg/dev_compiler/tool/input_sdk/private/annotations.dart
rename to sdk/lib/_internal/js_dev_runtime/private/annotations.dart
diff --git a/pkg/dev_compiler/tool/input_sdk/private/custom_hash_map.dart b/sdk/lib/_internal/js_dev_runtime/private/custom_hash_map.dart
similarity index 100%
rename from pkg/dev_compiler/tool/input_sdk/private/custom_hash_map.dart
rename to sdk/lib/_internal/js_dev_runtime/private/custom_hash_map.dart
diff --git a/pkg/dev_compiler/tool/input_sdk/private/ddc_runtime/classes.dart b/sdk/lib/_internal/js_dev_runtime/private/ddc_runtime/classes.dart
similarity index 100%
rename from pkg/dev_compiler/tool/input_sdk/private/ddc_runtime/classes.dart
rename to sdk/lib/_internal/js_dev_runtime/private/ddc_runtime/classes.dart
diff --git a/pkg/dev_compiler/tool/input_sdk/private/ddc_runtime/errors.dart b/sdk/lib/_internal/js_dev_runtime/private/ddc_runtime/errors.dart
similarity index 100%
rename from pkg/dev_compiler/tool/input_sdk/private/ddc_runtime/errors.dart
rename to sdk/lib/_internal/js_dev_runtime/private/ddc_runtime/errors.dart
diff --git a/pkg/dev_compiler/tool/input_sdk/private/ddc_runtime/operations.dart b/sdk/lib/_internal/js_dev_runtime/private/ddc_runtime/operations.dart
similarity index 100%
rename from pkg/dev_compiler/tool/input_sdk/private/ddc_runtime/operations.dart
rename to sdk/lib/_internal/js_dev_runtime/private/ddc_runtime/operations.dart
diff --git a/pkg/dev_compiler/tool/input_sdk/private/ddc_runtime/rtti.dart b/sdk/lib/_internal/js_dev_runtime/private/ddc_runtime/rtti.dart
similarity index 100%
rename from pkg/dev_compiler/tool/input_sdk/private/ddc_runtime/rtti.dart
rename to sdk/lib/_internal/js_dev_runtime/private/ddc_runtime/rtti.dart
diff --git a/pkg/dev_compiler/tool/input_sdk/private/ddc_runtime/runtime.dart b/sdk/lib/_internal/js_dev_runtime/private/ddc_runtime/runtime.dart
similarity index 100%
rename from pkg/dev_compiler/tool/input_sdk/private/ddc_runtime/runtime.dart
rename to sdk/lib/_internal/js_dev_runtime/private/ddc_runtime/runtime.dart
diff --git a/pkg/dev_compiler/tool/input_sdk/private/ddc_runtime/types.dart b/sdk/lib/_internal/js_dev_runtime/private/ddc_runtime/types.dart
similarity index 100%
rename from pkg/dev_compiler/tool/input_sdk/private/ddc_runtime/types.dart
rename to sdk/lib/_internal/js_dev_runtime/private/ddc_runtime/types.dart
diff --git a/pkg/dev_compiler/tool/input_sdk/private/ddc_runtime/utils.dart b/sdk/lib/_internal/js_dev_runtime/private/ddc_runtime/utils.dart
similarity index 100%
rename from pkg/dev_compiler/tool/input_sdk/private/ddc_runtime/utils.dart
rename to sdk/lib/_internal/js_dev_runtime/private/ddc_runtime/utils.dart
diff --git a/pkg/dev_compiler/tool/input_sdk/private/debugger.dart b/sdk/lib/_internal/js_dev_runtime/private/debugger.dart
similarity index 100%
rename from pkg/dev_compiler/tool/input_sdk/private/debugger.dart
rename to sdk/lib/_internal/js_dev_runtime/private/debugger.dart
diff --git a/pkg/dev_compiler/tool/input_sdk/private/foreign_helper.dart b/sdk/lib/_internal/js_dev_runtime/private/foreign_helper.dart
similarity index 100%
rename from pkg/dev_compiler/tool/input_sdk/private/foreign_helper.dart
rename to sdk/lib/_internal/js_dev_runtime/private/foreign_helper.dart
diff --git a/pkg/dev_compiler/tool/input_sdk/private/identity_hash_map.dart b/sdk/lib/_internal/js_dev_runtime/private/identity_hash_map.dart
similarity index 100%
rename from pkg/dev_compiler/tool/input_sdk/private/identity_hash_map.dart
rename to sdk/lib/_internal/js_dev_runtime/private/identity_hash_map.dart
diff --git a/pkg/dev_compiler/tool/input_sdk/private/interceptors.dart b/sdk/lib/_internal/js_dev_runtime/private/interceptors.dart
similarity index 100%
rename from pkg/dev_compiler/tool/input_sdk/private/interceptors.dart
rename to sdk/lib/_internal/js_dev_runtime/private/interceptors.dart
diff --git a/pkg/dev_compiler/tool/input_sdk/private/isolate_helper.dart b/sdk/lib/_internal/js_dev_runtime/private/isolate_helper.dart
similarity index 100%
rename from pkg/dev_compiler/tool/input_sdk/private/isolate_helper.dart
rename to sdk/lib/_internal/js_dev_runtime/private/isolate_helper.dart
diff --git a/pkg/dev_compiler/tool/input_sdk/private/js_array.dart b/sdk/lib/_internal/js_dev_runtime/private/js_array.dart
similarity index 100%
rename from pkg/dev_compiler/tool/input_sdk/private/js_array.dart
rename to sdk/lib/_internal/js_dev_runtime/private/js_array.dart
diff --git a/pkg/dev_compiler/tool/input_sdk/private/js_helper.dart b/sdk/lib/_internal/js_dev_runtime/private/js_helper.dart
similarity index 100%
rename from pkg/dev_compiler/tool/input_sdk/private/js_helper.dart
rename to sdk/lib/_internal/js_dev_runtime/private/js_helper.dart
diff --git a/pkg/dev_compiler/tool/input_sdk/private/js_mirrors.dart b/sdk/lib/_internal/js_dev_runtime/private/js_mirrors.dart
similarity index 100%
rename from pkg/dev_compiler/tool/input_sdk/private/js_mirrors.dart
rename to sdk/lib/_internal/js_dev_runtime/private/js_mirrors.dart
diff --git a/pkg/dev_compiler/tool/input_sdk/private/js_number.dart b/sdk/lib/_internal/js_dev_runtime/private/js_number.dart
similarity index 100%
rename from pkg/dev_compiler/tool/input_sdk/private/js_number.dart
rename to sdk/lib/_internal/js_dev_runtime/private/js_number.dart
diff --git a/pkg/dev_compiler/tool/input_sdk/private/js_primitives.dart b/sdk/lib/_internal/js_dev_runtime/private/js_primitives.dart
similarity index 100%
rename from pkg/dev_compiler/tool/input_sdk/private/js_primitives.dart
rename to sdk/lib/_internal/js_dev_runtime/private/js_primitives.dart
diff --git a/pkg/dev_compiler/tool/input_sdk/private/js_rti.dart b/sdk/lib/_internal/js_dev_runtime/private/js_rti.dart
similarity index 100%
rename from pkg/dev_compiler/tool/input_sdk/private/js_rti.dart
rename to sdk/lib/_internal/js_dev_runtime/private/js_rti.dart
diff --git a/pkg/dev_compiler/tool/input_sdk/private/js_string.dart b/sdk/lib/_internal/js_dev_runtime/private/js_string.dart
similarity index 100%
rename from pkg/dev_compiler/tool/input_sdk/private/js_string.dart
rename to sdk/lib/_internal/js_dev_runtime/private/js_string.dart
diff --git a/pkg/dev_compiler/tool/input_sdk/private/linked_hash_map.dart b/sdk/lib/_internal/js_dev_runtime/private/linked_hash_map.dart
similarity index 100%
rename from pkg/dev_compiler/tool/input_sdk/private/linked_hash_map.dart
rename to sdk/lib/_internal/js_dev_runtime/private/linked_hash_map.dart
diff --git a/pkg/dev_compiler/tool/input_sdk/private/mirror_helper.dart b/sdk/lib/_internal/js_dev_runtime/private/mirror_helper.dart
similarity index 100%
rename from pkg/dev_compiler/tool/input_sdk/private/mirror_helper.dart
rename to sdk/lib/_internal/js_dev_runtime/private/mirror_helper.dart
diff --git a/pkg/dev_compiler/tool/input_sdk/private/native_helper.dart b/sdk/lib/_internal/js_dev_runtime/private/native_helper.dart
similarity index 100%
rename from pkg/dev_compiler/tool/input_sdk/private/native_helper.dart
rename to sdk/lib/_internal/js_dev_runtime/private/native_helper.dart
diff --git a/pkg/dev_compiler/tool/input_sdk/private/native_typed_data.dart b/sdk/lib/_internal/js_dev_runtime/private/native_typed_data.dart
similarity index 100%
rename from pkg/dev_compiler/tool/input_sdk/private/native_typed_data.dart
rename to sdk/lib/_internal/js_dev_runtime/private/native_typed_data.dart
diff --git a/pkg/dev_compiler/tool/input_sdk/private/preambles/README b/sdk/lib/_internal/js_dev_runtime/private/preambles/README
similarity index 100%
rename from pkg/dev_compiler/tool/input_sdk/private/preambles/README
rename to sdk/lib/_internal/js_dev_runtime/private/preambles/README
diff --git a/pkg/dev_compiler/tool/input_sdk/private/preambles/d8.js b/sdk/lib/_internal/js_dev_runtime/private/preambles/d8.js
similarity index 100%
rename from pkg/dev_compiler/tool/input_sdk/private/preambles/d8.js
rename to sdk/lib/_internal/js_dev_runtime/private/preambles/d8.js
diff --git a/pkg/dev_compiler/tool/input_sdk/private/preambles/jsshell.js b/sdk/lib/_internal/js_dev_runtime/private/preambles/jsshell.js
similarity index 100%
rename from pkg/dev_compiler/tool/input_sdk/private/preambles/jsshell.js
rename to sdk/lib/_internal/js_dev_runtime/private/preambles/jsshell.js
diff --git a/pkg/dev_compiler/tool/input_sdk/private/profile.dart b/sdk/lib/_internal/js_dev_runtime/private/profile.dart
similarity index 100%
rename from pkg/dev_compiler/tool/input_sdk/private/profile.dart
rename to sdk/lib/_internal/js_dev_runtime/private/profile.dart
diff --git a/pkg/dev_compiler/tool/input_sdk/private/regexp_helper.dart b/sdk/lib/_internal/js_dev_runtime/private/regexp_helper.dart
similarity index 100%
rename from pkg/dev_compiler/tool/input_sdk/private/regexp_helper.dart
rename to sdk/lib/_internal/js_dev_runtime/private/regexp_helper.dart
diff --git a/pkg/dev_compiler/tool/input_sdk/private/string_helper.dart b/sdk/lib/_internal/js_dev_runtime/private/string_helper.dart
similarity index 100%
rename from pkg/dev_compiler/tool/input_sdk/private/string_helper.dart
rename to sdk/lib/_internal/js_dev_runtime/private/string_helper.dart
diff --git a/sdk/lib/_internal/js_runtime/lib/core_patch.dart b/sdk/lib/_internal/js_runtime/lib/core_patch.dart
index d0a1215..5fc220c 100644
--- a/sdk/lib/_internal/js_runtime/lib/core_patch.dart
+++ b/sdk/lib/_internal/js_runtime/lib/core_patch.dart
@@ -740,15 +740,6 @@
   }
 }
 
-Uri _resolvePackageUri(Uri packageUri) {
-  assert(packageUri.scheme == "package");
-  if (packageUri.hasAuthority) {
-    throw new ArgumentError("Package-URI must not have a host: $packageUri");
-  }
-  var resolved = Uri.base.resolve("packages/${packageUri.path}");
-  return resolved;
-}
-
 bool _hasErrorStackProperty = JS('bool', 'new Error().stack != void 0');
 
 @patch
diff --git a/sdk/lib/_internal/js_runtime/lib/isolate_patch.dart b/sdk/lib/_internal/js_runtime/lib/isolate_patch.dart
index 56bab4c..d781e7a 100644
--- a/sdk/lib/_internal/js_runtime/lib/isolate_patch.dart
+++ b/sdk/lib/_internal/js_runtime/lib/isolate_patch.dart
@@ -7,6 +7,7 @@
 import "dart:async";
 import 'dart:_foreign_helper' show JS;
 import 'dart:_js_helper' show patch;
+import "dart:typed_data" show ByteData, TypedData, Uint8List;
 
 @patch
 class Isolate {
@@ -32,11 +33,7 @@
 
   @patch
   static Future<Uri> resolvePackageUri(Uri packageUri) {
-    if (packageUri.scheme != 'package') {
-      return new Future<Uri>.value(packageUri);
-    }
-    return new Future<Uri>.value(
-        _packagesBase.resolveUri(packageUri.replace(scheme: '')));
+    throw new UnsupportedError("Isolate.resolvePackageUri");
   }
 
   @patch
@@ -146,9 +143,10 @@
   }
 }
 
-/// Returns the base path added to Uri.base to resolve `package:` Uris.
-///
-/// This is used by `Isolate.resolvePackageUri` to load resources. The default
-/// value is `packages/` but users can override this by using the
-/// `defaultPackagesBase` hook.
-Uri _packagesBase = Uri.base.resolve(JS('String', r'self.defaultPackagesBase'));
+@patch
+abstract class TransferableTypedData {
+  @patch
+  factory TransferableTypedData.fromList(List<TypedData> list) {
+    throw new UnsupportedError('TransferableTypedData.fromList');
+  }
+}
diff --git a/sdk/lib/_internal/js_runtime/lib/js_helper.dart b/sdk/lib/_internal/js_runtime/lib/js_helper.dart
index 7205568..beee35b 100644
--- a/sdk/lib/_internal/js_runtime/lib/js_helper.dart
+++ b/sdk/lib/_internal/js_runtime/lib/js_helper.dart
@@ -59,6 +59,8 @@
         unmangleGlobalNameIfPreservedAnyways,
         unmangleAllIdentifiersIfPreservedAnyways;
 
+import 'dart:_rti' as newRti show getRuntimeType;
+
 part 'annotations.dart';
 part 'constant_map.dart';
 part 'instantiation.dart';
diff --git a/sdk/lib/_internal/js_runtime/lib/js_rti.dart b/sdk/lib/_internal/js_runtime/lib/js_rti.dart
index e4b0f9d..6250aa0 100644
--- a/sdk/lib/_internal/js_runtime/lib/js_rti.dart
+++ b/sdk/lib/_internal/js_runtime/lib/js_rti.dart
@@ -391,6 +391,7 @@
 }
 
 Type getRuntimeType(var object) {
+  if (JS_GET_FLAG('USE_NEW_RTI')) return newRti.getRuntimeType(object);
   return new TypeImpl(getRti(object));
 }
 
diff --git a/sdk/lib/_internal/js_runtime/lib/rti.dart b/sdk/lib/_internal/js_runtime/lib/rti.dart
new file mode 100644
index 0000000..574cd52
--- /dev/null
+++ b/sdk/lib/_internal/js_runtime/lib/rti.dart
@@ -0,0 +1,660 @@
+// 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 library contains support for runtime type information.
+library rti;
+
+import 'dart:_foreign_helper' show JS;
+import 'dart:_interceptors' show JSArray, JSUnmodifiableArray;
+
+/// An Rti object represents both a type (e.g `Map<int, String>`) and a type
+/// environment (`Map<int, String>` binds `Map.K=int` and `Map.V=String`).
+///
+/// There is a single [Rti] class to help reduce polymorphism in the JavaScript
+/// runtime. The class has a default constructor and no final fields so it can
+/// be created before much of the runtime exists.
+///
+/// The fields are declared in an order that gets shorter minified names for the
+/// more commonly used fields. (TODO: we should exploit the fact that an Rti
+/// instance never appears in a dynamic context, so does not need field names to
+/// be distinct from dynamic selectors).
+///
+class Rti {
+  /// JavaScript method for 'as' check. The method is called from generated code,
+  /// e.g. `o as T` generates something like `rtiForT._as(o)`.
+  @pragma('dart2js:noElision')
+  dynamic _as;
+
+  /// JavaScript method for type check.  The method is called from generated
+  /// code, e.g. parameter check for `T param` generates something like
+  /// `rtiForT._check(param)`.
+  @pragma('dart2js:noElision')
+  dynamic _check;
+
+  /// JavaScript method for 'is' test.  The method is called from generated
+  /// code, e.g. `o is T` generates something like `rtiForT._is(o)`.
+  @pragma('dart2js:noElision')
+  dynamic _is;
+
+  static void _setAsCheckFunction(Rti rti, fn) {
+    rti._as = fn;
+  }
+
+  static void _setTypeCheckFunction(Rti rti, fn) {
+    rti._check = fn;
+  }
+
+  static void _setIsTestFunction(Rti rti, fn) {
+    rti._is = fn;
+  }
+
+  /// Method called from generated code to evaluate a type environment recipe in
+  /// `this` type environment.
+  Rti _eval(String recipe) => _rtiEval(this, recipe);
+
+  /// Method called from generated code to extend `this` type environment with a
+  /// function type parameter.
+  Rti _bind1(Rti type) => _rtiBind1(this, type);
+
+  /// Method called from generated code to extend `this` type environment with a
+  /// tuple of function type parameters.
+  Rti _bind(Rti typeTuple) => _rtiBind(this, typeTuple);
+
+  // Precomputed derived types. These fields are used to hold derived types that
+  // are computed eagerly.
+  // TODO(sra): Implement precomputed type optimizations.
+  dynamic _precomputed1;
+  dynamic _precomputed2;
+  dynamic _precomputed3;
+  dynamic _precomputed4;
+
+  // The Type object corresponding to this Rti.
+  Type _typeCache;
+
+  /// The kind of Rti `this` is, one of the kindXXX constants below.
+  ///
+  /// We don't use an enum since we need to create Rti objects very early.
+  ///
+  /// The zero initializer ensures dart2js type analysis considers [_kind] is
+  /// non-nullable.
+  int _kind = 0;
+
+  static int _getKind(Rti rti) => rti._kind;
+  static void _setKind(Rti rti, int kind) {
+    rti._kind = kind;
+  }
+
+  // Terminal terms.
+  static const kindNever = 1;
+  static const kindDynamic = 2;
+  static const kindVoid = 3; // TODO(sra): Use `dynamic` instead?
+  static const kindAny = 4; // Dart1-style 'dynamic' for JS-interop.
+  // Unary terms.
+  static const kindStar = 5;
+  static const kindQuestion = 6;
+  static const kindFutureOr = 7;
+  // More complex terms.
+  static const kindInterface = 8;
+  // A vector of type parameters from enclosing functions and closures.
+  static const kindBinding = 9;
+  static const kindFunction = 10;
+  static const kindGenericFunction = 11;
+
+  /// Primary data associated with type.
+  ///
+  /// - Minified name of interface for interface types.
+  /// - Underlying type for unary terms.
+  /// - Class part of a type environment inside a generic class, or `null` for
+  ///   type tuple.
+  /// - Return type of function types.
+  dynamic _primary;
+
+  static Object _getPrimary(Rti rti) => rti._primary;
+  static void _setPrimary(Rti rti, value) {
+    rti._primary = value;
+  }
+
+  /// Additional data associated with type.
+  ///
+  /// - The type arguments of an interface type.
+  /// - The type arguments from enclosing functions and closures for a
+  ///   kindBinding.
+  /// - TBD for kindFunction and kindGenericFunction.
+  dynamic _rest;
+
+  static Object _getRest(Rti rti) => rti._rest;
+  static void _setRest(Rti rti, value) {
+    rti._rest = value;
+  }
+
+  static String _getInterfaceName(Rti rti) {
+    assert(_getKind(rti) == kindInterface);
+    return _Utils.asString(_getPrimary(rti));
+  }
+
+  static JSArray _getInterfaceTypeArguments(rti) {
+    // The array is a plain JavaScript Array, otherwise we would need the type
+    // `JSArray<Rti>` to exist before we could create the type `JSArray<Rti>`.
+    assert(_getKind(rti) == kindInterface);
+    return JS('JSUnmodifiableArray', '#', _getRest(rti));
+  }
+
+  /// On [Rti]s that are type environments, derived types are cached on the
+  /// environment to ensure fast canonicalization. Ground-term types (i.e. not
+  /// dependent on class or function type parameters) are cached in the
+  /// universe. This field starts as `null` and the cache is created on demand.
+  Object _evalCache;
+
+  static Object _getEvalCache(Rti rti) => rti._evalCache;
+  static void _setEvalCache(Rti rti, value) {
+    rti._evalCache = value;
+  }
+
+  static Rti allocate() {
+    return new Rti();
+  }
+
+  String _canonicalRecipe;
+
+  static String _getCanonicalRecipe(Rti rti) {
+    var s = rti._canonicalRecipe;
+    assert(_Utils.isString(s), 'Missing canonical recipe');
+    return _Utils.asString(s);
+  }
+
+  static void _setCanonicalRecipe(Rti rti, String s) {
+    rti._canonicalRecipe = s;
+  }
+}
+
+Rti _rtiEval(Rti environment, String recipe) {
+  throw UnimplementedError('_rtiEval');
+}
+
+Rti _rtiBind1(Rti environment, Rti type) {
+  throw UnimplementedError('_rtiBind1');
+}
+
+Rti _rtiBind(Rti environment, Rti typeTuple) {
+  throw UnimplementedError('_rtiBind');
+}
+
+Type getRuntimeType(object) {
+  throw UnimplementedError('getRuntimeType');
+}
+
+String _rtiToString(Rti rti, List<String> genericContext) {
+  int kind = Rti._getKind(rti);
+  if (kind == Rti.kindDynamic) return 'dynamic';
+  if (kind == Rti.kindInterface) {
+    String name = Rti._getInterfaceName(rti);
+    var arguments = Rti._getInterfaceTypeArguments(rti);
+    if (arguments.length != 0) {
+      name += '<';
+      for (int i = 0; i < arguments.length; i++) {
+        if (i > 0) name += ', ';
+        name += _rtiToString(_castToRti(arguments[i]), genericContext);
+      }
+      name += '>';
+    }
+    return name;
+  }
+  return '?';
+}
+
+/// Class of static methods for the universe of Rti objects.
+///
+/// The universe is the manager object for the Rti instances.
+///
+/// The universe itself is allocated at startup before any types or Dart objects
+/// can be created, so it does not have a Dart type.
+class _Universe {
+  _Universe._() {
+    throw UnimplementedError('_Universe is static methods only');
+  }
+
+  @pragma('dart2js:noInline')
+  static Object create() {
+    // TODO(sra): For consistency, this expression should be a JS_BUILTIN that
+    // uses the same template as emitted by the emitter.
+    return JS(
+        '',
+        '{'
+            'evalCache: new Map(),'
+            'unprocessedRules:[],'
+            'a0:[],' // shared empty array.
+            '}');
+  }
+
+  // Field accessors.
+
+  static evalCache(universe) => JS('', '#.evalCache', universe);
+
+  static void addRules(universe, String rules) {
+    JS('', '#.unprocessedRules.push(#)', universe, rules);
+  }
+
+  static Object sharedEmptyArray(universe) => JS('JSArray', '#.a0', universe);
+
+  /// Evaluates [recipe] in the global environment.
+  static Rti eval(Object universe, String recipe) {
+    var cache = evalCache(universe);
+    var probe = _cacheGet(cache, recipe);
+    if (probe != null) return _castToRti(probe);
+    var rti = _parseRecipe(universe, null, recipe);
+    _cacheSet(cache, recipe, rti);
+    return rti;
+  }
+
+  static Rti evalInEnvironment(
+      Object universe, Rti environment, String recipe) {
+    var cache = Rti._getEvalCache(environment);
+    if (cache == null) {
+      cache = JS('', 'new Map()');
+      Rti._setEvalCache(environment, cache);
+    }
+    var probe = _cacheGet(cache, recipe);
+    if (probe != null) return _castToRti(probe);
+    var rti = _parseRecipe(universe, environment, recipe);
+    _cacheSet(cache, recipe, rti);
+    return rti;
+  }
+
+  static Rti evalTypeVariable(Object universe, Rti environment, String name) {
+    throw UnimplementedError('_Universe.evalTypeVariable("$name")');
+  }
+
+  static _cacheGet(cache, key) => JS('', '#.get(#)', cache, key);
+  static void _cacheSet(cache, key, value) {
+    JS('', '#.set(#, #)', cache, key, value);
+  }
+
+  static Rti _parseRecipe(Object universe, Object environment, String recipe) {
+    var parser = _Parser.create(universe, environment, recipe);
+    Rti rti = _Parser.parse(parser);
+    if (rti != null) return rti;
+    throw UnimplementedError('_Universe._parseRecipe("$recipe")');
+  }
+
+  static Rti _finishRti(Object universe, Rti rti) {
+    // Enter fresh Rti in global table under it's canonical recipe.
+    String key = Rti._getCanonicalRecipe(rti);
+    _cacheSet(evalCache(universe), key, rti);
+
+    // Set up methods to type tests.
+    // TODO(sra): These are for `dynamic`. Install general functions and
+    // specializations.
+    var alwaysPasses = JS('', 'function(o) { return o; }');
+    Rti._setAsCheckFunction(rti, alwaysPasses);
+    Rti._setTypeCheckFunction(rti, alwaysPasses);
+    Rti._setIsTestFunction(rti, JS('', 'function(o) { return true; }'));
+
+    return rti;
+  }
+
+  // For each kind of Rti there are three methods:
+  //
+  // * `lookupXXX` which takes the component parts and returns an existing Rti
+  //   object if it exists.
+  // * `canonicalRecipeOfXXX` that returns the compositional canonical recipe
+  //   for the proposed type.
+  // * `createXXX` to create the type if it does not exist.
+
+  static String _canonicalRecipeOfDynamic() => '@';
+
+  static Rti _lookupDynamicRti(universe) {
+    var cache = evalCache(universe);
+    var probe = _cacheGet(cache, _canonicalRecipeOfDynamic());
+    if (probe != null) return _castToRti(probe);
+    return _createDynamicRti(universe);
+  }
+
+  static Rti _createDynamicRti(Object universe) {
+    var rti = Rti.allocate();
+    Rti._setKind(rti, Rti.kindDynamic);
+    Rti._setCanonicalRecipe(rti, _canonicalRecipeOfDynamic());
+    return _finishRti(universe, rti);
+  }
+
+  static String _canonicalRecipeOfInterface(String name, Object arguments) {
+    assert(_Utils.isString(name));
+    String s = _Utils.asString(name);
+    int length = _Utils.arrayLength(arguments);
+    if (length != 0) {
+      s += '<';
+      for (int i = 0; i < length; i++) {
+        if (i > 0) s += ',';
+        Rti argument = _castToRti(_Utils.arrayAt(arguments, i));
+        String subrecipe = Rti._getCanonicalRecipe(argument);
+        s += subrecipe;
+      }
+      s += '>';
+    }
+    return s;
+  }
+
+  static Rti _lookupInterfaceRti(
+      Object universe, String name, Object arguments) {
+    String key = _canonicalRecipeOfInterface(name, arguments);
+    var cache = evalCache(universe);
+    var probe = _cacheGet(cache, key);
+    if (probe != null) return _castToRti(probe);
+    return _createInterfaceRti(universe, name, arguments, key);
+  }
+
+  static Rti _createInterfaceRti(
+      Object universe, String name, Object typeArguments, String key) {
+    var rti = Rti.allocate();
+    Rti._setKind(rti, Rti.kindInterface);
+    Rti._setPrimary(rti, name);
+    Rti._setRest(rti, typeArguments);
+    Rti._setCanonicalRecipe(rti, key);
+    return _finishRti(universe, rti);
+  }
+}
+
+/// Class of static methods implementing recipe parser.
+///
+/// The recipe is a sequence of operations on a stack machine. The operations
+/// are described below using the format
+///
+///      operation: stack elements before --- stack elements after
+///
+/// integer:  --- integer-value
+///
+/// identifier:  --- string-value
+///
+/// identifier-with-one-period:  --- type-variable-value
+///
+///   Period may be in any position, including first and last e.g. `.x`.
+///
+/// ',': ignored
+///
+///   Used to separate elements.
+///
+/// '@': --- dynamicType
+///
+/// '?':  type  ---  type?
+///
+/// '<':  --- position
+///
+///   Saves (pushes) position register, sets position register to end of stack.
+///
+/// '>':  name saved-position type ... type  ---  name<type, ..., type>
+///
+///   Creates interface type from name types pushed since the position register
+///   was last set. Restores position register to previous saved value.
+///
+class _Parser {
+  _Parser._() {
+    throw UnimplementedError('_Parser is static methods only');
+  }
+
+  /// Creates a parser object for parsing a recipe against an environment in a
+  /// universe.
+  ///
+  /// Marked as no-inline so the object literal is not cloned by inlining.
+  @pragma('dart2js:noInline')
+  static Object create(Object universe, Object environment, String recipe) {
+    return JS(
+        '',
+        '{'
+            'u:#,' // universe
+            'e:#,' // environment
+            'r:#,' // recipe
+            's:[],' // stack
+            'p:0,' // position of sequence start.
+            '}',
+        universe,
+        environment,
+        recipe);
+  }
+
+  // Field accessors for the parser.
+  static Object universe(Object parser) => JS('String', '#.u', parser);
+  static Rti environment(Object parser) => JS('Rti', '#.e', parser);
+  static String recipe(Object parser) => JS('String', '#.r', parser);
+  static Object stack(Object parser) => JS('', '#.s', parser);
+  static Object position(Object parser) => JS('int', '#.p', parser);
+  static void setPosition(Object parser, int p) {
+    JS('', '#.p = #', parser, p);
+  }
+
+  static int charCodeAt(String s, int i) => JS('int', '#.charCodeAt(#)', s, i);
+  static void push(Object stack, Object value) {
+    JS('', '#.push(#)', stack, value);
+  }
+
+  static Object pop(Object stack) => JS('', '#.pop()', stack);
+
+  static Rti parse(Object parser) {
+    String source = _Parser.recipe(parser);
+    var stack = _Parser.stack(parser);
+    int i = 0;
+    while (i < source.length) {
+      int ch = charCodeAt(source, i);
+      if (isDigit(ch)) {
+        i = handleDigit(i + 1, ch, source, stack);
+      } else if (isIdentifierStart(ch)) {
+        i = handleIdentifer(parser, i, source, stack, false);
+      } else if (ch == $PERIOD) {
+        i = handleIdentifer(parser, i, source, stack, true);
+      } else {
+        i++;
+        switch (ch) {
+          case $COMMA:
+            // ignored
+            break;
+
+          case $AT:
+            push(stack, _Universe._lookupDynamicRti(universe(parser)));
+            break;
+
+          case $LT:
+            push(stack, position(parser));
+            setPosition(parser, _Utils.arrayLength(stack));
+            break;
+
+          case $GT:
+            handleGenericInterfaceType(parser, stack);
+            break;
+
+          default:
+            JS('', 'throw "Bad character " + #', ch);
+        }
+      }
+    }
+    Object item = pop(stack);
+    return toType(universe(parser), environment(parser), item);
+  }
+
+  static int handleDigit(int i, int digit, String source, Object stack) {
+    int value = digit - $0;
+    for (; i < source.length; i++) {
+      int ch = charCodeAt(source, i);
+      if (!isDigit(ch)) break;
+      value = value * 10 + ch - $0;
+    }
+    push(stack, value);
+    return i;
+  }
+
+  static int handleIdentifer(
+      Object parser, int start, String source, Object stack, bool hasPeriod) {
+    int i = start + 1;
+    for (; i < source.length; i++) {
+      int ch = charCodeAt(source, i);
+      if (ch == $PERIOD) {
+        if (hasPeriod) break;
+        hasPeriod = true;
+      } else if (isIdentifierStart(ch) || isDigit(ch)) {
+        // Accept.
+      } else {
+        break;
+      }
+    }
+    String string = _Utils.substring(source, start, i);
+    if (hasPeriod) {
+      push(
+          stack,
+          _Universe.evalTypeVariable(
+              universe(parser), environment(parser), string));
+    } else {
+      push(stack, string);
+    }
+    return i;
+  }
+
+  static void handleGenericInterfaceType(Object parser, Object stack) {
+    var universe = _Parser.universe(parser);
+    var arguments = _Utils.arraySplice(stack, position(parser));
+    toTypes(universe, environment(parser), arguments);
+    setPosition(parser, _Utils.asInt(pop(stack)));
+    String name = _Utils.asString(pop(stack));
+    push(stack, _Universe._lookupInterfaceRti(universe, name, arguments));
+  }
+
+  /// Coerce a stack item into an Rti object. Strings are converted to interface
+  /// types, integers are looked up in the type environment.
+  static Rti toType(Object universe, Rti environment, Object item) {
+    if (_Utils.isString(item)) {
+      String name = _Utils.asString(item);
+      // TODO(sra): Compile this out for minified code.
+      if ('dynamic' == name) {
+        return _Universe._lookupDynamicRti(universe);
+      }
+      return _Universe._lookupInterfaceRti(
+          universe, name, _Universe.sharedEmptyArray(universe));
+    } else if (_Utils.isNum(item)) {
+      return _Parser._indexToType(universe, environment, _Utils.asInt(item));
+    } else {
+      return _castToRti(item);
+    }
+  }
+
+  static void toTypes(Object universe, Rti environment, Object items) {
+    int length = _Utils.arrayLength(items);
+    for (int i = 0; i < length; i++) {
+      var item = _Utils.arrayAt(items, i);
+      var type = toType(universe, environment, item);
+      _Utils.arraySetAt(items, i, type);
+    }
+  }
+
+  static Rti _indexToType(Object universe, Rti environment, int index) {
+    while (true) {
+      int kind = Rti._getKind(environment);
+      if (kind == Rti.kindInterface) {
+        var typeArguments = Rti._getInterfaceTypeArguments(environment);
+        int len = _Utils.arrayLength(typeArguments);
+        if (index < len) {
+          return _castToRti(_Utils.arrayAt(typeArguments, index));
+        }
+        throw AssertionError('Bad index $index for $environment');
+      }
+      // TODO(sra): Binding environment.
+      throw AssertionError('Recipe cannot index Rti kind $kind');
+    }
+  }
+
+  static bool isDigit(int ch) => ch >= $0 && ch <= $9;
+  static bool isIdentifierStart(int ch) =>
+      (ch >= $A && ch <= $Z) ||
+      (ch >= $a && ch <= $z) ||
+      (ch == $_) ||
+      (ch == $$);
+
+  static const int $$ = 0x24;
+  static const int $COMMA = 0x2C;
+  static const int $PERIOD = 0x2E;
+  static const int $0 = 0x30;
+  static const int $9 = 0x39;
+  static const int $LT = 0x3C;
+  static const int $GT = 0x3E;
+  static const int $A = 0x41;
+  static const int $AT = 0x40;
+  static const int $Z = $A + 26 - 1;
+  static const int $a = $A + 32;
+  static const int $z = $Z + 32;
+  static const int $_ = 0x5F;
+}
+
+// -------- Subtype tests ------------------------------------------------------
+
+// Future entry point from compiled code.
+bool isSubtype(Rti s, Rti t) {
+  return _isSubtype(s, null, t, null);
+}
+
+bool _isSubtype(Rti s, var sEnv, Rti t, var tEnv) {
+  if (_Utils.isIdentical(s, t)) return true;
+  int tKind = Rti._getKind(t);
+  if (tKind == Rti.kindDynamic) return true;
+  if (tKind == Rti.kindNever) return false;
+  return false;
+}
+
+/// Unchecked cast to Rti.
+Rti _castToRti(s) => JS('Rti', '#', s);
+
+///
+class _Utils {
+  static int asInt(Object o) => JS('int', '#', o);
+  static String asString(Object o) => JS('String', '#', o);
+
+  static bool isString(Object o) => JS('bool', 'typeof # == "string"', o);
+  static bool isNum(Object o) => JS('bool', 'typeof # == "number"', o);
+
+  static bool isIdentical(s, t) => JS('bool', '# === #', s, t);
+
+  static int arrayLength(Object array) => JS('int', '#.length', array);
+
+  static Object arrayAt(Object array, int i) => JS('', '#[#]', array, i);
+
+  static Object arraySetAt(Object array, int i, Object value) {
+    JS('', '#[#] = #', array, i, value);
+  }
+
+  static JSArray arraySplice(Object array, int position) =>
+      JS('JSArray', '#.splice(#)', array, position);
+
+  static String substring(String s, int start, int end) =>
+      JS('String', '#.substring(#, #)', s, start, end);
+
+  static mapGet(cache, key) => JS('', '#.get(#)', cache, key);
+
+  static void mapSet(cache, key, value) {
+    JS('', '#.set(#, #)', cache, key, value);
+  }
+}
+// -------- Entry points for testing -------------------------------------------
+
+String testingRtiToString(rti) {
+  return _rtiToString(_castToRti(rti), null);
+}
+
+String testingRtiToDebugString(rti) {
+  // TODO(sra): Create entty point for structural formatting of Rti tree.
+  return 'Rti';
+}
+
+Object testingCreateUniverse() {
+  return _Universe.create();
+}
+
+Object testingAddRules(universe, String rules) {
+  _Universe.addRules(universe, rules);
+}
+
+bool testingIsSubtype(rti1, rti2) {
+  return isSubtype(_castToRti(rti1), _castToRti(rti2));
+}
+
+Object testingUniverseEval(universe, String recipe) {
+  return _Universe.eval(universe, recipe);
+}
+
+Object testingEnvironmentEval(universe, environment, String recipe) {
+  return _Universe.evalInEnvironment(universe, _castToRti(environment), recipe);
+}
diff --git a/sdk/lib/_internal/sdk_library_metadata/lib/libraries.dart b/sdk/lib/_internal/sdk_library_metadata/lib/libraries.dart
index 58a9e90..f848a09 100644
--- a/sdk/lib/_internal/sdk_library_metadata/lib/libraries.dart
+++ b/sdk/lib/_internal/sdk_library_metadata/lib/libraries.dart
@@ -152,6 +152,8 @@
       dart2jsPatchPath: "_internal/js_runtime/lib/internal_patch.dart"),
   "_js_helper": const LibraryInfo("_internal/js_runtime/lib/js_helper.dart",
       categories: "", documented: false, platforms: DART2JS_PLATFORM),
+  "_rti": const LibraryInfo("_internal/js_runtime/lib/rti.dart",
+      categories: "", documented: false, platforms: DART2JS_PLATFORM),
   "_interceptors": const LibraryInfo(
       "_internal/js_runtime/lib/interceptors.dart",
       categories: "",
diff --git a/sdk/lib/core/regexp.dart b/sdk/lib/core/regexp.dart
index b604413..748933d 100644
--- a/sdk/lib/core/regexp.dart
+++ b/sdk/lib/core/regexp.dart
@@ -68,8 +68,8 @@
   external factory RegExp(String source,
       {bool multiLine = false,
       bool caseSensitive = true,
-      bool unicode = false,
-      bool dotAll = false});
+      @Since("2.4") bool unicode = false,
+      @Since("2.4") bool dotAll = false});
 
   /**
    * Returns a regular expression that matches [text].
@@ -142,6 +142,7 @@
    * some pattern features, like Unicode property escapes, are only available in
    * this mode.
    */
+  @Since("2.4")
   bool get isUnicode;
 
   /**
@@ -155,6 +156,7 @@
    * of different pattern characters, and so they can be used together or
    * separately.
    */
+  @Since("2.4")
   bool get isDotAll;
 }
 
@@ -165,6 +167,7 @@
  * to retrieve the names for any named capture groups and to retrieve
  * matches for named capture groups by name instead of their index.
  */
+@Since("2.3")
 abstract class RegExpMatch implements Match {
   /**
    * The string matched by the group named [name].
diff --git a/sdk/lib/io/socket.dart b/sdk/lib/io/socket.dart
index ec03664..fdf6bbd 100644
--- a/sdk/lib/io/socket.dart
+++ b/sdk/lib/io/socket.dart
@@ -413,6 +413,7 @@
 /// It allows for fine grained control of the socket options, and its values will
 /// be passed to the underlying platform's implementation of setsockopt and
 /// getsockopt.
+@Since("2.2")
 class RawSocketOption {
   /// Creates a RawSocketOption for getRawOption andSetRawOption.
   ///
@@ -690,6 +691,7 @@
    *
    * Throws an [OSError] on failure.
    */
+  @Since("2.2")
   Uint8List getRawOption(RawSocketOption option);
 
   /**
@@ -698,6 +700,7 @@
    *
    * Throws an [OSError] on failure.
    */
+  @Since("2.2")
   void setRawOption(RawSocketOption option);
 }
 
diff --git a/sdk/lib/isolate/isolate.dart b/sdk/lib/isolate/isolate.dart
index 5c5883d..e786e16 100644
--- a/sdk/lib/isolate/isolate.dart
+++ b/sdk/lib/isolate/isolate.dart
@@ -17,6 +17,8 @@
 library dart.isolate;
 
 import "dart:async";
+import "dart:_internal" show Since;
+import "dart:typed_data" show ByteBuffer, TypedData, Uint8List;
 
 part "capability.dart";
 
@@ -123,6 +125,7 @@
    * `Dart_DebugName` in the C embedding API and the `debugName` property in
    * [IsolateMirror].
    */
+  @Since("2.3")
   external String get debugName;
 
   /**
@@ -249,7 +252,7 @@
       bool errorsAreFatal,
       SendPort onExit,
       SendPort onError,
-      String debugName});
+      @Since("2.3") String debugName});
 
   /**
    * Creates and spawns an isolate that runs the code from the library with
@@ -337,7 +340,8 @@
           Uri packageRoot,
       Uri packageConfig,
       bool automaticPackageResolution: false,
-      String debugName});
+      @Since("2.3")
+          String debugName});
 
   /**
    * Requests the isolate to pause.
@@ -750,3 +754,36 @@
         stackTrace = new StackTrace.fromString(stackDescription);
   String toString() => _description;
 }
+
+/*
+ * An efficiently transferable sequence of byte values.
+ *
+ * A [TransferableTypedData] is created from a number of bytes.
+ * This will take time proportional to the number of bytes.
+ *
+ * The [TransferableTypedData] can be moved between isolates, so
+ * sending it through a send port will only take constant time.
+ *
+ * When sent this way, the local transferable can no longer be materialized,
+ * and the received object is now the only way to materialize the data.
+ */
+@Since("2.3.2")
+abstract class TransferableTypedData {
+  /**
+   * Creates a new [TransferableTypedData] containing the bytes of [list].
+   *
+   * It must be possible to create a single [Uint8List] containing the
+   * bytes, so if there are more bytes than what the platform allows in
+   * a single [Uint8List], then creation fails.
+   */
+  external factory TransferableTypedData.fromList(List<TypedData> list);
+
+  /**
+   * Creates a new [ByteBuffer] containing the bytes stored in this [TransferableTypedData].
+   *
+   * The [TransferableTypedData] is a cross-isolate single-use resource.
+   * This method must not be called more than once on the same underlying
+   * transferable bytes, even if the calls occur in different isolates.
+   */
+  ByteBuffer materialize();
+}
diff --git a/sdk/lib/libraries.json b/sdk/lib/libraries.json
index 9b239ff..4a0f788 100644
--- a/sdk/lib/libraries.json
+++ b/sdk/lib/libraries.json
@@ -265,6 +265,9 @@
       "web_sql": {
         "uri": "web_sql/dart2js/web_sql_dart2js.dart"
       },
+      "_rti": {
+        "uri": "_internal/js_runtime/lib/rti.dart"
+      },
       "svg": {
         "uri": "svg/dart2js/svg_dart2js.dart"
       }
@@ -273,30 +276,30 @@
   "dartdevc": {
     "libraries": {
       "async": {
-        "patches": "../../pkg/dev_compiler/tool/input_sdk/patch/async_patch.dart",
+        "patches": "_internal/js_dev_runtime/patch/async_patch.dart",
         "uri": "async/async.dart"
       },
       "_runtime": {
-        "uri": "../../pkg/dev_compiler/tool/input_sdk/private/ddc_runtime/runtime.dart"
+        "uri": "_internal/js_dev_runtime/private/ddc_runtime/runtime.dart"
       },
       "_interceptors": {
-        "uri": "../../pkg/dev_compiler/tool/input_sdk/private/interceptors.dart"
+        "uri": "_internal/js_dev_runtime/private/interceptors.dart"
       },
       "mirrors": {
-        "patches": "../../pkg/dev_compiler/tool/input_sdk/patch/mirrors_patch.dart",
+        "patches": "_internal/js_dev_runtime/patch/mirrors_patch.dart",
         "supported": false,
         "uri": "mirrors/mirrors.dart"
       },
       "_debugger": {
-        "uri": "../../pkg/dev_compiler/tool/input_sdk/private/debugger.dart"
+        "uri": "_internal/js_dev_runtime/private/debugger.dart"
       },
       "io": {
-        "patches": "../../pkg/dev_compiler/tool/input_sdk/patch/io_patch.dart",
+        "patches": "_internal/js_dev_runtime/patch/io_patch.dart",
         "supported": false,
         "uri": "io/io.dart"
       },
       "_internal": {
-        "patches": "../../pkg/dev_compiler/tool/input_sdk/patch/internal_patch.dart",
+        "patches": "_internal/js_dev_runtime/patch/internal_patch.dart",
         "uri": "internal/internal.dart"
       },
       "_metadata": {
@@ -306,36 +309,36 @@
         "uri": "_http/http.dart"
       },
       "_js_primitives": {
-        "uri": "../../pkg/dev_compiler/tool/input_sdk/private/js_primitives.dart"
+        "uri": "_internal/js_dev_runtime/private/js_primitives.dart"
       },
       "_js_helper": {
-        "uri": "../../pkg/dev_compiler/tool/input_sdk/private/js_helper.dart"
+        "uri": "_internal/js_dev_runtime/private/js_helper.dart"
       },
       "js": {
-        "uri": "../../pkg/dev_compiler/tool/input_sdk/lib/js/dart2js/js_dart2js.dart"
+        "uri": "_internal/js_dev_runtime/lib/js/dart2js/js_dart2js.dart"
       },
       "_js_mirrors": {
-        "uri": "../../pkg/dev_compiler/tool/input_sdk/private/js_mirrors.dart"
+        "uri": "_internal/js_dev_runtime/private/js_mirrors.dart"
       },
       "html_common": {
         "uri": "html/html_common/html_common_dart2js.dart"
       },
       "_native_typed_data": {
-        "uri": "../../pkg/dev_compiler/tool/input_sdk/private/native_typed_data.dart"
+        "uri": "_internal/js_dev_runtime/private/native_typed_data.dart"
       },
       "core": {
-        "patches": "../../pkg/dev_compiler/tool/input_sdk/patch/core_patch.dart",
+        "patches": "_internal/js_dev_runtime/patch/core_patch.dart",
         "uri": "core/core.dart"
       },
       "js_util": {
-        "uri": "../../pkg/dev_compiler/tool/input_sdk/lib/js_util/dart2js/js_util_dart2js.dart"
+        "uri": "_internal/js_dev_runtime/lib/js_util/dart2js/js_util_dart2js.dart"
       },
       "collection": {
-        "patches": "../../pkg/dev_compiler/tool/input_sdk/patch/collection_patch.dart",
+        "patches": "_internal/js_dev_runtime/patch/collection_patch.dart",
         "uri": "collection/collection.dart"
       },
       "typed_data": {
-        "patches": "../../pkg/dev_compiler/tool/input_sdk/patch/typed_data_patch.dart",
+        "patches": "_internal/js_dev_runtime/patch/typed_data_patch.dart",
         "uri": "typed_data/typed_data.dart"
       },
       "web_audio": {
@@ -345,11 +348,11 @@
         "uri": "html/dart2js/html_dart2js.dart"
       },
       "developer": {
-        "patches": "../../pkg/dev_compiler/tool/input_sdk/patch/developer_patch.dart",
+        "patches": "_internal/js_dev_runtime/patch/developer_patch.dart",
         "uri": "developer/developer.dart"
       },
       "isolate": {
-        "patches": "../../pkg/dev_compiler/tool/input_sdk/patch/isolate_patch.dart",
+        "patches": "_internal/js_dev_runtime/patch/isolate_patch.dart",
         "supported": false,
         "uri": "isolate/isolate.dart"
       },
@@ -360,18 +363,18 @@
         "uri": "indexed_db/dart2js/indexed_db_dart2js.dart"
       },
       "convert": {
-        "patches": "../../pkg/dev_compiler/tool/input_sdk/patch/convert_patch.dart",
+        "patches": "_internal/js_dev_runtime/patch/convert_patch.dart",
         "uri": "convert/convert.dart"
       },
       "_isolate_helper": {
-        "uri": "../../pkg/dev_compiler/tool/input_sdk/private/isolate_helper.dart"
+        "uri": "_internal/js_dev_runtime/private/isolate_helper.dart"
       },
       "math": {
-        "patches": "../../pkg/dev_compiler/tool/input_sdk/patch/math_patch.dart",
+        "patches": "_internal/js_dev_runtime/patch/math_patch.dart",
         "uri": "math/math.dart"
       },
       "_foreign_helper": {
-        "uri": "../../pkg/dev_compiler/tool/input_sdk/private/foreign_helper.dart"
+        "uri": "_internal/js_dev_runtime/private/foreign_helper.dart"
       },
       "web_sql": {
         "uri": "web_sql/dart2js/web_sql_dart2js.dart"
@@ -464,9 +467,12 @@
       "_js_helper": {
         "uri": "_internal/js_runtime/lib/js_helper.dart"
       },
+      "_rti": {
+        "uri": "_internal/js_runtime/lib/rti.dart"
+      },
       "js": {
         "uri": "js/dart2js/js_dart2js.dart"
       }
     }
   }
-}
\ No newline at end of file
+}
diff --git a/sdk/lib/libraries.yaml b/sdk/lib/libraries.yaml
index a53b69a..7a5520c 100644
--- a/sdk/lib/libraries.yaml
+++ b/sdk/lib/libraries.yaml
@@ -245,6 +245,9 @@
     _js_helper:
       uri: "_internal/js_runtime/lib/js_helper.dart"
 
+    _rti:
+      uri: "_internal/js_runtime/lib/rti.dart"
+
     _interceptors:
       uri: "_internal/js_runtime/lib/interceptors.dart"
 
@@ -334,6 +337,9 @@
     _js_helper:
       uri: "_internal/js_runtime/lib/js_helper.dart"
 
+    _rti:
+      uri: "_internal/js_runtime/lib/rti.dart"
+
     _interceptors:
       uri: "_internal/js_runtime/lib/interceptors.dart"
 
@@ -351,87 +357,88 @@
 
     _async_await_error_codes:
       uri: "_internal/js_runtime/lib/shared/async_await_error_codes.dart"
+
 dartdevc:
     libraries:
       _runtime:
-        uri: "../../pkg/dev_compiler/tool/input_sdk/private/ddc_runtime/runtime.dart"
+        uri: "_internal/js_dev_runtime/private/ddc_runtime/runtime.dart"
 
       _debugger:
-        uri: "../../pkg/dev_compiler/tool/input_sdk/private/debugger.dart"
+        uri: "_internal/js_dev_runtime/private/debugger.dart"
 
       _foreign_helper:
-        uri: "../../pkg/dev_compiler/tool/input_sdk/private/foreign_helper.dart"
+        uri: "_internal/js_dev_runtime/private/foreign_helper.dart"
 
       _http:
         uri: "_http/http.dart"
 
       _interceptors:
-        uri: "../../pkg/dev_compiler/tool/input_sdk/private/interceptors.dart"
+        uri: "_internal/js_dev_runtime/private/interceptors.dart"
 
       _internal:
         uri: "internal/internal.dart"
-        patches: "../../pkg/dev_compiler/tool/input_sdk/patch/internal_patch.dart"
+        patches: "_internal/js_dev_runtime/patch/internal_patch.dart"
 
       _isolate_helper:
-        uri: "../../pkg/dev_compiler/tool/input_sdk/private/isolate_helper.dart"
+        uri: "_internal/js_dev_runtime/private/isolate_helper.dart"
 
       _js_helper:
-        uri: "../../pkg/dev_compiler/tool/input_sdk/private/js_helper.dart"
+        uri: "_internal/js_dev_runtime/private/js_helper.dart"
 
       _js_mirrors:
-        uri: "../../pkg/dev_compiler/tool/input_sdk/private/js_mirrors.dart"
+        uri: "_internal/js_dev_runtime/private/js_mirrors.dart"
 
       _js_primitives:
-        uri: "../../pkg/dev_compiler/tool/input_sdk/private/js_primitives.dart"
+        uri: "_internal/js_dev_runtime/private/js_primitives.dart"
 
       _metadata:
         uri: "html/html_common/metadata.dart"
 
       _native_typed_data:
-        uri: "../../pkg/dev_compiler/tool/input_sdk/private/native_typed_data.dart"
+        uri: "_internal/js_dev_runtime/private/native_typed_data.dart"
 
       async:
         uri: "async/async.dart"
-        patches: "../../pkg/dev_compiler/tool/input_sdk/patch/async_patch.dart"
+        patches: "_internal/js_dev_runtime/patch/async_patch.dart"
 
       collection:
         uri: "collection/collection.dart"
-        patches: "../../pkg/dev_compiler/tool/input_sdk/patch/collection_patch.dart"
+        patches: "_internal/js_dev_runtime/patch/collection_patch.dart"
 
       convert:
         uri: "convert/convert.dart"
-        patches: "../../pkg/dev_compiler/tool/input_sdk/patch/convert_patch.dart"
+        patches: "_internal/js_dev_runtime/patch/convert_patch.dart"
 
       core:
         uri: "core/core.dart"
-        patches: "../../pkg/dev_compiler/tool/input_sdk/patch/core_patch.dart"
+        patches: "_internal/js_dev_runtime/patch/core_patch.dart"
 
       developer:
         uri: "developer/developer.dart"
-        patches: "../../pkg/dev_compiler/tool/input_sdk/patch/developer_patch.dart"
+        patches: "_internal/js_dev_runtime/patch/developer_patch.dart"
 
       io:
         uri: "io/io.dart"
-        patches: "../../pkg/dev_compiler/tool/input_sdk/patch/io_patch.dart"
+        patches: "_internal/js_dev_runtime/patch/io_patch.dart"
         supported: false
 
       isolate:
         uri: "isolate/isolate.dart"
-        patches: "../../pkg/dev_compiler/tool/input_sdk/patch/isolate_patch.dart"
+        patches: "_internal/js_dev_runtime/patch/isolate_patch.dart"
         supported: false
 
       mirrors:
         uri: "mirrors/mirrors.dart"
-        patches: "../../pkg/dev_compiler/tool/input_sdk/patch/mirrors_patch.dart"
+        patches: "_internal/js_dev_runtime/patch/mirrors_patch.dart"
         supported: false
 
       math:
         uri: "math/math.dart"
-        patches: "../../pkg/dev_compiler/tool/input_sdk/patch/math_patch.dart"
+        patches: "_internal/js_dev_runtime/patch/math_patch.dart"
 
       typed_data:
         uri: "typed_data/typed_data.dart"
-        patches: "../../pkg/dev_compiler/tool/input_sdk/patch/typed_data_patch.dart"
+        patches: "_internal/js_dev_runtime/patch/typed_data_patch.dart"
 
       html:
         uri: "html/dart2js/html_dart2js.dart"
@@ -443,10 +450,10 @@
         uri: "indexed_db/dart2js/indexed_db_dart2js.dart"
 
       js:
-        uri: "../../pkg/dev_compiler/tool/input_sdk/lib/js/dart2js/js_dart2js.dart"
+        uri: "_internal/js_dev_runtime/lib/js/dart2js/js_dart2js.dart"
 
       js_util:
-        uri: "../../pkg/dev_compiler/tool/input_sdk/lib/js_util/dart2js/js_util_dart2js.dart"
+        uri: "_internal/js_dev_runtime/lib/js_util/dart2js/js_util_dart2js.dart"
 
       svg:
         uri: "svg/dart2js/svg_dart2js.dart"
diff --git a/tests/compiler/dart2js/model/cfe_annotations_test.dart b/tests/compiler/dart2js/model/cfe_annotations_test.dart
index d1ea655..d5b0e0f 100644
--- a/tests/compiler/dart2js/model/cfe_annotations_test.dart
+++ b/tests/compiler/dart2js/model/cfe_annotations_test.dart
@@ -36,7 +36,7 @@
 @noInline
 method2() {}
 
-@pragma('dart2js:tryInline')
+@pragma(const String.fromEnvironment('foo', defaultValue: 'dart2js:tryInline'))
 method3() {}
 
 @tryInline
diff --git a/tests/compiler/dart2js_extra/boolean_conversion_test.dart b/tests/compiler/dart2js_extra/boolean_conversion_test.dart
index 46a8994..64cd441 100644
--- a/tests/compiler/dart2js_extra/boolean_conversion_test.dart
+++ b/tests/compiler/dart2js_extra/boolean_conversion_test.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.
 
-// SharedOptions=--enable-experiment=control-flow-collections
 // dart2jsOptions=--omit-implicit-checks
 
 // Note: --omit-implicit-checks causes Expect.isNull to misbehave, so we use
diff --git a/tests/compiler/dart2js_extra/rti/class_environment_test.dart b/tests/compiler/dart2js_extra/rti/class_environment_test.dart
new file mode 100644
index 0000000..0cad566
--- /dev/null
+++ b/tests/compiler/dart2js_extra/rti/class_environment_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:_rti' as rti;
+import "package:expect/expect.dart";
+
+void checkRtiIdentical(Object rti1, Object rti2) {
+  var format = rti.testingRtiToString;
+  Expect.isTrue(
+      identical(rti1, rti2), 'identical(${format(rti1)}, ${format(rti2)}');
+}
+
+testInterface1() {
+  var universe = rti.testingCreateUniverse();
+
+  var env = rti.testingUniverseEval(universe, 'Foo<int>');
+  var rti1 = rti.testingUniverseEval(universe, 'int');
+  var rti2 = rti.testingEnvironmentEval(universe, env, '0');
+
+  Expect.equals('int', rti.testingRtiToString(rti1));
+  Expect.equals('int', rti.testingRtiToString(rti2));
+  checkRtiIdentical(rti1, rti2);
+}
+
+testInterface2() {
+  var universe = rti.testingCreateUniverse();
+
+  var env = rti.testingUniverseEval(universe, 'Foo<int,List<int>>');
+  var rti1 = rti.testingUniverseEval(universe, 'List<int>');
+  var rti2 = rti.testingEnvironmentEval(universe, env, '1');
+  var rti3 = rti.testingEnvironmentEval(universe, env, 'List<0>');
+
+  Expect.equals('List<int>', rti.testingRtiToString(rti1));
+  Expect.equals('List<int>', rti.testingRtiToString(rti2));
+  Expect.equals('List<int>', rti.testingRtiToString(rti3));
+  checkRtiIdentical(rti1, rti2);
+  checkRtiIdentical(rti1, rti3);
+}
+
+main() {
+  testInterface1();
+  testInterface2();
+}
diff --git a/tests/compiler/dart2js_extra/rti/simple_2_test.dart b/tests/compiler/dart2js_extra/rti/simple_2_test.dart
new file mode 100644
index 0000000..ce81c7b
--- /dev/null
+++ b/tests/compiler/dart2js_extra/rti/simple_2_test.dart
@@ -0,0 +1,83 @@
+// 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:_rti' as rti;
+import "package:expect/expect.dart";
+
+testDynamic1() {
+  var universe = rti.testingCreateUniverse();
+
+  var dynamicRti1 = rti.testingUniverseEval(universe, 'dynamic');
+  var dynamicRti2 = rti.testingUniverseEval(universe, ',,dynamic,,');
+
+  Expect.isTrue(
+      identical(dynamicRti1, dynamicRti2), 'dynamic should be identical');
+  Expect.isFalse(dynamicRti1 is String);
+  Expect.equals('dynamic', rti.testingRtiToString(dynamicRti1));
+}
+
+testDynamic2() {
+  var universe = rti.testingCreateUniverse();
+
+  var dynamicRti1 = rti.testingUniverseEval(universe, 'dynamic');
+  var dynamicRti2 = rti.testingUniverseEval(universe, ',,@,,');
+
+  Expect.isTrue(
+      identical(dynamicRti1, dynamicRti2), 'dynamic should be identical');
+  Expect.isFalse(dynamicRti1 is String);
+  Expect.equals('dynamic', rti.testingRtiToString(dynamicRti1));
+}
+
+testInterface1() {
+  var universe = rti.testingCreateUniverse();
+
+  var rti1 = rti.testingUniverseEval(universe, 'int');
+  var rti2 = rti.testingUniverseEval(universe, ',,int,,');
+
+  Expect.isTrue(identical(rti1, rti2));
+  Expect.isFalse(rti1 is String);
+  Expect.equals('int', rti.testingRtiToString(rti1));
+}
+
+testInterface2() {
+  var universe = rti.testingCreateUniverse();
+
+  var rti1 = rti.testingUniverseEval(universe, 'Foo<int,bool>');
+  var rti2 = rti.testingUniverseEval(universe, 'Foo<int,bool>');
+
+  Expect.isTrue(identical(rti1, rti2));
+  Expect.isFalse(rti1 is String);
+  Expect.equals('Foo<int, bool>', rti.testingRtiToString(rti1));
+}
+
+testInterface3() {
+  var universe = rti.testingCreateUniverse();
+
+  var rti1 = rti.testingUniverseEval(universe, 'Foo<Bar<int>,Bar<bool>>');
+  var rti2 = rti.testingUniverseEval(universe, 'Foo<Bar<int>,Bar<bool>>');
+
+  Expect.isTrue(identical(rti1, rti2));
+  Expect.isFalse(rti1 is String);
+  Expect.equals('Foo<Bar<int>, Bar<bool>>', rti.testingRtiToString(rti1));
+}
+
+testInterface4() {
+  var universe = rti.testingCreateUniverse();
+
+  var rti1 = rti.testingUniverseEval(universe, 'Foo<Foo<Foo<Foo<int>>>>');
+  var rti2 = rti.testingUniverseEval(universe, 'Foo<Foo<Foo<Foo<int>>>>');
+
+  Expect.isTrue(identical(rti1, rti2));
+  Expect.isFalse(rti1 is String);
+  Expect.equals('Foo<Foo<Foo<Foo<int>>>>', rti.testingRtiToString(rti1));
+}
+
+main() {
+  testDynamic1();
+  testDynamic2();
+  testInterface1();
+  testInterface2();
+  testInterface3();
+  testInterface4();
+}
diff --git a/tests/compiler/dart2js_extra/rti/simple_test.dart b/tests/compiler/dart2js_extra/rti/simple_test.dart
new file mode 100644
index 0000000..88ccf9f
--- /dev/null
+++ b/tests/compiler/dart2js_extra/rti/simple_test.dart
@@ -0,0 +1,19 @@
+// 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:_rti' as rti;
+import "package:expect/expect.dart";
+
+main() {
+  var universe = rti.testingCreateUniverse();
+
+  // TODO(sra): Add call: rti.testingAddRules(universe, ???);
+
+  var dynamicRti1 = rti.testingUniverseEval(universe, 'dynamic');
+  var dynamicRti2 = rti.testingUniverseEval(universe, 'dynamic');
+
+  Expect.isTrue(identical(dynamicRti1, dynamicRti2));
+  Expect.isFalse(dynamicRti1 is String);
+  Expect.equals('dynamic', rti.testingRtiToString(dynamicRti1));
+}
diff --git a/tests/ffi/function_stress_test.dart b/tests/ffi/function_gc_test.dart
similarity index 61%
rename from tests/ffi/function_stress_test.dart
rename to tests/ffi/function_gc_test.dart
index 92e807c..1799ce1 100644
--- a/tests/ffi/function_stress_test.dart
+++ b/tests/ffi/function_gc_test.dart
@@ -2,8 +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.
 //
-// VMOptions=--deterministic --optimization-counter-threshold=500 --verbose-gc
-// VMOptions=--deterministic --optimization-counter-threshold=-1 --verbose-gc
+// VMOptions=--deterministic --optimization-counter-threshold=500 --enable-testing-pragmas
+// VMOptions=--deterministic --optimization-counter-threshold=-1 --enable-testing-pragmas
 //
 // Dart test program for stress-testing boxing and GC in return paths from FFI
 // trampolines.
@@ -16,45 +16,14 @@
 import 'dart:ffi' as ffi;
 import 'dylib_utils.dart';
 import "package:expect/expect.dart";
-import 'gc_helper.dart';
-
-test(GCWatcher watcher, Function testee,
-    {bool mustTriggerGC: true, bool batched: false}) async {
-  // Warmup.
-  for (int i = 0; i < 1000; ++i) {
-    batched ? testee(1) : testee();
-  }
-  int size = await watcher.size();
-  for (int i = 0; i < 1000000;) {
-    if (batched) {
-      testee(1000);
-      i += 1000;
-    } else {
-      testee();
-      i++;
-    }
-  }
-  int new_size = await watcher.size();
-  if (mustTriggerGC) {
-    print("Expect $new_size > $size.");
-    Expect.isTrue(new_size > size);
-  }
-}
 
 main() async {
-  final watcher = GCWatcher.ifAvailable();
-  try {
-    await test(watcher, testBoxInt64);
-    // On 64-bit platforms this won't trigger GC because the result fits into a
-    // Smi.
-    await test(watcher, testBoxInt32, mustTriggerGC: false);
-    await test(watcher, testBoxDouble);
-    await test(watcher, testBoxPointer);
-    await test(watcher, testAllocateMints, batched: true);
-    await test(watcher, testAllocationsInDart, batched: true);
-  } finally {
-    watcher.dispose();
-  }
+  testBoxInt64();
+  testBoxInt32();
+  testBoxDouble();
+  testBoxPointer();
+  testAllocateInNative();
+  testAllocateInDart();
 }
 
 ffi.DynamicLibrary ffiTestFunctions =
@@ -64,11 +33,13 @@
 typedef NativeNullaryOp32 = ffi.Int32 Function();
 typedef NativeNullaryOpDouble = ffi.Double Function();
 typedef NativeNullaryOpPtr = ffi.Pointer<ffi.Void> Function();
+typedef NativeNullaryOp = ffi.Void Function();
 typedef NativeUnaryOp = ffi.Void Function(ffi.Uint64);
 typedef NullaryOp = int Function();
 typedef NullaryOpDbl = double Function();
 typedef NullaryOpPtr = ffi.Pointer<ffi.Void> Function();
 typedef UnaryOp = void Function(int);
+typedef NullaryOpVoid = void Function();
 
 //// These functions return values that require boxing into different types.
 
@@ -111,33 +82,19 @@
   }
 }
 
-final allocateMint =
-    ffiTestFunctions.lookupFunction<NativeUnaryOp, UnaryOp>("AllocateMints");
+final triggerGc = ffiTestFunctions
+    .lookupFunction<NativeNullaryOp, NullaryOpVoid>("TriggerGC");
 
-// Test GC in the FFI call path by calling a C function which allocates through
-// the Dart API.
-void testAllocateMints(int batchSize) {
-  allocateMint(batchSize);
-}
+// Test GC in the FFI call path by calling a C function which triggers GC
+// directly.
+void testAllocateInNative() => triggerGc();
 
-class C {
-  final int i;
-  C(this.i);
-}
-
-C c = null;
 @pragma("vm:entry-point", "call")
-void testAllocationsInDartHelper(int count) {
-  for (int i = 0; i < count; ++i) {
-    c = C(i);
-  }
-}
+void testAllocationsInDartHelper() => triggerGc();
 
 final allocateThroughDart = ffiTestFunctions
-    .lookupFunction<NativeUnaryOp, UnaryOp>("AllocateThroughDart");
+    .lookupFunction<NativeNullaryOp, NullaryOpVoid>("AllocateThroughDart");
 
 // Test GC in the FFI call path by calling a C function which allocates by
 // calling back into Dart ('testAllocationsInDartHelper').
-void testAllocationsInDart(int batchSize) {
-  allocateThroughDart(batchSize * 10);
-}
+void testAllocateInDart() => allocateThroughDart();
diff --git a/tests/ffi/function_test.dart b/tests/ffi/function_test.dart
index 07f8fc2..014c66e 100644
--- a/tests/ffi/function_test.dart
+++ b/tests/ffi/function_test.dart
@@ -6,6 +6,7 @@
 //
 // VMOptions=
 // VMOptions=--deterministic --optimization-counter-threshold=10
+// VMOptions=--use-slow-path
 // SharedObjects=ffi_test_functions
 
 library FfiTest;
diff --git a/tests/ffi/gc_helper.dart b/tests/ffi/gc_helper.dart
deleted file mode 100644
index abe0454..0000000
--- a/tests/ffi/gc_helper.dart
+++ /dev/null
@@ -1,54 +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 'dart:io';
-import 'dylib_utils.dart';
-import 'dart:ffi';
-import 'dart:io' show Platform;
-
-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 || Platform.isAndroid || isProduct)
-          ? GCWatcher.dummy()
-          : GCWatcher();
-
-  Future<int> size();
-  void dispose();
-}
-
-// Requires --verbose-gc.
-class _GCWatcherImpl implements GCWatcher {
-  int _suffix;
-
-  Future<int> size() async {
-    return await File("/tmp/captured_stderr_$_suffix").length();
-  }
-
-  _GCWatcherImpl() {
-    print("Starting...");
-    _suffix = ffiTestFunctions
-        .lookupFunction<Int32 Function(), int Function()>("RedirectStderr")();
-  }
-
-  dispose() {
-    try {
-      File("/tmp/captured_stderr_$_suffix").deleteSync();
-    } catch (e) {
-      print("deleting file failed");
-    }
-  }
-}
-
-class _MockGCWatcher implements GCWatcher {
-  int _ctr = 0;
-
-  Future<int> size() async => ++_ctr;
-  dispose() {}
-}
diff --git a/tests/ffi/subtype_test.dart b/tests/ffi/subtype_test.dart
index 22dbe13..54977b5 100644
--- a/tests/ffi/subtype_test.dart
+++ b/tests/ffi/subtype_test.dart
@@ -4,6 +4,7 @@
 //
 // Dart test program for testing dart:ffi Pointer subtypes.
 //
+// SharedObjects=ffi_test_functions
 // VMOptions=--verbose-gc
 
 library FfiTest;
@@ -12,21 +13,21 @@
 
 import "package:expect/expect.dart";
 
-import 'gc_helper.dart';
 import 'cstring.dart';
+import 'dylib_utils.dart';
+
+ffi.DynamicLibrary ffiTestFunctions =
+    dlopenPlatformSpecific("ffi_test_functions");
+
+final triggerGc = ffiTestFunctions
+    .lookupFunction<ffi.Void Function(), void Function()>("TriggerGC");
 
 void main() async {
   testAllocate();
   testSizeOf();
-  await testGC();
+  testGC();
 }
 
-class X {
-  X(this.i);
-  int i;
-}
-
-dynamic foo;
 dynamic bar;
 
 void testAllocate() {
@@ -36,15 +37,10 @@
 }
 
 Future<void> testGC() async {
-  CString cs = ffi.fromAddress<CString>(11);
-  bar = cs;
-  foo = "";
-  final watcher = GCWatcher.ifAvailable();
-  int counts = await watcher.size();
-  for (int i = 0; i < 1000000; ++i) {
-    foo = new X(i);
-  }
-  Expect.isTrue(await watcher.size() > counts);
+  bar = ffi.fromAddress<CString>(11);
+  // Verify that the objects manufactured by 'fromAddress' can be scanned by the
+  // GC.
+  triggerGc();
 }
 
 void testSizeOf() {
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
index 6987f58..e0c1df8 100644
--- a/tests/language_2/control_flow_collections/await_for_inference_test.dart
+++ b/tests/language_2/control_flow_collections/await_for_inference_test.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.
 
-// SharedOptions=--enable-experiment=control-flow-collections,spread-collections
-
 // Test how await for interacts with inference.
 import "package:async_helper/async_helper.dart";
 import 'package:expect/expect.dart';
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
index b2ba223..f1c1460 100644
--- a/tests/language_2/control_flow_collections/await_for_null_test.dart
+++ b/tests/language_2/control_flow_collections/await_for_null_test.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.
 
-// SharedOptions=--enable-experiment=control-flow-collections,spread-collections
-
 // Test that a null stream expression procudes a runtime error.
 import 'package:async_helper/async_helper.dart';
 
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
index f5e30ce..d64303a 100644
--- 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
@@ -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.
 
-// SharedOptions=--enable-experiment=control-flow-collections
-
 void main() {
   // Use await for in non-async function.
   var _ = [await for (var i in Stream<int>.empty()) i]; //# 01: 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
index c838c49..9faee4a 100644
--- a/tests/language_2/control_flow_collections/await_for_test.dart
+++ b/tests/language_2/control_flow_collections/await_for_test.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.
 
-// SharedOptions=--enable-experiment=control-flow-collections,spread-collections
-
 import 'package:async_helper/async_helper.dart';
 import 'package:expect/expect.dart';
 
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
index 8cc87da..e63a52e 100644
--- 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
@@ -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.
 
-// SharedOptions=--enable-experiment=control-flow-collections
-
 void main() {
   () async {
     // Non-Stream type.
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..2baeefc 100644
--- a/tests/language_2/control_flow_collections/for_await_test.dart
+++ b/tests/language_2/control_flow_collections/for_await_test.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.
 
-// SharedOptions=--enable-experiment=control-flow-collections
-
 import "package:async_helper/async_helper.dart";
 import 'package:expect/expect.dart';
 
diff --git a/tests/language_2/control_flow_collections/for_const_error_test.dart b/tests/language_2/control_flow_collections/for_const_error_test.dart
index 626c7a8..3348639 100644
--- a/tests/language_2/control_flow_collections/for_const_error_test.dart
+++ b/tests/language_2/control_flow_collections/for_const_error_test.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.
 
-// SharedOptions=--enable-experiment=control-flow-collections
-
 void main() {
   // For cannot be used in a const collection.
   const _ = [for (var i in []) 1]; //# 00: compile-time error
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 9479dd6..4e022e0 100644
--- a/tests/language_2/control_flow_collections/for_inference_test.dart
+++ b/tests/language_2/control_flow_collections/for_inference_test.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.
 
-// SharedOptions=--enable-experiment=control-flow-collections,spread-collections
-
 // Test how control flow interacts with inference.
 import 'package:expect/expect.dart';
 
diff --git a/tests/language_2/control_flow_collections/for_non_bool_condition_test.dart b/tests/language_2/control_flow_collections/for_non_bool_condition_test.dart
index 74b00df..a808e9c 100644
--- a/tests/language_2/control_flow_collections/for_non_bool_condition_test.dart
+++ b/tests/language_2/control_flow_collections/for_non_bool_condition_test.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.
 
-// SharedOptions=--enable-experiment=control-flow-collections,spread-collections
-
 import 'package:expect/expect.dart';
 
 void main() {
diff --git a/tests/language_2/control_flow_collections/for_null_condition_test.dart b/tests/language_2/control_flow_collections/for_null_condition_test.dart
index 2f9a6c0..8233c10 100644
--- a/tests/language_2/control_flow_collections/for_null_condition_test.dart
+++ b/tests/language_2/control_flow_collections/for_null_condition_test.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.
 
-// SharedOptions=--enable-experiment=control-flow-collections,spread-collections
-
 import 'package:expect/expect.dart';
 
 void main() {
diff --git a/tests/language_2/control_flow_collections/for_runtime_error_test.dart b/tests/language_2/control_flow_collections/for_runtime_error_test.dart
index b8fa267..ea5cfe4 100644
--- a/tests/language_2/control_flow_collections/for_runtime_error_test.dart
+++ b/tests/language_2/control_flow_collections/for_runtime_error_test.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.
 
-// SharedOptions=--enable-experiment=control-flow-collections,spread-collections
-
 import 'package:expect/expect.dart';
 
 void main() {
diff --git a/tests/language_2/control_flow_collections/for_test.dart b/tests/language_2/control_flow_collections/for_test.dart
index a264cb6..16026a6 100644
--- a/tests/language_2/control_flow_collections/for_test.dart
+++ b/tests/language_2/control_flow_collections/for_test.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.
 
-// SharedOptions=--enable-experiment=control-flow-collections,spread-collections
-
 import 'package:expect/expect.dart';
 
 import 'utils.dart';
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..47ab2e7 100644
--- a/tests/language_2/control_flow_collections/for_variable_test.dart
+++ b/tests/language_2/control_flow_collections/for_variable_test.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.
 
-// SharedOptions=--enable-experiment=control-flow-collections,spread-collections
-
 /// 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..08d0c60 100644
--- a/tests/language_2/control_flow_collections/if_await_test.dart
+++ b/tests/language_2/control_flow_collections/if_await_test.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.
 
-// SharedOptions=--enable-experiment=control-flow-collections
-
 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 c644acf..87cd501 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,constant-update-2018
+// SharedOptions=--enable-experiment=constant-update-2018
 
 import 'dart:collection';
 
diff --git a/tests/language_2/control_flow_collections/if_const_syntax_error_test.dart b/tests/language_2/control_flow_collections/if_const_syntax_error_test.dart
index a876036..86cb887 100644
--- a/tests/language_2/control_flow_collections/if_const_syntax_error_test.dart
+++ b/tests/language_2/control_flow_collections/if_const_syntax_error_test.dart
@@ -5,7 +5,7 @@
 // Check that 'if' in const collections is not enabled without the experimental
 // constant-update-2018 flag.
 
-// SharedOptions=--enable-experiment=control-flow-collections,no-constant-update-2018
+// SharedOptions=--enable-experiment=no-constant-update-2018
 
 void main() {
   // If cannot be used in a const collection.
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 db38174..8eba551 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,constant-update-2018
+// SharedOptions=--enable-experiment=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..11c7b95 100644
--- a/tests/language_2/control_flow_collections/if_inference_test.dart
+++ b/tests/language_2/control_flow_collections/if_inference_test.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.
 
-// SharedOptions=--enable-experiment=control-flow-collections,spread-collections
-
 // Test how control flow interacts with inference.
 import 'package:expect/expect.dart';
 
diff --git a/tests/language_2/control_flow_collections/if_null_condition_test.dart b/tests/language_2/control_flow_collections/if_null_condition_test.dart
index c5a1e96..fbfe3b9 100644
--- a/tests/language_2/control_flow_collections/if_null_condition_test.dart
+++ b/tests/language_2/control_flow_collections/if_null_condition_test.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.
 
-// SharedOptions=--enable-experiment=control-flow-collections
-
 import 'package:expect/expect.dart';
 
 void main() {
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..382db01 100644
--- a/tests/language_2/control_flow_collections/if_promotion_test.dart
+++ b/tests/language_2/control_flow_collections/if_promotion_test.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.
 
-// SharedOptions=--enable-experiment=control-flow-collections
-
 class A {
   var a = "a";
 }
diff --git a/tests/language_2/control_flow_collections/if_runtime_error_test.dart b/tests/language_2/control_flow_collections/if_runtime_error_test.dart
index 8e48bea..1dba5b8 100644
--- a/tests/language_2/control_flow_collections/if_runtime_error_test.dart
+++ b/tests/language_2/control_flow_collections/if_runtime_error_test.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.
 
-// SharedOptions=--enable-experiment=control-flow-collections,spread-collections
-
 import 'package:expect/expect.dart';
 
 void main() {
diff --git a/tests/language_2/control_flow_collections/if_test.dart b/tests/language_2/control_flow_collections/if_test.dart
index c835dd6..9338987 100644
--- a/tests/language_2/control_flow_collections/if_test.dart
+++ b/tests/language_2/control_flow_collections/if_test.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.
 
-// SharedOptions=--enable-experiment=control-flow-collections,spread-collections
-
 import 'package:expect/expect.dart';
 
 import 'utils.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..ae4fee4 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,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.
 
-// SharedOptions=--enable-experiment=control-flow-collections,spread-collections
-
 // Test cases where the syntax is ambiguous between maps and sets when control
 // flow elements contain spreads.
 import 'dart:collection';
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 6ce77de..bf5f685 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,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.
 
-// SharedOptions=--enable-experiment=control-flow-collections,spread-collections
-
 // Test cases where the syntax is ambiguous between maps and sets because of
 // spreads inside control flow.
 import 'dart:collection';
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 e0f0ba8..8b9fa65 100644
--- a/tests/language_2/control_flow_collections/syntax_error_test.dart
+++ b/tests/language_2/control_flow_collections/syntax_error_test.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.
 
-// SharedOptions=--enable-experiment=control-flow-collections,spread-collections
-
 void main() {
   // No then element.
   var _ = [if (true)]; //# 00: syntax 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..0ed9829 100644
--- a/tests/language_2/control_flow_collections/syntax_test.dart
+++ b/tests/language_2/control_flow_collections/syntax_test.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.
 
-// SharedOptions=--enable-experiment=control-flow-collections
-
 // 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 91e0ebb..63f6706 100644
--- a/tests/language_2/control_flow_collections/type_error_test.dart
+++ b/tests/language_2/control_flow_collections/type_error_test.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.
 
-// SharedOptions=--enable-experiment=control-flow-collections
-
 void main() {
   // Non-Boolean if condition.
   var _ = <int>[if (1) 2]; //# 00: compile-time error
diff --git a/tests/language_2/language_2_spec_parser.status b/tests/language_2/language_2_spec_parser.status
index c8867ce..1c7952a 100644
--- a/tests/language_2/language_2_spec_parser.status
+++ b/tests/language_2/language_2_spec_parser.status
@@ -34,6 +34,7 @@
 new_expression1_negative_test: Fail # Negative, uses `new id`.
 new_expression2_negative_test: Fail # Negative, uses `new id(`.
 new_expression3_negative_test: Fail # Negative, uses `new id(...`.
+nnbd/*: Skip # Not yet included.
 no_such_method_negative_test: Skip # Negative, not syntax.
 non_const_super_negative_test: Skip # Negative, not syntax.
 operator1_negative_test: Fail # Negative, declares static operator.
diff --git a/tests/language_2/mixin_implicit_covariance_test.dart b/tests/language_2/mixin_implicit_covariance_test.dart
new file mode 100644
index 0000000..5606bd7
--- /dev/null
+++ b/tests/language_2/mixin_implicit_covariance_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.
+
+import 'package:expect/expect.dart';
+
+abstract class A<T> {
+  foo(T x);
+}
+
+abstract class B<T> implements A<T> {}
+
+class C {
+  foo(num x) {
+    if (x is! num) {
+      throw "Soudness issue: expected x to be num, got ${x.runtimeType}.";
+    }
+  }
+}
+
+class D<T extends num> extends C with B<T> {}
+
+class E<T extends num> = C with B<T>;
+
+test(B<dynamic> b) {
+  b.foo("bar");
+}
+
+main() {
+  Expect.throws<TypeError>(() => test(new D<int>()));
+  Expect.throws<TypeError>(() => test(new E<int>()));
+}
diff --git a/tests/language_2/nnbd/static_errors/missing_required_argument_test.dart b/tests/language_2/nnbd/static_errors/missing_required_argument_test.dart
index 9ef8798..630c53d 100644
--- a/tests/language_2/nnbd/static_errors/missing_required_argument_test.dart
+++ b/tests/language_2/nnbd/static_errors/missing_required_argument_test.dart
@@ -12,14 +12,14 @@
   A({required int a}) {}
   A.named() : this(); //# 01: compile-time error
   void m1({required int a}) {}
-  F m2() => ({required String x}) => null;
+  F m2() => ({required String x}) => '';
 }
 
 class B extends A { B() : super(); } //# 02: compile-time error
 
 void f({required int a}) {}
 
-void Function({required int a}) g() => null;
+void Function({required int a}) g() => throw '';
 
 main() {
   A a = new A(); //# 03: compile-time error
diff --git a/tests/language_2/nnbd/static_errors/unchecked_use_of_nullable_test.dart b/tests/language_2/nnbd/static_errors/unchecked_use_of_nullable_test.dart
index ce24941..a73735c 100644
--- a/tests/language_2/nnbd/static_errors/unchecked_use_of_nullable_test.dart
+++ b/tests/language_2/nnbd/static_errors/unchecked_use_of_nullable_test.dart
@@ -17,7 +17,7 @@
   x.toString(); //# 02: ok
   x.hashCode; //# 03: ok
   x.runtimeType; //# 04: ok
-  x.noSuchMethod(null); //# 05: ok
+  x.noSuchMethod(Invocation.method(#toString, [])); //# 05: ok
   x + 1; //# 06: compile-time error
   -x; //# 06: compile-time error
   x++; //# 07: compile-time error
@@ -73,7 +73,7 @@
   x.toString(); //# 42: ok
   x.hashCode; //# 43: ok
   x.runtimeType; //# 44: ok
-  x.noSuchMethod(null); //# 45: ok
+  x.noSuchMethod(Invocation.method(#toString, [])); //# 45: ok
   x + 1; //# 46: compile-time error
   -x; //# 47: compile-time error
   x++; //# 48: compile-time error
@@ -82,7 +82,7 @@
   list[0]; //# 51: compile-time error
   list[0] = 0; //# 52: compile-time error
   x += 1; //# 53: compile-time error
-  x ??= null; //# 54: ok
+  x ??= x; //# 54: ok
   x.round; //# 55: compile-time error
   x.toString; //# 56: ok
   x.noSuchMethod; //# 57: ok
@@ -124,7 +124,7 @@
   x.toString(); //# 82: ok
   x.hashCode; //# 83: ok
   x.runtimeType; //# 84: ok
-  x.noSuchMethod(null); //# 85: ok
+  x.noSuchMethod(Invocation.method(#toString, [])); //# 85: ok
   x + 1; //# 86: compile-time error
   -x; //# 87: compile-time error
   x++; //# 88: compile-time error
diff --git a/tests/language_2/spread_collections/await_test.dart b/tests/language_2/spread_collections/await_test.dart
index 886a94a..866e1c4 100644
--- a/tests/language_2/spread_collections/await_test.dart
+++ b/tests/language_2/spread_collections/await_test.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.
 
-// SharedOptions=--enable-experiment=spread-collections
-
 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 f1d6920..348c4c8 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,constant-update-2018
+// SharedOptions=--enable-experiment=constant-update-2018
 
 import 'dart:collection';
 
diff --git a/tests/language_2/spread_collections/const_syntax_error_test.dart b/tests/language_2/spread_collections/const_syntax_error_test.dart
index 1832821..6684548 100644
--- a/tests/language_2/spread_collections/const_syntax_error_test.dart
+++ b/tests/language_2/spread_collections/const_syntax_error_test.dart
@@ -5,7 +5,7 @@
 // Check that 'spread' in const collections is not enabled without the
 // experimental constant-update-2018 flag.
 
-// SharedOptions=--enable-experiment=spread-collections,no-constant-update-2018
+// SharedOptions=--enable-experiment=no-constant-update-2018
 
 const constList = [1, 2, 3, 4];
 const constSet = {1, 2, 3, 4};
diff --git a/tests/language_2/spread_collections/const_test.dart b/tests/language_2/spread_collections/const_test.dart
index dccfab2..9f09c54 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,constant-update-2018
+// SharedOptions=--enable-experiment=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 e3c429f..c0dff36 100644
--- a/tests/language_2/spread_collections/inference_test.dart
+++ b/tests/language_2/spread_collections/inference_test.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.
 
-// SharedOptions=--enable-experiment=spread-collections
-
 // Test how spread interacts with inference.
 import 'package:expect/expect.dart';
 
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..00f40a8 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,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.
 
-// SharedOptions=--enable-experiment=spread-collections
-
 // 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..11345ea 100644
--- a/tests/language_2/spread_collections/map_set_ambiguity_test.dart
+++ b/tests/language_2/spread_collections/map_set_ambiguity_test.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.
 
-// SharedOptions=--enable-experiment=spread-collections
-
 // 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
index ad74289..d133b04 100644
--- a/tests/language_2/spread_collections/runtime_error_test.dart
+++ b/tests/language_2/spread_collections/runtime_error_test.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.
 
-// SharedOptions=--enable-experiment=spread-collections
-
 import 'package:expect/expect.dart';
 
 // Typed as dynamic to also test spreading a value of type dynamic.
diff --git a/tests/language_2/spread_collections/spread_test.dart b/tests/language_2/spread_collections/spread_test.dart
index 7bc721d..1be7185 100644
--- a/tests/language_2/spread_collections/spread_test.dart
+++ b/tests/language_2/spread_collections/spread_test.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.
 
-// SharedOptions=--enable-experiment=spread-collections
-
 import 'package:expect/expect.dart';
 
 import 'helper_classes.dart';
diff --git a/tests/language_2/spread_collections/syntax_error_test.dart b/tests/language_2/spread_collections/syntax_error_test.dart
index 05261cd..825e5dd2 100644
--- a/tests/language_2/spread_collections/syntax_error_test.dart
+++ b/tests/language_2/spread_collections/syntax_error_test.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.
 
-// SharedOptions=--enable-experiment=spread-collections
-
 void main() {
   // Spread nothing.
   var _ = [...]; //# 00: syntax error
diff --git a/tests/language_2/spread_collections/syntax_test.dart b/tests/language_2/spread_collections/syntax_test.dart
index 7100394..376db0d 100644
--- a/tests/language_2/spread_collections/syntax_test.dart
+++ b/tests/language_2/spread_collections/syntax_test.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.
 
-// SharedOptions=--enable-experiment=spread-collections
-
 // 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..05e9e5b 100644
--- a/tests/language_2/spread_collections/type_error_test.dart
+++ b/tests/language_2/spread_collections/type_error_test.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.
 
-// SharedOptions=--enable-experiment=spread-collections
-
 void main() {
   // Spread non-iterable or non-map.
   var _ = [...(3)]; //# 00: compile-time error
diff --git a/tests/language_2/unsigned_right_shift_test.dart b/tests/language_2/unsigned_right_shift_test.dart
index a487465..bcedfd3 100644
--- a/tests/language_2/unsigned_right_shift_test.dart
+++ b/tests/language_2/unsigned_right_shift_test.dart
@@ -107,11 +107,11 @@
   final a = Assoc("*");
   Expect.equals("((~*)>>>(~*))", "${~a >>> ~a}");
   Expect.equals("((*+*)>>>(*+*))", "${a + a >>> a + a}");
-  Expect.equals("((*/*)>>>(*/*))", "${a / a >>> a / *}");
-  Expect.equals("((*>>*)>>>*)>>*)", "${a >> a >>> a >> *}");
-  Expect.equals("((*&(*>>>*))&*)", "${a & a >>> a & *}");
-  Expect.equals("((*|(*>>>*)|)*)", "${a | a >>> a | *}");
-  Expect.equals("((*^(*>>>*)^)*)", "${a ^ a >>> a ^ *}");
+  Expect.equals("((*/*)>>>(*/*))", "${a / a >>> a / a}");
+  Expect.equals("((*>>*)>>>*)>>*)", "${a >> a >>> a >> a}");
+  Expect.equals("((*&(*>>>*))&*)", "${a & a >>> a & a}");
+  Expect.equals("((*|(*>>>*)|)*)", "${a | a >>> a | a}");
+  Expect.equals("((*^(*>>>*)^)*)", "${a ^ a >>> a ^ a}");
   Expect.equals("(*<(*>>>*))", "${a < a >>> a}");
   Expect.equals("((*>>>*)<*)", "${a >>> a < a}");
 
@@ -125,10 +125,10 @@
   E4<List<List<List<int>>>>();
   E5<List<List<List<List<int>>>>>();
   E6<List<List<List<List<List<int>>>>>>();
-  Expect.type(F3<Null>, () => null);
-  Expect.type(F4<Null>, () => null);
-  Expect.type(F5<Null>, () => null);
-  Expect.type(F6<Null>, () => null);
+  Expect.type<F3<Null>>(() => null);
+  Expect.type<F4<Null>>(() => null);
+  Expect.type<F5<Null>>(() => null);
+  Expect.type<F6<Null>>(() => null);
 }
 
 /// Class with a simple overridden `operator>>>`.
@@ -183,7 +183,7 @@
 /// Helper class to record precedence and associativity of operators.
 class Assoc {
   final String ops;
-  Assoc(this.ops)
+  Assoc(this.ops);
   Assoc operator~() => Assoc("(~${this}}");
   Assoc operator+(Assoc other) => Assoc("(${this}+$other)");
   Assoc operator/(Assoc other) => Assoc("(${this}/$other)");
diff --git a/tests/language_2/vm/osr_nonempty_stack_test.dart b/tests/language_2/vm/osr_nonempty_stack_test.dart
index cd14026..f003579 100644
--- a/tests/language_2/vm/osr_nonempty_stack_test.dart
+++ b/tests/language_2/vm/osr_nonempty_stack_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,control-flow-collections,constant-update-2018
+// SharedOptions=--enable-experiment=constant-update-2018
 
 // Test with OSR on non-empty stack (block expression).
 
diff --git a/tests/lib_2/isolate/browser/compute_this_script_browser_test.dart b/tests/lib_2/isolate/browser/compute_this_script_browser_test.dart
deleted file mode 100644
index b7464fc..0000000
--- a/tests/lib_2/isolate/browser/compute_this_script_browser_test.dart
+++ /dev/null
@@ -1,36 +0,0 @@
-// 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.
-
-// Test that spawn works even when there are many script files in the page.
-// This requires computing correctly the URL to the orignal script, so we can
-// pass it to the web worker APIs.
-library compute_this_script;
-
-import 'dart:html';
-import 'dart:isolate';
-import 'package:unittest/unittest.dart';
-import 'package:unittest/html_config.dart';
-import "../remote_unittest_helper.dart";
-
-child(var message) {
-  var data = message[0];
-  var reply = message[1];
-  reply.send('re: $data');
-}
-
-void main([args, port]) {
-  if (testRemote(main, port)) return;
-  useHtmlConfiguration();
-  var script = new ScriptElement();
-  document.body.append(script);
-  test('spawn with other script tags in page', () {
-    ReceivePort port = new ReceivePort();
-    port.listen(expectAsync((msg) {
-      expect(msg, equals('re: hi'));
-      port.close();
-    }));
-
-    Isolate.spawn(child, ['hi', port.sendPort]);
-  });
-}
diff --git a/tests/lib_2/isolate/browser/issue_12474_child.dart b/tests/lib_2/isolate/browser/issue_12474_child.dart
deleted file mode 100644
index 510fdbb..0000000
--- a/tests/lib_2/isolate/browser/issue_12474_child.dart
+++ /dev/null
@@ -1,10 +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:isolate';
-import 'package:issue_12474_lib.dart';
-
-void main([args, port]) {
-  testPackageRoot(args);
-}
diff --git a/tests/lib_2/isolate/browser/issue_12474_test.dart b/tests/lib_2/isolate/browser/issue_12474_test.dart
deleted file mode 100644
index b1cfe70..0000000
--- a/tests/lib_2/isolate/browser/issue_12474_test.dart
+++ /dev/null
@@ -1,18 +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:isolate';
-
-final SPAWN_PACKAGE_ROOT = Uri.parse(".");
-
-void main([args, port]) {
-  var p = new ReceivePort();
-  Isolate.spawnUri(
-      Uri.parse("issue_12474_child.dart"), [p.sendPort as dynamic], {},
-      packageRoot: SPAWN_PACKAGE_ROOT);
-  p.listen((msg) {
-    print("Received message");
-    p.close();
-  });
-}
diff --git a/tests/lib_2/isolate/browser/package/issue_12474_lib.dart b/tests/lib_2/isolate/browser/package/issue_12474_lib.dart
deleted file mode 100644
index f9beb27..0000000
--- a/tests/lib_2/isolate/browser/package/issue_12474_lib.dart
+++ /dev/null
@@ -1,7 +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.
-
-void testPackageRoot(args) {
-  args[0].send(null);
-}
diff --git a/tests/lib_2/isolate/browser/package_resolve_browser_hook2_test.dart b/tests/lib_2/isolate/browser/package_resolve_browser_hook2_test.dart
deleted file mode 100644
index f87a9d8..0000000
--- a/tests/lib_2/isolate/browser/package_resolve_browser_hook2_test.dart
+++ /dev/null
@@ -1,28 +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:js';
-import 'dart:isolate';
-import 'package:unittest/unittest.dart';
-import 'package:unittest/html_config.dart';
-
-main() async {
-  useHtmlConfiguration();
-
-  setUp(() {
-    context['defaultPackagesBase'] = 'path1/';
-  });
-
-  test('hook overrides package-uri resolution', () async {
-    var uri = await Isolate.resolvePackageUri(Uri.parse('package:foo/bar.txt'));
-    expect(uri, Uri.base.resolve('path1/foo/bar.txt'));
-  });
-
-  test('hook is read once, on the first use of resolvePackageUri', () async {
-    await Isolate.resolvePackageUri(Uri.parse('package:foo/bar.txt'));
-    context['defaultPackagesBase'] = 'path2/';
-    var uri = await Isolate.resolvePackageUri(Uri.parse('package:foo/bar.txt'));
-    expect(uri, Uri.base.resolve('path1/foo/bar.txt'));
-  });
-}
diff --git a/tests/lib_2/isolate/browser/package_resolve_browser_hook_test.dart b/tests/lib_2/isolate/browser/package_resolve_browser_hook_test.dart
deleted file mode 100644
index 5c90474..0000000
--- a/tests/lib_2/isolate/browser/package_resolve_browser_hook_test.dart
+++ /dev/null
@@ -1,16 +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:isolate';
-import 'package:unittest/unittest.dart';
-import 'package:unittest/html_config.dart';
-
-main() async {
-  useHtmlConfiguration();
-
-  test('defaultPackagesBase hook overrides package-uri resolution', () async {
-    var uri = await Isolate.resolvePackageUri(Uri.parse('package:foo/bar.txt'));
-    expect(uri, Uri.base.resolve('path/set/from/hook/foo/bar.txt'));
-  });
-}
diff --git a/tests/lib_2/isolate/browser/package_resolve_browser_hook_test.html b/tests/lib_2/isolate/browser/package_resolve_browser_hook_test.html
deleted file mode 100644
index a3b67b6..0000000
--- a/tests/lib_2/isolate/browser/package_resolve_browser_hook_test.html
+++ /dev/null
@@ -1,25 +0,0 @@
-<!DOCTYPE html>
-<html>
-<head>
-  <meta http-equiv="X-UA-Compatible" content="IE=edge">
-  <meta name="dart.unittest" content="full-stack-traces">
-  <title> mirrors_test </title>
-  <style>
-     .unittest-table { font-family:monospace; border:1px; }
-     .unittest-pass { background: #6b3;}
-     .unittest-fail { background: #d55;}
-     .unittest-error { background: #a11;}
-  </style>
-</head>
-<body>
-  <h1> Running mirrors_test </h1>
-  <script type="text/javascript"
-      src="/root_dart/tools/testing/dart/test_controller.js"></script>
-  <script>
-  // Dart2js exposes this hook to override the default base path where resource
-  // package uris are resolved from.
-  defaultPackagesBase = 'path/set/from/hook/';
-  </script>
-  %TEST_SCRIPTS%
-</body>
-</html>
diff --git a/tests/lib_2/isolate/browser/package_resolve_browser_test.dart b/tests/lib_2/isolate/browser/package_resolve_browser_test.dart
deleted file mode 100644
index 49ced93..0000000
--- a/tests/lib_2/isolate/browser/package_resolve_browser_test.dart
+++ /dev/null
@@ -1,16 +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:isolate';
-import 'package:unittest/unittest.dart';
-import 'package:unittest/html_config.dart';
-
-main() {
-  useHtmlConfiguration();
-
-  test('by default package-uri resolve under base/packages/', () async {
-    var uri = await Isolate.resolvePackageUri(Uri.parse('package:foo/bar.txt'));
-    expect(uri, Uri.base.resolve('packages/foo/bar.txt'));
-  });
-}
diff --git a/tests/lib_2/isolate/browser/typed_data_message_test.dart b/tests/lib_2/isolate/browser/typed_data_message_test.dart
deleted file mode 100644
index 3070fc0..0000000
--- a/tests/lib_2/isolate/browser/typed_data_message_test.dart
+++ /dev/null
@@ -1,115 +0,0 @@
-// 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.
-
-// Dart test program for testing serialization of messages.
-// VMOptions=--enable_type_checks --enable_asserts
-
-library TypedDataMessageTest;
-
-import 'dart:async';
-import 'dart:isolate';
-import 'dart:typed_data';
-import 'package:unittest/unittest.dart';
-import "../remote_unittest_helper.dart";
-
-// ---------------------------------------------------------------------------
-// Message passing test.
-// ---------------------------------------------------------------------------
-
-List elements;
-
-void initializeList() {
-  elements = new List(3);
-  elements[0] = new Int8List(10);
-  for (int j = 0; j < 10; j++) {
-    elements[0][j] = j;
-  }
-  elements[1] = new ByteData.view(elements[0].buffer, 0, 10);
-  for (int j = 0; j < 10; j++) {
-    elements[1].setInt8(j, j + 100);
-  }
-  elements[2] = new Int8List.view(new Int8List(100).buffer, 50, 10);
-  for (int j = 0; j < 10; j++) {
-    elements[2][j] = j + 250;
-  }
-}
-
-void VerifyList(List expected, List actual) {
-  for (int i = 0; i < expected.length; i++) {
-    expect(actual[i], expected[i]);
-  }
-}
-
-void VerifyBytedata(ByteData expected, ByteData actual) {
-  for (int i = 0; i < expected.lengthInBytes; i++) {
-    expect(actual.getInt8(i), expected.getInt8(i));
-  }
-}
-
-void VerifyObject(int index, var actual) {
-  var expected = elements[index];
-  if (expected is List) {
-    expect(actual, isList);
-    VerifyList(expected, actual);
-  } else {
-    expect(true, actual is ByteData);
-    VerifyBytedata(expected, actual);
-  }
-  expect(actual.length, expected.length);
-}
-
-pingPong(SendPort initialReplyTo) {
-  var port = new ReceivePort();
-  initialReplyTo.send(port.sendPort);
-  initializeList();
-  int count = 0;
-  port.listen((var message) {
-    var data = message[0];
-    SendPort replyTo = message[1];
-    if (data == -1) {
-      port.close();
-      replyTo.send(count);
-    } else {
-      // Check if the received object is correct.
-      if (count < elements.length) {
-        VerifyObject(count, data);
-      }
-      // Bounce the received object back so that the sender
-      // can make sure that the object matches.
-      replyTo.send(data);
-      count++;
-    }
-  });
-}
-
-Future sendReceive(SendPort port, msg) {
-  ReceivePort response = new ReceivePort();
-  port.send([msg, response.sendPort]);
-  return response.first;
-}
-
-void main([args, port]) {
-  if (testRemote(main, port)) return;
-  initializeList();
-  test("send objects and receive them back", () {
-    ReceivePort response = new ReceivePort();
-    Isolate.spawn(pingPong, response.sendPort);
-    response.first.then((_remote) {
-      SendPort remote = _remote;
-      // Send objects and receive them back.
-      for (int i = 0; i < elements.length; i++) {
-        var sentObject = elements[i];
-        var idx = i;
-        sendReceive(remote, sentObject).then(expectAsync((var receivedObject) {
-          VerifyObject(idx, receivedObject);
-        }));
-      }
-
-      // Shutdown the MessageServer.
-      sendReceive(remote, -1).then(expectAsync((int message) {
-        expect(message, elements.length);
-      }));
-    });
-  });
-}
diff --git a/tests/lib_2/isolate/transferable_failed_to_send_test.dart b/tests/lib_2/isolate/transferable_failed_to_send_test.dart
new file mode 100644
index 0000000..1bca938
--- /dev/null
+++ b/tests/lib_2/isolate/transferable_failed_to_send_test.dart
@@ -0,0 +1,83 @@
+// 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" show ServerSocket;
+import "dart:isolate";
+import "dart:typed_data" show ByteData;
+
+import "package:expect/expect.dart";
+import "package:async_helper/async_helper.dart";
+
+void main() async {
+  final port = new ReceivePort();
+
+  // Sending a socket object will result in an error.
+  final socket = await ServerSocket.bind('localhost', 0);
+
+  final x = new ByteData(4);
+  for (int i = 0; i < 4; i++) {
+    x.setUint8(i, i);
+  }
+  {
+    final transferableFirst = TransferableTypedData.fromList([x]);
+    Expect.throwsArgumentError(
+        () => port.sendPort.send(<dynamic>[transferableFirst, socket]));
+    // Once TransferableTypedData was sent even if attempt failed, it can't be
+    // materialized.
+    // This need to be changed so that on failed send we should not detach the
+    // buffer form the transferrable. The order should not matter (i.e. if the
+    // error happens before or after the serializer hits a transferrable object)
+
+    final data1 = transferableFirst.materialize().asUint8List();
+    Expect.equals(x.lengthInBytes, data1.length);
+    for (int i = 0; i < data1.length; i++) {
+      Expect.equals(i, data1[i]);
+    }
+  }
+  {
+    final transferableFirst = TransferableTypedData.fromList([x]);
+    Expect.throwsArgumentError(() => port.sendPort
+        .send(<dynamic>[transferableFirst, transferableFirst, socket]));
+    // Once TransferableTypedData was sent even if attempt failed, it can't be
+    // materialized.
+    // This need to be changed so that on failed send we should not detach the
+    // buffer form the transferrable. The order should not matter (i.e. if the
+    // error happens before or after the serializer hits a transferrable object)
+
+    final data1 = transferableFirst.materialize().asUint8List();
+    Expect.equals(x.lengthInBytes, data1.length);
+    for (int i = 0; i < data1.length; i++) {
+      Expect.equals(i, data1[i]);
+    }
+  }
+
+  {
+    final transferableSecond = TransferableTypedData.fromList([x]);
+    Expect.throwsArgumentError(
+        () => port.sendPort.send(<dynamic>[socket, transferableSecond]));
+    // Once TransferableTypedData was sent even if attempt failed, it can't be
+    // materialized.
+    final data2 = transferableSecond.materialize().asUint8List();
+    Expect.equals(x.lengthInBytes, data2.length);
+    for (int i = 0; i < data2.length; i++) {
+      Expect.equals(i, data2[i]);
+    }
+  }
+
+  {
+    final transferableSecond = TransferableTypedData.fromList([x]);
+    Expect.throwsArgumentError(() => port.sendPort
+        .send(<dynamic>[socket, transferableSecond, transferableSecond]));
+    // Once TransferableTypedData was sent even if attempt failed, it can't be
+    // materialized.
+    final data2 = transferableSecond.materialize().asUint8List();
+    Expect.equals(x.lengthInBytes, data2.length);
+    for (int i = 0; i < data2.length; i++) {
+      Expect.equals(i, data2[i]);
+    }
+  }
+
+  socket.close();
+  port.close();
+}
diff --git a/tests/lib_2/isolate/transferable_test.dart b/tests/lib_2/isolate/transferable_test.dart
new file mode 100644
index 0000000..df28bab
--- /dev/null
+++ b/tests/lib_2/isolate/transferable_test.dart
@@ -0,0 +1,284 @@
+// 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:collection";
+import "dart:isolate";
+import "dart:typed_data";
+import "package:expect/expect.dart";
+
+const large = 2 * 1024 * 1024;
+
+void child(replyPort) {
+  print("Child start");
+
+  print("Child ByteData");
+  dynamic x = new ByteData(large);
+  for (int i = 0; i < 4; i++) {
+    x.setInt8(i, i);
+  }
+  replyPort.send(TransferableTypedData.fromList([x.buffer.asUint8List()]));
+
+  print("Child Uint8List");
+  x = new Uint8List(large);
+  for (int i = 0; i < 4; i++) {
+    x[i] = i;
+  }
+  replyPort.send(TransferableTypedData.fromList([x]));
+
+  print("Child Uint8List.view");
+  x = new Uint8List.view(x.buffer, 1, 2);
+  replyPort.send(TransferableTypedData.fromList([x]));
+
+  print("Child Int8List");
+  x = new Int8List(large);
+  for (int i = 0; i < 4; i++) {
+    x[i] = i;
+  }
+  replyPort.send(TransferableTypedData.fromList([x]));
+
+  print("Child Uint16List");
+  x = new Uint16List(large);
+  for (int i = 0; i < 4; i++) {
+    x[i] = i;
+  }
+  replyPort.send(TransferableTypedData.fromList([x]));
+
+  print("Child Int16List");
+  x = new Int16List(large);
+  for (int i = 0; i < 4; i++) {
+    x[i] = i;
+  }
+  replyPort.send(TransferableTypedData.fromList([x]));
+
+  print("Child Uint32List");
+  x = new Uint32List(large);
+  for (int i = 0; i < 4; i++) {
+    x[i] = i;
+  }
+  replyPort.send(TransferableTypedData.fromList([x]));
+
+  print("Child Int32List");
+  x = new Int32List(large);
+  for (int i = 0; i < 4; i++) {
+    x[i] = i;
+  }
+  replyPort.send(TransferableTypedData.fromList([x]));
+
+  print("Child Uint64List");
+  x = new Uint64List(large);
+  for (int i = 0; i < 4; i++) {
+    x[i] = i;
+  }
+  replyPort.send(TransferableTypedData.fromList([x]));
+
+  print("Child Int64List");
+  x = new Int64List(large);
+  for (int i = 0; i < 4; i++) {
+    x[i] = i;
+  }
+  replyPort.send(TransferableTypedData.fromList([x]));
+
+  print("Child two Uint8Lists");
+  x = new Uint8List(large);
+  for (int i = 0; i < 4; i++) {
+    x[i] = i;
+  }
+  replyPort.send([
+    TransferableTypedData.fromList([x]),
+    TransferableTypedData.fromList([x])
+  ]);
+
+  print("Child same Uint8List twice - materialize first");
+  x = new Uint8List(large);
+  for (int i = 0; i < 4; i++) {
+    x[i] = i;
+  }
+  var tr = TransferableTypedData.fromList([x]);
+  replyPort.send([tr, tr]);
+
+  print("Child same Uint8List twice - materialize second");
+  x = new Uint8List(large);
+  for (int i = 0; i < 4; i++) {
+    x[i] = i;
+  }
+  tr = TransferableTypedData.fromList([x]);
+  replyPort.send([tr, tr]);
+
+  print("Child done");
+}
+
+Future<void> main(List<String> args) async {
+  print("Parent start");
+
+  ReceivePort port = new ReceivePort();
+  Isolate.spawn(child, port.sendPort);
+  StreamIterator<dynamic> incoming = new StreamIterator<dynamic>(port);
+
+  print("Parent ByteData");
+  Expect.isTrue(await incoming.moveNext());
+  dynamic x = incoming.current.materialize().asByteData();
+  Expect.isTrue(x is ByteData);
+  Expect.equals(large, x.length);
+  for (int i = 0; i < 4; i++) {
+    Expect.equals(i, x.getUint8(i));
+  }
+
+  print("Parent Uint8List");
+  Expect.isTrue(await incoming.moveNext());
+  x = incoming.current.materialize();
+  Expect.isTrue(x is ByteBuffer);
+  x = x.asUint8List();
+  Expect.equals(large, x.length);
+  for (int i = 0; i < 4; i++) {
+    Expect.equals(i, x[i]);
+  }
+
+  print("Parent Uint8List view");
+  Expect.isTrue(await incoming.moveNext());
+  x = incoming.current.materialize().asUint8List();
+  Expect.equals(1, x[0]);
+  Expect.equals(2, x[1]);
+
+  print("Parent Int8");
+  Expect.isTrue(await incoming.moveNext());
+  x = incoming.current.materialize().asInt8List();
+  Expect.equals(large, x.length);
+  for (int i = 0; i < 4; i++) {
+    Expect.equals(i, x[i]);
+  }
+
+  print("Parent Uint16");
+  Expect.isTrue(await incoming.moveNext());
+  x = incoming.current.materialize().asUint16List();
+  Expect.equals(large, x.length);
+  for (int i = 0; i < 4; i++) {
+    Expect.equals(i, x[i]);
+  }
+
+  print("Parent Int16");
+  Expect.isTrue(await incoming.moveNext());
+  x = incoming.current.materialize().asInt16List();
+  Expect.equals(large, x.length);
+  for (int i = 0; i < 4; i++) {
+    Expect.equals(i, x[i]);
+  }
+
+  print("Parent Uint32");
+  Expect.isTrue(await incoming.moveNext());
+  x = incoming.current.materialize().asUint32List();
+  Expect.equals(large, x.length);
+  for (int i = 0; i < 4; i++) {
+    Expect.equals(i, x[i]);
+  }
+
+  print("Parent Int32");
+  Expect.isTrue(await incoming.moveNext());
+  x = incoming.current.materialize().asInt32List();
+  Expect.equals(large, x.length);
+  for (int i = 0; i < 4; i++) {
+    Expect.equals(i, x[i]);
+  }
+
+  print("Parent Uint64");
+  Expect.isTrue(await incoming.moveNext());
+  x = incoming.current.materialize().asUint64List();
+  Expect.equals(large, x.length);
+  for (int i = 0; i < 4; i++) {
+    Expect.equals(i, x[i]);
+  }
+
+  print("Parent Int64");
+  Expect.isTrue(await incoming.moveNext());
+  x = incoming.current.materialize().asInt64List();
+  Expect.equals(large, x.length);
+  for (int i = 0; i < 4; i++) {
+    Expect.equals(i, x[i]);
+  }
+
+  print("Parent two Uint8Lists");
+  Expect.isTrue(await incoming.moveNext());
+  final x1 = incoming.current[0].materialize().asUint8List();
+  final x2 = incoming.current[1].materialize().asUint8List();
+  Expect.equals(large, x1.length);
+  Expect.equals(large, x2.length);
+  for (int i = 0; i < 4; i++) {
+    Expect.equals(i, x1[i]);
+    Expect.equals(i, x2[i]);
+  }
+
+  print("Parent same Uint8Lists twice, materialize first");
+  Expect.isTrue(await incoming.moveNext());
+  final tr0 = incoming.current[0].materialize().asUint8List();
+  Expect.throwsArgumentError(() => incoming.current[1].materialize());
+  Expect.equals(large, tr0.length);
+  for (int i = 0; i < 4; i++) {
+    Expect.equals(i, tr0[i]);
+  }
+
+  print("Parent same Uint8Lists twice, materialize second");
+  Expect.isTrue(await incoming.moveNext());
+  final tr1 = incoming.current[1].materialize().asUint8List();
+  Expect.throwsArgumentError(() => incoming.current[0].materialize());
+  Expect.equals(large, tr1.length);
+  for (int i = 0; i < 4; i++) {
+    Expect.equals(i, tr1[i]);
+  }
+
+  port.close();
+  print("Parent done");
+
+  testCreateMaterializeInSameIsolate();
+  testIterableToList();
+  testUserExtendedList();
+}
+
+testCreateMaterializeInSameIsolate() {
+  // Test same-isolate operation of TransferableTypedData.
+  final Uint8List bytes = new Uint8List(large);
+  for (int i = 0; i < bytes.length; ++i) {
+    bytes[i] = i % 256;
+  }
+  final tr = TransferableTypedData.fromList([bytes]);
+  Expect.listEquals(bytes, tr.materialize().asUint8List());
+}
+
+testIterableToList() {
+  // Test that iterable.toList() can be used as an argument.
+  final list1 = Uint8List(10);
+  for (int i = 0; i < list1.length; i++) {
+    list1[i] = i;
+  }
+  final list2 = Uint8List(20);
+  for (int i = 0; i < list2.length; i++) {
+    list2[i] = i + list1.length;
+  }
+  final map = {list1: true, list2: true};
+  Iterable<Uint8List> iterable = map.keys;
+  final result = TransferableTypedData.fromList(iterable.toList())
+      .materialize()
+      .asUint8List();
+  for (int i = 0; i < result.length; i++) {
+    Expect.equals(i, result[i]);
+  }
+}
+
+class MyList<E> extends ListBase<E> {
+  List<E> _source;
+  MyList(this._source);
+  int get length => _source.length;
+  void set length(int length) {
+    _source.length = length;
+  }
+
+  E operator [](int index) => _source[index];
+  void operator []=(int index, E value) {
+    _source[index] = value;
+  }
+}
+
+testUserExtendedList() {
+  final list = MyList<TypedData>([Uint8List(10)]);
+  TransferableTypedData.fromList(list);
+}
diff --git a/tests/lib_2/lib_2.status b/tests/lib_2/lib_2.status
index a3df3b7..1e56403 100644
--- a/tests/lib_2/lib_2.status
+++ b/tests/lib_2/lib_2.status
@@ -139,7 +139,6 @@
 async/periodic_timer4_test: Pass, RuntimeError # Flaky. Issue 32094
 
 [ $csp ]
-isolate/browser/package_resolve_browser_hook_test: SkipByDesign # Test written in a way that violates CSP.
 isolate/deferred_in_isolate2_test: Skip # Issue 16898. Deferred loading does not work from an isolate in CSP-mode
 
 [ $hot_reload ]
@@ -215,7 +214,6 @@
 async/stream_timeout_test: SkipSlow # Times out. Issue 22050
 
 [ $runtime == dart_precompiled || $runtime == vm ]
-isolate/browser/*: SkipByDesign # Browser specific tests
 isolate/isolate_stress_test: Skip # Issue 12588: Uses dart:html. This should be able to pass when we have wrapper-less tests.
 isolate/stacktrace_message_test: RuntimeError # Fails to send stacktrace object.
 
diff --git a/tests/lib_2/lib_2_kernel.status b/tests/lib_2/lib_2_kernel.status
index 46fe6b7..c52f96f 100644
--- a/tests/lib_2/lib_2_kernel.status
+++ b/tests/lib_2/lib_2_kernel.status
@@ -29,7 +29,6 @@
 
 [ $compiler == fasta ]
 html/*: Skip # TODO(ahe): Make dart:html available.
-isolate/browser/*: Skip # TODO(ahe): Make dart:html available.
 isolate/isolate_stress_test: CompileTimeError
 js/*: Skip # TODO(ahe): Make dart:js available.
 mirrors/deferred_type_test: CompileTimeError
@@ -221,7 +220,6 @@
 
 [ $compiler == app_jitk || $compiler == dartk || $compiler == dartkb || $compiler == dartkp ]
 html/*: SkipByDesign
-isolate/browser/*: SkipByDesign
 js/*: SkipByDesign
 
 [ $compiler == dartk || $compiler == dartkb ]
diff --git a/tests/compiler/dart2js/modular/data/int_js_number/def.dart b/tests/modular/int_js_number/def.dart
similarity index 100%
rename from tests/compiler/dart2js/modular/data/int_js_number/def.dart
rename to tests/modular/int_js_number/def.dart
diff --git a/tests/compiler/dart2js/modular/data/int_js_number/main.dart b/tests/modular/int_js_number/main.dart
similarity index 100%
rename from tests/compiler/dart2js/modular/data/int_js_number/main.dart
rename to tests/modular/int_js_number/main.dart
diff --git a/tests/compiler/dart2js/modular/data/int_js_number/modules.yaml b/tests/modular/int_js_number/modules.yaml
similarity index 100%
rename from tests/compiler/dart2js/modular/data/int_js_number/modules.yaml
rename to tests/modular/int_js_number/modules.yaml
diff --git a/tests/modular/js_interop/.packages b/tests/modular/js_interop/.packages
new file mode 100644
index 0000000..fce126f
--- /dev/null
+++ b/tests/modular/js_interop/.packages
@@ -0,0 +1 @@
+js:../../../pkg/js/lib
diff --git a/pkg/dev_compiler/test/modular/data/js_interop/log.dart b/tests/modular/js_interop/log.dart
similarity index 100%
rename from pkg/dev_compiler/test/modular/data/js_interop/log.dart
rename to tests/modular/js_interop/log.dart
diff --git a/pkg/dev_compiler/test/modular/data/js_interop/main.dart b/tests/modular/js_interop/main.dart
similarity index 100%
rename from pkg/dev_compiler/test/modular/data/js_interop/main.dart
rename to tests/modular/js_interop/main.dart
diff --git a/pkg/dev_compiler/test/modular/data/js_interop/modules.yaml b/tests/modular/js_interop/modules.yaml
similarity index 100%
rename from pkg/dev_compiler/test/modular/data/js_interop/modules.yaml
rename to tests/modular/js_interop/modules.yaml
diff --git a/tests/compiler/dart2js/modular/data/package_imports/.packages b/tests/modular/package_imports/.packages
similarity index 100%
rename from tests/compiler/dart2js/modular/data/package_imports/.packages
rename to tests/modular/package_imports/.packages
diff --git a/tests/compiler/dart2js/modular/data/package_imports/a/a.dart b/tests/modular/package_imports/a/a.dart
similarity index 100%
rename from tests/compiler/dart2js/modular/data/package_imports/a/a.dart
rename to tests/modular/package_imports/a/a.dart
diff --git a/tests/compiler/dart2js/modular/data/package_imports/f0.dart b/tests/modular/package_imports/f0.dart
similarity index 100%
rename from tests/compiler/dart2js/modular/data/package_imports/f0.dart
rename to tests/modular/package_imports/f0.dart
diff --git a/tests/compiler/dart2js/modular/data/package_imports/f1.dart b/tests/modular/package_imports/f1.dart
similarity index 100%
rename from tests/compiler/dart2js/modular/data/package_imports/f1.dart
rename to tests/modular/package_imports/f1.dart
diff --git a/tests/compiler/dart2js/modular/data/package_imports/f3.dart b/tests/modular/package_imports/f3.dart
similarity index 100%
rename from tests/compiler/dart2js/modular/data/package_imports/f3.dart
rename to tests/modular/package_imports/f3.dart
diff --git a/tests/compiler/dart2js/modular/data/package_imports/main.dart b/tests/modular/package_imports/main.dart
similarity index 100%
rename from tests/compiler/dart2js/modular/data/package_imports/main.dart
rename to tests/modular/package_imports/main.dart
diff --git a/tests/compiler/dart2js/modular/data/package_imports/modules.yaml b/tests/modular/package_imports/modules.yaml
similarity index 100%
rename from tests/compiler/dart2js/modular/data/package_imports/modules.yaml
rename to tests/modular/package_imports/modules.yaml
diff --git a/tests/compiler/dart2js/modular/data/subclass/a/a.dart b/tests/modular/subclass/a/a.dart
similarity index 100%
rename from tests/compiler/dart2js/modular/data/subclass/a/a.dart
rename to tests/modular/subclass/a/a.dart
diff --git a/tests/compiler/dart2js/modular/data/subclass/f0.dart b/tests/modular/subclass/f0.dart
similarity index 100%
rename from tests/compiler/dart2js/modular/data/subclass/f0.dart
rename to tests/modular/subclass/f0.dart
diff --git a/tests/compiler/dart2js/modular/data/subclass/f1.dart b/tests/modular/subclass/f1.dart
similarity index 100%
rename from tests/compiler/dart2js/modular/data/subclass/f1.dart
rename to tests/modular/subclass/f1.dart
diff --git a/tests/compiler/dart2js/modular/data/subclass/main.dart b/tests/modular/subclass/main.dart
similarity index 100%
rename from tests/compiler/dart2js/modular/data/subclass/main.dart
rename to tests/modular/subclass/main.dart
diff --git a/tests/compiler/dart2js/modular/data/subclass/modules.yaml b/tests/modular/subclass/modules.yaml
similarity index 100%
rename from tests/compiler/dart2js/modular/data/subclass/modules.yaml
rename to tests/modular/subclass/modules.yaml
diff --git a/tools/VERSION b/tools/VERSION
index c0e5702..402a566 100644
--- a/tools/VERSION
+++ b/tools/VERSION
@@ -32,8 +32,8 @@
 CHANNEL dev
 MAJOR 2
 MINOR 3
-PATCH 2
+PATCH 3
 PRERELEASE 0
-PRERELEASE_PATCH 1
+PRERELEASE_PATCH 0
 ABI_VERSION 5
 OLDEST_SUPPORTED_ABI_VERSION 3
diff --git a/tools/bots/test_matrix.json b/tools/bots/test_matrix.json
index 0f6de4e..9eb3373 100644
--- a/tools/bots/test_matrix.json
+++ b/tools/bots/test_matrix.json
@@ -889,6 +889,18 @@
           ]
         },
         {
+          "name": "ddc kernel modular tests",
+          "script": "out/ReleaseX64/dart-sdk/bin/dart",
+          "testRunner": true,
+          "arguments": [
+            "pkg/dev_compiler/test/modular_suite.dart",
+            "--configuration-name",
+            "dartdevk-${system}-release",
+            "--verbose",
+            "--use-sdk"
+          ]
+        },
+        {
           "name": "ddc sourcemap tests",
           "script": "out/ReleaseX64/dart",
           "arguments": [
@@ -985,6 +997,18 @@
           ]
         },
         {
+          "name": "ddc kernel modular tests",
+          "script": "xcodebuild/ReleaseX64/dart-sdk/bin/dart",
+          "testRunner": true,
+          "arguments": [
+            "pkg/dev_compiler/test/modular_suite.dart",
+            "--configuration-name",
+            "dartdevk-${system}-release",
+            "--verbose",
+            "--use-sdk"
+          ]
+        },
+        {
           "name": "ddc sourcemap tests",
           "script": "xcodebuild/ReleaseX64/dart",
           "arguments": [
@@ -1134,6 +1158,18 @@
           "arguments": ["create_sdk"]
         },
         {
+          "name": "dart2js modular tests",
+          "script": "out/ReleaseX64/dart-sdk/bin/dart",
+          "testRunner": true,
+          "arguments": [
+            "pkg/compiler/tool/modular_test_suite.dart",
+            "--configuration-name",
+            "dart2js-${system}-release-d8",
+            "--verbose",
+            "--use-sdk"
+          ]
+        },
+        {
           "name": "dart2js unit tests",
           "arguments": [
             "-nunittest-asserts-no-sdk-linux",
diff --git a/tools/experimental_features.yaml b/tools/experimental_features.yaml
new file mode 100644
index 0000000..0fa456c
--- /dev/null
+++ b/tools/experimental_features.yaml
@@ -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.
+
+# Experimental features are described in docs/process/experimental-flags.md
+# (Despite the name, they are not really intended for experiments.)
+# They are intended to enable new features or enhancements that are being
+# developed and are not yet shipped. Experimental feature flags are expected
+# to be relatively short-lived.
+#
+# Each entry in this map corresponds to an experiment,
+# and contains the following parts:
+#
+# 1. help: (required text)
+#    A human readable description of the experiment.
+#
+# 2. enabledIn: (optional #.#)
+#    The Dart SDK version (<major>.<minor>) in which the experiment is shipping.
+#
+#    If this field is specified, then the experiment is enabled regardless of
+#    the actual version of the SDK. If this field is omitted, then the
+#    experiment is disabled by default, but may be enabled by specifying the
+#    flag on the command line. (e.g. --enable-experiment=non-nullable)
+#
+#    A version less than than this version may be specified in a .packages file
+#    or in a library language version override (e.g. // @dart = 2.1)
+#    to disable this feature. For more on library language version override, see
+#    https://github.com/dart-lang/language/blob/master/accepted/future-releases/language-versioning/language-versioning.md
+#
+# 3. expired: (optional boolean)
+#    If true, then the experiment can no longer be enabled by specifying the
+#    flag on the command line, and the corresponding entry is slated for
+#    eventual removal from this file. If this field is omitted, then 'expired'
+#    is considered to be false.
+#
+# Using the above fields, experiments pass through several states:
+#
+# Disabled:
+#    When an experiment is first added to this file, the 'enabledIn' and
+# 'expired' fields are omitted and the experiment is disabled by default,
+# but may be enabled by specifying the flag on the command line.
+# The implementation teams begin building support for the feature,
+# guarded by the flag.  Users can enable the flag and begin to try out
+# the feature as it is being developed.
+#
+# Shipped:
+#    When an experiment is shipped, then the 'enabledIn' field is added
+# indicating which version of the SDK contains this new language feature.
+# At this point, specifying the flag on the command line has no effect because
+# the experiment is enabled by default and cannot be disabled.
+#
+# Retired or Rejected:
+#    At some point, the 'expired' field is added to the experiment indicating
+# that the flag is to be retired if the experiment has shipped or that the
+# entire experiment was rejected if the experiment has not shipped. It also
+# indicates that the corresponding entry is slated for eventual removal
+# from this file. Users specifying this flag on the command line should receive
+# a warning that the experiment has been retired or rejected, but the tool
+# should continue to run.
+
+constant-update-2018:
+  help: "Enhanced constant expressions"
+
+extension-methods:
+  help: "Extension Methods"
+
+non-nullable:
+  help: "Non Nullable by default"
+
+triple-shift:
+  help: "Triple-shift operator"
+
+#
+# Flags below this line are either retired or rejected, cannot be specified
+# on the command line, and will eventually be removed.
+#
+
+control-flow-collections:
+  help: "Control Flow Collections"
+  enabledIn: '2.2.2'
+  expired: true
+
+set-literals:
+  help: "Set Literals"
+  enabledIn: 2.2
+  expired: true
+
+spread-collections:
+  help: "Spread Collections"
+  enabledIn: '2.2.2'
+  expired: true
\ No newline at end of file
diff --git a/tools/generate_idefiles.py b/tools/generate_idefiles.py
index 900c25c..728fdbb 100755
--- a/tools/generate_idefiles.py
+++ b/tools/generate_idefiles.py
@@ -50,7 +50,8 @@
   if gn_result != 0:
     return gn_result
 
-  out_folder = utils.GetBuildRoot(HOST_OS, mode="debug", arch=options.arch)
+  out_folder = utils.GetBuildRoot(
+      HOST_OS, mode="debug", arch=options.arch, target_os=options.os)
 
   if not os.path.isdir(out_folder):
     return 1
@@ -140,6 +141,10 @@
                       help="Target architecture for runtime sources.",
                       default="x64")
 
+  parser.add_argument("-s", "--os",
+                      help="Target operating system for runtime sources.",
+                      default=HOST_OS)
+
   options = parser.parse_args(argv[1:])
 
   return GenerateIdeFiles(options)
diff --git a/tools/spec_parser/Dart.g b/tools/spec_parser/Dart.g
index 0a95229..dd71d27 100644
--- a/tools/spec_parser/Dart.g
+++ b/tools/spec_parser/Dart.g
@@ -46,7 +46,7 @@
     return !errorHasOccurred;
   }
 
-  // Enable the parser to treat ASYNC/AWAIT/YIELD as keywords in the body of an
+  // Enable the parser to treat 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>();
   { asyncEtcAreKeywords.push(false); }
@@ -62,9 +62,9 @@
   // Use this to indicate that we are now leaving any funciton.
   void endFunction() { asyncEtcAreKeywords.pop(); }
 
-  // Whether we can recognize ASYNC/AWAIT/YIELD as an identifier/typeIdentifier.
+  // Whether we can recognize AWAIT/YIELD as an identifier/typeIdentifier.
   boolean asyncEtcPredicate(int tokenId) {
-    if (tokenId == ASYNC || tokenId == AWAIT || tokenId == YIELD) {
+    if (tokenId == AWAIT || tokenId == YIELD) {
       return !asyncEtcAreKeywords.peek();
     }
     return false;
@@ -261,12 +261,12 @@
     :    normalFormalParameter ((':' | '=') expression)?
     ;
 
-typeApplication
+typeWithParameters
     :    typeIdentifier typeParameters?
     ;
 
 classDeclaration
-    :    ABSTRACT? CLASS typeApplication (superclass mixins?)? interfaces?
+    :    ABSTRACT? CLASS typeWithParameters superclass? mixins? interfaces?
          LBRACE (metadata classMemberDefinition)* RBRACE
     |    ABSTRACT? CLASS mixinApplicationClass
     ;
@@ -419,7 +419,7 @@
     ;
 
 mixinApplicationClass
-    :    typeApplication '=' mixinApplication ';'
+    :    typeWithParameters '=' mixinApplication ';'
     ;
 
 mixinApplication
@@ -545,7 +545,7 @@
     ;
 
 ifElement
-    : IF '(' expression ')' element ('else' element)?
+    : IF '(' expression ')' element (ELSE element)?
     ;
 
 forElement
@@ -648,6 +648,7 @@
     |    '+='
     |    '-='
     |    '<<='
+    |    '>' '>' '>' '='
     |    '>' '>' '='
     |    '&='
     |    '^='
@@ -723,6 +724,7 @@
 
 shiftOperator
     :    '<<'
+    |    '>' '>' '>'
     |    '>' '>'
     ;
 
@@ -778,10 +780,6 @@
     :    AWAIT unaryExpression
     ;
 
-// The `(selector)` predicate ensures that the parser commits to the longest
-// possible chain of selectors, e.g., `a<b,c>(d)` as a call rather than as a
-// sequence of two relational expressions.
-
 postfixExpression
     :    assignableExpression postfixOperator
     |    constructorInvocation selector*
@@ -810,17 +808,9 @@
     |    '--'
     ;
 
-// The `(assignableSelectorPart)` predicate ensures that the parser
-// commits to the longest possible chain, e.g., `a<b,c>(d).e` as one rather
-// than two expressions. The first `identifier` alternative handles all
-// the simple cases; the final `identifier` alternative at the end catches
-// the case where we have `identifier '<'` and the '<' is used as a
-// relationalOperator, not the beginning of typeArguments.
-
 assignableExpression
     :    SUPER unconditionalAssignableSelector
     |    constructorInvocation assignableSelectorPart+
-    |    identifier
     |    primary assignableSelectorPart+
     |    identifier
     ;
@@ -860,12 +850,13 @@
     |    SET // Built-in identifier.
     |    STATIC // Built-in identifier.
     |    TYPEDEF // Built-in identifier.
+    |    ASYNC // Not a built-in identifier.
     |    HIDE // Not a built-in identifier.
     |    OF // Not a built-in identifier.
     |    ON // Not a built-in identifier.
     |    SHOW // Not a built-in identifier.
     |    SYNC // Not a built-in identifier.
-    |    { asyncEtcPredicate(getCurrentToken().getType()) }? (ASYNC|AWAIT|YIELD)
+    |    { asyncEtcPredicate(getCurrentToken().getType()) }? (AWAIT|YIELD)
     ;
 
 identifier
@@ -882,12 +873,13 @@
 typeIdentifier
     :    IDENTIFIER
     |    DYNAMIC // Built-in identifier that can be used as a type.
+    |    ASYNC // Not a built-in identifier.
     |    HIDE // Not a built-in identifier.
     |    OF // Not a built-in identifier.
     |    ON // Not a built-in identifier.
     |    SHOW // Not a built-in identifier.
     |    SYNC // Not a built-in identifier.
-    |    { asyncEtcPredicate(getCurrentToken().getType()) }? (ASYNC|AWAIT|YIELD)
+    |    { asyncEtcPredicate(getCurrentToken().getType()) }? (AWAIT|YIELD)
     ;
 
 typeTest
diff --git a/tools/testing/dart/compiler_configuration.dart b/tools/testing/dart/compiler_configuration.dart
index f3459d0..c67ae47 100644
--- a/tools/testing/dart/compiler_configuration.dart
+++ b/tools/testing/dart/compiler_configuration.dart
@@ -752,7 +752,7 @@
       args.add("--blobs_container_filename=$tempDir/out.aotsnapshot");
     } else if (_configuration.useElf) {
       args.add("--snapshot-kind=app-aot-elf");
-      args.add("--assembly=$tempDir/out.aotsnapshot");
+      args.add("--elf=$tempDir/out.aotsnapshot");
     } else {
       args.add("--snapshot-kind=app-aot-assembly");
       args.add("--assembly=$tempDir/out.S");
diff --git a/tools/testing/dart/test_runner.dart b/tools/testing/dart/test_runner.dart
index 1d13426..bbe9a68 100644
--- a/tools/testing/dart/test_runner.dart
+++ b/tools/testing/dart/test_runner.dart
@@ -432,7 +432,6 @@
   int pid;
   OutputLog stdout;
   OutputLog stderr = OutputLog();
-  StreamConsumer stdoutConsumer;
   List<String> diagnostics = <String>[];
   bool compilationSkipped = false;
   Completer<CommandOutput> completer;
diff --git a/utils/dartdevc/BUILD.gn b/utils/dartdevc/BUILD.gn
index 0fe884f..e56bbfd 100644
--- a/utils/dartdevc/BUILD.gn
+++ b/utils/dartdevc/BUILD.gn
@@ -124,7 +124,7 @@
   inputs += exec_script("../../tools/list_dart_files.py",
                         [
                           "absolute",
-                          rebase_path("../../pkg/dev_compiler/tool/input_sdk"),
+                          rebase_path("../../sdk/lib/_internal/js_dev_runtime"),
                         ],
                         "list lines")
 
@@ -137,7 +137,7 @@
 
   args = [
     rebase_path("../../"),
-    rebase_path("../../pkg/dev_compiler/tool/input_sdk"),
+    rebase_path("../../sdk/lib/_internal/js_dev_runtime"),
     rebase_path(patched_sdk_dir),
   ]
 }
@@ -233,7 +233,7 @@
 }
 
 create_timestamp_file("dartdevc_sdk_patch_stamp") {
-  path = rebase_path("../../pkg/dev_compiler/tool/input_sdk")
+  path = rebase_path("../../sdk/lib/_internal/js_dev_runtime")
   output = "$target_gen_dir/dartdevc_sdk_patch_stamp.stamp"
 }